Context-free grammar tools for ATS.
grm
: a typeful in-memory context-free grammar representationgrmfuncs
: efficient implementations ofFIRST
/FOLLOW
-set computation for a given grammarutils/ltab
: compact lookup hash tableutils/fundigraph
: directed graph representation with strongly-connected components and efficient reflexive, transitive closure algorithms
TODO
The whole thing doesn't build yet, but the tests do. Please see the
src/TEST
subdirectory.
- refactoring: make
grm
use the newsymbol
data type (already exists in a separate module) - implement code for doing constructions of automata (LR0, LR1, LALR1, LL1, etc.)
- implement lexers/parsers for various inputs to
grm
(JSON format, something with yacc/lex compat, etc.) - implement different "plug-in" modules for outputting automata (as JSON/XML, as executable code -- ATS code, etc.)
- compile to WebAssembly, make it available on a webpage ("enter your grammar here, have it converted to whatever you want!")