Files
epics-base/src/db/atdb_lex.l
1993-08-11 16:44:25 +00:00

35 lines
491 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
b [a-zA-Z0-9_]
a [ \t]
d [a-zA-Z0-9_\,\./\*#\[\]%:;!|\'\-&\(\)@\?\+<>=$]
%{
yyreset()
{
line_num=1;
BEGIN INITIAL;
return;
}
%}
%%
^[A-Z0-9_]+ { yylval.Str=(char *)malloc(strlen(yytext)+1);
strcpy(yylval.Str,yytext);
return(FIELD); }
^"PV:" { return(PV); }
"Type:" { return(TYPE); }
{ return(CLOSE); }
"$$end" { return(CLOSE); }
{d}+ { yylval.Str=(char *)malloc(strlen(yytext)+1);
strcpy(yylval.Str,yytext);
return(WORD); }
. ;
\n { line_num++; }
%%