Formal Languages and Translators: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 35: Line 35:
=Syntax Tree=
=Syntax Tree=


=<span id='Parser_Generators'><span id='Formal_Grammar'></span>Parsing=
=<span id='Parser_Generators'></span><span id='Formal_Grammars'></span><span id=''></span><span id=''></span><span id=''></span><span id=''></span><span id=''></span><span id=''></span><span id=''></span><span id=''></span>Parsing=


{{Internal|Parsing#Overview|Parsing}}
{{Internal|Parsing#Overview|Parsing}}

Revision as of 19:46, 13 June 2018

Internal

Formal Grammars

https://en.wikipedia.org/wiki/Formal_grammar

A set of production rules that describe all possible strings in a given formal language. The rules describe how to form strings from the language's alphabet that are valid according to the language syntax. The grammar does not describe the meaning of strings, or what can be done with them in whatever context, only their form.

Context-Free Grammar

A context-free grammar is a grammar in which the left-hand side of each production rule consists of only a single nonterminal symbol. A popular notation for context-free grammar is Backus-Naur (BNF).

Backus-Naur Form BNF

https://en.wikipedia.org/wiki/Backus–Naur_form

Backus-Naur form is notation technique for context-free grammars that is used to describe the syntax of languages used in computing.

A BNF specification is a set of derivation rules, written as:

<symbol> ::= expression

where <symbol> is a nonterminal, and expression consists of one or more sequence of symbols. The expression may contain vertical bars '|' indicating a choice. Symbols that. never appear on the left side are terminals. The ::= means that the symbol on the left must be replaced with the expression on the right.

Extended Backus-Naur form EBNF

https://en.wikipedia.org/wiki/Extended_Backus–Naur_form

EBNF Variant that Used to Define the XML Grammar

EBNF Variant that Used to Define the XML Grammar

Syntax Tree

Parsing

Parsing