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

Scan-Action Improvements: Generic and Compound Actions #41

Open kjosib opened 3 years ago

kjosib commented 3 years ago

In practice, most scan-rule actions are small combinations of a very few basic ideas:

Now suppose the internal structure of scanner rules were changed to allow sequences of generic actions, appropriately parameterized. Then in concept, more of the character of a language is expressible directly in terms of what you can put in the definition document. Features you don't use in a given rule "optimize to nothing". It facilitates support for embedding one language within another. It may also shrink the bootstrap code.