Hello,

Newbie question :)

I'm developing my grammar and I get to a point where a simple token
like "bb" is not recognized as a regular identifier. I'm using the
following IDENT definition, like many grammars in antlr.org's
Downloads section:

IDENT   :       'a'..'z' ('a'..'z'|'A'..'Z'|'0'..'9')* ;
INTCONST:       ('0'..'9')+ ;

I used to work with antlr v2 and C++, the definition for this token on
the same grammar was straightforward and worked well:

#token IDENT        "[a-zA-Z][a-zA-Z0-9]*"
#token INTCONST     "[0-9]+"

I'm attaching:

1) The grammar
2) jp2: For instance, the IDENT "p12" is correctly recognized an
placed on correct child on the parse tree.
3) jp4: The ident "bb" is splitted in the parse tree as "b" "b" on
different nodes, not detected as a whole identifier, why ? What am I
doing wrong ? :/

Thanks in advance !
Roman

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: CL.g
Description: Binary data

Attachment: jp4
Description: Binary data

Attachment: jp2
Description: Binary data

List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address

Reply via email to