match('$'); if (state.failed) return; int xStart199 = getCharIndex(); int xStartLine199 = getLine(); int xStartCharPos199 = getCharPositionInLine(); mID(); if (state.failed) return; x = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, xStart199, getCharIndex()-1); x.setLine(xStartLine199); x.setCharPositionInLine(xStartCharPos199); mWS(); if (state.failed) return; match('='); if (state.failed) return; int exprStart208 = getCharIndex(); int exprStartLine208 = getLine(); int exprStartCharPos208 = getCharPositionInLine(); mATTR_VALUE_EXPR(); if (state.failed) return; expr = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, exprStart208, getCharIndex()-1); expr.setLine(exprStartLine208); expr.setCharPositionInLine(exprStartCharPos208); match(';'); if (state.failed) return; if ( state.backtracking==1 ) { delegate.setAttr(getText(), x, expr);
if ( (LA10_0=='/') ) { int LA10_1 = input.LA(2); if ( (synpred1_ActionSplitter()) ) { alt10=1; else if ( (synpred2_ActionSplitter()) ) { alt10=2; if ( (synpred3_ActionSplitter()) ) { alt10=3; else if ( (synpred4_ActionSplitter()) ) { alt10=4; else if ( (synpred5_ActionSplitter()) ) { alt10=5; else if ( (synpred6_ActionSplitter()) ) { alt10=6; else if ( (synpred7_ActionSplitter()) ) { alt10=7; else if ( ((!isIDStartChar(input.LA(2)))) ) { alt10=8; mCOMMENT(); if (state.failed) return; mLINE_COMMENT(); if (state.failed) return;
public final void mATTR() throws RecognitionException { try { int _type = ATTR; int _channel = DEFAULT_TOKEN_CHANNEL; CommonToken x=null; // org/antlr/v4/parse/ActionSplitter.g:98:2: ( '$' x= ID ) // org/antlr/v4/parse/ActionSplitter.g:98:4: '$' x= ID { match('$'); if (state.failed) return; int xStart229 = getCharIndex(); int xStartLine229 = getLine(); int xStartCharPos229 = getCharPositionInLine(); mID(); if (state.failed) return; x = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, xStart229, getCharIndex()-1); x.setLine(xStartLine229); x.setCharPositionInLine(xStartCharPos229); if ( state.backtracking==1 ) {delegate.attr(getText(), x);} } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } } // $ANTLR end "ATTR"
// org/antlr/v4/parse/ActionSplitter.g:68:9: '/*' ( options {greedy=false; } : . )* '*/' match("/*"); if (state.failed) return; // org/antlr/v4/parse/ActionSplitter.g:68:42: . matchAny(); if (state.failed) return; match("*/"); if (state.failed) return; if ( state.backtracking==1 ) {delegate.text(getText());}
Token.DEFAULT_CHANNEL, input.index(),input.index()); eof.setLine(getLine()); eof.setCharPositionInLine(getCharPositionInLine()); return eof; state.backtracking=1; state.failed=false; mTokens(); state.backtracking=0; if ( state.failed ) { emit(); return state.token; reportError(re); recover(re);
public void examineAction() { //System.out.println("examine "+actionToken); ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods node.chunks = splitter.getActionTokens(); }
match("//"); if (state.failed) return; if (state.backtracking>0) {state.failed=true; return;} MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; match('\r'); if (state.failed) return; match('\n'); if (state.failed) return; if ( state.backtracking==1 ) {delegate.text(getText());}
else if ( (LA6_0=='$') && ((!isIDStartChar(input.LA(2))))) { alt6=4; if (state.backtracking>0) {state.failed=true; return;} MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; match("\\$"); if (state.failed) return; match('\\'); if (state.failed) return; c= input.LA(1); if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '#')||(input.LA(1) >= '%' && input.LA(1) <= '\uFFFF') ) { if (state.backtracking>0) {state.failed=true; return;} MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; if ( !((!isIDStartChar(input.LA(2)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "TEXT", "!isIDStartChar(input.LA(2))"); match('$'); if (state.failed) return; if ( state.backtracking==1 ) {buf.append('$');}
public final void synpred7_ActionSplitter_fragment() throws RecognitionException { // org/antlr/v4/parse/ActionSplitter.g:1:118: ( ATTR ) // org/antlr/v4/parse/ActionSplitter.g:1:118: ATTR { mATTR(); if (state.failed) return; } } // $ANTLR end synpred7_ActionSplitter
public final void mATTR() throws RecognitionException { try { int _type = ATTR; int _channel = DEFAULT_TOKEN_CHANNEL; CommonToken x=null; // org/antlr/v4/parse/ActionSplitter.g:98:2: ( '$' x= ID ) // org/antlr/v4/parse/ActionSplitter.g:98:4: '$' x= ID { match('$'); if (state.failed) return; int xStart229 = getCharIndex(); int xStartLine229 = getLine(); int xStartCharPos229 = getCharPositionInLine(); mID(); if (state.failed) return; x = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, xStart229, getCharIndex()-1); x.setLine(xStartLine229); x.setCharPositionInLine(xStartCharPos229); if ( state.backtracking==1 ) {delegate.attr(getText(), x);} } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } } // $ANTLR end "ATTR"
Token.DEFAULT_CHANNEL, input.index(),input.index()); eof.setLine(getLine()); eof.setCharPositionInLine(getCharPositionInLine()); return eof; state.backtracking=1; state.failed=false; mTokens(); state.backtracking=0; if ( state.failed ) { emit(); return state.token; reportError(re); recover(re);
public void processNested(Token actionToken) { ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods splitter.getActionTokens(); }
// org\\antlr\\v4\\parse\\ActionSplitter.g:44:9: '/*' ( options {greedy=false; } : . )* '*/' match("/*"); if (state.failed) return; // org\\antlr\\v4\\parse\\ActionSplitter.g:44:42: . matchAny(); if (state.failed) return; match("*/"); if (state.failed) return; if ( state.backtracking==1 ) {delegate.text(getText());}
match("//"); if (state.failed) return; if (state.backtracking>0) {state.failed=true; return;} MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; match('\r'); if (state.failed) return; match('\n'); if (state.failed) return; if ( state.backtracking==1 ) {delegate.text(getText());}
else if ( (LA6_0=='$') && ((!isIDStartChar(input.LA(2))))) { alt6=4; if (state.backtracking>0) {state.failed=true; return;} MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; match("\\$"); if (state.failed) return; match('\\'); if (state.failed) return; c= input.LA(1); if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '#')||(input.LA(1) >= '%' && input.LA(1) <= '\uFFFF') ) { if (state.backtracking>0) {state.failed=true; return;} MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; if ( !((!isIDStartChar(input.LA(2)))) ) { if (state.backtracking>0) {state.failed=true; return;} throw new FailedPredicateException(input, "TEXT", "!isIDStartChar(input.LA(2))"); match('$'); if (state.failed) return; if ( state.backtracking==1 ) {buf.append('$');}
public final void synpred7_ActionSplitter_fragment() throws RecognitionException { // org\\antlr\\v4\\parse\\ActionSplitter.g:1:118: ( ATTR ) // org\\antlr\\v4\\parse\\ActionSplitter.g:1:118: ATTR { mATTR(); if (state.failed) return; } } // $ANTLR end synpred7_ActionSplitter
if ( (LA10_0=='/') ) { int LA10_1 = input.LA(2); if ( (synpred1_ActionSplitter()) ) { alt10=1; else if ( (synpred2_ActionSplitter()) ) { alt10=2; if ( (synpred3_ActionSplitter()) ) { alt10=3; else if ( (synpred4_ActionSplitter()) ) { alt10=4; else if ( (synpred5_ActionSplitter()) ) { alt10=5; else if ( (synpred6_ActionSplitter()) ) { alt10=6; else if ( (synpred7_ActionSplitter()) ) { alt10=7; else if ( ((!isIDStartChar(input.LA(2)))) ) { alt10=8; mCOMMENT(); if (state.failed) return; mLINE_COMMENT(); if (state.failed) return;
match('$'); if (state.failed) return; int xStart199 = getCharIndex(); int xStartLine199 = getLine(); int xStartCharPos199 = getCharPositionInLine(); mID(); if (state.failed) return; x = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, xStart199, getCharIndex()-1); x.setLine(xStartLine199); x.setCharPositionInLine(xStartCharPos199); mWS(); if (state.failed) return; match('='); if (state.failed) return; int exprStart208 = getCharIndex(); int exprStartLine208 = getLine(); int exprStartCharPos208 = getCharPositionInLine(); mATTR_VALUE_EXPR(); if (state.failed) return; expr = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, exprStart208, getCharIndex()-1); expr.setLine(exprStartLine208); expr.setCharPositionInLine(exprStartCharPos208); match(';'); if (state.failed) return; if ( state.backtracking==1 ) { delegate.setAttr(getText(), x, expr);
public final void mATTR() throws RecognitionException { try { int _type = ATTR; int _channel = DEFAULT_TOKEN_CHANNEL; CommonToken x=null; // /Users/parrt/antlr/code/antlr4/tool/src/org/antlr/v4/parse/ActionSplitter.g:98:2: ( '$' x= ID ) // /Users/parrt/antlr/code/antlr4/tool/src/org/antlr/v4/parse/ActionSplitter.g:98:4: '$' x= ID { match('$'); if (state.failed) return; int xStart229 = getCharIndex(); int xStartLine229 = getLine(); int xStartCharPos229 = getCharPositionInLine(); mID(); if (state.failed) return; x = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, xStart229, getCharIndex()-1); x.setLine(xStartLine229); x.setCharPositionInLine(xStartCharPos229); if ( state.backtracking==1 ) {delegate.attr(getText(), x);} } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } } // $ANTLR end "ATTR"
Token.DEFAULT_CHANNEL, input.index(),input.index()); eof.setLine(getLine()); eof.setCharPositionInLine(getCharPositionInLine()); return eof; state.backtracking=1; state.failed=false; mTokens(); state.backtracking=0; if ( state.failed ) { emit(); return state.token; reportError(re); recover(re);