Coccinelle release 1.0.0-rc13
[bpt/coccinelle.git] / bundles / menhirLib / menhir-20120123 / src / lr1partial.mli
1 (**************************************************************************)
2 (* *)
3 (* Menhir *)
4 (* *)
5 (* François Pottier, INRIA Rocquencourt *)
6 (* Yann Régis-Gianas, PPS, Université Paris Diderot *)
7 (* *)
8 (* Copyright 2005-2008 Institut National de Recherche en Informatique *)
9 (* et en Automatique. All rights reserved. This file is distributed *)
10 (* under the terms of the Q Public License version 1.0, with the change *)
11 (* described in file LICENSE. *)
12 (* *)
13 (**************************************************************************)
14
15 open Grammar
16
17 module Run (X : sig
18
19 (* A restricted set of tokens of interest. *)
20
21 val tokens: TerminalSet.t
22
23 (* A state of the (merged) LR(1) automaton that we're trying to
24 simulate. *)
25
26 val goal: Lr1.node
27
28 end) : sig
29
30 (* What we are after is a path, in the canonical LR(1) automaton,
31 that leads from some entry node to a node [N] such that (i)
32 [N] has a conflict involving one of the tokens of interest
33 and (ii) [N] corresponds to the goal node, that is, the path
34 that leads to [N] in the canonical LR(1) automaton leads to
35 the goal node in the merged LR(1) automaton. *)
36
37 val source: Item.t
38
39 val path: Symbol.t array
40
41 val goal: Lr0.concretelr1state
42
43 (* An (arbitrarily chosen) conflict token in the goal state. *)
44
45 val token: Terminal.t
46
47 end
48