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  * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
00007  *
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of version 2.1 of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00020  * USA
00021  */
00022 
00023 
00024 /*
00025  *$Id: cr-parser.h,v 1.8 2003/06/20 22:08:50 dodji Exp $
00026  */
00027 #ifndef __CR_PARSER_H__
00028 #define  __CR_PARSER_H__
00029 
00030 #include <glib.h>
00031 #include "cr-parser-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 (const 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_try_to_skip_spaces_and_comments (CRParser *a_this) ;
00078 
00079 
00080 enum CRStatus
00081 cr_parser_set_sac_handler (CRParser *a_this, 
00082                            CRDocHandler *a_handler) ;
00083 
00084 enum CRStatus
00085 cr_parser_get_sac_handler (CRParser *a_this, 
00086                            CRDocHandler **a_handler) ;
00087 enum CRStatus
00088 cr_parser_set_use_core_grammar (CRParser *a_this,
00089                                 gboolean a_use_core_grammar) ;
00090 enum CRStatus
00091 cr_parser_get_use_core_grammar (CRParser *a_this,
00092                                 gboolean *a_use_core_grammar) ;
00093 
00094 enum CRStatus
00095 cr_parser_parse (CRParser *a_this) ;
00096         
00097 enum CRStatus
00098 cr_parser_parse_file (CRParser *a_this, 
00099                       const guchar *a_file_uri, 
00100                       enum CREncoding a_enc) ;
00101 
00102 enum CRStatus
00103 cr_parser_parse_buf (CRParser *a_this, const guchar *a_buf, 
00104                      gulong a_len, enum CREncoding a_enc) ;
00105 
00106 enum CRStatus
00107 cr_parser_set_default_sac_handler (CRParser *a_this) ;
00108 
00109 enum CRStatus
00110 cr_parser_parse_expr (CRParser *a_this, CRTerm **a_expr) ;
00111 
00112 enum CRStatus
00113 cr_parser_parse_declaration (CRParser *a_this, GString **a_property,
00114                              CRTerm **a_expr) ;
00115 enum CRStatus
00116 cr_parser_parse_statement_core (CRParser *a_this) ;
00117 
00118 enum CRStatus
00119 cr_parser_parse_ruleset (CRParser *a_this) ;
00120 
00121 enum CRStatus
00122 cr_parser_parse_import (CRParser *a_this, GList ** a_media_list,
00123                         GString **a_import_string) ;
00124 
00125 enum CRStatus
00126 cr_parser_parse_media (CRParser *a_this) ;
00127 
00128 enum CRStatus
00129 cr_parser_parse_page (CRParser *a_this) ;
00130 
00131 enum CRStatus
00132 cr_parser_parse_charset (CRParser *a_this, GString **a_value) ;
00133 
00134 enum CRStatus
00135 cr_parser_parse_font_face (CRParser *a_this) ;
00136 
00137 void
00138 cr_parser_destroy (CRParser *a_this) ;
00139         
00140 G_END_DECLS
00141 
00142 #endif /*__CR_PARSER_H__*/

Generated on Wed Oct 1 01:36:47 2003 for Libcroco by doxygen 1.3.3