-(*
-* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* 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 147 *)
+(* current max is 152 *)
(* 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.MetaFunc(name,_,_) -> [12]
- | Ast0.MetaLocalFunc(name,_,_) -> [13]
- | Ast0.OptIdent(id) -> [14]
- | Ast0.UniqueIdent(id) -> [15]
+ Ast0.Id(name) -> [10]
+ | Ast0.MetaId(name,_,_) -> [11]
+ | Ast0.MetaFunc(name,_,_) -> [12]
+ | Ast0.MetaLocalFunc(name,_,_) -> [13]
+ | Ast0.DisjId(_,id_list,_,_) -> [152]
+ | Ast0.OptIdent(id) -> [14]
+ | Ast0.UniqueIdent(id) -> [15]
let expression e =
match Ast0.unwrap e with
| Ast0.FunctionType(ty,lp1,params,rp1) -> [132]
| Ast0.Array(ty,lb,size,rb) -> [50]
| Ast0.EnumName(kind,name) -> [146]
+ | Ast0.EnumDef(ty,lb,decls,rb) -> [150]
| Ast0.StructUnionName(kind,name) -> [51]
| Ast0.StructUnionDef(ty,lb,decls,rb) -> [117]
| Ast0.TypeName(name) -> [52]
let declaration d =
match Ast0.unwrap d with
- Ast0.Init(stg,ty,id,eq,exp,sem) -> [54]
+ Ast0.MetaDecl(name,_) -> [148]
+ | Ast0.MetaField(name,_) -> [149]
+ | Ast0.MetaFieldList(name,_,_) -> [152]
+ | Ast0.Init(stg,ty,id,eq,exp,sem) -> [54]
| Ast0.UnInit(stg,ty,id,sem) -> [55]
| Ast0.MacroDecl(name,lp,args,rp,sem) -> [137]
| Ast0.TyDecl(ty,sem) -> [116]
match Ast0.unwrap i with
Ast0.MetaInit(nm,_) -> [106] (* added after *)
| Ast0.InitExpr(exp) -> [102]
- | Ast0.InitList(lb,initlist,rb) -> [103]
+ | Ast0.InitList(lb,initlist,rb,ordered) -> [103]
| Ast0.InitGccExt(designators,eq,ini) -> [104]
| Ast0.InitGccName(name,eq,ini) -> [105]
| Ast0.IComma(cm) -> [108]
| Ast0.Circles(d,whencode) -> [85]
| Ast0.Stars(d,whencode) -> [86]
| Ast0.Include(inc,name) -> [118]
+ | Ast0.Undef(def,id) -> [151]
| Ast0.Define(def,id,params,body) -> [119]
| Ast0.OptStm(re) -> [87]
| Ast0.UniqueStm(re) -> [88]