1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGSCANPARSELEXER_H_
40 #define _OSGSCANPARSELEXER_H_
45 //---------------------------------------------------------------------------
47 //---------------------------------------------------------------------------
49 #include "OSGConfig.h"
51 #if __GNUC__ >= 4 || __GNUC_MINOR__ >=3
52 #pragma GCC diagnostic push
53 #pragma GCC diagnostic ignored "-Weffc++"
56 // We have to prevent double inclusion of the scanner header file
58 #include "OSGScanParseSkelParser.hpp"
64 #ifdef OSG_USE_OSG2_NAMESPACE
65 # define yyFlexLexer OSG2ScanParseSkel_FlexLexer
67 # define yyFlexLexer OSGScanParseSkel_FlexLexer
69 #ifdef OSG_PREBUILD_SCANPARSE
70 #include "OSGScanParseSkelScanner_FlexLexer.h"
72 #include "FlexLexer.h"
77 #if __GNUC__ >= 4 || __GNUC_MINOR__ >=3
78 #pragma GCC diagnostic pop
81 #include "OSGBaseTypes.h"
83 // OSG_BEGIN_NAMESPACE
85 //---------------------------------------------------------------------------
87 //---------------------------------------------------------------------------
89 //---------------------------------------------------------------------------
91 //---------------------------------------------------------------------------
93 #ifdef OSG_USE_OSG2_NAMESPACE
94 # define OSGScanParseLexer OSG2ScanParseLexer
95 # define OSGScanParseSkel_FlexLexer OSG2ScanParseSkel_FlexLexer
98 //---------------------------------------------------------------------------
100 //---------------------------------------------------------------------------
102 /*! \ingroup GrpSystemFileIOScanParse
103 \ingroup GrpLibOSGSystem
106 class OSGScanParseLexer
: public OSGScanParseSkel_FlexLexer
110 //-----------------------------------------------------------------------
112 //-----------------------------------------------------------------------
114 typedef OSGScanParseSkel_FlexLexer Inherited
;
118 //-----------------------------------------------------------------------
120 //-----------------------------------------------------------------------
122 //-----------------------------------------------------------------------
124 //-----------------------------------------------------------------------
126 //-----------------------------------------------------------------------
128 //-----------------------------------------------------------------------
132 //-----------------------------------------------------------------------
134 //-----------------------------------------------------------------------
136 //-----------------------------------------------------------------------
138 //-----------------------------------------------------------------------
140 //-----------------------------------------------------------------------
142 //-----------------------------------------------------------------------
144 //-----------------------------------------------------------------------
146 //-----------------------------------------------------------------------
148 //-----------------------------------------------------------------------
150 //-----------------------------------------------------------------------
152 //-----------------------------------------------------------------------
154 //-----------------------------------------------------------------------
156 //-----------------------------------------------------------------------
157 // instance variables
158 //-----------------------------------------------------------------------
160 //-----------------------------------------------------------------------
161 // instance functions
162 //-----------------------------------------------------------------------
164 //! prohibit default function (move to 'public' if needed)
165 OSGScanParseLexer(const OSGScanParseLexer
&source
);
166 //! prohibit default function (move to 'public' if needed)
167 void operator =(const OSGScanParseLexer
&source
);
173 //-----------------------------------------------------------------------
175 //-----------------------------------------------------------------------
177 //-----------------------------------------------------------------------
179 //-----------------------------------------------------------------------
181 //-----------------------------------------------------------------------
183 //-----------------------------------------------------------------------
185 //-----------------------------------------------------------------------
187 //-----------------------------------------------------------------------
189 //-----------------------------------------------------------------------
190 // instance variables
191 //-----------------------------------------------------------------------
196 OSG::Int32 expectToken
;
197 OSG::Int32 imageIntsExpected
;
199 //-----------------------------------------------------------------------
200 // instance functions
201 //-----------------------------------------------------------------------
205 //-----------------------------------------------------------------------
207 //-----------------------------------------------------------------------
209 //-----------------------------------------------------------------------
210 // instance functions
211 //-----------------------------------------------------------------------
213 OSGScanParseLexer(std::istream
*arg_yyin
= 0,
214 std::ostream
*arg_yyout
= 0);
216 virtual ~OSGScanParseLexer(void);
218 /*------------------------- your_category -------------------------------*/
220 inline int yylex(YYSTYPE
*plval
)
226 /*------------------------- your_operators ------------------------------*/
228 inline void expectType(OSG::Int32 iType
)
229 { expectToken
= iType
; }
231 inline void expectImageInts(OSG::Int32 iImageIntsExpected
)
232 { this->imageIntsExpected
= iImageIntsExpected
; }
234 /*------------------------- assignment ----------------------------------*/
236 /*------------------------- comparison ----------------------------------*/
241 #endif /* _OSGSCANPARSESKELLEXER_H_ */