ANTLR fix/update
Problem:
Entities with names starting with the Cadbiom grammar keywords are not correctly parsed in logic formulas (models or queries).
ERROR: -> sig_exp ->line 1:51no viable alternative at input u'and'
line 1:267 mismatched character u'o' expecting 's'
https://stackoverflow.com/questions/53986204/keywords-and-identifiers-conflict-writing-lexer-scala-libs https://theantlrguy.atlassian.net/wiki/spaces/ANTLR3/pages/2687320/How+can+I+allow+keywords+as+identifiers
Solutions:
-
Fix the antlr3 grammar to allow backtracking (during the lexing/parsing ?) cons: update a deprecated and up 10 years old library; pros: easier (?) -
Update to antlr4 cons: uncertain work because of required knowledge, antlr3 + antlr4 doc to read; pros: begin the migration to Python3, get improvements from years of development.