[antlr-interest] Special Characters in Identifiers

Matthias Gutheil matthias.gutheil at informatik.uni-mannheim.de
Mon May 15 05:17:57 PDT 2006


Hello,

I am not yet an expert in writing grammars, until now I only worked with the 
generated AST.

We want to allow * and ? in classnames or methodnames e.g.

class k*
class k?
class hello*orld

Could that work with my own extension with something like:

identifierStarQuestion
     :    IDENT
         ( STAR IDENT )*
         ( QUESTION IDENT  )*
     ;

And in the grammar I will change from identifier to
identifierStarQuestion e.g. after class is recognized.

Cheers
Matthias

-- 
Matthias Gutheil, Dipl. Inform.
Universität Mannheim
Lehrstuhl für Softwaretechnik
A5, 6, Gebäudeteil B
68131 Mannheim
Germany

E-Mail: matthias.gutheil at informatik.uni-mannheim.de
Tel: (+49) 621 181 3913



More information about the antlr-interest mailing list