2007-05-02 01:07:00 +00:00
|
|
|
/*
|
2008-09-05 04:58:08 +00:00
|
|
|
* $Id: parse.h 363 2008-09-04 10:58:08Z baconevi $
|
2007-05-02 01:07:00 +00:00
|
|
|
*
|
|
|
|
* {License}
|
|
|
|
*/
|
|
|
|
|
2008-09-05 04:58:08 +00:00
|
|
|
#ifndef _ASE_LIB_AWK_PARSE_H_
|
|
|
|
#define _ASE_LIB_AWK_PARSE_H_
|
|
|
|
|
|
|
|
/* these enums should match kwtab in parse.c */
|
|
|
|
enum kw_t
|
|
|
|
{
|
|
|
|
KW_IN,
|
|
|
|
KW_BEGIN,
|
|
|
|
KW_END,
|
|
|
|
KW_FUNCTION,
|
|
|
|
KW_LOCAL,
|
|
|
|
KW_GLOBAL,
|
|
|
|
KW_IF,
|
|
|
|
KW_ELSE,
|
|
|
|
KW_WHILE,
|
|
|
|
KW_FOR,
|
|
|
|
KW_DO,
|
|
|
|
KW_BREAK,
|
|
|
|
KW_CONTINUE,
|
|
|
|
KW_RETURN,
|
|
|
|
KW_EXIT,
|
|
|
|
KW_NEXT,
|
|
|
|
KW_NEXTFILE,
|
|
|
|
KW_NEXTOFILE,
|
|
|
|
KW_DELETE,
|
|
|
|
KW_RESET,
|
|
|
|
KW_PRINT,
|
|
|
|
KW_PRINTF,
|
|
|
|
KW_GETLINE,
|
|
|
|
};
|
2007-05-02 01:07:00 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int ase_awk_putsrcstr (ase_awk_t* awk, const ase_char_t* str);
|
|
|
|
int ase_awk_putsrcstrx (
|
|
|
|
ase_awk_t* awk, const ase_char_t* str, ase_size_t len);
|
|
|
|
|
|
|
|
const ase_char_t* ase_awk_getglobalname (
|
|
|
|
ase_awk_t* awk, ase_size_t idx, ase_size_t* len);
|
2008-09-05 04:58:08 +00:00
|
|
|
ase_cstr_t* ase_awk_getkw (ase_awk_t* awk, int id, ase_cstr_t* s);
|
|
|
|
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2007-09-25 00:12:00 +00:00
|
|
|
int ase_awk_initglobals (ase_awk_t* awk);
|
|
|
|
|
2007-05-02 01:07:00 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|