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

How to determine follow sets?

Expand Messages
  • M. Ranganathan
    Hello! I am dealing with a grammar that is ambiguous and for which I have to switch lexical analyers at several points. I would like to understand the
    Message 1 of 2 , May 30, 2000
      Hello!
       
      I am dealing with a grammar that is ambiguous and for which I have to switch lexical analyers at several points. I would like to understand the ambiguities so I can make sure I have covered all cases.
       
      How does one determine what the first/ follow sets are from the parser generator so I can understand what the ambiguities are?
       
      Thanks in advance for your help.
       
      Ranga.
       
      M. Ranganathan
      NIST Advanced Networking Technologies Division
      100 Bureau Drive, Stop 8290, Gaithersburg, MD 20899.
      Tel: 301 975 3664 FAX: 301 590 0532
    • Ric Klaren
      ... If I m not mistaken they get dumped in diagnostics mode. Add the option -diagnostic this dumps out a text file. As a side note I have noted some oddities
      Message 2 of 2 , Jun 2, 2000
        On Tue, May 30, 2000 at 05:16:44PM -0400, M. Ranganathan wrote:
        > How does one determine what the first/ follow sets are from the parser
        > generator so I can understand what the ambiguities are?

        If I'm not mistaken they get dumped in diagnostics mode. Add the option
        -diagnostic this dumps out a text file. As a side note I have noted some
        oddities with this mode (maybe that's why it's not listed in the options
        listings anywhere). Sometimes errors are not detected in this mode.

        Cheers,

        Ric
        --
        -----+++++*****************************************************+++++++++-------
        -- Ric Klaren - klaren@... ------------------------------------------
        -----+++++*****************************************************+++++++++-------
        'And this 'rebooting' business? Give it a good kicking, do you?' 'Oh, no,
        of course, we ... that is ... well, yes, in fact,' said Ponder. 'Adrian
        goes round the back and ... er ... prods it with his foot. But in a
        technical way,' he added. --- From: Hogfather by Terry Pratchett.
        -------------------------------------------------------------------------------
      Your message has been successfully submitted and would be delivered to recipients shortly.