X-Git-Url: http://git.hcoop.net/bpt/coccinelle.git/blobdiff_plain/5636bb2c2537506718da74f85a2b81a5ff3df16f..90aeb998d88488b4402e7b211b064056d175fcbb:/parsing_cocci/parser_cocci_menhir.mly diff --git a/parsing_cocci/parser_cocci_menhir.mly b/parsing_cocci/parser_cocci_menhir.mly index cdec1e9..b081347 100644 --- a/parsing_cocci/parser_cocci_menhir.mly +++ b/parsing_cocci/parser_cocci_menhir.mly @@ -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 . - * - * 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 }