summaryrefslogtreecommitdiff
path: root/Zend/zend_language_parser.y
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2004-02-11 22:13:39 +0000
committerMarcus Boerger <helly@php.net>2004-02-11 22:13:39 +0000
commitc6cbafa273e69cbc7c2c2a2f6f53f5d15c815ab9 (patch)
tree75b373155e535d0a532e323848b1f22fd6ab4b6a /Zend/zend_language_parser.y
parente9e1494a59cfcceb0bccb78eb576ab698339332c (diff)
downloadphp-git-c6cbafa273e69cbc7c2c2a2f6f53f5d15c815ab9.tar.gz
Fix: <interface> [extends <interface> [, <ineterface>]* ]
Diffstat (limited to 'Zend/zend_language_parser.y')
-rw-r--r--Zend/zend_language_parser.y16
1 files changed, 15 insertions, 1 deletions
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index d127af4297..3fdfb44fba 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -274,6 +274,12 @@ unticked_class_declaration_statement:
'{'
class_statement_list
'}' { zend_do_end_class_declaration(&$1, &$2 TSRMLS_CC); }
+ | interface_entry T_STRING
+ { zend_do_begin_class_declaration(&$1, &$2, NULL TSRMLS_CC); }
+ interface_extends_list
+ '{'
+ class_statement_list
+ '}' { zend_do_end_class_declaration(&$1, &$2 TSRMLS_CC); }
;
@@ -281,7 +287,6 @@ class_entry_type:
T_CLASS { $$.u.constant.value.lval = 0; }
| T_ABSTRACT T_CLASS { $$.u.constant.value.lval = ZEND_ACC_ABSTRACT_CLASS; }
| T_FINAL T_CLASS { $$.u.constant.value.lval = ZEND_ACC_FINAL_CLASS; }
- | T_INTERFACE { $$.u.constant.value.lval = ZEND_ACC_INTERFACE; }
;
extends_from:
@@ -289,6 +294,15 @@ extends_from:
| T_EXTENDS fully_qualified_class_name { $$ = $2; }
;
+interface_entry:
+ T_INTERFACE { $$.u.constant.value.lval = ZEND_ACC_INTERFACE; }
+;
+
+interface_extends_list:
+ /* empty */
+ | T_EXTENDS interface_list
+;
+
implements_list:
/* empty */
| T_IMPLEMENTS interface_list