Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sonota88/mini-ruccola-csharp
simple toy compiler
https://github.com/sonota88/mini-ruccola-csharp
compiler csharp
Last synced: 1 day ago
JSON representation
simple toy compiler
- Host: GitHub
- URL: https://github.com/sonota88/mini-ruccola-csharp
- Owner: sonota88
- License: mit
- Created: 2023-07-02T00:06:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-31T07:03:08.000Z (12 months ago)
- Last Synced: 2023-12-31T08:19:45.768Z (12 months ago)
- Topics: compiler, csharp
- Language: C#
- Homepage:
- Size: 29.3 KB
- Stars: 1
- Watchers: 1
- 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).
C#で簡単な自作言語のコンパイラを書いた
https://qiita.com/sonota88/items/c0a5bf76d7eb3aa4c507```
$ mcs -help | grep VERSION
-sdk:VERSION Specifies SDK version of referenced assemblies
VERSION can be one of: 2, 4, 4.5 (default) or a custom value
``````
git clone --recursive https://github.com/sonota88/mini-ruccola-csharp.git
cd mini-ruccola-csharp./docker.sh build
./test.sh all
``````
$ LANG=C wc -l src/*.cs src/lib/{Types,Utils}.cs
422 src/CodeGenerator.cs
28 src/Compiler.cs
73 src/Lexer.cs
430 src/Parser.cs
242 src/lib/Types.cs
66 src/lib/Utils.cs
1261 total$ cat src/*.cs src/lib/{Types,Utils}.cs | grep -v '^ *//' | wc -l
1256$ wc -l src/lib/Json.cs
106 src/lib/Json.cs
```