lilt
lilt copied to clipboard
LILT: noun, A characteristic rising and falling of the voice when speaking; a pleasant gentle accent.
My impression after reading the docs is that the grammar is very well explained. However, between "Example" and "Usage", I'm left a little confused at how to actually integrate lilt...
The `kind` attribute of nodes is being set to the most _general_ kind, rather than the most specific. So for `X = A | B`, it's `X` rather than `A`...
`newline` should match a single newline, e.g. `'\r\n' | '\n' | '\r'`. This should cause no issues as long as newlines are consistent in parsed files.
Sometimes when planning syntax and writing parsers, you overlook some kind of ambiguity in the parser or other issue which could be a major problem down the road. For instance,...
With ``` alpha: word: *alpha *" " sentence: *word ``` feeding "." to `sentence` will hang. This is technically correct behavior. Note that `*` is a macro for `?+`. So...
Consider the code: ``` addop: ... mulop: ... divop: ... timesop: ... operation: addop | mulop | divop | timesop ``` It would be nice to be able to instead...
[Backus–Naur form](https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form). Perhaps some kind of pragma at the top of a specification, like `{form: BackusNaur}` or `#form: BackusNaur`.
When parsing, include a field `range` which is the range of text that the node takes. For example, in ``` main: "banana" ``` the node for `main` would have the...