Re: States Creation

Kaarthik <kaarthik@cisco.com>
31 Mar 2002 23:24:57 -0500

          From comp.compilers

Related articles
States Creation kidlim@yahoo.com (Agnes Lim) (2002-03-24)
Re: States Creation kaarthik@cisco.com (Kaarthik) (2002-03-31)
Re: States Creation mwdeeds@yahoo.com (2002-03-31)
| List of all articles for this month |

From: Kaarthik <kaarthik@cisco.com>
Newsgroups: comp.compilers
Date: 31 Mar 2002 23:24:57 -0500
Organization: cisco
References: 02-03-157
Keywords: LALR
Posted-Date: 31 Mar 2002 23:24:57 EST

> "Agnes Lim" Wrote :
> Below is an example taken from the 'Dragon Book'. Can someone
> explain how the states are being derived. I have tried to follow thru
> the algorithm in the example but was unable to derived the second set of
> Items I8 and I9.
>
> Thanks.
> ---------------------------------------------------------------------
>
> I4 :
> F -> (.E)
> E -> .E+T
> E -> .T
> T -> .T*F
> T -> .F
> F -> .(E)
> F -> .id
>


State I4 on E goes to I8


>
> I8 :
> F -> (E.)
> E -> E.+T
>


I6 :
E -> E+.T
T -> .T*F
T -> .F
F -> .(E)
F -> .id


State I6 on T goes to state I9


>
> I9 :
> E -> E+T.
> T -> T.*F


Post a followup to this message

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