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

183Re: What would the wily programmer do?

Expand Messages
  • Sean Fausett
    Feb 1, 1999
      I have a similar problem which I solved in flex by using rules with
      prefixes. It would be nice if ANTLR had a similar feature.

      Maybe if you could write separate lexer grammars and switch them on the

      Cheers, Sean.

      -----Original Message-----
      From: Janet Riley [mailto:jriley@...]
      Sent: Saturday, 30 January 1999 04:28
      To: antlr-interest@onelist.com
      Subject: [antlr-interest] Re: What would the wily programmer do?

      From: Janet Riley <jriley@...>

      I realized that there are times I want to say WHEN. When inside
      command_open and command_close, check it against these rules. Case
      matters. When inside a conditional, which is denoted by '(' and ')',
      and '>' do not mean command_open and command_close . When NOT in a
      command, ignore the text. I thought I had done this with the rules, but
      the literal tokens threw a curveball. Filtering out everything but the
      commands, as described in the "Filtering Input Streams" part of the
      documentation, isn't an option because I do want to retain
    • Show all 4 messages in this topic