[antlr-interest] how useful would a generic grammar "action" language be?
Terence Parr
parrt at cs.usfca.edu
Tue Oct 28 09:54:31 PST 2003
On Tuesday, October 28, 2003, at 02:28 AM, Ric Klaren wrote:
> 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 ;) ).
I corrected my poor explanation...i meant that the user would type
a = b;
not
assign(a,b)
(that is just the internal form). I'm a parser guy ;)
>> 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.
Yeah, I'm semi-skeptical but it's a nice dream. Perhaps it will only
be good for sem preds?
Ter
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com pure link sharing
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list