Transcription of What is BNF - UMSL
{{id}} {{{paragraph}}}
What is BNF ? Backus-Naur notation (shortly BNF) is a formal mathematical way to describe a language, (to describe the syntax of the programming languages). The Backus-Naur Form is a way of defining syntax. It consists of a set of terminal symbols a set of non- terminal symbols a set of production rules of the form Left-Hand-Side ::= Right-Hand-Side where the LHS is a non- terminal symbol and the RHS is a sequence of symbols (terminals or non-terminals). The meaning of the production rule is that the non- terminal on the left hand side may be replaced by the expression on the right hand side. Any sentence which is derived using the production rules is said to be syntactically correct. It is possible to check the syntax of a sentence by building a parse tree to show how the sentence is derived from the production rules. If it is not possible to build such a tree then the sentence has syntax errors. Syntax rules define how to produce well-formed sentences.
where the LHS is a non-terminal symbol and the RHS is a sequence of symbols (terminals or non-terminals). ... (EBNF, of course) solves this problem by adding new three operators: • ? : which means that the symbol (or group of symbols in parenthesis) to the left of the operator is optional (it can appear
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}