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

4975distinquishing single from multiple characters

Expand Messages
  • Michael Labhard
    Feb 1, 2002
      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?

      -- Michael