Atcd Tut-2 Answers
Atcd Tut-2 Answers
ATCD-Tut2
M2
)Drition n eEi rE is a sting that an ba ormod acpvdiyj ti
rd toTninals
SAB
A ’OALS
B ’ 2Be
S’x/Y
X>axb/ax a
y’ab bY/ b
) L: ab- mz=3
lambn-3
Stinq-oaabab.
LMD Produdian apdad
S> AbB S’AbB
S’aA bB A’aA
00AbB AaA
2000.bB A0
»000.ba B. B’aB
9000babB
000bab B’
RMD
’Abaß
Abab8 B>bB
’Abab B
’0Abob A’aA
0aA ab A>aA
2000bab
Panse re2CLMD)
Tis et of t i n a l a
ket of todution.
Pis
P: £
S Elasb| bSa ss
S is tat synbol.
T=fa b3
S is stant ynbol.
iii) Palindrome tiing
S Ea< b asa bsb
G: (Y.T.Ps)
P: SE
S alb
S ’ asalbsb3
s is the tant symbot
wrile the egulan
fine eglar enfreion
folloeingarguagai
ehe
Jewl< n
uvs
DATE
Nw
K2, y'
242- aagaaaEL
da aa daa
( Define CFG- Waite a cq sa
qT,R,s)
shee, S is the stat Symbol
V be tibiit bet of valable Ta,b
teminoal
be qinte set o
S’ as b] b8a)e
’absab (sbsa)
abbsaab Cssb)
Abb aatb Cse)
4C,T,P, s)
Vs,,8,c,D
Preut te
C ’aCble
D
S’asb)B
8>bee
ASatee
vi) L-RuuoF\weoto
4ine CFG- Ruigo a Cortoct ree
B b'A
S0091
S is he Stat synkot
S0001e
Non- talindieroe
() Corhid he Df
in) i e au
the tansiti'on dinsham the atove DFO and
(V
1) Cnsider the qronr :
E’E+EE-E
E’E*EE/E
E(E)
the left knost derivatin and parce free hr the sting (ntb *)
()Obtgin
tght wt derivetin and pare tree fir the Ghing (a+6) *
(t) 0btoin ahe
Gi0) Ched nbig uous
Ans
() (aib)c
(a%)*c
1) Write an tnite aytam ata hr the llswiny reguar expeain.
() (a b) * ob (aab) r
I’ [b.d, f-hj-np-tiv-)
)Al ring ci lower coue leskers in hhidh letes
areaN Idng lexicoqraphic orctr
a6cd'"gh'i.. . r'y'
ws?
medrate slep tn the ondructon alezitel anolyaa
uta As on fnto floochosts , colled "toonstto
oe frst on vert patesns into yfaed
’
-n
Jagpas
In ths Secton, ae dhe canrs onfhm ngulantres
-n
colecton nades on cincles , calledl
hove a
’ Tronstion diogams epreserts
States. Each stote a torditian bot could ocas dgy
inpat lokin on o kxeme that
the proess scorng the
motches one sevend gatons.state he tronsilion
core dineced prom Ohe
tb ongte.
Is. Exglam the ole te lexial onalyaen!
slator As be fndt thate a tonpl he mn tik the lexil ondyr
is to nead bo input chah clens the Sooe moporn gup -em ak
lxemts,and pradoce as alpt a agwe tkens o eoch osene
in to Socace phogom.
token
lexical to smte
Pan Ben
Analyae
get vext TGken
onigtis
Talile
> The Rl lexal arolgien is to read the inpt dhrhalens te
toNe mapom goup beo into lexima ond medute te ort put a
R9uene bkos och leima in the soe progaon,
’ The intenadton is implemented hoving he onoe als e kedl
ovag using tho functon Co|l got hect tokeh . commord CouBes
lexi cal analyzen ta sead choaces faon ts npet ontil t
lept idented. net lexima ond produce f th the nest tolke
(49)
selst:en Chunkn, la:d 2elot onnumbo,
volue) lzvl yde)
RELOP:
Token