To solve this issue I have to provide a new configuration file. This patch should should solve your issue " brackets confusing the parser ".
Please check the attached file with your virus scanner before you use it to replace the one with the same name in the bin folder of your Moritz distribution.
Replace with the attached file "ANSI_C_Source_C_only_grm.a2x" the one with the same name in your Moritz distribution sub folder "[MoritzRoot]\LangPack\ansi_c\a2x\".
It may be useful to keep the old files for the case that the new ones are not satisfying you.
Note this patch was created for the newest Moritz patch published on 2020-12-23 together with the patch I have provided to solve your issue struct initializer with condition and was not tested with older versions.
If you face additional issues related to this topic please update your Moritz release by using the patch as described in the readme.
The patch, I provide here, is extending the syntax-rules initializer and expr_stmt.
The extension of the initializer rule is directly associated with the parsing issue reported by you.
The extension of the rule expr_stmt modifies the resulting xml-result to ensure that the diagram generation is treating the whole assignment-expression in your code-line as one as one command. (I think this is fixing an additional that I recognized while evaluating your example)
Please check this patch and respond with a comment if your issue is solved or not.
Hello Wasili.
To solve this issue I have to provide a new configuration file. This patch should should solve your issue " brackets confusing the parser ".
Note this patch was created for the newest Moritz patch published on 2020-12-23 together with the patch I have provided to solve your issue struct initializer with condition and was not tested with older versions.
The patch, I provide here, is extending the syntax-rules initializer and expr_stmt.
Please check this patch and respond with a comment if your issue is solved or not.
Have a happy new year.
Stay healthy,
Eckard.
Last edit: Eckard Klotz 2020-12-29