~ubuntu-branches/ubuntu/trusty/menhir/trusty

« back to all changes in this revision

Viewing changes to src/lr1partial.mli

  • Committer: Bazaar Package Importer
  • Author(s): Mehdi Dogguy
  • Date: 2009-02-22 23:41:17 UTC
  • mfrom: (1.1.5 upstream) (2.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090222234117-yxk115kvzv634utx
Tags: 20090204.dfsg-2
* New binary package libmenhir-ocaml-dev, Closes: #516134.
* Use dh-ocaml predefined variables.
* Use predefined variable OCAML_BEST (dh-ocaml >= 0.4).
* debian/svn-deblayout: remove no longer needed SVN setting

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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