Skip to content

unique-ones/lox-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview:

Lox is a versatile programming language inspired by other scripting languages, with a focus on readability and expressiveness. It supports features like first-class functions, closures, and dynamic typing, making it suitable for a wide range of applications.

Implementation in Java:

The initial implementation of Lox is done in Java, taking advantage of the platform's robust object-oriented features and extensive libraries. The Java implementation serves as a reference and a starting point for understanding the core concepts of the Lox language. Key Features:

  • Interpreter: The Java implementation includes an interpreter for executing Lox code. This interpreter is designed to parse, evaluate, and execute Lox programs seamlessly.
  • Object-Oriented Design: Leveraging Java's object-oriented paradigm, the codebase emphasizes modular design, making it easy to extend and maintain.
  • Test Suite: A comprehensive set of test cases is included to ensure the correctness and reliability of the Java implementation. Continuous integration is set up to run these tests automatically.

Implementation in C:

Building on the foundation laid in Java, this repository aims to provide a second implementation of the Lox language in C. The transition to C introduces low-level memory management and adds another layer of understanding of language implementation. Key Goals:

  • Performance: The C implementation focuses on optimizing the interpreter for improved performance, showcasing the efficiency gains possible with a lower-level language.
  • Portability: By implementing Lox in C, we aim to create a version that can be easily ported to different platforms, showcasing the language's versatility.
  • Learning Experience: The C implementation serves as an educational resource for understanding the intricacies of language design, compilation, and runtime systems.

Simple chart how it works

phases

About

Simple Lox Interpreter once written in C and Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published