Skip to content

adarsh-why/Super-Tiny-Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

Super-Tiny-Compiler

A Super Tiny compiler written based on the same by James kyle at https://github.com/thejameskyle/the-super-tiny-compiler

Try following input in terminal after running compiler.rb

(add 3 (subtract 4 6))

(add 3 (subtract 4 (add 7 8)))

(add (subtract 5 7) (add 19 34) )

(add (add 2 3) (subtract 6 (add 9 2) ) )

Add following statements inside run_compiler function to print tokens and AST

puts "#{input}" --- Prints Input

puts "#{@tokens}" --- Prints tokenized input

puts "#{parser}" --- Prints Abstract Syntax Tree

About

A Super Tiny compiler written based on the same by James kyle at https://github.com/thejameskyle/the-super-tiny-compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages