Skip to content

Commit cee0a93

Browse files
authored
Merge pull request #1759 from brianmckenna/CES_FCN
parse projection functions
2 parents 03eeea5 + c0c56b1 commit cee0a93

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

libdap2/constraints.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ qualifyprojectionnames(DCEprojection* proj)
114114
NCerror ncstat = NC_NOERR;
115115
NClist* fullpath = nclistnew();
116116

117+
if (proj->discrim == CES_VAR) {
117118
ASSERT((proj->discrim == CES_VAR
118119
&& proj->var->annotation != NULL
119120
&& ((CDFnode*)proj->var->annotation)->ocnode != NULL));
@@ -129,6 +130,7 @@ fprintf(stderr,"qualify: %s -> ",
129130
fprintf(stderr,"%s\n",
130131
dumpprojection(proj));
131132
#endif
133+
}
132134
nclistfree(fullpath);
133135
return ncstat;
134136
}
@@ -138,6 +140,7 @@ static NCerror
138140
qualifyprojectionsizes(DCEprojection* proj)
139141
{
140142
size_t i,j;
143+
if (proj->discrim == CES_VAR) {
141144
ASSERT(proj->discrim == CES_VAR);
142145
#ifdef DEBUG
143146
fprintf(stderr,"qualifyprojectionsizes.before: %s\n",
@@ -168,6 +171,7 @@ fprintf(stderr,"qualifyprojectionsizes.before: %s\n",
168171
fprintf(stderr,"qualifyprojectionsizes.after: %s\n",
169172
dumpprojection(proj));
170173
#endif
174+
}
171175
return NC_NOERR;
172176
}
173177

libdap2/dce.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ projection:
5858
segmentlist
5959
{$$=projection(parsestate,$1);}
6060
| function
61-
{$$=$1;}
61+
{$$=projection(parsestate,$1);}
6262
;
6363

6464
function:

libdap2/dcetab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
13051305

13061306
case 13:
13071307
#line 61 "dce.y" /* yacc.c:1646 */
1308-
{(yyval)=(yyvsp[0]);}
1308+
{(yyval)=projection(parsestate,(yyvsp[0]));}
13091309
#line 1310 "dcetab.c" /* yacc.c:1646 */
13101310
break;
13111311

0 commit comments

Comments
 (0)