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

Re: Am I getting crazy???

Expand Messages
  • Michael Schmitt
    Oops, forgot to deactive automatic signature of my email... +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Hi, this afternoon I posted
    Message 1 of 3 , Feb 16, 2000
    • 0 Attachment
      Oops, forgot to deactive automatic signature of my email...

      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

      Hi,

      this afternoon I posted a problem with the ANTLR lexer that was related
      to a potentially faulty FOLLOW-Set computation. In order to work around
      the bug I decided to re-arrange the alternatives in a critical lexer
      rule. But - believe or not - ANTLR decided to re-arrange them again;
      resulting in the old order! I couldn't believe my eyes and hence deleted
      all files, restarted ANTLR and - urgh - ANTLR once again decided to
      re-order the rules. Is that really possible? If ANTLR is allowed to
      change the order of alternative this may have a serious impact on the
      usage of syntactic predicates - e.g. in my special case.

      Michael

      --
      ======================================================================
      Michael Schmitt phone: +49 451 500 3725
      Institute for Telematics secretary: +49 451 500 3721
      Medical University of Luebeck fax: +49 451 500 3722
      Ratzeburger Allee 160 eMail: schmitt@...-luebeck.de
      D-23538 Luebeck, Germany WWW: http://www.itm.mu-luebeck.de
      ======================================================================
    • parrt@jguru.com
      ... ANTLR has to reorder the lexer rules for finite lookahead. It also moves any predicates (syn or sem) to the default case of the switch where it uses an
      Message 2 of 3 , Feb 19, 2000
      • 0 Attachment
        Michael Schmitt writes:
        >From: Michael Schmitt <schmitt@...-luebeck.de>
        >this afternoon I posted a problem with the ANTLR lexer that was related
        >to a potentially faulty FOLLOW-Set computation. In order to work around
        >the bug I decided to re-arrange the alternatives in a critical lexer
        >rule. But - believe or not - ANTLR decided to re-arrange them again;
        >resulting in the old order! I couldn't believe my eyes and hence deleted
        >all files, restarted ANTLR and - urgh - ANTLR once again decided to
        >re-order the rules. Is that really possible? If ANTLR is allowed to
        >change the order of alternative this may have a serious impact on the
        >usage of syntactic predicates - e.g. in my special case.

        ANTLR has to reorder the lexer rules for finite lookahead. It also
        moves any predicates (syn or sem) to the default case of the switch
        where it uses an if-then-else chain. The default case handles all
        non-finite lookahead issues.

        I too have noted a possible problem with the syn pred handling...i
        have in the bug list already. Sorry about that.

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