// the grammar. An equivalent lex+yacc grammar and support code would
// be several times as long.
-Comment = "//" ~[\n]* "\n"
- | "/*" ~[\n]* "*/"
+Comment = "//" ~[\n\r]* [\r\n]!
+ | "/*" ~[\n\r]* "*/"
ws = ([\r\n ] | Comment)* -> ~[\r\n ]
s = ws! Program ws!
| Literal:: int ":" "sendto" Port ";" /ws
| NamedCodeBag:: name ":" "{" CodeBagBody "}" /ws
-Instruction = Instruction:: (Brack:: "[" (int|(Star::"*"))? ("r")? "]" ws!)? (Command +/ (ws! "," ws!) ws! ";"!)
+Instruction = Instruction::
+ (Brack:: "[" (int|(Star::"*"))? ("r")? "]" ws!)?
+ (Command +/ (ws! "," ws!) ws! ";"!)
Command = Nop:: "nop"
| Kill:: "kill"
| Wait:: "wait"