Skip to content

hectellian/formula-inter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is Formula-Inter

A very simple Interpreter made in Rust that understand this grammar

SCRIPT → LISTINSTR

LISTINSTR → INSTR LISTINSTR

LISTINSTR → ε

INSTR → id = PD_AFF ;

PD_AFF → E

PD_AFF → inv E

PD_AFF → sqrt E

INSTR → loop E { LISTINSTR }

INSTR → afficher E ;

INSTR → aff_ral ; (commentaire : affiche un retour à la ligne)

E → T D

D → + E

D → ε

T → F G

G → * T

G → ε

F → ( E )

F → nb

F → id

How To Use

Clone this repository:

git clone https://github.com/hectellian/formula-inter

Compile the binary file

cargo build --release

Then, in the command line juste type:

./target/release/formula-inter <file.fi>

Or (if you already have the binary file)

./formula-inter <file.fi>

About

Interpreter for a specific grammar for the compilation course

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages