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

compiler design lab

this document contains rtu compiler design lab syllabus.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
26 views

compiler design lab

this document contains rtu compiler design lab syllabus.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 13
Experiment i- 1 Arm uwite a Sex proyoavn fo yeagnie and displog | Keywosd numbers and words. 2 Osis 1. ide swelled etd rei stk mctude ¢ s4did-h>. 13 hob het . IS| etso | pundd EPAKF (“Ks igo Kagwona ay tent); J [o-gle L PoE ("On Hs isa mumbes Yate): 3 Lor Az] + Epomat (Mn ts isa Tord”, yytext)s J he oe int mem () & a eae Yn Ember the stung” )s Ba texO 3 IMS Yywoar L) & etum 15 i | bude | Emtes whe Stimg MY nome + is Hrmom shu. IT am 20 Yeo ol a TA NOME is ironshu iso word Iam is a,/Wword:. E epestment :-2 Pim t- umte o prgsom to Counk total murn bes of Opesotess im rhe Giverny Stomge 0” Heindude < S4dio-h> Hrrude 6t dUibh) INE Tan & System (“eds”): Chos s [owls int Counk =0, 15 a py SlomfS4S% 8 fosie 4s pC ve Stes Hh ystia== 2 sta =e SCO Se "VL Count e+) Print! (“enters Ws Shing + \ony5 pratt (“mumbes of Operations tna Given Stig ose Hd) Cour )5 setwon0! 3 Oukpuk entes Wwe Str ‘ 149-344 ee. Hunnoes of Beeline Ma as ie a) ee Expesiment No :-3 ee Aim write a Prawm to counk dotal — Nombes Of occusence pf @och Chooacdey in a Sty Paseo .- im Clude < Stdio-hy ++ include < Stang) imk mam) & Chas String (101: IN C =D, Count [0 = F049, x: Pamtl (" eniew a Stig mn”): gers Cstaq)ys Ale (Stir Cel = NWS) g if (Stiirg fel o's We SsCc0%s CL2¢5 Cae) WICC Cea +p. ‘ i, Prev ted Hees TIL Shiva in" 4 lot Coustpa) "edu D 3 Dulnuk Emtes 6 Shimy WelCome to viet O-oceuws 6 des Mm Ma Stary b occu oO kymes Ys Stary C oceum 1 bames iM Me Shiny docu 0 tres in Vs Stan € ocems 3 Hes iM Me Sting £ ocewrs Oo hme mm Us Satiny Q Occurs 0 fmes mM Woe Stony hh Occuss 0 Hmes M Hu Ehoing 1 oceuss 4 Hmes M Me Story f Soidewe: (gh mes mn Hs San Kj ocurs 9 mes ™ He Siomg J oceuss. 1 mes ead mn Oceuss 1 yyy Beet NA Octuss O mH Mee Sy 0 oceurs wn He SEQ P occurs” 0 times ie Stay 4 im a SHIN % im pe SHO S deewss 9 wes im MH Ste A ocewss 9 bes im HH HY V.- ocewrs 9 Wes os Vi Ocurss OF byes IN om DQ ocewss 2 dynes in mr Sh % Ocwrs 0 Yes in ta Sh Y Gees O jmes im ws sh 2Z Octwss O times in whe ote ExPenmenk Noe eee worite a program to idewhh( whee yy Given pim © Ghings is a Key mod OF mot. Atindlude < Stdioh> ak Include< Stang why te inolude SH Mb ny Int woam (9 & System C cas")5 Chos Keyword Load Ltor> € “auto” “double",“mt”, “gkmel, “pve epee," dund!*satich’ “easel, “enuw!, 4 csoqicies”, “rypedet. "ober", "outer, “are hven! “unten”, “Cunst", “Heat, “Ghost’, “umngsired™, pone ee = “Coat? “Chor! “fev voiat, “lefoult “gots, “siaeot”, + odie’, “do", SES, “tte, Cae", Js Choe Shing Cio ink Mey 205K) Canter any stmy’)s Gets Shing)’ QyUiro: oes it4d © if (stam (shag ,wedued Lid = xo) & Bog = 33 3 3 if { Hog? > 4) Patt Cas is © Kegwnd”, SHrQ)s e159 5 ‘Kha ibedstelten nob: a Keoguond ™, SHY) vena: Y a WY 1 ot Ne Bg eer a | Oude Entes any Shing! do do is a K ea Ex pevim ont Nore ae Fee INE Se SB Pings do coun dobte. 4vemen of Vowels and Consonants isa given Stamg { | “lo & HE WMOude Lgtdin chy Mt vowels= 0; \nt Consonomts = 0: ofo J Lo ojo | [aeiov AEToo] € voweds 4+: 4 | [o2z A-z J E Congenoants +43 Jo ofo Ot aman OF Paint? ( Entes sme string”); ee Vodeds = 1d \n No-0f Consmnante = 1.4% Voxeds, ConSononts) 5 3 ink Yxerany & Erm 43 | | oust | Enter Shing = Himomshu ' No.of Voweds= & 3 No of Comsumants + & | | « Experiment -¢ ————__ gm - WHte O PmEram to Stoze and dis ploy Student Yanrd 45iINI Slovotuse te includecstdio. hy Hineluded etgorp, hy Qrnct Bul bot Sets » Chee Qereme font; Vor mostsls1: 33 yak MoM (E System CX cis”)s Sivek Stu 95 Wk fokad 70715 Yroak ove s ; Pant (entes student Reino) GOonh 4a", Bs, SHON): Panit(" enter ehdawt tonne’): Homi 4 4144, BS. Shornes 5; Pang Centes & gudloeck rons Rs (ye0s os eee Sont(S4.d% gs.macteUil)! doled = tole + armons C1) Ova = (Muak) dobat [55 3 Prints ( ghadenk Rapirno hd 0, ent BAL? ( U ehudentk Towne * 4.8 (nls. oT By. pant C" Students toby Tons 4.4 Wy dota) 3 PASE ANG: 4P\n* Og); : Sevm or J OW antes Student wll nov 24 Entes Student some + Himomshu eEntes S Swoleds morks> 98 92 94 as 9 Student wll MO = 94 Sthidew nome = Himanshu totul mmnawts = 440. Avg: 94.48 : ! {

You might also like