Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
449 changes: 449 additions & 0 deletions eclipse-java-formatter.xml

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions license-header
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Data Processing Language (DPL) parser
* Copyright (C) 2026 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://www.gnu.org/licenses/>.
*
*
* 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.
*/
163 changes: 117 additions & 46 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<packaging>jar</packaging>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.teragrep</groupId>
<artifactId>pth_03</artifactId>
<version>${revision}${sha1}${changelist}</version>
<packaging>jar</packaging>
<name>pth_03</name>
<description>Data Processing Language (DPL) parser</description>
<groupId>com.teragrep</groupId>
<url>https://teragrep.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<java.version>1.8</java.version>
<revision>0.0.2</revision>
<changelist>-SNAPSHOT</changelist>
<sha1/>
<junit.jupiter.version>5.7.1</junit.jupiter.version>
<antlr4.version>4.9.3</antlr4.version>
</properties>
<scm>
<connection>scm:git:https://github.com/teragrep/pth_03.git</connection>
<developerConnection>scm:git:[email protected]:teragrep/pth_03.git</developerConnection>
<url>https://github.com/teragrep/pth_03/tree/master</url>
</scm>
<licenses>
<license>
<name>GNU Affero General Public License v3.0</name>
Expand All @@ -40,6 +22,22 @@
<organizationUrl>https://teragrep.com</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/teragrep/pth_03.git</connection>
<developerConnection>scm:git:[email protected]:teragrep/pth_03.git</developerConnection>
<url>https://github.com/teragrep/pth_03/tree/master</url>
</scm>
<properties>
<antlr4.version>4.9.3</antlr4.version>
<changelist>-SNAPSHOT</changelist>
<java.version>1.8</java.version>
<junit.jupiter.version>5.7.1</junit.jupiter.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<revision>0.0.2</revision>
<sha1></sha1>
</properties>
<dependencies>
<!-- logger -->
<dependency>
Expand All @@ -53,13 +51,13 @@
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>${antlr4.version}</version>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
</exclusion>
</exclusions>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down Expand Up @@ -97,7 +95,7 @@
<requireJavaVersion>
<version>[1.8,1.9)</version>
</requireJavaVersion>
<banDynamicVersions/>
<banDynamicVersions></banDynamicVersions>
<requirePluginVersions>
<message>All plugins are required to contain specific version.</message>
<unCheckedPluginList>org.apache.maven.plugins:maven-site-plugin,org.apache.maven.plugins:maven-resources-plugin,org.apache.maven.plugins:maven-clean-plugin,org.apache.maven.plugins:maven-install-plugin,org.apache.maven.plugins:maven-deploy-plugin,org.apache.maven.plugins:maven-compiler-plugin,org.apache.maven.plugins:maven-jar-plugin</unCheckedPluginList>
Expand Down Expand Up @@ -144,21 +142,25 @@
<artifactId>apache-rat-plugin</artifactId>
<version>0.15</version>
<inherited>false</inherited>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<addDefaultLicenseMatchers>false</addDefaultLicenseMatchers>
<licenses>
<license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
<notes>Also allow the license url to be https.</notes>
<patterns>
<pattern>https://github.com/teragrep/teragrep/blob/main/LICENSE</pattern>
<pattern>Copyright (C) 2026 Suomen Kanuuna Oy</pattern>
</patterns>
</license>
<license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
<notes>Also allow the license url to be https.</notes>
<patterns>
<pattern>Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy</pattern>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these necessary?

