33static const char quote[] =
"\"";
99 snprintf(buf,
sizeof(buf) - 1,
"(OP=%03lo)", op);
110 if ((x = exnode->
data.print.args))
115 while ((x = x->
next)) {
121 for (x = exnode->
data.print.args; x; x = x->
next)
147 if ((x = exnode->
data.print.args))
152 while ((x = x->
next)) {
158 for (x = exnode->
data.print.args; x; x = x->
next)
194 if (exnode->
data.call.args)
195 gen(cc, exnode->
data.call.args);
209 switch (exnode->
type)
262 s = (exnode->
op ==
GSUB ?
"gsub(" : exnode->
op ==
SUB ?
"sub(" :
"substr(");
264 gen(cc, exnode->
data.string.base);
266 gen(cc, exnode->
data.string.pat);
267 if (exnode->
data.string.repl) {
269 gen(cc, exnode->
data.string.repl);
315 agxbprint(cc->
text,
"for (tmp_%d = (Exassoc_t*)dtfirst(%s); tmp_%d && (%s = tmp_%d->name); tmp_%d = (Exassoc_t*)dtnext(%s, tmp_%d)) {", cc->
tmp, exnode->
data.generate.array->data.
variable.
symbol->
name, cc->
tmp, exnode->
data.generate.
index->name, cc->
tmp, cc->
tmp, exnode->
data.generate.array->data.
variable.
symbol->
name, cc->
tmp);
344 gen(cc, exnode->
data.split.string);
346 if (exnode->
data.split.seps) {
348 gen(cc, exnode->
data.split.seps);
389 (
unsigned long long)v->
integer);
563 agxbput(cc->
text,
"** cannot convert string value to external **");
581 agxbput(cc->
text,
"** string bits not supported **");
599 s =
"** unknown string op **";
630 Excc_t cc = {.
expr = ex, .disc = ex->disc, .text = xb};
638 gen(&cc, sym->value->data.procedure.body);
static int agxbprint(agxbuf *xb, const char *fmt,...)
Printf-style output to an agxbuf.
static int agxbputc(agxbuf *xb, char c)
add character to buffer
char * fmtesq(const char *, const char *)
static void scan(Excc_t *cc, Exnode_t *exnode)
static void print(Excc_t *cc, Exnode_t *exnode)
static const char quote[]
static void gen(Excc_t *, Exnode_t *)
void exdump(Expr_t *ex, Exnode_t *node, agxbuf *xb)
agxbuf * text
result of dumping
bool binary
data.operand.{left,right} ok
struct Exnode_s * param[3]
struct Exdata_u::@87 variable
struct Exdata_u::@84 constant
struct Exdata_u::@85 operand
struct Exdata_u::@86 select