cvs: pecl /PECL_Gen/Element Function.php
| From: | Hartmut Holzgraefe | Date: | Thu, 11 Nov 2004 15:10:30 +0000 |
| Subject: | cvs: pecl /PECL_Gen/Element Function.php | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-2013@lists.php.net to get a copy of this message | ||
hholzgra Thu Nov 11 10:10:30 2004 EDT
Modified files:
/pecl/PECL_Gen/Element Function.php
Log:
small change in prototype grammer, whitespace
http://cvs.php.net/diff.php/pecl/PECL_Gen/Element/Function.php?r1=1.7&r2=1.8&ty=u
Index: pecl/PECL_Gen/Element/Function.php
diff -u pecl/PECL_Gen/Element/Function.php:1.7 pecl/PECL_Gen/Element/Function.php:1.8
--- pecl/PECL_Gen/Element/Function.php:1.7 Mon Jun 14 07:47:54 2004
+++ pecl/PECL_Gen/Element/Function.php Thu Nov 11 10:10:29 2004
@@ -16,7 +16,7 @@
// | Authors: Hartmut Holzgraefe <hholzgra@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Function.php,v 1.7 2004/06/14 11:47:54 hholzgra Exp $
+// $Id: Function.php,v 1.8 2004/11/11 15:10:29 hholzgra Exp $
//
require_once "PECL/Gen/Tools/Indent.php";
@@ -183,41 +183,45 @@
the grammer for a prototype would look like this: ?
- proto: type name '(' param-list ')'
+ proto: type name '(' param-spec ')'
name: [A-Za-z_][A-Za-z0-9_]*
type: "void"
| typespec
- typespec: typename
- | typename '&'
+ typespec: typename
+ | typename '&'
- typename: bool | boolean
- | int | integer | long
- | float | double | real
- | string
- | array
- | object | object name
- | resource | resource name
- | mixed
- | callback
- | stream
-
- param-list: void
- | parameter
- | parm-list ',' parameter
+ typename: 'bool' | 'boolean'
+ | 'int' | 'integer' | 'long'
+ | 'float' | 'double' | 'real'
+ | 'string'
+ | 'array'
+ | 'object' | 'object' name
+ | 'resource' | 'resource' name
+ | 'mixed'
+ | 'callback'
+ | 'stream'
+
+ param-spec: 'void'
+ | '...'
+ | param-list
+ | param-list ',' '...'
+
+ param-list: parameter
+ | parm-list ',' parameter
- parameter: typespec name
- | typespec name '=' default-value
+ parameter: typespec name
+ | typespec name '=' default-value
- default-value: "true" | "false" | "array()"
- | numeric-value
- | string
+ default-value: "true" | "false" | "array()" |
"null"
+ | numeric-value
+ | string
- string: '"' character* '"'
+ string: '"' character* '"'
- number: ... the usual int, float, hex and octal stuff ...
+ number: ... the usual int, float, hex and octal stuff ...
*/
// 'tokenize' it