GnuCash c935c2f+
Loading...
Searching...
No Matches
sixtp-stack.h
1/********************************************************************
2 * sixtp-stack.h *
3 * Copyright 2001 Gnumatic, Inc. *
4 * *
5 * This program is free software; you can redistribute it and/or *
6 * modify it under the terms of the GNU General Public License as *
7 * published by the Free Software Foundation; either version 2 of *
8 * the License, or (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License*
16 * along with this program; if not, contact: *
17 * *
18 * Free Software Foundation Voice: +1-617-542-5942 *
19 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
20 * Boston, MA 02110-1301, USA gnu@gnu.org *
21 * *
22 ********************************************************************/
23
24#ifndef SIXTP_STACK_H
25#define SIXTP_STACK_H
26#include <glib.h>
27
28#include "sixtp.h"
29
30typedef struct sixtp_stack_frame
31{
32 sixtp* parser;
33 gchar* tag;
34 gpointer data_for_children;
35 GSList* data_from_children; /* in reverse chronological order */
36 gpointer frame_data;
37
38 /* Line and column [of the start tag]; set during parsing. */
39 int line;
40 int col;
42
44{
45 xmlSAXHandler handler;
46 sixtp_sax_data data;
47 sixtp_stack_frame* top_frame;
48 gpointer top_frame_data;
49};
50typedef struct _sixtp_parser_context_struct sixtp_parser_context;
51
52void sixtp_stack_frame_destroy (sixtp_stack_frame* sf);
53
54void sixtp_stack_frame_print (sixtp_stack_frame* sf, gint indent, FILE* f);
55
56GSList* sixtp_pop_and_destroy_frame (GSList* frame_stack);
57
58void sixtp_print_frame_stack (GSList* stack, FILE* f);
59
60sixtp_stack_frame* sixtp_stack_frame_new (sixtp* next_parser, char* tag);
61
62sixtp_parser_context* sixtp_context_new (sixtp* initial_parser,
63 gpointer global_data,
64 gpointer top_level_data);
65void sixtp_context_destroy (sixtp_parser_context* context);
66void sixtp_context_run_end_handler (sixtp_parser_context* ctxt);
67
68#endif /* _SIXTP_STACK_H_ */
Definition sixtp.h:130