Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

cr-parser.h

Go to the documentation of this file.
00001 /* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */
00002 
00003 /*
00004  * This file is part of The Croco Library
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of version 2.1 of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00018  * USA
00019  *
00020  * See COPYRIGHTS file for copyrights information.
00021  */
00022 
00023 
00024 /*
00025  *$Id: cr-parser.h,v 1.8 2004/03/04 23:35:59 dodji Exp $
00026  */
00027 #ifndef __CR_PARSER_H__
00028 #define  __CR_PARSER_H__
00029 
00030 #include <glib.h>
00031 #include "cr-input.h"
00032 #include "cr-tknzr.h"
00033 #include "cr-utils.h"
00034 #include "cr-doc-handler.h"
00035 
00036 G_BEGIN_DECLS
00037 
00038 /**
00039  *@file
00040  *The declaration file
00041  *of the #CRParser class.
00042  */
00043 typedef struct _CRParser CRParser ;
00044 typedef struct _CRParserPriv CRParserPriv ;
00045 
00046 
00047 /**
00048  *The implementation of
00049  *the SAC parser.
00050  *The Class is opaque
00051  *and must be manipulated through
00052  *the provided methods.
00053  */
00054 struct _CRParser 
00055 {
00056         CRParserPriv *priv ;
00057 } ;
00058 
00059 CRParser *
00060 cr_parser_new (CRTknzr *a_tknzr) ;
00061 
00062 CRParser *
00063 cr_parser_new_from_buf (guchar *a_buf, gulong a_len,
00064                         enum CREncoding a_enc, 
00065                         gboolean a_free_buf) ;
00066 CRParser *
00067 cr_parser_new_from_file (const guchar *a_file_uri, 
00068                          enum CREncoding a_enc) ;
00069 
00070 CRParser *
00071 cr_parser_new_from_input (CRInput *a_input) ;
00072 
00073 enum CRStatus
00074 cr_parser_set_tknzr (CRParser *a_this, CRTknzr *a_tknzr) ;
00075 
00076 enum CRStatus
00077 cr_parser_get_tknzr (CRParser *a_this, CRTknzr **a_tknzr) ;
00078 
00079 enum CRStatus
00080 cr_parser_try_to_skip_spaces_and_comments (CRParser *a_this) ;
00081 
00082 
00083 enum CRStatus
00084 cr_parser_set_sac_handler (CRParser *a_this, 
00085                            CRDocHandler *a_handler) ;
00086 
00087 enum CRStatus
00088 cr_parser_get_sac_handler (CRParser *a_this, 
00089                            CRDocHandler **a_handler) ;
00090 enum CRStatus
00091 cr_parser_set_use_core_grammar (CRParser *a_this,
00092                                 gboolean a_use_core_grammar) ;
00093 enum CRStatus
00094 cr_parser_get_use_core_grammar (CRParser *a_this,
00095                                 gboolean *a_use_core_grammar) ;
00096 
00097 enum CRStatus
00098 cr_parser_parse (CRParser *a_this) ;
00099         
00100 enum CRStatus
00101 cr_parser_parse_file (CRParser *a_this, 
00102                       const guchar *a_file_uri, 
00103                       enum CREncoding a_enc) ;
00104 
00105 enum CRStatus
00106 cr_parser_parse_buf (CRParser *a_this, const guchar *a_buf, 
00107                      gulong a_len, enum CREncoding a_enc) ;
00108 
00109 enum CRStatus
00110 cr_parser_set_default_sac_handler (CRParser *a_this) ;
00111 
00112 enum CRStatus
00113 cr_parser_parse_term (CRParser *a_this, CRTerm **a_term) ;
00114 
00115 enum CRStatus
00116 cr_parser_parse_expr (CRParser *a_this, CRTerm **a_expr) ;
00117 
00118 enum CRStatus
00119 cr_parser_parse_prio (CRParser *a_this, GString **a_prio) ;
00120 
00121 enum CRStatus
00122 cr_parser_parse_declaration (CRParser *a_this, GString **a_property,
00123                              CRTerm **a_expr, gboolean *a_important) ;
00124 
00125 enum CRStatus
00126 cr_parser_parse_statement_core (CRParser *a_this) ;
00127 
00128 enum CRStatus
00129 cr_parser_parse_ruleset (CRParser *a_this) ;
00130 
00131 enum CRStatus
00132 cr_parser_parse_import (CRParser *a_this, GList ** a_media_list,
00133                         GString **a_import_string) ;
00134 
00135 enum CRStatus
00136 cr_parser_parse_media (CRParser *a_this) ;
00137 
00138 enum CRStatus
00139 cr_parser_parse_page (CRParser *a_this) ;
00140 
00141 enum CRStatus
00142 cr_parser_parse_charset (CRParser *a_this, GString **a_value) ;
00143 
00144 enum CRStatus
00145 cr_parser_parse_font_face (CRParser *a_this) ;
00146 
00147 void
00148 cr_parser_destroy (CRParser *a_this) ;
00149         
00150 G_END_DECLS
00151 
00152 #endif /*__CR_PARSER_H__*/

Generated on Sat Mar 20 02:38:43 2004 for Libcroco by doxygen 1.3.5