public final void mTEMPLATE_EXPR() throws RecognitionException { try { int _type = TEMPLATE_EXPR; int _channel = DEFAULT_TOKEN_CHANNEL; CommonToken a=null; // org/antlr/grammar/v3/ActionTranslator.g:739:2: ( '%' a= ACTION ) // org/antlr/grammar/v3/ActionTranslator.g:739:4: '%' a= ACTION { match('%'); if (state.failed) return ; int aStart916 = getCharIndex(); mACTION(); if (state.failed) return ; a = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, aStart916, getCharIndex()-1); if ( state.backtracking==1 ) { StringTemplate st = template("actionStringConstructor"); String action = (a!=null?a.getText():null); action = action.substring(1,action.length()-1); // stuff inside {...} st.setAttribute("stringExpr", translateAction(action)); } } state.type = _type; state.channel = _channel; } finally { } } // $ANTLR end "TEMPLATE_EXPR"
ST st = template("actionStringConstructor"); String action = (a!=null?a.getText():null); action = action.substring(1,action.length()-1); // stuff inside {...}
ST st = template("actionStringConstructor"); String action = (a!=null?a.getText():null); action = action.substring(1,action.length()-1); // stuff inside {...}
public final void mISOLATED_DYNAMIC_SCOPE() throws RecognitionException { try { int _type = ISOLATED_DYNAMIC_SCOPE; int _channel = DEFAULT_TOKEN_CHANNEL; CommonToken ID6=null; // org/antlr/grammar/v3/ActionTranslator.g:651:2: ( '$' ID {...}?) // org/antlr/grammar/v3/ActionTranslator.g:651:4: '$' ID {...}? { match('$'); if (state.failed) return ; int ID6Start662 = getCharIndex(); mID(); if (state.failed) return ; ID6 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, ID6Start662, getCharIndex()-1); if ( !((resolveDynamicScope((ID6!=null?ID6.getText():null))!=null)) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "ISOLATED_DYNAMIC_SCOPE", "resolveDynamicScope($ID.text)!=null"); } if ( state.backtracking==1 ) { StringTemplate st = template("isolatedDynamicScopeRef"); st.setAttribute("scope", (ID6!=null?ID6.getText():null)); } } state.type = _type; state.channel = _channel; } finally { } } // $ANTLR end "ISOLATED_DYNAMIC_SCOPE"
ST st = template("isolatedDynamicScopeRef"); st.add("scope", (ID6!=null?ID6.getText():null));
ST st = template("isolatedDynamicScopeRef"); st.add("scope", (ID6!=null?ID6.getText():null));
StringTemplate st = template("lexerRuleLabel"); st.setAttribute("label", label);
StringTemplate st = template("tokenLabelRef"); st.setAttribute("label", label);
ST st = template("lexerRuleLabel"); st.add("label", label);
ST st = template("tokenLabelRef"); st.add("label", label);
ST st = template("tokenLabelRef"); st.add("label", label);
ST st = template("lexerRuleLabel"); st.add("label", label);
StringTemplate st = template("scopeAttributeRef"); st.setAttribute("scope", (x!=null?x.getText():null)); st.setAttribute("attr", scope.getAttribute((y!=null?y.getText():null)));
if ( state.backtracking==1 ) { StringTemplate st = template("scopeAttributeRef"); st.setAttribute("scope", (x!=null?x.getText():null)); st.setAttribute("attr", resolveDynamicScope((x!=null?x.getText():null)).getAttribute((y!=null?y.getText():null)));
if ( state.backtracking==1 ) { StringTemplate st = template("scopeAttributeRef"); st.setAttribute("scope", (x!=null?x.getText():null)); st.setAttribute("attr", resolveDynamicScope((x!=null?x.getText():null)).getAttribute((y!=null?y.getText():null)));
AttributeScope scope = resolveDynamicScope((x!=null?x.getText():null)); if ( scope!=null ) { ST st = template("scopeAttributeRef"); st.add("scope", (x!=null?x.getText():null)); st.add("attr", scope.getAttribute((y!=null?y.getText():null)));
ST st = template("scopeAttributeRef"); st.add("scope", (x!=null?x.getText():null)); st.add("attr", resolveDynamicScope((x!=null?x.getText():null)).getAttribute((y!=null?y.getText():null)));
ST st = template("scopeAttributeRef"); st.add("scope", (x!=null?x.getText():null)); st.add("attr", resolveDynamicScope((x!=null?x.getText():null)).getAttribute((y!=null?y.getText():null)));