Meego
A miniature bootstrapped Golang to vanilla C++ transpiler
Install / Use
/learn @aniketp/MeegoREADME
meego
A miniature bootstrapped Golang to 'Vanilla' C++ transpiler.
Lexer/Parser generated using gocc, following the stand-alone DFA which recognizes grammer for a regular language in BNF (Backus Naur Form).
- Install meego and gocc
$ go get github.com/aniketp/meego
$ go get github.com/goccmack/gocc (make deps)
- Generate Lexer and Parser
$ cd src; gocc lang.bnf (make run)
- Run tests
$ cd test; go test -v (make test)
- Compile a simple program
$ go run main.go input/example.meego
5
Requiescat in pace, Ezio!
This project is my attempt to learn about Compiler Design, and was done in a short duration following this medium article, including my own variations on the top. As a result, the grammer is a tiny subset of Golang (with a mix of Typescript syntax).
To avoid the complexity of Intermediate Language generation and optimization, I switched the Target Language to a simple subset of C++11.
References
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
347.2kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
