[antlr-interest] ANTLR grammar extension
Rob Leek, van der
robvanderleek at yahoo.com
Thu Feb 5 04:43:51 PST 2004
Hi,
I want to extend the grammar of ANTLR, what would be
the best way to do this?
For example, I want to define a new EBNF-like operator
'@' (that can be used like the '?', '+' and '*'
operators).
My initial idea was to create a parser based on the
ANTLR grammar and extend it with the '@' operator.
This parser would insert some semantic actions on
places where the '@' occurs in the grammar and outputs
a general ANTLR grammar which conforms to the standard
ANTLR grammar. My program would simply work like a
preprocessor then.
So basicly I'm looking for a clean ANTLR grammar which
I can extend with an '@' operator and where I can
define the other rules as: output unmodified.
A problem with that is that I can't find a 'clean'
ANTLR grammar, only the one shipped with ANTLR but
that one contains a lot of semantic actions.
I don't think grammar inheritance is an option here,
since I don't need all the parser creation
functionalities from the original grammar.
Regards,
Rob van der Leek
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list