Hubbub
|
Context for tokeniser. More...
Data Fields | |
size_t | pending |
Count of pending chars. More... | |
hubbub_string | current_comment |
Current comment text. More... | |
hubbub_token_type | current_tag_type |
Type of current_tag. More... | |
hubbub_tag | current_tag |
Current tag. More... | |
hubbub_doctype | current_doctype |
Current doctype. More... | |
hubbub_tokeniser_state | prev_state |
Previous state. More... | |
uint8_t | last_start_tag_name [10] |
Name of the last start tag emitted. More... | |
size_t | last_start_tag_len |
Length of last start tag. More... | |
struct { | |
uint32_t count | |
bool match | |
} | close_tag_match |
State for matching close tags. More... | |
struct { | |
uint32_t count | |
Index into "DOCTYPE". More... | |
} | match_doctype |
State for matching doctype. More... | |
struct { | |
uint32_t count | |
Index into "[CDATA[". More... | |
uint32_t end | |
Index into "]]>". More... | |
} | match_cdata |
State for matching cdata. More... | |
struct { | |
size_t offset | |
Offset in buffer. More... | |
uint32_t length | |
Length of entity. More... | |
uint32_t codepoint | |
UCS4 codepoint. More... | |
bool complete | |
True if match complete. More... | |
uint32_t poss_length | |
Optimistic length when matching named character references. More... | |
uint8_t base | |
Base for numeric entities. More... | |
int32_t context | |
Context for named entity search. More... | |
size_t prev_len | |
Previous byte length of str. More... | |
bool had_data | |
Whether we read anything after &#(x)? More... | |
bool overflow | |
Whether this entity has has overflowed the maximum numeric entity value. More... | |
hubbub_tokeniser_state return_state | |
State we were called from. More... | |
} | match_entity |
Entity matching state. More... | |
struct { | |
uint32_t line | |
Current line of input. More... | |
uint32_t col | |
Current character in line. More... | |
} | position |
Position in source data. More... | |
uint32_t | allowed_char |
Used for quote matching. More... | |
Context for tokeniser.
Definition at line 99 of file tokeniser.c.
uint32_t hubbub_tokeniser_context::allowed_char |
Used for quote matching.
Definition at line 158 of file tokeniser.c.
Referenced by hubbub_tokeniser_consume_character_reference(), hubbub_tokeniser_handle_attribute_value_dq(), and hubbub_tokeniser_handle_attribute_value_sq().
uint8_t hubbub_tokeniser_context::base |
Base for numeric entities.
Definition at line 137 of file tokeniser.c.
Referenced by hubbub_tokeniser_consume_character_reference(), and hubbub_tokeniser_handle_numbered_entity().
struct { ... } hubbub_tokeniser_context::close_tag_match |
State for matching close tags.
Referenced by hubbub_tokeniser_handle_close_tag_open(), and hubbub_tokeniser_handle_tag_open().
uint32_t hubbub_tokeniser_context::codepoint |
UCS4 codepoint.
Definition at line 131 of file tokeniser.c.
Referenced by hubbub_tokeniser_consume_character_reference(), hubbub_tokeniser_handle_character_reference_data(), hubbub_tokeniser_handle_character_reference_in_attribute_value(), hubbub_tokeniser_handle_named_entity(), and hubbub_tokeniser_handle_numbered_entity().
uint32_t hubbub_tokeniser_context::col |
Current character in line.
Definition at line 154 of file tokeniser.c.
bool hubbub_tokeniser_context::complete |
True if match complete.
Definition at line 132 of file tokeniser.c.
Referenced by hubbub_tokeniser_consume_character_reference(), hubbub_tokeniser_handle_character_reference_data(), hubbub_tokeniser_handle_character_reference_in_attribute_value(), hubbub_tokeniser_handle_named_entity(), and hubbub_tokeniser_handle_numbered_entity().
int32_t hubbub_tokeniser_context::context |
Context for named entity search.
Definition at line 139 of file tokeniser.c.
Referenced by hubbub_tokeniser_consume_character_reference(), and hubbub_tokeniser_handle_named_entity().
uint32_t hubbub_tokeniser_context::count |
Index into "DOCTYPE".
Index into "[CDATA[".
Definition at line 114 of file tokeniser.c.
Referenced by hubbub_tokeniser_handle_after_doctype_name(), hubbub_tokeniser_handle_close_tag_open(), hubbub_tokeniser_handle_markup_declaration_open(), hubbub_tokeniser_handle_match_cdata(), hubbub_tokeniser_handle_match_doctype(), hubbub_tokeniser_handle_match_public(), hubbub_tokeniser_handle_match_system(), and hubbub_tokeniser_handle_tag_open().
hubbub_string hubbub_tokeniser_context::current_comment |
Current comment text.
Definition at line 102 of file tokeniser.c.
Referenced by hubbub_tokeniser_handle_match_cdata(), hubbub_tokeniser_handle_match_comment(), and hubbub_tokeniser_handle_match_doctype().
hubbub_doctype hubbub_tokeniser_context::current_doctype |
Current doctype.
Definition at line 106 of file tokeniser.c.
Referenced by emit_current_doctype(), hubbub_tokeniser_handle_after_doctype_name(), hubbub_tokeniser_handle_after_doctype_public(), hubbub_tokeniser_handle_before_doctype_name(), hubbub_tokeniser_handle_before_doctype_public(), hubbub_tokeniser_handle_before_doctype_system(), hubbub_tokeniser_handle_doctype_name(), hubbub_tokeniser_handle_doctype_public_dq(), hubbub_tokeniser_handle_doctype_public_sq(), hubbub_tokeniser_handle_doctype_system_dq(), hubbub_tokeniser_handle_doctype_system_sq(), hubbub_tokeniser_handle_match_doctype(), hubbub_tokeniser_handle_match_public(), and hubbub_tokeniser_handle_match_system().
hubbub_tag hubbub_tokeniser_context::current_tag |
Current tag.
Definition at line 105 of file tokeniser.c.
Referenced by emit_current_tag(), hubbub_tokeniser_destroy(), hubbub_tokeniser_handle_after_attribute_name(), hubbub_tokeniser_handle_attribute_name(), hubbub_tokeniser_handle_attribute_value_dq(), hubbub_tokeniser_handle_attribute_value_sq(), hubbub_tokeniser_handle_attribute_value_uq(), hubbub_tokeniser_handle_before_attribute_name(), hubbub_tokeniser_handle_before_attribute_value(), hubbub_tokeniser_handle_character_reference_in_attribute_value(), hubbub_tokeniser_handle_close_tag_open(), hubbub_tokeniser_handle_self_closing_start_tag(), hubbub_tokeniser_handle_tag_name(), and hubbub_tokeniser_handle_tag_open().
hubbub_token_type hubbub_tokeniser_context::current_tag_type |
Type of current_tag.
Definition at line 104 of file tokeniser.c.
Referenced by emit_current_tag(), hubbub_tokeniser_handle_close_tag_open(), and hubbub_tokeniser_handle_tag_open().
uint32_t hubbub_tokeniser_context::end |
Index into "]]>".
Definition at line 125 of file tokeniser.c.
Referenced by hubbub_tokeniser_handle_cdata_block(), and hubbub_tokeniser_handle_match_cdata().
bool hubbub_tokeniser_context::had_data |
Whether we read anything after &#(x)?
Definition at line 143 of file tokeniser.c.
Referenced by hubbub_tokeniser_consume_character_reference(), and hubbub_tokeniser_handle_numbered_entity().
size_t hubbub_tokeniser_context::last_start_tag_len |
Length of last start tag.
Definition at line 111 of file tokeniser.c.
Referenced by emit_current_tag(), and hubbub_tokeniser_handle_close_tag_open().
uint8_t hubbub_tokeniser_context::last_start_tag_name[10] |
Name of the last start tag emitted.
Definition at line 109 of file tokeniser.c.
Referenced by emit_current_tag(), and hubbub_tokeniser_handle_close_tag_open().
uint32_t hubbub_tokeniser_context::length |
Length of entity.
Definition at line 130 of file tokeniser.c.
Referenced by hubbub_tokeniser_consume_character_reference(), hubbub_tokeniser_handle_character_reference_data(), hubbub_tokeniser_handle_character_reference_in_attribute_value(), hubbub_tokeniser_handle_named_entity(), and hubbub_tokeniser_handle_numbered_entity().
uint32_t hubbub_tokeniser_context::line |
Current line of input.
Definition at line 153 of file tokeniser.c.
bool hubbub_tokeniser_context::match |
Definition at line 115 of file tokeniser.c.
Referenced by hubbub_tokeniser_handle_close_tag_open(), and hubbub_tokeniser_handle_tag_open().
struct { ... } hubbub_tokeniser_context::match_cdata |
State for matching cdata.
Referenced by hubbub_tokeniser_handle_cdata_block(), hubbub_tokeniser_handle_markup_declaration_open(), and hubbub_tokeniser_handle_match_cdata().
struct { ... } hubbub_tokeniser_context::match_doctype |
State for matching doctype.
Referenced by hubbub_tokeniser_handle_after_doctype_name(), hubbub_tokeniser_handle_markup_declaration_open(), hubbub_tokeniser_handle_match_doctype(), hubbub_tokeniser_handle_match_public(), and hubbub_tokeniser_handle_match_system().
struct { ... } hubbub_tokeniser_context::match_entity |
size_t hubbub_tokeniser_context::offset |
Offset in buffer.
Definition at line 129 of file tokeniser.c.
Referenced by hubbub_tokeniser_consume_character_reference(), hubbub_tokeniser_handle_named_entity(), and hubbub_tokeniser_handle_numbered_entity().
bool hubbub_tokeniser_context::overflow |
Whether this entity has has overflowed the maximum numeric entity value.
Definition at line 145 of file tokeniser.c.
Referenced by hubbub_tokeniser_consume_character_reference(), and hubbub_tokeniser_handle_numbered_entity().
size_t hubbub_tokeniser_context::pending |
Count of pending chars.
Definition at line 100 of file tokeniser.c.
Referenced by emit_current_chars(), hubbub_tokeniser_emit_token(), hubbub_tokeniser_handle_after_attribute_name(), hubbub_tokeniser_handle_after_attribute_value_q(), hubbub_tokeniser_handle_after_doctype_name(), hubbub_tokeniser_handle_after_doctype_public(), hubbub_tokeniser_handle_after_doctype_system(), hubbub_tokeniser_handle_attribute_name(), hubbub_tokeniser_handle_attribute_value_dq(), hubbub_tokeniser_handle_attribute_value_sq(), hubbub_tokeniser_handle_attribute_value_uq(), hubbub_tokeniser_handle_before_attribute_name(), hubbub_tokeniser_handle_before_attribute_value(), hubbub_tokeniser_handle_before_doctype_name(), hubbub_tokeniser_handle_before_doctype_public(), hubbub_tokeniser_handle_before_doctype_system(), hubbub_tokeniser_handle_bogus_comment(), hubbub_tokeniser_handle_bogus_doctype(), hubbub_tokeniser_handle_cdata_block(), hubbub_tokeniser_handle_character_reference_data(), hubbub_tokeniser_handle_character_reference_in_attribute_value(), hubbub_tokeniser_handle_close_tag_open(), hubbub_tokeniser_handle_comment(), hubbub_tokeniser_handle_data(), hubbub_tokeniser_handle_doctype(), hubbub_tokeniser_handle_doctype_name(), hubbub_tokeniser_handle_doctype_public_dq(), hubbub_tokeniser_handle_doctype_public_sq(), hubbub_tokeniser_handle_doctype_system_dq(), hubbub_tokeniser_handle_doctype_system_sq(), hubbub_tokeniser_handle_markup_declaration_open(), hubbub_tokeniser_handle_match_cdata(), hubbub_tokeniser_handle_match_comment(), hubbub_tokeniser_handle_match_doctype(), hubbub_tokeniser_handle_match_public(), hubbub_tokeniser_handle_match_system(), hubbub_tokeniser_handle_self_closing_start_tag(), hubbub_tokeniser_handle_tag_name(), and hubbub_tokeniser_handle_tag_open().
struct { ... } hubbub_tokeniser_context::position |
Position in source data.
uint32_t hubbub_tokeniser_context::poss_length |
Optimistic length when matching named character references.
Definition at line 134 of file tokeniser.c.
Referenced by hubbub_tokeniser_consume_character_reference(), and hubbub_tokeniser_handle_named_entity().
size_t hubbub_tokeniser_context::prev_len |
Previous byte length of str.
Definition at line 141 of file tokeniser.c.
Referenced by hubbub_tokeniser_consume_character_reference().
hubbub_tokeniser_state hubbub_tokeniser_context::prev_state |
Previous state.
Definition at line 107 of file tokeniser.c.
Referenced by hubbub_tokeniser_handle_attribute_value_dq(), hubbub_tokeniser_handle_attribute_value_sq(), hubbub_tokeniser_handle_attribute_value_uq(), and hubbub_tokeniser_handle_character_reference_in_attribute_value().
hubbub_tokeniser_state hubbub_tokeniser_context::return_state |
State we were called from.
Definition at line 148 of file tokeniser.c.
Referenced by hubbub_tokeniser_consume_character_reference(), hubbub_tokeniser_handle_named_entity(), and hubbub_tokeniser_handle_numbered_entity().