[antlr-interest] 2 C-target questions

Micheal J open.zone at virgin.net
Wed Oct 3 14:34:28 PDT 2007


Hi,

>  >Gavin Lambert wrote:
>  >> Just use $myToken.text.  The codegen should translate that 
> into
>  >> the appropriate bit of code no matter what target 
> language  >> you're using.  >>  >That's not true for at least 
> the C# target. I've wrote about it 
> on
>  >the appropriate wiki page.
> 
> Wouldn't that be a bug in the C# target codegen, then?  It ought 
> to be able to translate $x.text into tokenVariable.Text 
> automatically, thereby making it easier for people to switch 
> target languages.

Perhaps. The 'island-grammar' and 'LL-star' examples in examples-v3
certainly use it (just grep'd the sources). I'm pretty certain that the tool
rather than a target is responsible for it (i.e. '$x.text').

Micheal

-----------------------
The best way to contact me is via the list/forum. My time is very limited.



More information about the antlr-interest mailing list