2005-05-12 15:51:20 +00:00
|
|
|
/*
|
2005-06-04 07:01:57 +00:00
|
|
|
* $Id: parser.h,v 1.8 2005-06-04 07:01:57 bacon Exp $
|
2005-05-12 15:51:20 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _XP_STX_PARSER_H_
|
|
|
|
#define _XP_STX_PARSER_H_
|
|
|
|
|
2005-05-22 04:11:54 +00:00
|
|
|
#include <xp/stx/stx.h>
|
2005-06-04 07:01:57 +00:00
|
|
|
#include <xp/stx/token.h>
|
2005-05-22 04:11:54 +00:00
|
|
|
|
|
|
|
struct xp_stx_parser_t
|
|
|
|
{
|
2005-05-30 15:27:31 +00:00
|
|
|
int error_code;
|
2005-06-04 07:01:57 +00:00
|
|
|
xp_stx_token_t token;
|
|
|
|
|
|
|
|
/* lexer data */
|
|
|
|
const xp_char_t* text;
|
|
|
|
const xp_cint_t curc;
|
|
|
|
const xp_char_t* curp;
|
|
|
|
|
2005-05-22 04:11:54 +00:00
|
|
|
xp_bool_t __malloced;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct xp_stx_parser_t xp_stx_parser_t;
|
|
|
|
|
2005-05-12 15:51:20 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-05-22 04:11:54 +00:00
|
|
|
xp_stx_parser_t* xp_stx_parser_open (xp_stx_parser_t* parser);
|
2005-05-22 15:03:20 +00:00
|
|
|
void xp_stx_parser_close (xp_stx_parser_t* parser);
|
|
|
|
|
2005-06-02 16:14:58 +00:00
|
|
|
int xp_stx_parse_method (xp_stx_parser_t* parser,
|
|
|
|
xp_stx_word_t method_class, xp_stx_char_t* method_text);
|
|
|
|
|
2005-05-12 15:51:20 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|