Summary: | ASTERISK-01531: ast_expr.y: another update | ||
Reporter: | Steve Murphy (murf) | Labels: | |
Date Opened: | 2004-05-03 21:21:50 | Date Closed: | 2008-01-15 14:53:34.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) ast_expr.y.patch2 ( 1) ast_expr.y.patch3 | |
Description: | Got a complaint that previous working code exten => _XX.,1,GotoIf($["${calledid}" != ""]?3) No longer works. Why? because my previous upgrade in ast_expr.y stripped the opening and closing double quotes from the token string passed back to the parser. This is a fairly fine point of the parser, and for the sake of backward compatibility, I added code to leave those quotes alone. Now the code from the wiki to detect null strings: exten => _XX.,1,GotoIf($[foo${calledid} != foo]?3) will also work. AS LONG AS THERE ARE NO SPACES IN THE VARIABLE VALUE! (of course). Apply the ast_expr.y.patch2 to the current CVS. | ||
Comments: | By: Mark Spencer (markster) 2004-05-03 21:37:03 Added to CVS. Thanks, murf! By: kenneth (kenneth) 2004-05-03 21:52:04 Hi murf, I think "things" are now broken more than that. This line from my extensions.conf used to work until this weekend's CVS update: exten => *66,5,GotoIf($[${LEN(${temp})} = 0]?21:6) But now gets this error: May 3 19:01:52 WARNING[-1231217744]: ast_expr.y:431 ast_yyerror: ast_yyerror(): syntax error: parse error; Input: 0 = 0 ^^^^^ ^ I've upgrade bison to 1.875 and recompiled everything and still get this error. I've tested on RedHat 9 and Fedora Core 1. But if I change it to: exten => *66,5,GotoIf($["${LEN(${temp})}" = "0"]?21:6) then everything seems to work. edited on: 05-03-04 21:28 By: Steve Murphy (murf) 2004-05-03 22:28:45 I one last bug filed here, and a response, now! By: Steve Murphy (murf) 2004-05-03 22:47:13 I reproduced Kenneth's problem, and found it was caused by a lack of spaces after the expression, before the closing \]. now, that IS a bug. I guess I missed that particular regression test. Sorry. Apply patch3 to the current CVS (which now contains the patch2!). By: Mark Spencer (markster) 2004-05-03 23:15:41 Fixed in CVS By: Digium Subversion (svnbot) 2008-01-15 14:53:32.000-0600 Repository: asterisk Revision: 2881 U trunk/ast_expr.y ------------------------------------------------------------------------ r2881 | markster | 2008-01-15 14:53:32 -0600 (Tue, 15 Jan 2008) | 2 lines Update for backwards compatability (bug ASTERISK-1531) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=2881 By: Digium Subversion (svnbot) 2008-01-15 14:53:34.000-0600 Repository: asterisk Revision: 2883 U trunk/ast_expr.y ------------------------------------------------------------------------ r2883 | markster | 2008-01-15 14:53:33 -0600 (Tue, 15 Jan 2008) | 2 lines More expression fixes (bug ASTERISK-1531 again) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=2883 |