Hello,
I am using ANTLR4 to parse Swift code using the Swift grammar (or at least based on it) from GitHub.
The parser does not identify the for-in statement as a loop statement / for-in statement even if it was defined in the grammar.
I am trying to understand why.
Thanks, Roy
I am attaching these files via OneDrive:
Hello,
Upon further investigating i did found out the problem was that the parser was wrongly identifying the 'for' as a variable / regular identifier.
So, i looked in GitHub swift grammar that they indeed separated the identifier to 2 types to avoid such things.
After i did that, the parser identified the for loop statement correctly...
Thanks
Bye