[antlr-interest] ANTLR 3.0 question about common actions

Ric Klaren klaren at cs.utwente.nl
Tue Aug 3 04:51:17 PDT 2004


Hi,

On Wed, Jul 28, 2004 at 05:03:40PM -0700, Terence Parr wrote:
> >  It seems like this would be nearly impossible
> > to make target language neutral.  Taking the ideas from SLK a step
> > further, perhaps you could have a different notation for semantic
> > predicates (which should return a Boolean type in the target language)
> > from actions.
> 
> I've thought that perhaps standard actions go in {...} and language 
> specific actions go in <<...>>.  Just a thought.

Might I propose to use something similar to with apache and various
embedded languages in webpages. Have a default language for {...} and use
{c++...} for c++ {c#...} for c# and to be symmetric {java ... } for java.
No extra 'glyphs' a bit more verbose but very survivable (going on my
experience with php that is). This would also allow mixing target code in
the same .g file.

Cheers,

Ric
-- 
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893755  ----
-----+++++*****************************************************+++++++++-------
  Xander: "Buffy, we need to do something *now*"
  Angel: "We need a distraction."
  Buffy: "Right."
  Angel: "What are you going to do?"
  Buffy: "I'm going to kill them all. That oughtta distract 'em..."



 
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