2009-10-02 01:21:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2005-01-26 23:33:38 +03:00
|
|
|
|
2009-10-02 01:21:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2005-01-26 23:33:38 +03:00
|
|
|
|
2009-10-02 01:21:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2005-01-26 23:33:38 +03:00
|
|
|
#ifndef cmDependsFortranParser_h
|
|
|
|
#define cmDependsFortranParser_h
|
|
|
|
|
2005-02-01 18:42:52 +03:00
|
|
|
#include <stddef.h> /* size_t */
|
|
|
|
|
2005-01-26 23:33:38 +03:00
|
|
|
/* Forward declare parser object type. */
|
|
|
|
typedef struct cmDependsFortranParser_s cmDependsFortranParser;
|
|
|
|
|
|
|
|
/* Functions to enter/exit #include'd files in order. */
|
2007-10-03 23:41:39 +04:00
|
|
|
bool cmDependsFortranParser_FilePush(cmDependsFortranParser* parser,
|
2005-01-26 23:33:38 +03:00
|
|
|
const char* fname);
|
2007-10-03 23:41:39 +04:00
|
|
|
bool cmDependsFortranParser_FilePop(cmDependsFortranParser* parser);
|
2005-01-26 23:33:38 +03:00
|
|
|
|
|
|
|
/* Callbacks for lexer. */
|
|
|
|
int cmDependsFortranParser_Input(cmDependsFortranParser* parser,
|
|
|
|
char* buffer, size_t bufferSize);
|
2007-10-03 23:41:39 +04:00
|
|
|
|
|
|
|
|
2005-01-26 23:33:38 +03:00
|
|
|
void cmDependsFortranParser_StringStart(cmDependsFortranParser* parser);
|
|
|
|
const char* cmDependsFortranParser_StringEnd(cmDependsFortranParser* parser);
|
|
|
|
void cmDependsFortranParser_StringAppend(cmDependsFortranParser* parser,
|
|
|
|
char c);
|
2007-10-03 23:41:39 +04:00
|
|
|
|
2005-01-26 23:33:38 +03:00
|
|
|
void cmDependsFortranParser_SetInInterface(cmDependsFortranParser* parser,
|
2007-10-03 23:41:39 +04:00
|
|
|
bool is_in);
|
|
|
|
bool cmDependsFortranParser_GetInInterface(cmDependsFortranParser* parser);
|
|
|
|
|
|
|
|
|
|
|
|
void cmDependsFortranParser_SetInPPFalseBranch(cmDependsFortranParser* parser,
|
|
|
|
bool is_in);
|
|
|
|
bool cmDependsFortranParser_GetInPPFalseBranch(cmDependsFortranParser* parser);
|
|
|
|
|
|
|
|
|
|
|
|
void cmDependsFortranParser_SetOldStartcond(cmDependsFortranParser* parser,
|
|
|
|
int arg);
|
|
|
|
int cmDependsFortranParser_GetOldStartcond(cmDependsFortranParser* parser);
|
2005-01-26 23:33:38 +03:00
|
|
|
|
|
|
|
/* Callbacks for parser. */
|
|
|
|
void cmDependsFortranParser_Error(cmDependsFortranParser* parser,
|
|
|
|
const char* message);
|
|
|
|
void cmDependsFortranParser_RuleUse(cmDependsFortranParser* parser,
|
|
|
|
const char* name);
|
|
|
|
void cmDependsFortranParser_RuleInclude(cmDependsFortranParser* parser,
|
|
|
|
const char* name);
|
|
|
|
void cmDependsFortranParser_RuleModule(cmDependsFortranParser* parser,
|
|
|
|
const char* name);
|
|
|
|
void cmDependsFortranParser_RuleDefine(cmDependsFortranParser* parser,
|
|
|
|
const char* name);
|
|
|
|
void cmDependsFortranParser_RuleUndef(cmDependsFortranParser* parser,
|
|
|
|
const char* name);
|
|
|
|
void cmDependsFortranParser_RuleIfdef(cmDependsFortranParser* parser,
|
|
|
|
const char* name);
|
|
|
|
void cmDependsFortranParser_RuleIfndef(cmDependsFortranParser* parser,
|
|
|
|
const char* name);
|
|
|
|
void cmDependsFortranParser_RuleIf(cmDependsFortranParser* parser);
|
|
|
|
void cmDependsFortranParser_RuleElif(cmDependsFortranParser* parser);
|
|
|
|
void cmDependsFortranParser_RuleElse(cmDependsFortranParser* parser);
|
|
|
|
void cmDependsFortranParser_RuleEndif(cmDependsFortranParser* parser);
|
|
|
|
|
2005-02-01 18:42:52 +03:00
|
|
|
/* Define the parser stack element type. */
|
|
|
|
typedef union cmDependsFortran_yystype_u cmDependsFortran_yystype;
|
|
|
|
union cmDependsFortran_yystype_u
|
|
|
|
{
|
|
|
|
char* string;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Setup the proper yylex interface. */
|
|
|
|
#define YY_EXTRA_TYPE cmDependsFortranParser*
|
2006-05-15 18:19:57 +04:00
|
|
|
#define YY_DECL \
|
|
|
|
int cmDependsFortran_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
|
2005-02-01 18:42:52 +03:00
|
|
|
#define YYSTYPE cmDependsFortran_yystype
|
|
|
|
#define YYSTYPE_IS_DECLARED 1
|
|
|
|
#if !defined(cmDependsFortranLexer_cxx)
|
|
|
|
# include "cmDependsFortranLexer.h"
|
|
|
|
#endif
|
2006-05-15 18:19:57 +04:00
|
|
|
#if !defined(cmDependsFortranLexer_cxx)
|
|
|
|
#if !defined(cmDependsFortranParser_cxx)
|
2005-02-01 18:42:52 +03:00
|
|
|
# undef YY_EXTRA_TYPE
|
|
|
|
# undef YY_DECL
|
|
|
|
# undef YYSTYPE
|
|
|
|
# undef YYSTYPE_IS_DECLARED
|
2005-01-26 23:33:38 +03:00
|
|
|
#endif
|
2006-05-15 18:19:57 +04:00
|
|
|
#endif
|
2005-01-26 23:33:38 +03:00
|
|
|
|
|
|
|
#endif
|