LR(1) Parsers

"Nader O. Soliman" <nadersoliman@flashmail.com>
23 Feb 2000 14:11:04 -0500

          From comp.compilers

Related articles
LR(1) Parsers nadersoliman@flashmail.com (Nader O. Soliman) (2000-02-23)
Re: LR(1) Parsers torbenm@diku.dk (2000-02-27)
| List of all articles for this month |
From: "Nader O. Soliman" <nadersoliman@flashmail.com>
Newsgroups: comp.compilers
Date: 23 Feb 2000 14:11:04 -0500
Organization: Deja.com - Before you buy.
Keywords: parse

Hello everyone,


I have a question about LR(1) parsers, the question may has been
posted before but I couldn't find it, so please be patient with me.


There are some specifications that is required for production rules to
be acceptable, if the parser is and LL(1) parsers.


Now, is there anyone knows the rules required for and LR(1) parser
such as YACC.


Also I need to make sure of my understanding, so let me say what I
think and you see if this is right or wrong and why?


LL(1) parsers stands for Left to right scanning, with Left derivation
first. This means that the parser substitutes the left hand side of
the production rule (non-terminal) with its equivalent right hand side
rule. The parser also uses one look-ahead token for parsing.


LR(1) parsers is the same excepts it substitutes a collection of
tokens that appears on the right hand side of the production rule with
its equivalent left hand side (non-terminal), this process is called
reduce in YACC.


Are these explanation right?


Nader O. Soliman


Post a followup to this message

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