diff options
Diffstat (limited to 'usr.bin/yacc/lalr.c')
-rw-r--r-- | usr.bin/yacc/lalr.c | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/usr.bin/yacc/lalr.c b/usr.bin/yacc/lalr.c index 28e19c06e69..3cdf3ae1079 100644 --- a/usr.bin/yacc/lalr.c +++ b/usr.bin/yacc/lalr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lalr.c,v 1.7 2003/06/03 02:56:24 millert Exp $ */ +/* $OpenBSD: lalr.c,v 1.8 2003/06/19 16:34:53 pvalchev Exp $ */ /* $NetBSD: lalr.c,v 1.4 1996/03/19 03:21:33 jtc Exp $ */ /* @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)lalr.c 5.3 (Berkeley) 6/1/90"; #else -static char rcsid[] = "$OpenBSD: lalr.c,v 1.7 2003/06/03 02:56:24 millert Exp $"; +static char rcsid[] = "$OpenBSD: lalr.c,v 1.8 2003/06/19 16:34:53 pvalchev Exp $"; #endif #endif /* not lint */ @@ -92,7 +92,7 @@ static short *VERTICES; static int top; void -lalr() +lalr(void) { tokensetsize = WORDSIZE(ntokens); @@ -111,7 +111,7 @@ lalr() void -set_state_table() +set_state_table(void) { core *sp; @@ -122,7 +122,7 @@ set_state_table() void -set_accessing_symbol() +set_accessing_symbol(void) { core *sp; @@ -133,7 +133,7 @@ set_accessing_symbol() void -set_shift_table() +set_shift_table(void) { shifts *sp; @@ -144,7 +144,7 @@ set_shift_table() void -set_reduction_table() +set_reduction_table(void) { reductions *rp; @@ -155,7 +155,7 @@ set_reduction_table() void -set_maxrhs() +set_maxrhs(void) { short *itemp; short *item_end; @@ -183,7 +183,7 @@ set_maxrhs() void -initialize_LA() +initialize_LA(void) { int i, j, k; reductions *rp; @@ -220,7 +220,7 @@ initialize_LA() } void -set_goto_map() +set_goto_map(void) { shifts *sp; int i; @@ -290,9 +290,7 @@ set_goto_map() /* Map_goto maps a state/symbol pair into its numeric representation. */ int -map_goto(state, symbol) -int state; -int symbol; +map_goto(int state, int symbol) { int high; int low; @@ -318,7 +316,7 @@ int symbol; void -initialize_F() +initialize_F(void) { int i; int j; @@ -395,7 +393,7 @@ initialize_F() void -build_relations() +build_relations(void) { int i; int j; @@ -487,8 +485,7 @@ build_relations() } void -add_lookback_edge(stateno, ruleno, gotono) -int stateno, ruleno, gotono; +add_lookback_edge(int stateno, int ruleno, int gotono) { int i, k; int found; @@ -515,9 +512,7 @@ int stateno, ruleno, gotono; short ** -transpose(R, n) -short **R; -int n; +transpose(short **R, int n) { short **new_R; short **temp_R; @@ -572,13 +567,13 @@ int n; void -compute_FOLLOWS() +compute_FOLLOWS(void) { digraph(includes); } void -compute_lookaheads() +compute_lookaheads(void) { int i, n; unsigned *fp1, *fp2, *fp3; @@ -612,8 +607,7 @@ compute_lookaheads() } void -digraph(relation) -short **relation; +digraph(short **relation) { int i; @@ -639,8 +633,7 @@ short **relation; void -traverse(i) -int i; +traverse(int i) { unsigned *fp1; unsigned *fp2; |