matreshka_league_21.0.0_0c8f4d47/tools/aflex/src/dfa.ads

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
-- Copyright (c) 1990 Regents of the University of California.
-- All rights reserved.
--
-- This software was developed by John Self of the Arcadia project
-- at the University of California, Irvine.
--
-- Redistribution and use in source and binary forms are permitted
-- provided that the above copyright notice and this paragraph are
-- duplicated in all such forms and that any documentation,
-- advertising materials, and other materials related to such
-- distribution and use acknowledge that the software was developed
-- by the University of California, Irvine.  The name of the
-- University may not be used to endorse or promote products derived
-- from this software without specific prior written permission.
-- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

-- TITLE DFA construction routines
-- AUTHOR: John Self (UCI)
-- DESCRIPTION converts non-deterministic finite automatons to finite ones.
-- $Header: /co/ua/self/arcadia/aflex/ada/src/RCS/dfaS.a,v 1.4 90/01/12 15:19:52 self Exp Locker: self $
with Ada.Wide_Wide_Text_IO;

with MISC_DEFS;

package DFA is

   use MISC_DEFS;

  procedure CHECK_FOR_BACKTRACKING(DS    : in INTEGER;
                                   STATE : in UNBOUNDED_INT_ARRAY);
  procedure CHECK_TRAILING_CONTEXT(NFA_STATES : in INT_PTR;
                                   NUM_STATES : in INTEGER;
                                   ACCSET     : in INT_PTR;
                                   NACC       : in INTEGER);

   procedure Dump_Associated_Rules
     (File : Ada.Wide_Wide_Text_IO.File_Type;
      DS   : INTEGER);

   procedure Dump_Transitions
     (File  : Ada.Wide_Wide_Text_IO.File_Type;
      State : UNBOUNDED_INT_ARRAY);

  procedure EPSCLOSURE(T                  : in out INT_PTR;
                       NS_ADDR            : in out INTEGER;
                       ACCSET             : INT_PTR;
                       NACC_ADDR, HV_ADDR : out INTEGER;
                       RESULT             : out INT_PTR);

  procedure INCREASE_MAX_DFAS;

  procedure NTOD;

  procedure SNSTODS(SNS           : in INT_PTR;
                    NUMSTATES     : in INTEGER;
                    ACCSET        : in INT_PTR;
                    NACC, HASHVAL : in INTEGER;
                    NEWDS_ADDR    : out INTEGER;
                    RESULT        : out BOOLEAN);

  function SYMFOLLOWSET(DS              : in INT_PTR;
                        DSIZE, TRANSSYM : in INTEGER;
                        NSET            : in INT_PTR) return INTEGER;

  procedure SYMPARTITION(DS        : in INT_PTR;
                         NUMSTATES : in INTEGER;
                         SYMLIST   : in out C_SIZE_BOOL_ARRAY;
                         DUPLIST   : in out C_SIZE_ARRAY);
end DFA;