/** Return the text matched so far for the current token or any * text override. */ public String getText() { if ( state.text!=null ) { return state.text; } return input.substring(state.tokenStartCharIndex,getCharIndex()-1); }
/** Return the text matched so far for the current token or any * text override. */ public String getText() { if ( state.text!=null ) { return state.text; } return input.substring(state.tokenStartCharIndex,getCharIndex()-1); }
/** Return the text matched so far for the current token or any * text override. */ public String getText() { if ( state.text!=null ) { return state.text; } return input.substring(state.tokenStartCharIndex,getCharIndex()-1); }
/** Return the text matched so far for the current token or any * text override. */ public String getText() { if ( state.text!=null ) { return state.text; } return input.substring(state.tokenStartCharIndex,getCharIndex()-1); }
/** Return the text matched so far for the current token or any * text override. */ public String getText() { if ( state.text!=null ) { return state.text; } return input.substring(state.tokenStartCharIndex,getCharIndex()-1); }
/** Return the text matched so far for the current token or any * text override. */ public String getText() { if ( state.text!=null ) { return state.text; } return input.substring(state.tokenStartCharIndex,getCharIndex()-1); }
/** The standard method called to automatically emit a token at the * outermost lexical rule. The token object should point into the * char buffer start..stop. If there is a text override in 'text', * use that to set the token's text. Override this method to emit * custom Token objects. * * If you are building trees, then you should also override * Parser or TreeParser.getMissingSymbol(). */ public Token emit() { Token t = new CommonToken(input, state.type, state.channel, state.tokenStartCharIndex, getCharIndex()-1); t.setLine(state.tokenStartLine); t.setText(state.text); t.setCharPositionInLine(state.tokenStartCharPositionInLine); emit(t); return t; }
/** The standard method called to automatically emit a token at the * outermost lexical rule. The token object should point into the * char buffer start..stop. If there is a text override in 'text', * use that to set the token's text. Override this method to emit * custom Token objects. * * If you are building trees, then you should also override * Parser or TreeParser.getMissingSymbol(). */ public Token emit() { Token t = new CommonToken(input, state.type, state.channel, state.tokenStartCharIndex, getCharIndex()-1); t.setLine(state.tokenStartLine); t.setText(state.text); t.setCharPositionInLine(state.tokenStartCharPositionInLine); emit(t); return t; }
/** The standard method called to automatically emit a token at the * outermost lexical rule. The token object should point into the * char buffer start..stop. If there is a text override in 'text', * use that to set the token's text. Override this method to emit * custom Token objects. * * If you are building trees, then you should also override * Parser or TreeParser.getMissingSymbol(). */ public Token emit() { Token t = new CommonToken(input, state.type, state.channel, state.tokenStartCharIndex, getCharIndex()-1); t.setLine(state.tokenStartLine); t.setText(state.text); t.setCharPositionInLine(state.tokenStartCharPositionInLine); emit(t); return t; }
/** The standard method called to automatically emit a token at the * outermost lexical rule. The token object should point into the * char buffer start..stop. If there is a text override in 'text', * use that to set the token's text. Override this method to emit * custom Token objects. * * If you are building trees, then you should also override * Parser or TreeParser.getMissingSymbol(). */ public Token emit() { Token t = new CommonToken(input, state.type, state.channel, state.tokenStartCharIndex, getCharIndex()-1); t.setLine(state.tokenStartLine); t.setText(state.text); t.setCharPositionInLine(state.tokenStartCharPositionInLine); emit(t); return t; }
/** The standard method called to automatically emit a token at the * outermost lexical rule. The token object should point into the * char buffer start..stop. If there is a text override in 'text', * use that to set the token's text. Override this method to emit * custom Token objects. * * If you are building trees, then you should also override * Parser or TreeParser.getMissingSymbol(). */ public Token emit() { Token t = new CommonToken(input, state.type, state.channel, state.tokenStartCharIndex, getCharIndex()-1); t.setLine(state.tokenStartLine); t.setText(state.text); t.setCharPositionInLine(state.tokenStartCharPositionInLine); emit(t); return t; }
/** The standard method called to automatically emit a token at the * outermost lexical rule. The token object should point into the * char buffer start..stop. If there is a text override in 'text', * use that to set the token's text. Override this method to emit * custom Token objects. * * If you are building trees, then you should also override * Parser or TreeParser.getMissingSymbol(). */ public Token emit() { Token t = new CommonToken(input, state.type, state.channel, state.tokenStartCharIndex, getCharIndex()-1); t.setLine(state.tokenStartLine); t.setText(state.text); t.setCharPositionInLine(state.tokenStartCharPositionInLine); emit(t); return t; }