exp => empty exp => exp factor factor => "\;" exp factor => "\=" exp factor => "\" name def exp factor => "\\" name def exp factor => ";" exp factor => term def => empty def => "=" term term => "(" exp ")" term => "[" items "]" term => "{" items "}" term => string term => name items => empty items => term items items => ";" exp string => quote_string string => tilde_string
The parser reads an expression from the input until it reaches end of file or the special token "\#" which acts like end of file. It skips white space and comments which appear before syntactic elements. White space is any character with an ASCII value less than or equal to ' ' (SPACE). A comment starts with '#' and continues through end of line.
The empty element means end of file.
\ ( ) [ ] { } ; " ~ # =
"" "hello world" "This is a multi- line string."
~ This has "quotes" in it.~ ~| This has "quotes" in it.~| ~END Anyone familiar with "here is" documents should easily understand the rule. ~END ~~ Usually just a single tilde "~" will suffice as a delimiter, or if the string contains a tilde like this one, then a double tilde will suffice. ~~
2023-06-15