skeletons: add support for %code epilogue

When building the test cases, emitting code in the epilogue is very
constraining.  Let's make it simpler thanks to %code epilogue.

However, I don't want to document this: it is bad style to use it (we
should avoid having too many ways to write the same thing,
TI!MTOWTDI), just put your code in the true epilogue section.

* data/skeletons/glr.c, data/skeletons/lalr1.d, data/skeletons/lalr1.java,
* data/skeletons/yacc.c: Implement support for %code epilogue.
Remove useless comments.
* tests/calc.at, tests/java.at: Simplify.
This commit is contained in:
Akim Demaille
2020-02-01 08:38:53 +01:00
parent 493359b758
commit 0774b2c6e3
6 changed files with 13 additions and 19 deletions

View File

@@ -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