qse/ase/awk/run.h

117 lines
2.2 KiB
C
Raw Normal View History

2006-03-07 16:02:58 +00:00
/*
2006-11-18 15:36:57 +00:00
* $Id: run.h,v 1.25 2006-11-18 15:36:57 bacon Exp $
2006-03-07 16:02:58 +00:00
*/
2006-10-24 04:10:12 +00:00
#ifndef _ASE_AWK_RUN_H_
#define _ASE_AWK_RUN_H_
2006-03-07 16:02:58 +00:00
2006-10-24 04:10:12 +00:00
#ifndef _ASE_AWK_AWK_H_
#error Never include this file directly. Include <ase/awk/awk.h> instead
2006-03-07 16:02:58 +00:00
#endif
2006-04-14 16:26:00 +00:00
enum
{
/* if you change this, you have to change __assop_str in tree.c */
2006-10-24 04:10:12 +00:00
ASE_AWK_ASSOP_NONE,
ASE_AWK_ASSOP_PLUS,
ASE_AWK_ASSOP_MINUS,
ASE_AWK_ASSOP_MUL,
ASE_AWK_ASSOP_DIV,
ASE_AWK_ASSOP_MOD,
ASE_AWK_ASSOP_EXP
2006-04-14 16:26:00 +00:00
};
2006-03-07 16:02:58 +00:00
enum
{
2006-03-30 16:31:50 +00:00
/* if you change this, you have to change
2006-04-11 15:44:30 +00:00
* __binop_str in tree.c and __binop_func in run.c accordingly. */
2006-10-24 04:10:12 +00:00
ASE_AWK_BINOP_LOR,
ASE_AWK_BINOP_LAND,
ASE_AWK_BINOP_IN,
2006-04-29 12:09:29 +00:00
2006-10-24 04:10:12 +00:00
ASE_AWK_BINOP_BOR,
ASE_AWK_BINOP_BXOR,
ASE_AWK_BINOP_BAND,
2006-03-31 12:04:14 +00:00
2006-10-24 04:10:12 +00:00
ASE_AWK_BINOP_EQ,
ASE_AWK_BINOP_NE,
ASE_AWK_BINOP_GT,
ASE_AWK_BINOP_GE,
ASE_AWK_BINOP_LT,
ASE_AWK_BINOP_LE,
2006-03-31 12:04:14 +00:00
2006-10-24 04:10:12 +00:00
ASE_AWK_BINOP_LSHIFT,
ASE_AWK_BINOP_RSHIFT,
2006-03-31 12:04:14 +00:00
2006-10-24 04:10:12 +00:00
ASE_AWK_BINOP_PLUS,
ASE_AWK_BINOP_MINUS,
ASE_AWK_BINOP_MUL,
ASE_AWK_BINOP_DIV,
ASE_AWK_BINOP_MOD,
ASE_AWK_BINOP_EXP,
2006-04-12 03:54:12 +00:00
2006-10-24 04:10:12 +00:00
ASE_AWK_BINOP_CONCAT,
ASE_AWK_BINOP_MA,
ASE_AWK_BINOP_NM
2006-03-31 12:04:14 +00:00
};
enum
{
2006-04-02 12:45:04 +00:00
/* if you change this, you have to change
* __unrop_str in tree.c accordingly. */
2006-10-24 04:10:12 +00:00
ASE_AWK_UNROP_PLUS,
ASE_AWK_UNROP_MINUS,
ASE_AWK_UNROP_NOT,
ASE_AWK_UNROP_BNOT
2006-04-02 12:45:04 +00:00
};
enum
{
/* if you change this, you have to change
* __incop_str in tree.c accordingly. */
2006-10-24 04:10:12 +00:00
ASE_AWK_INCOP_PLUS,
ASE_AWK_INCOP_MINUS
2006-03-07 16:02:58 +00:00
};
2006-07-12 07:25:15 +00:00
enum
{
2006-08-27 15:29:21 +00:00
/* this table should match __bvtab in parse.c.
2006-10-24 04:10:12 +00:00
* in addition, ase_awk_setglobal also counts
2006-08-27 15:29:21 +00:00
* on the order of these values */
2006-07-12 07:25:15 +00:00
2006-10-24 04:10:12 +00:00
ASE_AWK_GLOBAL_ARGC,
ASE_AWK_GLOBAL_ARGV,
ASE_AWK_GLOBAL_CONVFMT,
ASE_AWK_GLOBAL_ENVIRON,
ASE_AWK_GLOBAL_ERRNO,
ASE_AWK_GLOBAL_FILENAME,
ASE_AWK_GLOBAL_FNR,
ASE_AWK_GLOBAL_FS,
ASE_AWK_GLOBAL_IGNORECASE,
ASE_AWK_GLOBAL_NF,
ASE_AWK_GLOBAL_NR,
ASE_AWK_GLOBAL_OFMT,
ASE_AWK_GLOBAL_OFS,
ASE_AWK_GLOBAL_ORS,
ASE_AWK_GLOBAL_RS,
ASE_AWK_GLOBAL_RT,
ASE_AWK_GLOBAL_RSTART,
ASE_AWK_GLOBAL_RLENGTH,
ASE_AWK_GLOBAL_SUBSEP
2006-07-12 07:25:15 +00:00
};
2006-11-13 15:08:54 +00:00
#ifdef __cplusplus
extern "C" {
#endif
2006-11-18 15:36:57 +00:00
ase_char_t* ase_awk_format (
2006-11-16 15:16:25 +00:00
ase_awk_run_t* run, ase_awk_str_t* out, ase_awk_str_t* fbu,
const ase_char_t* fmt, ase_size_t fmt_len,
2006-11-14 14:54:47 +00:00
ase_size_t nargs_on_stack, ase_awk_nde_t* args, ase_size_t* len);
2006-11-13 15:08:54 +00:00
#ifdef __cplusplus
}
#endif
2006-03-07 16:02:58 +00:00
#endif