[antlr-interest] Re: Stuff I don't like about ANTLR 2.x /ANTLR 3 wants
oliver_kellogg
oliver_kellogg at yahoo.com
Tue Mar 16 23:31:49 PST 2004
I strongly second these wishes, and I look forward
to the day when we can maintain just _one_ grammar
independent of the codegen target language.
>>From the Ada grammar perspective, there is one
prominent issue that needs resolving. The "." vs "->"
notation for access to members in Java vs C++.
Even a primitive solution, such as adding preprocessor
directives to the action parts (like #ifdef JAVA or
#ifdef CPLUSPLUS), would help!
Just my EUR 0.02
Oliver
On Tue Mar 16, 2004 2:05 am, "lgcraymer" wrote:
> --- In antlr-interest at yahoogroups.com, "Richard Matthias"
<richard at e...> wrote:
> > Hi,
> >
> > 1. The syntax for manual tree building. It looks an absolute mess
with all
> > those # and [] marks. I assume this is because it sits in with
action code in
> > the target language and you have to use syntax that won't clash
with any
> > language known to man. Because tree building is free it only
increases the
> > impact of the tree building syntax obscurity for occasional ANTLR
users like
> > myself. What I would like to see is some simple ANTLR specific
syntax for
> > tree building that exists outside the actions block.
>
> That's coming in 2.8. I've got the modified C++ backend to compile
(half the problem) and just need to get my test cases to run (they
> work with Java). Once that happens, I'll update my code to the
match 2.7.3 final (pending) and a release should follow soon after.
>
> >
> > 2. Different syntax for manipulating tokens in Lexer actions
compared to
> > manipulation of AST nodes in Parser actions. For example, in the
Parser I can
> > change the AST node class from "within ANTLR syntax", but I still
have to use
> > action code to change the node to use an 'imaginary' token. For
example:-
>
> Ter, Monty, and I briefly discussed adding an attribute (language
independent AST specification) syntax in ANTLR 3 at the cabal. It
> may happen.
>
> [...]
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