letter = "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" ; digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ; symbol = "[" | "]" | "{" | "}" | "(" | ")" | "<" | ">" | "'" | '"' | "=" | "|" | "." | "," | ";" ; character = letter | digit | symbol | " " ; identifier = letter , { letter | digit | " " } ; terminal = "'" , character , { character } , "'" | '"' , character , { character } , '"' ; special = "?" , any , "?" ; comment = (* this is a comment "" *) "(*" , any-symbol , "*)" ; any-symbol = ? any visible character ? ; (* ? ... ? *) lhs = identifier ; rhs = identifier | terminal | comment , rhs | rhs , comment | "[" , rhs , "]" | "{" , rhs , "}" | "(" , rhs , ")" | rhs , "|" , rhs | rhs , "," , rhs ; rule = lhs , "=" , rhs , ";" | comment ; grammar = { rule } ;