summaryrefslogtreecommitdiff
path: root/Zend/zend_language_parser.y
Commit message (Collapse)AuthorAgeFilesLines
* - Head up! I'm reverting the patch which allows for expressions in constantAndi Gutmans2003-10-281-2/+2
| | | | | | | | | - declerations. Allowing the access of other constants in this code is - flawed. We are reverting back to PHP 4's static scalars. - Don't worry if you get the following msg when compiling: - "zend_language_parser.y contains 3 useless nonterminals and 22 useless rules" - I didn't nuke the code in case we have some brilliant ideas after beta 2
* - Nuke const in function parameters. I just can't remember why this existsAndi Gutmans2003-10-191-2/+0
| | | | | - and it seems no one else remembers either. It has no semantic meaning.
* Allow foo::$bar()Zeev Suraski2003-10-091-2/+5
|
* ntroduce infrastructure for supplying information about arguments,Zeev Suraski2003-08-031-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | including: - Whether or not to pass by ref (replaces the old arg_types, with arg_info) - Argument name (for future use, maybe introspection) - Class/Interface name (for type hints) - If a class/interface name is available, whether to allow a null instance Both user and builtin functions share the same data structures. To declare a builtin function that expects its first arg to be an instance of class 'Person', its second argument as a regular arg, and its third by reference, use: ZEND_BEGIN_ARG_INFO(my_func_arg_info, 0) ZEND_ARG_OBJ_INFO(0, someone, Person, 1) ZEND_ARG_PASS_INFO(0) ZEND_ARG_PASS_INFO(1) ZEND_END_ARG_INFO(); and use my_func_arg_info as the arg_info parameter to the ZEND_FE() family of macros. The first arg to each ZEND_ARG_*() macro is whether or not to pass by ref. The boolean arg to ZEND_BEGIN_ARG_INFO() tells the engine whether to treat the arguments for which there's no explicit information as pass by reference or not. The boolean argument to ZEND_ARG_OBJ_INFO() (4th arg) is whether or not to allownull values.
* Support references in foreach()Zeev Suraski2003-07-241-4/+10
| | | | | | | Syntax: foreach ($arr as &$val) foreach ($arr as $key => &$val)
* Fix complex expressions for class names in NEWZeev Suraski2003-06-221-16/+35
|
* SimplifyZeev Suraski2003-06-221-7/+2
|
* WSMarcus Boerger2003-06-211-1/+1
|
* Add final classesMarcus Boerger2003-06-211-0/+1
|
* Fix bug #23384 - static class::constant constants should nowStanislav Malyshev2003-06-151-2/+6
| | | | | work in static & array expressions.
* updating license information in the headers.James Cox2003-06-101-1/+1
|
* Fix bogus implicit declarations of properties (squash bug #23671)Zeev Suraski2003-06-091-1/+1
|
* MEGA-patch: namespaces are R.I.P.Stanislav Malyshev2003-06-021-85/+9
|
* Fix ~ operator in class constants.Marcus Boerger2003-05-291-1/+2
|
* allow expressions within constants, so the following is possibleSterling Hughes2003-04-101-6/+36
| | | | | | | | | | | | class foo { const a = 1<<0; const b = 1<<1; const c = a | b; } this makes const a compile-time expression. all other operators are unaffected.
* Revert Harald's commitZeev Suraski2003-04-101-2/+3
|
* One line fix so that it will compileGeorge Schlossnagle2003-04-101-0/+1
|
* removing the *syntactical sugar* againHarald Radi2003-04-091-3/+1
| | | | | | # commiting that on behalf of the community :) # don't blame me, i'm just acting as a proxy
* Implement a different way to catch documentation comments.Andrei Zmievski2003-04-021-1/+1
|
* Revert portions of the doc comment patch. There should be no parserAndrei Zmievski2003-04-021-20/+7
| | | | | errors now.
* Add __NAMESPACE__ auto-constant.Stanislav Malyshev2003-04-011-0/+2
|
* Multi-purpose patch:Andrei Zmievski2003-03-311-7/+20
| | | | | | | | | | - The fields of zend_namespace were not completely initialized which led to a variety of problems. - The occurrence of class/interface/namespace definition is now captured. - Functions/classes/interfaces/namespaces can be preceded by doc comments which are stored for use by extensions.
* Since zend_do_begin_class_member_function_call assumes the previousAndrei Zmievski2003-03-301-1/+1
| | | | | opcode is FETCH_CONSTANT, swap the calls around.
* Un-nest namespaces - now namespace X { namespace Y {} } is a parse errorStanislav Malyshev2003-03-261-1/+0
| | | | | Also refine namespaced includes
* - Keep track of starting/ending line numbers for user functions.Andrei Zmievski2003-03-191-1/+1
| | | | | - Store last parsed doc comment in a compiler global for future use.
* OptimizeZeev Suraski2003-03-091-12/+5
|
* Fix handling of ::fooZeev Suraski2003-03-091-17/+20
|
* Fix parsing rules of namespaces/classesZeev Suraski2003-03-091-22/+25
|
* Add ability to use ::interface_name in implementsZeev Suraski2003-03-091-1/+2
|
* Require abstract classes to be explicitly declared 'abstract', in order toZeev Suraski2003-03-061-3/+4
| | | | | | | avoid making developers traverse the entire class/interface hierarchy before they can figure out whether a class is instantiable (ok, so it makes sense :)
* Add class type hintsZeev Suraski2003-03-061-10/+16
|
* Implement $obj::static_func()Zeev Suraski2003-03-051-1/+1
|
* Add support for interfacesZeev Suraski2003-03-051-11/+29
|
* Remove legacy codeZeev Suraski2003-03-041-2/+2
|
* Add 'final'Zeev Suraski2003-02-241-1/+2
|
* Allow namespaces to have a number of parts. I.e., now you can do:Stanislav Malyshev2003-02-201-1/+1
| | | | | | | | | | | namespace foo { function abc() {} } ... namespace foo { functio def() {} }
* Whitespace & minor renamesZeev Suraski2003-02-171-7/+7
|
* whitespaceZeev Suraski2003-02-171-2/+2
|
* add support for ::foo syntax meaning "global one"Stanislav Malyshev2003-02-161-0/+1
|
* Namespace patch. Big changes:Stanislav Malyshev2003-02-161-19/+58
| | | | | | | | | | | | | | | | 1. Nested classes are gone. 2. New syntax for namespaces: namespace foo { class X { ... } function bar { ... } var x = 1; const ZZ = 2; } 3. Namespaced symbol access: $x = new foo::X; - etc. For now, namespaces are case insensitive, just like classes. Also, there can be no global class and namespace with the same name (to avoid ambiguities in :: resolution).
* Improve parser handling of 'abstract'Zeev Suraski2003-02-111-9/+14
|
* - Treat $this->foo inside class X as an implicit 'public $foo' if X::$fooZeev Suraski2003-02-101-4/+4
| | | | | | is not explicitly declared - Forbid multiple declaration of the same variable
* - Added some missing CVS $Id$ tags, headers and footers.foobar2003-02-011-0/+9
|
* - Change "is" to "instanceof" as it explains better what the operator means.Andi Gutmans2003-01-141-4/+4
| | | | | - "is_a" was also appropriate but ugly.
* Fix writability checksZeev Suraski2003-01-091-15/+15
|
* - Allow variables to have both 'static' modifier and an access level.Zeev Suraski2002-12-091-11/+9
| | | | | | | | | NOTE: This only works at the syntax level right now (parser). It doesn't actually work as of yet - all statics are considered public for now - Prevent users from putting more restrictions on methods in derived classes (i.e., you cannot make a public method private in a derived class, etc.)
* Treat the absence of an access type just as if 'public' was suppliedZeev Suraski2002-12-081-2/+2
|
* Remove unintentional codeZeev Suraski2002-12-071-1/+1
|
* - Implement public/protected/private methods.Zeev Suraski2002-12-061-28/+38
| | | | | | - Prevent instantiation of classes with abstract methods. Based in part on Marcus's patch.
* - FN_IS_STATIC -> FN_STATICAndi Gutmans2002-11-241-1/+1
|