jaula API Reference version 1.4.0
jaula_parse.h
1
2/*
3 * jaula_parse.h : JSON Analysis User Library Acronym
4 * JSON data parser
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_parse.h $
25 * $Id: jaula_parse.h 45 2009-01-11 16:17:03Z morongo $
26 * $Revision: 45 $
27 */
28
29#ifndef _JAULA_PARSE_H_
30#define _JAULA_PARSE_H_
31
36#include <jaula/jaula_lexan.h>
37#include <jaula/jaula_syntax_error.h>
38#include <jaula/jaula_value_complex.h>
39
40namespace JAULA
41{ // namespace JAULA
52 class Parser
53 { // class Parser
54 public:
55
59 Parser(void);
60
64 ~Parser(void);
65
109 static Value_Complex *parseStream(std::istream &inpStream
110 , bool comments_allowed = false
111 , bool full_read = true
112 ) throw(Exception);
113
114 private:
115
127 { // class Value_Parser
128 public:
129
133 Value_Parser(void);
134
138 ~Value_Parser(void);
139
167 static Value *parseValue(Lexan &lexan, unsigned int token)
168 throw(Exception);
169
170 private:
171
215
239 static void EOFError(Lexan &lexan, Syntax_Error const &ex)
240 throw(Exception);
241 }; // class Value_Parser
242
243 }; // class Parser
244
245} // namespace JAULA
246#endif
247
248// EOF $Id: jaula_parse.h 45 2009-01-11 16:17:03Z morongo $
Base class for error handling exceptions.
Definition jaula_exception.h:54
Lexical Analysis implementation.
Definition jaula_lexan.h:84
JSON Value Parser.
Definition jaula_parse.h:127
parser_states
Enumeration for the parser state machine.
Definition jaula_parse.h:180
@ property_begin
Definition jaula_parse.h:201
@ property_next
Definition jaula_parse.h:207
@ number_value
Definition jaula_parse.h:199
@ array_addItem
Definition jaula_parse.h:184
@ string_value
Definition jaula_parse.h:209
@ true_value
Definition jaula_parse.h:211
@ null_value
Definition jaula_parse.h:195
@ property_name
Definition jaula_parse.h:203
@ END
Definition jaula_parse.h:213
@ property_value
Definition jaula_parse.h:205
@ START
Definition jaula_parse.h:182
@ array_nextItem
Definition jaula_parse.h:186
@ error
Definition jaula_parse.h:191
@ false_value
Definition jaula_parse.h:193
@ number_int_value
Definition jaula_parse.h:197
static void EOFError(Lexan &lexan, Syntax_Error const &ex)
Analyzes the reason for an EOF condition.
Definition jaula_parse.cc:562
static Value * parseValue(Lexan &lexan, unsigned int token)
reads a single JSON value
Definition jaula_parse.cc:117
Value_Parser(void)
Constructor.
Definition jaula_parse.cc:111
~Value_Parser(void)
Destructor.
Definition jaula_parse.cc:114
JSON Data Parser.
Definition jaula_parse.h:53
static Value_Complex * parseStream(std::istream &inpStream, bool comments_allowed=false, bool full_read=true)
Parses JSON data from a stream.
Definition jaula_parse.cc:72
Parser(void)
Constructor.
Definition jaula_parse.cc:66
~Parser(void)
Destructor.
Definition jaula_parse.cc:69
class for syntax exceptions
Definition jaula_syntax_error.h:53
Base class for handling complex values.
Definition jaula_value_complex.h:53
Base class for handling values.
Definition jaula_value.h:53
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