Public Member Functions | |
Value_Parser (void) | |
Constructor. | |
~Value_Parser (void) | |
Destructor. | |
Static Public Member Functions | |
static Value * | parseValue (Lexan &lexan, unsigned int token) throw (Exception) |
reads a single JSON value | |
Private Types | |
enum | parser_states { START, array_addItem, array_nextItem, error, false_value, null_value, number_int_value, number_value, property_begin, property_name, property_value, property_next, string_value, true_value, END } |
Enumeration for the parser state machine. More... | |
Static Private Member Functions | |
static void | EOFError (Lexan &lexan, Syntax_Error const &ex) throw (Exception) |
Analyzes the reason for an EOF condition. |
enum JAULA::Parser::Value_Parser::parser_states [private] |
Enumeration for the parser state machine.
JAULA::Parser::Value_Parser::Value_Parser | ( | void | ) |
Constructor.
JAULA::Parser::Value_Parser::~Value_Parser | ( | void | ) |
Destructor.
void JAULA::Parser::Value_Parser::EOFError | ( | Lexan & | lexan, | |
Syntax_Error const & | ex | |||
) | throw (Exception) [static, private] |
Analyzes the reason for an EOF condition.
lexan | Reference to the lexical analysis instance that reads from the input. | |
ex | Syntax error to be thrown detailing why an EOF at this point is an error. |
Exception | As a result of the execution of this method an exception is thrown with the data conatined in the input parameter or with a JAULA::LEXAN_ERROR type if the EOF is due to an error in the lexical analysis phase. |
References JAULA::Exception::addOrigin().
Value * JAULA::Parser::Value_Parser::parseValue | ( | Lexan & | lexan, | |
unsigned int | token | |||
) | throw (Exception) [static] |
reads a single JSON value
lexan | Reference to the lexical analysis instance that reads from the input. | |
token | Token read from the upper level. * If this token does not belong to an starting value token, an error condition will arise. |
Exception | An exception will be thrown as soon as a lexical or syntax error is found analyzing the stream. The result of printing the exception retrurned through a stream is a human readable text explaining the error found and an approximation of the error line where it occurred. |
References JAULA::Exception::addOrigin(), and JAULA::Value_String::getData().
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".