I implemented the parser manually since I couldn't get pypeg2 to emit
useful error messages (I confess to be a bit proud of my multi-level
color-coded reporting).
The DSL isn't complete yet. Explicit dependencies and nested rules are
still missing, as are most column types. But it's enough to create and
populate some tables from a real-world project, so I consider it to have
reached to MVP stage.
The prototype can create tables and their columns and insert data,
including data from existing tables. This is sufficient for a small demo
from a real-world project.
The demo uses all of the above capabilities. It also deliberately
includes rules in arbitrary order to demonstrate dependency resolution.
We don't have a DSL yet, so all the nodes/rules/requirements (need to
decide on a catchy name) are instantiated directly in the source code
by calling their constructors. This is overly verbose but gives a first
impression on what a ruleset might look like.