+(*
+ * Copyright 2005-2010, Ecole des Mines de Nantes, University of Copenhagen
+ * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
+ * This file is part of Coccinelle.
+ *
+ * Coccinelle is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, according to version 2 of the License.
+ *
+ * Coccinelle is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * The authors reserve the right to distribute this or future versions of
+ * Coccinelle under other licenses.
+ *)
+
+
(* Constraints on Meta-* Identifiers, Functions *)
type idconstraint =
IdNoConstraint
(* --------------------------------------------------------------------- *)
(* Modified code *)
+type added_string = Noindent of string | Indent of string
+
type info = { line : int; column : int;
- strbef : (string * int (* line *) * int (* col *)) list;
- straft : (string * int (* line *) * int (* col *)) list }
+ strbef : (added_string * int (* line *) * int (* col *)) list;
+ straft : (added_string * int (* line *) * int (* col *)) list }
type line = int
type meta_name = string * string
type 'a wrap =
string list * string list * exists * bool
(* true if the whole thing is an expression *)
| ScriptRulename of string * dependency
- | InitialScriptRulename of string
- | FinalScriptRulename of string
+ | InitialScriptRulename of string * dependency
+ | FinalScriptRulename of string * dependency
and ruletype = Normal | Generated
(dependency * string list (* dropped isos *) * exists) *
top_level list * bool list (* true if generates an exp *) * ruletype
| ScriptRule of string * dependency * (string * meta_name) list * string
- | InitialScriptRule of string * string
- | FinalScriptRule of string * string
+ | InitialScriptRule of string * dependency * string
+ | FinalScriptRule of string * dependency * string
and dependency =
Dep of string (* rule applies for the current binding *)
| CaseLineTag of case_line
| ConstVolTag of const_vol
| Token of string * info option
- | Pragma of string list
+ | Pragma of added_string list
| Code of top_level
| ExprDotsTag of expression dots
| ParamDotsTag of parameterTypeDef dots