jaula_parse.h

00001 
00002 /*
00003   jaula_parse.h : JSON Analysis User Library Acronym
00004                                   JSON data parser
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_parse.h $
00026 $Id: jaula_parse.h 2 2007-04-13 19:00:00Z morongo $
00027 $Revision: 2 $
00028 */
00029 
00030 #ifndef _JAULA_PARSE_H_
00031 #define _JAULA_PARSE_H_
00032 
00041 #include <jaula/jaula_lexan.h>
00042 #include <jaula/jaula_syntax_error.h>
00043 #include <jaula/jaula_value_complex.h>
00044 
00045 namespace JAULA
00046 {                                                                                                 // namespace JAULA
00058         class Parser
00059         {                                                                                         // class Parser
00060                 public:
00061 
00065                         Parser(void);
00066 
00070                         ~Parser(void);
00071 
00115                         static Value_Complex *parseStream(std::istream &inpStream, bool comments_allowed = false, bool full_read = true) throw(Exception);
00116 
00117                 private:
00118 
00129                         class Value_Parser
00130                         {                                                                         // class Value_Parser
00131                                 public:
00132 
00136                                         Value_Parser(void);
00137 
00141                                         ~Value_Parser(void);
00142 
00170                                         static Value *parseValue(Lexan &lexan, unsigned int token) throw(Exception);
00171 
00172                                 private:
00173 
00181                                         enum parser_states
00182                                         {
00183                                                 START,                                    
00184                                                 array_addItem,                    
00185                                                 array_nextItem,                   
00186                                                 error,                                    
00187                                                 false_value,                      
00188                                                 null_value,                               
00189                                                 number_int_value,                 
00190                                                 number_value,                     
00191                                                 property_begin,                   
00192                                                 property_name,                    
00193                                                 property_value,                   
00194                                                 property_next,                    
00195                                                 string_value,                     
00196                                                 true_value,                               
00197                                                 END                                               
00198                                         };                                                        //enum parser_states
00199 
00222                                         static void EOFError(Lexan &lexan, Syntax_Error const &ex) throw(Exception);
00223                         };                                                                        // class Value_Parser
00224 
00225         };                                                                                        // class Parser
00226 
00227 }                                                                                                 // namespace JAULA
00228 #endif
00229 
00230 // EOF $Id: jaula_parse.h 2 2007-04-13 19:00:00Z morongo $


Back to JAULA Project Documentation Page.

Go to JAULA Project Home Page.


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".

API Reference Generated for jaula by

doxygen

jaula project hosted by

SourceForge.net Logo