Files
pcas/src/dbtools/dbLoadTemplate_lex.l
Marty Kraimer b87f049c2d Replace dbVarSub with macLib.
Allow C style escape sequences
Fix long vx memory free list problem
Fix most compiler warning messages
1997-04-30 18:54:10 +00:00

53 lines
932 B
Plaintext

word [a-zA-Z0-9_\.\^~/\*#\[\]%:;!|\-&\$\(\)@\?\+<>]
par [\"\']
BEL \\a
BS \\b
FF \\f
NL \\n
CR \\r
HT \\t
VT \\v
backSla \\\\
question \\\?
single \\\'
double \\\"
octal \\[0-7]+
hexa \\x[a-fA-F0-9]+
escape {BEL}|{BS}|{FF}|{NL}|{CR}|{HT}|{VT}|{backSla}|{question}|{single}|{double}|{octal}|{question}|{hexa}
spaces [ \t]
regular [a-zA-Z0-9_\,\^~\./\*#\[\]%:;!|\'\-&\(\)@\?\+<>=\$\{\}]
value {regular}|{spaces}|{escape}
%{
%}
%%
\#.*\n ;
"pattern" { return(PATTERN); }
"file" { return(DBFILE); }
"=" { return(EQUALS); }
{par}{value}*{par} { yylval.Str=(char*)dbmfMalloc(strlen(yytext)+1);
strcpy(yylval.Str,yytext+1);
yylval.Str[strlen(yylval.Str)-1] = '\0';
return(QUOTE);
}
{word}+ { yylval.Str=(char*)dbmfMalloc(strlen(yytext)+1);
strcpy(yylval.Str,yytext);
return(WORD);
}
"{" { return(O_BRACE); }
"}" { return(C_BRACE); }
. ;
\n { line_num ++;}
%%