Skip to content

davidtwilcox/cloxplus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloxplus

C++ implementation of the Lox programming language
Explore the docs »

Report Bug · Request Feature

Table of Contents

About The Project

A C++ implementation of the Lox programming language. This is an interpretation of the C implementation of clox in Section III of Bob Nystrom's site Crafting Interpreters.

As the project grows, a standard library and new language features will be added. Expect this implementation to deviate from the original Lox specification in the future.

Built With

Getting Started

To get a local copy up and running follow these simple steps. The instructions assume you are on a Linux or Unix-like system. I can verify this will work on macOS as well.

Prerequisites

Cloxplus requires the {fmt} and Catch2 libraries to be installed and able to be found by cmake.

  • {fmt} - Download and unzip the library first. You can follow the latest instructions or try:
$ cd fmt-7.0.3  # Change to the library directory
$ mkdir build
$ cd build
$ cmake ..
$ make
$ make test
$ sudo make install
$ git clone https://github.com/catchorg/Catch2.git
$ cd Catch2
$ cmake -Bbuild -H. -DBUILD_TESTING=OFF
$ sudo cmake --build build/ --target install

Installation

  1. Clone the repo
git clone https://github.com/bigangryguy/cloxplus.git
  1. Install prerequisites (see above)
  2. Create your build files (run these commands in the cloxplus root directory)
$ cmake -DCMAKE_BUILD_TYPE=Debug -G "YOUR_PREFERRED_IDE" PATH_TO_SOURCE

Usage

For now, reference the Lox grammar appendix on the Crafting Interpreters site. In the future, as cloxplus adds new features and forks from the original language specification, a full grammar reference will be included here.

Roadmap

See the open issues for a list of proposed features (and known issues).

  • Complete the virtual machine
  • Implement the language

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

David Wilcox - @davidtwilcox - [email protected]

Project Link: https://github.com/bigangryguy/cloxplus

Acknowledgements

Releases

No releases published

Packages

No packages published