*** empty log message ***

This commit is contained in:
2005-06-05 05:27:02 +00:00
parent 33639ee40f
commit 537312c735
6 changed files with 205 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
/*
* $Id: parser.h,v 1.8 2005-06-04 07:01:57 bacon Exp $
* $Id: parser.h,v 1.9 2005-06-05 05:26:24 bacon Exp $
*/
#ifndef _XP_STX_PARSER_H_
@@ -8,21 +8,32 @@
#include <xp/stx/stx.h>
#include <xp/stx/token.h>
enum
{
XP_STX_PARSER_ERROR_NONE = 0,
XP_STX_PARSER_ERROR_INPUT,
XP_STX_PARSER_ERROR_INVALID,
XP_STX_PARSER_ERROR_CHAR
};
typedef struct xp_stx_parser_t xp_stx_parser_t;
struct xp_stx_parser_t
{
int error_code;
xp_stx_token_t token;
/* lexer data */
const xp_char_t* text;
const xp_cint_t curc;
const xp_char_t* curp;
xp_stx_cint_t curc;
xp_stx_cint_t ungotc[5];
xp_size_t ungotc_count;
void* input;
int (*input_reset) (xp_stx_parser_t*);
int (*input_consume) (xp_stx_parser_t*, xp_stx_cint_t*);
xp_bool_t __malloced;
};
typedef struct xp_stx_parser_t xp_stx_parser_t;
#ifdef __cplusplus
extern "C" {
#endif