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
00dcd045
Commit
00dcd045
authored
8 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
variable++ was actually behaving like ++variable : fixed (thanks to JimMonte for the report!)
parent
09152952
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Parser/Gmsh.tab.cpp
+162
-149
162 additions, 149 deletions
Parser/Gmsh.tab.cpp
Parser/Gmsh.y
+26
-16
26 additions, 16 deletions
Parser/Gmsh.y
with
188 additions
and
165 deletions
Parser/Gmsh.tab.cpp
+
162
−
149
View file @
00dcd045
...
...
@@ -1327,19 +1327,19 @@ static const yytype_uint16 yyrline[] =
5060, 5061, 5062, 5063, 5064, 5065, 5066, 5067, 5068, 5069,
5070, 5071, 5072, 5073, 5074, 5083, 5084, 5085, 5086, 5087,
5088, 5089, 5090, 5091, 5092, 5093, 5098, 5097, 5105, 5110,
5115, 5132, 5150, 5168, 5186, 5204, 5209, 5215, 5230, 524
7
,
526
5
, 528
3
, 530
1
, 53
2
2, 53
2
7,
5332,
5342, 5352, 53
5
7, 53
6
8,
53
7
7, 53
8
2, 54
0
9, 54
1
3, 54
1
7, 54
2
1, 54
2
5, 54
3
2, 54
3
6, 54
4
0,
54
4
4, 54
5
1, 54
5
6, 54
6
3, 54
6
8, 54
7
2, 54
7
7, 54
8
1, 54
8
9, 55
0
0,
55
0
4, 55
1
6, 55
2
4, 55
3
2, 55
3
9, 55
4
9, 55
7
8, 55
8
2, 55
8
6, 5
59
0,
5
59
4, 5
59
8, 56
0
2, 56
0
6, 56
1
0, 56
3
9, 56
6
8, 5
69
7, 57
2
6, 57
3
9,
57
5
2, 57
6
5, 57
7
8, 57
8
8, 5
79
8, 58
1
0, 58
2
3, 58
3
5, 58
3
9, 58
4
3,
58
4
7, 58
5
1, 58
6
9, 5
8
90, 5
8
95, 5
8
99, 59
0
3, 59
1
5, 59
1
9, 59
3
1,
5948,
5958, 5962, 59
7
7, 59
8
2, 59
8
9,
599
3, 60
0
6, 60
2
0, 60
3
4,
60
4
8, 60
6
2, 60
7
0, 60
8
1, 60
8
5, 60
8
9, 60
9
7, 61
0
3, 61
0
9, 61
1
7,
61
2
5, 61
3
2, 61
4
0, 61
5
5, 61
6
9, 61
8
3, 6
19
5, 62
1
1, 62
2
0, 62
2
9,
62
3
9, 62
5
0, 62
5
4, 62
7
3, 62
8
0, 62
8
6, 6
29
3, 63
0
1, 63
0
0, 63
1
3,
63
1
8, 63
2
4, 63
3
3, 63
4
6, 63
4
9, 63
5
3
5115, 5132, 5150, 5168, 5186, 5204, 5209, 5215, 5230, 524
9
,
526
9
, 528
9
, 530
9
, 53
3
2, 53
3
7, 5342, 5352, 53
62, 536
7, 53
7
8,
53
8
7, 53
9
2, 54
1
9, 54
2
3, 54
2
7, 54
3
1, 54
3
5, 54
4
2, 54
4
6, 54
5
0,
54
5
4, 54
6
1, 54
6
6, 54
7
3, 54
7
8, 54
8
2, 54
8
7, 54
9
1, 54
9
9, 55
1
0,
55
1
4, 55
2
6, 55
3
4, 55
4
2, 55
4
9, 55
5
9, 55
8
8, 55
9
2, 55
9
6, 5
60
0,
5
60
4, 5
60
8, 56
1
2, 56
1
6, 56
2
0, 56
4
9, 56
7
8, 5
70
7, 57
3
6, 57
4
9,
57
6
2, 57
7
5, 57
8
8, 57
9
8, 5
80
8, 58
2
0, 58
3
3, 58
4
5, 58
4
9, 58
5
3,
58
5
7, 58
6
1, 58
7
9, 59
0
0, 59
0
5, 59
0
9, 59
1
3, 59
2
5, 59
2
9, 59
4
1,
5958, 596
8, 597
2, 59
8
7, 59
9
2, 59
9
9,
600
3, 60
1
6, 60
3
0, 60
4
4,
60
5
8, 60
7
2, 60
8
0, 60
9
1, 60
9
5, 60
9
9, 6
1
07, 61
1
3, 61
1
9, 61
2
7,
61
3
5, 61
4
2, 61
5
0, 61
6
5, 61
7
9, 61
9
3, 6
20
5, 62
2
1, 62
3
0, 62
3
9,
62
4
9, 62
6
0, 62
6
4, 62
8
3, 62
9
0, 62
9
6, 6
30
3, 63
1
1, 63
1
0, 63
2
3,
63
2
8, 63
3
4, 63
4
3, 63
5
6, 63
5
9, 63
6
3
};
#endif
...
...
@@ -7880,7 +7880,7 @@ yyreduce:
s->compound.push_back((int)*(double*)List_Pointer((yyvsp[(7) - (8)].l), i));
}
// Added by Trevor Strickler
setSurfaceGeneratrices(s, (List_T*) 0
);
setSurfaceGeneratrices(s, (List_T*) 0);
Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s);
}
List_Delete((yyvsp[(7) - (8)].l));
...
...
@@ -11589,15 +11589,17 @@ yyreduce:
yymsg(0, "Uninitialized variable '%s'", (yyvsp[(1) - (2)].c));
(yyval.d) = 0.;
}
else
(yyval.d) = (s.value[0] += (yyvsp[(2) - (2)].i));
else{
(yyval.d) = s.value[0];
s.value[0] += (yyvsp[(2) - (2)].i);
}
}
Free((yyvsp[(1) - (2)].c));
;}
break;
case 439:
#line 52
48
"Gmsh.y"
#line 52
50
"Gmsh.y"
{
int index = (int)(yyvsp[(3) - (5)].d);
if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){
...
...
@@ -11610,15 +11612,17 @@ yyreduce:
yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (5)].c), index);
(yyval.d) = 0.;
}
else
(yyval.d) = (s.value[index] += (yyvsp[(5) - (5)].i));
else{
(yyval.d) = s.value[index];
s.value[index] += (yyvsp[(5) - (5)].i);
}
}
Free((yyvsp[(1) - (5)].c));
;}
break;
case 440:
#line 52
66
"Gmsh.y"
#line 52
70
"Gmsh.y"
{
int index = (int)(yyvsp[(3) - (5)].d);
if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){
...
...
@@ -11631,15 +11635,17 @@ yyreduce:
yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (5)].c), index);
(yyval.d) = 0.;
}
else
(yyval.d) = (s.value[index] += (yyvsp[(5) - (5)].i));
else{
(yyval.d) = s.value[index];
s.value[index] += (yyvsp[(5) - (5)].i);
}
}
Free((yyvsp[(1) - (5)].c));
;}
break;
case 441:
#line 52
84
"Gmsh.y"
#line 52
90
"Gmsh.y"
{
int index = (int)(yyvsp[(3) - (5)].d);
if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){
...
...
@@ -11652,15 +11658,17 @@ yyreduce:
yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (5)].c), index);
(yyval.d) = 0.;
}
else
(yyval.d) = (s.value[index] += (yyvsp[(5) - (5)].i));
else{
(yyval.d) = s.value[index];
s.value[index] += (yyvsp[(5) - (5)].i);
}
}
Free((yyvsp[(1) - (5)].c));
;}
break;
case 442:
#line 530
2
"Gmsh.y"
#line 53
1
0 "Gmsh.y"
{
int index = (int)(yyvsp[(3) - (5)].d);
if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){
...
...
@@ -11673,15 +11681,17 @@ yyreduce:
yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (5)].c), index);
(yyval.d) = 0.;
}
else
(yyval.d) = (s.value[index] += (yyvsp[(5) - (5)].i));
else{
(yyval.d) = s.value[index];
s.value[index] += (yyvsp[(5) - (5)].i);
}
}
Free((yyvsp[(1) - (5)].c));
;}
break;
case 443:
#line 53
2
3 "Gmsh.y"
#line 53
3
3 "Gmsh.y"
{
NumberOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), (yyval.d));
Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c));
...
...
@@ -11689,7 +11699,7 @@ yyreduce:
break;
case 444:
#line 53
2
8 "Gmsh.y"
#line 53
3
8 "Gmsh.y"
{
NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), (yyval.d));
Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c));
...
...
@@ -11697,7 +11707,7 @@ yyreduce:
break;
case 445:
#line 53
3
3 "Gmsh.y"
#line 53
4
3 "Gmsh.y"
{
double d = 0.;
if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){
...
...
@@ -11710,7 +11720,7 @@ yyreduce:
break;
case 446:
#line 53
4
3 "Gmsh.y"
#line 53
5
3 "Gmsh.y"
{
double d = 0.;
if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){
...
...
@@ -11723,7 +11733,7 @@ yyreduce:
break;
case 447:
#line 53
5
3 "Gmsh.y"
#line 53
6
3 "Gmsh.y"
{
(yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d));
Free((yyvsp[(3) - (6)].c));
...
...
@@ -11731,7 +11741,7 @@ yyreduce:
break;
case 448:
#line 53
5
8 "Gmsh.y"
#line 53
6
8 "Gmsh.y"
{
int matches = 0;
for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
...
...
@@ -11745,7 +11755,7 @@ yyreduce:
break;
case 449:
#line 53
6
9 "Gmsh.y"
#line 53
7
9 "Gmsh.y"
{
std::string s((yyvsp[(3) - (6)].c)), substr((yyvsp[(5) - (6)].c));
if(s.find(substr) != std::string::npos)
...
...
@@ -11757,7 +11767,7 @@ yyreduce:
break;
case 450:
#line 53
7
8 "Gmsh.y"
#line 53
8
8 "Gmsh.y"
{
(yyval.d) = strcmp((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c));
Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c));
...
...
@@ -11765,7 +11775,7 @@ yyreduce:
break;
case 451:
#line 53
8
3 "Gmsh.y"
#line 53
9
3 "Gmsh.y"
{
int align = 0, font = 0, fontsize = CTX::instance()->glFontSize;
if(List_Nbr((yyvsp[(3) - (4)].l)) % 2){
...
...
@@ -11792,70 +11802,70 @@ yyreduce:
break;
case 452:
#line 54
1
0 "Gmsh.y"
#line 54
2
0 "Gmsh.y"
{
memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double));
;}
break;
case 453:
#line 54
1
4 "Gmsh.y"
#line 54
2
4 "Gmsh.y"
{
for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i];
;}
break;
case 454:
#line 54
1
8 "Gmsh.y"
#line 54
2
8 "Gmsh.y"
{
for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
;}
break;
case 455:
#line 54
2
2 "Gmsh.y"
#line 54
3
2 "Gmsh.y"
{
for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i];
;}
break;
case 456:
#line 54
2
6 "Gmsh.y"
#line 54
3
6 "Gmsh.y"
{
for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i];
;}
break;
case 457:
#line 54
3
3 "Gmsh.y"
#line 54
4
3 "Gmsh.y"
{
(yyval.v)[0] = (yyvsp[(2) - (11)].d); (yyval.v)[1] = (yyvsp[(4) - (11)].d); (yyval.v)[2] = (yyvsp[(6) - (11)].d); (yyval.v)[3] = (yyvsp[(8) - (11)].d); (yyval.v)[4] = (yyvsp[(10) - (11)].d);
;}
break;
case 458:
#line 54
3
7 "Gmsh.y"
#line 54
4
7 "Gmsh.y"
{
(yyval.v)[0] = (yyvsp[(2) - (9)].d); (yyval.v)[1] = (yyvsp[(4) - (9)].d); (yyval.v)[2] = (yyvsp[(6) - (9)].d); (yyval.v)[3] = (yyvsp[(8) - (9)].d); (yyval.v)[4] = 1.0;
;}
break;
case 459:
#line 54
4
1 "Gmsh.y"
#line 54
5
1 "Gmsh.y"
{
(yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0;
;}
break;
case 460:
#line 54
4
5 "Gmsh.y"
#line 54
5
5 "Gmsh.y"
{
(yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0;
;}
break;
case 461:
#line 54
5
2 "Gmsh.y"
#line 54
6
2 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(List_T*));
List_Add((yyval.l), &((yyvsp[(1) - (1)].l)));
...
...
@@ -11863,14 +11873,14 @@ yyreduce:
break;
case 462:
#line 54
5
7 "Gmsh.y"
#line 54
6
7 "Gmsh.y"
{
List_Add((yyval.l), &((yyvsp[(3) - (3)].l)));
;}
break;
case 463:
#line 54
6
4 "Gmsh.y"
#line 54
7
4 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
...
...
@@ -11878,14 +11888,14 @@ yyreduce:
break;
case 464:
#line 54
6
9 "Gmsh.y"
#line 54
7
9 "Gmsh.y"
{
(yyval.l) = (yyvsp[(1) - (1)].l);
;}
break;
case 465:
#line 54
7
3 "Gmsh.y"
#line 54
8
3 "Gmsh.y"
{
// creates an empty list
(yyval.l) = List_Create(2, 1, sizeof(double));
...
...
@@ -11893,14 +11903,14 @@ yyreduce:
break;
case 466:
#line 54
7
8 "Gmsh.y"
#line 54
8
8 "Gmsh.y"
{
(yyval.l) = (yyvsp[(2) - (3)].l);
;}
break;
case 467:
#line 54
8
2 "Gmsh.y"
#line 54
9
2 "Gmsh.y"
{
(yyval.l) = (yyvsp[(3) - (4)].l);
for(int i = 0; i < List_Nbr((yyval.l)); i++){
...
...
@@ -11911,7 +11921,7 @@ yyreduce:
break;
case 468:
#line 5
49
0 "Gmsh.y"
#line 5
50
0 "Gmsh.y"
{
(yyval.l) = (yyvsp[(4) - (5)].l);
for(int i = 0; i < List_Nbr((yyval.l)); i++){
...
...
@@ -11922,14 +11932,14 @@ yyreduce:
break;
case 469:
#line 55
0
1 "Gmsh.y"
#line 55
1
1 "Gmsh.y"
{
(yyval.l) = (yyvsp[(1) - (1)].l);
;}
break;
case 470:
#line 55
0
5 "Gmsh.y"
#line 55
1
5 "Gmsh.y"
{
if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all"))
(yyval.l) = 0;
...
...
@@ -11941,7 +11951,7 @@ yyreduce:
break;
case 471:
#line 55
1
7 "Gmsh.y"
#line 55
2
7 "Gmsh.y"
{
(yyval.l) = (yyvsp[(2) - (2)].l);
for(int i = 0; i < List_Nbr((yyval.l)); i++){
...
...
@@ -11952,7 +11962,7 @@ yyreduce:
break;
case 472:
#line 55
2
5 "Gmsh.y"
#line 55
3
5 "Gmsh.y"
{
(yyval.l) = (yyvsp[(3) - (3)].l);
for(int i = 0; i < List_Nbr((yyval.l)); i++){
...
...
@@ -11963,7 +11973,7 @@ yyreduce:
break;
case 473:
#line 55
3
3 "Gmsh.y"
#line 55
4
3 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
for(double d = (yyvsp[(1) - (3)].d); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d <= (yyvsp[(3) - (3)].d)) : (d >= (yyvsp[(3) - (3)].d));
...
...
@@ -11973,7 +11983,7 @@ yyreduce:
break;
case 474:
#line 55
4
0 "Gmsh.y"
#line 55
5
0 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
if(!(yyvsp[(5) - (5)].d)){ //|| ($1 < $3 && $5 < 0) || ($1 > $3 && $5 > 0)
...
...
@@ -11986,7 +11996,7 @@ yyreduce:
break;
case 475:
#line 55
5
0 "Gmsh.y"
#line 55
6
0 "Gmsh.y"
{
// Returns the coordinates of a point and fills a list with it.
// This allows to ensure e.g. that relative point positions are
...
...
@@ -12018,63 +12028,63 @@ yyreduce:
break;
case 476:
#line 55
7
9 "Gmsh.y"
#line 55
8
9 "Gmsh.y"
{
(yyval.l) = GetAllElementaryEntityNumbers(0);
;}
break;
case 477:
#line 55
8
3 "Gmsh.y"
#line 55
9
3 "Gmsh.y"
{
(yyval.l) = GetAllElementaryEntityNumbers(1);
;}
break;
case 478:
#line 55
8
7 "Gmsh.y"
#line 55
9
7 "Gmsh.y"
{
(yyval.l) = GetAllElementaryEntityNumbers(2);
;}
break;
case 479:
#line 5
59
1 "Gmsh.y"
#line 5
60
1 "Gmsh.y"
{
(yyval.l) = GetAllElementaryEntityNumbers(3);
;}
break;
case 480:
#line 5
59
5 "Gmsh.y"
#line 5
60
5 "Gmsh.y"
{
(yyval.l) = GetAllPhysicalEntityNumbers(0);
;}
break;
case 481:
#line 5
59
9 "Gmsh.y"
#line 5
60
9 "Gmsh.y"
{
(yyval.l) = GetAllPhysicalEntityNumbers(1);
;}
break;
case 482:
#line 56
0
3 "Gmsh.y"
#line 56
1
3 "Gmsh.y"
{
(yyval.l) = GetAllPhysicalEntityNumbers(2);
;}
break;
case 483:
#line 56
0
7 "Gmsh.y"
#line 56
1
7 "Gmsh.y"
{
(yyval.l) = GetAllPhysicalEntityNumbers(3);
;}
break;
case 484:
#line 56
1
1 "Gmsh.y"
#line 56
2
1 "Gmsh.y"
{
(yyval.l) = List_Create(10, 1, sizeof(double));
for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
...
...
@@ -12106,7 +12116,7 @@ yyreduce:
break;
case 485:
#line 56
4
0 "Gmsh.y"
#line 56
5
0 "Gmsh.y"
{
(yyval.l) = List_Create(10, 1, sizeof(double));
for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
...
...
@@ -12138,7 +12148,7 @@ yyreduce:
break;
case 486:
#line 56
6
9 "Gmsh.y"
#line 56
7
9 "Gmsh.y"
{
(yyval.l) = List_Create(10, 1, sizeof(double));
for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
...
...
@@ -12170,7 +12180,7 @@ yyreduce:
break;
case 487:
#line 5
69
8 "Gmsh.y"
#line 5
70
8 "Gmsh.y"
{
(yyval.l) = List_Create(10, 1, sizeof(double));
for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
...
...
@@ -12202,7 +12212,7 @@ yyreduce:
break;
case 488:
#line 57
2
8 "Gmsh.y"
#line 57
3
8 "Gmsh.y"
{
(yyval.l) = List_Create(10, 1, sizeof(double));
GModel::current()->importGEOInternals();
...
...
@@ -12217,7 +12227,7 @@ yyreduce:
break;
case 489:
#line 57
4
1 "Gmsh.y"
#line 57
5
1 "Gmsh.y"
{
(yyval.l) = List_Create(10, 1, sizeof(double));
GModel::current()->importGEOInternals();
...
...
@@ -12232,7 +12242,7 @@ yyreduce:
break;
case 490:
#line 57
5
4 "Gmsh.y"
#line 57
6
4 "Gmsh.y"
{
(yyval.l) = List_Create(10, 1, sizeof(double));
GModel::current()->importGEOInternals();
...
...
@@ -12247,7 +12257,7 @@ yyreduce:
break;
case 491:
#line 57
6
7 "Gmsh.y"
#line 57
7
7 "Gmsh.y"
{
(yyval.l) = List_Create(10, 1, sizeof(double));
GModel::current()->importGEOInternals();
...
...
@@ -12262,7 +12272,7 @@ yyreduce:
break;
case 492:
#line 57
7
9 "Gmsh.y"
#line 57
8
9 "Gmsh.y"
{
(yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double));
for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){
...
...
@@ -12275,7 +12285,7 @@ yyreduce:
break;
case 493:
#line 57
8
9 "Gmsh.y"
#line 57
9
9 "Gmsh.y"
{
(yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double));
for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){
...
...
@@ -12288,7 +12298,7 @@ yyreduce:
break;
case 494:
#line 5
79
9 "Gmsh.y"
#line 5
80
9 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
...
...
@@ -12303,7 +12313,7 @@ yyreduce:
break;
case 495:
#line 58
1
1 "Gmsh.y"
#line 58
2
1 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
...
...
@@ -12318,7 +12328,7 @@ yyreduce:
break;
case 496:
#line 58
2
4 "Gmsh.y"
#line 58
3
4 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
if(!gmsh_yysymbols.count((yyvsp[(3) - (4)].c)))
...
...
@@ -12333,35 +12343,35 @@ yyreduce:
break;
case 497:
#line 58
3
6 "Gmsh.y"
#line 58
4
6 "Gmsh.y"
{
(yyval.l) = (yyvsp[(3) - (4)].l);
;}
break;
case 498:
#line 58
4
0 "Gmsh.y"
#line 58
5
0 "Gmsh.y"
{
(yyval.l) = (yyvsp[(3) - (4)].l);
;}
break;
case 499:
#line 58
4
4 "Gmsh.y"
#line 58
5
4 "Gmsh.y"
{
(yyval.l) = (yyvsp[(4) - (6)].l);
;}
break;
case 500:
#line 58
4
8 "Gmsh.y"
#line 58
5
8 "Gmsh.y"
{
(yyval.l) = (yyvsp[(4) - (6)].l);
;}
break;
case 501:
#line 58
5
2 "Gmsh.y"
#line 58
6
2 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
...
...
@@ -12382,7 +12392,7 @@ yyreduce:
break;
case 502:
#line 58
7
0 "Gmsh.y"
#line 58
8
0 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
...
...
@@ -12403,7 +12413,7 @@ yyreduce:
break;
case 503:
#line 5
8
91 "Gmsh.y"
#line 59
0
1 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(double));
List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
...
...
@@ -12411,21 +12421,21 @@ yyreduce:
break;
case 504:
#line 5
8
96 "Gmsh.y"
#line 59
0
6 "Gmsh.y"
{
(yyval.l) = (yyvsp[(1) - (1)].l);
;}
break;
case 505:
#line 59
0
0 "Gmsh.y"
#line 59
1
0 "Gmsh.y"
{
List_Add((yyval.l), &((yyvsp[(3) - (3)].d)));
;}
break;
case 506:
#line 59
0
4 "Gmsh.y"
#line 59
1
4 "Gmsh.y"
{
for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){
double d;
...
...
@@ -12437,21 +12447,21 @@ yyreduce:
break;
case 507:
#line 59
1
6 "Gmsh.y"
#line 59
2
6 "Gmsh.y"
{
(yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d));
;}
break;
case 508:
#line 59
2
0 "Gmsh.y"
#line 59
3
0 "Gmsh.y"
{
(yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255);
;}
break;
case 509:
#line 59
3
2 "Gmsh.y"
#line 59
4
2 "Gmsh.y"
{
int flag = 0;
if(gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){
...
...
@@ -12471,7 +12481,7 @@ yyreduce:
break;
case 510:
#line 59
4
9 "Gmsh.y"
#line 59
5
9 "Gmsh.y"
{
unsigned int val = 0;
ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val);
...
...
@@ -12481,14 +12491,14 @@ yyreduce:
break;
case 511:
#line 59
5
9 "Gmsh.y"
#line 59
6
9 "Gmsh.y"
{
(yyval.l) = (yyvsp[(2) - (3)].l);
;}
break;
case 512:
#line 59
6
3 "Gmsh.y"
#line 59
7
3 "Gmsh.y"
{
(yyval.l) = List_Create(256, 10, sizeof(unsigned int));
GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (6)].d));
...
...
@@ -12503,7 +12513,7 @@ yyreduce:
break;
case 513:
#line 59
7
8 "Gmsh.y"
#line 59
8
8 "Gmsh.y"
{
(yyval.l) = List_Create(256, 10, sizeof(unsigned int));
List_Add((yyval.l), &((yyvsp[(1) - (1)].u)));
...
...
@@ -12511,21 +12521,21 @@ yyreduce:
break;
case 514:
#line 59
8
3 "Gmsh.y"
#line 59
9
3 "Gmsh.y"
{
List_Add((yyval.l), &((yyvsp[(3) - (3)].u)));
;}
break;
case 515:
#line
599
0 "Gmsh.y"
#line
600
0 "Gmsh.y"
{
(yyval.c) = (yyvsp[(1) - (1)].c);
;}
break;
case 516:
#line
599
4 "Gmsh.y"
#line
600
4 "Gmsh.y"
{
std::string val;
if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c)))
...
...
@@ -12541,7 +12551,7 @@ yyreduce:
break;
case 517:
#line 60
0
7 "Gmsh.y"
#line 60
1
7 "Gmsh.y"
{
std::string val;
int j = (int)(yyvsp[(3) - (4)].d);
...
...
@@ -12558,7 +12568,7 @@ yyreduce:
break;
case 518:
#line 60
2
1 "Gmsh.y"
#line 60
3
1 "Gmsh.y"
{
std::string val;
int j = (int)(yyvsp[(3) - (4)].d);
...
...
@@ -12575,7 +12585,7 @@ yyreduce:
break;
case 519:
#line 60
3
5 "Gmsh.y"
#line 60
4
5 "Gmsh.y"
{
std::string val;
int j = (int)(yyvsp[(3) - (4)].d);
...
...
@@ -12592,7 +12602,7 @@ yyreduce:
break;
case 520:
#line 60
4
9 "Gmsh.y"
#line 60
5
9 "Gmsh.y"
{
std::string val;
int j = (int)(yyvsp[(3) - (4)].d);
...
...
@@ -12609,7 +12619,7 @@ yyreduce:
break;
case 521:
#line 60
6
3 "Gmsh.y"
#line 60
7
3 "Gmsh.y"
{
std::string out;
StringOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), out);
...
...
@@ -12620,7 +12630,7 @@ yyreduce:
break;
case 522:
#line 60
7
1 "Gmsh.y"
#line 60
8
1 "Gmsh.y"
{
std::string out;
StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), out);
...
...
@@ -12631,21 +12641,21 @@ yyreduce:
break;
case 523:
#line 60
8
2 "Gmsh.y"
#line 60
9
2 "Gmsh.y"
{
(yyval.c) = (yyvsp[(1) - (1)].c);
;}
break;
case 524:
#line 60
8
6 "Gmsh.y"
#line 60
9
6 "Gmsh.y"
{
(yyval.c) = (yyvsp[(3) - (4)].c);
;}
break;
case 525:
#line 60
9
0 "Gmsh.y"
#line 6
1
00 "Gmsh.y"
{
(yyval.c) = (char *)Malloc(32 * sizeof(char));
time_t now;
...
...
@@ -12656,7 +12666,7 @@ yyreduce:
break;
case 526:
#line 60
9
8 "Gmsh.y"
#line 6
1
08 "Gmsh.y"
{
std::string exe = Msg::GetExecutableName();
(yyval.c) = (char *)Malloc(exe.size() + 1);
...
...
@@ -12665,7 +12675,7 @@ yyreduce:
break;
case 527:
#line 61
0
4 "Gmsh.y"
#line 61
1
4 "Gmsh.y"
{
std::string action = Msg::GetOnelabAction();
(yyval.c) = (char *)Malloc(action.size() + 1);
...
...
@@ -12674,7 +12684,7 @@ yyreduce:
break;
case 528:
#line 61
1
0 "Gmsh.y"
#line 61
2
0 "Gmsh.y"
{
const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c));
if(!env) env = "";
...
...
@@ -12685,7 +12695,7 @@ yyreduce:
break;
case 529:
#line 61
1
8 "Gmsh.y"
#line 61
2
8 "Gmsh.y"
{
std::string s = Msg::GetString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c));
(yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char));
...
...
@@ -12696,7 +12706,7 @@ yyreduce:
break;
case 530:
#line 61
2
6 "Gmsh.y"
#line 61
3
6 "Gmsh.y"
{
std::string s = Msg::GetOnelabString((yyvsp[(3) - (4)].c));
(yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char));
...
...
@@ -12706,7 +12716,7 @@ yyreduce:
break;
case 531:
#line 61
3
3 "Gmsh.y"
#line 61
4
3 "Gmsh.y"
{
std::string s = Msg::GetOnelabString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c));
(yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char));
...
...
@@ -12717,7 +12727,7 @@ yyreduce:
break;
case 532:
#line 61
4
1 "Gmsh.y"
#line 61
5
1 "Gmsh.y"
{
int size = 1;
for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++)
...
...
@@ -12735,7 +12745,7 @@ yyreduce:
break;
case 533:
#line 61
5
6 "Gmsh.y"
#line 61
6
6 "Gmsh.y"
{
(yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char));
int i;
...
...
@@ -12752,7 +12762,7 @@ yyreduce:
break;
case 534:
#line 61
7
0 "Gmsh.y"
#line 61
8
0 "Gmsh.y"
{
(yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char));
int i;
...
...
@@ -12769,7 +12779,7 @@ yyreduce:
break;
case 535:
#line 61
8
4 "Gmsh.y"
#line 61
9
4 "Gmsh.y"
{
std::string input = (yyvsp[(3) - (8)].c);
std::string substr_old = (yyvsp[(5) - (8)].c);
...
...
@@ -12784,7 +12794,7 @@ yyreduce:
break;
case 536:
#line 6
19
6 "Gmsh.y"
#line 6
20
6 "Gmsh.y"
{
int size = 1;
for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++)
...
...
@@ -12803,7 +12813,7 @@ yyreduce:
break;
case 537:
#line 62
1
2 "Gmsh.y"
#line 62
2
2 "Gmsh.y"
{
int i = 0;
while ((yyvsp[(3) - (4)].c)[i]) {
...
...
@@ -12815,7 +12825,7 @@ yyreduce:
break;
case 538:
#line 62
2
1 "Gmsh.y"
#line 62
3
1 "Gmsh.y"
{
int i = 0;
while ((yyvsp[(3) - (4)].c)[i]) {
...
...
@@ -12827,7 +12837,7 @@ yyreduce:
break;
case 539:
#line 62
3
0 "Gmsh.y"
#line 62
4
0 "Gmsh.y"
{
int i = 0;
while ((yyvsp[(3) - (4)].c)[i]) {
...
...
@@ -12840,7 +12850,7 @@ yyreduce:
break;
case 540:
#line 62
4
0 "Gmsh.y"
#line 62
5
0 "Gmsh.y"
{
if((yyvsp[(3) - (8)].d)){
(yyval.c) = (yyvsp[(5) - (8)].c);
...
...
@@ -12854,14 +12864,14 @@ yyreduce:
break;
case 541:
#line 62
5
1 "Gmsh.y"
#line 62
6
1 "Gmsh.y"
{
(yyval.c) = (yyvsp[(3) - (4)].c);
;}
break;
case 542:
#line 62
5
5 "Gmsh.y"
#line 62
6
5 "Gmsh.y"
{
char tmpstring[5000];
int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring);
...
...
@@ -12883,7 +12893,7 @@ yyreduce:
break;
case 543:
#line 62
7
4 "Gmsh.y"
#line 62
8
4 "Gmsh.y"
{
std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(3) - (4)].c));
(yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char));
...
...
@@ -12893,7 +12903,7 @@ yyreduce:
break;
case 544:
#line 62
8
1 "Gmsh.y"
#line 62
9
1 "Gmsh.y"
{
std::string tmp = SplitFileName(GetAbsolutePath(gmsh_yyname))[0];
(yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char));
...
...
@@ -12902,7 +12912,7 @@ yyreduce:
break;
case 545:
#line 62
8
7 "Gmsh.y"
#line 62
9
7 "Gmsh.y"
{
std::string tmp = SplitFileName((yyvsp[(3) - (4)].c))[0];
(yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char));
...
...
@@ -12912,7 +12922,7 @@ yyreduce:
break;
case 546:
#line 6
29
4 "Gmsh.y"
#line 6
30
4 "Gmsh.y"
{
std::string tmp = GetAbsolutePath((yyvsp[(3) - (4)].c));
(yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char));
...
...
@@ -12922,12 +12932,12 @@ yyreduce:
break;
case 547:
#line 63
0
1 "Gmsh.y"
#line 63
1
1 "Gmsh.y"
{ floatOptions.clear(); charOptions.clear(); ;}
break;
case 548:
#line 63
0
3 "Gmsh.y"
#line 63
1
3 "Gmsh.y"
{
std::string val((yyvsp[(3) - (6)].c));
Msg::ExchangeOnelabParameter("", val, floatOptions, charOptions);
...
...
@@ -12938,7 +12948,7 @@ yyreduce:
break;
case 549:
#line 63
1
4 "Gmsh.y"
#line 63
2
4 "Gmsh.y"
{
(yyval.l) = List_Create(20,20,sizeof(char*));
List_Add((yyval.l), &((yyvsp[(1) - (1)].c)));
...
...
@@ -12946,12 +12956,12 @@ yyreduce:
break;
case 550:
#line 63
1
9 "Gmsh.y"
#line 63
2
9 "Gmsh.y"
{ List_Add((yyval.l), &((yyvsp[(3) - (3)].c))); ;}
break;
case 551:
#line 63
2
5 "Gmsh.y"
#line 63
3
5 "Gmsh.y"
{
char tmpstr[256];
sprintf(tmpstr, "_%d", (int)(yyvsp[(4) - (5)].d));
...
...
@@ -12962,7 +12972,7 @@ yyreduce:
break;
case 552:
#line 63
3
4 "Gmsh.y"
#line 63
4
4 "Gmsh.y"
{
char tmpstr[256];
sprintf(tmpstr, "_%d", (int)(yyvsp[(4) - (5)].d));
...
...
@@ -12973,23 +12983,23 @@ yyreduce:
break;
case 553:
#line 63
4
7 "Gmsh.y"
#line 63
5
7 "Gmsh.y"
{ (yyval.c) = (yyvsp[(1) - (1)].c); ;}
break;
case 554:
#line 63
5
0 "Gmsh.y"
#line 63
6
0 "Gmsh.y"
{ (yyval.c) = (yyvsp[(1) - (1)].c); ;}
break;
case 555:
#line 63
5
4 "Gmsh.y"
#line 63
6
4 "Gmsh.y"
{ (yyval.c) = (yyvsp[(3) - (4)].c); ;}
break;
/* Line 1267 of yacc.c. */
#line 1
299
3 "Gmsh.tab.cpp"
#line 1
300
3 "Gmsh.tab.cpp"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
...
...
@@ -13203,7 +13213,7 @@ yyreturn:
}
#line 63
5
7 "Gmsh.y"
#line 63
6
7 "Gmsh.y"
void assignVariable(const std::string &name, int index, int assignType,
...
...
@@ -13460,9 +13470,11 @@ void addPeriodicFace(int iTarget, int iSource,
else{
GFace *target = GModel::current()->getFaceByTag(abs(iTarget));
GFace *source = GModel::current()->getFaceByTag(abs(iSource));
if (!target) Msg::Error("Could not find edge %d for periodic copy from %d",
iTarget,iSource);
target->setMeshMaster(source, affineTransform);
if (!target || !source) {
Msg::Error("Could not find edge slave %d or master %d for periodic copy",
iTarget, iSource);
}
else target->setMeshMaster(source, affineTransform);
}
}
...
...
@@ -13487,10 +13499,11 @@ void addPeriodicFace(int iTarget, int iSource,
else{
GFace *target = GModel::current()->getFaceByTag(abs(iTarget));
GFace *source = GModel::current()->getFaceByTag(abs(iSource));
if (!target || !source)
Msg::Error("Could not find surface
%d o
r %d for periodic copy",
if (!target || !source)
{
Msg::Error("Could not find surface
slave %d or maste
r %d for periodic copy",
iTarget,iSource);
target->setMeshMaster(source, edgeCounterparts);
}
else target->setMeshMaster(source, edgeCounterparts);
}
}
...
...
This diff is collapsed.
Click to expand it.
Parser/Gmsh.y
+
26
−
16
View file @
00dcd045
...
...
@@ -5239,8 +5239,10 @@ FExpr_Single :
yymsg(0, "Uninitialized variable '%s'", $1);
$$ = 0.;
}
else
$$ = (s.value[0] += $2);
else{
$$ = s.value[0];
s.value[0] += $2;
}
}
Free($1);
}
...
...
@@ -5257,8 +5259,10 @@ FExpr_Single :
yymsg(0, "Uninitialized variable '%s[%d]'", $1, index);
$$ = 0.;
}
else
$$ = (s.value[index] += $5);
else{
$$ = s.value[index];
s.value[index] += $5;
}
}
Free($1);
}
...
...
@@ -5275,8 +5279,10 @@ FExpr_Single :
yymsg(0, "Uninitialized variable '%s[%d]'", $1, index);
$$ = 0.;
}
else
$$ = (s.value[index] += $5);
else{
$$ = s.value[index];
s.value[index] += $5;
}
}
Free($1);
}
...
...
@@ -5293,8 +5299,10 @@ FExpr_Single :
yymsg(0, "Uninitialized variable '%s[%d]'", $1, index);
$$ = 0.;
}
else
$$ = (s.value[index] += $5);
else{
$$ = s.value[index];
s.value[index] += $5;
}
}
Free($1);
}
...
...
@@ -5311,8 +5319,10 @@ FExpr_Single :
yymsg(0, "Uninitialized variable '%s[%d]'", $1, index);
$$ = 0.;
}
else
$$ = (s.value[index] += $5);
else{
$$ = s.value[index];
s.value[index] += $5;
}
}
Free($1);
}
...
...
@@ -6610,11 +6620,11 @@ void addPeriodicFace(int iTarget, int iSource,
else{
GFace *target = GModel::current()->getFaceByTag(abs(iTarget));
GFace *source = GModel::current()->getFaceByTag(abs(iSource));
if (!target || !
master
) {
Msg::Error("Could not find edge slave %d or master %d for periodic copy",
iTarget,iSource);
}
else target->setMeshMaster(source, affineTransform);
if (!target || !
source
) {
Msg::Error("Could not find edge slave %d or master %d for periodic copy",
iTarget,
iSource);
}
else target->setMeshMaster(source, affineTransform);
}
}
...
...
@@ -6628,7 +6638,7 @@ void addPeriodicFace(int iTarget, int iSource,
for (; sIter != edgeCounterparts.end(); ++sIter) {
Msg::Info("%d - %d", sIter->first, sIter->second);
}
if (target) {
GEO_Internals::MasterFace& mf =
GModel::current()->getGEOInternals()->periodicFaces[iTarget];
...
...
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