diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-31 00:02:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-31 00:02:26 +0000 |
commit | 19fc9fd9a26973d87fad437ce549ffaba479df54 (patch) | |
tree | f40a9d2592b3cf827970c8bf54a1eebf9cc8f9c0 /Build/source/utils/asymptote/camp.y | |
parent | 24b3bac312553b2cc61e94fda581aba311967f5c (diff) |
asy 2.16 sources
git-svn-id: svn://tug.org/texlive/trunk@26734 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/camp.y')
-rw-r--r-- | Build/source/utils/asymptote/camp.y | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Build/source/utils/asymptote/camp.y b/Build/source/utils/asymptote/camp.y index 26d5a834e2a..33691100edb 100644 --- a/Build/source/utils/asymptote/camp.y +++ b/Build/source/utils/asymptote/camp.y @@ -169,7 +169,7 @@ using mem::string; %type <e> tension controls %type <se> dir %type <elist> dimexps -%type <alist> arglist +%type <alist> arglist tuple %type <s> stm stmexp blockstm %type <run> forinit %type <sel> forupdate stmexplist @@ -452,6 +452,12 @@ arglist: { $$ = $1; $$->addRest($3); } ; +/* A list of two or more expressions, separated by commas. */ +tuple: + exp ',' exp { $$ = new arglist(); $$->add($1); $$->add($3); } +| tuple ',' exp { $$ = $1; $$->add($3); } +; + exp: name { $$ = new nameExp($1->getPos(), $1); } | value { $$ = $1; } @@ -514,13 +520,7 @@ exp: | exp '?' exp ':' exp { $$ = new conditionalExp($2, $1, $3, $5); } | exp ASSIGN exp { $$ = new assignExp($2, $1, $3); } -// Camp stuff -| '(' exp ',' exp ')' - { $$ = new pairExp($1, $2, $4); } -| '(' exp ',' exp ',' exp ')' - { $$ = new tripleExp($1, $2, $4, $6); } -| '(' exp ',' exp ',' exp ',' exp ',' exp ',' exp ')' - { $$ = new transformExp($1, $2, $4, $6, $8, $10, $12); } +| '(' tuple ')' { $$ = new callExp($1, new nameExp($1, SYM_TUPLE), $2); } | exp join exp %prec JOIN_PREC { $2->pushFront($1); $2->pushBack($3); $$ = $2; } | exp dir %prec DIRTAG |