Skip to content
Snippets Groups Projects
Commit d71ca8d3 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Removed some debug.

Rev: lib/modules/LR.pmod/parser.pike:1.17
parent ec626d82
Branches
Tags
No related merge requests found
/* /*
* $Id: parser.pike,v 1.16 1998/11/18 21:43:22 grubba Exp $ * $Id: parser.pike,v 1.17 1998/11/18 21:52:34 grubba Exp $
* *
* A BNF-grammar in Pike. * A BNF-grammar in Pike.
* Compiles to a LALR(1) state-machine. * Compiles to a LALR(1) state-machine.
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
//. //.
//. File: parser.pike //. File: parser.pike
//. RCSID: $Id: parser.pike,v 1.16 1998/11/18 21:43:22 grubba Exp $ //. RCSID: $Id: parser.pike,v 1.17 1998/11/18 21:52:34 grubba Exp $
//. Author: Henrik Grubbström (grubba@infovav.se) //. Author: Henrik Grubbström (grubba@infovav.se)
//. //.
//. Synopsis: LALR(1) parser and compiler. //. Synopsis: LALR(1) parser and compiler.
...@@ -890,7 +890,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts) ...@@ -890,7 +890,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts)
if (i->direct_lookahead[symbol]) { if (i->direct_lookahead[symbol]) {
object(priority) new_pri; object(priority) new_pri;
if ((new_pri = i->r->pri)->value < pri->value) { if ((new_pri = i->r->pri)->value < pri->value) {
if (1 || verbose) { if (verbose) {
werror(sprintf("Ignoring reduction of item\n%s\n" werror(sprintf("Ignoring reduction of item\n%s\n"
"on lookahead %s (Priority %d < %d)\n", "on lookahead %s (Priority %d < %d)\n",
item_to_string(i), item_to_string(i),
...@@ -903,7 +903,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts) ...@@ -903,7 +903,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts)
} }
} else if ((pri->assoc >= 0) && } else if ((pri->assoc >= 0) &&
(shift_pri->value == pri->value)) { (shift_pri->value == pri->value)) {
if (1 || verbose) { if (verbose) {
werror(sprintf("Ignoring reduction of item\n%s\n" werror(sprintf("Ignoring reduction of item\n%s\n"
"on lookahead %s (Right associative)\n", "on lookahead %s (Right associative)\n",
item_to_string(i), item_to_string(i),
...@@ -914,7 +914,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts) ...@@ -914,7 +914,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts)
i->direct_lookahead = (<>); i->direct_lookahead = (<>);
} }
} else { } else {
if (1 || verbose) { if (verbose) {
werror(sprintf("Kept item\n%s\n" werror(sprintf("Kept item\n%s\n"
"on lookahead %s\n", "on lookahead %s\n",
item_to_string(i), item_to_string(i),
...@@ -926,7 +926,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts) ...@@ -926,7 +926,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts)
} else if (i->r->symbols[i->offset] == symbol) { } else if (i->r->symbols[i->offset] == symbol) {
/* Shift */ /* Shift */
if (shift_pri->value < pri->value) { if (shift_pri->value < pri->value) {
if (1 || verbose) { if (verbose) {
werror(sprintf("Ignoring shift on item\n%s\n" werror(sprintf("Ignoring shift on item\n%s\n"
"on lookahead %s (Priority %d < %d)\n", "on lookahead %s (Priority %d < %d)\n",
item_to_string(i), item_to_string(i),
...@@ -936,7 +936,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts) ...@@ -936,7 +936,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts)
i->direct_lookahead = (<>); i->direct_lookahead = (<>);
} else if ((pri->assoc <= 0) && } else if ((pri->assoc <= 0) &&
(reduce_pri->value == pri->value)) { (reduce_pri->value == pri->value)) {
if (1 || verbose) { if (verbose) {
werror(sprintf("Ignoring shift on item\n%s\n" werror(sprintf("Ignoring shift on item\n%s\n"
"on lookahead %s (Left associative)\n", "on lookahead %s (Left associative)\n",
item_to_string(i), item_to_string(i),
...@@ -944,7 +944,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts) ...@@ -944,7 +944,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts)
} }
i->direct_lookahead = (<>); i->direct_lookahead = (<>);
} else { } else {
if (1 || verbose) { if (verbose) {
werror(sprintf("Kept item\n%s\n" werror(sprintf("Kept item\n%s\n"
"on lookahead %s\n", "on lookahead %s\n",
item_to_string(i), item_to_string(i),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment