Пример #1
0
static void print_state (int state)
{
    if (state)
        fprintf (verbose_file, "\n\n");
    if (SRconflicts[state] || RRconflicts[state])
        print_conflicts (state);
    fprintf (verbose_file, "state %d\n", state);
    print_core (state);
    print_nulls (state);
    print_actions (state);
}
Пример #2
0
void print_state(int state)
{
    if (state)
        BtYacc_puts("\n\n", verbose_file);

    if (SRconflicts[state] || RRconflicts[state])
        print_conflicts(state);

    BtYacc_printf(verbose_file, "state %d\n", state);
    print_core(state);
    print_nulls(state);
    print_actions(state);
}
Пример #3
0
static int bee_dep_conflicts(int argc, char *argv[])
{
    int c, opt_count, help;
    struct hash *graph;
    struct option long_options[] = {
        {"help", 0, &help, 1},
        {0, 0, 0, 0}
    };

    help = opt_count = 0;

    while ((c = getopt_long(argc, argv, "", long_options, NULL)) != -1) {
        switch (c) {
            case '?':
                usage_conflicts();
                return 1;

            default:
                opt_count++;
        }
    }

    if (help) {
        usage_conflicts();
        return 0;
    }

    if (optind < argc) {
        fprintf(stderr, "bee-dep: too many arguments\n");
        return 1;
    }

    graph = get_cache();

    if (print_conflicts(graph)) {
        hash_free(graph);
        return 1;
    }

    hash_free(graph);
    return 0;
}