mdaines / grammophone

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

Parse error #28

Closed gonensel closed 1 year ago

gonensel commented 1 year ago

hello I am trying to analyze this grammar: E -> T A . A -> + T A . A -> . T -> F B . B -> * F B . B -> . F -> ( E ) . F -> id . but I an getting error. the grammar is ok can you please help?

mdaines commented 1 year ago

Symbols like + need to be quoted. So the grammar should be written like this:

E -> T A .
A -> "+" T A .
A -> .
T -> F B .
B -> "*" F B .
B -> .
F -> "(" E ")" .
F -> id .

Analyze this grammar in Grammophone