1 /* $Id: hparser.h,v 2.34 2006/04/26 07:01:10 gisle Exp $
3 * Copyright 1999-2005, Gisle Aas
4 * Copyright 1999-2000, Michael A. Chase
6 * This library is free software; you can redistribute it and/or
7 * modify it under the same terms as Perl itself.
11 * Declare various structures and constants. The main thing
12 * is 'struct p_state' that contains various fields to represent
13 * the state of the parser.
18 enum marked_section_t {
26 #endif /* MARKED_SECTION */
29 #define P_SIGNATURE 0x16091964 /* tag struct p_state for safer cast */
43 E_NONE /* used for reporting skipped text (non-events) */
45 typedef enum event_id event_id_t;
47 /* must match event_id_t above */
48 static char* event_id_str[] = {
77 /* special parsing modes */
80 bool no_dash_dash_comment_end;
81 char *pending_end_tag;
83 /* unbroken_text option needs a buffer of pending text */
85 bool pend_text_is_cdata;
86 STRLEN pend_text_offset;
87 STRLEN pend_text_line;
88 STRLEN pend_text_column;
90 /* skipped text is accumulated here */
94 /* marked section support */
95 enum marked_section_t ms;
100 /* various boolean configuration attributes */
108 bool closing_plaintext;
110 bool empty_element_tags;
113 /* other configuration stuff */
115 struct p_handler handlers[EVENT_COUNT];
116 bool argspec_entity_decode;
123 /* these are set when we are currently inside an element we want to ignore */
124 SV* ignoring_element;
128 HV* entity2char; /* %HTML::Entities::entity2char */
131 typedef struct p_state PSTATE;