1 (**************************************************************************)
5 (* François Pottier, INRIA Rocquencourt *)
6 (* Yann Régis-Gianas, PPS, Université Paris Diderot *)
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. *)
13 (**************************************************************************)
15 (* A parameterized branch may instantiate parameterized non terminals.
16 If the parameterized branch contributes to the definition of a
17 parameterized terminal, then the instantiation of parameterized
18 non terminals that are defined simultaneously must only be done with
20 Furthermore, all the parameterized non terminals that are in a common
21 mutual recursive definition must have the same arity.
22 These conditions are sufficient to ensure termination of expansion.
24 C[x] : ... // This definition does not involve A or B.
25 A[x,y] : B[x,y] C[Y] // This mutual recursive definition is ok.
27 D[x] : E[D[x]] // This one is incorrect.
34 branch_position
: Positions.t
;
35 producers
: (symbol
* identifier
option) list
; (* TEMPORARY convention renversée
36 par rapport à syntax.mli; faire un type record au lieu d'une paire? *)
38 branch_shift_precedence
: branch_shift_precedence
;
39 branch_reduce_precedence
: branch_reduce_precedence
44 branches
: branch list
;
45 positions
: Positions.t list
;
46 (* This flag is not relevant after the NonTerminalInlining.inline pass. *)
52 preludes
: Stretch.t list
;
53 postludes
: Syntax.trailer list
;
54 parameters
: Stretch.t list
;
55 start_symbols
: StringSet.t
;
56 types
: Stretch.ocamltype
StringMap.t
;
57 tokens
: Syntax.token_properties
StringMap.t
;
58 rules
: rule
StringMap.t
;