Skip to content

iewnfod/caie-code-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

the CAIE Pseudocode Interpreter 2

简体中文 | English

The current version is in the early development stage, and there are a lot of missing functions and unknown errors. If you want to use it stably, please move to CAIE_Code.

Install

  1. Clone this repository
git clone https://github.com/iewnfod/caie-code-rs.git
  1. Enter the folder
cd caie-code-rs
  1. Compile and install binary
cargo install --path .

Usage

cpc [file_path] [options]

Options

Mnemonic Option Description
-h --help Show help message
-v --version Show version information
-d --debug Enable debug mode

License

MIT

Features & Roadmap

  • Basic Literal Types INT, REAL, STRING, BOOLEAN.
  • Array & Multi-Dimensional Array.
  • IF Statement.
  • FOR, WHILE, UNTIL loop.
  • FUNCTION and PROCEDURE.
  • INPUT and OUTPUT.
  • CALL and RETURN.
  • MATCH and CASE.
  • RECORD and POINTER.
  • CLASS for OOP.

Improvements in v2

  • A new Scope and Object Unified Model.
  • Fully implementation in Rust with a better performance and safer memory.
  • A new parser to fix syntax detection problems.
  • Better error detection and output.

Contribution

We welcome contributions from the community! Whether it's fixing bugs, improving documentation, or implementing new features from the CAIE syllabus.

AI-Generated Code Policy

While we recognize AI as a powerful productivity tool, we prioritize code quality and long-term maintainability:

  • Human-in-the-loop is mandatory: We do not accept "lazy" PRs consisting of raw, unverified AI outputs.
  • Responsibility: If you use AI to assist your coding, you are 100% responsible for explaining every line of your code during the review process.
  • Quality over Quantity: We value deep understanding of interpreter logic over rapid but shallow feature expansion.

How to Contribute

  1. Issue First: For major changes, please open an issue to discuss your design before implementation.
  2. Dev Branch: All pull requests should be directed to the dev branch.
  3. Review: Expect a rigorous code review. We might ask you to refactor or explain your implementation details to ensure it aligns with our Unified Object Model.
  4. Test: Test case about your implementation would be useful to make sure your codes can work properly without breaking existing function. Github Action will automatically run cargo test to run all test cases for each commit and PR.

Technologies Used

License

MPL-2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages