com php-langspec: Fix cast/suppression precedence: spec/10-expressions.md spec/19-grammar.md
| From: | Nikita Popov | Date: | Tue, 19 Sep 2017 07:35:19 +0000 |
| Subject: | com php-langspec: Fix cast/suppression precedence: spec/10-expressions.md spec/19-grammar.md | ||
| Groups: | php.standards.cvs | ||
| Request: | Send a blank email to standards--cvs+get-394@lists.php.net to get a copy of this message | ||
Commit: b7f82175abd71600c3a825e642d57ddef6b5b826
Author: Nikita Popov <nikic@php.net> Tue, 19 Sep 2017 09:35:19 +0200
Parents: 714f68927038ece7e8f5f0a2bbce04a8c600eb25
Branches: master
Link: http://git.php.net/?p=php-langspec.git;a=commitdiff;h=b7f82175abd71600c3a825e642d57ddef6b5b826
Log:
Fix cast/suppression precedence
Changed paths:
M spec/10-expressions.md
M spec/19-grammar.md
Diff:
diff --git a/spec/10-expressions.md b/spec/10-expressions.md
index f854436..df75563 100644
--- a/spec/10-expressions.md
+++ b/spec/10-expressions.md
@@ -2079,18 +2079,18 @@ $s = "\x86\x97"; $s = ~$s; // $s is "yh"
<!-- GRAMMAR
error-control-expression:
- '@' expression
+ '@' unary-expression
-->
<pre>
<i id="grammar-error-control-expression">error-control-expression:</i>
- @ <i><a href="#grammar-expression">expression</a></i>
+ @ <i><a
href="#grammar-unary-expression">unary-expression</a></i>
</pre>
**Semantics**
Operator
@ suppresses the reporting of any error messages generated by the evaluation
of
-*expression*.
+*unary-expression*.
If a custom error-handler has been established using the library
function [set_error_handler](http://php.net/manual/function.set-error-handler.php),
that handler is
@@ -2174,7 +2174,7 @@ $result = $d {$f}; // result is the output of command dir
*.*
<!-- GRAMMAR
cast-expression:
- '(' cast-type ')' expression
+ '(' cast-type ')' unary-expression
cast-type: one of
'array' 'binary' 'bool' 'boolean' 'double'
'int' 'integer' 'float' 'object'
@@ -2183,7 +2183,7 @@ cast-type: one of
<pre>
<i id="grammar-cast-expression">cast-expression:</i>
- ( <i><a href="#grammar-cast-type">cast-type</a></i> )
<i><a href="#grammar-expression">expression</a></i>
+ ( <i><a href="#grammar-cast-type">cast-type</a></i> )
<i><a href="#grammar-unary-expression">unary-expression</a></i>
<i id="grammar-cast-type">cast-type: one of</i>
array binary bool boolean double int integer float object
diff --git a/spec/19-grammar.md b/spec/19-grammar.md
index 06fcb02..33cbe7b 100644
--- a/spec/19-grammar.md
+++ b/spec/19-grammar.md
@@ -586,13 +586,13 @@ The grammar notation is described in [Grammars
section](09-lexical-structure.md#
+ - ~
<i id="grammar-error-control-expression">error-control-expression:</i>
- @ <i><a href="#grammar-expression">expression</a></i>
+ @ <i><a
href="#grammar-unary-expression">unary-expression</a></i>
<i id="grammar-shell-command-expression">shell-command-expression:</i>
<i><a
href="#grammar-dq-char-sequence">dq-char-sequence</a></i><sub>opt</sub>
<i id="grammar-cast-expression">cast-expression:</i>
- ( <i><a href="#grammar-cast-type">cast-type</a></i> )
<i><a href="#grammar-expression">expression</a></i>
+ ( <i><a href="#grammar-cast-type">cast-type</a></i> )
<i><a href="#grammar-unary-expression">unary-expression</a></i>
<i id="grammar-cast-type">cast-type: one of</i>
array binary bool boolean double int integer float object