</patterns>
</license>
<license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
<notes>Also allow the license url to be https.</notes>
<patterns>
<pattern>Copyright (C) 2019, 2020, 2021, 2022, 2023 Suomen Kanuuna Oy</pattern>
</patterns>
</license>
</licenses>
Expand All @@ -177,13 +179,22 @@
<exclude>.github/pull_request_template.md</exclude>
<exclude>toolchains.xml</exclude>
<exclude>settings.xml</exclude>
<exclude>eclipse-java-formatter.xml</exclude>
<!-- readme -->
<exclude>README.adoc</exclude>
<exclude>README.md</exclude>
<!-- other maven files -->
<exclude>.flattened-pom.xml</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.antlr</groupId>
Expand All @@ -207,10 +218,10 @@
<executions>
<execution>
<id>add-source</id>
<phase>process-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<sources>
<source>target/generated-sources/antlr4</source>
Expand All @@ -234,10 +245,10 @@
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<phase>package</phase>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
Expand All @@ -259,19 +270,79 @@
<flattenMode>resolveCiFriendliesOnly</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten.clean</id>
<goals>
<goal>clean</goal>
</goals>
<phase>clean</phase>
</execution>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
<phase>process-resources</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.30.0</version>
<configuration>
<java>
Comment thread
Tiihott marked this conversation as resolved.
<toggleOffOn></toggleOffOn>
<eclipse>
<file>${project.basedir}/eclipse-java-formatter.xml</file>
<version>4.10.0</version>
</eclipse>
<removeUnusedImports></removeUnusedImports>
<licenseHeader>
<file>${project.basedir}/license-header</file>
</licenseHeader>
</java>
<antlr4>
<toggleOffOn></toggleOffOn>
<licenseHeader>
<file>${project.basedir}/license-header</file>
</licenseHeader>
</antlr4>
<pom>
<sortPom>
<!-- see https://github.com/diffplug/spotless/blob/main/plugin-maven/README.md#sortpom -->
<encoding>UTF-8</encoding>
<lineSeparator>\n</lineSeparator>
<expandEmptyElements>true</expandEmptyElements>
<keepBlankLines>false</keepBlankLines>
<nrOfIndentSpace>2</nrOfIndentSpace>
<predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
<sortProperties>true</sortProperties>
<sortModules>true</sortModules>
<sortExecutions>true</sortExecutions>
</sortPom>
</pom>
<formats>
<format>
<includes>
<include>.gitattributes</include>
<include>.gitignore</include>
</includes>
<trimTrailingWhitespace></trimTrailingWhitespace>
<endWithNewline></endWithNewline>
<indent>
<tabs>true</tabs>
<spacesPerTab>4</spacesPerTab>
</indent>
</format>
</formats>
</configuration>
<executions>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
<goal>check</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
Expand Down Expand Up @@ -344,6 +415,13 @@
</profile>
<profile>
<id>publish-github-packages</id>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/teragrep/pth_03</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
Expand All @@ -353,10 +431,10 @@
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
Expand All @@ -368,13 +446,6 @@
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/teragrep/pth_03</url>
</repository>
</distributionManagement>
</profile>
</profiles>
</project>
7 changes: 3 additions & 4 deletions src/main/antlr4/com/teragrep/pth_03/antlr/DPLLexer.g4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019-2026 Suomen Kanuuna Oy
* Data Processing Language (DPL) parser
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the title match the GitHub description or no?

* Copyright (C) 2026 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
Expand All @@ -13,7 +13,7 @@
* 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>.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why link changed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is like that in the mvn_01 the template: https://github.com/teragrep/mvn_01/blob/main/example-java-project/header.

The same pattern is present in many other projects like in PTH_10

* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*
* Additional permission under GNU Affero General Public License version 3
Expand Down Expand Up @@ -43,7 +43,6 @@
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
lexer grammar DPLLexer;

