2002-08-06 23:08:54 +00:00
|
|
|
%{
|
|
|
|
#include <stdio.h>
|
2002-08-07 01:45:13 +00:00
|
|
|
#include <string.h>
|
2002-08-06 23:08:54 +00:00
|
|
|
#include "yacc_parser.hh"
|
2002-08-08 03:10:54 +00:00
|
|
|
|
|
|
|
extern YYSTYPE yylval;
|
|
|
|
|
2002-08-06 23:08:54 +00:00
|
|
|
%}
|
|
|
|
|
|
|
|
%%
|
|
|
|
|
|
|
|
\{ return OBRACE;
|
|
|
|
\} return EBRACE;
|
|
|
|
; return SEMICOLON;
|
|
|
|
- return DASH;
|
|
|
|
Mod1 |
|
|
|
|
Mod2 |
|
|
|
|
Mod3 |
|
|
|
|
Mod4 |
|
|
|
|
Control |
|
2002-08-07 01:45:13 +00:00
|
|
|
Shift yylval = (int) strdup(yytext); return BINDING;
|
|
|
|
[0-9]+ yylval = (int) strdup(yytext); return NUMBER;
|
|
|
|
\".+\" yylval = (int) strdup(yytext); return QUOTES;
|
|
|
|
[a-zA-Z_0-9]+ yylval = (int) strdup(yytext); return WORD;
|
2002-08-06 23:08:54 +00:00
|
|
|
#.+\n /* ignore */
|
|
|
|
\n /* ignore */
|
|
|
|
[ \t]+ /* */
|
|
|
|
%%
|
|
|
|
|