You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by ld...@apache.org on 2020/09/03 12:23:32 UTC
[plc4x] 01/01: PLC4X-248 Permit more locations for MSpec comments.
This is an automated email from the ASF dual-hosted git repository.
ldywicki pushed a commit to branch PLC4X-248
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 5386631a819bc5ac4424a3e7e02e2566049b09bb
Author: Ćukasz Dywicki <lu...@code-house.org>
AuthorDate: Thu Sep 3 14:07:08 2020 +0200
PLC4X-248 Permit more locations for MSpec comments.
Comments might occur after field, so rule for next one will catch it. However this does not work in case of last fields which then confuse parser with unexpected input.
---
.../org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/build-utils/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4 b/build-utils/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4
index 434f6e1..76eefbb 100644
--- a/build-utils/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4
+++ b/build-utils/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4
@@ -23,7 +23,7 @@ file
;
complexTypeDefinition
- : (COMMENT.*?)? LBRACKET complexType RBRACKET
+ : (COMMENT.*?)? LBRACKET complexType RBRACKET (COMMENT.*?)?
;
complexType
@@ -34,11 +34,11 @@ complexType
;
fieldDefinition
- : (COMMENT.*?)? LBRACKET field (LBRACKET params=multipleExpressions RBRACKET)? RBRACKET
+ : (COMMENT.*?)? LBRACKET field (LBRACKET params=multipleExpressions RBRACKET)? RBRACKET (COMMENT.*?)?
;
dataIoDefinition
- : (COMMENT.*?)? LBRACKET typeSwitchField (LBRACKET params=multipleExpressions RBRACKET)? RBRACKET
+ : (COMMENT.*?)? LBRACKET typeSwitchField (LBRACKET params=multipleExpressions RBRACKET)? RBRACKET (COMMENT.*?)?
;
field