freebsd-dev/eBones/compile_et/et_lex.lex.l
Geoff Rehmet 60643d379b Initial import of eBones.
(Including all changes for FreeBSD - importing the original eBones distribution
would be too complex at this stage, since I don't have access to Piero's 
CVS.)
(If you want to include eBones in your system, don't forget to include
MAKE_EBONES in /etc/make.conf.)
(This stuff is now also suppable from braae.ru.ac.za.)

Bones originally from MIT SIPB.
Original port to FreeBSD 1.x  by Piero Serini.
Moved to FreeBSD 2.0 by Doug Rabson and Geoff Rehmet.
Nice bug fixes from Doug Rabson.
1994-09-30 14:50:09 +00:00

30 lines
484 B
Plaintext

%{
extern int yylineno;
int yylineno = 1;
%}
PC [^\"\n]
AN [A-Z_a-z0-9]
%%
error_table return ERROR_TABLE;
et return ERROR_TABLE;
error_code return ERROR_CODE_ENTRY;
ec return ERROR_CODE_ENTRY;
end return END;
[\t ]+ ;
\n ++yylineno;
\"{PC}*\" { register char *p; yylval.dynstr = ds(yytext+1);
if (p=rindex(yylval.dynstr, '"')) *p='\0';
return QUOTED_STRING;
}
{AN}* { yylval.dynstr = ds(yytext); return STRING; }
#.*\n ++yylineno;
. { return (*yytext); }
%%