From c27bc7e62a89668eb0539c31d3e8edd310f8878f Mon Sep 17 00:00:00 2001 From: prabhakaran9397 Date: Fri, 10 Mar 2017 15:39:16 +0530 Subject: [PATCH] lab codes --- LAB/03-02-17/lexicalerrors | Bin 0 -> 24614 bytes LAB/03-02-17/lexicalerrors.l | 76 + LAB/03-02-17/syntax | Bin 0 -> 24433 bytes LAB/03-02-17/syntax.l | 35 + LAB/03-02-17/syntaxerrors | Bin 0 -> 24646 bytes LAB/03-02-17/syntaxerrors.l | 78 + LAB/03-03-17/expr/a.out | Bin 0 -> 8500 bytes LAB/03-03-17/expr/expr | Bin 0 -> 29495 bytes LAB/03-03-17/expr/expr.l | 20 + LAB/03-03-17/expr/expr.y | 40 + LAB/03-03-17/expr/test.c | 7 + LAB/03-03-17/ifelse/g.c | 1 + LAB/03-03-17/ifelse/ifelse | Bin 0 -> 29499 bytes LAB/03-03-17/ifelse/ifelse.l | 22 + LAB/03-03-17/ifelse/ifelse.y | 46 + LAB/06-01-17/dec | Bin 0 -> 24477 bytes LAB/06-01-17/dec.l | 94 ++ LAB/06-01-17/declarations | Bin 0 -> 24382 bytes LAB/06-01-17/declarations.l | 91 ++ LAB/06-01-17/hello.c | 8 + LAB/06-01-17/output | 3 + LAB/10-02-17/in2post | Bin 0 -> 24611 bytes LAB/10-02-17/in2post.l | 79 + LAB/10-02-17/posteval | Bin 0 -> 45990 bytes LAB/10-02-17/posteval.l | 36 + LAB/10-03-17/Makefile | 12 + LAB/10-03-17/inter.l | 22 + LAB/10-03-17/inter.y | 32 + LAB/13-01-17/in2post | Bin 0 -> 24191 bytes LAB/13-01-17/in2post.l | 79 + LAB/23-12-16-practice/first/Makefile | 7 + LAB/23-12-16-practice/first/first.l | 13 + LAB/23-12-16-practice/nochars/nochars | Bin 0 -> 24029 bytes LAB/23-12-16-practice/nochars/nochars.l | 23 + LAB/24-02-17/for.c | 3 + LAB/24-02-17/forloop | Bin 0 -> 24497 bytes LAB/24-02-17/forloop.l | 38 + LAB/25-02-17/validate | Bin 0 -> 29503 bytes LAB/25-02-17/validate.l | 10 + LAB/25-02-17/validate.y | 28 + LAB/27-01-17/post2in | Bin 0 -> 50933 bytes LAB/27-01-17/post2in.l | 50 + LAB/30-12-16/README.md | 13 + LAB/30-12-16/a.out | Bin 0 -> 24212 bytes LAB/30-12-16/hello.txt | 1 + LAB/30-12-16/lex.yy.c | 1840 +++++++++++++++++++++++ LAB/30-12-16/tokcount | Bin 0 -> 24127 bytes LAB/30-12-16/tokcount.l | 35 + LAB/30-12-16/tokcount2 | Bin 0 -> 24618 bytes LAB/30-12-16/tokcount2.l | 72 + LAB/30-12-16/tokens | 5 + LAB/mkl | 5 + LAB/mky | 11 + 53 files changed, 2935 insertions(+) create mode 100644 LAB/03-02-17/lexicalerrors create mode 100644 LAB/03-02-17/lexicalerrors.l create mode 100644 LAB/03-02-17/syntax create mode 100644 LAB/03-02-17/syntax.l create mode 100644 LAB/03-02-17/syntaxerrors create mode 100644 LAB/03-02-17/syntaxerrors.l create mode 100644 LAB/03-03-17/expr/a.out create mode 100644 LAB/03-03-17/expr/expr create mode 100644 LAB/03-03-17/expr/expr.l create mode 100644 LAB/03-03-17/expr/expr.y create mode 100644 LAB/03-03-17/expr/test.c create mode 100644 LAB/03-03-17/ifelse/g.c create mode 100644 LAB/03-03-17/ifelse/ifelse create mode 100644 LAB/03-03-17/ifelse/ifelse.l create mode 100644 LAB/03-03-17/ifelse/ifelse.y create mode 100644 LAB/06-01-17/dec create mode 100644 LAB/06-01-17/dec.l create mode 100644 LAB/06-01-17/declarations create mode 100644 LAB/06-01-17/declarations.l create mode 100644 LAB/06-01-17/hello.c create mode 100644 LAB/06-01-17/output create mode 100644 LAB/10-02-17/in2post create mode 100644 LAB/10-02-17/in2post.l create mode 100644 LAB/10-02-17/posteval create mode 100644 LAB/10-02-17/posteval.l create mode 100644 LAB/10-03-17/Makefile create mode 100644 LAB/10-03-17/inter.l create mode 100644 LAB/10-03-17/inter.y create mode 100644 LAB/13-01-17/in2post create mode 100644 LAB/13-01-17/in2post.l create mode 100644 LAB/23-12-16-practice/first/Makefile create mode 100644 LAB/23-12-16-practice/first/first.l create mode 100644 LAB/23-12-16-practice/nochars/nochars create mode 100644 LAB/23-12-16-practice/nochars/nochars.l create mode 100644 LAB/24-02-17/for.c create mode 100644 LAB/24-02-17/forloop create mode 100644 LAB/24-02-17/forloop.l create mode 100644 LAB/25-02-17/validate create mode 100644 LAB/25-02-17/validate.l create mode 100644 LAB/25-02-17/validate.y create mode 100644 LAB/27-01-17/post2in create mode 100644 LAB/27-01-17/post2in.l create mode 100644 LAB/30-12-16/README.md create mode 100644 LAB/30-12-16/a.out create mode 100644 LAB/30-12-16/hello.txt create mode 100644 LAB/30-12-16/lex.yy.c create mode 100644 LAB/30-12-16/tokcount create mode 100644 LAB/30-12-16/tokcount.l create mode 100644 LAB/30-12-16/tokcount2 create mode 100644 LAB/30-12-16/tokcount2.l create mode 100644 LAB/30-12-16/tokens create mode 100644 LAB/mkl create mode 100644 LAB/mky diff --git a/LAB/03-02-17/lexicalerrors b/LAB/03-02-17/lexicalerrors new file mode 100644 index 0000000000000000000000000000000000000000..004bb41290e048abcb27c0f440728010ec5d29e8 GIT binary patch literal 24614 zcmeHv4R}=5x$d5X4Ka{RKnBA9s04ySOb}>5t2>avi4B;8!CDlDA(=ol$sr71qJe<};sd^;*NU&88T8q&`pGGgXGX`5Ks5wfV`+nbAYtNoZ zLi?QOx%WQLy>7_<*7trt>s$Y8|IGfTuXbsU%cZF!N4s7luJ;myA#v8U(#6b5tWvu~ zGqkDNByBhl9e)N(h>Db={nE9fc~UPIbQu0Ba|BSCV{k&z$pY3CRS^=U{L+UZlY&-P z3RY1~^D;no6l>A-%!01rgrd*OIMz^Le0cdxFxiz#yHaVV=m{B^qN;pUHu|fVe(Q4# zaKsx#v}!)5De2Nt_g<`#(sdQgf*PDqv|i??sIvPT*ioE+?NKBZSIGQ^s+Y4eKSd?0 zUER{WcEP->TN>xIG`Gb!&Dm7BV9tV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sybe?-j3LdGTIAoNo_ z$~SwQu9AKplkHn0Z34h4p6OZrtx4)XS7NZH$~PwQD`k0ATWpi~*Dn+LZ%P0Ez_?@_ zWFK&^gICF;z$qSYRy;3Bd~z24Z|uK7yJxz=E@n$d?=h~trs*d`;3F|nP=8a`o62H5 za2glCE-@HV^)M5-S1CDYmDE2g>lxjK55L4Ok@cqL)d1rIuTw%&|LLrJBfzPCdb9eE z))0wBV|aDEjJ^kX(~=c|+L~MH0|Biu6bY?sj^b7KK&&-@Z%np@qWE6r04NY>3xgGytg85k%49*3( zKHSn6XjmVNFj5YrjoGNpH&9jq_Wvb_`TjYAs6?7Ss7Z=*Nz&NdXh(HVbF5)~0AJM% zh4CFuC|m=DmS7ZRYiI~2sT2h-V- zM;1|eLtI%@S0Ya`Spcpv#3510ts&g_2TbX;L3~_Psx+*>TP54@pnzgT9Q^+OhDc~* zb2uIq;d5pcp2w@b4Drlc(WG-B&nL1QDknC^Xk8 zmVd91HsQV@+P$tKvqfW}x=Q-o>C&27ALmVC))zfC3NL}BE2@_H0>0(d==EX*-=@fe=4UYH!DPYvGGVQu-$t=sT_Q%eVt_6`h@CCzo<})YOu0oI&bH zeor_%j|xm%)M-Q^xf=nY<`W3|XXclM5ll23SRZU_ME_J@H_q~kG0a^k5a%B^@z;&B zRMJC@2B-WUa+Z$#@^Kc*okuhTT0Gp2nDLt`G!MR^yiT)6Mg`_oE*Q{_>eJ0xt^#XH*E~8kgM<#EDlku z%2cmf!}?GI&CcoR1ZBZ`LbE7+aXQnD_%L)P76@RbQ1jp_Ra)xp2$`moK_`^<_In~h fS_V- + +enum { + NOTHING=0, + DATATYPE, + VARIABLE, + TERMINATOR +}; + +int seen = NOTHING; +int check = 0; +int line = 0; +int offset = 0; + +%} + +datatype int|float|char +variable [a-zA-Z_]*_[a-zA-Z0-9_]* +terminator ; +character . +eol \n + +%% + +{datatype} { + offset += yyleng; + check = 1; + seen = DATATYPE; +} + +{variable} { + if(seen == DATATYPE || seen == VARIABLE) { + offset += yyleng; + seen = VARIABLE; + } + else { + seen = NOTHING; + } +} + +{terminator} { + if(seen == VARIABLE) { + offset += yyleng; + seen = TERMINATOR; + } + else { + seen = NOTHING; + } +} + +{eol} { + ++line; + if(check && seen != TERMINATOR) { + printf("Error at %d in line:[%d]\n", offset, line); + seen = NOTHING; + check = 0; + } + offset = 0; +} + +{character} { + ++offset; +} + +%% + +int main(int argc, char *argv[]) +{ + yyin = fopen(argv[1], "r"); + yylex(); + fclose(yyin); + return 0; +} + diff --git a/LAB/03-02-17/syntax b/LAB/03-02-17/syntax new file mode 100644 index 0000000000000000000000000000000000000000..d80f31c4f7b575c46aada9fba86c94fb77683d81 GIT binary patch literal 24433 zcmeHv3wTu3z3-k$HiVdD0uqTzU{rzuA&~Ge@lkg|26t?rQ4`-V3CRSadGKXskXZ3x z2bA4SELN_i*0$KIUSGAG9;F=hlkgn$(l%Obqs3#is51t=DAbeoQ0M;s>#=9gPQvj! z-*@l#-S4_!_J6J4|FPEkueJVbzq0?ySF_mdaw#&om2W9jsvV~>h#wUtzmgRNR;G+o zG-Zl%zA^@gil4?fM0rlqAz@n53?Y{WnvP$Yn*(KTjb$XA%wa`R*+QaJUovST%V~2t zFG{K?UIvgJwKex!tO(k`GLk+g+M!d!Sn{$X!K7Ct^ooR@q!w^Gc%7(kG{2k>^+_s< z%AB^=6$|IjX=|R{*4hzXJ9}-}!r2Sw7Y93wOIg3kKFMCaw4T)@{g{suwRs|bKk**zcA%A z;SAexJMt53Wtp8f3jX6!@F}C-XqyRYZSb76nqKr@yfYMuhxK^qR90`^M>$44*XVu_c?F{^RtPj<3c5{ zwl$=51sdDhI-8VWsJXR6X$>}pLft5IwFNqq_CR|u5K{d9Kv!2srypXCq1Mh0rKv5@ z*aeJ~I>RBQ-7-O7ODl9cm6kiZT0;S)1r;x0Nj=BogISfSFWz9u3Y3VEiNryfL^&r_%|9#>xBLxzTrnHd|vA~ zl74{~m7%K|SdP{bjfqUs&lFQ>ZOJ74Ot@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y@8tVeOndS!3w)f)@ln z9{t@V`h{k*bT`A#RfZh+_eZh+GhzSVg#DAk4qYdYG+rMI`71LuCdrydC3;fR)Xw1Uf!p?)hy&`WXPYC(s1IR!bHci~1X2&LUs&I!R?AO3eY*Bx-Vd0C(O2Q+`EbkhO+H znpWK*r8{t^p4y0Z_`AYw0YAN5-rh*v3v{+wEP7Xdbyr|bYiBsfd&b&PLe?Szt=koKxVDI?TM@u`qYQN1of%b*zW&YM$S!D0_Cso*d;ZvfvBz3Su zf!Z?qZt3Fc8Xv2h*i4?!;vlT}7hhMg#OL=dt-?y+%R=T;W@5AAuey0@#gghpkg{>a zM7X-jhCFk1lZ3#poB|0b&cmJ;f=?X~^drgrGT z1Gdk$4%1-+W&e|cWIy5L>bfNuX}N&wmMo$bUDvpxEg(Monre@pm{{`}mgzgLwdCIt z3_Oigb6`byTq*~06| zZYur&d(zY0jStYm7A>;mpDSSQz>BxADcBsK=p-r`$vk@&#lM@I+Qe@B@=NTI8`~a`h z5N0{*qPcAw+U{=p-mm`_tS9!(U*;cL4=ruUF&M!;;`_hOI!X|@Xm0TSvDpHIMu{Vs zhN)iyMq`4V{#A_~&6tMrGsF(7SgLHM_`~e)ec0EC9U{pUMQc!ezt|xozEtc$*&N|x zfWhwUMw{_xMi?1<^LV9VEr1e4R@O0~YvebU9j5$vyeJgd2awt5lM-Ak7Y@0CEgXt^ z6!cbiu1=Zh5WHrM|2nbFF2W`d#I_4rD{type} { BEGIN WS; pos+=yyleng; } +{ws} { pos+=yyleng; } +{ws} { BEGIN ID; pos+=yyleng; } +{id} { BEGIN ARR_COMMA_SEMI; pos+=yyleng; } +{arr} { pos+=yyleng; } +, { BEGIN ID; pos+=yyleng; } +; { BEGIN INITIAL; pos+=yyleng; } +; { BEGIN INITIAL; pos+=yyleng; } +. { pos+=yyleng; } +\n { pos = 0; BEGIN INITIAL; } +. { printf("Error:%d:%d\n", yylineno, pos+1); BEGIN ERROR; yyless(0); } +%% + +int main(void) +{ + return yylex(); +} diff --git a/LAB/03-02-17/syntaxerrors b/LAB/03-02-17/syntaxerrors new file mode 100644 index 0000000000000000000000000000000000000000..cecd93cffac2c1308eb54c044d061a2ba04fc038 GIT binary patch literal 24646 zcmeHvdwf*Yz3-k08$uwN@Q4QFF)GoZ5EBFpYIO$~oY5Wt)8f zQc+FwGC+FdYyM@N1g+(WqK`>G){|o#ynH2?^opfkvD8zvPdcWkDj$`N{%WM%8n=NI zr41t5a=xZ0$x^6(J5o>ao>ESN8XQryM&_re()$|p$j`qwgP8#wnR71-&nqQ{^Ert;ntD`TyC;YvR7QSigQx+Scnw)JQaUb)x`Jz zp!&t1j=%AtaT7k7|M{w4dZzW?cZ7Ha_#+!!E|*u^;>vdub{hUD%$<4HjD}Ug{3Rb) zs+$OgxhpFaw|brgKTDEQ7%@Xk^2hk<+Xml>`E zFjD=rj)DhA!L3nnYO9g#Q~wwVpD+r(VHEsY;FGjzTAxvin5L=mHw$sX`!n$M5+BIG zHT35?>b{G$(8k7y*3jA(YSG$5!KS9xIxQTjZ*0*T!@)?T1Bvz~@R~!-;ZQ^i1VZiY zEv*5F1tX2EEm~buDA*2+lv<;(RM*rR4r$G{CE_(S!bGdqaBF*GB&0PUpL(sKt-Y}& z(x3$@uMVsWMe1OhoC<^^!S+a?IS3CLpxX-V_D~4ib=D?lxywQQ@Dq+wq4m{6+cR6s61K;7mRa+B#mjj>V zkl*dVo#XXE2R_9izsG^o9It}E^H{du(zjjY)%@FfBYOM~;P^WaWgk=$f+iQWLnK)g z!PPU{K#bBfYPG~b5~1i8N>dj}^l^GErKxKqdO5wC(pi+=!|7`%O9eznlw?$>B*F) zrc8J_okMAA!bCo&-IS)LOK6<_Y%$W*WQpT{1yJ+>rKzbB1DrleX=G&N14 zm(#COnwliB2kEl+D$VC^_M30|JKs89T~itBZ7Vi3e{8?TBzE7qh88~;`J8C*%wCRt z$IEEIRsQ*XApXvwJiqz&t?o4kdti?n?!=mX#7Yi$W^W;^hf+#@|4{pJDx{-c-s z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cmV?d00001 diff --git a/LAB/03-02-17/syntaxerrors.l b/LAB/03-02-17/syntaxerrors.l new file mode 100644 index 0000000..c3f951d --- /dev/null +++ b/LAB/03-02-17/syntaxerrors.l @@ -0,0 +1,78 @@ +%{ + +#include + +enum { + NOTHING=0, + DATATYPE, + VARIABLE, + TERMINATOR +}; + +int seen = NOTHING; +int check = 0; +int line = 0; +int offset = 0; +int function = 0; + +%} + +datatype int|float|char +variable [a-zA-Z_][a-zA-Z0-9_]* +subscript (\[[0-9]*\])+ +terminator ; +character . +eol \n + +%% + +{datatype} { + offset += yyleng; + check = 1; + seen = DATATYPE; +} + +{variable} { + if(seen == DATATYPE || seen == VARIABLE) { + offset += yyleng; + seen = VARIABLE; + } + else { + seen = NOTHING; + } +} + +{terminator} { + if(seen == VARIABLE) { + offset += yyleng; + seen = TERMINATOR; + } + else { + seen = NOTHING; + } +} + +{eol} { + ++line; + if(check && seen != TERMINATOR) { + printf("Error at %d in line:[%d]\n", offset, line); + seen = NOTHING; + check = 0; + } + offset = 0; +} + +{character} { + ++offset; +} + +%% + +int main(int argc, char *argv[]) +{ + yyin = fopen(argv[1], "r"); + yylex(); + fclose(yyin); + return 0; +} + diff --git a/LAB/03-03-17/expr/a.out b/LAB/03-03-17/expr/a.out new file mode 100644 index 0000000000000000000000000000000000000000..d30162bef6b1fa4b2081c177807062b90a002d11 GIT binary patch literal 8500 zcmeHMUu;v?89%lY2n8IIu`Y!UtPP};HEt48X4ZARPGY!039#U_>$Y&?#D;itY-C@z zp{pobppw6lmx%}n$lW>p&=($>hwCXP|8qIwF>bj zwNb4A+=xf)3{Ht$;G#t~aWMhN20T%}14R9XPKbQaft5({kR;Vt4F)G2`35@1p`cbFM|DDE8~f40Qh1~iuZ?+a%o91sj)|1^QQPQAaCr&80gZHngzD3ARgx`* z{nzXirO$99&omkYLw97i)|3({ysv}DO=pY$EJB<;#Pxkrzue~biDXqhlFf|m=zb)d zYR_hJrK$F*=#KUs-H~EG(xux?<&*91y~DaD>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e@898PRV{&i?=N9Q?>YKl~=52K9GZjx~Yaxjx)Zy#CYj@T;||!_)r}#z#GP zjPY|G{3%_2)lVOE3WxCc)YASu1)S===qcwlZNGF}W`Ngg7u8b_zo5%mr)E|dNL9mc zkgV4aWKpl2KWb{rlKF5`m$P)-@36hxU$u&81swI!ZO}804+3vNKhWP33bM^S3_Prn z+Q`)S(s^9uk*L64o|zz6Yg54 za^83yIJK946H!R(SgFgvLzw4=r<}Lh-n&2ij_tke{VUtk|0fEv{l5=9tdZJi0XX^Z zEvEqkQO|x8@D|(@mh5li1-odM@P}p`zyJ314p{^J2NIU0Qt3kaaHfdMsAW%D~!`b{;GHa#me4%J1OH&Fryd&APolZq|?ELa}lw8NiqPwPZbF^?9EF4wN zT{BghoIDDOOS9;TT4QRbi?()o*HCOQZpHWZ!DpudlCI&Tl-2k2-q>J&FRWZS`tPT* zb`R|9i49o$cI`S4Pgsdq&p@1t(?3YZizV%|{^{5Vxs zT3>aUmF_9^Z)f-qIsgCw literal 0 HcmV?d00001 diff --git a/LAB/03-03-17/expr/expr b/LAB/03-03-17/expr/expr new file mode 100644 index 0000000000000000000000000000000000000000..fb76ee66d9a131278964dc81c9872684e87f205e GIT binary patch literal 29495 zcmeHweSB2ax$d4xHiQ6~0EtEcom#1Y5D8xeDYBqGk+7*M?{-DC-u2L9J^#@oUkToz${Wou zIja7es$z{xni|(FUU*4U{oJO;=2-jO_R__37cVSsYbl;D+D-eEy=FzND9QFCa;$R! z{^@G+cXs{Z<;X21GuOWG=&IdQ=9EtT-m|;NI|u)?A=>4dXKZ!lyNR8Pe~yb;)9;H1Tqu5yh+>8IrqiPg8vq!<7gMpFia~*JRrg7x`qu7}?3VswiBiT=mf)|cr z=dn@bFBnDsFQdr63w#nrv{}HwAA9uWxLNh9k?GLTzo~HX~SBvpiTIjwrZh z`Ld>#=5S4DT~k={M&_(qu`*iP*wPkU7itSHtZZ(KR+RWR8NuQBGUBLLovc!8EZSy7 z!l9<7mO2A0AC<2TYT4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xq&ZIs5; zyS%D5G0$1#c%l>S2Z~2&(TkfSA+Am(SVdSqUigQXb2W0>Yzj4z2!MTyZcJ|_lyoo{7T;e`FAhuRAz +extern int yylex(); +extern int yyerror(const char*); +%} + +%token UOPT BOPT LOPT ID NUM + +%% +all: expr all + | + ; + +expr: '\n' { puts("[nl]"); } + | unary { puts("[**[unary]**]"); } + | binary { puts("[**[binary]**]"); } + | logical { puts("[**[logical]**]"); } + | opand { puts("[opand]"); } + ; +unary: UOPT opand { puts("[UOPT][opand]"); } + | opand UOPT { puts("[opand][UOPT]"); } + ; +binary: expr BOPT expr { puts("[expr][BOPT][expr]"); } + ; +logical: expr LOPT expr { puts("[expr][LOPT][expr]"); } + ; +opand: ID { puts("[ID]"); } + | NUM { puts("[NUM]"); } + ; +%% + +int yyerror(const char* s) +{ + fprintf(stderr, "%s\n", s); +} + +int main(void) +{ + yyparse(); +} diff --git a/LAB/03-03-17/expr/test.c b/LAB/03-03-17/expr/test.c new file mode 100644 index 0000000..55af582 --- /dev/null +++ b/LAB/03-03-17/expr/test.c @@ -0,0 +1,7 @@ +#include + +int main() +{ + int a, b; + int c = a+++++b; +} diff --git a/LAB/03-03-17/ifelse/g.c b/LAB/03-03-17/ifelse/g.c new file mode 100644 index 0000000..99f9bba --- /dev/null +++ b/LAB/03-03-17/ifelse/g.c @@ -0,0 +1 @@ +if(a+b){a+c} diff --git a/LAB/03-03-17/ifelse/ifelse b/LAB/03-03-17/ifelse/ifelse new file mode 100644 index 0000000000000000000000000000000000000000..3142924bc8ad741fdbd324d2694a695a994ae573 GIT binary patch literal 29499 zcmeHw3wTu3x%QqUn}md9!X*$9WU8Wo5EDQQ-a3JdOf+Hy;swRYkW3&oBxy1Ogce0Z zl<62nt1a!ZEk~_Kt*snuDfOrc7m2mDhE`itJf@b~8AFd$5z`jUdEa%}vuBb}`#;bB zKYjkk4ViC!?{``EZ>_!e?Af&@}uNr%0eU#Vrz=PLi;psV*TY^NSyDm6UYSBFSoM z7%lWhK}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C$W#u0F5@Mk*=VuGN_%2;ia)rm|SzOAu z_J|3u(rVOQdFiD~JSaChO+ZQJ$*=lJ5-%^p(8tu3bG@;3tK=)t#KjQ84lJgj%JS~0${ zU6~)-RmD9_U%r>AVy%32RI+bW+BQwmGIW71;cC}1Vn~sDw=Qt)bhRIs_N~z>B6ftCo$Mn#G2%a)zFv8#wXDjOJ@FxON z4IdBJ&lV2V$w{xjO3KoQTkC2{wzlF0R%l~}xr7HC<70yX4=uy$qh;ba&4BYM%7ju5 zRUVEm@v5yg(wTanSH)WLoJF>$7*T(qczhJSxUSjH)u{-p2=m8F|L}sYI!>Fl{(2Gt zuy4_giM3=LmU9zbX1)I_Q3sx_##g}?dAGLWdD~{LlFV03R*?<*PrMl{(TA!^BIpZ< r?=YyBhb77oF!AcKIEL4Q$(NGFA;wkTa*P0GUe~Y|? +extern int yylex(); +extern int yyerror(const char*); +%} + +%token UOPT BOPT LOPT ID NUM IF ELSE + +%% + +stmt : exprs { puts("[exprs]"); } + | '{' stmt '}' { puts("[stmt]"); } + | ifstmt { puts("[ifsmt]"); } + ; +ifstmt : IF '(' expr ')' stmt { puts("[if]"); } + | ifstmt ELSE stmt { puts("[ifelse]"); } + ; +exprs : exprs expr ';' { puts("[exprs expr ;]"); } + | + ; +expr : unary { puts("[**[unary]**]"); } + | binary { puts("[**[binary]**]"); } + | logical { puts("[**[logical]**]"); } + | opand { puts("[opand]"); } + ; +unary : UOPT expr { puts("[UOPT][expr]"); } + | expr UOPT { puts("[expr][UOPT]"); } + ; +binary : expr BOPT expr { puts("[expr][BOPT][expr]"); } + ; +logical : expr LOPT expr { puts("[expr][LOPT][expr]"); } + ; +opand : ID { puts("[ID]"); } + | NUM { puts("[NUM]"); } + ; +%% + +int yyerror(const char* s) +{ + fprintf(stderr, "%s\n", s); +} + +int main(void) +{ + yyparse(); +} diff --git a/LAB/06-01-17/dec b/LAB/06-01-17/dec new file mode 100644 index 0000000000000000000000000000000000000000..5f13bbcb2459f50382fe8f7cf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4fY` z{^_Tyi_VSZqiD1E{F{?J**23SeQJ!XjIBZk@efqgPx2gFc}Q)xLMY<}K6wCcwhT_0 zrZaD8zTizkbQRf`N9tyaQlF}NWvyLZeCBOe7tY_s5V9d|36FC6r9M5tJf?hRZl-BO zm2|gvbx@Ne|s4o}XMra(+#ljaJBi;i&46p)82XJVlc)}; + #include + #define SIZE 1000 + #define WLEN 50 + + char ints[SIZE][WLEN]; + char chars[SIZE][WLEN]; + char floats[SIZE][WLEN]; + char rests[SIZE]; + int intc=0; + int charc=0; + int floatc=0; + int i; + int k; +%} +word [a-zA-Z_][a-zA-Z0-9_]* +int int[ ]{word} +float float[ ]{word} +char char[ ]{word} +rest . +nl \n + +%% + +{int} { + for(i=4, k=0; i%ABT$m1#{2lw3aODEyY>NnlBy$r(+jNmyvAJtRu?Ws|A0l3sO|ENUu5 zfC17YUrWyAB4`6=G<{V0vHr6vqx7gmdgV&5T3m)q0nPk1T^U#akeIk>=l zZlvjZhKR0hjf>TZcuaIgBW-ORjUpCrYHb&-u}D1Lg+garv|X%r(cD8qf zAr^_ZcC?GewrHdi7%6om;$oFH(Fp+piPzi;6CI-Yy3W>kR5YWWCeggQv$Z|mEW*_n zhgU}9jWA6Kx^Q>=47qUfNvB#DuIC!@E_dPR zI43o@@InU_qQ!;NoY!f!3wQVPS{GiVg+bT5@M0I<QkUHEvHe4h(< zuj6}N_^~ee%`Ti`yiTF+0|g=5*!Zb{2yN_-8>wf(33cx(*r_EX%`EPONM>dnNB;~H zIV!ghGd++&n)wAP(-cYXkAmb z`q13HAffKV#UbnU>+-JNxfS+!;0|5AjaZoh|BUs7ZKaZy-+nkB@*!(SX#1O=4*B+m zo<5v_@*^Y|+W1WT(A6Ppx72?{>90TMi||(@#@9nLbt4?Pdbe>6Am6(?Y5YUo=d4`_ zf%x%`3lrhsWtH`nb(dnkmDol*3~lW9Z~QqNNE%m> zS>$Zv^Nc47lSYlgFgM>`9H1s9ijn^{^F3!J8&K}8mOLF4VA@xUwN}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F{C#W<@45h|dJii9b$k|$o$**4uV_`!2P!XEeo45d`qH{^Sm3*s(Uq++ zyh;|1uL?J|b+kw61DZpiaJZ=>yt1uhMWij<6z}Mag(Hcz0(YBNw?*U8riwF`erh2s z4{b{Kc2JG<~9OuFyglvuT@3o5Qsm~NMQM4O_GZIMp?L}v`H<83ebl9znX zDje@vJp@}7S(}Sdxuv76DNOG_QK6l4G0HZQ#W0)UoArSB)1Aa?YHf1ryRJ3f*b>I4 zJEI-V#EUdGMpwrv7iGUzMR8Xjr4^A_ly##l){Z;>KpR`GCDIm&p?$2`+P;!1!goZ6 z;*G02$hTqMEMwu0NY*WFfnI`J-5Fie+L4H5?V`8C7uDB<chO=v-?!x7?66zu=+M?= zC+a2nFeimopH%57H{KC+9^ zVnbXlnRC7HsK=6rkH3=ZHH}D;?cuI28X|1~&Boe6k*c7t>yFT@>SvqZD8%9MZ(V*w8nby#n&v$zCiR#(L9X vgchRSe>}^utLwVX$ZCFtl|mVfzMkil=T*#o$?X6S{&moIpXt-h-U|N + #include + #define SIZE 1000 + #define WLEN 50 + + char ints[SIZE][WLEN]; + char chars[SIZE][WLEN]; + char floats[SIZE][WLEN]; + char rests[SIZE]; + int intc=0; + int charc=0; + int floatc=0; + int i; + int k; +%} +word [a-zA-Z_][a-zA-Z0-9_, ;]* +int int[ ]{word} +float float[ ]{word} +char char[ ]{word} +rest . +nl \n + +%% + +{int} { + for(i=4, k=0; iAzUR&bq6vy(Lkdl)>3g2k_m|>8Jd|1#ESA6 zK(?D$KD8cd^+>I!k6LRv)>7(?aFI~8HlA7!D)vjg)ER;`Dtc1I&iTFXT5HdqNkV7H|2IG?zdZQJSHh zp-s|80MYShFo&o}DLNocE1D_g(m^xuw;)Xb3(^cuC^}idnxe`>qEueuGGtQFSLchY zqVSvn(j#AUFX1d`H769^E&b>v$N2K_C&8pwAoU8Qo}xX{F-2AVsBZLEDeYFK8OTxI zAflD>XM&O}T@~+z>nL3}le3@(Clqax`Bkr6DR`AEZ@9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100644 index 0000000..5b6b693 --- /dev/null +++ b/LAB/10-02-17/in2post.l @@ -0,0 +1,79 @@ +%{ + +#include +#include +#define SIZE 100 + +char stack[SIZE]; +int stack_top = -1; +int precedence(char x) +{ + if(x == '+' || x == '-') { + return 1; + } else if(x == '*' || x == '/') { + return 2; + } +} + +int isemp(void) +{ + return stack_top == -1; +} + +int push(char x) +{ + if(stack_top < SIZE) { + stack[++stack_top] = x; + return 1; + } + return 0; +} + +char pop(void) +{ + if(!isemp()) { + return stack[stack_top--]; + } + return 0; +} + +%} + +word [\-+]?[0-9a-zA-Z][0-9a-zA-Z_]* +operator [+\-*/] + +%option noyywrap + +%% + +{word} { + printf("%s ", yytext); +} + +{operator} { + if(isemp()) { + push(yytext[0]); + } else { + if(precedence(yytext[0]) > precedence(stack[stack_top])) { + push(yytext[0]); + } else { + printf("%c ", pop()); + push(yytext[0]); + } + } +} + +\n { + while(!isemp()) { + printf("%c ", pop()); + } + printf("\n"); +} + +%% + +int main(int argc, char *argv[]) +{ + yylex(); + return 0; +} diff --git a/LAB/10-02-17/posteval b/LAB/10-02-17/posteval new file mode 100644 index 0000000000000000000000000000000000000000..f704318e0a88d25713c7602dfc9d2e16a5ca428d GIT binary patch literal 45990 zcmeHwePC48(f7^ABJz<0BpMMkRqz4%FbM&J(z<~xZZNTtBuXu~S&|KGO|miBK;i?6 z29$M)rPj98(mu4ct!=5LeJrJFB|s!-sg2g!XsJytZ8wHisysHewEO;M&YZhfHXU?2CbI#su?s1hZPfbZN^pk3Q$e`N3Oedq%Ps7;L!d1Z)8Rr{L z<1%BKF$Ne1{yCXKP?aRb@ z_*GRy!^mX>wIf|4ja&t+;ev)`q!6B6rtn;@lX}!{Y!g=jYq+4{X;Dl=Jw6&6{i~Ak zRi!#nqq>uTQNllCka+2-_-(L`$}?7S70}5A4Oa`JhPvI&Xh(XU>yssnE2Y0=cF7U_ zHI(5RS2y_AE-Jjbp>AG-zp1T#UVG7^d5a3?w+7}H@VH4n@!oJ#HTR_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5?d_gs{4RX}e;mdi?C@;Ji*v;KX6#eJ`VphzFmE0JMjK;% znugn%5pzDuF-`SQ-L%nH8jnlWLiEbDYXj`Q319jq(SdAiBAolT* z +using namespace std; +stack box; + +int eval(int a, int b, char op) +{ + if(op == '+') return a+b; + if(op == '-') return a-b; + if(op == '/') return a/b; + if(op == '*') return a*b; +} + +%} + +word [\-+]?[0-9a-zA-Z][0-9a-zA-Z_]* +operator [+\-*/] + +%option noyywrap + +%% +{word} { box.push(atoi(yytext)); } +{operator} { + int op1 = box.top(); box.pop(); + int op2 = box.top(); box.pop(); + box.push(eval(op2, op1, yytext[0])); + } +. { /* Do nothing */ } +\n { cout << box.top() << endl; box.pop(); } +%% + +int main(int argc, char *argv[]) +{ + yylex(); + return 0; +} diff --git a/LAB/10-03-17/Makefile b/LAB/10-03-17/Makefile new file mode 100644 index 0000000..7a0542c --- /dev/null +++ b/LAB/10-03-17/Makefile @@ -0,0 +1,12 @@ +%: %.l.c %.y.c + gcc $^ -o $@.out -ll + rm *.y.h + +%.l.c: %.l + lex -o $@ $^ + +%.y.c: %.y + yacc -d -o $@ $^ + +clean: + rm -rf *.out diff --git a/LAB/10-03-17/inter.l b/LAB/10-03-17/inter.l new file mode 100644 index 0000000..225a428 --- /dev/null +++ b/LAB/10-03-17/inter.l @@ -0,0 +1,22 @@ +%{ +#include "inter.y.h" +#define YYSTYPE char * +extern YYSTYPE yylval; +%} + +WS [ \t\n] +UOP "++"|"--" +OP1 [-+] +OP2 [/*] +ID [a-z]+ +NUM [0-9]+ + +%% +{UOP} { yytext[1]=0; yylval = strdup(yytext); return UOP; } +{OP1} { yylval = strdup(yytext); return OP1; } +{OP2} { yylval = strdup(yytext); return OP2; } +{ID} { yylval = strdup(yytext); return ID; } +{NUM} { yylval = strdup(yytext); return NUM; } +{WS} ; +. return *yytext; +%% diff --git a/LAB/10-03-17/inter.y b/LAB/10-03-17/inter.y new file mode 100644 index 0000000..d9d3a4b --- /dev/null +++ b/LAB/10-03-17/inter.y @@ -0,0 +1,32 @@ +%{ +#include +int t = 0; +%} + +%token ID NUM UOP OP1 OP2 + +%% +expr : expr OP1 term { $$ = malloc(10); sprintf($$, "t%d", t++); printf("%s = %s %s %s\n", $$, $1, $2, $3); } + | term { $$ = $1; } + ; +term : term OP2 fact { $$ = malloc(10); sprintf($$, "t%d", t++); printf("%s = %s %s %s\n", $$, $1, $2, $3); } + | fact { $$ = $1; } + ; +fact : ID UOP { $$ = malloc(10); sprintf($$, "t%d", t++); printf("%s = %s %s 1\n", $$, $1, $2); } + | UOP ID { $$ = malloc(10); sprintf($$, "t%d", t++); printf("%s = %s %s 1\n", $$, $2, $1); } + | op { $$ = $1; } + ; +op : ID { $$ = $1; } + | NUM { $$ = $1; } + ; +%% + +int yyerror(const char* s) +{ + fprintf(stderr, "%s\n", s); +} + +int main(void) +{ + yyparse(); +} diff --git a/LAB/13-01-17/in2post b/LAB/13-01-17/in2post new file mode 100644 index 0000000000000000000000000000000000000000..9ab8209f7ac0d92755fda3f3df2b74e625c30b97 GIT binary patch literal 24191 zcmeHv4Rlo1x%Qb%4ul9v_!*5NFj|9%Bp@OZwR!>>oX}{aCf2LsBqS3OO)_zQkfG|%JF)Rm`Qsu8z&oWYRz)-?ZOW+k>r z8>boCbZx3O28fQ2!4je(rRcD9t!RPN^MdB%vnWphi}DOkD0;epHAPhkiBf*q%aBPy zTNVmdQIwnkvZJz=T*@qHBPSHyAM0S<-Hnv{Uq;ESRFIepEO5)Jwnh zc?LM*4I)}Ke`hJ_(pC3PyoJ(7E0_f}IH72V%ui8ecNOfYoL}}Tk&0K#{6>q*kjzg} z$!c>u+E*-GFt?+nyraD#iQU4kAlw}1z$Z1UOozb*C_acQSkdm!Pkz0KMCBAPwrI< zV5B(QJPLl}DEK|2;MCqD`9EnC{MJ!$>O~W^Q?&u35h+bmi)ExQ2e) zOx<*$7GB*R*SZt&=C-D&77aIbbVQo9SiGgZOKXoc#p69-q8;Hbtux#i3&*ukC>)J; zMM6+(inm9)w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4fm40g$@;cPVZHQoQBJ!rXWZ#Qq$8u?N%D{WmK%rrf%}hl zqdmrcCTQDbzH0pbi^Tt@#8tg^GJgDh$_rBeoS6pa@|eu)m%ypML$d#?`BrO=#$$23 zI$A-8L@rx$b*Q%Hn)*;kYY9igE8AmuwKWv)3^jK|y23G>UU?i83bjN+D?1`9nmR%) z@klflYD%ou@MO2UBODL6R4lB#@O*e4K`BJfn8g$05S{`@dvF*fJ!5W3bawW@#KDE= z(X>moy=#7VBo;@h@dB!N?^L|{8Hz``kHb2fR_9{Gw?#TyLVPSIm@ZDm2yZ5jA$G&h z!~yZinIvmzZ?W^ctsRGYhH!FbIMPb8rsn2wcbrmTE>~w556{7^Xo`i|Hq2^Wc)$*{ zx$PDr9ZfM*jV;@|R#HYd#`Ac*8Px?m!pp9#9BIlHOL?I8a=WA9Rqc^PEbAA64qe$$ z8;VDpy12GEukVsOetVdXA;k%yJv|9}KUlmaOhRr85ptUq9Uz8QTY7cX6@gIT%4+l> z(VO=Kai)#ZR$}A>A9*@X2 zfH5Cz+8j%8cY;ndEPT+(riS4>%M`I_4!4B6n#1ZiR<}I&;8nM@r-uSX=dXrp>aPf8 z$4C7YOK5b|H?8Oh%OhIdmh_8<>_8}5^DW#(#rdmlMR6Rg8{-3A-4LH0>xM#M{#m7` z2PeCVK!`JC-CCjwE#Vc3l?W97&_nSO$H|H#V{;8cu9vZ4g=3iMxLN8Xcv~D{AZOy_ z+FV3r;N#cXn%`WvfD0%k^LhCb1aS2kzd`rEvT~ wHsX|GHx>$E1gRN=hL&1oTmwtAsp`AbzC08;LR?lv5zQZ=)08nbqwYNZ6Lh=bVgLXD literal 0 HcmV?d00001 diff --git a/LAB/13-01-17/in2post.l b/LAB/13-01-17/in2post.l new file mode 100644 index 0000000..1774161 --- /dev/null +++ b/LAB/13-01-17/in2post.l @@ -0,0 +1,79 @@ +%{ + +#include +#include +#define SIZE 100 + +char stack[SIZE]; +int stack_top = -1; +int precedence(char x) +{ + if(x == '+' || x == '-') { + return 1; + } else if(x == '*' || x == '/') { + return 2; + } +} + +int isemp(void) +{ + return stack_top == -1; +} + +int push(char x) +{ + if(stack_top < SIZE) { + stack[++stack_top] = x; + return 1; + } + return 0; +} + +char pop(void) +{ + if(!isemp()) { + return stack[stack_top--]; + } + return 0; +} + +%} + +word [0-9a-zA-Z][0-9a-zA-Z_]* +operator [+\-*/] + +%option noyywrap + +%% + +{word} { + printf("%s ", yytext); +} + +{operator} { + if(isemp()) { + push(yytext[0]); + } else { + if(precedence(yytext[0]) > precedence(stack[stack_top])) { + push(yytext[0]); + } else { + printf("%c ", pop()); + push(yytext[0]); + } + } +} + +\n { + while(!isemp()) { + printf("%c", pop()); + } + printf("\n"); +} + +%% + +int main(int argc, char *argv[]) +{ + yylex(); + return 0; +} diff --git a/LAB/23-12-16-practice/first/Makefile b/LAB/23-12-16-practice/first/Makefile new file mode 100644 index 0000000..b26a167 --- /dev/null +++ b/LAB/23-12-16-practice/first/Makefile @@ -0,0 +1,7 @@ +do: first.l + lex -t first.l > first.c + gcc -c -o first.o first.c + gcc -o first first.o -ll + +clean: + rm first.c first.o first diff --git a/LAB/23-12-16-practice/first/first.l b/LAB/23-12-16-practice/first/first.l new file mode 100644 index 0000000..3972db6 --- /dev/null +++ b/LAB/23-12-16-practice/first/first.l @@ -0,0 +1,13 @@ +digit [0-9] +letter [a-zA-Z] + +%% +({digit})* printf("id: %s\n", yytext); +\n printf("new line\n"); +%% + +int main () +{ + yylex(); + return 0; +} diff --git a/LAB/23-12-16-practice/nochars/nochars b/LAB/23-12-16-practice/nochars/nochars new file mode 100644 index 0000000000000000000000000000000000000000..92a16d0940fe7a4dd94d675cddce1291e89a1117 GIT binary patch literal 24029 zcmeHveSB2ao%fxYT!=t20U3=i$f$&Zk_de~%uaAG5*lK763A(=olWH2*>#1^Fn zlA zie_l%XlH3-fav%bEFmg#iVjKFiWW*eA7}wSm0kf${#VlweXB2%_*5f9s7^fhA6HIn9q}>c@r)Zz7n4+qE)HeFmO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644 index 0000000..f7845d8 --- /dev/null +++ b/LAB/23-12-16-practice/nochars/nochars.l @@ -0,0 +1,23 @@ +%option noyywrap +%{ + #include + int i; +%} + +%% +[i|n]+ { + for(i=0; yytext[i]!='\0'; ++i) + if(yytext[i]!='i') + printf("%c", yytext[i]); + +} +[a-zA-Z]+ { + printf("Invalid string\n"); +} +%% + +int main(void) +{ + yylex(); + return 0; +} diff --git a/LAB/24-02-17/for.c b/LAB/24-02-17/for.c new file mode 100644 index 0000000..f5eb4a1 --- /dev/null +++ b/LAB/24-02-17/for.c @@ -0,0 +1,3 @@ +for(i=0; i<90; i+=9){ + printf("hello world"); +} diff --git a/LAB/24-02-17/forloop b/LAB/24-02-17/forloop new file mode 100644 index 0000000000000000000000000000000000000000..4cb011380123e27d32824b03b3106f8cefaf855c GIT binary patch literal 24497 zcmeHvdwf*Ywf~tJ4unV^P(~v17?ogng#-bKXgz_9PHfN=6R%ovG9(j{8Z!B0W{_a9 zTqDZqA&OpFscrAi`cZ#sEg!C>lv^K!hYYo^*!sY#_eQVijKLNKy=g_~e%IQ2&zu<& zE}#CBv) zqcuaDqMfUa1ft{LU=C4HQgl$7Ry0S-xj;wYf00uFi<|}*6rChsO;P0`QED%J7_unn zQ;S4ZQFzV(>5;F6U*#%j0~ZwCDg9_5r}*&jC&8pwBK1n7o}zuyF-2AX$PE40NxOAU z12w7}M6@dYOjFft?U6_ml@FH-fy3nn7Zk0L?J27Cz79R|^GuIIDY#s=H(Xqf$@UbL zRc&rt>&k`m=e9M?X=`nduAQ@X(ZV?k=a+^+c5Z(z&-fS zKB@r>Wq;K$_zlD0-NWECRzul8YZ$zJ7<@VKvD!IWztMn_rm1x{8D+xbS$KoQk7eN+ z=4~TQ(}h}aZEHm9h(^L%XE4y#7HZVOk*3ymtu-8oM7mJvYzww)tAnemO>)K`js!X*{?!3A-3;9jv^#@Aa96DkwM(vFyRxQw$x{Ek(s`u|&^66DrM9wD#1Y;!U_(kHk~)Cj4vyIKnh_lFsQ`_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R& zsH+PvriCq9VCmmBU`iplH}cGE3Q}s4jSOX;zqk_b)6I0T3qO_kM60E_Ej<)NL`l9LIJ=E<tqMJO8fY4wG1d}xL zMZs_;9P+mW+M6&*)mw_QtYRVagz-oDH$wcf;w+K$dZQI8UvHcxBVS~kh4NGpLxEuk zb-`!+GzkNQS0b;{2-bCjluT#A-!RD0oFtPNbCB z5$ed8@DRLejeoh^YL{Xk2xIGoY${!d*+N;eF@ztJ;oDDoH*}^i;#JO>nBR|#pz>X+ mLo}t)CZ&!c69;#KyhbN%Gg)nX=mGVxwS5hx7-X-^Hvb3w{7+Q? literal 0 HcmV?d00001 diff --git a/LAB/24-02-17/forloop.l b/LAB/24-02-17/forloop.l new file mode 100644 index 0000000..6726cab --- /dev/null +++ b/LAB/24-02-17/forloop.l @@ -0,0 +1,38 @@ +%option noyywrap + +%{ + char string[100]; + char content[100]; + int size=0; +%} + +ws [ \t]+ + +%s FOR +%s ASSIGN +%s COND +%s INCDEC +%s COPY +%s COPYING + +%% +for { BEGIN FOR; } +"(" { BEGIN ASSIGN; } +{ws} {} +; { string[size]=0; if(*string) printf("%s;\n", string); size=0; puts("BEGIN: "); printf("if("); BEGIN COND; } +. { string[size++] = yytext[0]; } +{ws} {} +; { string[size]=0; printf("%s", string); size=0; puts("){"); BEGIN INCDEC; } +. { string[size++] = yytext[0]; } +{ws} {} +")" { string[size]=0; size=0; BEGIN COPY; } +. { string[size++] = yytext[0]; } +"{" { BEGIN COPYING; } +"}" { content[size]=0; size=0; puts(content); if(*string) printf("\n\t%s;", string); printf("\n\tgoto BEGIN;\n}"); BEGIN INITIAL; } +. { content[size++] = yytext[0];} +%% + +int main(int argc, char *argv[]) +{ + return yylex(); +} diff --git a/LAB/25-02-17/validate b/LAB/25-02-17/validate new file mode 100644 index 0000000000000000000000000000000000000000..0b2b6a684452cf5a7f78f3e4a3442512c81cffd7 GIT binary patch literal 29503 zcmeHw3wTu3+3uc6HVL;(z@$b698@d_goK+QS|^afi3W@itm0)d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fFl70;e~{tQ?iKq$!j z0`e+<5LfP7+wo!y-WRBgu3p^^6-O?}+X-o+Yxs3Re4DAbJycuEx-VZEshkrGHZ+Sn z55eV?r6uj{bz$5BiPlD{E~{;*YJgDX?DqB+e4C8P($ePQ zMN=A3`8=OvYw&o8TlN_0iABFJimS`E9&_%@knab+or zQ(v@_-_Ht0np;?n6B(;RYXxIghK2yA16>#SuGNhVk=j*3v@6_G#@*!$7cTWz2dm5GSNbWDHv8(*0r3VPBUpa*;<7~* z3k=?oQ^P^NB**6yZ@R(TZTLzX`PQ9uOuZ+kwk;|mf?(btZeL@xxAO%<&bJbs zpn`$TfrGaVt)x6DdUe1zB&FBzq%U7uF5*L*oSTtmHCay_N+=4mrWMf%Z+UWbLU1|e zNlU1;jdKixO}uO=7!}`-#k-9%TA|*Dl#U|cp)u(g!ZGg`i>m9DCjG5ZLFe!iQzqR) zaJd-o^^N#q?8#ci_(s37Jo;6|JxpJ|o2hDze0@}=Z8X|3P2m}uKo@dKp`Lm|E$70* zfm;_|5nYK05Ugu!4z5C==W-%P2?x7cs3=WCLYi|N6B@&0jeMgw<(0#Y5nVz0l)J5VQQyaFqu$RKX7t0~#uj+a=$#|(36UnWkC4F)`T zhRug(QaIIs^Bc=)wH&BE99`mdTdSop^-iyp`085vFW!w2G_@eCgc6?{Om8&Gn6_ZsI zgZ>k52TQl1nvxC%!{Rvx^#ZYU9s(v_KbFGqiZJ?Se1 F{ucynFl7J$ literal 0 HcmV?d00001 diff --git a/LAB/25-02-17/validate.l b/LAB/25-02-17/validate.l new file mode 100644 index 0000000..6f8fe4a --- /dev/null +++ b/LAB/25-02-17/validate.l @@ -0,0 +1,10 @@ +%{ +#include "validate.yacc.h" +%} + +%% +[ \t]+ { return WS; } +int|float|char { return DT; } +[a-zA-Z_][a-zA-Z0-9_]* { return ID; } +. { return *yytext; } +%% diff --git a/LAB/25-02-17/validate.y b/LAB/25-02-17/validate.y new file mode 100644 index 0000000..f33f230 --- /dev/null +++ b/LAB/25-02-17/validate.y @@ -0,0 +1,28 @@ +%{ +#include +extern int yylex(); +extern int yyerror(const char*); +%} + +%token DT WS ID + +%% + +declaration: DT WS identifiers ';' { printf("Valid!\n"); } + ; + +identifiers: ID + | identifiers ',' ID + ; + +%% + +int yyerror(const char* s) +{ + fprintf(stderr, "%s\n", s); +} + +int main(void) +{ + yyparse(); +} diff --git a/LAB/27-01-17/post2in b/LAB/27-01-17/post2in new file mode 100644 index 0000000000000000000000000000000000000000..23f0d10d5fbaa7ba8467e45518ace1b42818c52d GIT binary patch literal 50933 zcmeHweSDPFvHz2o#fU%x5{(EN6>LymlJFK3?FO>Akpxo`6fL?5$%aIeY|L&#qGG{- zWnELzdM$13z0_-4u9vH{wUkcSUWgR8ucCzwgYM^X#)vcBA+A z>F?zaA0>0n%$zxM=FFKh=j_|pTqVnsladVmBpa6+RO_4MWR&`A7~$KvD!2mUWW#Bk zZA>-B0OPSfTEjHqO94#9zk+0iC`fj4LBpvEjULpaH6%#=MIWaW72MpU zsu~(bHY2DV=^Eb1RlrIvXm~Fvgs0yWp3QYqkJ_c(%2mKhE@(I?ifO3FM`NRZ6*9hx zWG8A=cM>p)_-_;vFFj>%1!}0gYc*E^om|lH7Gcy-xBCj(k)EIT$q>d>(qAIGWQqP7 z%5aUj4fX35&Y#;*GrOU_skMD}d%?ol3+K=A`{v~HxJf?oUba#VMB6b7IMR7C{*lRv ze#(xD3oflY`IMW#TeSY;4V(IM+-WF~ zDEJ^W^_+hkKRL(syOPN}#x3h8zF{xOai2$^$fP)wAEBdo_y@ro58shM&UFd!WRL7P z{hplwKP`crKmzLuTfBL^JApn~ z3FPcez+aXCPg_sCeh(+$FHXRppMZZw0{nM?pJ+@mx^Jt*$PwT9uVJha{HD#7jM4aA zg5P7~ze4oMo#Ye=3cLtFhxS7ayHrI7>Kj}Kuz_97gB6p zXm~v98+}b4f1s)*;PDuq%iBDwyzA@z0dLE)hAO|`>o+{b6{VgUZ;PNSN|!bGn!FWN z>l(a@7N6p24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J+$Kd)46;`|d(dIc2GQBE+aYSew;# z_NxTwl^~4M{t!Kt^F0tPRW>YMdLW-}sBgkuFF85HEb@5xvI0pNZnSAzu^+W~ljl8z z(h0;UZf+p$L->e|8JIZw@kAB=jp_z(Rm%vT(RN>RP?Y)T94t=u61{JsDYCB+M0VOE z{oWSbQu2`tKkrEQu51J|j>@YE=QzlmF2XY*0;BN zn(^feKK$xweW1hBmK(FCYMZgC25N0eaR7+F&?M!>#f!bmI35`{QpAl7W@e!h(bY{G z>JbB0dHt=8G$qTH;U$<{icF*Lj(p+IhYs92CX5xMrhK*+ij>1Bk?M4zFzRfUVA8eQ zo7>`uwK@;Wj2pJl!uKK1nT#j-Yq;k(_iW^ZY}z1USgjy!@F95 O@iJGnfR)A2&Hn=N(^!81 literal 0 HcmV?d00001 diff --git a/LAB/27-01-17/post2in.l b/LAB/27-01-17/post2in.l new file mode 100644 index 0000000..254ae9a --- /dev/null +++ b/LAB/27-01-17/post2in.l @@ -0,0 +1,50 @@ +%{ + +#include +using namespace std; + +stack box; + +%} + +word [0-9a-zA-Z][0-9a-zA-Z_]* +operator [+\-*/] + +%option noyywrap + +%% + +{word} { + box.push(yytext); +} + +{operator} { + string op; + op += box.top(); + box.pop(); + op += yytext; + op += box.top(); + box.pop(); + box.push(op); +} + +. { + // Do nothing +} + +\n { + string ans = box.top(); + box.pop(); + for(int i=ans.size()-1; i>=0; --i) { + cout << ans[i]; + } + cout << endl; +} + +%% + +int main(int argc, char *argv[]) +{ + yylex(); + return 0; +} diff --git a/LAB/30-12-16/README.md b/LAB/30-12-16/README.md new file mode 100644 index 0000000..d2d61f2 --- /dev/null +++ b/LAB/30-12-16/README.md @@ -0,0 +1,13 @@ +1. Write the Lex Program to find the token and its count from input file for the following. + a. Identifier + b. number + c. Whitespace ( delimiter = space / tab / newline ) + d. Assignment symbol ( := ) + e. Operator Symbol ( + , - , *, / ) + +2. Write the Lex Program to find the token and its count from input file for the following. + a. Keyword ( if, then, else, for, while, int, float, real ) + b. Relational operator symbol ( < , <=, > , >=, <>, = ) + c. Uppercase and Lowercase letter + d. Special characters ( ! , @ , #, $ , %, ^, &, * , () ) + e. Characters, words and lines diff --git a/LAB/30-12-16/a.out b/LAB/30-12-16/a.out new file mode 100644 index 0000000000000000000000000000000000000000..55993c16d3924075cf90c87567faed2d614a2289 GIT binary patch literal 24212 zcmeHv4RloHng2VPTnLe50x}X&WK@EnN%#;jsTOY_qZ17nA@Lg~Loy-JB$G~NfLK9m zK)Jm{`M26q|J_~NwYyebOIsIN^+*6A_;K9WTAM0uqeVMo(4|6YYN@lo=l!^I?~q`3 z&)GfafBwEXGtc|{o{#tYdEa~I=HBhEzADS*Vk%{^MU1$baXN>@H)Dm1IV-U;Hje4+ zJa!Hn14P3|=MthKr|7VBt!R$abAx8%Q{F`91nQ&*Lnp&NCL39$)$?yn1yXUjEN`@aIV#IhRI+S# zYs>0|^Jlj`Z*f2XB|l$L?_zWD!QTlx9ucdTvu)sG$54Q%w^g zuzf#@{6rhCvX_p6e`gf@yixFuQShQs@O7i$#iQW&kAklq1^)qXA3m9>62M6PuzD1{ zb`*T$C^(JxNdC_l1#cMzUkZEzJDc_D^~f=%))UPe!VhNPw@SP}1810@4Ky7Wvhezr z7>kBOt*wy;)){MTX=g2+p;)X7OtdxJ&f3Clo#7Y@2E);4dn5?8P^=}=&Kg?7p(rpi zio|2A&2m9tQwwY(tZ7}eB^G8)D4>xwbwpd*V@)hrbzN{xIMx84RF7b1EEJ6e+d?S1 z3APbfN5f%A*R)02r8LN{uC7|VBsi~hUg-j~DrYoR#Wrc&>#q)@;M={n=r|$J_MR z+weRaevb{$x8YlCxW|TXv*Bv2Nxa>LPq67fYQyd8Gthk`CtzxSyv)Y}n|otgVjqkG z-7n=3wWZX8_n?w0I*f16G#xqOn@J-%m_jOgn|K=XWIyMBMm!C5vX}F(5bq{_2j}+^ zPeYr0l=IIKPeYpA#`&KRPeYl!hx1PmPeYjO;QaTAr=d&MbN&(HX~>c_oc{*#G*n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JI)L@l&r~UXl7GGj#6#hq8a5TK8r4x^E1!HZ&hSmrk$imw$Pl1BL z#z=5YYh-n(HP}dxj|D^V^$d4?J6glBaAWDh^2;uT=Mj{GbpKi0O%CD?akL9BucZ6W zjq$d&E|}Q3Al zKF4jtT&*4V-hnnW-$A4`)QOgH%a-;vR1n_!c`Dw}5uv(`@Qfi>j)cvFYs)N^Eb=3-gZLqdt zakW24g>{N9k45Adz?i=WwV^Z4XA^XyVc~;bgsSWISD$9Sht(Y|RI*RckxYL^Dn z)4z7<5}N$Aq1CNn`NmeKCH>eTCrEoFO7p2xzKzwXCteQg#Q5u7oe+PMtP=```41{x zU3kx{Xs39?tW!(0pfS8Uz6Slkf8wF;5HFV%FObbN2s$2dg%w`9OfR3MIe-<0ULa@U zJ+@BUcn5zd6q?j+vM^CpR~LT?ZC4jwev9Ez4sB1ls$t_J#b00Rbl%y~D!LJIBi*@O zT{Jp03+Q=S^Z?ciSSp3ye>+MG(~rZVRL5&^Mb%{mQBr3l*c@ta#3-v5^g3%L^}{HY z-owksDHx}RoV&W{$zm%m@C7Jd?AR V_Z_b)`WF);La$)P3XVF<_)o`U7)<~G literal 0 HcmV?d00001 diff --git a/LAB/30-12-16/hello.txt b/LAB/30-12-16/hello.txt new file mode 100644 index 0000000..fec66d5 --- /dev/null +++ b/LAB/30-12-16/hello.txt @@ -0,0 +1 @@ +a := b + s * c diff --git a/LAB/30-12-16/lex.yy.c b/LAB/30-12-16/lex.yy.c new file mode 100644 index 0000000..d7fa745 --- /dev/null +++ b/LAB/30-12-16/lex.yy.c @@ -0,0 +1,1840 @@ + +#line 3 "lex.yy.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 39 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart(yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t yyleng; + +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart (FILE *input_file ); +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); +void yy_delete_buffer (YY_BUFFER_STATE b ); +void yy_flush_buffer (YY_BUFFER_STATE b ); +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state (void ); + +static void yyensure_buffer_stack (void ); +static void yy_load_buffer_state (void ); +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); + +void *yyalloc (yy_size_t ); +void *yyrealloc (void *,yy_size_t ); +void yyfree (void * ); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define yywrap() 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; + +typedef int yy_state_type; + +extern int yylineno; + +int yylineno = 1; + +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 6 +#define YY_END_OF_BUFFER 7 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[36] = + { 0, + 0, 0, 7, 6, 5, 3, 2, 2, 2, 4, + 4, 4, 4, 4, 4, 4, 2, 2, 4, 4, + 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 3, 3, 3, 3, 1, 3, + 3, 3, 1, 1, 1, 1, 1, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 1, 3, 5, + 6, 7, 1, 3, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 1, 1, 1, 3, 8, 1, 9, 8, 8, 8, + + 10, 11, 8, 12, 13, 8, 8, 14, 8, 15, + 16, 8, 8, 17, 18, 19, 8, 8, 20, 8, + 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[21] = + { 0, + 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 + } ; + +static yyconst flex_int16_t yy_base[37] = + { 0, + 0, 0, 47, 48, 48, 48, 15, 48, 40, 0, + 31, 9, 13, 34, 31, 30, 48, 48, 0, 23, + 24, 22, 0, 19, 28, 26, 22, 24, 24, 18, + 16, 16, 10, 17, 48, 24 + } ; + +static yyconst flex_int16_t yy_def[37] = + { 0, + 35, 1, 35, 35, 35, 35, 35, 35, 35, 36, + 36, 36, 36, 36, 36, 36, 35, 35, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 0, 35 + } ; + +static yyconst flex_int16_t yy_nxt[69] = + { 0, + 4, 5, 6, 4, 7, 8, 9, 10, 10, 11, + 12, 10, 13, 10, 10, 10, 14, 10, 15, 16, + 17, 17, 21, 23, 22, 19, 23, 24, 23, 34, + 23, 23, 33, 23, 32, 31, 30, 23, 23, 29, + 28, 27, 26, 25, 20, 18, 35, 3, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35 + } ; + +static yyconst flex_int16_t yy_chk[69] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 7, 7, 12, 13, 12, 36, 34, 13, 33, 32, + 31, 30, 29, 28, 27, 26, 25, 24, 22, 21, + 20, 16, 15, 14, 11, 9, 3, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int yy_flex_debug; +int yy_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "tokcount2.l" +#line 2 "tokcount2.l" + #include + int keywords=0; + int relops=0; + int upcases=0; + int lowcases=0; + int splchars=0; + int norchars=0; + int norwords=0; + int norlines=0; +#line 494 "lex.yy.c" + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy (void ); + +int yyget_debug (void ); + +void yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE yyget_extra (void ); + +void yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in (void ); + +void yyset_in (FILE * in_str ); + +FILE *yyget_out (void ); + +void yyset_out (FILE * out_str ); + +yy_size_t yyget_leng (void ); + +char *yyget_text (void ); + +int yyget_lineno (void ); + +void yyset_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap (void ); +#else +extern int yywrap (void ); +#endif +#endif + + static void yyunput (int c,char *buf_ptr ); + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + { +#line 20 "tokcount2.l" + + +#line 711 "lex.yy.c" + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 36 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 48 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 22 "tokcount2.l" +{ + ++keywords; + ++norwords; + norchars+=strlen(yytext); + for(; *yytext; ++yytext) { + if(*(yytext)>='a' && *(yytext)<='z') { + ++lowcases; + } else if(*(yytext)>='A' && *(yytext)<='Z') { + ++upcases; + } + } +} + YY_BREAK +case 2: +YY_RULE_SETUP +#line 34 "tokcount2.l" +{ + ++relops; + norchars+=strlen(yytext); +} + YY_BREAK +case 3: +YY_RULE_SETUP +#line 38 "tokcount2.l" +{ + ++splchars; + ++norchars; +} + YY_BREAK +case 4: +YY_RULE_SETUP +#line 42 "tokcount2.l" +{ + ++norwords; + norchars+=strlen(yytext); + for(; *yytext; ++yytext) { + if(*(yytext)>='a' && *(yytext)<='z') { + ++lowcases; + } else if(*(yytext)>='A' && *(yytext)<='Z') { + ++upcases; + } + } +} + YY_BREAK +case 5: +/* rule 5 can match eol */ +YY_RULE_SETUP +#line 53 "tokcount2.l" +{ + ++norlines; + ++norchars; +} + YY_BREAK +case 6: +YY_RULE_SETUP +#line 58 "tokcount2.l" +ECHO; + YY_BREAK +#line 829 "lex.yy.c" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 36 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + register char *yy_cp = (yy_c_buf_p); + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 36 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 35); + + return yy_is_jam ? 0 : yy_current_state; +} + + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register yy_size_t number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_init_buffer(YY_CURRENT_BUFFER,input_file ); + yy_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree((void *) b->yy_ch_buf ); + + yyfree((void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + yy_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) +{ + + return yy_scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) yyalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +yy_size_t yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/** Set the current line number. + * @param line_number + * + */ +void yyset_lineno (int line_number ) +{ + + yylineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * in_str ) +{ + yyin = in_str ; +} + +void yyset_out (FILE * out_str ) +{ + yyout = out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +void yyset_debug (int bdebug ) +{ + yy_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 57 "tokcount2.l" + + + +int main(void) +{ + yylex(); + printf("No. of Keywords: %d\n", keywords); + printf("No. of Relational Operators: %d\n", relops); + printf("No. of Uppercases: %d\n", upcases); + printf("No. of Lowercases: %d\n", lowcases); + printf("No. of Special Characters: %d\n", splchars); + printf("No. of Characters: %d\n", norchars); + printf("No. of Words: %d\n", norwords); + printf("No. of Lines: %d\n", norlines); + return 0; +} + diff --git a/LAB/30-12-16/tokcount b/LAB/30-12-16/tokcount new file mode 100644 index 0000000000000000000000000000000000000000..f5b2e21aadbfaba99a39eaf0d32ad35ae7b49413 GIT binary patch literal 24127 zcmeHv4R}=5x$d4!HUuP@fJCB#j!G!h5dM)=symR;i3Ut1Sgk*kA(@cWB*U2>AXcn( zK-nE)Ijy}?Z_jhM=h{>4(U#+-l&e<4?@$k?Co0FLNKd0hoiW%_MNKU__x--L)}FnG zgwyBV=brQ2=el9$Ti^TrthK)NyZ7v@ulwq+D{#3qbropWXv8&)F&GlxnpVDqS&1#u z#%P9iiFUCz3W$!6!4je(rRb1!t!RGQW}Ha!Tf> zsARQS9qp?Y&Y#uMGP9$-E53f_`b7(8E}UN#4Oh+OdXs@69|2zme7ts{)@w8&rDoi4%LRe0?XV4Nt?MG~v5?k^3|h3-HIeqNSgRJOyD6|b6l;c0Dn}q1 z3r1pr&LFaGg>4wtkx&TI)t%ukDGg}X*Vips8kk!(w~8jQf?@uRgwi;nf0*C!p(}n- z`xw&RDOhdj+9poXSfVyjmx?pZsWi6KrQ%Gu8gC?1aVETs0C|Trp{|PI;@#u;KRk&u_!2OzLW|;i_+u>{c6&z*$$54IgWvn$~8+ z?eSb=!^he5*W2)78-BkHFR|g9ZMesVZ?)m7tx3GihL5-DZ@1z0@##;TEb=Gy53cfR z{!P6xJ-r`B{=|VIqP8o$;0>r`D^B3sbE$z8@ol7$8OY+QI7U1*d8Uu~mx-sQ&h#?> zBJpnGcQC(?cxu|rcIKZYo|-hXmHB6gr>4x@&-{;wrzXs-VgB!kr>4s^G5;9x)MS|k z=D$rmHC4u7{+q;86J=&I{{ZpSG#M}R_YhA_k|||ALOeA^Mq~b~#8VSwPJIfXVioZe z`pf|HUm>1Cp6LTW=iNH}r2bN_DmXi!H}w7HKL6f# zuJyb6{4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gfe z`4%3F^mU*@wUq|pkS~r99-ELUQyE+ ztfR-3gEi5$8m{`bG=?Ify8H#jm(PXgL6m}Y{aIX14&n-NYX@FlN!Oq2qD@U5FtKq# zx@_%Gjf7X%;;H(`9Ey8cd0{c0Hy4kYizmHhI!pYd;L4YfCfqirI5F07Ee zqDzA}R+WR+G`BU7Ng*|n>u&)@nZO^yko@GX~EKexUpnO z*&=A!B(k@!E5B)BNqO+5#fxw8R|YFf7MA>t>z)=uV9_XyKXO zA6wC`HHTYi2GDpbL^o5H)rD3>SGLRd%sQQj*WNlYesQf6;&4zD&O{7(cYwqH}X1FgUeWlM};lOjt;!bn%?P)=;;41qABI;f!!W>C2JFl zMI=0Qz|j`|7l;~WTqeH>*zFL*9%Z&`Z7q$mOM|vf@93a65C@lGrtw>dxxr|r)HkL& zWsvrgZzOgXR)}?r28*aL%~L|C+XR9E>U=jbc80caa8*rn9R{d+F|x}mCNU44V3hyC z#P3ITsifu_%})77WtWb8cd`rRK_fZ^y&vvC%=qIJx(aV$Ua85cf$6~i)zR>`DB0}G z3bE93RiW3e-UID&9>gtB>4IO<3_sKkG_5dF$QrHBt%ONNt;CazmP%SFTf!}lS<$Yo zmj4;jg4eePZ2-^xRru4FEXK>;L(@rcH#DbxgL#u`~ l{t+atEQ78qTp5ZUm9Y(bwJ)M3RMUoLjKK(&rdDT}{|_VPu2BF0 literal 0 HcmV?d00001 diff --git a/LAB/30-12-16/tokcount2.l b/LAB/30-12-16/tokcount2.l new file mode 100644 index 0000000..842457b --- /dev/null +++ b/LAB/30-12-16/tokcount2.l @@ -0,0 +1,72 @@ +%{ + #include + int keywords=0; + int relops=0; + int upcases=0; + int lowcases=0; + int splchars=0; + int norchars=0; + int norwords=0; + int norlines=0; +%} +keyword if|then|else|for|while|int|float|real +relop <=?|>=?|=|<> +splchar [!@#\$%\^&*();] +norword [a-zA-Z_][a-zA-Z_0-9]* +norline \n + +%option noyywrap + +%% + +{keyword} { + ++keywords; + ++norwords; + norchars+=strlen(yytext); + for(; *yytext; ++yytext) { + if(*(yytext)>='a' && *(yytext)<='z') { + ++lowcases; + } else if(*(yytext)>='A' && *(yytext)<='Z') { + ++upcases; + } + } +} +{relop} { + ++relops; + norchars+=strlen(yytext); +} +{splchar} { + ++splchars; + ++norchars; +} +{norword} { + ++norwords; + norchars+=strlen(yytext); + for(; *yytext; ++yytext) { + if(*(yytext)>='a' && *(yytext)<='z') { + ++lowcases; + } else if(*(yytext)>='A' && *(yytext)<='Z') { + ++upcases; + } + } +} +{norline} { + ++norlines; + ++norchars; +} + +%% + +int main(void) +{ + yylex(); + printf("No. of Keywords: %d\n", keywords); + printf("No. of Relational Operators: %d\n", relops); + printf("No. of Uppercases: %d\n", upcases); + printf("No. of Lowercases: %d\n", lowcases); + printf("No. of Special Characters: %d\n", splchars); + printf("No. of Characters: %d\n", norchars); + printf("No. of Words: %d\n", norwords); + printf("No. of Lines: %d\n", norlines); + return 0; +} diff --git a/LAB/30-12-16/tokens b/LAB/30-12-16/tokens new file mode 100644 index 0000000..b66c921 --- /dev/null +++ b/LAB/30-12-16/tokens @@ -0,0 +1,5 @@ +int i=0; +hello world +if(i==0): + wwhile(while); + diff --git a/LAB/mkl b/LAB/mkl new file mode 100644 index 0000000..30f10c1 --- /dev/null +++ b/LAB/mkl @@ -0,0 +1,5 @@ +%: %.c + g++ -o $@ $^ -ll + +%.c: %.l + lex -o $@ $^ diff --git a/LAB/mky b/LAB/mky new file mode 100644 index 0000000..4a7a3c8 --- /dev/null +++ b/LAB/mky @@ -0,0 +1,11 @@ +%: %.yacc.c %.lex.c + g++ -o $@ $^ -ll + rm *.yacc.h + +%.lex.c: %.l + lex -o $@ $^ + +%.yacc.c: %.y + yacc -o $@ -d $^ + +