Closed craff closed 4 years ago
Works
The grammar AB defined as : AB ::= AC 'a' 'c' | BC 'b' 'c' | () BC ::= AC 'a' 'c' | AB 'a' 'b' | () AC ::= BC 'b' 'c' | AB 'a' 'b' | ()
is printed as following after elimination of left recursion:
AB ::= (() | AB_lr from AB_lr ::= (('b' 'c' | 'a' 'c')) (BC_lr 'b' 'c' | AC_lr 'a' 'c') AC_lr ::= (('a' 'b' | 'b' 'c')) (BC_lr 'b' 'c' | AB_lr 'a' 'b') BC_lr ::= (('a' 'b' | 'a' 'c')) (AC_lr 'a' 'c' | AB_lr 'a' 'b')*
This really is a kind of product vector * matrix, the line of the matrix have the "star" and XXX_lr are used do index the matrix
EKey and ELr are not printed