2005-02-04 15:39:11 +00:00
|
|
|
/*
|
2005-05-28 13:34:26 +00:00
|
|
|
* $Id: token.h,v 1.7 2005-05-28 13:34:26 bacon Exp $
|
2005-02-04 15:39:11 +00:00
|
|
|
*/
|
|
|
|
|
2005-05-28 13:34:26 +00:00
|
|
|
#ifndef _XP_LSP_TOKEN_H_
|
|
|
|
#define _XP_LSP_TOKEN_H_
|
2005-02-04 15:39:11 +00:00
|
|
|
|
2005-05-28 13:34:26 +00:00
|
|
|
#include <xp/lsp/types.h>
|
2005-02-04 15:39:11 +00:00
|
|
|
|
|
|
|
struct xp_lisp_token_t
|
|
|
|
{
|
|
|
|
int type;
|
|
|
|
|
2005-02-14 14:37:50 +00:00
|
|
|
xp_lisp_int_t ivalue;
|
|
|
|
xp_lisp_real_t fvalue;
|
2005-02-04 15:39:11 +00:00
|
|
|
|
|
|
|
xp_size_t capacity;
|
|
|
|
xp_size_t size;
|
2005-02-07 15:10:41 +00:00
|
|
|
xp_char_t* buffer;
|
2005-02-04 15:39:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct xp_lisp_token_t xp_lisp_token_t;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-05-22 13:41:14 +00:00
|
|
|
xp_lisp_token_t* xp_lisp_token_new (xp_size_t capacity);
|
|
|
|
void xp_lisp_token_free (xp_lisp_token_t* token);
|
|
|
|
int xp_lisp_token_addc (xp_lisp_token_t* token, xp_cint_t c);
|
|
|
|
void xp_lisp_token_clear (xp_lisp_token_t* token);
|
|
|
|
xp_char_t* xp_lisp_token_yield (xp_lisp_token_t* token, xp_size_t capacity);
|
|
|
|
int xp_lisp_token_compare (xp_lisp_token_t* token, const xp_char_t* str);
|
2005-02-04 15:39:11 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|