Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khrynczenko/rbm
https://github.com/khrynczenko/rbm
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/khrynczenko/rbm
- Owner: khrynczenko
- Created: 2019-10-09T21:25:41.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-06T21:48:02.000Z (over 2 years ago)
- Last Synced: 2023-03-06T18:46:55.534Z (over 1 year ago)
- Language: Rust
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rbm
`rbm` is a WIP compiler for the B-Minor language. It contains hand written
lexer and recursive descent parser. In the grammar.md file one can find
the grammar used by the `rbm`.`rbm` is a project of mine that I used to learn about both compiler construction
and rust language. It is not something you should use professionally.## What is B-Minor
B-Minor is a C like language. It was introduced in the "Introduction to
Compilers and Language Design" by Douglas Thain. You can think of it as less
capable C. That means it doesn't have pointers, structures or unions. B-Minor
is statically and strongly typed language. You can find more infromation about
it in [the book](https://www3.nd.edu/~dthain/compilerbook/).## Running rbm
To perform lexical analysis on some source file run
```text
rbm lex
```To perform syntactic analysis and obtain AST as a result run
```text
rbm parse
```For more details run
```text
> rbm --help
```## WIP
`rbm` is work-in-progress. Current state is as follows:
- [x] lexical analysis
- [x] syntactic analysis
- [x] AST generation
- [ ] semantic analysis
- [ ] optimization
- [ ] code generation