mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Minor tweaks for bif language.
* Bif language: Can now specify hex constants as explicit enumerators. * Bifcl output files new also depend on the bifcl binary.
This commit is contained in:
parent
fdaeea0ea9
commit
a9f28fab74
2 changed files with 10 additions and 2 deletions
|
@ -103,6 +103,7 @@ macro(BIF_TARGET bifInput)
|
|||
COMMAND bifcl
|
||||
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${bifInput} || (rm -f ${bifOutputs} && exit 1)
|
||||
DEPENDS ${bifInput}
|
||||
DEPENDS bifcl
|
||||
COMMENT "[BIFCL] Processing ${bifInput}"
|
||||
)
|
||||
list(APPEND ALL_BIF_OUTPUTS ${bifOutputs})
|
||||
|
|
|
@ -30,7 +30,8 @@ int check_c_mode(int t)
|
|||
WS [ \t]+
|
||||
ID [A-Za-z_][A-Za-z_0-9]*
|
||||
ESCSEQ (\\([^\n]|[0-7]+|x[[:xdigit:]]+))
|
||||
INT [[:digit:]]+
|
||||
D [[:digit:]]+
|
||||
HEX [0-9a-fA-F]+
|
||||
|
||||
%option nodefault
|
||||
|
||||
|
@ -80,11 +81,17 @@ INT [[:digit:]]+
|
|||
"T" yylval.val = 1; return TOK_BOOL;
|
||||
"F" yylval.val = 0; return TOK_BOOL;
|
||||
|
||||
{INT} {
|
||||
{D} {
|
||||
yylval.str = copy_string(yytext);
|
||||
return TOK_INT;
|
||||
}
|
||||
|
||||
"0x"{HEX} {
|
||||
yylval.str = copy_string(yytext);
|
||||
return TOK_INT;
|
||||
}
|
||||
|
||||
|
||||
{ID} {
|
||||
yylval.str = copy_string(yytext);
|
||||
return TOK_ID;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue