Skip to content

research repo (learning how to build an interpreter)

Notifications You must be signed in to change notification settings

sijirama/interpreters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

i don't know how to build a programming language

Programming Language Development Plan

Phase 1: July - September 2024 (Research and Learning)

July: Introduction and Basics

Week 1-2

  • Reading and Tutorials:
    • "Crafting Interpreters" by Bob Nystrom (start with the basics).
    • "Writing An Interpreter In Go" by Thorsten Ball (concepts applicable in C++).
  • Hands-On:
    • Build a simple REPL (Read-Eval-Print Loop) for basic arithmetic expressions.

Week 3-4

  • Lexer Implementation:
    • Tokenize simple source code into basic tokens (identifiers, numbers, operators).
  • AST and Parsing:
    • Build a basic parser to convert tokens into an AST.

August: Intermediate Concepts

Week 1-2

  • Parsing Techniques:
    • Study recursive descent and other parsing techniques.
    • Enhance your parser to handle more complex expressions and statements.

Week 3-4

  • Semantic Analysis:
    • Implement a symbol table to track variable declarations and scopes.
    • Add semantic checks to your parser to validate code correctness.

September: Advanced Topics and Optimization

Week 1-2

  • Memory Management:
    • Study different memory management techniques.
    • Implement a simple mark-and-sweep garbage collector in a prototype.

Week 3-4

  • Interpreter Optimizations:
    • Learn about optimizations like constant folding, inlining, and dead code elimination.
    • Implement a simple VM or bytecode interpreter and optimize it.

Phase 2: October 2024 - March 2025 (Main Language Development)

October - December 2024: Language Design and Initial Implementation

October

  • Design Finalization:
    • Finalize syntax and feature set.
    • Set up project structure and repository.
  • Lexer and Parser Implementation:
    • Write lexer and parser for your language.
    • Implement AST and basic semantic checks.

November

  • Parser and Interpreter:
    • Implement the AST and semantic analysis.
    • Start working on the interpreter.

December

  • Runtime and Testing:
    • Implement basic runtime environment and standard library functions.
    • Begin testing and refining the interpreter.

January - March 2025: Advanced Features and Optimization

January

  • Advanced Features:
    • Implement functions, loops, and conditionals.
    • Add error handling and debugging support.

February

  • Optimization:
    • Focus on performance optimizations.
    • Add more standard library functions and utilities.

March

  • Testing and Documentation:
    • Conduct thorough testing and debugging.
    • Prepare documentation and tutorials for your language.
    • Engage with the community for feedback and initial user testing.

About

research repo (learning how to build an interpreter)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published