| Revision: | 1.2 |
| Committed: | Fri Nov 5 16:05:11 2004 UTC (21 years, 11 months ago) by root |
| Branch: | MAIN |
| Changes since 1.1: | +4 -12 lines |
| Log Message: | added some notes |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | root | 1.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 | root | 1.2 | %token STRING NUMBER |
| 19 | root | 1.1 | |
| 20 | %union { | ||
| 21 | char *ident; | ||
| 22 | char *string; | ||
| 23 | root | 1.2 | float num; |
| 24 | root | 1.1 | } |
| 25 | |||
| 26 | %% | ||
| 27 | |||
| 28 | root | 1.2 | proc: |
| 29 | ; |