Skip to content
Snippets Groups Projects
Commit a0bd295b authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

revert EOF fix for now (breaks e.g. t7.geo)

parent edff711f
No related branches found
No related tags found
No related merge requests found
...@@ -49,9 +49,6 @@ void skipline(void); ...@@ -49,9 +49,6 @@ void skipline(void);
buf[n++] = (char) c; \ buf[n++] = (char) c; \
yylineno++; \ yylineno++; \
} \ } \
else if ( c == EOF ){ \
buf[n++] = '\0'; \
} \
if ( c == EOF && ferror( yyin ) ) \ if ( c == EOF && ferror( yyin ) ) \
Msg::Fatal("Input in flex scanner failed"); \ Msg::Fatal("Input in flex scanner failed"); \
result = n; \ result = n; \
...@@ -342,7 +339,7 @@ void parsestring(char endchar) ...@@ -342,7 +339,7 @@ void parsestring(char endchar)
// etc.) "as is" in the output string: see yyinput() above // etc.) "as is" in the output string: see yyinput() above
int i = 0; int i = 0;
while ((c = yyinput()) != endchar) { while ((c = yyinput()) != endchar) {
if(c=='\0'){ if(gmsheof(yyin)){ // FIXME: this is not correct
Msg::Error("End of file in string"); Msg::Error("End of file in string");
break; break;
} }
......
This diff is collapsed.
/* A Bison parser, made by GNU Bison 2.3. */ /* A Bison parser, made by GNU Bison 3.0.4. */
/* Skeleton interface for Bison's Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation, either version 3 of the License, or
any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
...@@ -16,9 +15,7 @@ ...@@ -16,9 +15,7 @@
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program. If not, see <http://www.gnu.org/licenses/>. */
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains /* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work part or all of the Bison parser skeleton and distribute that work
...@@ -33,391 +30,215 @@ ...@@ -33,391 +30,215 @@
This special exception was added by the Free Software Foundation in This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */ version 2.2 of Bison. */
/* Tokens. */ #ifndef YY_GMSH_YY_GMSH_TAB_HPP_INCLUDED
# define YY_GMSH_YY_GMSH_TAB_HPP_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int gmsh_yydebug;
#endif
/* Token type. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers enum yytokentype
know about them. */ {
enum yytokentype { tDOUBLE = 258,
tDOUBLE = 258, tSTRING = 259,
tSTRING = 259, tBIGSTR = 260,
tBIGSTR = 260, tEND = 261,
tEND = 261, tAFFECT = 262,
tAFFECT = 262, tDOTS = 263,
tDOTS = 263, tPi = 264,
tPi = 264, tMPI_Rank = 265,
tMPI_Rank = 265, tMPI_Size = 266,
tMPI_Size = 266, tEuclidian = 267,
tEuclidian = 267, tCoordinates = 268,
tCoordinates = 268, tTestLevel = 269,
tTestLevel = 269, tExp = 270,
tExp = 270, tLog = 271,
tLog = 271, tLog10 = 272,
tLog10 = 272, tSqrt = 273,
tSqrt = 273, tSin = 274,
tSin = 274, tAsin = 275,
tAsin = 275, tCos = 276,
tCos = 276, tAcos = 277,
tAcos = 277, tTan = 278,
tTan = 278, tRand = 279,
tRand = 279, tAtan = 280,
tAtan = 280, tAtan2 = 281,
tAtan2 = 281, tSinh = 282,
tSinh = 282, tCosh = 283,
tCosh = 283, tTanh = 284,
tTanh = 284, tFabs = 285,
tFabs = 285, tFloor = 286,
tFloor = 286, tCeil = 287,
tCeil = 287, tRound = 288,
tRound = 288, tFmod = 289,
tFmod = 289, tModulo = 290,
tModulo = 290, tHypot = 291,
tHypot = 291, tList = 292,
tList = 292, tPrintf = 293,
tPrintf = 293, tError = 294,
tError = 294, tStr = 295,
tStr = 295, tSprintf = 296,
tSprintf = 296, tStrCat = 297,
tStrCat = 297, tStrPrefix = 298,
tStrPrefix = 298, tStrRelative = 299,
tStrRelative = 299, tStrReplace = 300,
tStrReplace = 300, tFind = 301,
tFind = 301, tStrFind = 302,
tStrFind = 302, tStrCmp = 303,
tStrCmp = 303, tStrChoice = 304,
tStrChoice = 304, tUpperCase = 305,
tUpperCase = 305, tLowerCase = 306,
tLowerCase = 306, tLowerCaseIn = 307,
tLowerCaseIn = 307, tTextAttributes = 308,
tTextAttributes = 308, tBoundingBox = 309,
tBoundingBox = 309, tDraw = 310,
tDraw = 310, tSetChanged = 311,
tSetChanged = 311, tToday = 312,
tToday = 312, tFixRelativePath = 313,
tFixRelativePath = 313, tCurrentDirectory = 314,
tCurrentDirectory = 314, tSyncModel = 315,
tSyncModel = 315, tNewModel = 316,
tNewModel = 316, tOnelabAction = 317,
tOnelabAction = 317, tOnelabRun = 318,
tOnelabRun = 318, tCpu = 319,
tCpu = 319, tMemory = 320,
tMemory = 320, tTotalMemory = 321,
tTotalMemory = 321, tCreateTopology = 322,
tCreateTopology = 322, tCreateTopologyNoHoles = 323,
tCreateTopologyNoHoles = 323, tDistanceFunction = 324,
tDistanceFunction = 324, tDefineConstant = 325,
tDefineConstant = 325, tUndefineConstant = 326,
tUndefineConstant = 326, tDefineNumber = 327,
tDefineNumber = 327, tDefineString = 328,
tDefineString = 328, tSetNumber = 329,
tSetNumber = 329, tSetString = 330,
tSetString = 330, tPoint = 331,
tPoint = 331, tCircle = 332,
tCircle = 332, tEllipse = 333,
tEllipse = 333, tLine = 334,
tLine = 334, tSphere = 335,
tSphere = 335, tPolarSphere = 336,
tPolarSphere = 336, tSurface = 337,
tSurface = 337, tSpline = 338,
tSpline = 338, tVolume = 339,
tVolume = 339, tCharacteristic = 340,
tCharacteristic = 340, tLength = 341,
tLength = 341, tParametric = 342,
tParametric = 342, tElliptic = 343,
tElliptic = 343, tRefineMesh = 344,
tRefineMesh = 344, tAdaptMesh = 345,
tAdaptMesh = 345, tRelocateMesh = 346,
tRelocateMesh = 346, tPlane = 347,
tPlane = 347, tRuled = 348,
tRuled = 348, tTransfinite = 349,
tTransfinite = 349, tComplex = 350,
tComplex = 350, tPhysical = 351,
tPhysical = 351, tCompound = 352,
tCompound = 352, tPeriodic = 353,
tPeriodic = 353, tUsing = 354,
tUsing = 354, tPlugin = 355,
tPlugin = 355, tDegenerated = 356,
tDegenerated = 356, tRecursive = 357,
tRecursive = 357, tRotate = 358,
tRotate = 358, tTranslate = 359,
tTranslate = 359, tSymmetry = 360,
tSymmetry = 360, tDilate = 361,
tDilate = 361, tExtrude = 362,
tExtrude = 362, tLevelset = 363,
tLevelset = 363, tAffine = 364,
tAffine = 364, tRecombine = 365,
tRecombine = 365, tSmoother = 366,
tSmoother = 366, tSplit = 367,
tSplit = 367, tDelete = 368,
tDelete = 368, tCoherence = 369,
tCoherence = 369, tIntersect = 370,
tIntersect = 370, tMeshAlgorithm = 371,
tMeshAlgorithm = 371, tReverse = 372,
tReverse = 372, tLayers = 373,
tLayers = 373, tScaleLast = 374,
tScaleLast = 374, tHole = 375,
tHole = 375, tAlias = 376,
tAlias = 376, tAliasWithOptions = 377,
tAliasWithOptions = 377, tCopyOptions = 378,
tCopyOptions = 378, tQuadTriAddVerts = 379,
tQuadTriAddVerts = 379, tQuadTriNoNewVerts = 380,
tQuadTriNoNewVerts = 380, tQuadTriSngl = 381,
tQuadTriSngl = 381, tQuadTriDbl = 382,
tQuadTriDbl = 382, tRecombLaterals = 383,
tRecombLaterals = 383, tTransfQuadTri = 384,
tTransfQuadTri = 384, tText2D = 385,
tText2D = 385, tText3D = 386,
tText3D = 386, tInterpolationScheme = 387,
tInterpolationScheme = 387, tTime = 388,
tTime = 388, tCombine = 389,
tCombine = 389, tBSpline = 390,
tBSpline = 390, tBezier = 391,
tBezier = 391, tNurbs = 392,
tNurbs = 392, tNurbsOrder = 393,
tNurbsOrder = 393, tNurbsKnots = 394,
tNurbsKnots = 394, tColor = 395,
tColor = 395, tColorTable = 396,
tColorTable = 396, tFor = 397,
tFor = 397, tIn = 398,
tIn = 398, tEndFor = 399,
tEndFor = 399, tIf = 400,
tIf = 400, tElseIf = 401,
tElseIf = 401, tElse = 402,
tElse = 402, tEndIf = 403,
tEndIf = 403, tExit = 404,
tExit = 404, tAbort = 405,
tAbort = 405, tField = 406,
tField = 406, tReturn = 407,
tReturn = 407, tCall = 408,
tCall = 408, tMacro = 409,
tMacro = 409, tShow = 410,
tShow = 410, tHide = 411,
tHide = 411, tGetValue = 412,
tGetValue = 412, tGetStringValue = 413,
tGetStringValue = 413, tGetEnv = 414,
tGetEnv = 414, tGetString = 415,
tGetString = 415, tGetNumber = 416,
tGetNumber = 416, tHomology = 417,
tHomology = 417, tCohomology = 418,
tCohomology = 418, tBetti = 419,
tBetti = 419, tExists = 420,
tExists = 420, tFileExists = 421,
tFileExists = 421, tGMSH_MAJOR_VERSION = 422,
tGMSH_MAJOR_VERSION = 422, tGMSH_MINOR_VERSION = 423,
tGMSH_MINOR_VERSION = 423, tGMSH_PATCH_VERSION = 424,
tGMSH_PATCH_VERSION = 424, tGmshExecutableName = 425,
tGmshExecutableName = 425, tSetPartition = 426,
tSetPartition = 426, tNameToString = 427,
tNameToString = 427, tStringToName = 428,
tStringToName = 428, tAFFECTPLUS = 429,
tAFFECTDIVIDE = 429, tAFFECTMINUS = 430,
tAFFECTTIMES = 430, tAFFECTTIMES = 431,
tAFFECTMINUS = 431, tAFFECTDIVIDE = 432,
tAFFECTPLUS = 432, tOR = 433,
tOR = 433, tAND = 434,
tAND = 434, tEQUAL = 435,
tNOTEQUAL = 435, tNOTEQUAL = 436,
tEQUAL = 436, tLESSOREQUAL = 437,
tGREATEROREQUAL = 437, tGREATEROREQUAL = 438,
tLESSOREQUAL = 438, tPLUSPLUS = 439,
UNARYPREC = 439, tMINUSMINUS = 440,
tMINUSMINUS = 440, UNARYPREC = 441
tPLUSPLUS = 441 };
};
#endif #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 tTestLevel 269
#define tExp 270
#define tLog 271
#define tLog10 272
#define tSqrt 273
#define tSin 274
#define tAsin 275
#define tCos 276
#define tAcos 277
#define tTan 278
#define tRand 279
#define tAtan 280
#define tAtan2 281
#define tSinh 282
#define tCosh 283
#define tTanh 284
#define tFabs 285
#define tFloor 286
#define tCeil 287
#define tRound 288
#define tFmod 289
#define tModulo 290
#define tHypot 291
#define tList 292
#define tPrintf 293
#define tError 294
#define tStr 295
#define tSprintf 296
#define tStrCat 297
#define tStrPrefix 298
#define tStrRelative 299
#define tStrReplace 300
#define tFind 301
#define tStrFind 302
#define tStrCmp 303
#define tStrChoice 304
#define tUpperCase 305
#define tLowerCase 306
#define tLowerCaseIn 307
#define tTextAttributes 308
#define tBoundingBox 309
#define tDraw 310
#define tSetChanged 311
#define tToday 312
#define tFixRelativePath 313
#define tCurrentDirectory 314
#define tSyncModel 315
#define tNewModel 316
#define tOnelabAction 317
#define tOnelabRun 318
#define tCpu 319
#define tMemory 320
#define tTotalMemory 321
#define tCreateTopology 322
#define tCreateTopologyNoHoles 323
#define tDistanceFunction 324
#define tDefineConstant 325
#define tUndefineConstant 326
#define tDefineNumber 327
#define tDefineString 328
#define tSetNumber 329
#define tSetString 330
#define tPoint 331
#define tCircle 332
#define tEllipse 333
#define tLine 334
#define tSphere 335
#define tPolarSphere 336
#define tSurface 337
#define tSpline 338
#define tVolume 339
#define tCharacteristic 340
#define tLength 341
#define tParametric 342
#define tElliptic 343
#define tRefineMesh 344
#define tAdaptMesh 345
#define tRelocateMesh 346
#define tPlane 347
#define tRuled 348
#define tTransfinite 349
#define tComplex 350
#define tPhysical 351
#define tCompound 352
#define tPeriodic 353
#define tUsing 354
#define tPlugin 355
#define tDegenerated 356
#define tRecursive 357
#define tRotate 358
#define tTranslate 359
#define tSymmetry 360
#define tDilate 361
#define tExtrude 362
#define tLevelset 363
#define tAffine 364
#define tRecombine 365
#define tSmoother 366
#define tSplit 367
#define tDelete 368
#define tCoherence 369
#define tIntersect 370
#define tMeshAlgorithm 371
#define tReverse 372
#define tLayers 373
#define tScaleLast 374
#define tHole 375
#define tAlias 376
#define tAliasWithOptions 377
#define tCopyOptions 378
#define tQuadTriAddVerts 379
#define tQuadTriNoNewVerts 380
#define tQuadTriSngl 381
#define tQuadTriDbl 382
#define tRecombLaterals 383
#define tTransfQuadTri 384
#define tText2D 385
#define tText3D 386
#define tInterpolationScheme 387
#define tTime 388
#define tCombine 389
#define tBSpline 390
#define tBezier 391
#define tNurbs 392
#define tNurbsOrder 393
#define tNurbsKnots 394
#define tColor 395
#define tColorTable 396
#define tFor 397
#define tIn 398
#define tEndFor 399
#define tIf 400
#define tElseIf 401
#define tElse 402
#define tEndIf 403
#define tExit 404
#define tAbort 405
#define tField 406
#define tReturn 407
#define tCall 408
#define tMacro 409
#define tShow 410
#define tHide 411
#define tGetValue 412
#define tGetStringValue 413
#define tGetEnv 414
#define tGetString 415
#define tGetNumber 416
#define tHomology 417
#define tCohomology 418
#define tBetti 419
#define tExists 420
#define tFileExists 421
#define tGMSH_MAJOR_VERSION 422
#define tGMSH_MINOR_VERSION 423
#define tGMSH_PATCH_VERSION 424
#define tGmshExecutableName 425
#define tSetPartition 426
#define tNameToString 427
#define tStringToName 428
#define tAFFECTDIVIDE 429
#define tAFFECTTIMES 430
#define tAFFECTMINUS 431
#define tAFFECTPLUS 432
#define tOR 433
#define tAND 434
#define tNOTEQUAL 435
#define tEQUAL 436
#define tGREATEROREQUAL 437
#define tLESSOREQUAL 438
#define UNARYPREC 439
#define tMINUSMINUS 440
#define tPLUSPLUS 441
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 109 "Gmsh.y" union YYSTYPE
{ {
#line 109 "Gmsh.y" /* yacc.c:1909 */
char *c; char *c;
int i; int i;
unsigned int u; unsigned int u;
...@@ -425,14 +246,18 @@ typedef union YYSTYPE ...@@ -425,14 +246,18 @@ typedef union YYSTYPE
double v[5]; double v[5];
Shape s; Shape s;
List_T *l; List_T *l;
}
/* Line 1529 of yacc.c. */ #line 251 "Gmsh.tab.hpp" /* yacc.c:1909 */
#line 431 "Gmsh.tab.hpp" };
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif #endif
extern YYSTYPE gmsh_yylval; extern YYSTYPE gmsh_yylval;
int gmsh_yyparse (void);
#endif /* !YY_GMSH_YY_GMSH_TAB_HPP_INCLUDED */
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment