BEL parser grammar issue in c#

I am trying to use new BEL combined grammar in my developing tool. I could generate the parser and lexer files and it is working well for ‘adl’ and ‘cadl’ but when I want to use it for BEL parsing it gives me “NoViableAltException” error when parsing ‘rawPath’ rule. I could not find the source of ambiguity. I appreciate if you could give me a hint. I am using a c# project in VS 2019 and I used the ANTL4 tool 4.13 (the latest version) for generating the codes.

Hi everybody. I finally found the problem and the solution. The problem was for undefined “Root_Id_Code” in AdlPathParser for the “idCode” rule. Adding this option to the rule solved the problem. Hope it helps others.

1 Like

Thanks for sharing the solution. A pull request fixing the problem would be even better, and openEHR repositories could always use a more collaborative look: the more people contributing the better, no matter what the contribution is.

1 Like