Open akoerner opened 1 year ago
Strictly speaking, if you are using gfortran and not using the -std
option, you're not forcing the compiler to choose a particular language compliance. NB: gfortran does not strictly support F90. I can do gfortran -std=f95 test.f90 -o my_program
of your program, but gfortran -std=f90 test.f90 -o my_program
gives an error: "gfortran: error: unrecognized command line option ‘-std=f90’; did you mean ‘-std=c90’?"
. In fact, it says on the webpage "Gfortran is the name of the GNU Fortran project, developing a free [Fortran 95/2003/2008/2018](https://gcc.gnu.org/wiki/GFortranStandards) compiler for GCC, the GNU Compiler Collection."
F90 is not listed there. And, we know that F95 is a different standard.
I think the problem here is that objectName : NAME ;
is too restrictive. It should allow for certain keywords, like return
.
@kaby76 Thanks for the comment, clarification and time spent educating. Next time I'll make sure to compile against a standard.
As you pointed out this does appear to be a valid issue though.
I am receiving a parser error when parsing a legal Fortran90 test program:
The program compiles with gfortran and gives the following output once run:
When parsed with the Fortran90Parser and lexer I receive the following error:
https://github.com/akoerner/FortranAS/blob/master/fortran_code_samples/simple_calc.f90