diff options
author | Akshay <[email protected]> | 2021-04-30 17:52:13 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-04-30 17:52:13 +0100 |
commit | 8a57bedc04fff7a92ef6d2762cfe5fc17050f021 (patch) | |
tree | 192ea2a1bd2eec0c0f84a9cb7adc9b10d005e1db /6/main.l | |
parent | 30047205e440e9ad8984e1830b8b819b5fe1f9f7 (diff) |
add yacc programs
Diffstat (limited to '6/main.l')
-rw-r--r-- | 6/main.l | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/6/main.l b/6/main.l new file mode 100644 index 0000000..55dac30 --- /dev/null +++ b/6/main.l | |||
@@ -0,0 +1,16 @@ | |||
1 | %{ | ||
2 | #include "y.tab.h" | ||
3 | #include <stdlib.h> | ||
4 | %} | ||
5 | |||
6 | %% | ||
7 | |||
8 | a return A; | ||
9 | b return B; | ||
10 | . return yytext[0]; | ||
11 | \n return 0; | ||
12 | %% | ||
13 | |||
14 | int yywrap() { | ||
15 | return 1; | ||
16 | } | ||