Skip to content

Nevelito/SnMsLang_Jfik

Repository files navigation

SnMsLang Compiler

This project implements a simple compiler for the SnMsLang language using ANTLR and LLVM.

Files

  • ast_builder.py: Responsible for parsing SnMsLang code and building the AST.
  • ir_generator.py: Converts AST into LLVM IR.
  • SnMsLang.g4: ANTLR grammar file for SnMsLang language.

Setup

  1. Install dependencies: pip install -r requirements.txt
  2. Generate the lexer and parser from the ANTLR grammar: java -jar antlr-4.9.3-complete.jar -Dlanguage=Python3 grammar/SnMsLang.g4 ** correct version! **

Running the Compiler

To run the compiler:

  • python3 main.py <test_etap?>/<file_with_code>
  • ./llc_to_exe.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •