Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/sonota88/vm2gol-v2-python
- Owner: sonota88
- License: mit
- Created: 2020-08-18T21:34:38.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-30T02:56:13.000Z (about 2 months ago)
- Last Synced: 2024-11-30T03:27:54.117Z (about 2 months ago)
- Topics: compiler, python
- Language: Python
- Homepage:
- Size: 145 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```