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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
423 | DPLParserTransform_folderize.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_folderize.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_folderize;
folderizeTransformation
: COMMAND_MODE_FOLDERIZE t_folderize_attrParameter (t_folderize_sepParameter|t_folderize_sizeParameter|t_folderize_minfoldersParameter|t_folderize_maxfoldersParameter)*
;
t_folderize_attrParameter
: COMMAND_FOLDERIZE_MODE_ATTR stringType
;
t_folderize_maxfoldersParameter
: COMMAND_FOLDERIZE_MODE_MAXFOLDERS integerType
;
t_folderize_minfoldersParameter
: COMMAND_FOLDERIZE_MODE_MINFOLDERS integerType
;
t_folderize_sepParameter
: COMMAND_FOLDERIZE_MODE_SEP stringType
;
t_folderize_sizeParameter
: COMMAND_FOLDERIZE_MODE_SIZE stringType
;
| 2,736 | ANTLR | .g4 | 64 | 39.375 | 176 | 0.769173 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | a9b7f7ce10617b03aae8d999086d7339e9dfed21e894aacacd4d4bd4ed919f27 | false | false | false | false |
424 | DPLParserTransform_inputlookup.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_inputlookup.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_inputlookup;
inputlookupTransformation
: COMMAND_MODE_INPUTLOOKUP (t_inputlookup_appendParameter)? (t_inputlookup_startParameter)? (t_inputlookup_maxParameter)? (t_inputlookup_filenameType|t_inputlookup_tableNameParameter) (t_inputlookup_whereQuery)?
;
t_inputlookup_appendParameter
: COMMAND_INPUTLOOKUP_MODE_APPEND booleanType
;
t_inputlookup_maxParameter
: COMMAND_INPUTLOOKUP_MODE_MAX integerType
;
t_inputlookup_startParameter
: COMMAND_INPUTLOOKUP_MODE_START integerType
;
t_inputlookup_tableNameParameter
: stringType
;
t_inputlookup_filenameType
: ((COMMAND_INPUTLOOKUP_MODE_SLASH)? stringType (COMMAND_INPUTLOOKUP_MODE_SLASH))* stringType (COMMAND_INPUTLOOKUP_MODE_DOT stringType)?
;
t_inputlookup_whereQuery
: (COMMAND_INPUTLOOKUP_MODE_WHERE) logicalStatement
;
| 2,958 | ANTLR | .g4 | 67 | 40.522388 | 220 | 0.765587 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 6f39a85ae24dc2ee2e8d0f00267ca7aabe42db090060bcaa912feafd6c604517 | false | false | false | false |
425 | COMMAND_TSTATS_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TSTATS_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_TSTATS_MODE;
COMMAND_TSTATS_MODE_ANTLR_BUG: 'command_tstats_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TSTATS_MODE ++++++++++++++
mode COMMAND_TSTATS_MODE;
// skip
COMMAND_TSTATS_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TSTATS_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TSTATS_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_TSTATS_MODE_WHERE: ('where' | 'WHERE');
COMMAND_TSTATS_MODE_EQ: '=';
COMMAND_TSTATS_MODE_NEQ: '!=';
COMMAND_TSTATS_MODE_IN: ('in'|'IN'|'In');
COMMAND_TSTATS_MODE_TERM: 'TERM';
COMMAND_TSTATS_MODE_CASE: 'CASE';
COMMAND_TSTATS_MODE_WILDCARD: '*' -> type(WILDCARD);
COMMAND_TSTATS_MODE_EVENTTYPE: 'eventtype';
COMMAND_TSTATS_MODE_EVENTTYPETAG: 'eventtypetag';
COMMAND_TSTATS_MODE_HOST: 'host';
COMMAND_TSTATS_MODE_HOSTTAG: 'hosttag';
COMMAND_TSTATS_MODE_INDEX: 'index';
COMMAND_TSTATS_MODE_SAVEDSEARCH: 'savedsearch';
COMMAND_TSTATS_MODE_SOURCE: 'source';
COMMAND_TSTATS_MODE_SOURCETYPE: 'sourcetype';
COMMAND_TSTATS_MODE_TAG: 'tag';
COMMAND_TSTATS_MODE_INT: DIGIT;
fragment DIGIT: [0-9]+;
COMMAND_TSTATS_MODE_FROM: 'from' -> pushMode(GET_STRING);
COMMAND_TSTATS_MODE_DATAMODEL: 'datamodel=' -> pushMode(GET_STRING);
COMMAND_TSTATS_MODE_ALLOW_OLD_SUMMARIES : 'allow_old_summaries=' -> pushMode(GET_BOOLEAN);
COMMAND_TSTATS_MODE_SUMMARIESONLY : 'summariesonly=' -> pushMode(GET_BOOLEAN);
COMMAND_TSTATS_MODE_INCLUDE_REDUCED_BUCKETS : 'include_reduced_buckets=' -> pushMode(GET_BOOLEAN);
COMMAND_TSTATS_MODE_CHUNKSIZE : 'chunk_size=' -> pushMode(GET_INTEGER);
COMMAND_TSTATS_MODE_PRESTATS : 'prestats=' -> pushMode(GET_BOOLEAN);
COMMAND_TSTATS_MODE_GROUPBY : ('GROUPBY'|'groupby');
COMMAND_TSTATS_MODE_APPEND : 'append=' -> pushMode(GET_BOOLEAN);
COMMAND_TSTATS_MODE_FILLNULL_VALUE: 'fillnull_value' -> pushMode(GET_STRING) ;
COMMAND_TSTATS_MODE_LOCAL : 'local=' -> pushMode(GET_BOOLEAN);
COMMAND_TSTATS_MODE_NODENAME: 'nodename=' -> pushMode(GET_STRING);
COMMAND_TSTATS_MODE_COMMA : ',' -> type(COMMA);
COMMAND_TSTATS_MODE_SPAN : 'span=' -> pushMode(GET_SPAN);
COMMAND_TSTATS_MODE_SID : 'sid=' -> pushMode(GET_STRING);
COMMAND_TSTATS_MODE_PREFIX : 'PREFIX(' -> pushMode(GET_STRING);
COMMAND_TSTATS_MODE_BY : ('BY'|'by');
COMMAND_TSTATS_MODE_PARENTHESIS_R : ')';
COMMAND_TSTATS_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_TSTATS_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_TSTATS_MODE_AS: ('AS'|'as');
COMMAND_TSTATS_MODE_PARENTHESIS_L: '(';
// aggregateMethod
COMMAND_TSTATS_MODE_COUNT: 'count' -> type(METHOD_AGGREGATE_COUNT);
COMMAND_TSTATS_MODE_AVG_PARENTHESIS_R: 'avg(' -> type(METHOD_AGGREGATE_AVG), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_MEAN_PARENTHESIS_R: 'mean(' -> type(METHOD_AGGREGATE_MEAN), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_C_PARENTHESIS_R: 'c(' -> type(METHOD_AGGREGATE_C), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_COUNT_PARENTHESIS_R: 'count(' -> type(METHOD_AGGREGATE_COUNT_B), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_DC_PARENTHESIS_R: 'dc(' -> type(METHOD_AGGREGATE_DC), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_DISTINCT_COUNT_PARENTHESIS_R: 'distinct_count(' -> type(METHOD_AGGREGATE_DISTINCT_COUNT), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_EARLIEST_PARENTHESIS_R: 'earliest(' -> type(METHOD_AGGREGATE_EARLIEST), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_EARLIEST_TIME_PARENTHESIS_R: 'earliest_time(' -> type(METHOD_AGGREGATE_EARLIEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_ESTDC_PARENTHESIS_R: 'estdc(' -> type(METHOD_AGGREGATE_ESTDC), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_ESTDC_ERROR_PARENTHESIS_R: 'estdc_error(' -> type(METHOD_AGGREGATE_ESTDC_ERROR), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_FIRST_PARENTHESIS_R: 'first(' -> type(METHOD_AGGREGATE_FIRST), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_LAST_PARENTHESIS_R: 'last(' -> type(METHOD_AGGREGATE_LAST), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_LATEST_PARENTHESIS_R: 'latest(' -> type(METHOD_AGGREGATE_LATEST), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_LATEST_TIME_PARENTHESIS_R: 'latest_time(' -> type(METHOD_AGGREGATE_LATEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_LIST_PARENTHESIS_R: 'list(' -> type(METHOD_AGGREGATE_LIST), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_MAX_PARENTHESIS_R: 'max(' -> type(METHOD_AGGREGATE_MAX), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_MEDIAN_PARENTHESIS_R: 'median(' -> type(METHOD_AGGREGATE_MEDIAN), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_MIN_PARENTHESIS_R: 'min(' -> type(METHOD_AGGREGATE_MIN), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_MODE_PARENTHESIS_R: 'mode(' -> type(METHOD_AGGREGATE_MODE), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_P_PARENTHESIS_R: 'p(' -> type(METHOD_AGGREGATE_P), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_PERC_PARENTHESIS_R: 'perc(' -> type(METHOD_AGGREGATE_PERC), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_EXACTPERC_PARENTHESIS_R: 'exactperc(' -> type(METHOD_AGGREGATE_EXACTPERC), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_UPPERPERC_PARENTHESIS_R: 'upperperc(' -> type(METHOD_AGGREGATE_UPPERPERC), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_PERCINT_PARENTHESIS_R: 'percint(' -> type(METHOD_AGGREGATE_PERCINT), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_RANGE_PARENTHESIS_R: 'range(' -> type(METHOD_AGGREGATE_RANGE), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_RATE_PARENTHESIS_R: 'rate(' -> type(METHOD_AGGREGATE_RATE), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_STDEV_PARENTHESIS_R: 'stdev(' -> type(METHOD_AGGREGATE_STDEV), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_STDEVP_PARENTHESIS_R: 'stdevp(' -> type(METHOD_AGGREGATE_STDEVP), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_SUM_PARENTHESIS_R: 'sum(' -> type(METHOD_AGGREGATE_SUM), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_SUMSQ_PARENTHESIS_R: 'sumsq(' -> type(METHOD_AGGREGATE_SUMSQ), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_VALUES_PARENTHESIS_R: 'values(' -> type(METHOD_AGGREGATE_VALUES), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_VAR_PARENTHESIS_R: 'var(' -> type(METHOD_AGGREGATE_VAR), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_VARP_PARENTHESIS_R: 'varp(' -> type(METHOD_AGGREGATE_VARP), pushMode(AGGREGATION_MODE);
//special percX()
COMMAND_TSTATS_MODE_P_VARIABLE: 'p'COMMAND_TSTATS_MODE_INT -> type(METHOD_AGGREGATE_P_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_PERC_VARIABLE: 'perc'COMMAND_TSTATS_MODE_INT -> type(METHOD_AGGREGATE_PERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_EXACTPERC_VARIABLE: 'exactperc'COMMAND_TSTATS_MODE_INT -> type(METHOD_AGGREGATE_EXACTPERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_TSTATS_MODE_UPPERPERC_VARIABLE: 'upperperc'COMMAND_TSTATS_MODE_INT -> type(METHOD_AGGREGATE_UPPERPERC_VARIABLE), pushMode(AGGREGATION_MODE);
// characters for string
fragment COMMAND_TSTATS_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' // TSTATS
|'\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_TSTATS_MODE_STRING
// one or more characters
: (COMMAND_TSTATS_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_TSTATS_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 11,558 | ANTLR | .g4 | 236 | 44.050847 | 148 | 0.660356 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 2ac0e5dc3362475735995cf71103c81e32ad6040aff5b3ddea6c8768477a4014 | false | false | false | false |
426 | COMMAND_PIVOT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_PIVOT_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_PIVOT_MODE;
COMMAND_PIVOT_MODE_ANTLR_BUG: 'command_pivot_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_PIVOT_MODE ++++++++++++++
mode COMMAND_PIVOT_MODE;
// skip
COMMAND_PIVOT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_PIVOT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_PIVOT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
// COMMAND_PIVOT_MODE_AS: ('as'|'AS');
//COMMAND_PIVOT_MODE_SPLITROW: 'SPLITROW';
//COMMAND_PIVOT_MODE_RANGE: 'RANGE';
//COMMAND_PIVOT_MODE_PERIOD: 'PERIOD' -> pushMode(X);
//COMMAND_PIVOT_MODE_FALSELABEL: 'FALSELABEL';
//COMMAND_PIVOT_MODE_SPLITROW: 'SPLITROW';
//COMMAND_PIVOT_MODE_LIMIT: 'LIMIT';
COMMAND_PIVOT_MODE_SINGLE_STRING: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_PIVOT_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for 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' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // PIVOT
|'\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_PIVOT_MODE_STRING
// one or more characters
: (CHAR)+ -> type(GET_STRING_STRING);
COMMAND_PIVOT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,485 | ANTLR | .g4 | 165 | 26.648485 | 105 | 0.529412 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | ff68f2bfd072e0b8c76c3580222a777150527af0ad3f2b086a7adc5411c556f4 | false | false | false | false |
427 | COMMAND_LOADJOB_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_LOADJOB_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_LOADJOB_MODE;
COMMAND_LOADJOB_MODE_ANTLR_BUG: 'command_loadjob_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_LOADJOB_MODE ++++++++++++++
mode COMMAND_LOADJOB_MODE;
// skip
COMMAND_LOADJOB_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_LOADJOB_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_LOADJOB_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_LOADJOB_MODE_ARTIFACT_OFFSET : 'artifact_offset=' -> pushMode(GET_INTEGER);
COMMAND_LOADJOB_MODE_IGNORE_RUNNING : 'ignore_running=' -> pushMode(GET_BOOLEAN);
COMMAND_LOADJOB_MODE_JOB_DELEGATE : 'job_delegate=' -> pushMode(GET_STRING);
COMMAND_LOADJOB_MODE_SAVEDSEARCH : 'savedsearch=' -> pushMode(GET_STRING);
COMMAND_LOADJOB_MODE_EVENTS : 'events=' -> pushMode(GET_BOOLEAN);
COMMAND_LOADJOB_MODE_DOT: '.';
COMMAND_LOADJOB_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_LOADJOB_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' // LOADJOB
|'\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_LOADJOB_MODE_STRING
// one or more characters
: (COMMAND_LOADJOB_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_LOADJOB_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,586 | ANTLR | .g4 | 164 | 27.371951 | 106 | 0.53987 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 0a18407dfc8814fe0b3515b6701400df2f78e6c2f02ea4cd848306d3c45b60db | false | false | false | false |
428 | GET_I_OR_S.g4 | teragrep_pth_03/src/main/antlr4/imports/GET_I_OR_S.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_I_OR_S;
GET_I_OR_S_ANTLR_BUG: 'get_int_or_s_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ GET_INTEGER ++++++++++++++
mode GET_I_OR_S;
// skip
GET_I_OR_S_SPACE: SPACE -> channel(HIDDEN);
// tokens
// tokens
fragment GET_INTEGER_MINUS: '-';
fragment GET_INTEGER_DIGIT: [0-9]+;
GET_I_OR_S_INTEGER: GET_INTEGER_MINUS? GET_INTEGER_DIGIT+ -> popMode;
GET_I_OR_S_SINGLE_QUOTED: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> popMode;
GET_I_OR_S_DOUBLE_QUOTED: '"' ( '\\'. | ~('"'| '\\') )* '"' -> popMode;
GET_I_OR_S_STRING
// one or more characters
: (STRING_CHAR)+ -> popMode;
fragment STRING_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' // =
|'\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_T_OR_BCOMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT); | 5,035 | ANTLR | .g4 | 159 | 24.874214 | 98 | 0.506776 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 3916e8ba9b655101daf6f419ee571a976883b5999ef5f97f96b01bcf061a1d38 | false | false | false | false |
429 | DPLParserTransform_diff.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_diff.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_diff;
diffTransformation
: COMMAND_MODE_DIFF (t_diff_position1Parameter|t_diff_position2Parameter|t_diff_attributeParameter|t_diff_diffheaderParameter|t_diff_contextParameter|t_diff_maxlenParameter)*
;
t_diff_attributeParameter
: COMMAND_DIFF_MODE_ATTRIBUTE stringType
;
t_diff_contextParameter
: COMMAND_DIFF_MODE_CONTEXT booleanType
;
t_diff_diffheaderParameter
: COMMAND_DIFF_MODE_DIFFHEADER booleanType
;
t_diff_maxlenParameter
: COMMAND_DIFF_MODE_MAXLEN integerType
;
t_diff_position1Parameter
: COMMAND_DIFF_MODE_POSITION1 integerType
;
t_diff_position2Parameter
: COMMAND_DIFF_MODE_POSITION2 integerType
;
| 2,794 | ANTLR | .g4 | 67 | 38.134328 | 182 | 0.763187 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 81653cd8c6ab03bf4a99444bd76ea7a13fa38a857eb0497d52cd8c0046221801 | false | false | false | false |
430 | DPLParserTransform_rename.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_rename.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_rename;
renameTransformation
: COMMAND_MODE_RENAME (fieldType COMMAND_RENAME_MODE_AS fieldType COMMA? ) ( fieldType (COMMAND_RENAME_MODE_AS) fieldType COMMA?)*
;
| 2,233 | ANTLR | .g4 | 49 | 43.306122 | 138 | 0.772686 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 1b697b30a6bb347a5979b465f9f8f2ec8c057089ac26fb008842218be71a3a1c | false | false | false | false |
431 | COMMAND_TAIL_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TAIL_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_TAIL_MODE;
COMMAND_TAIL_MODE_ANTLR_BUG: 'command_tail_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TAIL_MODE ++++++++++++++
mode COMMAND_TAIL_MODE;
// skip
COMMAND_TAIL_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TAIL_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TAIL_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
fragment MINUS: '-';
fragment DIGIT: [0-9]+;
COMMAND_TAIL_MODE_INTEGER: MINUS? DIGIT+ -> popMode;
COMMAND_TAIL_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,606 | ANTLR | .g4 | 60 | 41.583333 | 98 | 0.748326 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | ff8f9eac5d173e6c5d9aca75b5e4072ee41ccf5e645a0ebab46af1a672bdcd3a | false | false | false | false |
432 | DPLParserTransform_kvform.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_kvform.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_kvform;
kvformTransformation
: COMMAND_MODE_KVFORM (t_kvform_formParameter)? (t_kvform_fieldParameter)?
;
t_kvform_fieldParameter
: COMMAND_KVFORM_MODE_FIELD fieldType
;
t_kvform_formParameter
: COMMAND_KVFORM_MODE_FORM stringType
;
| 2,340 | ANTLR | .g4 | 55 | 39.763636 | 98 | 0.766125 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | a541056f10f7ce2a6b9bf54a98a7022097e18ab88708be0bfb2e3adf8c5004a4 | false | false | false | false |
433 | DPLParserTransform_appendcols.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_appendcols.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_appendcols;
appendcolsTransformation
: COMMAND_MODE_APPENDCOLS (t_appendcols_overrideParameter)? (t_appendcols_subsearchParameter)*? subsearchStatement
;
t_appendcols_overrideParameter
: COMMAND_APPENDCOLS_MODE_OVERRIDE booleanType
;
t_appendcols_subsearchParameter
: t_appendcols_extendtimerangeParameter
| t_appendcols_maxtimeParameter
| t_appendcols_maxoutParameter
| t_appendcols_timeoutParameter
;
t_appendcols_extendtimerangeParameter
: COMMAND_APPENDCOLS_MODE_EXTENDTIMERANGE booleanType
;
t_appendcols_maxtimeParameter
: COMMAND_APPENDCOLS_MODE_MAXTIME integerType
;
t_appendcols_maxoutParameter
: COMMAND_APPENDCOLS_MODE_MAXOUT integerType
;
t_appendcols_timeoutParameter
: COMMAND_APPENDCOLS_MODE_TIMEOUT integerType
; | 2,925 | ANTLR | .g4 | 70 | 38.114286 | 122 | 0.765098 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 580dd9b642c5de2e9858fdb8bbb9aafc6991080f70e96a974f0baa390658f2bb | false | false | false | false |
434 | DPLParserTransform_reltime.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_reltime.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_reltime;
reltimeTransformation
: COMMAND_MODE_RELTIME
; //an empty one
| 2,141 | ANTLR | .g4 | 49 | 41.44898 | 98 | 0.772358 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | fc3fcfa9b23431476552d62d1876b297b8949e63369d1896ec174cd565f5f74c | false | false | false | false |
435 | COMMAND_TYPEAHEAD_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TYPEAHEAD_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_TYPEAHEAD_MODE;
COMMAND_TYPEAHEAD_MODE_ANTLR_BUG: 'command_typeahead_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TYPEAHEAD_MODE ++++++++++++++
mode COMMAND_TYPEAHEAD_MODE;
// skip
COMMAND_TYPEAHEAD_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TYPEAHEAD_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TYPEAHEAD_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_TYPEAHEAD_MODE_COLLAPSE: 'collapse=' -> pushMode(GET_BOOLEAN);
COMMAND_TYPEAHEAD_MODE_STARTTIMEU : 'starttimeu=' -> pushMode(GET_INTEGER);
COMMAND_TYPEAHEAD_MODE_ENDTIMEU : 'endtimeu=' -> pushMode(GET_INTEGER);
COMMAND_TYPEAHEAD_MODE_MAXTIME : 'maxtime=' -> pushMode(GET_INTEGER);
COMMAND_TYPEAHEAD_MODE_PREFIX : 'prefix=' -> pushMode(GET_STRING);
COMMAND_TYPEAHEAD_MODE_INDEX : 'index=' -> pushMode(GET_STRING);
COMMAND_TYPEAHEAD_MODE_COUNT : 'count=' -> pushMode(GET_INTEGER);
COMMAND_TYPEAHEAD_MODE_SINGLE_STRING: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_TYPEAHEAD_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_TYPEAHEAD_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' // TYPEAHEAD
|'\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_TYPEAHEAD_MODE_STRING
// one or more characters
: (COMMAND_TYPEAHEAD_MODE_CHAR)+-> type(GET_STRING_STRING);
COMMAND_TYPEAHEAD_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,767 | ANTLR | .g4 | 165 | 28.357576 | 109 | 0.546187 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | f6188369e60bd8bedf497150d25b75bf789b420b8e8ba2d4a99b85f2207585a1 | false | false | false | false |
436 | GET_STRING.g4 | teragrep_pth_03/src/main/antlr4/imports/GET_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_STRING;
GET_FIELD_ANTLR_BUG: 'get_string_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ GET_STRING ++++++++++++++
mode GET_STRING;
// skip
GET_STRING_SPACE: SPACE -> channel(HIDDEN);
// tokens
GET_STRING_WILDCARD: '*' -> popMode;
GET_STRING_SINGLE_QUOTED: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> popMode;
GET_STRING_DOUBLE_QUOTED: '"' ( '\\'. | ~('"'| '\\') )* '"' -> popMode;
GET_STRING_STRING
// one or more characters
: (STRING_CHAR)+ -> popMode;
fragment STRING_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' // =
|'\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_STRING_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT); | 4,925 | ANTLR | .g4 | 156 | 24.673077 | 98 | 0.503988 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 551b99f6a2f29194b911922ab7a93f3e479b1f63703f7f8f32da045a231844b9 | false | false | false | false |
437 | DPLParserTransform_head.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_head.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_head;
//syntax = <stats-agg> (as <wc-field>)? not sure if done correctly. Also, should binSpans-s be in one bracket?
headTransformation
: COMMAND_MODE_HEAD (t_head_nullParameter | t_head_keepLastParameter)*? t_head_integerType? (t_head_nullParameter | t_head_keepLastParameter)*?
| COMMAND_MODE_HEAD (t_head_limitParameter | t_head_nullParameter | t_head_keepLastParameter)*? t_head_evalParameter? (t_head_limitParameter | t_head_nullParameter | t_head_keepLastParameter)*?
;
t_head_keepLastParameter
: COMMAND_HEAD_MODE_KEEPLAST booleanType
;
t_head_limitParameter
: COMMAND_HEAD_MODE_LIMIT integerType
;
t_head_nullParameter
: COMMAND_HEAD_MODE_NULL booleanType
;
t_head_evalParameter
: COMMAND_HEAD_MODE_PARENTHESIS_L evalStatement EVAL_LANGUAGE_MODE_PARENTHESIS_R
;
t_head_integerType
: COMMAND_HEAD_MODE_INTEGER
; | 2,987 | ANTLR | .g4 | 66 | 41.848485 | 201 | 0.753598 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 612dbcc356858cdd7a96cd22945b167e81f7bed06ad8d35c83534e731fca2df5 | false | false | false | false |
438 | DPLParserTransform_streamstats.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_streamstats.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_streamstats;
streamstatsTransformation
: COMMAND_MODE_STREAMSTATS (t_streamstats_resetOnChangeParameter)? (t_streamstats_resetBeforeParameter)? (t_streamstats_resetAfterParameter)? (t_streamstats_currentParameter)? (t_streamstats_windowParameter)? (t_streamstats_timeWindowParameter)? (t_streamstats_globalParameter)? (t_streamstats_allnumParameter)? (t_streamstats_aggregationInstruction)* (t_streamstats_byInstruction)?
;
t_streamstats_allnumParameter
: COMMAND_STREAMSTATS_MODE_ALLNUM booleanType
;
t_streamstats_currentParameter
: COMMAND_STREAMSTATS_MODE_CURRENT booleanType
;
t_streamstats_globalParameter
: COMMAND_STREAMSTATS_MODE_GLOBAL booleanType
;
t_streamstats_resetAfterParameter
: (COMMAND_STREAMSTATS_MODE_RESET_AFTER | COMMAND_STREAMSTATS_MODE_RESET_AFTER_Q) evalStatement (EVAL_LANGUAGE_MODE_PARENTHESIS_R | EVAL_LANGUAGE_MODE_PARENTHESIS_R_Q)
;
t_streamstats_resetBeforeParameter
: (COMMAND_STREAMSTATS_MODE_RESET_BEFORE | COMMAND_STREAMSTATS_MODE_RESET_BEFORE_Q) evalStatement (EVAL_LANGUAGE_MODE_PARENTHESIS_R | EVAL_LANGUAGE_MODE_PARENTHESIS_R_Q)
;
t_streamstats_resetOnChangeParameter
: COMMAND_STREAMSTATS_MODE_RESET_ON_CHANGE booleanType
;
t_streamstats_timeWindowParameter
: COMMAND_STREAMSTATS_MODE_TIME_WINDOW spanType
;
t_streamstats_windowParameter
: COMMAND_STREAMSTATS_MODE_WINDOW integerType
;
t_streamstats_byInstruction
: (COMMAND_STREAMSTATS_MODE_BY) fieldListType
;
t_streamstats_fieldRenameInstruction
: (COMMAND_STREAMSTATS_MODE_AS) fieldType
;
t_streamstats_aggregationInstruction
: aggregateFunction (t_streamstats_fieldRenameInstruction)?
;
| 3,849 | ANTLR | .g4 | 82 | 42.817073 | 390 | 0.768348 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | ce2468c2ac3562aca972677945421fe51fc994618a793bb8b640fcdbcd79a069 | false | false | false | false |
439 | DPLParserTransform_sendemail.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_sendemail.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_sendemail;
sendemailTransformation
: COMMAND_MODE_SENDEMAIL (t_sendemail_toOptionParameter
| t_sendemail_fromOptionParameter
| t_sendemail_bccOptionParameter
| t_sendemail_ccOptionParameter
| t_sendemail_contentTypeOptionParameter
| t_sendemail_footerOptionParameter
| t_sendemail_formatOptionParameter
| t_sendemail_gracefulParameter
| t_sendemail_inlineOptionParameter
| t_sendemail_maxinputsParameter
| t_sendemail_maxtimeParameter
| t_sendemail_messageOptionParameter
| t_sendemail_paperorientationOptionParameter
| t_sendemail_papersizeOptionParameter
| t_sendemail_pdfviewOptionParameter
| t_sendemail_priorityOptionParameter
| t_sendemail_sendcsvOptionParameter
| t_sendemail_sendpdfOptionParameter
| t_sendemail_sendresultsOptionParameter
| t_sendemail_serverOptionParameter
| t_sendemail_subjectOptionParameter
| t_sendemail_useSslOptionParameter
| t_sendemail_useTlsOptionParameter
| t_sendemail_widthSortColumnsOptionParameter)*?
;
t_sendemail_bccOptionParameter
: COMMAND_SENDEMAIL_MODE_BCC t_sendemail_emailListParameter
;
t_sendemail_ccOptionParameter
: COMMAND_SENDEMAIL_MODE_CC t_sendemail_emailListParameter
;
t_sendemail_contentTypeOptionParameter
: COMMAND_SENDEMAIL_MODE_CONTENT_TYPE (COMMAND_SENDEMAIL_MODE_CONTENT_TYPE_MODE_HTML|COMMAND_SENDEMAIL_MODE_CONTENT_TYPE_MODE_PLAIN)
;
t_sendemail_footerOptionParameter
: COMMAND_SENDEMAIL_MODE_FOOTER stringType
;
t_sendemail_formatOptionParameter
: COMMAND_SENDEMAIL_MODE_FORMAT (COMMAND_SENDEMAIL_MODE_FORMAT_MODE_CSV|COMMAND_SENDEMAIL_MODE_FORMAT_MODE_TABLE|COMMAND_SENDEMAIL_MODE_FORMAT_MODE_RAW)
;
t_sendemail_fromOptionParameter // COMMAND_MODE_SENDEMAIL
: COMMAND_SENDEMAIL_MODE_FROM t_sendemail_emailListParameter
;
t_sendemail_gracefulParameter
: COMMAND_SENDEMAIL_MODE_GRACEFUL booleanType
;
t_sendemail_inlineOptionParameter
: COMMAND_SENDEMAIL_MODE_INLINE booleanType
;
t_sendemail_maxinputsParameter
: COMMAND_SENDEMAIL_MODE_MAXINPUTS integerType
;
t_sendemail_maxtimeParameter
: COMMAND_SENDEMAIL_MODE_MAXTIME timeType
;
t_sendemail_messageOptionParameter
: COMMAND_SENDEMAIL_MODE_MESSAGE stringType
;
t_sendemail_paperorientationOptionParameter
: COMMAND_SENDEMAIL_MODE_PAPERORIENTATION (COMMAND_SENDEMAIL_MODE_PAPERORIENTATION_MODE_PORTRAIT|COMMAND_SENDEMAIL_MODE_PAPERORIENTATION_MODE_LANDSCAPE)
;
t_sendemail_papersizeOptionParameter
: COMMAND_SENDEMAIL_MODE_PAPERSIZE (COMMAND_SENDEMAIL_MODE_PAPERSIZE_MODE_LETTER|COMMAND_SENDEMAIL_MODE_PAPERSIZE_MODE_LEGAL|COMMAND_SENDEMAIL_MODE_PAPERSIZE_MODE_LEDGER|COMMAND_SENDEMAIL_MODE_PAPERSIZE_MODE_A2|COMMAND_SENDEMAIL_MODE_PAPERSIZE_MODE_A3|COMMAND_SENDEMAIL_MODE_PAPERSIZE_MODE_A4|COMMAND_SENDEMAIL_MODE_PAPERSIZE_MODE_A5)
;
t_sendemail_pdfviewOptionParameter
: COMMAND_SENDEMAIL_MODE_PDFVIEW stringType
;
t_sendemail_priorityOptionParameter
: COMMAND_SENDEMAIL_MODE_PRIORITY (COMMAND_SENDEMAIL_MODE_PRIORITY_MODE_HIGHEST|COMMAND_SENDEMAIL_MODE_PRIORITY_MODE_HIGH|COMMAND_SENDEMAIL_MODE_PRIORITY_MODE_NORMAL|COMMAND_SENDEMAIL_MODE_PRIORITY_MODE_LOW|COMMAND_SENDEMAIL_MODE_PRIORITY_MODE_LOWEST)
;
t_sendemail_sendcsvOptionParameter
: COMMAND_SENDEMAIL_MODE_SENDCSV booleanType
;
t_sendemail_sendpdfOptionParameter
: COMMAND_SENDEMAIL_MODE_SENDPDF booleanType
;
t_sendemail_sendresultsOptionParameter
: COMMAND_SENDEMAIL_MODE_SENDRESULTS booleanType
;
t_sendemail_serverOptionParameter
: COMMAND_SENDEMAIL_MODE_SERVER stringType
;
t_sendemail_subjectOptionParameter
: COMMAND_SENDEMAIL_MODE_SUBJECT stringType
;
t_sendemail_toOptionParameter
: COMMAND_SENDEMAIL_MODE_TO t_sendemail_emailListParameter
;
t_sendemail_useSslOptionParameter
: COMMAND_SENDEMAIL_MODE_USE_SSL booleanType
;
t_sendemail_useTlsOptionParameter
: COMMAND_SENDEMAIL_MODE_USE_TLS booleanType
;
t_sendemail_widthSortColumnsOptionParameter
: COMMAND_SENDEMAIL_MODE_WIDTH_SORT_COLUMNS booleanType
;
t_sendemail_emailListParameter
: stringType (COMMA stringType)*?
;
| 6,563 | ANTLR | .g4 | 147 | 38.938776 | 342 | 0.76103 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | ac77261efd15786fedc53e50da5ee5dc1aea12a067d6211474ff58de3d43dafe | false | false | false | false |
440 | COMMAND_HEAD_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_HEAD_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_HEAD_MODE;
COMMAND_HEAD_MODE_ANTLR_BUG: 'command_head_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_HEAD_MODE ++++++++++++++
mode COMMAND_HEAD_MODE;
// skip
COMMAND_HEAD_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_HEAD_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_HEAD_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_HEAD_MODE_PARENTHESIS_L : '(' -> pushMode(EVAL_LANGUAGE_MODE);
COMMAND_HEAD_MODE_PARENTHESIS_R : ')' -> popMode;
COMMAND_HEAD_MODE_KEEPLAST : 'keeplast=' -> pushMode(GET_BOOLEAN);
COMMAND_HEAD_MODE_LIMIT : 'limit=' -> pushMode(GET_INTEGER);
COMMAND_HEAD_MODE_NULL : 'null=' -> pushMode(GET_BOOLEAN);
fragment MINUS: '-';
fragment DIGIT: [0-9]+;
COMMAND_HEAD_MODE_INTEGER: MINUS? DIGIT+;
COMMAND_HEAD_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,907 | ANTLR | .g4 | 65 | 42.892308 | 98 | 0.745146 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | bd2f0500ba0976648e8481f587f28488664060043e9b535ee95b74c024ef864e | false | false | false | false |
441 | COMMAND_COFILTER_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_COFILTER_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_COFILTER_MODE;
COMMAND_COFILTER_MODE_ANTLR_BUG: 'command_cofilter_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_COFILTER_MODE ++++++++++++++
mode COMMAND_COFILTER_MODE;
// skip
COMMAND_COFILTER_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_COFILTER_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_COFILTER_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_COFILTER_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_COFILTER_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_COFILTER_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' // COFILTER
|'\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_COFILTER_MODE_STRING
// one or more characters
: (COMMAND_COFILTER_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_COFILTER_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,259 | ANTLR | .g4 | 158 | 26.443038 | 106 | 0.525074 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | dd939f675b57c33c8f1260f060f4c66cec3c4c7897e185b23468b77c19f6581b | false | false | false | false |
442 | DPLParserTransform_map.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_map.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_map;
mapTransformation
: COMMAND_MODE_MAP ( t_map_searchoptionParameter | stringType ) (t_map_maxsearchesOptParameter)?
;
t_map_maxsearchesOptParameter
: COMMAND_MAP_MODE_MAXSEARCHES integerType
;
t_map_searchoptionParameter
: COMMAND_MAP_MODE_SEARCH stringType
;
| 2,371 | ANTLR | .g4 | 55 | 40.327273 | 104 | 0.767532 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 42dbf4658b9cf564ee27a801eb9a041ce451dc830e89c22493d610e8259dfc41 | false | false | false | false |
443 | DPLParserTransform_loadjob.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_loadjob.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_loadjob;
loadjobTransformation
: COMMAND_MODE_LOADJOB (stringType|t_loadjob_savedsearchParameter) (t_loadjob_resultEventOptParameter)? (t_loadjob_delegateOptParameter)? (t_loadjob_artifactOffsetOptParameter)? (t_loadjob_ignoreRunningOptParameter)?
;
t_loadjob_artifactOffsetOptParameter
: COMMAND_LOADJOB_MODE_ARTIFACT_OFFSET integerType
;
t_loadjob_delegateOptParameter
: COMMAND_LOADJOB_MODE_JOB_DELEGATE stringType
;
t_loadjob_ignoreRunningOptParameter
: COMMAND_LOADJOB_MODE_IGNORE_RUNNING booleanType
;
t_loadjob_resultEventOptParameter
: COMMAND_LOADJOB_MODE_EVENTS booleanType
;
t_loadjob_savedsearchParameter
: COMMAND_LOADJOB_MODE_SAVEDSEARCH stringType
;
| 2,826 | ANTLR | .g4 | 64 | 40.78125 | 224 | 0.771273 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | f9e3d70acfa42b6125f261ae71e639e7e0bd0b4039e47f3f3a51b19a4bffccfb | false | false | false | false |
444 | COMMAND_GAUGE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_GAUGE_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_GAUGE_MODE;
COMMAND_GAUGE_MODE_ANTLR_BUG: 'command_gauge_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_GAUGE_MODE ++++++++++++++
mode COMMAND_GAUGE_MODE;
// skip
COMMAND_GAUGE_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_GAUGE_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_GAUGE_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_GAUGE_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_GAUGE_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_GAUGE_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' // GAUGE
|'\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_GAUGE_MODE_STRING
// one or more characters
: (COMMAND_GAUGE_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_GAUGE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,216 | ANTLR | .g4 | 158 | 26.170886 | 104 | 0.520627 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 94bd41e68adb39550acf534351b223012359794ae6a37be1d7412f009b4f4a36 | false | false | false | false |
445 | COMMAND_TRANSPOSE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TRANSPOSE_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_TRANSPOSE_MODE;
COMMAND_TRANSPOSE_MODE_ANTLR_BUG: 'command_transpose_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TRANSPOSE_MODE ++++++++++++++
mode COMMAND_TRANSPOSE_MODE;
// skip
COMMAND_TRANSPOSE_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TRANSPOSE_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TRANSPOSE_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
fragment MINUS: '-';
fragment DIGIT: [0-9]+;
COMMAND_TRANSPOSE_MODE_INTEGER: MINUS? DIGIT+ ;
COMMAND_TRANSPOSE_MODE_INCLUDE_EMPTY : 'include_empty=' -> pushMode(GET_BOOLEAN);
COMMAND_TRANSPOSE_MODE_HEADER_FIELD : 'header_field=' -> pushMode(GET_FIELD);
COMMAND_TRANSPOSE_MODE_COLUMN_NAME : 'column_name=' -> pushMode(GET_STRING);
COMMAND_TRANSPOSE_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_TRANSPOSE_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_TRANSPOSE_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' // TRANSPOSE
|'\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_TRANSPOSE_MODE_STRING
// one or more characters
: (COMMAND_TRANSPOSE_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_TRANSPOSE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,614 | ANTLR | .g4 | 164 | 27.591463 | 107 | 0.538844 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | e112636e3bd9a4a4c0eb6f19c67452a0fff6183e5009a04384ccb93873acf941 | false | false | false | false |
446 | COMMAND_EVENTSTATS_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_EVENTSTATS_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_EVENTSTATS_MODE;
COMMAND_EVENTSTATS_MODE_ANTLR_BUG: 'command_eventstats_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_EVENTSTATS_MODE ++++++++++++++
mode COMMAND_EVENTSTATS_MODE;
// skip
COMMAND_EVENTSTATS_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_EVENTSTATS_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_EVENTSTATS_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_EVENTSTATS_MODE_ALLNUM : 'allnum=' -> pushMode(GET_BOOLEAN);
COMMAND_EVENTSTATS_MODE_COMMA : ',' -> type(COMMA);
COMMAND_EVENTSTATS_MODE_BY : ('BY'|'by'|'By');
COMMAND_EVENTSTATS_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_EVENTSTATS_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_EVENTSTATS_MODE_AS: ('AS'|'as'|'By');
COMMAND_EVENTSTATS_MODE_INT: DIGIT;
fragment DIGIT: [0-99];
// aggregateMethod
COMMAND_EVENTSTATS_MODE_COUNT: 'count' -> type(METHOD_AGGREGATE_COUNT);
COMMAND_EVENTSTATS_MODE_AVG_PARENTHESIS_R: 'avg(' -> type(METHOD_AGGREGATE_AVG), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_MEAN_PARENTHESIS_R: 'mean(' -> type(METHOD_AGGREGATE_MEAN), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_C_PARENTHESIS_R: 'c(' -> type(METHOD_AGGREGATE_C), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_COUNT_PARENTHESIS_R: 'count(' -> type(METHOD_AGGREGATE_COUNT_B), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_DC_PARENTHESIS_R: 'dc(' -> type(METHOD_AGGREGATE_DC), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_DISTINCT_COUNT_PARENTHESIS_R: 'distinct_count(' -> type(METHOD_AGGREGATE_DISTINCT_COUNT), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_EARLIEST_PARENTHESIS_R: 'earliest(' -> type(METHOD_AGGREGATE_EARLIEST), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_EARLIEST_TIME_PARENTHESIS_R: 'earliest_time(' -> type(METHOD_AGGREGATE_EARLIEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_ESTDC_PARENTHESIS_R: 'estdc(' -> type(METHOD_AGGREGATE_ESTDC), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_ESTDC_ERROR_PARENTHESIS_R: 'estdc_error(' -> type(METHOD_AGGREGATE_ESTDC_ERROR), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_FIRST_PARENTHESIS_R: 'first(' -> type(METHOD_AGGREGATE_FIRST), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_LAST_PARENTHESIS_R: 'last(' -> type(METHOD_AGGREGATE_LAST), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_LATEST_PARENTHESIS_R: 'latest(' -> type(METHOD_AGGREGATE_LATEST), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_LATEST_TIME_PARENTHESIS_R: 'latest_time(' -> type(METHOD_AGGREGATE_LATEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_LIST_PARENTHESIS_R: 'list(' -> type(METHOD_AGGREGATE_LIST), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_MAX_PARENTHESIS_R: 'max(' -> type(METHOD_AGGREGATE_MAX), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_MEDIAN_PARENTHESIS_R: 'median(' -> type(METHOD_AGGREGATE_MEDIAN), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_MIN_PARENTHESIS_R: 'min(' -> type(METHOD_AGGREGATE_MIN), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_MODE_PARENTHESIS_R: 'mode(' -> type(METHOD_AGGREGATE_MODE), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_P_PARENTHESIS_R: 'p(' -> type(METHOD_AGGREGATE_P), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_PERC_PARENTHESIS_R: 'perc(' -> type(METHOD_AGGREGATE_PERC), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_EXACTPERC_PARENTHESIS_R: 'exactperc(' -> type(METHOD_AGGREGATE_EXACTPERC), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_UPPERPERC_PARENTHESIS_R: 'upperperc(' -> type(METHOD_AGGREGATE_UPPERPERC), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_PERCINT_PARENTHESIS_R: 'percint(' -> type(METHOD_AGGREGATE_PERCINT), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_RANGE_PARENTHESIS_R: 'range(' -> type(METHOD_AGGREGATE_RANGE), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_RATE_PARENTHESIS_R: 'rate(' -> type(METHOD_AGGREGATE_RATE), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_STDEV_PARENTHESIS_R: 'stdev(' -> type(METHOD_AGGREGATE_STDEV), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_STDEVP_PARENTHESIS_R: 'stdevp(' -> type(METHOD_AGGREGATE_STDEVP), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_SUM_PARENTHESIS_R: 'sum(' -> type(METHOD_AGGREGATE_SUM), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_SUMSQ_PARENTHESIS_R: 'sumsq(' -> type(METHOD_AGGREGATE_SUMSQ), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_VALUES_PARENTHESIS_R: 'values(' -> type(METHOD_AGGREGATE_VALUES), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_VAR_PARENTHESIS_R: 'var(' -> type(METHOD_AGGREGATE_VAR), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_VARP_PARENTHESIS_R: 'varp(' -> type(METHOD_AGGREGATE_VARP), pushMode(AGGREGATION_MODE);
//special percX()
COMMAND_EVENTSTATS_MODE_P_VARIABLE: 'p'COMMAND_EVENTSTATS_MODE_INT -> type(METHOD_AGGREGATE_P_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_PERC_VARIABLE: 'perc'COMMAND_EVENTSTATS_MODE_INT -> type(METHOD_AGGREGATE_PERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_EXACTPERC_VARIABLE: 'exactperc'COMMAND_EVENTSTATS_MODE_INT -> type(METHOD_AGGREGATE_EXACTPERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_EVENTSTATS_MODE_UPPERPERC_VARIABLE: 'upperperc'COMMAND_EVENTSTATS_MODE_INT -> type(METHOD_AGGREGATE_UPPERPERC_VARIABLE), pushMode(AGGREGATION_MODE);
// characters for string
fragment COMMAND_EVENTSTATS_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' // EVENTSTATS
|'\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_EVENTSTATS_MODE_STRING
// one or more characters
: (COMMAND_EVENTSTATS_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_EVENTSTATS_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 10,122 | ANTLR | .g4 | 204 | 44.083333 | 156 | 0.65303 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | dbb9e322714b0911a4f72253d8083fb23847269fe31383794b8ac1fe20820c90 | false | false | false | false |
447 | COMMAND_SITIMECHART_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_SITIMECHART_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_SITIMECHART_MODE;
COMMAND_SITIMECHART_MODE_ANTLR_BUG: 'command_sitimechart_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_SITIMECHART_MODE ++++++++++++++
mode COMMAND_SITIMECHART_MODE;
// skip
COMMAND_SITIMECHART_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_SITIMECHART_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_SITIMECHART_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_SITIMECHART_MODE_SEP : 'sep=' -> pushMode(GET_STRING);
COMMAND_SITIMECHART_MODE_PARTIAL : 'partial=' -> pushMode(GET_BOOLEAN);
COMMAND_SITIMECHART_MODE_CONT : 'cont=' -> pushMode(GET_BOOLEAN);
COMMAND_SITIMECHART_MODE_LIMIT : 'limit=' -> pushMode(GET_INTEGER);
COMMAND_SITIMECHART_MODE_AGG : 'agg=';
COMMAND_SITIMECHART_MODE_WHERE: ('where'|'WHERE');
COMMAND_SITIMECHART_MODE_EVAL_PARENTHESIS_L: 'eval(' -> pushMode(EVAL_LANGUAGE_MODE);
COMMAND_SITIMECHART_MODE_PARENTHESIS_R : ')' -> popMode;
COMMAND_SITIMECHART_MODE_PARENTHESIS_L : '(';
COMMAND_SITIMECHART_MODE_FIXEDRANGE : 'fixedrange=' -> pushMode(GET_BOOLEAN);
COMMAND_SITIMECHART_MODE_ALIGNTIME : 'aligntime=' -> pushMode(GET_TIME);
//tc options
COMMAND_SITIMECHART_MODE_USENULL : 'usenull=' -> pushMode(GET_BOOLEAN);
COMMAND_SITIMECHART_MODE_OTHER : 'useother=' -> pushMode(GET_BOOLEAN);
COMMAND_SITIMECHART_MODE_NULLSTR : 'nullstr=' -> pushMode(GET_STRING);
COMMAND_SITIMECHART_MODE_OTHERSTR : 'otherstr=' -> pushMode(GET_STRING);
COMMAND_SITIMECHART_MODE_MINSPAN : 'minspan' -> pushMode(GET_SPAN);
COMMAND_SITIMECHART_MODE_START : 'start=' -> pushMode(GET_NUMBER);
COMMAND_SITIMECHART_MODE_NOTIN : 'notin';
COMMAND_SITIMECHART_MODE_SPAN : 'span=' -> pushMode(GET_SPAN);
COMMAND_SITIMECHART_MODE_BINS : 'bins=' -> pushMode(GET_INTEGER);
COMMAND_SITIMECHART_MODE_OVER : ('OVER'|'over');
COMMAND_SITIMECHART_MODE_END : 'end=' -> pushMode(GET_NUMBER);
COMMAND_SITIMECHART_MODE_EQ : '=';
COMMAND_SITIMECHART_MODE_GT : '>' -> pushMode(GET_NUMBER);
COMMAND_SITIMECHART_MODE_LT : '<' -> pushMode(GET_NUMBER);
COMMAND_SITIMECHART_MODE_BY : ('BY'|'by'|'By') -> pushMode(GET_FIELD);
COMMAND_SITIMECHART_MODE_BOTTOM : 'bottom';
COMMAND_SITIMECHART_MODE_TOP : 'top';
COMMAND_SITIMECHART_MODE_Or : 'OR';
COMMAND_SITIMECHART_MODE_And : 'AND';
COMMAND_SITIMECHART_MODE_Xor : 'XOR';
COMMAND_SITIMECHART_MODE_DOT: '.';
COMMAND_SITIMECHART_MODE_MINUS: '-';
COMMAND_SITIMECHART_MODE_PLUS: '+';
COMMAND_SITIMECHART_MODE_AS: ('AS'|'as'|'As') -> pushMode(GET_FIELD);
COMMAND_SITIMECHART_MODE_INT: DIGIT;
fragment DIGIT: [0-99];
// aggregateMethod
COMMAND_SITIMECHART_MODE_COUNT_C: 'c' -> type(METHOD_AGGREGATE_COUNT_C);
COMMAND_SITIMECHART_MODE_COUNT: 'count' -> type(METHOD_AGGREGATE_COUNT);
COMMAND_SITIMECHART_MODE_AVG_PARENTHESIS_R: 'avg(' -> type(METHOD_AGGREGATE_AVG), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_MEAN_PARENTHESIS_R: 'mean(' -> type(METHOD_AGGREGATE_MEAN), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_C_PARENTHESIS_R: 'c(' -> type(METHOD_AGGREGATE_C), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_COUNT_PARENTHESIS_R: 'count(' -> type(METHOD_AGGREGATE_COUNT_B), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_DC_PARENTHESIS_R: 'dc(' -> type(METHOD_AGGREGATE_DC), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_DISTINCT_COUNT_PARENTHESIS_R: 'distinct_count(' -> type(METHOD_AGGREGATE_DISTINCT_COUNT), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_EARLIEST_PARENTHESIS_R: 'earliest(' -> type(METHOD_AGGREGATE_EARLIEST), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_EARLIEST_TIME_PARENTHESIS_R: 'earliest_time(' -> type(METHOD_AGGREGATE_EARLIEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_ESTDC_PARENTHESIS_R: 'estdc(' -> type(METHOD_AGGREGATE_ESTDC), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_ESTDC_ERROR_PARENTHESIS_R: 'estdc_error(' -> type(METHOD_AGGREGATE_ESTDC_ERROR), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_FIRST_PARENTHESIS_R: 'first(' -> type(METHOD_AGGREGATE_FIRST), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_LAST_PARENTHESIS_R: 'last(' -> type(METHOD_AGGREGATE_LAST), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_LATEST_PARENTHESIS_R: 'latest(' -> type(METHOD_AGGREGATE_LATEST), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_LATEST_TIME_PARENTHESIS_R: 'latest_time(' -> type(METHOD_AGGREGATE_LATEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_LIST_PARENTHESIS_R: 'list(' -> type(METHOD_AGGREGATE_LIST), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_MAX_PARENTHESIS_R: 'max(' -> type(METHOD_AGGREGATE_MAX), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_MEDIAN_PARENTHESIS_R: 'median(' -> type(METHOD_AGGREGATE_MEDIAN), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_MIN_PARENTHESIS_R: 'min(' -> type(METHOD_AGGREGATE_MIN), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_MODE_PARENTHESIS_R: 'mode(' -> type(METHOD_AGGREGATE_MODE), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_P_PARENTHESIS_R: 'p(' -> type(METHOD_AGGREGATE_P), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_PERC_PARENTHESIS_R: 'perc(' -> type(METHOD_AGGREGATE_PERC), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_EXACTPERC_PARENTHESIS_R: 'exactperc(' -> type(METHOD_AGGREGATE_EXACTPERC), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_UPPERPERC_PARENTHESIS_R: 'upperperc(' -> type(METHOD_AGGREGATE_UPPERPERC), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_PERCINT_PARENTHESIS_R: 'percint(' -> type(METHOD_AGGREGATE_PERCINT), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_RANGE_PARENTHESIS_R: 'range(' -> type(METHOD_AGGREGATE_RANGE), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_RATE_PARENTHESIS_R: 'rate(' -> type(METHOD_AGGREGATE_RATE), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_STDEV_PARENTHESIS_R: 'stdev(' -> type(METHOD_AGGREGATE_STDEV), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_STDEVP_PARENTHESIS_R: 'stdevp(' -> type(METHOD_AGGREGATE_STDEVP), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_SUM_PARENTHESIS_R: 'sum(' -> type(METHOD_AGGREGATE_SUM), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_SUMSQ_PARENTHESIS_R: 'sumsq(' -> type(METHOD_AGGREGATE_SUMSQ), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_VALUES_PARENTHESIS_R: 'values(' -> type(METHOD_AGGREGATE_VALUES), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_VAR_PARENTHESIS_R: 'var(' -> type(METHOD_AGGREGATE_VAR), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_VARP_PARENTHESIS_R: 'varp(' -> type(METHOD_AGGREGATE_VARP), pushMode(AGGREGATION_MODE);
//special percX()
COMMAND_SITIMECHART_MODE_P_VARIABLE: 'p'COMMAND_SITIMECHART_MODE_INT -> type(METHOD_AGGREGATE_P_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_PERC_VARIABLE: 'perc'COMMAND_SITIMECHART_MODE_INT -> type(METHOD_AGGREGATE_PERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_EXACTPERC_VARIABLE: 'exactperc'COMMAND_SITIMECHART_MODE_INT -> type(METHOD_AGGREGATE_EXACTPERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_UPPERPERC_VARIABLE: 'upperperc'COMMAND_SITIMECHART_MODE_INT -> type(METHOD_AGGREGATE_UPPERPERC_VARIABLE), pushMode(AGGREGATION_MODE);
//special agg time
COMMAND_SITIMECHART_MODE_PER_SECOND: 'per_second(' -> type(METHOD_AGGREGATE_PER_SECOND), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_PER_MINUTE: 'per_minute(' -> type(METHOD_AGGREGATE_PER_MINUTE), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_PER_HOUR: 'per_hour(' -> type(METHOD_AGGREGATE_PER_HOUR), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_PER_DAY: 'per_day(' -> type(METHOD_AGGREGATE_PER_DAY), pushMode(AGGREGATION_MODE);
COMMAND_SITIMECHART_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_SITIMECHART_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_SITIMECHART_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' // SITIMECHART
|'\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_SITIMECHART_MODE_STRING
// one or more characters
: (COMMAND_SITIMECHART_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_SITIMECHART_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
// exit
COMMAND_SITIMECHART_SPACE: SPACE -> channel(HIDDEN), popMode;
| 12,613 | ANTLR | .g4 | 244 | 46.889344 | 158 | 0.674117 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 051128da7e2194881dfe7b9bf48f29590bb47698b684f1061fe878a15d2a875c | false | false | false | false |
448 | COMMAND_CONVERT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_CONVERT_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_CONVERT_MODE;
COMMAND_CONVERT_MODE_ANTLR_BUG: 'command_convert_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_CONVERT_MODE ++++++++++++++
mode COMMAND_CONVERT_MODE;
// http://antlr.1301665.n2.nabble.com/Reuse-of-same-token-in-multiple-lexer-modes-td7578956.html
// skip
COMMAND_CONVERT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_CONVERT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_CONVERT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
//tokens
COMMAND_CONVERT_MODE_AUTO: 'auto';
COMMAND_CONVERT_MODE_CTIME: 'ctime';
COMMAND_CONVERT_MODE_DUR2SEC: 'dur2sec';
COMMAND_CONVERT_MODE_MEMK: 'memk';
COMMAND_CONVERT_MODE_MKTIME: 'mktime';
COMMAND_CONVERT_MODE_MSTIME: 'mstime';
COMMAND_CONVERT_MODE_NONE: 'none';
COMMAND_CONVERT_MODE_NUM: 'num';
COMMAND_CONVERT_MODE_RMCOMMA: 'rmcomma';
COMMAND_CONVERT_MODE_RMUNIT: 'rmunit';
COMMAND_CONVERT_MODE_PARENTHESIS_L : '(';
COMMAND_CONVERT_MODE_PARENTHESIS_R : ')';
COMMAND_CONVERT_MODE_TIMEFORMAT : 'timeformat=' -> pushMode(GET_STRING);
COMMAND_CONVERT_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_CONVERT_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_CONVERT_MODE_AS: ('AS'|'as'|'As');
// characters for string
fragment COMMAND_CONVERT_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' // CONVERT
|'\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_CONVERT_MODE_STRING
// one or more characters
: (COMMAND_CONVERT_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_CONVERT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,923 | ANTLR | .g4 | 173 | 27.884393 | 105 | 0.550689 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 2d4a00e479e973c1b2f9fcadb4c9324fb0a66564780d7811536bc7612dbfcb28 | false | false | false | false |
449 | DPLParserTransform_regex.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_regex.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_regex;
regexTransformation
: COMMAND_MODE_REGEX ((fieldType(COMMAND_REGEX_MODE_NEQ)regexStringType)?|(fieldType(COMMAND_REGEX_MODE_EQ)regexStringType)?|(regexStringType))
;
| 2,244 | ANTLR | .g4 | 49 | 43.530612 | 151 | 0.774738 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 402f4ccfc75803bdb2faf2d9acc75bfc0fc520538c349bdef7edb60f4045772b | false | false | false | false |
450 | COMMAND_OUTLIER_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_OUTLIER_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_OUTLIER_MODE;
COMMAND_OUTLIER_MODE_ANTLR_BUG: 'command_outlier_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_OUTLIER_MODE ++++++++++++++
mode COMMAND_OUTLIER_MODE;
// skip
COMMAND_OUTLIER_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_OUTLIER_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_OUTLIER_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_OUTLIER_MODE_USELOWER : 'uselower=' -> pushMode(GET_BOOLEAN);
COMMAND_OUTLIER_MODE_ACTION : 'action=' -> pushMode(COMMAND_OUTLIER_ACTION_MODE);
COMMAND_OUTLIER_MODE_PARAM : 'param=' -> pushMode(GET_NUMBER);
COMMAND_OUTLIER_MODE_COMMA : ',' -> type(COMMA);
COMMAND_OUTLIER_MODE_MARK : 'mark=' -> pushMode(GET_BOOLEAN);
COMMAND_OUTLIER_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_OUTLIER_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_OUTLIER_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' // OUTLIER
|'\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_OUTLIER_MODE_STRING
// one or more characters
: (COMMAND_OUTLIER_MODE_CHAR)+ -> type(GET_FIELD_STRING);
mode COMMAND_OUTLIER_ACTION_MODE ;
COMMAND_OUTLIER_ACTION_MODE_REMOVE : ('remove'|'rm') -> popMode;
COMMAND_OUTLIER_ACTION_MODE_TRANSFORM : ('transform'|'tf') -> popMode ;
COMMAND_OUTLIER_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,757 | ANTLR | .g4 | 166 | 28.096386 | 105 | 0.541016 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | f3653841676337231da372d4b9df571a8d89f3377fd2e53fbe43e11afcb4d806 | false | false | false | false |
451 | DPLParserTransform_fieldsummary.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_fieldsummary.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_fieldsummary;
fieldsummaryTransformation
: COMMAND_MODE_FIELDSUMMARY (t_fieldsummary_maxvalsParameter)? fieldListType
;
t_fieldsummary_maxvalsParameter
: COMMAND_FIELDSUMMARY_MODE_MAXVALS integerType
;
| 2,290 | ANTLR | .g4 | 52 | 41.519231 | 98 | 0.774944 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 7d886c4317470275dfb84c6b3f19c8c0f0b0163658c344f2eaf4c94325066552 | false | false | false | false |
452 | COMMAND_RELEVANCY_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_RELEVANCY_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_RELEVANCY_MODE;
COMMAND_RELEVANCY_MODE_ANTLR_BUG: 'command_relevancy_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_RELEVANCY_MODE ++++++++++++++
mode COMMAND_RELEVANCY_MODE;
// skip
COMMAND_RELEVANCY_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_RELEVANCY_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_RELEVANCY_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_RELEVANCY_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,553 | ANTLR | .g4 | 57 | 42.894737 | 98 | 0.75452 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 2e1e3ecc14bf7b38b1509c0570be605c4efe4b25b31654e7deb29d34c9bddcfa | false | false | false | false |
453 | DPLParserTransform_mvexpand.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_mvexpand.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_mvexpand;
mvexpandTransformation
: COMMAND_MODE_MVEXPAND fieldType (t_mvexpand_limitParameter)?
;
t_mvexpand_limitParameter
: COMMAND_MVEXPAND_MODE_LIMIT integerType
;
| 2,257 | ANTLR | .g4 | 52 | 40.865385 | 98 | 0.771468 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 45f1bc9bffe0c11d552d7c283ba29984b2a0258943f216fd141359246708370f | false | false | false | false |
454 | DPLParserTransform_anomalies.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_anomalies.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_anomalies;
anomaliesTransformation
: COMMAND_MODE_ANOMALIES (t_anomalies_thresholdParameter|t_anomalies_labelonlyParameter|t_anomalies_normalizeParameter|t_anomalies_maxvaluesParameter|t_anomalies_fieldParameter|t_anomalies_denylistParameter|t_anomalies_denyklistthresholdParameter)* (t_anomalies_byInstruction)?
;
t_anomalies_denylistParameter
: COMMAND_ANOMALIES_MODE_DENYLIST stringType
;
t_anomalies_denyklistthresholdParameter
: COMMAND_ANOMALIES_MODE_DENYLISTTHRESHOLD numberType
;
t_anomalies_fieldParameter
: COMMAND_ANOMALIES_MODE_FIELD fieldType
;
t_anomalies_labelonlyParameter
: COMMAND_ANOMALIES_MODE_LABELONLY booleanType
;
t_anomalies_maxvaluesParameter
: COMMAND_ANOMALIES_MODE_MAXVALUES numberType
;
t_anomalies_normalizeParameter
: COMMAND_ANOMALIES_MODE_NORMALIZE booleanType
;
t_anomalies_thresholdParameter
: COMMAND_ANOMALIES_MODE_THRESHOLD numberType
;
t_anomalies_byInstruction
: (COMMAND_ANOMALIES_MODE_BY) fieldListType
;
| 3,165 | ANTLR | .g4 | 73 | 39.506849 | 285 | 0.771159 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 7a0c1e6c284697b838944e2aff4aadb35c8be6c0a49772f2a25697deb42b2ccc | false | false | false | false |
455 | COMMAND_GEOSTATS_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_GEOSTATS_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_GEOSTATS_MODE;
COMMAND_GEOSTATS_MODE_ANTLR_BUG: 'command_geostats_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_GEOSTATS_MODE ++++++++++++++
mode COMMAND_GEOSTATS_MODE;
// skip
COMMAND_GEOSTATS_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_GEOSTATS_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_GEOSTATS_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_GEOSTATS_MODE_PARENTHESIS_L: '(';
COMMAND_GEOSTATS_MODE_PARENTHESIS_R: ')';
COMMAND_GEOSTATS_MODE_OUTPUTLONGFIELD : 'outputlongfield=' -> pushMode(GET_STRING);
COMMAND_GEOSTATS_MODE_OUTPUTLATFIELD : 'outputlatfield=' -> pushMode(GET_STRING);
COMMAND_GEOSTATS_MODE_TRANSLATETOXY : 'translatetoxy=' -> pushMode(GET_BOOLEAN);
COMMAND_GEOSTATS_MODE_MAXZOOMLEVEL : 'maxzoomlevel=' -> pushMode(GET_INTEGER);
COMMAND_GEOSTATS_MODE_GLOBALLIMIT : 'globallimit=' -> pushMode(GET_INTEGER);
COMMAND_GEOSTATS_MODE_BINSPANLONG : 'binspanlong=' -> pushMode(GET_NUMBER);
COMMAND_GEOSTATS_MODE_LOCALLIMIT : 'locallimit=' -> pushMode(GET_INTEGER);
COMMAND_GEOSTATS_MODE_BINSPANLAT : 'binspanlat=' -> pushMode(GET_NUMBER);
COMMAND_GEOSTATS_MODE_LONGFIELD : 'longfield=' -> pushMode(GET_STRING);
COMMAND_GEOSTATS_MODE_LATFIELD : 'latfield=' -> pushMode(GET_STRING);
COMMAND_GEOSTATS_MODE_BY : ('BY'|'by'|'By');
COMMAND_GEOSTATS_MODE_AS : ('AS'|'as'|'As');
COMMAND_GEOSTATS_MODE_INT: DIGIT;
fragment DIGIT: [0-99];
// aggregateMethod GEOSTATS
COMMAND_GEOSTATS_MODE_COUNT : 'count' -> type(METHOD_AGGREGATE_COUNT);
COMMAND_GEOSTATS_MODE_EVAL_PARENTHESIS_R: 'eval(' -> pushMode(EVAL_LANGUAGE_MODE);
COMMAND_GEOSTATS_MODE_AVG_PARENTHESIS_R: 'avg(' -> type(METHOD_AGGREGATE_AVG), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_MEAN_PARENTHESIS_R: 'mean(' -> type(METHOD_AGGREGATE_MEAN), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_C_PARENTHESIS_R: 'c(' -> type(METHOD_AGGREGATE_C), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_COUNT_PARENTHESIS_R: 'count(' -> type(METHOD_AGGREGATE_COUNT_B), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_DC_PARENTHESIS_R: 'dc(' -> type(METHOD_AGGREGATE_DC), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_DISTINCT_COUNT_PARENTHESIS_R: 'distinct_count(' -> type(METHOD_AGGREGATE_DISTINCT_COUNT), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_EARLIEST_PARENTHESIS_R: 'earliest(' -> type(METHOD_AGGREGATE_EARLIEST), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_EARLIEST_TIME_PARENTHESIS_R: 'earliest_time(' -> type(METHOD_AGGREGATE_EARLIEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_ESTDC_PARENTHESIS_R: 'estdc(' -> type(METHOD_AGGREGATE_ESTDC), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_ESTDC_ERROR_PARENTHESIS_R: 'estdc_error(' -> type(METHOD_AGGREGATE_ESTDC_ERROR), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_FIRST_PARENTHESIS_R: 'first(' -> type(METHOD_AGGREGATE_FIRST), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_LAST_PARENTHESIS_R: 'last(' -> type(METHOD_AGGREGATE_LAST), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_LATEST_PARENTHESIS_R: 'latest(' -> type(METHOD_AGGREGATE_LATEST), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_LATEST_TIME_PARENTHESIS_R: 'latest_time(' -> type(METHOD_AGGREGATE_LATEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_LIST_PARENTHESIS_R: 'list(' -> type(METHOD_AGGREGATE_LIST), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_MAX_PARENTHESIS_R: 'max(' -> type(METHOD_AGGREGATE_MAX), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_MEDIAN_PARENTHESIS_R: 'median(' -> type(METHOD_AGGREGATE_MEDIAN), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_MIN_PARENTHESIS_R: 'min(' -> type(METHOD_AGGREGATE_MIN), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_MODE_PARENTHESIS_R: 'mode(' -> type(METHOD_AGGREGATE_MODE), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_P_PARENTHESIS_R: 'p(' -> type(METHOD_AGGREGATE_P), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_PERC_PARENTHESIS_R: 'perc(' -> type(METHOD_AGGREGATE_PERC), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_EXACTPERC_PARENTHESIS_R: 'exactperc(' -> type(METHOD_AGGREGATE_EXACTPERC), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_UPPERPERC_PARENTHESIS_R: 'upperperc(' -> type(METHOD_AGGREGATE_UPPERPERC), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_PERCINT_PARENTHESIS_R: 'percint(' -> type(METHOD_AGGREGATE_PERCINT), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_RANGE_PARENTHESIS_R: 'range(' -> type(METHOD_AGGREGATE_RANGE), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_RATE_PARENTHESIS_R: 'rate(' -> type(METHOD_AGGREGATE_RATE), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_STDEV_PARENTHESIS_R: 'stdev(' -> type(METHOD_AGGREGATE_STDEV), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_STDEVP_PARENTHESIS_R: 'stdevp(' -> type(METHOD_AGGREGATE_STDEVP), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_SUM_PARENTHESIS_R: 'sum(' -> type(METHOD_AGGREGATE_SUM), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_SUMSQ_PARENTHESIS_R: 'sumsq(' -> type(METHOD_AGGREGATE_SUMSQ), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_VALUES_PARENTHESIS_R: 'values(' -> type(METHOD_AGGREGATE_VALUES), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_VAR_PARENTHESIS_R: 'var(' -> type(METHOD_AGGREGATE_VAR), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_VARP_PARENTHESIS_R: 'varp(' -> type(METHOD_AGGREGATE_VARP), pushMode(AGGREGATION_MODE);
//special percX()
COMMAND_GEOSTATS_MODE_P_VARIABLE: 'p'COMMAND_GEOSTATS_MODE_INT -> type(METHOD_AGGREGATE_P_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_PERC_VARIABLE: 'perc'COMMAND_GEOSTATS_MODE_INT -> type(METHOD_AGGREGATE_PERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_EXACTPERC_VARIABLE: 'exactperc'COMMAND_GEOSTATS_MODE_INT -> type(METHOD_AGGREGATE_EXACTPERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_UPPERPERC_VARIABLE: 'upperperc'COMMAND_GEOSTATS_MODE_INT -> type(METHOD_AGGREGATE_UPPERPERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_GEOSTATS_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_GEOSTATS_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_GEOSTATS_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' // GEOSTATS
|'\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_GEOSTATS_MODE_STRING
// one or more characters
: (COMMAND_GEOSTATS_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_GEOSTATS_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 10,823 | ANTLR | .g4 | 215 | 45.07907 | 152 | 0.658804 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 6fe7e052604815f839c6c242d719285fcb6acfad5071d6da83e4a1eb5e06717e | false | false | false | false |
456 | EVAL_LANGUAGE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/EVAL_LANGUAGE_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 EVAL_LANGUAGE_MODE;
EVAL_LANGUAGE_MODE_ANTLR_BUG: 'eval_language_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ EVAL_LANGUAGE_MODE ++++++++++++++
mode EVAL_LANGUAGE_MODE;
// http://antlr.1301665.n2.nabble.com/Reuse-of-same-token-in-multiple-lexer-modes-td7578956.html
// there are three modes for | eval field=<eval>+<eval>(, field2=<eval>)
// COMMAND_EVAL_MODE for recursing <eval>
// COMMAND_EVAL_SUBMODE_BASE for <eval>+<eval> which is the same as COMMAND_EVAL_MODE but pushes to COMMAND_EVAL_SUBMODE_FIELD on ','.
// This mode differs from COMMAND_EVAL_MODE as it uses comma for pushing a new mode, and therefore does not allow field=1,2
// but as it pushes new eval modes on ( and pops with ), pow(2,2)
// COMMAND_EVAL_SUBMODE_FIELD which matches fields (field, field2) and is popped on =
// comments
EVAL_LANGUAGE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
// skip
EVAL_LANGUAGE_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
EVAL_LANGUAGE_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_WHERE_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
EVAL_LANGUAGE_MODE_SPACE_MODE: SPACE -> channel(HIDDEN);
EVAL_LANGUAGE_MODE_PARENTHESIS_L: '(' -> pushMode(EVAL_LANGUAGE_MODE);
EVAL_LANGUAGE_MODE_PARENTHESIS_R: ')' -> popMode;
EVAL_LANGUAGE_MODE_PARENTHESIS_R_Q: '")"' -> popMode;
EVAL_LANGUAGE_MODE_COMMA: ',';
EVAL_LANGUAGE_MODE_DEQ: DEQ;
EVAL_LANGUAGE_MODE_EQ: EQ;
EVAL_LANGUAGE_MODE_EQUALITY: EQ EQ;
EVAL_LANGUAGE_MODE_NEQ: '!=';
EVAL_LANGUAGE_MODE_LT: LT;
EVAL_LANGUAGE_MODE_LTE: LTE;
EVAL_LANGUAGE_MODE_GT: GT;
EVAL_LANGUAGE_MODE_GTE: GTE;
fragment EVAL_LANGUAGE_MODE_DIGIT: [0-9];
EVAL_LANGUAGE_MODE_INTEGER: (EVAL_LANGUAGE_MODE_MINUS)? EVAL_LANGUAGE_MODE_DIGIT+;
EVAL_LANGUAGE_MODE_DECIMAL: (EVAL_LANGUAGE_MODE_MINUS)? [0-9]+ EVAL_LANGUAGE_MODE_DOT [0-9]+;
EVAL_LANGUAGE_MODE_DOT: '.';
EVAL_LANGUAGE_MODE_AND: ('AND' | 'and');
EVAL_LANGUAGE_MODE_OR: ('OR' | 'or');
EVAL_LANGUAGE_MODE_XOR: ('XOR' | 'xor');
EVAL_LANGUAGE_MODE_WILDCARD: WILDCARD;
EVAL_LANGUAGE_MODE_PLUS: PLUS;
EVAL_LANGUAGE_MODE_MINUS: MINUS;
EVAL_LANGUAGE_MODE_SLASH: SLASH;
EVAL_LANGUAGE_MODE_Like: 'LIKE';
EVAL_LANGUAGE_MODE_PERCENT: '%';
EVAL_LANGUAGE_MODE_EXCLAMATION: '!';
EVAL_LANGUAGE_MODE_NOT: ('NOT'|'not'|'Not');
//eval-functions
EVAL_LANGUAGE_MODE_ABS: 'abs';
EVAL_LANGUAGE_MODE_ACOS: 'acos';
EVAL_LANGUAGE_MODE_ACOSH: 'acosh';
EVAL_LANGUAGE_MODE_ASIN: 'asin';
EVAL_LANGUAGE_MODE_ASINH: 'asinh';
EVAL_LANGUAGE_MODE_ATAN: 'atan';
EVAL_LANGUAGE_MODE_ATAN2: 'atan2';
EVAL_LANGUAGE_MODE_ATANH: 'atanh';
EVAL_LANGUAGE_MODE_AVG: 'avg';
EVAL_LANGUAGE_MODE_CASE: 'case';
EVAL_LANGUAGE_MODE_CEILING: ('ceil'|'ceiling');
EVAL_LANGUAGE_MODE_CIDRMATCH: 'cidrmatch';
EVAL_LANGUAGE_MODE_COALESCE: 'coalesce';
EVAL_LANGUAGE_MODE_COMMANDS: 'commands';
EVAL_LANGUAGE_MODE_COS: 'cos';
EVAL_LANGUAGE_MODE_COSH: 'cosh';
EVAL_LANGUAGE_MODE_EVAL: 'eval';
EVAL_LANGUAGE_MODE_EXACT: 'exact';
EVAL_LANGUAGE_MODE_EXP: 'exp';
EVAL_LANGUAGE_MODE_FALSE: 'false';
EVAL_LANGUAGE_MODE_FLOOR: 'floor';
EVAL_LANGUAGE_MODE_HYPOT: 'hypot';
EVAL_LANGUAGE_MODE_IF: 'if';
EVAL_LANGUAGE_MODE_IFNULL: 'ifnull';
EVAL_LANGUAGE_MODE_IN: 'in';
EVAL_LANGUAGE_MODE_ISBOOL: 'isbool';
EVAL_LANGUAGE_MODE_ISINT: 'isint';
EVAL_LANGUAGE_MODE_ISNOTNULL: 'isnotnull';
EVAL_LANGUAGE_MODE_ISNULL: 'isnull';
EVAL_LANGUAGE_MODE_ISNUM: 'isnum';
EVAL_LANGUAGE_MODE_ISSTR: 'isstr';
EVAL_LANGUAGE_MODE_JSON_VALID: 'json_valid';
EVAL_LANGUAGE_MODE_LEN: 'len';
EVAL_LANGUAGE_MODE_LIKE: 'like';
EVAL_LANGUAGE_MODE_LN: 'ln';
EVAL_LANGUAGE_MODE_LOG: 'log';
EVAL_LANGUAGE_MODE_LOWER: 'lower';
EVAL_LANGUAGE_MODE_LTRIM: 'ltrim';
EVAL_LANGUAGE_MODE_MATCH: 'match';
EVAL_LANGUAGE_MODE_MAX: 'max';
EVAL_LANGUAGE_MODE_MD5: 'md5';
EVAL_LANGUAGE_MODE_MIN: 'min';
EVAL_LANGUAGE_MODE_MVAPPEND: 'mvappend';
EVAL_LANGUAGE_MODE_MVCOUNT: 'mvcount';
EVAL_LANGUAGE_MODE_MVDEDUP: 'mvdedup';
EVAL_LANGUAGE_MODE_MVFILTER: 'mvfilter';
EVAL_LANGUAGE_MODE_MVFIND: 'mvfind';
EVAL_LANGUAGE_MODE_MVINDEX: 'mvindex';
EVAL_LANGUAGE_MODE_MVJOIN: 'mvjoin';
EVAL_LANGUAGE_MODE_MVRANGE: 'mvrange';
EVAL_LANGUAGE_MODE_MVSORT: 'mvsort';
EVAL_LANGUAGE_MODE_MVZIP: 'mvzip';
EVAL_LANGUAGE_MODE_NOW: 'now';
EVAL_LANGUAGE_MODE_NULL: 'null';
EVAL_LANGUAGE_MODE_NULLIF: 'nullif';
EVAL_LANGUAGE_MODE_PI: 'pi';
EVAL_LANGUAGE_MODE_PRINTF: 'printf';
EVAL_LANGUAGE_MODE_POW: 'pow';
EVAL_LANGUAGE_MODE_RANDOM: 'random';
EVAL_LANGUAGE_MODE_RELATIVE_TIME: 'relative_time';
EVAL_LANGUAGE_MODE_REPLACE: 'replace';
EVAL_LANGUAGE_MODE_ROUND: 'round';
EVAL_LANGUAGE_MODE_RTRIM: 'rtrim';
EVAL_LANGUAGE_MODE_SEARCHMATCH: 'searchmatch';
EVAL_LANGUAGE_MODE_SHA1: 'sha1';
EVAL_LANGUAGE_MODE_SHA256: 'sha256';
EVAL_LANGUAGE_MODE_SHA512: 'sha512';
EVAL_LANGUAGE_MODE_SIGFIG: 'sigfig';
EVAL_LANGUAGE_MODE_SIN: 'sin';
EVAL_LANGUAGE_MODE_SINH: 'sinh';
EVAL_LANGUAGE_MODE_SPATH: 'spath';
EVAL_LANGUAGE_MODE_SPLIT: 'split';
EVAL_LANGUAGE_MODE_SQRT: 'sqrt';
EVAL_LANGUAGE_MODE_STRFTIME: 'strftime';
EVAL_LANGUAGE_MODE_STRPTIME: 'strptime';
EVAL_LANGUAGE_MODE_SUBSTR: 'substr';
EVAL_LANGUAGE_MODE_SUM: 'sum';
EVAL_LANGUAGE_MODE_TAN: 'tan';
EVAL_LANGUAGE_MODE_TANH: 'tanh';
EVAL_LANGUAGE_MODE_TIME: 'time';
EVAL_LANGUAGE_MODE_TONUMBER: 'tonumber';
EVAL_LANGUAGE_MODE_TOSTRING: 'tostring';
EVAL_LANGUAGE_MODE_TRIM: 'trim';
EVAL_LANGUAGE_MODE_TRUE: 'true';
EVAL_LANGUAGE_MODE_TYPEOF: 'typeof';
EVAL_LANGUAGE_MODE_UPPER: 'upper';
EVAL_LANGUAGE_MODE_URLDECODE: 'urldecode';
EVAL_LANGUAGE_MODE_VALIDATE: 'validate';
EVAL_LANGUAGE_MODE_JSON_OBJECT: 'json_object';
// characters for string
fragment EVAL_LANGUAGE_MODE_CHAR
: ( '\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' {false}? // '
|'\u0028' {false}? // (
|'\u0029' {false}? // )
|'\u002A' {false}? // *
|'\u002B' {false}? // +
|'\u002C' {false}? // ,
|'\u002D' {false}? // -
|'\u002E' {false}? // .
|'\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' {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' {false}? // |
|'\u007D' // }
|'\u007E' // ~
|'\u007F'..'\uFFFF' // DEL .. inf
);
EVAL_LANGUAGE_MODE_STRING_MATCH
// one or more characters, CHAR_MATCH catches shorter ones
: (EVAL_LANGUAGE_MODE_CHAR)+;
EVAL_LANGUAGE_MODE_SINGLE_QUOTED_STRING_MATCH
: '\'' ( '\\'. | ~('\''| '\\') )* '\''
;
EVAL_LANGUAGE_MODE_QUOTED_STRING_MATCH
// : EVAL_LANGUAGE_MODE_DQSTRING (EVAL_LANGUAGE_MODE_CHAR)+ EVAL_LANGUAGE_MODE_DQSTRING
: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"'
;
//EVAL_LANGUAGE_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\'))*;
//EVAL_LANGUAGE_MODE_DQSTRING: '"' ( '\\'. | ~('"'| '\\'))* '"';
| 10,527 | ANTLR | .g4 | 291 | 31.886598 | 134 | 0.631373 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | fb23b8b6fb04cb75cec9abc00be244b8a2ee574321eb004d19a6bafd794bd68d | false | false | false | false |
457 | DPLParserTransform_lookup.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_lookup.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_lookup;
lookupTransformation
: COMMAND_MODE_LOOKUP (t_lookup_localParameter)? (t_lookup_updateParameter)? t_lookup_datasetnameParameter (fieldType (COMMAND_LOOKUP_FIELD_MODE_AS fieldType)?)+? ((COMMAND_LOOKUP_FIELD_MODE_OUTPUT|COMMAND_LOOKUP_FIELD_MODE_OUTPUTNEW) (fieldType (COMMAND_LOOKUP_FIELD_MODE_AS fieldType)?)+)?
;
t_lookup_datasetnameParameter
: stringType
;
t_lookup_localParameter
: COMMAND_LOOKUP_MODE_LOCAL booleanType
;
t_lookup_updateParameter
: COMMAND_LOOKUP_MODE_UPDATE booleanType
;
| 2,625 | ANTLR | .g4 | 58 | 42.293103 | 299 | 0.766107 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 4f25f21e0a6011c898b7531735a7f6c468c90d309795f3218ead7308e8f9398d | false | false | false | false |
458 | DPLParserTransform_accum.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_accum.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_accum;
accumTransformation
: COMMAND_MODE_ACCUM fieldType (t_accum_fieldRenameInstruction)?
;
t_accum_fieldRenameInstruction
: COMMAND_ACCUM_MODE_AS fieldType
;
| 2,248 | ANTLR | .g4 | 52 | 40.730769 | 98 | 0.770738 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 1f54319211de7cd67847c8f2ccfddf2c97b9c59b0d976f6147aadfbad226f5b5 | false | false | false | false |
459 | COMMAND_KVFORM_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_KVFORM_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_KVFORM_MODE;
COMMAND_KVFORM_MODE_ANTLR_BUG: 'command_kvform_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_KVFORM_MODE ++++++++++++++
mode COMMAND_KVFORM_MODE;
// skip
COMMAND_KVFORM_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_KVFORM_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_KVFORM_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_KVFORM_MODE_FIELD : 'field=' -> pushMode(GET_FIELD);
COMMAND_KVFORM_MODE_FORM : 'form=' -> pushMode(GET_STRING);
COMMAND_KVFORM_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_KVFORM_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_KVFORM_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' // KVFORM
|'\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_KVFORM_MODE_STRING
// one or more characters
: (COMMAND_KVFORM_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_KVFORM_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,354 | ANTLR | .g4 | 160 | 26.6875 | 104 | 0.526367 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 06cf321860bf22ce6a0d2b3dc6c9b0d198c20858ec75f52c4176075c6e1fef4a | false | false | false | false |
460 | COMMAND_GEOMFILTER_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_GEOMFILTER_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_GEOMFILTER_MODE;
COMMAND_GEOMFILTER_MODE_ANTLR_BUG: 'command_geomfilter_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_GEOMFILTER_MODE ++++++++++++++
mode COMMAND_GEOMFILTER_MODE;
// skip
COMMAND_GEOMFILTER_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_GEOMFILTER_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_GEOMFILTER_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_GEOMFILTER_MODE_MIN_Y : 'min_y=' -> pushMode(GET_NUMBER);
COMMAND_GEOMFILTER_MODE_MIN_X : 'min_x=' -> pushMode(GET_NUMBER);
COMMAND_GEOMFILTER_MODE_MAX_Y : 'max_y=' -> pushMode(GET_NUMBER);
COMMAND_GEOMFILTER_MODE_MAX_X : 'max_x=' -> pushMode(GET_NUMBER);
COMMAND_GEOMFILTER_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,827 | ANTLR | .g4 | 61 | 44.491803 | 98 | 0.750906 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 4d404ac6d6c68b71f2950d749535e518fdba316f9edfb8d90218efdb3c0defe3 | false | false | false | false |
461 | COMMAND_BIN_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_BIN_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_BIN_MODE;
COMMAND_BIN_MODE_ANTLR_BUG: 'command_bin_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_BIN_MODE ++++++++++++++
mode COMMAND_BIN_MODE;
// skip
COMMAND_BIN_MODE_SPACE: SPACE -> channel(HIDDEN);
// comments
COMMAND_BIN_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
// exits
COMMAND_BIN_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_BIN_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_BIN_MODE_ALIGNTIME : 'aligntime=' -> pushMode(GET_TIME);
COMMAND_BIN_MODE_MINSPAN : 'minspan=' -> pushMode(GET_SPAN);
COMMAND_BIN_MODE_START : 'start=' -> pushMode(GET_NUMBER);
COMMAND_BIN_MODE_SPAN : 'span=' -> pushMode(GET_SPAN);
COMMAND_BIN_MODE_BINS : 'bins=' -> pushMode(GET_INTEGER);
COMMAND_BIN_MODE_END : 'end=' -> pushMode(GET_NUMBER);
COMMAND_BIN_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_BIN_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_BIN_MODE_AS: ('AS'|'as');
// characters for string
fragment COMMAND_BIN_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' // BIN
|'\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_BIN_MODE_STRING
// one or more characters
: (COMMAND_BIN_MODE_CHAR)+ -> type(GET_FIELD_STRING);
// exit
COMMAND_BIN_SUBMODE_SPAN_SPACE: SPACE -> channel(HIDDEN), popMode;
| 5,665 | ANTLR | .g4 | 168 | 27.196429 | 101 | 0.533881 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 68e48b6c227c61be4c1fbbfe616965ef76b71315aba29d4bb7c2a36f4fbab27a | false | false | false | false |
462 | COMMAND_TRANSACTION_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TRANSACTION_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_TRANSACTION_MODE;
COMMAND_TRANSACTION_MODE_ANTLR_BUG: 'command_transaction_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TRANSACTION_MODE ++++++++++++++
mode COMMAND_TRANSACTION_MODE;
// skip
COMMAND_TRANSACTION_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TRANSACTION_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TRANSACTION_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_TRANSACTION_MODE_PARENTHESIS_L : '(';
COMMAND_TRANSACTION_MODE_PARENTHESIS_R : ')' -> popMode;
COMMAND_TRANSACTION_MODE_MAXOPENEVENTS : 'maxopenevents=' -> pushMode(GET_INTEGER);
COMMAND_TRANSACTION_MODE_CONNECTED : 'connected=' -> pushMode(GET_BOOLEAN);
COMMAND_TRANSACTION_MODE_KEEPORPHANS : 'keeporphans=' -> pushMode(GET_BOOLEAN);
COMMAND_TRANSACTION_MODE_ENDSWITH : 'endswith=' -> pushMode(COMMAND_TRANSACTION_MODE_SEARCH_HACK);
COMMAND_TRANSACTION_MODE_KEEPEVICTED : 'keepevicted=' -> pushMode(GET_BOOLEAN);
COMMAND_TRANSACTION_MODE_STARTSWITH : 'startswith=' -> pushMode(COMMAND_TRANSACTION_MODE_SEARCH_HACK);
COMMAND_TRANSACTION_MODE_MAXOPENTXN : 'maxopentxn=' -> pushMode(GET_INTEGER);
COMMAND_TRANSACTION_MODE_UNIFYENDS : 'unifyends=' -> pushMode(GET_BOOLEAN);
COMMAND_TRANSACTION_MODE_MAXEVENTS : 'maxevents=' -> pushMode(GET_INTEGER);
COMMAND_TRANSACTION_MODE_MAXPAUSE : 'maxpause=' -> pushMode(GET_SPAN);
COMMAND_TRANSACTION_MODE_NULLSTR : 'nullstr';
COMMAND_TRANSACTION_MODE_MAXSPAN : 'maxspan=' -> pushMode(GET_SPAN);
COMMAND_TRANSACTION_MODE_MVRAW : 'mvraw=' -> pushMode(GET_BOOLEAN);
COMMAND_TRANSACTION_MODE_MVLIST : 'mvlist=';
COMMAND_TRANSACTION_MODE_COMMA : ',' -> type(COMMA);
COMMAND_TRANSACTION_MODE_DELIM : 'delim=' -> pushMode(GET_STRING);
COMMAND_TRANSACTION_MODE_NAME : 'name=' -> pushMode(GET_STRING);
COMMAND_TRANSACTION_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_TRANSACTION_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_TRANSACTION_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' // TRANSACTION
|'\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_TRANSACTION_MODE_STRING
// one or more characters
: (COMMAND_TRANSACTION_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_TRANSACTION_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
mode COMMAND_TRANSACTION_MODE_SEARCH_HACK;
COMMAND_TRANSACTION_MODE_SEARCH_HACK_EVAL: 'eval(' -> pushMode(EVAL_LANGUAGE_MODE);
COMMAND_TRANSACTION_MODE_SEARCH_HACK_PARENTHESIS_R : ')' -> popMode, popMode;
COMMAND_TRANSACTION_MODE_SEARCH_HACK_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED), popMode;
// characters for string
fragment COMMAND_TRANSACTION_MODE_SEARCH_HACK_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' // TRANSACTION
|'\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_TRANSACTION_MODE_SEARCH_HACK_STRING
// one or more characters
: (COMMAND_TRANSACTION_MODE_CHAR)+ -> type(GET_STRING_STRING), popMode; | 9,523 | ANTLR | .g4 | 280 | 26.628571 | 131 | 0.507967 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 4388278f4cee39f1020e7ca9a76f4fcba26c4a6c65c72ce09f4f8cb18d7d50e3 | false | false | false | false |
463 | DPLParserTransform_uniq.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_uniq.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_uniq;
uniqTransformation
: COMMAND_MODE_UNIQ
;//empty one
| 2,128 | ANTLR | .g4 | 49 | 41.183673 | 98 | 0.771896 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 6990e2da4d3c2b72b87897046ca8dff1a4d262edfb84b92eae6f7fa535912da1 | false | false | false | false |
464 | DPLParserTransform_fields.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_fields.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_fields;
fieldsTransformation
: COMMAND_MODE_FIELDS (COMMAND_FIELDS_MODE_PLUS | COMMAND_FIELDS_MODE_MINUS)? fieldListType
;
| 2,195 | ANTLR | .g4 | 49 | 42.510204 | 99 | 0.773682 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | e69aad0a03ffdd3ec5825646096b77ca00f0c2d65bf4053d85049579c1d94a13 | false | false | false | false |
465 | COMMAND_MAKECONTINUOUS_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_MAKECONTINUOUS_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_MAKECONTINUOUS_MODE;
COMMAND_MAKECONTINUOUS_MODE_ANTLR_BUG: 'command_makecontinuous_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_MAKECONTINUOUS_MODE ++++++++++++++
mode COMMAND_MAKECONTINUOUS_MODE;
// skip
COMMAND_MAKECONTINUOUS_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_MAKECONTINUOUS_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_MAKECONTINUOUS_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_MAKECONTINUOUS_MODE_BINS : 'bins=' -> pushMode(GET_INTEGER);
COMMAND_MAKECONTINUOUS_MODE_START : 'start=' -> pushMode(GET_NUMBER);
COMMAND_MAKECONTINUOUS_MODE_SPAN : 'span=' -> pushMode(GET_SPAN);
COMMAND_MAKECONTINUOUS_MODE_END : 'end=' -> pushMode(GET_NUMBER);
COMMAND_MAKECONTINUOUS_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_MAKECONTINUOUS_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_MAKECONTINUOUS_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' // MAKECONTINUOUS
|'\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_MAKECONTINUOUS_MODE_STRING
// one or more characters
: (COMMAND_MAKECONTINUOUS_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_MAKECONTINUOUS_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
// exit
COMMAND_MAKECONTINUOUS_SUBMODE_SPAN_SPACE: SPACE -> channel(HIDDEN), popMode;
| 5,712 | ANTLR | .g4 | 164 | 28.189024 | 112 | 0.547016 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | fe469eb96b09eab4c8ecc097924e954bb4e270ba7666e29fc28c42869ed9df3e | false | false | false | false |
466 | COMMAND_SCRUB_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_SCRUB_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_SCRUB_MODE;
COMMAND_SCRUB_MODE_ANTLR_BUG: 'command_scrub_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_SCRUB_MODE ++++++++++++++
mode COMMAND_SCRUB_MODE;
// skip
COMMAND_SCRUB_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_SCRUB_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_SCRUB_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_SCRUB_MODE_PRIVATE_TERMS : 'private-terms=';
COMMAND_SCRUB_MODE_PUBLIC_TERMS : 'public-terms=';
COMMAND_SCRUB_MODE_TIMECONFIG : 'timeconfig=';
COMMAND_SCRUB_MODE_NAME_TERMS : 'name-terms=';
COMMAND_SCRUB_MODE_DICTIONARY : 'dictionary=';
COMMAND_SCRUB_MODE_NAMESPACE : 'namespace=';
COMMAND_SCRUB_MODE_SLASH: '/';
COMMAND_SCRUB_MODE_DOT: '.';
COMMAND_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_SCRUB_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_SCRUB_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' // SCRUB
|'\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_SCRUB_MODE_STRING
// one or more characters
: (COMMAND_SCRUB_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_SCRUB_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,564 | ANTLR | .g4 | 166 | 26.951807 | 104 | 0.535402 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 31dffbaf4d4387ef55209272d375a0d0bcff00e0a1c86ca4a4fbae2d7fc5958b | false | false | false | false |
467 | DPLParserTransform_gauge.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_gauge.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_gauge;
gaugeTransformation
: COMMAND_MODE_GAUGE (numberType|fieldType) ((numberType|fieldType)+)?
;
| 2,170 | ANTLR | .g4 | 49 | 42.040816 | 98 | 0.77217 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | dcfb889ca668b925a936998af852e67268d555f2d23fa4f7f8a7b92f4f4a70d6 | false | false | false | false |
468 | DPLParserTransform_set.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_set.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_set;
setTransformation
: COMMAND_MODE_SET t_setOption_Parameter subsearchStatement
;
t_setOption_Parameter
: COMMAND_SET_MODE_UNION
| COMMAND_SET_MODE_DIFF
| COMMAND_SET_MODE_INTERSECT
; | 2,289 | ANTLR | .g4 | 54 | 39.666667 | 98 | 0.764996 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 4fb687f935db47f1fc66e724f1638f6d7bf5662b358689dc3b651a3a3bb4ff47 | false | false | false | false |
469 | DPLParserTransform_sistats.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_sistats.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_sistats;
sistatsTransformation
: COMMAND_MODE_SISTATS (t_sistats_allnumParameter)? (t_sistats_delimParameter)? ((aggregateFunction) (t_sistats_fieldRenameInstruction)?)+ (t_sistats_byInstruction)?
;
t_sistats_byInstruction
: (COMMAND_SISTATS_MODE_BY) fieldListType
;
t_sistats_fieldRenameInstruction
: COMMAND_SISTATS_MODE_AS fieldType
;
t_sistats_delimParameter
: COMMAND_SISTATS_MODE_DELIM stringType
;
t_sistats_allnumParameter
: COMMAND_SISTATS_MODE_ALLNUM booleanType
;
| 2,614 | ANTLR | .g4 | 61 | 39.721311 | 173 | 0.763251 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 9b1703a39a079f01fbd8bbad11e9408fb2255ad248070159ad2ceae0b59f8d64 | false | false | false | false |
470 | DPLParserTransform_xmlunescape.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_xmlunescape.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_xmlunescape;
xmlunescapeTransformation
: COMMAND_MODE_XMLUNESCAPE t_xmlunescape_maxinputsParameter
;
t_xmlunescape_maxinputsParameter
: COMMAND_XMLUNESCAPE_MODE_MAXINPUTS integerType
;
| 2,274 | ANTLR | .g4 | 52 | 41.192308 | 98 | 0.775023 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 8bb6fcd90cc03cdf26a5e228f50c80e526c02320dad1a8aaafaa60f36c960ce6 | false | false | false | false |
471 | DPLParserTransform_addtotals.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_addtotals.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_addtotals;
addtotalsTransformation
: COMMAND_MODE_ADDTOTALS (t_addtotals_colParameter|t_addtotals_rowParameter|t_addtotals_labelfieldParameter|t_addtotals_labelParameter|t_addtotals_fieldnameParameter)*? fieldListType?
;
t_addtotals_fieldnameParameter
: COMMAND_ADDTOTALS_MODE_FIELDNAME fieldType
;
t_addtotals_labelfieldParameter
: COMMAND_ADDTOTALS_MODE_LABELFIELD fieldType
;
t_addtotals_labelParameter
: COMMAND_ADDTOTALS_MODE_LABEL stringType
;
t_addtotals_rowParameter
: COMMAND_ADDTOTALS_MODE_ROW booleanType
;
t_addtotals_colParameter
: COMMAND_ADDTOTALS_MODE_COL booleanType
;
| 2,759 | ANTLR | .g4 | 64 | 39.546875 | 191 | 0.769 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 2759f5677a6c0c899c8f1148b17e99e7593fa27c0a84e8eaea0a07fe4220feb3 | false | false | false | false |
472 | COMMAND_ANOMALOUSVALUE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_ANOMALOUSVALUE_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_ANOMALOUSVALUE_MODE;
COMMAND_ANOMALOUSVALUE_MODE_ANTLR_BUG: 'command_anomalousvalue_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_ANOMALOUSVALUE_MODE ++++++++++++++
mode COMMAND_ANOMALOUSVALUE_MODE;
// skip
COMMAND_ANOMALOUSVALUE_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_ANOMALOUSVALUE_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_ANOMALOUSVALUE_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_ANOMALOUSVALUE_MODE_MINSUPCOUNT : 'minsupcount=' -> pushMode(GET_INTEGER);
COMMAND_ANOMALOUSVALUE_MODE_MINNORMFREQ : 'minnormfreq=' -> pushMode(GET_NUMBER);
COMMAND_ANOMALOUSVALUE_MODE_MINSUPFREQ : 'minsupfreq=' -> pushMode(GET_NUMBER);
COMMAND_ANOMALOUSVALUE_MODE_MAXANOFREQ : 'maxanofreq=' -> pushMode(GET_NUMBER);
COMMAND_ANOMALOUSVALUE_MODE_PTHRESH : 'pthresh=' -> pushMode(GET_NUMBER);
COMMAND_ANOMALOUSVALUE_MODE_ACTION : 'action=' -> pushMode(COMMAND_ANOMALOUSVALUE_MODE_GET_ACTION_MODE);
COMMAND_ANOMALOUSVALUE_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_ANOMALOUSVALUE_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_ANOMALOUSVALUE_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' // ANOMALOUSVALUE
|'\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_ANOMALOUSVALUE_MODE_STRING
// one or more characters
: (COMMAND_ANOMALOUSVALUE_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_ANOMALOUSVALUE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
mode COMMAND_ANOMALOUSVALUE_MODE_GET_ACTION_MODE;
COMMAND_ANOMALOUSVALUE_MODE_GET_ACTION_MODE_ANNOTATE: 'annotate' -> popMode;
COMMAND_ANOMALOUSVALUE_MODE_GET_ACTION_MODE_FILTER : 'filter' -> popMode;
COMMAND_ANOMALOUSVALUE_MODE_GET_ACTION_MODE_SUMMARY : 'summary' -> popMode;
| 6,140 | ANTLR | .g4 | 168 | 30.041667 | 112 | 0.566174 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | d1a0b8c61106de3c430c51640a86b2e357afe1b999fdf1a8728ea2027b81d3a8 | false | false | false | false |
473 | GET_INDEX_STRING.g4 | teragrep_pth_03/src/main/antlr4/imports/GET_INDEX_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_INDEX_STRING;
GET_FIELD_ANTLR_BUG: 'get_string_index_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ GET_INDEX_STRING ++++++++++++++
mode GET_INDEX_STRING;
// skip
GET_INDEX_STRING_SPACE: SPACE -> channel(HIDDEN);
// tokens
GET_INDEX_STRING_WILDCARD: '*' ;
GET_INDEX_STRING_BRACKET_L: '(';
GET_INDEX_STRING_SINGLE_QUOTED: '\'' ( '\\'. | ~('\''| '\\') )* '\'' ;
GET_INDEX_STRING_DOUBLE_QUOTED: '"' ( '\\'. | ~('"'| '\\') )* '"';
GET_INDEX_STRING_COMMA: ',' -> type(COMMA);
GET_INDEX_STRING_BRACKET_R: ')' -> popMode;
GET_INDEX_STRING_STRING
// one or more characters
: (CHAR)+ ;
fragment CHAR
:'\u0022' // "
|'\u0023' // #
|'\u0024' // $
|'\u0025' // %
|'\u0026' // &
|'\u0027' // '
//|'\u0028' // (
//|'\u0029' // )
|'\u002A' // *
|'\u002B' // +
// |'\u002C' {false}? // ,
|'\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_INDEX_STRING_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT); | 5,063 | ANTLR | .g4 | 159 | 25.056604 | 98 | 0.509288 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 296e35da7a3fb367c90e3768b7996ffa8a4b3e0c3678a413f585a8380d31279a | false | false | false | false |
474 | COMMAND_AGGREGATION_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_AGGREGATION_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_AGGREGATION_MODE;
COMMAND_AGGREGATION_MODE_ANTLR_BUG: 'command_aggregation_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ AGGREGATION_MODE ++++++++++++++
mode AGGREGATION_MODE;
// http://antlr.1301665.n2.nabble.com/Reuse-of-same-token-in-multiple-lexer-modes-td7578956.html
// skip
METHOD_AGGREGATE_SPACE: SPACE -> channel(HIDDEN);
// exits
METHOD_AGGREGATE_PARENTHESIS_R: ')' -> popMode;
METHOD_AGGREGATE_EVAL_L: 'eval(' -> pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_AVG: 'avg(';
METHOD_AGGREGATE_MEAN: 'mean(';
METHOD_AGGREGATE_C: 'c(';
METHOD_AGGREGATE_COUNT_B: 'count(';
METHOD_AGGREGATE_COUNT: 'count' -> popMode;
METHOD_AGGREGATE_COUNT_C: 'c' -> popMode;
METHOD_AGGREGATE_DC: 'dc(';
METHOD_AGGREGATE_DISTINCT_COUNT: 'distinct_count(';
METHOD_AGGREGATE_EARLIEST: 'earliest(';
METHOD_AGGREGATE_EARLIEST_TIME: 'earliest_time(';
METHOD_AGGREGATE_ESTDC: 'estdc(';
METHOD_AGGREGATE_ESTDC_ERROR: 'estdc_error(';
METHOD_AGGREGATE_FIRST: 'first(';
METHOD_AGGREGATE_LAST: 'last(';
METHOD_AGGREGATE_LATEST: 'latest(';
METHOD_AGGREGATE_LATEST_TIME: 'latest_time(';
METHOD_AGGREGATE_LIST: 'list(';
METHOD_AGGREGATE_MAX: 'max(';
METHOD_AGGREGATE_MEDIAN: 'median(';
METHOD_AGGREGATE_MIN: 'min(';
METHOD_AGGREGATE_MODE: 'mode(';
//perc
METHOD_AGGREGATE_P: 'p(';
METHOD_AGGREGATE_PERC: 'perc(';
METHOD_AGGREGATE_EXACTPERC: 'exactperc(';
METHOD_AGGREGATE_UPPERPERC: 'upperperc(';
//special percX()
METHOD_AGGREGATE_P_VARIABLE: 'p'METHOD_AGGREGATE_INTEGER;
METHOD_AGGREGATE_PERC_VARIABLE: 'perc'METHOD_AGGREGATE_INTEGER;
METHOD_AGGREGATE_EXACTPERC_VARIABLE: 'exactperc'METHOD_AGGREGATE_INTEGER;
METHOD_AGGREGATE_UPPERPERC_VARIABLE: 'upperperc'METHOD_AGGREGATE_INTEGER;
METHOD_AGGREGATE_PERCINT: 'percint(';
METHOD_AGGREGATE_RANGE: 'range(';
METHOD_AGGREGATE_RATE: 'rate(';
METHOD_AGGREGATE_STDEV: 'stdev(';
METHOD_AGGREGATE_STDEVP: 'stdevp(';
METHOD_AGGREGATE_SUM: 'sum(';
METHOD_AGGREGATE_SUMSQ: 'sumsq(';
METHOD_AGGREGATE_VALUES: 'values(';
METHOD_AGGREGATE_VAR: 'var(';
METHOD_AGGREGATE_VARP: 'varp(';
METHOD_AGGREGATE_PER_SECOND: 'per_second(';
METHOD_AGGREGATE_PER_HOUR: 'per_hour(';
METHOD_AGGREGATE_PER_DAY: 'per_day(';
METHOD_AGGREGATE_PER_MINUTE: 'per_minute(';
//eval-functions
METHOD_AGGREGATE_ABS: 'abs'-> type(EVAL_LANGUAGE_MODE_ABS), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ACOS: 'acos' -> type(EVAL_LANGUAGE_MODE_ACOS), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ACOSH: 'acosh' -> type(EVAL_LANGUAGE_MODE_ACOSH),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ASIN: 'asin' -> type(EVAL_LANGUAGE_MODE_ASIN),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ASINH: 'asinh' -> type(EVAL_LANGUAGE_MODE_ASINH),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ATAN: 'atan' -> type(EVAL_LANGUAGE_MODE_ATAN),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ATAN2: 'atan2' -> type(EVAL_LANGUAGE_MODE_ATAN2),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ATANH: 'atanh' -> type(EVAL_LANGUAGE_MODE_ATANH),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_CASE: 'case' -> type(EVAL_LANGUAGE_MODE_CASE),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_CEILING: 'ceiling' -> type(EVAL_LANGUAGE_MODE_CEILING),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_CIDRMATCH: 'cidrmatch' -> type(EVAL_LANGUAGE_MODE_CIDRMATCH),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_COALESCE: 'coalesce' -> type(EVAL_LANGUAGE_MODE_COALESCE),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_COMMANDS: 'commands' -> type(EVAL_LANGUAGE_MODE_COMMANDS),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_COS: 'cos' -> type(EVAL_LANGUAGE_MODE_COS),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_COSH: 'cosh' -> type(EVAL_LANGUAGE_MODE_COSH),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_EXACT: 'exact' -> type(EVAL_LANGUAGE_MODE_EXACT),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_EXP: 'exp' -> type(EVAL_LANGUAGE_MODE_EXP),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_FALSE: 'false' -> type(EVAL_LANGUAGE_MODE_FALSE),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_FLOOR: 'floor' -> type(EVAL_LANGUAGE_MODE_FLOOR), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_HYPOT: 'hypot' -> type(EVAL_LANGUAGE_MODE_HYPOT),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_IF: 'if' -> type(EVAL_LANGUAGE_MODE_IF),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_IFNULL: 'ifnull' -> type(EVAL_LANGUAGE_MODE_IFNULL),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_IN: 'in' -> type(EVAL_LANGUAGE_MODE_IN),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ISBOOL: 'isbool' -> type(EVAL_LANGUAGE_MODE_ISBOOL),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ISINT: 'isint' -> type(EVAL_LANGUAGE_MODE_ISINT),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ISNOTNULL: 'isnotnull' -> type(EVAL_LANGUAGE_MODE_ISNOTNULL),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ISNULL: 'isnull' -> type(EVAL_LANGUAGE_MODE_ISNULL),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ISNUM: 'isnum' -> type(EVAL_LANGUAGE_MODE_ISNUM),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ISSTR: 'isstr' -> type(EVAL_LANGUAGE_MODE_ISSTR),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_JSON_VALID: 'json_valid' -> type(EVAL_LANGUAGE_MODE_JSON_VALID),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_LEN: 'len' -> type(EVAL_LANGUAGE_MODE_LEN),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_LIKE: 'like' -> type(EVAL_LANGUAGE_MODE_LIKE),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_LN: 'ln' -> type(EVAL_LANGUAGE_MODE_LN),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_LOG: 'log' -> type(EVAL_LANGUAGE_MODE_LOG),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_LOWER: 'lower' -> type(EVAL_LANGUAGE_MODE_LOWER),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_LTRIM: 'ltrim' -> type(EVAL_LANGUAGE_MODE_LTRIM),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MATCH: 'match' -> type(EVAL_LANGUAGE_MODE_MATCH),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MAX: 'max' -> type(EVAL_LANGUAGE_MODE_MAX),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MD5: 'md5' -> type(EVAL_LANGUAGE_MODE_MD5),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MIN: 'min' -> type(EVAL_LANGUAGE_MODE_MIN),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MVAPPEND: 'mvappend' -> type(EVAL_LANGUAGE_MODE_MVAPPEND),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MVCOUNT: 'mvcount' -> type(EVAL_LANGUAGE_MODE_MVCOUNT),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MVDEDUP: 'mvdedup' -> type(EVAL_LANGUAGE_MODE_MVDEDUP),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MVFILTER: 'mvfilter' -> type(EVAL_LANGUAGE_MODE_MVFILTER),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MVFIND: 'mvfind' -> type(EVAL_LANGUAGE_MODE_MVFIND),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MVINDEX: 'mvindex' -> type(EVAL_LANGUAGE_MODE_MVINDEX),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MVJOIN: 'mvjoin' -> type(EVAL_LANGUAGE_MODE_MVJOIN),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MVRANGE: 'mvrange' -> type(EVAL_LANGUAGE_MODE_MVRANGE),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MVSORT: 'mvsort' -> type(EVAL_LANGUAGE_MODE_MVSORT),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_MVZIP: 'mvzip' -> type(EVAL_LANGUAGE_MODE_MVZIP),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_NOW: 'now' -> type(EVAL_LANGUAGE_MODE_NOW),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_NULL: 'null' -> type(EVAL_LANGUAGE_MODE_NULL), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_NULLIF: 'nullif' -> type(EVAL_LANGUAGE_MODE_NULLIF),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_PI: 'pi' -> type(EVAL_LANGUAGE_MODE_PI), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_PRINTF: 'printf' -> type(EVAL_LANGUAGE_MODE_PRINTF),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_POW: 'pow' -> type(EVAL_LANGUAGE_MODE_POW), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_RANDOM: 'random' -> type(EVAL_LANGUAGE_MODE_RANDOM), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_RELATIVE_TIME: 'relative_time' -> type(EVAL_LANGUAGE_MODE_RELATIVE_TIME),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_REPLACE: 'replace' -> type(EVAL_LANGUAGE_MODE_REPLACE),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_ROUND: 'round' -> type(EVAL_LANGUAGE_MODE_ROUND),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_RTRIM: 'rtrim' -> type(EVAL_LANGUAGE_MODE_RTRIM), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_SEARCHMATCH: 'searchmatch' -> type(EVAL_LANGUAGE_MODE_SEARCHMATCH), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_SHA1: 'sha1' -> type(EVAL_LANGUAGE_MODE_SHA1), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_SHA256: 'sha256' -> type(EVAL_LANGUAGE_MODE_SHA256), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_SHA512: 'sha512' -> type(EVAL_LANGUAGE_MODE_SHA512), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_SIGFIG: 'sigfig' -> type(EVAL_LANGUAGE_MODE_SIGFIG),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_SIN: 'sin' -> type(EVAL_LANGUAGE_MODE_SIN),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_SINH: 'sinh' -> type(EVAL_LANGUAGE_MODE_SINH),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_SPATH: 'spath' -> type(EVAL_LANGUAGE_MODE_SPATH),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_SPLIT: 'split' -> type(EVAL_LANGUAGE_MODE_SPLIT), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_SQRT: 'sqrt' -> type(EVAL_LANGUAGE_MODE_SQRT),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_STRFTIME: 'strftime' -> type(EVAL_LANGUAGE_MODE_STRFTIME), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_STRPTIME: 'strptime' -> type(EVAL_LANGUAGE_MODE_STRPTIME), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_SUBSTR: 'substr' -> type(EVAL_LANGUAGE_MODE_SUBSTR),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_TAN: 'tan' -> type(EVAL_LANGUAGE_MODE_TAN), pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_TANH: 'tanh' -> type(EVAL_LANGUAGE_MODE_TANH),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_TIME: 'time' -> type(EVAL_LANGUAGE_MODE_TIME),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_TONUMBER: 'tonumber' -> type(EVAL_LANGUAGE_MODE_TONUMBER),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_TOSTRING: 'tostring' -> type(EVAL_LANGUAGE_MODE_TOSTRING),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_TRIM: 'trim' -> type(EVAL_LANGUAGE_MODE_TRIM),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_TRUE: 'true' -> type(EVAL_LANGUAGE_MODE_TRUE),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_TYPEOF: 'typeof' -> type(EVAL_LANGUAGE_MODE_TYPEOF),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_UPPER: 'upper' -> type(EVAL_LANGUAGE_MODE_UPPER),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_URLDECODE: 'urldecode' -> type(EVAL_LANGUAGE_MODE_URLDECODE),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_VALIDATE: 'validate' -> type(EVAL_LANGUAGE_MODE_VALIDATE),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_JSON_OBJECT: 'json_object' -> type(EVAL_LANGUAGE_MODE_JSON_OBJECT),pushMode(EVAL_LANGUAGE_MODE);
METHOD_AGGREGATE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"';
METHOD_AGGREGATE_STRING_MATCH: (METHOD_AGGREGATE_CHAR)+;
METHOD_AGGREGATE_INTEGER: DIGIT -> popMode;
fragment DIGIT: [0-9]+;
METHOD_AGGREGATE_PARENTHESIS_L: '(';
fragment METHOD_AGGREGATE_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_AGGREGATION_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 15,290 | ANTLR | .g4 | 289 | 48.771626 | 119 | 0.694715 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | e96a2a3df06579c82cec19353275bc49b1c5e2ec34f0e1f8b39cfbb0ac60993f | false | false | false | false |
475 | COMMAND_CONTINGENCY_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_CONTINGENCY_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_CONTINGENCY_MODE;
COMMAND_CONTINGENCY_MODE_ANTLR_BUG: 'command_contingency_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_CONTINGENCY_MODE ++++++++++++++
mode COMMAND_CONTINGENCY_MODE;
// skip
COMMAND_CONTINGENCY_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_CONTINGENCY_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_CONTINGENCY_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_CONTINGENCY_MODE_MINROWCOVER : 'minrowcover=' -> pushMode(GET_NUMBER);
COMMAND_CONTINGENCY_MODE_MINCOLCOVER : 'mincolcover=' -> pushMode(GET_NUMBER);
COMMAND_CONTINGENCY_MODE_USETOTAL : 'usetotal=' -> pushMode(GET_BOOLEAN);
COMMAND_CONTINGENCY_MODE_TOTALSTR : 'totalstr=' -> pushMode(GET_FIELD);
COMMAND_CONTINGENCY_MODE_MAXROWS : 'maxrows=' -> pushMode(GET_INTEGER);
COMMAND_CONTINGENCY_MODE_MAXCOLS : 'maxcols=' -> pushMode(GET_INTEGER);
COMMAND_CONTINGENCY_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_CONTINGENCY_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_CONTINGENCY_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' // CONTINGENCY
|'\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_CONTINGENCY_MODE_STRING
// one or more characters
: (COMMAND_CONTINGENCY_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_CONTINGENCY_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,754 | ANTLR | .g4 | 164 | 28.457317 | 109 | 0.548179 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | c3f1e372e4af4f13fa19847842930989fb1535c9baaee35f810f222f0ebfff80 | false | false | false | false |
476 | COMMAND_LOCALOP_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_LOCALOP_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_LOCALOP_MODE;
COMMAND_LOCALOP_MODE_ANTLR_BUG: 'command_localop_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_LOCALOP_MODE ++++++++++++++
mode COMMAND_LOCALOP_MODE;
// skip
COMMAND_LOCALOP_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_LOCALOP_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_LOCALOP_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_LOCALOP_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,535 | ANTLR | .g4 | 57 | 42.578947 | 98 | 0.752732 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | eef510dd011962f380d905e7714a058b1723f5f13a6c9750e14674379fdf214c | false | false | false | false |
477 | COMMAND_SET_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_SET_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_SET_MODE;
COMMAND_SET_MODE_ANTLR_BUG: 'command_set_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_SET_MODE ++++++++++++++
mode COMMAND_SET_MODE;
// skip
COMMAND_SET_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_SET_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_SET_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_SET_MODE_BRACKET_L: '[' -> type(BRACKET_L), pushMode(COMMAND_MODE);
COMMAND_SET_MODE_UNION: 'union';
COMMAND_SET_MODE_DIFF: 'diff';
COMMAND_SET_MODE_INTERSECT: 'intersect';
COMMAND_SET_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,679 | ANTLR | .g4 | 61 | 42.098361 | 98 | 0.748469 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 0ac145e59e4cd6d87fd531cda280d2f899ae6470b3054a9346a7159a7b3a590f | false | false | false | false |
478 | COMMAND_JOIN_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_JOIN_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_JOIN_MODE;
COMMAND_JOIN_MODE_ANTLR_BUG: 'command_join_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_JOIN_MODE ++++++++++++++
mode COMMAND_JOIN_MODE;
// skip
COMMAND_JOIN_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_JOIN_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_JOIN_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
//subsearch within join
COMMAND_JOIN_MODE_BRACKET_L: '[' -> type(BRACKET_L), pushMode(COMMAND_MODE);
// tokens
COMMAND_JOIN_MODE_OVERWRITE : 'overwrite=' -> pushMode(GET_BOOLEAN);
COMMAND_JOIN_MODE_EARLIER : 'earlier=' -> pushMode(GET_BOOLEAN);
COMMAND_JOIN_MODE_USETIME : 'usetime=' -> pushMode(GET_BOOLEAN);
COMMAND_JOIN_MODE_COMMA : ',' -> type(COMMA);
COMMAND_JOIN_MODE_MAX : 'max=' -> pushMode(GET_INTEGER);
//type
COMMAND_JOIN_TYPE : 'type=' -> pushMode(COMMAND_JOIN_GET_TYPE_MODE);
COMMAND_JOIN_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_JOIN_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_JOIN_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' // JOIN
|'\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_JOIN_MODE_STRING
// one or more characters
: (COMMAND_JOIN_MODE_CHAR)+ -> type(GET_FIELD_STRING);
mode COMMAND_JOIN_GET_TYPE_MODE;
COMMAND_JOIN_GET_TYPE_MODE_OUTER : 'outer' -> popMode;
COMMAND_JOIN_GET_TYPE_MODE_LEFT : 'left' -> popMode;
COMMAND_JOIN_GET_TYPE_MODE_INNER : 'inner' -> popMode;
COMMAND_JOIN_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,882 | ANTLR | .g4 | 171 | 27.97076 | 102 | 0.543058 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | d54ab8ccb0ae2c77da95d37fdf3cad6cf009c3565d96bcbfb82d038904e8c840 | false | false | false | false |
479 | DPLParserTransform_collect.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_collect.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_collect;
collectTransformation
: COMMAND_MODE_COLLECT t_collect_indexParameter (t_collect_addtimeParameter|t_collect_fileParameter|t_collect_spoolParameter|t_collect_markerParameter|t_collect_outputformatParameter|t_collect_testmodeParameter|t_collect_run_in_previewParameter|t_collect_hostParameter|t_collect_sourceParameter|t_collect_sourcetypeParameter)*?
;
t_collect_addtimeParameter
: COMMAND_COLLECT_MODE_ADDTIME booleanType
;
t_collect_fileParameter
: COMMAND_COLLECT_MODE_FILE stringType
;
t_collect_outputformatParameter
: COMMAND_COLLECT_MODE_OUT_PUT_FORMAT (COMMAND_COLLECT_MODE_OUT_PUT_FORMAT_MODE_RAW | COMMAND_COLLECT_MODE_OUT_PUT_FORMAT_MODE_HEC)
;
t_collect_hostParameter
: COMMAND_COLLECT_MODE_HOST stringType
;
t_collect_indexParameter
: COMMAND_COLLECT_MODE_INDEX stringType
;
t_collect_markerParameter
: COMMAND_COLLECT_MODE_MARKER stringType
;
t_collect_run_in_previewParameter
: COMMAND_COLLECT_MODE_RUN_IN_PREVIEW booleanType
;
t_collect_sourceParameter
: COMMAND_COLLECT_MODE_SOURCE stringType
;
t_collect_sourcetypeParameter
: COMMAND_COLLECT_MODE_SOURCETYPE stringType
;
t_collect_spoolParameter
: COMMAND_COLLECT_MODE_SPOOL booleanType
;
t_collect_testmodeParameter
: COMMAND_COLLECT_MODE_TESTMODE booleanType
;
| 3,497 | ANTLR | .g4 | 82 | 38.609756 | 335 | 0.761905 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 9207b5e934e951d98dcf44954d0d9f75545887a3ec3e03dc8a5db527dfb25567 | false | false | false | false |
480 | COMMAND_SPATH_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_SPATH_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_SPATH_MODE;
COMMAND_SPATH_MODE_ANTLR_BUG: 'command_spath_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_SPATH_MODE ++++++++++++++
mode COMMAND_SPATH_MODE;
// skip
COMMAND_SPATH_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_SPATH_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_SPATH_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_SPATH_MODE_INPUT: 'input=' -> pushMode(GET_FIELD);
COMMAND_SPATH_MODE_OUTPUT : 'output=' -> pushMode(GET_FIELD);
COMMAND_SPATH_MODE_PATH : 'path=' -> pushMode(GET_STRING);
COMMAND_SPATH_MODE_C_BRACKET_L: '{';
COMMAND_SPATH_MODE_C_BRACKET_R: '}';
COMMAND_SPATH_MODE_DOT: '.';
COMMAND_SPATH_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_SPATH_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_SPATH_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' // SPATH
|'\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_SPATH_MODE_STRING
// one or more characters
: (COMMAND_SPATH_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_SPATH_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,501 | ANTLR | .g4 | 164 | 26.914634 | 103 | 0.530164 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | f57397cdaea43eb22c2a5fd478c40cddf8d59375c2a5befde449613ea47f00f8 | false | false | false | false |
481 | DPLParserTransform_delta.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_delta.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_delta;
deltaTransformation
: COMMAND_MODE_DELTA fieldType (t_delta_fieldRenameInstruction|t_delta_fieldRenameAndEmitInstruction)? (t_delta_pParameter)?
;
t_delta_pParameter
: COMMAND_DELTA_MODE_P integerType
;
t_delta_fieldRenameAndEmitInstruction
: (COMMAND_DELTA_MODE_AS) t_delta_fieldRenameAndEmitType
;
t_delta_fieldRenameAndEmitType
// TODO disable : in STRING_MATCH
: fieldType COMMAND_DELTA_MODE_COLON fieldType
;
t_delta_fieldRenameInstruction
: COMMAND_DELTA_MODE_AS fieldType
;
| 2,636 | ANTLR | .g4 | 62 | 39.274194 | 132 | 0.762758 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | df1852801f7b009468e491140616d2f7310f4d1846798555a0e861bb3b9a6405 | false | false | false | false |
482 | COMMAND_MEVENTCOLLECT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_MEVENTCOLLECT_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_MEVENTCOLLECT_MODE;
COMMAND_MEVENTCOLLECT_MODE_ANTLR_BUG: 'command_meventcollect_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_MEVENTCOLLECT_MODE ++++++++++++++
mode COMMAND_MEVENTCOLLECT_MODE;
// skip
COMMAND_MEVENTCOLLECT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_MEVENTCOLLECT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_MEVENTCOLLECT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_MEVENTCOLLECT_MODE_PREFIX_FILE : 'file=' -> pushMode(GET_STRING);
COMMAND_MEVENTCOLLECT_MODE_PREFIX_FIELD : 'prefix_field=' -> pushMode(GET_STRING);
COMMAND_MEVENTCOLLECT_MODE_SOURCETYPE : 'sourcetype=' -> pushMode(GET_STRING);
COMMAND_MEVENTCOLLECT_MODE_SOURCE : 'source=' -> pushMode(GET_STRING);
COMMAND_MEVENTCOLLECT_MODE_SPOOL : 'spool=' -> pushMode(GET_BOOLEAN);
COMMAND_MEVENTCOLLECT_MODE_SPLIT : 'split=' -> pushMode(GET_BOOLEAN);
COMMAND_MEVENTCOLLECT_MODE_INDEX : 'index=' -> pushMode(GET_STRING);
COMMAND_MEVENTCOLLECT_MODE_COMMA : ',' -> type(COMMA);
COMMAND_MEVENTCOLLECT_MODE_HOST : 'host=' -> pushMode(GET_STRING);
COMMAND_MEVENTCOLLECT_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_MEVENTCOLLECT_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_MEVENTCOLLECT_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' // MEVENTCOLLECT
|'\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_MEVENTCOLLECT_MODE_STRING
// one or more characters
: (COMMAND_MEVENTCOLLECT_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_MEVENTCOLLECT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,982 | ANTLR | .g4 | 167 | 29.293413 | 111 | 0.555096 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 500b52f8faac14efd17f5e3e4ecf2ab59936abbcf4334f08ac53d43546094ac4 | false | false | false | false |
483 | COMMAND_TYPER_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TYPER_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_TYPER_MODE;
COMMAND_TYPER_MODE_ANTLR_BUG: 'command_typer_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TYPER_MODE ++++++++++++++
mode COMMAND_TYPER_MODE;
// skip
COMMAND_TYPER_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TYPER_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TYPER_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_TYPER_MODE_EVENTTYPES : 'eventtypes=' -> pushMode(GET_STRING);
COMMAND_TYPER_MODE_MAXLEN : 'maxlen=' -> pushMode(GET_INTEGER);
COMMAND_TYPER_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,652 | ANTLR | .g4 | 59 | 43.084746 | 98 | 0.75058 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 4e96a1f35817198231732f29f32994a8932323903372d7db338934cc05023dfc | false | false | false | false |
484 | DPLParserTransform_strcat.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_strcat.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_strcat;
strcatTransformation
: COMMAND_MODE_STRCAT (t_strcat_allrequiredParameter)? t_strcat_srcfieldsParameter t_strcat_destfieldParameter
;
t_strcat_allrequiredParameter
: COMMAND_STRCAT_MODE_ALLREQUIRED booleanType
;
t_strcat_srcfieldsParameter
: (fieldType | stringType) (fieldType | stringType)+
;
t_strcat_destfieldParameter
: fieldType
; | 2,467 | ANTLR | .g4 | 58 | 39.586207 | 118 | 0.766223 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | ae4c30416f899393f59f4c67c2d4b410a8e33ec92e75e5aea15785ff746157e2 | false | false | false | false |
485 | COMMAND_OUTPUTCSV_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_OUTPUTCSV_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_OUTPUTCSV_MODE;
COMMAND_OUTPUTCSV_MODE_ANTLR_BUG: 'command_outputcsv_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_OUTPUTCSV_MODE ++++++++++++++
mode COMMAND_OUTPUTCSV_MODE;
// skip
COMMAND_OUTPUTCSV_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_OUTPUTCSV_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_OUTPUTCSV_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_OUTPUTCSV_MODE_OVERRIDE_IF_EMPTY : 'override_if_empty=' -> pushMode(GET_BOOLEAN);
COMMAND_OUTPUTCSV_MODE_CREATE_EMPTY : 'create_empty=' -> pushMode(GET_BOOLEAN);
COMMAND_OUTPUTCSV_MODE_SINGLEFILE : 'singlefile=' -> pushMode(GET_BOOLEAN);
COMMAND_OUTPUTCSV_MODE_DISPATCH : 'dispatch=' -> pushMode(GET_BOOLEAN);
COMMAND_OUTPUTCSV_MODE_APPEND : 'append=' -> pushMode(GET_BOOLEAN);
COMMAND_OUTPUTCSV_MODE_SLASH: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_OUTPUTCSV_MODE_DOT: '.';
COMMAND_OUTPUTCSV_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
COMMAND_OUTPUTCSV_MODE_USEXML: 'usexml=' -> pushMode(GET_BOOLEAN);
// characters for string
fragment COMMAND_OUTPUTCSV_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' // OUTPUTCSV
|'\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_OUTPUTCSV_MODE_STRING
// one or more characters
: (COMMAND_OUTPUTCSV_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_OUTPUTCSV_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,769 | ANTLR | .g4 | 165 | 28.363636 | 109 | 0.545015 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 0bcf15c3b6546fdd0a9ff3ce8ce4874ad0ae8244b02026388b671ba3e71d3327 | false | false | false | false |
486 | GET_INTEGER.g4 | teragrep_pth_03/src/main/antlr4/imports/GET_INTEGER.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_INTEGER;
GET_INTEGER_ANTLR_BUG: 'get_integer_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ GET_INTEGER ++++++++++++++
mode GET_INTEGER;
// skip
GET_INTEGER_SPACE: SPACE -> channel(HIDDEN);
// tokens
fragment GET_INTEGER_MINUS: '-';
fragment GET_INTEGER_DIGIT: [0-9]+;
GET_INTEGER_INTEGER: GET_INTEGER_MINUS? GET_INTEGER_DIGIT+ -> popMode;
GET_INTEGER_RANGE: GET_INTEGER_INTEGER'-'GET_INTEGER_INTEGER -> popMode;
GET_INTEGER_NULL: 'null';
COMMAND_GET_INTEGER_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,583 | ANTLR | .g4 | 59 | 41.881356 | 98 | 0.752684 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 72526ff656ba49506a2bb02da8c08b7a7298d43e8b87d4f07f8e096dbdc3f781 | false | false | false | false |
487 | COMMAND_OVERLAP_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_OVERLAP_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_OVERLAP_MODE;
COMMAND_OVERLAP_MODE_ANTLR_BUG: 'command_overlap_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_OVERLAP_MODE ++++++++++++++
mode COMMAND_OVERLAP_MODE;
// skip
COMMAND_OVERLAP_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_OVERLAP_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_OVERLAP_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_OVERLAP_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,535 | ANTLR | .g4 | 57 | 42.578947 | 98 | 0.752732 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 594bb2651d8aedf15cc1322e4bcdbb8b20a3bfe31728c5260ab8e9e064cc8de3 | false | false | false | false |
488 | COMMAND_SISTATS_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_SISTATS_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_SISTATS_MODE;
COMMAND_SISTATS_MODE_ANTLR_BUG: 'command_sistats_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_SISTATS_MODE ++++++++++++++
mode COMMAND_SISTATS_MODE;
// skip
COMMAND_SISTATS_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_SISTATS_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_SISTATS_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_SISTATS_MODE_PARENTHESIS_R : ')';
COMMAND_SISTATS_MODE_PARENTHESIS_L : '(';
COMMAND_SISTATS_MODE_COMMA : ',' -> type(COMMA);
COMMAND_SISTATS_MODE_ALLNUM : 'allnum=' -> pushMode(GET_BOOLEAN);
COMMAND_SISTATS_MODE_DELIM : 'delim=' -> pushMode(GET_STRING);
COMMAND_SISTATS_MODE_BY : ('BY'|'by'|'By');
COMMAND_SISTATS_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_SISTATS_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_SISTATS_MODE_AS: ('AS'|'as'|'As');
COMMAND_SISTATS_MODE_INT: DIGIT;
fragment DIGIT: [0-99];
// aggregateMethod
COMMAND_SISTATS_MODE_COUNT: 'count' -> type(METHOD_AGGREGATE_COUNT);
COMMAND_SISTATS_MODE_AVG_PARENTHESIS_R: 'avg(' -> type(METHOD_AGGREGATE_AVG), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_MEAN_PARENTHESIS_R: 'mean(' -> type(METHOD_AGGREGATE_MEAN), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_C_PARENTHESIS_R: 'c(' -> type(METHOD_AGGREGATE_C), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_COUNT_PARENTHESIS_R: 'count(' -> type(METHOD_AGGREGATE_COUNT_B), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_DC_PARENTHESIS_R: 'dc(' -> type(METHOD_AGGREGATE_DC), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_DISTINCT_COUNT_PARENTHESIS_R: 'distinct_count(' -> type(METHOD_AGGREGATE_DISTINCT_COUNT), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_EARLIEST_PARENTHESIS_R: 'earliest(' -> type(METHOD_AGGREGATE_EARLIEST), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_EARLIEST_TIME_PARENTHESIS_R: 'earliest_time(' -> type(METHOD_AGGREGATE_EARLIEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_ESTDC_PARENTHESIS_R: 'estdc(' -> type(METHOD_AGGREGATE_ESTDC), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_ESTDC_ERROR_PARENTHESIS_R: 'estdc_error(' -> type(METHOD_AGGREGATE_ESTDC_ERROR), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_FIRST_PARENTHESIS_R: 'first(' -> type(METHOD_AGGREGATE_FIRST), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_LAST_PARENTHESIS_R: 'last(' -> type(METHOD_AGGREGATE_LAST), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_LATEST_PARENTHESIS_R: 'latest(' -> type(METHOD_AGGREGATE_LATEST), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_LATEST_TIME_PARENTHESIS_R: 'latest_time(' -> type(METHOD_AGGREGATE_LATEST_TIME), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_LIST_PARENTHESIS_R: 'list(' -> type(METHOD_AGGREGATE_LIST), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_MAX_PARENTHESIS_R: 'max(' -> type(METHOD_AGGREGATE_MAX), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_MEDIAN_PARENTHESIS_R: 'median(' -> type(METHOD_AGGREGATE_MEDIAN), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_MIN_PARENTHESIS_R: 'min(' -> type(METHOD_AGGREGATE_MIN), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_MODE_PARENTHESIS_R: 'mode(' -> type(METHOD_AGGREGATE_MODE), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_P_PARENTHESIS_R: 'p(' -> type(METHOD_AGGREGATE_P), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_PERC_PARENTHESIS_R: 'perc(' -> type(METHOD_AGGREGATE_PERC), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_EXACTPERC_PARENTHESIS_R: 'exactperc(' -> type(METHOD_AGGREGATE_EXACTPERC), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_UPPERPERC_PARENTHESIS_R: 'upperperc(' -> type(METHOD_AGGREGATE_UPPERPERC), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_PERCINT_PARENTHESIS_R: 'percint(' -> type(METHOD_AGGREGATE_PERCINT), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_RANGE_PARENTHESIS_R: 'range(' -> type(METHOD_AGGREGATE_RANGE), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_RATE_PARENTHESIS_R: 'rate(' -> type(METHOD_AGGREGATE_RATE), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_STDEV_PARENTHESIS_R: 'stdev(' -> type(METHOD_AGGREGATE_STDEV), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_STDEVP_PARENTHESIS_R: 'stdevp(' -> type(METHOD_AGGREGATE_STDEVP), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_SUM_PARENTHESIS_R: 'sum(' -> type(METHOD_AGGREGATE_SUM), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_SUMSQ_PARENTHESIS_R: 'sumsq(' -> type(METHOD_AGGREGATE_SUMSQ), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_VALUES_PARENTHESIS_R: 'values(' -> type(METHOD_AGGREGATE_VALUES), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_VAR_PARENTHESIS_R: 'var(' -> type(METHOD_AGGREGATE_VAR), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_VARP_PARENTHESIS_R: 'varp(' -> type(METHOD_AGGREGATE_VARP), pushMode(AGGREGATION_MODE);
//special percX()
COMMAND_SISTATS_MODE_P_VARIABLE: 'p'COMMAND_SISTATS_MODE_INT -> type(METHOD_AGGREGATE_P_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_PERC_VARIABLE: 'perc'COMMAND_SISTATS_MODE_INT -> type(METHOD_AGGREGATE_PERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_EXACTPERC_VARIABLE: 'exactperc'COMMAND_SISTATS_MODE_INT -> type(METHOD_AGGREGATE_EXACTPERC_VARIABLE), pushMode(AGGREGATION_MODE);
COMMAND_SISTATS_MODE_UPPERPERC_VARIABLE: 'upperperc'COMMAND_SISTATS_MODE_INT -> type(METHOD_AGGREGATE_UPPERPERC_VARIABLE), pushMode(AGGREGATION_MODE);
// characters for string
fragment COMMAND_SISTATS_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' // SISTATS
|'\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_SISTATS_MODE_STRING
// one or more characters
: (COMMAND_SISTATS_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_SISTATS_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 10,086 | ANTLR | .g4 | 207 | 43.256039 | 150 | 0.647465 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | cd77fbabf889aac776aab6e960cf3729a756f1b05a207d22ce07e8d8b1a7365e | false | false | false | false |
489 | GET_T_OR_B.g4 | teragrep_pth_03/src/main/antlr4/imports/GET_T_OR_B.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_T_OR_B;
GET_T_OR_B_ANTLR_BUG: 'get_int_t_or_b_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ GET_INTEGER ++++++++++++++
mode GET_T_OR_B;
// skip
GET_T_OR_B_SPACE: SPACE -> channel(HIDDEN);
// tokens
fragment MINUS: '-';
fragment DIGIT: [0-9]+;
GET_INTEGER_TOP: 'top'DIGIT+ -> popMode;
GET_INTEGER_BOTTOM: 'bottom'DIGIT+ -> popMode;
COMMAND_GET_T_OR_BCOMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT); | 2,470 | ANTLR | .g4 | 58 | 40.741379 | 98 | 0.744495 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 068535cea69c093b246e0802bf69a92f649643ea5120968d93d2ad09d486096d | false | false | false | false |
490 | COMMAND_SITOP_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_SITOP_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_SITOP_MODE;
COMMAND_SITOP_MODE_ANTLR_BUG: 'command_sitop_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_SITOP_MODE ++++++++++++++
mode COMMAND_SITOP_MODE;
// skip
COMMAND_SITOP_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_SITOP_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_SITOP_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_SITOP_MODE_PERCENTFIELD : 'percentfield=' -> pushMode(GET_STRING);
COMMAND_SITOP_MODE_COUNTFIELD : 'countfield=' -> pushMode(GET_STRING);
COMMAND_SITOP_MODE_SHOWCOUNT : 'showcount=' -> pushMode(GET_BOOLEAN);
COMMAND_SITOP_MODE_USEOTHER : 'useother=' -> pushMode(GET_BOOLEAN);
COMMAND_SITOP_MODE_SHOWPERC : 'showperc=' -> pushMode(GET_BOOLEAN);
COMMAND_SITOP_MODE_OTHERSTR : 'otherstr=' -> pushMode(GET_STRING);
COMMAND_SITOP_MODE_LIMIT : 'limit=' -> pushMode(GET_INTEGER);
COMMAND_SITOP_MODE_BY : ('BY'|'by');
COMMAND_SITOP_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_SITOP_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_SITOP_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' // SITOP
|'\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_SITOP_MODE_STRING
// one or more characters
: (COMMAND_SITOP_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_SITOP_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,745 | ANTLR | .g4 | 166 | 28.042169 | 103 | 0.539734 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 8636902a3df67144107a9735a9e936ec38a8b048869c180159642f32d76b02ae | false | false | false | false |
491 | DPLParserTransform_localize.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_localize.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_localize;
localizeTransformation
: COMMAND_MODE_LOCALIZE (t_localize_lmaxpauseOptParameter)? (t_localize_afterOptParameter)? (t_localize_beforeOptParameter)?
;
t_localize_afterOptParameter
: COMMAND_LOCALIZE_MODE_TIMEAFTER spanType
;
t_localize_beforeOptParameter
: COMMAND_LOCALIZE_MODE_TIMEBEFORE spanType
;
t_localize_lmaxpauseOptParameter
: COMMAND_LOCALIZE_MODE_MAXPAUSE spanType
;
| 2,510 | ANTLR | .g4 | 58 | 40.310345 | 132 | 0.769419 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 639cf4a983f56e24524436f114662f580e3ee8fa557e8fc4eb3c12f28ad8fd8a | false | false | false | false |
492 | DPLParserTransform_reverse.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_reverse.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_reverse;
reverseTransformation
: COMMAND_MODE_REVERSE
; //an empty one
| 2,141 | ANTLR | .g4 | 49 | 41.44898 | 98 | 0.772358 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 93cd370a4485298b7311fb1fc57837b63ac2f7d752a37c5f9bf8b3108b3cf8e6 | false | false | false | false |
493 | DPLParserTransform_append.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_append.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_append;
appendTransformation
: COMMAND_MODE_APPEND (t_append_subsearchoptionsParameter)* subsearchStatement
;
t_append_subsearchoptionsParameter
: t_append_subsearchoptions_extendtimerangeParameter
| t_append_subsearchoptions_maxtimeParameter
| t_append_subsearchoptions_maxoutParameter
| t_append_subsearchoptions_timeoutParameter
;
t_append_subsearchoptions_extendtimerangeParameter
: COMMAND_APPEND_MODE_EXTENDTIMERANGE booleanType
;
t_append_subsearchoptions_maxtimeParameter
: COMMAND_APPEND_MODE_MAXTIME integerType
;
t_append_subsearchoptions_maxoutParameter
: COMMAND_APPEND_MODE_MAXOUT integerType
;
t_append_subsearchoptions_timeoutParameter
: COMMAND_APPEND_MODE_TIMEOUT integerType
;
| 2,876 | ANTLR | .g4 | 67 | 39.373134 | 98 | 0.769807 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 83d143ecd49001688cf3bd335786b23b8dec919e8fd6eb71bdebade712e9963e | false | false | false | false |
494 | COMMAND_FINDKEYWORDS_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_FINDKEYWORDS_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_FINDKEYWORDS_MODE;
COMMAND_FINDKEYWORDS_MODE_ANTLR_BUG: 'command_findkeywords_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_FINDKEYWORDS_MODE ++++++++++++++
mode COMMAND_FINDKEYWORDS_MODE;
// skip
COMMAND_FINDKEYWORDS_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_FINDKEYWORDS_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_FINDKEYWORDS_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_FINDKEYWORDS_MODE_LABELFIELD : 'labelfield=' -> pushMode(GET_FIELD);
COMMAND_FINDKEYWORDS_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_FINDKEYWORDS_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_FINDKEYWORDS_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' // FINDKEYWORDS
|'\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_FINDKEYWORDS_MODE_STRING
// one or more characters
: (COMMAND_FINDKEYWORDS_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_FINDKEYWORDS_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,403 | ANTLR | .g4 | 159 | 27.176101 | 110 | 0.533474 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 3f1093b6aa9bf847008c051a28fc7b761599f29b8b32b8677765a0f5d4634456 | false | false | false | false |
495 | DPLParserTransform_metadata.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_metadata.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_metadata;
metadataTransformation
: COMMAND_MODE_METADATA t_metadata_typeParameter (t_metadata_indexParameter)*? (t_metadata_struckServerParameter)? (t_metadata_struckServerGroupParameter)*?
;
t_metadata_indexParameter
: COMMAND_METADATA_MODE_INDEX stringType
;
t_metadata_struckServerGroupParameter
: COMMAND_METADATA_MODE_STRUCK_SERVER_GROUP stringType
;
t_metadata_struckServerParameter
: COMMAND_METADATA_MODE_STRUCK_SERVER stringType
;
t_metadata_typeParameter
: COMMAND_METADATA_MODE_TYPE (t_metadata_metadataType)
;
t_metadata_metadataType
: COMMAND_METADATA_MODE_HOSTS|COMMAND_METADATA_MODE_SOURCES|COMMAND_METADATA_MODE_SOURCETYPES
;
| 2,808 | ANTLR | .g4 | 64 | 40.421875 | 164 | 0.767877 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 6b4bbee2e9d45df5a2c88514c9ab85592e8cc1f3f58c3d32d59091d8d68e7f11 | false | false | false | false |
496 | COMMAND_METASEARCH_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_METASEARCH_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_METASEARCH_MODE;
COMMAND_METASEARCH_MODE_ANTLR_BUG: 'command_metasearch_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_METASEARCH_MODE ++++++++++++++
mode COMMAND_METASEARCH_MODE;
// skip
COMMAND_METASEARCH_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_METASEARCH_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_METASEARCH_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_METASEARCH_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,562 | ANTLR | .g4 | 57 | 43.052632 | 98 | 0.755404 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 30e18efcf72e40b58e41e39c763b40a6ad0a343d30dbbb55adedfeba492a983d | false | false | false | false |
497 | COMMAND_TSCOLLECT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TSCOLLECT_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_TSCOLLECT_MODE;
COMMAND_TSCOLLECT_MODE_ANTLR_BUG: 'command_tscollect_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TSCOLLECT_MODE ++++++++++++++
mode COMMAND_TSCOLLECT_MODE;
// skip
COMMAND_TSCOLLECT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TSCOLLECT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TSCOLLECT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_TSCOLLECT_MODE_KEEPRESULTS : 'keepresults=' -> pushMode(GET_BOOLEAN);
COMMAND_TSCOLLECT_MODE_SQUASHCASE : 'squashcase=' -> pushMode(GET_BOOLEAN);
COMMAND_TSCOLLECT_MODE_NAMESPACE : 'namespace=' -> pushMode(GET_STRING);
COMMAND_TSCOLLECT_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_TSCOLLECT_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_TSCOLLECT_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' // TSCOLLECT
|'\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_TSCOLLECT_MODE_STRING
// one or more characters
: (COMMAND_TSCOLLECT_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_TSCOLLECT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,509 | ANTLR | .g4 | 161 | 27.484472 | 107 | 0.536009 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | e0c08164974411a2427e754903d3079a9ada4e2c7d1a7d8d9e83597e85592403 | false | false | false | false |
498 | COMMAND_REGEX_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_REGEX_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_REGEX_MODE;
COMMAND_REGEX_MODE_ANTLR_BUG: 'command_regex_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_REGEX_MODE ++++++++++++++
mode COMMAND_REGEX_MODE;
// skip
COMMAND_REGEX_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_REGEX_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_REGEX_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_REGEX_MODE_NEQ : '!=' -> pushMode(GET_REGEX_STRING);
COMMAND_REGEX_MODE_EQ : '=' -> pushMode(GET_REGEX_STRING);
COMMAND_REGEX_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_REGEX_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_REGEX_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' // REGEX
|'\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_REGEX_MODE_STRING
// one or more characters
: (COMMAND_REGEX_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_REGEX_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,309 | ANTLR | .g4 | 160 | 26.46875 | 103 | 0.523439 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 46be232880639685ff20da9875ce60523b2ac6058cb7d17be4cd42981de345a6 | false | false | false | false |
499 | COMMAND_TIMEWRAP_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_TIMEWRAP_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_TIMEWRAP_MODE;
COMMAND_TIMEWRAP_MODE_ANTLR_BUG: 'command_timewrap_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_TIMEWRAP_MODE ++++++++++++++
mode COMMAND_TIMEWRAP_MODE;
// skip
COMMAND_TIMEWRAP_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_TIMEWRAP_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_TIMEWRAP_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_TIMEWRAP_MODE_SPAN_DURATION: COMMAND_TIMEWRAP_MODE_INTEGER?(SPANUNITS|SPANUNITM|SPANUNITH|SPANUNITD|SPANUNITW|SPANUNITMON|SPANUNITY);
fragment SPANUNITS: 's'| 'sec' | 'secs' | 'second'| 'seconds'| 'S';
fragment SPANUNITM: 'm'| 'min'| 'minute' | 'minutes'| 'seconds'|'M';
fragment SPANUNITH: 'h'| 'hr' | 'hrs'| 'hour'| 'hours'|'H';
fragment SPANUNITD: 'd' | 'day' | 'days'|'D';
fragment SPANUNITY: 'y'| 'year' |'years'|'Y';
fragment SPANUNITW: 'w' | 'week' | 'weeks'| 'W' ;
fragment SPANUNITMON: 'mon'| 'month' | 'months'|'MON';
COMMAND_TIMEWRAP_MODE_TIME_FORMAT : 'time_format=' -> pushMode(GET_STRING);
COMMAND_TIMEWRAP_MODE_SERIES : 'series=' -> pushMode(COMMAND_TIMEWRAP_MODE_SERIES_MODE);
COMMAND_TIMEWRAP_MODE_ALIGN : 'align=' -> pushMode(COMMAND_TIMEWRAP_MODE_ALIGN_MODE);
fragment COMMAND_TIMEWRAP_MODE_DIGIT: [0-9];
fragment COMMAND_TIMEWRAP_MODE_MINUS: '-';
fragment COMMAND_TIMEWRAP_MODE_INTEGER: (COMMAND_TIMEWRAP_MODE_MINUS)? COMMAND_TIMEWRAP_MODE_DIGIT+;
COMMAND_TIMEWRAP_MODE_SINGLE_STRING: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_TIMEWRAP_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_TIMEWRAP_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' // TIMEWRAP
|'\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_TIMEWRAP_MODE_STRING
// one or more characters
: (COMMAND_TIMEWRAP_MODE_CHAR)+;
mode COMMAND_TIMEWRAP_MODE_ALIGN_MODE;
COMMAND_TIMEWRAP_MODE_ALIGN_MODE_END : 'end' -> popMode;
COMMAND_TIMEWRAP_MODE_ALIGN_MODE_NOW : 'now' -> popMode;
mode COMMAND_TIMEWRAP_MODE_SERIES_MODE;
COMMAND_TIMEWRAP_MODE_SERIES_MODE_RELATIVE : 'relative' -> popMode;
COMMAND_TIMEWRAP_MODE_SERIES_MODE_SHORT : 'short' -> popMode;
COMMAND_TIMEWRAP_MODE_SERIES_MODE_EXACT : 'exact' -> popMode;
COMMAND_TIMEWRAP_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 6,606 | ANTLR | .g4 | 179 | 30.726257 | 141 | 0.56766 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 942cee0d1ecf93aa69d77956ac494247855b662aa9d8b66b43a0a7c805caf767 | false | false | false | false |
500 | DPLParserTransform_nomv.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_nomv.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_nomv;
nomvTransformation
: COMMAND_MODE_NOMV fieldType
;
| 2,128 | ANTLR | .g4 | 49 | 41.163265 | 98 | 0.772749 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 627da8767ef3539c861ab7fe44801a33035727ce848ae9bc89ce61fd99cabb09 | false | false | false | false |
501 | COMMAND_REX4J_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_REX4J_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_REX4J_MODE;
COMMAND_REX4J_MODE_ANTLR_BUG: 'command_rex4j_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_REX4J_MODE ++++++++++++++
mode COMMAND_REX4J_MODE;
// skip
COMMAND_REX4J_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_REX4J_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_REX4J_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_REX4J_MODE_OFFSET_FIELD : 'offset_field=' -> pushMode(GET_STRING);
COMMAND_REX4J_MODE_MAX_MATCH : 'max_match=' -> pushMode(GET_INTEGER);
COMMAND_REX4J_MODE_FIELD : 'field=' -> pushMode(GET_FIELD);
COMMAND_REX4J_MODE_MODE : 'mode=';
COMMAND_REX4J_MODE_SED: 'sed';
//COMMAND_REX4J_MODE_WILDCARD: '*' -> type(WILDCARD);
COMMAND_REX4J_MODE_DQSTRING:'"' ( '\\'. | ~('"'| '\\') )* '"' -> type(GET_REGEX_STRING_DOUBLE_QUOTED);
// characters for string
COMMAND_REX4J_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT); | 2,971 | ANTLR | .g4 | 65 | 43.907692 | 102 | 0.739821 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 08b999b458581d956c340bdbdfaceb1faa4a7f373913522ea5b0317c17679725 | false | false | false | false |
502 | GET_WHERE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/GET_WHERE_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 GET_WHERE_MODE;
GET_WHERE_MODE_ANTLR_BUG: 'get_where_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_ABSTRACT_MODE ++++++++++++++
mode GET_WHERE_MODE;
// skip
GET_WHERE_MODE_SPACE: SPACE -> channel(HIDDEN);
// valid for fields
// Reserved words
GET_WHERE_MODE_TIMEFORMAT: 'timeformat=' -> pushMode(GET_STRING);
GET_WHERE_MODE_EARLIEST: 'earliest=' -> pushMode(GET_TIME);
GET_WHERE_MODE_INDEX_EARLIEST: '_index_earliest=' -> pushMode(GET_STRING);
GET_WHERE_MODE_STARTDAYSAGO: 'stardaysago=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_STARTHOURSAGO: 'starthoursago=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_STARTMINUTESAGO: 'startminutesago=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_STARTMONTHSAGO: 'startmonthsago=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_STARTTIME: 'starttime=' -> pushMode(GET_STRING);
GET_WHERE_MODE_STARTTIMEU: 'starttimeu=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_LATEST: 'latest=' -> pushMode(GET_TIME);
GET_WHERE_MODE_INDEX_LATEST: '_index_latest=' -> pushMode(GET_STRING);
GET_WHERE_MODE_ENDDAYSAGO: 'enddaysago=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_ENDHOURSAGO: 'endhoursago=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_ENDMINUTESAGO: 'endminutesago=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_ENDMONTHSAGO: 'endmonthsago=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_ENDTIME: 'endtime=' -> pushMode(GET_STRING);
GET_WHERE_MODE_ENDTIMEU: 'endtimeu=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_SEARCHTIMESPANDAYS: 'searchtimespandays=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_SEARCHTIMESPANHOURS: 'searchtimespanhours=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_SEARCHTIMESPANMINUTES: 'searchtimespanminutes=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_SEARCHTIMESPANMONHTS: 'searchtimespanmonths=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_MINUTESAGO: 'minutesago=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_HOURSAGO: 'hoursago=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_DAYSAGO: 'daysago=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_MONTHSAGO: 'monthsago=' -> pushMode(GET_INTEGER);
GET_WHERE_MODE_EVENTTYPE: 'eventtype';
GET_WHERE_MODE_EVENTTYPETAG: 'eventtypetag';
GET_WHERE_MODE_HOST: 'host';
GET_WHERE_MODE_HOSTTAG: 'hosttag';
GET_WHERE_MODE_INDEX: 'index';
GET_WHERE_MODE_SAVEDSEARCH: 'savedsearch';
GET_WHERE_MODE_SOURCE: 'source';
GET_WHERE_MODE_SOURCETYPE: 'sourcetype';
//special for tstats
COMMAND_TSTATS_MODE_NODENAME: 'nodename=' -> pushMode(GET_STRING);
GET_WHERE_MODE_TAG: 'tag';
//push to diffrent MODE_MODE's
GET_WHERE_MODE_AND: 'AND';
GET_WHERE_MODE_NOT: 'NOT';
GET_WHERE_MODE_OR: 'OR';
GET_WHERE_MODE_TERM: 'TERM';
GET_WHERE_MODE_CASE: 'CASE';
GET_WHERE_MODE_IN: 'IN';
GET_WHERE_MODE_BY_BY : ('BY'|'by'|'By') -> pushMode(GET_WHERE_MODE_BY);
GET_WHERE_MODE_GROUPBY : ('GROUPBY'|'groupby') -> pushMode(GET_WHERE_MODE_BY);
// charType, common types
GET_WHERE_MODE_PARENTHESIS_L: '(';
GET_WHERE_MODE_PARENTHESIS_R: ')';
GET_WHERE_MODE_BRACKET_L: '[' -> pushMode(COMMAND_MODE);
GET_WHERE_MODE_BRACKET_R: ']' -> popMode, popMode;
GET_WHERE_MODE_C_BRACKET_L: '{';
GET_WHERE_MODE_C_BRACKET_R: '}';
GET_WHERE_MODE_PIPE: '|' -> pushMode(COMMAND_MODE);
GET_WHERE_MODE_COMMA: ',';
GET_WHERE_MODE_COLON: ':';
GET_WHERE_MODE_DOT: '.';
GET_WHERE_MODE_EXCLAMATION: '!';
GET_WHERE_MODE_QUOTE: '" ';
GET_WHERE_MODE_SINGLE_QUOTE: '\'';
GET_WHERE_MODE_DOLLAR: '$';
GET_WHERE_MODE_AT_SIGN: '@';
GET_WHERE_MODE_NULL: 'null';
GET_WHERE_MODE_MINUS: '-';
GET_WHERE_MODE_PLUS: '+';
GET_WHERE_MODE_PERCENT: '%';
GET_WHERE_MODE_WILDCARD: '*';
GET_WHERE_MODE_SLASH: '/';
// equality
GET_WHERE_MODE_DEQ: '==';
GET_WHERE_MODE_EQ: '=';
GET_WHERE_MODE_NEQ: '!=';
GET_WHERE_MODE_LT: '<';
GET_WHERE_MODE_LTE: '<=';
GET_WHERE_MODE_GT: '>';
GET_WHERE_MODE_GTE: '>=';
// quotation types
GET_WHERE_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_SINGLE_QUOTED);
GET_WHERE_MODE_SQSTRING: '\'' ( '\\'. | '""' | ~('"'| '\\') )* '\'' -> type(GET_STRING_DOUBLE_QUOTED);
// integers
fragment GET_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
;
GET_WHERE_MODE_STRING
: (GET_WHERE_MODE_CHAR)+ -> type(GET_STRING_STRING);
GET_WHERE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 8,453 | ANTLR | .g4 | 231 | 31.636364 | 102 | 0.601024 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 67c2fec81cee3189acb8ede4c017f01dabfc26361e6b45505b4c288a94c68124 | false | false | false | false |
503 | COMMAND_XYSERIES_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_XYSERIES_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_XYSERIES_MODE;
COMMAND_XYSERIES_MODE_ANTLR_BUG: 'command_xyseries_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_XYSERIES_MODE ++++++++++++++
mode COMMAND_XYSERIES_MODE;
// skip
COMMAND_XYSERIES_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_XYSERIES_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_XYSERIES_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_XYSERIES_MODE_GROUPED : 'grouped=' -> pushMode(GET_BOOLEAN);
COMMAND_XYSERIES_MODE_FORMAT : 'format=' -> pushMode(GET_STRING);
COMMAND_XYSERIES_MODE_SEP : 'sep=' -> pushMode(GET_STRING);
COMMAND_XYSERIES_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_XYSERIES_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_XYSERIES_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' // XYSERIES
|'\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_XYSERIES_MODE_STRING
// one or more characters
: (COMMAND_XYSERIES_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_XYSERIES_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,457 | ANTLR | .g4 | 161 | 27.15528 | 106 | 0.532487 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | f3d500309cb9a0720aac2d06e5bdf807c57703f4be6c26789ff8e88c61d75485 | false | false | false | false |
504 | COMMAND_EXPLAIN_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_EXPLAIN_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_EXPLAIN_MODE;
COMMAND_EXPLAIN_MODE_ANTLR_BUG: 'command_explain_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_EXPLAIN_MODE ++++++++++++++
mode COMMAND_EXPLAIN_MODE;
// skip
COMMAND_EXPLAIN_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_EXPLAIN_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_EXPLAIN_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_EXPLAIN_MODE_BRIEF : ('brief' | 'BRIEF');
COMMAND_EXPLAIN_MODE_EXTENDED : ('extended' | 'EXTENDED');
COMMAND_EXPLAIN_MODE_CODEGEN : ('codegen' | 'CODEGEN');
COMMAND_EXPLAIN_MODE_COST : ('cost' | 'COST');
COMMAND_EXPLAIN_MODE_FORMATTED : ('formatted' | 'FORMATTED');
COMMAND_EXPLAIN_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT); | 2,809 | ANTLR | .g4 | 62 | 43.483871 | 98 | 0.74781 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 4c2f5dc441c22ebf21efd06f8834b3683f7afa1daf9bbd2ad53dbcfbb2096a37 | false | false | false | false |
505 | DPLParserTransform_script.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_script.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_script;
scriptTransformation
: COMMAND_MODE_SCRIPT stringType (stringType)* (t_script_maxinputsParameter)?
;
t_script_maxinputsParameter
: COMMAND_SCRIPT_MODE_MAXINPUTS integerType
;
| 2,271 | ANTLR | .g4 | 52 | 41.153846 | 98 | 0.771209 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | b093cf7240b1d42b6cfee7e10b8437001b533aa10353fb9f8e3f0ecfcad35d95 | false | false | false | false |
506 | DPLParserTransform_fillnull.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_fillnull.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_fillnull;
fillnullTransformation
: COMMAND_MODE_FILLNULL (t_fillnull_valueParameter)? (fieldListType)?
;
t_fillnull_valueParameter
: COMMAND_FILLNULL_MODE_VALUE stringType
;
| 2,272 | ANTLR | .g4 | 52 | 40.980769 | 98 | 0.770729 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | f9700400911f8677c5a3ed665020fddb59c974546913b718e4355f6a4ff9932d | false | false | false | false |
507 | COMMAND_RTORDER_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_RTORDER_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_RTORDER_MODE;
COMMAND_RTORDER_MODE_ANTLR_BUG: 'command_rtorder_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_RTORDER_MODE ++++++++++++++
mode COMMAND_RTORDER_MODE;
// skip
COMMAND_RTORDER_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_RTORDER_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_RTORDER_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_RTORDER_MODE_MAX_BUFFER_SIZE : 'max_buffer_size=' -> pushMode(GET_INTEGER);
COMMAND_RTORDER_MODE_BUFFER_SPAN : 'buffer_span=' -> pushMode(GET_SPAN);
COMMAND_RTORDER_MODE_DISCARD : 'discard=' -> pushMode(GET_BOOLEAN);
COMMAND_RTORDER_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,759 | ANTLR | .g4 | 60 | 44.15 | 98 | 0.751949 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 85070b196aaf172562bbb3f93c86cc0b7c4ffa013362fecbae3e8adc16cccbd5 | false | false | false | false |
508 | DPLParserTransform_dpl.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_dpl.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_dpl;
dplTransformation
: COMMAND_MODE_DPL t_dpl_basefilenameParameter? t_dpl_subsearchParameter?
;
t_dpl_basefilenameParameter
: COMMAND_DPL_MODE_DEBUG stringType
;
t_dpl_subsearchParameter
: COMMAND_DPL_MODE_SUBSEARCH booleanType
;
| 2,338 | ANTLR | .g4 | 55 | 39.763636 | 98 | 0.767881 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | e9e757c43b2ab52919eb33cd6a148d80411d00c3ae5f5d78bae8da7d0238fee7 | false | false | false | false |
509 | DPLParserTransform_rtorder.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_rtorder.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_rtorder;
rtorderTransformation
: COMMAND_MODE_RTORDER (t_rtorder_discardParameter)? (t_rtorder_bufferSpanParameter)? (t_rtorder_maxBufferSizeParameter)?
;
t_rtorder_bufferSpanParameter
: COMMAND_RTORDER_MODE_BUFFER_SPAN spanType
;
t_rtorder_discardParameter
: COMMAND_RTORDER_MODE_DISCARD booleanType
;
t_rtorder_maxBufferSizeParameter
: COMMAND_RTORDER_MODE_MAX_BUFFER_SIZE integerType
;
| 2,514 | ANTLR | .g4 | 58 | 40.344828 | 129 | 0.768382 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | ea5bbc5b44ea6f80050b53598ca099a157eb31e6c325cc5dd09d61cfded5a208 | false | false | false | false |
510 | DPLParserTransform_meventcollect.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_meventcollect.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_meventcollect;
meventcollectTransformation
: COMMAND_MODE_MEVENTCOLLECT (t_meventcollect_indexParameter)? (t_meventcollect_fileParameter)? (t_meventcollect_splitParameter)? (t_meventcollect_spoolParameter)? (t_meventcollect_prefixFieldParameter)? (t_meventcollect_hostParameter)? (t_meventsource_sourceParameter)? (t_meventcollect_sourcetypeParameter)? (fieldListType)?
;
t_meventcollect_fileParameter
: COMMAND_MEVENTCOLLECT_MODE_PREFIX_FILE stringType
;
t_meventcollect_hostParameter
: COMMAND_MEVENTCOLLECT_MODE_HOST stringType
;
t_meventcollect_indexParameter
: COMMAND_MEVENTCOLLECT_MODE_INDEX stringType
;
t_meventcollect_prefixFieldParameter
: COMMAND_MEVENTCOLLECT_MODE_PREFIX_FIELD stringType
;
t_meventsource_sourceParameter
: COMMAND_MEVENTCOLLECT_MODE_SOURCE stringType
;
t_meventcollect_sourcetypeParameter
: COMMAND_MEVENTCOLLECT_MODE_SOURCETYPE stringType
;
t_meventcollect_splitParameter
: COMMAND_MEVENTCOLLECT_MODE_SPLIT booleanType
;
t_meventcollect_spoolParameter
: COMMAND_MEVENTCOLLECT_MODE_SPOOL booleanType
;
| 3,240 | ANTLR | .g4 | 73 | 40.671233 | 334 | 0.770352 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | d2f11a7d0797028ec90d2809f8eb79d41ed45ddbe50e203961940d8b6c2d8e8b | false | false | false | false |
511 | DPLParserTransform_convert.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_convert.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_convert;
// convert ++++++++
convertTransformation
: COMMAND_MODE_CONVERT (t_convert_timeformatParameter)? ((convertMethodAuto|convertMethodMktime|convertMethodCtime|convertMethodDur2sec|convertMethodMemk|convertMethodMstime|convertMethodNone|convertMethodNum|convertMethodRmcomma|convertMethodRmunit) (t_convert_fieldRenameInstruction)?)+
;
convertMethodAuto
: COMMAND_CONVERT_MODE_AUTO (COMMAND_CONVERT_MODE_PARENTHESIS_L (fieldListType)? COMMAND_CONVERT_MODE_PARENTHESIS_R)?
;
convertMethodCtime
: COMMAND_CONVERT_MODE_CTIME (COMMAND_CONVERT_MODE_PARENTHESIS_L (fieldListType)? COMMAND_CONVERT_MODE_PARENTHESIS_R)?
;
convertMethodDur2sec
: COMMAND_CONVERT_MODE_DUR2SEC (COMMAND_CONVERT_MODE_PARENTHESIS_L (fieldListType)? COMMAND_CONVERT_MODE_PARENTHESIS_R)?
;
convertMethodMemk
: COMMAND_CONVERT_MODE_MEMK (COMMAND_CONVERT_MODE_PARENTHESIS_L (fieldListType)? COMMAND_CONVERT_MODE_PARENTHESIS_R)?
;
convertMethodMktime
: COMMAND_CONVERT_MODE_MKTIME (COMMAND_CONVERT_MODE_PARENTHESIS_L (fieldListType)? COMMAND_CONVERT_MODE_PARENTHESIS_R)?
;
convertMethodMstime
: COMMAND_CONVERT_MODE_MSTIME (COMMAND_CONVERT_MODE_PARENTHESIS_L (fieldListType)? COMMAND_CONVERT_MODE_PARENTHESIS_R)?
;
convertMethodNone
: COMMAND_CONVERT_MODE_NONE (COMMAND_CONVERT_MODE_PARENTHESIS_L (fieldListType)? COMMAND_CONVERT_MODE_PARENTHESIS_R)?
;
convertMethodNum
: COMMAND_CONVERT_MODE_NUM (COMMAND_CONVERT_MODE_PARENTHESIS_L (fieldListType)? COMMAND_CONVERT_MODE_PARENTHESIS_R)?
;
convertMethodRmcomma
: COMMAND_CONVERT_MODE_RMCOMMA (COMMAND_CONVERT_MODE_PARENTHESIS_L (fieldListType)? COMMAND_CONVERT_MODE_PARENTHESIS_R)?
;
convertMethodRmunit
: COMMAND_CONVERT_MODE_RMUNIT (COMMAND_CONVERT_MODE_PARENTHESIS_L (fieldListType)? COMMAND_CONVERT_MODE_PARENTHESIS_R)?
;
t_convert_timeformatParameter
: COMMAND_CONVERT_MODE_TIMEFORMAT stringType
;
t_convert_fieldRenameInstruction
: COMMAND_CONVERT_MODE_AS fieldType
;
| 4,171 | ANTLR | .g4 | 86 | 44.383721 | 296 | 0.766527 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | a72069697eabfa2758b5a4675144c455fc9daa20d651b08558662a7fcf3de5da | false | false | false | false |
512 | COMMAND_REST_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_REST_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_REST_MODE;
COMMAND_REST_MODE_ANTLR_BUG: 'command_rest_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_REST_MODE ++++++++++++++
mode COMMAND_REST_MODE;
// skip
COMMAND_REST_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_REST_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_REST_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
fragment LETTER: [a-zA-Z];
COMMAND_REST_MODE_STRUCK_SERVER_GROUP : 's'LETTER LETTER'u' LETTER 'k_server_group=' -> pushMode(GET_FIELD);
COMMAND_REST_MODE_TIMEOUT : 'timeout=' -> pushMode(GET_INTEGER);
COMMAND_REST_MODE_COUNT : 'count=' -> pushMode(GET_INTEGER) ;
COMMAND_REST_MODE_EQ : '=' -> pushMode(GET_STRING);
fragment COMMAND_REST_MODE_DIGIT: [0-9];
COMMAND_REST_MODE_MINUS: '-';
COMMAND_REST_MODE_INTEGER: (COMMAND_REST_MODE_MINUS)? COMMAND_REST_MODE_DIGIT+;
COMMAND_REST_MODE_SINGLE_STRING:'\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED);
COMMAND_REST_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED);
COMMAND_REST_MODE_STRUCK_SERVER: 's'LETTER LETTER'u' LETTER 'k_server=' -> pushMode(GET_FIELD);
// characters for string
fragment COMMAND_REST_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' // REST
|'\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_REST_MODE_STRING
// one or more characters
: (COMMAND_REST_MODE_CHAR)+ -> type(GET_STRING_STRING);
COMMAND_REST_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,771 | ANTLR | .g4 | 167 | 28.02994 | 108 | 0.540086 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 979ec85cdde36605df5d20307046852a980cfff7245701e380fb55713b5228a8 | false | false | false | false |
513 | COMMAND_ICONIFY_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_ICONIFY_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_ICONIFY_MODE;
COMMAND_ICONIFY_MODE_ANTLR_BUG: 'command_iconify_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_ICONIFY_MODE ++++++++++++++
mode COMMAND_ICONIFY_MODE;
// skip
COMMAND_ICONIFY_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_ICONIFY_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_ICONIFY_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_ICONIFY_MODE_COMMA : ',' -> type(COMMA);
COMMAND_ICONIFY_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_ICONIFY_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for string
fragment COMMAND_ICONIFY_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' // ICONIFY
|'\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_ICONIFY_MODE_STRING
// one or more characters
: (COMMAND_ICONIFY_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_ICONIFY_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,297 | ANTLR | .g4 | 159 | 26.503145 | 105 | 0.524702 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 713d99ac14cab6de29497f1b5afe5b63dd6a7a2f69e342e597e23784052f21c8 | false | false | false | false |
514 | DPLParserTransform_highlight.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_highlight.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_highlight;
highlightTransformation
: COMMAND_MODE_HIGHLIGHT (stringType)+
;
| 2,146 | 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) | 447170a0a4f5f01843c5fed575c3d64c49283386442b6cc104fb52fc785556ac | false | false | false | false |
515 | DPLParserTransform_makejson.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_makejson.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_makejson;
makejsonTransformation
: COMMAND_MODE_MAKEJSON fieldListType t_makejson_outputParameter
;
t_makejson_outputParameter
: COMMAND_MAKEJSON_MODE_OUTPUT stringType
;
| 2,265 | ANTLR | .g4 | 52 | 40.923077 | 98 | 0.771041 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | a955565576cb23f202651d7cac56b02b7923f0047941943985eefa8bc8d9b98d | false | false | false | false |
516 | COMMAND_FIELDFORMAT_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_FIELDFORMAT_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_FIELDFORMAT_MODE;
COMMAND_FIELDFORMAT_MODE_ANTLR_BUG: 'command_fieldformat_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ EVAL_LANGUAGE_MODE ++++++++++++++
mode COMMAND_FIELDFORMAT_MODE;
// skip
COMMAND_FIELDFORMAT_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_FIELDFORMAT_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_FIELDFORMAT_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_FIELDFORMAT_MODE_EQ: '=' -> pushMode(EVAL_LANGUAGE_MODE);
COMMAND_FIELDFORMAT_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\''-> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_FIELDFORMAT_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
// characters for 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' {false}? // =
|'\u003E' // >
|'\u003F' // ?
|'\u0040' // FIELDFORMAT
|'\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_FIELDFORMAT_MODE_STRING
// one or more characters
: (CHAR)+ -> type(GET_FIELD_STRING);
// comments
COMMAND_FIELDFORMAT_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 5,335 | ANTLR | .g4 | 160 | 26.56875 | 109 | 0.52753 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 6bb8b0983b70b7d0925b5884d362fcb65fc58de0d4d856567244f07e8edfd00c | false | false | false | false |
517 | DPLParserTransform_bucketdir.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_bucketdir.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_bucketdir;
bucketdirTransformation
: COMMAND_MODE_BUCKETDIR t_bucketdir_pathfieldParameter t_bucketdir_sizefieldParameter (t_bucketdir_maxcountParameter|t_bucketdir_countfieldParameter|t_bucketdir_sepParameter)*?
;
t_bucketdir_countfieldParameter
: COMMAND_BUCKETDIR_MODE_COUNTFIELD fieldType
;
t_bucketdir_maxcountParameter
: COMMAND_BUCKETDIR_MODE_MAXCOUNT integerType
;
t_bucketdir_pathfieldParameter
: COMMAND_BUCKETDIR_MODE_PATHFIELD fieldType
;
t_bucketdir_sepParameter
: COMMAND_BUCKETDIR_MODE_SEP stringType
;
t_bucketdir_sizefieldParameter
: COMMAND_BUCKETDIR_MODE_SIZEFIELD fieldType
;
| 2,757 | ANTLR | .g4 | 64 | 39.703125 | 185 | 0.770608 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | d9ac89c903e38058958ac257498c699cac17c7fcb852c0791ae12b6e129aaf7c | false | false | false | false |
518 | COMMAND_CORRELATE_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_CORRELATE_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_CORRELATE_MODE;
COMMAND_CORRELATE_MODE_ANTLR_BUG: 'command_correlate_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_CORRELATE_MODE ++++++++++++++
mode COMMAND_CORRELATE_MODE;
// skip
COMMAND_CORRELATE_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_CORRELATE_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_CORRELATE_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_CORRELATE_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 2,553 | ANTLR | .g4 | 57 | 42.894737 | 98 | 0.75452 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 2466dce5981bae7414930770efaccd1423903080e77b03636fb69e13680dc0d9 | false | false | false | false |
519 | DPLParserTransform_sendalert.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_sendalert.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_sendalert;
sendalertTransformation
: COMMAND_MODE_SENDALERT stringType (t_sendalert_resultsLinkParameter)? (t_sendalert_resultsPathParameter)? (COMMAND_SENDALERT_MODE_PARAM COMMAND_SENDALERT_MODE_DOT stringType COMMAND_SENDALERT_MODE_EQ stringType)*
;
t_sendalert_resultsLinkParameter
: COMMAND_SENDALERT_MODE_RESULTS_LINK stringType
;
t_sendalert_resultsPathParameter
: COMMAND_SENDALERT_MODE_RESULTS_PATH stringType
;
| 2,527 | ANTLR | .g4 | 55 | 43.163636 | 222 | 0.77575 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 3f3368480f6790da70707a66025884d785d61d93ae3ea10a53900ea764356608 | false | false | false | false |
520 | DPLParserTransform_selfjoin.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_selfjoin.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_selfjoin;
selfjoinTransformation
: COMMAND_MODE_SELFJOIN (t_selfjoin_selfjoinOptParameter)* fieldListType
;
t_selfjoin_selfjoinOptParameter
: COMMAND_SELFJOIN_MODE_OVERWRITE booleanType
| COMMAND_SELFJOIN_MODE_MAX integerType
| COMMAND_SELFJOIN_MODE_KEEPSINGLE booleanType
;
| 2,378 | ANTLR | .g4 | 54 | 41.296296 | 98 | 0.771318 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 9466d21bbd7abca444d1fced63233cfe0b972ea02fd4fbd733d9ccf16f3ed16c | false | false | false | false |
521 | DPLParserTransform_inputcsv.g4 | teragrep_pth_03/src/main/antlr4/imports/DPLParserTransform_inputcsv.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_inputcsv;
inputcsvTransformation
: COMMAND_MODE_INPUTCSV (t_inputcsv_dispatchParameter)? (t_inputcsv_appendParameter)? (t_inputcsv_startParameter)? (t_inputcsv_maxParameter)? (t_inputcsv_eventsParameter)? t_inputcsv_filenameType (t_inputcsv_whereQuery)?
;
t_inputcsv_appendParameter
: COMMAND_INPUTCSV_MODE_APPEND booleanType
;
t_inputcsv_dispatchParameter
: COMMAND_INPUTCSV_MODE_DISPATCH booleanType
;
t_inputcsv_eventsParameter
: COMMAND_INPUTCSV_MODE_EVENTS booleanType
;
t_inputcsv_maxParameter
: COMMAND_INPUTCSV_MODE_MAX integerType
;
t_inputcsv_startParameter
: COMMAND_INPUTCSV_MODE_START integerType
;
t_inputcsv_filenameType
: ((COMMAND_INPUTCSV_MODE_SLASH)? stringType (COMMAND_INPUTCSV_MODE_SLASH))* stringType (COMMAND_INPUTCSV_MODE_DOT stringType)?
;
t_inputcsv_whereQuery //special case
: (COMMAND_INPUTCSV_MODE_WHERE) logicalStatement
;
| 3,058 | ANTLR | .g4 | 70 | 39.9 | 228 | 0.759865 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 3c6cd20838bbfe621e033b29762b06b80b4ddd28ba19d04fc29c3db0fad104b8 | false | false | false | false |
522 | COMMAND_LOOKUP_MODE.g4 | teragrep_pth_03/src/main/antlr4/imports/COMMAND_LOOKUP_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_LOOKUP_MODE;
COMMAND_LOOKUP_MODE_ANTLR_BUG: 'command_lookup_mode_antlr_bug' -> type(STRING_MATCH);
// ++++++++++++++ COMMAND_LOOKUP_MODE ++++++++++++++
mode COMMAND_LOOKUP_MODE;
// skip
COMMAND_LOOKUP_MODE_SPACE: SPACE -> channel(HIDDEN);
// exits
COMMAND_LOOKUP_MODE_PIPE: '|' -> type(PIPE), popMode;
COMMAND_LOOKUP_MODE_BRACKET_R: ']' -> type(BRACKET_R), popMode, popMode;
// tokens
COMMAND_LOOKUP_MODE_UPDATE : 'update=' -> pushMode(GET_BOOLEAN);
COMMAND_LOOKUP_MODE_LOCAL : 'local=' -> pushMode(GET_BOOLEAN);
COMMAND_LOOKUP_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_STRING_SINGLE_QUOTED), pushMode(COMMAND_LOOKUP_FIELD_MODE);
COMMAND_LOOKUP_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_STRING_DOUBLE_QUOTED), pushMode(COMMAND_LOOKUP_FIELD_MODE);
// characters for string
fragment COMMAND_LOOKUP_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' // LOOKUP
|'\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_LOOKUP_MODE_STRING
// one or more characters
: (COMMAND_LOOKUP_MODE_CHAR)+ -> type(GET_STRING_STRING), pushMode(COMMAND_LOOKUP_FIELD_MODE);
mode COMMAND_LOOKUP_FIELD_MODE;
COMMAND_LOOKUP_FIELD_MODE_SPACE: SPACE -> channel(HIDDEN);
COMMAND_LOOKUP_FIELD_MODE_AS : ('as'|'As'|'AS') -> pushMode(GET_FIELD);
COMMAND_LOOKUP_FIELD_MODE_SINGLE_QUOTE: '\'' ( '\\'. | ~('\''| '\\') )* '\'' -> type(GET_FIELD_SINGLE_QUOTED);
COMMAND_LOOKUP_FIELD_MODE_DQSTRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"' -> type(GET_FIELD_DOUBLE_QUOTED);
COMMAND_LOOKUP_FIELD_MODE_OUTPUT: ('output' | 'OUTPUT') -> pushMode(GET_FIELD);
COMMAND_LOOKUP_FIELD_MODE_OUTPUTNEW: ('OUTPUTNEW' | 'outputnew') -> pushMode(GET_FIELD);
// characters for string
fragment COMMAND_LOOKUP_FIELD_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' // LOOKUP
|'\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_LOOKUP_FIELD_MODE_STRING
// one or more characters
: (COMMAND_LOOKUP_FIELD_MODE_CHAR)+ -> type(GET_FIELD_STRING);
COMMAND_LOOKUP_FIELD_MODE_COMMENT: '<!--' .*? '-->' -> channel(DPLCOMMENT);
| 8,543 | ANTLR | .g4 | 266 | 24.387218 | 142 | 0.470203 | teragrep/pth_03 | 0 | 4 | 34 | AGPL-3.0 | 9/19/2024, 2:49:36 PM (Europe/Amsterdam) | 6e048ea3d2b3a97dce7ce89fd7701e9794981bef5535552cd00d43c40adcba38 | false | false | false | false |
Subsets and Splits