BNF Grammar: Difference between revisions

PowerShell grammar, with a caveat
(→‎{{header|Cobol}}: fix spelling)
(PowerShell grammar, with a caveat)
Line 430:
=={{header|PHP}}==
The BNF description follows, [http://php.comsci.us/syntax/statement/index.html PHP Syntax]
 
=={{header|PowerShell}}==
An annotated version of the PowerShell grammar can be found in Bruce Payette's book ''Windows PowerShell in Action''. The appendix containing the grammar is available in [http://www.manning.com/payette/AppCexcerpt.pdf PDF form] on the publisher's site.
 
This grammar does not accurately represent the PowerShell language, though, as for example the <code>for</code> loop mandates semicolons in the grammar but in practice does not require them when arguments are omitted. The infinite loop may be represented by
<lang powershell>for () {}</lang>
but the grammar would require
<lang powershell>for (;;) {}</lang>
 
=={{header|Python}}==
Anonymous user