summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsFortranParser.y
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-04-24 03:53:20 (GMT)
committerBrad King <brad.king@kitware.com>2008-04-24 03:53:20 (GMT)
commit5bf6dba9e86b8686532b63f90c8f2f936c13020a (patch)
tree146b3584d56cb8aa8320da96027344b3b2478087 /Source/cmDependsFortranParser.y
parent4cf167173fb3b3d3da4aa543b34896fb3e677483 (diff)
downloadCMake-5bf6dba9e86b8686532b63f90c8f2f936c13020a.zip
CMake-5bf6dba9e86b8686532b63f90c8f2f936c13020a.tar.gz
CMake-5bf6dba9e86b8686532b63f90c8f2f936c13020a.tar.bz2
ENH: Patch from Maik to add Fortran03 USE syntax support.
- I tweaked the patch to add 'other' production rules for COMMA and DCOLON - See issue #6884.
Diffstat (limited to 'Source/cmDependsFortranParser.y')
-rw-r--r--Source/cmDependsFortranParser.y27
1 files changed, 27 insertions, 0 deletions
diff --git a/Source/cmDependsFortranParser.y b/Source/cmDependsFortranParser.y
index 4800b98..7a8d3d9 100644
--- a/Source/cmDependsFortranParser.y
+++ b/Source/cmDependsFortranParser.y
@@ -150,6 +150,7 @@ static bool cmDependsFortranParserIsKeyword(const char* word,
%token CPP_IFDEF CPP_IFNDEF CPP_IF CPP_ELSE CPP_ELIF CPP_ENDIF
%token F90PPR_IFDEF F90PPR_IFNDEF F90PPR_IF
%token F90PPR_ELSE F90PPR_ELIF F90PPR_ENDIF
+%token COMMA DCOLON
%token <string> CPP_TOENDL
%token <number> UNTERMINATED_STRING
%token <string> STRING WORD
@@ -208,6 +209,30 @@ keyword_stmt:
free($1);
free($2);
}
+| WORD DCOLON WORD other EOSTMT
+ {
+ if (cmDependsFortranParserIsKeyword($1, "use"))
+ {
+ cmDependsFortranParser* parser =
+ cmDependsFortran_yyget_extra(yyscanner);
+ cmDependsFortranParser_RuleUse(parser, $3);
+ }
+ free($1);
+ free($3);
+ }
+| WORD COMMA WORD DCOLON WORD other EOSTMT
+ {
+ if (cmDependsFortranParserIsKeyword($1, "use") &&
+ cmDependsFortranParserIsKeyword($3, "non_intrinsic") )
+ {
+ cmDependsFortranParser* parser =
+ cmDependsFortran_yyget_extra(yyscanner);
+ cmDependsFortranParser_RuleUse(parser, $5);
+ }
+ free($1);
+ free($3);
+ free($5);
+ }
| WORD STRING other EOSTMT /* Ignore */
{
if (cmDependsFortranParserIsKeyword($1, "include"))
@@ -297,6 +322,8 @@ misc_code:
| STRING { free ($1); }
| GARBAGE
| ASSIGNMENT_OP
+| DCOLON
+| COMMA
| UNTERMINATED_STRING
;