Related articles |
---|
[29 earlier articles] |
Re: Why LL(1) Parsers do not support left recursion? ajo@andrew.cmu.edu (Arthur J. O'Dwyer) (2006-07-29) |
Re: Why LL(1) Parsers do not support left recursion? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-07-29) |
Re: Why LL(1) Parsers do not support left recursion? parsersinc@earthlink.net (SLK Parsers) (2006-07-31) |
Re: Why LL(1) Parsers do not support left recursion? wyrmwif@tsoft.org (SM Ryan) (2006-08-01) |
Re: Why LL(1) Parsers do not support left recursion? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-08-03) |
Re: Why LL(1) Parsers do not support left recursion? parsersinc@earthlink.net (SLK Parsers) (2006-08-03) |
Re: Why LL(1) Parsers do not support left recursion? parsersinc@earthlink.net (SLK Parsers) (2006-08-04) |
From: | "SLK Parsers" <parsersinc@earthlink.net> |
Newsgroups: | comp.compilers |
Date: | 4 Aug 2006 16:39:36 -0400 |
Organization: | Parsers Inc. |
References: | 06-07-11506-08-011 |
Keywords: | parse |
Posted-Date: | 04 Aug 2006 16:39:36 EDT |
>Hmmm, how can you ever be sure, that the solution for the dangling else
>always will be correct, also in other ambiguous situations?
It is well-known to be correct, and is explained in compiler texts. It
is a very special case. In general, ambiguity is to be avoided unless
you know what you are doing, and probably even then. That said, I used
the technique seven times in a recent translator, and am confident
that it is correct. This was verified by use on about 1000 real
programs.
The SLK parser generator: http://home.earthlink.net/~slkpg/
[My rule of thumb has been that it's OK to use disambiguation for
if/then/else and operator precedence in expressions. Anywhere else
you're likely to get into trouble. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.