Deleted Added
full compact
dfa.c (2259) dfa.c (8874)
1/* dfa - DFA construction routines */
2
3/*-
4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Vern Paxson.
1/* dfa - DFA construction routines */
2
3/*-
4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Vern Paxson.
9 *
9 *
10 * The United States Government has rights in this work pursuant
11 * to contract no. DE-AC03-76SF00098 between the United States
12 * Department of Energy and the University of California.
13 *
14 * Redistribution and use in source and binary forms are permitted provided
15 * that: (1) source distributions retain this entire copyright notice and
16 * comment, and (2) distributions including binaries display the following
17 * acknowledgement: ``This product includes software developed by the
18 * University of California, Berkeley and its contributors'' in the
19 * documentation or other materials provided with the distribution and in
20 * all advertising materials mentioning features or use of this software.
21 * Neither the name of the University nor the names of its contributors may
22 * be used to endorse or promote products derived from this software without
23 * specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
25 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27 */
28
10 * The United States Government has rights in this work pursuant
11 * to contract no. DE-AC03-76SF00098 between the United States
12 * Department of Energy and the University of California.
13 *
14 * Redistribution and use in source and binary forms are permitted provided
15 * that: (1) source distributions retain this entire copyright notice and
16 * comment, and (2) distributions including binaries display the following
17 * acknowledgement: ``This product includes software developed by the
18 * University of California, Berkeley and its contributors'' in the
19 * documentation or other materials provided with the distribution and in
20 * all advertising materials mentioning features or use of this software.
21 * Neither the name of the University nor the names of its contributors may
22 * be used to endorse or promote products derived from this software without
23 * specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
25 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27 */
28
29/* $Header: dfa.c,v 1.2 94/01/04 14:33:16 vern Exp $ */
29/* $Header: /home/ncvs/src/usr.bin/lex/dfa.c,v 1.1.1.1 1994/08/24 13:10:33 csgr Exp $ */
30
31#include "flexdef.h"
32
33
34/* declare functions that have forward references */
35
36void dump_associated_rules PROTO((FILE*, int));
37void dump_transitions PROTO((FILE*, int[]));

--- 207 unchanged lines hidden (view full) ---

245 */
246
247int *epsclosure( t, ns_addr, accset, nacc_addr, hv_addr )
248int *t, *ns_addr, accset[], *nacc_addr, *hv_addr;
249 {
250 register int stkpos, ns, tsp;
251 int numstates = *ns_addr, nacc, hashval, transsym, nfaccnum;
252 int stkend, nstate;
30
31#include "flexdef.h"
32
33
34/* declare functions that have forward references */
35
36void dump_associated_rules PROTO((FILE*, int));
37void dump_transitions PROTO((FILE*, int[]));

--- 207 unchanged lines hidden (view full) ---

245 */
246
247int *epsclosure( t, ns_addr, accset, nacc_addr, hv_addr )
248int *t, *ns_addr, accset[], *nacc_addr, *hv_addr;
249 {
250 register int stkpos, ns, tsp;
251 int numstates = *ns_addr, nacc, hashval, transsym, nfaccnum;
252 int stkend, nstate;
253 static int did_stk_init = false, *stk;
253 static int did_stk_init = false, *stk;
254
255#define MARK_STATE(state) \
256trans1[state] = trans1[state] - MARKER_DIFFERENCE;
257
258#define IS_MARKED(state) (trans1[state] < 0)
259
260#define UNMARK_STATE(state) \
261trans1[state] = trans1[state] + MARKER_DIFFERENCE;

--- 824 unchanged lines hidden ---
254
255#define MARK_STATE(state) \
256trans1[state] = trans1[state] - MARKER_DIFFERENCE;
257
258#define IS_MARKED(state) (trans1[state] < 0)
259
260#define UNMARK_STATE(state) \
261trans1[state] = trans1[state] + MARKER_DIFFERENCE;

--- 824 unchanged lines hidden ---