(→The Problem) |
|||
Line 13: | Line 13: | ||
== Solution == | == Solution == | ||
+ | |||
+ | The terminal symbols are all the symbols not defined by a rule: '''<tt>or</tt>''', '''<tt>and</tt>''', '''<tt>not</tt>''', '''<tt>(</tt>''', '''<tt>)</tt>''', '''<tt>true</tt>''', '''<tt>false</tt>'''. | ||
[[category:Compilers]] | [[category:Compilers]] | ||
[[category:Teaching]] | [[category:Teaching]] |
Consider the following grammar:
bexpr -> bexpr or bexpr | bterm bterm -> bterm and bterm | bfactor bfactor -> not bfactor | ( bexpr ) | true | false
The terminal symbols are all the symbols not defined by a rule: or, and, not, (, ), true, false.