i=(CommonTree)match(input,IF,FOLLOW_IF_in_ifstat367); match(input, Token.DOWN, null); pushFollow(FOLLOW_conditional_in_ifstat369); conditional(); state._fsp--; prevBranchOperand = address()+1; emit1(i,Bytecode.INSTR_BRF, -1); // write placeholder as branch target pushFollow(FOLLOW_chunk_in_ifstat379); chunk(); state._fsp--; eif=(CommonTree)match(input,ELSEIF,FOLLOW_ELSEIF_in_ifstat389); endRefs.add(address()+1); emit1(eif,Bytecode.INSTR_BR, -1); // br end write(prevBranchOperand, (short)address()); prevBranchOperand = -1; match(input, Token.DOWN, null); pushFollow(FOLLOW_conditional_in_ifstat403); ec=conditional(); state._fsp--; prevBranchOperand = address()+1; emit1((ec!=null?((CommonTree)ec.start):null), Bytecode.INSTR_BRF, -1);
ID38=(CommonTree)match(input,ID,FOLLOW_ID_in_primary830); refAttr(ID38); STRING39=(CommonTree)match(input,STRING,FOLLOW_STRING_in_primary840); emit1(STRING39,Bytecode.INSTR_LOAD_STR, Misc.strip((STRING39!=null?STRING39.getText():null),1)); TRUE40=(CommonTree)match(input,TRUE,FOLLOW_TRUE_in_primary849); emit(TRUE40, Bytecode.INSTR_TRUE); FALSE41=(CommonTree)match(input,FALSE,FOLLOW_FALSE_in_primary858); emit(FALSE41, Bytecode.INSTR_FALSE); pushFollow(FOLLOW_subtemplate_in_primary867); subtemplate42=subtemplate(); state._fsp--; emit2(((CommonTree)retval.start),Bytecode.INSTR_NEW, (subtemplate42!=null?((CodeGenerator.subtemplate_return)subtemplate42).name:null), 0); pushFollow(FOLLOW_list_in_primary894); list(); state._fsp--; INCLUDE_IND43=(CommonTree)match(input,INCLUDE_IND,FOLLOW_INCLUDE_IND_in_primary901); match(input, Token.DOWN, null); pushFollow(FOLLOW_expr_in_primary906); expr(); state._fsp--; emit(INCLUDE_IND43, Bytecode.INSTR_TOSTR);
pushFollow(FOLLOW_element_in_chunk92); element(); state._fsp--; reportError(re); recover(input,re);
EXPR5=(CommonTree)match(input,EXPR,FOLLOW_EXPR_in_exprElement203); match(input, Token.DOWN, null); pushFollow(FOLLOW_expr_in_exprElement205); expr(); state._fsp--; pushFollow(FOLLOW_exprOptions_in_exprElement208); exprOptions(); state._fsp--; match(input, Token.UP, null); emit(EXPR5, op); reportError(re); recover(input,re);
emit(Bytecode.INSTR_OPTIONS); match(input,OPTIONS,FOLLOW_OPTIONS_in_exprOptions524); match(input, Token.DOWN, null); pushFollow(FOLLOW_option_in_exprOptions526); option(); match(input, Token.UP, null); reportError(re); recover(input,re);
match(input,EXEC_FUNC,FOLLOW_EXEC_FUNC_in_includeExpr734); match(input, Token.DOWN, null); ID22=(CommonTree)match(input,ID,FOLLOW_ID_in_includeExpr736); pushFollow(FOLLOW_expr_in_includeExpr738); expr(); match(input, Token.UP, null); func(ID22); INCLUDE25=(CommonTree)match(input,INCLUDE,FOLLOW_INCLUDE_in_includeExpr749); match(input, Token.DOWN, null); ID24=(CommonTree)match(input,ID,FOLLOW_ID_in_includeExpr751); pushFollow(FOLLOW_args_in_includeExpr753); args23=args(); match(input, Token.UP, null); if ( (args23!=null?args23.passThru:false) ) emit1(((CommonTree)retval.start), Bytecode.INSTR_PASSTHRU, (ID24!=null?ID24.getText():null)); if ( (args23!=null?args23.namedArgs:false) ) emit1(INCLUDE25, Bytecode.INSTR_NEW_BOX_ARGS, (ID24!=null?ID24.getText():null)); else emit2(INCLUDE25, Bytecode.INSTR_NEW, (ID24!=null?ID24.getText():null), (args23!=null?args23.n:0)); INCLUDE_SUPER28=(CommonTree)match(input,INCLUDE_SUPER,FOLLOW_INCLUDE_SUPER_in_includeExpr764); match(input, Token.DOWN, null); ID27=(CommonTree)match(input,ID,FOLLOW_ID_in_includeExpr766); pushFollow(FOLLOW_args_in_includeExpr768);
pushFollow(FOLLOW_arg_in_args997); arg(); state._fsp--; emit(((CommonTree)retval.start), Bytecode.INSTR_ARGS); retval.namedArgs =true; eq=(CommonTree)match(input,EQUALS,FOLLOW_EQUALS_in_args1016); match(input, Token.DOWN, null); ID46=(CommonTree)match(input,ID,FOLLOW_ID_in_args1018); pushFollow(FOLLOW_expr_in_args1020); expr(); state._fsp--; match(input, Token.UP, null); retval.n++; emit1(eq, Bytecode.INSTR_STORE_ARG, defineString((ID46!=null?ID46.getText():null))); match(input,ELLIPSIS,FOLLOW_ELLIPSIS_in_args1037); retval.passThru =true; match(input,ELLIPSIS,FOLLOW_ELLIPSIS_in_args1052); retval.passThru =true; emit(((CommonTree)retval.start), Bytecode.INSTR_ARGS); retval.namedArgs =true; reportError(re); recover(input,re);
match(input,REGION,FOLLOW_REGION_in_region247); match(input, Token.DOWN, null); ID6=(CommonTree)match(input,ID,FOLLOW_ID_in_region249); retval.name = STGroup.getMangledRegionName(outermostTemplateName, (ID6!=null?ID6.getText():null)); pushFollow(FOLLOW_template_in_region259); template7=template(retval.name, null); state._fsp--; emit2(((CommonTree)retval.start), Bytecode.INSTR_NEW, retval.name, 0); emit(((CommonTree)retval.start), Bytecode.INSTR_WRITE); match(input, Token.UP, null); reportError(re); recover(input,re);
match(input,INDENTED_EXPR,FOLLOW_INDENTED_EXPR_in_element99); match(input, Token.DOWN, null); INDENT1=(CommonTree)match(input,INDENT,FOLLOW_INDENT_in_element101); pushFollow(FOLLOW_compoundElement_in_element103); compoundElement(INDENT1); match(input, Token.UP, null); pushFollow(FOLLOW_compoundElement_in_element111); compoundElement(null); match(input,INDENTED_EXPR,FOLLOW_INDENTED_EXPR_in_element118); match(input, Token.DOWN, null); INDENT2=(CommonTree)match(input,INDENT,FOLLOW_INDENT_in_element120); ((template_scope)template_stack.peek()).state.indent(INDENT2); pushFollow(FOLLOW_singleElement_in_element124); singleElement(); match(input, Token.UP, null); pushFollow(FOLLOW_singleElement_in_element132); singleElement(); reportError(re); recover(input,re);
pushFollow(FOLLOW_chunk_in_template77); chunk(); state._fsp--; reportError(re); recover(input,re);
emit(((CommonTree)retval.start), Bytecode.INSTR_LIST); match(input,LIST,FOLLOW_LIST_in_list1040); if ( input.LA(1)==Token.DOWN ) { match(input, Token.DOWN, null); pushFollow(FOLLOW_listElement_in_list1043); listElement47=listElement(); state._fsp--; emit((listElement47!=null?((CommonTree)listElement47.start):null), Bytecode.INSTR_ADD); match(input, Token.UP, null); reportError(re); recover(input,re);
CodeGenerator gen = new CodeGenerator(nodes, group.errMgr, name, template, templateToken); impl = gen.template(name,args); impl.nativeGroup = group; impl.template = template;
match(input,EXEC_FUNC,FOLLOW_EXEC_FUNC_in_includeExpr751); match(input, Token.DOWN, null); ID27=(CommonTree)match(input,ID,FOLLOW_ID_in_includeExpr753); pushFollow(FOLLOW_expr_in_includeExpr755); expr(); state._fsp--; match(input, Token.UP, null); func(ID27); INCLUDE30=(CommonTree)match(input,INCLUDE,FOLLOW_INCLUDE_in_includeExpr766); match(input, Token.DOWN, null); ID29=(CommonTree)match(input,ID,FOLLOW_ID_in_includeExpr768); pushFollow(FOLLOW_args_in_includeExpr770); args28=args(); state._fsp--; match(input, Token.UP, null); if ( (args28!=null?((CodeGenerator.args_return)args28).passThru:false) ) emit1(((CommonTree)retval.start), Bytecode.INSTR_PASSTHRU, (ID29!=null?ID29.getText():null)); if ( (args28!=null?((CodeGenerator.args_return)args28).namedArgs:false) ) emit1(INCLUDE30, Bytecode.INSTR_NEW_BOX_ARGS, (ID29!=null?ID29.getText():null)); else emit2(INCLUDE30, Bytecode.INSTR_NEW, (ID29!=null?ID29.getText():null), (args28!=null?((CodeGenerator.args_return)args28).n:0)); INCLUDE_SUPER33=(CommonTree)match(input,INCLUDE_SUPER,FOLLOW_INCLUDE_SUPER_in_includeExpr781); match(input, Token.DOWN, null); ID32=(CommonTree)match(input,ID,FOLLOW_ID_in_includeExpr783); pushFollow(FOLLOW_args_in_includeExpr785);
pushFollow(FOLLOW_arg_in_args965); arg(); state._fsp--; emit(((CommonTree)retval.start), Bytecode.INSTR_ARGS); retval.namedArgs =true; eq=(CommonTree)match(input,EQUALS,FOLLOW_EQUALS_in_args984); match(input, Token.DOWN, null); ID46=(CommonTree)match(input,ID,FOLLOW_ID_in_args986); pushFollow(FOLLOW_expr_in_args988); expr(); state._fsp--; match(input, Token.UP, null); retval.n++; emit1(eq, Bytecode.INSTR_STORE_ARG, defineString((ID46!=null?ID46.getText():null))); match(input,ELLIPSIS,FOLLOW_ELLIPSIS_in_args1005); retval.passThru =true; match(input,ELLIPSIS,FOLLOW_ELLIPSIS_in_args1020); retval.passThru =true; emit(((CommonTree)retval.start), Bytecode.INSTR_ARGS); retval.namedArgs =true; reportError(re); recover(input,re);
EXPR4=(CommonTree)match(input,EXPR,FOLLOW_EXPR_in_exprElement197); match(input, Token.DOWN, null); pushFollow(FOLLOW_expr_in_exprElement199); expr(); pushFollow(FOLLOW_exprOptions_in_exprElement202); exprOptions(); match(input, Token.UP, null); emit(EXPR4, op); reportError(re); recover(input,re);
match(input,REGION,FOLLOW_REGION_in_region247); match(input, Token.DOWN, null); ID6=(CommonTree)match(input,ID,FOLLOW_ID_in_region249); retval.name = STGroup.getMangledRegionName(outermostTemplateName, (ID6!=null?ID6.getText():null)); pushFollow(FOLLOW_template_in_region259); template7=template(retval.name, null); state._fsp--; emit2(((CommonTree)retval.start), Bytecode.INSTR_NEW, retval.name, 0); emit(((CommonTree)retval.start), Bytecode.INSTR_WRITE); match(input, Token.UP, null); reportError(re); recover(input,re);
match(input,INDENTED_EXPR,FOLLOW_INDENTED_EXPR_in_element105); match(input, Token.DOWN, null); INDENT1=(CommonTree)match(input,INDENT,FOLLOW_INDENT_in_element107); pushFollow(FOLLOW_compoundElement_in_element109); compoundElement(INDENT1); state._fsp--; match(input, Token.UP, null); pushFollow(FOLLOW_compoundElement_in_element117); compoundElement(null); state._fsp--; match(input,INDENTED_EXPR,FOLLOW_INDENTED_EXPR_in_element124); match(input, Token.DOWN, null); INDENT2=(CommonTree)match(input,INDENT,FOLLOW_INDENT_in_element126); template_stack.peek().state.indent(INDENT2); pushFollow(FOLLOW_singleElement_in_element130); singleElement(); state._fsp--; match(input, Token.UP, null); pushFollow(FOLLOW_singleElement_in_element139); singleElement(); state._fsp--; reportError(re);
emit(((CommonTree)retval.start), Bytecode.INSTR_OPTIONS); match(input,OPTIONS,FOLLOW_OPTIONS_in_exprOptions542); if ( input.LA(1)==Token.DOWN ) { match(input, Token.DOWN, null); pushFollow(FOLLOW_option_in_exprOptions544); option(); state._fsp--; match(input, Token.UP, null); reportError(re); recover(input,re);
pushFollow(FOLLOW_chunk_in_template71); chunk(); reportError(re); recover(input,re);
emit(((CommonTree)retval.start), Bytecode.INSTR_LIST); match(input,LIST,FOLLOW_LIST_in_list1072); if ( input.LA(1)==Token.DOWN ) { match(input, Token.DOWN, null); pushFollow(FOLLOW_listElement_in_list1075); listElement47=listElement(); state._fsp--; emit((listElement47!=null?((CommonTree)listElement47.start):null), Bytecode.INSTR_ADD); match(input, Token.UP, null); reportError(re); recover(input,re);