packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmDependsFortranParser.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #ifndef cmDependsFortranParser_h
13 #define cmDependsFortranParser_h
14
15 #include <stddef.h> /* size_t */
16
17 /* Forward declare parser object type.  */
18 typedef struct cmDependsFortranParser_s cmDependsFortranParser;
19
20 /* Functions to enter/exit #include'd files in order.  */
21 bool cmDependsFortranParser_FilePush(cmDependsFortranParser* parser,
22                                     const char* fname);
23 bool cmDependsFortranParser_FilePop(cmDependsFortranParser* parser);
24
25 /* Callbacks for lexer.  */
26 int cmDependsFortranParser_Input(cmDependsFortranParser* parser,
27                                  char* buffer, size_t bufferSize);
28
29
30 void cmDependsFortranParser_StringStart(cmDependsFortranParser* parser);
31 const char* cmDependsFortranParser_StringEnd(cmDependsFortranParser* parser);
32 void cmDependsFortranParser_StringAppend(cmDependsFortranParser* parser,
33                                          char c);
34
35 void cmDependsFortranParser_SetInInterface(cmDependsFortranParser* parser,
36                                            bool is_in);
37 bool cmDependsFortranParser_GetInInterface(cmDependsFortranParser* parser);
38
39
40 void cmDependsFortranParser_SetInPPFalseBranch(cmDependsFortranParser* parser,
41                                                bool is_in);
42 bool cmDependsFortranParser_GetInPPFalseBranch(cmDependsFortranParser* parser);
43
44
45 void cmDependsFortranParser_SetOldStartcond(cmDependsFortranParser* parser,
46                                             int arg);
47 int cmDependsFortranParser_GetOldStartcond(cmDependsFortranParser* parser);
48
49 /* Callbacks for parser.  */
50 void cmDependsFortranParser_Error(cmDependsFortranParser* parser,
51                                   const char* message);
52 void cmDependsFortranParser_RuleUse(cmDependsFortranParser* parser,
53                                     const char* name);
54 void cmDependsFortranParser_RuleInclude(cmDependsFortranParser* parser,
55                                         const char* name);
56 void cmDependsFortranParser_RuleModule(cmDependsFortranParser* parser,
57                                        const char* name);
58 void cmDependsFortranParser_RuleDefine(cmDependsFortranParser* parser,
59                                        const char* name);
60 void cmDependsFortranParser_RuleUndef(cmDependsFortranParser* parser,
61                                       const char* name);
62 void cmDependsFortranParser_RuleIfdef(cmDependsFortranParser* parser,
63                                       const char* name);
64 void cmDependsFortranParser_RuleIfndef(cmDependsFortranParser* parser,
65                                        const char* name);
66 void cmDependsFortranParser_RuleIf(cmDependsFortranParser* parser);
67 void cmDependsFortranParser_RuleElif(cmDependsFortranParser* parser);
68 void cmDependsFortranParser_RuleElse(cmDependsFortranParser* parser);
69 void cmDependsFortranParser_RuleEndif(cmDependsFortranParser* parser);
70
71 /* Define the parser stack element type.  */
72 typedef union cmDependsFortran_yystype_u cmDependsFortran_yystype;
73 union cmDependsFortran_yystype_u
74 {
75   char* string;
76 };
77
78 /* Setup the proper yylex interface.  */
79 #define YY_EXTRA_TYPE cmDependsFortranParser*
80 #define YY_DECL \
81 int cmDependsFortran_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
82 #define YYSTYPE cmDependsFortran_yystype
83 #define YYSTYPE_IS_DECLARED 1
84 #if !defined(cmDependsFortranLexer_cxx)
85 # include "cmDependsFortranLexer.h"
86 #endif
87 #if !defined(cmDependsFortranLexer_cxx)
88 #if !defined(cmDependsFortranParser_cxx)
89 # undef YY_EXTRA_TYPE
90 # undef YY_DECL
91 # undef YYSTYPE
92 # undef YYSTYPE_IS_DECLARED
93 #endif
94 #endif
95
96 #endif