cvs: pear /SQL_Parser Parser.php
| From: | Brent Cook | Date: | Wed, 06 Apr 2005 05:05:33 +0000 |
| Subject: | cvs: pear /SQL_Parser Parser.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-30969@lists.php.net to get a copy of this message | ||
busterb Wed Apr 6 01:05:33 2005 EDT
Modified files:
/pear/SQL_Parser Parser.php
Log:
Treat parameter-less functions as functions (fix bug 4066)
http://cvs.php.net/diff.php/pear/SQL_Parser/Parser.php?r1=1.29&r2=1.30&ty=u
Index: pear/SQL_Parser/Parser.php
diff -u pear/SQL_Parser/Parser.php:1.29 pear/SQL_Parser/Parser.php:1.30
--- pear/SQL_Parser/Parser.php:1.29 Wed Apr 6 00:58:02 2005
+++ pear/SQL_Parser/Parser.php Wed Apr 6 01:05:32 2005
@@ -23,7 +23,7 @@
// | John Griffin <jgriffin316@netscape.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Parser.php,v 1.29 2005/04/06 04:58:02 busterb Exp $
+// $Id: Parser.php,v 1.30 2005/04/06 05:05:32 busterb Exp $
//
require_once 'PEAR.php';
@@ -473,7 +473,8 @@
while (1) {
// parse field identifier
$this->getTok();
- if ($this->token == 'ident') {
+ // In this context, field names can be reserved words or function names
+ if ($this->token == 'ident' || $this->isFunc() ||
$this->isReserved()) {
$name = $this->lexer->tokText;
} elseif ($this->token == ')') {
return $fields;