Anonymous user
BNF Grammar: Difference between revisions
m
→Pascal: move to pacsal page
(added Haskell) |
m (→Pascal: move to pacsal page) |
||
(9 intermediate revisions by 7 users not shown) | |||
Line 1:
{{
In computer science, Backus–Naur Form (BNF) is a metasyntax used to express context-free grammars: that is, a formal way to describe formal languages. John Backus and Peter Naur developed a context free grammar to define the syntax of a programming language by using two sets of rules: i.e., lexical rules and syntactic rules.
Line 6:
There are many extensions and variants of BNF, including Extended and Augmented Backus–Naur Forms (EBNF and ABNF).
'''This is a deprecated task. Please move these grammars to the language's category page, or somewhere else.'''
==
<div style="height:30ex;overflow:scroll"><pre>
! -----------------------------------------------------------------------
Line 179 ⟶ 174:
| Real
</pre></div>
==
<div style="height:30ex;overflow:scroll"><pre>
! -----------------------------------------------------------------------
Line 386 ⟶ 381:
</pre></div>
==
Code ::= Command Code | <NONE>
Command ::= "+" | "-" | "<" | ">" | "," | "." | "[" Code "]" | <ANY>
==[[:Category:PARI/GP|PARI/GP]]==
[http://pari.math.u-bordeaux.fr/cgi-bin/viewcvs.cgi/trunk/src/language/parse.y?view=markup&revision=12950&root=pari parse.y] contains a grammar for GP. The grammar for PARI is that of [http://c.comsci.us/syntax/ C].
==[[:Category:PowerShell|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.
Line 507 ⟶ 397:
<lang powershell>for (;;) {}</lang>
==[[:Category:VBScript|VBScript]]==
<div style="height:30ex;overflow:scroll"><pre>
!===============================
Line 1,268 ⟶ 1,141:
</pre></div>
==
The following link (Appedix B) has a simple BNF Syntax [http://laser.physics.sunysb.edu/~amol/papers/mollypaper.pdf VB Syntax]
<div style="height:30ex;overflow:scroll"><pre>
|