Hypercode Syntax Specification#5
Merged
Merged
Conversation
links to correct relative path.
SoundBlaster
commented
Aug 17, 2025
SoundBlaster
left a comment
Member
Author
There was a problem hiding this comment.
I think, this BNF specification describes the current ANTLR4 Lexer and Parser, and it complies with the Hypercode RFC.
Member
Author
|
@copilot review this PR please |
Contributor
|
@SoundBlaster I've opened a new pull request, #6, to work on those changes. Once the pull request is ready, I'll request review from you. |
Hypercode Syntax Specification
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a formal Hypercode Syntax Specification document and updates references to point to the new specification file.
- Introduces a BNF/EBNF grammar specification for Hypercode
.hcfiles - Updates relative path references in RFC/Hypercode.md to correctly point to the new specification location
- Includes comprehensive examples, test cases, and AST visualization
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| RFC/Hypercode.md | Updated two relative path references from incorrect paths to ../EBNF/Hypercode_Syntax.md |
| EBNF/Hypercode_Syntax.md | New syntax specification document defining the formal grammar, with examples and test cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Builds on the prior whitespace formalization in this PR. The <block> rule still duplicated indentation: both <indent-block> and each <command-line>'s <indent> described the same leading whitespace, which is the ambiguity raised in review and cannot express that a child must be indented deeper than its parent. Align the BNF with the existing ANTLR grammar (HypercodeParser.g4 / HypercodeLexer.g4): - drop <indent> from <command-line> - define <block> with synthetic <INDENT> / <DEDENT> tokens - remove the now-unused <indent-block>; keep the <indent>/<spaces>/<tabs> rules as the lexer-level definition of indentation whitespace - document the off-side rule and lexer-driven indentation in Notes Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add .github/workflows/ci.yml: on every pull_request (and push to main), set up JDK 17 and run `make -C EBNF test-all`, giving PRs an actual status check instead of manual local verification. Also fix a latent Makefile bug that the workflow depends on: the `build` target referenced $(ANTLR_JAR) but did not depend on the download target, so `make test-all` failed on a clean checkout even though the README promises the jar is fetched automatically. Add $(ANTLR_JAR) as a prerequisite of `build`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The ANTLR playground lives in EBNF/, not examples/antlr/ — update the Quick Start cd target and the directory-layout heading. Also correct the clone URL org from 0AL to the actual remote 0al-spec. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
SoundBlaster
added a commit
that referenced
this pull request
Jun 2, 2026
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
SoundBlaster
added a commit
that referenced
this pull request
Jun 2, 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.
Fixes #2