private boolean SlashInAttr_sempred(RuleContext _localctx, int predIndex) { switch (predIndex) { case 59: return _input.LA(1) != '>'; } return true; } private boolean Char12_sempred(RuleContext _localctx, int predIndex) {
private boolean JAVADOC_INLINE_TAG_START_sempred(RuleContext _localctx, int predIndex) { switch (predIndex) { case 17: return _input.LA(1) == '@'; } return true; } private boolean JAVADOC_INLINE_TAG_END_sempred(RuleContext _localctx, int predIndex) {
@Override public int LA(int i) { int result = stream.LA(i); switch (result) { case 0: case IntStream.EOF: return result; default: return Character.toUpperCase(result); } }
private boolean JavaLetter_sempred(RuleContext _localctx, int predIndex) { switch (predIndex) { case 0: return Character.isJavaIdentifierStart(_input.LA(-1)); case 1: return Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1))); } return true; } private boolean JavaLetterOrDigit_sempred(RuleContext _localctx, int predIndex) {
@Override public int LA(final int i) { final int result = stream.LA(i); switch (result) { case 0: case IntStream.EOF: return result; default: return Character.toUpperCase(result); } }
@Override public int LA(int i) { int c = stream.LA(i); if (c <= 0) { return c; } if (upper) { return Character.toUpperCase(c); } return Character.toLowerCase(c); }
private boolean match(String delimiter) { for (int i = 0; i < delimiter.length(); i++) { if (_input.LA(i + 1) != delimiter.charAt(i)) { return false; } } _input.seek(_input.index() + delimiter.length()); return true; } }
if (_input.LA(1) == IntStream.EOF) { _hitEOF = true;
private boolean JavaLetter_sempred(RuleContext _localctx, int predIndex) { switch (predIndex) { case 0: return Character.isJavaIdentifierStart(_input.LA(-1)); case 1: return Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1))); } return true; } private boolean JavaLetterOrDigit_sempred(RuleContext _localctx, int predIndex) {
public void consume(CharStream input) { int curChar = input.LA(1); if ( curChar=='\n' ) { line++; charPositionInLine=0; } else { charPositionInLine++; } input.consume(); }
public void consume() { int curChar = _input.LA(1); if ( curChar=='\n' ) { line++; charPositionInLine=0; } else { charPositionInLine++; } _input.consume(); }
public void recover(LexerNoViableAltException e) { if (_input.LA(1) != IntStream.EOF) { // skip a char and try again getInterpreter().consume(_input); } }
public String matchString() { int start = _input.index(); consume(); // drop first quote while ( _input.LA(1)!='\'' ) { consume(); } consume(); // drop last quote return _input.getText(Interval.of(start,_input.index()-1)); }
public String matchID() { int start = _input.index(); consume(); // drop start char while ( isNameChar(_input.LA(1)) ) { consume(); } return _input.getText(Interval.of(start,_input.index()-1)); }
CommonToken t = null; while ( t==null ) { switch ( _input.LA(1) ) { case '/': consume(); if ( _input.LA(1)=='/' ) { consume(); t = new CommonToken(ANYWHERE, "//"); return new CommonToken(EOF, "<EOF>"); default: if ( isNameStartChar(_input.LA(1)) ) { String id = matchID(); if ( Character.isUpperCase(id.charAt(0)) ) t = new CommonToken(TOKEN_REF, id);
ttype = SKIP; if ( _input.LA(1)==IntStream.EOF ) { _hitEOF = true;