Skip to content
/ mila Public

The Mila compiler for the BI-PJP class on FIT CTU

Notifications You must be signed in to change notification settings

Bertik23/mila

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semestral Work

A Pascal like expression driven language

Semestral work structure

  • main.rs - main function
  • tokenizer.rs - Tokenization (lexical analysis) related sources
  • parser.rs - parser of the token stream provided by the tokenizer
  • test.rs - some tests
  • stdlib.c - "standard library" for mila (suplies IO functions and some more)
  • samples - directory with samples describing syntax and some custom ones
  • mila - wrapper script for your compiler

Dependencies

  • llvm 17
  • cargo

How to run

cargo build --release

./mila [INPUT_FILE] [OUTPUT_FILE]

Implemented features

  • Base implementation
  • Number literals in decimal, octal and hexadecimal base
  • If and while loop with break
  • For (to and downto) with break
  • Nested blocks
  • Functions, procedures local variables, exit
  • Function parameters
  • Recursion
  • Indirect recursion

About

The Mila compiler for the BI-PJP class on FIT CTU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages