From aeff4d2720c25578bae91f9afe6579c1b4972cd9 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 13 Oct 2026 09:04:00 +0000 Subject: docs: simplify compiler README Co-Authored-By: Claude Fable 5.1 --- README.md | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 03b90c3..0d536a1 100644 --- a/README.md +++ b/README.md @@ -6,38 +6,27 @@ A compiler for CIE Pseudocode (A Level 9618 Computer Science) Details can be found here: [Pseudocode Guide for Teachers](https://www.cambridgeinternational.org/Images/697401-2026-pseudocode-guide-for-teachers.pdf) -IDK WHAT HAPPENDED IT IS 100% AI-GENERATED DO NOT OPEN ANY ISSUES JUST CLONE AND FIX IT - ## Features -- use LLVM, perhaps support all archs -- built-in runtime checking to prevent illegal operations (eg. array, integer division), and prevent kernal to kill the program immediately -- no Segmentation Fault (Core Dumped), beginner-friendly -- array flatting with row-major (the standard of the industry), with `LowerBounds`, `UpperBounds`, etc. support any dimension with any lower/upper bounds -- cache-friendly array (perhaps) -- dynamic string handling, with full implementation of all CIE string functions, with high security -- native support for BYREF/BYVAL using pointers -- text file handling (OPENFILE/READFILE/WRITEFILE/CLOSEFILE/EOF) with runtime misuse - checking (wrong mode, not open, read past EOF, ... all die with a clean `[Fatal]` - message instead of corrupting anything) -- user-defined types (CIE §4): enumerated types (with runtime range checking on - `enum ± INTEGER`), pointers (`^x` / `p^`, strict nominal typing, null-deref dies - with `[Fatal]` instead of segfaulting — linked lists work, `TYPE NodePtr = ^Node` - may forward-reference), records (nested, arrays of records, `Form[i].Field <- x`) -- whole arrays and records as FUNCTION/PROCEDURE parameters (`ARRAY OF T` or - `ARRAY[l:u,...] OF T` as a checked contract; BYVAL really copies), with the - spec-correct sticky BYREF/BYVAL and BYREF-is-procedure-only rules from §8.3 -- ultra-fast compiling & executing +- **LLVM compilation**: Generate LLVM IR and run programs when execution is enabled in the build. +- **Runtime checks**: Report array bounds errors, division by zero, file misuse, enum range errors and null pointer dereferences. +- **Arrays**: Support multiple dimensions and custom lower and upper bounds. +- **Strings**: Support dynamic strings and built-in string functions. +- **Functions and procedures**: Pass values, arrays and records by value; procedures also support `BYREF` parameters. +- **Text files**: Support `OPENFILE`, `READFILE`, `WRITEFILE`, `CLOSEFILE` and `EOF`. +- **User-defined types**: Support enumerated types, pointers and nested records. ## TODO -- search for `TODO` in my code -- random files (OPENFILE FOR RANDOM / SEEK / GETRECORD / PUTRECORD) — `type` is done, unblocked -- SET types (`SET` / `DEFINE` are reserved and give a clear "not implemented" error) -- CASE OF, CONSTANT, DATE +- **Source TODOs**: Resolve remaining `TODO` comments. +- **Random files**: Add `OPENFILE FOR RANDOM`, `SEEK`, `GETRECORD` and `PUTRECORD`. +- **Set types**: Implement `SET` and `DEFINE`. +- **Other syntax**: Add `CASE OF`, `CONSTANT` and `DATE`. # Note +IDK WHAT HAPPENDED IT IS 100% AI-GENERATED DO NOT OPEN ANY ISSUES JUST CLONE AND FIX IT + DO NOT OPEN ANY ISSUES IF YOU COMPILE WITH VISUAL STUDIO OR ANYTHING EXCEPT MINGW-W64 (EVEN WITH MINGW-W64, WINDOWS IS LIKELY TO BE A PROBLEM MAKER) ONLY TESTED ON DEBIAN (AND A BIT MINGW-W64) -- cgit v1.3.1-4-g156e