*/
/* $Id$ */
+#ifndef _MODULES_H_EM_LABEL_H
+#define _MODULES_H_EM_LABEL_H
+
typedef unsigned int label;
+#endif
extern char *mktemp();
extern char *ctime();
-void do_object();
+void do_object(int f, long size);
void write_symdef();
void add();
magic = rd_unsigned2(fd);
if (magic != AALMAG && magic != ARMAG)
error(TRUE, "%s is not in ar format\n", name);
-
+
return fd;
}
if (argc < 3)
usage();
-
+
for (ptr = argv[1]; *ptr; ptr++) {
switch (*ptr) {
case 't' :
if (app_fl + ex_fl + del_fl + rep_fl + show_fl + pr_fl != 1)
usage();
-
+
if (u_fl && ! rep_fl)
usage();
signal(SIGINT, catch);
get(argc, argv);
-
+
return 0;
}
}
/*
- * Return whether the bytes in `buf' form a good object header.
+ * Return whether the bytes in `buf' form a good object header.
* The header is put in `headp'.
*/
int
return !BADMAGIC(*headp) && headp->oh_nname != 0;
}
-void
-do_object(f, size)
- long size;
+void do_object(int f, long size)
{
struct outhead headbuf;
exit(1);
}
}
-
+
emitheader();
registerterminals();
return true;
return false;
}
-
+
static void emit_predicate_expr(Rule r, struct expr* p)
{
bool first = true;
int index = 0;
emit_input_regs(r->pattern, &index);
}
-
+
emit_output_constraints(r);
emit_input_constraints(r);
-
+
while (f)
{
char* data = strdup(f->data);
{
Tree node;
int index = 0;
+ Nonterm nt;
+
if (!find_child_index(r->pattern, label, &index, &node))
label_not_found(r, label);
- Nonterm nt = node->op;
-
if (nt->kind == NONTERM)
{
if (nt->is_fragment)
assert(f->data[1] == 0);
print("%1data->emit_eoi();\n");
break;
-
+
default:
print("%1data->emit_string(\"%s\");\n", f->data);
}