From 8a57bedc04fff7a92ef6d2762cfe5fc17050f021 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 30 Apr 2021 22:22:13 +0530 Subject: add yacc programs --- 8/main.l | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 8/main.l (limited to '8/main.l') diff --git a/8/main.l b/8/main.l new file mode 100644 index 0000000..3db9d6d --- /dev/null +++ b/8/main.l @@ -0,0 +1,15 @@ +%{ +#include "y.tab.h" +extern int yylval; +%} + +%% +a return A; +b return B; +. return yytext[0]; +\n return 0; +%% + +int yywrap() { + return 1; +} -- cgit v1.2.3