Another meta-compiler
Python Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
Makefile
README.md
aexp-example.txt
aexp-grammar.txt
aexp-runtime-header.py
aexp-runtime-trailer.py
combiner
metaphor-compiler.py
metaphor-grammar.txt
metaphor-runtime-header.py
metaphor-runtime-trailer.py
test-example.txt
test-grammar.txt

README.md

Metaphor

This follows on from experiments with Meta-II, which you can find in another repository on GitHub. Metaphor implements some of the ideas that I discussed in my blog post Meta-II: An Early Meta-Compiler. I haven't yet implemented left-recursive grammar rules, but grammar matches can now be captured in named variables, so you can produce output which looks as though it was parsed by a left-recursive rule. (For example, see test-grammar.txt and test-example.txt. I got this idea from TreeMeta, which lets you do the same thing, but with a more awkward mechanism.)

This is possibly the world's worst README file, because I don't have time right now to write nice documentation which explains things properly. Sorry about that. If you want to use this but are puzzled by something, drop me a line.