[antlr-interest] Handling 'finally' in language target thatdoesn't have 'finally'
Rick Mann
rmann at latencyzero.com
Mon Jan 19 12:32:09 PST 2009
On Jan 19, 2009, at 12:27:10, Sam Harwell wrote:
> This isn't really isn't the list for the topic of whether or not C++
> should/shouldn't support ___. I'm saying this primarily because it's a
> grinding point for various people and sure to lead to harsh feelings
> (expressed in replies or not). For the sake of creating an ANTLR
> target
> (I think that's the real goal?), you have a few options. If you simply
> want to disallow finally code in the grammar when the C++ target is
> used, make the template for finally code spit out the following if the
> finally code is not blank.
Agreed.
> #error The C++ target does not support 'finally' blocks in grammars.
> Use
> RAII instead.
Thanks, that's probably the best I can hope for. I would've preferred
for the ANTLR tool to issue the warning, but I have many bigger fish
to fry at the moment.
--
Rick
More information about the antlr-interest
mailing list