Skip to content

Hypercode Syntax Specification#5

Merged
SoundBlaster merged 10 commits into
mainfrom
add-hypercode-syntax-md
Jun 2, 2026
Merged

Hypercode Syntax Specification#5
SoundBlaster merged 10 commits into
mainfrom
add-hypercode-syntax-md

Conversation

@SoundBlaster

@SoundBlaster SoundBlaster commented Aug 17, 2025

Copy link
Copy Markdown
Member
  • Add Hypercode Syntax Specification (BNF)
  • Update Hypercode syntax links to correct relative path

Fixes #2

@SoundBlaster SoundBlaster left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, this BNF specification describes the current ANTLR4 Lexer and Parser, and it complies with the Hypercode RFC.

@SoundBlaster

Copy link
Copy Markdown
Member Author

@copilot review this PR please

Copilot AI commented Nov 25, 2025

Copy link
Copy Markdown
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .hc files
  • 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.

Comment thread EBNF/Hypercode_Syntax.md Outdated
Comment thread EBNF/Hypercode_Syntax.md Outdated
Comment thread EBNF/Hypercode_Syntax.md Outdated
Comment thread EBNF/Hypercode_Syntax.md Outdated
Comment thread EBNF/Hypercode_Syntax.md Outdated
SoundBlaster and others added 7 commits November 25, 2025 23:40
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 SoundBlaster merged commit 04f8426 into main Jun 2, 2026
1 check passed
@SoundBlaster SoundBlaster deleted the add-hypercode-syntax-md branch June 2, 2026 04:57
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken link in RFC/Hypercode.md

3 participants