@top Script { terminator* line+ } @skip { space | comment } line { expression terminator+ } expression { Boolean | Nil | String | Number } @tokens { space { $[ \t\r]+ } comment { "&" ![\n]* } Boolean { "true" | "false" } Nil { "nil" } String { '"' (!["\\] | "\\" _)* '"' } int { $[1-9]$[0-9]* } float { ("0" | int ) $[0.9]+} Number { int | float } separator { $[,\n] } terminator { $[;\n] } }