CyberZHG / toolbox

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

Error in following productions #1

Closed sourabh-k closed 7 years ago

sourabh-k commented 7 years ago

1 . A->abcdfh|abcde 2 A->abcdfh|abcde|abcdf

CyberZHG commented 7 years ago

image

Note that the toy programs treat continuous characters as one token.

Are you expecting A -> a b c d f h | a b c d e and A -> a b c d f h | a b c d e | a b c d f?

https://cyberzhg.github.io/toolbox/cfg2ll?grammar=QSAtPiBhIGIgYyBkIGYgaCB8IGEgYiBjIGQgZQ== https://cyberzhg.github.io/toolbox/lr0?grammar=QSAtPiBhIGIgYyBkIGYgaCB8IGEgYiBjIGQgZQ== https://cyberzhg.github.io/toolbox/lr1?grammar=QSAtPiBhIGIgYyBkIGYgaCB8IGEgYiBjIGQgZQ== https://cyberzhg.github.io/toolbox/lalr?grammar=QSAtPiBhIGIgYyBkIGYgaCB8IGEgYiBjIGQgZQ==

https://cyberzhg.github.io/toolbox/cfg2ll?grammar=QSAtPiBhIGIgYyBkIGYgaCB8IGEgYiBjIGQgZSB8IGEgYiBjIGQgZg== https://cyberzhg.github.io/toolbox/lr0?grammar=QSAtPiBhIGIgYyBkIGYgaCB8IGEgYiBjIGQgZSB8IGEgYiBjIGQgZg== https://cyberzhg.github.io/toolbox/lr1?grammar=QSAtPiBhIGIgYyBkIGYgaCB8IGEgYiBjIGQgZSB8IGEgYiBjIGQgZg== https://cyberzhg.github.io/toolbox/lalr?grammar=QSAtPiBhIGIgYyBkIGYgaCB8IGEgYiBjIGQgZSB8IGEgYiBjIGQgZg==

sourabh-k commented 7 years ago

yeah that works fine ...