diff options
author | Brad King <brad.king@kitware.com> | 2007-10-03 15:41:39 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-10-03 15:41:39 -0400 |
commit | f8caab461315c1588412047eab965d3972f52efb (patch) | |
tree | e21fe14303ffcee50995cbb5352284a19f55da3e /Source/cmDependsFortran.cxx | |
parent | 00c33e7e8f0ec3e8be1a1f06eea86e5d00b7514f (diff) | |
download | cmake-f8caab461315c1588412047eab965d3972f52efb.tar.gz |
BUG: Fix for bug#5809. Applied patch supplied in the bug report. Updated pre-generated lexer and parser sources. This updates the makedepf90 version to 2.8.8. The parser actions have been updated to ignore "use" in comments properly.
Diffstat (limited to 'Source/cmDependsFortran.cxx')
-rw-r--r-- | Source/cmDependsFortran.cxx | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 434ead3aed..5bee74ded2 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -47,6 +47,7 @@ struct cmDependsFortranFile YY_BUFFER_STATE Buffer; std::string Directory; }; + struct cmDependsFortranParser_s { cmDependsFortranParser_s(cmDependsFortran* self); @@ -65,7 +66,12 @@ struct cmDependsFortranParser_s std::string TokenString; // Flag for whether lexer is reading from inside an interface. - int InInterface; + bool InInterface; + + int OldStartcond; + bool InPPFalseBranch; + std::vector<bool> SkipToEnd; + int StepI; // Set of provided and required modules. std::set<cmStdString> Provides; @@ -347,7 +353,7 @@ cmDependsFortranParser_s::~cmDependsFortranParser_s() } //---------------------------------------------------------------------------- -int cmDependsFortranParser_FilePush(cmDependsFortranParser* parser, +bool cmDependsFortranParser_FilePush(cmDependsFortranParser* parser, const char* fname) { // Open the new file and push it onto the stack. Save the old @@ -371,7 +377,7 @@ int cmDependsFortranParser_FilePush(cmDependsFortranParser* parser, } //---------------------------------------------------------------------------- -int cmDependsFortranParser_FilePop(cmDependsFortranParser* parser) +bool cmDependsFortranParser_FilePop(cmDependsFortranParser* parser) { // Pop one file off the stack and close it. Switch the lexer back // to the next one on the stack. @@ -426,18 +432,31 @@ void cmDependsFortranParser_StringAppend(cmDependsFortranParser* parser, //---------------------------------------------------------------------------- void cmDependsFortranParser_SetInInterface(cmDependsFortranParser* parser, - int in) + bool in) { parser->InInterface = in; } //---------------------------------------------------------------------------- -int cmDependsFortranParser_GetInInterface(cmDependsFortranParser* parser) +bool cmDependsFortranParser_GetInInterface(cmDependsFortranParser* parser) { return parser->InInterface; } //---------------------------------------------------------------------------- +void cmDependsFortranParser_SetOldStartcond(cmDependsFortranParser* parser, + int arg) +{ + parser->OldStartcond = arg; +} + +//---------------------------------------------------------------------------- +int cmDependsFortranParser_GetOldStartcond(cmDependsFortranParser* parser) +{ + return parser->OldStartcond; +} + +//---------------------------------------------------------------------------- void cmDependsFortranParser_Error(cmDependsFortranParser*, const char*) { // If there is a parser error just ignore it. The source will not @@ -449,7 +468,7 @@ void cmDependsFortranParser_Error(cmDependsFortranParser*, const char*) void cmDependsFortranParser_RuleUse(cmDependsFortranParser* parser, const char* name) { - parser->Requires.insert(name); + parser->Requires.insert(cmSystemTools::LowerCase(name) ); } //---------------------------------------------------------------------------- @@ -482,7 +501,7 @@ void cmDependsFortranParser_RuleInclude(cmDependsFortranParser* parser, void cmDependsFortranParser_RuleModule(cmDependsFortranParser* parser, const char* name) { - parser->Provides.insert(name); + parser->Provides.insert(cmSystemTools::LowerCase(name) ); } //---------------------------------------------------------------------------- |