Module Inria_lexgen


module Inria_lexgen: sig .. end

exception Memory_overflow

type automata =
| Perform of int * tag_action list
| Shift of automata_trans
* (automata_move * memory_action list) array

type automata_trans =
| No_remember
| Remember of int * tag_action list

type automata_move =
| Backtrack
| Goto of int

type memory_action =
| Copy of int * int
| Set of int

type tag_action =
| SetTag of int * int
| EraseTag of int

type tag_base =
| Start
| End
| Mem of int

type tag_addr =
| Sum of (tag_base * int)

type ident_info =
| Ident_string of bool * tag_addr * tag_addr
| Ident_char of bool * tag_addr
type t_env = (string * ident_info) list 

type ('a, 'b) automata_entry = {
   auto_name : string;
   auto_args : 'a;
   auto_mem_size : int;
   auto_initial_state : int * memory_action list;
   auto_actions : (int * t_env * 'b) list;
}
val make_dfa : ('a, 'b) Inria_syntax.entry list ->
('a, 'b) automata_entry list * automata array