You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by "Łukasz Dywicki (Jira)" <ji...@apache.org> on 2020/09/03 12:16:00 UTC

[jira] [Created] (PLC4X-248) Comments after last field breaks MSpec parser

Łukasz Dywicki created PLC4X-248:
------------------------------------

             Summary: Comments after last field breaks MSpec parser
                 Key: PLC4X-248
                 URL: https://issues.apache.org/jira/browse/PLC4X-248
             Project: Apache PLC4X
          Issue Type: Bug
          Components: Code-Generation
    Affects Versions: 0.8.0
            Reporter: Łukasz Dywicki


MSpec permits comments in some locations, however their use sometimes leads to unexpected results.
For example below input works fine:
{code}
// this is test
[type 'SDOSegment'
    // first comment
    [simple uint 8 'field']
]
{code}

But below doesn't work:
{code}
[type 'SDOSegment'
    [simple uint 8 'field'] // just read this
] // ok, we're done
{code}

This is due to fact that comments are permitted only before field and before type. They are not permitted after field meaning that last field, which ends one section will result in broken input for an parser.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)