Skip to content
Snippets Groups Projects
Commit 8ef6dd06 authored by Patrick Dular's avatar Patrick Dular
Browse files

(1) No more shift/reduce conflicts with tSTRING and String__Index!!! The...

(1) No more shift/reduce conflicts with tSTRING and String__Index!!! The solution was simply to uniform the use of String__Index in parallel rules. Will do the same kind of correction for LP and RP. (2) Extension of new Struct type
parent a24f595f
No related branches found
No related tags found
No related merge requests found
...@@ -95,6 +95,7 @@ string {alpha}({alpha}|{digit})* ...@@ -95,6 +95,7 @@ string {alpha}({alpha}|{digit})*
"/=" return tAFFECTDIVIDE; "/=" return tAFFECTDIVIDE;
":" return tDOTS; ":" return tDOTS;
"..." return tDOTS; "..." return tDOTS;
"::" return tSCOPE;
"||" return tOR; "||" return tOR;
"&&" return tAND; "&&" return tAND;
"++" return tPLUSPLUS; "++" return tPLUSPLUS;
...@@ -112,6 +113,7 @@ Affine return tAffine; ...@@ -112,6 +113,7 @@ Affine return tAffine;
Alias return tAlias; Alias return tAlias;
AliasWithOptions return tAliasWithOptions; AliasWithOptions return tAliasWithOptions;
ArcCos return tAcos; ArcCos return tAcos;
Append return tAppend;
ArcSin return tAsin; ArcSin return tAsin;
ArcTan return tAtan; ArcTan return tAtan;
ArcTan2 return tAtan2; ArcTan2 return tAtan2;
...@@ -158,7 +160,6 @@ Cylinder return tCylinder; ...@@ -158,7 +160,6 @@ Cylinder return tCylinder;
DefineConstant return tDefineConstant; DefineConstant return tDefineConstant;
DefineNumber return tDefineNumber; DefineNumber return tDefineNumber;
DefineString return tDefineString; DefineString return tDefineString;
DefineStruct return tDefineStruct;
Degenerated return tDegenerated; Degenerated return tDegenerated;
Delete return tDelete; Delete return tDelete;
Dilate return tDilate; Dilate return tDilate;
...@@ -300,6 +301,7 @@ StrRelative return tStrRelative; ...@@ -300,6 +301,7 @@ StrRelative return tStrRelative;
StrReplace return tStrReplace; StrReplace return tStrReplace;
StrSub return tStrSub; StrSub return tStrSub;
StringToName return tStringToName; StringToName return tStringToName;
Struct return tDefineStruct;
Surface return tSurface; Surface return tSurface;
Symmetry return tSymmetry; Symmetry return tSymmetry;
SyncModel return tSyncModel; SyncModel return tSyncModel;
......
This diff is collapsed.
...@@ -45,214 +45,216 @@ ...@@ -45,214 +45,216 @@
tEND = 261, tEND = 261,
tAFFECT = 262, tAFFECT = 262,
tDOTS = 263, tDOTS = 263,
tPi = 264, tSCOPE = 264,
tMPI_Rank = 265, tPi = 265,
tMPI_Size = 266, tMPI_Rank = 266,
tEuclidian = 267, tMPI_Size = 267,
tCoordinates = 268, tEuclidian = 268,
tTestLevel = 269, tCoordinates = 269,
tExp = 270, tTestLevel = 270,
tLog = 271, tExp = 271,
tLog10 = 272, tLog = 272,
tSqrt = 273, tLog10 = 273,
tSin = 274, tSqrt = 274,
tAsin = 275, tSin = 275,
tCos = 276, tAsin = 276,
tAcos = 277, tCos = 277,
tTan = 278, tAcos = 278,
tRand = 279, tTan = 279,
tAtan = 280, tRand = 280,
tAtan2 = 281, tAtan = 281,
tSinh = 282, tAtan2 = 282,
tCosh = 283, tSinh = 283,
tTanh = 284, tCosh = 284,
tFabs = 285, tTanh = 285,
tFloor = 286, tFabs = 286,
tCeil = 287, tFloor = 287,
tRound = 288, tCeil = 288,
tFmod = 289, tRound = 289,
tModulo = 290, tFmod = 290,
tHypot = 291, tModulo = 291,
tList = 292, tHypot = 292,
tLinSpace = 293, tList = 293,
tLogSpace = 294, tLinSpace = 294,
tListFromFile = 295, tLogSpace = 295,
tCatenary = 296, tListFromFile = 296,
tPrintf = 297, tCatenary = 297,
tError = 298, tPrintf = 298,
tStr = 299, tError = 299,
tSprintf = 300, tStr = 300,
tStrCat = 301, tSprintf = 301,
tStrPrefix = 302, tStrCat = 302,
tStrRelative = 303, tStrPrefix = 303,
tStrReplace = 304, tStrRelative = 304,
tAbsolutePath = 305, tStrReplace = 305,
tDirName = 306, tAbsolutePath = 306,
tStrSub = 307, tDirName = 307,
tStrLen = 308, tStrSub = 308,
tFind = 309, tStrLen = 309,
tStrFind = 310, tFind = 310,
tStrCmp = 311, tStrFind = 311,
tStrChoice = 312, tStrCmp = 312,
tUpperCase = 313, tStrChoice = 313,
tLowerCase = 314, tUpperCase = 314,
tLowerCaseIn = 315, tLowerCase = 315,
tTextAttributes = 316, tLowerCaseIn = 316,
tBoundingBox = 317, tTextAttributes = 317,
tDraw = 318, tBoundingBox = 318,
tSetChanged = 319, tDraw = 319,
tToday = 320, tSetChanged = 320,
tFixRelativePath = 321, tToday = 321,
tCurrentDirectory = 322, tFixRelativePath = 322,
tSyncModel = 323, tCurrentDirectory = 323,
tNewModel = 324, tSyncModel = 324,
tOnelabAction = 325, tNewModel = 325,
tOnelabRun = 326, tOnelabAction = 326,
tCpu = 327, tOnelabRun = 327,
tMemory = 328, tCpu = 328,
tTotalMemory = 329, tMemory = 329,
tCreateTopology = 330, tTotalMemory = 330,
tCreateTopologyNoHoles = 331, tCreateTopology = 331,
tDistanceFunction = 332, tCreateTopologyNoHoles = 332,
tDefineConstant = 333, tDistanceFunction = 333,
tUndefineConstant = 334, tDefineConstant = 334,
tDefineNumber = 335, tUndefineConstant = 335,
tDefineStruct = 336, tDefineNumber = 336,
tNameStruct = 337, tDefineStruct = 337,
tDefineString = 338, tNameStruct = 338,
tSetNumber = 339, tAppend = 339,
tSetString = 340, tDefineString = 340,
tPoint = 341, tSetNumber = 341,
tCircle = 342, tSetString = 342,
tEllipse = 343, tPoint = 343,
tLine = 344, tCircle = 344,
tSphere = 345, tEllipse = 345,
tPolarSphere = 346, tLine = 346,
tSurface = 347, tSphere = 347,
tSpline = 348, tPolarSphere = 348,
tVolume = 349, tSurface = 349,
tBlock = 350, tSpline = 350,
tCylinder = 351, tVolume = 351,
tCone = 352, tBlock = 352,
tTorus = 353, tCylinder = 353,
tEllipsoid = 354, tCone = 354,
tQuadric = 355, tTorus = 355,
tShapeFromFile = 356, tEllipsoid = 356,
tRectangle = 357, tQuadric = 357,
tDisk = 358, tShapeFromFile = 358,
tWire = 359, tRectangle = 359,
tCharacteristic = 360, tDisk = 360,
tLength = 361, tWire = 361,
tParametric = 362, tCharacteristic = 362,
tElliptic = 363, tLength = 363,
tRefineMesh = 364, tParametric = 364,
tAdaptMesh = 365, tElliptic = 365,
tRelocateMesh = 366, tRefineMesh = 366,
tSetFactory = 367, tAdaptMesh = 367,
tThruSections = 368, tRelocateMesh = 368,
tWedge = 369, tSetFactory = 369,
tFillet = 370, tThruSections = 370,
tChamfer = 371, tWedge = 371,
tPlane = 372, tFillet = 372,
tRuled = 373, tChamfer = 373,
tTransfinite = 374, tPlane = 374,
tPhysical = 375, tRuled = 375,
tCompound = 376, tTransfinite = 376,
tPeriodic = 377, tPhysical = 377,
tUsing = 378, tCompound = 378,
tPlugin = 379, tPeriodic = 379,
tDegenerated = 380, tUsing = 380,
tRecursive = 381, tPlugin = 381,
tRotate = 382, tDegenerated = 382,
tTranslate = 383, tRecursive = 383,
tSymmetry = 384, tRotate = 384,
tDilate = 385, tTranslate = 385,
tExtrude = 386, tSymmetry = 386,
tLevelset = 387, tDilate = 387,
tAffine = 388, tExtrude = 388,
tBooleanUnion = 389, tLevelset = 389,
tBooleanIntersection = 390, tAffine = 390,
tBooleanDifference = 391, tBooleanUnion = 391,
tBooleanSection = 392, tBooleanIntersection = 392,
tBooleanFragments = 393, tBooleanDifference = 393,
tThickSolid = 394, tBooleanSection = 394,
tRecombine = 395, tBooleanFragments = 395,
tSmoother = 396, tThickSolid = 396,
tSplit = 397, tRecombine = 397,
tDelete = 398, tSmoother = 398,
tCoherence = 399, tSplit = 399,
tIntersect = 400, tDelete = 400,
tMeshAlgorithm = 401, tCoherence = 401,
tReverse = 402, tIntersect = 402,
tLayers = 403, tMeshAlgorithm = 403,
tScaleLast = 404, tReverse = 404,
tHole = 405, tLayers = 405,
tAlias = 406, tScaleLast = 406,
tAliasWithOptions = 407, tHole = 407,
tCopyOptions = 408, tAlias = 408,
tQuadTriAddVerts = 409, tAliasWithOptions = 409,
tQuadTriNoNewVerts = 410, tCopyOptions = 410,
tRecombLaterals = 411, tQuadTriAddVerts = 411,
tTransfQuadTri = 412, tQuadTriNoNewVerts = 412,
tText2D = 413, tRecombLaterals = 413,
tText3D = 414, tTransfQuadTri = 414,
tInterpolationScheme = 415, tText2D = 415,
tTime = 416, tText3D = 416,
tCombine = 417, tInterpolationScheme = 417,
tBSpline = 418, tTime = 418,
tBezier = 419, tCombine = 419,
tNurbs = 420, tBSpline = 420,
tNurbsOrder = 421, tBezier = 421,
tNurbsKnots = 422, tNurbs = 422,
tColor = 423, tNurbsOrder = 423,
tColorTable = 424, tNurbsKnots = 424,
tFor = 425, tColor = 425,
tIn = 426, tColorTable = 426,
tEndFor = 427, tFor = 427,
tIf = 428, tIn = 428,
tElseIf = 429, tEndFor = 429,
tElse = 430, tIf = 430,
tEndIf = 431, tElseIf = 431,
tExit = 432, tElse = 432,
tAbort = 433, tEndIf = 433,
tField = 434, tExit = 434,
tReturn = 435, tAbort = 435,
tCall = 436, tField = 436,
tSlide = 437, tReturn = 437,
tMacro = 438, tCall = 438,
tShow = 439, tSlide = 439,
tHide = 440, tMacro = 440,
tGetValue = 441, tShow = 441,
tGetStringValue = 442, tHide = 442,
tGetEnv = 443, tGetValue = 443,
tGetString = 444, tGetStringValue = 444,
tGetNumber = 445, tGetEnv = 445,
tUnique = 446, tGetString = 446,
tHomology = 447, tGetNumber = 447,
tCohomology = 448, tUnique = 448,
tBetti = 449, tHomology = 449,
tExists = 450, tCohomology = 450,
tFileExists = 451, tBetti = 451,
tGMSH_MAJOR_VERSION = 452, tExists = 452,
tGMSH_MINOR_VERSION = 453, tFileExists = 453,
tGMSH_PATCH_VERSION = 454, tGMSH_MAJOR_VERSION = 454,
tGmshExecutableName = 455, tGMSH_MINOR_VERSION = 455,
tSetPartition = 456, tGMSH_PATCH_VERSION = 456,
tNameToString = 457, tGmshExecutableName = 457,
tStringToName = 458, tSetPartition = 458,
tAFFECTDIVIDE = 459, tNameToString = 459,
tAFFECTTIMES = 460, tStringToName = 460,
tAFFECTMINUS = 461, tAFFECTDIVIDE = 461,
tAFFECTPLUS = 462, tAFFECTTIMES = 462,
tOR = 463, tAFFECTMINUS = 463,
tAND = 464, tAFFECTPLUS = 464,
tNOTEQUAL = 465, tOR = 465,
tEQUAL = 466, tAND = 466,
tGREATEROREQUAL = 467, tNOTEQUAL = 467,
tLESSOREQUAL = 468, tEQUAL = 468,
UNARYPREC = 469, tGREATEROREQUAL = 469,
tMINUSMINUS = 470, tLESSOREQUAL = 470,
tPLUSPLUS = 471 UNARYPREC = 471,
tMINUSMINUS = 472,
tPLUSPLUS = 473
}; };
#endif #endif
/* Tokens. */ /* Tokens. */
...@@ -262,221 +264,223 @@ ...@@ -262,221 +264,223 @@
#define tEND 261 #define tEND 261
#define tAFFECT 262 #define tAFFECT 262
#define tDOTS 263 #define tDOTS 263
#define tPi 264 #define tSCOPE 264
#define tMPI_Rank 265 #define tPi 265
#define tMPI_Size 266 #define tMPI_Rank 266
#define tEuclidian 267 #define tMPI_Size 267
#define tCoordinates 268 #define tEuclidian 268
#define tTestLevel 269 #define tCoordinates 269
#define tExp 270 #define tTestLevel 270
#define tLog 271 #define tExp 271
#define tLog10 272 #define tLog 272
#define tSqrt 273 #define tLog10 273
#define tSin 274 #define tSqrt 274
#define tAsin 275 #define tSin 275
#define tCos 276 #define tAsin 276
#define tAcos 277 #define tCos 277
#define tTan 278 #define tAcos 278
#define tRand 279 #define tTan 279
#define tAtan 280 #define tRand 280
#define tAtan2 281 #define tAtan 281
#define tSinh 282 #define tAtan2 282
#define tCosh 283 #define tSinh 283
#define tTanh 284 #define tCosh 284
#define tFabs 285 #define tTanh 285
#define tFloor 286 #define tFabs 286
#define tCeil 287 #define tFloor 287
#define tRound 288 #define tCeil 288
#define tFmod 289 #define tRound 289
#define tModulo 290 #define tFmod 290
#define tHypot 291 #define tModulo 291
#define tList 292 #define tHypot 292
#define tLinSpace 293 #define tList 293
#define tLogSpace 294 #define tLinSpace 294
#define tListFromFile 295 #define tLogSpace 295
#define tCatenary 296 #define tListFromFile 296
#define tPrintf 297 #define tCatenary 297
#define tError 298 #define tPrintf 298
#define tStr 299 #define tError 299
#define tSprintf 300 #define tStr 300
#define tStrCat 301 #define tSprintf 301
#define tStrPrefix 302 #define tStrCat 302
#define tStrRelative 303 #define tStrPrefix 303
#define tStrReplace 304 #define tStrRelative 304
#define tAbsolutePath 305 #define tStrReplace 305
#define tDirName 306 #define tAbsolutePath 306
#define tStrSub 307 #define tDirName 307
#define tStrLen 308 #define tStrSub 308
#define tFind 309 #define tStrLen 309
#define tStrFind 310 #define tFind 310
#define tStrCmp 311 #define tStrFind 311
#define tStrChoice 312 #define tStrCmp 312
#define tUpperCase 313 #define tStrChoice 313
#define tLowerCase 314 #define tUpperCase 314
#define tLowerCaseIn 315 #define tLowerCase 315
#define tTextAttributes 316 #define tLowerCaseIn 316
#define tBoundingBox 317 #define tTextAttributes 317
#define tDraw 318 #define tBoundingBox 318
#define tSetChanged 319 #define tDraw 319
#define tToday 320 #define tSetChanged 320
#define tFixRelativePath 321 #define tToday 321
#define tCurrentDirectory 322 #define tFixRelativePath 322
#define tSyncModel 323 #define tCurrentDirectory 323
#define tNewModel 324 #define tSyncModel 324
#define tOnelabAction 325 #define tNewModel 325
#define tOnelabRun 326 #define tOnelabAction 326
#define tCpu 327 #define tOnelabRun 327
#define tMemory 328 #define tCpu 328
#define tTotalMemory 329 #define tMemory 329
#define tCreateTopology 330 #define tTotalMemory 330
#define tCreateTopologyNoHoles 331 #define tCreateTopology 331
#define tDistanceFunction 332 #define tCreateTopologyNoHoles 332
#define tDefineConstant 333 #define tDistanceFunction 333
#define tUndefineConstant 334 #define tDefineConstant 334
#define tDefineNumber 335 #define tUndefineConstant 335
#define tDefineStruct 336 #define tDefineNumber 336
#define tNameStruct 337 #define tDefineStruct 337
#define tDefineString 338 #define tNameStruct 338
#define tSetNumber 339 #define tAppend 339
#define tSetString 340 #define tDefineString 340
#define tPoint 341 #define tSetNumber 341
#define tCircle 342 #define tSetString 342
#define tEllipse 343 #define tPoint 343
#define tLine 344 #define tCircle 344
#define tSphere 345 #define tEllipse 345
#define tPolarSphere 346 #define tLine 346
#define tSurface 347 #define tSphere 347
#define tSpline 348 #define tPolarSphere 348
#define tVolume 349 #define tSurface 349
#define tBlock 350 #define tSpline 350
#define tCylinder 351 #define tVolume 351
#define tCone 352 #define tBlock 352
#define tTorus 353 #define tCylinder 353
#define tEllipsoid 354 #define tCone 354
#define tQuadric 355 #define tTorus 355
#define tShapeFromFile 356 #define tEllipsoid 356
#define tRectangle 357 #define tQuadric 357
#define tDisk 358 #define tShapeFromFile 358
#define tWire 359 #define tRectangle 359
#define tCharacteristic 360 #define tDisk 360
#define tLength 361 #define tWire 361
#define tParametric 362 #define tCharacteristic 362
#define tElliptic 363 #define tLength 363
#define tRefineMesh 364 #define tParametric 364
#define tAdaptMesh 365 #define tElliptic 365
#define tRelocateMesh 366 #define tRefineMesh 366
#define tSetFactory 367 #define tAdaptMesh 367
#define tThruSections 368 #define tRelocateMesh 368
#define tWedge 369 #define tSetFactory 369
#define tFillet 370 #define tThruSections 370
#define tChamfer 371 #define tWedge 371
#define tPlane 372 #define tFillet 372
#define tRuled 373 #define tChamfer 373
#define tTransfinite 374 #define tPlane 374
#define tPhysical 375 #define tRuled 375
#define tCompound 376 #define tTransfinite 376
#define tPeriodic 377 #define tPhysical 377
#define tUsing 378 #define tCompound 378
#define tPlugin 379 #define tPeriodic 379
#define tDegenerated 380 #define tUsing 380
#define tRecursive 381 #define tPlugin 381
#define tRotate 382 #define tDegenerated 382
#define tTranslate 383 #define tRecursive 383
#define tSymmetry 384 #define tRotate 384
#define tDilate 385 #define tTranslate 385
#define tExtrude 386 #define tSymmetry 386
#define tLevelset 387 #define tDilate 387
#define tAffine 388 #define tExtrude 388
#define tBooleanUnion 389 #define tLevelset 389
#define tBooleanIntersection 390 #define tAffine 390
#define tBooleanDifference 391 #define tBooleanUnion 391
#define tBooleanSection 392 #define tBooleanIntersection 392
#define tBooleanFragments 393 #define tBooleanDifference 393
#define tThickSolid 394 #define tBooleanSection 394
#define tRecombine 395 #define tBooleanFragments 395
#define tSmoother 396 #define tThickSolid 396
#define tSplit 397 #define tRecombine 397
#define tDelete 398 #define tSmoother 398
#define tCoherence 399 #define tSplit 399
#define tIntersect 400 #define tDelete 400
#define tMeshAlgorithm 401 #define tCoherence 401
#define tReverse 402 #define tIntersect 402
#define tLayers 403 #define tMeshAlgorithm 403
#define tScaleLast 404 #define tReverse 404
#define tHole 405 #define tLayers 405
#define tAlias 406 #define tScaleLast 406
#define tAliasWithOptions 407 #define tHole 407
#define tCopyOptions 408 #define tAlias 408
#define tQuadTriAddVerts 409 #define tAliasWithOptions 409
#define tQuadTriNoNewVerts 410 #define tCopyOptions 410
#define tRecombLaterals 411 #define tQuadTriAddVerts 411
#define tTransfQuadTri 412 #define tQuadTriNoNewVerts 412
#define tText2D 413 #define tRecombLaterals 413
#define tText3D 414 #define tTransfQuadTri 414
#define tInterpolationScheme 415 #define tText2D 415
#define tTime 416 #define tText3D 416
#define tCombine 417 #define tInterpolationScheme 417
#define tBSpline 418 #define tTime 418
#define tBezier 419 #define tCombine 419
#define tNurbs 420 #define tBSpline 420
#define tNurbsOrder 421 #define tBezier 421
#define tNurbsKnots 422 #define tNurbs 422
#define tColor 423 #define tNurbsOrder 423
#define tColorTable 424 #define tNurbsKnots 424
#define tFor 425 #define tColor 425
#define tIn 426 #define tColorTable 426
#define tEndFor 427 #define tFor 427
#define tIf 428 #define tIn 428
#define tElseIf 429 #define tEndFor 429
#define tElse 430 #define tIf 430
#define tEndIf 431 #define tElseIf 431
#define tExit 432 #define tElse 432
#define tAbort 433 #define tEndIf 433
#define tField 434 #define tExit 434
#define tReturn 435 #define tAbort 435
#define tCall 436 #define tField 436
#define tSlide 437 #define tReturn 437
#define tMacro 438 #define tCall 438
#define tShow 439 #define tSlide 439
#define tHide 440 #define tMacro 440
#define tGetValue 441 #define tShow 441
#define tGetStringValue 442 #define tHide 442
#define tGetEnv 443 #define tGetValue 443
#define tGetString 444 #define tGetStringValue 444
#define tGetNumber 445 #define tGetEnv 445
#define tUnique 446 #define tGetString 446
#define tHomology 447 #define tGetNumber 447
#define tCohomology 448 #define tUnique 448
#define tBetti 449 #define tHomology 449
#define tExists 450 #define tCohomology 450
#define tFileExists 451 #define tBetti 451
#define tGMSH_MAJOR_VERSION 452 #define tExists 452
#define tGMSH_MINOR_VERSION 453 #define tFileExists 453
#define tGMSH_PATCH_VERSION 454 #define tGMSH_MAJOR_VERSION 454
#define tGmshExecutableName 455 #define tGMSH_MINOR_VERSION 455
#define tSetPartition 456 #define tGMSH_PATCH_VERSION 456
#define tNameToString 457 #define tGmshExecutableName 457
#define tStringToName 458 #define tSetPartition 458
#define tAFFECTDIVIDE 459 #define tNameToString 459
#define tAFFECTTIMES 460 #define tStringToName 460
#define tAFFECTMINUS 461 #define tAFFECTDIVIDE 461
#define tAFFECTPLUS 462 #define tAFFECTTIMES 462
#define tOR 463 #define tAFFECTMINUS 463
#define tAND 464 #define tAFFECTPLUS 464
#define tNOTEQUAL 465 #define tOR 465
#define tEQUAL 466 #define tAND 466
#define tGREATEROREQUAL 467 #define tNOTEQUAL 467
#define tLESSOREQUAL 468 #define tEQUAL 468
#define UNARYPREC 469 #define tGREATEROREQUAL 469
#define tMINUSMINUS 470 #define tLESSOREQUAL 470
#define tPLUSPLUS 471 #define UNARYPREC 471
#define tMINUSMINUS 472
#define tPLUSPLUS 473
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE typedef union YYSTYPE
#line 135 "Gmsh.y" #line 138 "Gmsh.y"
{ {
char *c; char *c;
int i; int i;
...@@ -485,9 +489,10 @@ typedef union YYSTYPE ...@@ -485,9 +489,10 @@ typedef union YYSTYPE
double v[5]; double v[5];
Shape s; Shape s;
List_T *l; List_T *l;
struct TwoChar c2;
} }
/* Line 1529 of yacc.c. */ /* Line 1529 of yacc.c. */
#line 491 "Gmsh.tab.hpp" #line 496 "Gmsh.tab.hpp"
YYSTYPE; YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
......
This diff is collapsed.
...@@ -28,22 +28,108 @@ class Shape{ ...@@ -28,22 +28,108 @@ class Shape{
int Num; int Num;
}; };
struct TwoChar { char *char1, *char2; };
// classes for Struct
class Struct { class Struct {
public: public:
Struct() {} Struct() {}
Struct(int value, int type, Struct(int index,
std::map<std::string, std::vector<double> > fopt, std::map<std::string, std::vector<double> > fopt,
std::map<std::string, std::vector<std::string> > copt) : std::map<std::string, std::vector<std::string> > copt) :
_value(value), _type(type), _fopt(fopt), _copt(copt) {} _index(index), _fopt(fopt), _copt(copt) {}
~Struct() {} ~Struct() {}
void append(std::map<std::string, std::vector<double> > fopt,
std::map<std::string, std::vector<std::string> > copt) {
this->_fopt.insert(fopt.begin(), fopt.end());
this->_copt.insert(copt.begin(), copt.end());
}
void print(const std::string & struct_name, const std::string & struct_namespace)
{
//...
}
public: public:
int _value; int _index;
int _type;
std::map<std::string, std::vector<double> > _fopt; std::map<std::string, std::vector<double> > _fopt;
std::map<std::string, std::vector<std::string> > _copt; std::map<std::string, std::vector<std::string> > _copt;
}; };
template <class K, class T>
class Map {
public:
Map() {}
~Map() {}
T * Find(K key) {
typename std::map<K, T>::iterator it;
if ( (it = _map.find(key)) != _map.end() ) return &it->second;
else return NULL;
}
inline T & operator[] (K key) { return _map[key]; }
inline std::map<K, T> & get() { return _map; }
inline int count (std::string key) { return _map.count(key); }
public:
std::map<K, T> _map;
};
typedef std::map<std::string, Struct> Map_string_Struct;
class Structs : public Map<std::string, Struct> {
public:
Structs() { _new_index = 1; }
~Structs() {}
int get_key_struct_from_index(int index, const std::string * & key_struct) {
Map_string_Struct::iterator it_st;
for (it_st = this->get().begin(); it_st != this->get().end(); ++it_st )
if (it_st->second._index == index) break;
if (it_st != this->get().end()) {
key_struct = &it_st->first;
return 0;
}
else return 2;
}
void print(const std::string & struct_namespace) {
for (Map_string_Struct::iterator it_st = this->get().begin();
it_st != this->get().end(); ++it_st )
it_st->second.print(it_st->first, struct_namespace);
}
public:
int _new_index;
};
typedef std::map<std::string, Structs> Map_string_Structs;
class NameSpaces : public Map<std::string, Structs> {
public:
NameSpaces() {}
~NameSpaces() {}
int get_key_struct_from_index(int index, const std::string * & key_struct,
std::string & key_namespace) {
if (this->count(key_namespace))
return (*this)[key_namespace].get_key_struct_from_index(index, key_struct);
else return 1;
}
void print() {
for (Map_string_Structs::iterator it_ns = this->get().begin();
it_ns != this->get().end(); ++it_ns )
it_ns->second.print(it_ns->first);
}
};
// global parser variables that need to be exported // global parser variables that need to be exported
extern gmshFILE gmsh_yyin; extern gmshFILE gmsh_yyin;
extern int gmsh_yylineno; extern int gmsh_yylineno;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment