[php-langspec][Issue #248] - primary-expression and assignment-expression not being used

From: Date: Wed, 03 Feb 2021 12:52:31 +0000
Subject: [php-langspec][Issue #248] - primary-expression and assignment-expression not being used
Groups: php.standards 
Request: Send a blank email to [email protected] to get a copy of this message
You can view the Issue on github:
https://github.com/php/php-langspec/issues/248

Opened By: dende
Issue Description:
It might be, that I'm missing something, because formal language definition is somewhat new to
me, but right now it seems to me, that a
[statement](https://github.com/php/php-langspec/blob/master/spec/19-grammar.md#grammar-statement) 
can never generate a simple expression like $v = 1.

A [statement](https://github.com/php/php-langspec/blob/master/spec/19-grammar.md#grammar-statement)
can generate an [expression
statement](https://github.com/php/php-langspec/blob/master/spec/19-grammar.md#grammar-expression-statement),
which can generate an
[expression](https://github.com/php/php-langspec/blob/master/spec/19-grammar.md#grammar-expression).

<pre>
<i id="grammar-expression-statement">expression-statement:</i>
   <i><a
href="#grammar-expression">expression</a></i><sub>opt</sub>   ;
</pre>


But I can't find any way to generate a
[primary-expression](https://github.com/php/php-langspec/blob/master/spec/19-grammar.md#grammar-primary-expression)
or an
[assignment-expression](https://github.com/php/php-langspec/blob/master/spec/19-grammar.md#grammar-assignment-expression)
out of an
[expression](https://github.com/php/php-langspec/blob/master/spec/19-grammar.md#grammar-expression).
When searching the repository for the terms, I can only find their definitions, not any usages of
them: [repository search for
'primary-expression'](https://github.com/php/php-langspec/search?q=primary-expression)

What am I missing here?


Thread (1 message)

« previous php.standards (#1513) next »