cvs: pear /CodeGen_PECL/PECL/Tools ProtoParser.y
| From: | Hartmut Holzgraefe | Date: | Wed, 18 Oct 2006 00:19:28 +0000 |
| Subject: | cvs: pear /CodeGen_PECL/PECL/Tools ProtoParser.y | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42611@lists.php.net to get a copy of this message | ||
hholzgra Wed Oct 18 00:19:28 2006 UTC
Modified files:
/pear/CodeGen_PECL/PECL/Tools ProtoParser.y
Log:
WS
http://cvs.php.net/viewvc.cgi/pear/CodeGen_PECL/PECL/Tools/ProtoParser.y?r1=1.4&r2=1.5&diff_format=u
Index: pear/CodeGen_PECL/PECL/Tools/ProtoParser.y
diff -u pear/CodeGen_PECL/PECL/Tools/ProtoParser.y:1.4
pear/CodeGen_PECL/PECL/Tools/ProtoParser.y:1.5
--- pear/CodeGen_PECL/PECL/Tools/ProtoParser.y:1.4 Mon Oct 16 21:29:12 2006
+++ pear/CodeGen_PECL/PECL/Tools/ProtoParser.y Wed Oct 18 00:19:28 2006
@@ -6,17 +6,17 @@
function __construct(CodeGen_PECL_Extension $extension, CodeGen_PECL_Element_Function $function)
{
- $this->extension = $extension;
- $this->function = $function;
+ $this->extension = $extension;
+ $this->function = $function;
}
}
%syntax_error {
$expect = array();
foreach ($this->yy_get_expected_tokens($yymajor) as $token) {
- $expect[] = self::$yyTokenName[$token];
+ $expect[] = self::$yyTokenName[$token];
}
throw new Exception('Unexpected ' . $this->tokenName($yymajor) . '(' .
$TOKEN
- . '), expected one of: ' . implode(',', $expect));
+ . '), expected one of: ' . implode(',', $expect));
}
proto_line ::= proto.
@@ -27,8 +27,8 @@
$this->function->setName(B);
}
-rettype(A) ::= VOID. { A = array("type" => "void"); }
-rettype(A) ::= typespec(B). { A = B; }
+rettype(A) ::= VOID. { A = array("type" => "void"); }
+rettype(A) ::= typespec(B). { A = B; }
typespec(A) ::= typename(B). { A = B; }
typespec(A) ::= typename(B) AMPERSAND. { A = B; A["byRef"] = true; }
@@ -38,7 +38,7 @@
typename(A) ::= FLOAT. { A = array("type" => "float"); }
typename(A) ::= STRING. { A = array("type" => "string"); }
typename(A) ::= ARRAY_. { A = array("type" => "array"); }
-typename(A) ::= CLASS_ NAME(B). { A = array("type" => "object",
"subtype" => B); }
+typename(A) ::= CLASS_ NAME(B). { A = array("type" => "object",
"subtype" => B); }
typename(A) ::= RESOURCE NAME(B). { A = array("type" => "resource",
"subtype" => B); }
typename(A) ::= MIXED. { A = array("type" => "mixed"); }
typename(A) ::= CALLBACK. { A = array("type" => "callback"); }
@@ -53,7 +53,7 @@
P["optional"] = true;
$this->function->addParam(P);
}
- param_spec ::= ELLIPSE. { $this->function->setVarargs(true); }
+param_spec ::= ELLIPSE. { $this->function->setVarargs(true); }
param_spec ::= VOID.
param_spec ::= .
@@ -82,14 +82,14 @@
}
param(P) ::= typespec(A) NAME(B) EQ default(C). {
P = A;
- P["name"] = B;
- P["default"] = C;
+ P["name"] = B;
+ P["default"] = C;
P["optional"] = true;
}
-default(A) ::= TRUE_. { A = "true"; }
-default(A) ::= FALSE_. { A = "false"; }
-default(A) ::= NULL_. { A = "null"; }
+default(A) ::= TRUE_. { A = "true"; }
+default(A) ::= FALSE_. { A = "false"; }
+default(A) ::= NULL_. { A = "null"; }
default(A) ::= NUMVAL(B). { A = B; }
default(A) ::= STRVAL(B). { A = '"'.B.'"'; }
default(A) ::= ARRAY_ PAR_OPEN PAR_CLOSE. { A = "array()"; }