summaryrefslogtreecommitdiffstats
path: root/Source/cmFortranParser.y
Commit message (Collapse)AuthorAgeFilesLines
* LexerParser: move to custom directoryDaniel Pfeifer2017-04-281-247/+0
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-2/+2
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* cmFortranParser: include what you useDaniel Pfeifer2017-02-201-2/+6
|
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Fortran: Add support for submodule syntax in dependency scanningBrad King2016-09-201-1/+19
| | | | | | | | | | | | | | | | | | | Fortran 2008 [1] adds support for a new syntax related to modules: submodule ( ParentModule ) SubModule submodule ( ParentModule : SubModule ) NestedSubModule Both of these mean that the current source file requires the module `ParentModule` to be available if it is not provided in the current file. Teach our Fortran dependency scanner to parse this syntax to extract this relationship. For now simply tolerate the nested submodule case and extract only the dependency it expresses on the main module. Further work will be needed to extract dependencies among nested submodules. [1] http://fortranwiki.org/fortran/show/Fortran+2008 Closes: #16234
* cmFortranParser: Skip module procedures/functions/subroutinesBrad King2016-09-201-1/+5
| | | | | | | | | | | | | | Fortran allows the syntax MODULE PROCEDURE ... MODULE FUNCTION ... MODULE SUBROUTINE ... to declare procedures/functions/subroutines that are members of modules. Do not treat such syntax as the definition of a module with one of these names. Issue: #16234
* cmFortranParser: Parse keywords as lexical tokensBrad King2016-09-081-44/+38
| | | | | | | | 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.
* cmFortranParser: Simplify grammar by skipping unknown statementsBrad King2016-09-081-13/+2
| | | | | | | Our Fortran grammar is a bare minimum to extract dependencies. Other statement syntax can be ignored, so simply skip to the end of unrecognized statements. This allows some of our existing productions to be dropped.
* cmFortranParser: Revise indentation style to match rest of CMakeBrad King2016-09-061-101/+61
| | | | While at it, remove unused token CPP_TOENDL.
* cmFortranParser: Parse #line directivesBrad King2015-11-021-1/+9
| | | | | | | 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.
* cmFortranParser: Port to bison 3Brad King2015-07-271-13/+10
| | | | | Use %-directives to specify the scanner/lexer arguments and update the yyerror signature. Reduce the list of post-bison modifications needed.
* Rename Fortran parser infrastructure to drop "Depends" prefixKitware Robot2015-07-271-0/+282
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.