Re: Preview in grammar

Chris F Clark <cfc@shell01.TheWorld.com>
12 May 2006 00:48:34 -0400

          From comp.compilers

Related articles
[5 earlier articles]
Re: Preview in grammar DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-05-09)
Re: Preview in grammar franku@fmi.uni-passau.de (Ulrich Frank) (2006-05-09)
Re: Preview in grammar cfc@shell01.TheWorld.com (Chris F Clark) (2006-05-11)
Re: Preview in grammar franku@fmi.uni-passau.de (Ulrich Frank) (2006-05-11)
Re: Preview in grammar franku@fmi.uni-passau.de (Ulrich Frank) (2006-05-11)
Re: Preview in grammar Meyer-Eltz@t-online.de (Detlef Meyer-Eltz) (2006-05-12)
Re: Preview in grammar cfc@shell01.TheWorld.com (Chris F Clark) (2006-05-12)
Re: Preview in grammar pbmann@gmail.com (2006-05-12)
Re: Preview in grammar pbmann@gmail.com (2006-05-12)
Re: Preview in grammar pbmann@gmail.com (2006-05-15)
Re: Preview in grammar cfc@shell01.TheWorld.com (Chris F Clark) (2006-05-15)
| List of all articles for this month |

From: Chris F Clark <cfc@shell01.TheWorld.com>
Newsgroups: comp.compilers
Date: 12 May 2006 00:48:34 -0400
Organization: The World Public Access UNIX, Brookline, MA
References: 06-05-011 06-05-031 06-05-037
Keywords: parse, LALR
Posted-Date: 12 May 2006 00:48:34 EDT

Well, personally I would recommend Yacc++ for one's LR parser
generator, but I am quite biased in that regards as one of its
authors.


As to the state merging problem, I believe that if one looks at the
target states of the "goto actions" (recursively as necessary), one
can distinguish all the merged states, so that one can handle LALR
tables the same way as LR tables. Having said that, I vaguely require
that we did have a client that discuss with us adding an option to
avoid state merging to simplify said problem. It doesn't appear that
we implemented any such option. That makes me hopeful that at least
in that client's case, we were able to solve the problem by
disambiguation. However, it could also mean that the client decided
that something else was more pressing and never asked us to implement
the changes.


So, my belief is that one can do everything one needs at runtime, just
using the generated tables (and the contents of the parser stack).
However, one would have to attempt it with one's specific grammar to
be certain (or do the proof that it works in the general case).


Hope this helps,
-Chris


*****************************************************************************
Chris Clark Internet : compres@world.std.com
Compiler Resources, Inc. Web Site : http://world.std.com/~compres
23 Bailey Rd voice : (508) 435-5016
Berlin, MA 01503 USA fax : (978) 838-0263 (24 hours)
------------------------------------------------------------------------------


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.