diff --git a/ase/stx/parser.c b/ase/stx/parser.c index 68c6be17..78b65348 100644 --- a/ase/stx/parser.c +++ b/ase/stx/parser.c @@ -1,8 +1,9 @@ /* - * $Id: parser.c,v 1.7 2005-05-30 15:24:12 bacon Exp $ + * $Id: parser.c,v 1.8 2005-05-30 15:55:06 bacon Exp $ */ #include +#include #include xp_stx_parser_t* xp_stx_parser_open (xp_stx_parser_t* parser) @@ -31,8 +32,28 @@ void xp_stx_parser_close (xp_stx_parser_t* parser) if (parser->__malloced) xp_stx_free (parser); } -int xp_stx_parser_parse (xp_stx_parser_t* parser) +/* set input stream */ +/* +int xp_stx_parser_set_ios (xp_stx_parser_t* parser, input_func) { +} + +int xp_stx_parser_parse_filein (xp_stx_parser_t* parser) +{ + xp_stx_token_t* token; + + token = xp_stx_lexer_consume (&parser->lexer); + if (token == XP_NULL) return -1; + + if (token->type == XP_STX_TOKEN_EXCLM) +} +*/ + +int xp_stx_parser_parse_method ( + xp_stx_parser_t* parser, xp_stx_word_t class, xp_stx_char_t* text) +{ + xp_stx_lexer_reset (&parser->lexer, text); + parser->token = xp_stx_lexer_consume (&parser->lexer); if (parser->token == XP_NULL) { /*parser->error_code = xxx;*/ @@ -41,5 +62,3 @@ int xp_stx_parser_parse (xp_stx_parser_t* parser) return 0; } - - diff --git a/ase/stx/parser.h b/ase/stx/parser.h index f4faf74d..cae534d3 100644 --- a/ase/stx/parser.h +++ b/ase/stx/parser.h @@ -1,5 +1,5 @@ /* - * $Id: parser.h,v 1.5 2005-05-30 15:24:12 bacon Exp $ + * $Id: parser.h,v 1.6 2005-05-30 15:55:06 bacon Exp $ */ #ifndef _XP_STX_PARSER_H_ @@ -7,12 +7,10 @@ #include #include -#include struct xp_stx_parser_t { xp_stx_lexer_t lexer; - xp_stx_token_t* token; int error_code; xp_bool_t __malloced; };