https://github.com/satyajitghana/projektbarium
ProjektBarium - a compiler for my programming language barium
https://github.com/satyajitghana/projektbarium
barium bison compiler compiler-design compiler-frontend conan flex llvm llvm-ir mini programming-language-barium projekt statements yacc
Last synced: 2 months ago
JSON representation
ProjektBarium - a compiler for my programming language barium
- Host: GitHub
- URL: https://github.com/satyajitghana/projektbarium
- Owner: satyajitghana
- License: mit
- Created: 2020-01-02T16:23:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-09T16:11:20.000Z (about 5 years ago)
- Last Synced: 2024-12-26T20:29:11.682Z (4 months ago)
- Topics: barium, bison, compiler, compiler-design, compiler-frontend, conan, flex, llvm, llvm-ir, mini, programming-language-barium, projekt, statements, yacc
- Language: C++
- Size: 8.09 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Projekt Barium - A Basic Compiler for Barium Programming Language
This is the compiler i built for my programming lanugage barium, a fun little project to understand compilers.
Tech Stack : Flex, Bison, LLVM
## Build Status

## Status






## The Compiler Recipe
Lexical Analyzer (Lex) -> Semantic Parsing (Bison) -> Assembly (LLVM) -> Executable
### Task List
- [X] Add Data Types (decimal, fraction)
- [X] Operators, Symbols, Reserved Keywords
- [X] Add Looping Statements - ongoing (parse done)
- [X] Add Control Statements - ongoing (parse done)
- [X] Add Output Statements - uses vprintf
- [ ] Add Input Statements
- [X] Add Arrays Support - ongoing (parse done)
- [X] Create a CI/CD Pipeline
- [X] Output executables instead of obj files (partial support)
- [X] locations (YYLTYPE, and @$)### Far-fetched task list
- [ ] Make it a Library
- [ ] Add Boost Math Support
- [ ] Containerize the Compiler using Docker## Dependencies
- LLVM 9.0.1
- Bison 3.5.2
- Flex 2.6.4## Known Issues
- Spacing is required between operators to remove ambiguity
## Build Barium (Installs Deps)
```shell
$ sudo sh build.sh
```## Run Tests
```shell
$ sh run_tests.sh
```## Example Run
Normal Run
```shell
$ ./barium test_files/test_all_ir.bar -v OFF
```Debug Verbose Run
```shell
$ ./barium test_files/test_all_ir.bar -v INFO
```## Screenshot

## Compiler Recipe

## Example AST
Run
AST
