2005-02-04 15:39:11 +00:00
|
|
|
/*
|
2005-09-18 10:23:19 +00:00
|
|
|
* $Id: token.h,v 1.9 2005-09-18 10:18:35 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-09-18 10:23:19 +00:00
|
|
|
#include <xp/lsp/types.h>
|
2005-09-18 08:10:50 +00:00
|
|
|
#include <xp/lsp/name.h>
|
2005-02-04 15:39:11 +00:00
|
|
|
|
2005-09-18 08:10:50 +00:00
|
|
|
enum
|
2005-02-04 15:39:11 +00:00
|
|
|
{
|
2005-09-18 08:10:50 +00:00
|
|
|
XP_LSP_TOKEN_END
|
|
|
|
};
|
|
|
|
|
|
|
|
struct xp_lsp_token_t
|
|
|
|
{
|
|
|
|
int type;
|
2005-02-04 15:39:11 +00:00
|
|
|
|
2005-09-18 08:10:50 +00:00
|
|
|
xp_lsp_int_t ivalue;
|
|
|
|
xp_lsp_real_t fvalue;
|
2005-02-04 15:39:11 +00:00
|
|
|
|
2005-09-18 08:10:50 +00:00
|
|
|
xp_lsp_name_t name;
|
|
|
|
xp_bool_t __malloced;
|
2005-02-04 15:39:11 +00:00
|
|
|
};
|
|
|
|
|
2005-09-18 08:10:50 +00:00
|
|
|
typedef struct xp_lsp_token_t xp_lsp_token_t;
|
2005-02-04 15:39:11 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-09-18 08:10:50 +00:00
|
|
|
xp_lsp_token_t* xp_lsp_token_open (
|
|
|
|
xp_lsp_token_t* token, xp_word_t capacity);
|
|
|
|
void xp_lsp_token_close (xp_lsp_token_t* token);
|
|
|
|
|
|
|
|
int xp_lsp_token_addc (xp_lsp_token_t* token, xp_cint_t c);
|
|
|
|
int xp_lsp_token_adds (xp_lsp_token_t* token, const xp_char_t* s);
|
|
|
|
void xp_lsp_token_clear (xp_lsp_token_t* token);
|
|
|
|
xp_char_t* xp_lsp_token_yield (xp_lsp_token_t* token, xp_word_t capacity);
|
|
|
|
int xp_lsp_token_compare_name (xp_lsp_token_t* token, const xp_char_t* str);
|
2005-02-04 15:39:11 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|