"setoutfile name file redirects debug output of module name to file\n"
"irgname name prints address and graph number of a method given by its name\n"
"irgldname ldname prints address and graph number of a method given by its ldname\n"
- "randnodenr randomize initial node number\n"
+ "initialnodenr n|rand set initial node number to n or random number\n"
"help list all commands\n"
);
}
tok_setoutfile,
tok_showent,
tok_showtype,
- tok_randnodenr,
+ tok_initialnodenr,
tok_identifier,
tok_number,
tok_eof,
"setoutfile",
"showent",
"showtype",
- "randnodenr",
+ "initialnodenr",
};
/**
irg_name(name);
break;
- case tok_randnodenr:
- dbg_printf("Randomizing initial node number\n");
- srand(time(0));
- irp->max_node_nr += rand() % 6666;
+ case tok_initialnodenr:
+ token = get_token();
+ if (token == tok_number) {
+ dbg_printf("Setting initial node number to %u\n", lexer.number);
+ irp->max_node_nr = lexer.number;
+ } else if (token == tok_identifier && !strcmp(lexer.s, "rand")) {
+ dbg_printf("Randomizing initial node number\n");
+ srand(time(0));
+ irp->max_node_nr += rand() % 6666;
+ } else
+ goto error;
break;
case tok_irgldname: