summaryrefslogtreecommitdiffstats
path: root/yacc/mkpar.c
diff options
context:
space:
mode:
Diffstat (limited to 'yacc/mkpar.c')
-rw-r--r--yacc/mkpar.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/yacc/mkpar.c b/yacc/mkpar.c
index e1aef60fe..4ba590b0d 100644
--- a/yacc/mkpar.c
+++ b/yacc/mkpar.c
@@ -14,13 +14,13 @@ short final_state;
static int SRcount;
static int RRcount;
-extern action *parse_actions();
-extern action *get_shifts();
-extern action *add_reductions();
-extern action *add_reduce();
+void find_final_state ();
+void remove_conflicts ();
+void unused_rules ();
+void total_conflicts ();
+void defreds ();
-
-make_parser()
+void make_parser()
{
register int i;
@@ -38,7 +38,7 @@ make_parser()
action *
parse_actions(stateno)
-register int stateno;
+ register int stateno;
{
register action *actions;
@@ -50,7 +50,7 @@ register int stateno;
action *
get_shifts(stateno)
-int stateno;
+ int stateno;
{
register action *actions, *temp;
register shifts *sp;
@@ -85,8 +85,8 @@ int stateno;
action *
add_reductions(stateno, actions)
-int stateno;
-register action *actions;
+ int stateno;
+ register action *actions;
{
register int i, j, m, n;
register int ruleno, tokensetsize;
@@ -111,8 +111,9 @@ register action *actions;
action *
add_reduce(actions, ruleno, symbol)
-register action *actions;
-register int ruleno, symbol;
+ register action *actions;
+ register int ruleno;
+ register int symbol;
{
register action *temp, *prev, *next;
@@ -150,7 +151,7 @@ register int ruleno, symbol;
}
-find_final_state()
+void find_final_state()
{
register int goal, i;
register short *to_state;
@@ -167,7 +168,7 @@ find_final_state()
}
-unused_rules()
+void unused_rules()
{
register int i;
register action *p;
@@ -199,7 +200,7 @@ unused_rules()
}
-remove_conflicts()
+void remove_conflicts()
{
register int i;
register int symbol;
@@ -274,7 +275,7 @@ remove_conflicts()
}
-total_conflicts()
+void total_conflicts()
{
fprintf(stderr, "%s: ", myname);
if (SRtotal == 1)
@@ -296,7 +297,7 @@ total_conflicts()
int
sole_reduction(stateno)
-int stateno;
+ int stateno;
{
register int count, ruleno;
register action *p;
@@ -323,7 +324,7 @@ int stateno;
}
-defreds()
+void defreds()
{
register int i;
@@ -332,8 +333,8 @@ defreds()
defred[i] = sole_reduction(i);
}
-free_action_row(p)
-register action *p;
+void free_action_row(p)
+ register action *p;
{
register action *q;
@@ -345,7 +346,7 @@ register action *p;
}
}
-free_parser()
+void free_parser()
{
register int i;