Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
cabb1f19
Commit
cabb1f19
authored
12 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
new charParameterOptions
parent
e581d300
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Fltk/onelabGroup.cpp
+1
-0
1 addition, 0 deletions
Fltk/onelabGroup.cpp
Parser/Gmsh.tab.cpp
+2314
-2222
2314 additions, 2222 deletions
Parser/Gmsh.tab.cpp
Parser/Gmsh.y
+51
-1
51 additions, 1 deletion
Parser/Gmsh.y
with
2366 additions
and
2223 deletions
Fltk/onelabGroup.cpp
+
1
−
0
View file @
cabb1f19
...
@@ -759,6 +759,7 @@ onelabGroup::onelabGroup(int x, int y, int w, int h, const char *l)
...
@@ -759,6 +759,7 @@ onelabGroup::onelabGroup(int x, int y, int w, int h, const char *l)
_tree
->
showroot
(
0
);
_tree
->
showroot
(
0
);
_tree
->
box
(
FL_FLAT_BOX
);
_tree
->
box
(
FL_FLAT_BOX
);
_tree
->
scrollbar_size
(
std
::
max
(
10
,
FL_NORMAL_SIZE
-
2
));
_tree
->
scrollbar_size
(
std
::
max
(
10
,
FL_NORMAL_SIZE
-
2
));
//_tree->resizable(0);
_tree
->
end
();
_tree
->
end
();
_computeWidths
();
_computeWidths
();
...
...
This diff is collapsed.
Click to expand it.
Parser/Gmsh.tab.cpp
+
2314
−
2222
View file @
cabb1f19
This diff is collapsed.
Click to expand it.
Parser/Gmsh.y
+
51
−
1
View file @
cabb1f19
...
@@ -130,6 +130,7 @@ struct doubleXstring{
...
@@ -130,6 +130,7 @@ struct doubleXstring{
%type <i> TransfiniteArrangement RecombineAngle
%type <i> TransfiniteArrangement RecombineAngle
%type <u> ColorExpr
%type <u> ColorExpr
%type <c> StringExpr StringExprVar SendToFile HomologyCommand
%type <c> StringExpr StringExprVar SendToFile HomologyCommand
%type <l> RecursiveListOfStringExprVar
%type <l> FExpr_Multi ListOfDouble ListOfDoubleOrAll RecursiveListOfDouble
%type <l> FExpr_Multi ListOfDouble ListOfDoubleOrAll RecursiveListOfDouble
%type <l> RecursiveListOfListOfDouble Enumeration
%type <l> RecursiveListOfListOfDouble Enumeration
%type <l> ListOfColor RecursiveListOfColor
%type <l> ListOfColor RecursiveListOfColor
...
@@ -1138,7 +1139,7 @@ DefineConstants :
...
@@ -1138,7 +1139,7 @@ DefineConstants :
}
}
| DefineConstants Comma tSTRING tAFFECT '{' StringExpr
| DefineConstants Comma tSTRING tAFFECT '{' StringExpr
{ floatOptions.clear(); charOptions.clear(); }
{ floatOptions.clear(); charOptions.clear(); }
Float
ParameterOptions '}'
Char
ParameterOptions '}'
{
{
std::string key($3), val($6);
std::string key($3), val($6);
if(!gmsh_yysymbols.count(key)){
if(!gmsh_yysymbols.count(key)){
...
@@ -1205,6 +1206,45 @@ FloatParameterOption :
...
@@ -1205,6 +1206,45 @@ FloatParameterOption :
}
}
;
;
CharParameterOptions :
| CharParameterOptions CharParameterOption
;
CharParameterOption :
',' tSTRING FExpr
{
std::string key($2);
double val = $3;
floatOptions[key].push_back(val);
Free($2);
}
| ',' tSTRING tBIGSTR
{
std::string key($2);
std::string val($3);
charOptions[key].push_back(val);
Free($2);
Free($3);
}
| ',' tSTRING '{' RecursiveListOfStringExprVar '}'
{
std::string key($2);
for(int i = 0; i < List_Nbr($4); i++){
char *s;
List_Read($4, i, &s);
std::string val(s);
Free(s);
charOptions[key].push_back(val);
}
Free($2);
List_Delete($4);
}
;
// S H A P E
// S H A P E
PhysicalId :
PhysicalId :
...
@@ -4601,6 +4641,16 @@ StringExpr :
...
@@ -4601,6 +4641,16 @@ StringExpr :
}
}
;
;
RecursiveListOfStringExprVar :
StringExprVar
{
$$ = List_Create(20,20,sizeof(char*));
List_Add($$, &($1));
}
| RecursiveListOfStringExprVar ',' StringExprVar
{ List_Add($$, &($3)); }
;
%%
%%
int PrintListOfDouble(char *format, List_T *list, char *buffer)
int PrintListOfDouble(char *format, List_T *list, char *buffer)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment