Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

# parser.h

Go to the documentation of this file.

    00001 /*-*- mode: C; tab-width:4 -*-*/
    00002
    00012 #ifndef JAVA_PARSER_H
    00013 #define JAVA_PARSER_H
    00014
    00015 #include "protocol.h"
    00016
    00017 #define PARSER_GET_STRING(pst, pos) ((*pst[pos].string)+pst[pos].off)
    00018 typedef struct {
    00019   size_t length, off;
    00020   unsigned char** string; //address of s (stored in proxyenv)
    00021 } parser_string_t;
    00022
    00023 typedef struct {
    00024   short n;
    00025   parser_string_t *strings;
    00026 } parser_tag_t;
    00027
    00028 typedef struct parser_cb {
    00029   void (*begin)(parser_tag_t[3], struct parser_cb *);
    00030   void (*end)(parser_string_t[1], struct parser_cb *);
    00031   void *ctx;
    00032   proxyenv *env;
    00033 } parser_cb_t;
    00034
    00035 extern short EXT_GLOBAL (parse)(proxyenv *env, parser_cb_t *cb);
    00036 extern short EXT_GLOBAL (parse_header) (proxyenv *env, parser_cb_t *cb);
    00037
    00038 #endif