[antlr-interest] Problem with token names that are also keywords in target language (e.g. C#)
Ric Klaren
klaren at cs.utwente.nl
Tue Mar 12 05:58:58 PST 2002
On Mon, Mar 11, 2002 at 08:38:31PM -0000, micheal_jor wrote:
> There is an issue because variable names in the generated Parser are
> sometimes C# keywords (e.g. "in"). I have investigated and, the names
> are "inherited" from the grammar file. The java.g file in
> dir 'examples' has "in" for instance.
>
> Is it possible to do something globally, perhaps a prefix to all such
> names?. Could someone more familiar with the code do this please?. I
> am still on 2.7.1 so please post the changes here in addition to
> applying it to 2.7.2a2......
If this is some example files you have ported to C# then I'd say change the
examples. Doing a global prefixing for everything java/c++ just because C#
does something different seems not practical to me. Or do you mean some of
the variable names which are generated by some of the generic parts of
antlr?
Or it may be that I'm completely missing the point.
Ric
--
-----+++++*****************************************************+++++++++-------
---- Ric Klaren ----- klaren at cs.utwente.nl ----- +31 53 4893722 ----
-----+++++*****************************************************+++++++++-------
Innovation makes enemies of all those who prospered under the old
regime, and only lukewarm support is forthcoming from those who would
prosper under the new. --- Niccolò Machiavelli
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list