CS450 Compiler Design
15
Example: Syntax of “Mini-Triangle”
Program ::= single-Command
single-Command
      ::= V-name := Expression
        | Identifier ( Expression )
        | if Expression then single-Command
                        else single-Command
        | while Expression do single-Command
        | let Declaration in single-Command
        | begin Command end
Command ::= single-Command
          | Command ; single-Command
...