mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
Merge remote-tracking branch 'origin' into topic/bernhard/input-threads
This commit is contained in:
commit
e7f1200f9f
26 changed files with 117 additions and 277 deletions
25
src/scan.l
25
src/scan.l
|
@ -228,6 +228,24 @@ ESCSEQ (\\([^\n]|[0-7]+|x[[:xdigit:]]+))
|
|||
++yylloc.last_line;
|
||||
}
|
||||
|
||||
/* IPv6 literal constant patterns */
|
||||
"["({HEX}:){7}{HEX}"]" {
|
||||
string s(yytext+1);
|
||||
RET_CONST(new AddrVal(s.erase(s.size()-1)))
|
||||
}
|
||||
"["0x{HEX}({HEX}|:)*"::"({HEX}|:)*"]" {
|
||||
string s(yytext+3);
|
||||
RET_CONST(new AddrVal(s.erase(s.size()-1)))
|
||||
}
|
||||
"["({HEX}|:)*"::"({HEX}|:)*"]" {
|
||||
string s(yytext+1);
|
||||
RET_CONST(new AddrVal(s.erase(s.size()-1)))
|
||||
}
|
||||
"["({HEX}|:)*"::"({HEX}|:)*({D}"."){3}{D}"]" {
|
||||
string s(yytext+1);
|
||||
RET_CONST(new AddrVal(s.erase(s.size()-1)))
|
||||
}
|
||||
|
||||
[!%*/+\-,:;<=>?()\[\]{}~$|] return yytext[0];
|
||||
|
||||
"--" return TOK_DECR;
|
||||
|
@ -273,7 +291,6 @@ int return TOK_INT;
|
|||
interval return TOK_INTERVAL;
|
||||
list return TOK_LIST;
|
||||
local return TOK_LOCAL;
|
||||
match return TOK_MATCH;
|
||||
module return TOK_MODULE;
|
||||
next return TOK_NEXT;
|
||||
of return TOK_OF;
|
||||
|
@ -295,7 +312,6 @@ timeout return TOK_TIMEOUT;
|
|||
timer return TOK_TIMER;
|
||||
type return TOK_TYPE;
|
||||
union return TOK_UNION;
|
||||
using return TOK_USING;
|
||||
vector return TOK_VECTOR;
|
||||
when return TOK_WHEN;
|
||||
|
||||
|
@ -451,11 +467,6 @@ F RET_CONST(new Val(false, TYPE_BOOL))
|
|||
|
||||
({D}"."){3}{D} RET_CONST(new AddrVal(yytext))
|
||||
|
||||
({HEX}:){7}{HEX} RET_CONST(new AddrVal(yytext))
|
||||
|
||||
0x{HEX}({HEX}|:)*"::"({HEX}|:)* RET_CONST(new AddrVal(yytext+2))
|
||||
(({D}|:)({HEX}|:)*)?"::"({HEX}|:)* RET_CONST(new AddrVal(yytext))
|
||||
|
||||
"0x"{HEX}+ RET_CONST(new Val(static_cast<bro_uint_t>(strtol(yytext, 0, 16)), TYPE_COUNT))
|
||||
|
||||
{H}("."{H})+ RET_CONST(dns_mgr->LookupHost(yytext))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue