Menu

[r369]: / trunk / php-java-bridge / parser.h  Maximize  Restore  History

Download this file

39 lines (30 with data), 952 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*-*- mode: C; tab-width:4 -*-*/
/**\file
* Parse the XML protocol.
*
* Creates a parser structure and calls the registered begin and end
* callbacks. Note: The parser implementation is dublicated from
* Parser.java. If you change this code, you must change Parser.java,
* too!
*/
#ifndef JAVA_PARSER_H
#define JAVA_PARSER_H
#include "protocol.h"
#define PARSER_GET_STRING(pst, pos) ((*pst[pos].string)+pst[pos].off)
typedef struct {
size_t length, off;
unsigned char** string; //address of s (stored in proxyenv)
} parser_string_t;
typedef struct {
short n;
parser_string_t *strings;
} parser_tag_t;
typedef struct parser_cb {
void (*begin)(parser_tag_t[3], struct parser_cb *);
void (*end)(parser_string_t[1], struct parser_cb *);
void *ctx;
proxyenv *env;
} parser_cb_t;
extern short EXT_GLOBAL (parse)(proxyenv *env, parser_cb_t *cb);
extern short EXT_GLOBAL (parse_header) (proxyenv *env, parser_cb_t *cb);
#endif
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.