summaryrefslogtreecommitdiff
path: root/dfa.c
diff options
context:
space:
mode:
authorvern <vern>1990-05-26 16:39:54 +0000
committervern <vern>1990-05-26 16:39:54 +0000
commit7f3d72199cad0a494c2dfe588fd7cf8f1903c47b (patch)
tree403d4e6d26247c4df401c54a038807afdb1fa75e /dfa.c
parent1e25e2dcf1e975fc1458693d125d5b7b0250f99e (diff)
downloadflex-7f3d72199cad0a494c2dfe588fd7cf8f1903c47b.tar.gz
prototypes for forward references
declared void functions as such
Diffstat (limited to 'dfa.c')
-rw-r--r--dfa.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/dfa.c b/dfa.c
index f8eec5c..1e5838b 100644
--- a/dfa.c
+++ b/dfa.c
@@ -31,13 +31,21 @@ static char copyright[] =
static char CR_continuation[] = "@(#) All rights reserved.\n";
static char rcsid[] =
- "@(#) $Header: /cvsroot/flex/flex/dfa.c,v 2.5 1990/03/20 13:16:02 vern Exp $ (LBL)";
+ "@(#) $Header: /cvsroot/flex/flex/dfa.c,v 2.6 1990/05/26 16:39:54 vern Exp $ (LBL)";
#endif
#include "flexdef.h"
+/* declare functions that have forward references */
+
+void dump_associated_rules PROTO((FILE*, int));
+void dump_transitions PROTO((FILE*, int[]));
+void sympartition PROTO((int[], int, int[], int[]));
+int symfollowset PROTO((int[], int, int, int[]));
+
+
/* check_for_backtracking - check a DFA state for backtracking
*
* synopsis
@@ -49,7 +57,7 @@ static char rcsid[] =
* associated with this state
*/
-check_for_backtracking( ds, state )
+void check_for_backtracking( ds, state )
int ds;
int state[];
@@ -80,9 +88,7 @@ int state[];
* synopsis
* int nfa_states[num_states+1], num_states;
* int accset[nacc+1], nacc;
- * int check_trailing_context();
- * true/false = check_trailing_context( nfa_states, num_states,
- * accset, nacc );
+ * check_trailing_context( nfa_states, num_states, accset, nacc );
*
* NOTES
* Trailing context is "dangerous" if both the head and the trailing
@@ -98,7 +104,7 @@ int state[];
* accset[1 .. nacc] is the list of accepting numbers for the DFA state.
*/
-int check_trailing_context( nfa_states, num_states, accset, nacc )
+void check_trailing_context( nfa_states, num_states, accset, nacc )
int *nfa_states, num_states;
int *accset;
register int nacc;
@@ -148,7 +154,7 @@ register int nacc;
* and writes a report to the given file
*/
-dump_associated_rules( file, ds )
+void dump_associated_rules( file, ds )
FILE *file;
int ds;
@@ -203,7 +209,7 @@ int ds;
* is done to the given file.
*/
-dump_transitions( file, state )
+void dump_transitions( file, state )
FILE *file;
int state[];
@@ -377,7 +383,7 @@ int *t, *ns_addr, accset[], *nacc_addr, *hv_addr;
/* increase_max_dfas - increase the maximum number of DFAs */
-increase_max_dfas()
+void increase_max_dfas()
{
current_max_dfas += MAX_DFAS_INCREMENT;
@@ -405,7 +411,8 @@ increase_max_dfas()
* creates the dfa corresponding to the ndfa we've constructed. the
* dfa starts out in state #1.
*/
-ntod()
+
+void ntod()
{
int *accset, ds, nacc, newds;
@@ -981,7 +988,7 @@ bottom:
* sympartition( ds, numstates, symlist, duplist );
*/
-sympartition( ds, numstates, symlist, duplist )
+void sympartition( ds, numstates, symlist, duplist )
int ds[], numstates, duplist[];
int symlist[];