Skip to content

Conversation

@SoundBlaster
Copy link
Member

@SoundBlaster SoundBlaster commented Aug 17, 2025

  • Add Hypercode Syntax Specification (BNF)
  • Update Hypercode syntax links to correct relative path

Fixes #2

Copy link
Member Author

@SoundBlaster SoundBlaster left a 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.

@SoundBlaster
Copy link
Member Author

@copilot review this PR please

Copy link

Copilot AI commented Nov 25, 2025

@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
Copy link
Contributor

Copilot AI left a 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 .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.

<command> ::= <identifier> [<class>] [<id>]
<class> ::= "." <identifier>
<id> ::= "#" <identifier>
<block> ::= <indent-block> { <command-line> }
Copy link

Copilot AI Nov 25, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

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.

SoundBlaster and others added 4 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>
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

2 participants