diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 72ea78a0d847ea998cf19b708e2ea2e9c56b9897..c85e1eb26df733d6fbe92e16fd0ec0fc099b28eb 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -1,173 +1,172 @@ /* A Bison parser, made from Gmsh.y - by GNU Bison version 1.25 - */ + by GNU Bison version 1.28 */ #define YYBISON 1 /* Identify Bison output. */ -#define tDOUBLE 258 -#define tSTRING 259 -#define tBIGSTR 260 -#define tEND 261 -#define tAFFECT 262 -#define tDOTS 263 -#define tPi 264 -#define tExp 265 -#define tLog 266 -#define tLog10 267 -#define tSqrt 268 -#define tSin 269 -#define tAsin 270 -#define tCos 271 -#define tAcos 272 -#define tTan 273 -#define tRand 274 -#define tAtan 275 -#define tAtan2 276 -#define tSinh 277 -#define tCosh 278 -#define tTanh 279 -#define tFabs 280 -#define tFloor 281 -#define tCeil 282 -#define tFmod 283 -#define tModulo 284 -#define tHypot 285 -#define tPrintf 286 -#define tSprintf 287 -#define tDraw 288 -#define tPoint 289 -#define tCircle 290 -#define tEllipsis 291 -#define tLine 292 -#define tSurface 293 -#define tSpline 294 -#define tVolume 295 -#define tCharacteristic 296 -#define tLength 297 -#define tParametric 298 -#define tElliptic 299 -#define tPlane 300 -#define tRuled 301 -#define tTransfinite 302 -#define tComplex 303 -#define tPhysical 304 -#define tUsing 305 -#define tBump 306 -#define tProgression 307 -#define tRotate 308 -#define tTranslate 309 -#define tSymmetry 310 -#define tDilate 311 -#define tExtrude 312 -#define tDuplicata 313 -#define tLoop 314 -#define tRecombine 315 -#define tDelete 316 -#define tCoherence 317 -#define tView 318 -#define tAttractor 319 -#define tLayers 320 -#define tScalarTetrahedron 321 -#define tVectorTetrahedron 322 -#define tTensorTetrahedron 323 -#define tScalarTriangle 324 -#define tVectorTriangle 325 -#define tTensorTriangle 326 -#define tScalarLine 327 -#define tVectorLine 328 -#define tTensorLine 329 -#define tScalarPoint 330 -#define tVectorPoint 331 -#define tTensorPoint 332 -#define tBSpline 333 -#define tNurbs 334 -#define tOrder 335 -#define tWith 336 -#define tBounds 337 -#define tKnots 338 -#define tColor 339 -#define tFor 340 -#define tIn 341 -#define tEndFor 342 -#define tIf 343 -#define tEndIf 344 -#define tExit 345 -#define tMerge 346 -#define tReturn 347 -#define tCall 348 -#define tFunction 349 -#define tB_SPLINE_SURFACE_WITH_KNOTS 350 -#define tB_SPLINE_CURVE_WITH_KNOTS 351 -#define tCARTESIAN_POINT 352 -#define tTRUE 353 -#define tFALSE 354 -#define tUNSPECIFIED 355 -#define tU 356 -#define tV 357 -#define tEDGE_CURVE 358 -#define tVERTEX_POINT 359 -#define tORIENTED_EDGE 360 -#define tPLANE 361 -#define tFACE_OUTER_BOUND 362 -#define tEDGE_LOOP 363 -#define tADVANCED_FACE 364 -#define tVECTOR 365 -#define tDIRECTION 366 -#define tAXIS2_PLACEMENT_3D 367 -#define tISO 368 -#define tENDISO 369 -#define tENDSEC 370 -#define tDATA 371 -#define tHEADER 372 -#define tFILE_DESCRIPTION 373 -#define tFILE_SCHEMA 374 -#define tFILE_NAME 375 -#define tMANIFOLD_SOLID_BREP 376 -#define tCLOSED_SHELL 377 -#define tADVANCED_BREP_SHAPE_REPRESENTATION 378 -#define tFACE_BOUND 379 -#define tCYLINDRICAL_SURFACE 380 -#define tCONICAL_SURFACE 381 -#define tCIRCLE 382 -#define tTRIMMED_CURVE 383 -#define tGEOMETRIC_SET 384 -#define tCOMPOSITE_CURVE_SEGMENT 385 -#define tCONTINUOUS 386 -#define tCOMPOSITE_CURVE 387 -#define tTOROIDAL_SURFACE 388 -#define tPRODUCT_DEFINITION 389 -#define tPRODUCT_DEFINITION_SHAPE 390 -#define tSHAPE_DEFINITION_REPRESENTATION 391 -#define tELLIPSE 392 -#define tTrimmed 393 -#define tSolid 394 -#define tEndSolid 395 -#define tVertex 396 -#define tFacet 397 -#define tNormal 398 -#define tOuter 399 -#define tLoopSTL 400 -#define tEndLoop 401 -#define tEndFacet 402 -#define tAND 403 -#define tOR 404 -#define tNOTEQUAL 405 -#define tEQUAL 406 -#define tAPPROXEQUAL 407 -#define tAFFECTPLUS 408 -#define tAFFECTMINUS 409 -#define tAFFECTTIMES 410 -#define tAFFECTDIVIDE 411 -#define tLESSOREQUAL 412 -#define tGREATEROREQUAL 413 -#define tCROSSPRODUCT 414 -#define UNARYPREC 415 -#define tPLUSPLUS 416 -#define tMINUSMINUS 417 +#define tDOUBLE 257 +#define tSTRING 258 +#define tBIGSTR 259 +#define tEND 260 +#define tAFFECT 261 +#define tDOTS 262 +#define tPi 263 +#define tExp 264 +#define tLog 265 +#define tLog10 266 +#define tSqrt 267 +#define tSin 268 +#define tAsin 269 +#define tCos 270 +#define tAcos 271 +#define tTan 272 +#define tRand 273 +#define tAtan 274 +#define tAtan2 275 +#define tSinh 276 +#define tCosh 277 +#define tTanh 278 +#define tFabs 279 +#define tFloor 280 +#define tCeil 281 +#define tFmod 282 +#define tModulo 283 +#define tHypot 284 +#define tPrintf 285 +#define tSprintf 286 +#define tDraw 287 +#define tPoint 288 +#define tCircle 289 +#define tEllipsis 290 +#define tLine 291 +#define tSurface 292 +#define tSpline 293 +#define tVolume 294 +#define tCharacteristic 295 +#define tLength 296 +#define tParametric 297 +#define tElliptic 298 +#define tPlane 299 +#define tRuled 300 +#define tTransfinite 301 +#define tComplex 302 +#define tPhysical 303 +#define tUsing 304 +#define tBump 305 +#define tProgression 306 +#define tRotate 307 +#define tTranslate 308 +#define tSymmetry 309 +#define tDilate 310 +#define tExtrude 311 +#define tDuplicata 312 +#define tLoop 313 +#define tRecombine 314 +#define tDelete 315 +#define tCoherence 316 +#define tView 317 +#define tAttractor 318 +#define tLayers 319 +#define tScalarTetrahedron 320 +#define tVectorTetrahedron 321 +#define tTensorTetrahedron 322 +#define tScalarTriangle 323 +#define tVectorTriangle 324 +#define tTensorTriangle 325 +#define tScalarLine 326 +#define tVectorLine 327 +#define tTensorLine 328 +#define tScalarPoint 329 +#define tVectorPoint 330 +#define tTensorPoint 331 +#define tBSpline 332 +#define tNurbs 333 +#define tOrder 334 +#define tWith 335 +#define tBounds 336 +#define tKnots 337 +#define tColor 338 +#define tFor 339 +#define tIn 340 +#define tEndFor 341 +#define tIf 342 +#define tEndIf 343 +#define tExit 344 +#define tMerge 345 +#define tReturn 346 +#define tCall 347 +#define tFunction 348 +#define tB_SPLINE_SURFACE_WITH_KNOTS 349 +#define tB_SPLINE_CURVE_WITH_KNOTS 350 +#define tCARTESIAN_POINT 351 +#define tTRUE 352 +#define tFALSE 353 +#define tUNSPECIFIED 354 +#define tU 355 +#define tV 356 +#define tEDGE_CURVE 357 +#define tVERTEX_POINT 358 +#define tORIENTED_EDGE 359 +#define tPLANE 360 +#define tFACE_OUTER_BOUND 361 +#define tEDGE_LOOP 362 +#define tADVANCED_FACE 363 +#define tVECTOR 364 +#define tDIRECTION 365 +#define tAXIS2_PLACEMENT_3D 366 +#define tISO 367 +#define tENDISO 368 +#define tENDSEC 369 +#define tDATA 370 +#define tHEADER 371 +#define tFILE_DESCRIPTION 372 +#define tFILE_SCHEMA 373 +#define tFILE_NAME 374 +#define tMANIFOLD_SOLID_BREP 375 +#define tCLOSED_SHELL 376 +#define tADVANCED_BREP_SHAPE_REPRESENTATION 377 +#define tFACE_BOUND 378 +#define tCYLINDRICAL_SURFACE 379 +#define tCONICAL_SURFACE 380 +#define tCIRCLE 381 +#define tTRIMMED_CURVE 382 +#define tGEOMETRIC_SET 383 +#define tCOMPOSITE_CURVE_SEGMENT 384 +#define tCONTINUOUS 385 +#define tCOMPOSITE_CURVE 386 +#define tTOROIDAL_SURFACE 387 +#define tPRODUCT_DEFINITION 388 +#define tPRODUCT_DEFINITION_SHAPE 389 +#define tSHAPE_DEFINITION_REPRESENTATION 390 +#define tELLIPSE 391 +#define tTrimmed 392 +#define tSolid 393 +#define tEndSolid 394 +#define tVertex 395 +#define tFacet 396 +#define tNormal 397 +#define tOuter 398 +#define tLoopSTL 399 +#define tEndLoop 400 +#define tEndFacet 401 +#define tAND 402 +#define tOR 403 +#define tNOTEQUAL 404 +#define tEQUAL 405 +#define tAPPROXEQUAL 406 +#define tAFFECTPLUS 407 +#define tAFFECTMINUS 408 +#define tAFFECTTIMES 409 +#define tAFFECTDIVIDE 410 +#define tLESSOREQUAL 411 +#define tGREATEROREQUAL 412 +#define tCROSSPRODUCT 413 +#define UNARYPREC 414 +#define tPLUSPLUS 415 +#define tMINUSMINUS 416 #line 1 "Gmsh.y" - /* $Id: Gmsh.tab.cpp,v 1.41 2000-12-10 13:28:49 geuzaine Exp $ */ + /* $Id: Gmsh.tab.cpp,v 1.42 2000-12-10 23:32:39 geuzaine Exp $ */ #include <stdarg.h> @@ -253,7 +252,7 @@ typedef union { #define YYFLAG -32768 #define YYNTBASE 181 -#define YYTRANSLATE(x) ((unsigned)(x) <= 417 ? yytranslate[x] : 259) +#define YYTRANSLATE(x) ((unsigned)(x) <= 416 ? yytranslate[x] : 259) static const short yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -281,23 +280,23 @@ static const short yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 160, 161, 167, 168, 171, 172 + 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 160, 161, 167, 168, 171, 172 }; #if YYDEBUG != 0 @@ -597,12 +596,12 @@ static const short yyrline[] = { 0, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, - 2171, 2174, 2176, 2177, 2186, 2203, 2224, 2241, 2262, 2279, - 2301, 2308, 2321, 2328, 2332, 2336, 2340, 2345, 2350, 2354, - 2358, 2362, 2388, 2420, 2424, 2429, 2433, 2438, 2442, 2446, - 2452, 2458, 2464, 2468, 2474, 2481, 2487, 2496, 2500, 2510, - 2515, 2519, 2524, 2529, 2544, 2549, 2570, 2579, 2585, 2590, - 2594 + 2171, 2174, 2176, 2177, 2186, 2207, 2231, 2252, 2276, 2297, + 2322, 2329, 2342, 2349, 2353, 2357, 2361, 2366, 2371, 2375, + 2379, 2383, 2415, 2452, 2456, 2461, 2465, 2470, 2474, 2478, + 2484, 2490, 2496, 2500, 2506, 2513, 2519, 2528, 2532, 2542, + 2547, 2551, 2556, 2561, 2580, 2585, 2606, 2615, 2621, 2626, + 2630 }; #endif @@ -2656,7 +2655,8 @@ static const short yycheck[] = { 7, 164, 165, 166, -1, -1, -1, 170 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/local/share/bison.simple" +#line 3 "/usr/lib/bison.simple" +/* This file comes from bison-1.28. */ /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. @@ -2673,46 +2673,66 @@ static const short yycheck[] = { 7, You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ -#ifndef alloca +/* This is the parser code that is written into each bison parser + when the %semantic_parser declaration is not specified in the grammar. + It was written by Richard Stallman by simplifying the hairy parser + used when %semantic_parser is specified. */ + +#ifndef YYSTACK_USE_ALLOCA +#ifdef alloca +#define YYSTACK_USE_ALLOCA +#else /* alloca not defined */ #ifdef __GNUC__ +#define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) +#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) +#define YYSTACK_USE_ALLOCA #include <alloca.h> #else /* not sparc */ -#if defined (MSDOS) && !defined (__TURBOC__) +/* We think this test detects Watcom and Microsoft C. */ +/* This used to test MSDOS, but that is a bad idea + since that symbol is in the user namespace. */ +#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) +#if 0 /* No need for malloc.h, which pollutes the namespace; + instead, just don't use alloca. */ #include <malloc.h> +#endif #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) -#include <malloc.h> +/* I don't know what this was needed for, but it pollutes the namespace. + So I turned it off. rms, 2 May 1997. */ +/* #include <malloc.h> */ #pragma alloca -#else /* not MSDOS, __TURBOC__, or _AIX */ -#ifdef __hpux -#ifdef __cplusplus -extern "C" { -void *alloca (unsigned int); -}; -#else /* not __cplusplus */ -void *alloca (); -#endif /* not __cplusplus */ +#define YYSTACK_USE_ALLOCA +#else /* not MSDOS, or __TURBOC__, or _AIX */ +#if 0 +#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, + and on HPUX 10. Eventually we can turn this on. */ +#define YYSTACK_USE_ALLOCA +#define alloca __builtin_alloca #endif /* __hpux */ +#endif #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ -#endif /* not sparc. */ -#endif /* not GNU C. */ -#endif /* alloca not defined. */ +#endif /* not sparc */ +#endif /* not GNU C */ +#endif /* alloca not defined */ +#endif /* YYSTACK_USE_ALLOCA not defined */ -/* This is the parser code that is written into each bison parser - when the %semantic_parser declaration is not specified in the grammar. - It was written by Richard Stallman by simplifying the hairy parser - used when %semantic_parser is specified. */ +#ifdef YYSTACK_USE_ALLOCA +#define YYSTACK_ALLOC alloca +#else +#define YYSTACK_ALLOC malloc +#endif /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action @@ -2722,8 +2742,8 @@ void *alloca (); #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 -#define YYACCEPT return(0) -#define YYABORT return(1) +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the @@ -2804,12 +2824,12 @@ int yydebug; /* nonzero means print parse trace */ #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -int yyparse (void); -#endif +/* Define __yy_memcpy. Note that the size argument + should be passed with type unsigned int, because that is what the non-GCC + definitions require. With GCC, __builtin_memcpy takes an arg + of type size_t, but it can handle unsigned int. */ + #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ @@ -2821,7 +2841,7 @@ static void __yy_memcpy (to, from, count) char *to; char *from; - int count; + unsigned int count; { register char *f = from; register char *t = to; @@ -2836,10 +2856,10 @@ __yy_memcpy (to, from, count) /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void -__yy_memcpy (char *to, char *from, int count) +__yy_memcpy (char *to, char *from, unsigned int count) { - register char *f = from; register char *t = to; + register char *f = from; register int i = count; while (i-- > 0) @@ -2849,7 +2869,7 @@ __yy_memcpy (char *to, char *from, int count) #endif #endif -#line 196 "/usr/local/share/bison.simple" +#line 217 "/usr/lib/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -2870,6 +2890,15 @@ __yy_memcpy (char *to, char *from, int count) #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +#ifdef YYPARSE_PARAM +int yyparse (void *); +#else +int yyparse (void); +#endif +#endif + int yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL @@ -2898,6 +2927,7 @@ yyparse(YYPARSE_PARAM_ARG) #endif int yystacksize = YYINITDEPTH; + int yyfree_stacks = 0; #ifdef YYPURE int yychar; @@ -2982,18 +3012,32 @@ yynewstate: if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); + if (yyfree_stacks) + { + free (yyss); + free (yyvs); +#ifdef YYLSP_NEEDED + free (yyls); +#endif + } return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; - yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); - __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); - yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); - __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); +#ifndef YYSTACK_USE_ALLOCA + yyfree_stacks = 1; +#endif + yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); + __yy_memcpy ((char *)yyss, (char *)yyss1, + size * (unsigned int) sizeof (*yyssp)); + yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); + __yy_memcpy ((char *)yyvs, (char *)yyvs1, + size * (unsigned int) sizeof (*yyvsp)); #ifdef YYLSP_NEEDED - yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); - __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); + yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); + __yy_memcpy ((char *)yyls, (char *)yyls1, + size * (unsigned int) sizeof (*yylsp)); #endif #endif /* no yyoverflow */ @@ -5463,11 +5507,15 @@ case 284: case 285: #line 2187 "Gmsh.y" { - if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-2].c))) + if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-2].c))){ vyyerror("Unknown Numeric Option Class '%s'", yyvsp[-2].c); + yyval.d = 0. ; + } else{ - if(!(pNumOpt = Get_NumberOption(yyvsp[0].c, pNumCat, &i))) + if(!(pNumOpt = Get_NumberOption(yyvsp[0].c, pNumCat, &i))){ vyyerror("Unknown Numeric Option '%s.%s'", yyvsp[-2].c, yyvsp[0].c); + yyval.d = 0. ; + } else{ switch(i){ case GMSH_DOUBLE : yyval.d = *(double*)pNumOpt ; break ; @@ -5480,15 +5528,18 @@ case 285: ; break;} case 286: -#line 2204 "Gmsh.y" +#line 2208 "Gmsh.y" { - if(strcmp(yyvsp[-7].c, "PostProcessing")) + if(strcmp(yyvsp[-7].c, "PostProcessing")){ vyyerror("Unknown View Option Class '%s'", yyvsp[-7].c); + yyval.d = 0. ; + } else{ if(!(pNumOpt = Get_NumberViewOption((int)yyvsp[-3].d, yyvsp[0].c, &i))){ if(i < 0) vyyerror("PostProcessing View %d does not Exist", (int)yyvsp[-3].d); else vyyerror("Unknown Numeric Option '%s.View[%d].%s'", yyvsp[-7].c, (int)yyvsp[-3].d, yyvsp[0].c); + yyval.d = 0. ; } else{ switch(i){ @@ -5502,13 +5553,17 @@ case 286: ; break;} case 287: -#line 2225 "Gmsh.y" +#line 2232 "Gmsh.y" { - if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-3].c))) + if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-3].c))){ vyyerror("Unknown Numeric Option Class '%s'", yyvsp[-3].c); + yyval.d = 0. ; + } else{ - if(!(pNumOpt = Get_NumberOption(yyvsp[-1].c, pNumCat, &i))) + if(!(pNumOpt = Get_NumberOption(yyvsp[-1].c, pNumCat, &i))){ vyyerror("Unknown Numeric Option '%s.%s'", yyvsp[-3].c, yyvsp[-1].c); + yyval.d = 0. ; + } else{ switch(i){ case GMSH_DOUBLE : yyval.d = (*(double*)pNumOpt += 1.) ; break ; @@ -5521,15 +5576,18 @@ case 287: ; break;} case 288: -#line 2242 "Gmsh.y" +#line 2253 "Gmsh.y" { - if(strcmp(yyvsp[-8].c, "PostProcessing")) + if(strcmp(yyvsp[-8].c, "PostProcessing")){ vyyerror("Unknown View Option Class '%s'", yyvsp[-8].c); + yyval.d = 0. ; + } else{ if(!(pNumOpt = Get_NumberViewOption((int)yyvsp[-4].d, yyvsp[-1].c, &i))){ if(i < 0) vyyerror("PostProcessing View %d does not Exist", (int)yyvsp[-4].d); else vyyerror("Unknown Numeric Option '%s.View[%d].%s'", yyvsp[-8].c, (int)yyvsp[-4].d, yyvsp[-1].c); + yyval.d = 0. ; } else{ switch(i){ @@ -5543,13 +5601,17 @@ case 288: ; break;} case 289: -#line 2263 "Gmsh.y" +#line 2277 "Gmsh.y" { - if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-3].c))) + if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-3].c))){ vyyerror("Unknown Numeric Option Class '%s'", yyvsp[-3].c); + yyval.d = 0. ; + } else{ - if(!(pNumOpt = Get_NumberOption(yyvsp[-1].c, pNumCat, &i))) + if(!(pNumOpt = Get_NumberOption(yyvsp[-1].c, pNumCat, &i))){ vyyerror("Unknown Numeric Option '%s.%s'", yyvsp[-3].c, yyvsp[-1].c); + yyval.d = 0. ; + } else{ switch(i){ case GMSH_DOUBLE : yyval.d = (*(double*)pNumOpt -= 1.) ; break ; @@ -5562,15 +5624,18 @@ case 289: ; break;} case 290: -#line 2280 "Gmsh.y" +#line 2298 "Gmsh.y" { - if(strcmp(yyvsp[-8].c, "PostProcessing")) + if(strcmp(yyvsp[-8].c, "PostProcessing")){ vyyerror("Unknown View Option Class '%s'", yyvsp[-8].c); + yyval.d = 0. ; + } else{ if(!(pNumOpt = Get_NumberViewOption((int)yyvsp[-4].d, yyvsp[-1].c, &i))){ if(i < 0) vyyerror("PostProcessing View %d does not Exist", (int)yyvsp[-4].d); else vyyerror("Unknown Numeric Option '%s.View[%d].%s'", yyvsp[-8].c, (int)yyvsp[-4].d, yyvsp[-1].c); + yyval.d = 0. ; } else{ switch(i){ @@ -5584,7 +5649,7 @@ case 290: ; break;} case 291: -#line 2303 "Gmsh.y" +#line 2324 "Gmsh.y" { ListOfDouble2_L = List_Create(2,1,sizeof(double)) ; for(d=yyvsp[-2].d ; (yyvsp[-2].d<yyvsp[0].d)?(d<=yyvsp[0].d):(d>=yyvsp[0].d) ; (yyvsp[-2].d<yyvsp[0].d)?(d+=1.):(d-=1.)) @@ -5592,7 +5657,7 @@ case 291: ; break;} case 292: -#line 2309 "Gmsh.y" +#line 2330 "Gmsh.y" { ListOfDouble2_L = List_Create(2,1,sizeof(double)) ; if(!yyvsp[0].d || (yyvsp[-4].d<yyvsp[-2].d && yyvsp[0].d<0) || (yyvsp[-4].d>yyvsp[-2].d && yyvsp[0].d>0)){ @@ -5605,7 +5670,7 @@ case 292: ; break;} case 293: -#line 2323 "Gmsh.y" +#line 2344 "Gmsh.y" { memcpy(yyval.v, yyvsp[0].v, 5*sizeof(double)) ; //??? Avec ce qui suit, bison se plante sur DEC @@ -5613,61 +5678,67 @@ case 293: ; break;} case 294: -#line 2329 "Gmsh.y" +#line 2350 "Gmsh.y" { for(i=0 ; i<6 ; i++) yyval.v[i] = -yyvsp[0].v[i] ; ; break;} case 295: -#line 2333 "Gmsh.y" +#line 2354 "Gmsh.y" { for(i=0 ; i<6 ; i++) yyval.v[i] = yyvsp[0].v[i]; ; break;} case 296: -#line 2337 "Gmsh.y" +#line 2358 "Gmsh.y" { for(i=0 ; i<6 ; i++) yyval.v[i] = yyvsp[-2].v[i] - yyvsp[0].v[i] ; ; break;} case 297: -#line 2341 "Gmsh.y" +#line 2362 "Gmsh.y" { for(i=0 ; i<6 ; i++) yyval.v[i] = yyvsp[-2].v[i] + yyvsp[0].v[i] ; ; break;} case 298: -#line 2347 "Gmsh.y" +#line 2368 "Gmsh.y" { yyval.v[0]=yyvsp[-9].d; yyval.v[1]=yyvsp[-7].d; yyval.v[2]=yyvsp[-5].d; yyval.v[3]=yyvsp[-3].d; yyval.v[4]=yyvsp[-1].d; ; break;} case 299: -#line 2351 "Gmsh.y" +#line 2372 "Gmsh.y" { yyval.v[0]=yyvsp[-7].d; yyval.v[1]=yyvsp[-5].d; yyval.v[2]=yyvsp[-3].d; yyval.v[3]=yyvsp[-1].d; yyval.v[4]=1.0; ; break;} case 300: -#line 2355 "Gmsh.y" +#line 2376 "Gmsh.y" { yyval.v[0]=yyvsp[-5].d; yyval.v[1]=yyvsp[-3].d; yyval.v[2]=yyvsp[-1].d; yyval.v[3]=0.0; yyval.v[4]=1.0; ; break;} case 301: -#line 2359 "Gmsh.y" +#line 2380 "Gmsh.y" { yyval.v[0]=yyvsp[-5].d; yyval.v[1]=yyvsp[-3].d; yyval.v[2]=yyvsp[-1].d; yyval.v[3]=0.0; yyval.v[4]=1.0; ; break;} case 302: -#line 2363 "Gmsh.y" +#line 2384 "Gmsh.y" { - if(!(pArrCat = Get_ArrayOptionCategory(yyvsp[-2].c))) + if(!(pArrCat = Get_ArrayOptionCategory(yyvsp[-2].c))){ vyyerror("Unknown Array Option Class '%s'", yyvsp[-2].c); + yyval.v[0]=yyval.v[1]=yyval.v[2]=yyval.v[3]= 0.0 ; + yyval.v[4]= 1.0 ; + } else{ - if(!(pArrOpt = Get_ArrayOption(yyvsp[0].c, pArrCat, &i))) + if(!(pArrOpt = Get_ArrayOption(yyvsp[0].c, pArrCat, &i))){ vyyerror("Unknown Array Option '%s.%s'", yyvsp[-2].c, yyvsp[0].c); + yyval.v[0]=yyval.v[1]=yyval.v[2]=yyval.v[3]= 0.0 ; + yyval.v[4]= 1.0 ; + } else{ switch(i){ case GMSH_DOUBLE : @@ -5689,15 +5760,20 @@ case 302: ; break;} case 303: -#line 2389 "Gmsh.y" +#line 2416 "Gmsh.y" { - if(strcmp(yyvsp[-7].c, "PostProcessing")) + if(strcmp(yyvsp[-7].c, "PostProcessing")){ vyyerror("Unknown View Option Class '%s'", yyvsp[-7].c); + yyval.v[0]=yyval.v[1]=yyval.v[2]=yyval.v[3]= 0.0 ; + yyval.v[4]= 1.0 ; + } else{ if(!(pArrOpt = Get_ArrayViewOption((int)yyvsp[-3].d, yyvsp[0].c, &i))){ if(i < 0) vyyerror("PostProcessing View %d does not Exist", (int)yyvsp[-3].d); else vyyerror("Unknown Array Option '%s.View[%d].%s'", yyvsp[-7].c, (int)yyvsp[-3].d, yyvsp[0].c); + yyval.v[0]=yyval.v[1]=yyval.v[2]=yyval.v[3]= 0.0 ; + yyval.v[4]= 1.0 ; } else{ switch(i){ @@ -5721,62 +5797,62 @@ case 303: ; break;} case 304: -#line 2422 "Gmsh.y" +#line 2454 "Gmsh.y" { ; break;} case 305: -#line 2425 "Gmsh.y" +#line 2457 "Gmsh.y" { ; break;} case 306: -#line 2431 "Gmsh.y" +#line 2463 "Gmsh.y" { ; break;} case 307: -#line 2434 "Gmsh.y" +#line 2466 "Gmsh.y" { ; break;} case 308: -#line 2440 "Gmsh.y" +#line 2472 "Gmsh.y" { ; break;} case 309: -#line 2443 "Gmsh.y" +#line 2475 "Gmsh.y" { yyval.l=ListOfListOfDouble_L; ; break;} case 310: -#line 2447 "Gmsh.y" +#line 2479 "Gmsh.y" { yyval.l=ListOfListOfDouble_L; ; break;} case 311: -#line 2454 "Gmsh.y" +#line 2486 "Gmsh.y" { ListOfListOfDouble_L = List_Create(2,1,sizeof(List_T*)) ; List_Add(ListOfListOfDouble_L, &(yyvsp[0].l)) ; ; break;} case 312: -#line 2459 "Gmsh.y" +#line 2491 "Gmsh.y" { List_Add(ListOfListOfDouble_L, &(yyvsp[0].l)) ; ; break;} case 313: -#line 2466 "Gmsh.y" +#line 2498 "Gmsh.y" { ; break;} case 314: -#line 2469 "Gmsh.y" +#line 2501 "Gmsh.y" { ListOfDouble_L = List_Create(2,1,sizeof(double)) ; List_Add(ListOfDouble_L, &(yyvsp[0].d)) ; @@ -5784,20 +5860,20 @@ case 314: ; break;} case 315: -#line 2475 "Gmsh.y" +#line 2507 "Gmsh.y" { yyval.l=ListOfDouble_L; ; break;} case 316: -#line 2483 "Gmsh.y" +#line 2515 "Gmsh.y" { ListOfDouble_L = List_Create(2,1,sizeof(double)) ; List_Add(ListOfDouble_L, &(yyvsp[0].d)) ; ; break;} case 317: -#line 2488 "Gmsh.y" +#line 2520 "Gmsh.y" { ListOfDouble_L = List_Create(2,1,sizeof(double)) ; for(i=0 ; i<List_Nbr(ListOfDouble2_L) ; i++){ @@ -5808,13 +5884,13 @@ case 317: ; break;} case 318: -#line 2497 "Gmsh.y" +#line 2529 "Gmsh.y" { List_Add(ListOfDouble_L, &(yyvsp[0].d)) ; ; break;} case 319: -#line 2501 "Gmsh.y" +#line 2533 "Gmsh.y" { for(i=0 ; i<List_Nbr(ListOfDouble2_L) ; i++){ List_Read(ListOfDouble2_L, i, &d) ; @@ -5824,39 +5900,43 @@ case 319: ; break;} case 320: -#line 2512 "Gmsh.y" +#line 2544 "Gmsh.y" { yyval.u = PACK_COLOR((int)yyvsp[-7].d, (int)yyvsp[-5].d, (int)yyvsp[-3].d, (int)yyvsp[-1].d); ; break;} case 321: -#line 2516 "Gmsh.y" +#line 2548 "Gmsh.y" { yyval.u = PACK_COLOR((int)yyvsp[-5].d, (int)yyvsp[-3].d, (int)yyvsp[-1].d, 255); ; break;} case 322: -#line 2520 "Gmsh.y" +#line 2552 "Gmsh.y" { yyval.u = Get_ColorForString(ColorString, (int)yyvsp[-1].d, yyvsp[-3].c, &flag); if(flag) vyyerror("Unknown Color '%s'", yyvsp[-3].c); ; break;} case 323: -#line 2525 "Gmsh.y" +#line 2557 "Gmsh.y" { yyval.u = Get_ColorForString(ColorString, -1, yyvsp[0].c, &flag); if(flag) vyyerror("Unknown Color '%s'", yyvsp[0].c); ; break;} case 324: -#line 2530 "Gmsh.y" +#line 2562 "Gmsh.y" { - if(!(pColCat = Get_ColorOptionCategory(yyvsp[-4].c))) + if(!(pColCat = Get_ColorOptionCategory(yyvsp[-4].c))){ vyyerror("Unknown Color Option Class '%s'", yyvsp[-4].c); + yyval.u = 0 ; + } else{ - if(!(pColOpt = Get_ColorOption(yyvsp[0].c, pColCat))) + if(!(pColOpt = Get_ColorOption(yyvsp[0].c, pColCat))){ vyyerror("Unknown Color Option '%s.%s'", yyvsp[-4].c, yyvsp[0].c); + yyval.u = 0 ; + } else{ yyval.u = *pColOpt ; } @@ -5864,13 +5944,13 @@ case 324: ; break;} case 325: -#line 2546 "Gmsh.y" +#line 2582 "Gmsh.y" { yyval.l = ListOfColor_L; ; break;} case 326: -#line 2550 "Gmsh.y" +#line 2586 "Gmsh.y" { if(!ListOfColor_L) ListOfColor_L = List_Create(256,10,sizeof(unsigned int)) ; @@ -5891,7 +5971,7 @@ case 326: ; break;} case 327: -#line 2572 "Gmsh.y" +#line 2608 "Gmsh.y" { if(!ListOfColor_L) ListOfColor_L = List_Create(256,10,sizeof(unsigned int)) ; @@ -5901,25 +5981,25 @@ case 327: ; break;} case 328: -#line 2580 "Gmsh.y" +#line 2616 "Gmsh.y" { List_Add(ListOfColor_L, &(yyvsp[0].u)) ; ; break;} case 329: -#line 2587 "Gmsh.y" +#line 2623 "Gmsh.y" { yyval.c = yyvsp[0].c; ; break;} case 330: -#line 2591 "Gmsh.y" +#line 2627 "Gmsh.y" { yyval.c = yyvsp[-1].c; ; break;} case 331: -#line 2595 "Gmsh.y" +#line 2631 "Gmsh.y" { sprintf(tmpstring, yyvsp[-3].c, yyvsp[-1].d); yyval.c = (char*)Malloc(strlen(tmpstring)); @@ -5928,7 +6008,7 @@ case 331: break;} } /* the action file gets copied in in place of this dollarsign */ -#line 498 "/usr/local/share/bison.simple" +#line 543 "/usr/lib/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -6123,8 +6203,32 @@ yyerrhandle: yystate = yyn; goto yynewstate; + + yyacceptlab: + /* YYACCEPT comes here. */ + if (yyfree_stacks) + { + free (yyss); + free (yyvs); +#ifdef YYLSP_NEEDED + free (yyls); +#endif + } + return 0; + + yyabortlab: + /* YYABORT comes here. */ + if (yyfree_stacks) + { + free (yyss); + free (yyvs); +#ifdef YYLSP_NEEDED + free (yyls); +#endif + } + return 1; } -#line 2602 "Gmsh.y" +#line 2638 "Gmsh.y" void InitSymbols(void){ diff --git a/Parser/Gmsh.tab.cpp.h b/Parser/Gmsh.tab.cpp.h index fd2234b83985ace8a3fef36e63d430edbcffa114..4af43ae30d3184476027b7ec8495c0d718d5f19e 100644 --- a/Parser/Gmsh.tab.cpp.h +++ b/Parser/Gmsh.tab.cpp.h @@ -7,166 +7,166 @@ typedef union { Shape s; List_T *l; } YYSTYPE; -#define tDOUBLE 258 -#define tSTRING 259 -#define tBIGSTR 260 -#define tEND 261 -#define tAFFECT 262 -#define tDOTS 263 -#define tPi 264 -#define tExp 265 -#define tLog 266 -#define tLog10 267 -#define tSqrt 268 -#define tSin 269 -#define tAsin 270 -#define tCos 271 -#define tAcos 272 -#define tTan 273 -#define tRand 274 -#define tAtan 275 -#define tAtan2 276 -#define tSinh 277 -#define tCosh 278 -#define tTanh 279 -#define tFabs 280 -#define tFloor 281 -#define tCeil 282 -#define tFmod 283 -#define tModulo 284 -#define tHypot 285 -#define tPrintf 286 -#define tSprintf 287 -#define tDraw 288 -#define tPoint 289 -#define tCircle 290 -#define tEllipsis 291 -#define tLine 292 -#define tSurface 293 -#define tSpline 294 -#define tVolume 295 -#define tCharacteristic 296 -#define tLength 297 -#define tParametric 298 -#define tElliptic 299 -#define tPlane 300 -#define tRuled 301 -#define tTransfinite 302 -#define tComplex 303 -#define tPhysical 304 -#define tUsing 305 -#define tBump 306 -#define tProgression 307 -#define tRotate 308 -#define tTranslate 309 -#define tSymmetry 310 -#define tDilate 311 -#define tExtrude 312 -#define tDuplicata 313 -#define tLoop 314 -#define tRecombine 315 -#define tDelete 316 -#define tCoherence 317 -#define tView 318 -#define tAttractor 319 -#define tLayers 320 -#define tScalarTetrahedron 321 -#define tVectorTetrahedron 322 -#define tTensorTetrahedron 323 -#define tScalarTriangle 324 -#define tVectorTriangle 325 -#define tTensorTriangle 326 -#define tScalarLine 327 -#define tVectorLine 328 -#define tTensorLine 329 -#define tScalarPoint 330 -#define tVectorPoint 331 -#define tTensorPoint 332 -#define tBSpline 333 -#define tNurbs 334 -#define tOrder 335 -#define tWith 336 -#define tBounds 337 -#define tKnots 338 -#define tColor 339 -#define tFor 340 -#define tIn 341 -#define tEndFor 342 -#define tIf 343 -#define tEndIf 344 -#define tExit 345 -#define tMerge 346 -#define tReturn 347 -#define tCall 348 -#define tFunction 349 -#define tB_SPLINE_SURFACE_WITH_KNOTS 350 -#define tB_SPLINE_CURVE_WITH_KNOTS 351 -#define tCARTESIAN_POINT 352 -#define tTRUE 353 -#define tFALSE 354 -#define tUNSPECIFIED 355 -#define tU 356 -#define tV 357 -#define tEDGE_CURVE 358 -#define tVERTEX_POINT 359 -#define tORIENTED_EDGE 360 -#define tPLANE 361 -#define tFACE_OUTER_BOUND 362 -#define tEDGE_LOOP 363 -#define tADVANCED_FACE 364 -#define tVECTOR 365 -#define tDIRECTION 366 -#define tAXIS2_PLACEMENT_3D 367 -#define tISO 368 -#define tENDISO 369 -#define tENDSEC 370 -#define tDATA 371 -#define tHEADER 372 -#define tFILE_DESCRIPTION 373 -#define tFILE_SCHEMA 374 -#define tFILE_NAME 375 -#define tMANIFOLD_SOLID_BREP 376 -#define tCLOSED_SHELL 377 -#define tADVANCED_BREP_SHAPE_REPRESENTATION 378 -#define tFACE_BOUND 379 -#define tCYLINDRICAL_SURFACE 380 -#define tCONICAL_SURFACE 381 -#define tCIRCLE 382 -#define tTRIMMED_CURVE 383 -#define tGEOMETRIC_SET 384 -#define tCOMPOSITE_CURVE_SEGMENT 385 -#define tCONTINUOUS 386 -#define tCOMPOSITE_CURVE 387 -#define tTOROIDAL_SURFACE 388 -#define tPRODUCT_DEFINITION 389 -#define tPRODUCT_DEFINITION_SHAPE 390 -#define tSHAPE_DEFINITION_REPRESENTATION 391 -#define tELLIPSE 392 -#define tTrimmed 393 -#define tSolid 394 -#define tEndSolid 395 -#define tVertex 396 -#define tFacet 397 -#define tNormal 398 -#define tOuter 399 -#define tLoopSTL 400 -#define tEndLoop 401 -#define tEndFacet 402 -#define tAND 403 -#define tOR 404 -#define tNOTEQUAL 405 -#define tEQUAL 406 -#define tAPPROXEQUAL 407 -#define tAFFECTPLUS 408 -#define tAFFECTMINUS 409 -#define tAFFECTTIMES 410 -#define tAFFECTDIVIDE 411 -#define tLESSOREQUAL 412 -#define tGREATEROREQUAL 413 -#define tCROSSPRODUCT 414 -#define UNARYPREC 415 -#define tPLUSPLUS 416 -#define tMINUSMINUS 417 +#define tDOUBLE 257 +#define tSTRING 258 +#define tBIGSTR 259 +#define tEND 260 +#define tAFFECT 261 +#define tDOTS 262 +#define tPi 263 +#define tExp 264 +#define tLog 265 +#define tLog10 266 +#define tSqrt 267 +#define tSin 268 +#define tAsin 269 +#define tCos 270 +#define tAcos 271 +#define tTan 272 +#define tRand 273 +#define tAtan 274 +#define tAtan2 275 +#define tSinh 276 +#define tCosh 277 +#define tTanh 278 +#define tFabs 279 +#define tFloor 280 +#define tCeil 281 +#define tFmod 282 +#define tModulo 283 +#define tHypot 284 +#define tPrintf 285 +#define tSprintf 286 +#define tDraw 287 +#define tPoint 288 +#define tCircle 289 +#define tEllipsis 290 +#define tLine 291 +#define tSurface 292 +#define tSpline 293 +#define tVolume 294 +#define tCharacteristic 295 +#define tLength 296 +#define tParametric 297 +#define tElliptic 298 +#define tPlane 299 +#define tRuled 300 +#define tTransfinite 301 +#define tComplex 302 +#define tPhysical 303 +#define tUsing 304 +#define tBump 305 +#define tProgression 306 +#define tRotate 307 +#define tTranslate 308 +#define tSymmetry 309 +#define tDilate 310 +#define tExtrude 311 +#define tDuplicata 312 +#define tLoop 313 +#define tRecombine 314 +#define tDelete 315 +#define tCoherence 316 +#define tView 317 +#define tAttractor 318 +#define tLayers 319 +#define tScalarTetrahedron 320 +#define tVectorTetrahedron 321 +#define tTensorTetrahedron 322 +#define tScalarTriangle 323 +#define tVectorTriangle 324 +#define tTensorTriangle 325 +#define tScalarLine 326 +#define tVectorLine 327 +#define tTensorLine 328 +#define tScalarPoint 329 +#define tVectorPoint 330 +#define tTensorPoint 331 +#define tBSpline 332 +#define tNurbs 333 +#define tOrder 334 +#define tWith 335 +#define tBounds 336 +#define tKnots 337 +#define tColor 338 +#define tFor 339 +#define tIn 340 +#define tEndFor 341 +#define tIf 342 +#define tEndIf 343 +#define tExit 344 +#define tMerge 345 +#define tReturn 346 +#define tCall 347 +#define tFunction 348 +#define tB_SPLINE_SURFACE_WITH_KNOTS 349 +#define tB_SPLINE_CURVE_WITH_KNOTS 350 +#define tCARTESIAN_POINT 351 +#define tTRUE 352 +#define tFALSE 353 +#define tUNSPECIFIED 354 +#define tU 355 +#define tV 356 +#define tEDGE_CURVE 357 +#define tVERTEX_POINT 358 +#define tORIENTED_EDGE 359 +#define tPLANE 360 +#define tFACE_OUTER_BOUND 361 +#define tEDGE_LOOP 362 +#define tADVANCED_FACE 363 +#define tVECTOR 364 +#define tDIRECTION 365 +#define tAXIS2_PLACEMENT_3D 366 +#define tISO 367 +#define tENDISO 368 +#define tENDSEC 369 +#define tDATA 370 +#define tHEADER 371 +#define tFILE_DESCRIPTION 372 +#define tFILE_SCHEMA 373 +#define tFILE_NAME 374 +#define tMANIFOLD_SOLID_BREP 375 +#define tCLOSED_SHELL 376 +#define tADVANCED_BREP_SHAPE_REPRESENTATION 377 +#define tFACE_BOUND 378 +#define tCYLINDRICAL_SURFACE 379 +#define tCONICAL_SURFACE 380 +#define tCIRCLE 381 +#define tTRIMMED_CURVE 382 +#define tGEOMETRIC_SET 383 +#define tCOMPOSITE_CURVE_SEGMENT 384 +#define tCONTINUOUS 385 +#define tCOMPOSITE_CURVE 386 +#define tTOROIDAL_SURFACE 387 +#define tPRODUCT_DEFINITION 388 +#define tPRODUCT_DEFINITION_SHAPE 389 +#define tSHAPE_DEFINITION_REPRESENTATION 390 +#define tELLIPSE 391 +#define tTrimmed 392 +#define tSolid 393 +#define tEndSolid 394 +#define tVertex 395 +#define tFacet 396 +#define tNormal 397 +#define tOuter 398 +#define tLoopSTL 399 +#define tEndLoop 400 +#define tEndFacet 401 +#define tAND 402 +#define tOR 403 +#define tNOTEQUAL 404 +#define tEQUAL 405 +#define tAPPROXEQUAL 406 +#define tAFFECTPLUS 407 +#define tAFFECTMINUS 408 +#define tAFFECTTIMES 409 +#define tAFFECTDIVIDE 410 +#define tLESSOREQUAL 411 +#define tGREATEROREQUAL 412 +#define tCROSSPRODUCT 413 +#define UNARYPREC 414 +#define tPLUSPLUS 415 +#define tMINUSMINUS 416 extern YYSTYPE yylval; diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 02d67c2d9dba6f62d2799688a8d59fa4b1e3ac1b..a7f937c8e60f44b84796c9cf333a52b0dfdff78d 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -1,4 +1,4 @@ -%{ /* $Id: Gmsh.y,v 1.37 2000-12-10 13:28:49 geuzaine Exp $ */ +%{ /* $Id: Gmsh.y,v 1.38 2000-12-10 23:32:39 geuzaine Exp $ */ #include <stdarg.h> @@ -2185,11 +2185,15 @@ FExpr_Single : } | tSTRING '.' tSTRING { - if(!(pNumCat = Get_NumberOptionCategory($1))) + if(!(pNumCat = Get_NumberOptionCategory($1))){ vyyerror("Unknown Numeric Option Class '%s'", $1); + $$ = 0. ; + } else{ - if(!(pNumOpt = Get_NumberOption($3, pNumCat, &i))) + if(!(pNumOpt = Get_NumberOption($3, pNumCat, &i))){ vyyerror("Unknown Numeric Option '%s.%s'", $1, $3); + $$ = 0. ; + } else{ switch(i){ case GMSH_DOUBLE : $$ = *(double*)pNumOpt ; break ; @@ -2202,13 +2206,16 @@ FExpr_Single : } | tSTRING '.' tView '[' FExpr ']' '.' tSTRING { - if(strcmp($1, "PostProcessing")) + if(strcmp($1, "PostProcessing")){ vyyerror("Unknown View Option Class '%s'", $1); + $$ = 0. ; + } else{ if(!(pNumOpt = Get_NumberViewOption((int)$5, $8, &i))){ if(i < 0) vyyerror("PostProcessing View %d does not Exist", (int)$5); else vyyerror("Unknown Numeric Option '%s.View[%d].%s'", $1, (int)$5, $8); + $$ = 0. ; } else{ switch(i){ @@ -2223,11 +2230,15 @@ FExpr_Single : | tSTRING '.' tSTRING tPLUSPLUS { - if(!(pNumCat = Get_NumberOptionCategory($1))) + if(!(pNumCat = Get_NumberOptionCategory($1))){ vyyerror("Unknown Numeric Option Class '%s'", $1); + $$ = 0. ; + } else{ - if(!(pNumOpt = Get_NumberOption($3, pNumCat, &i))) + if(!(pNumOpt = Get_NumberOption($3, pNumCat, &i))){ vyyerror("Unknown Numeric Option '%s.%s'", $1, $3); + $$ = 0. ; + } else{ switch(i){ case GMSH_DOUBLE : $$ = (*(double*)pNumOpt += 1.) ; break ; @@ -2240,13 +2251,16 @@ FExpr_Single : } | tSTRING '.' tView '[' FExpr ']' '.' tSTRING tPLUSPLUS { - if(strcmp($1, "PostProcessing")) + if(strcmp($1, "PostProcessing")){ vyyerror("Unknown View Option Class '%s'", $1); + $$ = 0. ; + } else{ if(!(pNumOpt = Get_NumberViewOption((int)$5, $8, &i))){ if(i < 0) vyyerror("PostProcessing View %d does not Exist", (int)$5); else vyyerror("Unknown Numeric Option '%s.View[%d].%s'", $1, (int)$5, $8); + $$ = 0. ; } else{ switch(i){ @@ -2261,11 +2275,15 @@ FExpr_Single : | tSTRING '.' tSTRING tMINUSMINUS { - if(!(pNumCat = Get_NumberOptionCategory($1))) + if(!(pNumCat = Get_NumberOptionCategory($1))){ vyyerror("Unknown Numeric Option Class '%s'", $1); + $$ = 0. ; + } else{ - if(!(pNumOpt = Get_NumberOption($3, pNumCat, &i))) + if(!(pNumOpt = Get_NumberOption($3, pNumCat, &i))){ vyyerror("Unknown Numeric Option '%s.%s'", $1, $3); + $$ = 0. ; + } else{ switch(i){ case GMSH_DOUBLE : $$ = (*(double*)pNumOpt -= 1.) ; break ; @@ -2278,13 +2296,16 @@ FExpr_Single : } | tSTRING '.' tView '[' FExpr ']' '.' tSTRING tMINUSMINUS { - if(strcmp($1, "PostProcessing")) + if(strcmp($1, "PostProcessing")){ vyyerror("Unknown View Option Class '%s'", $1); + $$ = 0. ; + } else{ if(!(pNumOpt = Get_NumberViewOption((int)$5, $8, &i))){ if(i < 0) vyyerror("PostProcessing View %d does not Exist", (int)$5); else vyyerror("Unknown Numeric Option '%s.View[%d].%s'", $1, (int)$5, $8); + $$ = 0. ; } else{ switch(i){ @@ -2361,11 +2382,17 @@ VExpr_Single : } | tSTRING '.' tSTRING { - if(!(pArrCat = Get_ArrayOptionCategory($1))) + if(!(pArrCat = Get_ArrayOptionCategory($1))){ vyyerror("Unknown Array Option Class '%s'", $1); + $$[0]=$$[1]=$$[2]=$$[3]= 0.0 ; + $$[4]= 1.0 ; + } else{ - if(!(pArrOpt = Get_ArrayOption($3, pArrCat, &i))) + if(!(pArrOpt = Get_ArrayOption($3, pArrCat, &i))){ vyyerror("Unknown Array Option '%s.%s'", $1, $3); + $$[0]=$$[1]=$$[2]=$$[3]= 0.0 ; + $$[4]= 1.0 ; + } else{ switch(i){ case GMSH_DOUBLE : @@ -2387,13 +2414,18 @@ VExpr_Single : } | tSTRING '.' tView '[' FExpr ']' '.' tSTRING { - if(strcmp($1, "PostProcessing")) + if(strcmp($1, "PostProcessing")){ vyyerror("Unknown View Option Class '%s'", $1); + $$[0]=$$[1]=$$[2]=$$[3]= 0.0 ; + $$[4]= 1.0 ; + } else{ if(!(pArrOpt = Get_ArrayViewOption((int)$5, $8, &i))){ if(i < 0) vyyerror("PostProcessing View %d does not Exist", (int)$5); else vyyerror("Unknown Array Option '%s.View[%d].%s'", $1, (int)$5, $8); + $$[0]=$$[1]=$$[2]=$$[3]= 0.0 ; + $$[4]= 1.0 ; } else{ switch(i){ @@ -2528,11 +2560,15 @@ ColorExpr : } | tSTRING '.' tColor '.' tSTRING { - if(!(pColCat = Get_ColorOptionCategory($1))) + if(!(pColCat = Get_ColorOptionCategory($1))){ vyyerror("Unknown Color Option Class '%s'", $1); + $$ = 0 ; + } else{ - if(!(pColOpt = Get_ColorOption($5, pColCat))) + if(!(pColOpt = Get_ColorOption($5, pColCat))){ vyyerror("Unknown Color Option '%s.%s'", $1, $5); + $$ = 0 ; + } else{ $$ = *pColOpt ; } diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index d18a25f4ad36455314fe3422caaeb3a534e37328..4fdf22ef91081db9e40a59d6939eb7d568f6eaf2 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -2,7 +2,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.41 2000-12-10 13:28:49 geuzaine Exp $ + * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.42 2000-12-10 23:32:40 geuzaine Exp $ */ #define FLEX_SCANNER @@ -1160,7 +1160,7 @@ YY_MALLOC_DECL YY_DECL { register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; + register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; #line 60 "Gmsh.l"