[antlr-interest] "finally" blocks

Bryan Ewbank ewbank at gmail.com
Mon Jan 17 16:02:19 PST 2005


Another solution is to use functions - and that deals with the problem
of "return" in an action as well.

action() { ... the true production ... }
action_exception() { switch (action()) { ... exceptions ... } }
action_finally() { action_exception(); ... finally ... }

Nothing fancy - just do it.


More information about the antlr-interest mailing list