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
parse scanner scanners

What is this?

Parser/Scanner generator and run-time, all in Python. Plus various other handy btis and bobs.

Why is it cool?

Getting Started:

Install

D:\>  pip install booze-tools

Learn

Look in the examples for documentation by example.

Full documentation is moving from the wiki page over to ReadTheDocs. But it's been a very slow process.

Run

Translate a definition; generate .automaton file:

D:\> py -m boozetools my_grammar.md

Get a full run-down of the command-line options:

D:\> py -m boozetools -h

What's New?

What's Here?

For now there are four major components. Eventually there will be more. These are:

The "minimal-LR(1)" algorithm used here is meant to create a constructively minimal number of parser states while respecting precedence and associativity declarations in the usual way. That means it can split states but does not (yet) attempt to merge them again afterwards. It is strongly inspired by the IELR(1) algorithm, but it is NOT exactly that algorithm. As far as I can tell it is a new contribution. As such, I would appreciate feedback respecting your results with it.

Priorities?

What Else?

There are unit tests. They're not vast and imposing, but they exercise the interface both directly and via the example code.

Bibliography:

I'll add links as I track them down.

Oh by the way..

I'm NOT a crack-pot. Really I'm not.