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

testing FixRelativePath parser function

parent dbc2624f
Branches
Tags
No related merge requests found
...@@ -164,6 +164,7 @@ Exists return tExists; ...@@ -164,6 +164,7 @@ Exists return tExists;
Fabs return tFabs; Fabs return tFabs;
Field return tField; Field return tField;
FileExists return tFileExists; FileExists return tFileExists;
FixRelativePath return tFixRelativePath;
Floor return tFloor; Floor return tFloor;
Fmod return tFmod; Fmod return tFmod;
For return tFor; For return tFor;
......
This diff is collapsed.
...@@ -95,122 +95,123 @@ extern int gmsh_yydebug; ...@@ -95,122 +95,123 @@ extern int gmsh_yydebug;
tDraw = 304, tDraw = 304,
tSetChanged = 305, tSetChanged = 305,
tToday = 306, tToday = 306,
tSyncModel = 307, tFixRelativePath = 307,
tOnelabAction = 308, tSyncModel = 308,
tOnelabRun = 309, tOnelabAction = 309,
tCpu = 310, tOnelabRun = 310,
tMemory = 311, tCpu = 311,
tTotalMemory = 312, tMemory = 312,
tCreateTopology = 313, tTotalMemory = 313,
tCreateTopologyNoHoles = 314, tCreateTopology = 314,
tDistanceFunction = 315, tCreateTopologyNoHoles = 315,
tDefineConstant = 316, tDistanceFunction = 316,
tUndefineConstant = 317, tDefineConstant = 317,
tDefineNumber = 318, tUndefineConstant = 318,
tDefineString = 319, tDefineNumber = 319,
tPoint = 320, tDefineString = 320,
tCircle = 321, tPoint = 321,
tEllipse = 322, tCircle = 322,
tLine = 323, tEllipse = 323,
tSphere = 324, tLine = 324,
tPolarSphere = 325, tSphere = 325,
tSurface = 326, tPolarSphere = 326,
tSpline = 327, tSurface = 327,
tVolume = 328, tSpline = 328,
tCharacteristic = 329, tVolume = 329,
tLength = 330, tCharacteristic = 330,
tParametric = 331, tLength = 331,
tElliptic = 332, tParametric = 332,
tRefineMesh = 333, tElliptic = 333,
tAdaptMesh = 334, tRefineMesh = 334,
tRelocateMesh = 335, tAdaptMesh = 335,
tPlane = 336, tRelocateMesh = 336,
tRuled = 337, tPlane = 337,
tTransfinite = 338, tRuled = 338,
tComplex = 339, tTransfinite = 339,
tPhysical = 340, tComplex = 340,
tCompound = 341, tPhysical = 341,
tPeriodic = 342, tCompound = 342,
tUsing = 343, tPeriodic = 343,
tPlugin = 344, tUsing = 344,
tDegenerated = 345, tPlugin = 345,
tRecursive = 346, tDegenerated = 346,
tRotate = 347, tRecursive = 347,
tTranslate = 348, tRotate = 348,
tSymmetry = 349, tTranslate = 349,
tDilate = 350, tSymmetry = 350,
tExtrude = 351, tDilate = 351,
tLevelset = 352, tExtrude = 352,
tRecombine = 353, tLevelset = 353,
tSmoother = 354, tRecombine = 354,
tSplit = 355, tSmoother = 355,
tDelete = 356, tSplit = 356,
tCoherence = 357, tDelete = 357,
tIntersect = 358, tCoherence = 358,
tMeshAlgorithm = 359, tIntersect = 359,
tReverse = 360, tMeshAlgorithm = 360,
tLayers = 361, tReverse = 361,
tScaleLast = 362, tLayers = 362,
tHole = 363, tScaleLast = 363,
tAlias = 364, tHole = 364,
tAliasWithOptions = 365, tAlias = 365,
tCopyOptions = 366, tAliasWithOptions = 366,
tQuadTriAddVerts = 367, tCopyOptions = 367,
tQuadTriNoNewVerts = 368, tQuadTriAddVerts = 368,
tQuadTriSngl = 369, tQuadTriNoNewVerts = 369,
tQuadTriDbl = 370, tQuadTriSngl = 370,
tRecombLaterals = 371, tQuadTriDbl = 371,
tTransfQuadTri = 372, tRecombLaterals = 372,
tText2D = 373, tTransfQuadTri = 373,
tText3D = 374, tText2D = 374,
tInterpolationScheme = 375, tText3D = 375,
tTime = 376, tInterpolationScheme = 376,
tCombine = 377, tTime = 377,
tBSpline = 378, tCombine = 378,
tBezier = 379, tBSpline = 379,
tNurbs = 380, tBezier = 380,
tNurbsOrder = 381, tNurbs = 381,
tNurbsKnots = 382, tNurbsOrder = 382,
tColor = 383, tNurbsKnots = 383,
tColorTable = 384, tColor = 384,
tFor = 385, tColorTable = 385,
tIn = 386, tFor = 386,
tEndFor = 387, tIn = 387,
tIf = 388, tEndFor = 388,
tEndIf = 389, tIf = 389,
tExit = 390, tEndIf = 390,
tAbort = 391, tExit = 391,
tField = 392, tAbort = 392,
tReturn = 393, tField = 393,
tCall = 394, tReturn = 394,
tFunction = 395, tCall = 395,
tShow = 396, tFunction = 396,
tHide = 397, tShow = 397,
tGetValue = 398, tHide = 398,
tGetEnv = 399, tGetValue = 399,
tGetString = 400, tGetEnv = 400,
tHomology = 401, tGetString = 401,
tCohomology = 402, tHomology = 402,
tBetti = 403, tCohomology = 403,
tSetOrder = 404, tBetti = 404,
tExists = 405, tSetOrder = 405,
tFileExists = 406, tExists = 406,
tGMSH_MAJOR_VERSION = 407, tFileExists = 407,
tGMSH_MINOR_VERSION = 408, tGMSH_MAJOR_VERSION = 408,
tGMSH_PATCH_VERSION = 409, tGMSH_MINOR_VERSION = 409,
tAFFECTDIVIDE = 410, tGMSH_PATCH_VERSION = 410,
tAFFECTTIMES = 411, tAFFECTDIVIDE = 411,
tAFFECTMINUS = 412, tAFFECTTIMES = 412,
tAFFECTPLUS = 413, tAFFECTMINUS = 413,
tOR = 414, tAFFECTPLUS = 414,
tAND = 415, tOR = 415,
tNOTEQUAL = 416, tAND = 416,
tEQUAL = 417, tNOTEQUAL = 417,
tGREATEROREQUAL = 418, tEQUAL = 418,
tLESSOREQUAL = 419, tGREATEROREQUAL = 419,
UNARYPREC = 420, tLESSOREQUAL = 420,
tMINUSMINUS = 421, UNARYPREC = 421,
tPLUSPLUS = 422 tMINUSMINUS = 422,
tPLUSPLUS = 423
}; };
#endif #endif
...@@ -231,7 +232,7 @@ typedef union YYSTYPE ...@@ -231,7 +232,7 @@ typedef union YYSTYPE
/* Line 2053 of yacc.c */ /* Line 2053 of yacc.c */
#line 235 "Gmsh.tab.hpp" #line 236 "Gmsh.tab.hpp"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
......
...@@ -116,7 +116,7 @@ struct doubleXstring{ ...@@ -116,7 +116,7 @@ struct doubleXstring{
%token tPrintf tError tStr tSprintf tStrCat tStrPrefix tStrRelative tStrReplace %token tPrintf tError tStr tSprintf tStrCat tStrPrefix tStrRelative tStrReplace
%token tStrFind tStrCmp %token tStrFind tStrCmp
%token tTextAttributes %token tTextAttributes
%token tBoundingBox tDraw tSetChanged tToday tSyncModel %token tBoundingBox tDraw tSetChanged tToday tFixRelativePath tSyncModel
%token tOnelabAction tOnelabRun %token tOnelabAction tOnelabRun
%token tCpu tMemory tTotalMemory %token tCpu tMemory tTotalMemory
%token tCreateTopology tCreateTopologyNoHoles %token tCreateTopology tCreateTopologyNoHoles
...@@ -5290,6 +5290,13 @@ StringExpr : ...@@ -5290,6 +5290,13 @@ StringExpr :
} }
List_Delete($5); List_Delete($5);
} }
| tFixRelativePath '(' StringExprVar ')'
{
std::string tmp = FixRelativePath(gmsh_yyname, $3);
$$ = (char*)Malloc((tmp.size() + 1) * sizeof(char));
strcpy($$, tmp.c_str());
Free($3);
}
| tDefineString LP StringExpr | tDefineString LP StringExpr
{ floatOptions.clear(); charOptions.clear(); } { floatOptions.clear(); charOptions.clear(); }
CharParameterOptions RP CharParameterOptions RP
......
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