From 19fc9fd9a26973d87fad437ce549ffaba479df54 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 31 May 2012 00:02:26 +0000 Subject: asy 2.16 sources git-svn-id: svn://tug.org/texlive/trunk@26734 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/utils/asymptote/camp.y | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Build/source/utils/asymptote/camp.y') 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 tension controls %type dir %type dimexps -%type arglist +%type arglist tuple %type stm stmexp blockstm %type forinit %type 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 -- cgit v1.2.3