[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode fa61295 41/62: More work on grammar
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode fa61295 41/62: More work on grammar |
Date: |
Tue, 20 Apr 2021 10:56:20 -0400 (EDT) |
branch: externals/phps-mode
commit fa612953e5a6e79dbdecc14ae22ae36c48b79151
Author: Christian Johansson <christian@mediastrategi.se>
Commit: Christian Johansson <christian@mediastrategi.se>
More work on grammar
---
admin/phps-mode-automation-grammar.el | 131 ++++++++++++++++++++++++++++++++++
1 file changed, 131 insertions(+)
diff --git a/admin/phps-mode-automation-grammar.el
b/admin/phps-mode-automation-grammar.el
index d3863a3..2294011 100644
--- a/admin/phps-mode-automation-grammar.el
+++ b/admin/phps-mode-automation-grammar.el
@@ -692,6 +692,137 @@
("[" array_pair_list "]")
)
+ (for_statement
+ statement
+ (":" inner_statement_list T_ENDFOR ";")
+ )
+
+ (foreach_statement
+ statement
+ (":" inner_statement_list T_ENDFOREACH ";")
+ )
+
+ (declare_statement
+ statement
+ (":" inner_statement_list T_ENDDECLARE ";")
+ )
+
+ (switch_case_list
+ ("{" case_list "}")
+ ("{" ";" case_list "}")
+ (":" case_list T_ENDSWITCH ";")
+ (":" ";" case_list T_ENDSWITCH ";")
+ )
+
+ (case_list
+ %empty
+ (case_list T_CASE expr case_separator inner_statement_list)
+ (case_list T_DEFAULT case_separator inner_statement_list)
+ )
+
+ (case_separator
+ ":"
+ ";"
+ )
+
+ (match
+ (T_MATCH "(" expr ")" "{" match_arm_list "}")
+ )
+
+ (match_arm_list
+ %empty
+ (non_empty_match_arm_list possible_comma)
+ )
+
+ (non_empty_match_arm_list
+ match_arm
+ (non_empty_match_arm_list "," match_arm)
+ )
+
+ (match_arm
+ (match_arm_cond_list possible_comma T_DOUBLE_ARROW expr)
+ (T_DEFAULT possible_comma T_DOUBLE_ARROW expr)
+ )
+
+ (match_arm_cond_list
+ expr
+ (match_arm_cond_list "," expr)
+ )
+
+ (while_statement
+ statement
+ (":" inner_statement_list T_ENDWHILE ";")
+ )
+
+ (if_stmt_without_else
+ (T_IF "(" expr ")" statement)
+ (if_stmt_without_else T_ELSEIF "(" expr ")" statement)
+ )
+
+ (if_stmt
+ (if_stmt_without_else T_NOELSE)
+ (if_stmt_without_else T_ELSE statement)
+ )
+
+ (alt_if_stmt_without_else
+ (T_IF "(" expr ")" ":" inner_statement_list)
+ (alt_if_stmt_without_else T_ELSEIF "(" expr ")" ":" inner_statement_list)
+ )
+
+ (alt_if_stmt
+ (alt_if_stmt_without_else T_ENDIF ";")
+ (alt_if_stmt_without_else T_ELSE ":" inner_statement_list T_ENDIF ";")
+ )
+
+ (parameter_list
+ (non_empty_parameter_list possible_comma)
+ %empty
+ )
+
+ (non_empty_parameter_list
+ attributed_parameter
+ (non_empty_parameter_list "," attributed_parameter)
+ )
+
+ (attributed_parameter
+ (attributes parameter)
+ parameter
+ )
+
+ (optional_visibility_modifier
+ %empty
+ T_PUBLIC
+ T_PROTECTED
+ T_PRIVATE
+ )
+
+ (parameter
+ (optional_visibility_modifier optional_type_without_static is_reference
is_variadic T_VARIABLE backup_doc_comment)
+ (is_reference is_variadic T_VARIABLE backup_doc_comment)
+ (optional_visibility_modifier optional_type_without_static is_reference
is_variadic T_VARIABLE backup_doc_comment "=" expr)
+ )
+
+ (optional_type_without_static
+ %empty
+ type_expr_without_static
+ )
+
+ (type_expr
+ type
+ ("?" type)
+ union_type
+ )
+
+ (type
+ type_without_static
+ T_STATIC
+ )
+
+ (union_type
+ (type "|" type)
+ (union_type "|" type)
+ )
+
)
"The productions of grammar.")
- [elpa] externals/phps-mode ae7a460 21/62: Added another new test for PHP 8.0 lex analysis, (continued)
- [elpa] externals/phps-mode ae7a460 21/62: Added another new test for PHP 8.0 lex analysis, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode d8ac01b 24/62: Removed verbose errors on integration-test, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode ad3e37b 28/62: Passed lexer and integration unit tests, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 08329be 30/62: Fixed support for bookkeeping of superglobals $GLOBALS and $_ENV, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 9172bf2 35/62: Improved incremental lex-analyzer, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 490826c 45/62: Implemented the YACC grammar, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode f805d35 52/62: Added global declaration, global attributes of grammar, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode a8242c8 23/62: Passed all unit tests for lexer, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode c4f1335 34/62: Updated version and modified date, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 6ffce34 42/62: More work on implementing grammar, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode fa61295 41/62: More work on grammar,
Christian Johansson <=
- [elpa] externals/phps-mode 9a9c296 44/62: More grammar implementation, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 9e291dc 47/62: Excluded admin-files from compilation, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 9011c85 32/62: Updated copyright years, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 85ed75d 46/62: More work on automated parser generation, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode aeec1d2 55/62: Removed comment, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 62e7617 61/62: Merged GitHub, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode cd3bbfd 02/62: More work on PHP 8.0 lex analyzer, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 804a42e 09/62: Most of lex analyzer implemented, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 1072b2d 14/62: Improved debugging of lex-analyzer, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 9c63f7d 16/62: Passed first old tests for lexer, Christian Johansson, 2021/04/20