Skip to content

bigjr-mkkong/mikal-eval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mikal-eval

A simple scheme evaluator for fun

How to Build & Run

Clone the repo, then

make run To build and run the evaluator

Plan

  • Internal type system(mikal)
  • Frontend parser & AST
  • Basic REPL
  • Environment model
  • + - * / (Maybe or and not in future?)
  • Lambda and closure
  • cons/car/cdr
  • GC
  • def/let/set
  • quotation(quote and eval)
  • TCO
  • if
  • Read from file (This should be easy :)) Done by using pipe
  • remainder
  • assert
  • Comments

"Deferred operations"

  1. TCO is kinda urgent, gc buffer will be quickly overflowed without TCO
  2. Error handling & report
  3. Type system is not fully closed
  4. Proper testbench and tests
  5. Comments on some confusing functions

How to run tests

You can also tests by using make tests.

All the test answers are generated by CHICKEN Scheme Interpreter. You can generate your own test cases if you have that installed

Instructins to generate new tests:

  1. Implement test program(single file) under tests/ directory
  2. Run python testall.py --gen-ans --ans-test to generate ans files and run test script
  3. You can also use -csi-test to directly compare stdout with CSI without generate anything

Supported basic operations:

  • + - * / remainder
  • lambda
  • cons car cdr
  • define set! let
  • = < >
  • if
  • assert

About

A simple scheme evaluator from scratch

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published