To do this, you of course must have exact knowledge of everything that is allowed in your language. Identify all the different kinds of syntax and give them all names and write out their definitions. This is usually done using the BNF notation. Here is what we need for our example language: First level, lexical structure: ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ::= "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" ::= * ::= ( | ) * Second level, Syntactic structure, taking the lexical forms as simple items ::= name | number | "(" ")" ::= ( ) * ::= "+" | "-" | "*" | "/" | "<" | ">" | "<=" | ">=" | "==" | "!=" | "^" | "%" | "and" | "or" | "not" ::= | | | | ::= "print" ::= name "=" ::= "while" "do" ::= "if" "then" { "else" } "fi" ::= "{" { } "}" ::= ( ";" ) *