Teach the lexer to match and return specific Fortran keywords as tokens.
Update the parser to use these instead of always using a WORD token and
then checking the text. This avoids extra string comparisons and will
allow more grammar productions to be unambiguously added later for
additional Fortran statements.
Revise the documented modifications we need to make to the
flex-generated source file according to the needs of the new version.
Also drop the duplicate copyright notice block from the generated file.
Teach the lexer to extract the #line directive prefix and line number as
a new token type. Teach the parser to recognize this token followed by
a string as the file name (plus possibly other content). Report the
named file as included by the source file.
The parser can be re-used outside cmDependsFortran or the cmDepends
class hierarchy so drop the "Depends" from its name:
rename 's/DependsFortran([A-Za-z0-9_])/Fortran$1/' Source/*.*
sed -i 's/DependsFortran\([A-Za-z0-9_]\)/Fortran\1/g' Source/*.*
sed -i 's/FortranInternals/DependsFortranInternals/g' Source/*.*
Also manually fix Source/CMakeLists.txt source file ordering.