[PR][php-langspec][#169][master] - Fix constant-expression specification

From: Date: Fri, 11 Nov 2016 20:44:29 +0000
Subject: [PR][php-langspec][#169][master] - Fix constant-expression specification
Groups: php.standards 
Request: Send a blank email to standards-+get-1162@lists.php.net to get a copy of this message
You can view the Pull Request on github: https://github.com/php/php-langspec/pull/169 Warning: according to github, the Pull Request cannot be merged without manual conflict resolution! Pull Request Description: Previously, a constant-expression was defined as a superset of expression, and a primary-expression as a superset of constant-expression, which causes confusion when attempting to parse the grammar for a few reasons: 1. constant-expression->array-creation-expression and expression->yield-expression-> ... -> postfix-expression -> array-creation-expression, which meant that constant-expression was rendered completely redundant within the grammar. 2. primary-expression -> constant-expression -> expression, which makes determining operator precedence challenging. 3. constant-expression->expression is improperly specified as requiring a scalar type, when it could also be an array. This fix addresses all of these issues by more concretely defining the constant-expression type in 19-grammar.md, and updating the constraints defined in 10-expressions.md.

« previous php.standards (#1162) next »