diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 2ba868eb83cf50e5f6411649a869760249a255d7..5eae9fc9b2a35d1101db4df30d78c392a041fe7c 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -1,172 +1,171 @@ /* 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 tDraw 287 -#define tSleep 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 tInclude 315 -#define tRecombine 316 -#define tDelete 317 -#define tCoherence 318 -#define tView 319 -#define tAttractor 320 -#define tLayers 321 -#define tScalarTetrahedron 322 -#define tVectorTetrahedron 323 -#define tTensorTetrahedron 324 -#define tScalarTriangle 325 -#define tVectorTriangle 326 -#define tTensorTriangle 327 -#define tScalarLine 328 -#define tVectorLine 329 -#define tTensorLine 330 -#define tScalarPoint 331 -#define tVectorPoint 332 -#define tTensorPoint 333 -#define tBSpline 334 -#define tNurbs 335 -#define tOrder 336 -#define tWith 337 -#define tBounds 338 -#define tKnots 339 -#define tColor 340 -#define tFor 341 -#define tEndFor 342 -#define tScript 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 +#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 tDraw 286 +#define tSleep 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 tInclude 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 tEndFor 341 +#define tScript 342 +#define tExit 343 +#define tMerge 344 +#define tReturn 345 +#define tCall 346 +#define tFunction 347 +#define tB_SPLINE_SURFACE_WITH_KNOTS 348 +#define tB_SPLINE_CURVE_WITH_KNOTS 349 +#define tCARTESIAN_POINT 350 +#define tTRUE 351 +#define tFALSE 352 +#define tUNSPECIFIED 353 +#define tU 354 +#define tV 355 +#define tEDGE_CURVE 356 +#define tVERTEX_POINT 357 +#define tORIENTED_EDGE 358 +#define tPLANE 359 +#define tFACE_OUTER_BOUND 360 +#define tEDGE_LOOP 361 +#define tADVANCED_FACE 362 +#define tVECTOR 363 +#define tDIRECTION 364 +#define tAXIS2_PLACEMENT_3D 365 +#define tISO 366 +#define tENDISO 367 +#define tENDSEC 368 +#define tDATA 369 +#define tHEADER 370 +#define tFILE_DESCRIPTION 371 +#define tFILE_SCHEMA 372 +#define tFILE_NAME 373 +#define tMANIFOLD_SOLID_BREP 374 +#define tCLOSED_SHELL 375 +#define tADVANCED_BREP_SHAPE_REPRESENTATION 376 +#define tFACE_BOUND 377 +#define tCYLINDRICAL_SURFACE 378 +#define tCONICAL_SURFACE 379 +#define tCIRCLE 380 +#define tTRIMMED_CURVE 381 +#define tGEOMETRIC_SET 382 +#define tCOMPOSITE_CURVE_SEGMENT 383 +#define tCONTINUOUS 384 +#define tCOMPOSITE_CURVE 385 +#define tTOROIDAL_SURFACE 386 +#define tPRODUCT_DEFINITION 387 +#define tPRODUCT_DEFINITION_SHAPE 388 +#define tSHAPE_DEFINITION_REPRESENTATION 389 +#define tELLIPSE 390 +#define tTrimmed 391 +#define tSolid 392 +#define tEndSolid 393 +#define tVertex 394 +#define tFacet 395 +#define tNormal 396 +#define tOuter 397 +#define tLoopSTL 398 +#define tEndLoop 399 +#define tEndFacet 400 +#define tAND 401 +#define tOR 402 +#define tNOTEQUAL 403 +#define tEQUAL 404 +#define tAPPROXEQUAL 405 +#define tAFFECTPLUS 406 +#define tAFFECTMINUS 407 +#define tAFFECTTIMES 408 +#define tAFFECTDIVIDE 409 +#define tLESSOREQUAL 410 +#define tGREATEROREQUAL 411 +#define tCROSSPRODUCT 412 +#define UNARYPREC 413 +#define tPLUSPLUS 414 +#define tMINUSMINUS 415 #line 1 "Gmsh.y" - /* $Id: Gmsh.tab.cpp,v 1.33 2000-12-08 22:29:50 geuzaine Exp $ */ + /* $Id: Gmsh.tab.cpp,v 1.34 2000-12-08 22:31:19 geuzaine Exp $ */ #include <stdarg.h> @@ -250,7 +249,7 @@ typedef union { #define YYFLAG -32768 #define YYNTBASE 180 -#define YYTRANSLATE(x) ((unsigned)(x) <= 416 ? yytranslate[x] : 258) +#define YYTRANSLATE(x) ((unsigned)(x) <= 415 ? yytranslate[x] : 258) static const short yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -278,23 +277,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, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 159, 160, 166, 167, 170, 171 + 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, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 159, + 160, 166, 167, 170, 171 }; #if YYDEBUG != 0 @@ -2619,7 +2618,8 @@ static const short yycheck[] = { 7, -1, 169 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "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. @@ -2636,46 +2636,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 @@ -2685,8 +2705,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 @@ -2767,12 +2787,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++ */ @@ -2784,7 +2804,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; @@ -2799,10 +2819,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) @@ -2812,7 +2832,7 @@ __yy_memcpy (char *to, char *from, int count) #endif #endif -#line 196 "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 *. @@ -2833,6 +2853,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 @@ -2861,6 +2890,7 @@ yyparse(YYPARSE_PARAM_ARG) #endif int yystacksize = YYINITDEPTH; + int yyfree_stacks = 0; #ifdef YYPURE int yychar; @@ -2945,18 +2975,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 */ @@ -5784,7 +5828,7 @@ case 326: break;} } /* the action file gets copied in in place of this dollarsign */ -#line 498 "bison.simple" +#line 543 "/usr/lib/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -5979,6 +6023,30 @@ 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 2517 "Gmsh.y" diff --git a/Parser/Gmsh.tab.cpp.h b/Parser/Gmsh.tab.cpp.h index 3dbfd324b02bee0117e0c5633f658557a99cf178..9a9f530bbb1371f53cd97a3a70f921aa63d067a5 100644 --- a/Parser/Gmsh.tab.cpp.h +++ b/Parser/Gmsh.tab.cpp.h @@ -7,165 +7,165 @@ typedef union { Shape s; List_T *l; } YYSTYPE; -#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 tDraw 286 -#define tSleep 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 tInclude 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 tEndFor 341 -#define tScript 342 -#define tExit 343 -#define tMerge 344 -#define tReturn 345 -#define tCall 346 -#define tFunction 347 -#define tB_SPLINE_SURFACE_WITH_KNOTS 348 -#define tB_SPLINE_CURVE_WITH_KNOTS 349 -#define tCARTESIAN_POINT 350 -#define tTRUE 351 -#define tFALSE 352 -#define tUNSPECIFIED 353 -#define tU 354 -#define tV 355 -#define tEDGE_CURVE 356 -#define tVERTEX_POINT 357 -#define tORIENTED_EDGE 358 -#define tPLANE 359 -#define tFACE_OUTER_BOUND 360 -#define tEDGE_LOOP 361 -#define tADVANCED_FACE 362 -#define tVECTOR 363 -#define tDIRECTION 364 -#define tAXIS2_PLACEMENT_3D 365 -#define tISO 366 -#define tENDISO 367 -#define tENDSEC 368 -#define tDATA 369 -#define tHEADER 370 -#define tFILE_DESCRIPTION 371 -#define tFILE_SCHEMA 372 -#define tFILE_NAME 373 -#define tMANIFOLD_SOLID_BREP 374 -#define tCLOSED_SHELL 375 -#define tADVANCED_BREP_SHAPE_REPRESENTATION 376 -#define tFACE_BOUND 377 -#define tCYLINDRICAL_SURFACE 378 -#define tCONICAL_SURFACE 379 -#define tCIRCLE 380 -#define tTRIMMED_CURVE 381 -#define tGEOMETRIC_SET 382 -#define tCOMPOSITE_CURVE_SEGMENT 383 -#define tCONTINUOUS 384 -#define tCOMPOSITE_CURVE 385 -#define tTOROIDAL_SURFACE 386 -#define tPRODUCT_DEFINITION 387 -#define tPRODUCT_DEFINITION_SHAPE 388 -#define tSHAPE_DEFINITION_REPRESENTATION 389 -#define tELLIPSE 390 -#define tTrimmed 391 -#define tSolid 392 -#define tEndSolid 393 -#define tVertex 394 -#define tFacet 395 -#define tNormal 396 -#define tOuter 397 -#define tLoopSTL 398 -#define tEndLoop 399 -#define tEndFacet 400 -#define tAND 401 -#define tOR 402 -#define tNOTEQUAL 403 -#define tEQUAL 404 -#define tAPPROXEQUAL 405 -#define tAFFECTPLUS 406 -#define tAFFECTMINUS 407 -#define tAFFECTTIMES 408 -#define tAFFECTDIVIDE 409 -#define tLESSOREQUAL 410 -#define tGREATEROREQUAL 411 -#define tCROSSPRODUCT 412 -#define UNARYPREC 413 -#define tPLUSPLUS 414 -#define tMINUSMINUS 415 +#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 tDraw 287 +#define tSleep 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 tInclude 315 +#define tRecombine 316 +#define tDelete 317 +#define tCoherence 318 +#define tView 319 +#define tAttractor 320 +#define tLayers 321 +#define tScalarTetrahedron 322 +#define tVectorTetrahedron 323 +#define tTensorTetrahedron 324 +#define tScalarTriangle 325 +#define tVectorTriangle 326 +#define tTensorTriangle 327 +#define tScalarLine 328 +#define tVectorLine 329 +#define tTensorLine 330 +#define tScalarPoint 331 +#define tVectorPoint 332 +#define tTensorPoint 333 +#define tBSpline 334 +#define tNurbs 335 +#define tOrder 336 +#define tWith 337 +#define tBounds 338 +#define tKnots 339 +#define tColor 340 +#define tFor 341 +#define tEndFor 342 +#define tScript 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 b96b14ce9f8a9c79d961435839933483954d2c71..ccce4006f6847962c2e37e44985f5432f85075ec 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -1,4 +1,4 @@ -%{ /* $Id: Gmsh.y,v 1.31 2000-12-08 22:17:47 geuzaine Exp $ */ +%{ /* $Id: Gmsh.y,v 1.32 2000-12-08 22:29:50 geuzaine Exp $ */ #include <stdarg.h> @@ -2254,7 +2254,7 @@ FExpr_Range : VExpr : VExpr_Single { - $$ = $1; + for(i=0 ; i<6 ; i++) $$[i] = $1[i]; } | '-' VExpr %prec UNARYPREC { @@ -2262,7 +2262,7 @@ VExpr : } | '+' VExpr %prec UNARYPREC { - $$ = $2; + for(i=0 ; i<6 ; i++) $$[i] = $2[i]; } | VExpr '-' VExpr { diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index 7d790e876e5d4b99986171422b367afa97e42635..cca4365d9efc09ad5ad00d3b187bf3749c25712b 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.32 2000-12-08 22:17:48 geuzaine Exp $ + * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.33 2000-12-08 22:29:50 geuzaine Exp $ */ #define FLEX_SCANNER @@ -1166,7 +1166,7 @@ YY_MALLOC_DECL YY_DECL { register yy_state_type yy_current_state; - register char *yy_cp = NULL, *yy_bp = NULL; + register char *yy_cp, *yy_bp; register int yy_act; #line 60 "Gmsh.l" @@ -2530,6 +2530,20 @@ static int input() #endif { int c; + static int _xpg = -1; + + if (_xpg == -1) + { + char *_xpgenv = getenv("_XPG"); + if (_xpgenv == NULL) + _xpg = 0; + else + { + _xpg = atoi(_xpgenv); + if (_xpg < 0) + _xpg = 0; + } + } *yy_c_buf_p = yy_hold_char; @@ -2567,18 +2581,21 @@ static int input() /* fall through */ case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - return EOF; - - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + if (_xpg) + return 0; + else + { + if ( yywrap() ) + return 0; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(); + return yyinput(); #else - return input(); + return input(); #endif - } + } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + offset;