I don't see how they arrive at the parsing table

grocery_stocker <cdalten@gmail.com>
Sat, 26 Apr 2008 15:48:16 -0700 (PDT)

          From comp.compilers

Related articles
I don't see how they arrive at the parsing table cdalten@gmail.com (grocery_stocker) (2008-04-26)
Re: I don't see how they arrive at the parsing table cdodd@acm.org (Chris Dodd) (2008-04-27)
| List of all articles for this month |

From: grocery_stocker <cdalten@gmail.com>
Newsgroups: comp.compilers,comp.theory
Date: Sat, 26 Apr 2008 15:48:16 -0700 (PDT)
Organization: Compilers Central
Keywords: LL(1), parse, question
Posted-Date: 27 Apr 2008 17:32:00 EDT

The question stems from the following URL


http://en.wikipedia.org/wiki/LL_parser


For the following grammar rules


1. S → F
2. S → ( S + F )
3. F → 1




They have a parsing table for ( 1 + 1 ) that looks like


    |( |) |1|+|$
__________
  S| 2| -|1|-| -
___________
  F|- |- |3|-| -




How do they arrive at this table? For example, they use first '(' from
the input stream. How do they know know to apply rule 2 and say not
rule 1?



Post a followup to this message

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