aboutsummaryrefslogtreecommitdiff
path: root/compiler/compiler.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add validation of lexical specs and improve error messagesRyo Nihei2021-04-171-2/+8
|
* Add logging to compile commandRyo Nihei2021-04-081-9/+71
| | | | | compile command writes logs out to the maleeni-compile.log file. When you use compiler.Compile(), you can choose whether the lexer writes logs or not.
* Add types of lexical specificationsRyo Nihei2021-02-161-3/+23
| | | | APIs of compiler and driver packages use these types. Because CompiledLexSpec struct a lexer takes has kind names of lexical specification entries, the lexer sets them to tokens.
* Add compilerRyo Nihei2021-02-141-0/+9
The compiler takes a lexical specification expressed by regular expressions and generates a DFA accepting the tokens. Operators that you can use in the regular expressions are concatenation, alternation, repeat, and grouping.