id
int64 0
563
| file_name
stringlengths 4
38
| file_path
stringlengths 16
123
| content
stringlengths 126
1.72M
| size
int64 126
1.8M
| language
stringclasses 1
value | extension
stringclasses 1
value | total_lines
int64 4
74.3k
| avg_line_length
float64 6.01
89.8
| max_line_length
int64 33
3.68k
| alphanum_fraction
float64 0.33
0.95
| repo_name
stringclasses 95
values | repo_stars
int64 0
50
| repo_forks
int64 0
14
| repo_open_issues
int64 0
34
| repo_license
stringclasses 7
values | repo_extraction_date
stringclasses 11
values | sha
stringlengths 64
64
| exact_dupe_TheStackV2
bool 2
classes | exact_dupe_TheStack
bool 2
classes | exact_dupe_RedPajama
bool 2
classes | exact_dupe_GithubCode
bool 2
classes |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
323 | COMMAND_DBINSPECT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_DBINSPECT_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_DBINSPECT_MODE;
COMMAND_DBINSPECT_MODE_ANTLR_BUG: 'command_dbinspect_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_DBINSPECT_MODE ++++++++++++++
mode COMMAND_DBINSPECT_MODE;
// skip
COMMAND_DBINSPECT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_DBINSPECT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_DBINSPECT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_DBINSPECT_MODE_CORRUPTONLY : 'corruptonly=' -> pushMode(GET_BOOLEAN);
COMMAND_DBINSPECT_MODE_TIMEFORMAT : 'timeformat=' -> pushMode(GET_TIME);
COMMAND_DBINSPECT_MODE_INDEX : 'index=' -> pushMode(GET_STRING);
COMMAND_DBINSPECT_MODE_SPAN : 'span=' ->pushMode(GET_SPAN);
COMMAND_DBINSPECT_MODE_CACHED : 'cached=' -> pushMode(GET_BOOLEAN);
COMMAND_DBINSPECT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,900 | ANTLR | .g4 | 62 | 44.935484 | 98 | 0.75371 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | f62575b3c9eb1baaea77e34f178cc350c44e694576b6cae468e1fff1ab1920a9 | false | false | false | false |
324 | DPLParserTransform_dedup.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_dedup.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_dedup;
dedupTransformation
: COMMAND_MODE_DEDUP t_dedup_numberParameter? t_dedup_fieldListParameter? (t_dedup_keepeventsParameter|t_dedup_keepemptyParameter|t_dedup_consecutiveParameter)*? (t_dedup_sortbyInstruction)?
;
t_dedup_numberParameter
: COMMAND_DEDUP_INTEGER
;
t_dedup_fieldListParameter
: fieldType (COMMA? fieldType)*?
;
t_dedup_consecutiveParameter
: COMMAND_DEDUP_MODE_CONSECUTIVE booleanType
;
t_dedup_keepemptyParameter
: COMMAND_DEDUP_MODE_KEEPEMPTY booleanType
;
t_dedup_keepeventsParameter
: COMMAND_DEDUP_MODE_KEEPEVENTS booleanType
;
t_dedup_sortbyInstruction
: COMMAND_DEDUP_MODE_SORTBY t_dedup_sortOrder? (fieldType|t_dedup_sortbyMethodAuto|t_dedup_sortbyMethodStr|t_dedup_sortbyMethodIp|t_dedup_sortbyMethodNum) ((COMMA)? ((COMMAND_DEDUP_MODE_PLUS|COMMAND_DEDUP_MODE_MINUS)? (fieldType|t_dedup_sortbyMethodAuto|t_dedup_sortbyMethodStr|t_dedup_sortbyMethodIp|t_dedup_sortbyMethodNum)))*
;
t_dedup_sortOrder
: COMMAND_DEDUP_MODE_PLUS
| COMMAND_DEDUP_MODE_MINUS
;
t_dedup_sortbyMethodAuto
: COMMAND_DEDUP_MODE_AUTO COMMAND_DEDUP_MODE_PARENTHESIS_L fieldType COMMAND_DEDUP_MODE_PARENTHESIS_R
;
t_dedup_sortbyMethodStr
: COMMAND_DEDUP_MODE_STR COMMAND_DEDUP_MODE_PARENTHESIS_L fieldType COMMAND_DEDUP_MODE_PARENTHESIS_R
;
t_dedup_sortbyMethodIp
: COMMAND_DEDUP_MODE_IP COMMAND_DEDUP_MODE_PARENTHESIS_L fieldType COMMAND_DEDUP_MODE_PARENTHESIS_R
;
t_dedup_sortbyMethodNum
: COMMAND_DEDUP_MODE_NUM COMMAND_DEDUP_MODE_PARENTHESIS_L fieldType COMMAND_DEDUP_MODE_PARENTHESIS_R
;
| 3,758 | ANTLR | .g4 | 83 | 41.180723 | 336 | 0.759967 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | fea00be605d7881b8da24383dceddc8f752d7dd7352bd831633b441a1d38a580 | false | false | false | false |
325 | DPLParserTransform_collapse.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_collapse.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_collapse;
collapseTransformation
: COMMAND_MODE_COLLAPSE (t_collapse_chunksizeParameter|t_collapse_forceParameter)*
;
t_collapse_chunksizeParameter
: COMMAND_COLLAPSE_MODE_CHUNKSIZE numberType
;
t_collapse_forceParameter
: COMMAND_COLLAPSE_MODE_FORCE booleanType
;
| 2,372 | ANTLR | .g4 | 55 | 40.345455 | 98 | 0.770662 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 71a1594eb216d542bfd274a4ad81470059a2d0ffa8ff03a14d5acd4b7809932c | false | false | false | false |
326 | COMMAND_ARULES_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_ARULES_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_ARULES_MODE;
COMMAND_ARULES_MODE_ANTLR_BUG: 'command_arules_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_ARULES_MODE ++++++++++++++
mode COMMAND_ARULES_MODE;
// skip
COMMAND_ARULES_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_ARULES_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_ARULES_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_ARULES_MODE_CONF : 'conf=' -> pushMode(GET_NUMBER);
COMMAND_ARULES_MODE_SUP : 'sup=' -> pushMode(GET_INTEGER);
COMMAND_ARULES_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_ARULES_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED) ;
COMMAND_ARULES_MODE_COMMA: ',' -> type(COMMA);
// characters for string
fragment COMMAND_ARULES_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
// |'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // ARULES
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_ARULES_MODE_STRING
// one or more characters
: (COMMAND_ARULES_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_ARULES_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,393 | ANTLR | .g4 | 161 | 26.826087 | 105 | 0.527081 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | a224b82b65ee72cd4f852580b1a2b56f479fa66e4b2cd3a68cef8f1c973c509e | false | false | false | false |
327 | DPLParserTransform_rangemap.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_rangemap.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_rangemap;
rangemapTransformation
: COMMAND_MODE_RANGEMAP t_rangemap_fieldParameter (t_rangemap_attrnParameter)* (t_rangemap_defaultParameter)?
;
t_rangemap_rangeParameter
: GET_RANGE_NUMBER_LEFT t_rangemap_rangeRightParameter
;
t_rangemap_rangeRightParameter
: GET_RANGE_NUMBER_RIGHT
;
t_rangemap_defaultParameter
: COMMAND_RANGEMAP_MODE_DEFAULT stringType
;
t_rangemap_attrnParameter
: stringType COMMAND_RANGEMAP_MODE_EQ t_rangemap_rangeParameter
;
t_rangemap_fieldParameter
: COMMAND_RANGEMAP_MODE_FIELD fieldType
;
| 2,677 | ANTLR | .g4 | 64 | 38.5 | 117 | 0.763825 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 9f1b47a4f6a1370faa83a364bfa443726091956e5db6f171cb97a47b638f82b6 | false | false | false | false |
328 | COMMAND_XPATH_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_XPATH_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_XPATH_MODE;
COMMAND_XPATH_MODE_ANTLR_BUG: 'command_xpath_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_XPATH_MODE ++++++++++++++
mode COMMAND_XPATH_MODE;
// skip
COMMAND_XPATH_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_XPATH_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_XPATH_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_XPATH_MODE_OUTFIELD : 'outfield=' -> pushMode(GET_FIELD);
COMMAND_XPATH_MODE_DEFAULT : 'default=' -> pushMode(GET_STRING);
COMMAND_XPATH_MODE_FIELD : 'field=' -> pushMode(GET_FIELD);
COMMAND_XPATH_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_XPATH_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_XPATH_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // XPATH
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
|'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_XPATH_MODE_STRING
// one or more characters
: (COMMAND_XPATH_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_XPATH_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,411 | ANTLR | .g4 | 161 | 26.869565 | 104 | 0.528378 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | a1717af40e90697812293f663c956e04b69490341d7ea092fd027fd478a0bbe2 | false | false | false | false |
329 | COMMAND_MSTATS_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_MSTATS_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_MSTATS_MODE;
COMMAND_MSTATS_MODE_ANTLR_BUG: 'command_mstats_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_MSTATS_MODE ++++++++++++++
mode COMMAND_MSTATS_MODE;
// skip
COMMAND_MSTATS_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_MSTATS_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_MSTATS_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_MSTATS_MODE_INT: DIGIT;
fragment DIGIT: [0-99];
COMMAND_MSTATS_MODE_CHART : 'chart=' -> pushMode(GET_BOOLEAN);
COMMAND_MSTATS_MODE_WHERE: ( 'where' | 'WHERE' ) -> pushMode(COMMAND_MSTATS_MODE_WHERE_MODE) ;
COMMAND_MSTATS_MODE_PRESTATS : 'prestats=' -> pushMode(GET_BOOLEAN);
COMMAND_MSTATS_MODE_BACKFILL : 'backfill=' -> pushMode(GET_BOOLEAN);
COMMAND_MSTATS_MODE_APPEND : 'append=' -> pushMode(GET_BOOLEAN);
COMMAND_MSTATS_MODE_UPDATE_PERIOD : 'update_period=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_FILLNULL_VALUE : 'fillnull_value=' -> pushMode(GET_STRING);
COMMAND_MSTATS_MODE_CHUNK_SIZE : 'chunk_size=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_CHART_NULLSTR: 'chart.nullstr=' -> pushMode(GET_STRING);
COMMAND_MSTATS_MODE_CHART_OTHERSTR: 'chart.otherstr=' -> pushMode(GET_STRING);
COMMAND_MSTATS_MODE_CHART_USENULL: 'chart.usenull=' -> pushMode(GET_BOOLEAN);
COMMAND_MSTATS_MODE_CHART_USEOTHER: 'chart.useother=' -> pushMode(GET_BOOLEAN);
COMMAND_MSTATS_MODE_CHART_AGG: 'chart.agg=' -> pushMode(GET_BOOLEAN);
COMMAND_MSTATS_MODE_COMMA : ',' -> type(COMMA);
COMMAND_MSTATS_MODE_SPAN : 'span=' -> pushMode(GET_SPAN) ;
COMMAND_MSTATS_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_MSTATS_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_MSTATS_MODE_AS: ('AS'|'as'|'As');
COMMAND_MSTATS_SUBMODE_CHART_LIMIT_TOP : 'chart.limit=top' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_SUBMODE_CHART_LIMIT_BOTTOM : 'chart.limit=bottom' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_SUBMODE_CHART_LIMIT: 'chart.limit=' -> pushMode(GET_INTEGER);
// aggregateMethod
COMMAND_MSTATS_MODE_COUNT: 'count' -> type(METHOD_AGGREGATE_COUNT);
COMMAND_MSTATS_MODE_AVG_PARENTHESIS_R: 'avg(' -> type(METHOD_AGGREGATE_AVG), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_MEAN_PARENTHESIS_R: 'mean(' -> type(METHOD_AGGREGATE_MEAN), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_C_PARENTHESIS_R: 'c(' -> type(METHOD_AGGREGATE_C), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_COUNT_PARENTHESIS_R: 'count(' -> type(METHOD_AGGREGATE_COUNT_B), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_DC_PARENTHESIS_R: 'dc(' -> type(METHOD_AGGREGATE_DC), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_DISTINCT_COUNT_PARENTHESIS_R: 'distinct_count(' -> type(METHOD_AGGREGATE_DISTINCT_COUNT), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_EARLIEST_PARENTHESIS_R: 'earliest(' -> type(METHOD_AGGREGATE_EARLIEST), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_EARLIEST_TIME_PARENTHESIS_R: 'earliest_time(' -> type(METHOD_AGGREGATE_EARLIEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_ESTDC_PARENTHESIS_R: 'estdc(' -> type(METHOD_AGGREGATE_ESTDC), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_ESTDC_ERROR_PARENTHESIS_R: 'estdc_error(' -> type(METHOD_AGGREGATE_ESTDC_ERROR), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_FIRST_PARENTHESIS_R: 'first(' -> type(METHOD_AGGREGATE_FIRST), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_LAST_PARENTHESIS_R: 'last(' -> type(METHOD_AGGREGATE_LAST), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_LATEST_PARENTHESIS_R: 'latest(' -> type(METHOD_AGGREGATE_LATEST), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_LATEST_TIME_PARENTHESIS_R: 'latest_time(' -> type(METHOD_AGGREGATE_LATEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_LIST_PARENTHESIS_R: 'list(' -> type(METHOD_AGGREGATE_LIST), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_MAX_PARENTHESIS_R: 'max(' -> type(METHOD_AGGREGATE_MAX), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_MEDIAN_PARENTHESIS_R: 'median(' -> type(METHOD_AGGREGATE_MEDIAN), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_MIN_PARENTHESIS_R: 'min(' -> type(METHOD_AGGREGATE_MIN), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_MODE_PARENTHESIS_R: 'mode(' -> type(METHOD_AGGREGATE_MODE), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_P_PARENTHESIS_R: 'p(' -> type(METHOD_AGGREGATE_P), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_PERC_PARENTHESIS_R: 'perc(' -> type(METHOD_AGGREGATE_PERC), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_EXACTPERC_PARENTHESIS_R: 'exactperc(' -> type(METHOD_AGGREGATE_EXACTPERC), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_UPPERPERC_PARENTHESIS_R: 'upperperc(' -> type(METHOD_AGGREGATE_UPPERPERC), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_PERCINT_PARENTHESIS_R: 'percint(' -> type(METHOD_AGGREGATE_PERCINT), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_RANGE_PARENTHESIS_R: 'range(' -> type(METHOD_AGGREGATE_RANGE), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_RATE_PARENTHESIS_R: 'rate(' -> type(METHOD_AGGREGATE_RATE), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_STDEV_PARENTHESIS_R: 'stdev(' -> type(METHOD_AGGREGATE_STDEV), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_STDEVP_PARENTHESIS_R: 'stdevp(' -> type(METHOD_AGGREGATE_STDEVP), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_SUM_PARENTHESIS_R: 'sum(' -> type(METHOD_AGGREGATE_SUM), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_SUMSQ_PARENTHESIS_R: 'sumsq(' -> type(METHOD_AGGREGATE_SUMSQ), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_VALUES_PARENTHESIS_R: 'values(' -> type(METHOD_AGGREGATE_VALUES), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_VAR_PARENTHESIS_R: 'var(' -> type(METHOD_AGGREGATE_VAR), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_VARP_PARENTHESIS_R: 'varp(' -> type(METHOD_AGGREGATE_VARP), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_EVERY: 'every=' -> pushMode(GET_SPAN);
//special percX()
COMMAND_MSTATS_MODE_P_VARIABLE: 'p'COMMAND_MSTATS_MODE_INT -> type(METHOD_AGGREGATE_P_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_PERC_VARIABLE: 'perc'COMMAND_MSTATS_MODE_INT -> type(METHOD_AGGREGATE_PERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_EXACTPERC_VARIABLE: 'exactperc'COMMAND_MSTATS_MODE_INT -> type(METHOD_AGGREGATE_EXACTPERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_MSTATS_MODE_UPPERPERC_VARIABLE: 'upperperc'COMMAND_MSTATS_MODE_INT -> type(METHOD_AGGREGATE_UPPERPERC_VARIABLE), pushMode(AGGREGATION_MODE);
// characters for string
fragment COMMAND_MSTATS_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
//|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
//|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
// |'\u003C' // <
|'\u003D' {false}? // =
// |'\u003E' // >
|'\u003F' // ?
|'\u0040' // MSTATS
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_MSTATS_MODE_STRING
// one or more characters
: (COMMAND_MSTATS_MODE_CHAR)+ -> type(GET_FIELD_STRING);
mode COMMAND_MSTATS_MODE_WHERE_MODE;
// skip
COMMAND_MSTATS_MODE_WHERE_MODE_SPACE: SPACE -> channel(HIDDEN);
// valid for fields
// Reserved words
COMMAND_MSTATS_MODE_WHERE_MODE_TIMEFORMAT: 'timeformat=' -> pushMode(GET_STRING);
COMMAND_MSTATS_MODE_WHERE_MODE_EARLIEST: 'earliest=' -> pushMode(GET_TIME);
COMMAND_MSTATS_MODE_WHERE_MODE_INDEX_EARLIEST: '_index_earliest=' -> pushMode(GET_STRING);
COMMAND_MSTATS_MODE_WHERE_MODE_STARTDAYSAGO: 'stardaysago=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_STARTHOURSAGO: 'starthoursago=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_STARTMINUTESAGO: 'startminutesago=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_STARTMONTHSAGO: 'startmonthsago=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_STARTTIME: 'starttime=' -> pushMode(GET_STRING);
COMMAND_MSTATS_MODE_WHERE_MODE_STARTTIMEU: 'starttimeu=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_LATEST: 'latest=' -> pushMode(GET_TIME);
COMMAND_MSTATS_MODE_WHERE_MODE_INDEX_LATEST: '_index_latest=' -> pushMode(GET_STRING);
COMMAND_MSTATS_MODE_WHERE_MODE_ENDDAYSAGO: 'enddaysago=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_ENDHOURSAGO: 'endhoursago=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_ENDMINUTESAGO: 'endminutesago=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_ENDMONTHSAGO: 'endmonthsago=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_ENDTIME: 'endtime=' -> pushMode(GET_STRING);
COMMAND_MSTATS_MODE_WHERE_MODE_ENDTIMEU: 'endtimeu=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_SEARCHTIMESPANDAYS: 'searchtimespandays=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_SEARCHTIMESPANHOURS: 'searchtimespanhours=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_SEARCHTIMESPANMINUTES: 'searchtimespanminutes=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_SEARCHTIMESPANMONHTS: 'searchtimespanmonths=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_MINUTESAGO: 'minutesago=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_HOURSAGO: 'hoursago=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_DAYSAGO: 'daysago=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_MONTHSAGO: 'monthsago=' -> pushMode(GET_INTEGER);
COMMAND_MSTATS_MODE_WHERE_MODE_EVENTTYPE: 'eventtype';
COMMAND_MSTATS_MODE_WHERE_MODE_EVENTTYPETAG: 'eventtypetag';
COMMAND_MSTATS_MODE_WHERE_MODE_HOST: 'host';
COMMAND_MSTATS_MODE_WHERE_MODE_HOSTTAG: 'hosttag';
COMMAND_MSTATS_MODE_WHERE_MODE_INDEX: 'index';
COMMAND_MSTATS_MODE_WHERE_MODE_SAVEDSEARCH: 'savedsearch';
COMMAND_MSTATS_MODE_WHERE_MODE_SOURCE: 'source';
COMMAND_MSTATS_MODE_WHERE_MODE_SOURCETYPE: 'sourcetype';
//special for tstats
COMMAND_TSTATS_MODE_NODENAME: 'nodename=' -> pushMode(GET_STRING);
COMMAND_MSTATS_MODE_WHERE_MODE_TAG: 'tag';
//push to diffrent MODE_MODE's
COMMAND_MSTATS_MODE_WHERE_MODE_AND: 'AND';
COMMAND_MSTATS_MODE_WHERE_MODE_NOT: 'NOT';
COMMAND_MSTATS_MODE_WHERE_MODE_OR: 'OR';
COMMAND_MSTATS_MODE_WHERE_MODE_IN: 'IN';
COMMAND_MSTATS_MODE_WHERE_MODE_BY_BY : ('BY'|'by'|'By') -> popMode;
COMMAND_MSTATS_MODE_WHERE_MODE_GROUPBY : ('GROUPBY'|'groupby') -> popMode;
// charType, common types
COMMAND_MSTATS_MODE_WHERE_MODE_PARENTHESIS_L: '(';
COMMAND_MSTATS_MODE_WHERE_MODE_PARENTHESIS_R: ')';
COMMAND_MSTATS_MODE_WHERE_MODE_BRACKET_L: '[' -> pushMode(COMMAND_MODE);
COMMAND_MSTATS_MODE_WHERE_MODE_BRACKET_R: ']' -> popMode, popMode;
COMMAND_MSTATS_MODE_WHERE_MODE_C_BRACKET_L: '{';
COMMAND_MSTATS_MODE_WHERE_MODE_C_BRACKET_R: '}';
COMMAND_MSTATS_MODE_WHERE_MODE_PIPE: '|' -> pushMode(COMMAND_MODE);
COMMAND_MSTATS_MODE_WHERE_MODE_COMMA: ',';
COMMAND_MSTATS_MODE_WHERE_MODE_COLON: ':';
COMMAND_MSTATS_MODE_WHERE_MODE_DOT: '.';
COMMAND_MSTATS_MODE_WHERE_MODE_EXCLAMATION: '!';
COMMAND_MSTATS_MODE_WHERE_MODE_QUOTE: '" ';
COMMAND_MSTATS_MODE_WHERE_MODE_SINGLE_QUOTE: '\'';
COMMAND_MSTATS_MODE_WHERE_MODE_DOLLAR: '$';
COMMAND_MSTATS_MODE_WHERE_MODE_AT_SIGN: '@';
COMMAND_MSTATS_MODE_WHERE_MODE_MINUS: '-';
COMMAND_MSTATS_MODE_WHERE_MODE_PLUS: '+';
COMMAND_MSTATS_MODE_WHERE_MODE_PERCENT: '%';
COMMAND_MSTATS_MODE_WHERE_MODE_WILDCARD: '*';
COMMAND_MSTATS_MODE_WHERE_MODE_SLASH: '/';
// equality
COMMAND_MSTATS_MODE_WHERE_MODE_DEQ: '==';
COMMAND_MSTATS_MODE_WHERE_MODE_EQ: '=';
COMMAND_MSTATS_MODE_WHERE_MODE_NEQ: '!=';
COMMAND_MSTATS_MODE_WHERE_MODE_LT: '<';
COMMAND_MSTATS_MODE_WHERE_MODE_LTE: '<=';
COMMAND_MSTATS_MODE_WHERE_MODE_GT: '>';
COMMAND_MSTATS_MODE_WHERE_MODE_GTE: '>=';
// quotation types
COMMAND_MSTATS_MODE_WHERE_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_MSTATS_MODE_WHERE_MODE_SQSTRING: '\'' ( '\\'. | '""' | ~('"'| '\\') )* '\'' -> type(GET_STRING_DOUBLE_QUOTED);
// integers
fragment COMMAND_MSTATS_MODE_WHERE_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
//|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // @
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
// |'\u005B' // [
|'\u005C' // \
// |'\u005D' // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_MSTATS_MODE_WHERE_MODE_STRING
: (COMMAND_MSTATS_MODE_WHERE_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_MSTATS_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 18,369 | ANTLR | .g4 | 398 | 40.635678 | 148 | 0.632765 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | c05e4a656f499a0d35d53d8215eb6108ccc90dc2b737959858c852d4e34e16e0 | false | false | false | false |
330 | COMMAND_TAGS_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TAGS_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_TAGS_MODE;
COMMAND_TAGS_MODE_ANTLR_BUG: 'command_tags_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TAGS_MODE ++++++++++++++
mode COMMAND_TAGS_MODE;
// skip
COMMAND_TAGS_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TAGS_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TAGS_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_TAGS_MODE_OUTPUTFIELD : 'outputfield=' -> pushMode(GET_FIELD);
COMMAND_TAGS_MODE_INCLVALUE : 'inclvalue=' -> pushMode(GET_BOOLEAN);
COMMAND_TAGS_MODE_INCLNAME : 'inclname=' -> pushMode(GET_BOOLEAN);
COMMAND_TAGS_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_TAGS_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_TAGS_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // TAGS
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
|'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_TAGS_MODE_STRING
// one or more characters
: (COMMAND_TAGS_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_TAGS_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,416 | ANTLR | .g4 | 161 | 26.900621 | 102 | 0.527491 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | f292e7b0686ca89cf953b5e4261ab44d19cc122f5f11bc723763e9707003c958 | false | false | false | false |
331 | COMMAND_DIFF_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_DIFF_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_DIFF_MODE;
COMMAND_DIFF_MODE_ANTLR_BUG: 'command_diff_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_DIFF_MODE ++++++++++++++
mode COMMAND_DIFF_MODE;
// skip
COMMAND_DIFF_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_DIFF_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_DIFF_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_DIFF_MODE_DIFFHEADER : 'diffheader=' -> pushMode(GET_BOOLEAN);
COMMAND_DIFF_MODE_ATTRIBUTE : 'attribute' -> pushMode(GET_STRING);
COMMAND_DIFF_MODE_CONTEXT : 'context=' -> pushMode(GET_BOOLEAN);
COMMAND_DIFF_MODE_MAXLEN : 'maxlen=' -> pushMode(GET_INTEGER);
COMMAND_DIFF_MODE_POSITION1: 'position1=' -> pushMode(GET_INTEGER);
COMMAND_DIFF_MODE_POSITION2: 'position2=' -> pushMode(GET_INTEGER);
COMMAND_DIFF_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,913 | ANTLR | .g4 | 63 | 44.412698 | 98 | 0.749472 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | bc7b1f63d84c965f485e5cc4ecc11b78739fd12e535512af6060487f0bdcf686 | false | false | false | false |
332 | DPLParserTransform_rex.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_rex.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_rex;
rexTransformation
: COMMAND_MODE_REX (t_rex_fieldParameter)? ((regexStringType (t_rex_maxMatchParameter)? (t_rex_offsetFieldParameter)? )|( t_rex_modeSedParameter regexStringType))
;
t_rex_fieldParameter
: COMMAND_REX_MODE_FIELD fieldType
;
t_rex_maxMatchParameter
: COMMAND_REX_MODE_MAX_MATCH integerType
;
t_rex_modeSedParameter
: COMMAND_REX_MODE_MODE COMMAND_REX_MODE_SED
;
t_rex_offsetFieldParameter
: COMMAND_REX_MODE_OFFSET_FIELD stringType
;
| 2,606 | ANTLR | .g4 | 61 | 39.393443 | 170 | 0.759794 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | d489d7a69978b19b4b82e111e4e581326d11821c747d6ed3dd9b298e8e03101b | false | false | false | false |
333 | DPLParserTransform_makemv.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_makemv.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_makemv;
makemvTransformation
: COMMAND_MODE_MAKEMV (t_makemv_delimParameter | t_makemv_tokenizerParameter)? (t_makemv_allowemptyParameter)? (t_makemv_setsvParameter)? fieldType
;
t_makemv_allowemptyParameter
: COMMAND_MAKEMV_MODE_ALLOWEMPTY booleanType
;
t_makemv_delimParameter
: COMMAND_MAKEMV_MODE_DELIM stringType
;
t_makemv_setsvParameter
: COMMAND_MAKEMV_MODE_SETSV booleanType
;
t_makemv_tokenizerParameter
: COMMAND_MAKEMV_MODE_TOKENIZER stringType
;
| 2,602 | ANTLR | .g4 | 61 | 39.459016 | 155 | 0.764915 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 629946f73391e3db582934ced3fedd3e1d67b513f701a03982e7695fae1de8df | false | false | false | false |
334 | DPLParserTransform_multisearch.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_multisearch.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_multisearch;
multisearchTransformation
: COMMAND_MODE_MULTISEARCH subsearchStatement (subsearchStatement)+
;
| 2,179 | ANTLR | .g4 | 49 | 42.22449 | 98 | 0.776421 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 51f5a831275ac362940925f07b66669104750c9bc77a0215ac63c76204c6e055 | false | false | false | false |
335 | DPLParserTransform_typer.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_typer.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_typer;
typerTransformation
: COMMAND_MODE_TYPER (t_typer_eventtypesParameter)? (t_typer_maxlenParameter)?
;
t_typer_eventtypesParameter
: COMMAND_TYPER_MODE_EVENTTYPES stringType
;
t_typer_maxlenParameter
: COMMAND_TYPER_MODE_MAXLEN integerType
;
| 2,347 | ANTLR | .g4 | 55 | 40.018182 | 98 | 0.768895 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 871e2b021261c5bfc36413be832c83e2030822bcd5de325497288dad407710ba | false | false | false | false |
336 | DPLParserTransform_setfields.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_setfields.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_setfields;
setfieldsTransformation
: COMMAND_MODE_SETFIELDS t_setfields_setfieldsParameter (COMMA t_setfields_setfieldsParameter)*
;
t_setfields_setfieldsParameter
: stringType COMMAND_SETFIELDS_MODE_EQ stringType
;
| 2,305 | ANTLR | .g4 | 52 | 41.788462 | 103 | 0.774566 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 664824bf45c61ad77d9ffbf32ca3f97ec308403a56a025c57344c2f97e40a0dd | false | false | false | false |
337 | DPLParserTransform_spath.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_spath.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_spath;
spathTransformation
: COMMAND_MODE_SPATH (t_spath_outputParameter | t_spath_pathParameter | t_spath_pathType | t_spath_inputParameter)*
;
t_spath_inputParameter
: COMMAND_SPATH_MODE_INPUT fieldType
;
t_spath_outputParameter
: COMMAND_SPATH_MODE_OUTPUT fieldType
;
t_spath_pathParameter
: COMMAND_SPATH_MODE_PATH (stringType|t_spath_pathType)
;
t_spath_pathType
: stringType (COMMAND_SPATH_MODE_C_BRACKET_L (stringType|integerType) COMMAND_SPATH_MODE_C_BRACKET_R)? (COMMAND_SPATH_MODE_DOT stringType (COMMAND_SPATH_MODE_C_BRACKET_L (stringType|integerType) COMMAND_SPATH_MODE_C_BRACKET_R)?)*
;
| 2,756 | ANTLR | .g4 | 61 | 41.770492 | 237 | 0.759149 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | bf122bf8fb3306580422ec6edb082d509724619698e601181b4d40c4bc55c0f1 | false | false | false | false |
338 | COMMAND_METADATA_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_METADATA_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_METADATA_MODE;
COMMAND_METADATA_MODE_ANTLR_BUG: 'command_metadata_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_METADATA_MODE ++++++++++++++
mode COMMAND_METADATA_MODE;
// skip
COMMAND_METADATA_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_METADATA_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_METADATA_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
fragment LETTER: [a-zA-Z];
COMMAND_METADATA_MODE_STRUCK_SERVER_GROUP : 's'LETTER LETTER'u'LETTER'k_server_group=' -> pushMode(GET_STRING) ;
COMMAND_METADATA_MODE_STRUCK_SERVER : 's'LETTER LETTER'u' LETTER 'k_server=' -> pushMode(GET_STRING);
COMMAND_METADATA_MODE_INDEX : 'index=' -> pushMode(GET_STRING);
COMMAND_METADATA_MODE_TYPE : 'type=' -> pushMode(COMMAND_METADATA_MODE_TYPE_MODE);
COMMAND_METADATA_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_METADATA_MODE_SINGLE_STRING: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
// characters for string
fragment COMMAND_METADATA_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // METADATA
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_METADATA_MODE_STRING
// one or more characters
: (COMMAND_METADATA_MODE_CHAR)+ -> type(GET_FIELD_STRING);
mode COMMAND_METADATA_MODE_TYPE_MODE;
COMMAND_METADATA_MODE_HOSTS: 'hosts' -> popMode;
COMMAND_METADATA_MODE_SOURCES: 'sources' -> popMode;
COMMAND_METADATA_MODE_SOURCETYPES: 'sourcetypes' -> popMode;
COMMAND_METADATA_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,857 | ANTLR | .g4 | 167 | 28.532934 | 112 | 0.54866 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 0918426a67b49e728ea9b7f008946fcf1a2f8ca0a974d9b193c01cb713ab78a1 | false | false | false | false |
339 | COMMAND_SEARCHTXN_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_SEARCHTXN_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_SEARCHTXN_MODE;
COMMAND_SEARCHTXN_MODE_ANTLR_BUG: 'command_searchtxn_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_SEARCHTXN_MODE ++++++++++++++
mode COMMAND_SEARCHTXN_MODE;
// skip
COMMAND_SEARCHTXN_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_SEARCHTXN_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_SEARCHTXN_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_SEARCHTXN_MODE_USE_DISJUNCT : 'use_disjunct=' -> pushMode(GET_BOOLEAN);
COMMAND_SEARCHTXN_MODE_EVENTSONLY : 'eventsonly=' -> pushMode(GET_BOOLEAN);
COMMAND_SEARCHTXN_MODE_MAX_TERMS : 'max_terms=' -> pushMode(GET_INTEGER);
COMMAND_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_SEARCHTXN_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_SEARCHTXN_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // SEARCHTXN
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
|'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_SEARCHTXN_MODE_STRING
// one or more characters
: (COMMAND_SEARCHTXN_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_SEARCHTXN_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,500 | ANTLR | .g4 | 161 | 27.42236 | 108 | 0.535701 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 15ef69eefb871ba827fe3d5a8d20f437c37367ff786455defeeb54cbf11a7e8f | false | false | false | false |
340 | DPLParserTransform_explain.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_explain.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_explain;
explainTransformation
: COMMAND_MODE_EXPLAIN (COMMAND_EXPLAIN_MODE_BRIEF
| t_explain_briefOption
| t_explain_extendedOption
| t_explain_codegenOption
| t_explain_costOption
| t_explain_formattedOption)?
;
t_explain_briefOption
: COMMAND_EXPLAIN_MODE_BRIEF
;
t_explain_extendedOption
: COMMAND_EXPLAIN_MODE_EXTENDED
;
t_explain_codegenOption
: COMMAND_EXPLAIN_MODE_CODEGEN
;
t_explain_costOption
: COMMAND_EXPLAIN_MODE_COST
;
t_explain_formattedOption
: COMMAND_EXPLAIN_MODE_FORMATTED
;
| 2,714 | ANTLR | .g4 | 69 | 35.289855 | 98 | 0.748375 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 6597ae0fb684b4610c47931375cd1eaeff9e933de151e6a69224f2e7d97961d8 | false | false | false | false |
341 | COMMAND_IPLOCATION_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_IPLOCATION_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_IPLOCATION_MODE;
COMMAND_IPLOCATION_MODE_ANTLR_BUG: 'command_iplocation_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_IPLOCATION_MODE ++++++++++++++
mode COMMAND_IPLOCATION_MODE;
// skip
COMMAND_IPLOCATION_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_IPLOCATION_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_IPLOCATION_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_IPLOCATION_MODE_ALLFIELDS : 'allfields=' -> pushMode(GET_BOOLEAN);
COMMAND_IPLOCATION_MODE_PREFIX : 'prefix=' -> pushMode(GET_STRING);
COMMAND_IPLOCATION_MODE_LANG : 'lang=' -> pushMode(GET_STRING);
COMMAND_IPLOCATION_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_IPLOCATION_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_IPLOCATION_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
//|'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
//|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // IPLOCATION
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_IPLOCATION_MODE_STRING
// one or more characters
: (COMMAND_IPLOCATION_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_IPLOCATION_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,500 | ANTLR | .g4 | 161 | 27.42236 | 108 | 0.536077 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 9067660f988d859accd80acdf616d4a283f1a56b64f049c26a4d143083049a79 | false | false | false | false |
342 | GET_BOOLEAN.g4 | teragrep_pth_03/src/main/antlr4/imports/GET_BOOLEAN.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar GET_BOOLEAN;
GET_BOOLEAN_ANTLR_BUG: 'get_boolean_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ GET_BOOLEAN ++++++++++++++
mode GET_BOOLEAN;
// skip
GET_BOOLEAN_SPACE: SPACE -> channel(HIDDEN);
// tokens
GET_BOOLEAN_TRUE: ('true' | 't' | 'TRUE' | '1' | 'T' | 'True') -> popMode;
GET_BOOLEAN_FALSE: ('false' | 'FALSE' | 'f' | '0' | 'F' | 'False') -> popMode;
GET_BOOLEAN_SPLIT: 'allnums' -> popMode;
COMMAND_GET_BOOLEAN_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,537 | ANTLR | .g4 | 57 | 42.614035 | 98 | 0.736757 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | c4a1ceaaf4221de9f3d2d2fed787f334b8aa179bc9b7088673340f67d1446ead | false | false | false | false |
343 | COMMAND_TIMECHART_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TIMECHART_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_TIMECHART_MODE;
COMMAND_TIMECHART_MODE_ANTLR_BUG: 'command_timechart_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TIMECHART_MODE ++++++++++++++
mode COMMAND_TIMECHART_MODE;
// skip
COMMAND_TIMECHART_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TIMECHART_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TIMECHART_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_TIMECHART_MODE_WHERE: ('where'|'WHERE');
COMMAND_TIMECHART_MODE_PARENTHESIS_R : ')';
COMMAND_TIMECHART_MODE_PARENTHESIS_L : '(';
COMMAND_TIMECHART_MODE_FIXEDRANGE : 'fixedrange=' -> pushMode(GET_BOOLEAN);
COMMAND_TIMECHART_MODE_ALIGNTIME : 'aligntime=' -> pushMode(GET_TIME);
COMMAND_TIMECHART_MODE_USEOTHER : 'useother=' -> pushMode(GET_BOOLEAN);
COMMAND_TIMECHART_MODE_OTHERSTR : 'otherstr=' -> pushMode(GET_STRING);
COMMAND_TIMECHART_MODE_USENULL : 'usenull=' -> pushMode(GET_BOOLEAN);
COMMAND_TIMECHART_MODE_NULLSTR : 'nullstr=' -> pushMode(GET_STRING);
COMMAND_TIMECHART_MODE_MINSPAN : 'minspan=' -> pushMode(GET_SPAN);
COMMAND_TIMECHART_MODE_PARTIAL : 'partial=' -> pushMode(GET_BOOLEAN);
COMMAND_TIMECHART_MODE_FORMAT : 'format=' -> pushMode(GET_STRING);
COMMAND_TIMECHART_MODE_START : 'start=' -> pushMode(GET_NUMBER);
COMMAND_TIMECHART_MODE_NOTIN : 'notin';
COMMAND_TIMECHART_MODE_BOTTOM : 'bottom';
COMMAND_TIMECHART_MODE_TOP : 'top';
COMMAND_TIMECHART_MODE_AGG : 'agg=';
COMMAND_TIMECHART_MODE_LIMIT : 'limit=' -> pushMode(COMMAND_TIMECHART_SUBMODE_LIMIT_MODE);
COMMAND_TIMECHART_MODE_SPAN : 'span=' -> pushMode(GET_SPAN);
COMMAND_TIMECHART_MODE_CONT : 'cont=' -> pushMode(GET_BOOLEAN);
COMMAND_TIMECHART_MODE_BINS : 'bins=' -> pushMode(GET_INTEGER);
COMMAND_TIMECHART_MODE_END : 'end=' -> pushMode(GET_NUMBER);
COMMAND_TIMECHART_MODE_SEP : 'sep=' -> pushMode(GET_STRING);
COMMAND_TIMECHART_MODE_GT : '>' -> pushMode(GET_NUMBER);
COMMAND_TIMECHART_MODE_LT : '<' -> pushMode(GET_NUMBER);
COMMAND_TIMECHART_MODE_DEDUP_SPLITVALS : 'dedup_splitvals=' -> pushMode(GET_BOOLEAN);
COMMAND_TIMECHART_MODE_BY : ('BY'|'by'|'By');
COMMAND_TIMECHART_MODE_Or : 'OR';
COMMAND_TIMECHART_MODE_And : 'AND';
COMMAND_TIMECHART_MODE_Xor : 'XOR';
COMMAND_TIMECHART_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_TIMECHART_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_TIMECHART_MODE_C: 'c' ;
COMMAND_TIMECHART_MODE_AS: ('AS'|'as'|'As') -> pushMode(GET_FIELD);
fragment DIGIT: [0-9];
COMMAND_TIMECHART_MODE_INTEGER: DIGIT+;
// aggregateMethod
COMMAND_TIMECHART_MODE_COUNT: 'count' -> type(METHOD_AGGREGATE_COUNT);
COMMAND_TIMECHART_MODE_EVAL_PARENTHESIS_L: 'eval(' -> pushMode(EVAL_LANGUAGE_MODE);
COMMAND_TIMECHART_MODE_AVG_PARENTHESIS_R: 'avg(' -> type(METHOD_AGGREGATE_AVG), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_MEAN_PARENTHESIS_R: 'mean(' -> type(METHOD_AGGREGATE_MEAN), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_C_PARENTHESIS_R: 'c(' -> type(METHOD_AGGREGATE_C), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_COUNT_PARENTHESIS_R: 'count(' -> type(METHOD_AGGREGATE_COUNT_B), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_DC_PARENTHESIS_R: 'dc(' -> type(METHOD_AGGREGATE_DC), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_DISTINCT_COUNT_PARENTHESIS_R: 'distinct_count(' -> type(METHOD_AGGREGATE_DISTINCT_COUNT), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_EARLIEST_PARENTHESIS_R: 'earliest(' -> type(METHOD_AGGREGATE_EARLIEST), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_EARLIEST_TIME_PARENTHESIS_R: 'earliest_time(' -> type(METHOD_AGGREGATE_EARLIEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_ESTDC_PARENTHESIS_R: 'estdc(' -> type(METHOD_AGGREGATE_ESTDC), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_ESTDC_ERROR_PARENTHESIS_R: 'estdc_error(' -> type(METHOD_AGGREGATE_ESTDC_ERROR), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_FIRST_PARENTHESIS_R: 'first(' -> type(METHOD_AGGREGATE_FIRST), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_LAST_PARENTHESIS_R: 'last(' -> type(METHOD_AGGREGATE_LAST), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_LATEST_PARENTHESIS_R: 'latest(' -> type(METHOD_AGGREGATE_LATEST), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_LATEST_TIME_PARENTHESIS_R: 'latest_time(' -> type(METHOD_AGGREGATE_LATEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_LIST_PARENTHESIS_R: 'list(' -> type(METHOD_AGGREGATE_LIST), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_MAX_PARENTHESIS_R: 'max(' -> type(METHOD_AGGREGATE_MAX), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_MEDIAN_PARENTHESIS_R: 'median(' -> type(METHOD_AGGREGATE_MEDIAN), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_MIN_PARENTHESIS_R: 'min(' -> type(METHOD_AGGREGATE_MIN), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_MODE_PARENTHESIS_R: 'mode(' -> type(METHOD_AGGREGATE_MODE), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_P_PARENTHESIS_R: 'p(' -> type(METHOD_AGGREGATE_P), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_PERC_PARENTHESIS_R: 'perc(' -> type(METHOD_AGGREGATE_PERC), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_EXACTPERC_PARENTHESIS_R: 'exactperc(' -> type(METHOD_AGGREGATE_EXACTPERC), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_UPPERPERC_PARENTHESIS_R: 'upperperc(' -> type(METHOD_AGGREGATE_UPPERPERC), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_PERCINT_PARENTHESIS_R: 'percint(' -> type(METHOD_AGGREGATE_PERCINT), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_RANGE_PARENTHESIS_R: 'range(' -> type(METHOD_AGGREGATE_RANGE), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_RATE_PARENTHESIS_R: 'rate(' -> type(METHOD_AGGREGATE_RATE), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_STDEV_PARENTHESIS_R: 'stdev(' -> type(METHOD_AGGREGATE_STDEV), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_STDEVP_PARENTHESIS_R: 'stdevp(' -> type(METHOD_AGGREGATE_STDEVP), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_SUM_PARENTHESIS_R: 'sum(' -> type(METHOD_AGGREGATE_SUM), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_SUMSQ_PARENTHESIS_R: 'sumsq(' -> type(METHOD_AGGREGATE_SUMSQ), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_VALUES_PARENTHESIS_R: 'values(' -> type(METHOD_AGGREGATE_VALUES), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_VAR_PARENTHESIS_R: 'var(' -> type(METHOD_AGGREGATE_VAR), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_VARP_PARENTHESIS_R: 'varp(' -> type(METHOD_AGGREGATE_VARP), pushMode(AGGREGATION_MODE);
//special percX()
COMMAND_TIMECHART_MODE_P_VARIABLE: 'p'COMMAND_TIMECHART_MODE_INTEGER -> type(METHOD_AGGREGATE_P_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_PERC_VARIABLE: 'perc'COMMAND_TIMECHART_MODE_INTEGER -> type(METHOD_AGGREGATE_PERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_EXACTPERC_VARIABLE: 'exactperc'COMMAND_TIMECHART_MODE_INTEGER -> type(METHOD_AGGREGATE_EXACTPERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_UPPERPERC_VARIABLE: 'upperperc'COMMAND_TIMECHART_MODE_INTEGER -> type(METHOD_AGGREGATE_UPPERPERC_VARIABLE), pushMode(AGGREGATION_MODE);
//special agg time
COMMAND_TIMECHART_MODE_PER_SECOND: 'per_second(' -> type(METHOD_AGGREGATE_PER_SECOND), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_PER_MINUTE: 'per_minute(' -> type(METHOD_AGGREGATE_PER_MINUTE), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_PER_HOUR: 'per_hour(' -> type(METHOD_AGGREGATE_PER_HOUR), pushMode(AGGREGATION_MODE);
COMMAND_TIMECHART_MODE_PER_DAY: 'per_day(' -> type(METHOD_AGGREGATE_PER_DAY), pushMode(AGGREGATION_MODE);
// characters for string
fragment COMMAND_TIMECHART_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' {false}? // <
|'\u003D' {false}? // =
|'\u003E' {false}? // >
|'\u003F' // ?
|'\u0040' // TIMECHART
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_TIMECHART_MODE_STRING
// one or more characters
: (COMMAND_TIMECHART_MODE_CHAR)+ -> type(GET_FIELD_STRING);
mode COMMAND_TIMECHART_SUBMODE_LIMIT_MODE;
fragment COMMAND_TIMECHART_SUBMODE_LIMIT_MODE_BOTTOM : 'bottom';
fragment COMMAND_TIMECHART_SUBMODE_LIMIT_MODE_TOP : 'top';
COMMAND_TIMECHART_SUBMODE_LIMIT_MODE_TOP_INT:COMMAND_TIMECHART_SUBMODE_LIMIT_MODE_TOP? INTEGER -> popMode;
COMMAND_TIMECHART_SUBMODE_LIMIT_MODE_BOTTOM_INT: COMMAND_TIMECHART_SUBMODE_LIMIT_MODE_BOTTOM? INTEGER -> popMode;
fragment DIGIT2: [0-9]+;
fragment MINUS2: '-';
fragment INTEGER: MINUS2? DIGIT2;
COMMAND_TIMECHART_SUBMODE_LIMIT_MODE_INTEGER: MINUS2? DIGIT2 -> popMode;
COMMAND_TIMECHART_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
// exit
COMMAND_TIMECHART_SUBMODE_SPAN_SPACE: SPACE -> channel(HIDDEN), popMode;
| 12,911 | ANTLR | .g4 | 249 | 47.116466 | 158 | 0.675449 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 2fc908df7ba9b0056e9bb31185478c445e5acf552ea2b0ac0a6ad50486a18b76 | false | false | false | false |
344 | DPLParserTransform_addcoltotals.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_addcoltotals.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_addcoltotals;
addcoltotalsTransformation
: COMMAND_MODE_ADDCOLTOTALS (t_addcoltotals_labelfieldParameter|t_addcoltotals_labelParameter)*? fieldListType?
;
t_addcoltotals_labelfieldParameter
: COMMAND_ADDCOLTOTALS_MODE_LABELFIELD fieldType
;
t_addcoltotals_labelParameter
: COMMAND_ADDCOLTOTALS_MODE_LABEL stringType
;
| 2,427 | ANTLR | .g4 | 55 | 41.309091 | 119 | 0.774535 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 7d619450cd1be6d5c0318ca6aa22eac7bd93c29f286b7149f64e8e9858ff9880 | false | false | false | false |
345 | COMMAND_EXTRACT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_EXTRACT_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_EXTRACT_MODE;
COMMAND_EXTRACT_MODE_ANTLR_BUG: 'command_extract_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_EXTRACT_MODE ++++++++++++++
mode COMMAND_EXTRACT_MODE;
// skip
COMMAND_EXTRACT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_EXTRACT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_EXTRACT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_EXTRACT_MODE_CLEAN_KEYS : 'clean_keys=' -> pushMode(GET_BOOLEAN);
COMMAND_EXTRACT_MODE_PAIRDELIM : 'pairdelim='-> pushMode(GET_STRING);
COMMAND_EXTRACT_MODE_MAXCHARS : 'maxchars=' -> pushMode(GET_INTEGER);
COMMAND_EXTRACT_MODE_SEGMENT : 'segment=' -> pushMode(GET_BOOLEAN);
COMMAND_EXTRACT_MODE_KVDELIM : 'kvdelim=' -> pushMode(GET_STRING);
COMMAND_EXTRACT_MODE_RELOAD : 'reload=' -> pushMode(GET_BOOLEAN);
COMMAND_EXTRACT_MODE_MV_ADD : 'mv_add=' -> pushMode(GET_BOOLEAN);
COMMAND_EXTRACT_MODE_LIMIT : 'limit=' -> pushMode(GET_INTEGER);
COMMAND_EXTRACT_MODE_SINGLE_QSTRING:'\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_EXTRACT_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_EXTRACT_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
//|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // EXTRACT
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
|'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_EXTRACT_MODE_STRING
// one or more characters
: (COMMAND_EXTRACT_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_EXTRACT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,783 | ANTLR | .g4 | 166 | 28.331325 | 107 | 0.545195 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | de8da1a103fe0f8beb14d3ee161931c37a2abe5009024b1701262fb65992434b | false | false | false | false |
346 | COMMAND_FILLNULL_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_FILLNULL_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_FILLNULL_MODE;
COMMAND_FILLNULL_MODE_ANTLR_BUG: 'command_fillnull_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_FILLNULL_MODE ++++++++++++++
mode COMMAND_FILLNULL_MODE;
// skip
COMMAND_FILLNULL_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_FILLNULL_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_FILLNULL_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_FILLNULL_MODE_VALUE : 'value=' -> pushMode(GET_STRING);
COMMAND_FILLNULL_MODE_COMMA : ',' -> type(COMMA);
COMMAND_FILLNULL_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_FILLNULL_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_FILLNULL_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
//|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
//|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // FILLNULL
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_FILLNULL_MODE_STRING
// one or more characters
: (COMMAND_FILLNULL_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_FILLNULL_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,383 | ANTLR | .g4 | 160 | 26.86875 | 106 | 0.528045 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | f1e7547b6577ec9c054d1754d3db179c37c1de68dcd71ce19e4363d0968bb8b5 | false | false | false | false |
347 | COMMAND_RUNSHELLSCRIPT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_RUNSHELLSCRIPT_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_RUNSHELLSCRIPT_MODE;
COMMAND_RUNSHELLSCRIPT_MODE_ANTLR_BUG: 'command_runshellscript_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_RUNSHELLSCRIPT_MODE ++++++++++++++
mode COMMAND_RUNSHELLSCRIPT_MODE;
// skip
COMMAND_RUNSHELLSCRIPT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_RUNSHELLSCRIPT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_RUNSHELLSCRIPT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_RUNSHELLSCRIPT_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_RUNSHELLSCRIPT_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_RUNSHELLSCRIPT_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // RUNSHELLSCRIPT
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_RUNSHELLSCRIPT_MODE_STRING
// one or more characters
: (COMMAND_RUNSHELLSCRIPT_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_RUNSHELLSCRIPT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,355 | ANTLR | .g4 | 158 | 27.044304 | 112 | 0.532819 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 4d20f73d427cce31fc2858ec7a15f20533a1e7a1ec0b04b93ce42cab6d803c3a | false | false | false | false |
348 | COMMAND_SIRARE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_SIRARE_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_SIRARE_MODE;
COMMAND_SIRARE_MODE_ANTLR_BUG: 'command_sirare_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_SIRARE_MODE ++++++++++++++
mode COMMAND_SIRARE_MODE;
// skip
COMMAND_SIRARE_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_SIRARE_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_SIRARE_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_SIRARE_MODE_PERCENTFIELD : 'percentfield=' -> pushMode(GET_STRING);
COMMAND_SIRARE_MODE_COUNTFIELD : 'countfield=' -> pushMode(GET_STRING);
COMMAND_SIRARE_MODE_SHOWCOUNT : 'showcount=' -> pushMode(GET_BOOLEAN);
COMMAND_SIRARE_MODE_SHOWPERC : 'showpercent=' -> pushMode(GET_BOOLEAN);
COMMAND_SIRARE_MODE_LIMIT : 'limit=' -> pushMode(GET_INTEGER);
COMMAND_SIRARE_MODE_COMMA : ',' -> type(COMMA);
COMMAND_SIRARE_MODE_BY : ('BY'|'by');
COMMAND_SIRARE_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_SIRARE_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_SIRARE_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // SIRARE
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_SIRARE_MODE_STRING
// one or more characters
: (COMMAND_SIRARE_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_SIRARE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,682 | ANTLR | .g4 | 165 | 27.836364 | 104 | 0.537818 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 8abf2a442c735cca0856ab2997b9bea582317f2493fafd7fc6c4fcdb838a94e8 | false | false | false | false |
349 | COMMAND_FORMAT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_FORMAT_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_FORMAT_MODE;
COMMAND_FORMAT_MODE_ANTLR_BUG: 'command_format_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_FORMAT_MODE ++++++++++++++
mode COMMAND_FORMAT_MODE;
// skip
COMMAND_FORMAT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_FORMAT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_FORMAT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_FORMAT_MODE_MAXRESULTS : 'maxresults=' ->pushMode(GET_INTEGER);
COMMAND_FORMAT_MODE_MVSEP : 'mvsep=' ->pushMode(GET_STRING);
COMMAND_FORMAT_MODE_SINGLE_QUOTED: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_FORMAT_MODE_DOUBLE_QUOTED: '"' ( '\\'. | ~('"' | '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
COMMAND_FORMAT_MODE_STRING_STRING
// one or more characters
: (COMMAND_FORMAT_MODE_CHAR)+ -> type(GET_STRING_STRING);
fragment COMMAND_FORMAT_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
//|'\u0028' // (
//|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // @
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' // [
|'\u005C' // \
|'\u005D' // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_FORMAT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,320 | ANTLR | .g4 | 159 | 26.704403 | 106 | 0.527562 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 7d676b1ae392e731c304f824c3a531a6932ddc7319ab33773c58d47f363e896b | false | false | false | false |
350 | DPLParserTransform_from.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_from.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_from;
fromTransformation
: COMMAND_MODE_FROM ((t_from_datasetTypeParameter COMMAND_FROM_MODE_COLON stringType) | (stringType stringType))
;
t_from_datasetTypeParameter // COMMAND_MODE_FROM
: (COMMAND_FROM_MODE_DATAMODEL|COMMAND_FROM_MODE_SAVEDSEARCH|COMMAND_FROM_MODE_INPUTLOOKUP)
;
| 2,371 | ANTLR | .g4 | 52 | 43.076923 | 120 | 0.771589 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 7fbec39191831ab804eeba5380f6007e46abbe80dea2c547fc394af906011369 | false | false | false | false |
351 | COMMAND_INPUTCSV_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_INPUTCSV_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_INPUTCSV_MODE;
COMMAND_INPUTCSV_MODE_ANTLR_BUG: 'command_inputcsv_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_INPUTCSV_MODE ++++++++++++++
mode COMMAND_INPUTCSV_MODE;
// skip
COMMAND_INPUTCSV_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_INPUTCSV_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_INPUTCSV_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_INPUTCSV_MODE_WHERE: ('where' | 'WHERE' | 'Where') -> pushMode(COMMAND_INPUTCSV_MODE_WHERE_MODE);
COMMAND_INPUTCSV_MODE_DISPATCH : 'dispatch=' -> pushMode(GET_BOOLEAN);
COMMAND_INPUTCSV_MODE_EVENTS : 'events=' -> pushMode(GET_BOOLEAN);
COMMAND_INPUTCSV_MODE_APPEND : 'append=' -> pushMode(GET_BOOLEAN);
COMMAND_INPUTCSV_MODE_START : 'start=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_MAX : 'max=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_SLASH: '/';
COMMAND_INPUTCSV_MODE_DOT: '.';
COMMAND_INPUTCSV_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_STRING_SINGLE_QUOTED);
COMMAND_INPUTCSV_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_INPUTCSV_MODE_CHAR
:'\u0022' // "
|'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // INPUTCSV
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_INPUTCSV_MODE_STRING
// one or more characters
: (COMMAND_INPUTCSV_MODE_CHAR)+ -> type(GET_STRING_STRING);
mode COMMAND_INPUTCSV_MODE_WHERE_MODE;
// skip
COMMAND_INPUTCSV_MODE_WHERE_MODE_SPACE: SPACE -> channel(HIDDEN);
// valid for fields
// Reserved words
COMMAND_INPUTCSV_MODE_WHERE_MODE_TIMEFORMAT: 'timeformat=' -> pushMode(GET_STRING);
COMMAND_INPUTCSV_MODE_WHERE_MODE_EARLIEST: 'earliest=' -> pushMode(GET_TIME);
COMMAND_INPUTCSV_MODE_WHERE_MODE_INDEX_EARLIEST: '_index_earliest=' -> pushMode(GET_STRING);
COMMAND_INPUTCSV_MODE_WHERE_MODE_STARTDAYSAGO: 'stardaysago=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_STARTHOURSAGO: 'starthoursago=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_STARTMINUTESAGO: 'startminutesago=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_STARTMONTHSAGO: 'startmonthsago=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_STARTTIME: 'starttime=' -> pushMode(GET_STRING);
COMMAND_INPUTCSV_MODE_WHERE_MODE_STARTTIMEU: 'starttimeu=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_LATEST: 'latest=' -> pushMode(GET_TIME);
COMMAND_INPUTCSV_MODE_WHERE_MODE_INDEX_LATEST: '_index_latest=' -> pushMode(GET_STRING);
COMMAND_INPUTCSV_MODE_WHERE_MODE_ENDDAYSAGO: 'enddaysago=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_ENDHOURSAGO: 'endhoursago=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_ENDMINUTESAGO: 'endminutesago=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_ENDMONTHSAGO: 'endmonthsago=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_ENDTIME: 'endtime=' -> pushMode(GET_STRING);
COMMAND_INPUTCSV_MODE_WHERE_MODE_ENDTIMEU: 'endtimeu=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_SEARCHTIMESPANDAYS: 'searchtimespandays=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_SEARCHTIMESPANHOURS: 'searchtimespanhours=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_SEARCHTIMESPANMINUTES: 'searchtimespanminutes=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_SEARCHTIMESPANMONHTS: 'searchtimespanmonths=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_MINUTESAGO: 'minutesago=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_HOURSAGO: 'hoursago=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_DAYSAGO: 'daysago=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_MONTHSAGO: 'monthsago=' -> pushMode(GET_INTEGER);
COMMAND_INPUTCSV_MODE_WHERE_MODE_EVENTTYPE: 'eventtype';
COMMAND_INPUTCSV_MODE_WHERE_MODE_EVENTTYPETAG: 'eventtypetag';
COMMAND_INPUTCSV_MODE_WHERE_MODE_HOST: 'host';
COMMAND_INPUTCSV_MODE_WHERE_MODE_HOSTTAG: 'hosttag';
COMMAND_INPUTCSV_MODE_WHERE_MODE_INDEX: 'index';
COMMAND_INPUTCSV_MODE_WHERE_MODE_SAVEDSEARCH: 'savedsearch';
COMMAND_INPUTCSV_MODE_WHERE_MODE_SOURCE: 'source';
COMMAND_INPUTCSV_MODE_WHERE_MODE_SOURCETYPE: 'sourcetype';
//special for tstats
COMMAND_TSTATS_MODE_NODENAME: 'nodename=' -> pushMode(GET_STRING);
COMMAND_INPUTCSV_MODE_WHERE_MODE_TAG: 'tag';
//push to diffrent MODE_MODE's
COMMAND_INPUTCSV_MODE_WHERE_MODE_AND: 'AND';
COMMAND_INPUTCSV_MODE_WHERE_MODE_NOT: 'NOT';
COMMAND_INPUTCSV_MODE_WHERE_MODE_OR: 'OR';
COMMAND_INPUTCSV_MODE_WHERE_MODE_IN: 'IN';
COMMAND_INPUTCSV_MODE_WHERE_MODE_BY_BY : ('BY'|'by'|'By') -> popMode;
COMMAND_INPUTCSV_MODE_WHERE_MODE_GROUPBY : ('GROUPBY'|'groupby') -> popMode;
// charType, common types
COMMAND_INPUTCSV_MODE_WHERE_MODE_PARENTHESIS_L: '(';
COMMAND_INPUTCSV_MODE_WHERE_MODE_PARENTHESIS_R: ')';
COMMAND_INPUTCSV_MODE_WHERE_MODE_BRACKET_L: '[' -> pushMode(COMMAND_MODE);
COMMAND_INPUTCSV_MODE_WHERE_MODE_BRACKET_R: ']' -> popMode, popMode;
COMMAND_INPUTCSV_MODE_WHERE_MODE_C_BRACKET_L: '{';
COMMAND_INPUTCSV_MODE_WHERE_MODE_C_BRACKET_R: '}';
COMMAND_INPUTCSV_MODE_WHERE_MODE_PIPE: '|' -> pushMode(COMMAND_MODE);
COMMAND_INPUTCSV_MODE_WHERE_MODE_COMMA: ',';
COMMAND_INPUTCSV_MODE_WHERE_MODE_COLON: ':';
COMMAND_INPUTCSV_MODE_WHERE_MODE_DOT: '.';
COMMAND_INPUTCSV_MODE_WHERE_MODE_EXCLAMATION: '!';
COMMAND_INPUTCSV_MODE_WHERE_MODE_QUOTE: '" ';
COMMAND_INPUTCSV_MODE_WHERE_MODE_SINGLE_QUOTE: '\'';
COMMAND_INPUTCSV_MODE_WHERE_MODE_DOLLAR: '$';
COMMAND_INPUTCSV_MODE_WHERE_MODE_AT_SIGN: '@';
COMMAND_INPUTCSV_MODE_WHERE_MODE_MINUS: '-';
COMMAND_INPUTCSV_MODE_WHERE_MODE_PLUS: '+';
COMMAND_INPUTCSV_MODE_WHERE_MODE_PERCENT: '%';
COMMAND_INPUTCSV_MODE_WHERE_MODE_WILDCARD: '*';
COMMAND_INPUTCSV_MODE_WHERE_MODE_SLASH: '/';
// equality
COMMAND_INPUTCSV_MODE_WHERE_MODE_DEQ: '==';
COMMAND_INPUTCSV_MODE_WHERE_MODE_EQ: '=';
COMMAND_INPUTCSV_MODE_WHERE_MODE_NEQ: '!=';
COMMAND_INPUTCSV_MODE_WHERE_MODE_LT: '<';
COMMAND_INPUTCSV_MODE_WHERE_MODE_LTE: '<=';
COMMAND_INPUTCSV_MODE_WHERE_MODE_GT: '>';
COMMAND_INPUTCSV_MODE_WHERE_MODE_GTE: '>=';
// quotation types
COMMAND_INPUTCSV_MODE_WHERE_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_INPUTCSV_MODE_WHERE_MODE_SQSTRING: '\'' ( '\\'. | '""' | ~('"'| '\\') )* '\'' -> type(GET_STRING_DOUBLE_QUOTED);
// integers
fragment COMMAND_INPUTCSV_MODE_WHERE_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
//|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // @
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
// |'\u005B' // [
|'\u005C' // \
// |'\u005D' // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_INPUTCSV_MODE_WHERE_MODE_STRING
: (COMMAND_INPUTCSV_MODE_WHERE_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_INPUTCSV_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 13,200 | ANTLR | .g4 | 345 | 31.997101 | 120 | 0.577046 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 3ac064a12b525addb3214538ab117e7ddd6518b9ac4c297ba8cd130bcdcbc7ba | false | false | false | false |
352 | DPLParserTransform_top.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_top.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_top;
topTransformation
: COMMAND_MODE_TOP (integerType)? (t_top_topOptParameter)*? fieldListType (t_top_byInstruction)?
;
t_top_topOptParameter
: t_top_showcountParameter
| t_top_showpercParameter
| t_top_limitParameter
| t_top_countfieldParameter
| t_top_percentfieldParameter
| t_top_useotherParameter
| t_top_otherstrParameter
;
t_top_countfieldParameter
: COMMAND_TOP_MODE_COUNTFIELD fieldType
;
t_top_limitParameter
: COMMAND_TOP_MODE_LIMIT integerType
;
t_top_otherstrParameter
: COMMAND_TOP_MODE_OTHERSTR stringType
;
t_top_percentfieldParameter
: COMMAND_TOP_MODE_PERCENTFIELD fieldType
;
t_top_showcountParameter
: COMMAND_TOP_MODE_SHOWCOUNT booleanType
;
t_top_showpercParameter
: COMMAND_TOP_MODE_SHOWPERC booleanType
;
t_top_useotherParameter
: COMMAND_TOP_MODE_USEOTHER booleanType
;
t_top_byInstruction
: (COMMAND_TOP_MODE_BY) fieldListType
;
| 3,133 | ANTLR | .g4 | 82 | 33.95122 | 104 | 0.741107 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 11e20cbf6ab3fdfaa8f2bf99a600709dd69e2985daaa5e2ade68be038e70fa4a | false | false | false | false |
353 | COMMAND_ANOMALIES_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_ANOMALIES_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_ANOMALIES_MODE;
COMMAND_ANOMALIES_MODE_ANTLR_BUG: 'command_anomalies_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_ANOMALIES_MODE ++++++++++++++
mode COMMAND_ANOMALIES_MODE;
// skip
COMMAND_ANOMALIES_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_ANOMALIES_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_ANOMALIES_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_ANOMALIES_MODE_DENYLISTTHRESHOLD : 'denylistthreshold=' -> pushMode(GET_NUMBER);
COMMAND_ANOMALIES_MODE_THRESHOLD : 'threshold=' -> pushMode(GET_NUMBER);
COMMAND_ANOMALIES_MODE_NORMALIZE : 'normalize=' -> pushMode(GET_BOOLEAN);
COMMAND_ANOMALIES_MODE_MAXVALUES : 'maxvalues=' -> pushMode(GET_NUMBER);
COMMAND_ANOMALIES_MODE_LABELONLY : 'labelonly=' -> pushMode(GET_BOOLEAN);
COMMAND_ANOMALIES_MODE_FIELD : 'field=' -> pushMode(GET_FIELD);
COMMAND_ANOMALIES_MODE_BY : ('BY'|'by');
COMMAND_ANOMALIES_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_ANOMALIES_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_ANOMALIES_MODE_DENYLIST: 'denylist=' -> pushMode(GET_STRING);
// characters for string
fragment COMMAND_ANOMALIES_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
//|'\u0028' // (
//|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // ANOMALIES
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_ANOMALIES_MODE_STRING
// one or more characters
: (COMMAND_ANOMALIES_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_ANOMALIES_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,841 | ANTLR | .g4 | 166 | 28.620482 | 107 | 0.548427 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 047fadd555765338232595f3f22ed7ff1fa31b29475cd8017eb28f70191a80d2 | false | false | false | false |
354 | COMMAND_FROM_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_FROM_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_FROM_MODE;
COMMAND_FROM_MODE_ANTLR_BUG: 'command_from_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_FROM_MODE ++++++++++++++
mode COMMAND_FROM_MODE;
// skip
COMMAND_FROM_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_FROM_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_FROM_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_FROM_MODE_DATAMODEL: 'datamodel';
COMMAND_FROM_MODE_SAVEDSEARCH: 'savedsearch';
COMMAND_FROM_MODE_INPUTLOOKUP: 'inputlookup';
COMMAND_FROM_MODE_COLON : ':';
COMMAND_FROM_MODE_SINGLE_STRING: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_FROM_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_FROM_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' {false}? // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // FROM
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_FROM_MODE_STRING
// one or more characters
: (COMMAND_FROM_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_FROM_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,373 | ANTLR | .g4 | 162 | 26.530864 | 104 | 0.527671 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | fa8286ef80cbaf73ba262566bf711d2b7a612bffd816a73e731c4a42dc2f3d06 | false | false | false | false |
355 | COMMAND_UNTABLE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_UNTABLE_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_UNTABLE_MODE;
COMMAND_UNTABLE_MODE_ANTLR_BUG: 'command_untable_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_UNTABLE_MODE ++++++++++++++
mode COMMAND_UNTABLE_MODE;
// skip
COMMAND_UNTABLE_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_UNTABLE_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_UNTABLE_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_UNTABLE_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_UNTABLE_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_UNTABLE_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // UNTABLE
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
|'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_UNTABLE_MODE_STRING
// one or more characters
: (COMMAND_UNTABLE_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_UNTABLE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,247 | ANTLR | .g4 | 158 | 26.360759 | 105 | 0.523462 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 69940100ebb57a93961772d32cb1058c7cdcb2897ed0b6afe5c11b02a3a86127 | false | false | false | false |
356 | COMMAND_ANOMALYDETECTION_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_ANOMALYDETECTION_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_ANOMALYDETECTION_MODE;
COMMAND_ANOMALYDETECTION_MODE_ANTLR_BUG: 'command_anomalydetection_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_ANOMALYDETECTION_MODE ++++++++++++++
mode COMMAND_ANOMALYDETECTION_MODE;
// skip
COMMAND_ANOMALYDETECTION_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_ANOMALYDETECTION_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_ANOMALYDETECTION_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_ANOMALYDETECTION_MODE_PTHRESH : 'pthresh=' -> pushMode(GET_NUMBER);
COMMAND_ANOMALYDETECTION_MODE_METHOD : 'method=' -> pushMode(COMMAND_ANOMALYDETECTION_MODE_GET_METHOD);
COMMAND_ANOMALYDETECTION_MODE_CUTOFF : 'cutoff=' -> pushMode(GET_BOOLEAN);
COMMAND_ANOMALYDETECTION_MODE_ACTION : 'action=' -> pushMode(COMMAND_ANOMALYDETECTION_MODE_GET_ACTION_MODE);
COMMAND_ANOMALYDETECTION_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_ANOMALYDETECTION_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_ANOMALYDETECTION_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // ANOMALYDETECTION
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_ANOMALYDETECTION_MODE_STRING
// one or more characters
: (COMMAND_ANOMALYDETECTION_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_ANOMALYDETECTION_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
mode COMMAND_ANOMALYDETECTION_MODE_GET_METHOD;
COMMAND_ANOMALYDETECTION_MODE_GET_METHOD_MODE_HISTOGRAM : 'histogram' -> popMode;
COMMAND_ANOMALYDETECTION_MODE_GET_METHOD_MODE_ZSCORE: 'zscore' -> popMode;
COMMAND_ANOMALYDETECTION_MODE_GET_METHOD_MODE_IQR: 'iqr' -> popMode;
mode COMMAND_ANOMALYDETECTION_MODE_GET_ACTION_MODE;
COMMAND_ANOMALYDETECTION_MODE_GET_ACTION_MODE_ANNOTATE: 'annotate' -> popMode;
COMMAND_ANOMALYDETECTION_MODE_GET_ACTION_MODE_FILTER : 'filter' -> popMode;
COMMAND_ANOMALYDETECTION_MODE_GET_ACTION_MODE_SUMMARY : 'summary' -> popMode;
COMMAND_ANOMALYDETECTION_MODE_GET_ACTION_MODE_TRANSFORM : ('transform' | 'tf') -> popMode;
COMMAND_ANOMALYDETECTION_MODE_GET_ACTION_MODE_REMOVE : ('remove' | 'rm' ) -> popMode;
| 6,488 | ANTLR | .g4 | 172 | 31.325581 | 114 | 0.579441 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 60b4852a32134e4f77b19df0492ec90c4f0b9eebfa3499e9d6348963f25aed84 | false | false | false | false |
357 | COMMAND_SEARCH_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_SEARCH_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_SEARCH_MODE;
COMMAND_SEARCH_MODE_ANTLR_BUG: 'command_search_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_SEARCH_MODE ++++++++++++++
mode COMMAND_SEARCH_MODE;
// skip
COMMAND_SEARCH_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_SEARCH_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_SEARCH_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_SEARCH_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,527 | ANTLR | .g4 | 57 | 42.421053 | 98 | 0.751828 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 1b6a7dfe4ee35791c67aece2ca11647e9e34dd0ea43a6a20a9ba8c547a221548 | false | false | false | false |
358 | COMMAND_FIELDSUMMARY_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_FIELDSUMMARY_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_FIELDSUMMARY_MODE;
COMMAND_FIELDSUMMARY_MODE_ANTLR_BUG: 'command_fieldsummary_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_FIELDSUMMARY_MODE +++++++++++++++
mode COMMAND_FIELDSUMMARY_MODE;
// skip
COMMAND_FIELDSUMMARY_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_FIELDSUMMARY_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_FIELDSUMMARY_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_FIELDSUMMARY_MODE_WILDCARD : '*';
COMMAND_FIELDSUMMARY_MODE_MAXVALS : 'maxvals=' -> pushMode(GET_INTEGER);
COMMAND_FIELDSUMMARY_MODE_COMMA : ',' -> type(COMMA);
COMMAND_FIELDSUMMARY_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_FIELDSUMMARY_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_FIELDSUMMARY_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
//|'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
//|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // FIELDSUMMARY
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_FIELDSUMMARY_MODE_STRING
// one or more characters
: (COMMAND_FIELDSUMMARY_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_FIELDSUMMARY_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,494 | ANTLR | .g4 | 161 | 27.378882 | 110 | 0.536783 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 959f1c4ca3795bbcccbd069a958359d3f8b7b545dd2b7b247fd8f6de5af9e176 | false | false | false | false |
359 | DPLParserTransform_contingency.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_contingency.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_contingency;
contingencyTransformation
: COMMAND_MODE_CONTINGENCY t_contingency_contingencyOptionsParameter*? fieldType fieldType
;
t_contingency_contingencyOptionsParameter
: (t_contingency_maxcolsParameter|t_contingency_maxrowsParameter)
| (t_contingency_mincolcoverParameter | t_contingency_minrowcoverParameter)
| t_contingency_usetotalParameter
| t_contingency_totalstrParameter
;
t_contingency_maxcolsParameter
: COMMAND_CONTINGENCY_MODE_MAXCOLS integerType
;
t_contingency_maxrowsParameter
: COMMAND_CONTINGENCY_MODE_MAXROWS integerType
;
t_contingency_mincolcoverParameter
: COMMAND_CONTINGENCY_MODE_MINCOLCOVER numberType
;
t_contingency_minrowcoverParameter
: COMMAND_CONTINGENCY_MODE_MINROWCOVER numberType
;
t_contingency_totalstrParameter
: COMMAND_CONTINGENCY_MODE_TOTALSTR fieldType
;
t_contingency_usetotalParameter
: COMMAND_CONTINGENCY_MODE_USETOTAL booleanType
;
| 3,101 | ANTLR | .g4 | 73 | 38.60274 | 98 | 0.768082 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | f877cdc109fb359e99a623132b76bc1d0d7fb273175cf7984abe94776c7d7584 | false | false | false | false |
360 | DPLParserTransform_dbinspect.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_dbinspect.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_dbinspect;
dbinspectTransformation
: COMMAND_MODE_DBINSPECT (t_dbinspect_indexParameter)*? (t_dbinspect_timeformatParameter|t_dbinspect_spanParameter)? (t_dbinspect_corruptonlyParameter)? (t_dbinspect_cachedParameter)?
;
t_dbinspect_cachedParameter
: COMMAND_DBINSPECT_MODE_CACHED booleanType
;
t_dbinspect_corruptonlyParameter
: COMMAND_DBINSPECT_MODE_CORRUPTONLY booleanType
;
t_dbinspect_indexParameter
: COMMAND_DBINSPECT_MODE_INDEX stringType
;
t_dbinspect_spanParameter
: COMMAND_DBINSPECT_MODE_SPAN spanType
;
t_dbinspect_timeformatParameter
: COMMAND_DBINSPECT_MODE_TIMEFORMAT timeType
;
| 2,754 | ANTLR | .g4 | 64 | 39.703125 | 191 | 0.767251 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 8a4001ffd9ba541753153683f79c4337de5417e1b42bebd3cca7eb6b30bb382c | false | false | false | false |
361 | COMMAND_HIGHLIGHT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_HIGHLIGHT_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_HIGHLIGHT_MODE;
COMMAND_HIGHLIGHT_MODE_ANTLR_BUG: 'command_highlight_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_HIGHLIGHT_MODE ++++++++++++++
mode COMMAND_HIGHLIGHT_MODE;
// skip
COMMAND_HIGHLIGHT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_HIGHLIGHT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_HIGHLIGHT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_HIGHLIGHT_MODE_S_STRING: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_HIGHLIGHT_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_HIGHLIGHT_MODE_CHAR
:'\u0022' // "
|'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
//|'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // HIGHLIGHT
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_HIGHLIGHT_MODE_STRING
// one or more characters
: (COMMAND_HIGHLIGHT_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_HIGHLIGHT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,288 | ANTLR | .g4 | 159 | 26.459119 | 108 | 0.52499 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 70e50b4f46a624456554a23002a4c540960847f60acb347130ae5cfc5f6040c4 | false | false | false | false |
362 | DPLParserTransform_sirare.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_sirare.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_sirare;
sirareTransformation
: COMMAND_MODE_SIRARE (t_sirare_topOptParameter)* fieldListType (t_sirare_byInstruction)?
;
t_sirare_topOptParameter
: t_sirare_showcountParameter
| t_sirare_showpercParameter
| t_sirare_limitParameter
| t_sirare_countfieldParameter
| t_sirare_percentfieldParameter
;
t_sirare_countfieldParameter
: COMMAND_SIRARE_MODE_COUNTFIELD stringType
;
t_sirare_limitParameter
: COMMAND_SIRARE_MODE_LIMIT integerType
;
t_sirare_percentfieldParameter
: COMMAND_SIRARE_MODE_PERCENTFIELD stringType
;
t_sirare_showcountParameter
: COMMAND_SIRARE_MODE_SHOWCOUNT booleanType
;
t_sirare_showpercParameter
: COMMAND_SIRARE_MODE_SHOWPERC booleanType
;
t_sirare_byInstruction
: (COMMAND_SIRARE_MODE_BY) fieldListType
;
| 2,950 | ANTLR | .g4 | 74 | 36 | 98 | 0.753487 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | ee3dcfd4604899f8ba26df2124c46013d5bb130ee00b744c686c4818c226660b | false | false | false | false |
363 | DPLParserTransform_iconify.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_iconify.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_iconify;
iconifyTransformation
: COMMAND_MODE_ICONIFY t_iconify_fieldListParameter
;
t_iconify_fieldListParameter
: fieldType ((COMMA)? fieldType)*
;
| 2,239 | ANTLR | .g4 | 52 | 40.519231 | 98 | 0.769583 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 943cf31367d053419765ac439e9368ea95c68f5fe3625eadc63b22922c0db011 | false | false | false | false |
364 | GET_REGEX_STRING.g4 | teragrep_pth_03/src/main/antlr4/imports/GET_REGEX_STRING.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar GET_REGEX_STRING;
GET_FIELD_ANTLR_BUG: 'get_regex_string_antlr_bug' -> type(REGEX_STRING_MATCH);
// ++++++++++++++ GET_REGEX_STRING ++++++++++++++
mode GET_REGEX_STRING;
// skip
GET_REGEX_STRING_SPACE: SPACE -> channel(HIDDEN);
// tokens
GET_REGEX_STRING_DOUBLE_QUOTED: '"' ( '\\'. | ~('"'| '\\') )* '"' -> popMode;
COMMAND_GET_REGEX_STRING_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT); | 2,454 | ANTLR | .g4 | 55 | 42.690909 | 98 | 0.742893 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | e6307dc1778608d7683728324bce40d01c73406bc3e66bcc480f90e64daa6250 | false | false | false | false |
365 | COMMAND_MAKEJSON_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_MAKEJSON_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_MAKEJSON_MODE;
COMMAND_MAKEJSON_MODE_ANTLR_BUG: 'command_makejson_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_MAKEJSON_MODE ++++++++++++++
mode COMMAND_MAKEJSON_MODE;
// skip
COMMAND_MAKEJSON_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_MAKEJSON_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_MAKEJSON_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_MAKEJSON_MODE_OUTPUT : 'output=' -> pushMode(GET_STRING);
COMMAND_MAKEJSON_MODE_COMMA : ',' -> type(COMMA);
COMMAND_MAKEJSON_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_MAKEJSON_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_MAKEJSON_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
//|'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
//|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // MAKEJSON
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_MAKEJSON_MODE_STRING
// one or more characters
: (COMMAND_MAKEJSON_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_MAKEJSON_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,379 | ANTLR | .g4 | 160 | 26.84375 | 106 | 0.528835 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 01b44905a2498358f89bbf7190df20eff617ca1a8134516bf1409a4308b6b042 | false | false | false | false |
366 | DPLParserTransform_delete.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_delete.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_delete;
deleteTransformation
: COMMAND_MODE_DELETE
;
| 2,123 | ANTLR | .g4 | 49 | 41.081633 | 98 | 0.772793 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | e699dcfdc1523f2760e2c2e3b6c3621b63518c36fe2da14eec3335ae31edb9b4 | false | false | false | false |
367 | DPLParserTransform_pivot.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_pivot.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_pivot;
pivotTransformation
: COMMAND_MODE_PIVOT stringType stringType stringType //FIXME some obscure definition
;
| 2,186 | ANTLR | .g4 | 49 | 42.346939 | 98 | 0.775176 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 6f6d8a467acfa7f5b5137148bc4d29d97e3237721bdc890a8a0d0302ff6aef38 | false | false | false | false |
368 | COMMAND_TOP_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TOP_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_TOP_MODE;
COMMAND_TOP_MODE_ANTLR_BUG: 'command_top_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TOP_MODE ++++++++++++++
mode COMMAND_TOP_MODE;
// skip
COMMAND_TOP_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TOP_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TOP_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_TOP_MODE_PERCENTFIELD : 'percentfield=' -> pushMode(GET_FIELD);
COMMAND_TOP_MODE_COUNTFIELD : 'countfield=' -> pushMode(GET_FIELD);
COMMAND_TOP_MODE_SHOWCOUNT : 'showcount=' -> pushMode(GET_BOOLEAN);
COMMAND_TOP_MODE_USEOTHER : 'useother=' -> pushMode(GET_BOOLEAN);
COMMAND_TOP_MODE_SHOWPERC : 'showperc=' -> pushMode(GET_BOOLEAN);
COMMAND_TOP_MODE_OTHERSTR : 'otherstr=' -> pushMode(GET_STRING);
COMMAND_TOP_MODE_LIMIT : 'limit=' -> pushMode(GET_INTEGER);
COMMAND_TOP_MODE_BY : ('BY'|'by'|'By');
COMMAND_TOP_MODE_COMMA : ',';
COMMAND_TOP_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_TOP_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
fragment COMMAND_TOP_MODE_MINUS: '-';
fragment COMMAND_TOP_MODE_DIGIT: [0-9]+;
COMMAND_TOP_MODE_INTEGER: COMMAND_TOP_MODE_MINUS? COMMAND_TOP_MODE_DIGIT+ -> type(GET_INTEGER_INTEGER);
// characters for string
fragment COMMAND_TOP_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
//|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // TOP
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
|'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_TOP_MODE_STRING
// one or more characters
: (COMMAND_TOP_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_TOP_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,911 | ANTLR | .g4 | 170 | 28.329412 | 103 | 0.543596 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | f785362d82bd6ddddc0b501145af7deabe56cbbe31725280cf751fbad1a16911 | false | false | false | false |
369 | COMMAND_MULTISEARCH_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_MULTISEARCH_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_MULTISEARCH_MODE;
COMMAND_MULTISEARCH_MODE_ANTLR_BUG: 'command_multisearch_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_MULTISEARCH_MODE ++++++++++++++
mode COMMAND_MULTISEARCH_MODE;
// skip
COMMAND_MULTISEARCH_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_MULTISEARCH_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_MULTISEARCH_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
//subsearch within multisearch
COMMAND_MULTISEARCH_MODE_BRACKET_L: '[' -> type(BRACKET_L), pushMode(COMMAND_MODE);
// tokens
COMMAND_MULTISEARCH_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,688 | ANTLR | .g4 | 59 | 43.661017 | 98 | 0.75687 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 860536b04b50fcb37e783000554c827a24aa96e192125a1c8533dfa8f4521904 | false | false | false | false |
370 | DPLParserTransform_eval.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_eval.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_eval;
evalTransformation
: COMMAND_MODE_EVAL t_eval_evalParameter (COMMAND_EVAL_SUBMODE_BASE_COMMA t_eval_evalParameter)*
;
t_eval_evalParameter
: fieldType COMMAND_EVAL_SUBMODE_FIELD_EQ evalStatement
;
| 2,292 | ANTLR | .g4 | 52 | 41.538462 | 104 | 0.77102 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 437ddccff3e73fc6bd5253f869451efa9529d2b5ddd132b756476a12a9f64a4c | false | false | false | false |
371 | DPLParserTransform_multikv.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_multikv.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_multikv;
multikvTransformation
: COMMAND_MODE_MULTIKV (t_multikv_stanzaConfParameter)? (t_multikv_multikvCopyattrsParameter|t_multikv_multikvForceheaderParameter|t_multikv_multikvMultitableParameter|t_multikv_multikvNoheaderParameter|t_multikv_multikvRmorigParameter|t_multikv_multikvFieldsParameter|t_multikv_multikvFilterParameter)*
;
t_multikv_multikvFieldsParameter // COMMAND_MODE_MULTIKV
: COMMAND_MULTIKV_MODE_FIELDS fieldListType
;
t_multikv_stanzaConfParameter
: COMMAND_MULTIKV_MODE_CONF stringType
;
t_multikv_multikvFilterParameter
: COMMAND_MULTIKV_MODE_FILTER fieldListType
;
t_multikv_multikvForceheaderParameter
: COMMAND_MULTIKV_MODE_FORCEHEADER integerType
;
t_multikv_multikvMultitableParameter
: COMMAND_MULTIKV_MODE_MULTITABLE booleanType
;
t_multikv_multikvNoheaderParameter
: COMMAND_MULTIKV_MODE_NOHEADER booleanType
;
t_multikv_multikvRmorigParameter
: COMMAND_MULTIKV_MODE_RMORIG booleanType
;
t_multikv_multikvCopyattrsParameter
: COMMAND_MULTIKV_MODE_COPYATTRS booleanType
;
| 3,217 | ANTLR | .g4 | 73 | 40.260274 | 311 | 0.773905 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 0f4dce2972433bf3e4f5c323ba85844eedee709a02e883150d2b3bb10d78d562 | false | false | false | false |
372 | DPLParserTransform_findtypes.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_findtypes.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_findtypes;
findtypesTransformation
: COMMAND_MODE_FINDTYPES t_findtypes_maxParameter COMMAND_FINDTYPES_MODE_NOTCOVERED? COMMAND_FINDTYPES_MODE_USERAW?
;
t_findtypes_maxParameter
: COMMAND_FINDTYPES_MODE_MAX integerType
;
| 2,308 | ANTLR | .g4 | 52 | 41.884615 | 123 | 0.774179 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 0f57578c9c71d87f80100606660988258bda34004b479bb79516904a479b017a | false | false | false | false |
373 | DPLParserTransform_search.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_search.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_search;
searchTransformation
: COMMAND_MODE_SEARCH searchTransformationRoot?
;
| 2,149 | ANTLR | .g4 | 49 | 41.612245 | 98 | 0.774655 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | cf6a66afaf437e0039f20862a87e804a43dcadb8a64c452725b18e4b3dec837d | false | false | false | false |
374 | COMMAND_OUTPUTTEXT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_OUTPUTTEXT_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_OUTPUTTEXT_MODE;
COMMAND_OUTPUTTEXT_MODE_ANTLR_BUG: 'command_outputtext_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_OUTPUTTEXT_MODE ++++++++++++++
mode COMMAND_OUTPUTTEXT_MODE;
// skip
COMMAND_OUTPUTTEXT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_OUTPUTTEXT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_OUTPUTTEXT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_OUTPUTTEXT_MODE_USEXML: 'usexml=' -> pushMode(GET_BOOLEAN);
COMMAND_OUTPUTTEXT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,629 | ANTLR | .g4 | 58 | 43.465517 | 98 | 0.755556 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 134164313f6a1b56cc0b77389c3b52bf24fceb1af4076c70a315175d4b517e48 | false | false | false | false |
375 | DPLParserTransform_sitop.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_sitop.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_sitop;
sitopTransformation
: COMMAND_MODE_SITOP (integerType)? (t_sitop_topOptParameter)*? fieldListType (t_sitop_byInstruction)?
;
t_sitop_topOptParameter
: t_sitop_countfieldParameter
| t_sitop_limitParameter
| t_sitop_otherstrParameter
| t_sitop_percentfieldParameter
| t_sitop_showcountParameter
| t_sitop_showpercParameter
| t_sitop_otherstrParameter
;
t_sitop_countfieldParameter
: COMMAND_SITOP_MODE_COUNTFIELD stringType
;
t_sitop_limitParameter
: COMMAND_SITOP_MODE_LIMIT integerType
;
t_sitop_otherstrParameter
: COMMAND_SITOP_MODE_OTHERSTR stringType
;
t_sitop_percentfieldParameter
: COMMAND_SITOP_MODE_PERCENTFIELD stringType
;
t_sitop_showcountParameter
: COMMAND_SITOP_MODE_SHOWCOUNT booleanType
;
t_sitop_showpercParameter
: COMMAND_SITOP_MODE_SHOWPERC booleanType
;
t_sitop_useotherParameter
: COMMAND_SITOP_MODE_USEOTHER booleanType
;
t_sitop_byInstruction
: (COMMAND_SITOP_MODE_BY) fieldListType
;
| 3,197 | ANTLR | .g4 | 82 | 34.682927 | 110 | 0.746124 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 84a94ab4fed9c917d71712a77fce55c176fe378c871c68f221fa9a7fbb71c632 | false | false | false | false |
376 | DPLParserTransform_outputtext.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_outputtext.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_outputtext;
outputtextTransformation
: COMMAND_MODE_OUTPUTTEXT (t_outputtext_usexmlParameter)?
;
t_outputtext_usexmlParameter
: COMMAND_OUTPUTTEXT_MODE_USEXML booleanType
;
| 2,261 | ANTLR | .g4 | 52 | 40.961538 | 98 | 0.772439 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 6f907eb4f72a187546ea4c1f79f7236788c1126e7782bfe9bd42a4cbf8ac4c60 | false | false | false | false |
377 | DPLParserTransform_autoregress.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_autoregress.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_autoregress;
autoregressTransformation
: COMMAND_MODE_AUTOREGRESS fieldType (t_autoregress_fieldRenameInstruction)? (t_autoregress_pAutoregressParameter)?
;
t_autoregress_pAutoregressParameter
: COMMAND_AUTOREGRESS_MODE_P integerType
;
t_autoregress_fieldRenameInstruction
: COMMAND_AUTOREGRESS_MODE_AS fieldType
;
| 2,420 | ANTLR | .g4 | 55 | 41.254545 | 123 | 0.773825 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | e1388cb3fbf213887236da4859515eeea5f112ce9779b906f436980655323842 | false | false | false | false |
378 | COMMAND_UNION_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_UNION_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_UNION_MODE;
COMMAND_UNION_MODE_ANTLR_BUG: 'command_union_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_UNION_MODE ++++++++++++++
mode COMMAND_UNION_MODE;
// skip
COMMAND_UNION_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_UNION_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_UNION_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
//subsearch within union
COMMAND_UNION_MODE_BRACKET_L: '[' -> type(BRACKET_L), pushMode(COMMAND_MODE);
// tokens
COMMAND_UNION_MODE_TIMEOUT : 'timeout=' -> pushMode(GET_INTEGER);
COMMAND_UNION_MODE_MAXTIME : 'maxtime=' -> pushMode(GET_INTEGER);
COMMAND_UNION_MODE_MAXOUT : 'maxout=' -> pushMode(GET_INTEGER);
COMMAND_UNION_MODE_DATAMODEL : 'datamodel';
COMMAND_UNION_MODE_SAVEDSEARCH : 'savedsearch';
COMMAND_UNION_MODE_INPUTLOOKUP : 'inputlookup';
COMMAND_UNION_MODE_COLON : ':' ;
COMMAND_UNION_MODE_SINGLE_STRING : '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_UNION_MODE_DQSTRING : '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_UNION_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' {false}? // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // UNION
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
|'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_UNION_MODE_STRING
// one or more characters
: (COMMAND_UNION_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_UNION_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,707 | ANTLR | .g4 | 167 | 27.622754 | 107 | 0.54012 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 1f7a4d45f11d4ab92a86c3863fdec73ecdb6d875c5adb8f485c6d94b1349fbb0 | false | false | false | false |
379 | DPLParserTransform_stats.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_stats.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_stats;
statsTransformation
: COMMAND_MODE_STATS t_stats_partitions? t_stats_allnum? t_stats_delim? t_stats_agg (COMMA? t_stats_agg)*?
;
t_stats_agg
: (aggregateFunction (t_stats_fieldRenameInstruction)*?) (t_stats_byInstruction)*?
;
t_stats_byInstruction
: (COMMAND_STATS_MODE_BY) fieldListType
;
t_stats_fieldRenameInstruction
: COMMAND_STATS_MODE_AS fieldType
;
t_stats_partitions
: COMMAND_STATS_MODE_PARTITIONS numberType
;
t_stats_allnum
: COMMAND_STATS_MODE_ALLNUM booleanType
;
t_stats_delim
: COMMAND_STATS_MODE_DELIM stringType
;
| 2,712 | ANTLR | .g4 | 67 | 37.029851 | 114 | 0.750095 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 5964dfcae4ba98f4c3f3562a39fffd1a145beb2a0bc1d0d97e5f1e60dd621a0e | false | false | false | false |
380 | DPLParserTransform_cofilter.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_cofilter.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_cofilter;
cofilterTransformation
: COMMAND_MODE_COFILTER fieldType fieldType
;
| 2,158 | ANTLR | .g4 | 49 | 41.612245 | 98 | 0.774655 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | cff2a567e028c3dc82680ad48e2b0d3d46cf7a526621b77987dc34344b43c080 | false | false | false | false |
381 | COMMAND_STATS_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_STATS_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_STATS_MODE;
COMMAND_STATS_MODE_ANTLR_BUG: 'command_stats_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_STATS_MODE ++++++++++++++
mode COMMAND_STATS_MODE;
// skip
COMMAND_STATS_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_STATS_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_STATS_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_STATS_MODE_PARENTHESIS_R : ')';
COMMAND_STATS_MODE_PARENTHESIS_L : '(';
COMMAND_STATS_MODE_COMMA : ',' -> type(COMMA);
COMMAND_STATS_MODE_BY : ('BY'|'by'|'By');
COMMAND_STATS_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_STATS_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_STATS_MODE_PARTITIONS: 'partitions=' -> pushMode(GET_NUMBER);
COMMAND_STATS_MODE_ALLNUM: 'allnum=' -> pushMode(GET_BOOLEAN);
COMMAND_STATS_MODE_DELIM: 'delim=' -> pushMode(GET_STRING);
COMMAND_STATS_MODE_AS: ('AS'|'as'|'As') -> pushMode(GET_FIELD);
COMMAND_STATS_MODE_INT: DIGIT;
fragment DIGIT: [0-9]+;
// aggregateMethod
COMMAND_STATS_MODE_COUNT: 'count' -> type(METHOD_AGGREGATE_COUNT);
COMMAND_STATS_MODE_AVG_PARENTHESIS_R: 'avg(' -> type(METHOD_AGGREGATE_AVG), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_MEAN_PARENTHESIS_R: 'mean(' -> type(METHOD_AGGREGATE_MEAN), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_C_PARENTHESIS_R: 'c(' -> type(METHOD_AGGREGATE_C), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_COUNT_PARENTHESIS_R: 'count(' -> type(METHOD_AGGREGATE_COUNT_B), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_DC_PARENTHESIS_R: 'dc(' -> type(METHOD_AGGREGATE_DC), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_DISTINCT_COUNT_PARENTHESIS_R: 'distinct_count(' -> type(METHOD_AGGREGATE_DISTINCT_COUNT), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_EARLIEST_PARENTHESIS_R: 'earliest(' -> type(METHOD_AGGREGATE_EARLIEST), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_EARLIEST_TIME_PARENTHESIS_R: 'earliest_time(' -> type(METHOD_AGGREGATE_EARLIEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_ESTDC_PARENTHESIS_R: 'estdc(' -> type(METHOD_AGGREGATE_ESTDC), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_ESTDC_ERROR_PARENTHESIS_R: 'estdc_error(' -> type(METHOD_AGGREGATE_ESTDC_ERROR), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_FIRST_PARENTHESIS_R: 'first(' -> type(METHOD_AGGREGATE_FIRST), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_LAST_PARENTHESIS_R: 'last(' -> type(METHOD_AGGREGATE_LAST), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_LATEST_PARENTHESIS_R: 'latest(' -> type(METHOD_AGGREGATE_LATEST), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_LATEST_TIME_PARENTHESIS_R: 'latest_time(' -> type(METHOD_AGGREGATE_LATEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_LIST_PARENTHESIS_R: 'list(' -> type(METHOD_AGGREGATE_LIST), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_MAX_PARENTHESIS_R: 'max(' -> type(METHOD_AGGREGATE_MAX), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_MEDIAN_PARENTHESIS_R: 'median(' -> type(METHOD_AGGREGATE_MEDIAN), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_MIN_PARENTHESIS_R: 'min(' -> type(METHOD_AGGREGATE_MIN), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_MODE_PARENTHESIS_R: 'mode(' -> type(METHOD_AGGREGATE_MODE), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_P_PARENTHESIS_R: 'p(' -> type(METHOD_AGGREGATE_P), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_PERC_PARENTHESIS_R: 'perc(' -> type(METHOD_AGGREGATE_PERC), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_EXACTPERC_PARENTHESIS_R: 'exactperc(' -> type(METHOD_AGGREGATE_EXACTPERC), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_UPPERPERC_PARENTHESIS_R: 'upperperc(' -> type(METHOD_AGGREGATE_UPPERPERC), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_PERCINT_PARENTHESIS_R: 'percint(' -> type(METHOD_AGGREGATE_PERCINT), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_RANGE_PARENTHESIS_R: 'range(' -> type(METHOD_AGGREGATE_RANGE), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_RATE_PARENTHESIS_R: 'rate(' -> type(METHOD_AGGREGATE_RATE), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_STDEV_PARENTHESIS_R: 'stdev(' -> type(METHOD_AGGREGATE_STDEV), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_STDEVP_PARENTHESIS_R: 'stdevp(' -> type(METHOD_AGGREGATE_STDEVP), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_SUM_PARENTHESIS_R: 'sum(' -> type(METHOD_AGGREGATE_SUM), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_SUMSQ_PARENTHESIS_R: 'sumsq(' -> type(METHOD_AGGREGATE_SUMSQ), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_VALUES_PARENTHESIS_R: 'values(' -> type(METHOD_AGGREGATE_VALUES), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_VAR_PARENTHESIS_R: 'var(' -> type(METHOD_AGGREGATE_VAR), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_VARP_PARENTHESIS_R: 'varp(' -> type(METHOD_AGGREGATE_VARP), pushMode(AGGREGATION_MODE);
//special percX()
COMMAND_STATS_MODE_P_VARIABLE: 'p'COMMAND_STATS_MODE_INT -> type(METHOD_AGGREGATE_P_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_PERC_VARIABLE: 'perc'COMMAND_STATS_MODE_INT -> type(METHOD_AGGREGATE_PERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_EXACTPERC_VARIABLE: 'exactperc'COMMAND_STATS_MODE_INT -> type(METHOD_AGGREGATE_EXACTPERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_STATS_MODE_UPPERPERC_VARIABLE: 'upperperc'COMMAND_STATS_MODE_INT -> type(METHOD_AGGREGATE_UPPERPERC_VARIABLE), pushMode(AGGREGATION_MODE);
// characters for string
fragment COMMAND_STATS_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // STATS
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_STATS_MODE_STRING
// one or more characters
: (COMMAND_STATS_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_STATS_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 10,046 | ANTLR | .g4 | 208 | 42.841346 | 146 | 0.643919 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | a649ba893c9c42b56cc5fb553249be48a59ee3456bad766f3e8c1c9c1e1591d6 | false | false | false | false |
382 | DPLParserTransform_transpose.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_transpose.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_transpose;
transposeTransformation
: COMMAND_MODE_TRANSPOSE (COMMAND_TRANSPOSE_MODE_INTEGER)? (t_transpose_columnNameParameter)? (t_transpose_headerFieldParameter)? (t_transpose_includeEmptyParameter)?
;
t_transpose_columnNameParameter
: COMMAND_TRANSPOSE_MODE_COLUMN_NAME stringType
;
t_transpose_headerFieldParameter
: COMMAND_TRANSPOSE_MODE_HEADER_FIELD fieldType
;
t_transpose_includeEmptyParameter
: COMMAND_TRANSPOSE_MODE_INCLUDE_EMPTY booleanType
;
| 2,578 | ANTLR | .g4 | 58 | 41.5 | 174 | 0.771769 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 9df1e9913fbd6fdf5a431543fc2595a546557a278f9ba41ccee4212bd49f6143 | false | false | false | false |
383 | COMMAND_TERAGREP_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TERAGREP_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_TERAGREP_MODE;
COMMAND_TERAGREP_MODE_ANTLR_BUG: 'command_teragrep_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TERAGREP_MODE ++++++++++++++
mode COMMAND_TERAGREP_MODE;
// skip
COMMAND_TERAGREP_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TERAGREP_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TERAGREP_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_TERAGREP_MODE_GET: ('get' | 'GET');
COMMAND_TERAGREP_MODE_EXEC: 'exec'|'EXEC' ;
COMMAND_TERAGREP_MODE_SET: 'set' ;
COMMAND_TERAGREP_MODE_LIST: 'list';
COMMAND_TERAGREP_MODE_SAVE: 'save' | 'SAVE';
COMMAND_TERAGREP_MODE_HDFS: 'hdfs' | 'HDFS';
COMMAND_TERAGREP_MODE_BLOOM: 'bloom' | 'BLOOM';
COMMAND_TERAGREP_MODE_CREATE: 'create';
COMMAND_TERAGREP_MODE_UPDATE: 'update';
COMMAND_TERAGREP_MODE_ESTIMATE: 'estimate';
COMMAND_TERAGREP_MODE_DELETE: 'delete' | 'DELETE';
COMMAND_TERAGREP_MODE_KAFKA: 'KAFKA' | 'kafka';
COMMAND_TERAGREP_MODE_EXPLAIN: 'explain';
COMMAND_TERAGREP_MODE_OVERWRITE: 'overwrite=' -> pushMode(GET_BOOLEAN);
COMMAND_TERAGREP_MODE_PARSER: 'parser';
COMMAND_TERAGREP_MODE_HOST: 'host' -> pushMode(COMMAND_TERAGREP_IP_MODE);
COMMAND_TERAGREP_MODE_PORT: 'port' -> pushMode(COMMAND_TERAGREP_IP_MODE);
COMMAND_TERAGREP_MODE_DOT: '.';
COMMAND_TERAGREP_MODE_TOKENIZER: 'tokenizer';
COMMAND_TERAGREP_MODE_SYSLOG: 'syslog';
COMMAND_TERAGREP_MODE_STREAM: 'stream';
COMMAND_TERAGREP_MODE_LOAD: 'load';
COMMAND_TERAGREP_MODE_SYSTEM: 'system';
COMMAND_TERAGREP_MODE_VERSION: 'version';
COMMAND_TERAGREP_MODE_ARCHIVE: 'archive';
COMMAND_TERAGREP_MODE_SUMMARY: 'summary' -> pushMode(DEFAULT_MODE);
COMMAND_TERAGREP_MODE_RETENTION: 'retention=' -> pushMode(GET_SPAN);
COMMAND_TERAGREP_MODE_CODEC: 'codec=' -> pushMode(GET_STRING);
COMMAND_TERAGREP_MODE_HDFS_FORMAT: 'format=';
COMMAND_TERAGREP_MODE_CSV_FORMAT: ('csv'|'CSV');
COMMAND_TERAGREP_MODE_JSON_FORMAT: ('json'|'JSON');
COMMAND_TERAGREP_MODE_DEFAULT_FORMAT: ('default'|'DEFAULT'|'avro'|'AVRO');
COMMAND_TERAGREP_MODE_FORMAT: 'format' -> pushMode(GET_STRING);
COMMAND_TERAGREP_MODE_INPUT: 'input' -> pushMode(GET_FIELD);
COMMAND_TERAGREP_MODE_OUTPUT: 'output' -> pushMode(GET_FIELD);
COMMAND_TERAGREP_MODE_ESTIMATES: 'estimates' -> pushMode(GET_FIELD);
COMMAND_TERAGREP_MODE_HEADER: 'header=' -> pushMode(GET_BOOLEAN);
COMMAND_TERAGREP_MODE_SCHEMA: 'schema=' -> pushMode(GET_STRING);
COMMAND_TERAGREP_MODE_DYNATRACE: 'dynatrace' ;
COMMAND_TERAGREP_MODE_METRIC: 'metric' ;
COMMAND_TERAGREP_MODE_WRITE: 'write' ;
COMMAND_TERAGREP_MODE_SINGLE_QUOTED: '\'' ( '\\'. | ~('\''| '\\'))* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_TERAGREP_MODE_QUOTED: '"' ( '\\'. | ~('"'| '\\'))* '"' -> type(GET_STRING_DOUBLE_QUOTED);
COMMAND_TERAGREP_MOD_STRING
// one or more characters
: (CHAR)+ -> type(GET_STRING_STRING);
fragment CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
//|'\u0028' // (
//|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // @
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
// |'\u005B' // [
|'\u005C' // \
// |'\u005D' // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
mode COMMAND_TERAGREP_IP_MODE;
COMMAND_TERAGREP_IP_MODE_SPACE: SPACE -> channel(HIDDEN);
COMMAND_TERAGREP_IP_MODE_IP: DIGIT(COMMAND_TERAGREP_IP_MODE_COMMA)DIGIT(COMMAND_TERAGREP_IP_MODE_COMMA)DIGIT(COMMAND_TERAGREP_IP_MODE_COMMA)DIGIT -> popMode;
fragment DIGIT: [0-9]+;
COMMAND_TERAGREP_IP_MODE_COMMA: '.';
COMMAND_TERAGREP_IP_MODE_PORT_NUM: DIGIT -> popMode;
COMMAND_TERAGREP_IP_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 7,592 | ANTLR | .g4 | 204 | 31.720588 | 157 | 0.599024 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 7532445fb7b8faff435c5f349aa644ed28b18029c1d1b1bcb8c7a62d2dd8f0b9 | false | false | false | false |
384 | DPLParserTransform_abstract.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_abstract.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_abstract;
abstractTransformation
: COMMAND_MODE_ABSTRACT (t_abstract_maxlinesParameter|t_abstract_maxtermsParameter)*
;
t_abstract_maxlinesParameter
: COMMAND_ABSTRACT_MODE_MAXLINES integerType
;
t_abstract_maxtermsParameter
: COMMAND_ABSTRACT_MODE_MAXTERMS integerType
;
| 2,387 | ANTLR | .g4 | 55 | 40.472727 | 98 | 0.771355 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 7484b173a1e74f797d70751992a3db916ee24c941ff6b205a4deb7a401b8c9e7 | false | false | false | false |
385 | COMMAND_MAP_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_MAP_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_MAP_MODE;
COMMAND_MAP_MODE_ANTLR_BUG: 'command_map_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_MAP_MODE ++++++++++++++
mode COMMAND_MAP_MODE;
// skip
COMMAND_MAP_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_MAP_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_MAP_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_MAP_MODE_MAXSEARCHES : 'maxsearches=' -> pushMode(GET_INTEGER);
COMMAND_MAP_MODE_SEARCH : 'search=' -> pushMode(GET_STRING);
COMMAND_MAP_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_MAP_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_MAP_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
//|'\u0028' // (
//|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // MAP
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_MAP_MODE_STRING
// one or more characters
: (COMMAND_MAP_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_MAP_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,330 | ANTLR | .g4 | 160 | 26.5375 | 102 | 0.522996 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 1b0ff73300cc0ddec271444c572cd09ce84d1b3af51ce32daee7b91a185cbe39 | false | false | false | false |
386 | DPLParserTransform_outputcsv.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_outputcsv.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_outputcsv;
outputcsvTransformation
: COMMAND_MODE_OUTPUTCSV (t_outputcsv_appendParameter)? (t_outputcsv_createEmptyParameter)? (t_outputcsv_overrideIfEmptyParameter)? (t_outputcsv_dispatchParameter)? (t_outputcsv_usexmlParameter)? (t_outputcsv_singlefileParameter)? stringType?
;
t_outputcsv_appendParameter
: COMMAND_OUTPUTCSV_MODE_APPEND booleanType
;
t_outputcsv_createEmptyParameter
: COMMAND_OUTPUTCSV_MODE_CREATE_EMPTY booleanType
;
t_outputcsv_dispatchParameter
: COMMAND_OUTPUTCSV_MODE_DISPATCH booleanType
;
t_outputcsv_overrideIfEmptyParameter
: COMMAND_OUTPUTCSV_MODE_OVERRIDE_IF_EMPTY booleanType
;
t_outputcsv_singlefileParameter
: COMMAND_OUTPUTCSV_MODE_SINGLEFILE booleanType
;
t_outputcsv_usexmlParameter
: COMMAND_OUTPUTCSV_MODE_USEXML booleanType
;
| 2,942 | ANTLR | .g4 | 67 | 40.432836 | 250 | 0.768667 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | ee0f1430c4c6a0fe90e55bb0869c7448944a3114be5376ecceff1baf7c16d0c0 | false | false | false | false |
387 | COMMAND_NOMV_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_NOMV_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_NOMV_MODE;
COMMAND_NOMV_MODE_ANTLR_BUG: 'command_nomv_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_NOMV_MODE ++++++++++++++
mode COMMAND_NOMV_MODE;
// skip
COMMAND_NOMV_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_NOMV_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_NOMV_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_NOMV_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_NOMV_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_NOMV_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // NOMV
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_NOMV_MODE_STRING
// one or more characters
: (COMMAND_NOMV_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_NOMV_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,211 | ANTLR | .g4 | 158 | 26.132911 | 102 | 0.518268 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 67ea4a659692e8bf8fe45b8c2c9b108e6c7f805a396fa855d7fdd9a74dc9eeca | false | false | false | false |
388 | COMMAND_MCOLLECT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_MCOLLECT_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_MCOLLECT_MODE;
COMMAND_MCOLLECT_MODE_ANTLR_BUG: 'command_mcollect_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_MCOLLECT_MODE ++++++++++++++
mode COMMAND_MCOLLECT_MODE;
// skip
COMMAND_MCOLLECT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_MCOLLECT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_MCOLLECT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_MCOLLECT_MODE_PREFIX_FIELD : 'prefix_field=' -> pushMode(GET_STRING);
COMMAND_MCOLLECT_MODE_SOURCETYPE : 'sourcetype=' -> pushMode(GET_STRING);
COMMAND_MCOLLECT_MODE_SPOOL : 'spool=' -> pushMode(GET_BOOLEAN);
COMMAND_MCOLLECT_MODE_SPLIT : 'split=' -> pushMode(GET_BOOLEAN);
COMMAND_MCOLLECT_MODE_INDEX : 'index=' -> pushMode(GET_STRING);
COMMAND_MCOLLECT_MODE_SOURCE : 'source=' -> pushMode(GET_STRING);
COMMAND_MCOLLECT_MODE_COMMA : ',' -> type(COMMA);
COMMAND_MCOLLECT_MODE_HOST : 'host=' -> pushMode(GET_STRING);
COMMAND_MCOLLECT_MODE_MARKER : 'marker=' -> pushMode(GET_STRING);
COMMAND_MCOLLECT_MODE_FILE : 'file=' -> pushMode(GET_STRING);
COMMAND_MCOLLECT_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_MCOLLECT_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_MCOLLECT_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // MCOLLECT
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_MCOLLECT_MODE_STRING
// one or more characters
: (COMMAND_MCOLLECT_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_MCOLLECT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,920 | ANTLR | .g4 | 168 | 28.720238 | 106 | 0.547976 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | bbc84d19c2794da588dbc8d478f8cd395eef6d16afd7589c3544626a0026f3dc | false | false | false | false |
389 | COMMAND_HISTORY_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_HISTORY_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_HISTORY_MODE;
COMMAND_HISTORY_MODE_ANTLR_BUG: 'command_history_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_HISTORY_MODE ++++++++++++++
mode COMMAND_HISTORY_MODE;
// skip
COMMAND_HISTORY_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_HISTORY_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_HISTORY_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_HISTORY_MODE_EVENTS : 'events=' -> pushMode(GET_BOOLEAN);
COMMAND_HISTORY_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,602 | ANTLR | .g4 | 58 | 42.965517 | 98 | 0.752366 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 19b2742f82c8441891e3a11da2ce27e66fa00bf4d5c7308236c8e414010db8e8 | false | false | false | false |
390 | COMMAND_TABLE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TABLE_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_TABLE_MODE;
COMMAND_TABLE_MODE_ANTLR_BUG: 'command_table_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TABLE_MODE ++++++++++++++
mode COMMAND_TABLE_MODE;
// skip
COMMAND_TABLE_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TABLE_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TABLE_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_TABLE_MODE_WILDCARD : '*';
COMMAND_TABLE_MODE_COMMA : ',';
COMMAND_TABLE_MODE_SINGLE_QUOTE: '\'';
COMMAND_TABLE_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"';
// characters for string
fragment COMMAND_TABLE_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // TABLE
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
|'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_TABLE_MODE_STRING
// one or more characters
: (COMMAND_TABLE_MODE_CHAR)+;
COMMAND_TABLE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,160 | ANTLR | .g4 | 160 | 25.475 | 98 | 0.522577 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | ef89d0ef9ebcd17775d130574e10305f73dec244c5d0bca4905496a676cb87b1 | false | false | false | false |
391 | COMMAND_SCRIPT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_SCRIPT_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_SCRIPT_MODE;
COMMAND_SCRIPT_MODE_ANTLR_BUG: 'command_script_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_SCRIPT_MODE ++++++++++++++
mode COMMAND_SCRIPT_MODE;
// skip
COMMAND_SCRIPT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_SCRIPT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_SCRIPT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_SCRIPT_MODE_MAXINPUTS : 'maxinputs=' -> pushMode(GET_INTEGER);
COMMAND_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_SCRIPT_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_SCRIPT_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // SCRIPT
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
|'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_SCRIPT_MODE_STRING
// one or more characters
: (COMMAND_SCRIPT_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_SCRIPT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,305 | ANTLR | .g4 | 159 | 26.553459 | 105 | 0.524469 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | d3f174a3895c1f6156b94079e54fda6b906bd094c833be819992c5dd2651a452 | false | false | false | false |
392 | DPLParserTransform_metasearch.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_metasearch.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_metasearch;
metasearchTransformation
: COMMAND_MODE_METASEARCH (logicalStatement)?
;
| 2,155 | ANTLR | .g4 | 49 | 41.734694 | 98 | 0.774347 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | bc44e45f4178439b1ad8011f50db437b14481360d895680ae18d4eb5c536d6c1 | false | false | false | false |
393 | DPLParserTransform_filldown.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_filldown.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_filldown;
filldownTransformation
: COMMAND_MODE_FILLDOWN (fieldListType)?
;
| 2,148 | ANTLR | .g4 | 49 | 41.55102 | 98 | 0.773378 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 9b24792dece6c306c73d5fdffa67b65f7f23a0c7a33c04a0b58e964104bca67a | false | false | false | false |
394 | COMMAND_FILLDOWN_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_FILLDOWN_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_FILLDOWN_MODE;
COMMAND_FILLDOWN_MODE_ANTLR_BUG: 'command_filldown_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_FILLDOWN_MODE ++++++++++++++
mode COMMAND_FILLDOWN_MODE;
// skip
COMMAND_FILLDOWN_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_FILLDOWN_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_FILLDOWN_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_FILLDOWN_MODE_WILDCARD : '*';
COMMAND_FILLDOWN_MODE_COMMA : ',' -> type(COMMA);
COMMAND_FILLDOWN_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_FILLDOWN_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_FILLDOWN_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // FILLDOWN
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_FILLDOWN_MODE_STRING
// one or more characters
: (COMMAND_FILLDOWN_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_FILLDOWN_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,353 | ANTLR | .g4 | 160 | 26.68125 | 106 | 0.527434 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | a983f98bfa912cd4b79d6cd07d6f17eb65ac0d26141b2f76c8de17dfa83636c2 | false | false | false | false |
395 | DPLParserTransform_tags.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_tags.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_tags;
tagsTransformation
: COMMAND_MODE_TAGS (t_tags_outputfieldParameter)? (t_tags_inclnameParameter)? (t_tags_inclvalueParameter)? (fieldType)*
;
t_tags_inclnameParameter
: COMMAND_TAGS_MODE_INCLNAME booleanType
;
t_tags_inclvalueParameter
: COMMAND_TAGS_MODE_INCLVALUE booleanType
;
t_tags_outputfieldParameter
: COMMAND_TAGS_MODE_OUTPUTFIELD fieldType
;
| 2,483 | ANTLR | .g4 | 58 | 39.810345 | 128 | 0.764998 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 32490ac6923ae03aabdde47fe4e1f429ef95f2ca5180a409fb54f6ea0a70e100 | false | false | false | false |
396 | COMMAND_DEDUP_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_DEDUP_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_DEDUP_MODE;
COMMAND_DEDUP_MODE_ANTLR_BUG: 'command_dedup_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_DEDUP_MODE ++++++++++++++
mode COMMAND_DEDUP_MODE;
// skip
COMMAND_DEDUP_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_DEDUP_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_DEDUP_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_DEDUP_MODE_PARENTHESIS_L : '(';
COMMAND_DEDUP_MODE_PARENTHESIS_R : ')';
COMMAND_DEDUP_MODE_CONSECUTIVE : 'consecutive=' -> pushMode(GET_BOOLEAN);
COMMAND_DEDUP_MODE_KEEPEVENTS : 'keepevents=' -> pushMode(GET_BOOLEAN);
COMMAND_DEDUP_MODE_KEEPEMPTY : 'keepempty=' -> pushMode(GET_BOOLEAN);
COMMAND_DEDUP_MODE_SORTBY : 'sortby';
COMMAND_DEDUP_MODE_MINUS : '-';
COMMAND_DEDUP_MODE_AUTO : 'auto';
COMMAND_DEDUP_MODE_PLUS : '+';
COMMAND_DEDUP_MODE_NUM : 'num';
COMMAND_DEDUP_MODE_STR : 'str';
COMMAND_DEDUP_MODE_IP : 'ip';
COMMAND_DEDUP_MODE_COMMA : ',' -> type(COMMA);
// tokens
fragment COMMAND_DEDUP_MINUS: '-';
fragment COMMAND_DEDUP_DIGIT: [0-9]+;
COMMAND_DEDUP_INTEGER: COMMAND_DEDUP_MINUS? COMMAND_DEDUP_DIGIT+ ;
COMMAND_DEDUP_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_DEDUP_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_DEDUP_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' {false}? // +
// |'\u002C' // ,
|'\u002D' {false}? // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // DEDUP
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_DEDUP_MODE_STRING
// one or more characters
: (COMMAND_DEDUP_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_DEDUP_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,965 | ANTLR | .g4 | 175 | 27.794286 | 103 | 0.546006 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 23c354f675bb8cc1477079e67f838da36a34a603e4b556afbbb66e427fded639 | false | false | false | false |
397 | COMMAND_STREAMSTATS_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_STREAMSTATS_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_STREAMSTATS_MODE;
COMMAND_STREAMSTATS_MODE_ANTLR_BUG: 'command_streamstats_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_STREAMSTATS_MODE ++++++++++++++
mode COMMAND_STREAMSTATS_MODE;
// skip
COMMAND_STREAMSTATS_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_STREAMSTATS_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_STREAMSTATS_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_STREAMSTATS_MODE_RESET_ON_CHANGE : 'reset_on_change=' -> pushMode(GET_BOOLEAN);
COMMAND_STREAMSTATS_MODE_RESET_BEFORE : 'reset_before=(' -> pushMode(EVAL_LANGUAGE_MODE);
COMMAND_STREAMSTATS_MODE_RESET_BEFORE_Q : 'reset_before="("' -> pushMode(EVAL_LANGUAGE_MODE);
COMMAND_STREAMSTATS_MODE_TIME_WINDOW : 'time_window=' -> pushMode(GET_SPAN);
COMMAND_STREAMSTATS_MODE_RESET_AFTER : 'reset_after=(' -> pushMode(EVAL_LANGUAGE_MODE) ;
COMMAND_STREAMSTATS_MODE_RESET_AFTER_Q : 'reset_after="("' -> pushMode(EVAL_LANGUAGE_MODE) ;
COMMAND_STREAMSTATS_MODE_CURRENT : 'current=' -> pushMode(GET_BOOLEAN);
COMMAND_STREAMSTATS_MODE_WINDOW : 'window=' -> pushMode(GET_INTEGER);
COMMAND_STREAMSTATS_MODE_GLOBAL : 'global=' -> pushMode(GET_BOOLEAN);
COMMAND_STREAMSTATS_MODE_ALLNUM : 'allnum=' -> pushMode(GET_BOOLEAN);
COMMAND_STREAMSTATS_MODE_COMMA : ',' -> type(COMMA);
COMMAND_STREAMSTATS_MODE_BY : ('BY'|'by'|'By');
COMMAND_STREAMSTATS_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_STREAMSTATS_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_STREAMSTATS_MODE_AS: ('AS'|'as'|'As');
COMMAND_STREAMSTATS_MODE_INT: DIGIT;
fragment DIGIT: [0-9]+;
// aggregateMethod
COMMAND_STREAMSTATS_MODE_COUNT: 'count' -> type(METHOD_AGGREGATE_COUNT);
COMMAND_STREAMSTATS_MODE_AVG_PARENTHESIS_R: 'avg(' -> type(METHOD_AGGREGATE_AVG), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_MEAN_PARENTHESIS_R: 'mean(' -> type(METHOD_AGGREGATE_MEAN), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_C_PARENTHESIS_R: 'c(' -> type(METHOD_AGGREGATE_C), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_COUNT_PARENTHESIS_R: 'count(' -> type(METHOD_AGGREGATE_COUNT_B), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_DC_PARENTHESIS_R: 'dc(' -> type(METHOD_AGGREGATE_DC), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_DISTINCT_COUNT_PARENTHESIS_R: 'distinct_count(' -> type(METHOD_AGGREGATE_DISTINCT_COUNT), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_EARLIEST_PARENTHESIS_R: 'earliest(' -> type(METHOD_AGGREGATE_EARLIEST), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_EARLIEST_TIME_PARENTHESIS_R: 'earliest_time(' -> type(METHOD_AGGREGATE_EARLIEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_ESTDC_PARENTHESIS_R: 'estdc(' -> type(METHOD_AGGREGATE_ESTDC), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_ESTDC_ERROR_PARENTHESIS_R: 'estdc_error(' -> type(METHOD_AGGREGATE_ESTDC_ERROR), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_FIRST_PARENTHESIS_R: 'first(' -> type(METHOD_AGGREGATE_FIRST), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_LAST_PARENTHESIS_R: 'last(' -> type(METHOD_AGGREGATE_LAST), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_LATEST_PARENTHESIS_R: 'latest(' -> type(METHOD_AGGREGATE_LATEST), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_LATEST_TIME_PARENTHESIS_R: 'latest_time(' -> type(METHOD_AGGREGATE_LATEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_LIST_PARENTHESIS_R: 'list(' -> type(METHOD_AGGREGATE_LIST), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_MAX_PARENTHESIS_R: 'max(' -> type(METHOD_AGGREGATE_MAX), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_MEDIAN_PARENTHESIS_R: 'median(' -> type(METHOD_AGGREGATE_MEDIAN), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_MIN_PARENTHESIS_R: 'min(' -> type(METHOD_AGGREGATE_MIN), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_MODE_PARENTHESIS_R: 'mode(' -> type(METHOD_AGGREGATE_MODE), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_P_PARENTHESIS_R: 'p(' -> type(METHOD_AGGREGATE_P), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_PERC_PARENTHESIS_R: 'perc(' -> type(METHOD_AGGREGATE_PERC), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_EXACTPERC_PARENTHESIS_R: 'exactperc(' -> type(METHOD_AGGREGATE_EXACTPERC), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_UPPERPERC_PARENTHESIS_R: 'upperperc(' -> type(METHOD_AGGREGATE_UPPERPERC), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_PERCINT_PARENTHESIS_R: 'percint(' -> type(METHOD_AGGREGATE_PERCINT), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_RANGE_PARENTHESIS_R: 'range(' -> type(METHOD_AGGREGATE_RANGE), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_RATE_PARENTHESIS_R: 'rate(' -> type(METHOD_AGGREGATE_RATE), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_STDEV_PARENTHESIS_R: 'stdev(' -> type(METHOD_AGGREGATE_STDEV), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_STDEVP_PARENTHESIS_R: 'stdevp(' -> type(METHOD_AGGREGATE_STDEVP), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_SUM_PARENTHESIS_R: 'sum(' -> type(METHOD_AGGREGATE_SUM), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_SUMSQ_PARENTHESIS_R: 'sumsq(' -> type(METHOD_AGGREGATE_SUMSQ), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_VALUES_PARENTHESIS_R: 'values(' -> type(METHOD_AGGREGATE_VALUES), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_VAR_PARENTHESIS_R: 'var(' -> type(METHOD_AGGREGATE_VAR), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_VARP_PARENTHESIS_R: 'varp(' -> type(METHOD_AGGREGATE_VARP), pushMode(AGGREGATION_MODE);
//special percX()
COMMAND_STREAMSTATS_MODE_P_VARIABLE: 'p'COMMAND_STREAMSTATS_MODE_INT -> type(METHOD_AGGREGATE_P_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_PERC_VARIABLE: 'perc'COMMAND_STREAMSTATS_MODE_INT -> type(METHOD_AGGREGATE_PERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_EXACTPERC_VARIABLE: 'exactperc'COMMAND_STREAMSTATS_MODE_INT -> type(METHOD_AGGREGATE_EXACTPERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_STREAMSTATS_MODE_UPPERPERC_VARIABLE: 'upperperc'COMMAND_STREAMSTATS_MODE_INT -> type(METHOD_AGGREGATE_UPPERPERC_VARIABLE), pushMode(AGGREGATION_MODE);
// characters for string
fragment COMMAND_STREAMSTATS_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // STREAMSTATS
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_STREAMSTATS_MODE_STRING
// one or more characters
: (COMMAND_STREAMSTATS_MODE_CHAR)+ -> type(GET_FIELD_STRING);
| 10,859 | ANTLR | .g4 | 212 | 45.853774 | 158 | 0.661554 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | a0ad0a5275ac20b2833aeb76d970a70dc529078d56467679fd772c89fd970df7 | false | false | false | false |
398 | COMMAND_FOREACH_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_FOREACH_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_FOREACH_MODE;
COMMAND_FOREACH_MODE_ANTLR_BUG: 'command_foreach_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_FOREACH_MODE ++++++++++++++
mode COMMAND_FOREACH_MODE;
// skip
COMMAND_FOREACH_MODE_SPACE: SPACE -> channel(HIDDEN);
// comments
COMMAND_FOREACH_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
// exits
COMMAND_FOREACH_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_FOREACH_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
//subsearch within foreach
COMMAND_FOREACH_MODE_BRACKET_L: '[' -> type(BRACKET_L), pushMode(COMMAND_MODE);
// tokens
COMMAND_FOREACH_MODE_MATCHSTR : 'matchstr=' -> pushMode(GET_STRING);
COMMAND_FOREACH_MODE_FIELDSTR : 'fieldstr=' -> pushMode(GET_STRING);
COMMAND_FOREACH_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_FOREACH_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_FOREACH_MODE_MATCHSEG1: 'matchseg1=' -> pushMode(GET_STRING);
COMMAND_FOREACH_MODE_MATCHSEG2: 'matchseg2=' -> pushMode(GET_STRING);
COMMAND_FOREACH_MODE_MATCHSEG3: 'matchseg3=' -> pushMode(GET_STRING);
// characters for string
fragment COMMAND_FOREACH_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
//|'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // FOREACH
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_FOREACH_MODE_STRING
// one or more characters
: (COMMAND_FOREACH_MODE_CHAR)+ -> type(GET_FIELD_STRING);
| 5,715 | ANTLR | .g4 | 166 | 27.849398 | 105 | 0.543038 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 39e1b35ed078978f26dabf958a42e7fbc401b77c1020dd85f15c6f3212329b01 | false | false | false | false |
399 | COMMAND_MVCOMBINE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_MVCOMBINE_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_MVCOMBINE_MODE;
COMMAND_MVCOMBINE_MODE_ANTLR_BUG: 'command_mvcombine_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_MVCOMBINE_MODE ++++++++++++++
mode COMMAND_MVCOMBINE_MODE;
// skip
COMMAND_MVCOMBINE_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_MVCOMBINE_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_MVCOMBINE_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_MVCOMBINE_MODE_DELIM : 'delim=' -> pushMode(GET_STRING);
COMMAND_MVCOMBINE_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_MVCOMBINE_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_MVCOMBINE_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
// |'\u0028' // (
// |'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // MVCOMBINE
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_MVCOMBINE_MODE_STRING
// one or more characters
: (COMMAND_MVCOMBINE_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_MVCOMBINE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,345 | ANTLR | .g4 | 159 | 26.805031 | 107 | 0.528536 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 8f90523f61a4dc3501b2f6add78a56900348283da7228a9f6e1fbfc1425a3d6c | false | false | false | false |
400 | COMMAND_CONCURRENCY_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_CONCURRENCY_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_CONCURRENCY_MODE;
COMMAND_CONCURRENCY_MODE_ANTLR_BUG: 'command_concurrency_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_CONCURRENCY_MODE ++++++++++++++
mode COMMAND_CONCURRENCY_MODE;
// skip
COMMAND_CONCURRENCY_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_CONCURRENCY_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_CONCURRENCY_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_CONCURRENCY_MODE_DURATION : 'duration=' -> pushMode(GET_FIELD);
COMMAND_CONCURRENCY_MODE_OUTPUT : 'output=' -> pushMode(GET_FIELD);
COMMAND_CONCURRENCY_MODE_START : 'start=' -> pushMode(GET_FIELD);
COMMAND_CONCURRENCY_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_CONCURRENCY_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_CONCURRENCY_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // CONCURRENCY
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_CONCURRENCY_MODE_STRING
// one or more characters
: (COMMAND_CONCURRENCY_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_CONCURRENCY_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,512 | ANTLR | .g4 | 161 | 27.503106 | 109 | 0.537495 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | d1f110f5110d7ca65a819a17f9f5a96023f18ea65d39960408e36364180b4c00 | false | false | false | false |
401 | COMMAND_UNIQ_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_UNIQ_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_UNIQ_MODE;
COMMAND_UNIQ_MODE_ANTLR_BUG: 'command_uniq_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_UNIQ_MODE ++++++++++++++
mode COMMAND_UNIQ_MODE;
// skip
COMMAND_UNIQ_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_UNIQ_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_UNIQ_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_UNIQ_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,508 | ANTLR | .g4 | 57 | 42.105263 | 98 | 0.75 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | bf078934c212be60665a7d51a6bffb1655631b839c0b84e3327fc14804af4c37 | false | false | false | false |
402 | DPLParserTransform_concurrency.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_concurrency.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_concurrency;
concurrencyTransformation
: COMMAND_MODE_CONCURRENCY t_concurrency_durationParameter (t_concurrency_startConcurrencyParameter|t_concurrency_outputParameter)*?
;
t_concurrency_durationParameter
: COMMAND_CONCURRENCY_MODE_DURATION fieldType
;
t_concurrency_outputParameter
: COMMAND_CONCURRENCY_MODE_OUTPUT fieldType
;
t_concurrency_startConcurrencyParameter
: COMMAND_CONCURRENCY_MODE_START fieldType
;
| 2,545 | ANTLR | .g4 | 58 | 40.793103 | 140 | 0.772177 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 374698576ff09e872cbe7ae236def1913f234678782fb5e7234c8433ca19e0a8 | false | false | false | false |
403 | COMMAND_COLLECT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_COLLECT_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_COLLECT_MODE;
COMMAND_COLLECT_MODE_ANTLR_BUG: 'command_collect_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_COLLECT_MODE ++++++++++++++
mode COMMAND_COLLECT_MODE;
// skip
COMMAND_COLLECT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_COLLECT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_COLLECT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_COLLECT_MODE_RUN_IN_PREVIEW : 'run_in_preview=' -> pushMode(GET_BOOLEAN);
COMMAND_COLLECT_MODE_OUT_PUT_FORMAT : 'output_format=' -> pushMode(COMMAND_COLLECT_MODE_OUT_PUT_FORMAT_MODE);
COMMAND_COLLECT_MODE_SOURCETYPE : 'sourcetype=' -> pushMode(GET_STRING);
COMMAND_COLLECT_MODE_SOURCE : 'source=' -> pushMode(GET_STRING);
COMMAND_COLLECT_MODE_TESTMODE : 'testmode=' -> pushMode(GET_BOOLEAN);
COMMAND_COLLECT_MODE_ADDTIME : 'addtime=' -> pushMode(GET_BOOLEAN);
COMMAND_COLLECT_MODE_MARKER : 'marker=' -> pushMode(GET_STRING);
COMMAND_COLLECT_MODE_SPOOL : 'spool=' -> pushMode(GET_BOOLEAN);
COMMAND_COLLECT_MODE_INDEX : 'index=' -> pushMode(GET_STRING);
COMMAND_COLLECT_MODE_HOST : 'host=' -> pushMode(GET_STRING);
COMMAND_COLLECT_MODE_FILE : 'file=' -> pushMode(GET_STRING);
mode COMMAND_COLLECT_MODE_OUT_PUT_FORMAT_MODE ;
COMMAND_COLLECT_MODE_OUT_PUT_FORMAT_MODE_RAW : 'raw' -> popMode;
COMMAND_COLLECT_MODE_OUT_PUT_FORMAT_MODE_HEC: 'hec' -> popMode;
COMMAND_COLLECT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 3,496 | ANTLR | .g4 | 71 | 47.492958 | 109 | 0.750585 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 132fa125ea56b968c8ffab519f742a597476973c208f2419491240c04a182da9 | false | false | false | false |
404 | COMMAND_GEOM_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_GEOM_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_GEOM_MODE;
COMMAND_GEOM_MODE_ANTLR_BUG: 'command_geom_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_GEOM_MODE ++++++++++++++
mode COMMAND_GEOM_MODE;
// skip
COMMAND_GEOM_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_GEOM_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_GEOM_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_GEOM_MODE_FEATUREIDFIELD : 'featureIdField=' -> pushMode(GET_FIELD);
COMMAND_GEOM_MODE_ALLFEATURES : 'allFeatures=' -> pushMode(GET_BOOLEAN);
COMMAND_GEOM_MODE_MIN_Y : 'min_y=' -> pushMode(GET_NUMBER);
COMMAND_GEOM_MODE_MIN_X : 'min_x=' -> pushMode(GET_NUMBER);
COMMAND_GEOM_MODE_MAX_Y : 'max_y=' -> pushMode(GET_NUMBER);
COMMAND_GEOM_MODE_MAX_X : 'max_x=' -> pushMode(GET_NUMBER);
COMMAND_GEOM_MODE_GEN : 'gen=' -> pushMode(GET_NUMBER);
COMMAND_GEOM_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_GEOM_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_GEOM_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
//|'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // GEOM
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_GEOM_MODE_STRING
// one or more characters
: (COMMAND_GEOM_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_GEOM_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,646 | ANTLR | .g4 | 165 | 27.606061 | 103 | 0.534603 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 19e4ae6f8ecae66b54db438210752195dd20ac64c69da8bcabfe969986cf2e15 | false | false | false | false |
405 | DPLParserTransform_datamodel.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_datamodel.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_datamodel;
datamodelTransformation
: COMMAND_MODE_DATAMODEL (stringType)? (stringType)? t_datamodel_search_mode? (t_datamodel_allow_old_summariesParameter)? (t_datamodel_summariesonlyParameter|t_datamodel_strict_fieldsParameter)*?
;
t_datamodel_search_mode
: (COMMAND_DATAMODEL_MODE_ACCELERATION_SEARCH | COMMAND_DATAMODEL_MODE_FLAT | COMMAND_DATAMODEL_MODE_FLAT)
;
t_datamodel_allow_old_summariesParameter
: COMMAND_DATAMODEL_MODE_ALLOW_OLD_SUMMARIES booleanType
;
t_datamodel_summariesonlyParameter
: COMMAND_DATAMODEL_MODE_SUMMARIESONLY booleanType
;
t_datamodel_strict_fieldsParameter
: COMMAND_DATAMODEL_MODE_STRICT_FIELDS booleanType
; | 2,779 | ANTLR | .g4 | 61 | 42.459016 | 203 | 0.770081 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | a4b1d5fb1b16a50933f0719bfdc2b0b81279e3cde12ddc91b5605499a0dced55 | false | false | false | false |
406 | DPLParserTransform_xpath.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_xpath.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_xpath;
xpathTransformation
: COMMAND_MODE_XPATH (t_xpath_outfieldParameter)? stringType (t_xpath_fieldParameter)? (t_xpath_defaultParameter)?
;
t_xpath_defaultParameter
: COMMAND_XPATH_MODE_DEFAULT stringType
;
t_xpath_fieldParameter
: COMMAND_XPATH_MODE_FIELD fieldType
;
t_xpath_outfieldParameter
: COMMAND_XPATH_MODE_OUTFIELD fieldType
;
| 2,467 | ANTLR | .g4 | 58 | 39.534483 | 123 | 0.764265 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 33c19cac3051036be226722d9f477a457d86a0e41964efd06955ae4af57d6876 | false | false | false | false |
407 | DPLParserTransform_sitimechart.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_sitimechart.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_sitimechart;
sitimechartTransformation
: COMMAND_MODE_SITIMECHART (t_sitimechart_sepParameter | t_sitimechart_partialParameter | t_sitimechart_contParameter | t_sitimechart_limitParameter | t_sitimechart_aggParameter)*? (t_sitimechart_binOptions)* ((aggregateFunction t_sitimechart_fieldRenameInstruction? | (EVAL_LANGUAGE_MODE_PARENTHESIS_L evalStatement EVAL_LANGUAGE_MODE_PARENTHESIS_R) t_sitimechart_fieldRenameInstruction? ) t_sitimechart_divideByInstruction?)+
;
t_sitimechart_aggParameter
: COMMAND_SITIMECHART_MODE_AGG(((aggregateFunction | t_sitimechart_evaledField )) t_sitimechart_fieldRenameInstruction?)
;
t_sitimechart_binStartEndParameter
: (COMMAND_SITIMECHART_MODE_START|COMMAND_SITIMECHART_MODE_END) numberType
;
t_sitimechart_contParameter
: COMMAND_SITIMECHART_MODE_CONT booleanType
;
t_sitimechart_limitParameter
: COMMAND_SITIMECHART_MODE_LIMIT integerType
;
t_sitimechart_partialParameter
: COMMAND_SITIMECHART_MODE_PARTIAL booleanType
;
t_sitimechart_sepParameter
: COMMAND_SITIMECHART_MODE_SEP stringType
;
t_sitimechart_divideByInstruction
: (COMMAND_SITIMECHART_MODE_BY) fieldType (t_sitimechart_binOptions | t_sitimechart_usenullParameter | t_sitimechart_useotherParameter | t_sitimechart_nullstrParameter | t_sitimechart_otherstrParameter)* (t_sitimechart_whereInstruction)?
;
t_sitimechart_whereInstruction
: (COMMAND_SITIMECHART_MODE_WHERE) aggregateFunction (IN|COMMAND_SITIMECHART_MODE_NOTIN) (COMMAND_SITIMECHART_MODE_TOP|COMMAND_SITIMECHART_MODE_BOTTOM) integerType
| (COMMAND_SITIMECHART_MODE_WHERE) aggregateFunction (COMMAND_SITIMECHART_MODE_LT|COMMAND_SITIMECHART_MODE_GT) numberType
;
t_sitimechart_binOptions
: (t_sitimechart_spanOptParameter | t_sitimechart_binsParameter | t_sitimechart_minspanParameter | t_sitimechart_spanParameter | t_sitimechart_binStartEndParameter | t_sitimechart_binAligntimeParameter)
;
t_sitimechart_spanOptParameter
: t_sitimechart_spanParameter (aggregateMethodPerSecond | aggregateMethodPerHour | aggregateMethodPerDay | aggregateMethodPerMinute)*?
;
t_sitimechart_binsParameter
: COMMAND_SITIMECHART_MODE_BINS integerType
;
t_sitimechart_binAligntimeParameter
: COMMAND_SITIMECHART_MODE_ALIGNTIME timeType
;
t_sitimechart_minspanParameter
: COMMAND_SITIMECHART_MODE_MINSPAN spanType
;
t_sitimechart_nullstrParameter
: COMMAND_SITIMECHART_MODE_NULLSTR stringType
;
t_sitimechart_otherstrParameter
: COMMAND_SITIMECHART_MODE_OTHERSTR stringType
;
t_sitimechart_spanParameter
: COMMAND_SITIMECHART_MODE_SPAN spanType
;
t_sitimechart_usenullParameter
: COMMAND_SITIMECHART_MODE_USENULL booleanType
;
t_sitimechart_useotherParameter
: COMMAND_SITIMECHART_MODE_OTHER booleanType
;
t_sitimechart_evaledField
: COMMAND_SITIMECHART_MODE_EVAL_PARENTHESIS_L evalStatement EVAL_LANGUAGE_MODE_PARENTHESIS_R
;
t_sitimechart_fieldRenameInstruction
: (COMMAND_SITIMECHART_MODE_AS) fieldType
;
| 5,269 | ANTLR | .g4 | 110 | 43.172727 | 435 | 0.769126 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 9ab6a7527ad97c6780f00b5e187694bc6074b1146e5ad8872ce056bd2a2dffc0 | false | false | false | false |
408 | DPLParserTransform_tscollect.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_tscollect.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_tscollect;
tscollectTransformation
: COMMAND_MODE_TSCOLLECT (t_tscollect_namespaceParameter)? (t_tscollect_squashcaseParameter)? (t_tscollect_keepresultsParameter)?
;
t_tscollect_keepresultsParameter
: COMMAND_TSCOLLECT_MODE_KEEPRESULTS booleanType
;
t_tscollect_namespaceParameter
: COMMAND_TSCOLLECT_MODE_NAMESPACE stringType
;
t_tscollect_squashcaseParameter
: COMMAND_TSCOLLECT_MODE_SQUASHCASE booleanType
;
| 2,533 | ANTLR | .g4 | 58 | 40.741379 | 137 | 0.771752 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 643fd5eedf9f052291ba5a95c4c43b4ef75ef546a5edec81754ae6d0a9a39488 | false | false | false | false |
409 | DPLParserTransform_localop.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_localop.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_localop;
localopTransformation
: COMMAND_MODE_LOCALOP //empty one
;
| 2,138 | ANTLR | .g4 | 49 | 41.387755 | 98 | 0.77251 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 13d70b574b38b5e1ccca54b15856a48a6a774d6ca4469fb4afb391d4663e3a47 | false | false | false | false |
410 | DPLParserTransform_rest.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_rest.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_rest;
restTransformation
: COMMAND_MODE_REST stringType (t_rest_countParameter)? (t_rest_struckServerParameter)? (t_rest_struckServerGroupParameter)* (t_rest_timeoutParameter)? (t_rest_strEQstrParameter)*
;
t_rest_countParameter
: COMMAND_REST_MODE_COUNT integerType
;
t_rest_struckServerGroupParameter
: COMMAND_REST_MODE_STRUCK_SERVER_GROUP fieldType
;
t_rest_struckServerParameter
: COMMAND_REST_MODE_STRUCK_SERVER fieldType
;
t_rest_strEQstrParameter
: stringType COMMAND_REST_MODE_EQ stringType
;
t_rest_timeoutParameter
: COMMAND_REST_MODE_TIMEOUT integerType
;
| 2,730 | ANTLR | .g4 | 64 | 39.28125 | 187 | 0.761869 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 71ce1bdf39b4048d07335c36698dacf7f2ba5683feddb488c3412215be55eb5a | false | false | false | false |
411 | GET_SPAN.g4 | teragrep_pth_03/src/main/antlr4/imports/GET_SPAN.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar GET_SPAN;
GET_FIELD_ANTLR_BUG: 'get_field_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ GET_SPAN ++++++++++++++
mode GET_SPAN;
// skip
GET_SPAN_SPACE: SPACE -> channel(HIDDEN);
// tokens
//SPAN
//not the best way, but I am not sure of other syntax
fragment SPANUNITS: 's' | 'sec' | 'secs' | 'second'| 'seconds'| 'S';
fragment SPANUNITM: 'm' | 'min' | 'mins' | 'minute' | 'minutes'| 'M';
fragment SPANUNITH: 'h' | 'hr' | 'hrs'| 'hour'| 'hours'|'H';
fragment SPANUNITD: 'd' | 'day' | 'days'|'D';
fragment SPANUNITW: 'w' | 'week' | 'weeks'| 'W' ;
fragment SPANUNITMON: 'mon'| 'month' | 'months'|'MON';
fragment SPANUNITSUBS: 'us'|'ms'|'cs'|'ds';
fragment AT_SIGN: '@';
fragment COMMAND_SISPANCHART_MODE_QUARTER: 'quarter';
GET_SPAN_SPANUNIT_DURATION: GET_SPAN_INTEGER(SPANUNITS|SPANUNITM|SPANUNITH|SPANUNITD|SPANUNITW|SPANUNITMON|SPANUNITSUBS) -> popMode;
GET_SPAN_SPANUNIT: (PLUS|MINUS)? (DIGIT)* (SPANUNITW) (AT_SIGN) (DIGIT)* (SPANUNITW) ([0-7])? -> popMode;
GET_SPAN_INTEGER_RANGE: GET_SPAN_INTEGER '-' DIGIT+ -> popMode;
GET_SPAN_SPAN_LOG: ((MINUS)?DIGIT+)'log'((MINUS)?DIGIT+) ->popMode ;
GET_SPAN_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\'))* '\'' -> popMode;
GET_SPAN_DOUBLE_QUOTE: '"' ('\\'. | ~('"'| '\\'))* '"' -> popMode;
fragment DIGIT: [0-9]+;
fragment DOT: '.';
fragment MINUS: '-';
fragment PLUS: '+';
fragment GET_SPAN_INTEGER: (MINUS)? DIGIT+;
fragment GET_SPAN_DECIMAL: (MINUS)? [0-9]+ DOT? [0-9]+?;
GET_SPAN_INTEGER_INTEGER: ((MINUS)? DIGIT+) -> popMode;
COMMAND_GET_SPAN_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT); | 3,608 | ANTLR | .g4 | 78 | 44.589744 | 132 | 0.710108 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 3339c0a8f61493107c36683cf29cc73ff19ff0621665b03c8c286f7a72e51d4b | false | false | false | false |
412 | COMMAND_XMLUNESCAPE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_XMLUNESCAPE_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_XMLUNESCAPE_MODE;
COMMAND_XMLUNESCAPE_MODE_ANTLR_BUG: 'command_xmlunescape_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_XMLUNESCAPE_MODE ++++++++++++++
mode COMMAND_XMLUNESCAPE_MODE;
// skip
COMMAND_XMLUNESCAPE_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_XMLUNESCAPE_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_XMLUNESCAPE_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_XMLUNESCAPE_MODE_MAXINPUTS : 'maxinputs=' -> pushMode(GET_INTEGER);
COMMAND_XMLUNESCAPE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,648 | ANTLR | .g4 | 58 | 43.758621 | 98 | 0.756778 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 2d07d4c8be82e87bda8a4fbea515a2834a8841c0ece8eb0f63c9c68e14fb5860 | false | false | false | false |
413 | COMMAND_COLLAPSE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_COLLAPSE_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_COLLAPSE_MODE;
COMMAND_COLLAPSE_MODE_ANTLR_BUG: 'command_collapse_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_COLLAPSE_MODE ++++++++++++++
mode COMMAND_COLLAPSE_MODE;
// skip
COMMAND_COLLAPSE_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_COLLAPSE_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_COLLAPSE_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_COLLAPSE_MODE_CHUNKSIZE : 'chunksize=' -> pushMode(GET_NUMBER);
COMMAND_COLLAPSE_MODE_FORCE : 'force='-> pushMode(GET_BOOLEAN);
COMMAND_COLLAPSE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,681 | ANTLR | .g4 | 59 | 43.559322 | 98 | 0.753634 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 722fa301fbe18c21f968df041b3490324f069cf47b58c0eccb365a0a0f22ca8a | false | false | false | false |
414 | COMMAND_DUMP_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_DUMP_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_DUMP_MODE;
COMMAND_DUMP_MODE_ANTLR_BUG: 'command_dump_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_DUMP_MODE ++++++++++++++
mode COMMAND_DUMP_MODE;
// skip
COMMAND_DUMP_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_DUMP_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_DUMP_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_DUMP_MODE_FIELDS: 'fields=' -> pushMode(GET_FIELD);
COMMAND_DUMP_MODE_BASEFILENAME : 'basefilename=' -> pushMode(GET_STRING);
COMMAND_DUMP_MODE_ROLLSIZE : 'rollsize=' -> pushMode(GET_NUMBER);
COMMAND_DUMP_MODE_COMPRESS : 'compress=' -> pushMode(GET_NUMBER);
COMMAND_DUMP_MODE_FORMAT : 'format=' -> pushMode(GET_STRING);
COMMAND_DUMP_MODE_COMMA : ',' -> type(COMMA);
COMMAND_DUMP_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_DUMP_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_DUMP_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
//|'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
//|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // DUMP
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_DUMP_MODE_STRING
// one or more characters
: (COMMAND_DUMP_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_DUMP_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,576 | ANTLR | .g4 | 164 | 27.365854 | 102 | 0.533457 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 6bdd4ae00223dc2784ccc4165629903191d8e7b70c6fefe5b1796ef35744ed76 | false | false | false | false |
415 | GET_SORT_FIELD.g4 | teragrep_pth_03/src/main/antlr4/imports/GET_SORT_FIELD.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar GET_SORT_FIELD;
GET_SORT_FIELD_ANTLR_BUG: 'get_sort_field_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ GET_INTEGER ++++++++++++++
mode GET_SORT_FIELD;
// skip
GET_SORT_FIELD_SPACE: SPACE -> channel(HIDDEN);
// tokens
GET_SORT_FIELD_SINGLE_QUOTED: '\'' ( '\\'. | ~('\''| '\\'))* '\'' -> popMode;
GET_SORT_FIELD_DOUBLE_QUOTED: '"' ( '\\'. | ~('"'| '\\'))* '"' -> popMode;
GET_SORT_FIELD_COMMA: ',' -> type(COMMA);
GET_SORT_FIELD_STRING
// one or more characters
: (GET_SORT_FIELD_CHAR)+ (CHAR)* -> popMode ;
fragment GET_SORT_FIELD_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
//|'\u0028' // (
//|'\u0029' // )
|'\u002A' // *
//|'\u002B' // +
//|'\u002C' // ,
//|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
//|'\u003D' // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // @
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
// |'\u005B' // [
|'\u005C' // \
// |'\u005D' // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
fragment CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
//|'\u0028' // (
//|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
//|'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
//|'\u003D' // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // @
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
// |'\u005B' // [
|'\u005C' // \
// |'\u005D' // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_GET_SORT_FIELD_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 7,271 | ANTLR | .g4 | 250 | 21.044 | 98 | 0.426779 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 74fe916d2e4768858b2554088e005eb771efba9df5463c01e50b122c75b1a452 | false | false | false | false |
416 | COMMAND_XMLKV_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_XMLKV_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_XMLKV_MODE;
COMMAND_XMLKV_MODE_ANTLR_BUG: 'command_xmlkv_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_XMLKV_MODE ++++++++++++++
mode COMMAND_XMLKV_MODE;
// skip
COMMAND_XMLKV_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_XMLKV_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_XMLKV_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_XMLKV_MODE_MAXINPUTS : 'maxinputs=' -> pushMode(GET_INTEGER);
COMMAND_XMLKV_MODE_SINGLE_QUOTE : '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_XMLKV_MODE_DQSTRING : '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
COMMAND_XMLKV_MODE_STRING
// one or more characters
: (COMMAND_XMLKV_MODE_CHAR)+ -> type(GET_FIELD_STRING);
fragment COMMAND_XMLKV_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
//|'\u0027' // '
//|'\u0028' // (
//|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
// |'\u003D' // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // @
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
// |'\u005B' // [
|'\u005C' // \
// |'\u005D' // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
|'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_XMLKV_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,258 | ANTLR | .g4 | 159 | 26.333333 | 104 | 0.521799 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 3296ddf173123a166dca3b396f4513f610c46c9e8777f79f425645b06a49e158 | false | false | false | false |
417 | DPLParserTransform_fieldformat.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_fieldformat.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_fieldformat;
fieldformatTransformation
: COMMAND_MODE_FIELDFORMAT fieldType COMMAND_FIELDFORMAT_MODE_EQ evalStatement
; | 2,189 | ANTLR | .g4 | 49 | 42.44898 | 98 | 0.777103 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 63b846e12fb957cc8b0f810b0c5ae00a9a70d3eec2df2dcfe51a6cdc94a6edc7 | false | false | false | false |
418 | COMMAND_DELTA_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_DELTA_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_DELTA_MODE;
COMMAND_DELTA_MODE_ANTLR_BUG: 'command_delta_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_DELTA_MODE ++++++++++++++
mode COMMAND_DELTA_MODE;
// skip
COMMAND_DELTA_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_DELTA_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_DELTA_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_DELTA_MODE_AS : ('AS'|'as'|'As');
COMMAND_DELTA_MODE_P : 'p=' -> pushMode(GET_INTEGER);
COMMAND_DELTA_MODE_COLON: ':';
COMMAND_DELTA_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_DELTA_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_DELTA_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
// |'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
//|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // DELTA
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_DELTA_MODE_STRING
// one or more characters
: (COMMAND_DELTA_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_DELTA_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,348 | ANTLR | .g4 | 161 | 26.478261 | 103 | 0.523404 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 2c07352b79dedb7e14b4198c801cab054b15a97128775468210bf227796a7e9f | false | false | false | false |
419 | DPLParserTransform_untable.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_untable.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_untable;
untableTransformation
: COMMAND_MODE_UNTABLE fieldType fieldType fieldType
;
| 2,156 | ANTLR | .g4 | 49 | 41.755102 | 98 | 0.774929 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 31fa99ccad5868d84ffec181f9fad19c2a4f8fb2488153cd9e8931961611e65d | false | false | false | false |
420 | DPLParserTransform_xmlkv.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_xmlkv.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_xmlkv;
xmlkvTransformation
: COMMAND_MODE_XMLKV fieldType t_xmlkv_maxinputsParameter
;
t_xmlkv_maxinputsParameter
: COMMAND_XMLKV_MODE_MAXINPUTS integerType
;
| 2,248 | ANTLR | .g4 | 52 | 40.692308 | 98 | 0.771898 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 95f21c71b911c399f4cedcfc4cd1d9791dc4d937b866cbf30eab7b37e4b4e65d | false | false | false | false |
421 | COMMAND_ASSOCIATE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_ASSOCIATE_MODE.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar COMMAND_ASSOCIATE_MODE;
COMMAND_ASSOCIATE_MODE_ANTLR_BUG: 'command_associate_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_ASSOCIATE_MODE ++++++++++++++
mode COMMAND_ASSOCIATE_MODE;
// skip
COMMAND_ASSOCIATE_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_ASSOCIATE_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_ASSOCIATE_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_ASSOCIATE_MODE_SUPFREQ : 'supfreq=' -> pushMode(GET_NUMBER);
COMMAND_ASSOCIATE_MODE_SUPCNT : 'supcnt=' -> pushMode(GET_NUMBER);
COMMAND_ASSOCIATE_MODE_IMPROV : 'improv=' -> pushMode(GET_NUMBER);
COMMAND_ASSOCIATE_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_ASSOCIATE_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_ASSOCIATE_MODE_COMMA: ',' -> type(COMMA);
// characters for string
fragment COMMAND_ASSOCIATE_MODE_CHAR
:'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
|'\u0028' // (
|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' // ,
|'\u002D' // -
|'\u002E' // .
|'\u002F' // /
|'\u0030' // 0
|'\u0031' // 1
|'\u0032' // 2
|'\u0033' // 3
|'\u0034' // 4
|'\u0035' // 5
|'\u0036' // 6
|'\u0037' // 7
|'\u0038' // 8
|'\u0039' // 9
|'\u003A' // :
|'\u003B' // ;
|'\u003C' // <
|'\u003D' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // ASSOCIATE
|'\u0041' // A
|'\u0042' // B
|'\u0043' // C
|'\u0044' // D
|'\u0045' // E
|'\u0046' // F
|'\u0047' // G
|'\u0048' // H
|'\u0049' // I
|'\u004A' // J
|'\u004B' // K
|'\u004C' // L
|'\u004D' // M
|'\u004E' // N
|'\u004F' // O
|'\u0050' // P
|'\u0051' // Q
|'\u0052' // R
|'\u0053' // S
|'\u0054' // T
|'\u0055' // U
|'\u0056' // V
|'\u0057' // W
|'\u0058' // X
|'\u0059' // Y
|'\u005A' // Z
|'\u005B' {false}? // [
|'\u005C' // \
|'\u005D' {false}? // ]
|'\u005E' // ^
|'\u005F' // _
|'\u0060' // `
|'\u0061' // a
|'\u0062' // b
|'\u0063' // c
|'\u0064' // d
|'\u0065' // e
|'\u0066' // f
|'\u0067' // g
|'\u0068' // h
|'\u0069' // u
|'\u006A' // j
|'\u006B' // k
|'\u006C' // l
|'\u006D' // m
|'\u006E' // n
|'\u006F' // o
|'\u0070' // p
|'\u0071' // q
|'\u0072' // r
|'\u0073' // s
|'\u0074' // t
|'\u0075' // u
|'\u0076' // v
|'\u0077' // w
|'\u0078' // x
|'\u0079' // y
|'\u007A' // z
|'\u007B' // {
// |'\u007C' // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
;
COMMAND_ASSOCIATE_MODE_STRING
// one or more characters
: (COMMAND_ASSOCIATE_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_ASSOCIATE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,529 | ANTLR | .g4 | 162 | 27.425926 | 107 | 0.536075 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 83be05f14ddf43f3541e1718b9e1ae3d999c9ad2d7191855dd9c9fa0c62b4c70 | false | false | false | false |
422 | DPLParserTransform_gentimes.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_gentimes.g4 | /*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
parser grammar DPLParserTransform_gentimes;
gentimesTransformation
: COMMAND_MODE_GENTIMES t_gentimes_startGentimesParameter (t_gentimes_endGentimesParameter)? (t_gentimes_incrementParameter)?
;
t_gentimes_endGentimesParameter
: COMMAND_GENTIMES_MODE_END timeType
;
t_gentimes_incrementParameter
: COMMAND_GENTIMES_MODE_INCREMENT spanType
;
t_gentimes_startGentimesParameter
: COMMAND_GENTIMES_MODE_START timeType
;
| 2,503 | ANTLR | .g4 | 58 | 40.224138 | 133 | 0.770176 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | b2c65d2deea2a75e5a77398a4fc189940f4d12c5da973c04460e576bf6a50cf3 | false | false | false | false |