*** empty log message ***

This commit is contained in:
hyung-hwan 2005-05-30 15:55:06 +00:00
parent 4ff42a06f0
commit 3dedd5d0e4
2 changed files with 24 additions and 7 deletions

View File

@ -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 <xp/stx/parser.h>
#include <xp/stx/token.h>
#include <xp/stx/misc.h>
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;
}

View File

@ -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 <xp/stx/stx.h>
#include <xp/stx/lexer.h>
#include <xp/stx/token.h>
struct xp_stx_parser_t
{
xp_stx_lexer_t lexer;
xp_stx_token_t* token;
int error_code;
xp_bool_t __malloced;
};