Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sonota88/vm2gol-v2-python

simple toy compiler
https://github.com/sonota88/vm2gol-v2-python

compiler python

Last synced: about 1 month ago
JSON representation

simple toy compiler

Awesome Lists containing this project

README

        

This is a port of the compiler part of [vm2gol-v2 (Ruby version)](https://github.com/sonota88/vm2gol-v2).

素朴な自作言語のコンパイラをPythonに移植した
https://memo88.hatenablog.com/entry/2020/08/19/065056

```sh
$ LANG=C wc -l mrcl_{lexer,parser,codegen}.py lib/common.py
75 mrcl_lexer.py
304 mrcl_parser.py
327 mrcl_codegen.py
44 lib/common.py
750 total

$ cat mrcl_{lexer,parser,codegen}.py lib/common.py | grep -v '^ *#' | wc -l
743
```

```
$ python3 -V
Python 3.10.6
```

```
git clone --recursive https://github.com/sonota88/vm2gol-v2-python.git
cd vm2gol-v2-python

./docker.sh build

./test.sh all
```

# Compile and run game of life

```
./run_game_of_life.sh
```