Release coccinelle-0.2.3rc2
[bpt/coccinelle.git] / parsing_cocci / parser_cocci_menhir.mly
index cdec1e9..b081347 100644 (file)
@@ -1,27 +1,7 @@
 /*
- * 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.
- */
-
-
-/*
- * Copyright 2005-2010, Ecole des Mines de Nantes, University of Copenhagen
+ * 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.
  *
@@ -1164,6 +1144,8 @@ initialize_list_start:
   initialize2 TComma { [$1;Ast0.wrap(Ast0.IComma(P.clt2mcode "," $2))] }
 | initialize2 TComma initialize_list_start
     { $1::Ast0.wrap(Ast0.IComma(P.clt2mcode "," $2))::$3 }
+| TNothing initialize_list_start
+    { $2 } /* + code only */
 | d=edots_when(TEllipsis,initialize)
       r=comma_initializers(edots_when(TEllipsis,initialize))
     { (P.mkidots "..." d)::
@@ -1173,12 +1155,14 @@ comma_initializers(dotter):
   /* empty */ { [] }
 | d=dotter r=comma_initializers2(dotter)
       { (function dot_builder -> [dot_builder d])::r }
+| TNothing r=comma_initializers(dotter) { r }
 | i=initialize2 c=TComma r=comma_initializers(dotter)
     { (function dot_builder -> [i; Ast0.wrap(Ast0.IComma(P.clt2mcode "," c))])::
       r }
 
 comma_initializers2(dotter):
   /* empty */ { [] }
+| TNothing r=comma_initializers(dotter) { r }
 | i=initialize2 c=TComma r=comma_initializers(dotter)
     { (function dot_builder -> [i; Ast0.wrap(Ast0.IComma(P.clt2mcode "," c))])::
       r }