CyberZHG / toolbox

https://cyberzhg.github.io/toolbox/ Encoding and parsing tools.
GNU General Public License v3.0
949 stars 81 forks source link

nested left factoring does not work #8

Open der-ali opened 5 years ago

der-ali commented 5 years ago

for a grammar

A -> id | B | a
B -> id b

the left factoring result should be

A -> id A' | a
A -> ϵ  | b

since it is like A -> id | id b | a