Skip to content

sheikhartin/bytecode-based-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bytecode Based Calculator

GitHub repo status GitHub license GitHub contributors GitHub tag (latest by date) GitHub repo size

This project aims to calculate mathematical expressions after converting them to bytecode!

Using the REPL

The REPL supports several flags that modify its behavior:

  • -l: Display the output of the lexer, which shows the tokenized version of the input.
  • -p: Display the output of the parser, which shows the parsed structure of the input.
  • -g: Display the generated bytecode for the input expression.

You can use these flags individually or in combination to see the different stages of interpretation. For example:

go run cmd/main.go -l -p -g

This command will display the lexer output, parser output, and generated bytecode before executing the expression.

License

This project is licensed under the MIT license found in the LICENSE file in the root directory of this repository.

About

An interpreter just to execute mathematical expressions that are in the form of bytecode!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages