Skip to content

Commit

Permalink
Internalize ANTLR sources; exclude from API checks
Browse files Browse the repository at this point in the history
  • Loading branch information
alancai98 committed Apr 30, 2024
1 parent 607c4c0 commit fc0d4f8
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 5,312 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import org.partiql.lang.eval.ExprValueFactory
import org.partiql.lang.planner.PlannerPassResult
import org.partiql.lang.syntax.Parser
import org.partiql.lang.syntax.PartiQLParserBuilder
import org.partiql.parser.antlr.PartiQLTokens
import org.partiql.parser.internal.antlr.PartiQLTokens
import org.partiql.lang.types.CustomType
import java.nio.charset.StandardCharsets
import kotlin.test.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import org.jline.reader.LineReader
import org.jline.utils.AttributedString
import org.jline.utils.AttributedStringBuilder
import org.jline.utils.AttributedStyle
import org.partiql.parser.antlr.PartiQLParser
import org.partiql.parser.antlr.PartiQLTokens
import org.partiql.parser.internal.antlr.PartiQLParser
import org.partiql.parser.internal.antlr.PartiQLTokens
import java.nio.charset.StandardCharsets
import java.util.regex.Pattern

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ import org.partiql.lang.types.CustomType
import org.partiql.lang.util.checkThreadInterrupted
import org.partiql.lang.util.getAntlrDisplayString
import org.partiql.lang.util.getIonValue
import org.partiql.parser.antlr.PartiQLParser
import org.partiql.parser.antlr.PartiQLTokens
import org.partiql.parser.internal.antlr.PartiQLParser
import org.partiql.parser.internal.antlr.PartiQLTokens
import java.io.InputStream
import java.nio.channels.ClosedByInterruptException
import java.nio.charset.StandardCharsets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ import org.partiql.lang.util.checkThreadInterrupted
import org.partiql.lang.util.error
import org.partiql.lang.util.getPrecisionFromTimeString
import org.partiql.lang.util.unaryMinus
import org.partiql.parser.antlr.PartiQLBaseVisitor
import org.partiql.parser.antlr.PartiQLParser
import org.partiql.parser.internal.antlr.PartiQLBaseVisitor
import org.partiql.parser.internal.antlr.PartiQLParser
import org.partiql.pig.runtime.SymbolPrimitive
import org.partiql.value.datetime.DateTimeException
import org.partiql.value.datetime.TimeZone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import org.partiql.errors.ErrorCode
import org.partiql.errors.Property
import org.partiql.errors.PropertyValueMap
import org.partiql.lang.syntax.ParserException
import org.partiql.parser.antlr.PartiQLParser
import org.partiql.parser.internal.antlr.PartiQLParser
import java.math.BigInteger

// workaround until ErrorAndErrorContexts no longer uses IonSystem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import org.partiql.errors.ErrorCode
import org.partiql.errors.Property
import org.partiql.lang.syntax.PartiQLParserTestBase
import org.partiql.lang.util.getAntlrDisplayString
import org.partiql.parser.antlr.PartiQLParser
import org.partiql.parser.internal.antlr.PartiQLParser

class ParserErrorsTest : PartiQLParserTestBase() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.partiql.lang.domains.PartiqlAst
import org.partiql.lang.domains.id
import org.partiql.lang.util.getAntlrDisplayString
import org.partiql.lang.util.to
import org.partiql.parser.antlr.PartiQLParser
import org.partiql.parser.internal.antlr.PartiQLParser

class PartiQLParserDateTimeTests : PartiQLParserTestBase() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.partiql.lang.ION
import org.partiql.lang.domains.PartiqlAst
import org.partiql.lang.util.ArgumentsProviderBase
import org.partiql.lang.util.getAntlrDisplayString
import org.partiql.parser.antlr.PartiQLParser
import org.partiql.parser.internal.antlr.PartiQLParser

class PartiQLParserExplainTest : PartiQLParserTestBase() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import org.partiql.lang.ast.sourceLocation
import org.partiql.lang.domains.PartiqlAst
import org.partiql.lang.domains.id
import org.partiql.lang.util.getAntlrDisplayString
import org.partiql.parser.antlr.PartiQLParser
import org.partiql.parser.internal.antlr.PartiQLParser
import kotlin.concurrent.thread

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.junit.Test
import org.partiql.errors.ErrorCode
import org.partiql.errors.Property
import org.partiql.lang.util.getAntlrDisplayString
import org.partiql.parser.antlr.PartiQLParser
import org.partiql.parser.internal.antlr.PartiQLParser

class PartiQLParserWindowTests : PartiQLParserTestBase() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import org.partiql.lang.StepContext
import org.partiql.lang.domains.PartiqlAst
import org.partiql.lang.eval.CompileOptions
import org.partiql.lang.eval.visitors.VisitorTransformBase
import org.partiql.parser.antlr.PartiQLTokens
import org.partiql.parser.internal.antlr.PartiQLTokens
import java.io.InputStream
import java.util.concurrent.atomic.AtomicBoolean
import kotlin.concurrent.thread
Expand Down
3 changes: 3 additions & 0 deletions partiql-parser/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
The PartiQL Parser can be used to parse PartiQL queries into an AST (`org.partiql.ast`).
This interface expands the legacy `org.partiql.syntax.Parser` interface allowing for a richer return type as well as the latest AST.

ANTLR-generated code is under the `internal` package namespace. It is not intended to be used outside of code within
this library.

== Interfaces

[source,kotlin]
Expand Down
Loading

0 comments on commit fc0d4f8

Please sign in to comment.