Lines Matching refs:text
120 sfprintf(cc->ccdisc->text, "sfprintf(%s, \"%s", expr->data.print.descriptor->op == CONSTANT && expr->data.print.descriptor->data.constant.value.integer == 2 ? "sfstderr" : "sfstdout", fmtesq(x->format, quote));
122 sfprintf(cc->ccdisc->text, "%s", fmtesq(x->format, quote));
123 sfprintf(cc->ccdisc->text, "\"");
130 sfprintf(cc->ccdisc->text, ", (");
132 sfprintf(cc->ccdisc->text, ")");
134 sfprintf(cc->ccdisc->text, ", (");
136 sfprintf(cc->ccdisc->text, ")");
139 sfprintf(cc->ccdisc->text, ");\n");
155 sfprintf(cc->ccdisc->text, "sfscanf(sfstdin, \"%s", fmtesq(x->format, quote));
157 sfprintf(cc->ccdisc->text, "%s", fmtesq(x->format, quote));
158 sfprintf(cc->ccdisc->text, "\"");
165 sfprintf(cc->ccdisc->text, ", &(");
167 sfprintf(cc->ccdisc->text, ")");
169 sfprintf(cc->ccdisc->text, ", &(");
171 sfprintf(cc->ccdisc->text, ")");
174 sfprintf(cc->ccdisc->text, ");\n");
200 sfprintf(cc->ccdisc->text, "break;\n");
203 sfprintf(cc->ccdisc->text, "continue;\n");
209 sfprintf(cc->ccdisc->text, "%g", expr->data.constant.value.floating);
212 sfprintf(cc->ccdisc->text, "\"%s\"", fmtesq(expr->data.constant.value.string, quote));
215 sfprintf(cc->ccdisc->text, "%I*u", sizeof(expr->data.constant.value.integer), expr->data.constant.value.integer);
218 sfprintf(cc->ccdisc->text, "%I*d", sizeof(expr->data.constant.value.integer), expr->data.constant.value.integer);
223 sfprintf(cc->ccdisc->text, "%s--", x->data.variable.symbol->name);
226 sfprintf(cc->ccdisc->text, "%s", expr->data.variable.symbol->name);
229 sfprintf(cc->ccdisc->text, "exit(");
231 sfprintf(cc->ccdisc->text, ");\n");
234 sfprintf(cc->ccdisc->text, "if (");
236 sfprintf(cc->ccdisc->text, ") {\n");
240 sfprintf(cc->ccdisc->text, "} else {\n");
243 sfprintf(cc->ccdisc->text, "}\n");
246 sfprintf(cc->ccdisc->text, "for (;");
248 sfprintf(cc->ccdisc->text, ");");
251 sfprintf(cc->ccdisc->text, "(");
253 sfprintf(cc->ccdisc->text, ")");
255 sfprintf(cc->ccdisc->text, ") {");
258 sfprintf(cc->ccdisc->text, "}");
264 sfprintf(cc->ccdisc->text, "%s", expr->data.variable.symbol->name);
267 sfprintf(cc->ccdisc->text, "%s++", x->data.variable.symbol->name);
272 sfprintf(cc->ccdisc->text, "{ Exassoc_t* %stmp_%d;", cc->id, ++cc->tmp);
273 sfprintf(cc->ccdisc->text, "for (%stmp_%d = (Exassoc_t*)dtfirst(%s); %stmp_%d && (%s = %stmp_%d->name); %stmp_%d = (Exassoc_t*)dtnext(%s, %stmp_%d)) {", cc->id, cc->tmp, expr->data.generate.array->data.variable.symbol->name, cc->id, cc->tmp, expr->data.generate.index->name, cc->id, cc->tmp, cc->id, cc->tmp, expr->data.generate.array->data.variable.symbol->name, cc->id, cc->tmp);
275 sfprintf(cc->ccdisc->text, "} }");
282 sfprintf(cc->ccdisc->text, "return(");
284 sfprintf(cc->ccdisc->text, ");\n");
291 sfprintf(cc->ccdisc->text, "{ %s %stmp_%d = ", extype(t), cc->id, ++cc->tmp);
293 sfprintf(cc->ccdisc->text, ";");
300 sfprintf(cc->ccdisc->text, "else ");
309 sfprintf(cc->ccdisc->text, "||");
313 sfprintf(cc->ccdisc->text, "if (");
316 sfprintf(cc->ccdisc->text, "strmatch(%stmp_%d, \"%s\")", cc->id, cc->tmp, fmtesq(v->string, quote));
319 sfprintf(cc->ccdisc->text, "%stmp_%d == ", cc->id, cc->tmp);
324 sfprintf(cc->ccdisc->text, "%I*u", sizeof(v->integer), v->integer);
327 sfprintf(cc->ccdisc->text, "%g", v->floating);
332 sfprintf(cc->ccdisc->text, ") {");
334 sfprintf(cc->ccdisc->text, "}");
340 sfprintf(cc->ccdisc->text, "else ");
341 sfprintf(cc->ccdisc->text, "{");
343 sfprintf(cc->ccdisc->text, "}");
345 sfprintf(cc->ccdisc->text, "}");
348 sfprintf(cc->ccdisc->text, "while (");
350 sfprintf(cc->ccdisc->text, ") {");
353 sfprintf(cc->ccdisc->text, "}");
356 sfprintf(cc->ccdisc->text, "(%s%s=", x->data.variable.symbol->name, expr->subop == '=' ? "" : opname(expr->subop));
358 sfprintf(cc->ccdisc->text, ")");
373 sfprintf(cc->ccdisc->text, "_%svalue=", cc->id);
377 sfprintf(cc->ccdisc->text, ";\n");
391 sfprintf(cc->ccdisc->text, "_%svalue=", cc->id);
395 sfprintf(cc->ccdisc->text, ";\n");
400 sfprintf(cc->ccdisc->text, "(");
404 sfprintf(cc->ccdisc->text, "), (");
409 sfprintf(cc->ccdisc->text, "), (");
412 sfprintf(cc->ccdisc->text, ")");
415 sfprintf(cc->ccdisc->text, "(");
417 sfprintf(cc->ccdisc->text, ") ? (");
419 sfprintf(cc->ccdisc->text, ") : (");
421 sfprintf(cc->ccdisc->text, ")");
424 sfprintf(cc->ccdisc->text, "(");
426 sfprintf(cc->ccdisc->text, ") && (");
428 sfprintf(cc->ccdisc->text, ")");
431 sfprintf(cc->ccdisc->text, "(");
433 sfprintf(cc->ccdisc->text, ") || (");
435 sfprintf(cc->ccdisc->text, ")");
438 sfprintf(cc->ccdisc->text, "(%s)(", extype(INTEGER));
440 sfprintf(cc->ccdisc->text, ")");
443 sfprintf(cc->ccdisc->text, "(%s)(", extype(FLOATING));
445 sfprintf(cc->ccdisc->text, ")");
448 sfprintf(cc->ccdisc->text, "strto%s(", sizeof(intmax_t) > sizeof(long) ? "ll" : "l");
450 sfprintf(cc->ccdisc->text, ",(char**)0,0)");
459 sfprintf(cc->ccdisc->text, "*(");
461 sfprintf(cc->ccdisc->text, ")!=0");
464 sfprintf(cc->ccdisc->text, "strtod(");
466 sfprintf(cc->ccdisc->text, ",0)");
469 sfprintf(cc->ccdisc->text, "strtol(");
471 sfprintf(cc->ccdisc->text, ",0,0)");
474 sfprintf(cc->ccdisc->text, "** cannot convert string value to external **");
477 sfprintf(cc->ccdisc->text, "!");
480 sfprintf(cc->ccdisc->text, "strmatch(");
482 sfprintf(cc->ccdisc->text, ",");
484 sfprintf(cc->ccdisc->text, ")");
492 sfprintf(cc->ccdisc->text, "** string bits not supported **");
513 sfprintf(cc->ccdisc->text, "strcoll(");
515 sfprintf(cc->ccdisc->text, ",");
517 sfprintf(cc->ccdisc->text, ")%s", s);
523 sfprintf(cc->ccdisc->text, "%s", opname(expr->op));
524 sfprintf(cc->ccdisc->text, "(");
528 sfprintf(cc->ccdisc->text, ")%s(", opname(expr->op));
531 sfprintf(cc->ccdisc->text, ")");
547 sfprintf(cc->ccdisc->text, "static %s %s;\n", extype(sym->type), sym->name);
571 sfprintf(disc->text, "/* : : generated by %s : : */\n", exversion);
572 sfprintf(disc->text, "\n#include <ast.h>\n");
575 sfprintf(disc->text, "\n");
596 if (cc->ccdisc->text)
597 sfclose(cc->ccdisc->text);
622 sfprintf(cc->ccdisc->text, "\n%s %s%s(data) char** data; {\n%s _%svalue = 0;\n", t, cc->id, sym->name, t, cc->id);
624 sfprintf(cc->ccdisc->text, ";\n");
626 sfprintf(cc->ccdisc->text, "return _%svalue;\n", cc->id);
627 sfprintf(cc->ccdisc->text, "}\n");
646 ccdisc.text = sp;