Skip to content

Example Grammars

mdaines edited this page Apr 2, 2025 · 1 revision

Arithmetic Expressions

A -> a B .
A -> a .
B -> A | b .

Analyze

Dangling Else

statement -> if_stmt | other .
if_stmt -> if "(" cond ")" statement |
  if "(" cond ")" statement else statement .
cond -> true | false .

Analyze

Clone this wiki locally