[antlr-interest] how useful would a generic grammar "action" language be?

Ric Klaren klaren at cs.utwente.nl
Tue Oct 28 02:28:09 PST 2003


Hi,

On Mon, Oct 27, 2003 at 04:07:39PM -0800, Terence Parr wrote:
> Just added a blog entry about a generic action grammar language to
> support reuse of grammars even when they have (simple) actions:
>
> http://www.antlr.org/blog/antlr3/codegen.tml
>
> Is the idea a useful line of research?  I'll have the intermediate form
> underneath the covers anyway...

As long as one can revert back to the target language and it's not just the
generic action grammar language then it could be usefull. Looking at the
syntax of the intermediate form it might not be that usefull, it looks
quite horrible to use (forgive me for saying ;) ).

>>From a practical point of view I don't really believe in target language
agnostic actions (how nice it would be). There's always something that
screws up somewhere and at some point you need more detailed information
about the types used in the expressions so the right cast or whatever
construct can be used somewhere. Or you get stuck with writing a wrapper
around the parser/lexer just because there's something not implemented in
the generic language.

Cheers,

Ric
--
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
  "You can't expect to wield supreme executive power just because some
   watery tot throws a sword at you!"
  --- Monty Python and the Holy Grail

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list