How to Differentiate Between Reserved Words and Intrinsic Function Names in Fortran 2023 Grammar Using ANTLR4?
I have developed a Fortran 2023 grammar using ANTLR4. You can find the grammar in my GitHub repository: Fortran2023Grammar. I am facing an issue while lexing the code where certain terms, such as real
and size
, are tokenized as reserved words. However, these terms are also used as intrinsic function names in Fortran.
Lexing Issue in ANTLR4 Grammar for Fortran 2018: Token Misclassification
I am developing a Fortran 2018 grammar in ANTLR4 using the ISO standard. I am encountering an issue during the lexing phase with some of the lexer rules. Specifically, certain keywords are being misclassified. Below is the minimal grammar demonstrating the problem: