[antlr-interest] Re: ANTLR 3.0 question about common actions
thrutchy
eric_mahurin at yahoo.com
Wed Jul 28 18:22:10 PDT 2004
--- In antlr-interest at yahoogroups.com, Terence Parr <parrt at c...> wrote:
>
> On Jul 28, 2004, at 3:13 PM, thrutchy wrote:
> > I would kind of like the ability to go in the complete opposite
> > direction: express the complete grammar directly in the target
> > language in a nice concise manner.
>
> That is called JavaCC :)
You got my hopes up! It looks like with JavaCC you specify the
grammar in something that looks like Java, but it is clearly not. I
was wanting a set of classes to allow you to easily specify the
grammar in Java (or C++, C#, etc). From what I saw, I like ANTLR more.
Anyways, you might think about setting things up such that a
syntax/rule/sub-rule is an object that is used to read/write/lookahead
streams/trees. If nothing else, it would make the generated code even
more understandable. But, I think it will open up other doors not
thought of - like defining a rule that has a rule as an argument
(because a rule is now an object that can be passed around). i.e.
list[Syntax item, sep] ::= item ( sep item )*
Eric
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