2005-04-09 21:16:09 +02:00
|
|
|
%{
|
|
|
|
|
|
|
|
#include "regexp.h"
|
2005-04-19 18:26:50 +02:00
|
|
|
#include "libdic_a-er.h"
|
2005-04-09 21:16:09 +02:00
|
|
|
|
2005-04-18 19:40:36 +02:00
|
|
|
/* %option bison-locations */
|
|
|
|
/* %option prefix="ER" */
|
|
|
|
|
2005-04-09 21:16:09 +02:00
|
|
|
%}
|
2005-04-16 22:55:51 +02:00
|
|
|
%option 8bit reentrant bison-bridge
|
|
|
|
%option header-file="scanner.h"
|
|
|
|
%option nounput noyywrap
|
2005-04-09 21:16:09 +02:00
|
|
|
|
|
|
|
alphabet [a-zA-Z]
|
|
|
|
%%
|
|
|
|
|
2005-04-19 18:26:50 +02:00
|
|
|
{alphabet} {yylval_param->c = yytext[0]; return LEX_CHAR;}
|
|
|
|
"[" {return LEX_L_SQBRACKET;}
|
|
|
|
"]" {return LEX_R_SQBRACKET;}
|
|
|
|
"(" {return LEX_L_BRACKET;}
|
|
|
|
")" {return LEX_R_BRACKET;}
|
|
|
|
"^" {return LEX_HAT;}
|
2005-04-16 22:55:51 +02:00
|
|
|
|
2005-04-19 18:26:50 +02:00
|
|
|
"." {return LEX_ALL;}
|
|
|
|
":v:" {return LEX_VOWL;}
|
|
|
|
":c:" {return LEX_CONS;}
|
|
|
|
":1:" {return LEX_USER1;}
|
|
|
|
":2:" {return LEX_USER2;}
|
2005-04-18 19:40:36 +02:00
|
|
|
|
2005-04-19 18:26:50 +02:00
|
|
|
"+" {return LEX_PLUS;}
|
|
|
|
"*" {return LEX_STAR;}
|
2005-04-09 21:16:09 +02:00
|
|
|
|
2005-04-19 18:26:50 +02:00
|
|
|
"#" {return LEX_SHARP;}
|
2005-04-09 21:16:09 +02:00
|
|
|
%%
|
|
|
|
|