00001 00002 /* 00003 jaula_lexan.h : JSON Analysis User Library Acronym 00004 Lexical analysis definitions 00005 00006 Copyright (C) 2007 Kombo Morongo <morongo666@gmail.com> 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Lesser General Public 00010 License as published by the Free Software Foundation; either 00011 version 2.1 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with this library; if not, write to the Free Software 00020 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 00021 00022 svn info: 00023 00024 $Author: morongo $ 00025 $HeadURL: https://jaula.svn.sourceforge.net/svnroot/jaula/trunk/jaula/jaula_lexan.h $ 00026 $Id: jaula_lexan.h 22 2007-04-20 18:55:39Z morongo $ 00027 $Revision: 22 $ 00028 */ 00029 00030 #ifndef _JAULA_LEXAN_H_ 00031 #define _JAULA_LEXAN_H_ 00032 00041 /* Lexical Analysis Value Tokens. */ 00042 #ifndef YYTOKENTYPE 00043 # define YYTOKENTYPE 00044 /* Put the tokens into the symbol table, so that GDB and other debuggers 00045 know about them. */ 00046 enum yytokentype 00047 { 00048 NULL_VALUE = 258 00049 , FALSE_VALUE 00050 , TRUE_VALUE 00051 , NUMBER_VALUE 00052 , NUMBER_INT_VALUE 00053 , STRING_VALUE 00054 }; 00055 #endif 00056 #define NULL_VALUE 258 00057 #define FALSE_VALUE 259 00058 #define TRUE_VALUE 260 00059 #define NUMBER_VALUE 261 00060 #define NUMBER_INT_VALUE 262 00061 #define STRING_VALUE 263 00062 00063 #ifndef __FLEX_LEXER_H 00064 #undef yyFlexLexer 00065 #define yyFlexLexer jaulaFlexLexer 00066 #include <FlexLexer.h> 00067 #endif 00068 00069 #include <jaula/jaula_lexan_error.h> 00070 00071 namespace JAULA 00072 { // namespace JAULA 00084 class Lexan : public ::jaulaFlexLexer 00085 { // class Lexan 00086 public: 00087 00100 Lexan(std::istream &in_stream, bool comments_allowed = false); 00101 00105 virtual ~Lexan(); 00106 00113 virtual int yylex(); 00114 00128 virtual void LexerError(const char *detail); 00129 00138 std::string const &getTokenData(void) const; 00139 00148 Lexan_Error const *getErrorReport(void) const; 00149 00150 private: 00151 00155 bool commented; 00156 00160 std::string tokenData; 00161 00165 Lexan_Error *pErrorReport; 00166 00167 }; // class Lexan 00168 } // namespace JAULA 00169 #endif 00170 00171 // EOF $Id: jaula_lexan.h 22 2007-04-20 18:55:39Z morongo $
Copyright (c) 2007 Kombo Morongo.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".