Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/F2x/grammar/fortran.g
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,21 @@ T_UNDERSCORE : '_' ;
T_SEMICOLON : ';' ;

T_DEFINED_OP : '\.[a-zA-Z]+\.' (%unless
T_EQ : '\.EQ\.' ;
T_NE : '\.NE\.' ;
T_LT : '\.LT\.' ;
T_LE : '\.LE\.' ;
T_GT : '\.GT\.' ;
T_GE : '\.GE\.' ;

T_TRUE : '\.TRUE\.' ;
T_FALSE : '\.FALSE\.' ;

T_NOT : '\.NOT\.' ;
T_AND : '\.AND\.' ;
T_OR : '\.OR\.' ;
T_EQV : '\.EQV\.' ;
T_NEQV : '\.NEQV\.';
T_EQ : '(?i)\.EQ\.' ;
T_NE : '(?i)\.NE\.' ;
T_LT : '(?i)\.LT\.' ;
T_LE : '(?i)\.LE\.' ;
T_GT : '(?i)\.GT\.' ;
T_GE : '(?i)\.GE\.' ;

T_TRUE : '(?i)\.TRUE\.' ;
T_FALSE : '(?i)\.FALSE\.' ;

T_NOT : '(?i)\.NOT\.' ;
T_AND : '(?i)\.AND\.' ;
T_OR : '(?i)\.OR\.' ;
T_EQV : '(?i)\.EQV\.' ;
T_NEQV : '(?i)\.NEQV\.';
);

T_PERIOD_EXPONENT
Expand Down Expand Up @@ -655,7 +655,7 @@ signed_real_literal_constant
;

real_constant_number
: T_DIGIT_STRING T_PERIOD_EXPONENT
: T_DIGIT_STRING T_PERIOD_EXPONENT (T_UNDERSCORE kind_param)?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break the grammar as the underscore will introduce ambiguities. (There is a reason, the kind parameters are commented out in the real_literal_constant rule.

;

real_literal_constant
Expand Down