[antlr-interest] Exit Status from ANTLR

VAUCHER Laurent VAUCHER at fermat.eu
Mon Nov 20 01:18:34 PST 2006


> Coming from a *nix world, I'm not too familiar how these Java thingies
do their magic.

  I think the usual way is to have an API class that allows to summon
the ANTLR magic (with all possible parametres) and signals and exception
when something is wrong.
  Then, above this API class, you have several interfaces :
 - one for the command line, which is free to do a System.exit()
whenever it receives and exception from the API class,
 - one for the plugin embedding, which must not do a System.exit() but
can display an error dialog or print a log somewhere,
 - another one for Ant embedding, which takes a 'stoponfailure' argument
and behaves accordingly, throwing a BuildException...


Laurent.




More information about the antlr-interest mailing list