Skip to content

trodicaro/rust_compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cobbling an Interpreter, June 24-28, 2024

Goal: Implement an interpreter in Rust from the first part of Crafting Interpreters Rust Programming Language

A few tutorials:

Topics to Focus On

The focus of the week is on the somewhat narrow problem of implementing the Lox interpreter from Crafting Interpreters. As such, it's definitely NOT necessary to know all of Rust. However, the following topics might serve as a guide when reviewing some Rust basics:

  • Text and string manipulation. We'll need to write a scanner and parser.

  • Recursion. Maybe of the algorithms and data structures used in implementing an interpreter involve recursion.

  • Trees. We'll need to represent an abstract syntax tree (AST) and perform various tasks while traversing the tree.

  • Pattern matching. We'll need to write a lot of code involving pattern matching over AST tree nodes.

  • Environments. An interpreter typically involves a mutable runtime environment of variables (stack frames, etc.) that gets built using hash-maps or trees of some kind.

About

Rust exploration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages