kjosib / booze-tools

Booze Tools will become the complete programming-language development workbench, all written in Python 3.9 (for now).
MIT License
14 stars 1 forks source link

Allow to compile only-a-grammar or only-a-scanner. #9

Closed kjosib closed 5 years ago

kjosib commented 5 years ago

Presently the MacroParse compiler expects both a scanner definition and a parser definition. In small example documents, only one or the other may appear. This should result in an automaton object that simply lacks an entry for either scanner or parser, as is the case with the given definition file.

kjosib commented 5 years ago

Rather than no entry, the entry is null in JSON. At the moment, it's possible to compile a file with neither, and get a very small automaton.