This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5e4c579a88 fix: Made the mspec parser allow using variables with names 
matching field types in expressions.
5e4c579a88 is described below

commit 5e4c579a88eab0d209270a8c8a562f1220d152d0
Author: Christofer Dutz <[email protected]>
AuthorDate: Sun Oct 5 17:32:19 2025 +0200

    fix: Made the mspec parser allow using variables with names matching field 
types in expressions.
---
 .../org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/code-generation/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4
 
b/code-generation/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4
index 3427650db8..fd5d408eb0 100644
--- 
a/code-generation/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4
+++ 
b/code-generation/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4
@@ -230,7 +230,7 @@ innerExpression
  : valueLiteral
  // Explicitly allow the loop type keywords in expressions
  | ARRAY_LOOP_TYPE
- | IDENTIFIER_LITERAL ('(' (innerExpression (',' innerExpression)* )? ')')? 
('[' innerExpression ']')?
+ | idExpression ('(' (innerExpression (',' innerExpression)* )? ')')? ('[' 
innerExpression ']')?
  | innerExpression '.' innerExpression // Field Reference or method call
  | innerExpression '[' + INTEGER_LITERAL + ']' // Array index
  | innerExpression binaryOperator innerExpression  // Addition

Reply via email to