|Help needed on LALR(1) ambiguity email@example.com (2008-11-14)|
|Re: Help needed on LALR(1) ambiguity firstname.lastname@example.org (Chris Dodd) (2008-11-17)|
|Re: Help needed on LALR(1) ambiguity email@example.com (Armel) (2008-11-17)|
|Re: Help needed on LALR(1) ambiguity firstname.lastname@example.org (Sven-Olof Nystrom) (2008-11-18)|
|Re: Help needed on LALR(1) ambiguity email@example.com (2008-11-18)|
|Re: Help needed on LALR(1) ambiguity Danny.Dube@ift.ulaval.ca (2008-12-01)|
|Date:||Tue, 18 Nov 2008 16:46:02 -0800 (PST)|
|Posted-Date:||19 Nov 2008 19:50:24 EST|
Hi everybody, thank you for your comments.
Chris Dodd wrote:
> So the problem is that you need to be able to look
> ahead to the end of the input to see how many |-suffixes
> there are in order to figure out how to parse the beginning
> of the expression. This makes it pretty much impossible
> to parse without unbounded lookahead, or backtracking,
> or something else.
Yes I believe you're right.
Sven-Olof Nystrom wrote:
> In your example, making the second production of "Names" left-recursive
> makes the grammar LALR(1). Yacc detects no conflicts for the following
> names : ID COLON
> names : names COMMA ID
Unfortunately this is not the same language.
My names match the following:
Your names unfortunately match the following:
I understand now that there is probably no way to solve my problem
without unlimited lookahead. Thank you everyone for your help.
Return to the
Search the comp.compilers archives again.