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

new charParameterOptions

parent e581d300
No related branches found
No related tags found
No related merge requests found
......@@ -759,6 +759,7 @@ onelabGroup::onelabGroup(int x, int y, int w, int h, const char *l)
_tree->showroot(0);
_tree->box(FL_FLAT_BOX);
_tree->scrollbar_size(std::max(10, FL_NORMAL_SIZE - 2));
//_tree->resizable(0);
_tree->end();
_computeWidths();
......
This diff is collapsed.
......@@ -130,6 +130,7 @@ struct doubleXstring{
%type <i> TransfiniteArrangement RecombineAngle
%type <u> ColorExpr
%type <c> StringExpr StringExprVar SendToFile HomologyCommand
%type <l> RecursiveListOfStringExprVar
%type <l> FExpr_Multi ListOfDouble ListOfDoubleOrAll RecursiveListOfDouble
%type <l> RecursiveListOfListOfDouble Enumeration
%type <l> ListOfColor RecursiveListOfColor
......@@ -1138,7 +1139,7 @@ DefineConstants :
}
| DefineConstants Comma tSTRING tAFFECT '{' StringExpr
{ floatOptions.clear(); charOptions.clear(); }
FloatParameterOptions '}'
CharParameterOptions '}'
{
std::string key($3), val($6);
if(!gmsh_yysymbols.count(key)){
......@@ -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
PhysicalId :
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment