jaula API Reference version 1.4.0
jaula_lexan.h
1
2/*
3 * jaula_lexan.h : JSON Analysis User Library Acronym Lexical analysis
4 * definitions
5 *
6 * Copyright (C) 2007, 2008, 2009 Kombo Morongo <morongo666@gmail.com>
7 *
8 * This library is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or (at
11 * your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16 * License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this library; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
21 *
22 * svn info:
23 * $Author: morongo $
24 * $HeadURL: https://jaula.svn.sourceforge.net/svnroot/jaula/tags/jaula-1.4.0/jaula/jaula_lexan.h $
25 * $Id: jaula_lexan.h 45 2009-01-11 16:17:03Z morongo $
26 * $Revision: 45 $
27 */
28
29#ifndef _JAULA_LEXAN_H_
30#define _JAULA_LEXAN_H_
31
36#ifndef YYTOKENTYPE
37# define YYTOKENTYPE
45enum yytokentype
46{
47 NULL_VALUE = 258
48 , FALSE_VALUE
49 , TRUE_VALUE
50 , NUMBER_VALUE
51 , NUMBER_INT_VALUE
52 , STRING_VALUE
53};
54#endif
55#define NULL_VALUE 258
56#define FALSE_VALUE 259
57#define TRUE_VALUE 260
58#define NUMBER_VALUE 261
59#define NUMBER_INT_VALUE 262
60#define STRING_VALUE 263
61
62#ifndef __FLEX_LEXER_H
63#undef yyFlexLexer
64#define yyFlexLexer jaulaFlexLexer
65#include <FlexLexer.h>
66#endif
67
68#include <jaula/jaula_lexan_error.h>
69
70namespace JAULA
71{ // namespace JAULA
83 class Lexan : public ::jaulaFlexLexer
84 { // class Lexan
85 public:
86
98 Lexan(std::istream &in_stream, bool comments_allowed = false);
99
103 virtual ~Lexan();
104
111 virtual int yylex();
112
126 virtual void LexerError(const char *detail);
127
135 std::string const &getTokenData(void) const;
136
144 Lexan_Error const *getErrorReport(void) const;
145
146 private:
147
152
156 std::string tokenData;
157
162
163 }; // class Lexan
164} // namespace JAULA
165#endif
166
167// EOF $Id: jaula_lexan.h 45 2009-01-11 16:17:03Z morongo $
class for lexical analysis exceptions
Definition jaula_lexan_error.h:53
Lexical Analysis implementation.
Definition jaula_lexan.h:84
Lexan_Error const * getErrorReport(void) const
Retrieves details for the last error detected.
Lexan(std::istream &in_stream, bool comments_allowed=false)
Constructor.
std::string tokenData
Container for the token associated data.
Definition jaula_lexan.h:156
std::string const & getTokenData(void) const
Retrieves last token associated data.
Lexan_Error * pErrorReport
Pointer to the last exception detected.
Definition jaula_lexan.h:161
virtual int yylex()
Retrieves tokens from the input.
bool commented
Flag for extending language to accept # comments.
Definition jaula_lexan.h:151
virtual ~Lexan()
Destructor.
virtual void LexerError(const char *detail)
Error report.
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".

API Reference Generated for jaula by

doxygen

jaula project hosted by

SourceForge.net