Public feed #887844

baklava

public text v1 · immutable
Raw Edit
·published 2008-02-01 17:35 UTC
rendered paste body
Remove left recursions in the grammar:

A -> Ab | epsilon
B -> c | Bd
C -> e | f


____

Fixed?

A -> epsilonA'
A' -> bA' | epsilon
B -> cB'
B' -> dB' | epsilon
C - > e | f


____

Original problem:

DECLS -> DECLS var ID_LIST : TYPE ; | epsilon
ID_LIST -> id | ID_LIST , id
TYPE -> int | real