mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 06:13:02 +00:00
lalr: more debug traces
I need to be able to read includes and goto_follows. * src/relation.h, src/relation.c (relation_print): Provide a means to pretty-print the nodes of the relation. * src/lalr.c (goto_print, follows_print): New. (set_goto_map): Use goto_print. (build_relations): Show INCLUDES. (compute_FOLLOWS): Rename as... (compute_follows): this. Show FOLLOWS.
This commit is contained in:
@@ -33,9 +33,11 @@ typedef size_t relation_node;
|
||||
typedef relation_node *relation_nodes;
|
||||
typedef relation_nodes *relation;
|
||||
|
||||
typedef void (relation_node_print) (relation_node node, FILE* out);
|
||||
|
||||
/* Report a relation R that has SIZE vertices. */
|
||||
void relation_print (relation r, relation_node size, FILE *out);
|
||||
void relation_print (relation r, size_t size,
|
||||
relation_node_print print, FILE *out);
|
||||
|
||||
/* Compute the transitive closure of the FUNCTION on the relation R
|
||||
with SIZE vertices.
|
||||
@@ -44,7 +46,7 @@ void relation_print (relation r, relation_node size, FILE *out);
|
||||
(unioned) with FUNCTION[NODE - 2]. */
|
||||
void relation_digraph (relation r, relation_node size, bitsetv *function);
|
||||
|
||||
/* Destructively transpose *R_ARG, of size N. */
|
||||
void relation_transpose (relation *R_arg, relation_node n);
|
||||
/* Destructively transpose *R_ARG, of size SIZE. */
|
||||
void relation_transpose (relation *R_arg, relation_node size);
|
||||
|
||||
#endif /* ! RELATION_H_ */
|
||||
|
||||
Reference in New Issue
Block a user