本文整理了Java中org.apache.chemistry.opencmis.commons.impl.json.parser.Yylex
类的一些代码示例,展示了Yylex
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Yylex
类的具体详情如下:
包路径:org.apache.chemistry.opencmis.commons.impl.json.parser.Yylex
类名称:Yylex
[英](Taken from JSON.simple http://code.google.com/p/json-simple/ and modified for OpenCMIS.)
[中](摘自JSON.simple)http://code.google.com/p/json-simple/并针对OpenCMIS进行了修改。)
代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-commons-impl
/**
* @return The position of the beginning of the current token.
*/
public int getPosition() {
return lexer.getPosition();
}
代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-commons-impl
/**
* Pushes the specified amount of characters back into the input stream.
*
* They will be read again by then next call of the scanning method
*
* @param number
* the number of characters to be read again. This number must
* not be greater than yylength()!
*/
public void yypushback(int number) {
if (number > yylength()) {
zzScanError(ZZ_PUSHBACK_2BIG);
}
zzMarkedPos -= number;
}
代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-commons-impl
boolean eof = zzRefill();
appendYytext(sb);
break;
case 4: {
sb.setLength(0);
yybegin(STRING_BEGIN);
break;
break;
case 16: {
appendChar(sb, '\b');
break;
break;
case 23: {
Boolean val = Boolean.valueOf(yytext());
return new Yytoken(Yytoken.TYPE_VALUE, val);
break;
case 13: {
yybegin(YYINITIAL);
return new Yytoken(Yytoken.TYPE_VALUE, sb.toString());
break;
case 12: {
appendChar(sb, '\\');
break;
代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-android-client
private void nextToken() throws JSONParseException, IOException {
token = lexer.yylex();
if (token == null) {
token = new Yytoken(Yytoken.TYPE_EOF, null);
}
}
代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-android-client
/**
* Reset the parser to the initial state with a new character reader.
*
* @param in
* the new character reader
*/
public void reset(Reader in) {
lexer.yyreset(in);
reset();
}
代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-android-client
boolean eof = zzRefill();
appendYytext(sb);
break;
case 4: {
sb.setLength(0);
yybegin(STRING_BEGIN);
break;
break;
case 16: {
appendChar(sb, '\b');
break;
break;
case 23: {
Boolean val = Boolean.valueOf(yytext());
return new Yytoken(Yytoken.TYPE_VALUE, val);
break;
case 13: {
yybegin(YYINITIAL);
return new Yytoken(Yytoken.TYPE_VALUE, sb.toString());
break;
case 12: {
appendChar(sb, '\\');
break;
代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-commons-impl
private void nextToken() throws JSONParseException, IOException {
token = lexer.yylex();
if (token == null) {
token = new Yytoken(Yytoken.TYPE_EOF, null);
}
}
代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-commons-impl
/**
* Reset the parser to the initial state with a new character reader.
*
* @param in
* the new character reader
*/
public void reset(Reader in) {
lexer.yyreset(in);
reset();
}
代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-android-client
/**
* Pushes the specified amount of characters back into the input stream.
*
* They will be read again by then next call of the scanning method
*
* @param number
* the number of characters to be read again. This number must
* not be greater than yylength()!
*/
public void yypushback(int number) {
if (number > yylength()) {
zzScanError(ZZ_PUSHBACK_2BIG);
}
zzMarkedPos -= number;
}
代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-android-client
/**
* @return The position of the beginning of the current token.
*/
public int getPosition() {
return lexer.getPosition();
}
内容来源于网络,如有侵权,请联系作者删除!