mirror of
https://github.com/tstack/lnav.git
synced 2024-08-16 16:30:25 +03:00
[data_scanner] reduce scanner size
This commit is contained in:
parent
272bb8d840
commit
bd0c8106dc
159732
src/data_scanner_re.cc
159732
src/data_scanner_re.cc
File diff suppressed because it is too large
Load Diff
@ -211,9 +211,6 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2(text_for
|
||||
RET(DT_COMMENT);
|
||||
}
|
||||
|
||||
<init, bol> [a-qstv-zA-QSTV-Z]"'" {
|
||||
CAPTURE(DT_WORD);
|
||||
}
|
||||
<init, bol> ("f"|"u"|"r")?"'"('\\'[^\x00]|"''"|[^\x00\x16\x1b\n'\\])*"'"/[^sS] {
|
||||
CAPTURE(DT_QUOTED_STRING);
|
||||
if (tf == text_format_t::TF_RUST) {
|
||||
@ -394,6 +391,8 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2(text_for
|
||||
|
||||
<init, bol> ("re-")?[a-zA-Z][a-z']+/([\r\n\t \(\)!\*:;'\"\?,]|[\.\!,\?]SPACE|EOF) { RET(DT_WORD); }
|
||||
|
||||
<init, bol> [aAI] { RET(DT_WORD); }
|
||||
|
||||
<init, bol> ("--"|"++")[a-zA-Z0-9]+("-"[a-zA-Z0-9]+)* {
|
||||
RET(DT_SYMBOL);
|
||||
}
|
||||
@ -402,11 +401,11 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2(text_for
|
||||
RET(DT_SYMBOL);
|
||||
}
|
||||
|
||||
<init, bol> [^0-9\x00\x16\x1b"; \-\t\r\n:=,\(\)\{\}\[\]\+#!%\^&\*'\?<>\~`\|\.\\][^\x00\x16\x1b"; \-\t\r\n:=,\(\)\{\}\[\]\+#!%\^&\*'\?<>\~`\|\\]*("::"[^\x00\x16\x1b"; \r\n\t:=,\(\)\{\}\[\]\+#!%\^&\*'\?<>\~`\|\\]+)* {
|
||||
<init, bol> [a-zA-Z_][a-zA-Z0-9_]*(("::"|".")[a-zA-Z_0-9\-]+)* {
|
||||
RET(DT_SYMBOL);
|
||||
}
|
||||
|
||||
<init, bol> [^\x00\x16\x1b"; \t\r\n\-:=,\(\)\{\}\[\]\+#!%\^&\*'\?<>\~`\|\.\\][^\x00\x16\x1b"; \t\r\n\-:=,\(\)\{\}\[\]\+#!%\^&\*'\?<>\~`\|\.\\]*(("::"|"."|"-")[^\x00\x16\x1b"; \r\n\t:=,\.\-\(\)\{\}\[\]\+#!%\^&\*'\?<>\~`\|\\]+)* {
|
||||
<init, bol> [a-zA-Z0-9_]+(("::"|"."|"-"|"@"|"/")[a-zA-Z0-9_]+)* {
|
||||
RET(DT_ID);
|
||||
}
|
||||
|
||||
|
@ -10,10 +10,14 @@ pair 0:23 ^---------------------^
|
||||
val 35:40 ^---^ 47413
|
||||
pair 30:40 ^--------^ vpxd[47413
|
||||
key 43:43 ^
|
||||
key 43:62 ^-----------------^ Originator@6876 sub
|
||||
key 43:43 ^
|
||||
id 43:58 ^-------------^ Originator@6876
|
||||
val 43:58 ^-------------^ Originator@6876
|
||||
pair 43:58 ^-------------^ Originator@6876
|
||||
key 59:62 ^-^ sub
|
||||
sym 63:69 ^----^ vpxLro
|
||||
val 63:69 ^----^ vpxLro
|
||||
pair 43:69 ^------------------------^ Originator@6876 sub=vpxLro
|
||||
pair 59:69 ^--------^ sub=vpxLro
|
||||
key 70:74 ^--^ opID
|
||||
id 75:86 ^---------^ 21fa61e9-3e
|
||||
val 75:86 ^---------^ 21fa61e9-3e
|
||||
@ -57,7 +61,8 @@ format :#Z info vpxd[#] [#] [#] -- BEGIN # -- # -- # -- #(#)
|
||||
47413
|
||||
],
|
||||
"col_1": {
|
||||
"Originator@6876 sub": "vpxLro",
|
||||
"col_0": "Originator@6876",
|
||||
"sub": "vpxLro",
|
||||
"opID": "21fa61e9-3e"
|
||||
},
|
||||
"col_2": [
|
||||
|
@ -1,3 +1,3 @@
|
||||
10.0.0.1 - - [20/Jul/2009:22:59:26 +0000] "GET /vmw/cgi/abashed HTTP/1.0" 200 134 "-" "gPXE/0.9.7"
|
||||
10.0.0.1 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/abject/ablaze/able.gz HTTP/1.0" 404 46210 "-" "gPXE/0.9.7"
|
||||
10.0.0.1 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/abject/ablaze/aboard.gz HTTP/1.0" 200 78929 "-" "gPXE/0.9.7"
|
||||
10.0.0.1 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/aberrant/abhorrent/abiding.gz HTTP/1.0" 404 46210 "-" "gPXE/0.9.7"
|
||||
10.0.0.1 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/aberrant/abhorrent/ablaze.gz HTTP/1.0" 200 78929 "-" "gPXE/0.9.7"
|
||||
|
@ -4,7 +4,7 @@ word 31:39 ^------^
|
||||
val 31:39 ^------^ timstack
|
||||
pair 31:39 ^------^ timstack
|
||||
key 42:45 ^-^ TTY
|
||||
sym 46:51 ^---^ pts/6
|
||||
id 46:51 ^---^ pts/6
|
||||
val 46:51 ^---^ pts/6
|
||||
pair 42:51 ^-------^ TTY=pts/6
|
||||
key 54:57 ^-^ PWD
|
||||
|
Loading…
Reference in New Issue
Block a user