import GET_BOOLEAN, GET_INTEGER, GET_FIELD, GET_NUMBER, GET_INDEX_STRING, GET_REGEX_STRING, GET_SORT_FIELD, GET_TIME, GET_SPAN, GET_STRING, GET_WHERE_MODE, GET_WHERE_MODE_BY ,GET_T_OR_B, COMMAND_ABSTRACT_MODE, COMMAND_ACCUM_MODE, COMMAND_ADDCOLTOTALS_MODE, COMMAND_ADDINFO_MODE, COMMAND_ADDTOTALS_MODE, COMMAND_AGGREGATION_MODE, COMMAND_ANALYZEFIELDS_MODE, COMMAND_ANOMALIES_MODE, COMMAND_ANOMALOUSVALUE_MODE, COMMAND_ANOMALYDETECTION_MODE, COMMAND_APPENDCOLS_MODE, COMMAND_APPEND_MODE, COMMAND_APPENDPIPE_MODE, COMMAND_ARULES_MODE, COMMAND_ASSOCIATE_MODE, COMMAND_AUDIT_MODE, COMMAND_AUTOREGRESS_MODE, COMMAND_BIN_MODE, COMMAND_BUCKETDIR_MODE, COMMAND_CHART_MODE, COMMAND_CLUSTER_MODE, COMMAND_COFILTER_MODE, COMMAND_COLLAPSE_MODE, COMMAND_COLLECT_MODE, COMMAND_CONCURRENCY_MODE, COMMAND_CONTINGENCY_MODE, COMMAND_CONVERT_MODE, COMMAND_CORRELATE_MODE, COMMAND_DATAMODEL_MODE, COMMAND_DBINSPECT_MODE, COMMAND_DEDUP_MODE, COMMAND_DELETE_MODE, COMMAND_DELTA_MODE, COMMAND_DIFF_MODE, COMMAND_DPL_MODE, COMMAND_DUMP_MODE, COMMAND_EREX_MODE, COMMAND_EVAL_SUBMODE_BASE, EVAL_LANGUAGE_MODE, COMMAND_EVENTCOUNT_MODE, COMMAND_EVENTSTATS_MODE, COMMAND_EXPLAIN_MODE, COMMAND_EXTRACT_MODE, COMMAND_FIELDS_MODE, COMMAND_FIELDFORMAT_MODE, COMMAND_FIELDSUMMARY_MODE, COMMAND_FILLDOWN_MODE, COMMAND_FILLNULL_MODE, COMMAND_FINDKEYWORDS_MODE, COMMAND_FINDTYPES_MODE, COMMAND_FOLDERIZE_MODE, COMMAND_FOREACH_MODE, COMMAND_FORMAT_MODE, COMMAND_FROM_MODE, COMMAND_GAUGE_MODE, COMMAND_GENTIMES_MODE, COMMAND_GEOMFILTER_MODE, COMMAND_GEOM_MODE, COMMAND_GEOSTATS_MODE, COMMAND_HEAD_MODE, COMMAND_HIGHLIGHT_MODE, COMMAND_HISTORY_MODE, COMMAND_ICONIFY_MODE, COMMAND_INPUTCSV_MODE, COMMAND_INPUTLOOKUP_MODE, COMMAND_IPLOCATION_MODE, COMMAND_JOIN_MODE, COMMAND_KMEANS_MODE, COMMAND_KVFORM_MODE, COMMAND_LOADJOB_MODE, COMMAND_LOCALIZE_MODE, COMMAND_LOCALOP_MODE, COMMAND_LOOKUP_MODE, COMMAND_MAKECONTINUOUS_MODE, COMMAND_MAKEJSON_MODE, COMMAND_MAKEMV_MODE, COMMAND_MAKERESULTS_MODE, COMMAND_MAP_MODE, COMMAND_MCATALOG_MODE, COMMAND_MCOLLECT_MODE, COMMAND_METADATA_MODE, COMMAND_METASEARCH_MODE, COMMAND_MEVENTCOLLECT_MODE, COMMAND_MSTATS_MODE, COMMAND_MULTIKV_MODE, COMMAND_MULTISEARCH_MODE, COMMAND_MVCOMBINE_MODE, COMMAND_MVEXPAND_MODE, COMMAND_NOMV_MODE, COMMAND_OUTLIER_MODE, COMMAND_OUTPUTCSV_MODE, COMMAND_OUTPUTLOOKUP_MODE, COMMAND_OUTPUTTEXT_MODE, COMMAND_OVERLAP_MODE, COMMAND_PIVOT_MODE, COMMAND_PREDICT_MODE, COMMAND_RANGEMAP_MODE, COMMAND_RARE_MODE, COMMAND_REDISTRIBUTE_MODE, COMMAND_REGEX_MODE, COMMAND_RELEVANCY_MODE, COMMAND_RELTIME_MODE, COMMAND_RENAME_MODE, COMMAND_REPLACE_MODE, COMMAND_REST_MODE, COMMAND_RETURN_MODE, COMMAND_REVERSE_MODE, COMMAND_REX_MODE, COMMAND_REX4J_MODE, COMMAND_RTORDER_MODE, COMMAND_RUNSHELLSCRIPT_MODE, COMMAND_SAVEDSEARCH_MODE, COMMAND_SCRIPT_MODE, COMMAND_SCRUB_MODE, COMMAND_SEARCH_MODE, COMMAND_SEARCHTXN_MODE, COMMAND_SELFJOIN_MODE, COMMAND_SENDALERT_MODE, COMMAND_SENDEMAIL_MODE, COMMAND_SETFIELDS_MODE, COMMAND_SET_MODE, COMMAND_SICHART_MODE, COMMAND_SIRARE_MODE, COMMAND_SISTATS_MODE, COMMAND_SITIMECHART_MODE, COMMAND_SITOP_MODE, COMMAND_SORT_MODE, COMMAND_SPATH_MODE, COMMAND_STATS_MODE, COMMAND_STRCAT_MODE, COMMAND_STREAMSTATS_MODE, COMMAND_TABLE_MODE, COMMAND_TAGS_MODE, COMMAND_TAIL_MODE, COMMAND_TERAGREP_MODE, COMMAND_TIMECHART_MODE, COMMAND_TIMEWRAP_MODE, COMMAND_TOP_MODE, COMMAND_TRANSACTION_MODE, COMMAND_TRANSPOSE_MODE, COMMAND_TRENDLINE_MODE, COMMAND_TSCOLLECT_MODE, COMMAND_TSTATS_MODE, COMMAND_TYPEAHEAD_MODE, COMMAND_TYPELEARNER_MODE, COMMAND_TYPER_MODE, COMMAND_UNION_MODE, COMMAND_UNIQ_MODE, COMMAND_UNTABLE_MODE, COMMAND_WHERE_MODE, COMMAND_X11_MODE, COMMAND_XMLKV_MODE, COMMAND_XMLUNESCAPE_MODE, COMMAND_XPATH_MODE, COMMAND_XYSERIES_MODE;
Expand Down
7 changes: 3 additions & 4 deletions src/main/antlr4/com/teragrep/pth_03/antlr/DPLParser.g4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Teragrep Data Processing Language Parser Library PTH-03
* Copyright (C) 2019-2026 Suomen Kanuuna Oy
* Data Processing Language (DPL) parser
* Copyright (C) 2026 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
Expand All @@ -13,7 +13,7 @@
* 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>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*
* Additional permission under GNU Affero General Public License version 3
Expand Down Expand Up @@ -43,7 +43,6 @@
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
// -*- mode: conf; -*-
parser grammar DPLParser;

@parser::members {
Expand Down
Loading