From da1764a9f839e1d29b2bee12d35534f71f05c6ff Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 30 Apr 2021 22:25:19 +0530 Subject: law & order --- 8/input | 1 - 8/main.l | 14 -------------- 8/main.y | 28 ---------------------------- 3 files changed, 43 deletions(-) delete mode 100644 8/input delete mode 100644 8/main.l delete mode 100644 8/main.y (limited to '8') diff --git a/8/input b/8/input deleted file mode 100644 index 5c11124..0000000 --- a/8/input +++ /dev/null @@ -1 +0,0 @@ -aaaab diff --git a/8/main.l b/8/main.l deleted file mode 100644 index ad755d5..0000000 --- a/8/main.l +++ /dev/null @@ -1,14 +0,0 @@ -%{ -extern int yylval; -%} - -%% -a return A; -b return B; -. return yytext[0]; -\n return 0; -%% - -int yywrap() { - return 1; -} diff --git a/8/main.y b/8/main.y deleted file mode 100644 index 04e98a7..0000000 --- a/8/main.y +++ /dev/null @@ -1,28 +0,0 @@ -%{ -#include -#include -int yyerror(char *); -%} - -%token A B -%start S - -%% - -S: C B - | - ; -C: A C - | A A A A - ; -%% - -int main() { - yyparse(); - printf("valid string"); -} - -int yyerror(char *s) { - printf("error: %s", s); - exit(0); -} -- cgit v1.2.3