-
Notifications
You must be signed in to change notification settings - Fork 1
Hypercode Syntax Specification #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
links to correct relative path.
SoundBlaster
left a comment
There was a problem hiding this comment.
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.
|
@copilot review this PR please |
|
@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
There was a problem hiding this comment.
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
.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.
| <command> ::= <identifier> [<class>] [<id>] | ||
| <class> ::= "." <identifier> | ||
| <id> ::= "#" <identifier> | ||
| <block> ::= <indent-block> { <command-line> } |
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The definition of <block> is recursive but unclear. It references <indent-block> followed by { <command-line> }, but <command-line> already includes its own <indent> (line 23). This creates ambiguity about how indentation levels increase. Consider redefining to make the nested indentation relationship explicit, such as: <block> ::= { <command-line> } where the indentation level is implicitly deeper than the parent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to run and check this suggestion locally before I can approve it.
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>
Fixes #2