Loading ...
Sorry, an error occurred while loading the content.

distinquishing single from multiple characters

Expand Messages
  • Michael Labhard
    Question on Lexer. The grammar (prolog) has two types of tokens both of which contain the same characters. Specifically the . may appear alone as the end
    Message 1 of 1 , Feb 1, 2002
    • 0 Attachment
      Question on Lexer. The grammar (prolog) has two types of tokens both of
      which contain the same characters. Specifically the "." may appear alone as
      the end token or it may appear together with other characters such as "$&%",
      etc. as a graphic token. However, the rules:

      GRAPHIC_TOKEN: ( options {greedy=true;} "." (GRAPHIC_CHAR)+ );

      END_TOKEN: ".";

      are flagged as ambiguous, even though in the graphic token case there must be
      at least 2 characters. What is the best way to resolve such an ambiguity?
      Thanks.

      -- Michael
    Your message has been successfully submitted and would be delivered to recipients shortly.