Blame view

course/lists_solution.cup 404 Bytes
Ulrich Schoepp committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
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
  |
  ;