Assignment_01_CD
Assignment_01_CD
Page
iFlsiqprment-01
1Phoses_of Compilest :
2.C1039 Compile
A Cao39 cormpiley î3 o tpe of copilex
thot geneLates executable cocde foL a tfoug
diffeient foDm the one C0 ehich Hhe comple
Compilec1 glInniyO0
ctunnim a PCmight gencACrte
Lcode that eiths on an embecldec &uctea o4
o difient opesorting system.
Why use Q Caios Compiley 2
bote
Poge
alPootstopping
Bootstappg în compiley cleaiqn i the
a conoiley in the ps1o
Date
Paoe
t Key Components
h. Lexeme:AsEOLerce of chauactes thot
matches the prttessn fos q to ken.
2 Token:A Oig conaistng of a token Cthd on
otioral attsibtde alie.
E.Pottesn:A 31ulethat desibeg tthe set s
lexermes that an cIepSIÉSE nt a poctculoy
token.
Example
(onside the falloLing ainple C.
Data
Page
it main )
int o. bi
Suntay YACC
T1ee (Pnise)
LexialAnalusis ( Lex): Lex seoca the
SOLHCe code and coovet it
into c seqIente o tokena.
Suntax Aoolugis (YAcc) : YACC takes the
tokens Gnd constslLuctsa Suntnx tsee
basel DO the 91Gm0C GlLler