SlideShare a Scribd company logo
1 of 129
1
Grammars
2
Grammars
Grammars express languages
Example: the English language
verbpredicate
nounarticlephrasenoun
predicatephrasenounsentence
→
→
→
_
_
3walksverb
runsverb
dognoun
boynoun
thearticle
aarticle
→
→
→
→
→
→
4
A derivation of “the boy walks”:
walksboythe
verbboythe
verbnounthe
verbnounarticle
verbphrasenoun
predicatephrasenounsentence
⇒
⇒
⇒
⇒
⇒
⇒
_
_
5
A derivation of “a dog runs”:
runsdoga
verbdoga
verbnouna
verbnounarticle
verbphrasenoun
predicatephrasenounsentence
⇒
⇒
⇒
⇒
⇒
⇒
_
_
6
Language of the grammar:
L = { “a boy runs”,
“a boy walks”,
“the boy runs”,
“the boy walks”,
“a dog runs”,
“a dog walks”,
“the dog runs”,
7
Notation
dognoun
boynoun
→
→
Variable
or
Non-terminal
TerminalProduction
rule
8
Another Example
Grammar:
Derivation of sentence :
λ→
→
S
aSbS
abaSbS ⇒⇒
ab
aSbS → λ→S
9
aabbaaSbbaSbS ⇒⇒⇒
aSbS → λ→S
aabb
λ→
→
S
aSbS
Grammar:
Derivation of sentence :
10
Other derivations:
aaabbbaaaSbbbaaSbbaSbS ⇒⇒⇒⇒
aaaabbbbaaaaSbbbb
aaaSbbbaaSbbaSbS
⇒⇒
⇒⇒⇒
11
Language of the grammar:
L = { “a boy runs”,
“a boy walks”,
“the boy runs”,
“the boy walks”,
“a dog runs”,
“a dog walks”,
“the dog runs”,
“the dog walks” }
12
Language of the grammar
λ→
→
S
aSbS
}0:{ ≥= nbaL nn
13
More Notation
Grammar
( )SPTVG ,,,=
:V
:T
:S
:P
A finiteSet of variables
A finiteSet of terminal symbols
Start variable
Set of Production rules
V and T are assumed to be disjoint
14
Example
Grammar : λ→
→
S
aSbSG
( ), , ,G V T P S=
}{SV = },{ baT =
},{ λ→→= SaSbSP
15
More Notation
Sentential Form:
A sentence that contains
variables and terminals
Example:
aaabbbaaaSbbbaaSbbaSbS ⇒⇒⇒⇒
Sentential Forms sentence
16
We write:
Instead of:
aaabbbS
*
⇒
aaabbbaaaSbbbaaSbbaSbS ⇒⇒⇒⇒
17
In general we write:
If:
nww
*
1 ⇒
nwwww ⇒⇒⇒⇒ 321
18
By default:
ww
*
⇒
19
Example
λ→
→
S
aSbS
aaabbbS
aabbS
abS
S
*
*
*
*
⇒
⇒
⇒
⇒λ
Grammar Derivations
20
baaaaaSbbbbaaSbb
aaSbbS
∗
∗
⇒
⇒
λ→
→
S
aSbS
Grammar
Example
Derivations
21
Another Grammar Example
Grammar :
λ→
→
→
A
aAbA
AbS
Derivations:
G
aabbbaaAbbbaAbbAbS
abbaAbbAbS
→→→→
→→→
22
baaaaaSbbbbaaSbb
aaSbbS
∗
∗
⇒
⇒
λ→
→
S
aSbS
Grammar
Example
Derivations
23
More Derivations
aaaabbbbbaaaaAbbbbb
aaaAbbbbaaAbbbaAbbAbS
⇒⇒
⇒⇒⇒⇒
bbaS
bbbaaaaaabbbbS
aaaabbbbbS
nn
∗
∗
∗
⇒
⇒
⇒
24
Language of a Grammar
For a grammar
with start variable :
G
S
}:{)( wSwGL
∗
⇒=
String of terminals
25
Example
For grammar :
λ→
→
→
A
aAbA
AbS
}0:{)( ≥= nbbaGL nn
Since: bbaS nn
∗
⇒
G
26
A Convenient Notation
λ→
→
A
aAbA
λ|aAbA →
thearticle
aarticle
→
→
theaarticle |→
27
Linear Grammars
28
Linear Grammars
Grammars with
at most one variable at the right side
of a production
Examples:
λ→
→
→
A
aAbA
AbS
λ→
→
S
aSbS
29
A Non-Linear Grammar
bSaS
aSbS
S
SSS
→
→
→
→
λ
Grammar :G
)}()(:{)( wnwnwGL ba ==
Number of in stringa w
Why S SS
What will happen if
S S instead
30
Another Linear Grammar
Grammar :
AbB
aBA
AS
→
→
→
λ|
}0:{)( ≥= nbaGL nn
G
31
Right-Linear Grammars
All productions have form:
Example:
xBA →
xA →or
aS
abSS
→
→
string of
terminals
32
Left-Linear Grammars
All productions have form:
Example:
BxA →
aB
BAabA
AabS
→
→
→
|
xA →
or
string of
terminals
33
Regular Grammars
34
Regular Grammars
A regular grammar is any
right-linear or left-linear grammar
Examples:
aS
abSS
→
→
aB
BAabA
AabS
→
→
→
|
1G 2G
35
Observation
Regular grammars generate regular
languages
Examples:
aS
abSS
→
→
aabGL *)()( 1 =
aB
BAabA
AabS
→
→
→
|
*)()( 2 abaabGL =
1G
2G
36
Regular Grammars
Generate
Regular Languages
37
Theorem
Languages
Generated by
Regular Grammars
Regular
Languages=
38
Theorem - Part 1
Languages
Generated by
Regular Grammars
Regular
Languages
⊆
Any regular grammar generates
a regular language
39
Theorem - Part 2
Languages
Generated by
Regular Grammars
Regular
Languages
⊇
Any regular language is generated
by a regular grammar
40
Proof – Part 1
Languages
Generated by
Regular Grammars
Regular
Languages
⊆
The language generated by
any regular grammar is regular
)(GL
G
41
The case of Right-Linear
Grammars
Let be a right-linear grammar
We will prove: is regular
Proof idea: We will construct NFA
with L(M)=L(G)
G
)(GL
M
)()( GLML =
42
Grammar is right-linearG
Example:
aBbB
BaaA
BaAS
|
|
→
→
→
43
Construct NFA such that
every state is a grammar variable:
M
aBbB
BaaA
BaAS
|
|
→
→
→
S FV
A
B
special
final state
44
Add edges for each production:
S FV
A
B
a
aAS →
45
S FV
A
B
a
BaAS |→
λ
46
S FV
A
B
a
λ
BaaA
BaAS
→
→ |
a
a
47
S FV
A
B
a
λ
bBB
BaaA
BaAS
→
→
→ |
a
a
b
48
S FV
A
B
a
λ
abBB
BaaA
BaAS
|
|
→
→
→
a
a
b
a
49aaabaaaabBaaaBaAS ⇒⇒⇒⇒
S FV
A
B
a
λ
a
a
b
a
50
S FV
A
B
a
λ
a
a
b
a
abBB
BaaA
BaAS
|
|
→
→
→
G
M GrammarNFA
abaaaab
GLML
**
)()(
+
==
51
In General
A right-linear grammar
has variables:
and productions:
G
,,, 210 VVV
jmi VaaaV 21→
mi aaaV 21→
or
52
We construct the NFA such that:
each variable corresponds to a
node:
M
iV
0V
FV
1V
2V
3V
4V special
final state
53
For each production:
we add transitions and intermediate
nodes
jmi VaaaV 21→
iV jV………1a 2a ma
54
For each production:
we add transitions and intermediate
nodes
mi aaaV 21→
iV FV………1a 2a ma
55
Resulting NFA looks like this:M
0V
FV
1V
2V
3V
4V
1a
3a
3a
4a
8a
2a 4a
5a
9a
5a
9a
)()( MLGL =It holds that:
56
The case of Left-Linear
Grammars
Let be a left-linear grammar
We will prove: is regular
Proof idea:
We will construct a right-linear
grammar with
G
)(GL
G′ R
GLGL )()( ′=
57
Since is left-linear grammar
the productions look like:
G
kaaBaA 21→
kaaaA 21→
58
Construct right-linear grammar G′
Left
linear
G
kaaBaA 21→
G′ BaaaA k 12→
BvA →
BvA R
→
Right
linear
59
Construct right-linear grammar G′
G kaaaA 21→
G′ 12aaaA k →
vA →
R
vA →
Left
linear
Right
linear
60
It is easy to see that:
Since is right-linear, we have:
R
GLGL )()( ′=
)(GL ′ R
GL )( ′
G′
)(GL
Regular
Language
Regular
Language
Regular
Language
61
Proof - Part 2
Languages
Generated by
Regular Grammars
Regular
Languages
⊇
Any regular language is generated
by some regular grammar
L
G
62
Proof idea:
Let be the NFA with .
Construct from a regular grammar
such that
Any regular language is generated
by some regular grammar
L
G
M )(MLL =
M G
)()( GLML =
63
Since is regular
there is an NFA such that
L
M )(MLL =
Example:
a
b
a
bλ
*)*(* abbababL =
)(MLL =
M
1q 2q
3q
0q
64
Convert to a right-linear grammarM
a
b
a
bλ
M
0q 1q 2q
3q
10 aqq →
65
a
b
a
bλ
M
0q 1q 2q
3q
21
11
10
aqq
bqq
aqq
→
→
→
66
a
b
a
bλ
M
0q 1q 2q
3q
32
21
11
10
bqq
aqq
bqq
aqq
→
→
→
→
67
a
b
a
bλ
M
0q 1q 2q
3q
λ→
→
→
→
→
→
3
13
32
21
11
10
q
qq
bqq
aqq
bqq
aqq
G
LMLGL == )()(
68
In General
For any transition:
a
q p
Add production: apq →
variable terminal variable
69
For any final state: fq
Add production: λ→fq
70
Since is right-linear grammar
is also a regular grammar
with
G
G
LMLGL == )()(
71
For any regular language one can
construct left linear as well as right
linear grammar.
72
S
FV
A
B
a
λ
abBB
BaaA
BaAS
|
|
→
→
→
a
a
b
a F → Ba
B → Bb here F is
start symbol
B → Aaa
B → S
A → Sa
S → λ this is new rule
as S is now a final state
73
A → aB
B → bB
B → aC
C → b D
D →λ B
D → λ
D → Cb
D →
Bλ
C →
B a
B → B
b Now D is the
start variable
B →
Aa
A → λ
74
Language generated by both
aaab*
a +b*
a
75
76
77
78
Context-Free Languages
79
Regular Languages
}{ nn
ba }{ R
ww
Context-Free Languages
80
Context-Free Languages
Pushdown
Automata
Context-Free
Grammars
stack
automaton
81
Context-Free Grammars
82
Example
A context-free grammar :
λ→
→
S
aSbS
aabbaaSbbaSbS ⇒⇒⇒
G
A derivation:
83
λ→
→
S
aSbS
=)(GL
(((( ))))
}0:{ ≥nba nn
84
λ→
→
→
S
bSbS
aSaS
abaabaabaSabaabSbaaSaS ⇒⇒⇒⇒
A context-free grammar :G
Another derivation:
85
λ→
→
→
S
bSbS
aSaS
=)(GL }*},{:{ bawwwR
∈
86
λ→
→
→
S
SSS
aSbS
ababSaSbSSSS ⇒⇒⇒⇒
A context-free grammar :G
A derivation:
Example
87
λ→
→
→
S
SSS
aSbS
abababaSbabSaSbSSSS ⇒⇒⇒⇒⇒
A context-free grammar :G
A derivation:
88
λ→
→
→
S
SSS
aSbS
}prefixanyin
)()(and
),()(:{
v
vnvn
wnwnw
ba
ba
≥
=
() ((( ))) (( ))
=)(GL
89
Definition: Context-Free
Grammars
Grammar
Productions of the form:
xA →
x is string of variables and terminals
),,,( SPTVG =
Variables Terminal
symbols
Start
variable
90
Definition: Context-Free
Languages
A language is context-free
if and only if
there is a C.F.grammar with
L
G
)(GLL =
91
Derivation Order
ABS →.1
λ→
→
A
aaAA
.3
.2
λ→
→
B
BbB
.5
.4
aabaaBbaaBaaABABS
54321
⇒⇒⇒⇒⇒
Leftmost derivation:
aabaaAbAbABbABS
32541
⇒⇒⇒⇒⇒
Rightmost derivation:
92
λ|AB
bBbA
aABS
→
→
→
Leftmost derivation:
abbbbabbbbB
abbBbbBabAbBabBbBaABS
⇒⇒
⇒⇒⇒⇒
Rightmost derivation:
abbbbabbBbb
abAbabBbaAaABS
⇒⇒
⇒⇒⇒⇒
93
Derivation Trees
94
Def:
G =(V,T,P,S)
An ordered tree is a derivation tree for G iff
1 The root is labeled S
2 every leaf has a label from T∪{ λ}
3 Every interior vertex has a label from V
4 If a vertex has label A(variable) and its children
are labeled from (L to R)
a1,a2,…an then P must contain a production
A a1 a2 …an
5 A leaf labeled λ has no sibling.
95
Yield:
The string of terminals obtained by
reading the leaves of the tree from
left to right omitting any λ’s
encountered is called yield of the
tree.
96
Partial derivation tree
A tree that has properties 3,4,5 but 1
need not
And 2 is replaced by
V ∪ T ∪ {λ }
97
ABS ⇒
ABS → λ|aaAA → λ|BbB →
S
BA
98
ABS → λ|aaAA → λ|BbB →
aaABABS ⇒⇒
a a A
S
BA
99
ABS → λ|aaAA → λ|BbB →
aaABbaaABABS ⇒⇒⇒
S
BA
a a A B b
100
ABS → λ|aaAA → λ|BbB →
aaBbaaABbaaABABS ⇒⇒⇒⇒
S
BA
a a A B b
λ
101
ABS → λ|aaAA → λ|BbB →
aabaaBbaaABbaaABABS ⇒⇒⇒⇒⇒
S
BA
a a A B b
λ λ
Derivation Tree
102
aabaaBbaaABbaaABABS ⇒⇒⇒⇒⇒
yield
aab
baa
=
λλ
S
BA
a a A B b
λ λ
Derivation Tree
ABS → λ|aaAA → λ|BbB →
103
Partial Derivation Trees
ABS ⇒
S
BA
Partial derivation tree
ABS → λ|aaAA → λ|BbB →
104
aaABABS ⇒⇒
S
BA
a a A
Partial derivation tree
105
aaABABS ⇒⇒
S
BA
a a A
Partial derivation tree
sentential
form
yield
aaAB
106
aabaaBbaaBaaABABS ⇒⇒⇒⇒⇒
aabaaAbAbABbABS ⇒⇒⇒⇒⇒
S
BA
a a A B b
λ λ
Same derivation tree
Sometimes, derivation order doesn’t matter
Leftmost:
Rightmost:
107
Ambiguity
108
aEEEEEE |)(|| ∗+→
aaa ∗+
E
EE
EE
+
a
a a
∗
aaaEaa
EEaEaEEE
*+⇒∗+⇒
∗+⇒+⇒+⇒
leftmost derivation
109
aEEEEEE |)(|| ∗+→
aaa ∗+
E
EE
+
a a
∗
EE a
aaaEaa
EEaEEEEEE
∗+⇒∗+⇒
∗+⇒∗+⇒∗⇒
leftmost derivation
110
aEEEEEE |)(|| ∗+→
aaa ∗+
E
EE
+
a a
∗
EE a
E
EE
EE
+
a
a a
∗
Two derivation trees
111
The grammar aEEEEEE |)(|| ∗+→
is ambiguous:
E
EE
+
a a
∗
EE a
E
EE
EE
+
a
a a
∗
string aaa ∗+ has two derivation trees
112
string aaa ∗+ has two leftmost derivations
aaaEaa
EEaEEEEEE
∗+⇒∗+⇒
∗+⇒∗+⇒∗⇒
aaaEaa
EEaEaEEE
*+⇒∗+⇒
∗+⇒+⇒+⇒
The grammar aEEEEEE |)(|| ∗+→
is ambiguous:
113
Definition:
A context-free grammar is ambiguous
if some string has:
two or more derivation trees
G
)(GLw∈
114
In other words:
A context-free grammar is ambiguous
if some string has:
two or more leftmost derivations
G
)(GLw∈
(or rightmost)
115
Why do we care about ambiguity?
E
EE
+
a a
∗
EE a
E
EE
EE
+
a
a a
∗
aaa ∗+
take 2=a
116
E
EE
+
∗
EE
E
EE
EE
+
∗
222 ∗+
2
2 2 2 2
2
117
E
EE
+
∗
EE
E
EE
EE
+
∗
6222 =∗+
2
2 2 2 2
2
8222 =∗+
4
2 2
2
6
2 2
24
8
118
E
EE
EE
+
∗
6222 =∗+
2
2 2
4
2 2
2
6
Correct result:
119
• We want to remove ambiguity
• Ambiguity is bad for programming languages
120
We fix the ambiguous grammar:
aEEEEEE |)(|| ∗+→
New non-ambiguous grammar:
aF
EF
FT
FTT
TE
TEE
→
→
→
∗→
→
+→
)(
121
aF
EF
FT
FTT
TE
TEE
→
→
→
∗→
→
+→
)(
aaaFaaFFa
FTaTaTFTTTEE
∗+⇒∗+⇒∗+⇒
∗+⇒+⇒+⇒+⇒+⇒
E
E T+
T ∗ F
F
a
T
F
a
a
aaa ∗+
122
E
E T+
T ∗ F
F
a
T
F
a
a
aaa ∗+
Unique derivation tree
123
The grammar :
aF
EF
FT
FTT
TE
TEE
→
→
→
∗→
→
+→
)(
is non-ambiguous:
Every string has
a unique derivation tree
G
)(GLw∈
124
Inherent Ambiguity
Some context free languages
have only ambiguous grammars
Example: }{}{ mmnmnn
cbacbaL ∪=
λ|
|11
aAbA
AcSS
→
→
λ|
|22
bBcB
BaSS
→
→21 | SSS →
125
The string
nnn
cba
has two derivation trees
S
1S
S
2S
1S c 2Sa
126
Lexical
analyzer
parser
Compiler
program
machine
code
input output
127
A parser knows the grammar
of the programming language
128
The parser finds the derivation
of a particular input
10 + 2 * 5
Parser
E -> E + E
| E * E
| INT
E => E + E
=> E + E * E
=> 10 + E*E
=> 10 + 2 * E
=> 10 + 2 * 5
input
derivation
129
10
E
2 5
E => E + E
=> E + E * E
=> 10 + E*E
=> 10 + 2 * E
=> 10 + 2 * 5
derivation
derivation tree
E E
E E
+
*

More Related Content

What's hot

Context free grammars
Context free grammarsContext free grammars
Context free grammars
Ronak Thakkar
 
Entrega2_MALGTN_DEFINITVA
Entrega2_MALGTN_DEFINITVAEntrega2_MALGTN_DEFINITVA
Entrega2_MALGTN_DEFINITVA
Guillem Sala
 

What's hot (20)

CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR
 
Context free grammar
Context free grammarContext free grammar
Context free grammar
 
context free language
context free languagecontext free language
context free language
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
 
Context free languages
Context free languagesContext free languages
Context free languages
 
Ambiguty
AmbigutyAmbiguty
Ambiguty
 
Cs419 lec5 lexical analysis using dfa
Cs419 lec5   lexical analysis using dfaCs419 lec5   lexical analysis using dfa
Cs419 lec5 lexical analysis using dfa
 
Lesson 12
Lesson 12Lesson 12
Lesson 12
 
Lesson 10
Lesson 10Lesson 10
Lesson 10
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
 
Lesson 11
Lesson 11Lesson 11
Lesson 11
 
Lesson 09
Lesson 09Lesson 09
Lesson 09
 
Entrega2_MALGTN_DEFINITVA
Entrega2_MALGTN_DEFINITVAEntrega2_MALGTN_DEFINITVA
Entrega2_MALGTN_DEFINITVA
 
Flat unit 3
Flat unit 3Flat unit 3
Flat unit 3
 
Lesson 08
Lesson 08Lesson 08
Lesson 08
 
Lexical 2
Lexical 2Lexical 2
Lexical 2
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
 
Automata
AutomataAutomata
Automata
 
Unit i
Unit iUnit i
Unit i
 
Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expression
 

Viewers also liked

Culminating Project Defense Presentation
Culminating Project Defense PresentationCulminating Project Defense Presentation
Culminating Project Defense Presentation
Tracy Middleton
 
carol kahn case studies for sponsorship and brand marketing
carol kahn case studies for sponsorship and brand marketingcarol kahn case studies for sponsorship and brand marketing
carol kahn case studies for sponsorship and brand marketing
Carol Kahn
 
Temperature, co, co2 monitoring with smart phone apps
Temperature, co, co2 monitoring with smart phone appsTemperature, co, co2 monitoring with smart phone apps
Temperature, co, co2 monitoring with smart phone apps
ICP DAS USA, Inc.
 
Spektr
SpektrSpektr
Spektr
GVCCI
 

Viewers also liked (19)

ICP DAS USA Power Meter and Energy Monitoring Solutions
ICP DAS USA Power Meter and Energy Monitoring SolutionsICP DAS USA Power Meter and Energy Monitoring Solutions
ICP DAS USA Power Meter and Energy Monitoring Solutions
 
TASK 1 TIC
TASK 1 TICTASK 1 TIC
TASK 1 TIC
 
Learn the cutting edge technologies in Data Acquistion, Industrial Control an...
Learn the cutting edge technologies in Data Acquistion, Industrial Control an...Learn the cutting edge technologies in Data Acquistion, Industrial Control an...
Learn the cutting edge technologies in Data Acquistion, Industrial Control an...
 
Culminating Project Defense Presentation
Culminating Project Defense PresentationCulminating Project Defense Presentation
Culminating Project Defense Presentation
 
Sociology ch1 modified
Sociology ch1 modifiedSociology ch1 modified
Sociology ch1 modified
 
carol kahn case studies for sponsorship and brand marketing
carol kahn case studies for sponsorship and brand marketingcarol kahn case studies for sponsorship and brand marketing
carol kahn case studies for sponsorship and brand marketing
 
Sociology ch1 modified
Sociology ch1 modifiedSociology ch1 modified
Sociology ch1 modified
 
How Configure.IT accelerates Mobile App Development
How Configure.IT accelerates Mobile App DevelopmentHow Configure.IT accelerates Mobile App Development
How Configure.IT accelerates Mobile App Development
 
Ch2 culture
Ch2 cultureCh2 culture
Ch2 culture
 
comprehensive-sex-abstinence-ed
comprehensive-sex-abstinence-edcomprehensive-sex-abstinence-ed
comprehensive-sex-abstinence-ed
 
Temperature, co, co2 monitoring with smart phone apps
Temperature, co, co2 monitoring with smart phone appsTemperature, co, co2 monitoring with smart phone apps
Temperature, co, co2 monitoring with smart phone apps
 
HEFORSHE
HEFORSHEHEFORSHE
HEFORSHE
 
201.01 3 selections on the nature of society
201.01 3 selections on the nature of society201.01 3 selections on the nature of society
201.01 3 selections on the nature of society
 
Justice4
Justice4Justice4
Justice4
 
Spektr
SpektrSpektr
Spektr
 
Report text
Report textReport text
Report text
 
NS-205PFCS-24V
NS-205PFCS-24VNS-205PFCS-24V
NS-205PFCS-24V
 
Human sexuality
Human sexualityHuman sexuality
Human sexuality
 
Exposition (hortatory)
Exposition (hortatory)Exposition (hortatory)
Exposition (hortatory)
 

Similar to 163692498 grammar

context free grammars automata therory and compiler design
context free grammars automata therory and compiler designcontext free grammars automata therory and compiler design
context free grammars automata therory and compiler design
sunitachalageri1
 

Similar to 163692498 grammar (12)

Ch02
Ch02Ch02
Ch02
 
context free grammars automata therory and compiler design
context free grammars automata therory and compiler designcontext free grammars automata therory and compiler design
context free grammars automata therory and compiler design
 
Hw2 2017-spring
Hw2 2017-springHw2 2017-spring
Hw2 2017-spring
 
Ch03
Ch03Ch03
Ch03
 
Lex analysis
Lex analysisLex analysis
Lex analysis
 
Ambiguous grammar, dfa and slr grammar.
Ambiguous grammar, dfa and slr  grammar.Ambiguous grammar, dfa and slr  grammar.
Ambiguous grammar, dfa and slr grammar.
 
Open course(programming languages) 20150211
Open course(programming languages) 20150211Open course(programming languages) 20150211
Open course(programming languages) 20150211
 
Open course(programming languages) 20150211
Open course(programming languages) 20150211Open course(programming languages) 20150211
Open course(programming languages) 20150211
 
Natural Language Processing - Writing Grammar
Natural Language Processing - Writing GrammarNatural Language Processing - Writing Grammar
Natural Language Processing - Writing Grammar
 
Art07
Art07Art07
Art07
 
Cfg part ii
Cfg   part iiCfg   part ii
Cfg part ii
 
Grammars and Syntax
Grammars and SyntaxGrammars and Syntax
Grammars and Syntax
 

More from cjsmann

100182064 chapter-6-nutrition
100182064 chapter-6-nutrition100182064 chapter-6-nutrition
100182064 chapter-6-nutrition
cjsmann
 

More from cjsmann (20)

somatotype-rotation-square
 somatotype-rotation-square somatotype-rotation-square
somatotype-rotation-square
 
Somatotypes (2)
Somatotypes (2)Somatotypes (2)
Somatotypes (2)
 
Somatotypes (3)
Somatotypes (3)Somatotypes (3)
Somatotypes (3)
 
somatotypes
 somatotypes somatotypes
somatotypes
 
Bodycomp
BodycompBodycomp
Bodycomp
 
Body typing
Body typingBody typing
Body typing
 
ap-physics-b-review-electromagnetism
 ap-physics-b-review-electromagnetism ap-physics-b-review-electromagnetism
ap-physics-b-review-electromagnetism
 
ap-phys-b-review-kinematics-and-newton-s-laws
ap-phys-b-review-kinematics-and-newton-s-lawsap-phys-b-review-kinematics-and-newton-s-laws
ap-phys-b-review-kinematics-and-newton-s-laws
 
ap-physics-b-review-energy-and-momentum
ap-physics-b-review-energy-and-momentumap-physics-b-review-energy-and-momentum
ap-physics-b-review-energy-and-momentum
 
optics-review
optics-reviewoptics-review
optics-review
 
ap-physics-b-review-modern-physics
 ap-physics-b-review-modern-physics ap-physics-b-review-modern-physics
ap-physics-b-review-modern-physics
 
Stretchingand warmup120310
Stretchingand warmup120310Stretchingand warmup120310
Stretchingand warmup120310
 
7 proper stretching (1)
7 proper stretching (1)7 proper stretching (1)
7 proper stretching (1)
 
Back shoulder arm_stretches
Back shoulder arm_stretchesBack shoulder arm_stretches
Back shoulder arm_stretches
 
03-nutrition-221
03-nutrition-22103-nutrition-221
03-nutrition-221
 
nutrition
nutritionnutrition
nutrition
 
100182064 chapter-6-nutrition
100182064 chapter-6-nutrition100182064 chapter-6-nutrition
100182064 chapter-6-nutrition
 
61184498 chapter-6-nutrition
61184498 chapter-6-nutrition61184498 chapter-6-nutrition
61184498 chapter-6-nutrition
 
Ch 4 groups
Ch 4 groupsCh 4 groups
Ch 4 groups
 
5 types of social interaction[1].ppt
5 types of social interaction[1].ppt5 types of social interaction[1].ppt
5 types of social interaction[1].ppt
 

Recently uploaded

Recently uploaded (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 

163692498 grammar