gal4 — what comes next
gal3 translates in one direction: down, from gal to a target language. gal4 is the next release, and it is about going the other ways too. It is in development and has no release date.
three directions
| direction | what it does | where it stands |
|---|---|---|
| down | gal is lowered step by step into Python, JavaScript, Go, Java, C++ or MUMPS. | gal3, released |
| in | A program written in another language is read into a dialect of gal that mirrors that language. | Python, experimental in gal3; the rest in gal4 |
| up | Low-level gal is lifted into higher-level, more abstract gal, according to how its pieces are used. | gal4 |
The three are meant to compose: a program read in from one language can be lifted into something more abstract, and from there brought back down into any target.
the part you can try today
gal3 already ships a first step in the in direction: it can read Python. It is experimental — it handles a useful subset, not all of Python — and it is the working example of what gal4 is for. The pieces are in the gal3 repository:
| part | what it does |
|---|---|
peg | turns a grammar file into a parser written in gal |
pylex, pyparse | tokenize and parse Python 3.11 source |
pygen | writes the parsed program back out as normalized Python |
pygal | translates the parsed Python into gal |
Finishing Python ingest is gal4 work.
when
There are no dates. gal3 is the language to use now; gal4 will be published when it is ready.