0% found this document useful (0 votes)
35 views

ATC Module 1

The document discusses the different phases of a compiler: lexical analysis, syntax analysis, semantic analysis, intermediate code generation, code optimization, and code generation. Lexical analysis breaks input into tokens. Syntax analysis checks syntax and structure. Semantic analysis checks types and semantics. Intermediate code is generated for the target machine. Code is optimized and organized. Final code is generated in the target language.

Uploaded by

Chandana J
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

ATC Module 1

The document discusses the different phases of a compiler: lexical analysis, syntax analysis, semantic analysis, intermediate code generation, code optimization, and code generation. Lexical analysis breaks input into tokens. Syntax analysis checks syntax and structure. Semantic analysis checks types and semantics. Intermediate code is generated for the target machine. Code is optimized and organized. Final code is generated in the target language.

Uploaded by

Chandana J
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

clkssMate

Automata. Date
Page
Module 1

-asa dequonte ch dyabole

Alhabeti An alghabet. a Praita sat f yabola


dlincd

i a j b sf th Janquage takew all


faaiab, ba, bb?
d)DEA DEAA afinte Atate machiaas thot accent tf
agucnce that

fNEA: 2-NEA hasnull o


Lpaestate to anothes,

£-cleste feelause ii the nittal skade an all tatas that


deteministe
aeqataulesnextatate
tabeCan siagle tea
NEA DEA
L înand4
îs Lîa not
inditiaguababe
ataii )piatngaiahabe
and
chtae) autenmaton kaognzed
the by danguage Haa
tasny instat anathan behavious
as same the has fat
aus
te
t equivalentslates statese
AnEquivalkent
ndatenxponuttal by
the sinq ayhalet that
set eXphes
the
an
J4si alphahet
ssmate. bate
Conspilos stat.
finalDEA, not
Backfaackitnq ieen
Jarguage ft
Smante
analyai.Leteal
3.analys oeataa in
optinaizes
Code5.
taansnmita bEA.
Synt
analyaae
in allaued
hander nesioui
cenpils table
toa
cine
fhaies ino
aeptelentatian fafiaaltate riaDFA,
aisle trancitcns.
Io staing
cach NDEA,
qhase tanshon fall 1/
atleast Date
Page.
backtiacking clAsSMate
to
tanafenas
ansthes endi one
d
ia a
etn’ Tokens Syntax -and )Akical
analyesi bkens, 4L
ConstuctaRepest Qbtan sxpckd
foinsat.analuaiz
he
AkokeeaAd ehds, sthe
areufp fist these
all taani and chatgphaes
phase entea thase phase
hisasehialatctutayatayi faoa
tan chasadtaas passeconvent
dataiaes whan
ada tohe theey
a toapilasAcans
dexical dilehant
intotokans. d he
anseusce
ath)tc whathes
thichts anayzes tabes.till uptinizing
ps cede
the
hot by Page Date
Bouse clAsSMAte
knon a dliuhe
iclias
toxt iancie deuie
te olle code,
as
clasSMAte
Date
Page

Semate
eghe
analyai
thind lase checki tho semante consistncy the
e Semantie analyzea Hl eheck fos type
mismatehas,
incempatle operands, oa functon callad uith însprepes
atqunens, an undeelased vastala et

tupe naámatchy wheae theae are no


exaat coizeeton hules heik otiaty the lesiad
Cpeaaten a demaate esssisahoun
Calleata tipe bafetonaton and checke fes type compathhiti

float 28.2;
tloat y*304
4Intohpaadlate codo qenetaiaai
sfhe fousta phase geneaates alasmadiate code fes te
tasget mackae
ta iatazmeeate code nees to he qenehatad ia Aueh
a mannoh that aakes Gt easy to taanlete it isto tac
tasqzt marhine codle
st ahoulA be qeneatad fsonn the semant Aapreseatatea

to tianslate the sntemadate eocde înto the

language

|R4: total tount kat x5 [ah+c* 25]


alassmute
Date
.)Page

tL httefloet (5)
t32counf +t2 43htt2
Lotal t3

5)Code Ogtmézaton .
Aemeves unnecessey code daean

is to fnap2ove on the
acoe that auns fastas

executton and Compilatonsped.

yaniables

Fstrnizedcode

Cole 4eachatoni.

the

qenstatk elecatodle máckêse cade


allecatks mes Udu Sucatoss fer tha variable.
talso Hhe'ntmediate cede use lerseste
he instucticns fn
nto macine insthutens. atanadiat code
theestnied
hia phasK cenVehta
nto the teaet dorgage

alse aleatad and alleded daicq thi qheles tale


genskated by thisqhas s eneeutdte

azbtbo.b flatnuatafrals.
Registe

AppE RI, R2

Htt

Cogile
Ltserntle

Ifokenlaobes
classMate
Date
Page

ITcpsecassodi dA fncludes allheadea fleand ealuat


Lahethesa machoiincluded St tokes skousce codo n,
input and gucducad pacdifd seukca cede ar eutput,

not

Coapilsi the congiles takes the paadiied cedat input


and'acacas the tasge code ar output
Seukea omitrc faset
oqhas

Messases

input

Cellectesobieta and acahineA tecaa ito an exezataßlk

Exeoutabe
Dode that machine can

Convaate kinto exeoutable coda


4llocaton 3. Reallooation

You might also like