From 4b9eca2b38b2380944364010648f0c1c1e14ab44 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 8 Jan 2012 18:22:07 +0000 Subject: [PATCH] bug fix, broken vdb() vph() --- ChangeLog | 26 ++++++++++++++++++++++++++ src/frontend/parse-bison.y | 14 +------------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7732c52f1..8ac14170a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2012-01-08 Robert Larice + * src/frontend/parse-bison.y : + bug fix, broken vdb() vph() + + see + plot vdb(1) vr(2) vi(3) vm(4) vp(5) no works - ID: 3470791 + http://sourceforge.net/tracker/?func=detail&atid=423915&group_id=38962&aid=3470791 + + revert: + 2011-08-20 Robert Larice + the i() and v() function application have special semantics + + which was meant to fix a problem, when loading a rawfile and trying + to access a vector with name "i(vdd)" + yet broke the internal user defined functions + vdb(x) --> db(v(x)) + ... + + in short + load file + plot i(vdd) + won't work. but + load file + plot "i(vdd)" + will work + 2012-01-08 Robert Larice * src/frontend/numparam/xpressn.c , * src/maths/poly/polyfit.c : diff --git a/src/frontend/parse-bison.y b/src/frontend/parse-bison.y index a997314b2..d7d5e52f4 100644 --- a/src/frontend/parse-bison.y +++ b/src/frontend/parse-bison.y @@ -78,7 +78,7 @@ * manifests my expectation, and will issue a `warning' when not met */ -%expect 3 +%expect 2 %token TOK_NUM %token TOK_STR @@ -147,18 +147,6 @@ exp: | '-' exp %prec NEG { $$ = mkunode(PT_OP_UMINUS, $2); } | '~' exp { $$ = mkunode(PT_OP_NOT, $2); } - | TOK_STR '(' TOK_STR ')' { - char c = tolower($1[0]); - if((c == 'i' || c == 'v') && $1[1] == '\0') { - char buf[BSIZE_SP]; - sprintf(buf, "%s(%s)", $1, $3); - $$ = mksnode(buf); - } else { - $$ = mkfnode($1, mksnode($3)); - } - if(!$$) YYABORT; - } - | TOK_STR '(' exp ')' { $$ = mkfnode($1, $3); if(!$$) YYABORT; } | exp '=' exp { $$ = mkbnode(PT_OP_EQ, $1, $3); }