Support real-world occam syntax for course module transpilation#26
Merged
associate-1 merged 2 commits intomainfrom Feb 19, 2026
Merged
Support real-world occam syntax for course module transpilation#26associate-1 merged 2 commits intomainfrom
associate-1 merged 2 commits intomainfrom
Conversation
Parser: - Shared-type parameters (CHAN INT in?, out! — re-use type after comma) - Multi-line parameter lists (lexer suppresses INDENT/DEDENT/NEWLINE inside parens) - RESULT qualifier in parameters (maps to pointer like non-VAL) - Fixed-size array parameters [n]TYPE with ArraySize field - VAL []TYPE open array abbreviations - [arr FOR n] shorthand slices (defaults start to 0) - MINUS keyword as prefix unary operator - Multi-statement VALOF bodies Codegen: - goIdent() replaces dots with underscores in all identifiers - String→[]byte auto-wrapping for []BYTE params - Package-level var declarations for top-level abbreviations - Ref param auto-dereferencing in expressions and receives - Unique _ifmatched flag names per IF block - Unused variable suppression with _ = varname Preprocessor: - Include-once tracking to prevent duplicate definitions The course module (excluding float_io.occ) now transpiles with zero parse errors and the Go output passes go vet cleanly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document new parser/codegen/preprocessor features added for course module support, add course module testing instructions, and list Phase 2 items (RETYPES, transputer intrinsics) in Not Yet Implemented. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dboreham
approved these changes
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[n]TYPE,VAL []TYPEabbreviations,[arr FOR n]shorthand slices, MINUS keyword as prefix, and multi-statement VALOF bodies[]byteauto-wrapping, package-level abbreviations, ref param auto-dereferencing, unique_ifmatchednames, unused variable suppressionfloat_io.occ) now transpiles with zero parse errors and passesgo vetTest plan
go test ./...)course_nofloat.moduletranspiles with zero parse errorsgo vet🤖 Generated with Claude Code