Hi,
  I want to limit the occurrence of the character * and ? in a string.  Say, 
the * and ? can appear anywhere and multiple times in a string like:
  (1) a*b
  (2) a**b
  (3) **ab
  (4) ab*
  (5) a?b*
  (6) ?ab

But the string cannot ONLY contains these 2 character. For example, Following 
are invalid:
  (10) **
  (11) ?*
  (12) ??**
  (13) ??

Currently my WORD grammar is:

WORD: ('a'..'z' | 'A'..'Z' | '.' | ',' | '0'..'9' | '?' | '\u002A')+ ;

Which only covers the valid cases. Is there a way to do this without writing 
Java code in the Lexer and Parser?

Thx !



      
--~--~---------~--~----~------------~-------~--~----~
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:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address

Reply via email to