00001 /*---------------------------------------------------------------------------*\ 00002 * OpenSG * 00003 * * 00004 * * 00005 * Copyright (C) 2000-2002 by the OpenSG Forum * 00006 * * 00007 * www.opensg.org * 00008 * * 00009 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * 00010 * * 00011 \*---------------------------------------------------------------------------*/ 00012 /*---------------------------------------------------------------------------*\ 00013 * License * 00014 * * 00015 * This library is free software; you can redistribute it and/or modify it * 00016 * under the terms of the GNU Library General Public License as published * 00017 * by the Free Software Foundation, version 2. * 00018 * * 00019 * This library is distributed in the hope that it will be useful, but * 00020 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00022 * Library General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU Library General Public * 00025 * License along with this library; if not, write to the Free Software * 00026 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00027 * * 00028 \*---------------------------------------------------------------------------*/ 00029 /*---------------------------------------------------------------------------*\ 00030 * Changes * 00031 * * 00032 * * 00033 * * 00034 * * 00035 * * 00036 * * 00037 \*---------------------------------------------------------------------------*/ 00038 00039 #ifndef _OSGSCANPARSELEXER_H_ 00040 #define _OSGSCANPARSELEXER_H_ 00041 #ifdef __sgi 00042 #pragma once 00043 #endif 00044 00050 //--------------------------------------------------------------------------- 00051 // Includes 00052 //--------------------------------------------------------------------------- 00053 00054 // We have to prevent double inclusion of the scanner header file 00055 #ifndef TOK_HEADER 00056 #include "OSGScanParseSkel.tab.h" 00057 #endif 00058 #ifndef yyFlexLexer 00059 #define yyFlexLexer OSGScanParseSkel_FlexLexer 00060 #include <FlexLexer.h> 00061 #undef yyFlexLexer 00062 #endif 00063 #include "OSGConfig.h" 00064 #include "OSGBaseTypes.h" 00065 00066 // OSG_BEGIN_NAMESPACE 00067 00068 //--------------------------------------------------------------------------- 00069 // Forward References 00070 //--------------------------------------------------------------------------- 00071 00072 //--------------------------------------------------------------------------- 00073 // Types 00074 //--------------------------------------------------------------------------- 00075 00076 //--------------------------------------------------------------------------- 00077 // Class 00078 //--------------------------------------------------------------------------- 00079 00083 class OSGScanParseLexer : public OSGScanParseSkel_FlexLexer 00084 { 00085 private: 00086 00087 //----------------------------------------------------------------------- 00088 // types 00089 //----------------------------------------------------------------------- 00090 00091 typedef OSGScanParseSkel_FlexLexer Inherited; 00092 00093 public: 00094 00095 //----------------------------------------------------------------------- 00096 // types 00097 //----------------------------------------------------------------------- 00098 00099 //----------------------------------------------------------------------- 00100 // constants 00101 //----------------------------------------------------------------------- 00102 00103 //----------------------------------------------------------------------- 00104 // enums 00105 //----------------------------------------------------------------------- 00106 00107 private: 00108 00109 //----------------------------------------------------------------------- 00110 // enums 00111 //----------------------------------------------------------------------- 00112 00113 //----------------------------------------------------------------------- 00114 // types 00115 //----------------------------------------------------------------------- 00116 00117 //----------------------------------------------------------------------- 00118 // friend classes 00119 //----------------------------------------------------------------------- 00120 00121 //----------------------------------------------------------------------- 00122 // friend functions 00123 //----------------------------------------------------------------------- 00124 00125 //----------------------------------------------------------------------- 00126 // class variables 00127 //----------------------------------------------------------------------- 00128 00129 //----------------------------------------------------------------------- 00130 // class functions 00131 //----------------------------------------------------------------------- 00132 00133 //----------------------------------------------------------------------- 00134 // instance variables 00135 //----------------------------------------------------------------------- 00136 00137 //----------------------------------------------------------------------- 00138 // instance functions 00139 //----------------------------------------------------------------------- 00140 00142 OSGScanParseLexer(const OSGScanParseLexer &source); 00144 void operator =(const OSGScanParseLexer &source); 00145 00146 virtual int yylex(); 00147 00148 protected: 00149 00150 //----------------------------------------------------------------------- 00151 // enums 00152 //----------------------------------------------------------------------- 00153 00154 //----------------------------------------------------------------------- 00155 // types 00156 //----------------------------------------------------------------------- 00157 00158 //----------------------------------------------------------------------- 00159 // class variables 00160 //----------------------------------------------------------------------- 00161 00162 //----------------------------------------------------------------------- 00163 // class functions 00164 //----------------------------------------------------------------------- 00165 00166 //----------------------------------------------------------------------- 00167 // instance variables 00168 //----------------------------------------------------------------------- 00169 00170 YYSTYPE *lvalp; 00171 00172 std::string tmpStr; 00173 OSG::Int32 expectToken; 00174 OSG::Int32 imageIntsExpected; 00175 00176 //----------------------------------------------------------------------- 00177 // instance functions 00178 //----------------------------------------------------------------------- 00179 00180 public : 00181 00182 //----------------------------------------------------------------------- 00183 // class functions 00184 //----------------------------------------------------------------------- 00185 00186 //----------------------------------------------------------------------- 00187 // instance functions 00188 //----------------------------------------------------------------------- 00189 00190 OSGScanParseLexer(std::istream *arg_yyin = 0, 00191 std::ostream *arg_yyout = 0); 00192 00193 virtual ~OSGScanParseLexer(void); 00194 00195 /*------------------------- your_category -------------------------------*/ 00196 00197 inline int yylex(YYSTYPE *lvalp) 00198 { 00199 this->lvalp = lvalp; 00200 return yylex(); 00201 } 00202 00203 /*------------------------- your_operators ------------------------------*/ 00204 00205 inline void expectType(OSG::Int32 iType) 00206 { expectToken = iType; } 00207 00208 inline void expectImageInts(OSG::Int32 imageIntsExpected) 00209 { this->imageIntsExpected = imageIntsExpected; } 00210 00211 /*------------------------- assignment ----------------------------------*/ 00212 00213 /*------------------------- comparison ----------------------------------*/ 00214 }; 00215 00216 //OSG_END_NAMESPACE 00217 00218 #define OSGSCANPARSELEXER_HEADER_CVSID "@(#)$Id: $" 00219 00220 #endif /* _OSGSCANPARSESKELLEXER_H_ */
1.5.5