|Technical question about yacc and LALR parsers jar@florida.HQ.Ileaf.COMid AA07671; Sun, 21 Apr 91 (1991-04-20)|
|Re: Technical question about yacc and LALR parsers email@example.com (1991-04-22)|
|Re: Technical question about yacc and LALR parsers firstname.lastname@example.org (1991-04-22)|
|Re: Technical question about yacc and LALR parsers email@example.com (1991-04-22)|
|Re: Technical question about yacc and LALR parsers firstname.lastname@example.org (1991-04-23)|
|Technical question about yacc and LALR parsers email@example.com (1991-04-21)|
|From:||firstname.lastname@example.org (Dr. Jon Mauney)|
|Posted-Date:||Mon, 22 Apr 1991 14:18:54 GMT|
|Keywords:||yacc, parse, errors|
|Organization:||Project EOS - North Carolina State University|
|Date:||Mon, 22 Apr 1991 14:18:54 GMT|
> ... Note that the following is possible (I think):
> state 747
> gathered_type : '[' VOID . ']'
> gathered_type : '(' VOID . ')'
This is not possible using the normal LALR construction, for the
reason you mentioned: transition into a state is due to shifting
of a single symbol. Therefore all configurations must have the
same symbol to the right of the dot. The same must be true of
the state previous to that: The predecessor of the given state 747
would have had to contain
gathered_type : '[' . VOID ']'
gathered_type : '(' . VOID ')'
which has been shown to be impossible.
The only way that items can differ in the left context is
for one to be contained in the other. For example,
given the grammar
A --> x B
A --> x y z
B --> y w
the CFSM wil l contain the state
A --> x y . z
B --> y . w
Jon Mauney, parsing partisan
Computer Science Dept.
N.C. State University
Return to the
Search the comp.compilers archives again.