Feature/pascal case - #24
Open
rdeininger wants to merge 4 commits into
Open
Conversation
rdeininger
force-pushed
the
feature/PascalCase
branch
from
August 12, 2026 11:15
c6ea549 to
9dd45a3
Compare
rdeininger
requested review from
philippkalenda
and removed request for
Copilot
August 17, 2026 06:49
philippkalenda
requested changes
Aug 17, 2026
| @@ -378,8 +395,8 @@ public override string VisitBasicExpression(OCLParser.BasicExpressionContext con | |||
| var sep = context.GetChild(1).GetText(); | |||
There was a problem hiding this comment.
possibly check all other usage of GetChild
philippkalenda
approved these changes
Aug 17, 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.
Changes Summary
1. OCL Function Handling Refactor
oclIsInvalid) out of the basicExpression rule and into the function rule in the
ANTLR4 grammar (antlr4/OCL.g4) and the corresponding visitor logic in
OclToCSharpConverter.cs.
2. Grammar Fix for let/if in Logical Expressions
correctly parsed as the right-hand side of logical operators (implies, and, or, xor).
x implies let y = ... in ...
x implies if ... then ... else ... endif
3. OCL Grammar Refactor
parse coverage for complex nested expressions.
testdata/SysML_OCLAndCSharp.md with additional edge-case OCL inputs.
4. PascalCase Property and Method Conversion
C# output are now converted to PascalCase.
(they are local variables, not C# members).
Implementation details (OclToCSharpConverter.cs):
name is a local variable or already starts with an uppercase letter.
BuildClosure, BuildIsUnique, BuildIterate, VisitLetExpression.
correctly match PascalCased identifiers.
previously dropped; it is now included in the output (e.g.
foo->at(1).bar → foo.ElementAt(0).Bar).
Test data updates:
values updated to PascalCase.