mdaines / grammophone

A tool for analyzing and transforming context-free grammars.
https://mdaines.github.io/grammophone
MIT License
205 stars 23 forks source link

oth-lr0-3.cfg is defect #8

Closed daxim closed 4 years ago

daxim commented 5 years ago

https://github.com/mdaines/grammophone/blob/master/test/fixtures/example_grammars.json#L80

It's the only one among the test grammars that has non-reachable rules, this makes me think it's not intended. It was already that way when you imported it:

http://smlweb.cpsc.ucalgary.ca/vital-stats.php?grammarfile=example-grammars/oth-lr0-3.cfg

mdaines commented 4 years ago

I think I included that example mainly to test that smlweb's examples would parse, so it's not included by mistake. Grammophone doesn't use the same convention that capital letters are nonterminals -- a symbol is a nonterminal only if it is the head of a rule.