A tokenizer and parser for the language Earl. The syntax of Earl resembles
the syntax of Lisp or S-expressions. The main difference is that Earl does
not define ordered pairs, i.e.
(x . y), but only lists, e.g. the empty
(x y z). The design of multiline strings and nesting multiline
comments is possibly unorthodox.
A parse node list is a list of parse nodes.
Error information returned to the user if there's a problem tokenizing or parsing the input.
A token in Earl contains where it appears in the code and its type or ID.
Error codes we might receive when tokenizing and parsing.
A parse node is either a token or a list of parse nodes.
Any kind of error that can pop up while tokenizing and parsing.
Token IDs or token types.
Parses the code and returns a result of parse trees or a parsing error.
Returns a tokenization result.