Hi,

This is probably a very simple question, but I can't get syntactic
predicates to work in lexer rules:


AssignmentOperatorOrKeywordMarker
  : ':=' => AssignmentOperator
  | ':' => KeywordMarker
  ;

KeywordMarker
  :    ':'
  ;

AssignmentOperator
  :    ':='
  ;

What I want to achieve is to have the lexer produce an assignment operator
':=' token instead of a keyword marker ':' whenever possible.
The error is  "unexpected token: ':='" at AssignmentOperatorOrKeywordMarker
rule definition.

Any help would be welcomed.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

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

Reply via email to