diff --git a/Common/CreateFile.cpp b/Common/CreateFile.cpp index f2f33a0ad9a34ccf05d2b080fb094beea32143a5..c43b878361347a94aef174a1dc4487075ef31785 100644 --- a/Common/CreateFile.cpp +++ b/Common/CreateFile.cpp @@ -439,7 +439,7 @@ void CreateOutputFile(std::string fileName, int format) break; } - if(printEndMessage) Msg::StatusBar(2, true, "Wrote '%s'", fileName.c_str()); + if(printEndMessage) Msg::StatusBar(2, true, "Done writing '%s'", fileName.c_str()); CTX::instance()->print.format = oldFormat; CTX::instance()->printing = 0; diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp index 1b1472b73f9246b9af494f174e4b3a6e8067b296..cca9362c8fdd361f02d7671ba20822bb3ea0f9a8 100644 --- a/Common/OpenFile.cpp +++ b/Common/OpenFile.cpp @@ -397,7 +397,7 @@ int MergeFile(std::string fileName, bool warnIfMissing) #endif if(!status) Msg::Error("Error loading '%s'", fileName.c_str()); - Msg::StatusBar(2, true, "Read '%s'", fileName.c_str()); + Msg::StatusBar(2, true, "Done reading '%s'", fileName.c_str()); // merge the associated option file if there is one if(!StatFile(fileName + ".opt")) diff --git a/Fltk/fileDialogs.cpp b/Fltk/fileDialogs.cpp index f29d1b282304284fc4a2327ef2a63186a050c6d5..3176e529ed5da35aaadda99ba3f771da2d2be738 100644 --- a/Fltk/fileDialogs.cpp +++ b/Fltk/fileDialogs.cpp @@ -589,7 +589,7 @@ int optionsFileDialog(const char *name) if (o == dialog->ok) { Msg::StatusBar(2, true, "Writing '%s'", name); PrintOptions(0, GMSH_FULLRC, dialog->b[0]->value(), dialog->b[1]->value(), name); - Msg::StatusBar(2, true, "Wrote '%s'", name); + Msg::StatusBar(2, true, "Done writing '%s'", name); dialog->window->hide(); return 1; } diff --git a/Fltk/menuWindow.cpp b/Fltk/menuWindow.cpp index 9eb412f7bfc860fa98765b83e929ac465371ff15..e46a6faa6ec44851feb4243b0c896f28651411d9 100644 --- a/Fltk/menuWindow.cpp +++ b/Fltk/menuWindow.cpp @@ -388,7 +388,7 @@ static void file_options_save_cb(Fl_Widget *w, void *data) PrintOptions(0, GMSH_FULLRC, 1, 0, fileName.c_str()); else PrintOptions(0, GMSH_OPTIONSRC, 1, 1, fileName.c_str()); - Msg::StatusBar(2, true, "Wrote '%s'", fileName.c_str()); + Msg::StatusBar(2, true, "Done writing '%s'", fileName.c_str()); } static void file_rename_cb(Fl_Widget *w, void *data) diff --git a/Fltk/messageWindow.cpp b/Fltk/messageWindow.cpp index e752817a02baf6164c7c6dddc02ff4d0ce9a46ed..54f5621c18126a4aa425135984a1f07f645f30e5 100644 --- a/Fltk/messageWindow.cpp +++ b/Fltk/messageWindow.cpp @@ -132,7 +132,7 @@ void messageWindow::save(const char *filename) else fprintf(fp, "%s\n", c); } - Msg::StatusBar(2, true, "Wrote '%s'", filename); + Msg::StatusBar(2, true, "Done writing '%s'", filename); fclose(fp); } diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp index eff51558df748c26d7e1052f5ee6b7189ba3bd8e..ea0ffc427f5171c4e68fea33cda727b28121699a 100644 --- a/Geo/GModelIO_Mesh.cpp +++ b/Geo/GModelIO_Mesh.cpp @@ -2127,7 +2127,7 @@ int GModel::writeFEA(const std::string &name, int elementTagType, for(unsigned int i = 0; i < entities.size(); i++) for(unsigned int j = 0; j < entities[i]->mesh_vertices.size(); j++) if(entities[i]->mesh_vertices[j]->getIndex() >= 0) - fprintf(fp,"%d %g %g %g\n", entities[i]->mesh_vertices[j]->getIndex(), + fprintf(fp,"%d %.16g %.16g %.16g\n", entities[i]->mesh_vertices[j]->getIndex(), entities[i]->mesh_vertices[j]->x() * scalingFactor, entities[i]->mesh_vertices[j]->y() * scalingFactor, entities[i]->mesh_vertices[j]->z() * scalingFactor); @@ -2142,6 +2142,7 @@ int GModel::writeFEA(const std::string &name, int elementTagType, numPhys ? (*it)->physicals[0] : 0); } + iElement = 1; for(riter it = firstRegion(); it != lastRegion(); ++it){ int numPhys = (*it)->physicals.size(); if(saveAll || numPhys) diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp index bd875ee1172626c9d68d2210a4d20ca3366c5b5f..76f0a5b08feb9c420a71df5e5680113b5f21d36e 100644 --- a/Geo/MElement.cpp +++ b/Geo/MElement.cpp @@ -147,6 +147,22 @@ SPoint3 MElement::barycenter() return p; } +int MElement::getVolumeSign() +{ + double v = getVolume(); + if(v < 0.) return -1; + else if(v > 0.) return 1; + else return 0; +} + +bool MElement::setVolumePositive() +{ + int s = getVolumeSign(); + if(s < 0) revert(); + if(!s) return false; + return true; +} + std::string MElement::getInfoString() { char tmp[256]; @@ -655,7 +671,8 @@ void MElement::writeFEA(FILE *fp, int elementTagType, int num, int elementary, int physical) { int numVert = getNumVertices(); - setVolumePositive(); + bool ok = setVolumePositive(); + if(getDim() == 3 && !ok) Msg::Error("Element %d has zero volume", num); fprintf(fp, "%d %d %d", num, (elementTagType == 3) ? _partition : (elementTagType == 2) ? physical : elementary, numVert); for(int i = 0; i < numVert; i++) diff --git a/Geo/MElement.h b/Geo/MElement.h index f3a00f4b3bc3486bf71857383561d6080a20b8ab..3ae48ce099a1a8b3d306b740411e924fd658cae5 100644 --- a/Geo/MElement.h +++ b/Geo/MElement.h @@ -171,9 +171,9 @@ class MElement virtual double distoShapeMeasure(){ return 1.0; } virtual double angleShapeMeasure() { return 1.0; } - // get the radius of the inscribed circle/sphere if it exists, - // otherwise get the minimum radius of all the circles/spheres - // tangent to the most boundaries of the element. + // get the radius of the inscribed circle/sphere if it exists, + // otherwise get the minimum radius of all the circles/spheres + // tangent to the most boundaries of the element. virtual double getInnerRadius(){ return 0.; } // compute the barycenter @@ -182,11 +182,16 @@ class MElement // revert the orientation of the element virtual void revert(){} - // compute and change the orientation of 3D elements to get - // positive volume + // get volume of element virtual double getVolume(){ return 0.; } - virtual int getVolumeSign(){ return 1; } - virtual void setVolumePositive(){ if(getVolumeSign() < 0) revert(); } + + // return sign of volume (+1 or -1) for 3D elements (or 0 if element + // has zero volume) + virtual int getVolumeSign(); + + // compute and change the orientation of 3D elements to get positive + // volume (return false if element has zero volume) + virtual bool setVolumePositive(); // return an information string for the element virtual std::string getInfoString(); diff --git a/Geo/MElementCut.h b/Geo/MElementCut.h index 746ae5af8924508f6da8921b382c14f13f0adbd0..6e5884ca12184de960b3c4b4680d716d51ba3069 100644 --- a/Geo/MElementCut.h +++ b/Geo/MElementCut.h @@ -114,7 +114,6 @@ class MPolyhedron : public MElement { vol += _parts[i]->getVolume(); return vol; } - virtual int getVolumeSign() { return (getVolume() >= 0) ? 1 : -1; } virtual const polynomialBasis* getFunctionSpace(int order=-1) const { return _orig->getFunctionSpace(order); diff --git a/Geo/MHexahedron.cpp b/Geo/MHexahedron.cpp index bdd9f29fc12b36a240ad17746b9855d4d7611749..1f64319cf53a8ae6f73eff4748c010b8fc292de9 100644 --- a/Geo/MHexahedron.cpp +++ b/Geo/MHexahedron.cpp @@ -18,7 +18,10 @@ int MHexahedron::getVolumeSign() mat[2][0] = _v[1]->z() - _v[0]->z(); mat[2][1] = _v[3]->z() - _v[0]->z(); mat[2][2] = _v[4]->z() - _v[0]->z(); - return sign(det3x3(mat)); + double d = det3x3(mat); + if(d < 0.) return -1; + else if(d > 0.) return 1; + else return 0; } void MHexahedron::getIntegrationPoints(int pOrder, int *npts, IntPt **pts) diff --git a/Geo/MPrism.cpp b/Geo/MPrism.cpp index 4728e9d72213736677fd908e1b8fcf14e84a689b..6039f44b8dbd52881c1ccca093c4c7321fa3574b 100644 --- a/Geo/MPrism.cpp +++ b/Geo/MPrism.cpp @@ -18,7 +18,10 @@ int MPrism::getVolumeSign() mat[2][0] = _v[1]->z() - _v[0]->z(); mat[2][1] = _v[2]->z() - _v[0]->z(); mat[2][2] = _v[3]->z() - _v[0]->z(); - return sign(det3x3(mat)); + double d = det3x3(mat); + if(d < 0.) return -1; + else if(d > 0.) return 1; + else return 0; } void MPrism::getIntegrationPoints(int pOrder, int *npts, IntPt **pts) diff --git a/Geo/MPyramid.cpp b/Geo/MPyramid.cpp index dab55ebfb95e844d49683379a8a61fc43b487b7f..032ab2f0dafb6266b39a94d9eaf5dba2fc2e482f 100644 --- a/Geo/MPyramid.cpp +++ b/Geo/MPyramid.cpp @@ -18,5 +18,8 @@ int MPyramid::getVolumeSign() mat[2][0] = _v[1]->z() - _v[0]->z(); mat[2][1] = _v[3]->z() - _v[0]->z(); mat[2][2] = _v[4]->z() - _v[0]->z(); - return sign(det3x3(mat)); + double d = det3x3(mat); + if(d < 0.) return -1; + else if(d > 0.) return 1; + else return 0; } diff --git a/Geo/MQuadrangle.cpp b/Geo/MQuadrangle.cpp index 9e489674c8f207187940a292fd2cb9972f1f8229..ea1e90b6538a187119033d89e407b914a3be9762 100644 --- a/Geo/MQuadrangle.cpp +++ b/Geo/MQuadrangle.cpp @@ -15,6 +15,7 @@ #endif #define SQU(a) ((a)*(a)) + const polynomialBasis* MQuadrangle::getFunctionSpace(int o) const { int order = (o == -1) ? getPolynomialOrder() : o; diff --git a/Geo/MTetrahedron.cpp b/Geo/MTetrahedron.cpp index cec8032171d6308d2c0f8dde0cd1c9e4500ed3d8..ea523860ec56ac2e3d5ac7871c55becdcbdb04fc 100644 --- a/Geo/MTetrahedron.cpp +++ b/Geo/MTetrahedron.cpp @@ -49,6 +49,7 @@ double MTetrahedronN::distoShapeMeasure() double MTetrahedron::getInnerRadius() { + // radius of inscribed sphere = 3 * Volume / sum(Area_i) double dist[3], face_area = 0.; double vol = getVolume(); for(int i = 0; i < 4; i++){ diff --git a/Geo/MTetrahedron.h b/Geo/MTetrahedron.h index ee917779544b30cb4567dbfb0a0e15f5ee586490..f757f3d984036c3ef5016e736c46eae379528bc4 100644 --- a/Geo/MTetrahedron.h +++ b/Geo/MTetrahedron.h @@ -128,7 +128,7 @@ class MTetrahedron : public MElement { virtual int getVolumeSign(){ return (getVolume() >= 0) ? 1 : -1; } virtual double gammaShapeMeasure(); virtual double distoShapeMeasure(); - virtual double getInnerRadius(); // radius of sphere inscribed within the Tetrahedron - r=3*Volume/sum(Area_i) + virtual double getInnerRadius(); virtual double etaShapeMeasure(); void xyz2uvw(double xyz[3], double uvw[3]); virtual const polynomialBasis* getFunctionSpace(int o=-1) const; diff --git a/Geo/MTriangle.cpp b/Geo/MTriangle.cpp index f1a22545abbe03cacff7d2dca88a1197c46e776f..0dee7ba6039a1d25b41a53a06e59260e36729ed4 100644 --- a/Geo/MTriangle.cpp +++ b/Geo/MTriangle.cpp @@ -37,6 +37,7 @@ double MTriangle::distoShapeMeasure() double MTriangle::getInnerRadius() { + // radius of inscribed circle = 2 * Area / sum(Line_i) double dist[3], k = 0.; for (int i = 0; i < 3; i++){ MEdge e = getEdge(i); diff --git a/Geo/MTriangle.h b/Geo/MTriangle.h index ec043e53819eda1fdc9cb4d5a8acfc6e4935096e..364bad106e79c7ee90e795b5ed4f0d6254bede00 100644 --- a/Geo/MTriangle.h +++ b/Geo/MTriangle.h @@ -52,7 +52,7 @@ class MTriangle : public MElement { virtual int getDim() const { return 2; } virtual double gammaShapeMeasure(); virtual double distoShapeMeasure(); - virtual double getInnerRadius(); //radius of circle inscribed within the triangle - r=2*Area/sum(Line_i) + virtual double getInnerRadius(); virtual double angleShapeMeasure(); virtual int getNumVertices() const { return 3; } virtual MVertex *getVertex(int num){ return _v[num]; } diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 7268617aa70159badaf6be2c5fdca08475b9cfaa..0665d3ba5f0bb8a8fd9de737a7baa83c82ca96fa 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -1,23 +1,24 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify + + This program 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, either version 3 of the License, or - (at your option) any later version. - + the Free Software Foundation; either version 2, or (at your option) + any later version. + This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -28,7 +29,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -46,7 +47,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.1" +#define YYBISON_VERSION "2.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -54,133 +55,17 @@ /* Pure parsers. */ #define YYPURE 0 -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ -#define yyparse gmsh_yyparse -#define yylex gmsh_yylex -#define yyerror gmsh_yyerror -#define yylval gmsh_yylval -#define yychar gmsh_yychar -#define yydebug gmsh_yydebug -#define yynerrs gmsh_yynerrs - - -/* Copy the first part of user declarations. */ - -/* Line 189 of yacc.c */ -#line 1 "Gmsh.y" - -// Gmsh - Copyright (C) 1997-2010 C. Geuzaine, J.-F. Remacle -// -// See the LICENSE.txt file for license information. Please report all -// bugs and problems to <gmsh@geuz.org>. - -#include <string.h> -#include <stdarg.h> -#include <time.h> -#include "GmshConfig.h" -#include "GmshMessage.h" -#include "fullMatrix.h" -#include "MallocUtils.h" -#include "ListUtils.h" -#include "TreeUtils.h" -#include "StringUtils.h" -#include "Numeric.h" -#include "Context.h" -#include "GModel.h" -#include "Geo.h" -#include "GeoInterpolation.h" -#include "Options.h" -#include "Colors.h" -#include "Parser.h" -#include "OpenFile.h" -#include "CommandLine.h" -#include "FunctionManager.h" -#include "ColorTable.h" -#include "OS.h" -#include "CreateFile.h" -#include "gmshSurface.h" -#include "gmshLevelset.h" - -#if defined(HAVE_MESH) -#include "Generator.h" -#include "Field.h" -#include "BackgroundMesh.h" -#endif - -#if defined(HAVE_POST) -#include "PView.h" -#include "PViewDataList.h" -#include "PluginManager.h" -#endif - -#if defined(HAVE_OPENGL) -#include "drawContext.h" -#endif - -#if defined(HAVE_KBIPACK) -#include "Homology.h" -#endif - -// Global parser variables -std::string gmsh_yyname; -int gmsh_yyerrorstate = 0; -int gmsh_yyviewindex = 0; -std::map<std::string, std::vector<double> > gmsh_yysymbols; - -// Static parser variables (accessible only in this file) -static std::map<std::string, std::string > gmsh_yystringsymbols; -#if defined(HAVE_POST) -static PViewDataList *ViewData; -#endif -static std::vector<double> ViewCoord; -static std::vector<double> *ViewValueList = 0; -static int *ViewNumList = 0; -static ExtrudeParams extr; -static int curPhysDim = 0; -static gmshSurface *myGmshSurface = 0; -#define MAX_RECUR_LOOPS 100 -static int ImbricatedLoop = 0; -static fpos_t yyposImbricatedLoopsTab[MAX_RECUR_LOOPS]; -static int yylinenoImbricatedLoopsTab[MAX_RECUR_LOOPS]; -static double LoopControlVariablesTab[MAX_RECUR_LOOPS][3]; -static const char *LoopControlVariablesNameTab[MAX_RECUR_LOOPS]; - -void yyerror(const char *s); -void yymsg(int level, const char *fmt, ...); -void skip_until(const char *skip, const char *until); -int PrintListOfDouble(char *format, List_T *list, char *buffer); -fullMatrix<double> ListOfListOfDouble2Matrix(List_T *list); - - -/* Line 189 of yacc.c */ -#line 166 "Gmsh.tab.cpp" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif +#define yyparse gmsh_yyparse +#define yylex gmsh_yylex +#define yyerror gmsh_yyerror +#define yylval gmsh_yylval +#define yychar gmsh_yychar +#define yydebug gmsh_yydebug +#define yynerrs gmsh_yynerrs /* Tokens. */ @@ -319,16 +204,247 @@ fullMatrix<double> ListOfListOfDouble2Matrix(List_T *list); tPLUSPLUS = 385 }; #endif +/* Tokens. */ +#define tDOUBLE 258 +#define tSTRING 259 +#define tBIGSTR 260 +#define tEND 261 +#define tAFFECT 262 +#define tDOTS 263 +#define tPi 264 +#define tMPI_Rank 265 +#define tMPI_Size 266 +#define tEuclidian 267 +#define tCoordinates 268 +#define tExp 269 +#define tLog 270 +#define tLog10 271 +#define tSqrt 272 +#define tSin 273 +#define tAsin 274 +#define tCos 275 +#define tAcos 276 +#define tTan 277 +#define tRand 278 +#define tAtan 279 +#define tAtan2 280 +#define tSinh 281 +#define tCosh 282 +#define tTanh 283 +#define tFabs 284 +#define tFloor 285 +#define tCeil 286 +#define tFmod 287 +#define tModulo 288 +#define tHypot 289 +#define tPrintf 290 +#define tSprintf 291 +#define tStrCat 292 +#define tStrPrefix 293 +#define tStrRelative 294 +#define tBoundingBox 295 +#define tDraw 296 +#define tToday 297 +#define tSyncModel 298 +#define tCreateTopology 299 +#define tDistanceFunction 300 +#define tPoint 301 +#define tCircle 302 +#define tEllipse 303 +#define tLine 304 +#define tSphere 305 +#define tPolarSphere 306 +#define tSurface 307 +#define tSpline 308 +#define tVolume 309 +#define tCharacteristic 310 +#define tLength 311 +#define tParametric 312 +#define tElliptic 313 +#define tPlane 314 +#define tRuled 315 +#define tTransfinite 316 +#define tComplex 317 +#define tPhysical 318 +#define tCompound 319 +#define tUsing 320 +#define tPlugin 321 +#define tDegenerated 322 +#define tOCCShape 323 +#define tRotate 324 +#define tTranslate 325 +#define tSymmetry 326 +#define tDilate 327 +#define tExtrude 328 +#define tLevelset 329 +#define tLoop 330 +#define tRecombine 331 +#define tSmoother 332 +#define tSplit 333 +#define tDelete 334 +#define tCoherence 335 +#define tIntersect 336 +#define tLayers 337 +#define tHole 338 +#define tAlias 339 +#define tAliasWithOptions 340 +#define tText2D 341 +#define tText3D 342 +#define tInterpolationScheme 343 +#define tTime 344 +#define tCombine 345 +#define tBSpline 346 +#define tBezier 347 +#define tNurbs 348 +#define tNurbsOrder 349 +#define tNurbsKnots 350 +#define tColor 351 +#define tColorTable 352 +#define tFor 353 +#define tIn 354 +#define tEndFor 355 +#define tIf 356 +#define tEndIf 357 +#define tExit 358 +#define tField 359 +#define tReturn 360 +#define tCall 361 +#define tFunction 362 +#define tShow 363 +#define tHide 364 +#define tGetValue 365 +#define tGMSH_MAJOR_VERSION 366 +#define tGMSH_MINOR_VERSION 367 +#define tGMSH_PATCH_VERSION 368 +#define tHomRank 369 +#define tHomGen 370 +#define tHomCut 371 +#define tHomSeq 372 +#define tAFFECTDIVIDE 373 +#define tAFFECTTIMES 374 +#define tAFFECTMINUS 375 +#define tAFFECTPLUS 376 +#define tOR 377 +#define tAND 378 +#define tNOTEQUAL 379 +#define tEQUAL 380 +#define tGREATEROREQUAL 381 +#define tLESSOREQUAL 382 +#define UNARYPREC 383 +#define tMINUSMINUS 384 +#define tPLUSPLUS 385 + + + + +/* Copy the first part of user declarations. */ +#line 1 "Gmsh.y" + +// Gmsh - Copyright (C) 1997-2010 C. Geuzaine, J.-F. Remacle +// +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. + +#include <string.h> +#include <stdarg.h> +#include <time.h> +#include "GmshConfig.h" +#include "GmshMessage.h" +#include "fullMatrix.h" +#include "MallocUtils.h" +#include "ListUtils.h" +#include "TreeUtils.h" +#include "StringUtils.h" +#include "Numeric.h" +#include "Context.h" +#include "GModel.h" +#include "Geo.h" +#include "GeoInterpolation.h" +#include "Options.h" +#include "Colors.h" +#include "Parser.h" +#include "OpenFile.h" +#include "CommandLine.h" +#include "FunctionManager.h" +#include "ColorTable.h" +#include "OS.h" +#include "CreateFile.h" +#include "gmshSurface.h" +#include "gmshLevelset.h" + +#if defined(HAVE_MESH) +#include "Generator.h" +#include "Field.h" +#include "BackgroundMesh.h" +#endif + +#if defined(HAVE_POST) +#include "PView.h" +#include "PViewDataList.h" +#include "PluginManager.h" +#endif + +#if defined(HAVE_OPENGL) +#include "drawContext.h" +#endif + +#if defined(HAVE_KBIPACK) +#include "Homology.h" +#endif + +// Global parser variables +std::string gmsh_yyname; +int gmsh_yyerrorstate = 0; +int gmsh_yyviewindex = 0; +std::map<std::string, std::vector<double> > gmsh_yysymbols; + +// Static parser variables (accessible only in this file) +static std::map<std::string, std::string > gmsh_yystringsymbols; +#if defined(HAVE_POST) +static PViewDataList *ViewData; +#endif +static std::vector<double> ViewCoord; +static std::vector<double> *ViewValueList = 0; +static int *ViewNumList = 0; +static ExtrudeParams extr; +static int curPhysDim = 0; +static gmshSurface *myGmshSurface = 0; +#define MAX_RECUR_LOOPS 100 +static int ImbricatedLoop = 0; +static fpos_t yyposImbricatedLoopsTab[MAX_RECUR_LOOPS]; +static int yylinenoImbricatedLoopsTab[MAX_RECUR_LOOPS]; +static double LoopControlVariablesTab[MAX_RECUR_LOOPS][3]; +static const char *LoopControlVariablesNameTab[MAX_RECUR_LOOPS]; + +void yyerror(const char *s); +void yymsg(int level, const char *fmt, ...); +void skip_until(const char *skip, const char *until); +int PrintListOfDouble(char *format, List_T *list, char *buffer); +fullMatrix<double> ListOfListOfDouble2Matrix(List_T *list); + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -{ - -/* Line 214 of yacc.c */ #line 85 "Gmsh.y" - +{ char *c; int i; unsigned int u; @@ -336,23 +452,22 @@ typedef union YYSTYPE double v[5]; Shape s; List_T *l; - - - -/* Line 214 of yacc.c */ -#line 344 "Gmsh.tab.cpp" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 +} +/* Line 193 of yacc.c. */ +#line 458 "Gmsh.tab.cpp" + YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif + /* Copy the second part of user declarations. */ -/* Line 264 of yacc.c */ -#line 356 "Gmsh.tab.cpp" +/* Line 216 of yacc.c. */ +#line 471 "Gmsh.tab.cpp" #ifdef short # undef short @@ -402,7 +517,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -427,14 +542,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int yyi) +YYID (int i) #else static int -YYID (yyi) - int yyi; +YYID (i) + int i; #endif { - return yyi; + return i; } #endif @@ -515,9 +630,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; + yytype_int16 yyss; + YYSTYPE yyvs; + }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -551,12 +666,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ +# define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -980,15 +1095,15 @@ static const char *const yytname[] = "'!'", "UNARYPREC", "tMINUSMINUS", "tPLUSPLUS", "'^'", "'('", "')'", "'['", "']'", "'.'", "'#'", "','", "'{'", "'}'", "'~'", "$accept", "All", "GeoFormatItems", "GeoFormatItem", "SendToFile", "Printf", "View", - "Views", "ElementCoords", "ElementValues", "Element", "$@1", "$@2", - "Text2DValues", "Text2D", "$@3", "Text3DValues", "Text3D", "$@4", - "InterpolationMatrix", "Time", "$@5", "NumericAffectation", + "Views", "ElementCoords", "ElementValues", "Element", "@1", "@2", + "Text2DValues", "Text2D", "@3", "Text3DValues", "Text3D", "@4", + "InterpolationMatrix", "Time", "@5", "NumericAffectation", "NumericIncrement", "Affectation", "PhysicalId", "InSphereCenter", - "CircleOptions", "Shape", "$@6", "$@7", "$@8", "$@9", "Transform", + "CircleOptions", "Shape", "@6", "@7", "@8", "@9", "Transform", "MultipleShape", "ListOfShapes", "LevelSet", "Delete", "Colorify", - "Visibility", "Command", "Loop", "Extrude", "$@10", "$@11", "$@12", - "$@13", "$@14", "$@15", "$@16", "$@17", "$@18", "$@19", "$@20", "$@21", - "$@22", "ExtrudeParameters", "ExtrudeParameter", "CompoundMap", + "Visibility", "Command", "Loop", "Extrude", "@10", "@11", "@12", "@13", + "@14", "@15", "@16", "@17", "@18", "@19", "@20", "@21", "@22", + "ExtrudeParameters", "ExtrudeParameter", "CompoundMap", "TransfiniteType", "TransfiniteArrangement", "TransfiniteCorners", "RecombineAngle", "Transfinite", "Embedding", "Coherence", "Homology", "FExpr", "FExpr_Single", "VExpr", "VExpr_Single", @@ -3008,7 +3123,7 @@ while (YYID (0)) we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ @@ -3119,20 +3234,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -3166,11 +3278,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF (stderr, " $%d = ", yyi + 1); + fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - YYFPRINTF (stderr, "\n"); + fprintf (stderr, "\n"); } } @@ -3450,8 +3562,10 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } + /* Prevent warnings from -Wmissing-prototypes. */ + #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -3467,10 +3581,11 @@ int yyparse (); #endif /* ! YYPARSE_PARAM */ -/* The lookahead symbol. */ + +/* The look-ahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +/* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ @@ -3478,9 +3593,9 @@ int yynerrs; -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -3504,39 +3619,14 @@ yyparse () #endif #endif { - - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - + + int yystate; int yyn; int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; @@ -3544,28 +3634,51 @@ yyparse () YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yystacksize = YYINITDEPTH; + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; - YYDPRINTF ((stderr, "Starting parse\n")); + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ + yyssp = yyss; yyvsp = yyvs; @@ -3595,6 +3708,7 @@ yyparse () YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; + /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -3602,6 +3716,7 @@ yyparse () yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); yyss = yyss1; @@ -3624,8 +3739,9 @@ yyparse () (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -3636,6 +3752,7 @@ yyparse () yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; + YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -3645,9 +3762,6 @@ yyparse () YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) - YYACCEPT; - goto yybackup; /*-----------. @@ -3656,16 +3770,16 @@ yyparse () yybackup: /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ + look-ahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to lookahead token. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -3697,16 +3811,20 @@ yybackup: goto yyreduce; } + if (yyn == YYFINAL) + YYACCEPT; + /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the lookahead token. */ + /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token. */ - yychar = YYEMPTY; + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -3746,127 +3864,91 @@ yyreduce: switch (yyn) { case 3: - -/* Line 1455 of yacc.c */ #line 157 "Gmsh.y" { yyerrok; return 1; ;} break; case 6: - -/* Line 1455 of yacc.c */ #line 168 "Gmsh.y" { return 1; ;} break; case 7: - -/* Line 1455 of yacc.c */ #line 169 "Gmsh.y" { return 1; ;} break; case 8: - -/* Line 1455 of yacc.c */ #line 170 "Gmsh.y" { return 1; ;} break; case 9: - -/* Line 1455 of yacc.c */ #line 171 "Gmsh.y" { return 1; ;} break; case 10: - -/* Line 1455 of yacc.c */ #line 172 "Gmsh.y" { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;} break; case 11: - -/* Line 1455 of yacc.c */ #line 173 "Gmsh.y" { return 1; ;} break; case 12: - -/* Line 1455 of yacc.c */ #line 174 "Gmsh.y" { return 1; ;} break; case 13: - -/* Line 1455 of yacc.c */ #line 175 "Gmsh.y" { return 1; ;} break; case 14: - -/* Line 1455 of yacc.c */ #line 176 "Gmsh.y" { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;} break; case 15: - -/* Line 1455 of yacc.c */ #line 177 "Gmsh.y" { return 1; ;} break; case 16: - -/* Line 1455 of yacc.c */ #line 178 "Gmsh.y" { return 1; ;} break; case 17: - -/* Line 1455 of yacc.c */ #line 179 "Gmsh.y" { return 1; ;} break; case 18: - -/* Line 1455 of yacc.c */ #line 180 "Gmsh.y" { return 1; ;} break; case 19: - -/* Line 1455 of yacc.c */ #line 181 "Gmsh.y" { return 1; ;} break; case 20: - -/* Line 1455 of yacc.c */ #line 182 "Gmsh.y" { return 1; ;} break; case 21: - -/* Line 1455 of yacc.c */ #line 183 "Gmsh.y" { return 1; ;} break; case 22: - -/* Line 1455 of yacc.c */ #line 188 "Gmsh.y" { (yyval.c) = (char*)"w"; @@ -3874,8 +3956,6 @@ yyreduce: break; case 23: - -/* Line 1455 of yacc.c */ #line 192 "Gmsh.y" { (yyval.c) = (char*)"a"; @@ -3883,8 +3963,6 @@ yyreduce: break; case 24: - -/* Line 1455 of yacc.c */ #line 199 "Gmsh.y" { Msg::Direct((yyvsp[(3) - (5)].c)); @@ -3893,8 +3971,6 @@ yyreduce: break; case 25: - -/* Line 1455 of yacc.c */ #line 204 "Gmsh.y" { std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(6) - (7)].c)); @@ -3912,8 +3988,6 @@ yyreduce: break; case 26: - -/* Line 1455 of yacc.c */ #line 218 "Gmsh.y" { char tmpstring[1024]; @@ -3930,8 +4004,6 @@ yyreduce: break; case 27: - -/* Line 1455 of yacc.c */ #line 231 "Gmsh.y" { char tmpstring[1024]; @@ -3958,8 +4030,6 @@ yyreduce: break; case 28: - -/* Line 1455 of yacc.c */ #line 259 "Gmsh.y" { #if defined(HAVE_POST) @@ -3977,8 +4047,6 @@ yyreduce: break; case 29: - -/* Line 1455 of yacc.c */ #line 273 "Gmsh.y" { #if defined(HAVE_POST) @@ -3993,8 +4061,6 @@ yyreduce: break; case 30: - -/* Line 1455 of yacc.c */ #line 284 "Gmsh.y" { #if defined(HAVE_POST) @@ -4009,8 +4075,6 @@ yyreduce: break; case 31: - -/* Line 1455 of yacc.c */ #line 298 "Gmsh.y" { #if defined(HAVE_POST) @@ -4020,36 +4084,26 @@ yyreduce: break; case 37: - -/* Line 1455 of yacc.c */ #line 312 "Gmsh.y" { ViewCoord.push_back((yyvsp[(1) - (1)].d)); ;} break; case 38: - -/* Line 1455 of yacc.c */ #line 314 "Gmsh.y" { ViewCoord.push_back((yyvsp[(3) - (3)].d)); ;} break; case 39: - -/* Line 1455 of yacc.c */ #line 319 "Gmsh.y" { if(ViewValueList) ViewValueList->push_back((yyvsp[(1) - (1)].d)); ;} break; case 40: - -/* Line 1455 of yacc.c */ #line 321 "Gmsh.y" { if(ViewValueList) ViewValueList->push_back((yyvsp[(3) - (3)].d)); ;} break; case 41: - -/* Line 1455 of yacc.c */ #line 326 "Gmsh.y" { #if defined(HAVE_POST) @@ -4157,8 +4211,6 @@ yyreduce: break; case 42: - -/* Line 1455 of yacc.c */ #line 430 "Gmsh.y" { #if defined(HAVE_POST) @@ -4172,8 +4224,6 @@ yyreduce: break; case 43: - -/* Line 1455 of yacc.c */ #line 440 "Gmsh.y" { #if defined(HAVE_POST) @@ -4183,8 +4233,6 @@ yyreduce: break; case 44: - -/* Line 1455 of yacc.c */ #line 449 "Gmsh.y" { #if defined(HAVE_POST) @@ -4195,8 +4243,6 @@ yyreduce: break; case 45: - -/* Line 1455 of yacc.c */ #line 456 "Gmsh.y" { #if defined(HAVE_POST) @@ -4207,8 +4253,6 @@ yyreduce: break; case 46: - -/* Line 1455 of yacc.c */ #line 466 "Gmsh.y" { #if defined(HAVE_POST) @@ -4221,8 +4265,6 @@ yyreduce: break; case 47: - -/* Line 1455 of yacc.c */ #line 475 "Gmsh.y" { #if defined(HAVE_POST) @@ -4232,8 +4274,6 @@ yyreduce: break; case 48: - -/* Line 1455 of yacc.c */ #line 484 "Gmsh.y" { #if defined(HAVE_POST) @@ -4244,8 +4284,6 @@ yyreduce: break; case 49: - -/* Line 1455 of yacc.c */ #line 491 "Gmsh.y" { #if defined(HAVE_POST) @@ -4256,8 +4294,6 @@ yyreduce: break; case 50: - -/* Line 1455 of yacc.c */ #line 501 "Gmsh.y" { #if defined(HAVE_POST) @@ -4269,8 +4305,6 @@ yyreduce: break; case 51: - -/* Line 1455 of yacc.c */ #line 509 "Gmsh.y" { #if defined(HAVE_POST) @@ -4280,8 +4314,6 @@ yyreduce: break; case 52: - -/* Line 1455 of yacc.c */ #line 519 "Gmsh.y" { #if defined(HAVE_POST) @@ -4301,8 +4333,6 @@ yyreduce: break; case 53: - -/* Line 1455 of yacc.c */ #line 538 "Gmsh.y" { #if defined(HAVE_POST) @@ -4322,8 +4352,6 @@ yyreduce: break; case 54: - -/* Line 1455 of yacc.c */ #line 557 "Gmsh.y" { #if defined(HAVE_POST) @@ -4333,65 +4361,47 @@ yyreduce: break; case 55: - -/* Line 1455 of yacc.c */ #line 563 "Gmsh.y" { ;} break; case 56: - -/* Line 1455 of yacc.c */ #line 570 "Gmsh.y" { (yyval.i) = 0; ;} break; case 57: - -/* Line 1455 of yacc.c */ #line 571 "Gmsh.y" { (yyval.i) = 1; ;} break; case 58: - -/* Line 1455 of yacc.c */ #line 572 "Gmsh.y" { (yyval.i) = 2; ;} break; case 59: - -/* Line 1455 of yacc.c */ #line 573 "Gmsh.y" { (yyval.i) = 3; ;} break; case 60: - -/* Line 1455 of yacc.c */ #line 574 "Gmsh.y" { (yyval.i) = 4; ;} break; case 61: - -/* Line 1455 of yacc.c */ #line 578 "Gmsh.y" { (yyval.i) = 1; ;} break; case 62: - -/* Line 1455 of yacc.c */ #line 579 "Gmsh.y" { (yyval.i) = -1; ;} break; case 63: - -/* Line 1455 of yacc.c */ #line 587 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -4417,8 +4427,6 @@ yyreduce: break; case 64: - -/* Line 1455 of yacc.c */ #line 609 "Gmsh.y" { int index = (int)(yyvsp[(3) - (7)].d); @@ -4449,8 +4457,6 @@ yyreduce: break; case 65: - -/* Line 1455 of yacc.c */ #line 636 "Gmsh.y" { if(List_Nbr((yyvsp[(4) - (9)].l)) != List_Nbr((yyvsp[(8) - (9)].l))){ @@ -4494,8 +4500,6 @@ yyreduce: break; case 66: - -/* Line 1455 of yacc.c */ #line 676 "Gmsh.y" { if(gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -4509,8 +4513,6 @@ yyreduce: break; case 67: - -/* Line 1455 of yacc.c */ #line 686 "Gmsh.y" { // appends to the list @@ -4522,8 +4524,6 @@ yyreduce: break; case 68: - -/* Line 1455 of yacc.c */ #line 694 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -4535,8 +4535,6 @@ yyreduce: break; case 69: - -/* Line 1455 of yacc.c */ #line 702 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -4552,8 +4550,6 @@ yyreduce: break; case 70: - -/* Line 1455 of yacc.c */ #line 714 "Gmsh.y" { gmsh_yystringsymbols[(yyvsp[(1) - (4)].c)] = std::string((yyvsp[(3) - (4)].c)); @@ -4563,8 +4559,6 @@ yyreduce: break; case 71: - -/* Line 1455 of yacc.c */ #line 723 "Gmsh.y" { std::string tmp((yyvsp[(5) - (6)].c)); @@ -4574,8 +4568,6 @@ yyreduce: break; case 72: - -/* Line 1455 of yacc.c */ #line 729 "Gmsh.y" { std::string tmp((yyvsp[(8) - (9)].c)); @@ -4585,8 +4577,6 @@ yyreduce: break; case 73: - -/* Line 1455 of yacc.c */ #line 738 "Gmsh.y" { double d = 0.; @@ -4608,8 +4598,6 @@ yyreduce: break; case 74: - -/* Line 1455 of yacc.c */ #line 756 "Gmsh.y" { double d = 0.; @@ -4631,8 +4619,6 @@ yyreduce: break; case 75: - -/* Line 1455 of yacc.c */ #line 774 "Gmsh.y" { double d = 0.; @@ -4645,8 +4631,6 @@ yyreduce: break; case 76: - -/* Line 1455 of yacc.c */ #line 783 "Gmsh.y" { double d = 0.; @@ -4659,8 +4643,6 @@ yyreduce: break; case 77: - -/* Line 1455 of yacc.c */ #line 795 "Gmsh.y" { ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), 0, (yyvsp[(5) - (8)].c), (yyvsp[(7) - (8)].u)); @@ -4669,8 +4651,6 @@ yyreduce: break; case 78: - -/* Line 1455 of yacc.c */ #line 800 "Gmsh.y" { ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (11)].c), (int)(yyvsp[(3) - (11)].d), (yyvsp[(8) - (11)].c), (yyvsp[(10) - (11)].u)); @@ -4679,8 +4659,6 @@ yyreduce: break; case 79: - -/* Line 1455 of yacc.c */ #line 808 "Gmsh.y" { GmshColorTable *ct = GetColorTable(0); @@ -4704,8 +4682,6 @@ yyreduce: break; case 80: - -/* Line 1455 of yacc.c */ #line 828 "Gmsh.y" { GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (9)].d)); @@ -4729,8 +4705,6 @@ yyreduce: break; case 81: - -/* Line 1455 of yacc.c */ #line 851 "Gmsh.y" { #if defined(HAVE_MESH) @@ -4743,8 +4717,6 @@ yyreduce: break; case 82: - -/* Line 1455 of yacc.c */ #line 860 "Gmsh.y" { #if defined(HAVE_MESH) @@ -4756,8 +4728,6 @@ yyreduce: break; case 83: - -/* Line 1455 of yacc.c */ #line 868 "Gmsh.y" { #if defined(HAVE_MESH) @@ -4783,8 +4753,6 @@ yyreduce: break; case 84: - -/* Line 1455 of yacc.c */ #line 890 "Gmsh.y" { #if defined(HAVE_MESH) @@ -4811,8 +4779,6 @@ yyreduce: break; case 85: - -/* Line 1455 of yacc.c */ #line 913 "Gmsh.y" { #if defined(HAVE_MESH) @@ -4841,8 +4807,6 @@ yyreduce: break; case 86: - -/* Line 1455 of yacc.c */ #line 941 "Gmsh.y" { #if defined(HAVE_POST) @@ -4858,8 +4822,6 @@ yyreduce: break; case 87: - -/* Line 1455 of yacc.c */ #line 953 "Gmsh.y" { #if defined(HAVE_POST) @@ -4875,8 +4837,6 @@ yyreduce: break; case 88: - -/* Line 1455 of yacc.c */ #line 970 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(1) - (1)].d); @@ -4884,8 +4844,6 @@ yyreduce: break; case 89: - -/* Line 1455 of yacc.c */ #line 974 "Gmsh.y" { (yyval.i) = GModel::current()->setPhysicalName @@ -4896,8 +4854,6 @@ yyreduce: break; case 90: - -/* Line 1455 of yacc.c */ #line 984 "Gmsh.y" { (yyval.l) = 0; @@ -4905,8 +4861,6 @@ yyreduce: break; case 91: - -/* Line 1455 of yacc.c */ #line 988 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(Vertex*)); @@ -4920,8 +4874,6 @@ yyreduce: break; case 92: - -/* Line 1455 of yacc.c */ #line 1000 "Gmsh.y" { for(int i = 0; i < 4; i++) (yyval.v)[i] = 0.; @@ -4929,8 +4881,6 @@ yyreduce: break; case 93: - -/* Line 1455 of yacc.c */ #line 1004 "Gmsh.y" { for(int i = 0; i < 4; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; @@ -4938,8 +4888,6 @@ yyreduce: break; case 94: - -/* Line 1455 of yacc.c */ #line 1014 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -4966,8 +4914,6 @@ yyreduce: break; case 95: - -/* Line 1455 of yacc.c */ #line 1037 "Gmsh.y" { curPhysDim = 0; @@ -4975,8 +4921,6 @@ yyreduce: break; case 96: - -/* Line 1455 of yacc.c */ #line 1041 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); @@ -4996,8 +4940,6 @@ yyreduce: break; case 97: - -/* Line 1455 of yacc.c */ #line 1057 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ @@ -5020,8 +4962,6 @@ yyreduce: break; case 98: - -/* Line 1455 of yacc.c */ #line 1079 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5043,8 +4983,6 @@ yyreduce: break; case 99: - -/* Line 1455 of yacc.c */ #line 1097 "Gmsh.y" { for (int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -5069,8 +5007,6 @@ yyreduce: break; case 100: - -/* Line 1455 of yacc.c */ #line 1119 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5092,8 +5028,6 @@ yyreduce: break; case 101: - -/* Line 1455 of yacc.c */ #line 1137 "Gmsh.y" { int num = (int)(yyvsp[(3) - (8)].d); @@ -5127,8 +5061,6 @@ yyreduce: break; case 102: - -/* Line 1455 of yacc.c */ #line 1167 "Gmsh.y" { int num = (int)(yyvsp[(3) - (8)].d); @@ -5162,8 +5094,6 @@ yyreduce: break; case 103: - -/* Line 1455 of yacc.c */ #line 1197 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5185,8 +5115,6 @@ yyreduce: break; case 104: - -/* Line 1455 of yacc.c */ #line 1215 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5208,8 +5136,6 @@ yyreduce: break; case 105: - -/* Line 1455 of yacc.c */ #line 1233 "Gmsh.y" { int num = (int)(yyvsp[(3) - (11)].d); @@ -5239,8 +5165,6 @@ yyreduce: break; case 106: - -/* Line 1455 of yacc.c */ #line 1259 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5261,8 +5185,6 @@ yyreduce: break; case 107: - -/* Line 1455 of yacc.c */ #line 1276 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5282,8 +5204,6 @@ yyreduce: break; case 108: - -/* Line 1455 of yacc.c */ #line 1292 "Gmsh.y" { curPhysDim = 1; @@ -5291,8 +5211,6 @@ yyreduce: break; case 109: - -/* Line 1455 of yacc.c */ #line 1296 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); @@ -5312,8 +5230,6 @@ yyreduce: break; case 110: - -/* Line 1455 of yacc.c */ #line 1315 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5335,8 +5251,6 @@ yyreduce: break; case 111: - -/* Line 1455 of yacc.c */ #line 1333 "Gmsh.y" { int num = (int)(yyvsp[(4) - (9)].d), type = 0; @@ -5379,8 +5293,6 @@ yyreduce: break; case 112: - -/* Line 1455 of yacc.c */ #line 1372 "Gmsh.y" { myGmshSurface = 0; @@ -5390,8 +5302,6 @@ yyreduce: break; case 113: - -/* Line 1455 of yacc.c */ #line 1378 "Gmsh.y" { myGmshSurface = gmshSurface::getSurface((int)(yyvsp[(3) - (4)].d)); @@ -5401,8 +5311,6 @@ yyreduce: break; case 114: - -/* Line 1455 of yacc.c */ #line 1384 "Gmsh.y" { int num = (int)(yyvsp[(4) - (10)].d); @@ -5413,8 +5321,6 @@ yyreduce: break; case 115: - -/* Line 1455 of yacc.c */ #line 1391 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5443,8 +5349,6 @@ yyreduce: break; case 116: - -/* Line 1455 of yacc.c */ #line 1416 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5473,8 +5377,6 @@ yyreduce: break; case 117: - -/* Line 1455 of yacc.c */ #line 1441 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5494,8 +5396,6 @@ yyreduce: break; case 118: - -/* Line 1455 of yacc.c */ #line 1457 "Gmsh.y" { int num = (int)(yyvsp[(4) - (9)].d); @@ -5517,8 +5417,6 @@ yyreduce: break; case 119: - -/* Line 1455 of yacc.c */ #line 1476 "Gmsh.y" { int num = (int)(yyvsp[(4) - (13)].d); @@ -5553,8 +5451,6 @@ yyreduce: break; case 120: - -/* Line 1455 of yacc.c */ #line 1507 "Gmsh.y" { curPhysDim = 2; @@ -5562,8 +5458,6 @@ yyreduce: break; case 121: - -/* Line 1455 of yacc.c */ #line 1511 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); @@ -5583,8 +5477,6 @@ yyreduce: break; case 122: - -/* Line 1455 of yacc.c */ #line 1531 "Gmsh.y" { yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead"); @@ -5606,8 +5498,6 @@ yyreduce: break; case 123: - -/* Line 1455 of yacc.c */ #line 1549 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5628,8 +5518,6 @@ yyreduce: break; case 124: - -/* Line 1455 of yacc.c */ #line 1567 "Gmsh.y" { #if defined(HAVE_OCC) @@ -5646,8 +5534,6 @@ yyreduce: break; case 125: - -/* Line 1455 of yacc.c */ #line 1580 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5667,8 +5553,6 @@ yyreduce: break; case 126: - -/* Line 1455 of yacc.c */ #line 1596 "Gmsh.y" { curPhysDim = 3; @@ -5676,8 +5560,6 @@ yyreduce: break; case 127: - -/* Line 1455 of yacc.c */ #line 1600 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); @@ -5697,8 +5579,6 @@ yyreduce: break; case 128: - -/* Line 1455 of yacc.c */ #line 1622 "Gmsh.y" { TranslateShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(4) - (5)].l)); @@ -5707,8 +5587,6 @@ yyreduce: break; case 129: - -/* Line 1455 of yacc.c */ #line 1627 "Gmsh.y" { RotateShapes((yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d), (yyvsp[(10) - (11)].l)); @@ -5717,8 +5595,6 @@ yyreduce: break; case 130: - -/* Line 1455 of yacc.c */ #line 1632 "Gmsh.y" { SymmetryShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(2) - (5)].v)[3], (yyvsp[(4) - (5)].l)); @@ -5727,8 +5603,6 @@ yyreduce: break; case 131: - -/* Line 1455 of yacc.c */ #line 1637 "Gmsh.y" { DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].d), (yyvsp[(8) - (9)].l)); @@ -5737,8 +5611,6 @@ yyreduce: break; case 132: - -/* Line 1455 of yacc.c */ #line 1642 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); @@ -5762,8 +5634,6 @@ yyreduce: break; case 133: - -/* Line 1455 of yacc.c */ #line 1662 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -5773,8 +5643,6 @@ yyreduce: break; case 134: - -/* Line 1455 of yacc.c */ #line 1668 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape*)); @@ -5786,22 +5654,16 @@ yyreduce: break; case 135: - -/* Line 1455 of yacc.c */ #line 1678 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 136: - -/* Line 1455 of yacc.c */ #line 1679 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 137: - -/* Line 1455 of yacc.c */ #line 1684 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); @@ -5809,8 +5671,6 @@ yyreduce: break; case 138: - -/* Line 1455 of yacc.c */ #line 1688 "Gmsh.y" { List_Add((yyval.l), &(yyvsp[(2) - (2)].s)); @@ -5818,8 +5678,6 @@ yyreduce: break; case 139: - -/* Line 1455 of yacc.c */ #line 1692 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ @@ -5846,8 +5704,6 @@ yyreduce: break; case 140: - -/* Line 1455 of yacc.c */ #line 1715 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ @@ -5874,8 +5730,6 @@ yyreduce: break; case 141: - -/* Line 1455 of yacc.c */ #line 1738 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ @@ -5902,8 +5756,6 @@ yyreduce: break; case 142: - -/* Line 1455 of yacc.c */ #line 1761 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ @@ -5930,8 +5782,6 @@ yyreduce: break; case 143: - -/* Line 1455 of yacc.c */ #line 1789 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -5956,8 +5806,6 @@ yyreduce: break; case 144: - -/* Line 1455 of yacc.c */ #line 1811 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -5981,8 +5829,6 @@ yyreduce: break; case 145: - -/* Line 1455 of yacc.c */ #line 1832 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6007,8 +5853,6 @@ yyreduce: break; case 146: - -/* Line 1455 of yacc.c */ #line 1853 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6032,8 +5876,6 @@ yyreduce: break; case 147: - -/* Line 1455 of yacc.c */ #line 1873 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6149,8 +5991,6 @@ yyreduce: break; case 148: - -/* Line 1455 of yacc.c */ #line 1985 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6173,8 +6013,6 @@ yyreduce: break; case 149: - -/* Line 1455 of yacc.c */ #line 2004 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6198,8 +6036,6 @@ yyreduce: break; case 150: - -/* Line 1455 of yacc.c */ #line 2025 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6306,8 +6142,6 @@ yyreduce: break; case 151: - -/* Line 1455 of yacc.c */ #line 2133 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -6320,8 +6154,6 @@ yyreduce: break; case 152: - -/* Line 1455 of yacc.c */ #line 2142 "Gmsh.y" { #if defined(HAVE_MESH) @@ -6331,8 +6163,6 @@ yyreduce: break; case 153: - -/* Line 1455 of yacc.c */ #line 2148 "Gmsh.y" { #if defined(HAVE_POST) @@ -6351,8 +6181,6 @@ yyreduce: break; case 154: - -/* Line 1455 of yacc.c */ #line 2163 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){ @@ -6384,8 +6212,6 @@ yyreduce: break; case 155: - -/* Line 1455 of yacc.c */ #line 2191 "Gmsh.y" { #if defined(HAVE_POST) @@ -6401,8 +6227,6 @@ yyreduce: break; case 156: - -/* Line 1455 of yacc.c */ #line 2208 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ @@ -6415,8 +6239,6 @@ yyreduce: break; case 157: - -/* Line 1455 of yacc.c */ #line 2222 "Gmsh.y" { for(int i = 0; i < 4; i++) @@ -6426,8 +6248,6 @@ yyreduce: break; case 158: - -/* Line 1455 of yacc.c */ #line 2228 "Gmsh.y" { for(int i = 0; i < 4; i++) @@ -6437,8 +6257,6 @@ yyreduce: break; case 159: - -/* Line 1455 of yacc.c */ #line 2234 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -6451,8 +6269,6 @@ yyreduce: break; case 160: - -/* Line 1455 of yacc.c */ #line 2243 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -6465,8 +6281,6 @@ yyreduce: break; case 161: - -/* Line 1455 of yacc.c */ #line 2257 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Include")){ @@ -6481,7 +6295,7 @@ yyreduce: Msg::StatusBar(2, true, "Reading '%s'", tmp.c_str()); ParseFile(tmp, false, true); SetBoundingBox(); - Msg::StatusBar(2, true, "Read '%s'", tmp.c_str()); + Msg::StatusBar(2, true, "Done reading '%s'", tmp.c_str()); } else if(!strcmp((yyvsp[(1) - (3)].c), "Print")){ // make sure we have the latest data from GEO_Internals in GModel @@ -6512,8 +6326,6 @@ yyreduce: break; case 162: - -/* Line 1455 of yacc.c */ #line 2299 "Gmsh.y" { #if defined(HAVE_POST) @@ -6534,8 +6346,6 @@ yyreduce: break; case 163: - -/* Line 1455 of yacc.c */ #line 2316 "Gmsh.y" { #if defined(HAVE_POST) && defined(HAVE_MESH) @@ -6554,8 +6364,6 @@ yyreduce: break; case 164: - -/* Line 1455 of yacc.c */ #line 2331 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){ @@ -6578,8 +6386,6 @@ yyreduce: break; case 165: - -/* Line 1455 of yacc.c */ #line 2350 "Gmsh.y" { #if defined(HAVE_POST) @@ -6595,8 +6401,6 @@ yyreduce: break; case 166: - -/* Line 1455 of yacc.c */ #line 2362 "Gmsh.y" { #if defined(HAVE_POST) @@ -6624,8 +6428,6 @@ yyreduce: break; case 167: - -/* Line 1455 of yacc.c */ #line 2386 "Gmsh.y" { exit(0); @@ -6633,8 +6435,6 @@ yyreduce: break; case 168: - -/* Line 1455 of yacc.c */ #line 2390 "Gmsh.y" { // FIXME: this is a hack to force a transfer from the old DB to @@ -6645,8 +6445,6 @@ yyreduce: break; case 169: - -/* Line 1455 of yacc.c */ #line 2397 "Gmsh.y" { CTX::instance()->forcedBBox = 0; @@ -6656,8 +6454,6 @@ yyreduce: break; case 170: - -/* Line 1455 of yacc.c */ #line 2403 "Gmsh.y" { CTX::instance()->forcedBBox = 1; @@ -6666,8 +6462,6 @@ yyreduce: break; case 171: - -/* Line 1455 of yacc.c */ #line 2408 "Gmsh.y" { #if defined(HAVE_OPENGL) @@ -6677,8 +6471,6 @@ yyreduce: break; case 172: - -/* Line 1455 of yacc.c */ #line 2414 "Gmsh.y" { GModel::current()->createTopologyFromMesh(); @@ -6686,8 +6478,6 @@ yyreduce: break; case 173: - -/* Line 1455 of yacc.c */ #line 2424 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d); @@ -6708,8 +6498,6 @@ yyreduce: break; case 174: - -/* Line 1455 of yacc.c */ #line 2441 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d); @@ -6730,8 +6518,6 @@ yyreduce: break; case 175: - -/* Line 1455 of yacc.c */ #line 2458 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d); @@ -6754,8 +6540,6 @@ yyreduce: break; case 176: - -/* Line 1455 of yacc.c */ #line 2477 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d); @@ -6778,8 +6562,6 @@ yyreduce: break; case 177: - -/* Line 1455 of yacc.c */ #line 2496 "Gmsh.y" { if(ImbricatedLoop <= 0){ @@ -6813,8 +6595,6 @@ yyreduce: break; case 178: - -/* Line 1455 of yacc.c */ #line 2526 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction @@ -6826,8 +6606,6 @@ yyreduce: break; case 179: - -/* Line 1455 of yacc.c */ #line 2534 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction @@ -6837,8 +6615,6 @@ yyreduce: break; case 180: - -/* Line 1455 of yacc.c */ #line 2540 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction @@ -6849,8 +6625,6 @@ yyreduce: break; case 181: - -/* Line 1455 of yacc.c */ #line 2547 "Gmsh.y" { if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf"); @@ -6858,16 +6632,12 @@ yyreduce: break; case 182: - -/* Line 1455 of yacc.c */ #line 2551 "Gmsh.y" { ;} break; case 183: - -/* Line 1455 of yacc.c */ #line 2560 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -6879,8 +6649,6 @@ yyreduce: break; case 184: - -/* Line 1455 of yacc.c */ #line 2568 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -6892,8 +6660,6 @@ yyreduce: break; case 185: - -/* Line 1455 of yacc.c */ #line 2576 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -6905,8 +6671,6 @@ yyreduce: break; case 186: - -/* Line 1455 of yacc.c */ #line 2584 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -6914,8 +6678,6 @@ yyreduce: break; case 187: - -/* Line 1455 of yacc.c */ #line 2588 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -6927,8 +6689,6 @@ yyreduce: break; case 188: - -/* Line 1455 of yacc.c */ #line 2596 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -6936,8 +6696,6 @@ yyreduce: break; case 189: - -/* Line 1455 of yacc.c */ #line 2600 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -6949,8 +6707,6 @@ yyreduce: break; case 190: - -/* Line 1455 of yacc.c */ #line 2608 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -6958,8 +6714,6 @@ yyreduce: break; case 191: - -/* Line 1455 of yacc.c */ #line 2612 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -6971,8 +6725,6 @@ yyreduce: break; case 192: - -/* Line 1455 of yacc.c */ #line 2620 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -6980,8 +6732,6 @@ yyreduce: break; case 193: - -/* Line 1455 of yacc.c */ #line 2624 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -6992,8 +6742,6 @@ yyreduce: break; case 194: - -/* Line 1455 of yacc.c */ #line 2633 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7004,8 +6752,6 @@ yyreduce: break; case 195: - -/* Line 1455 of yacc.c */ #line 2640 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7016,8 +6762,6 @@ yyreduce: break; case 196: - -/* Line 1455 of yacc.c */ #line 2647 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7028,8 +6772,6 @@ yyreduce: break; case 197: - -/* Line 1455 of yacc.c */ #line 2654 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7040,8 +6782,6 @@ yyreduce: break; case 198: - -/* Line 1455 of yacc.c */ #line 2661 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7052,8 +6792,6 @@ yyreduce: break; case 199: - -/* Line 1455 of yacc.c */ #line 2668 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7064,8 +6802,6 @@ yyreduce: break; case 200: - -/* Line 1455 of yacc.c */ #line 2675 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7076,8 +6812,6 @@ yyreduce: break; case 201: - -/* Line 1455 of yacc.c */ #line 2682 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7088,8 +6822,6 @@ yyreduce: break; case 202: - -/* Line 1455 of yacc.c */ #line 2689 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7100,8 +6832,6 @@ yyreduce: break; case 203: - -/* Line 1455 of yacc.c */ #line 2696 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -7109,8 +6839,6 @@ yyreduce: break; case 204: - -/* Line 1455 of yacc.c */ #line 2700 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7121,8 +6849,6 @@ yyreduce: break; case 205: - -/* Line 1455 of yacc.c */ #line 2707 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -7130,8 +6856,6 @@ yyreduce: break; case 206: - -/* Line 1455 of yacc.c */ #line 2711 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7142,8 +6866,6 @@ yyreduce: break; case 207: - -/* Line 1455 of yacc.c */ #line 2718 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -7151,8 +6873,6 @@ yyreduce: break; case 208: - -/* Line 1455 of yacc.c */ #line 2722 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7163,8 +6883,6 @@ yyreduce: break; case 209: - -/* Line 1455 of yacc.c */ #line 2729 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -7172,8 +6890,6 @@ yyreduce: break; case 210: - -/* Line 1455 of yacc.c */ #line 2733 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7184,8 +6900,6 @@ yyreduce: break; case 211: - -/* Line 1455 of yacc.c */ #line 2740 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -7193,8 +6907,6 @@ yyreduce: break; case 212: - -/* Line 1455 of yacc.c */ #line 2744 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7205,8 +6917,6 @@ yyreduce: break; case 213: - -/* Line 1455 of yacc.c */ #line 2751 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -7214,8 +6924,6 @@ yyreduce: break; case 214: - -/* Line 1455 of yacc.c */ #line 2755 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7226,8 +6934,6 @@ yyreduce: break; case 215: - -/* Line 1455 of yacc.c */ #line 2762 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -7235,8 +6941,6 @@ yyreduce: break; case 216: - -/* Line 1455 of yacc.c */ #line 2766 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7247,8 +6951,6 @@ yyreduce: break; case 217: - -/* Line 1455 of yacc.c */ #line 2773 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -7256,8 +6958,6 @@ yyreduce: break; case 218: - -/* Line 1455 of yacc.c */ #line 2777 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7268,8 +6968,6 @@ yyreduce: break; case 219: - -/* Line 1455 of yacc.c */ #line 2784 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; @@ -7277,8 +6975,6 @@ yyreduce: break; case 220: - -/* Line 1455 of yacc.c */ #line 2788 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7289,24 +6985,18 @@ yyreduce: break; case 221: - -/* Line 1455 of yacc.c */ #line 2799 "Gmsh.y" { ;} break; case 222: - -/* Line 1455 of yacc.c */ #line 2802 "Gmsh.y" { ;} break; case 223: - -/* Line 1455 of yacc.c */ #line 2808 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; @@ -7319,8 +7009,6 @@ yyreduce: break; case 224: - -/* Line 1455 of yacc.c */ #line 2817 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; @@ -7344,8 +7032,6 @@ yyreduce: break; case 225: - -/* Line 1455 of yacc.c */ #line 2837 "Gmsh.y" { yymsg(0, "Explicit region numbers in layers are deprecated"); @@ -7372,8 +7058,6 @@ yyreduce: break; case 226: - -/* Line 1455 of yacc.c */ #line 2860 "Gmsh.y" { extr.mesh.Recombine = true; @@ -7381,8 +7065,6 @@ yyreduce: break; case 227: - -/* Line 1455 of yacc.c */ #line 2864 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); @@ -7405,8 +7087,6 @@ yyreduce: break; case 228: - -/* Line 1455 of yacc.c */ #line 2887 "Gmsh.y" { (yyval.i) = 1; // harmonic @@ -7414,8 +7094,6 @@ yyreduce: break; case 229: - -/* Line 1455 of yacc.c */ #line 2891 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "Harmonic")) @@ -7431,8 +7109,6 @@ yyreduce: break; case 230: - -/* Line 1455 of yacc.c */ #line 2906 "Gmsh.y" { (yyval.v)[0] = (yyval.v)[1] = 1.; @@ -7440,8 +7116,6 @@ yyreduce: break; case 231: - -/* Line 1455 of yacc.c */ #line 2910 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power")) @@ -7458,8 +7132,6 @@ yyreduce: break; case 232: - -/* Line 1455 of yacc.c */ #line 2925 "Gmsh.y" { (yyval.i) = -1; // left @@ -7467,8 +7139,6 @@ yyreduce: break; case 233: - -/* Line 1455 of yacc.c */ #line 2929 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "Right")) @@ -7482,8 +7152,6 @@ yyreduce: break; case 234: - -/* Line 1455 of yacc.c */ #line 2941 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(double)); @@ -7491,8 +7159,6 @@ yyreduce: break; case 235: - -/* Line 1455 of yacc.c */ #line 2945 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); @@ -7500,8 +7166,6 @@ yyreduce: break; case 236: - -/* Line 1455 of yacc.c */ #line 2950 "Gmsh.y" { (yyval.i) = 45; @@ -7509,8 +7173,6 @@ yyreduce: break; case 237: - -/* Line 1455 of yacc.c */ #line 2954 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(2) - (2)].d); @@ -7518,8 +7180,6 @@ yyreduce: break; case 238: - -/* Line 1455 of yacc.c */ #line 2961 "Gmsh.y" { int type = (int)(yyvsp[(6) - (7)].v)[0]; @@ -7579,8 +7239,6 @@ yyreduce: break; case 239: - -/* Line 1455 of yacc.c */ #line 3017 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (6)].l)); @@ -7654,8 +7312,6 @@ yyreduce: break; case 240: - -/* Line 1455 of yacc.c */ #line 3087 "Gmsh.y" { yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)"); @@ -7664,8 +7320,6 @@ yyreduce: break; case 241: - -/* Line 1455 of yacc.c */ #line 3092 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (5)].l)); @@ -7736,8 +7390,6 @@ yyreduce: break; case 242: - -/* Line 1455 of yacc.c */ #line 3159 "Gmsh.y" { if(!(yyvsp[(3) - (5)].l)){ @@ -7784,8 +7436,6 @@ yyreduce: break; case 243: - -/* Line 1455 of yacc.c */ #line 3202 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ @@ -7809,8 +7459,6 @@ yyreduce: break; case 244: - -/* Line 1455 of yacc.c */ #line 3228 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); @@ -7837,8 +7485,6 @@ yyreduce: break; case 245: - -/* Line 1455 of yacc.c */ #line 3251 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); @@ -7865,24 +7511,18 @@ yyreduce: break; case 246: - -/* Line 1455 of yacc.c */ #line 3274 "Gmsh.y" { ;} break; case 247: - -/* Line 1455 of yacc.c */ #line 3277 "Gmsh.y" { ;} break; case 248: - -/* Line 1455 of yacc.c */ #line 3286 "Gmsh.y" { ReplaceAllDuplicates(); @@ -7890,8 +7530,6 @@ yyreduce: break; case 249: - -/* Line 1455 of yacc.c */ #line 3290 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Geometry")) @@ -7905,8 +7543,6 @@ yyreduce: break; case 250: - -/* Line 1455 of yacc.c */ #line 3307 "Gmsh.y" { @@ -7946,8 +7582,6 @@ yyreduce: break; case 251: - -/* Line 1455 of yacc.c */ #line 3344 "Gmsh.y" { List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (11)].l)); @@ -7986,8 +7620,6 @@ yyreduce: break; case 252: - -/* Line 1455 of yacc.c */ #line 3380 "Gmsh.y" { List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (11)].l)); @@ -8026,8 +7658,6 @@ yyreduce: break; case 253: - -/* Line 1455 of yacc.c */ #line 3415 "Gmsh.y" { List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (11)].l)); @@ -8066,64 +7696,46 @@ yyreduce: break; case 254: - -/* Line 1455 of yacc.c */ #line 3454 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 255: - -/* Line 1455 of yacc.c */ #line 3455 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (3)].d); ;} break; case 256: - -/* Line 1455 of yacc.c */ #line 3456 "Gmsh.y" { (yyval.d) = -(yyvsp[(2) - (2)].d); ;} break; case 257: - -/* Line 1455 of yacc.c */ #line 3457 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (2)].d); ;} break; case 258: - -/* Line 1455 of yacc.c */ #line 3458 "Gmsh.y" { (yyval.d) = !(yyvsp[(2) - (2)].d); ;} break; case 259: - -/* Line 1455 of yacc.c */ #line 3459 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); ;} break; case 260: - -/* Line 1455 of yacc.c */ #line 3460 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); ;} break; case 261: - -/* Line 1455 of yacc.c */ #line 3461 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); ;} break; case 262: - -/* Line 1455 of yacc.c */ #line 3463 "Gmsh.y" { if(!(yyvsp[(3) - (3)].d)) @@ -8134,428 +7746,306 @@ yyreduce: break; case 263: - -/* Line 1455 of yacc.c */ #line 3469 "Gmsh.y" { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); ;} break; case 264: - -/* Line 1455 of yacc.c */ #line 3470 "Gmsh.y" { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); ;} break; case 265: - -/* Line 1455 of yacc.c */ #line 3471 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); ;} break; case 266: - -/* Line 1455 of yacc.c */ #line 3472 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); ;} break; case 267: - -/* Line 1455 of yacc.c */ #line 3473 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); ;} break; case 268: - -/* Line 1455 of yacc.c */ #line 3474 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); ;} break; case 269: - -/* Line 1455 of yacc.c */ #line 3475 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); ;} break; case 270: - -/* Line 1455 of yacc.c */ #line 3476 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); ;} break; case 271: - -/* Line 1455 of yacc.c */ #line 3477 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); ;} break; case 272: - -/* Line 1455 of yacc.c */ #line 3478 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); ;} break; case 273: - -/* Line 1455 of yacc.c */ #line 3479 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;} break; case 274: - -/* Line 1455 of yacc.c */ #line 3480 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 275: - -/* Line 1455 of yacc.c */ #line 3481 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 276: - -/* Line 1455 of yacc.c */ #line 3482 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 277: - -/* Line 1455 of yacc.c */ #line 3483 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 278: - -/* Line 1455 of yacc.c */ #line 3484 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 279: - -/* Line 1455 of yacc.c */ #line 3485 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 280: - -/* Line 1455 of yacc.c */ #line 3486 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 281: - -/* Line 1455 of yacc.c */ #line 3487 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 282: - -/* Line 1455 of yacc.c */ #line 3488 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 283: - -/* Line 1455 of yacc.c */ #line 3489 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 284: - -/* Line 1455 of yacc.c */ #line 3490 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 285: - -/* Line 1455 of yacc.c */ #line 3491 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 286: - -/* Line 1455 of yacc.c */ #line 3492 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 287: - -/* Line 1455 of yacc.c */ #line 3493 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 288: - -/* Line 1455 of yacc.c */ #line 3494 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 289: - -/* Line 1455 of yacc.c */ #line 3495 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 290: - -/* Line 1455 of yacc.c */ #line 3496 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 291: - -/* Line 1455 of yacc.c */ #line 3497 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 292: - -/* Line 1455 of yacc.c */ #line 3498 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 293: - -/* Line 1455 of yacc.c */ #line 3499 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} break; case 294: - -/* Line 1455 of yacc.c */ #line 3500 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} break; case 295: - -/* Line 1455 of yacc.c */ #line 3502 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 296: - -/* Line 1455 of yacc.c */ #line 3503 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 297: - -/* Line 1455 of yacc.c */ #line 3504 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 298: - -/* Line 1455 of yacc.c */ #line 3505 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 299: - -/* Line 1455 of yacc.c */ #line 3506 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 300: - -/* Line 1455 of yacc.c */ #line 3507 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 301: - -/* Line 1455 of yacc.c */ #line 3508 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 302: - -/* Line 1455 of yacc.c */ #line 3509 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 303: - -/* Line 1455 of yacc.c */ #line 3510 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 304: - -/* Line 1455 of yacc.c */ #line 3511 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 305: - -/* Line 1455 of yacc.c */ #line 3512 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 306: - -/* Line 1455 of yacc.c */ #line 3513 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 307: - -/* Line 1455 of yacc.c */ #line 3514 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 308: - -/* Line 1455 of yacc.c */ #line 3515 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 309: - -/* Line 1455 of yacc.c */ #line 3516 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 310: - -/* Line 1455 of yacc.c */ #line 3517 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 311: - -/* Line 1455 of yacc.c */ #line 3518 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 312: - -/* Line 1455 of yacc.c */ #line 3519 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 313: - -/* Line 1455 of yacc.c */ #line 3520 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 314: - -/* Line 1455 of yacc.c */ #line 3521 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} break; case 315: - -/* Line 1455 of yacc.c */ #line 3522 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} break; case 316: - -/* Line 1455 of yacc.c */ #line 3531 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 317: - -/* Line 1455 of yacc.c */ #line 3532 "Gmsh.y" { (yyval.d) = 3.141592653589793; ;} break; case 318: - -/* Line 1455 of yacc.c */ #line 3533 "Gmsh.y" { (yyval.d) = Msg::GetCommRank(); ;} break; case 319: - -/* Line 1455 of yacc.c */ #line 3534 "Gmsh.y" { (yyval.d) = Msg::GetCommSize(); ;} break; case 320: - -/* Line 1455 of yacc.c */ #line 3535 "Gmsh.y" { (yyval.d) = GetGmshMajorVersion(); ;} break; case 321: - -/* Line 1455 of yacc.c */ #line 3536 "Gmsh.y" { (yyval.d) = GetGmshMinorVersion(); ;} break; case 322: - -/* Line 1455 of yacc.c */ #line 3537 "Gmsh.y" { (yyval.d) = GetGmshPatchVersion(); ;} break; case 323: - -/* Line 1455 of yacc.c */ #line 3542 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){ @@ -8569,8 +8059,6 @@ yyreduce: break; case 324: - -/* Line 1455 of yacc.c */ #line 3555 "Gmsh.y" { char tmpstring[1024]; @@ -8586,8 +8074,6 @@ yyreduce: break; case 325: - -/* Line 1455 of yacc.c */ #line 3567 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); @@ -8606,8 +8092,6 @@ yyreduce: break; case 326: - -/* Line 1455 of yacc.c */ #line 3582 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){ @@ -8621,8 +8105,6 @@ yyreduce: break; case 327: - -/* Line 1455 of yacc.c */ #line 3592 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){ @@ -8636,8 +8118,6 @@ yyreduce: break; case 328: - -/* Line 1455 of yacc.c */ #line 3602 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); @@ -8656,8 +8136,6 @@ yyreduce: break; case 329: - -/* Line 1455 of yacc.c */ #line 3620 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), (yyval.d)); @@ -8666,8 +8144,6 @@ yyreduce: break; case 330: - -/* Line 1455 of yacc.c */ #line 3625 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), (yyval.d)); @@ -8676,8 +8152,6 @@ yyreduce: break; case 331: - -/* Line 1455 of yacc.c */ #line 3630 "Gmsh.y" { double d = 0.; @@ -8691,8 +8165,6 @@ yyreduce: break; case 332: - -/* Line 1455 of yacc.c */ #line 3640 "Gmsh.y" { double d = 0.; @@ -8706,8 +8178,6 @@ yyreduce: break; case 333: - -/* Line 1455 of yacc.c */ #line 3650 "Gmsh.y" { (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); @@ -8716,8 +8186,6 @@ yyreduce: break; case 334: - -/* Line 1455 of yacc.c */ #line 3658 "Gmsh.y" { memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double)); @@ -8725,8 +8193,6 @@ yyreduce: break; case 335: - -/* Line 1455 of yacc.c */ #line 3662 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i]; @@ -8734,8 +8200,6 @@ yyreduce: break; case 336: - -/* Line 1455 of yacc.c */ #line 3666 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; @@ -8743,8 +8207,6 @@ yyreduce: break; case 337: - -/* Line 1455 of yacc.c */ #line 3670 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i]; @@ -8752,8 +8214,6 @@ yyreduce: break; case 338: - -/* Line 1455 of yacc.c */ #line 3674 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i]; @@ -8761,8 +8221,6 @@ yyreduce: break; case 339: - -/* Line 1455 of yacc.c */ #line 3681 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (11)].d); (yyval.v)[1] = (yyvsp[(4) - (11)].d); (yyval.v)[2] = (yyvsp[(6) - (11)].d); (yyval.v)[3] = (yyvsp[(8) - (11)].d); (yyval.v)[4] = (yyvsp[(10) - (11)].d); @@ -8770,8 +8228,6 @@ yyreduce: break; case 340: - -/* Line 1455 of yacc.c */ #line 3685 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (9)].d); (yyval.v)[1] = (yyvsp[(4) - (9)].d); (yyval.v)[2] = (yyvsp[(6) - (9)].d); (yyval.v)[3] = (yyvsp[(8) - (9)].d); (yyval.v)[4] = 1.0; @@ -8779,8 +8235,6 @@ yyreduce: break; case 341: - -/* Line 1455 of yacc.c */ #line 3689 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; @@ -8788,8 +8242,6 @@ yyreduce: break; case 342: - -/* Line 1455 of yacc.c */ #line 3693 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; @@ -8797,8 +8249,6 @@ yyreduce: break; case 343: - -/* Line 1455 of yacc.c */ #line 3700 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(List_T*)); @@ -8807,8 +8257,6 @@ yyreduce: break; case 344: - -/* Line 1455 of yacc.c */ #line 3705 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].l))); @@ -8816,8 +8264,6 @@ yyreduce: break; case 345: - -/* Line 1455 of yacc.c */ #line 3712 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -8826,8 +8272,6 @@ yyreduce: break; case 346: - -/* Line 1455 of yacc.c */ #line 3717 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); @@ -8835,8 +8279,6 @@ yyreduce: break; case 347: - -/* Line 1455 of yacc.c */ #line 3721 "Gmsh.y" { // creates an empty list @@ -8845,8 +8287,6 @@ yyreduce: break; case 348: - -/* Line 1455 of yacc.c */ #line 3726 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); @@ -8854,8 +8294,6 @@ yyreduce: break; case 349: - -/* Line 1455 of yacc.c */ #line 3730 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); @@ -8867,8 +8305,6 @@ yyreduce: break; case 350: - -/* Line 1455 of yacc.c */ #line 3738 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (5)].l); @@ -8880,8 +8316,6 @@ yyreduce: break; case 351: - -/* Line 1455 of yacc.c */ #line 3749 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); @@ -8889,8 +8323,6 @@ yyreduce: break; case 352: - -/* Line 1455 of yacc.c */ #line 3753 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all")) @@ -8903,8 +8335,6 @@ yyreduce: break; case 353: - -/* Line 1455 of yacc.c */ #line 3765 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); @@ -8916,8 +8346,6 @@ yyreduce: break; case 354: - -/* Line 1455 of yacc.c */ #line 3773 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (3)].l); @@ -8929,8 +8357,6 @@ yyreduce: break; case 355: - -/* Line 1455 of yacc.c */ #line 3781 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -8941,8 +8367,6 @@ yyreduce: break; case 356: - -/* Line 1455 of yacc.c */ #line 3788 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -8957,8 +8381,6 @@ yyreduce: break; case 357: - -/* Line 1455 of yacc.c */ #line 3799 "Gmsh.y" { // Returns the coordinates of a point and fills a list with it. @@ -8982,8 +8404,6 @@ yyreduce: break; case 358: - -/* Line 1455 of yacc.c */ #line 3819 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); @@ -8997,8 +8417,6 @@ yyreduce: break; case 359: - -/* Line 1455 of yacc.c */ #line 3829 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); @@ -9012,8 +8430,6 @@ yyreduce: break; case 360: - -/* Line 1455 of yacc.c */ #line 3839 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -9027,8 +8443,6 @@ yyreduce: break; case 361: - -/* Line 1455 of yacc.c */ #line 3849 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -9049,8 +8463,6 @@ yyreduce: break; case 362: - -/* Line 1455 of yacc.c */ #line 3869 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -9059,8 +8471,6 @@ yyreduce: break; case 363: - -/* Line 1455 of yacc.c */ #line 3874 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); @@ -9068,8 +8478,6 @@ yyreduce: break; case 364: - -/* Line 1455 of yacc.c */ #line 3878 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].d))); @@ -9077,8 +8485,6 @@ yyreduce: break; case 365: - -/* Line 1455 of yacc.c */ #line 3882 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ @@ -9091,8 +8497,6 @@ yyreduce: break; case 366: - -/* Line 1455 of yacc.c */ #line 3894 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d)); @@ -9100,8 +8504,6 @@ yyreduce: break; case 367: - -/* Line 1455 of yacc.c */ #line 3898 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255); @@ -9109,8 +8511,6 @@ yyreduce: break; case 368: - -/* Line 1455 of yacc.c */ #line 3910 "Gmsh.y" { int flag; @@ -9121,8 +8521,6 @@ yyreduce: break; case 369: - -/* Line 1455 of yacc.c */ #line 3917 "Gmsh.y" { unsigned int val = 0; @@ -9133,8 +8531,6 @@ yyreduce: break; case 370: - -/* Line 1455 of yacc.c */ #line 3927 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); @@ -9142,8 +8538,6 @@ yyreduce: break; case 371: - -/* Line 1455 of yacc.c */ #line 3931 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); @@ -9159,8 +8553,6 @@ yyreduce: break; case 372: - -/* Line 1455 of yacc.c */ #line 3946 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); @@ -9169,8 +8561,6 @@ yyreduce: break; case 373: - -/* Line 1455 of yacc.c */ #line 3951 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].u))); @@ -9178,8 +8568,6 @@ yyreduce: break; case 374: - -/* Line 1455 of yacc.c */ #line 3958 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); @@ -9187,8 +8575,6 @@ yyreduce: break; case 375: - -/* Line 1455 of yacc.c */ #line 3962 "Gmsh.y" { if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){ @@ -9205,8 +8591,6 @@ yyreduce: break; case 376: - -/* Line 1455 of yacc.c */ #line 3975 "Gmsh.y" { std::string out; @@ -9218,8 +8602,6 @@ yyreduce: break; case 377: - -/* Line 1455 of yacc.c */ #line 3983 "Gmsh.y" { std::string out; @@ -9231,8 +8613,6 @@ yyreduce: break; case 378: - -/* Line 1455 of yacc.c */ #line 3994 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); @@ -9240,8 +8620,6 @@ yyreduce: break; case 379: - -/* Line 1455 of yacc.c */ #line 3998 "Gmsh.y" { (yyval.c) = (char *)Malloc(32 * sizeof(char)); @@ -9253,8 +8631,6 @@ yyreduce: break; case 380: - -/* Line 1455 of yacc.c */ #line 4006 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (6)].c)) + strlen((yyvsp[(5) - (6)].c)) + 1) * sizeof(char)); @@ -9266,8 +8642,6 @@ yyreduce: break; case 381: - -/* Line 1455 of yacc.c */ #line 4014 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); @@ -9285,8 +8659,6 @@ yyreduce: break; case 382: - -/* Line 1455 of yacc.c */ #line 4028 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); @@ -9304,8 +8676,6 @@ yyreduce: break; case 383: - -/* Line 1455 of yacc.c */ #line 4042 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); @@ -9313,8 +8683,6 @@ yyreduce: break; case 384: - -/* Line 1455 of yacc.c */ #line 4046 "Gmsh.y" { char tmpstring[1024]; @@ -9337,9 +8705,8 @@ yyreduce: break; - -/* Line 1455 of yacc.c */ -#line 9343 "Gmsh.tab.cpp" +/* Line 1267 of yacc.c. */ +#line 8710 "Gmsh.tab.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -9350,6 +8717,7 @@ yyreduce: *++yyvsp = yyval; + /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -9414,7 +8782,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an + /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -9431,7 +8799,7 @@ yyerrlab: } } - /* Else will try to reuse lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; @@ -9488,6 +8856,9 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } + if (yyn == YYFINAL) + YYACCEPT; + *++yyvsp = yylval; @@ -9512,7 +8883,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -9523,7 +8894,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEMPTY) + if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -9549,8 +8920,6 @@ yyreturn: } - -/* Line 1675 of yacc.c */ #line 4066 "Gmsh.y" diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp index d84b268b98e6b9e7a2c826407a18247418ab37ab..84f2b613b948ee36766738cbb6134756cb271f36 100644 --- a/Parser/Gmsh.tab.hpp +++ b/Parser/Gmsh.tab.hpp @@ -1,23 +1,24 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify + + This program 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, either version 3 of the License, or - (at your option) any later version. - + the Free Software Foundation; either version 2, or (at your option) + any later version. + This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -28,11 +29,10 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ - /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -169,16 +169,143 @@ tPLUSPLUS = 385 }; #endif +/* Tokens. */ +#define tDOUBLE 258 +#define tSTRING 259 +#define tBIGSTR 260 +#define tEND 261 +#define tAFFECT 262 +#define tDOTS 263 +#define tPi 264 +#define tMPI_Rank 265 +#define tMPI_Size 266 +#define tEuclidian 267 +#define tCoordinates 268 +#define tExp 269 +#define tLog 270 +#define tLog10 271 +#define tSqrt 272 +#define tSin 273 +#define tAsin 274 +#define tCos 275 +#define tAcos 276 +#define tTan 277 +#define tRand 278 +#define tAtan 279 +#define tAtan2 280 +#define tSinh 281 +#define tCosh 282 +#define tTanh 283 +#define tFabs 284 +#define tFloor 285 +#define tCeil 286 +#define tFmod 287 +#define tModulo 288 +#define tHypot 289 +#define tPrintf 290 +#define tSprintf 291 +#define tStrCat 292 +#define tStrPrefix 293 +#define tStrRelative 294 +#define tBoundingBox 295 +#define tDraw 296 +#define tToday 297 +#define tSyncModel 298 +#define tCreateTopology 299 +#define tDistanceFunction 300 +#define tPoint 301 +#define tCircle 302 +#define tEllipse 303 +#define tLine 304 +#define tSphere 305 +#define tPolarSphere 306 +#define tSurface 307 +#define tSpline 308 +#define tVolume 309 +#define tCharacteristic 310 +#define tLength 311 +#define tParametric 312 +#define tElliptic 313 +#define tPlane 314 +#define tRuled 315 +#define tTransfinite 316 +#define tComplex 317 +#define tPhysical 318 +#define tCompound 319 +#define tUsing 320 +#define tPlugin 321 +#define tDegenerated 322 +#define tOCCShape 323 +#define tRotate 324 +#define tTranslate 325 +#define tSymmetry 326 +#define tDilate 327 +#define tExtrude 328 +#define tLevelset 329 +#define tLoop 330 +#define tRecombine 331 +#define tSmoother 332 +#define tSplit 333 +#define tDelete 334 +#define tCoherence 335 +#define tIntersect 336 +#define tLayers 337 +#define tHole 338 +#define tAlias 339 +#define tAliasWithOptions 340 +#define tText2D 341 +#define tText3D 342 +#define tInterpolationScheme 343 +#define tTime 344 +#define tCombine 345 +#define tBSpline 346 +#define tBezier 347 +#define tNurbs 348 +#define tNurbsOrder 349 +#define tNurbsKnots 350 +#define tColor 351 +#define tColorTable 352 +#define tFor 353 +#define tIn 354 +#define tEndFor 355 +#define tIf 356 +#define tEndIf 357 +#define tExit 358 +#define tField 359 +#define tReturn 360 +#define tCall 361 +#define tFunction 362 +#define tShow 363 +#define tHide 364 +#define tGetValue 365 +#define tGMSH_MAJOR_VERSION 366 +#define tGMSH_MINOR_VERSION 367 +#define tGMSH_PATCH_VERSION 368 +#define tHomRank 369 +#define tHomGen 370 +#define tHomCut 371 +#define tHomSeq 372 +#define tAFFECTDIVIDE 373 +#define tAFFECTTIMES 374 +#define tAFFECTMINUS 375 +#define tAFFECTPLUS 376 +#define tOR 377 +#define tAND 378 +#define tNOTEQUAL 379 +#define tEQUAL 380 +#define tGREATEROREQUAL 381 +#define tLESSOREQUAL 382 +#define UNARYPREC 383 +#define tMINUSMINUS 384 +#define tPLUSPLUS 385 + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -{ - -/* Line 1676 of yacc.c */ #line 85 "Gmsh.y" - +{ char *c; int i; unsigned int u; @@ -186,17 +313,14 @@ typedef union YYSTYPE double v[5]; Shape s; List_T *l; - - - -/* Line 1676 of yacc.c */ -#line 194 "Gmsh.tab.hpp" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 +} +/* Line 1529 of yacc.c. */ +#line 319 "Gmsh.tab.hpp" + YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif extern YYSTYPE gmsh_yylval; - diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index edc45ae33c21ef529939738ee2b1e5a021cd753b..efac5ac6f496417b95656a70f8a8b2db37425ab9 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -2267,7 +2267,7 @@ Command : Msg::StatusBar(2, true, "Reading '%s'", tmp.c_str()); ParseFile(tmp, false, true); SetBoundingBox(); - Msg::StatusBar(2, true, "Read '%s'", tmp.c_str()); + Msg::StatusBar(2, true, "Done reading '%s'", tmp.c_str()); } else if(!strcmp($1, "Print")){ // make sure we have the latest data from GEO_Internals in GModel diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index c2773b48c05da971e77c9967f73535e9bc9889fe..8fa0837ece853bcdc6867bec559bbf72e072db8a 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -73,6 +73,7 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -103,8 +104,6 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#endif /* ! C99 */ - #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -161,15 +160,7 @@ typedef unsigned int flex_uint32_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else #define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -181,7 +172,12 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -extern int gmsh_yyleng; +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t gmsh_yyleng; extern FILE *gmsh_yyin, *gmsh_yyout; @@ -207,11 +203,6 @@ extern FILE *gmsh_yyin, *gmsh_yyout; #define unput(c) yyunput( c, (yytext_ptr) ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -229,7 +220,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -299,8 +290,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* yy_hold_char holds the character lost when gmsh_yytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int gmsh_yyleng; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t gmsh_yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -328,7 +319,7 @@ static void gmsh_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); YY_BUFFER_STATE gmsh_yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE gmsh_yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char *bytes,int len ); +YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char *bytes,yy_size_t len ); void *gmsh_yyalloc (yy_size_t ); void *gmsh_yyrealloc (void *,yy_size_t ); @@ -914,7 +905,7 @@ void skipline(void); #define YY_NO_UNISTD_H #endif -#line 918 "Gmsh.yy.cpp" +#line 909 "Gmsh.yy.cpp" #define INITIAL 0 @@ -953,7 +944,7 @@ FILE *gmsh_yyget_out (void ); void gmsh_yyset_out (FILE * out_str ); -int gmsh_yyget_leng (void ); +yy_size_t gmsh_yyget_leng (void ); char *gmsh_yyget_text (void ); @@ -995,12 +986,7 @@ static int input (void ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1008,7 +994,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout )) {} } while (0) +#define ECHO fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1019,7 +1005,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( gmsh_yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1104,7 +1090,7 @@ YY_DECL #line 49 "Gmsh.l" -#line 1108 "Gmsh.yy.cpp" +#line 1094 "Gmsh.yy.cpp" if ( !(yy_init) ) { @@ -1934,7 +1920,7 @@ YY_RULE_SETUP #line 225 "Gmsh.l" ECHO; YY_BREAK -#line 1938 "Gmsh.yy.cpp" +#line 1924 "Gmsh.yy.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2120,7 +2106,7 @@ static int yy_get_next_buffer (void) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -2134,7 +2120,7 @@ static int yy_get_next_buffer (void) if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -2165,7 +2151,7 @@ static int yy_get_next_buffer (void) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); + (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -2275,7 +2261,7 @@ static int yy_get_next_buffer (void) if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = (yy_n_chars) + 2; + register yy_size_t number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = @@ -2324,7 +2310,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -2348,7 +2334,7 @@ static int yy_get_next_buffer (void) case EOB_ACT_END_OF_FILE: { if ( gmsh_yywrap( ) ) - return EOF; + return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -2600,7 +2586,7 @@ void gmsh_yypop_buffer_state (void) */ static void gmsh_yyensure_buffer_stack (void) { - int num_to_alloc; + yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { @@ -2692,17 +2678,16 @@ YY_BUFFER_STATE gmsh_yy_scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to gmsh_yylex() will * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; - yy_size_t n; - int i; + yy_size_t n, i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -2784,7 +2769,7 @@ FILE *gmsh_yyget_out (void) /** Get the length of the current token. * */ -int gmsh_yyget_leng (void) +yy_size_t gmsh_yyget_leng (void) { return gmsh_yyleng; } diff --git a/Post/PViewIO.cpp b/Post/PViewIO.cpp index 508dc09df1a7ce09802c0b20ddf1ff1d885c7bd9..58a1b2d8cbbb199db4cb8115e441e48cc69e155d 100644 --- a/Post/PViewIO.cpp +++ b/Post/PViewIO.cpp @@ -270,6 +270,6 @@ bool PView::write(std::string fileName, int format, bool append) default: ret = false; Msg::Error("Unknown view format %d", format); break; } - if(ret) Msg::StatusBar(2, true, "Wrote '%s'", fileName.c_str()); + if(ret) Msg::StatusBar(2, true, "Done writing '%s'", fileName.c_str()); return ret; }