org.teiid.json.simple.Yylex类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中org.teiid.json.simple.Yylex类的一些代码示例,展示了Yylex类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Yylex类的具体详情如下:
包路径:org.teiid.json.simple.Yylex
类名称:Yylex

Yylex介绍

暂无

代码示例

代码示例来源:origin: teiid/teiid

/**
 * @return The position of the beginning of the current token.
 */
public int getPosition(){
  return lexer.getPosition();
}

代码示例来源:origin: org.teiid/teiid-engine

/**
 * 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: teiid/teiid

private void nextToken() throws ParseException, IOException{
  token = lexer.yylex();
  if(token == null)
    token = Yytoken.EOF;
}

代码示例来源:origin: teiid/teiid

boolean eof = zzRefill();
 { sb.setLength(0);yybegin(STRING_BEGIN);
 { Boolean val=Boolean.valueOf(yytext()); return new Yytoken(val);
 { yybegin(YYINITIAL);return new Yytoken(sb.toString());
 { BigDecimal val=new BigDecimal(yytext()); return new Yytoken(val);
 { throw new ParseException(yychar, ParseException.ERROR_UNEXPECTED_CHAR, new Character(yycharat(0)));
case 24: 
 { try{
                        int ch=Integer.parseInt(yytext().substring(2),16);
                        sb.append((char)ch);
     Long val=Long.valueOf(yytext()); return new Yytoken(val);
   } catch (NumberFormatException e) {
     BigInteger val=new BigInteger(yytext()); return new Yytoken(val);
  zzScanError(ZZ_NO_MATCH);

代码示例来源:origin: org.jboss.teiid/teiid-engine

/**
 * Reset the parser to the initial state with a new character reader.
 * 
 * @param in - The new character reader.
 * @throws IOException
 * @throws ParseException
 */
public void reset(Reader in){
  lexer.yyreset(in);
  reset();
}

代码示例来源:origin: teiid/teiid

private static int [] zzUnpackAction() {
 int [] result = new int[45];
 int offset = 0;
 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
 return result;
}

代码示例来源:origin: org.teiid/teiid-engine

boolean eof = zzRefill();
 { sb.setLength(0);yybegin(STRING_BEGIN);
 { Boolean val=Boolean.valueOf(yytext()); return new Yytoken(val);
 { yybegin(YYINITIAL);return new Yytoken(sb.toString());
 { BigDecimal val=new BigDecimal(yytext()); return new Yytoken(val);
 { throw new ParseException(yychar, ParseException.ERROR_UNEXPECTED_CHAR, new Character(yycharat(0)));
case 24: 
 { try{
                        int ch=Integer.parseInt(yytext().substring(2),16);
                        sb.append((char)ch);
     Long val=Long.valueOf(yytext()); return new Yytoken(val);
   } catch (NumberFormatException e) {
     BigInteger val=new BigInteger(yytext()); return new Yytoken(val);
  zzScanError(ZZ_NO_MATCH);

代码示例来源:origin: org.teiid/teiid-engine

/**
 * Reset the parser to the initial state with a new character reader.
 * 
 * @param in - The new character reader.
 * @throws IOException
 * @throws ParseException
 */
public void reset(Reader in){
  lexer.yyreset(in);
  reset();
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

private static int [] zzUnpackAction() {
 int [] result = new int[45];
 int offset = 0;
 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
 return result;
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

boolean eof = zzRefill();
 { sb.setLength(0);yybegin(STRING_BEGIN);
 { Boolean val=Boolean.valueOf(yytext()); return new Yytoken(Yytoken.TYPE_VALUE, val);
 { yybegin(YYINITIAL);return new Yytoken(Yytoken.TYPE_VALUE, sb.toString());
 { Double val=Double.valueOf(yytext()); return new Yytoken(Yytoken.TYPE_VALUE, val);
 { throw new ParseException(yychar, ParseException.ERROR_UNEXPECTED_CHAR, new Character(yycharat(0)));
case 24: 
 { try{
                        int ch=Integer.parseInt(yytext().substring(2),16);
                        sb.append((char)ch);
 { Long val=Long.valueOf(yytext()); return new Yytoken(Yytoken.TYPE_VALUE, val);
  zzScanError(ZZ_NO_MATCH);

代码示例来源:origin: org.jboss.teiid/teiid-engine

/**
 * 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: teiid/teiid

/**
 * Reset the parser to the initial state with a new character reader.
 * 
 * @param in - The new character reader.
 * @throws IOException
 * @throws ParseException
 */
public void reset(Reader in){
  lexer.yyreset(in);
  reset();
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

/**
 * @return The position of the beginning of the current token.
 */
public int getPosition(){
  return lexer.getPosition();
}

代码示例来源:origin: org.teiid/teiid-engine

private static int [] zzUnpackAction() {
 int [] result = new int[45];
 int offset = 0;
 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
 return result;
}

代码示例来源:origin: org.teiid/teiid-engine

private void nextToken() throws ParseException, IOException{
  token = lexer.yylex();
  if(token == null)
    token = Yytoken.EOF;
}

代码示例来源:origin: teiid/teiid

/**
 * 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.teiid/teiid-engine

/**
 * @return The position of the beginning of the current token.
 */
public int getPosition(){
  return lexer.getPosition();
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

private void nextToken() throws ParseException, IOException{
  token = lexer.yylex();
  if(token == null)
    token = new Yytoken(Yytoken.TYPE_EOF, null);
}

相关文章