aboutsummaryrefslogtreecommitdiff
path: root/4/main.l
diff options
context:
space:
mode:
Diffstat (limited to '4/main.l')
-rw-r--r--4/main.l32
1 files changed, 0 insertions, 32 deletions
diff --git a/4/main.l b/4/main.l
deleted file mode 100644
index 28593f6..0000000
--- a/4/main.l
+++ /dev/null
@@ -1,32 +0,0 @@
1%{
2
3int scans = 0;
4int prints = 0;
5%}
6
7%%
8scanf {
9 scans++;
10 fprintf(yyout, "readf");
11};
12printf {
13 prints++;
14 fprintf(yyout, "writef");
15}
16. fprintf(yyout, "%s", yytext);
17\n fprintf(yyout, "\n");
18%%
19
20int main(void) {
21 yyin=fopen("4/input", "r+");
22 yyout=fopen("4/output", "w");
23 yylex();
24 printf("%d printf occurrence(s)\n", prints);
25 printf("%d scanf occurrence(s)\n", scans);
26}
27
28int yywrap()
29{
30 return(1);
31}
32