+(*
+ * Copyright 2010, INRIA, University of Copenhagen
+ * Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix
+ * Copyright 2005-2009, 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.
+ *)
+
+
(* create an index for each constructor *)
-(* current max is 152 *)
+(* current max is 154 *)
(* doesn't really work - requires that identical terms with no token
subterms (eg dots) not appear on the same line *)
let ident i =
match Ast0.unwrap i with
Ast0.Id(name) -> [10]
- | Ast0.MetaId(name,_,_) -> [11]
+ | Ast0.MetaId(name,_,_,_) -> [11]
| Ast0.MetaFunc(name,_,_) -> [12]
| Ast0.MetaLocalFunc(name,_,_) -> [13]
| Ast0.DisjId(_,id_list,_,_) -> [152]
let initialiser i =
match Ast0.unwrap i with
Ast0.MetaInit(nm,_) -> [106] (* added after *)
+ | Ast0.MetaInitList(nm,_,_) -> [153] (* added after *)
| Ast0.InitExpr(exp) -> [102]
| Ast0.InitList(lb,initlist,rb,ordered) -> [103]
| Ast0.InitGccExt(designators,eq,ini) -> [104]
let top_level t =
match Ast0.unwrap t with
- Ast0.DECL(stmt) -> [90]
+ Ast0.NONDECL(stmt) -> [90]
| Ast0.FILEINFO(old_file,new_file) -> [92]
| Ast0.CODE(stmt_dots) -> [94]
| Ast0.ERRORWORDS(exps) -> [95]
| Ast0.OTHER(_) -> [96]
+ | Ast0.TOPCODE(_) -> [154]
(* 99-101 already used *)