db9f43e7 by Ulrich Schoepp

Beispiel zum Loesen von LR-Konflikten

1 parent 2a8fa21f
parser code {:
:};
/* Terminalsymbole, die vom Lexer produziert werden. */
terminal A;
terminal B;
terminal C;
terminal D;
/* Nichtterminalsymbole */
non terminal S;
non terminal DAlist;
non terminal DBlist;
/* Startsymbol */
start with S;
S ::= DAlist DBlist C
;
DAlist ::=
DAlist D A
|
;
DBlist ::=
DBlist D B
|
;
parser code {:
:};
/* Terminalsymbole, die vom Lexer produziert werden. */
terminal A;
terminal B;
terminal C;
terminal D;
/* Nichtterminalsymbole */
non terminal S;
non terminal DAlist;
non terminal DBlist;
non terminal DBlist1;
/* Startsymbol */
start with S;
S ::= DAlist DBlist C
;
DAlist ::=
DAlist D A
|
;
DBlist1 ::=
DBlist1 D B
| D B
;
DBlist ::=
DBlist1
|
;
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!