00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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
00040
00041
00042
00043 typedef struct _CRParser CRParser ;
00044 typedef struct _CRParserPriv CRParserPriv ;
00045
00046
00047
00048
00049
00050
00051
00052
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