Skip to content

swgoodman/anything_to_js_compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"Anything to JS" Compiler 📬

An investigation into the underlying components of compilation. This implementation would likely be considered "source to source" compilation, as it is best prepared to translate two high level languages. This was built in Ruby with comprehension and readability in mind, not performance.

Generally, the steps of a compiler can be broken down into:

  • Lexical Analysis (Tokenization): "Identify components (tokens) of given code"
  • Parsing: "Transform token stream into a tree structure representing token relations"
  • Generation: "Generate the desired code"

Real compilers will feature additional subtasks and speed optimizations, such as "preprocessing" and "dead code elimination".

About

Foundations of a transcompiler

Topics

Resources

License

Stars

Watchers

Forks

Languages