Caution
After a year away from this project, I am returning with renewed enthusiasm and fresh inspiration. I will be reviewing and updating the archived files to align with new syntax and design choices. The original archived files will be preserved, and a new folder will be created for the updated versions. Please note that no additional functionality will be added until I have caught up with the current progress.
Potato Chip, also known as PotatoC or Potato Programming Language, is inspired by the code structure of C and the syntax of Python. While the core syntax remains familiar, Potato Chip introduces the thematic twist of potato puns.
Development Phases:
- Reader to Scanner: Minor adjustments are made to adapt the syntax of PotatoC from the C language.
- Scanner to Parser: Similar incremental changes are implemented to refine the parsing process.
- Parser to Compiler: Initially, the changes from parser to compiler are minimal, but the goal is to evolve the compiler into a sophisticated tool capable of translating the complete PotatoC language. This evolution will be a gradual process, with complexity increasing over time.
Version Management:
- As new features and improvements are added, they will be incorporated into the compiler code.
- Previous versions of the compiler, including PotatoXScanner.cpp, PotatoXParser.cpp, and PotatoXCompiler.cpp, will remain in the repository under the "Previous_Versions" folder for reference and historical purposes.
Documentation:
- For a detailed understanding of the compiler’s logic and the latest updates, please refer to the attached wiki. The wiki provides explanations of recent additions and functions introduced in the source code.
- Potato.h: This header file contains the core definitions and declarations for our project. It includes the Reader and Lister classes and evolves alongside the compiler.
- PotatoCompiler.cpp: This source file serves as the primary implementation for the project. It is updated with each addition of new features and functions to Potato Chip.
- PotatoCompiler.exe: This executable represents the current version of the Potato Chip Compiler. It is created by compiling PotatoCompiler.cpp together with Potato.h.
- Specify unnamed literal constants with data types integer, boolean, and string.
- Name program variables and modules with identifiers.
- Define scalar variables for data types integer and boolean.
- Define 1-dimensional array variables for data types integer and boolean.
- Express computation using expression syntax with a collection of unary and binary operators for integer and boolean operands.
- Specify an assignment statement.
- Specify structured flow-of-control statements, including:
- If-statement
- Bounded-loop-statement
- Unbounded pretest and/or posttest-loop-statement.
- Define the main program module.
- Specify assertions.
- Include comments.
- Define directly-recursive procedure subprogram modules with IN, OUT, IO parameters.
- Specify a call-procedure-module statement with parameter passing.
- Specify a return-from-procedure-module statement.
- Define directly-recursive, pure function subprogram modules with IN parameters.
- Specify reference-to-function-module syntax as part of an expression with parameter passing.
- Specify a return-from-function-module statement.
- Specify an input-statement for console text input.
- Specify an output-statement for console formatted-text output.