diff options
Diffstat (limited to '6/main.y')
-rw-r--r-- | 6/main.y | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/6/main.y b/6/main.y deleted file mode 100644 index 25005df..0000000 --- a/6/main.y +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | %{ | ||
2 | #include <stdio.h> | ||
3 | #include <stdlib.h> | ||
4 | int yylex(); | ||
5 | int yyerror(char *); | ||
6 | %} | ||
7 | |||
8 | %token A B ERR | ||
9 | |||
10 | %% | ||
11 | |||
12 | S: | ||
13 | A S B | ||
14 | | | ||
15 | ; | ||
16 | |||
17 | %% | ||
18 | |||
19 | int yyerror(char *s) { | ||
20 | printf("error: %s", s); | ||
21 | exit(0); | ||
22 | } | ||
23 | |||
24 | int main() { | ||
25 | yyparse(); | ||
26 | printf("valid string\n"); | ||
27 | return 0; | ||
28 | } | ||