summaryrefslogtreecommitdiffstats
path: root/Source/cmFortranParser.y
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFortranParser.y')
-rw-r--r--Source/cmFortranParser.y10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmFortranParser.y b/Source/cmFortranParser.y
index 996bef6..83f441a 100644
--- a/Source/cmFortranParser.y
+++ b/Source/cmFortranParser.y
@@ -1,7 +1,7 @@
%{
/*============================================================================
CMake - Cross Platform Makefile Generator
- Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
+ Copyright 2000-2015 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
@@ -85,6 +85,7 @@ static bool cmFortranParserIsKeyword(const char* word,
/*-------------------------------------------------------------------------*/
/* Tokens */
%token EOSTMT ASSIGNMENT_OP GARBAGE
+%token CPP_LINE_DIRECTIVE
%token CPP_INCLUDE F90PPR_INCLUDE COCO_INCLUDE
%token F90PPR_DEFINE CPP_DEFINE F90PPR_UNDEF CPP_UNDEF
%token CPP_IFDEF CPP_IFNDEF CPP_IF CPP_ELSE CPP_ELIF CPP_ENDIF
@@ -185,6 +186,13 @@ keyword_stmt:
free($1);
free($2);
}
+| CPP_LINE_DIRECTIVE STRING other EOSTMT
+ {
+ cmFortranParser* parser =
+ cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_RuleLineDirective(parser, $2);
+ free($2);
+ }
| CPP_INCLUDE_ANGLE other EOSTMT
{
cmFortranParser* parser =