Skip to content

Bugfix/parserbugfixed#14

Merged
temonk merged 2 commits intomainfrom
bugfix/parserbugfixed
Jul 2, 2025
Merged

Bugfix/parserbugfixed#14
temonk merged 2 commits intomainfrom
bugfix/parserbugfixed

Conversation

@temonk
Copy link
Copy Markdown
Contributor

@temonk temonk commented Jul 2, 2025

No description provided.

@temonk temonk requested a review from Copilot July 2, 2025 08:26
Copy link
Copy Markdown
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 fixes a parser issue by requiring end-of-file after standalone expressions, regenerates ANTLR artifacts to reflect the grammar change, adds new tests for invalid syntax cases, updates the ANTLR invocation script, and bumps the package version.

  • Enforce EOF on expression-only programs in the grammar
  • Regenerate SimpraParser.interp and SimpraParser.cs to pick up the grammar update
  • Add unit tests for various invalid syntax scenarios and refactor inline model initializers
  • Improve antlr.bat with classpath quoting and suppress echo; bump version to 1.0.15

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/AltaSoft.Simpra.tests/SimpraExpressionTests.cs Add invalid-syntax tests and consolidate model initializers inline
src/AltaSoft.Simpra/antlr.bat Suppress echo, add -cp quoting and reminder to place the JAR file
src/AltaSoft.Simpra/G4/SimpraParser.g4 Require EOF after exp alternative in program rule
src/AltaSoft.Simpra/ANTLR/SimpraParser.interp Regenerated ATN to match updated grammar
src/AltaSoft.Simpra/ANTLR/SimpraParser.cs Regenerated parser with updated state numbers; added some usings
Directory.Build.props Bumped <Version> to 1.0.15
Comments suppressed due to low confidence (2)

src/AltaSoft.Simpra/ANTLR/SimpraParser.cs:24

  • The using directive for System.Text appears unused and can be removed to reduce clutter.
using System.Text;

src/AltaSoft.Simpra/ANTLR/SimpraParser.cs:25

  • The using directive for System.Diagnostics appears unused and can be removed to reduce clutter.
using System.Diagnostics;

Comment on lines +4 to 5


Copy link

Copilot AI Jul 2, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding exit /b %ERRORLEVEL% at the end of the script to propagate the ANTLR tool's exit code to the caller.

Suggested change
exit /b %ERRORLEVEL%

Copilot uses AI. Check for mistakes.
@temonk temonk merged commit aae2071 into main Jul 2, 2025
1 check passed
@temonk temonk deleted the bugfix/parserbugfixed branch July 2, 2025 08:55
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.

2 participants