Hello Andrey, Saturday, July 19, 2003, 9:07:11 PM, you wrote:
AH> Hi, AH> today I saw that the new SQLite extension throws exceptions. AH> In the current state the syntaxis of the prototypes in .c files AH> is : AH> proto return_type function_name([param_type param_name]*) AH> As we know, from v5, PHP functions may throw exceptions. AH> Therefore I propose to extend the syntaxis of function prototype AH> with suffix : AH> throws [exception_name] AH> If more than one type of exception is throwed a comma separated AH> list should be specified . AH> Example : AH> proto array func_name(int param) throws FuncNameException1, AH> FuncNameException2 AH> Comments? During doc meeting on LT we had a little discussion about protos, too. We agreed to the idea of allowing more complex protos and also multiple proto line. I have also made a small EBNF for that: Doc := Start Lines Short End Short := String End := NL Lines := Line [ Lines ] Line := Proto NL Start := "/* {{{" End := [ NL ] [ "}}}" ] "*/" Proto := Entry Return Entity [ Paramdec ] [ Throws ] Entry := "proto" | "alias" | "method" | "property" Return := "void" | RTypes [ "|" Const ] RTypes := Type [ "|" RTypes ] Const := <Value> Type := "mixed" | "bool" | "int" | "string" | "float" | "array" | "resource" | "handler" | "object" | Class Entity := Func | [ Flags ] Class "::" Method | [ Flags ] Class "::" Property Flags := Modifier [ "," Flags ] Modifier:= "static" | "final" | "public" | "protected" | "private" | "abstract" Func := <String> Class := <string> Method := <String> Property:= <String> Paramdec:= "(" [ Params ] ")" Params := Param [ "," Params ] | "[" Params "]" Param := Type [ "&" ] "$" <String> [ "=" Const ] Throws := "throws" [ Types ] Types := Type [ "," Types ] WS := <space> | <tab> NL := <cr> | <lf> | <cr> <lf> Comments: - i omitted whitespace - classes/interfaces need to be documented too Now we'd need someoen to implement it and generate output for the documentation system. The best thing would be to generate a xml file which can be included in the doc system.... -- Best regards, Marcus mailto:[EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php