Editing Grammar

Jump to: navigation, search

Please note that you are now editing the latest revision of this page, which is not the approved one shown by default.

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
RwTBET , [url=http://yvpqleondavd.com/]yvpqleondavd[/url], [link=http://jnygyamqwnas.com/]jnygyamqwnas[/link], http://fkxsqofgprrv.com/
+
Formally, a '''grammar''' is an ordered fourtuple ''G'' = (''T,N,S,P''), where ''N'' and ''T'' are finite alphabets, ''S'' is a distinguished symbol of ''N'', and ''P'' is a finite non-empty set pairs (L,R) such that ''L'' and ''R'' are in (''N U T'')* and ''G'' is called a '''Context Free Grammar''' (CFG) if ''L'' is in ''N''.  
 +
<br><br>
 +
 
 +
The symbols of ''N'' are called ''nonterminal symbols''. The symbols of ''T'' are called ''terminal symbols''. According to above definition of a grammar ''G'', the sets ''N'' and ''T'' are disjoint in every grammar. The nonterminal symbol ''S'' is called the initial symbol, axiom or root, and is used to start the derivations of the sentences of the language.
 +
<br><br>
 +
 
 +
The ordered pairs in ''P'' are called ''rewriting rules'' or ''productions'' and will be written in the form L ---> R where the symbol ---> (derives) is, of course, not in ''N U T''. Productions are used to derive new sentences from given ones by replacing a part equal to the left-hand side of a rule by the right-hand side of the same rule.
 +
<br><br>
 +
 
 +
In such a way, taking always ''S'' as the starting symbol, it is possible to derive from ''S'' and just applying productions in ''P'', a set (possibly infinite) of sentences that is called the language generated by ''G'', ''L(G)''.
 +
<br><br>
 +
 
 +
'''See following grammar example:''' [http://epl.di.uminho.pt/~gepl/LP/nLPDgrammar.pdf nLPD grammar]
 +
 
 +
[[Category: Basic Concepts]]

Please note that all contributions to eplmediawiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Eplmediawiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Personal tools
Namespaces

Variants
Actions
Navigation
extras
Toolbox