summaryrefslogtreecommitdiffstats
path: root/Source/LexerParser/cmFortranLexer.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Fortran: Teach lexer to recognize LLVMFlang preprocessor dependenciesBrad King2023-05-091-69/+73
| | | | | The line directives have the form `#line <path> <number>`, and do not have the line number before the path as other compilers do.
* Fortran: Teach lexer to handle CRLF newlinesBrad King2022-08-091-184/+193
| | | | | | | We read sources in binary format, so we need to explicitly match CR (`\r`) characters that occur as part of newlines in CRLF sources. This is particularly important when line continuation (`&`) occurs in the middle of module declaration or usage.
* clang-analyzer: rename from scan-build in commentsBrad King2021-06-031-1/+1
|
* Fix most clang -Wextra-semi-stmt warnings in C++ filesSean McBride2019-01-151-1/+1
| | | | Suppress one in code generated by flex.
* Source/LexerParser: Suppress "Use of zero-allocated memory" warningKyle Edwards2019-01-141-0/+4
| | | | | | | clang scan-build warns about YY_CURRENT_BUFFER_LVALUE being zero- allocated, but the whole point of the macro is to know that it's not zero. Wrap the entire file in an "#ifndef __clang_analyzer__" block in order to suppress the warning.
* Fortran: Fix module dependency scanning with upper-case SUBMODULEBrad King2018-11-201-113/+113
| | | | | | | | The lexical token expression added by commit v3.7.0-rc1~73^2~1 (Fortran: Add support for submodule syntax in dependency scanning, 2016-09-05) has a typo and does not match upper-case `B` in `SUBMODULE`. Fix it. Fixes: #18595
* cmFortranLexer: regenerate with flex 2.6.4 (previously 2.6.1)Matthias Maennich2017-08-281-447/+548
| | | | | | | | | | | | | | | | | | | | | | | | flex 2.6.3 introduces symbol remapping through macro definitions. hence the change appears bigger than one would expect from a minor version upgrade. In addition some manual cleanup that had to be done previously is now obsolete. namely: - the size_t cast of _yybytes_len in yy_scan_bytes (i is now also defined int and not size_t anymore) - the redefinition of yyl within yy_find_action (yyl is now already defined as int) Line number preprocessor directives (#line) were previously generated into the c source file. This actually breaks debugging as debuggers have a hard time finding the original cmFortranLexer.in.l and mapping the current instruction to a meaningful location within that file. The prefix "cmFortran_yy" can already be set as %option directly. For convenience also provide a sed command for all the manual steps that need to be done after generating. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* LexerParser: move to custom directoryDaniel Pfeifer2017-04-281-0/+2511