正在加载图片...
CFG-Terminology L(G)is the language ofG (the language generated by G)which is a set of sentences. A sentence ofL(G)is a string of terminal symbols of G. If S is the start symbol of G then o is a sentence ofL(G)iff S where o is a string of terminals of G. If G is a context-free grammar,L(G)is a context-free language. Two grammars are equivalent if they produce the same language. ·S0 If a contains non-terminals,it is called as a sentential form of G. If a does not contain non-terminals,it is called as a sentence of G. CS308 Compiler Theory 7CFG - Terminology • L(G) is the language of G (the language generated by G) which is a set o f sentences. • A sentence of L(G) is a string of terminal symbols of G. • If S is the start symbol of G then ω is a sentence of L(G) iff S ⇒ ω where ω is a string of terminals of G. + • If G is a context-free grammar, L(G) is a context-free language. • Two grammars are Two grammars are equivalent equivalent if they produce the same language if they produce the same language. • S ⇒ α If t i t i l it i ll d i l f fG * • S ⇒ α - If α con t ains non￾terminals, it is call e d as a sententia l form o f G. - If α does not contain non-terminals, it is called as a sentence of G. CS308 Compiler Theory 7
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有