*** empty log message ***

This commit is contained in:
hyung-hwan 2005-05-22 04:11:54 +00:00
parent 1ce7078d50
commit 23c82ec467
4 changed files with 69 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: object.h,v 1.13 2005-05-21 15:55:49 bacon Exp $
* $Id: object.h,v 1.14 2005-05-22 04:11:54 bacon Exp $
*/
#ifndef _XP_STX_OBJECT_H_
@ -22,6 +22,21 @@
#define XP_STX_CLASS_POOLDICT 6
#define XP_STX_CLASS_CATEGORY 7
struct xp_stx_class_t
{
xp_stx_objhdr_t header;
xp_stx_word_t name;
xp_stx_word_t spec;
xp_stx_word_t methods;
xp_stx_word_t superclass;
xp_stx_word_t variables;
xp_stx_word_t classvars;
xp_stx_word_t pooldict;
xp_stx_word_t category;
};
typedef struct xp_stx_class_t xp_stx_class_t;
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -1,8 +1,27 @@
/*
* $Id: parser.c,v 1.1 2005-05-12 15:49:07 bacon Exp $
* $Id: parser.c,v 1.2 2005-05-22 04:11:54 bacon Exp $
*/
#include <xp/stx/parser.h>
#include <xp/stx/misc.h>
xp_stx_parser_t* xp_stx_parser_open (xp_stx_parser_t* parser)
{
if (parser == XP_NULL) {
parser = (xp_stx_parser_t*)
xp_stx_malloc (xp_sizeof(xp_stx_parser_t));
if (parser == XP_NULL) return XP_NULL;
parser->__malloced = xp_true;
}
else parser->__malloced = xp_false;
return parser;
}
void xp_stx_parser_close (xp_stx_parser_t* parser)
{
if (parser->__malloced) xp_stx_free (parser);
}
static void __emit_code (
xp_stx_t* stx, xp_stx_word_t method, int value)
@ -19,8 +38,7 @@ static void __emit_instruction (
else __emit_code (high * 16 + low);
}
int xp_stx_parse (
xp_stx_t* stx, xp_stx_word_t method, const xp_char_t* text)
int xp_stx_parser_parse_method (xp_stx_parser_t* parser, const xp_char_t* text)
{
return 0;
}

View File

@ -1,16 +1,26 @@
/*
* $Id: parser.h,v 1.1 2005-05-12 15:49:07 bacon Exp $
* $Id: parser.h,v 1.2 2005-05-22 04:11:54 bacon Exp $
*/
#ifndef _XP_STX_PARSER_H_
#define _XP_STX_PARSER_H_
#include <xp/stx/stx.h>
struct xp_stx_parser_t
{
xp_bool_t __malloced;
};
typedef struct xp_stx_parser_t xp_stx_parser_t;
#ifdef __cplusplus
extern "C" {
#endif
int xp_stx_parse (
xp_stx_t* stx, xp_stx_word_t method, const xp_char_t* text);
xp_stx_parser_t* xp_stx_parser_open (xp_stx_parser_t* parser);
int xp_stx_parser_close (xp_stx_parser_t* parser);
int xp_stx_parser_parse (xp_stx_parser_t* parser, const xp_char_t* text);
#ifdef __cplusplus
}

19
ase/stx/scanner.h Normal file
View File

@ -0,0 +1,19 @@
/*
* $Id: scanner.h,v 1.1 2005-05-22 04:11:54 bacon Exp $
*/
#ifndef _XP_STX_SCANNER_H_
#define _XP_STX_SCANNER_H_
#include <xp/stx/stx.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif