diff --git a/data/skeletons/glr.c b/data/skeletons/glr.c index a3b0e69e..8cf56c31 100644 --- a/data/skeletons/glr.c +++ b/data/skeletons/glr.c @@ -2720,5 +2720,6 @@ m4_if(b4_prefix, [yy], [], #define yynerrs ]b4_prefix[nerrs]b4_locations_if([[ #define yylloc ]b4_prefix[lloc]])])[ -]b4_epilogue[]dnl +]b4_percent_code_get([[epilogue]])[]dnl +b4_epilogue[]dnl b4_output_end diff --git a/data/skeletons/lalr1.d b/data/skeletons/lalr1.d index bbf87c63..6bae65f4 100644 --- a/data/skeletons/lalr1.d +++ b/data/skeletons/lalr1.d @@ -902,9 +902,8 @@ m4_popdef([b4_at_dollar])])dnl stream.writeln (); }]])[ } - - /* User implementation code. */ ]b4_percent_code_get[ } -]b4_epilogue[]dnl +]b4_percent_code_get([[epilogue]])[]dnl +b4_epilogue[]dnl b4_output_end diff --git a/data/skeletons/lalr1.java b/data/skeletons/lalr1.java index 678510a1..58490697 100644 --- a/data/skeletons/lalr1.java +++ b/data/skeletons/lalr1.java @@ -1036,10 +1036,8 @@ b4_dollar_popdef[]dnl private static final int yyfinal_ = ]b4_final_state_number[; private static final int yyntokens_ = ]b4_tokens_number[; -/* User implementation code. */ -]b4_percent_code_get[]dnl - +]b4_percent_code_get[ } - +]b4_percent_code_get([[epilogue]])[]dnl b4_epilogue[]dnl b4_output_end diff --git a/data/skeletons/yacc.c b/data/skeletons/yacc.c index ccdf485c..c3c50da6 100644 --- a/data/skeletons/yacc.c +++ b/data/skeletons/yacc.c @@ -2065,5 +2065,6 @@ yypushreturn:]])[ YYSTACK_FREE (yymsg);]])[ return yyresult; } -]b4_epilogue[]dnl +]b4_percent_code_get([[epilogue]])[]dnl +b4_epilogue[]dnl b4_output_end diff --git a/tests/calc.at b/tests/calc.at index 9be19e2c..bcaffb79 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -25,6 +25,7 @@ m4_pushdef([AT_CALC_MAIN], [AT_LANG_DISPATCH([$0], $@)]) +# Whether token translation is supported. m4_pushdef([AT_TOKEN_TRANSLATE_IF], [AT_ERROR_CUSTOM_IF([$1], [AT_ERROR_DETAILED_IF([$1], [$2])])]) diff --git a/tests/java.at b/tests/java.at index 28a3377b..0383ddd4 100644 --- a/tests/java.at +++ b/tests/java.at @@ -117,13 +117,8 @@ exp: | '-' error { $$ = new Integer (0); return YYERROR; } ; -]AT_LEXPARAM_IF([[ -%code lexer { -]], -[[ -%% -class CalcLexer implements Calc.Lexer { -]])[ +]AT_LEXPARAM_IF([[%code lexer {]], + [[%code epilogue { class CalcLexer implements Calc.Lexer {]])[ StreamTokenizer st; public ]AT_LEXPARAM_IF([[YYLexer]], [[CalcLexer]])[ (InputStream is) @@ -176,10 +171,9 @@ class CalcLexer implements Calc.Lexer { else return st.ttype; } -]AT_LEXPARAM_IF([[ +]AT_LEXPARAM_IF([], [[}]])[ }; -%%]], [[ -}]])[ +%% ]AT_JAVA_POSITION_DEFINE[ ]]) ])# _AT_DATA_JAVA_CALC_Y