1 (**************************************************************************)
2 (* *)
3 (* OCaml *)
4 (* *)
5 (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
6 (* *)
7 (* Copyright 1996 Institut National de Recherche en Informatique et *)
8 (* en Automatique. *)
9 (* *)
10 (* All rights reserved. This file is distributed under the terms of *)
11 (* the GNU Lesser General Public License version 2.1, with the *)
12 (* special exception on linking described in the file LICENSE. *)
13 (* *)
14 (**************************************************************************)
15
16 (* Compaction of an automata *)
17 type lex_tables =
18 { tbl_base: int array; (* Perform / Shift *)
19 tbl_backtrk: int array; (* No_remember / Remember *)
20 tbl_default: int array; (* Default transition *)
21 tbl_trans: int array; (* Transitions (compacted) *)
22 tbl_check: int array; (* Check (compacted) *)
23 (* code addresses are managed in a similar fashion as transitions *)
24 tbl_base_code : int array; (* code ptr / base for Shift *)
25 tbl_backtrk_code : int array; (* nothing / code when Remember *)
26 (* moves to execute before transitions (compacted) *)
27 tbl_default_code : int array;
28 tbl_trans_code : int array;
29 tbl_check_code : int array;
30 (* byte code itself *)
31 tbl_code: int array;}
32
33
34 val compact_tables: Lexgen.automata array -> lex_tables
35