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

Disentangle syntax from semantics of the MacroParse input language #31

Closed kjosib closed 4 years ago

kjosib commented 4 years ago

Right now, MacroParse language definition documents are treated to a janky ad-hoc analysis based on string manipulations. That's rather horrible in light of what this package is all about, don't you think? It seems to me that a much more respectable approach would be to take full advantage of MiniScan and MiniParse to generate a complete AST and then walk said AST (using appropriately-defined visitor objects) in order to generate the structures that will ultimately feed the table generators.

This approach should mean the MacroParse compiler can "eat its own dog-food" by relying on the provided frameworks for error reporting, etc. It should also make it easier to add or change features.

kjosib commented 4 years ago

If it ain't broke, don't fix it. And right now, it ain't broke.