Revision: | 1.2 |
Committed: | Fri Nov 5 16:05:11 2004 UTC (19 years, 7 months ago) by root |
Branch: | MAIN |
Changes since 1.1: | +4 -12 lines |
Log Message: | added some notes |
# | Content |
---|---|
1 | %{ |
2 | #include <stdio.h> |
3 | #include <stdlib.h> |
4 | |
5 | #define YYDEBUG 1 |
6 | |
7 | extern int yylex(void); |
8 | static void yyerror (char const *msg) |
9 | { |
10 | extern int yylineno; |
11 | |
12 | printf ("%s (line %d)", msg, yylineno); |
13 | abort (); |
14 | } |
15 | |
16 | %} |
17 | |
18 | %token STRING NUMBER |
19 | |
20 | %union { |
21 | char *ident; |
22 | char *string; |
23 | float num; |
24 | } |
25 | |
26 | %% |
27 | |
28 | proc: |
29 | ; |