[antlr-interest] How to keep the embedded Java code to minimum.

Thomas Karcher thkarcher at gmx.de
Thu Mar 27 11:26:18 PDT 2008


Hi,

> >I have a general question for  ANTLR folks.  How do you keep the
> >embedded java (or other) code in your grammar to a minimum to preserve
> >readability of the grammar?

Another possibility is to call functions of an inherited grammar class
(by reference):

options { superClass=GrammarParentClass; }

rule:	a=A { inheritedFunction($a); }


Thomas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080327/23a3e5cb/attachment.bin 


More information about the antlr-interest mailing list