Allow C style escape sequences Fix long vx memory free list problem Fix most compiler warning messages
53 lines
932 B
Plaintext
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 ++;}
|
|
|
|
%%
|