qse/ase/lsp/token.h

40 lines
865 B
C
Raw Normal View History

2005-02-04 15:39:11 +00:00
/*
2005-02-14 14:37:50 +00:00
* $Id: token.h,v 1.5 2005-02-14 14:37:50 bacon Exp $
2005-02-04 15:39:11 +00:00
*/
2005-02-04 16:00:37 +00:00
#ifndef _XP_LISP_TOKEN_H_
#define _XP_LISP_TOKEN_H_
2005-02-04 15:39:11 +00:00
2005-02-04 16:03:25 +00:00
#include <xp/lisp/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
xp_lisp_token_t* xp_lisp_token_new (xp_size_t capacity);
void xp_lisp_token_free (xp_lisp_token_t* token);
2005-02-07 15:10:41 +00:00
int xp_lisp_token_addc (xp_lisp_token_t* token, xp_cint_t c);
2005-02-04 15:39:11 +00:00
void xp_lisp_token_clear (xp_lisp_token_t* token);
2005-02-07 15:10:41 +00:00
xp_char_t* xp_lisp_token_transfer (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