Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/sonota88/mini-ruccola-scala

simple toy compiler
https://github.com/sonota88/mini-ruccola-scala

compiler scala

Last synced: 1 day ago
JSON representation

simple toy compiler

Awesome Lists containing this project

README

        

Scala port of [Mini Ruccola (vm2gol-v2)](https://github.com/sonota88/vm2gol-v2) compiler

Scalaでシンプルな自作言語のコンパイラを書いた
https://memo88.hatenablog.com/entry/mini-ruccola-compiler-scala

---

Scala version: see build.sbt

```
git clone --recursive https://github.com/sonota88/mini-ruccola-scala.git
cd mini-ruccola-scala

./docker.sh build
./test.sh all
```

```
(
cd src/main/scala/mini_ruccola
LANG=C wc -l *.scala lib/*.scala
)

358 CodeGenerator.scala
67 Lexer.scala
25 Main.scala
302 Parser.scala
92 lib/Json.scala
40 lib/Node.scala
62 lib/Token.scala
16 lib/Utils.scala
962 total

(
cd src/main/scala/mini_ruccola
LANG=C wc -l {Lexer,Parser,CodeGenerator}.scala lib/{Node,Token}.scala
)

67 Lexer.scala
302 Parser.scala
358 CodeGenerator.scala
40 lib/Node.scala
62 lib/Token.scala
829 total
```