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:07:31 UTC

[plc4x] branch feature/socketcan updated: Permit more locations for comments.

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

ldywicki pushed a commit to branch feature/socketcan
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/feature/socketcan by this push:
     new a1349d1  Permit more locations for comments.
a1349d1 is described below

commit a1349d1e04f0d89a75f97fab2e03445ece589ec5
Author: Ɓukasz Dywicki <lu...@code-house.org>
AuthorDate: Thu Sep 3 14:07:08 2020 +0200

    Permit more locations for 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