jaula_lexan.h
/*
* jaula_lexan.h : JSON Analysis User Library Acronym Lexical analysis
* definitions
*
* Copyright (C) 2007, 2008, 2009 Kombo Morongo <morongo666@gmail.com>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*
* svn info:
* $Author: morongo $
* $HeadURL: https://jaula.svn.sourceforge.net/svnroot/jaula/tags/jaula-1.4.0/jaula/jaula_lexan.h $
* $Id: jaula_lexan.h 45 2009-01-11 16:17:03Z morongo $
* $Revision: 45 $
*/
#ifndef _JAULA_LEXAN_H_
#define _JAULA_LEXAN_H_
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
NULL_VALUE = 258
, FALSE_VALUE
, TRUE_VALUE
, NUMBER_VALUE
, NUMBER_INT_VALUE
, STRING_VALUE
};
#endif
#define NULL_VALUE 258
#define FALSE_VALUE 259
#define TRUE_VALUE 260
#define NUMBER_VALUE 261
#define NUMBER_INT_VALUE 262
#define STRING_VALUE 263
#ifndef __FLEX_LEXER_H
#undef yyFlexLexer
#define yyFlexLexer jaulaFlexLexer
#include <FlexLexer.h>
#endif
#include <jaula/jaula_lexan_error.h>
namespace JAULA
{ // namespace JAULA
class Lexan : public ::jaulaFlexLexer
{ // class Lexan
public:
Lexan(std::istream &in_stream, bool comments_allowed = false);
virtual ~Lexan();
virtual int yylex();
virtual void LexerError(const char *detail);
std::string const &getTokenData(void) const;
Lexan_Error const *getErrorReport(void) const;
private:
bool commented;
std::string tokenData;
Lexan_Error *pErrorReport;
}; // class Lexan
} // namespace JAULA
#endif
// EOF $Id: jaula_lexan.h 45 2009-01-11 16:17:03Z morongo $
JAULA::Lexan_Error
class for lexical analysis exceptions
Definition jaula_lexan_error.h:53
JAULA::Lexan::getErrorReport
Lexan_Error const * getErrorReport(void) const
Retrieves details for the last error detected.
JAULA::Lexan::Lexan
Lexan(std::istream &in_stream, bool comments_allowed=false)
Constructor.
JAULA::Lexan::tokenData
std::string tokenData
Container for the token associated data.
Definition jaula_lexan.h:156
JAULA::Lexan::getTokenData
std::string const & getTokenData(void) const
Retrieves last token associated data.
JAULA::Lexan::pErrorReport
Lexan_Error * pErrorReport
Pointer to the last exception detected.
Definition jaula_lexan.h:161
JAULA::Lexan::yylex
virtual int yylex()
Retrieves tokens from the input.
JAULA::Lexan::commented
bool commented
Flag for extending language to accept # comments.
Definition jaula_lexan.h:151
JAULA::Lexan::~Lexan
virtual ~Lexan()
Destructor.
JAULA::Lexan::LexerError
virtual void LexerError(const char *detail)
Error report.
JAULA
Namespace for all library definitions.
Definition jaula.h:439

Back to JAULA Project Documentation Page.

Go to JAULA Project Home Page.

Copyright (c) 2007, 2008, 2009 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".

SourceForge.net