#include "flexdef.h"
+
+/* declare functions that have forward references */
+
+int dupmachine PROTO((int));
+void mkxtion PROTO((int, int));
+
+
/* add_accept - add an accepting state to a machine
*
* synopsis
* accepting_number becomes mach's accepting number.
*/
-add_accept( mach, accepting_number )
-int mach;
+void add_accept( mach, accepting_number )
+int mach, accepting_number;
{
/* hang the accepting number off an epsilon state. if it is associated
* dumpnfa( state1 );
*/
-dumpnfa( state1 )
+void dumpnfa( state1 )
int state1;
{
return ( init );
}
+
/* finish_rule - finish up the processing for a rule
*
* synopsis
* context has variable length.
*/
-finish_rule( mach, variable_trail_rule, headcnt, trailcnt )
+void finish_rule( mach, variable_trail_rule, headcnt, trailcnt )
int mach, variable_trail_rule, headcnt, trailcnt;
{
* The "beginning" states are the epsilon closure of the first state
*/
-mark_beginning_as_normal( mach )
+void mark_beginning_as_normal( mach )
register int mach;
{
* stateto - the state to which the transition is to be made
*/
-mkxtion( statefrom, stateto )
+void mkxtion( statefrom, stateto )
int statefrom, stateto;
{
* arrays (such as rule_type[]) are grown as needed.
*/
-new_rule()
+void new_rule()
{
if ( ++num_rules >= current_max_rules )
#include "flexdef.h"
+
+/* declarations for functions that have forward references */
+
+void mkentry PROTO((register int*, int, int, int, int));
+void mkprot PROTO((int[], int, int));
+void mktemplate PROTO((int[], int, int));
+void mv2front PROTO((int));
+int tbldiff PROTO((int[], int, int[]));
+
+
/* bldtbl - build table entries for dfa state
*
* synopsis
* cost only one difference.
*/
-bldtbl( state, statenum, totaltrans, comstate, comfreq )
+void bldtbl( state, statenum, totaltrans, comstate, comfreq )
int state[], statenum, totaltrans, comstate, comfreq;
{
* table entries made for them.
*/
-cmptmps()
+void cmptmps()
{
int tmpstorage[CSIZE + 1];
/* expand_nxt_chk - expand the next check arrays */
-expand_nxt_chk()
+void expand_nxt_chk()
{
register int old_max = current_max_xpairs;
* own tbase/tdef tables. They are shifted down to be contiguous
* with the non-template entries during table generation.
*/
-inittbl()
+void inittbl()
{
register int i;
* mkdeftbl();
*/
-mkdeftbl()
+void mkdeftbl()
{
int i;
* state array.
*/
-mkentry( state, numchars, statenum, deflink, totaltrans )
+void mkentry( state, numchars, statenum, deflink, totaltrans )
register int *state;
int numchars, statenum, deflink, totaltrans;
* mk1tbl( state, sym, onenxt, onedef );
*/
-mk1tbl( state, sym, onenxt, onedef )
+void mk1tbl( state, sym, onenxt, onedef )
int state, sym, onenxt, onedef;
{
* mkprot( state, statenum, comstate );
*/
-mkprot( state, statenum, comstate )
+void mkprot( state, statenum, comstate )
int state[], statenum, comstate;
{
* mktemplate( state, statenum, comstate, totaltrans );
*/
-mktemplate( state, statenum, comstate )
+void mktemplate( state, statenum, comstate )
int state[], statenum, comstate;
{
* mv2front( qelm );
*/
-mv2front( qelm )
+void mv2front( qelm )
int qelm;
{
* Transnum is the number of out-transitions for the state.
*/
-place_state( state, statenum, transnum )
+void place_state( state, statenum, transnum )
int *state, statenum, transnum;
{
* no room, we process the sucker right now.
*/
-stack1( statenum, sym, nextstate, deflink )
+void stack1( statenum, sym, nextstate, deflink )
int statenum, sym, nextstate, deflink;
{