8#ifndef hubbub_parser_h_
9#define hubbub_parser_h_
80 const uint8_t *data,
size_t len);
97 const uint8_t *data,
size_t len);
hubbub_error
Definition: errors.h:18
hubbub_error(* hubbub_token_handler)(const hubbub_token *token, void *pw)
Type of token handling function.
Definition: functypes.h:29
void(* hubbub_error_handler)(uint32_t line, uint32_t col, const char *message, void *pw)
Type of parse error handling function.
Definition: functypes.h:40
size_t len
Definition: initial.c:23
hubbub_error hubbub_parser_insert_chunk(hubbub_parser *parser, const uint8_t *data, size_t len)
Insert a chunk of data into a hubbub parser input stream.
Definition: parser.c:218
const char * hubbub_parser_read_charset(hubbub_parser *parser, hubbub_charset_source *source)
Read the document charset.
Definition: parser.c:305
hubbub_error hubbub_parser_destroy(hubbub_parser *parser)
Destroy a hubbub parser.
Definition: parser.c:102
hubbub_error hubbub_parser_parse_chunk(hubbub_parser *parser, const uint8_t *data, size_t len)
Pass a chunk of data to a hubbub parser for parsing.
Definition: parser.c:235
union hubbub_parser_optparams hubbub_parser_optparams
Hubbub parser option parameters.
hubbub_error hubbub_parser_create(const char *enc, bool fix_enc, hubbub_parser **parser)
Create a hubbub parser.
Definition: parser.c:41
hubbub_parser_opttype
Hubbub parser option types.
Definition: parser.h:29
@ HUBBUB_PARSER_PAUSE
Definition: parser.h:36
@ HUBBUB_PARSER_ENABLE_SCRIPTING
Definition: parser.h:35
@ HUBBUB_PARSER_DOCUMENT_NODE
Definition: parser.h:34
@ HUBBUB_PARSER_TREE_HANDLER
Definition: parser.h:33
@ HUBBUB_PARSER_TOKEN_HANDLER
Definition: parser.h:30
@ HUBBUB_PARSER_ERROR_HANDLER
Definition: parser.h:31
@ HUBBUB_PARSER_CONTENT_MODEL
Definition: parser.h:32
hubbub_error hubbub_parser_setopt(hubbub_parser *parser, hubbub_parser_opttype type, hubbub_parser_optparams *params)
Configure a hubbub parser.
Definition: parser.c:126
hubbub_error hubbub_parser_completed(hubbub_parser *parser)
Inform the parser that the last chunk of data has been parsed.
Definition: parser.c:279
Hubbub parser object.
Definition: parser.c:24
Hubbub tree handler.
Definition: tree.h:273
hubbub_charset_source
Source of charset information, in order of importance A client-dictated charset will override all oth...
Definition: types.h:22
hubbub_content_model
Content model flag.
Definition: types.h:32
Hubbub parser option parameters.
Definition: parser.h:42
hubbub_error_handler handler
Definition: parser.h:49
struct hubbub_parser_optparams::@12 error_handler
Error handling callback.
struct hubbub_parser_optparams::@11 token_handler
Token handling callback.
bool enable_scripting
Whether to enable scripting.
Definition: parser.h:61
void * document_node
Document node.
Definition: parser.h:59
struct hubbub_parser_optparams::@13 content_model
Current content model.
hubbub_token_handler handler
Definition: parser.h:44
bool pause_parse
Pause parsing.
Definition: parser.h:63
void * pw
Definition: parser.h:45
hubbub_content_model model
Definition: parser.h:54
hubbub_tree_handler * tree_handler
Tree handling callbacks.
Definition: parser.h:57