At 20:58 14/01/2009, chain one wrote:
>I am still working on this. Searching for solutions that could
>make the IDENT rule and FUNCTION_DECL work together.
Well, one thing you could try would be:
IDENT
: ('FUNCTION') => FUNCTION_DECL { $type = FUNCTION_DECL;
$channel = HIDDEN; }
| ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*
;
I wouldn't have thought it'd be necessary, though; ANTLR ought to
be able to figure that out on its own.
Although -- it's generally a good idea to put the more "vague"
lexer rules further down, so try making sure that the
FUNCTION_DECL rule is listed before the IDENT rule (instead of
doing the above) and see if that helps.
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---