diff --git a/.flake8 b/.flake8 index 6c94fd85e..dd8c53ecd 100644 --- a/.flake8 +++ b/.flake8 @@ -2,3 +2,4 @@ ignore = E203, E266, E501, W503, F403, F401 max-line-length = 88 select = B,C,E,F,W,T4,B9 +exclude = tests/coverage/antlr_parser/*.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d30e95a5c..4c1098741 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,3 +21,11 @@ repos: rev: 6.1.0 hooks: - id: flake8 +- repo: local + hooks: + - id: check-substrait-extensions + name: Check Substrait extensions + entry: pytest tests/test_extensions.py::test_read_substrait_extensions + language: python + pass_filenames: false + diff --git a/grammar/FuncTestCaseLexer.g4 b/grammar/FuncTestCaseLexer.g4 new file mode 100644 index 000000000..7777e1e8f --- /dev/null +++ b/grammar/FuncTestCaseLexer.g4 @@ -0,0 +1,104 @@ +lexer grammar FuncTestCaseLexer; + +import SubstraitLexer; + +options { + caseInsensitive = true; +} + +Whitespace : [ \t\n\r]+ -> channel(HIDDEN) ; + +TripleHash: '###'; +SubstraitScalarTest: 'SUBSTRAIT_SCALAR_TEST'; +SubstraitInclude: 'SUBSTRAIT_INCLUDE'; + +FormatVersion + : 'v' DIGIT+ ('.' DIGIT+)? + ; + +DescriptionLine + : '# ' ~[\r\n]* '\r'? '\n' + ; + +ErrorResult: ''; +UndefineResult: ''; +Overflow: 'OVERFLOW'; +Rounding: 'ROUNDING'; +Error: 'ERROR'; +Saturate: 'SATURATE'; +Silent: 'SILENT'; +TieToEven: 'TIE_TO_EVEN'; +NaN: 'NAN'; + +IntegerLiteral + : [+-]? Int + ; + +DecimalLiteral + : [+-]? [0-9]+ ('.' [0-9]+)? + ; + +FloatLiteral + : [+-]? [0-9]+ ('.' [0-9]*)? ( 'E' [+-]? [0-9]+ )? + | [+-]? 'inf' + | 'snan' + ; + +BooleanLiteral + : 'true' | 'false' + ; + +fragment FourDigits: [0-9][0-9][0-9][0-9]; +fragment TwoDigits: [0-9][0-9]; + +TimestampTzLiteral + : '\'' FourDigits '-' TwoDigits '-' TwoDigits 'T' TwoDigits ':' TwoDigits ':' TwoDigits ( '.' [0-9]+ )? + [+-] TwoDigits ':' TwoDigits '\'' + ; + +TimestampLiteral + : '\'' FourDigits '-' TwoDigits '-' TwoDigits 'T' TwoDigits ':' TwoDigits ':' TwoDigits ( '.' [0-9]+ )? '\'' + ; + +TimeLiteral + : '\'' TwoDigits ':' TwoDigits ':' TwoDigits ( '.' [0-9]+ )? '\'' + ; + +DateLiteral + : '\'' FourDigits '-' TwoDigits '-' TwoDigits '\'' + ; + +PeriodPrefix: 'P'; +TimePrefix: 'T'; +YearPrefix: 'Y'; +MSuffix: 'M'; // used for both months and minutes +DaySuffix: 'D'; +HourSuffix: 'H'; +SecondSuffix: 'S'; +FractionalSecondSuffix: 'F'; +OAngleBracket: Lt; +CAngleBracket: Gt; + +IntervalYearLiteral + : '\'' PeriodPrefix IntegerLiteral YearPrefix (IntegerLiteral MSuffix)? '\'' + | '\'' PeriodPrefix IntegerLiteral MSuffix '\'' + ; + +IntervalDayLiteral + : '\'' PeriodPrefix IntegerLiteral DaySuffix (TimePrefix TimeInterval)? '\'' + | '\'' PeriodPrefix TimePrefix TimeInterval '\'' + ; + +fragment TimeInterval + : IntegerLiteral HourSuffix (IntegerLiteral MSuffix)? (IntegerLiteral SecondSuffix)? + (IntegerLiteral FractionalSecondSuffix)? + | IntegerLiteral MSuffix (IntegerLiteral SecondSuffix)? (IntegerLiteral FractionalSecondSuffix)? + | IntegerLiteral SecondSuffix (IntegerLiteral FractionalSecondSuffix)? + | IntegerLiteral FractionalSecondSuffix + ; + +NullLiteral: 'null'; + +StringLiteral + : '\'' ('\\' . | '\'\'' | ~['\\])* '\'' + ; diff --git a/grammar/FuncTestCaseParser.g4 b/grammar/FuncTestCaseParser.g4 new file mode 100644 index 000000000..979d582d9 --- /dev/null +++ b/grammar/FuncTestCaseParser.g4 @@ -0,0 +1,215 @@ +parser grammar FuncTestCaseParser; + +options { + caseInsensitive = true; + tokenVocab=SubstraitLexer; + tokenVocab=FuncTestCaseLexer; +} + +doc + : header testGroup+ EOF + ; + +header + : version include + ; + +version + : TripleHash SubstraitScalarTest Colon FormatVersion + ; + +include + : TripleHash SubstraitInclude Colon StringLiteral (Comma StringLiteral)* + ; + +testGroupDescription + : DescriptionLine + ; + +testCase + : functionName=Identifier OParen arguments CParen ( OBracket func_options CBracket )? Eq result + ; + +testGroup + : testGroupDescription (testCase)+ + ; + +arguments + : argument (Comma argument)* + ; + +result + : argument + | substraitError + ; + +argument + : nullArg + | intArg + | floatArg + | booleanArg + | stringArg + | decimalArg + | dateArg + | timeArg + | timestampArg + | timestampTzArg + | intervalYearArg + | intervalDayArg + ; + +numericLiteral + : DecimalLiteral | IntegerLiteral | floatLiteral + ; + +floatLiteral + : FloatLiteral | NaN + ; + +nullArg: NullLiteral DoubleColon datatype; + +intArg: IntegerLiteral DoubleColon (I8 | I16 | I32 | I64); + +floatArg: numericLiteral DoubleColon (FP32 | FP64); + +decimalArg + : numericLiteral DoubleColon decimalType + ; + +booleanArg + : BooleanLiteral DoubleColon Bool + ; + +stringArg + : StringLiteral DoubleColon Str + ; + +dateArg + : DateLiteral DoubleColon Date + ; + +timeArg + : TimeLiteral DoubleColon Time + ; + +timestampArg + : TimestampLiteral DoubleColon Ts + ; + +timestampTzArg + : TimestampTzLiteral DoubleColon TsTZ + ; + +intervalYearArg + : IntervalYearLiteral DoubleColon IYear + ; + +intervalDayArg + : IntervalDayLiteral DoubleColon IDay + ; + +intervalYearLiteral + : PeriodPrefix (years=IntegerLiteral YearPrefix) (months=IntegerLiteral MSuffix)? + | PeriodPrefix (months=IntegerLiteral MSuffix) + ; + +intervalDayLiteral + : PeriodPrefix (days=IntegerLiteral DaySuffix) (TimePrefix timeInterval)? + | PeriodPrefix TimePrefix timeInterval + ; + +timeInterval + : hours=IntegerLiteral HourSuffix (minutes=IntegerLiteral MSuffix)? (seconds=IntegerLiteral SecondSuffix)? + (fractionalSeconds=IntegerLiteral FractionalSecondSuffix)? + | minutes=IntegerLiteral MSuffix (seconds=IntegerLiteral SecondSuffix)? (fractionalSeconds=IntegerLiteral FractionalSecondSuffix)? + | seconds=IntegerLiteral SecondSuffix (fractionalSeconds=IntegerLiteral FractionalSecondSuffix)? + | fractionalSeconds=IntegerLiteral FractionalSecondSuffix + ; + +datatype + : scalarType + | parameterizedType + ; + +scalarType + : Bool #Boolean + | I8 #i8 + | I16 #i16 + | I32 #i32 + | I64 #i64 + | FP32 #fp32 + | FP64 #fp64 + | Str #string + | Binary #binary + | Ts #timestamp + | TsTZ #timestampTz + | Date #date + | Time #time + | IDay #intervalDay + | IYear #intervalYear + | UUID #uuid + | UserDefined Identifier #userDefined + ; + +fixedCharType + : FChar isnull=QMark? OAngleBracket len=numericParameter CAngleBracket #fixedChar + ; + +varCharType + : VChar isnull=QMark? OAngleBracket len=numericParameter CAngleBracket #varChar + ; + +fixedBinaryType + : FBin isnull=QMark? OAngleBracket len=numericParameter CAngleBracket #fixedBinary + ; + +decimalType + : Dec isnull=QMark? (OAngleBracket precision=numericParameter Comma scale=numericParameter CAngleBracket)? #decimal + ; + +precisionTimestampType + : PTs isnull=QMark? OAngleBracket precision=numericParameter CAngleBracket #precisionTimestamp + ; + +precisionTimestampTZType + : PTsTZ isnull=QMark? OAngleBracket precision=numericParameter CAngleBracket #precisionTimestampTZ + ; + +parameterizedType + : fixedCharType + | varCharType + | fixedBinaryType + | decimalType + | precisionTimestampType + | precisionTimestampTZType +// TODO implement the rest of the parameterized types +// | Struct isnull='?'? Lt expr (Comma expr)* Gt #struct +// | NStruct isnull='?'? Lt Identifier expr (Comma Identifier expr)* Gt #nStruct +// | List isnull='?'? Lt expr Gt #list +// | Map isnull='?'? Lt key=expr Comma value=expr Gt #map + ; + +numericParameter + : IntegerLiteral #integerLiteral + ; + +substraitError + : ErrorResult | UndefineResult + ; + +func_option + : option_name Colon option_value + ; + +option_name + : Overflow | Rounding + | Identifier + ; + +option_value + : Error | Saturate | Silent | TieToEven | NaN + ; + +func_options + : func_option (Comma func_option)* + ; diff --git a/grammar/Makefile b/grammar/Makefile new file mode 100644 index 000000000..ba99957bb --- /dev/null +++ b/grammar/Makefile @@ -0,0 +1,15 @@ +ANTLR_JAR=antlr-4.13.2-complete.jar +TYPE_GRAMMAR=SubstraitLexer.g4 SubstraitType.g4 +TYPE_OUTPUT_DIR=../tests/type/antlr_parser +TESTCASE_GRAMMAR=FuncTestCaseLexer.g4 FuncTestCaseParser.g4 +TESTCASE_OUTPUT_DIR=../tests/coverage/antlr_parser + +generate_testcase_parser: + java -jar $(ANTLR_JAR) -visitor -Dlanguage=Python3 -o $(TESTCASE_OUTPUT_DIR) $(TESTCASE_GRAMMAR) + +generate_type_parser: + java -jar $(ANTLR_JAR) -visitor -Dlanguage=Python3 -o $(TYPE_OUTPUT_DIR) $(TYPE_GRAMMAR) + +clean: + rm -rf $(TYPE_OUTPUT_DIR)/*.py $(TYPE_OUTPUT_DIR)/*.tokens $(TYPE_OUTPUT_DIR)/*.interp + rm -rf $(TESTCASE_OUTPUT_DIR)/*.py $(TESTCASE_OUTPUT_DIR)/*.tokens $(TESTCASE_OUTPUT_DIR)/*.interp diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/cases/arithmetic/add.test b/tests/cases/arithmetic/add.test new file mode 100644 index 000000000..7d7c36a6d --- /dev/null +++ b/tests/cases/arithmetic/add.test @@ -0,0 +1,31 @@ +### SUBSTRAIT_SCALAR_TEST: v1.0 +### SUBSTRAIT_INCLUDE: '/extensions/functions_arithmetic.yaml' + +# basic: Basic examples without any special cases +add(120::i8, 5::i8) = 125::i8 +add(100::i16, 100::i16) = 200::i16 +add(30000::i32, 30000::i32) = 60000::i32 +add(2000000000::i64, 2000000000::i64) = 4000000000::i64 + +# overflow: Examples demonstrating overflow behavior +add(120::i8, 10::i8) [overflow:ERROR] = +add(30000::i16, 30000::i16) [overflow:ERROR] = +add(2000000000::i32, 2000000000::i32) [overflow:ERROR] = +add(9223372036854775807::i64, 1::i64) [overflow:ERROR] = + +# overflow: Examples demonstrating overflow behavior tests: overflow with SATURATE +add(120::i8, 10::i8) [overflow:SATURATE] = 127::i8 +add(-120::i8, -10::i8) [overflow:SATURATE] = -128::i8 + +# overflow: Examples demonstrating overflow behavior tests: overflow with SILENT +add(120::i8, 10::i8) [overflow:SILENT] = + +# floating_exception: Examples demonstrating exceptional floating point cases +add(1.5e+308::fp64, 1.5e+308::fp64) = inf::fp64 +add(-1.5e+308::fp64, -1.5e+308::fp64) = -inf::fp64 + +# rounding: Examples demonstrating floating point rounding behavior +add(4.5::fp32, 2.500001::fp32) [rounding:TIE_TO_EVEN] = 7.000001::fp32 + +# types: Examples demonstrating behavior of different data types +add(4.5::fp64, 2.5000007152557373::fp64) = 7.00000071525573::fp64 diff --git a/tests/cases/arithmetic_decimal/power.test b/tests/cases/arithmetic_decimal/power.test new file mode 100644 index 000000000..37a0712d5 --- /dev/null +++ b/tests/cases/arithmetic_decimal/power.test @@ -0,0 +1,21 @@ +### SUBSTRAIT_SCALAR_TEST: v1.0 +### SUBSTRAIT_INCLUDE: 'extensions/functions_arithmetic_decimal.yaml' + +# basic: Basic examples without any special cases +power(8::dec<38, 0>, 2::dec<38, 0>) = 64::fp64 +power(1.0::dec<38, 0>, -1.0::dec<38, 0>) = 1.0::fp64 +power(2.0::dec<38, 0>, -2.0::dec<38, 0>) = 0.25::fp64 +power(13::dec<38, 0>, 10::dec<38, 0>) = 137858491849::fp64 + +# result_more_than_input_precison: Examples demonstrating result with more precision than input +power(16::dec<2, 0>, 4::dec<38, 0>) = 65536::fp64 + +# floating_exception: Examples demonstrating exceptional floating point cases +power(1.5e+10::dec<38, 0>, 1.5e+20::dec<38, 0>) = inf::fp64 +power(-16::dec<4, 0>, 1001::dec<4, 0>) = -inf::fp64 + +# complex_number: Examples demonstrating complex number output +power(-1::dec, 0.5::dec<38,1>) [complex_number_result:NAN] = nan::fp64 + +# complex_number: Examples demonstrating complex number output tests: complex_number_result with ERROR +power(-1::dec, 0.5::dec<38,1>) [complex_number_result:ERROR] = diff --git a/tests/cases/datetime/lt_datetime.test b/tests/cases/datetime/lt_datetime.test new file mode 100644 index 000000000..a2c14c44d --- /dev/null +++ b/tests/cases/datetime/lt_datetime.test @@ -0,0 +1,25 @@ +### SUBSTRAIT_SCALAR_TEST: v1.0 +### SUBSTRAIT_INCLUDE: '/extensions/functions_datetime.yaml' + +# timestamps: examples using the timestamp type +lt('2016-12-31T13:30:15'::ts, '2017-12-31T13:30:15'::ts) = true::bool +lt('2018-12-31T13:30:15'::ts, '2017-12-31T13:30:15'::ts) = false::bool + +# timestamp_tz: examples using the timestamp_tz type +lt('1999-01-08T01:05:05-08:00'::tstz, '1999-01-08T04:05:06-05:00'::tstz) = true::bool +lt('1999-01-08T01:05:06-08:00'::tstz, '1999-01-08T04:05:06-05:00'::tstz) = false::bool + +# date: examples using the date type +lt('2020-12-30'::date, '2020-12-31'::date) = true::bool +lt('2020-12-31'::date, '2020-12-30'::date) = false::bool + +# interval: examples using the interval type +lt('P7D'::iday, 'P6D'::iday) = false::bool +lt('P5D'::iday, 'P6D'::iday) = true::bool +lt('P5Y'::iyear, 'P6Y'::iyear) = true::bool +lt('P7Y'::iyear, 'P6Y'::iyear) = false::bool + +# null_input: examples with null args or return +lt(null::iday, 'P5D'::iday) = null::bool +lt(null::date, '2020-12-30'::date) = null::bool +lt(null::ts, '2018-12-31T13:30:15'::ts) = null::bool diff --git a/tests/coverage/__init__.py b/tests/coverage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/coverage/antlr_parser/FuncTestCaseLexer.py b/tests/coverage/antlr_parser/FuncTestCaseLexer.py new file mode 100644 index 000000000..244921049 --- /dev/null +++ b/tests/coverage/antlr_parser/FuncTestCaseLexer.py @@ -0,0 +1,10071 @@ +# SPDX-License-Identifier: Apache-2.0 +# Generated from FuncTestCaseLexer.g4 by ANTLR 4.13.2 +from antlr4 import * +from io import StringIO +import sys + +if sys.version_info[1] > 5: + from typing import TextIO +else: + from typing.io import TextIO + + +def serializedATN(): + return [ + 4, + 0, + 112, + 1093, + 6, + -1, + 2, + 0, + 7, + 0, + 2, + 1, + 7, + 1, + 2, + 2, + 7, + 2, + 2, + 3, + 7, + 3, + 2, + 4, + 7, + 4, + 2, + 5, + 7, + 5, + 2, + 6, + 7, + 6, + 2, + 7, + 7, + 7, + 2, + 8, + 7, + 8, + 2, + 9, + 7, + 9, + 2, + 10, + 7, + 10, + 2, + 11, + 7, + 11, + 2, + 12, + 7, + 12, + 2, + 13, + 7, + 13, + 2, + 14, + 7, + 14, + 2, + 15, + 7, + 15, + 2, + 16, + 7, + 16, + 2, + 17, + 7, + 17, + 2, + 18, + 7, + 18, + 2, + 19, + 7, + 19, + 2, + 20, + 7, + 20, + 2, + 21, + 7, + 21, + 2, + 22, + 7, + 22, + 2, + 23, + 7, + 23, + 2, + 24, + 7, + 24, + 2, + 25, + 7, + 25, + 2, + 26, + 7, + 26, + 2, + 27, + 7, + 27, + 2, + 28, + 7, + 28, + 2, + 29, + 7, + 29, + 2, + 30, + 7, + 30, + 2, + 31, + 7, + 31, + 2, + 32, + 7, + 32, + 2, + 33, + 7, + 33, + 2, + 34, + 7, + 34, + 2, + 35, + 7, + 35, + 2, + 36, + 7, + 36, + 2, + 37, + 7, + 37, + 2, + 38, + 7, + 38, + 2, + 39, + 7, + 39, + 2, + 40, + 7, + 40, + 2, + 41, + 7, + 41, + 2, + 42, + 7, + 42, + 2, + 43, + 7, + 43, + 2, + 44, + 7, + 44, + 2, + 45, + 7, + 45, + 2, + 46, + 7, + 46, + 2, + 47, + 7, + 47, + 2, + 48, + 7, + 48, + 2, + 49, + 7, + 49, + 2, + 50, + 7, + 50, + 2, + 51, + 7, + 51, + 2, + 52, + 7, + 52, + 2, + 53, + 7, + 53, + 2, + 54, + 7, + 54, + 2, + 55, + 7, + 55, + 2, + 56, + 7, + 56, + 2, + 57, + 7, + 57, + 2, + 58, + 7, + 58, + 2, + 59, + 7, + 59, + 2, + 60, + 7, + 60, + 2, + 61, + 7, + 61, + 2, + 62, + 7, + 62, + 2, + 63, + 7, + 63, + 2, + 64, + 7, + 64, + 2, + 65, + 7, + 65, + 2, + 66, + 7, + 66, + 2, + 67, + 7, + 67, + 2, + 68, + 7, + 68, + 2, + 69, + 7, + 69, + 2, + 70, + 7, + 70, + 2, + 71, + 7, + 71, + 2, + 72, + 7, + 72, + 2, + 73, + 7, + 73, + 2, + 74, + 7, + 74, + 2, + 75, + 7, + 75, + 2, + 76, + 7, + 76, + 2, + 77, + 7, + 77, + 2, + 78, + 7, + 78, + 2, + 79, + 7, + 79, + 2, + 80, + 7, + 80, + 2, + 81, + 7, + 81, + 2, + 82, + 7, + 82, + 2, + 83, + 7, + 83, + 2, + 84, + 7, + 84, + 2, + 85, + 7, + 85, + 2, + 86, + 7, + 86, + 2, + 87, + 7, + 87, + 2, + 88, + 7, + 88, + 2, + 89, + 7, + 89, + 2, + 90, + 7, + 90, + 2, + 91, + 7, + 91, + 2, + 92, + 7, + 92, + 2, + 93, + 7, + 93, + 2, + 94, + 7, + 94, + 2, + 95, + 7, + 95, + 2, + 96, + 7, + 96, + 2, + 97, + 7, + 97, + 2, + 98, + 7, + 98, + 2, + 99, + 7, + 99, + 2, + 100, + 7, + 100, + 2, + 101, + 7, + 101, + 2, + 102, + 7, + 102, + 2, + 103, + 7, + 103, + 2, + 104, + 7, + 104, + 2, + 105, + 7, + 105, + 2, + 106, + 7, + 106, + 2, + 107, + 7, + 107, + 2, + 108, + 7, + 108, + 2, + 109, + 7, + 109, + 2, + 110, + 7, + 110, + 2, + 111, + 7, + 111, + 2, + 112, + 7, + 112, + 2, + 113, + 7, + 113, + 2, + 114, + 7, + 114, + 2, + 115, + 7, + 115, + 2, + 116, + 7, + 116, + 2, + 117, + 7, + 117, + 1, + 0, + 4, + 0, + 239, + 8, + 0, + 11, + 0, + 12, + 0, + 240, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 4, + 1, + 4, + 4, + 4, + 291, + 8, + 4, + 11, + 4, + 12, + 4, + 292, + 1, + 4, + 1, + 4, + 4, + 4, + 297, + 8, + 4, + 11, + 4, + 12, + 4, + 298, + 3, + 4, + 301, + 8, + 4, + 1, + 5, + 1, + 5, + 1, + 5, + 1, + 5, + 5, + 5, + 307, + 8, + 5, + 10, + 5, + 12, + 5, + 310, + 9, + 5, + 1, + 5, + 3, + 5, + 313, + 8, + 5, + 1, + 5, + 1, + 5, + 1, + 6, + 1, + 6, + 1, + 6, + 1, + 6, + 1, + 6, + 1, + 6, + 1, + 6, + 1, + 6, + 1, + 6, + 1, + 7, + 1, + 7, + 1, + 7, + 1, + 7, + 1, + 7, + 1, + 7, + 1, + 7, + 1, + 7, + 1, + 7, + 1, + 7, + 1, + 7, + 1, + 7, + 1, + 7, + 1, + 8, + 1, + 8, + 1, + 8, + 1, + 8, + 1, + 8, + 1, + 8, + 1, + 8, + 1, + 8, + 1, + 8, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 10, + 1, + 10, + 1, + 10, + 1, + 10, + 1, + 10, + 1, + 10, + 1, + 11, + 1, + 11, + 1, + 11, + 1, + 11, + 1, + 11, + 1, + 11, + 1, + 11, + 1, + 11, + 1, + 11, + 1, + 12, + 1, + 12, + 1, + 12, + 1, + 12, + 1, + 12, + 1, + 12, + 1, + 12, + 1, + 13, + 1, + 13, + 1, + 13, + 1, + 13, + 1, + 13, + 1, + 13, + 1, + 13, + 1, + 13, + 1, + 13, + 1, + 13, + 1, + 13, + 1, + 13, + 1, + 14, + 1, + 14, + 1, + 14, + 1, + 14, + 1, + 15, + 3, + 15, + 396, + 8, + 15, + 1, + 15, + 1, + 15, + 1, + 16, + 3, + 16, + 401, + 8, + 16, + 1, + 16, + 4, + 16, + 404, + 8, + 16, + 11, + 16, + 12, + 16, + 405, + 1, + 16, + 1, + 16, + 4, + 16, + 410, + 8, + 16, + 11, + 16, + 12, + 16, + 411, + 3, + 16, + 414, + 8, + 16, + 1, + 17, + 3, + 17, + 417, + 8, + 17, + 1, + 17, + 4, + 17, + 420, + 8, + 17, + 11, + 17, + 12, + 17, + 421, + 1, + 17, + 1, + 17, + 5, + 17, + 426, + 8, + 17, + 10, + 17, + 12, + 17, + 429, + 9, + 17, + 3, + 17, + 431, + 8, + 17, + 1, + 17, + 1, + 17, + 3, + 17, + 435, + 8, + 17, + 1, + 17, + 4, + 17, + 438, + 8, + 17, + 11, + 17, + 12, + 17, + 439, + 3, + 17, + 442, + 8, + 17, + 1, + 17, + 3, + 17, + 445, + 8, + 17, + 1, + 17, + 1, + 17, + 1, + 17, + 1, + 17, + 1, + 17, + 1, + 17, + 1, + 17, + 3, + 17, + 454, + 8, + 17, + 1, + 18, + 1, + 18, + 1, + 18, + 1, + 18, + 1, + 18, + 1, + 18, + 1, + 18, + 1, + 18, + 1, + 18, + 3, + 18, + 465, + 8, + 18, + 1, + 19, + 1, + 19, + 1, + 19, + 1, + 19, + 1, + 19, + 1, + 20, + 1, + 20, + 1, + 20, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 4, + 21, + 489, + 8, + 21, + 11, + 21, + 12, + 21, + 490, + 3, + 21, + 493, + 8, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 22, + 4, + 22, + 515, + 8, + 22, + 11, + 22, + 12, + 22, + 516, + 3, + 22, + 519, + 8, + 22, + 1, + 22, + 1, + 22, + 1, + 23, + 1, + 23, + 1, + 23, + 1, + 23, + 1, + 23, + 1, + 23, + 1, + 23, + 1, + 23, + 4, + 23, + 531, + 8, + 23, + 11, + 23, + 12, + 23, + 532, + 3, + 23, + 535, + 8, + 23, + 1, + 23, + 1, + 23, + 1, + 24, + 1, + 24, + 1, + 24, + 1, + 24, + 1, + 24, + 1, + 24, + 1, + 24, + 1, + 24, + 1, + 25, + 1, + 25, + 1, + 26, + 1, + 26, + 1, + 27, + 1, + 27, + 1, + 28, + 1, + 28, + 1, + 29, + 1, + 29, + 1, + 30, + 1, + 30, + 1, + 31, + 1, + 31, + 1, + 32, + 1, + 32, + 1, + 33, + 1, + 33, + 1, + 34, + 1, + 34, + 1, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 3, + 35, + 574, + 8, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 3, + 35, + 584, + 8, + 35, + 1, + 36, + 1, + 36, + 1, + 36, + 1, + 36, + 1, + 36, + 1, + 36, + 1, + 36, + 3, + 36, + 593, + 8, + 36, + 1, + 36, + 1, + 36, + 1, + 36, + 1, + 36, + 1, + 36, + 1, + 36, + 1, + 36, + 1, + 36, + 3, + 36, + 603, + 8, + 36, + 1, + 37, + 1, + 37, + 1, + 37, + 1, + 37, + 1, + 37, + 3, + 37, + 610, + 8, + 37, + 1, + 37, + 1, + 37, + 1, + 37, + 3, + 37, + 615, + 8, + 37, + 1, + 37, + 1, + 37, + 1, + 37, + 3, + 37, + 620, + 8, + 37, + 1, + 37, + 1, + 37, + 1, + 37, + 1, + 37, + 1, + 37, + 3, + 37, + 627, + 8, + 37, + 1, + 37, + 1, + 37, + 1, + 37, + 3, + 37, + 632, + 8, + 37, + 1, + 37, + 1, + 37, + 1, + 37, + 1, + 37, + 1, + 37, + 3, + 37, + 639, + 8, + 37, + 1, + 37, + 1, + 37, + 1, + 37, + 3, + 37, + 644, + 8, + 37, + 1, + 38, + 1, + 38, + 1, + 38, + 1, + 38, + 1, + 38, + 1, + 39, + 1, + 39, + 1, + 39, + 1, + 39, + 1, + 39, + 1, + 39, + 5, + 39, + 657, + 8, + 39, + 10, + 39, + 12, + 39, + 660, + 9, + 39, + 1, + 39, + 1, + 39, + 1, + 40, + 1, + 40, + 1, + 40, + 1, + 40, + 5, + 40, + 668, + 8, + 40, + 10, + 40, + 12, + 40, + 671, + 9, + 40, + 1, + 40, + 1, + 40, + 1, + 41, + 1, + 41, + 1, + 41, + 1, + 41, + 1, + 41, + 4, + 41, + 680, + 8, + 41, + 11, + 41, + 12, + 41, + 681, + 1, + 41, + 3, + 41, + 685, + 8, + 41, + 1, + 41, + 5, + 41, + 688, + 8, + 41, + 10, + 41, + 12, + 41, + 691, + 9, + 41, + 1, + 41, + 1, + 41, + 1, + 41, + 1, + 41, + 1, + 41, + 1, + 42, + 1, + 42, + 1, + 43, + 1, + 43, + 1, + 43, + 1, + 44, + 1, + 44, + 1, + 44, + 1, + 44, + 1, + 44, + 1, + 45, + 1, + 45, + 1, + 45, + 1, + 45, + 1, + 45, + 1, + 46, + 1, + 46, + 1, + 46, + 1, + 46, + 1, + 46, + 1, + 46, + 1, + 46, + 1, + 46, + 1, + 47, + 1, + 47, + 1, + 47, + 1, + 48, + 1, + 48, + 1, + 48, + 1, + 48, + 1, + 49, + 1, + 49, + 1, + 49, + 1, + 49, + 1, + 50, + 1, + 50, + 1, + 50, + 1, + 50, + 1, + 51, + 1, + 51, + 1, + 51, + 1, + 51, + 1, + 51, + 1, + 52, + 1, + 52, + 1, + 52, + 1, + 52, + 1, + 52, + 1, + 53, + 1, + 53, + 1, + 53, + 1, + 53, + 1, + 53, + 1, + 53, + 1, + 53, + 1, + 54, + 1, + 54, + 1, + 54, + 1, + 54, + 1, + 54, + 1, + 54, + 1, + 54, + 1, + 55, + 1, + 55, + 1, + 55, + 1, + 55, + 1, + 55, + 1, + 55, + 1, + 55, + 1, + 55, + 1, + 55, + 1, + 55, + 1, + 56, + 1, + 56, + 1, + 56, + 1, + 56, + 1, + 56, + 1, + 56, + 1, + 56, + 1, + 56, + 1, + 56, + 1, + 56, + 1, + 56, + 1, + 56, + 1, + 56, + 1, + 57, + 1, + 57, + 1, + 57, + 1, + 57, + 1, + 57, + 1, + 58, + 1, + 58, + 1, + 58, + 1, + 58, + 1, + 58, + 1, + 59, + 1, + 59, + 1, + 59, + 1, + 59, + 1, + 59, + 1, + 59, + 1, + 59, + 1, + 59, + 1, + 59, + 1, + 59, + 1, + 59, + 1, + 59, + 1, + 59, + 1, + 59, + 1, + 60, + 1, + 60, + 1, + 60, + 1, + 60, + 1, + 60, + 1, + 60, + 1, + 60, + 1, + 60, + 1, + 60, + 1, + 60, + 1, + 60, + 1, + 60, + 1, + 60, + 1, + 61, + 1, + 61, + 1, + 61, + 1, + 61, + 1, + 61, + 1, + 62, + 1, + 62, + 1, + 62, + 1, + 62, + 1, + 62, + 1, + 62, + 1, + 62, + 1, + 62, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 63, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 64, + 1, + 65, + 1, + 65, + 1, + 65, + 1, + 65, + 1, + 65, + 1, + 65, + 1, + 65, + 1, + 65, + 1, + 65, + 1, + 65, + 1, + 66, + 1, + 66, + 1, + 66, + 1, + 66, + 1, + 66, + 1, + 66, + 1, + 66, + 1, + 66, + 1, + 67, + 1, + 67, + 1, + 67, + 1, + 67, + 1, + 67, + 1, + 67, + 1, + 67, + 1, + 67, + 1, + 67, + 1, + 67, + 1, + 67, + 1, + 67, + 1, + 68, + 1, + 68, + 1, + 68, + 1, + 68, + 1, + 68, + 1, + 68, + 1, + 68, + 1, + 69, + 1, + 69, + 1, + 69, + 1, + 69, + 1, + 69, + 1, + 69, + 1, + 69, + 1, + 69, + 1, + 70, + 1, + 70, + 1, + 70, + 1, + 70, + 1, + 70, + 1, + 71, + 1, + 71, + 1, + 71, + 1, + 71, + 1, + 72, + 1, + 72, + 1, + 72, + 1, + 73, + 1, + 73, + 1, + 73, + 1, + 73, + 1, + 73, + 1, + 74, + 1, + 74, + 1, + 74, + 1, + 74, + 1, + 75, + 1, + 75, + 1, + 75, + 1, + 75, + 1, + 75, + 1, + 76, + 1, + 76, + 1, + 76, + 1, + 77, + 1, + 77, + 1, + 77, + 1, + 77, + 1, + 77, + 1, + 78, + 1, + 78, + 1, + 78, + 1, + 78, + 1, + 78, + 1, + 78, + 1, + 79, + 1, + 79, + 1, + 79, + 1, + 79, + 1, + 79, + 1, + 80, + 1, + 80, + 1, + 80, + 1, + 80, + 1, + 81, + 1, + 81, + 1, + 81, + 1, + 81, + 1, + 82, + 1, + 82, + 1, + 82, + 1, + 82, + 1, + 82, + 1, + 82, + 1, + 83, + 1, + 83, + 1, + 83, + 1, + 83, + 1, + 83, + 1, + 83, + 1, + 84, + 1, + 84, + 1, + 84, + 1, + 84, + 1, + 84, + 1, + 84, + 1, + 85, + 1, + 85, + 1, + 85, + 1, + 85, + 1, + 85, + 1, + 86, + 1, + 86, + 1, + 86, + 1, + 86, + 1, + 87, + 1, + 87, + 1, + 87, + 1, + 88, + 1, + 88, + 1, + 88, + 1, + 89, + 1, + 89, + 1, + 90, + 1, + 90, + 1, + 91, + 1, + 91, + 1, + 92, + 1, + 92, + 1, + 93, + 1, + 93, + 1, + 94, + 1, + 94, + 1, + 95, + 1, + 95, + 1, + 95, + 1, + 96, + 1, + 96, + 1, + 96, + 1, + 97, + 1, + 97, + 1, + 97, + 1, + 98, + 1, + 98, + 1, + 99, + 1, + 99, + 1, + 100, + 1, + 100, + 1, + 101, + 1, + 101, + 1, + 102, + 1, + 102, + 1, + 103, + 1, + 103, + 1, + 104, + 1, + 104, + 1, + 105, + 1, + 105, + 1, + 106, + 1, + 106, + 1, + 107, + 1, + 107, + 1, + 108, + 1, + 108, + 1, + 109, + 1, + 109, + 1, + 110, + 1, + 110, + 1, + 110, + 1, + 110, + 1, + 111, + 1, + 111, + 1, + 111, + 1, + 112, + 1, + 112, + 1, + 112, + 1, + 113, + 1, + 113, + 5, + 113, + 1064, + 8, + 113, + 10, + 113, + 12, + 113, + 1067, + 9, + 113, + 1, + 113, + 3, + 113, + 1070, + 8, + 113, + 1, + 114, + 1, + 114, + 1, + 115, + 3, + 115, + 1075, + 8, + 115, + 1, + 115, + 1, + 115, + 1, + 116, + 1, + 116, + 1, + 116, + 5, + 116, + 1082, + 8, + 116, + 10, + 116, + 12, + 116, + 1085, + 9, + 116, + 1, + 117, + 1, + 117, + 3, + 117, + 1089, + 8, + 117, + 1, + 117, + 3, + 117, + 1092, + 8, + 117, + 0, + 0, + 118, + 1, + 1, + 3, + 2, + 5, + 3, + 7, + 4, + 9, + 5, + 11, + 6, + 13, + 7, + 15, + 8, + 17, + 9, + 19, + 10, + 21, + 11, + 23, + 12, + 25, + 13, + 27, + 14, + 29, + 15, + 31, + 16, + 33, + 17, + 35, + 18, + 37, + 19, + 39, + 0, + 41, + 0, + 43, + 20, + 45, + 21, + 47, + 22, + 49, + 23, + 51, + 24, + 53, + 25, + 55, + 26, + 57, + 27, + 59, + 28, + 61, + 29, + 63, + 30, + 65, + 31, + 67, + 32, + 69, + 33, + 71, + 34, + 73, + 35, + 75, + 0, + 77, + 36, + 79, + 37, + 81, + 38, + 83, + 39, + 85, + 0, + 87, + 40, + 89, + 41, + 91, + 42, + 93, + 43, + 95, + 44, + 97, + 45, + 99, + 46, + 101, + 47, + 103, + 48, + 105, + 49, + 107, + 50, + 109, + 51, + 111, + 52, + 113, + 53, + 115, + 54, + 117, + 55, + 119, + 56, + 121, + 57, + 123, + 58, + 125, + 59, + 127, + 60, + 129, + 61, + 131, + 62, + 133, + 63, + 135, + 64, + 137, + 65, + 139, + 66, + 141, + 67, + 143, + 68, + 145, + 69, + 147, + 70, + 149, + 71, + 151, + 72, + 153, + 73, + 155, + 74, + 157, + 75, + 159, + 76, + 161, + 77, + 163, + 78, + 165, + 79, + 167, + 80, + 169, + 81, + 171, + 82, + 173, + 83, + 175, + 84, + 177, + 85, + 179, + 86, + 181, + 87, + 183, + 88, + 185, + 89, + 187, + 90, + 189, + 91, + 191, + 92, + 193, + 93, + 195, + 94, + 197, + 95, + 199, + 96, + 201, + 97, + 203, + 98, + 205, + 99, + 207, + 100, + 209, + 101, + 211, + 102, + 213, + 103, + 215, + 104, + 217, + 105, + 219, + 106, + 221, + 107, + 223, + 108, + 225, + 109, + 227, + 0, + 229, + 0, + 231, + 110, + 233, + 111, + 235, + 112, + 1, + 0, + 31, + 3, + 0, + 9, + 10, + 13, + 13, + 32, + 32, + 2, + 0, + 83, + 83, + 115, + 115, + 2, + 0, + 85, + 85, + 117, + 117, + 2, + 0, + 66, + 66, + 98, + 98, + 2, + 0, + 84, + 84, + 116, + 116, + 2, + 0, + 82, + 82, + 114, + 114, + 2, + 0, + 65, + 65, + 97, + 97, + 2, + 0, + 73, + 73, + 105, + 105, + 2, + 0, + 67, + 67, + 99, + 99, + 2, + 0, + 76, + 76, + 108, + 108, + 2, + 0, + 69, + 69, + 101, + 101, + 2, + 0, + 78, + 78, + 110, + 110, + 2, + 0, + 68, + 68, + 100, + 100, + 2, + 0, + 86, + 86, + 118, + 118, + 2, + 0, + 10, + 10, + 13, + 13, + 2, + 0, + 79, + 79, + 111, + 111, + 2, + 0, + 70, + 70, + 102, + 102, + 2, + 0, + 87, + 87, + 119, + 119, + 2, + 0, + 71, + 71, + 103, + 103, + 2, + 0, + 43, + 43, + 45, + 45, + 1, + 0, + 48, + 57, + 2, + 0, + 80, + 80, + 112, + 112, + 2, + 0, + 89, + 89, + 121, + 121, + 2, + 0, + 77, + 77, + 109, + 109, + 2, + 0, + 72, + 72, + 104, + 104, + 2, + 0, + 39, + 39, + 92, + 92, + 1, + 0, + 42, + 42, + 2, + 0, + 42, + 42, + 47, + 47, + 2, + 0, + 90, + 90, + 122, + 122, + 2, + 0, + 88, + 88, + 120, + 120, + 4, + 0, + 36, + 36, + 65, + 90, + 95, + 95, + 97, + 122, + 1141, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 3, + 1, + 0, + 0, + 0, + 0, + 5, + 1, + 0, + 0, + 0, + 0, + 7, + 1, + 0, + 0, + 0, + 0, + 9, + 1, + 0, + 0, + 0, + 0, + 11, + 1, + 0, + 0, + 0, + 0, + 13, + 1, + 0, + 0, + 0, + 0, + 15, + 1, + 0, + 0, + 0, + 0, + 17, + 1, + 0, + 0, + 0, + 0, + 19, + 1, + 0, + 0, + 0, + 0, + 21, + 1, + 0, + 0, + 0, + 0, + 23, + 1, + 0, + 0, + 0, + 0, + 25, + 1, + 0, + 0, + 0, + 0, + 27, + 1, + 0, + 0, + 0, + 0, + 29, + 1, + 0, + 0, + 0, + 0, + 31, + 1, + 0, + 0, + 0, + 0, + 33, + 1, + 0, + 0, + 0, + 0, + 35, + 1, + 0, + 0, + 0, + 0, + 37, + 1, + 0, + 0, + 0, + 0, + 43, + 1, + 0, + 0, + 0, + 0, + 45, + 1, + 0, + 0, + 0, + 0, + 47, + 1, + 0, + 0, + 0, + 0, + 49, + 1, + 0, + 0, + 0, + 0, + 51, + 1, + 0, + 0, + 0, + 0, + 53, + 1, + 0, + 0, + 0, + 0, + 55, + 1, + 0, + 0, + 0, + 0, + 57, + 1, + 0, + 0, + 0, + 0, + 59, + 1, + 0, + 0, + 0, + 0, + 61, + 1, + 0, + 0, + 0, + 0, + 63, + 1, + 0, + 0, + 0, + 0, + 65, + 1, + 0, + 0, + 0, + 0, + 67, + 1, + 0, + 0, + 0, + 0, + 69, + 1, + 0, + 0, + 0, + 0, + 71, + 1, + 0, + 0, + 0, + 0, + 73, + 1, + 0, + 0, + 0, + 0, + 77, + 1, + 0, + 0, + 0, + 0, + 79, + 1, + 0, + 0, + 0, + 0, + 81, + 1, + 0, + 0, + 0, + 0, + 83, + 1, + 0, + 0, + 0, + 0, + 87, + 1, + 0, + 0, + 0, + 0, + 89, + 1, + 0, + 0, + 0, + 0, + 91, + 1, + 0, + 0, + 0, + 0, + 93, + 1, + 0, + 0, + 0, + 0, + 95, + 1, + 0, + 0, + 0, + 0, + 97, + 1, + 0, + 0, + 0, + 0, + 99, + 1, + 0, + 0, + 0, + 0, + 101, + 1, + 0, + 0, + 0, + 0, + 103, + 1, + 0, + 0, + 0, + 0, + 105, + 1, + 0, + 0, + 0, + 0, + 107, + 1, + 0, + 0, + 0, + 0, + 109, + 1, + 0, + 0, + 0, + 0, + 111, + 1, + 0, + 0, + 0, + 0, + 113, + 1, + 0, + 0, + 0, + 0, + 115, + 1, + 0, + 0, + 0, + 0, + 117, + 1, + 0, + 0, + 0, + 0, + 119, + 1, + 0, + 0, + 0, + 0, + 121, + 1, + 0, + 0, + 0, + 0, + 123, + 1, + 0, + 0, + 0, + 0, + 125, + 1, + 0, + 0, + 0, + 0, + 127, + 1, + 0, + 0, + 0, + 0, + 129, + 1, + 0, + 0, + 0, + 0, + 131, + 1, + 0, + 0, + 0, + 0, + 133, + 1, + 0, + 0, + 0, + 0, + 135, + 1, + 0, + 0, + 0, + 0, + 137, + 1, + 0, + 0, + 0, + 0, + 139, + 1, + 0, + 0, + 0, + 0, + 141, + 1, + 0, + 0, + 0, + 0, + 143, + 1, + 0, + 0, + 0, + 0, + 145, + 1, + 0, + 0, + 0, + 0, + 147, + 1, + 0, + 0, + 0, + 0, + 149, + 1, + 0, + 0, + 0, + 0, + 151, + 1, + 0, + 0, + 0, + 0, + 153, + 1, + 0, + 0, + 0, + 0, + 155, + 1, + 0, + 0, + 0, + 0, + 157, + 1, + 0, + 0, + 0, + 0, + 159, + 1, + 0, + 0, + 0, + 0, + 161, + 1, + 0, + 0, + 0, + 0, + 163, + 1, + 0, + 0, + 0, + 0, + 165, + 1, + 0, + 0, + 0, + 0, + 167, + 1, + 0, + 0, + 0, + 0, + 169, + 1, + 0, + 0, + 0, + 0, + 171, + 1, + 0, + 0, + 0, + 0, + 173, + 1, + 0, + 0, + 0, + 0, + 175, + 1, + 0, + 0, + 0, + 0, + 177, + 1, + 0, + 0, + 0, + 0, + 179, + 1, + 0, + 0, + 0, + 0, + 181, + 1, + 0, + 0, + 0, + 0, + 183, + 1, + 0, + 0, + 0, + 0, + 185, + 1, + 0, + 0, + 0, + 0, + 187, + 1, + 0, + 0, + 0, + 0, + 189, + 1, + 0, + 0, + 0, + 0, + 191, + 1, + 0, + 0, + 0, + 0, + 193, + 1, + 0, + 0, + 0, + 0, + 195, + 1, + 0, + 0, + 0, + 0, + 197, + 1, + 0, + 0, + 0, + 0, + 199, + 1, + 0, + 0, + 0, + 0, + 201, + 1, + 0, + 0, + 0, + 0, + 203, + 1, + 0, + 0, + 0, + 0, + 205, + 1, + 0, + 0, + 0, + 0, + 207, + 1, + 0, + 0, + 0, + 0, + 209, + 1, + 0, + 0, + 0, + 0, + 211, + 1, + 0, + 0, + 0, + 0, + 213, + 1, + 0, + 0, + 0, + 0, + 215, + 1, + 0, + 0, + 0, + 0, + 217, + 1, + 0, + 0, + 0, + 0, + 219, + 1, + 0, + 0, + 0, + 0, + 221, + 1, + 0, + 0, + 0, + 0, + 223, + 1, + 0, + 0, + 0, + 0, + 225, + 1, + 0, + 0, + 0, + 0, + 231, + 1, + 0, + 0, + 0, + 0, + 233, + 1, + 0, + 0, + 0, + 0, + 235, + 1, + 0, + 0, + 0, + 1, + 238, + 1, + 0, + 0, + 0, + 3, + 244, + 1, + 0, + 0, + 0, + 5, + 248, + 1, + 0, + 0, + 0, + 7, + 270, + 1, + 0, + 0, + 0, + 9, + 288, + 1, + 0, + 0, + 0, + 11, + 302, + 1, + 0, + 0, + 0, + 13, + 316, + 1, + 0, + 0, + 0, + 15, + 325, + 1, + 0, + 0, + 0, + 17, + 338, + 1, + 0, + 0, + 0, + 19, + 347, + 1, + 0, + 0, + 0, + 21, + 356, + 1, + 0, + 0, + 0, + 23, + 362, + 1, + 0, + 0, + 0, + 25, + 371, + 1, + 0, + 0, + 0, + 27, + 378, + 1, + 0, + 0, + 0, + 29, + 390, + 1, + 0, + 0, + 0, + 31, + 395, + 1, + 0, + 0, + 0, + 33, + 400, + 1, + 0, + 0, + 0, + 35, + 453, + 1, + 0, + 0, + 0, + 37, + 464, + 1, + 0, + 0, + 0, + 39, + 466, + 1, + 0, + 0, + 0, + 41, + 471, + 1, + 0, + 0, + 0, + 43, + 474, + 1, + 0, + 0, + 0, + 45, + 500, + 1, + 0, + 0, + 0, + 47, + 522, + 1, + 0, + 0, + 0, + 49, + 538, + 1, + 0, + 0, + 0, + 51, + 546, + 1, + 0, + 0, + 0, + 53, + 548, + 1, + 0, + 0, + 0, + 55, + 550, + 1, + 0, + 0, + 0, + 57, + 552, + 1, + 0, + 0, + 0, + 59, + 554, + 1, + 0, + 0, + 0, + 61, + 556, + 1, + 0, + 0, + 0, + 63, + 558, + 1, + 0, + 0, + 0, + 65, + 560, + 1, + 0, + 0, + 0, + 67, + 562, + 1, + 0, + 0, + 0, + 69, + 564, + 1, + 0, + 0, + 0, + 71, + 583, + 1, + 0, + 0, + 0, + 73, + 602, + 1, + 0, + 0, + 0, + 75, + 643, + 1, + 0, + 0, + 0, + 77, + 645, + 1, + 0, + 0, + 0, + 79, + 650, + 1, + 0, + 0, + 0, + 81, + 663, + 1, + 0, + 0, + 0, + 83, + 674, + 1, + 0, + 0, + 0, + 85, + 697, + 1, + 0, + 0, + 0, + 87, + 699, + 1, + 0, + 0, + 0, + 89, + 702, + 1, + 0, + 0, + 0, + 91, + 707, + 1, + 0, + 0, + 0, + 93, + 712, + 1, + 0, + 0, + 0, + 95, + 720, + 1, + 0, + 0, + 0, + 97, + 723, + 1, + 0, + 0, + 0, + 99, + 727, + 1, + 0, + 0, + 0, + 101, + 731, + 1, + 0, + 0, + 0, + 103, + 735, + 1, + 0, + 0, + 0, + 105, + 740, + 1, + 0, + 0, + 0, + 107, + 745, + 1, + 0, + 0, + 0, + 109, + 752, + 1, + 0, + 0, + 0, + 111, + 759, + 1, + 0, + 0, + 0, + 113, + 769, + 1, + 0, + 0, + 0, + 115, + 782, + 1, + 0, + 0, + 0, + 117, + 787, + 1, + 0, + 0, + 0, + 119, + 792, + 1, + 0, + 0, + 0, + 121, + 806, + 1, + 0, + 0, + 0, + 123, + 819, + 1, + 0, + 0, + 0, + 125, + 824, + 1, + 0, + 0, + 0, + 127, + 832, + 1, + 0, + 0, + 0, + 129, + 852, + 1, + 0, + 0, + 0, + 131, + 875, + 1, + 0, + 0, + 0, + 133, + 885, + 1, + 0, + 0, + 0, + 135, + 893, + 1, + 0, + 0, + 0, + 137, + 905, + 1, + 0, + 0, + 0, + 139, + 912, + 1, + 0, + 0, + 0, + 141, + 920, + 1, + 0, + 0, + 0, + 143, + 925, + 1, + 0, + 0, + 0, + 145, + 929, + 1, + 0, + 0, + 0, + 147, + 932, + 1, + 0, + 0, + 0, + 149, + 937, + 1, + 0, + 0, + 0, + 151, + 941, + 1, + 0, + 0, + 0, + 153, + 946, + 1, + 0, + 0, + 0, + 155, + 949, + 1, + 0, + 0, + 0, + 157, + 954, + 1, + 0, + 0, + 0, + 159, + 960, + 1, + 0, + 0, + 0, + 161, + 965, + 1, + 0, + 0, + 0, + 163, + 969, + 1, + 0, + 0, + 0, + 165, + 973, + 1, + 0, + 0, + 0, + 167, + 979, + 1, + 0, + 0, + 0, + 169, + 985, + 1, + 0, + 0, + 0, + 171, + 991, + 1, + 0, + 0, + 0, + 173, + 996, + 1, + 0, + 0, + 0, + 175, + 1000, + 1, + 0, + 0, + 0, + 177, + 1003, + 1, + 0, + 0, + 0, + 179, + 1006, + 1, + 0, + 0, + 0, + 181, + 1008, + 1, + 0, + 0, + 0, + 183, + 1010, + 1, + 0, + 0, + 0, + 185, + 1012, + 1, + 0, + 0, + 0, + 187, + 1014, + 1, + 0, + 0, + 0, + 189, + 1016, + 1, + 0, + 0, + 0, + 191, + 1018, + 1, + 0, + 0, + 0, + 193, + 1021, + 1, + 0, + 0, + 0, + 195, + 1024, + 1, + 0, + 0, + 0, + 197, + 1027, + 1, + 0, + 0, + 0, + 199, + 1029, + 1, + 0, + 0, + 0, + 201, + 1031, + 1, + 0, + 0, + 0, + 203, + 1033, + 1, + 0, + 0, + 0, + 205, + 1035, + 1, + 0, + 0, + 0, + 207, + 1037, + 1, + 0, + 0, + 0, + 209, + 1039, + 1, + 0, + 0, + 0, + 211, + 1041, + 1, + 0, + 0, + 0, + 213, + 1043, + 1, + 0, + 0, + 0, + 215, + 1045, + 1, + 0, + 0, + 0, + 217, + 1047, + 1, + 0, + 0, + 0, + 219, + 1049, + 1, + 0, + 0, + 0, + 221, + 1051, + 1, + 0, + 0, + 0, + 223, + 1055, + 1, + 0, + 0, + 0, + 225, + 1058, + 1, + 0, + 0, + 0, + 227, + 1069, + 1, + 0, + 0, + 0, + 229, + 1071, + 1, + 0, + 0, + 0, + 231, + 1074, + 1, + 0, + 0, + 0, + 233, + 1078, + 1, + 0, + 0, + 0, + 235, + 1091, + 1, + 0, + 0, + 0, + 237, + 239, + 7, + 0, + 0, + 0, + 238, + 237, + 1, + 0, + 0, + 0, + 239, + 240, + 1, + 0, + 0, + 0, + 240, + 238, + 1, + 0, + 0, + 0, + 240, + 241, + 1, + 0, + 0, + 0, + 241, + 242, + 1, + 0, + 0, + 0, + 242, + 243, + 6, + 0, + 0, + 0, + 243, + 2, + 1, + 0, + 0, + 0, + 244, + 245, + 5, + 35, + 0, + 0, + 245, + 246, + 5, + 35, + 0, + 0, + 246, + 247, + 5, + 35, + 0, + 0, + 247, + 4, + 1, + 0, + 0, + 0, + 248, + 249, + 7, + 1, + 0, + 0, + 249, + 250, + 7, + 2, + 0, + 0, + 250, + 251, + 7, + 3, + 0, + 0, + 251, + 252, + 7, + 1, + 0, + 0, + 252, + 253, + 7, + 4, + 0, + 0, + 253, + 254, + 7, + 5, + 0, + 0, + 254, + 255, + 7, + 6, + 0, + 0, + 255, + 256, + 7, + 7, + 0, + 0, + 256, + 257, + 7, + 4, + 0, + 0, + 257, + 258, + 5, + 95, + 0, + 0, + 258, + 259, + 7, + 1, + 0, + 0, + 259, + 260, + 7, + 8, + 0, + 0, + 260, + 261, + 7, + 6, + 0, + 0, + 261, + 262, + 7, + 9, + 0, + 0, + 262, + 263, + 7, + 6, + 0, + 0, + 263, + 264, + 7, + 5, + 0, + 0, + 264, + 265, + 5, + 95, + 0, + 0, + 265, + 266, + 7, + 4, + 0, + 0, + 266, + 267, + 7, + 10, + 0, + 0, + 267, + 268, + 7, + 1, + 0, + 0, + 268, + 269, + 7, + 4, + 0, + 0, + 269, + 6, + 1, + 0, + 0, + 0, + 270, + 271, + 7, + 1, + 0, + 0, + 271, + 272, + 7, + 2, + 0, + 0, + 272, + 273, + 7, + 3, + 0, + 0, + 273, + 274, + 7, + 1, + 0, + 0, + 274, + 275, + 7, + 4, + 0, + 0, + 275, + 276, + 7, + 5, + 0, + 0, + 276, + 277, + 7, + 6, + 0, + 0, + 277, + 278, + 7, + 7, + 0, + 0, + 278, + 279, + 7, + 4, + 0, + 0, + 279, + 280, + 5, + 95, + 0, + 0, + 280, + 281, + 7, + 7, + 0, + 0, + 281, + 282, + 7, + 11, + 0, + 0, + 282, + 283, + 7, + 8, + 0, + 0, + 283, + 284, + 7, + 9, + 0, + 0, + 284, + 285, + 7, + 2, + 0, + 0, + 285, + 286, + 7, + 12, + 0, + 0, + 286, + 287, + 7, + 10, + 0, + 0, + 287, + 8, + 1, + 0, + 0, + 0, + 288, + 290, + 7, + 13, + 0, + 0, + 289, + 291, + 3, + 85, + 42, + 0, + 290, + 289, + 1, + 0, + 0, + 0, + 291, + 292, + 1, + 0, + 0, + 0, + 292, + 290, + 1, + 0, + 0, + 0, + 292, + 293, + 1, + 0, + 0, + 0, + 293, + 300, + 1, + 0, + 0, + 0, + 294, + 296, + 5, + 46, + 0, + 0, + 295, + 297, + 3, + 85, + 42, + 0, + 296, + 295, + 1, + 0, + 0, + 0, + 297, + 298, + 1, + 0, + 0, + 0, + 298, + 296, + 1, + 0, + 0, + 0, + 298, + 299, + 1, + 0, + 0, + 0, + 299, + 301, + 1, + 0, + 0, + 0, + 300, + 294, + 1, + 0, + 0, + 0, + 300, + 301, + 1, + 0, + 0, + 0, + 301, + 10, + 1, + 0, + 0, + 0, + 302, + 303, + 5, + 35, + 0, + 0, + 303, + 304, + 5, + 32, + 0, + 0, + 304, + 308, + 1, + 0, + 0, + 0, + 305, + 307, + 8, + 14, + 0, + 0, + 306, + 305, + 1, + 0, + 0, + 0, + 307, + 310, + 1, + 0, + 0, + 0, + 308, + 306, + 1, + 0, + 0, + 0, + 308, + 309, + 1, + 0, + 0, + 0, + 309, + 312, + 1, + 0, + 0, + 0, + 310, + 308, + 1, + 0, + 0, + 0, + 311, + 313, + 5, + 13, + 0, + 0, + 312, + 311, + 1, + 0, + 0, + 0, + 312, + 313, + 1, + 0, + 0, + 0, + 313, + 314, + 1, + 0, + 0, + 0, + 314, + 315, + 5, + 10, + 0, + 0, + 315, + 12, + 1, + 0, + 0, + 0, + 316, + 317, + 5, + 60, + 0, + 0, + 317, + 318, + 5, + 33, + 0, + 0, + 318, + 319, + 7, + 10, + 0, + 0, + 319, + 320, + 7, + 5, + 0, + 0, + 320, + 321, + 7, + 5, + 0, + 0, + 321, + 322, + 7, + 15, + 0, + 0, + 322, + 323, + 7, + 5, + 0, + 0, + 323, + 324, + 5, + 62, + 0, + 0, + 324, + 14, + 1, + 0, + 0, + 0, + 325, + 326, + 5, + 60, + 0, + 0, + 326, + 327, + 5, + 33, + 0, + 0, + 327, + 328, + 7, + 2, + 0, + 0, + 328, + 329, + 7, + 11, + 0, + 0, + 329, + 330, + 7, + 12, + 0, + 0, + 330, + 331, + 7, + 10, + 0, + 0, + 331, + 332, + 7, + 16, + 0, + 0, + 332, + 333, + 7, + 7, + 0, + 0, + 333, + 334, + 7, + 11, + 0, + 0, + 334, + 335, + 7, + 10, + 0, + 0, + 335, + 336, + 7, + 12, + 0, + 0, + 336, + 337, + 5, + 62, + 0, + 0, + 337, + 16, + 1, + 0, + 0, + 0, + 338, + 339, + 7, + 15, + 0, + 0, + 339, + 340, + 7, + 13, + 0, + 0, + 340, + 341, + 7, + 10, + 0, + 0, + 341, + 342, + 7, + 5, + 0, + 0, + 342, + 343, + 7, + 16, + 0, + 0, + 343, + 344, + 7, + 9, + 0, + 0, + 344, + 345, + 7, + 15, + 0, + 0, + 345, + 346, + 7, + 17, + 0, + 0, + 346, + 18, + 1, + 0, + 0, + 0, + 347, + 348, + 7, + 5, + 0, + 0, + 348, + 349, + 7, + 15, + 0, + 0, + 349, + 350, + 7, + 2, + 0, + 0, + 350, + 351, + 7, + 11, + 0, + 0, + 351, + 352, + 7, + 12, + 0, + 0, + 352, + 353, + 7, + 7, + 0, + 0, + 353, + 354, + 7, + 11, + 0, + 0, + 354, + 355, + 7, + 18, + 0, + 0, + 355, + 20, + 1, + 0, + 0, + 0, + 356, + 357, + 7, + 10, + 0, + 0, + 357, + 358, + 7, + 5, + 0, + 0, + 358, + 359, + 7, + 5, + 0, + 0, + 359, + 360, + 7, + 15, + 0, + 0, + 360, + 361, + 7, + 5, + 0, + 0, + 361, + 22, + 1, + 0, + 0, + 0, + 362, + 363, + 7, + 1, + 0, + 0, + 363, + 364, + 7, + 6, + 0, + 0, + 364, + 365, + 7, + 4, + 0, + 0, + 365, + 366, + 7, + 2, + 0, + 0, + 366, + 367, + 7, + 5, + 0, + 0, + 367, + 368, + 7, + 6, + 0, + 0, + 368, + 369, + 7, + 4, + 0, + 0, + 369, + 370, + 7, + 10, + 0, + 0, + 370, + 24, + 1, + 0, + 0, + 0, + 371, + 372, + 7, + 1, + 0, + 0, + 372, + 373, + 7, + 7, + 0, + 0, + 373, + 374, + 7, + 9, + 0, + 0, + 374, + 375, + 7, + 10, + 0, + 0, + 375, + 376, + 7, + 11, + 0, + 0, + 376, + 377, + 7, + 4, + 0, + 0, + 377, + 26, + 1, + 0, + 0, + 0, + 378, + 379, + 7, + 4, + 0, + 0, + 379, + 380, + 7, + 7, + 0, + 0, + 380, + 381, + 7, + 10, + 0, + 0, + 381, + 382, + 5, + 95, + 0, + 0, + 382, + 383, + 7, + 4, + 0, + 0, + 383, + 384, + 7, + 15, + 0, + 0, + 384, + 385, + 5, + 95, + 0, + 0, + 385, + 386, + 7, + 10, + 0, + 0, + 386, + 387, + 7, + 13, + 0, + 0, + 387, + 388, + 7, + 10, + 0, + 0, + 388, + 389, + 7, + 11, + 0, + 0, + 389, + 28, + 1, + 0, + 0, + 0, + 390, + 391, + 7, + 11, + 0, + 0, + 391, + 392, + 7, + 6, + 0, + 0, + 392, + 393, + 7, + 11, + 0, + 0, + 393, + 30, + 1, + 0, + 0, + 0, + 394, + 396, + 7, + 19, + 0, + 0, + 395, + 394, + 1, + 0, + 0, + 0, + 395, + 396, + 1, + 0, + 0, + 0, + 396, + 397, + 1, + 0, + 0, + 0, + 397, + 398, + 3, + 227, + 113, + 0, + 398, + 32, + 1, + 0, + 0, + 0, + 399, + 401, + 7, + 19, + 0, + 0, + 400, + 399, + 1, + 0, + 0, + 0, + 400, + 401, + 1, + 0, + 0, + 0, + 401, + 403, + 1, + 0, + 0, + 0, + 402, + 404, + 7, + 20, + 0, + 0, + 403, + 402, + 1, + 0, + 0, + 0, + 404, + 405, + 1, + 0, + 0, + 0, + 405, + 403, + 1, + 0, + 0, + 0, + 405, + 406, + 1, + 0, + 0, + 0, + 406, + 413, + 1, + 0, + 0, + 0, + 407, + 409, + 5, + 46, + 0, + 0, + 408, + 410, + 7, + 20, + 0, + 0, + 409, + 408, + 1, + 0, + 0, + 0, + 410, + 411, + 1, + 0, + 0, + 0, + 411, + 409, + 1, + 0, + 0, + 0, + 411, + 412, + 1, + 0, + 0, + 0, + 412, + 414, + 1, + 0, + 0, + 0, + 413, + 407, + 1, + 0, + 0, + 0, + 413, + 414, + 1, + 0, + 0, + 0, + 414, + 34, + 1, + 0, + 0, + 0, + 415, + 417, + 7, + 19, + 0, + 0, + 416, + 415, + 1, + 0, + 0, + 0, + 416, + 417, + 1, + 0, + 0, + 0, + 417, + 419, + 1, + 0, + 0, + 0, + 418, + 420, + 7, + 20, + 0, + 0, + 419, + 418, + 1, + 0, + 0, + 0, + 420, + 421, + 1, + 0, + 0, + 0, + 421, + 419, + 1, + 0, + 0, + 0, + 421, + 422, + 1, + 0, + 0, + 0, + 422, + 430, + 1, + 0, + 0, + 0, + 423, + 427, + 5, + 46, + 0, + 0, + 424, + 426, + 7, + 20, + 0, + 0, + 425, + 424, + 1, + 0, + 0, + 0, + 426, + 429, + 1, + 0, + 0, + 0, + 427, + 425, + 1, + 0, + 0, + 0, + 427, + 428, + 1, + 0, + 0, + 0, + 428, + 431, + 1, + 0, + 0, + 0, + 429, + 427, + 1, + 0, + 0, + 0, + 430, + 423, + 1, + 0, + 0, + 0, + 430, + 431, + 1, + 0, + 0, + 0, + 431, + 441, + 1, + 0, + 0, + 0, + 432, + 434, + 7, + 10, + 0, + 0, + 433, + 435, + 7, + 19, + 0, + 0, + 434, + 433, + 1, + 0, + 0, + 0, + 434, + 435, + 1, + 0, + 0, + 0, + 435, + 437, + 1, + 0, + 0, + 0, + 436, + 438, + 7, + 20, + 0, + 0, + 437, + 436, + 1, + 0, + 0, + 0, + 438, + 439, + 1, + 0, + 0, + 0, + 439, + 437, + 1, + 0, + 0, + 0, + 439, + 440, + 1, + 0, + 0, + 0, + 440, + 442, + 1, + 0, + 0, + 0, + 441, + 432, + 1, + 0, + 0, + 0, + 441, + 442, + 1, + 0, + 0, + 0, + 442, + 454, + 1, + 0, + 0, + 0, + 443, + 445, + 7, + 19, + 0, + 0, + 444, + 443, + 1, + 0, + 0, + 0, + 444, + 445, + 1, + 0, + 0, + 0, + 445, + 446, + 1, + 0, + 0, + 0, + 446, + 447, + 7, + 7, + 0, + 0, + 447, + 448, + 7, + 11, + 0, + 0, + 448, + 454, + 7, + 16, + 0, + 0, + 449, + 450, + 7, + 1, + 0, + 0, + 450, + 451, + 7, + 11, + 0, + 0, + 451, + 452, + 7, + 6, + 0, + 0, + 452, + 454, + 7, + 11, + 0, + 0, + 453, + 416, + 1, + 0, + 0, + 0, + 453, + 444, + 1, + 0, + 0, + 0, + 453, + 449, + 1, + 0, + 0, + 0, + 454, + 36, + 1, + 0, + 0, + 0, + 455, + 456, + 7, + 4, + 0, + 0, + 456, + 457, + 7, + 5, + 0, + 0, + 457, + 458, + 7, + 2, + 0, + 0, + 458, + 465, + 7, + 10, + 0, + 0, + 459, + 460, + 7, + 16, + 0, + 0, + 460, + 461, + 7, + 6, + 0, + 0, + 461, + 462, + 7, + 9, + 0, + 0, + 462, + 463, + 7, + 1, + 0, + 0, + 463, + 465, + 7, + 10, + 0, + 0, + 464, + 455, + 1, + 0, + 0, + 0, + 464, + 459, + 1, + 0, + 0, + 0, + 465, + 38, + 1, + 0, + 0, + 0, + 466, + 467, + 7, + 20, + 0, + 0, + 467, + 468, + 7, + 20, + 0, + 0, + 468, + 469, + 7, + 20, + 0, + 0, + 469, + 470, + 7, + 20, + 0, + 0, + 470, + 40, + 1, + 0, + 0, + 0, + 471, + 472, + 7, + 20, + 0, + 0, + 472, + 473, + 7, + 20, + 0, + 0, + 473, + 42, + 1, + 0, + 0, + 0, + 474, + 475, + 5, + 39, + 0, + 0, + 475, + 476, + 3, + 39, + 19, + 0, + 476, + 477, + 5, + 45, + 0, + 0, + 477, + 478, + 3, + 41, + 20, + 0, + 478, + 479, + 5, + 45, + 0, + 0, + 479, + 480, + 3, + 41, + 20, + 0, + 480, + 481, + 7, + 4, + 0, + 0, + 481, + 482, + 3, + 41, + 20, + 0, + 482, + 483, + 5, + 58, + 0, + 0, + 483, + 484, + 3, + 41, + 20, + 0, + 484, + 485, + 5, + 58, + 0, + 0, + 485, + 492, + 3, + 41, + 20, + 0, + 486, + 488, + 5, + 46, + 0, + 0, + 487, + 489, + 7, + 20, + 0, + 0, + 488, + 487, + 1, + 0, + 0, + 0, + 489, + 490, + 1, + 0, + 0, + 0, + 490, + 488, + 1, + 0, + 0, + 0, + 490, + 491, + 1, + 0, + 0, + 0, + 491, + 493, + 1, + 0, + 0, + 0, + 492, + 486, + 1, + 0, + 0, + 0, + 492, + 493, + 1, + 0, + 0, + 0, + 493, + 494, + 1, + 0, + 0, + 0, + 494, + 495, + 7, + 19, + 0, + 0, + 495, + 496, + 3, + 41, + 20, + 0, + 496, + 497, + 5, + 58, + 0, + 0, + 497, + 498, + 3, + 41, + 20, + 0, + 498, + 499, + 5, + 39, + 0, + 0, + 499, + 44, + 1, + 0, + 0, + 0, + 500, + 501, + 5, + 39, + 0, + 0, + 501, + 502, + 3, + 39, + 19, + 0, + 502, + 503, + 5, + 45, + 0, + 0, + 503, + 504, + 3, + 41, + 20, + 0, + 504, + 505, + 5, + 45, + 0, + 0, + 505, + 506, + 3, + 41, + 20, + 0, + 506, + 507, + 7, + 4, + 0, + 0, + 507, + 508, + 3, + 41, + 20, + 0, + 508, + 509, + 5, + 58, + 0, + 0, + 509, + 510, + 3, + 41, + 20, + 0, + 510, + 511, + 5, + 58, + 0, + 0, + 511, + 518, + 3, + 41, + 20, + 0, + 512, + 514, + 5, + 46, + 0, + 0, + 513, + 515, + 7, + 20, + 0, + 0, + 514, + 513, + 1, + 0, + 0, + 0, + 515, + 516, + 1, + 0, + 0, + 0, + 516, + 514, + 1, + 0, + 0, + 0, + 516, + 517, + 1, + 0, + 0, + 0, + 517, + 519, + 1, + 0, + 0, + 0, + 518, + 512, + 1, + 0, + 0, + 0, + 518, + 519, + 1, + 0, + 0, + 0, + 519, + 520, + 1, + 0, + 0, + 0, + 520, + 521, + 5, + 39, + 0, + 0, + 521, + 46, + 1, + 0, + 0, + 0, + 522, + 523, + 5, + 39, + 0, + 0, + 523, + 524, + 3, + 41, + 20, + 0, + 524, + 525, + 5, + 58, + 0, + 0, + 525, + 526, + 3, + 41, + 20, + 0, + 526, + 527, + 5, + 58, + 0, + 0, + 527, + 534, + 3, + 41, + 20, + 0, + 528, + 530, + 5, + 46, + 0, + 0, + 529, + 531, + 7, + 20, + 0, + 0, + 530, + 529, + 1, + 0, + 0, + 0, + 531, + 532, + 1, + 0, + 0, + 0, + 532, + 530, + 1, + 0, + 0, + 0, + 532, + 533, + 1, + 0, + 0, + 0, + 533, + 535, + 1, + 0, + 0, + 0, + 534, + 528, + 1, + 0, + 0, + 0, + 534, + 535, + 1, + 0, + 0, + 0, + 535, + 536, + 1, + 0, + 0, + 0, + 536, + 537, + 5, + 39, + 0, + 0, + 537, + 48, + 1, + 0, + 0, + 0, + 538, + 539, + 5, + 39, + 0, + 0, + 539, + 540, + 3, + 39, + 19, + 0, + 540, + 541, + 5, + 45, + 0, + 0, + 541, + 542, + 3, + 41, + 20, + 0, + 542, + 543, + 5, + 45, + 0, + 0, + 543, + 544, + 3, + 41, + 20, + 0, + 544, + 545, + 5, + 39, + 0, + 0, + 545, + 50, + 1, + 0, + 0, + 0, + 546, + 547, + 7, + 21, + 0, + 0, + 547, + 52, + 1, + 0, + 0, + 0, + 548, + 549, + 7, + 4, + 0, + 0, + 549, + 54, + 1, + 0, + 0, + 0, + 550, + 551, + 7, + 22, + 0, + 0, + 551, + 56, + 1, + 0, + 0, + 0, + 552, + 553, + 7, + 23, + 0, + 0, + 553, + 58, + 1, + 0, + 0, + 0, + 554, + 555, + 7, + 12, + 0, + 0, + 555, + 60, + 1, + 0, + 0, + 0, + 556, + 557, + 7, + 24, + 0, + 0, + 557, + 62, + 1, + 0, + 0, + 0, + 558, + 559, + 7, + 1, + 0, + 0, + 559, + 64, + 1, + 0, + 0, + 0, + 560, + 561, + 7, + 16, + 0, + 0, + 561, + 66, + 1, + 0, + 0, + 0, + 562, + 563, + 3, + 199, + 99, + 0, + 563, + 68, + 1, + 0, + 0, + 0, + 564, + 565, + 3, + 197, + 98, + 0, + 565, + 70, + 1, + 0, + 0, + 0, + 566, + 567, + 5, + 39, + 0, + 0, + 567, + 568, + 3, + 51, + 25, + 0, + 568, + 569, + 3, + 31, + 15, + 0, + 569, + 573, + 3, + 55, + 27, + 0, + 570, + 571, + 3, + 31, + 15, + 0, + 571, + 572, + 3, + 57, + 28, + 0, + 572, + 574, + 1, + 0, + 0, + 0, + 573, + 570, + 1, + 0, + 0, + 0, + 573, + 574, + 1, + 0, + 0, + 0, + 574, + 575, + 1, + 0, + 0, + 0, + 575, + 576, + 5, + 39, + 0, + 0, + 576, + 584, + 1, + 0, + 0, + 0, + 577, + 578, + 5, + 39, + 0, + 0, + 578, + 579, + 3, + 51, + 25, + 0, + 579, + 580, + 3, + 31, + 15, + 0, + 580, + 581, + 3, + 57, + 28, + 0, + 581, + 582, + 5, + 39, + 0, + 0, + 582, + 584, + 1, + 0, + 0, + 0, + 583, + 566, + 1, + 0, + 0, + 0, + 583, + 577, + 1, + 0, + 0, + 0, + 584, + 72, + 1, + 0, + 0, + 0, + 585, + 586, + 5, + 39, + 0, + 0, + 586, + 587, + 3, + 51, + 25, + 0, + 587, + 588, + 3, + 31, + 15, + 0, + 588, + 592, + 3, + 59, + 29, + 0, + 589, + 590, + 3, + 53, + 26, + 0, + 590, + 591, + 3, + 75, + 37, + 0, + 591, + 593, + 1, + 0, + 0, + 0, + 592, + 589, + 1, + 0, + 0, + 0, + 592, + 593, + 1, + 0, + 0, + 0, + 593, + 594, + 1, + 0, + 0, + 0, + 594, + 595, + 5, + 39, + 0, + 0, + 595, + 603, + 1, + 0, + 0, + 0, + 596, + 597, + 5, + 39, + 0, + 0, + 597, + 598, + 3, + 51, + 25, + 0, + 598, + 599, + 3, + 53, + 26, + 0, + 599, + 600, + 3, + 75, + 37, + 0, + 600, + 601, + 5, + 39, + 0, + 0, + 601, + 603, + 1, + 0, + 0, + 0, + 602, + 585, + 1, + 0, + 0, + 0, + 602, + 596, + 1, + 0, + 0, + 0, + 603, + 74, + 1, + 0, + 0, + 0, + 604, + 605, + 3, + 31, + 15, + 0, + 605, + 609, + 3, + 61, + 30, + 0, + 606, + 607, + 3, + 31, + 15, + 0, + 607, + 608, + 3, + 57, + 28, + 0, + 608, + 610, + 1, + 0, + 0, + 0, + 609, + 606, + 1, + 0, + 0, + 0, + 609, + 610, + 1, + 0, + 0, + 0, + 610, + 614, + 1, + 0, + 0, + 0, + 611, + 612, + 3, + 31, + 15, + 0, + 612, + 613, + 3, + 63, + 31, + 0, + 613, + 615, + 1, + 0, + 0, + 0, + 614, + 611, + 1, + 0, + 0, + 0, + 614, + 615, + 1, + 0, + 0, + 0, + 615, + 619, + 1, + 0, + 0, + 0, + 616, + 617, + 3, + 31, + 15, + 0, + 617, + 618, + 3, + 65, + 32, + 0, + 618, + 620, + 1, + 0, + 0, + 0, + 619, + 616, + 1, + 0, + 0, + 0, + 619, + 620, + 1, + 0, + 0, + 0, + 620, + 644, + 1, + 0, + 0, + 0, + 621, + 622, + 3, + 31, + 15, + 0, + 622, + 626, + 3, + 57, + 28, + 0, + 623, + 624, + 3, + 31, + 15, + 0, + 624, + 625, + 3, + 63, + 31, + 0, + 625, + 627, + 1, + 0, + 0, + 0, + 626, + 623, + 1, + 0, + 0, + 0, + 626, + 627, + 1, + 0, + 0, + 0, + 627, + 631, + 1, + 0, + 0, + 0, + 628, + 629, + 3, + 31, + 15, + 0, + 629, + 630, + 3, + 65, + 32, + 0, + 630, + 632, + 1, + 0, + 0, + 0, + 631, + 628, + 1, + 0, + 0, + 0, + 631, + 632, + 1, + 0, + 0, + 0, + 632, + 644, + 1, + 0, + 0, + 0, + 633, + 634, + 3, + 31, + 15, + 0, + 634, + 638, + 3, + 63, + 31, + 0, + 635, + 636, + 3, + 31, + 15, + 0, + 636, + 637, + 3, + 65, + 32, + 0, + 637, + 639, + 1, + 0, + 0, + 0, + 638, + 635, + 1, + 0, + 0, + 0, + 638, + 639, + 1, + 0, + 0, + 0, + 639, + 644, + 1, + 0, + 0, + 0, + 640, + 641, + 3, + 31, + 15, + 0, + 641, + 642, + 3, + 65, + 32, + 0, + 642, + 644, + 1, + 0, + 0, + 0, + 643, + 604, + 1, + 0, + 0, + 0, + 643, + 621, + 1, + 0, + 0, + 0, + 643, + 633, + 1, + 0, + 0, + 0, + 643, + 640, + 1, + 0, + 0, + 0, + 644, + 76, + 1, + 0, + 0, + 0, + 645, + 646, + 7, + 11, + 0, + 0, + 646, + 647, + 7, + 2, + 0, + 0, + 647, + 648, + 7, + 9, + 0, + 0, + 648, + 649, + 7, + 9, + 0, + 0, + 649, + 78, + 1, + 0, + 0, + 0, + 650, + 658, + 5, + 39, + 0, + 0, + 651, + 652, + 5, + 92, + 0, + 0, + 652, + 657, + 9, + 0, + 0, + 0, + 653, + 654, + 5, + 39, + 0, + 0, + 654, + 657, + 5, + 39, + 0, + 0, + 655, + 657, + 8, + 25, + 0, + 0, + 656, + 651, + 1, + 0, + 0, + 0, + 656, + 653, + 1, + 0, + 0, + 0, + 656, + 655, + 1, + 0, + 0, + 0, + 657, + 660, + 1, + 0, + 0, + 0, + 658, + 656, + 1, + 0, + 0, + 0, + 658, + 659, + 1, + 0, + 0, + 0, + 659, + 661, + 1, + 0, + 0, + 0, + 660, + 658, + 1, + 0, + 0, + 0, + 661, + 662, + 5, + 39, + 0, + 0, + 662, + 80, + 1, + 0, + 0, + 0, + 663, + 664, + 5, + 47, + 0, + 0, + 664, + 665, + 5, + 47, + 0, + 0, + 665, + 669, + 1, + 0, + 0, + 0, + 666, + 668, + 8, + 14, + 0, + 0, + 667, + 666, + 1, + 0, + 0, + 0, + 668, + 671, + 1, + 0, + 0, + 0, + 669, + 667, + 1, + 0, + 0, + 0, + 669, + 670, + 1, + 0, + 0, + 0, + 670, + 672, + 1, + 0, + 0, + 0, + 671, + 669, + 1, + 0, + 0, + 0, + 672, + 673, + 6, + 40, + 0, + 0, + 673, + 82, + 1, + 0, + 0, + 0, + 674, + 675, + 5, + 47, + 0, + 0, + 675, + 676, + 5, + 42, + 0, + 0, + 676, + 684, + 1, + 0, + 0, + 0, + 677, + 685, + 8, + 26, + 0, + 0, + 678, + 680, + 5, + 42, + 0, + 0, + 679, + 678, + 1, + 0, + 0, + 0, + 680, + 681, + 1, + 0, + 0, + 0, + 681, + 679, + 1, + 0, + 0, + 0, + 681, + 682, + 1, + 0, + 0, + 0, + 682, + 683, + 1, + 0, + 0, + 0, + 683, + 685, + 8, + 27, + 0, + 0, + 684, + 677, + 1, + 0, + 0, + 0, + 684, + 679, + 1, + 0, + 0, + 0, + 685, + 689, + 1, + 0, + 0, + 0, + 686, + 688, + 5, + 42, + 0, + 0, + 687, + 686, + 1, + 0, + 0, + 0, + 688, + 691, + 1, + 0, + 0, + 0, + 689, + 687, + 1, + 0, + 0, + 0, + 689, + 690, + 1, + 0, + 0, + 0, + 690, + 692, + 1, + 0, + 0, + 0, + 691, + 689, + 1, + 0, + 0, + 0, + 692, + 693, + 5, + 42, + 0, + 0, + 693, + 694, + 5, + 47, + 0, + 0, + 694, + 695, + 1, + 0, + 0, + 0, + 695, + 696, + 6, + 41, + 0, + 0, + 696, + 84, + 1, + 0, + 0, + 0, + 697, + 698, + 7, + 20, + 0, + 0, + 698, + 86, + 1, + 0, + 0, + 0, + 699, + 700, + 7, + 7, + 0, + 0, + 700, + 701, + 7, + 16, + 0, + 0, + 701, + 88, + 1, + 0, + 0, + 0, + 702, + 703, + 7, + 4, + 0, + 0, + 703, + 704, + 7, + 24, + 0, + 0, + 704, + 705, + 7, + 10, + 0, + 0, + 705, + 706, + 7, + 11, + 0, + 0, + 706, + 90, + 1, + 0, + 0, + 0, + 707, + 708, + 7, + 10, + 0, + 0, + 708, + 709, + 7, + 9, + 0, + 0, + 709, + 710, + 7, + 1, + 0, + 0, + 710, + 711, + 7, + 10, + 0, + 0, + 711, + 92, + 1, + 0, + 0, + 0, + 712, + 713, + 7, + 3, + 0, + 0, + 713, + 714, + 7, + 15, + 0, + 0, + 714, + 715, + 7, + 15, + 0, + 0, + 715, + 716, + 7, + 9, + 0, + 0, + 716, + 717, + 7, + 10, + 0, + 0, + 717, + 718, + 7, + 6, + 0, + 0, + 718, + 719, + 7, + 11, + 0, + 0, + 719, + 94, + 1, + 0, + 0, + 0, + 720, + 721, + 7, + 7, + 0, + 0, + 721, + 722, + 5, + 56, + 0, + 0, + 722, + 96, + 1, + 0, + 0, + 0, + 723, + 724, + 7, + 7, + 0, + 0, + 724, + 725, + 5, + 49, + 0, + 0, + 725, + 726, + 5, + 54, + 0, + 0, + 726, + 98, + 1, + 0, + 0, + 0, + 727, + 728, + 7, + 7, + 0, + 0, + 728, + 729, + 5, + 51, + 0, + 0, + 729, + 730, + 5, + 50, + 0, + 0, + 730, + 100, + 1, + 0, + 0, + 0, + 731, + 732, + 7, + 7, + 0, + 0, + 732, + 733, + 5, + 54, + 0, + 0, + 733, + 734, + 5, + 52, + 0, + 0, + 734, + 102, + 1, + 0, + 0, + 0, + 735, + 736, + 7, + 16, + 0, + 0, + 736, + 737, + 7, + 21, + 0, + 0, + 737, + 738, + 5, + 51, + 0, + 0, + 738, + 739, + 5, + 50, + 0, + 0, + 739, + 104, + 1, + 0, + 0, + 0, + 740, + 741, + 7, + 16, + 0, + 0, + 741, + 742, + 7, + 21, + 0, + 0, + 742, + 743, + 5, + 54, + 0, + 0, + 743, + 744, + 5, + 52, + 0, + 0, + 744, + 106, + 1, + 0, + 0, + 0, + 745, + 746, + 7, + 1, + 0, + 0, + 746, + 747, + 7, + 4, + 0, + 0, + 747, + 748, + 7, + 5, + 0, + 0, + 748, + 749, + 7, + 7, + 0, + 0, + 749, + 750, + 7, + 11, + 0, + 0, + 750, + 751, + 7, + 18, + 0, + 0, + 751, + 108, + 1, + 0, + 0, + 0, + 752, + 753, + 7, + 3, + 0, + 0, + 753, + 754, + 7, + 7, + 0, + 0, + 754, + 755, + 7, + 11, + 0, + 0, + 755, + 756, + 7, + 6, + 0, + 0, + 756, + 757, + 7, + 5, + 0, + 0, + 757, + 758, + 7, + 22, + 0, + 0, + 758, + 110, + 1, + 0, + 0, + 0, + 759, + 760, + 7, + 4, + 0, + 0, + 760, + 761, + 7, + 7, + 0, + 0, + 761, + 762, + 7, + 23, + 0, + 0, + 762, + 763, + 7, + 10, + 0, + 0, + 763, + 764, + 7, + 1, + 0, + 0, + 764, + 765, + 7, + 4, + 0, + 0, + 765, + 766, + 7, + 6, + 0, + 0, + 766, + 767, + 7, + 23, + 0, + 0, + 767, + 768, + 7, + 21, + 0, + 0, + 768, + 112, + 1, + 0, + 0, + 0, + 769, + 770, + 7, + 4, + 0, + 0, + 770, + 771, + 7, + 7, + 0, + 0, + 771, + 772, + 7, + 23, + 0, + 0, + 772, + 773, + 7, + 10, + 0, + 0, + 773, + 774, + 7, + 1, + 0, + 0, + 774, + 775, + 7, + 4, + 0, + 0, + 775, + 776, + 7, + 6, + 0, + 0, + 776, + 777, + 7, + 23, + 0, + 0, + 777, + 778, + 7, + 21, + 0, + 0, + 778, + 779, + 5, + 95, + 0, + 0, + 779, + 780, + 7, + 4, + 0, + 0, + 780, + 781, + 7, + 28, + 0, + 0, + 781, + 114, + 1, + 0, + 0, + 0, + 782, + 783, + 7, + 12, + 0, + 0, + 783, + 784, + 7, + 6, + 0, + 0, + 784, + 785, + 7, + 4, + 0, + 0, + 785, + 786, + 7, + 10, + 0, + 0, + 786, + 116, + 1, + 0, + 0, + 0, + 787, + 788, + 7, + 4, + 0, + 0, + 788, + 789, + 7, + 7, + 0, + 0, + 789, + 790, + 7, + 23, + 0, + 0, + 790, + 791, + 7, + 10, + 0, + 0, + 791, + 118, + 1, + 0, + 0, + 0, + 792, + 793, + 7, + 7, + 0, + 0, + 793, + 794, + 7, + 11, + 0, + 0, + 794, + 795, + 7, + 4, + 0, + 0, + 795, + 796, + 7, + 10, + 0, + 0, + 796, + 797, + 7, + 5, + 0, + 0, + 797, + 798, + 7, + 13, + 0, + 0, + 798, + 799, + 7, + 6, + 0, + 0, + 799, + 800, + 7, + 9, + 0, + 0, + 800, + 801, + 5, + 95, + 0, + 0, + 801, + 802, + 7, + 22, + 0, + 0, + 802, + 803, + 7, + 10, + 0, + 0, + 803, + 804, + 7, + 6, + 0, + 0, + 804, + 805, + 7, + 5, + 0, + 0, + 805, + 120, + 1, + 0, + 0, + 0, + 806, + 807, + 7, + 7, + 0, + 0, + 807, + 808, + 7, + 11, + 0, + 0, + 808, + 809, + 7, + 4, + 0, + 0, + 809, + 810, + 7, + 10, + 0, + 0, + 810, + 811, + 7, + 5, + 0, + 0, + 811, + 812, + 7, + 13, + 0, + 0, + 812, + 813, + 7, + 6, + 0, + 0, + 813, + 814, + 7, + 9, + 0, + 0, + 814, + 815, + 5, + 95, + 0, + 0, + 815, + 816, + 7, + 12, + 0, + 0, + 816, + 817, + 7, + 6, + 0, + 0, + 817, + 818, + 7, + 22, + 0, + 0, + 818, + 122, + 1, + 0, + 0, + 0, + 819, + 820, + 7, + 2, + 0, + 0, + 820, + 821, + 7, + 2, + 0, + 0, + 821, + 822, + 7, + 7, + 0, + 0, + 822, + 823, + 7, + 12, + 0, + 0, + 823, + 124, + 1, + 0, + 0, + 0, + 824, + 825, + 7, + 12, + 0, + 0, + 825, + 826, + 7, + 10, + 0, + 0, + 826, + 827, + 7, + 8, + 0, + 0, + 827, + 828, + 7, + 7, + 0, + 0, + 828, + 829, + 7, + 23, + 0, + 0, + 829, + 830, + 7, + 6, + 0, + 0, + 830, + 831, + 7, + 9, + 0, + 0, + 831, + 126, + 1, + 0, + 0, + 0, + 832, + 833, + 7, + 21, + 0, + 0, + 833, + 834, + 7, + 5, + 0, + 0, + 834, + 835, + 7, + 10, + 0, + 0, + 835, + 836, + 7, + 8, + 0, + 0, + 836, + 837, + 7, + 7, + 0, + 0, + 837, + 838, + 7, + 1, + 0, + 0, + 838, + 839, + 7, + 7, + 0, + 0, + 839, + 840, + 7, + 15, + 0, + 0, + 840, + 841, + 7, + 11, + 0, + 0, + 841, + 842, + 5, + 95, + 0, + 0, + 842, + 843, + 7, + 4, + 0, + 0, + 843, + 844, + 7, + 7, + 0, + 0, + 844, + 845, + 7, + 23, + 0, + 0, + 845, + 846, + 7, + 10, + 0, + 0, + 846, + 847, + 7, + 1, + 0, + 0, + 847, + 848, + 7, + 4, + 0, + 0, + 848, + 849, + 7, + 6, + 0, + 0, + 849, + 850, + 7, + 23, + 0, + 0, + 850, + 851, + 7, + 21, + 0, + 0, + 851, + 128, + 1, + 0, + 0, + 0, + 852, + 853, + 7, + 21, + 0, + 0, + 853, + 854, + 7, + 5, + 0, + 0, + 854, + 855, + 7, + 10, + 0, + 0, + 855, + 856, + 7, + 8, + 0, + 0, + 856, + 857, + 7, + 7, + 0, + 0, + 857, + 858, + 7, + 1, + 0, + 0, + 858, + 859, + 7, + 7, + 0, + 0, + 859, + 860, + 7, + 15, + 0, + 0, + 860, + 861, + 7, + 11, + 0, + 0, + 861, + 862, + 5, + 95, + 0, + 0, + 862, + 863, + 7, + 4, + 0, + 0, + 863, + 864, + 7, + 7, + 0, + 0, + 864, + 865, + 7, + 23, + 0, + 0, + 865, + 866, + 7, + 10, + 0, + 0, + 866, + 867, + 7, + 1, + 0, + 0, + 867, + 868, + 7, + 4, + 0, + 0, + 868, + 869, + 7, + 6, + 0, + 0, + 869, + 870, + 7, + 23, + 0, + 0, + 870, + 871, + 7, + 21, + 0, + 0, + 871, + 872, + 5, + 95, + 0, + 0, + 872, + 873, + 7, + 4, + 0, + 0, + 873, + 874, + 7, + 28, + 0, + 0, + 874, + 130, + 1, + 0, + 0, + 0, + 875, + 876, + 7, + 16, + 0, + 0, + 876, + 877, + 7, + 7, + 0, + 0, + 877, + 878, + 7, + 29, + 0, + 0, + 878, + 879, + 7, + 10, + 0, + 0, + 879, + 880, + 7, + 12, + 0, + 0, + 880, + 881, + 7, + 8, + 0, + 0, + 881, + 882, + 7, + 24, + 0, + 0, + 882, + 883, + 7, + 6, + 0, + 0, + 883, + 884, + 7, + 5, + 0, + 0, + 884, + 132, + 1, + 0, + 0, + 0, + 885, + 886, + 7, + 13, + 0, + 0, + 886, + 887, + 7, + 6, + 0, + 0, + 887, + 888, + 7, + 5, + 0, + 0, + 888, + 889, + 7, + 8, + 0, + 0, + 889, + 890, + 7, + 24, + 0, + 0, + 890, + 891, + 7, + 6, + 0, + 0, + 891, + 892, + 7, + 5, + 0, + 0, + 892, + 134, + 1, + 0, + 0, + 0, + 893, + 894, + 7, + 16, + 0, + 0, + 894, + 895, + 7, + 7, + 0, + 0, + 895, + 896, + 7, + 29, + 0, + 0, + 896, + 897, + 7, + 10, + 0, + 0, + 897, + 898, + 7, + 12, + 0, + 0, + 898, + 899, + 7, + 3, + 0, + 0, + 899, + 900, + 7, + 7, + 0, + 0, + 900, + 901, + 7, + 11, + 0, + 0, + 901, + 902, + 7, + 6, + 0, + 0, + 902, + 903, + 7, + 5, + 0, + 0, + 903, + 904, + 7, + 22, + 0, + 0, + 904, + 136, + 1, + 0, + 0, + 0, + 905, + 906, + 7, + 1, + 0, + 0, + 906, + 907, + 7, + 4, + 0, + 0, + 907, + 908, + 7, + 5, + 0, + 0, + 908, + 909, + 7, + 2, + 0, + 0, + 909, + 910, + 7, + 8, + 0, + 0, + 910, + 911, + 7, + 4, + 0, + 0, + 911, + 138, + 1, + 0, + 0, + 0, + 912, + 913, + 7, + 11, + 0, + 0, + 913, + 914, + 7, + 1, + 0, + 0, + 914, + 915, + 7, + 4, + 0, + 0, + 915, + 916, + 7, + 5, + 0, + 0, + 916, + 917, + 7, + 2, + 0, + 0, + 917, + 918, + 7, + 8, + 0, + 0, + 918, + 919, + 7, + 4, + 0, + 0, + 919, + 140, + 1, + 0, + 0, + 0, + 920, + 921, + 7, + 9, + 0, + 0, + 921, + 922, + 7, + 7, + 0, + 0, + 922, + 923, + 7, + 1, + 0, + 0, + 923, + 924, + 7, + 4, + 0, + 0, + 924, + 142, + 1, + 0, + 0, + 0, + 925, + 926, + 7, + 23, + 0, + 0, + 926, + 927, + 7, + 6, + 0, + 0, + 927, + 928, + 7, + 21, + 0, + 0, + 928, + 144, + 1, + 0, + 0, + 0, + 929, + 930, + 7, + 2, + 0, + 0, + 930, + 931, + 5, + 33, + 0, + 0, + 931, + 146, + 1, + 0, + 0, + 0, + 932, + 933, + 7, + 3, + 0, + 0, + 933, + 934, + 7, + 15, + 0, + 0, + 934, + 935, + 7, + 15, + 0, + 0, + 935, + 936, + 7, + 9, + 0, + 0, + 936, + 148, + 1, + 0, + 0, + 0, + 937, + 938, + 7, + 1, + 0, + 0, + 938, + 939, + 7, + 4, + 0, + 0, + 939, + 940, + 7, + 5, + 0, + 0, + 940, + 150, + 1, + 0, + 0, + 0, + 941, + 942, + 7, + 13, + 0, + 0, + 942, + 943, + 7, + 3, + 0, + 0, + 943, + 944, + 7, + 7, + 0, + 0, + 944, + 945, + 7, + 11, + 0, + 0, + 945, + 152, + 1, + 0, + 0, + 0, + 946, + 947, + 7, + 4, + 0, + 0, + 947, + 948, + 7, + 1, + 0, + 0, + 948, + 154, + 1, + 0, + 0, + 0, + 949, + 950, + 7, + 4, + 0, + 0, + 950, + 951, + 7, + 1, + 0, + 0, + 951, + 952, + 7, + 4, + 0, + 0, + 952, + 953, + 7, + 28, + 0, + 0, + 953, + 156, + 1, + 0, + 0, + 0, + 954, + 955, + 7, + 7, + 0, + 0, + 955, + 956, + 7, + 22, + 0, + 0, + 956, + 957, + 7, + 10, + 0, + 0, + 957, + 958, + 7, + 6, + 0, + 0, + 958, + 959, + 7, + 5, + 0, + 0, + 959, + 158, + 1, + 0, + 0, + 0, + 960, + 961, + 7, + 7, + 0, + 0, + 961, + 962, + 7, + 12, + 0, + 0, + 962, + 963, + 7, + 6, + 0, + 0, + 963, + 964, + 7, + 22, + 0, + 0, + 964, + 160, + 1, + 0, + 0, + 0, + 965, + 966, + 7, + 12, + 0, + 0, + 966, + 967, + 7, + 10, + 0, + 0, + 967, + 968, + 7, + 8, + 0, + 0, + 968, + 162, + 1, + 0, + 0, + 0, + 969, + 970, + 7, + 21, + 0, + 0, + 970, + 971, + 7, + 4, + 0, + 0, + 971, + 972, + 7, + 1, + 0, + 0, + 972, + 164, + 1, + 0, + 0, + 0, + 973, + 974, + 7, + 21, + 0, + 0, + 974, + 975, + 7, + 4, + 0, + 0, + 975, + 976, + 7, + 1, + 0, + 0, + 976, + 977, + 7, + 4, + 0, + 0, + 977, + 978, + 7, + 28, + 0, + 0, + 978, + 166, + 1, + 0, + 0, + 0, + 979, + 980, + 7, + 16, + 0, + 0, + 980, + 981, + 7, + 8, + 0, + 0, + 981, + 982, + 7, + 24, + 0, + 0, + 982, + 983, + 7, + 6, + 0, + 0, + 983, + 984, + 7, + 5, + 0, + 0, + 984, + 168, + 1, + 0, + 0, + 0, + 985, + 986, + 7, + 13, + 0, + 0, + 986, + 987, + 7, + 8, + 0, + 0, + 987, + 988, + 7, + 24, + 0, + 0, + 988, + 989, + 7, + 6, + 0, + 0, + 989, + 990, + 7, + 5, + 0, + 0, + 990, + 170, + 1, + 0, + 0, + 0, + 991, + 992, + 7, + 16, + 0, + 0, + 992, + 993, + 7, + 3, + 0, + 0, + 993, + 994, + 7, + 7, + 0, + 0, + 994, + 995, + 7, + 11, + 0, + 0, + 995, + 172, + 1, + 0, + 0, + 0, + 996, + 997, + 7, + 6, + 0, + 0, + 997, + 998, + 7, + 11, + 0, + 0, + 998, + 999, + 7, + 22, + 0, + 0, + 999, + 174, + 1, + 0, + 0, + 0, + 1000, + 1001, + 3, + 173, + 86, + 0, + 1001, + 1002, + 7, + 20, + 0, + 0, + 1002, + 176, + 1, + 0, + 0, + 0, + 1003, + 1004, + 5, + 58, + 0, + 0, + 1004, + 1005, + 5, + 58, + 0, + 0, + 1005, + 178, + 1, + 0, + 0, + 0, + 1006, + 1007, + 5, + 43, + 0, + 0, + 1007, + 180, + 1, + 0, + 0, + 0, + 1008, + 1009, + 5, + 45, + 0, + 0, + 1009, + 182, + 1, + 0, + 0, + 0, + 1010, + 1011, + 5, + 42, + 0, + 0, + 1011, + 184, + 1, + 0, + 0, + 0, + 1012, + 1013, + 5, + 47, + 0, + 0, + 1013, + 186, + 1, + 0, + 0, + 0, + 1014, + 1015, + 5, + 37, + 0, + 0, + 1015, + 188, + 1, + 0, + 0, + 0, + 1016, + 1017, + 5, + 61, + 0, + 0, + 1017, + 190, + 1, + 0, + 0, + 0, + 1018, + 1019, + 5, + 33, + 0, + 0, + 1019, + 1020, + 5, + 61, + 0, + 0, + 1020, + 192, + 1, + 0, + 0, + 0, + 1021, + 1022, + 5, + 62, + 0, + 0, + 1022, + 1023, + 5, + 61, + 0, + 0, + 1023, + 194, + 1, + 0, + 0, + 0, + 1024, + 1025, + 5, + 60, + 0, + 0, + 1025, + 1026, + 5, + 61, + 0, + 0, + 1026, + 196, + 1, + 0, + 0, + 0, + 1027, + 1028, + 5, + 62, + 0, + 0, + 1028, + 198, + 1, + 0, + 0, + 0, + 1029, + 1030, + 5, + 60, + 0, + 0, + 1030, + 200, + 1, + 0, + 0, + 0, + 1031, + 1032, + 5, + 33, + 0, + 0, + 1032, + 202, + 1, + 0, + 0, + 0, + 1033, + 1034, + 5, + 40, + 0, + 0, + 1034, + 204, + 1, + 0, + 0, + 0, + 1035, + 1036, + 5, + 41, + 0, + 0, + 1036, + 206, + 1, + 0, + 0, + 0, + 1037, + 1038, + 5, + 91, + 0, + 0, + 1038, + 208, + 1, + 0, + 0, + 0, + 1039, + 1040, + 5, + 93, + 0, + 0, + 1040, + 210, + 1, + 0, + 0, + 0, + 1041, + 1042, + 5, + 44, + 0, + 0, + 1042, + 212, + 1, + 0, + 0, + 0, + 1043, + 1044, + 5, + 58, + 0, + 0, + 1044, + 214, + 1, + 0, + 0, + 0, + 1045, + 1046, + 5, + 63, + 0, + 0, + 1046, + 216, + 1, + 0, + 0, + 0, + 1047, + 1048, + 5, + 35, + 0, + 0, + 1048, + 218, + 1, + 0, + 0, + 0, + 1049, + 1050, + 5, + 46, + 0, + 0, + 1050, + 220, + 1, + 0, + 0, + 0, + 1051, + 1052, + 7, + 6, + 0, + 0, + 1052, + 1053, + 7, + 11, + 0, + 0, + 1053, + 1054, + 7, + 12, + 0, + 0, + 1054, + 222, + 1, + 0, + 0, + 0, + 1055, + 1056, + 7, + 15, + 0, + 0, + 1056, + 1057, + 7, + 5, + 0, + 0, + 1057, + 224, + 1, + 0, + 0, + 0, + 1058, + 1059, + 5, + 58, + 0, + 0, + 1059, + 1060, + 5, + 61, + 0, + 0, + 1060, + 226, + 1, + 0, + 0, + 0, + 1061, + 1065, + 2, + 49, + 57, + 0, + 1062, + 1064, + 3, + 229, + 114, + 0, + 1063, + 1062, + 1, + 0, + 0, + 0, + 1064, + 1067, + 1, + 0, + 0, + 0, + 1065, + 1063, + 1, + 0, + 0, + 0, + 1065, + 1066, + 1, + 0, + 0, + 0, + 1066, + 1070, + 1, + 0, + 0, + 0, + 1067, + 1065, + 1, + 0, + 0, + 0, + 1068, + 1070, + 5, + 48, + 0, + 0, + 1069, + 1061, + 1, + 0, + 0, + 0, + 1069, + 1068, + 1, + 0, + 0, + 0, + 1070, + 228, + 1, + 0, + 0, + 0, + 1071, + 1072, + 2, + 48, + 57, + 0, + 1072, + 230, + 1, + 0, + 0, + 0, + 1073, + 1075, + 5, + 45, + 0, + 0, + 1074, + 1073, + 1, + 0, + 0, + 0, + 1074, + 1075, + 1, + 0, + 0, + 0, + 1075, + 1076, + 1, + 0, + 0, + 0, + 1076, + 1077, + 3, + 227, + 113, + 0, + 1077, + 232, + 1, + 0, + 0, + 0, + 1078, + 1083, + 7, + 30, + 0, + 0, + 1079, + 1082, + 7, + 30, + 0, + 0, + 1080, + 1082, + 3, + 229, + 114, + 0, + 1081, + 1079, + 1, + 0, + 0, + 0, + 1081, + 1080, + 1, + 0, + 0, + 0, + 1082, + 1085, + 1, + 0, + 0, + 0, + 1083, + 1081, + 1, + 0, + 0, + 0, + 1083, + 1084, + 1, + 0, + 0, + 0, + 1084, + 234, + 1, + 0, + 0, + 0, + 1085, + 1083, + 1, + 0, + 0, + 0, + 1086, + 1088, + 5, + 13, + 0, + 0, + 1087, + 1089, + 5, + 10, + 0, + 0, + 1088, + 1087, + 1, + 0, + 0, + 0, + 1088, + 1089, + 1, + 0, + 0, + 0, + 1089, + 1092, + 1, + 0, + 0, + 0, + 1090, + 1092, + 5, + 10, + 0, + 0, + 1091, + 1086, + 1, + 0, + 0, + 0, + 1091, + 1090, + 1, + 0, + 0, + 0, + 1092, + 236, + 1, + 0, + 0, + 0, + 52, + 0, + 240, + 292, + 298, + 300, + 308, + 312, + 395, + 400, + 405, + 411, + 413, + 416, + 421, + 427, + 430, + 434, + 439, + 441, + 444, + 453, + 464, + 490, + 492, + 516, + 518, + 532, + 534, + 573, + 583, + 592, + 602, + 609, + 614, + 619, + 626, + 631, + 638, + 643, + 656, + 658, + 669, + 681, + 684, + 689, + 1065, + 1069, + 1074, + 1081, + 1083, + 1088, + 1091, + 1, + 0, + 1, + 0, + ] + + +class FuncTestCaseLexer(Lexer): + atn = ATNDeserializer().deserialize(serializedATN()) + + decisionsToDFA = [DFA(ds, i) for i, ds in enumerate(atn.decisionToState)] + + Whitespace = 1 + TripleHash = 2 + SubstraitScalarTest = 3 + SubstraitInclude = 4 + FormatVersion = 5 + DescriptionLine = 6 + ErrorResult = 7 + UndefineResult = 8 + Overflow = 9 + Rounding = 10 + Error = 11 + Saturate = 12 + Silent = 13 + TieToEven = 14 + NaN = 15 + IntegerLiteral = 16 + DecimalLiteral = 17 + FloatLiteral = 18 + BooleanLiteral = 19 + TimestampTzLiteral = 20 + TimestampLiteral = 21 + TimeLiteral = 22 + DateLiteral = 23 + PeriodPrefix = 24 + TimePrefix = 25 + YearPrefix = 26 + MSuffix = 27 + DaySuffix = 28 + HourSuffix = 29 + SecondSuffix = 30 + FractionalSecondSuffix = 31 + OAngleBracket = 32 + CAngleBracket = 33 + IntervalYearLiteral = 34 + IntervalDayLiteral = 35 + NullLiteral = 36 + StringLiteral = 37 + LineComment = 38 + BlockComment = 39 + If = 40 + Then = 41 + Else = 42 + Boolean = 43 + I8 = 44 + I16 = 45 + I32 = 46 + I64 = 47 + FP32 = 48 + FP64 = 49 + String = 50 + Binary = 51 + Timestamp = 52 + Timestamp_TZ = 53 + Date = 54 + Time = 55 + Interval_Year = 56 + Interval_Day = 57 + UUID = 58 + Decimal = 59 + Precision_Timestamp = 60 + Precision_Timestamp_TZ = 61 + FixedChar = 62 + VarChar = 63 + FixedBinary = 64 + Struct = 65 + NStruct = 66 + List = 67 + Map = 68 + UserDefined = 69 + Bool = 70 + Str = 71 + VBin = 72 + Ts = 73 + TsTZ = 74 + IYear = 75 + IDay = 76 + Dec = 77 + PTs = 78 + PTsTZ = 79 + FChar = 80 + VChar = 81 + FBin = 82 + Any = 83 + AnyVar = 84 + DoubleColon = 85 + Plus = 86 + Minus = 87 + Asterisk = 88 + ForwardSlash = 89 + Percent = 90 + Eq = 91 + Ne = 92 + Gte = 93 + Lte = 94 + Gt = 95 + Lt = 96 + Bang = 97 + OParen = 98 + CParen = 99 + OBracket = 100 + CBracket = 101 + Comma = 102 + Colon = 103 + QMark = 104 + Hash = 105 + Dot = 106 + And = 107 + Or = 108 + Assign = 109 + Number = 110 + Identifier = 111 + Newline = 112 + + channelNames = ["DEFAULT_TOKEN_CHANNEL", "HIDDEN"] + + modeNames = ["DEFAULT_MODE"] + + literalNames = [ + "", + "'###'", + "'SUBSTRAIT_SCALAR_TEST'", + "'SUBSTRAIT_INCLUDE'", + "''", + "''", + "'OVERFLOW'", + "'ROUNDING'", + "'ERROR'", + "'SATURATE'", + "'SILENT'", + "'TIE_TO_EVEN'", + "'NAN'", + "'P'", + "'T'", + "'Y'", + "'M'", + "'D'", + "'H'", + "'S'", + "'F'", + "'null'", + "'IF'", + "'THEN'", + "'ELSE'", + "'BOOLEAN'", + "'I8'", + "'I16'", + "'I32'", + "'I64'", + "'FP32'", + "'FP64'", + "'STRING'", + "'BINARY'", + "'TIMESTAMP'", + "'TIMESTAMP_TZ'", + "'DATE'", + "'TIME'", + "'INTERVAL_YEAR'", + "'INTERVAL_DAY'", + "'UUID'", + "'DECIMAL'", + "'PRECISION_TIMESTAMP'", + "'PRECISION_TIMESTAMP_TZ'", + "'FIXEDCHAR'", + "'VARCHAR'", + "'FIXEDBINARY'", + "'STRUCT'", + "'NSTRUCT'", + "'LIST'", + "'MAP'", + "'U!'", + "'BOOL'", + "'STR'", + "'VBIN'", + "'TS'", + "'TSTZ'", + "'IYEAR'", + "'IDAY'", + "'DEC'", + "'PTS'", + "'PTSTZ'", + "'FCHAR'", + "'VCHAR'", + "'FBIN'", + "'ANY'", + "'::'", + "'+'", + "'-'", + "'*'", + "'/'", + "'%'", + "'='", + "'!='", + "'>='", + "'<='", + "'>'", + "'<'", + "'!'", + "'('", + "')'", + "'['", + "']'", + "','", + "':'", + "'?'", + "'#'", + "'.'", + "'AND'", + "'OR'", + "':='", + ] + + symbolicNames = [ + "", + "Whitespace", + "TripleHash", + "SubstraitScalarTest", + "SubstraitInclude", + "FormatVersion", + "DescriptionLine", + "ErrorResult", + "UndefineResult", + "Overflow", + "Rounding", + "Error", + "Saturate", + "Silent", + "TieToEven", + "NaN", + "IntegerLiteral", + "DecimalLiteral", + "FloatLiteral", + "BooleanLiteral", + "TimestampTzLiteral", + "TimestampLiteral", + "TimeLiteral", + "DateLiteral", + "PeriodPrefix", + "TimePrefix", + "YearPrefix", + "MSuffix", + "DaySuffix", + "HourSuffix", + "SecondSuffix", + "FractionalSecondSuffix", + "OAngleBracket", + "CAngleBracket", + "IntervalYearLiteral", + "IntervalDayLiteral", + "NullLiteral", + "StringLiteral", + "LineComment", + "BlockComment", + "If", + "Then", + "Else", + "Boolean", + "I8", + "I16", + "I32", + "I64", + "FP32", + "FP64", + "String", + "Binary", + "Timestamp", + "Timestamp_TZ", + "Date", + "Time", + "Interval_Year", + "Interval_Day", + "UUID", + "Decimal", + "Precision_Timestamp", + "Precision_Timestamp_TZ", + "FixedChar", + "VarChar", + "FixedBinary", + "Struct", + "NStruct", + "List", + "Map", + "UserDefined", + "Bool", + "Str", + "VBin", + "Ts", + "TsTZ", + "IYear", + "IDay", + "Dec", + "PTs", + "PTsTZ", + "FChar", + "VChar", + "FBin", + "Any", + "AnyVar", + "DoubleColon", + "Plus", + "Minus", + "Asterisk", + "ForwardSlash", + "Percent", + "Eq", + "Ne", + "Gte", + "Lte", + "Gt", + "Lt", + "Bang", + "OParen", + "CParen", + "OBracket", + "CBracket", + "Comma", + "Colon", + "QMark", + "Hash", + "Dot", + "And", + "Or", + "Assign", + "Number", + "Identifier", + "Newline", + ] + + ruleNames = [ + "Whitespace", + "TripleHash", + "SubstraitScalarTest", + "SubstraitInclude", + "FormatVersion", + "DescriptionLine", + "ErrorResult", + "UndefineResult", + "Overflow", + "Rounding", + "Error", + "Saturate", + "Silent", + "TieToEven", + "NaN", + "IntegerLiteral", + "DecimalLiteral", + "FloatLiteral", + "BooleanLiteral", + "FourDigits", + "TwoDigits", + "TimestampTzLiteral", + "TimestampLiteral", + "TimeLiteral", + "DateLiteral", + "PeriodPrefix", + "TimePrefix", + "YearPrefix", + "MSuffix", + "DaySuffix", + "HourSuffix", + "SecondSuffix", + "FractionalSecondSuffix", + "OAngleBracket", + "CAngleBracket", + "IntervalYearLiteral", + "IntervalDayLiteral", + "TimeInterval", + "NullLiteral", + "StringLiteral", + "LineComment", + "BlockComment", + "DIGIT", + "If", + "Then", + "Else", + "Boolean", + "I8", + "I16", + "I32", + "I64", + "FP32", + "FP64", + "String", + "Binary", + "Timestamp", + "Timestamp_TZ", + "Date", + "Time", + "Interval_Year", + "Interval_Day", + "UUID", + "Decimal", + "Precision_Timestamp", + "Precision_Timestamp_TZ", + "FixedChar", + "VarChar", + "FixedBinary", + "Struct", + "NStruct", + "List", + "Map", + "UserDefined", + "Bool", + "Str", + "VBin", + "Ts", + "TsTZ", + "IYear", + "IDay", + "Dec", + "PTs", + "PTsTZ", + "FChar", + "VChar", + "FBin", + "Any", + "AnyVar", + "DoubleColon", + "Plus", + "Minus", + "Asterisk", + "ForwardSlash", + "Percent", + "Eq", + "Ne", + "Gte", + "Lte", + "Gt", + "Lt", + "Bang", + "OParen", + "CParen", + "OBracket", + "CBracket", + "Comma", + "Colon", + "QMark", + "Hash", + "Dot", + "And", + "Or", + "Assign", + "Int", + "Digit", + "Number", + "Identifier", + "Newline", + ] + + grammarFileName = "FuncTestCaseLexer.g4" + + def __init__(self, input=None, output: TextIO = sys.stdout): + super().__init__(input, output) + self.checkVersion("4.13.2") + self._interp = LexerATNSimulator( + self, self.atn, self.decisionsToDFA, PredictionContextCache() + ) + self._actions = None + self._predicates = None diff --git a/tests/coverage/antlr_parser/FuncTestCaseParser.py b/tests/coverage/antlr_parser/FuncTestCaseParser.py new file mode 100644 index 000000000..6812996d3 --- /dev/null +++ b/tests/coverage/antlr_parser/FuncTestCaseParser.py @@ -0,0 +1,7232 @@ +# SPDX-License-Identifier: Apache-2.0 +# Generated from FuncTestCaseParser.g4 by ANTLR 4.13.2 +# encoding: utf-8 +from antlr4 import * +from io import StringIO +import sys + +if sys.version_info[1] > 5: + from typing import TextIO +else: + from typing.io import TextIO + + +def serializedATN(): + return [ + 4, + 1, + 112, + 378, + 2, + 0, + 7, + 0, + 2, + 1, + 7, + 1, + 2, + 2, + 7, + 2, + 2, + 3, + 7, + 3, + 2, + 4, + 7, + 4, + 2, + 5, + 7, + 5, + 2, + 6, + 7, + 6, + 2, + 7, + 7, + 7, + 2, + 8, + 7, + 8, + 2, + 9, + 7, + 9, + 2, + 10, + 7, + 10, + 2, + 11, + 7, + 11, + 2, + 12, + 7, + 12, + 2, + 13, + 7, + 13, + 2, + 14, + 7, + 14, + 2, + 15, + 7, + 15, + 2, + 16, + 7, + 16, + 2, + 17, + 7, + 17, + 2, + 18, + 7, + 18, + 2, + 19, + 7, + 19, + 2, + 20, + 7, + 20, + 2, + 21, + 7, + 21, + 2, + 22, + 7, + 22, + 2, + 23, + 7, + 23, + 2, + 24, + 7, + 24, + 2, + 25, + 7, + 25, + 2, + 26, + 7, + 26, + 2, + 27, + 7, + 27, + 2, + 28, + 7, + 28, + 2, + 29, + 7, + 29, + 2, + 30, + 7, + 30, + 2, + 31, + 7, + 31, + 2, + 32, + 7, + 32, + 2, + 33, + 7, + 33, + 2, + 34, + 7, + 34, + 2, + 35, + 7, + 35, + 2, + 36, + 7, + 36, + 2, + 37, + 7, + 37, + 2, + 38, + 7, + 38, + 2, + 39, + 7, + 39, + 2, + 40, + 7, + 40, + 2, + 41, + 7, + 41, + 1, + 0, + 1, + 0, + 4, + 0, + 87, + 8, + 0, + 11, + 0, + 12, + 0, + 88, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 1, + 3, + 5, + 3, + 107, + 8, + 3, + 10, + 3, + 12, + 3, + 110, + 9, + 3, + 1, + 4, + 1, + 4, + 1, + 5, + 1, + 5, + 1, + 5, + 1, + 5, + 1, + 5, + 1, + 5, + 1, + 5, + 1, + 5, + 3, + 5, + 122, + 8, + 5, + 1, + 5, + 1, + 5, + 1, + 5, + 1, + 6, + 1, + 6, + 4, + 6, + 129, + 8, + 6, + 11, + 6, + 12, + 6, + 130, + 1, + 7, + 1, + 7, + 1, + 7, + 5, + 7, + 136, + 8, + 7, + 10, + 7, + 12, + 7, + 139, + 9, + 7, + 1, + 8, + 1, + 8, + 3, + 8, + 143, + 8, + 8, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 3, + 9, + 157, + 8, + 9, + 1, + 10, + 1, + 10, + 1, + 10, + 3, + 10, + 162, + 8, + 10, + 1, + 11, + 1, + 11, + 1, + 12, + 1, + 12, + 1, + 12, + 1, + 12, + 1, + 13, + 1, + 13, + 1, + 13, + 1, + 13, + 1, + 14, + 1, + 14, + 1, + 14, + 1, + 14, + 1, + 15, + 1, + 15, + 1, + 15, + 1, + 15, + 1, + 16, + 1, + 16, + 1, + 16, + 1, + 16, + 1, + 17, + 1, + 17, + 1, + 17, + 1, + 17, + 1, + 18, + 1, + 18, + 1, + 18, + 1, + 18, + 1, + 19, + 1, + 19, + 1, + 19, + 1, + 19, + 1, + 20, + 1, + 20, + 1, + 20, + 1, + 20, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 21, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 22, + 1, + 23, + 1, + 23, + 1, + 23, + 1, + 23, + 1, + 24, + 1, + 24, + 1, + 24, + 1, + 24, + 1, + 24, + 1, + 24, + 3, + 24, + 220, + 8, + 24, + 1, + 24, + 1, + 24, + 1, + 24, + 3, + 24, + 225, + 8, + 24, + 1, + 25, + 1, + 25, + 1, + 25, + 1, + 25, + 1, + 25, + 1, + 25, + 3, + 25, + 233, + 8, + 25, + 1, + 25, + 1, + 25, + 1, + 25, + 3, + 25, + 238, + 8, + 25, + 1, + 26, + 1, + 26, + 1, + 26, + 1, + 26, + 3, + 26, + 244, + 8, + 26, + 1, + 26, + 1, + 26, + 3, + 26, + 248, + 8, + 26, + 1, + 26, + 1, + 26, + 3, + 26, + 252, + 8, + 26, + 1, + 26, + 1, + 26, + 1, + 26, + 1, + 26, + 3, + 26, + 258, + 8, + 26, + 1, + 26, + 1, + 26, + 3, + 26, + 262, + 8, + 26, + 1, + 26, + 1, + 26, + 1, + 26, + 1, + 26, + 3, + 26, + 268, + 8, + 26, + 1, + 26, + 1, + 26, + 3, + 26, + 272, + 8, + 26, + 1, + 27, + 1, + 27, + 3, + 27, + 276, + 8, + 27, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 1, + 28, + 3, + 28, + 296, + 8, + 28, + 1, + 29, + 1, + 29, + 3, + 29, + 300, + 8, + 29, + 1, + 29, + 1, + 29, + 1, + 29, + 1, + 29, + 1, + 30, + 1, + 30, + 3, + 30, + 308, + 8, + 30, + 1, + 30, + 1, + 30, + 1, + 30, + 1, + 30, + 1, + 31, + 1, + 31, + 3, + 31, + 316, + 8, + 31, + 1, + 31, + 1, + 31, + 1, + 31, + 1, + 31, + 1, + 32, + 1, + 32, + 3, + 32, + 324, + 8, + 32, + 1, + 32, + 1, + 32, + 1, + 32, + 1, + 32, + 1, + 32, + 1, + 32, + 3, + 32, + 332, + 8, + 32, + 1, + 33, + 1, + 33, + 3, + 33, + 336, + 8, + 33, + 1, + 33, + 1, + 33, + 1, + 33, + 1, + 33, + 1, + 34, + 1, + 34, + 3, + 34, + 344, + 8, + 34, + 1, + 34, + 1, + 34, + 1, + 34, + 1, + 34, + 1, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 1, + 35, + 3, + 35, + 356, + 8, + 35, + 1, + 36, + 1, + 36, + 1, + 37, + 1, + 37, + 1, + 38, + 1, + 38, + 1, + 38, + 1, + 38, + 1, + 39, + 1, + 39, + 1, + 40, + 1, + 40, + 1, + 41, + 1, + 41, + 1, + 41, + 5, + 41, + 373, + 8, + 41, + 10, + 41, + 12, + 41, + 376, + 9, + 41, + 1, + 41, + 0, + 0, + 42, + 0, + 2, + 4, + 6, + 8, + 10, + 12, + 14, + 16, + 18, + 20, + 22, + 24, + 26, + 28, + 30, + 32, + 34, + 36, + 38, + 40, + 42, + 44, + 46, + 48, + 50, + 52, + 54, + 56, + 58, + 60, + 62, + 64, + 66, + 68, + 70, + 72, + 74, + 76, + 78, + 80, + 82, + 0, + 6, + 2, + 0, + 15, + 15, + 18, + 18, + 1, + 0, + 44, + 47, + 1, + 0, + 48, + 49, + 1, + 0, + 7, + 8, + 2, + 0, + 9, + 10, + 111, + 111, + 1, + 0, + 11, + 15, + 397, + 0, + 84, + 1, + 0, + 0, + 0, + 2, + 92, + 1, + 0, + 0, + 0, + 4, + 95, + 1, + 0, + 0, + 0, + 6, + 100, + 1, + 0, + 0, + 0, + 8, + 111, + 1, + 0, + 0, + 0, + 10, + 113, + 1, + 0, + 0, + 0, + 12, + 126, + 1, + 0, + 0, + 0, + 14, + 132, + 1, + 0, + 0, + 0, + 16, + 142, + 1, + 0, + 0, + 0, + 18, + 156, + 1, + 0, + 0, + 0, + 20, + 161, + 1, + 0, + 0, + 0, + 22, + 163, + 1, + 0, + 0, + 0, + 24, + 165, + 1, + 0, + 0, + 0, + 26, + 169, + 1, + 0, + 0, + 0, + 28, + 173, + 1, + 0, + 0, + 0, + 30, + 177, + 1, + 0, + 0, + 0, + 32, + 181, + 1, + 0, + 0, + 0, + 34, + 185, + 1, + 0, + 0, + 0, + 36, + 189, + 1, + 0, + 0, + 0, + 38, + 193, + 1, + 0, + 0, + 0, + 40, + 197, + 1, + 0, + 0, + 0, + 42, + 201, + 1, + 0, + 0, + 0, + 44, + 205, + 1, + 0, + 0, + 0, + 46, + 209, + 1, + 0, + 0, + 0, + 48, + 224, + 1, + 0, + 0, + 0, + 50, + 237, + 1, + 0, + 0, + 0, + 52, + 271, + 1, + 0, + 0, + 0, + 54, + 275, + 1, + 0, + 0, + 0, + 56, + 295, + 1, + 0, + 0, + 0, + 58, + 297, + 1, + 0, + 0, + 0, + 60, + 305, + 1, + 0, + 0, + 0, + 62, + 313, + 1, + 0, + 0, + 0, + 64, + 321, + 1, + 0, + 0, + 0, + 66, + 333, + 1, + 0, + 0, + 0, + 68, + 341, + 1, + 0, + 0, + 0, + 70, + 355, + 1, + 0, + 0, + 0, + 72, + 357, + 1, + 0, + 0, + 0, + 74, + 359, + 1, + 0, + 0, + 0, + 76, + 361, + 1, + 0, + 0, + 0, + 78, + 365, + 1, + 0, + 0, + 0, + 80, + 367, + 1, + 0, + 0, + 0, + 82, + 369, + 1, + 0, + 0, + 0, + 84, + 86, + 3, + 2, + 1, + 0, + 85, + 87, + 3, + 12, + 6, + 0, + 86, + 85, + 1, + 0, + 0, + 0, + 87, + 88, + 1, + 0, + 0, + 0, + 88, + 86, + 1, + 0, + 0, + 0, + 88, + 89, + 1, + 0, + 0, + 0, + 89, + 90, + 1, + 0, + 0, + 0, + 90, + 91, + 5, + 0, + 0, + 1, + 91, + 1, + 1, + 0, + 0, + 0, + 92, + 93, + 3, + 4, + 2, + 0, + 93, + 94, + 3, + 6, + 3, + 0, + 94, + 3, + 1, + 0, + 0, + 0, + 95, + 96, + 5, + 2, + 0, + 0, + 96, + 97, + 5, + 3, + 0, + 0, + 97, + 98, + 5, + 103, + 0, + 0, + 98, + 99, + 5, + 5, + 0, + 0, + 99, + 5, + 1, + 0, + 0, + 0, + 100, + 101, + 5, + 2, + 0, + 0, + 101, + 102, + 5, + 4, + 0, + 0, + 102, + 103, + 5, + 103, + 0, + 0, + 103, + 108, + 5, + 37, + 0, + 0, + 104, + 105, + 5, + 102, + 0, + 0, + 105, + 107, + 5, + 37, + 0, + 0, + 106, + 104, + 1, + 0, + 0, + 0, + 107, + 110, + 1, + 0, + 0, + 0, + 108, + 106, + 1, + 0, + 0, + 0, + 108, + 109, + 1, + 0, + 0, + 0, + 109, + 7, + 1, + 0, + 0, + 0, + 110, + 108, + 1, + 0, + 0, + 0, + 111, + 112, + 5, + 6, + 0, + 0, + 112, + 9, + 1, + 0, + 0, + 0, + 113, + 114, + 5, + 111, + 0, + 0, + 114, + 115, + 5, + 98, + 0, + 0, + 115, + 116, + 3, + 14, + 7, + 0, + 116, + 121, + 5, + 99, + 0, + 0, + 117, + 118, + 5, + 100, + 0, + 0, + 118, + 119, + 3, + 82, + 41, + 0, + 119, + 120, + 5, + 101, + 0, + 0, + 120, + 122, + 1, + 0, + 0, + 0, + 121, + 117, + 1, + 0, + 0, + 0, + 121, + 122, + 1, + 0, + 0, + 0, + 122, + 123, + 1, + 0, + 0, + 0, + 123, + 124, + 5, + 91, + 0, + 0, + 124, + 125, + 3, + 16, + 8, + 0, + 125, + 11, + 1, + 0, + 0, + 0, + 126, + 128, + 3, + 8, + 4, + 0, + 127, + 129, + 3, + 10, + 5, + 0, + 128, + 127, + 1, + 0, + 0, + 0, + 129, + 130, + 1, + 0, + 0, + 0, + 130, + 128, + 1, + 0, + 0, + 0, + 130, + 131, + 1, + 0, + 0, + 0, + 131, + 13, + 1, + 0, + 0, + 0, + 132, + 137, + 3, + 18, + 9, + 0, + 133, + 134, + 5, + 102, + 0, + 0, + 134, + 136, + 3, + 18, + 9, + 0, + 135, + 133, + 1, + 0, + 0, + 0, + 136, + 139, + 1, + 0, + 0, + 0, + 137, + 135, + 1, + 0, + 0, + 0, + 137, + 138, + 1, + 0, + 0, + 0, + 138, + 15, + 1, + 0, + 0, + 0, + 139, + 137, + 1, + 0, + 0, + 0, + 140, + 143, + 3, + 18, + 9, + 0, + 141, + 143, + 3, + 74, + 37, + 0, + 142, + 140, + 1, + 0, + 0, + 0, + 142, + 141, + 1, + 0, + 0, + 0, + 143, + 17, + 1, + 0, + 0, + 0, + 144, + 157, + 3, + 24, + 12, + 0, + 145, + 157, + 3, + 26, + 13, + 0, + 146, + 157, + 3, + 28, + 14, + 0, + 147, + 157, + 3, + 32, + 16, + 0, + 148, + 157, + 3, + 34, + 17, + 0, + 149, + 157, + 3, + 30, + 15, + 0, + 150, + 157, + 3, + 36, + 18, + 0, + 151, + 157, + 3, + 38, + 19, + 0, + 152, + 157, + 3, + 40, + 20, + 0, + 153, + 157, + 3, + 42, + 21, + 0, + 154, + 157, + 3, + 44, + 22, + 0, + 155, + 157, + 3, + 46, + 23, + 0, + 156, + 144, + 1, + 0, + 0, + 0, + 156, + 145, + 1, + 0, + 0, + 0, + 156, + 146, + 1, + 0, + 0, + 0, + 156, + 147, + 1, + 0, + 0, + 0, + 156, + 148, + 1, + 0, + 0, + 0, + 156, + 149, + 1, + 0, + 0, + 0, + 156, + 150, + 1, + 0, + 0, + 0, + 156, + 151, + 1, + 0, + 0, + 0, + 156, + 152, + 1, + 0, + 0, + 0, + 156, + 153, + 1, + 0, + 0, + 0, + 156, + 154, + 1, + 0, + 0, + 0, + 156, + 155, + 1, + 0, + 0, + 0, + 157, + 19, + 1, + 0, + 0, + 0, + 158, + 162, + 5, + 17, + 0, + 0, + 159, + 162, + 5, + 16, + 0, + 0, + 160, + 162, + 3, + 22, + 11, + 0, + 161, + 158, + 1, + 0, + 0, + 0, + 161, + 159, + 1, + 0, + 0, + 0, + 161, + 160, + 1, + 0, + 0, + 0, + 162, + 21, + 1, + 0, + 0, + 0, + 163, + 164, + 7, + 0, + 0, + 0, + 164, + 23, + 1, + 0, + 0, + 0, + 165, + 166, + 5, + 36, + 0, + 0, + 166, + 167, + 5, + 85, + 0, + 0, + 167, + 168, + 3, + 54, + 27, + 0, + 168, + 25, + 1, + 0, + 0, + 0, + 169, + 170, + 5, + 16, + 0, + 0, + 170, + 171, + 5, + 85, + 0, + 0, + 171, + 172, + 7, + 1, + 0, + 0, + 172, + 27, + 1, + 0, + 0, + 0, + 173, + 174, + 3, + 20, + 10, + 0, + 174, + 175, + 5, + 85, + 0, + 0, + 175, + 176, + 7, + 2, + 0, + 0, + 176, + 29, + 1, + 0, + 0, + 0, + 177, + 178, + 3, + 20, + 10, + 0, + 178, + 179, + 5, + 85, + 0, + 0, + 179, + 180, + 3, + 64, + 32, + 0, + 180, + 31, + 1, + 0, + 0, + 0, + 181, + 182, + 5, + 19, + 0, + 0, + 182, + 183, + 5, + 85, + 0, + 0, + 183, + 184, + 5, + 70, + 0, + 0, + 184, + 33, + 1, + 0, + 0, + 0, + 185, + 186, + 5, + 37, + 0, + 0, + 186, + 187, + 5, + 85, + 0, + 0, + 187, + 188, + 5, + 71, + 0, + 0, + 188, + 35, + 1, + 0, + 0, + 0, + 189, + 190, + 5, + 23, + 0, + 0, + 190, + 191, + 5, + 85, + 0, + 0, + 191, + 192, + 5, + 54, + 0, + 0, + 192, + 37, + 1, + 0, + 0, + 0, + 193, + 194, + 5, + 22, + 0, + 0, + 194, + 195, + 5, + 85, + 0, + 0, + 195, + 196, + 5, + 55, + 0, + 0, + 196, + 39, + 1, + 0, + 0, + 0, + 197, + 198, + 5, + 21, + 0, + 0, + 198, + 199, + 5, + 85, + 0, + 0, + 199, + 200, + 5, + 73, + 0, + 0, + 200, + 41, + 1, + 0, + 0, + 0, + 201, + 202, + 5, + 20, + 0, + 0, + 202, + 203, + 5, + 85, + 0, + 0, + 203, + 204, + 5, + 74, + 0, + 0, + 204, + 43, + 1, + 0, + 0, + 0, + 205, + 206, + 5, + 34, + 0, + 0, + 206, + 207, + 5, + 85, + 0, + 0, + 207, + 208, + 5, + 75, + 0, + 0, + 208, + 45, + 1, + 0, + 0, + 0, + 209, + 210, + 5, + 35, + 0, + 0, + 210, + 211, + 5, + 85, + 0, + 0, + 211, + 212, + 5, + 76, + 0, + 0, + 212, + 47, + 1, + 0, + 0, + 0, + 213, + 214, + 5, + 24, + 0, + 0, + 214, + 215, + 5, + 16, + 0, + 0, + 215, + 216, + 5, + 26, + 0, + 0, + 216, + 219, + 1, + 0, + 0, + 0, + 217, + 218, + 5, + 16, + 0, + 0, + 218, + 220, + 5, + 27, + 0, + 0, + 219, + 217, + 1, + 0, + 0, + 0, + 219, + 220, + 1, + 0, + 0, + 0, + 220, + 225, + 1, + 0, + 0, + 0, + 221, + 222, + 5, + 24, + 0, + 0, + 222, + 223, + 5, + 16, + 0, + 0, + 223, + 225, + 5, + 27, + 0, + 0, + 224, + 213, + 1, + 0, + 0, + 0, + 224, + 221, + 1, + 0, + 0, + 0, + 225, + 49, + 1, + 0, + 0, + 0, + 226, + 227, + 5, + 24, + 0, + 0, + 227, + 228, + 5, + 16, + 0, + 0, + 228, + 229, + 5, + 28, + 0, + 0, + 229, + 232, + 1, + 0, + 0, + 0, + 230, + 231, + 5, + 25, + 0, + 0, + 231, + 233, + 3, + 52, + 26, + 0, + 232, + 230, + 1, + 0, + 0, + 0, + 232, + 233, + 1, + 0, + 0, + 0, + 233, + 238, + 1, + 0, + 0, + 0, + 234, + 235, + 5, + 24, + 0, + 0, + 235, + 236, + 5, + 25, + 0, + 0, + 236, + 238, + 3, + 52, + 26, + 0, + 237, + 226, + 1, + 0, + 0, + 0, + 237, + 234, + 1, + 0, + 0, + 0, + 238, + 51, + 1, + 0, + 0, + 0, + 239, + 240, + 5, + 16, + 0, + 0, + 240, + 243, + 5, + 29, + 0, + 0, + 241, + 242, + 5, + 16, + 0, + 0, + 242, + 244, + 5, + 27, + 0, + 0, + 243, + 241, + 1, + 0, + 0, + 0, + 243, + 244, + 1, + 0, + 0, + 0, + 244, + 247, + 1, + 0, + 0, + 0, + 245, + 246, + 5, + 16, + 0, + 0, + 246, + 248, + 5, + 30, + 0, + 0, + 247, + 245, + 1, + 0, + 0, + 0, + 247, + 248, + 1, + 0, + 0, + 0, + 248, + 251, + 1, + 0, + 0, + 0, + 249, + 250, + 5, + 16, + 0, + 0, + 250, + 252, + 5, + 31, + 0, + 0, + 251, + 249, + 1, + 0, + 0, + 0, + 251, + 252, + 1, + 0, + 0, + 0, + 252, + 272, + 1, + 0, + 0, + 0, + 253, + 254, + 5, + 16, + 0, + 0, + 254, + 257, + 5, + 27, + 0, + 0, + 255, + 256, + 5, + 16, + 0, + 0, + 256, + 258, + 5, + 30, + 0, + 0, + 257, + 255, + 1, + 0, + 0, + 0, + 257, + 258, + 1, + 0, + 0, + 0, + 258, + 261, + 1, + 0, + 0, + 0, + 259, + 260, + 5, + 16, + 0, + 0, + 260, + 262, + 5, + 31, + 0, + 0, + 261, + 259, + 1, + 0, + 0, + 0, + 261, + 262, + 1, + 0, + 0, + 0, + 262, + 272, + 1, + 0, + 0, + 0, + 263, + 264, + 5, + 16, + 0, + 0, + 264, + 267, + 5, + 30, + 0, + 0, + 265, + 266, + 5, + 16, + 0, + 0, + 266, + 268, + 5, + 31, + 0, + 0, + 267, + 265, + 1, + 0, + 0, + 0, + 267, + 268, + 1, + 0, + 0, + 0, + 268, + 272, + 1, + 0, + 0, + 0, + 269, + 270, + 5, + 16, + 0, + 0, + 270, + 272, + 5, + 31, + 0, + 0, + 271, + 239, + 1, + 0, + 0, + 0, + 271, + 253, + 1, + 0, + 0, + 0, + 271, + 263, + 1, + 0, + 0, + 0, + 271, + 269, + 1, + 0, + 0, + 0, + 272, + 53, + 1, + 0, + 0, + 0, + 273, + 276, + 3, + 56, + 28, + 0, + 274, + 276, + 3, + 70, + 35, + 0, + 275, + 273, + 1, + 0, + 0, + 0, + 275, + 274, + 1, + 0, + 0, + 0, + 276, + 55, + 1, + 0, + 0, + 0, + 277, + 296, + 5, + 70, + 0, + 0, + 278, + 296, + 5, + 44, + 0, + 0, + 279, + 296, + 5, + 45, + 0, + 0, + 280, + 296, + 5, + 46, + 0, + 0, + 281, + 296, + 5, + 47, + 0, + 0, + 282, + 296, + 5, + 48, + 0, + 0, + 283, + 296, + 5, + 49, + 0, + 0, + 284, + 296, + 5, + 71, + 0, + 0, + 285, + 296, + 5, + 51, + 0, + 0, + 286, + 296, + 5, + 73, + 0, + 0, + 287, + 296, + 5, + 74, + 0, + 0, + 288, + 296, + 5, + 54, + 0, + 0, + 289, + 296, + 5, + 55, + 0, + 0, + 290, + 296, + 5, + 76, + 0, + 0, + 291, + 296, + 5, + 75, + 0, + 0, + 292, + 296, + 5, + 58, + 0, + 0, + 293, + 294, + 5, + 69, + 0, + 0, + 294, + 296, + 5, + 111, + 0, + 0, + 295, + 277, + 1, + 0, + 0, + 0, + 295, + 278, + 1, + 0, + 0, + 0, + 295, + 279, + 1, + 0, + 0, + 0, + 295, + 280, + 1, + 0, + 0, + 0, + 295, + 281, + 1, + 0, + 0, + 0, + 295, + 282, + 1, + 0, + 0, + 0, + 295, + 283, + 1, + 0, + 0, + 0, + 295, + 284, + 1, + 0, + 0, + 0, + 295, + 285, + 1, + 0, + 0, + 0, + 295, + 286, + 1, + 0, + 0, + 0, + 295, + 287, + 1, + 0, + 0, + 0, + 295, + 288, + 1, + 0, + 0, + 0, + 295, + 289, + 1, + 0, + 0, + 0, + 295, + 290, + 1, + 0, + 0, + 0, + 295, + 291, + 1, + 0, + 0, + 0, + 295, + 292, + 1, + 0, + 0, + 0, + 295, + 293, + 1, + 0, + 0, + 0, + 296, + 57, + 1, + 0, + 0, + 0, + 297, + 299, + 5, + 80, + 0, + 0, + 298, + 300, + 5, + 104, + 0, + 0, + 299, + 298, + 1, + 0, + 0, + 0, + 299, + 300, + 1, + 0, + 0, + 0, + 300, + 301, + 1, + 0, + 0, + 0, + 301, + 302, + 5, + 32, + 0, + 0, + 302, + 303, + 3, + 72, + 36, + 0, + 303, + 304, + 5, + 33, + 0, + 0, + 304, + 59, + 1, + 0, + 0, + 0, + 305, + 307, + 5, + 81, + 0, + 0, + 306, + 308, + 5, + 104, + 0, + 0, + 307, + 306, + 1, + 0, + 0, + 0, + 307, + 308, + 1, + 0, + 0, + 0, + 308, + 309, + 1, + 0, + 0, + 0, + 309, + 310, + 5, + 32, + 0, + 0, + 310, + 311, + 3, + 72, + 36, + 0, + 311, + 312, + 5, + 33, + 0, + 0, + 312, + 61, + 1, + 0, + 0, + 0, + 313, + 315, + 5, + 82, + 0, + 0, + 314, + 316, + 5, + 104, + 0, + 0, + 315, + 314, + 1, + 0, + 0, + 0, + 315, + 316, + 1, + 0, + 0, + 0, + 316, + 317, + 1, + 0, + 0, + 0, + 317, + 318, + 5, + 32, + 0, + 0, + 318, + 319, + 3, + 72, + 36, + 0, + 319, + 320, + 5, + 33, + 0, + 0, + 320, + 63, + 1, + 0, + 0, + 0, + 321, + 323, + 5, + 77, + 0, + 0, + 322, + 324, + 5, + 104, + 0, + 0, + 323, + 322, + 1, + 0, + 0, + 0, + 323, + 324, + 1, + 0, + 0, + 0, + 324, + 331, + 1, + 0, + 0, + 0, + 325, + 326, + 5, + 32, + 0, + 0, + 326, + 327, + 3, + 72, + 36, + 0, + 327, + 328, + 5, + 102, + 0, + 0, + 328, + 329, + 3, + 72, + 36, + 0, + 329, + 330, + 5, + 33, + 0, + 0, + 330, + 332, + 1, + 0, + 0, + 0, + 331, + 325, + 1, + 0, + 0, + 0, + 331, + 332, + 1, + 0, + 0, + 0, + 332, + 65, + 1, + 0, + 0, + 0, + 333, + 335, + 5, + 78, + 0, + 0, + 334, + 336, + 5, + 104, + 0, + 0, + 335, + 334, + 1, + 0, + 0, + 0, + 335, + 336, + 1, + 0, + 0, + 0, + 336, + 337, + 1, + 0, + 0, + 0, + 337, + 338, + 5, + 32, + 0, + 0, + 338, + 339, + 3, + 72, + 36, + 0, + 339, + 340, + 5, + 33, + 0, + 0, + 340, + 67, + 1, + 0, + 0, + 0, + 341, + 343, + 5, + 79, + 0, + 0, + 342, + 344, + 5, + 104, + 0, + 0, + 343, + 342, + 1, + 0, + 0, + 0, + 343, + 344, + 1, + 0, + 0, + 0, + 344, + 345, + 1, + 0, + 0, + 0, + 345, + 346, + 5, + 32, + 0, + 0, + 346, + 347, + 3, + 72, + 36, + 0, + 347, + 348, + 5, + 33, + 0, + 0, + 348, + 69, + 1, + 0, + 0, + 0, + 349, + 356, + 3, + 58, + 29, + 0, + 350, + 356, + 3, + 60, + 30, + 0, + 351, + 356, + 3, + 62, + 31, + 0, + 352, + 356, + 3, + 64, + 32, + 0, + 353, + 356, + 3, + 66, + 33, + 0, + 354, + 356, + 3, + 68, + 34, + 0, + 355, + 349, + 1, + 0, + 0, + 0, + 355, + 350, + 1, + 0, + 0, + 0, + 355, + 351, + 1, + 0, + 0, + 0, + 355, + 352, + 1, + 0, + 0, + 0, + 355, + 353, + 1, + 0, + 0, + 0, + 355, + 354, + 1, + 0, + 0, + 0, + 356, + 71, + 1, + 0, + 0, + 0, + 357, + 358, + 5, + 16, + 0, + 0, + 358, + 73, + 1, + 0, + 0, + 0, + 359, + 360, + 7, + 3, + 0, + 0, + 360, + 75, + 1, + 0, + 0, + 0, + 361, + 362, + 3, + 78, + 39, + 0, + 362, + 363, + 5, + 103, + 0, + 0, + 363, + 364, + 3, + 80, + 40, + 0, + 364, + 77, + 1, + 0, + 0, + 0, + 365, + 366, + 7, + 4, + 0, + 0, + 366, + 79, + 1, + 0, + 0, + 0, + 367, + 368, + 7, + 5, + 0, + 0, + 368, + 81, + 1, + 0, + 0, + 0, + 369, + 374, + 3, + 76, + 38, + 0, + 370, + 371, + 5, + 102, + 0, + 0, + 371, + 373, + 3, + 76, + 38, + 0, + 372, + 370, + 1, + 0, + 0, + 0, + 373, + 376, + 1, + 0, + 0, + 0, + 374, + 372, + 1, + 0, + 0, + 0, + 374, + 375, + 1, + 0, + 0, + 0, + 375, + 83, + 1, + 0, + 0, + 0, + 376, + 374, + 1, + 0, + 0, + 0, + 30, + 88, + 108, + 121, + 130, + 137, + 142, + 156, + 161, + 219, + 224, + 232, + 237, + 243, + 247, + 251, + 257, + 261, + 267, + 271, + 275, + 295, + 299, + 307, + 315, + 323, + 331, + 335, + 343, + 355, + 374, + ] + + +class FuncTestCaseParser(Parser): + grammarFileName = "FuncTestCaseParser.g4" + + atn = ATNDeserializer().deserialize(serializedATN()) + + decisionsToDFA = [DFA(ds, i) for i, ds in enumerate(atn.decisionToState)] + + sharedContextCache = PredictionContextCache() + + literalNames = [ + "", + "", + "'###'", + "'SUBSTRAIT_SCALAR_TEST'", + "'SUBSTRAIT_INCLUDE'", + "", + "", + "''", + "''", + "'OVERLFOW'", + "'ROUNDING'", + "'ERROR'", + "'SATURATE'", + "'SILENT'", + "'TIE_TO_EVEN'", + "'NAN'", + "", + "", + "", + "", + "", + "", + "", + "", + "'P'", + "'T'", + "'Y'", + "'M'", + "'D'", + "'H'", + "'S'", + "'F'", + "", + "", + "", + "", + "'null'", + "", + "", + "", + "'IF'", + "'THEN'", + "'ELSE'", + "'BOOLEAN'", + "'I8'", + "'I16'", + "'I32'", + "'I64'", + "'FP32'", + "'FP64'", + "'STRING'", + "'BINARY'", + "'TIMESTAMP'", + "'TIMESTAMP_TZ'", + "'DATE'", + "'TIME'", + "'INTERVAL_YEAR'", + "'INTERVAL_DAY'", + "'UUID'", + "'DECIMAL'", + "'PRECISION_TIMESTAMP'", + "'PRECISION_TIMESTAMP_TZ'", + "'FIXEDCHAR'", + "'VARCHAR'", + "'FIXEDBINARY'", + "'STRUCT'", + "'NSTRUCT'", + "'LIST'", + "'MAP'", + "'U!'", + "'BOOL'", + "'STR'", + "'VBIN'", + "'TS'", + "'TSTZ'", + "'IYEAR'", + "'IDAY'", + "'DEC'", + "'PTS'", + "'PTSTZ'", + "'FCHAR'", + "'VCHAR'", + "'FBIN'", + "'ANY'", + "", + "'::'", + "'+'", + "'-'", + "'*'", + "'/'", + "'%'", + "'='", + "'!='", + "'>='", + "'<='", + "'>'", + "'<'", + "'!'", + "'('", + "')'", + "'['", + "']'", + "','", + "':'", + "'?'", + "'#'", + "'.'", + "'AND'", + "'OR'", + "':='", + ] + + symbolicNames = [ + "", + "Whitespace", + "TripleHash", + "SubstraitScalarTest", + "SubstraitInclude", + "FormatVersion", + "DescriptionLine", + "ErrorResult", + "UndefineResult", + "Overflow", + "Rounding", + "Error", + "Saturate", + "Silent", + "TieToEven", + "NaN", + "IntegerLiteral", + "DecimalLiteral", + "FloatLiteral", + "BooleanLiteral", + "TimestampTzLiteral", + "TimestampLiteral", + "TimeLiteral", + "DateLiteral", + "PeriodPrefix", + "TimePrefix", + "YearPrefix", + "MSuffix", + "DaySuffix", + "HourSuffix", + "SecondSuffix", + "FractionalSecondSuffix", + "OAngleBracket", + "CAngleBracket", + "IntervalYearLiteral", + "IntervalDayLiteral", + "NullLiteral", + "StringLiteral", + "LineComment", + "BlockComment", + "If", + "Then", + "Else", + "Boolean", + "I8", + "I16", + "I32", + "I64", + "FP32", + "FP64", + "String", + "Binary", + "Timestamp", + "Timestamp_TZ", + "Date", + "Time", + "Interval_Year", + "Interval_Day", + "UUID", + "Decimal", + "Precision_Timestamp", + "Precision_Timestamp_TZ", + "FixedChar", + "VarChar", + "FixedBinary", + "Struct", + "NStruct", + "List", + "Map", + "UserDefined", + "Bool", + "Str", + "VBin", + "Ts", + "TsTZ", + "IYear", + "IDay", + "Dec", + "PTs", + "PTsTZ", + "FChar", + "VChar", + "FBin", + "Any", + "AnyVar", + "DoubleColon", + "Plus", + "Minus", + "Asterisk", + "ForwardSlash", + "Percent", + "Eq", + "Ne", + "Gte", + "Lte", + "Gt", + "Lt", + "Bang", + "OParen", + "CParen", + "OBracket", + "CBracket", + "Comma", + "Colon", + "QMark", + "Hash", + "Dot", + "And", + "Or", + "Assign", + "Number", + "Identifier", + "Newline", + ] + + RULE_doc = 0 + RULE_header = 1 + RULE_version = 2 + RULE_include = 3 + RULE_testGroupDescription = 4 + RULE_testCase = 5 + RULE_testGroup = 6 + RULE_arguments = 7 + RULE_result = 8 + RULE_argument = 9 + RULE_numericLiteral = 10 + RULE_floatLiteral = 11 + RULE_nullArg = 12 + RULE_intArg = 13 + RULE_floatArg = 14 + RULE_decimalArg = 15 + RULE_booleanArg = 16 + RULE_stringArg = 17 + RULE_dateArg = 18 + RULE_timeArg = 19 + RULE_timestampArg = 20 + RULE_timestampTzArg = 21 + RULE_intervalYearArg = 22 + RULE_intervalDayArg = 23 + RULE_intervalYearLiteral = 24 + RULE_intervalDayLiteral = 25 + RULE_timeInterval = 26 + RULE_datatype = 27 + RULE_scalarType = 28 + RULE_fixedCharType = 29 + RULE_varCharType = 30 + RULE_fixedBinaryType = 31 + RULE_decimalType = 32 + RULE_precisionTimestampType = 33 + RULE_precisionTimestampTZType = 34 + RULE_parameterizedType = 35 + RULE_numericParameter = 36 + RULE_substraitError = 37 + RULE_func_option = 38 + RULE_option_name = 39 + RULE_option_value = 40 + RULE_func_options = 41 + + ruleNames = [ + "doc", + "header", + "version", + "include", + "testGroupDescription", + "testCase", + "testGroup", + "arguments", + "result", + "argument", + "numericLiteral", + "floatLiteral", + "nullArg", + "intArg", + "floatArg", + "decimalArg", + "booleanArg", + "stringArg", + "dateArg", + "timeArg", + "timestampArg", + "timestampTzArg", + "intervalYearArg", + "intervalDayArg", + "intervalYearLiteral", + "intervalDayLiteral", + "timeInterval", + "datatype", + "scalarType", + "fixedCharType", + "varCharType", + "fixedBinaryType", + "decimalType", + "precisionTimestampType", + "precisionTimestampTZType", + "parameterizedType", + "numericParameter", + "substraitError", + "func_option", + "option_name", + "option_value", + "func_options", + ] + + EOF = Token.EOF + Whitespace = 1 + TripleHash = 2 + SubstraitScalarTest = 3 + SubstraitInclude = 4 + FormatVersion = 5 + DescriptionLine = 6 + ErrorResult = 7 + UndefineResult = 8 + Overflow = 9 + Rounding = 10 + Error = 11 + Saturate = 12 + Silent = 13 + TieToEven = 14 + NaN = 15 + IntegerLiteral = 16 + DecimalLiteral = 17 + FloatLiteral = 18 + BooleanLiteral = 19 + TimestampTzLiteral = 20 + TimestampLiteral = 21 + TimeLiteral = 22 + DateLiteral = 23 + PeriodPrefix = 24 + TimePrefix = 25 + YearPrefix = 26 + MSuffix = 27 + DaySuffix = 28 + HourSuffix = 29 + SecondSuffix = 30 + FractionalSecondSuffix = 31 + OAngleBracket = 32 + CAngleBracket = 33 + IntervalYearLiteral = 34 + IntervalDayLiteral = 35 + NullLiteral = 36 + StringLiteral = 37 + LineComment = 38 + BlockComment = 39 + If = 40 + Then = 41 + Else = 42 + Boolean = 43 + I8 = 44 + I16 = 45 + I32 = 46 + I64 = 47 + FP32 = 48 + FP64 = 49 + String = 50 + Binary = 51 + Timestamp = 52 + Timestamp_TZ = 53 + Date = 54 + Time = 55 + Interval_Year = 56 + Interval_Day = 57 + UUID = 58 + Decimal = 59 + Precision_Timestamp = 60 + Precision_Timestamp_TZ = 61 + FixedChar = 62 + VarChar = 63 + FixedBinary = 64 + Struct = 65 + NStruct = 66 + List = 67 + Map = 68 + UserDefined = 69 + Bool = 70 + Str = 71 + VBin = 72 + Ts = 73 + TsTZ = 74 + IYear = 75 + IDay = 76 + Dec = 77 + PTs = 78 + PTsTZ = 79 + FChar = 80 + VChar = 81 + FBin = 82 + Any = 83 + AnyVar = 84 + DoubleColon = 85 + Plus = 86 + Minus = 87 + Asterisk = 88 + ForwardSlash = 89 + Percent = 90 + Eq = 91 + Ne = 92 + Gte = 93 + Lte = 94 + Gt = 95 + Lt = 96 + Bang = 97 + OParen = 98 + CParen = 99 + OBracket = 100 + CBracket = 101 + Comma = 102 + Colon = 103 + QMark = 104 + Hash = 105 + Dot = 106 + And = 107 + Or = 108 + Assign = 109 + Number = 110 + Identifier = 111 + Newline = 112 + + def __init__(self, input: TokenStream, output: TextIO = sys.stdout): + super().__init__(input, output) + self.checkVersion("4.13.2") + self._interp = ParserATNSimulator( + self, self.atn, self.decisionsToDFA, self.sharedContextCache + ) + self._predicates = None + + class DocContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def header(self): + return self.getTypedRuleContext(FuncTestCaseParser.HeaderContext, 0) + + def EOF(self): + return self.getToken(FuncTestCaseParser.EOF, 0) + + def testGroup(self, i: int = None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.TestGroupContext) + else: + return self.getTypedRuleContext(FuncTestCaseParser.TestGroupContext, i) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_doc + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterDoc"): + listener.enterDoc(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitDoc"): + listener.exitDoc(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitDoc"): + return visitor.visitDoc(self) + else: + return visitor.visitChildren(self) + + def doc(self): + localctx = FuncTestCaseParser.DocContext(self, self._ctx, self.state) + self.enterRule(localctx, 0, self.RULE_doc) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 84 + self.header() + self.state = 86 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 85 + self.testGroup() + self.state = 88 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (_la == 6): + break + + self.state = 90 + self.match(FuncTestCaseParser.EOF) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class HeaderContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def version(self): + return self.getTypedRuleContext(FuncTestCaseParser.VersionContext, 0) + + def include(self): + return self.getTypedRuleContext(FuncTestCaseParser.IncludeContext, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_header + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterHeader"): + listener.enterHeader(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitHeader"): + listener.exitHeader(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitHeader"): + return visitor.visitHeader(self) + else: + return visitor.visitChildren(self) + + def header(self): + localctx = FuncTestCaseParser.HeaderContext(self, self._ctx, self.state) + self.enterRule(localctx, 2, self.RULE_header) + try: + self.enterOuterAlt(localctx, 1) + self.state = 92 + self.version() + self.state = 93 + self.include() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class VersionContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def TripleHash(self): + return self.getToken(FuncTestCaseParser.TripleHash, 0) + + def SubstraitScalarTest(self): + return self.getToken(FuncTestCaseParser.SubstraitScalarTest, 0) + + def Colon(self): + return self.getToken(FuncTestCaseParser.Colon, 0) + + def FormatVersion(self): + return self.getToken(FuncTestCaseParser.FormatVersion, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_version + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterVersion"): + listener.enterVersion(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitVersion"): + listener.exitVersion(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitVersion"): + return visitor.visitVersion(self) + else: + return visitor.visitChildren(self) + + def version(self): + localctx = FuncTestCaseParser.VersionContext(self, self._ctx, self.state) + self.enterRule(localctx, 4, self.RULE_version) + try: + self.enterOuterAlt(localctx, 1) + self.state = 95 + self.match(FuncTestCaseParser.TripleHash) + self.state = 96 + self.match(FuncTestCaseParser.SubstraitScalarTest) + self.state = 97 + self.match(FuncTestCaseParser.Colon) + self.state = 98 + self.match(FuncTestCaseParser.FormatVersion) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class IncludeContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def TripleHash(self): + return self.getToken(FuncTestCaseParser.TripleHash, 0) + + def SubstraitInclude(self): + return self.getToken(FuncTestCaseParser.SubstraitInclude, 0) + + def Colon(self): + return self.getToken(FuncTestCaseParser.Colon, 0) + + def StringLiteral(self, i: int = None): + if i is None: + return self.getTokens(FuncTestCaseParser.StringLiteral) + else: + return self.getToken(FuncTestCaseParser.StringLiteral, i) + + def Comma(self, i: int = None): + if i is None: + return self.getTokens(FuncTestCaseParser.Comma) + else: + return self.getToken(FuncTestCaseParser.Comma, i) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_include + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterInclude"): + listener.enterInclude(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitInclude"): + listener.exitInclude(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitInclude"): + return visitor.visitInclude(self) + else: + return visitor.visitChildren(self) + + def include(self): + localctx = FuncTestCaseParser.IncludeContext(self, self._ctx, self.state) + self.enterRule(localctx, 6, self.RULE_include) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 100 + self.match(FuncTestCaseParser.TripleHash) + self.state = 101 + self.match(FuncTestCaseParser.SubstraitInclude) + self.state = 102 + self.match(FuncTestCaseParser.Colon) + self.state = 103 + self.match(FuncTestCaseParser.StringLiteral) + self.state = 108 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la == 102: + self.state = 104 + self.match(FuncTestCaseParser.Comma) + self.state = 105 + self.match(FuncTestCaseParser.StringLiteral) + self.state = 110 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class TestGroupDescriptionContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def DescriptionLine(self): + return self.getToken(FuncTestCaseParser.DescriptionLine, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_testGroupDescription + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterTestGroupDescription"): + listener.enterTestGroupDescription(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitTestGroupDescription"): + listener.exitTestGroupDescription(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitTestGroupDescription"): + return visitor.visitTestGroupDescription(self) + else: + return visitor.visitChildren(self) + + def testGroupDescription(self): + localctx = FuncTestCaseParser.TestGroupDescriptionContext( + self, self._ctx, self.state + ) + self.enterRule(localctx, 8, self.RULE_testGroupDescription) + try: + self.enterOuterAlt(localctx, 1) + self.state = 111 + self.match(FuncTestCaseParser.DescriptionLine) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class TestCaseContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + self.functionName = None # Token + + def OParen(self): + return self.getToken(FuncTestCaseParser.OParen, 0) + + def arguments(self): + return self.getTypedRuleContext(FuncTestCaseParser.ArgumentsContext, 0) + + def CParen(self): + return self.getToken(FuncTestCaseParser.CParen, 0) + + def Eq(self): + return self.getToken(FuncTestCaseParser.Eq, 0) + + def result(self): + return self.getTypedRuleContext(FuncTestCaseParser.ResultContext, 0) + + def Identifier(self): + return self.getToken(FuncTestCaseParser.Identifier, 0) + + def OBracket(self): + return self.getToken(FuncTestCaseParser.OBracket, 0) + + def func_options(self): + return self.getTypedRuleContext(FuncTestCaseParser.Func_optionsContext, 0) + + def CBracket(self): + return self.getToken(FuncTestCaseParser.CBracket, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_testCase + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterTestCase"): + listener.enterTestCase(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitTestCase"): + listener.exitTestCase(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitTestCase"): + return visitor.visitTestCase(self) + else: + return visitor.visitChildren(self) + + def testCase(self): + localctx = FuncTestCaseParser.TestCaseContext(self, self._ctx, self.state) + self.enterRule(localctx, 10, self.RULE_testCase) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 113 + localctx.functionName = self.match(FuncTestCaseParser.Identifier) + self.state = 114 + self.match(FuncTestCaseParser.OParen) + self.state = 115 + self.arguments() + self.state = 116 + self.match(FuncTestCaseParser.CParen) + self.state = 121 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 100: + self.state = 117 + self.match(FuncTestCaseParser.OBracket) + self.state = 118 + self.func_options() + self.state = 119 + self.match(FuncTestCaseParser.CBracket) + + self.state = 123 + self.match(FuncTestCaseParser.Eq) + self.state = 124 + self.result() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class TestGroupContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def testGroupDescription(self): + return self.getTypedRuleContext( + FuncTestCaseParser.TestGroupDescriptionContext, 0 + ) + + def testCase(self, i: int = None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.TestCaseContext) + else: + return self.getTypedRuleContext(FuncTestCaseParser.TestCaseContext, i) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_testGroup + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterTestGroup"): + listener.enterTestGroup(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitTestGroup"): + listener.exitTestGroup(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitTestGroup"): + return visitor.visitTestGroup(self) + else: + return visitor.visitChildren(self) + + def testGroup(self): + localctx = FuncTestCaseParser.TestGroupContext(self, self._ctx, self.state) + self.enterRule(localctx, 12, self.RULE_testGroup) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 126 + self.testGroupDescription() + self.state = 128 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 127 + self.testCase() + self.state = 130 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (_la == 111): + break + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class ArgumentsContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def argument(self, i: int = None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.ArgumentContext) + else: + return self.getTypedRuleContext(FuncTestCaseParser.ArgumentContext, i) + + def Comma(self, i: int = None): + if i is None: + return self.getTokens(FuncTestCaseParser.Comma) + else: + return self.getToken(FuncTestCaseParser.Comma, i) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_arguments + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterArguments"): + listener.enterArguments(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitArguments"): + listener.exitArguments(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitArguments"): + return visitor.visitArguments(self) + else: + return visitor.visitChildren(self) + + def arguments(self): + localctx = FuncTestCaseParser.ArgumentsContext(self, self._ctx, self.state) + self.enterRule(localctx, 14, self.RULE_arguments) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 132 + self.argument() + self.state = 137 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la == 102: + self.state = 133 + self.match(FuncTestCaseParser.Comma) + self.state = 134 + self.argument() + self.state = 139 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class ResultContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def argument(self): + return self.getTypedRuleContext(FuncTestCaseParser.ArgumentContext, 0) + + def substraitError(self): + return self.getTypedRuleContext(FuncTestCaseParser.SubstraitErrorContext, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_result + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterResult"): + listener.enterResult(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitResult"): + listener.exitResult(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitResult"): + return visitor.visitResult(self) + else: + return visitor.visitChildren(self) + + def result(self): + localctx = FuncTestCaseParser.ResultContext(self, self._ctx, self.state) + self.enterRule(localctx, 16, self.RULE_result) + try: + self.state = 142 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [15, 16, 17, 18, 19, 20, 21, 22, 23, 34, 35, 36, 37]: + self.enterOuterAlt(localctx, 1) + self.state = 140 + self.argument() + pass + elif token in [7, 8]: + self.enterOuterAlt(localctx, 2) + self.state = 141 + self.substraitError() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class ArgumentContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def nullArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.NullArgContext, 0) + + def intArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.IntArgContext, 0) + + def floatArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.FloatArgContext, 0) + + def booleanArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.BooleanArgContext, 0) + + def stringArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.StringArgContext, 0) + + def decimalArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.DecimalArgContext, 0) + + def dateArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.DateArgContext, 0) + + def timeArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.TimeArgContext, 0) + + def timestampArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.TimestampArgContext, 0) + + def timestampTzArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.TimestampTzArgContext, 0) + + def intervalYearArg(self): + return self.getTypedRuleContext( + FuncTestCaseParser.IntervalYearArgContext, 0 + ) + + def intervalDayArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.IntervalDayArgContext, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_argument + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterArgument"): + listener.enterArgument(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitArgument"): + listener.exitArgument(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitArgument"): + return visitor.visitArgument(self) + else: + return visitor.visitChildren(self) + + def argument(self): + localctx = FuncTestCaseParser.ArgumentContext(self, self._ctx, self.state) + self.enterRule(localctx, 18, self.RULE_argument) + try: + self.state = 156 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input, 6, self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 144 + self.nullArg() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 145 + self.intArg() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 146 + self.floatArg() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 147 + self.booleanArg() + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 148 + self.stringArg() + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 149 + self.decimalArg() + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 150 + self.dateArg() + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 151 + self.timeArg() + pass + + elif la_ == 9: + self.enterOuterAlt(localctx, 9) + self.state = 152 + self.timestampArg() + pass + + elif la_ == 10: + self.enterOuterAlt(localctx, 10) + self.state = 153 + self.timestampTzArg() + pass + + elif la_ == 11: + self.enterOuterAlt(localctx, 11) + self.state = 154 + self.intervalYearArg() + pass + + elif la_ == 12: + self.enterOuterAlt(localctx, 12) + self.state = 155 + self.intervalDayArg() + pass + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class NumericLiteralContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def DecimalLiteral(self): + return self.getToken(FuncTestCaseParser.DecimalLiteral, 0) + + def IntegerLiteral(self): + return self.getToken(FuncTestCaseParser.IntegerLiteral, 0) + + def floatLiteral(self): + return self.getTypedRuleContext(FuncTestCaseParser.FloatLiteralContext, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_numericLiteral + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterNumericLiteral"): + listener.enterNumericLiteral(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitNumericLiteral"): + listener.exitNumericLiteral(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitNumericLiteral"): + return visitor.visitNumericLiteral(self) + else: + return visitor.visitChildren(self) + + def numericLiteral(self): + localctx = FuncTestCaseParser.NumericLiteralContext(self, self._ctx, self.state) + self.enterRule(localctx, 20, self.RULE_numericLiteral) + try: + self.state = 161 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [17]: + self.enterOuterAlt(localctx, 1) + self.state = 158 + self.match(FuncTestCaseParser.DecimalLiteral) + pass + elif token in [16]: + self.enterOuterAlt(localctx, 2) + self.state = 159 + self.match(FuncTestCaseParser.IntegerLiteral) + pass + elif token in [15, 18]: + self.enterOuterAlt(localctx, 3) + self.state = 160 + self.floatLiteral() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class FloatLiteralContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def FloatLiteral(self): + return self.getToken(FuncTestCaseParser.FloatLiteral, 0) + + def NaN(self): + return self.getToken(FuncTestCaseParser.NaN, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_floatLiteral + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterFloatLiteral"): + listener.enterFloatLiteral(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitFloatLiteral"): + listener.exitFloatLiteral(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitFloatLiteral"): + return visitor.visitFloatLiteral(self) + else: + return visitor.visitChildren(self) + + def floatLiteral(self): + localctx = FuncTestCaseParser.FloatLiteralContext(self, self._ctx, self.state) + self.enterRule(localctx, 22, self.RULE_floatLiteral) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 163 + _la = self._input.LA(1) + if not (_la == 15 or _la == 18): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class NullArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def NullLiteral(self): + return self.getToken(FuncTestCaseParser.NullLiteral, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def datatype(self): + return self.getTypedRuleContext(FuncTestCaseParser.DatatypeContext, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_nullArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterNullArg"): + listener.enterNullArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitNullArg"): + listener.exitNullArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitNullArg"): + return visitor.visitNullArg(self) + else: + return visitor.visitChildren(self) + + def nullArg(self): + localctx = FuncTestCaseParser.NullArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 24, self.RULE_nullArg) + try: + self.enterOuterAlt(localctx, 1) + self.state = 165 + self.match(FuncTestCaseParser.NullLiteral) + self.state = 166 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 167 + self.datatype() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class IntArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def IntegerLiteral(self): + return self.getToken(FuncTestCaseParser.IntegerLiteral, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def I8(self): + return self.getToken(FuncTestCaseParser.I8, 0) + + def I16(self): + return self.getToken(FuncTestCaseParser.I16, 0) + + def I32(self): + return self.getToken(FuncTestCaseParser.I32, 0) + + def I64(self): + return self.getToken(FuncTestCaseParser.I64, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_intArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterIntArg"): + listener.enterIntArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitIntArg"): + listener.exitIntArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitIntArg"): + return visitor.visitIntArg(self) + else: + return visitor.visitChildren(self) + + def intArg(self): + localctx = FuncTestCaseParser.IntArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 26, self.RULE_intArg) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 169 + self.match(FuncTestCaseParser.IntegerLiteral) + self.state = 170 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 171 + _la = self._input.LA(1) + if not ((((_la) & ~0x3F) == 0 and ((1 << _la) & 263882790666240) != 0)): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class FloatArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def numericLiteral(self): + return self.getTypedRuleContext(FuncTestCaseParser.NumericLiteralContext, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def FP32(self): + return self.getToken(FuncTestCaseParser.FP32, 0) + + def FP64(self): + return self.getToken(FuncTestCaseParser.FP64, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_floatArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterFloatArg"): + listener.enterFloatArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitFloatArg"): + listener.exitFloatArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitFloatArg"): + return visitor.visitFloatArg(self) + else: + return visitor.visitChildren(self) + + def floatArg(self): + localctx = FuncTestCaseParser.FloatArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 28, self.RULE_floatArg) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 173 + self.numericLiteral() + self.state = 174 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 175 + _la = self._input.LA(1) + if not (_la == 48 or _la == 49): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class DecimalArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def numericLiteral(self): + return self.getTypedRuleContext(FuncTestCaseParser.NumericLiteralContext, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def decimalType(self): + return self.getTypedRuleContext(FuncTestCaseParser.DecimalTypeContext, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_decimalArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterDecimalArg"): + listener.enterDecimalArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitDecimalArg"): + listener.exitDecimalArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitDecimalArg"): + return visitor.visitDecimalArg(self) + else: + return visitor.visitChildren(self) + + def decimalArg(self): + localctx = FuncTestCaseParser.DecimalArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 30, self.RULE_decimalArg) + try: + self.enterOuterAlt(localctx, 1) + self.state = 177 + self.numericLiteral() + self.state = 178 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 179 + self.decimalType() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class BooleanArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def BooleanLiteral(self): + return self.getToken(FuncTestCaseParser.BooleanLiteral, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def Bool(self): + return self.getToken(FuncTestCaseParser.Bool, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_booleanArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterBooleanArg"): + listener.enterBooleanArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitBooleanArg"): + listener.exitBooleanArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitBooleanArg"): + return visitor.visitBooleanArg(self) + else: + return visitor.visitChildren(self) + + def booleanArg(self): + localctx = FuncTestCaseParser.BooleanArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 32, self.RULE_booleanArg) + try: + self.enterOuterAlt(localctx, 1) + self.state = 181 + self.match(FuncTestCaseParser.BooleanLiteral) + self.state = 182 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 183 + self.match(FuncTestCaseParser.Bool) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class StringArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def StringLiteral(self): + return self.getToken(FuncTestCaseParser.StringLiteral, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def Str(self): + return self.getToken(FuncTestCaseParser.Str, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_stringArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterStringArg"): + listener.enterStringArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitStringArg"): + listener.exitStringArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitStringArg"): + return visitor.visitStringArg(self) + else: + return visitor.visitChildren(self) + + def stringArg(self): + localctx = FuncTestCaseParser.StringArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 34, self.RULE_stringArg) + try: + self.enterOuterAlt(localctx, 1) + self.state = 185 + self.match(FuncTestCaseParser.StringLiteral) + self.state = 186 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 187 + self.match(FuncTestCaseParser.Str) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class DateArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def DateLiteral(self): + return self.getToken(FuncTestCaseParser.DateLiteral, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def Date(self): + return self.getToken(FuncTestCaseParser.Date, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_dateArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterDateArg"): + listener.enterDateArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitDateArg"): + listener.exitDateArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitDateArg"): + return visitor.visitDateArg(self) + else: + return visitor.visitChildren(self) + + def dateArg(self): + localctx = FuncTestCaseParser.DateArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 36, self.RULE_dateArg) + try: + self.enterOuterAlt(localctx, 1) + self.state = 189 + self.match(FuncTestCaseParser.DateLiteral) + self.state = 190 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 191 + self.match(FuncTestCaseParser.Date) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class TimeArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def TimeLiteral(self): + return self.getToken(FuncTestCaseParser.TimeLiteral, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def Time(self): + return self.getToken(FuncTestCaseParser.Time, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_timeArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterTimeArg"): + listener.enterTimeArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitTimeArg"): + listener.exitTimeArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitTimeArg"): + return visitor.visitTimeArg(self) + else: + return visitor.visitChildren(self) + + def timeArg(self): + localctx = FuncTestCaseParser.TimeArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 38, self.RULE_timeArg) + try: + self.enterOuterAlt(localctx, 1) + self.state = 193 + self.match(FuncTestCaseParser.TimeLiteral) + self.state = 194 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 195 + self.match(FuncTestCaseParser.Time) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class TimestampArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def TimestampLiteral(self): + return self.getToken(FuncTestCaseParser.TimestampLiteral, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def Ts(self): + return self.getToken(FuncTestCaseParser.Ts, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_timestampArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterTimestampArg"): + listener.enterTimestampArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitTimestampArg"): + listener.exitTimestampArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitTimestampArg"): + return visitor.visitTimestampArg(self) + else: + return visitor.visitChildren(self) + + def timestampArg(self): + localctx = FuncTestCaseParser.TimestampArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 40, self.RULE_timestampArg) + try: + self.enterOuterAlt(localctx, 1) + self.state = 197 + self.match(FuncTestCaseParser.TimestampLiteral) + self.state = 198 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 199 + self.match(FuncTestCaseParser.Ts) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class TimestampTzArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def TimestampTzLiteral(self): + return self.getToken(FuncTestCaseParser.TimestampTzLiteral, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def TsTZ(self): + return self.getToken(FuncTestCaseParser.TsTZ, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_timestampTzArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterTimestampTzArg"): + listener.enterTimestampTzArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitTimestampTzArg"): + listener.exitTimestampTzArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitTimestampTzArg"): + return visitor.visitTimestampTzArg(self) + else: + return visitor.visitChildren(self) + + def timestampTzArg(self): + localctx = FuncTestCaseParser.TimestampTzArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 42, self.RULE_timestampTzArg) + try: + self.enterOuterAlt(localctx, 1) + self.state = 201 + self.match(FuncTestCaseParser.TimestampTzLiteral) + self.state = 202 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 203 + self.match(FuncTestCaseParser.TsTZ) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class IntervalYearArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def IntervalYearLiteral(self): + return self.getToken(FuncTestCaseParser.IntervalYearLiteral, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def IYear(self): + return self.getToken(FuncTestCaseParser.IYear, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_intervalYearArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterIntervalYearArg"): + listener.enterIntervalYearArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitIntervalYearArg"): + listener.exitIntervalYearArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitIntervalYearArg"): + return visitor.visitIntervalYearArg(self) + else: + return visitor.visitChildren(self) + + def intervalYearArg(self): + localctx = FuncTestCaseParser.IntervalYearArgContext( + self, self._ctx, self.state + ) + self.enterRule(localctx, 44, self.RULE_intervalYearArg) + try: + self.enterOuterAlt(localctx, 1) + self.state = 205 + self.match(FuncTestCaseParser.IntervalYearLiteral) + self.state = 206 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 207 + self.match(FuncTestCaseParser.IYear) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class IntervalDayArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def IntervalDayLiteral(self): + return self.getToken(FuncTestCaseParser.IntervalDayLiteral, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def IDay(self): + return self.getToken(FuncTestCaseParser.IDay, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_intervalDayArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterIntervalDayArg"): + listener.enterIntervalDayArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitIntervalDayArg"): + listener.exitIntervalDayArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitIntervalDayArg"): + return visitor.visitIntervalDayArg(self) + else: + return visitor.visitChildren(self) + + def intervalDayArg(self): + localctx = FuncTestCaseParser.IntervalDayArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 46, self.RULE_intervalDayArg) + try: + self.enterOuterAlt(localctx, 1) + self.state = 209 + self.match(FuncTestCaseParser.IntervalDayLiteral) + self.state = 210 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 211 + self.match(FuncTestCaseParser.IDay) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class IntervalYearLiteralContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + self.years = None # Token + self.months = None # Token + + def PeriodPrefix(self): + return self.getToken(FuncTestCaseParser.PeriodPrefix, 0) + + def YearPrefix(self): + return self.getToken(FuncTestCaseParser.YearPrefix, 0) + + def IntegerLiteral(self, i: int = None): + if i is None: + return self.getTokens(FuncTestCaseParser.IntegerLiteral) + else: + return self.getToken(FuncTestCaseParser.IntegerLiteral, i) + + def MSuffix(self): + return self.getToken(FuncTestCaseParser.MSuffix, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_intervalYearLiteral + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterIntervalYearLiteral"): + listener.enterIntervalYearLiteral(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitIntervalYearLiteral"): + listener.exitIntervalYearLiteral(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitIntervalYearLiteral"): + return visitor.visitIntervalYearLiteral(self) + else: + return visitor.visitChildren(self) + + def intervalYearLiteral(self): + localctx = FuncTestCaseParser.IntervalYearLiteralContext( + self, self._ctx, self.state + ) + self.enterRule(localctx, 48, self.RULE_intervalYearLiteral) + self._la = 0 # Token type + try: + self.state = 224 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input, 9, self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 213 + self.match(FuncTestCaseParser.PeriodPrefix) + + self.state = 214 + localctx.years = self.match(FuncTestCaseParser.IntegerLiteral) + self.state = 215 + self.match(FuncTestCaseParser.YearPrefix) + self.state = 219 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 16: + self.state = 217 + localctx.months = self.match(FuncTestCaseParser.IntegerLiteral) + self.state = 218 + self.match(FuncTestCaseParser.MSuffix) + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 221 + self.match(FuncTestCaseParser.PeriodPrefix) + + self.state = 222 + localctx.months = self.match(FuncTestCaseParser.IntegerLiteral) + self.state = 223 + self.match(FuncTestCaseParser.MSuffix) + pass + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class IntervalDayLiteralContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + self.days = None # Token + + def PeriodPrefix(self): + return self.getToken(FuncTestCaseParser.PeriodPrefix, 0) + + def DaySuffix(self): + return self.getToken(FuncTestCaseParser.DaySuffix, 0) + + def IntegerLiteral(self): + return self.getToken(FuncTestCaseParser.IntegerLiteral, 0) + + def TimePrefix(self): + return self.getToken(FuncTestCaseParser.TimePrefix, 0) + + def timeInterval(self): + return self.getTypedRuleContext(FuncTestCaseParser.TimeIntervalContext, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_intervalDayLiteral + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterIntervalDayLiteral"): + listener.enterIntervalDayLiteral(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitIntervalDayLiteral"): + listener.exitIntervalDayLiteral(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitIntervalDayLiteral"): + return visitor.visitIntervalDayLiteral(self) + else: + return visitor.visitChildren(self) + + def intervalDayLiteral(self): + localctx = FuncTestCaseParser.IntervalDayLiteralContext( + self, self._ctx, self.state + ) + self.enterRule(localctx, 50, self.RULE_intervalDayLiteral) + self._la = 0 # Token type + try: + self.state = 237 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input, 11, self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 226 + self.match(FuncTestCaseParser.PeriodPrefix) + + self.state = 227 + localctx.days = self.match(FuncTestCaseParser.IntegerLiteral) + self.state = 228 + self.match(FuncTestCaseParser.DaySuffix) + self.state = 232 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 25: + self.state = 230 + self.match(FuncTestCaseParser.TimePrefix) + self.state = 231 + self.timeInterval() + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 234 + self.match(FuncTestCaseParser.PeriodPrefix) + self.state = 235 + self.match(FuncTestCaseParser.TimePrefix) + self.state = 236 + self.timeInterval() + pass + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class TimeIntervalContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + self.hours = None # Token + self.minutes = None # Token + self.seconds = None # Token + self.fractionalSeconds = None # Token + + def HourSuffix(self): + return self.getToken(FuncTestCaseParser.HourSuffix, 0) + + def IntegerLiteral(self, i: int = None): + if i is None: + return self.getTokens(FuncTestCaseParser.IntegerLiteral) + else: + return self.getToken(FuncTestCaseParser.IntegerLiteral, i) + + def MSuffix(self): + return self.getToken(FuncTestCaseParser.MSuffix, 0) + + def SecondSuffix(self): + return self.getToken(FuncTestCaseParser.SecondSuffix, 0) + + def FractionalSecondSuffix(self): + return self.getToken(FuncTestCaseParser.FractionalSecondSuffix, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_timeInterval + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterTimeInterval"): + listener.enterTimeInterval(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitTimeInterval"): + listener.exitTimeInterval(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitTimeInterval"): + return visitor.visitTimeInterval(self) + else: + return visitor.visitChildren(self) + + def timeInterval(self): + localctx = FuncTestCaseParser.TimeIntervalContext(self, self._ctx, self.state) + self.enterRule(localctx, 52, self.RULE_timeInterval) + self._la = 0 # Token type + try: + self.state = 271 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input, 18, self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 239 + localctx.hours = self.match(FuncTestCaseParser.IntegerLiteral) + self.state = 240 + self.match(FuncTestCaseParser.HourSuffix) + self.state = 243 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input, 12, self._ctx) + if la_ == 1: + self.state = 241 + localctx.minutes = self.match(FuncTestCaseParser.IntegerLiteral) + self.state = 242 + self.match(FuncTestCaseParser.MSuffix) + + self.state = 247 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input, 13, self._ctx) + if la_ == 1: + self.state = 245 + localctx.seconds = self.match(FuncTestCaseParser.IntegerLiteral) + self.state = 246 + self.match(FuncTestCaseParser.SecondSuffix) + + self.state = 251 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 16: + self.state = 249 + localctx.fractionalSeconds = self.match( + FuncTestCaseParser.IntegerLiteral + ) + self.state = 250 + self.match(FuncTestCaseParser.FractionalSecondSuffix) + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 253 + localctx.minutes = self.match(FuncTestCaseParser.IntegerLiteral) + self.state = 254 + self.match(FuncTestCaseParser.MSuffix) + self.state = 257 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input, 15, self._ctx) + if la_ == 1: + self.state = 255 + localctx.seconds = self.match(FuncTestCaseParser.IntegerLiteral) + self.state = 256 + self.match(FuncTestCaseParser.SecondSuffix) + + self.state = 261 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 16: + self.state = 259 + localctx.fractionalSeconds = self.match( + FuncTestCaseParser.IntegerLiteral + ) + self.state = 260 + self.match(FuncTestCaseParser.FractionalSecondSuffix) + + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 263 + localctx.seconds = self.match(FuncTestCaseParser.IntegerLiteral) + self.state = 264 + self.match(FuncTestCaseParser.SecondSuffix) + self.state = 267 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 16: + self.state = 265 + localctx.fractionalSeconds = self.match( + FuncTestCaseParser.IntegerLiteral + ) + self.state = 266 + self.match(FuncTestCaseParser.FractionalSecondSuffix) + + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 269 + localctx.fractionalSeconds = self.match( + FuncTestCaseParser.IntegerLiteral + ) + self.state = 270 + self.match(FuncTestCaseParser.FractionalSecondSuffix) + pass + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class DatatypeContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def scalarType(self): + return self.getTypedRuleContext(FuncTestCaseParser.ScalarTypeContext, 0) + + def parameterizedType(self): + return self.getTypedRuleContext( + FuncTestCaseParser.ParameterizedTypeContext, 0 + ) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_datatype + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterDatatype"): + listener.enterDatatype(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitDatatype"): + listener.exitDatatype(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitDatatype"): + return visitor.visitDatatype(self) + else: + return visitor.visitChildren(self) + + def datatype(self): + localctx = FuncTestCaseParser.DatatypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 54, self.RULE_datatype) + try: + self.state = 275 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [ + 44, + 45, + 46, + 47, + 48, + 49, + 51, + 54, + 55, + 58, + 69, + 70, + 71, + 73, + 74, + 75, + 76, + ]: + self.enterOuterAlt(localctx, 1) + self.state = 273 + self.scalarType() + pass + elif token in [77, 78, 79, 80, 81, 82]: + self.enterOuterAlt(localctx, 2) + self.state = 274 + self.parameterizedType() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class ScalarTypeContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_scalarType + + def copyFrom(self, ctx: ParserRuleContext): + super().copyFrom(ctx) + + class DateContext(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def Date(self): + return self.getToken(FuncTestCaseParser.Date, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterDate"): + listener.enterDate(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitDate"): + listener.exitDate(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitDate"): + return visitor.visitDate(self) + else: + return visitor.visitChildren(self) + + class StringContext(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def Str(self): + return self.getToken(FuncTestCaseParser.Str, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterString"): + listener.enterString(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitString"): + listener.exitString(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitString"): + return visitor.visitString(self) + else: + return visitor.visitChildren(self) + + class I64Context(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def I64(self): + return self.getToken(FuncTestCaseParser.I64, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterI64"): + listener.enterI64(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitI64"): + listener.exitI64(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitI64"): + return visitor.visitI64(self) + else: + return visitor.visitChildren(self) + + class UserDefinedContext(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def UserDefined(self): + return self.getToken(FuncTestCaseParser.UserDefined, 0) + + def Identifier(self): + return self.getToken(FuncTestCaseParser.Identifier, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterUserDefined"): + listener.enterUserDefined(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitUserDefined"): + listener.exitUserDefined(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitUserDefined"): + return visitor.visitUserDefined(self) + else: + return visitor.visitChildren(self) + + class I32Context(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def I32(self): + return self.getToken(FuncTestCaseParser.I32, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterI32"): + listener.enterI32(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitI32"): + listener.exitI32(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitI32"): + return visitor.visitI32(self) + else: + return visitor.visitChildren(self) + + class IntervalYearContext(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def IYear(self): + return self.getToken(FuncTestCaseParser.IYear, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterIntervalYear"): + listener.enterIntervalYear(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitIntervalYear"): + listener.exitIntervalYear(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitIntervalYear"): + return visitor.visitIntervalYear(self) + else: + return visitor.visitChildren(self) + + class UuidContext(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def UUID(self): + return self.getToken(FuncTestCaseParser.UUID, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterUuid"): + listener.enterUuid(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitUuid"): + listener.exitUuid(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitUuid"): + return visitor.visitUuid(self) + else: + return visitor.visitChildren(self) + + class I8Context(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def I8(self): + return self.getToken(FuncTestCaseParser.I8, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterI8"): + listener.enterI8(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitI8"): + listener.exitI8(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitI8"): + return visitor.visitI8(self) + else: + return visitor.visitChildren(self) + + class I16Context(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def I16(self): + return self.getToken(FuncTestCaseParser.I16, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterI16"): + listener.enterI16(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitI16"): + listener.exitI16(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitI16"): + return visitor.visitI16(self) + else: + return visitor.visitChildren(self) + + class BinaryContext(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def Binary(self): + return self.getToken(FuncTestCaseParser.Binary, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterBinary"): + listener.enterBinary(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitBinary"): + listener.exitBinary(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitBinary"): + return visitor.visitBinary(self) + else: + return visitor.visitChildren(self) + + class IntervalDayContext(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def IDay(self): + return self.getToken(FuncTestCaseParser.IDay, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterIntervalDay"): + listener.enterIntervalDay(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitIntervalDay"): + listener.exitIntervalDay(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitIntervalDay"): + return visitor.visitIntervalDay(self) + else: + return visitor.visitChildren(self) + + class Fp64Context(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def FP64(self): + return self.getToken(FuncTestCaseParser.FP64, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterFp64"): + listener.enterFp64(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitFp64"): + listener.exitFp64(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitFp64"): + return visitor.visitFp64(self) + else: + return visitor.visitChildren(self) + + class Fp32Context(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def FP32(self): + return self.getToken(FuncTestCaseParser.FP32, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterFp32"): + listener.enterFp32(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitFp32"): + listener.exitFp32(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitFp32"): + return visitor.visitFp32(self) + else: + return visitor.visitChildren(self) + + class TimeContext(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def Time(self): + return self.getToken(FuncTestCaseParser.Time, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterTime"): + listener.enterTime(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitTime"): + listener.exitTime(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitTime"): + return visitor.visitTime(self) + else: + return visitor.visitChildren(self) + + class BooleanContext(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def Bool(self): + return self.getToken(FuncTestCaseParser.Bool, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterBoolean"): + listener.enterBoolean(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitBoolean"): + listener.exitBoolean(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitBoolean"): + return visitor.visitBoolean(self) + else: + return visitor.visitChildren(self) + + class TimestampContext(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def Ts(self): + return self.getToken(FuncTestCaseParser.Ts, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterTimestamp"): + listener.enterTimestamp(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitTimestamp"): + listener.exitTimestamp(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitTimestamp"): + return visitor.visitTimestamp(self) + else: + return visitor.visitChildren(self) + + class TimestampTzContext(ScalarTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.ScalarTypeContext + super().__init__(parser) + self.copyFrom(ctx) + + def TsTZ(self): + return self.getToken(FuncTestCaseParser.TsTZ, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterTimestampTz"): + listener.enterTimestampTz(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitTimestampTz"): + listener.exitTimestampTz(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitTimestampTz"): + return visitor.visitTimestampTz(self) + else: + return visitor.visitChildren(self) + + def scalarType(self): + localctx = FuncTestCaseParser.ScalarTypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 56, self.RULE_scalarType) + try: + self.state = 295 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [70]: + localctx = FuncTestCaseParser.BooleanContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 277 + self.match(FuncTestCaseParser.Bool) + pass + elif token in [44]: + localctx = FuncTestCaseParser.I8Context(self, localctx) + self.enterOuterAlt(localctx, 2) + self.state = 278 + self.match(FuncTestCaseParser.I8) + pass + elif token in [45]: + localctx = FuncTestCaseParser.I16Context(self, localctx) + self.enterOuterAlt(localctx, 3) + self.state = 279 + self.match(FuncTestCaseParser.I16) + pass + elif token in [46]: + localctx = FuncTestCaseParser.I32Context(self, localctx) + self.enterOuterAlt(localctx, 4) + self.state = 280 + self.match(FuncTestCaseParser.I32) + pass + elif token in [47]: + localctx = FuncTestCaseParser.I64Context(self, localctx) + self.enterOuterAlt(localctx, 5) + self.state = 281 + self.match(FuncTestCaseParser.I64) + pass + elif token in [48]: + localctx = FuncTestCaseParser.Fp32Context(self, localctx) + self.enterOuterAlt(localctx, 6) + self.state = 282 + self.match(FuncTestCaseParser.FP32) + pass + elif token in [49]: + localctx = FuncTestCaseParser.Fp64Context(self, localctx) + self.enterOuterAlt(localctx, 7) + self.state = 283 + self.match(FuncTestCaseParser.FP64) + pass + elif token in [71]: + localctx = FuncTestCaseParser.StringContext(self, localctx) + self.enterOuterAlt(localctx, 8) + self.state = 284 + self.match(FuncTestCaseParser.Str) + pass + elif token in [51]: + localctx = FuncTestCaseParser.BinaryContext(self, localctx) + self.enterOuterAlt(localctx, 9) + self.state = 285 + self.match(FuncTestCaseParser.Binary) + pass + elif token in [73]: + localctx = FuncTestCaseParser.TimestampContext(self, localctx) + self.enterOuterAlt(localctx, 10) + self.state = 286 + self.match(FuncTestCaseParser.Ts) + pass + elif token in [74]: + localctx = FuncTestCaseParser.TimestampTzContext(self, localctx) + self.enterOuterAlt(localctx, 11) + self.state = 287 + self.match(FuncTestCaseParser.TsTZ) + pass + elif token in [54]: + localctx = FuncTestCaseParser.DateContext(self, localctx) + self.enterOuterAlt(localctx, 12) + self.state = 288 + self.match(FuncTestCaseParser.Date) + pass + elif token in [55]: + localctx = FuncTestCaseParser.TimeContext(self, localctx) + self.enterOuterAlt(localctx, 13) + self.state = 289 + self.match(FuncTestCaseParser.Time) + pass + elif token in [76]: + localctx = FuncTestCaseParser.IntervalDayContext(self, localctx) + self.enterOuterAlt(localctx, 14) + self.state = 290 + self.match(FuncTestCaseParser.IDay) + pass + elif token in [75]: + localctx = FuncTestCaseParser.IntervalYearContext(self, localctx) + self.enterOuterAlt(localctx, 15) + self.state = 291 + self.match(FuncTestCaseParser.IYear) + pass + elif token in [58]: + localctx = FuncTestCaseParser.UuidContext(self, localctx) + self.enterOuterAlt(localctx, 16) + self.state = 292 + self.match(FuncTestCaseParser.UUID) + pass + elif token in [69]: + localctx = FuncTestCaseParser.UserDefinedContext(self, localctx) + self.enterOuterAlt(localctx, 17) + self.state = 293 + self.match(FuncTestCaseParser.UserDefined) + self.state = 294 + self.match(FuncTestCaseParser.Identifier) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class FixedCharTypeContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_fixedCharType + + def copyFrom(self, ctx: ParserRuleContext): + super().copyFrom(ctx) + + class FixedCharContext(FixedCharTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.FixedCharTypeContext + super().__init__(parser) + self.isnull = None # Token + self.len_ = None # NumericParameterContext + self.copyFrom(ctx) + + def FChar(self): + return self.getToken(FuncTestCaseParser.FChar, 0) + + def OAngleBracket(self): + return self.getToken(FuncTestCaseParser.OAngleBracket, 0) + + def CAngleBracket(self): + return self.getToken(FuncTestCaseParser.CAngleBracket, 0) + + def numericParameter(self): + return self.getTypedRuleContext( + FuncTestCaseParser.NumericParameterContext, 0 + ) + + def QMark(self): + return self.getToken(FuncTestCaseParser.QMark, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterFixedChar"): + listener.enterFixedChar(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitFixedChar"): + listener.exitFixedChar(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitFixedChar"): + return visitor.visitFixedChar(self) + else: + return visitor.visitChildren(self) + + def fixedCharType(self): + localctx = FuncTestCaseParser.FixedCharTypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 58, self.RULE_fixedCharType) + self._la = 0 # Token type + try: + localctx = FuncTestCaseParser.FixedCharContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 297 + self.match(FuncTestCaseParser.FChar) + self.state = 299 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 104: + self.state = 298 + localctx.isnull = self.match(FuncTestCaseParser.QMark) + + self.state = 301 + self.match(FuncTestCaseParser.OAngleBracket) + self.state = 302 + localctx.len_ = self.numericParameter() + self.state = 303 + self.match(FuncTestCaseParser.CAngleBracket) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class VarCharTypeContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_varCharType + + def copyFrom(self, ctx: ParserRuleContext): + super().copyFrom(ctx) + + class VarCharContext(VarCharTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.VarCharTypeContext + super().__init__(parser) + self.isnull = None # Token + self.len_ = None # NumericParameterContext + self.copyFrom(ctx) + + def VChar(self): + return self.getToken(FuncTestCaseParser.VChar, 0) + + def OAngleBracket(self): + return self.getToken(FuncTestCaseParser.OAngleBracket, 0) + + def CAngleBracket(self): + return self.getToken(FuncTestCaseParser.CAngleBracket, 0) + + def numericParameter(self): + return self.getTypedRuleContext( + FuncTestCaseParser.NumericParameterContext, 0 + ) + + def QMark(self): + return self.getToken(FuncTestCaseParser.QMark, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterVarChar"): + listener.enterVarChar(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitVarChar"): + listener.exitVarChar(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitVarChar"): + return visitor.visitVarChar(self) + else: + return visitor.visitChildren(self) + + def varCharType(self): + localctx = FuncTestCaseParser.VarCharTypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 60, self.RULE_varCharType) + self._la = 0 # Token type + try: + localctx = FuncTestCaseParser.VarCharContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 305 + self.match(FuncTestCaseParser.VChar) + self.state = 307 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 104: + self.state = 306 + localctx.isnull = self.match(FuncTestCaseParser.QMark) + + self.state = 309 + self.match(FuncTestCaseParser.OAngleBracket) + self.state = 310 + localctx.len_ = self.numericParameter() + self.state = 311 + self.match(FuncTestCaseParser.CAngleBracket) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class FixedBinaryTypeContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_fixedBinaryType + + def copyFrom(self, ctx: ParserRuleContext): + super().copyFrom(ctx) + + class FixedBinaryContext(FixedBinaryTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.FixedBinaryTypeContext + super().__init__(parser) + self.isnull = None # Token + self.len_ = None # NumericParameterContext + self.copyFrom(ctx) + + def FBin(self): + return self.getToken(FuncTestCaseParser.FBin, 0) + + def OAngleBracket(self): + return self.getToken(FuncTestCaseParser.OAngleBracket, 0) + + def CAngleBracket(self): + return self.getToken(FuncTestCaseParser.CAngleBracket, 0) + + def numericParameter(self): + return self.getTypedRuleContext( + FuncTestCaseParser.NumericParameterContext, 0 + ) + + def QMark(self): + return self.getToken(FuncTestCaseParser.QMark, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterFixedBinary"): + listener.enterFixedBinary(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitFixedBinary"): + listener.exitFixedBinary(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitFixedBinary"): + return visitor.visitFixedBinary(self) + else: + return visitor.visitChildren(self) + + def fixedBinaryType(self): + localctx = FuncTestCaseParser.FixedBinaryTypeContext( + self, self._ctx, self.state + ) + self.enterRule(localctx, 62, self.RULE_fixedBinaryType) + self._la = 0 # Token type + try: + localctx = FuncTestCaseParser.FixedBinaryContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 313 + self.match(FuncTestCaseParser.FBin) + self.state = 315 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 104: + self.state = 314 + localctx.isnull = self.match(FuncTestCaseParser.QMark) + + self.state = 317 + self.match(FuncTestCaseParser.OAngleBracket) + self.state = 318 + localctx.len_ = self.numericParameter() + self.state = 319 + self.match(FuncTestCaseParser.CAngleBracket) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class DecimalTypeContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_decimalType + + def copyFrom(self, ctx: ParserRuleContext): + super().copyFrom(ctx) + + class DecimalContext(DecimalTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.DecimalTypeContext + super().__init__(parser) + self.isnull = None # Token + self.precision = None # NumericParameterContext + self.scale = None # NumericParameterContext + self.copyFrom(ctx) + + def Dec(self): + return self.getToken(FuncTestCaseParser.Dec, 0) + + def OAngleBracket(self): + return self.getToken(FuncTestCaseParser.OAngleBracket, 0) + + def Comma(self): + return self.getToken(FuncTestCaseParser.Comma, 0) + + def CAngleBracket(self): + return self.getToken(FuncTestCaseParser.CAngleBracket, 0) + + def QMark(self): + return self.getToken(FuncTestCaseParser.QMark, 0) + + def numericParameter(self, i: int = None): + if i is None: + return self.getTypedRuleContexts( + FuncTestCaseParser.NumericParameterContext + ) + else: + return self.getTypedRuleContext( + FuncTestCaseParser.NumericParameterContext, i + ) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterDecimal"): + listener.enterDecimal(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitDecimal"): + listener.exitDecimal(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitDecimal"): + return visitor.visitDecimal(self) + else: + return visitor.visitChildren(self) + + def decimalType(self): + localctx = FuncTestCaseParser.DecimalTypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 64, self.RULE_decimalType) + self._la = 0 # Token type + try: + localctx = FuncTestCaseParser.DecimalContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 321 + self.match(FuncTestCaseParser.Dec) + self.state = 323 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 104: + self.state = 322 + localctx.isnull = self.match(FuncTestCaseParser.QMark) + + self.state = 331 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 32: + self.state = 325 + self.match(FuncTestCaseParser.OAngleBracket) + self.state = 326 + localctx.precision = self.numericParameter() + self.state = 327 + self.match(FuncTestCaseParser.Comma) + self.state = 328 + localctx.scale = self.numericParameter() + self.state = 329 + self.match(FuncTestCaseParser.CAngleBracket) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class PrecisionTimestampTypeContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_precisionTimestampType + + def copyFrom(self, ctx: ParserRuleContext): + super().copyFrom(ctx) + + class PrecisionTimestampContext(PrecisionTimestampTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.PrecisionTimestampTypeContext + super().__init__(parser) + self.isnull = None # Token + self.precision = None # NumericParameterContext + self.copyFrom(ctx) + + def PTs(self): + return self.getToken(FuncTestCaseParser.PTs, 0) + + def OAngleBracket(self): + return self.getToken(FuncTestCaseParser.OAngleBracket, 0) + + def CAngleBracket(self): + return self.getToken(FuncTestCaseParser.CAngleBracket, 0) + + def numericParameter(self): + return self.getTypedRuleContext( + FuncTestCaseParser.NumericParameterContext, 0 + ) + + def QMark(self): + return self.getToken(FuncTestCaseParser.QMark, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterPrecisionTimestamp"): + listener.enterPrecisionTimestamp(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitPrecisionTimestamp"): + listener.exitPrecisionTimestamp(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitPrecisionTimestamp"): + return visitor.visitPrecisionTimestamp(self) + else: + return visitor.visitChildren(self) + + def precisionTimestampType(self): + localctx = FuncTestCaseParser.PrecisionTimestampTypeContext( + self, self._ctx, self.state + ) + self.enterRule(localctx, 66, self.RULE_precisionTimestampType) + self._la = 0 # Token type + try: + localctx = FuncTestCaseParser.PrecisionTimestampContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 333 + self.match(FuncTestCaseParser.PTs) + self.state = 335 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 104: + self.state = 334 + localctx.isnull = self.match(FuncTestCaseParser.QMark) + + self.state = 337 + self.match(FuncTestCaseParser.OAngleBracket) + self.state = 338 + localctx.precision = self.numericParameter() + self.state = 339 + self.match(FuncTestCaseParser.CAngleBracket) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class PrecisionTimestampTZTypeContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_precisionTimestampTZType + + def copyFrom(self, ctx: ParserRuleContext): + super().copyFrom(ctx) + + class PrecisionTimestampTZContext(PrecisionTimestampTZTypeContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.PrecisionTimestampTZTypeContext + super().__init__(parser) + self.isnull = None # Token + self.precision = None # NumericParameterContext + self.copyFrom(ctx) + + def PTsTZ(self): + return self.getToken(FuncTestCaseParser.PTsTZ, 0) + + def OAngleBracket(self): + return self.getToken(FuncTestCaseParser.OAngleBracket, 0) + + def CAngleBracket(self): + return self.getToken(FuncTestCaseParser.CAngleBracket, 0) + + def numericParameter(self): + return self.getTypedRuleContext( + FuncTestCaseParser.NumericParameterContext, 0 + ) + + def QMark(self): + return self.getToken(FuncTestCaseParser.QMark, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterPrecisionTimestampTZ"): + listener.enterPrecisionTimestampTZ(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitPrecisionTimestampTZ"): + listener.exitPrecisionTimestampTZ(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitPrecisionTimestampTZ"): + return visitor.visitPrecisionTimestampTZ(self) + else: + return visitor.visitChildren(self) + + def precisionTimestampTZType(self): + localctx = FuncTestCaseParser.PrecisionTimestampTZTypeContext( + self, self._ctx, self.state + ) + self.enterRule(localctx, 68, self.RULE_precisionTimestampTZType) + self._la = 0 # Token type + try: + localctx = FuncTestCaseParser.PrecisionTimestampTZContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 341 + self.match(FuncTestCaseParser.PTsTZ) + self.state = 343 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 104: + self.state = 342 + localctx.isnull = self.match(FuncTestCaseParser.QMark) + + self.state = 345 + self.match(FuncTestCaseParser.OAngleBracket) + self.state = 346 + localctx.precision = self.numericParameter() + self.state = 347 + self.match(FuncTestCaseParser.CAngleBracket) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class ParameterizedTypeContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def fixedCharType(self): + return self.getTypedRuleContext(FuncTestCaseParser.FixedCharTypeContext, 0) + + def varCharType(self): + return self.getTypedRuleContext(FuncTestCaseParser.VarCharTypeContext, 0) + + def fixedBinaryType(self): + return self.getTypedRuleContext( + FuncTestCaseParser.FixedBinaryTypeContext, 0 + ) + + def decimalType(self): + return self.getTypedRuleContext(FuncTestCaseParser.DecimalTypeContext, 0) + + def precisionTimestampType(self): + return self.getTypedRuleContext( + FuncTestCaseParser.PrecisionTimestampTypeContext, 0 + ) + + def precisionTimestampTZType(self): + return self.getTypedRuleContext( + FuncTestCaseParser.PrecisionTimestampTZTypeContext, 0 + ) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_parameterizedType + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterParameterizedType"): + listener.enterParameterizedType(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitParameterizedType"): + listener.exitParameterizedType(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitParameterizedType"): + return visitor.visitParameterizedType(self) + else: + return visitor.visitChildren(self) + + def parameterizedType(self): + localctx = FuncTestCaseParser.ParameterizedTypeContext( + self, self._ctx, self.state + ) + self.enterRule(localctx, 70, self.RULE_parameterizedType) + try: + self.state = 355 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [80]: + self.enterOuterAlt(localctx, 1) + self.state = 349 + self.fixedCharType() + pass + elif token in [81]: + self.enterOuterAlt(localctx, 2) + self.state = 350 + self.varCharType() + pass + elif token in [82]: + self.enterOuterAlt(localctx, 3) + self.state = 351 + self.fixedBinaryType() + pass + elif token in [77]: + self.enterOuterAlt(localctx, 4) + self.state = 352 + self.decimalType() + pass + elif token in [78]: + self.enterOuterAlt(localctx, 5) + self.state = 353 + self.precisionTimestampType() + pass + elif token in [79]: + self.enterOuterAlt(localctx, 6) + self.state = 354 + self.precisionTimestampTZType() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class NumericParameterContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_numericParameter + + def copyFrom(self, ctx: ParserRuleContext): + super().copyFrom(ctx) + + class IntegerLiteralContext(NumericParameterContext): + def __init__( + self, parser, ctx: ParserRuleContext + ): # actually a FuncTestCaseParser.NumericParameterContext + super().__init__(parser) + self.copyFrom(ctx) + + def IntegerLiteral(self): + return self.getToken(FuncTestCaseParser.IntegerLiteral, 0) + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterIntegerLiteral"): + listener.enterIntegerLiteral(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitIntegerLiteral"): + listener.exitIntegerLiteral(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitIntegerLiteral"): + return visitor.visitIntegerLiteral(self) + else: + return visitor.visitChildren(self) + + def numericParameter(self): + localctx = FuncTestCaseParser.NumericParameterContext( + self, self._ctx, self.state + ) + self.enterRule(localctx, 72, self.RULE_numericParameter) + try: + localctx = FuncTestCaseParser.IntegerLiteralContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 357 + self.match(FuncTestCaseParser.IntegerLiteral) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class SubstraitErrorContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def ErrorResult(self): + return self.getToken(FuncTestCaseParser.ErrorResult, 0) + + def UndefineResult(self): + return self.getToken(FuncTestCaseParser.UndefineResult, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_substraitError + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterSubstraitError"): + listener.enterSubstraitError(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitSubstraitError"): + listener.exitSubstraitError(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitSubstraitError"): + return visitor.visitSubstraitError(self) + else: + return visitor.visitChildren(self) + + def substraitError(self): + localctx = FuncTestCaseParser.SubstraitErrorContext(self, self._ctx, self.state) + self.enterRule(localctx, 74, self.RULE_substraitError) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 359 + _la = self._input.LA(1) + if not (_la == 7 or _la == 8): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class Func_optionContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def option_name(self): + return self.getTypedRuleContext(FuncTestCaseParser.Option_nameContext, 0) + + def Colon(self): + return self.getToken(FuncTestCaseParser.Colon, 0) + + def option_value(self): + return self.getTypedRuleContext(FuncTestCaseParser.Option_valueContext, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_func_option + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterFunc_option"): + listener.enterFunc_option(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitFunc_option"): + listener.exitFunc_option(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitFunc_option"): + return visitor.visitFunc_option(self) + else: + return visitor.visitChildren(self) + + def func_option(self): + localctx = FuncTestCaseParser.Func_optionContext(self, self._ctx, self.state) + self.enterRule(localctx, 76, self.RULE_func_option) + try: + self.enterOuterAlt(localctx, 1) + self.state = 361 + self.option_name() + self.state = 362 + self.match(FuncTestCaseParser.Colon) + self.state = 363 + self.option_value() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class Option_nameContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def Overflow(self): + return self.getToken(FuncTestCaseParser.Overflow, 0) + + def Rounding(self): + return self.getToken(FuncTestCaseParser.Rounding, 0) + + def Identifier(self): + return self.getToken(FuncTestCaseParser.Identifier, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_option_name + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterOption_name"): + listener.enterOption_name(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitOption_name"): + listener.exitOption_name(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitOption_name"): + return visitor.visitOption_name(self) + else: + return visitor.visitChildren(self) + + def option_name(self): + localctx = FuncTestCaseParser.Option_nameContext(self, self._ctx, self.state) + self.enterRule(localctx, 78, self.RULE_option_name) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 365 + _la = self._input.LA(1) + if not (_la == 9 or _la == 10 or _la == 111): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class Option_valueContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def Error(self): + return self.getToken(FuncTestCaseParser.Error, 0) + + def Saturate(self): + return self.getToken(FuncTestCaseParser.Saturate, 0) + + def Silent(self): + return self.getToken(FuncTestCaseParser.Silent, 0) + + def TieToEven(self): + return self.getToken(FuncTestCaseParser.TieToEven, 0) + + def NaN(self): + return self.getToken(FuncTestCaseParser.NaN, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_option_value + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterOption_value"): + listener.enterOption_value(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitOption_value"): + listener.exitOption_value(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitOption_value"): + return visitor.visitOption_value(self) + else: + return visitor.visitChildren(self) + + def option_value(self): + localctx = FuncTestCaseParser.Option_valueContext(self, self._ctx, self.state) + self.enterRule(localctx, 80, self.RULE_option_value) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 367 + _la = self._input.LA(1) + if not ((((_la) & ~0x3F) == 0 and ((1 << _la) & 63488) != 0)): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class Func_optionsContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def func_option(self, i: int = None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.Func_optionContext) + else: + return self.getTypedRuleContext( + FuncTestCaseParser.Func_optionContext, i + ) + + def Comma(self, i: int = None): + if i is None: + return self.getTokens(FuncTestCaseParser.Comma) + else: + return self.getToken(FuncTestCaseParser.Comma, i) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_func_options + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterFunc_options"): + listener.enterFunc_options(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitFunc_options"): + listener.exitFunc_options(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitFunc_options"): + return visitor.visitFunc_options(self) + else: + return visitor.visitChildren(self) + + def func_options(self): + localctx = FuncTestCaseParser.Func_optionsContext(self, self._ctx, self.state) + self.enterRule(localctx, 82, self.RULE_func_options) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 369 + self.func_option() + self.state = 374 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la == 102: + self.state = 370 + self.match(FuncTestCaseParser.Comma) + self.state = 371 + self.func_option() + self.state = 376 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx diff --git a/tests/coverage/antlr_parser/FuncTestCaseParserListener.py b/tests/coverage/antlr_parser/FuncTestCaseParserListener.py new file mode 100644 index 000000000..e743017e5 --- /dev/null +++ b/tests/coverage/antlr_parser/FuncTestCaseParserListener.py @@ -0,0 +1,494 @@ +# SPDX-License-Identifier: Apache-2.0 +# Generated from FuncTestCaseParser.g4 by ANTLR 4.13.2 +from antlr4 import * + +if "." in __name__: + from .FuncTestCaseParser import FuncTestCaseParser +else: + from FuncTestCaseParser import FuncTestCaseParser + + +# This class defines a complete listener for a parse tree produced by FuncTestCaseParser. +class FuncTestCaseParserListener(ParseTreeListener): + # Enter a parse tree produced by FuncTestCaseParser#doc. + def enterDoc(self, ctx: FuncTestCaseParser.DocContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#doc. + def exitDoc(self, ctx: FuncTestCaseParser.DocContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#header. + def enterHeader(self, ctx: FuncTestCaseParser.HeaderContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#header. + def exitHeader(self, ctx: FuncTestCaseParser.HeaderContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#version. + def enterVersion(self, ctx: FuncTestCaseParser.VersionContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#version. + def exitVersion(self, ctx: FuncTestCaseParser.VersionContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#include. + def enterInclude(self, ctx: FuncTestCaseParser.IncludeContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#include. + def exitInclude(self, ctx: FuncTestCaseParser.IncludeContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#testGroupDescription. + def enterTestGroupDescription( + self, ctx: FuncTestCaseParser.TestGroupDescriptionContext + ): + pass + + # Exit a parse tree produced by FuncTestCaseParser#testGroupDescription. + def exitTestGroupDescription( + self, ctx: FuncTestCaseParser.TestGroupDescriptionContext + ): + pass + + # Enter a parse tree produced by FuncTestCaseParser#testCase. + def enterTestCase(self, ctx: FuncTestCaseParser.TestCaseContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#testCase. + def exitTestCase(self, ctx: FuncTestCaseParser.TestCaseContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#testGroup. + def enterTestGroup(self, ctx: FuncTestCaseParser.TestGroupContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#testGroup. + def exitTestGroup(self, ctx: FuncTestCaseParser.TestGroupContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#arguments. + def enterArguments(self, ctx: FuncTestCaseParser.ArgumentsContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#arguments. + def exitArguments(self, ctx: FuncTestCaseParser.ArgumentsContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#result. + def enterResult(self, ctx: FuncTestCaseParser.ResultContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#result. + def exitResult(self, ctx: FuncTestCaseParser.ResultContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#argument. + def enterArgument(self, ctx: FuncTestCaseParser.ArgumentContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#argument. + def exitArgument(self, ctx: FuncTestCaseParser.ArgumentContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#numericLiteral. + def enterNumericLiteral(self, ctx: FuncTestCaseParser.NumericLiteralContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#numericLiteral. + def exitNumericLiteral(self, ctx: FuncTestCaseParser.NumericLiteralContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#floatLiteral. + def enterFloatLiteral(self, ctx: FuncTestCaseParser.FloatLiteralContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#floatLiteral. + def exitFloatLiteral(self, ctx: FuncTestCaseParser.FloatLiteralContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#nullArg. + def enterNullArg(self, ctx: FuncTestCaseParser.NullArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#nullArg. + def exitNullArg(self, ctx: FuncTestCaseParser.NullArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#intArg. + def enterIntArg(self, ctx: FuncTestCaseParser.IntArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#intArg. + def exitIntArg(self, ctx: FuncTestCaseParser.IntArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#floatArg. + def enterFloatArg(self, ctx: FuncTestCaseParser.FloatArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#floatArg. + def exitFloatArg(self, ctx: FuncTestCaseParser.FloatArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#decimalArg. + def enterDecimalArg(self, ctx: FuncTestCaseParser.DecimalArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#decimalArg. + def exitDecimalArg(self, ctx: FuncTestCaseParser.DecimalArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#booleanArg. + def enterBooleanArg(self, ctx: FuncTestCaseParser.BooleanArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#booleanArg. + def exitBooleanArg(self, ctx: FuncTestCaseParser.BooleanArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#stringArg. + def enterStringArg(self, ctx: FuncTestCaseParser.StringArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#stringArg. + def exitStringArg(self, ctx: FuncTestCaseParser.StringArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#dateArg. + def enterDateArg(self, ctx: FuncTestCaseParser.DateArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#dateArg. + def exitDateArg(self, ctx: FuncTestCaseParser.DateArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#timeArg. + def enterTimeArg(self, ctx: FuncTestCaseParser.TimeArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#timeArg. + def exitTimeArg(self, ctx: FuncTestCaseParser.TimeArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#timestampArg. + def enterTimestampArg(self, ctx: FuncTestCaseParser.TimestampArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#timestampArg. + def exitTimestampArg(self, ctx: FuncTestCaseParser.TimestampArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#timestampTzArg. + def enterTimestampTzArg(self, ctx: FuncTestCaseParser.TimestampTzArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#timestampTzArg. + def exitTimestampTzArg(self, ctx: FuncTestCaseParser.TimestampTzArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#intervalYearArg. + def enterIntervalYearArg(self, ctx: FuncTestCaseParser.IntervalYearArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#intervalYearArg. + def exitIntervalYearArg(self, ctx: FuncTestCaseParser.IntervalYearArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#intervalDayArg. + def enterIntervalDayArg(self, ctx: FuncTestCaseParser.IntervalDayArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#intervalDayArg. + def exitIntervalDayArg(self, ctx: FuncTestCaseParser.IntervalDayArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#intervalYearLiteral. + def enterIntervalYearLiteral( + self, ctx: FuncTestCaseParser.IntervalYearLiteralContext + ): + pass + + # Exit a parse tree produced by FuncTestCaseParser#intervalYearLiteral. + def exitIntervalYearLiteral( + self, ctx: FuncTestCaseParser.IntervalYearLiteralContext + ): + pass + + # Enter a parse tree produced by FuncTestCaseParser#intervalDayLiteral. + def enterIntervalDayLiteral( + self, ctx: FuncTestCaseParser.IntervalDayLiteralContext + ): + pass + + # Exit a parse tree produced by FuncTestCaseParser#intervalDayLiteral. + def exitIntervalDayLiteral(self, ctx: FuncTestCaseParser.IntervalDayLiteralContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#timeInterval. + def enterTimeInterval(self, ctx: FuncTestCaseParser.TimeIntervalContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#timeInterval. + def exitTimeInterval(self, ctx: FuncTestCaseParser.TimeIntervalContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#datatype. + def enterDatatype(self, ctx: FuncTestCaseParser.DatatypeContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#datatype. + def exitDatatype(self, ctx: FuncTestCaseParser.DatatypeContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#Boolean. + def enterBoolean(self, ctx: FuncTestCaseParser.BooleanContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#Boolean. + def exitBoolean(self, ctx: FuncTestCaseParser.BooleanContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#i8. + def enterI8(self, ctx: FuncTestCaseParser.I8Context): + pass + + # Exit a parse tree produced by FuncTestCaseParser#i8. + def exitI8(self, ctx: FuncTestCaseParser.I8Context): + pass + + # Enter a parse tree produced by FuncTestCaseParser#i16. + def enterI16(self, ctx: FuncTestCaseParser.I16Context): + pass + + # Exit a parse tree produced by FuncTestCaseParser#i16. + def exitI16(self, ctx: FuncTestCaseParser.I16Context): + pass + + # Enter a parse tree produced by FuncTestCaseParser#i32. + def enterI32(self, ctx: FuncTestCaseParser.I32Context): + pass + + # Exit a parse tree produced by FuncTestCaseParser#i32. + def exitI32(self, ctx: FuncTestCaseParser.I32Context): + pass + + # Enter a parse tree produced by FuncTestCaseParser#i64. + def enterI64(self, ctx: FuncTestCaseParser.I64Context): + pass + + # Exit a parse tree produced by FuncTestCaseParser#i64. + def exitI64(self, ctx: FuncTestCaseParser.I64Context): + pass + + # Enter a parse tree produced by FuncTestCaseParser#fp32. + def enterFp32(self, ctx: FuncTestCaseParser.Fp32Context): + pass + + # Exit a parse tree produced by FuncTestCaseParser#fp32. + def exitFp32(self, ctx: FuncTestCaseParser.Fp32Context): + pass + + # Enter a parse tree produced by FuncTestCaseParser#fp64. + def enterFp64(self, ctx: FuncTestCaseParser.Fp64Context): + pass + + # Exit a parse tree produced by FuncTestCaseParser#fp64. + def exitFp64(self, ctx: FuncTestCaseParser.Fp64Context): + pass + + # Enter a parse tree produced by FuncTestCaseParser#string. + def enterString(self, ctx: FuncTestCaseParser.StringContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#string. + def exitString(self, ctx: FuncTestCaseParser.StringContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#binary. + def enterBinary(self, ctx: FuncTestCaseParser.BinaryContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#binary. + def exitBinary(self, ctx: FuncTestCaseParser.BinaryContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#timestamp. + def enterTimestamp(self, ctx: FuncTestCaseParser.TimestampContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#timestamp. + def exitTimestamp(self, ctx: FuncTestCaseParser.TimestampContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#timestampTz. + def enterTimestampTz(self, ctx: FuncTestCaseParser.TimestampTzContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#timestampTz. + def exitTimestampTz(self, ctx: FuncTestCaseParser.TimestampTzContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#date. + def enterDate(self, ctx: FuncTestCaseParser.DateContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#date. + def exitDate(self, ctx: FuncTestCaseParser.DateContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#time. + def enterTime(self, ctx: FuncTestCaseParser.TimeContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#time. + def exitTime(self, ctx: FuncTestCaseParser.TimeContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#intervalDay. + def enterIntervalDay(self, ctx: FuncTestCaseParser.IntervalDayContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#intervalDay. + def exitIntervalDay(self, ctx: FuncTestCaseParser.IntervalDayContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#intervalYear. + def enterIntervalYear(self, ctx: FuncTestCaseParser.IntervalYearContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#intervalYear. + def exitIntervalYear(self, ctx: FuncTestCaseParser.IntervalYearContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#uuid. + def enterUuid(self, ctx: FuncTestCaseParser.UuidContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#uuid. + def exitUuid(self, ctx: FuncTestCaseParser.UuidContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#userDefined. + def enterUserDefined(self, ctx: FuncTestCaseParser.UserDefinedContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#userDefined. + def exitUserDefined(self, ctx: FuncTestCaseParser.UserDefinedContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#fixedChar. + def enterFixedChar(self, ctx: FuncTestCaseParser.FixedCharContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#fixedChar. + def exitFixedChar(self, ctx: FuncTestCaseParser.FixedCharContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#varChar. + def enterVarChar(self, ctx: FuncTestCaseParser.VarCharContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#varChar. + def exitVarChar(self, ctx: FuncTestCaseParser.VarCharContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#fixedBinary. + def enterFixedBinary(self, ctx: FuncTestCaseParser.FixedBinaryContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#fixedBinary. + def exitFixedBinary(self, ctx: FuncTestCaseParser.FixedBinaryContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#decimal. + def enterDecimal(self, ctx: FuncTestCaseParser.DecimalContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#decimal. + def exitDecimal(self, ctx: FuncTestCaseParser.DecimalContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#precisionTimestamp. + def enterPrecisionTimestamp( + self, ctx: FuncTestCaseParser.PrecisionTimestampContext + ): + pass + + # Exit a parse tree produced by FuncTestCaseParser#precisionTimestamp. + def exitPrecisionTimestamp(self, ctx: FuncTestCaseParser.PrecisionTimestampContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#precisionTimestampTZ. + def enterPrecisionTimestampTZ( + self, ctx: FuncTestCaseParser.PrecisionTimestampTZContext + ): + pass + + # Exit a parse tree produced by FuncTestCaseParser#precisionTimestampTZ. + def exitPrecisionTimestampTZ( + self, ctx: FuncTestCaseParser.PrecisionTimestampTZContext + ): + pass + + # Enter a parse tree produced by FuncTestCaseParser#parameterizedType. + def enterParameterizedType(self, ctx: FuncTestCaseParser.ParameterizedTypeContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#parameterizedType. + def exitParameterizedType(self, ctx: FuncTestCaseParser.ParameterizedTypeContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#integerLiteral. + def enterIntegerLiteral(self, ctx: FuncTestCaseParser.IntegerLiteralContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#integerLiteral. + def exitIntegerLiteral(self, ctx: FuncTestCaseParser.IntegerLiteralContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#substraitError. + def enterSubstraitError(self, ctx: FuncTestCaseParser.SubstraitErrorContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#substraitError. + def exitSubstraitError(self, ctx: FuncTestCaseParser.SubstraitErrorContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#func_option. + def enterFunc_option(self, ctx: FuncTestCaseParser.Func_optionContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#func_option. + def exitFunc_option(self, ctx: FuncTestCaseParser.Func_optionContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#option_name. + def enterOption_name(self, ctx: FuncTestCaseParser.Option_nameContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#option_name. + def exitOption_name(self, ctx: FuncTestCaseParser.Option_nameContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#option_value. + def enterOption_value(self, ctx: FuncTestCaseParser.Option_valueContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#option_value. + def exitOption_value(self, ctx: FuncTestCaseParser.Option_valueContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#func_options. + def enterFunc_options(self, ctx: FuncTestCaseParser.Func_optionsContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#func_options. + def exitFunc_options(self, ctx: FuncTestCaseParser.Func_optionsContext): + pass + + +del FuncTestCaseParser diff --git a/tests/coverage/antlr_parser/FuncTestCaseParserVisitor.py b/tests/coverage/antlr_parser/FuncTestCaseParserVisitor.py new file mode 100644 index 000000000..7895d9325 --- /dev/null +++ b/tests/coverage/antlr_parser/FuncTestCaseParserVisitor.py @@ -0,0 +1,257 @@ +# SPDX-License-Identifier: Apache-2.0 +# Generated from FuncTestCaseParser.g4 by ANTLR 4.13.2 +from antlr4 import * + +if "." in __name__: + from .FuncTestCaseParser import FuncTestCaseParser +else: + from FuncTestCaseParser import FuncTestCaseParser + +# This class defines a complete generic visitor for a parse tree produced by FuncTestCaseParser. + + +class FuncTestCaseParserVisitor(ParseTreeVisitor): + # Visit a parse tree produced by FuncTestCaseParser#doc. + def visitDoc(self, ctx: FuncTestCaseParser.DocContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#header. + def visitHeader(self, ctx: FuncTestCaseParser.HeaderContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#version. + def visitVersion(self, ctx: FuncTestCaseParser.VersionContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#include. + def visitInclude(self, ctx: FuncTestCaseParser.IncludeContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#testGroupDescription. + def visitTestGroupDescription( + self, ctx: FuncTestCaseParser.TestGroupDescriptionContext + ): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#testCase. + def visitTestCase(self, ctx: FuncTestCaseParser.TestCaseContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#testGroup. + def visitTestGroup(self, ctx: FuncTestCaseParser.TestGroupContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#arguments. + def visitArguments(self, ctx: FuncTestCaseParser.ArgumentsContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#result. + def visitResult(self, ctx: FuncTestCaseParser.ResultContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#argument. + def visitArgument(self, ctx: FuncTestCaseParser.ArgumentContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#numericLiteral. + def visitNumericLiteral(self, ctx: FuncTestCaseParser.NumericLiteralContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#floatLiteral. + def visitFloatLiteral(self, ctx: FuncTestCaseParser.FloatLiteralContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#nullArg. + def visitNullArg(self, ctx: FuncTestCaseParser.NullArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#intArg. + def visitIntArg(self, ctx: FuncTestCaseParser.IntArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#floatArg. + def visitFloatArg(self, ctx: FuncTestCaseParser.FloatArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#decimalArg. + def visitDecimalArg(self, ctx: FuncTestCaseParser.DecimalArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#booleanArg. + def visitBooleanArg(self, ctx: FuncTestCaseParser.BooleanArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#stringArg. + def visitStringArg(self, ctx: FuncTestCaseParser.StringArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#dateArg. + def visitDateArg(self, ctx: FuncTestCaseParser.DateArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#timeArg. + def visitTimeArg(self, ctx: FuncTestCaseParser.TimeArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#timestampArg. + def visitTimestampArg(self, ctx: FuncTestCaseParser.TimestampArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#timestampTzArg. + def visitTimestampTzArg(self, ctx: FuncTestCaseParser.TimestampTzArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#intervalYearArg. + def visitIntervalYearArg(self, ctx: FuncTestCaseParser.IntervalYearArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#intervalDayArg. + def visitIntervalDayArg(self, ctx: FuncTestCaseParser.IntervalDayArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#intervalYearLiteral. + def visitIntervalYearLiteral( + self, ctx: FuncTestCaseParser.IntervalYearLiteralContext + ): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#intervalDayLiteral. + def visitIntervalDayLiteral( + self, ctx: FuncTestCaseParser.IntervalDayLiteralContext + ): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#timeInterval. + def visitTimeInterval(self, ctx: FuncTestCaseParser.TimeIntervalContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#datatype. + def visitDatatype(self, ctx: FuncTestCaseParser.DatatypeContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#Boolean. + def visitBoolean(self, ctx: FuncTestCaseParser.BooleanContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#i8. + def visitI8(self, ctx: FuncTestCaseParser.I8Context): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#i16. + def visitI16(self, ctx: FuncTestCaseParser.I16Context): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#i32. + def visitI32(self, ctx: FuncTestCaseParser.I32Context): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#i64. + def visitI64(self, ctx: FuncTestCaseParser.I64Context): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#fp32. + def visitFp32(self, ctx: FuncTestCaseParser.Fp32Context): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#fp64. + def visitFp64(self, ctx: FuncTestCaseParser.Fp64Context): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#string. + def visitString(self, ctx: FuncTestCaseParser.StringContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#binary. + def visitBinary(self, ctx: FuncTestCaseParser.BinaryContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#timestamp. + def visitTimestamp(self, ctx: FuncTestCaseParser.TimestampContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#timestampTz. + def visitTimestampTz(self, ctx: FuncTestCaseParser.TimestampTzContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#date. + def visitDate(self, ctx: FuncTestCaseParser.DateContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#time. + def visitTime(self, ctx: FuncTestCaseParser.TimeContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#intervalDay. + def visitIntervalDay(self, ctx: FuncTestCaseParser.IntervalDayContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#intervalYear. + def visitIntervalYear(self, ctx: FuncTestCaseParser.IntervalYearContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#uuid. + def visitUuid(self, ctx: FuncTestCaseParser.UuidContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#userDefined. + def visitUserDefined(self, ctx: FuncTestCaseParser.UserDefinedContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#fixedChar. + def visitFixedChar(self, ctx: FuncTestCaseParser.FixedCharContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#varChar. + def visitVarChar(self, ctx: FuncTestCaseParser.VarCharContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#fixedBinary. + def visitFixedBinary(self, ctx: FuncTestCaseParser.FixedBinaryContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#decimal. + def visitDecimal(self, ctx: FuncTestCaseParser.DecimalContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#precisionTimestamp. + def visitPrecisionTimestamp( + self, ctx: FuncTestCaseParser.PrecisionTimestampContext + ): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#precisionTimestampTZ. + def visitPrecisionTimestampTZ( + self, ctx: FuncTestCaseParser.PrecisionTimestampTZContext + ): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#parameterizedType. + def visitParameterizedType(self, ctx: FuncTestCaseParser.ParameterizedTypeContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#integerLiteral. + def visitIntegerLiteral(self, ctx: FuncTestCaseParser.IntegerLiteralContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#substraitError. + def visitSubstraitError(self, ctx: FuncTestCaseParser.SubstraitErrorContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#func_option. + def visitFunc_option(self, ctx: FuncTestCaseParser.Func_optionContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#option_name. + def visitOption_name(self, ctx: FuncTestCaseParser.Option_nameContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#option_value. + def visitOption_value(self, ctx: FuncTestCaseParser.Option_valueContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#func_options. + def visitFunc_options(self, ctx: FuncTestCaseParser.Func_optionsContext): + return self.visitChildren(ctx) + + +del FuncTestCaseParser diff --git a/tests/coverage/case_file_parser.py b/tests/coverage/case_file_parser.py new file mode 100644 index 000000000..bc0ad9fdf --- /dev/null +++ b/tests/coverage/case_file_parser.py @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: Apache-2.0 +import os + +from antlr4 import CommonTokenStream, FileStream +from antlr4.error.ErrorListener import ErrorListener + +from tests.coverage.antlr_parser.FuncTestCaseLexer import FuncTestCaseLexer +from tests.coverage.antlr_parser.FuncTestCaseParser import FuncTestCaseParser +from tests.coverage.visitor import TestCaseVisitor + + +class ParseError(Exception): + def __init__(self, message="Parsing error occurred"): + self.message = message + super().__init__(self.message) + + +class ParseErrorListener(ErrorListener): + def __init__(self): + super(ParseErrorListener, self).__init__() + self.errors = [] + + def syntaxError(self, recognizer, offending_symbol, line, column, msg, e): + error_message = f"Syntax error at line {line}, column {column}: {msg}" + self.errors.append(error_message) + + +def parse_stream(input_stream, file_path): + # Create a lexer and parser + lexer = FuncTestCaseLexer(input_stream) + token_stream = CommonTokenStream(lexer) + parser = FuncTestCaseParser(token_stream) + + # Add custom error listener + error_listener = ParseErrorListener() + parser.removeErrorListeners() + parser.addErrorListener(error_listener) + + tree = parser.doc() # This is the entry point of testfile parser + if parser.getNumberOfSyntaxErrors() > 0: + print(tree.toStringTree(recog=parser)) + print(f"{parser.getNumberOfSyntaxErrors()} Syntax errors found, exiting") + raise ParseError(f"Syntax errors: {error_listener.errors}") + + # uncomment below line to see the parse tree for debugging + # print(tree.toStringTree(recog=parser)) + + visitor = TestCaseVisitor(file_path) + test_file = visitor.visit(tree) + return test_file + + +def parse_one_file(file_path): + return parse_stream(FileStream(file_path), file_path) + + +def parse_testcase_directory_recursively(dir_path): + # for each file in directory call parse_one_file + test_files = [] + for child in os.listdir(dir_path): + child_path = os.path.join(dir_path, child) + if os.path.isfile(child_path) and child.endswith(".test"): + test_file = parse_one_file(child_path) + test_files.append(test_file) + elif os.path.isdir(child_path): + test_files_in_a_dir = parse_testcase_directory_recursively(child_path) + test_files.extend(test_files_in_a_dir) + return test_files + + +def load_all_testcases(dir_path) -> list: + return parse_testcase_directory_recursively(dir_path) diff --git a/tests/coverage/coverage.py b/tests/coverage/coverage.py new file mode 100755 index 000000000..4f5c50a3e --- /dev/null +++ b/tests/coverage/coverage.py @@ -0,0 +1,131 @@ +# SPDX-License-Identifier: Apache-2.0 +import json +from collections import defaultdict + +from tests.coverage.case_file_parser import load_all_testcases +from tests.coverage.extensions import Extension, error, FunctionRegistry + + +class FunctionTestCoverage: + function_name: str + test_count: int + function_variant_coverage: defaultdict[str, int] + + def __init__(self, function_name): + self.function_name = function_name + self.test_count = 0 + self.function_variant_coverage = defaultdict(int) + + def update_coverage(self, function_variant, count): + self.function_variant_coverage[function_variant] += count + self.test_count += count + + def to_dict(self): + return { + "function_name": self.function_name, + "test_count": self.test_count, + "variants": [ + {"signature": variant, "test_count": count} + for variant, count in self.function_variant_coverage.items() + ], + } + + +class FileTestCoverage: + file_name: str + test_count: int + function_coverage: dict[str, FunctionTestCoverage] + + def __init__(self, file_name): + self.file_name = file_name + self.test_count = 0 + self.function_coverage = dict() + + def update_coverage(self, func_name, args, count): + key = f"{func_name}({', '.join(args)})" + if func_name not in self.function_coverage: + self.function_coverage[func_name] = FunctionTestCoverage(func_name) + self.function_coverage[func_name].update_coverage(key, count) + self.test_count += count + + def to_dict(self): + return { + "file_name": self.file_name, + "test_count": self.test_count, + "function_coverage": [ + func_coverage.to_dict() + for func_name, func_coverage in self.function_coverage.items() + ], + } + + +class TestCoverage: + file_coverage: dict[str, FileTestCoverage] + test_count: int + num_covered_variants: int + total_variants: int + + def __init__(self, ext_uris): + self.file_coverage = dict() + self.test_count = 0 + self.num_covered_variants = 0 + self.total_variants = 0 + for ext_uri in ext_uris: + self.file_coverage[ext_uri] = FileTestCoverage(ext_uri) + + def update_coverage(self, ext_uri, function, args, count): + if ext_uri not in self.file_coverage: + self.file_coverage[ext_uri] = FileTestCoverage(ext_uri) + self.file_coverage[ext_uri].update_coverage(function, args, count) + self.test_count += count + + def compute_coverage(self): + for file_coverage in self.file_coverage.values(): + for function_coverage in file_coverage.function_coverage.values(): + for test_count in function_coverage.function_variant_coverage.values(): + if test_count > 0: + self.num_covered_variants += 1 + self.total_variants += 1 + + def to_dict(self): + return { + "file_coverage": [ + file_coverage.to_dict() for file_coverage in self.file_coverage.values() + ], + "test_count": self.test_count, + "num_covered_function_variants": self.num_covered_variants, + "total_function_variants": self.total_variants, + } + + def to_json(self): + return json.dumps(self.to_dict(), indent=2) + + +def update_test_count(test_case_files: list, function_registry: FunctionRegistry): + for test_file in test_case_files: + for test_case in test_file.testcases: + function_variant = function_registry.get_function( + test_case.func_name, test_case.get_arg_types() + ) + if function_variant: + if ( + function_variant.return_type != test_case.get_return_type() + and not test_case.is_return_type_error() + ): + error( + f"Return type mismatch in function {test_case.func_name}: {function_variant.return_type} != {test_case.get_return_type()}" + ) + continue + function_variant.increment_test_count() + else: + error(f"Function not found: {test_case.func_name}({test_case.args})") + + +if __name__ == "__main__": + test_files = load_all_testcases("../cases") + function_registry = Extension.read_substrait_extensions("../../extensions") + coverage = TestCoverage(function_registry.get_extension_list()) + update_test_count(test_files, function_registry) + function_registry.fill_coverage(coverage) + coverage.compute_coverage() + print(coverage.to_json()) diff --git a/tests/coverage/extensions.py b/tests/coverage/extensions.py new file mode 100644 index 000000000..ba8a43299 --- /dev/null +++ b/tests/coverage/extensions.py @@ -0,0 +1,282 @@ +# SPDX-License-Identifier: Apache-2.0 +import os +import yaml + +from tests.coverage.antlr_parser.FuncTestCaseLexer import FuncTestCaseLexer + +enable_debug = False + + +def error(msg): + print(f"ERROR: {msg}") + + +def debug(msg): + if enable_debug: + print(f"DEBUG: {msg}") + + +def substrait_type_str(rule_num): + return FuncTestCaseLexer.symbolicNames[rule_num].lower() + + +def build_type_to_short_type(): + rule_map = { + FuncTestCaseLexer.I8: FuncTestCaseLexer.I8, + FuncTestCaseLexer.I16: FuncTestCaseLexer.I16, + FuncTestCaseLexer.I32: FuncTestCaseLexer.I32, + FuncTestCaseLexer.I64: FuncTestCaseLexer.I64, + FuncTestCaseLexer.FP32: FuncTestCaseLexer.FP32, + FuncTestCaseLexer.FP64: FuncTestCaseLexer.FP64, + FuncTestCaseLexer.String: FuncTestCaseLexer.Str, + FuncTestCaseLexer.Binary: FuncTestCaseLexer.VBin, + FuncTestCaseLexer.Boolean: FuncTestCaseLexer.Bool, + FuncTestCaseLexer.Timestamp: FuncTestCaseLexer.Ts, + FuncTestCaseLexer.Timestamp_TZ: FuncTestCaseLexer.TsTZ, + FuncTestCaseLexer.Date: FuncTestCaseLexer.Date, + FuncTestCaseLexer.Time: FuncTestCaseLexer.Time, + FuncTestCaseLexer.Interval_Year: FuncTestCaseLexer.IYear, + FuncTestCaseLexer.Interval_Day: FuncTestCaseLexer.IDay, + FuncTestCaseLexer.UUID: FuncTestCaseLexer.UUID, + FuncTestCaseLexer.FixedChar: FuncTestCaseLexer.FChar, + FuncTestCaseLexer.VarChar: FuncTestCaseLexer.VChar, + FuncTestCaseLexer.FixedBinary: FuncTestCaseLexer.FBin, + FuncTestCaseLexer.Decimal: FuncTestCaseLexer.Dec, + FuncTestCaseLexer.Precision_Timestamp: FuncTestCaseLexer.PTs, + FuncTestCaseLexer.Precision_Timestamp_TZ: FuncTestCaseLexer.PTsTZ, + FuncTestCaseLexer.Struct: FuncTestCaseLexer.Struct, + FuncTestCaseLexer.List: FuncTestCaseLexer.List, + FuncTestCaseLexer.Map: FuncTestCaseLexer.Map, + FuncTestCaseLexer.Any: FuncTestCaseLexer.Any, + } + to_short_type = { + substrait_type_str(k): substrait_type_str(v) for k, v in rule_map.items() + } + any_type = substrait_type_str(FuncTestCaseLexer.Any) + for i in range(1, 3): + to_short_type[f"{any_type}{i}"] = f"{any_type}{i}" + return to_short_type + + +type_to_short_type = build_type_to_short_type() +short_type_to_type = {st: lt for lt, st in type_to_short_type.items()} + + +class Extension: + @staticmethod + def get_base_uri(): + return "https://github.com/substrait-io/substrait/blob/main/extensions/" + + @staticmethod + def get_short_type(long_type): + long_type = long_type.lower().rstrip("?") + short_type = type_to_short_type.get(long_type, None) + + if short_type is None: + # remove the type parameters and try again + if "<" in long_type: + long_type = long_type[: long_type.find("<")].rstrip("?") + short_type = type_to_short_type.get(long_type, None) + if short_type is None: + if "\n" in long_type: + long_type = long_type.split("\n")[-1] + short_type = type_to_short_type.get(long_type, None) + if short_type is None: + if "!" not in long_type: + error(f"Type not found in the mapping: {long_type}") + return long_type + return short_type + + @staticmethod + def get_long_type(short_type): + if short_type.endswith("?"): + short_type = short_type[:-1] + long_type = short_type_to_type.get(short_type, None) + if long_type is None: + error(f"Type not found in the mapping: {short_type}") + return short_type + return long_type + + @staticmethod + def get_supported_kernels_from_impls(func): + overloads = [] + for impl in func["impls"]: + args = [] + if "args" in impl: + for arg in impl["args"]: + if "value" in arg: + arg_type = arg["value"] + if arg_type.endswith("?"): + arg_type = arg_type[:-1] + args.append(Extension.get_short_type(arg_type)) + else: + debug( + f"arg is not a value type for function: {func['name']} arg must be enum options {arg['options']}" + ) + args.append("str") + overloads.append( + FunctionOverload( + args, Extension.get_short_type(impl["return"]), "variadic" in impl + ) + ) + return overloads + + @staticmethod + def add_functions_to_map(func_list, function_map, suffix, extension): + dup_idx = 0 + for func in func_list: + name = func["name"] + uri = extension[5:] # strip the ../.. + if name in function_map: + debug( + f"Duplicate function name: {name} renaming to {name}_{suffix} extension: {extension}" + ) + dup_idx += 1 + name = f"{name}_dup{dup_idx}_{suffix}" + assert ( + name not in function_map + ), f"Duplicate function name: {name} renaming to {name}_{suffix} extension: {extension}" + func["overloads"] = Extension.get_supported_kernels_from_impls(func) + func["uri"] = uri + func.pop("description", None) + func.pop("impls", None) + function_map[name] = func + + @staticmethod + def read_substrait_extensions(dir_path: str): + # read files from extensions directory + extensions = [] + for root, dirs, files in os.walk(dir_path): + for file in files: + if file.endswith(".yaml") and file.startswith("functions_"): + extensions.append(os.path.join(root, file)) + + extensions.sort() + + scalar_functions = {} + aggregate_functions = {} + window_functions = {} + dependencies = {} + # convert yaml file to a python dictionary + for extension in extensions: + suffix = extension[:-5] # strip .yaml at the end of the extension + suffix = suffix[ + suffix.rfind("/") + 1 : + ] # strip the path and get the name of the extension + suffix = suffix[suffix.find("_") + 1 :] # get the suffix after the last _ + + dependencies[suffix] = Extension.get_base_uri() + extension + with open(extension, "r") as fh: + data = yaml.load(fh, Loader=yaml.FullLoader) + if "scalar_functions" in data: + Extension.add_functions_to_map( + data["scalar_functions"], scalar_functions, suffix, extension + ) + if "aggregate_functions" in data: + Extension.add_functions_to_map( + data["aggregate_functions"], + aggregate_functions, + suffix, + extension, + ) + if "window_functions" in data: + Extension.add_functions_to_map( + data["window_functions"], scalar_functions, suffix, extension + ) + + return FunctionRegistry( + scalar_functions, aggregate_functions, window_functions, dependencies + ) + + +class FunctionType: + SCALAR = 1 + AGGREGATE = 2 + WINDOW = 3 + + +class FunctionVariant: + def __init__(self, name, uri, description, args, return_type, variadic, func_type): + self.name = name + self.uri = uri + self.description = description + self.args = args + self.return_type = return_type + self.variadic = variadic + self.func_type = func_type + self.test_count = 0 + + def __str__(self): + return f"Function(name={self.name}, uri={self.uri}, description={self.description}, overloads={self.overload}, args={self.args}, result={self.result})" + + def increment_test_count(self, count=1): + self.test_count += count + + +class FunctionOverload: + def __init__(self, args, return_type, variadic): + self.args = args + self.return_type = return_type + self.variadic = variadic + + def __str__(self): + return f"FunctionOverload(args={self.args}, result={self.return_type}, variadic={self.variadic})" + + +# define function type enum + + +class FunctionRegistry: + registry = dict() + dependencies = dict() + scalar_functions = dict() + aggregate_functions = dict() + window_functions = dict() + extensions = set() + + def __init__( + self, scalar_functions, aggregate_functions, window_functions, dependencies + ): + self.dependencies = dependencies + self.scalar_functions = scalar_functions + self.aggregate_functions = aggregate_functions + self.window_functions = window_functions + self.add_functions(scalar_functions, FunctionType.SCALAR) + self.add_functions(aggregate_functions, FunctionType.AGGREGATE) + self.add_functions(window_functions, FunctionType.WINDOW) + + def add_functions(self, functions, func_type): + for func in functions.values(): + self.extensions.add(func["uri"]) + f_name = func["name"] + fun_arr = self.registry.get(f_name, []) + for overload in func["overloads"]: + function = FunctionVariant( + func["name"], + func["uri"], + "", + overload.args, + overload.return_type, + overload.variadic, + func_type, + ) + fun_arr.append(function) + self.registry[f_name] = fun_arr + + def get_function(self, name: str, args: object) -> [FunctionVariant]: + functions = self.registry.get(name, None) + if functions is None: + return None + for function in functions: + if function.args == args: + return function + + def get_extension_list(self): + return list(self.extensions) + + def fill_coverage(self, coverage): + for func_name, functions in self.registry.items(): + for function in functions: + coverage.update_coverage( + function.uri, func_name, function.args, function.test_count + ) diff --git a/tests/coverage/nodes.py b/tests/coverage/nodes.py new file mode 100644 index 000000000..9af5c51a0 --- /dev/null +++ b/tests/coverage/nodes.py @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: Apache-2.0 +from dataclasses import dataclass +from typing import List + + +@dataclass +class CaseGroup: + name: str + description: str + + +@dataclass +class SubstraitError: + error: str + + +@dataclass +class CaseLiteral: + value: str | int | float | list + type: str + + def get_base_type(self): + type_str = self.type + if "<" in type_str: + type_str = type_str[: type_str.find("<")] + if type_str.endswith("?"): + return type_str[:-1] + return type_str + + +@dataclass +class TestCase: + func_name: str + base_uri: str + group: CaseGroup + options: dict + args: List[CaseLiteral] + result: CaseLiteral | str + comment: str + + def get_return_type(self): + if isinstance(self.result, CaseLiteral): + return self.result.type + return self.result + + def is_return_type_error(self): + return isinstance(self.result, SubstraitError) + + def get_arg_types(self): + return [arg.get_base_type() for arg in self.args] + + def get_signature(self): + return f"{self.func_name}({', '.join([arg.type for arg in self.args])})" + + +@dataclass +class TestFile: + path: str + version: str + include: str + testcases: List[TestCase] diff --git a/tests/coverage/test_coverage.py b/tests/coverage/test_coverage.py new file mode 100644 index 000000000..5e7896e95 --- /dev/null +++ b/tests/coverage/test_coverage.py @@ -0,0 +1,195 @@ +# SPDX-License-Identifier: Apache-2.0 +import unittest + +import pytest +from antlr4 import InputStream +from tests.coverage.case_file_parser import parse_stream, parse_one_file, ParseError +from tests.coverage.nodes import CaseLiteral + + +def parse_string(input_string): + return parse_stream(InputStream(input_string), "test_string") + + +def make_header(version, include): + return f"""### SUBSTRAIT_SCALAR_TEST: {version} +### SUBSTRAIT_INCLUDE: '{include}' + +""" + + +def test_parse_basic_example(): + header = make_header("v1.0", "/extensions/functions_arithmetic.yaml") + tests = """# 'Basic examples without any special cases' +add(120::i8, 5::i8) = 125::i8 +add(100::i16, 100::i16) = 200::i16 + +# Overflow examples demonstrating overflow behavior +add(120::i8, 10::i8) [overflow:ERROR] = +""" + + test_file = parse_string(header + tests) + assert len(test_file.testcases) == 3 + + +def test_parse_date_time_example(): + header = make_header("v1.0", "/extensions/functions_datetime.yaml") + tests = """# timestamp examples using the timestamp type +lt('2016-12-31T13:30:15'::ts, '2017-12-31T13:30:15'::ts) = true::bool +""" + + test_file = parse_string(header + tests) + assert len(test_file.testcases) == 1 + assert test_file.testcases[0].func_name == "lt" + assert test_file.testcases[0].base_uri == "/extensions/functions_datetime.yaml" + assert ( + test_file.testcases[0].group.name + == "timestamp examples using the timestamp type" + ) + assert test_file.testcases[0].result == CaseLiteral("true", "bool") + assert test_file.testcases[0].args[0] == CaseLiteral("2016-12-31T13:30:15", "ts") + assert test_file.testcases[0].args[1] == CaseLiteral("2017-12-31T13:30:15", "ts") + + +def test_parse_decimal_example(): + header = make_header("v1.0", "extensions/functions_arithmetic_decimal.yaml") + tests = """# basic +power(8::dec<38,0>, 2::dec<38, 0>) = 64::fp64 +power(1.0::dec<38, 0>, -1.0::dec<38, 0>) = 1.0::fp64 +power(-1::dec, 0.5::dec<38,1>) [complex_number_result:NAN] = nan::fp64 +""" + test_file = parse_string(header + tests) + assert len(test_file.testcases) == 3 + assert test_file.testcases[0].func_name == "power" + assert ( + test_file.testcases[0].base_uri + == "extensions/functions_arithmetic_decimal.yaml" + ) + assert test_file.testcases[0].group.name == "basic" + assert test_file.testcases[0].result == CaseLiteral("64", "fp64") + assert test_file.testcases[0].args[0] == CaseLiteral("8", "dec<38,0>") + assert test_file.testcases[0].args[1] == CaseLiteral("2", "dec<38,0>") + + +def test_parse_decimal_example_with_nan(): + header = make_header("v1.0", "extensions/functions_arithmetic_decimal.yaml") + tests = """# basic +power(-1::dec, 0.5::dec<38,1>) [complex_number_result:NAN] = nan::fp64 +""" + test_file = parse_string(header + tests) + assert len(test_file.testcases) == 1 + assert test_file.testcases[0].func_name == "power" + assert ( + test_file.testcases[0].base_uri + == "extensions/functions_arithmetic_decimal.yaml" + ) + assert test_file.testcases[0].group.name == "basic" + assert test_file.testcases[0].result == CaseLiteral("nan", "fp64") + assert test_file.testcases[0].args[0] == CaseLiteral("-1", "dec") + assert test_file.testcases[0].args[1] == CaseLiteral("0.5", "dec<38,1>") + + +def test_parse_file_add(): + test_file = parse_one_file("../cases/arithmetic/add.test") + assert len(test_file.testcases) == 15 + assert test_file.testcases[0].func_name == "add" + assert test_file.testcases[0].base_uri == "/extensions/functions_arithmetic.yaml" + assert test_file.include == "/extensions/functions_arithmetic.yaml" + + +def test_parse_file_lt_datetime(): + test_file = parse_one_file("../cases/datetime/lt_datetime.test") + assert len(test_file.testcases) == 13 + assert test_file.testcases[0].func_name == "lt" + assert test_file.testcases[0].base_uri == "/extensions/functions_datetime.yaml" + + +def test_parse_file_power_decimal(): + test_file = parse_one_file("../cases/arithmetic_decimal/power.test") + assert len(test_file.testcases) == 9 + assert test_file.testcases[0].func_name == "power" + assert ( + test_file.testcases[0].base_uri + == "extensions/functions_arithmetic_decimal.yaml" + ) + + +@pytest.mark.parametrize( + "input_func_test, position, expected_message", + [ + ( + "add(-12::i8, +5::i8) = -7.0::i8", + 29, + "no viable alternative at input '-7.0::i8'", + ), + ( + "add(123.5::i8, 5::i8) = 125::i8", + 11, + "no viable alternative at input '123.5::i8'", + ), + ( + "add(123.5::i16, 5.5::i16) = 125::i16", + 11, + "no viable alternative at input '123.5::i16'", + ), + ( + "add(123.5::i32, 5.5::i32) = 125::i32", + 21, + "no viable alternative at input '5.5::i32'", + ), + ( + "add(123f::i64, 5.5::i64) = 125::i64", + 7, + "no viable alternative at input '123f'", + ), + ( + "add(123::i64, 5_000::i64) = 5123::i64", + 15, + "no viable alternative at input '5_000'", + ), + ( + "add(123::dec<38,10>, 5.0E::dec<38,10>) = 123::dec<38,10>", + 24, + "no viable alternative at input '5.0E'", + ), + ( + "add(123::dec<38,10>, 1a.2::dec<38,10>) = 123::fp32", + 22, + "no viable alternative at input '1a'", + ), + ( + "add(123::dec<38,10>, 1.2.3::dec<38,10>) = 123::fp32", + 24, + "no viable alternative at input '1.2.'", + ), + ( + "add(123::dec<38,10>, +-12.3::dec<38,10>) = 123::i64", + 21, + "extraneous input '+'", + ), + ("add(123::fp32, .5E2::fp32) = 123::fp32", 15, "extraneous input '.'"), + ("add(123::fp32, 4.1::fp32) = ++123::fp32", 28, "extraneous input '+'"), + ( + "add(123::fp32, 2.5E::fp32) = 123::fp32", + 18, + "no viable alternative at input '2.5E'", + ), + ( + "add(123::fp32, 1.4E+::fp32) = 123::fp32", + 18, + "no viable alternative at input '1.4E'", + ), + ( + "add(123::fp32, 3.E.5::fp32) = 123::fp32", + 17, + "no viable alternative at input '3.E'", + ), + ], +) +def test_parse_errors_with_bad_cases(input_func_test, position, expected_message): + header = make_header("v1.0", "extensions/functions_arithmetic.yaml") + "# basic\n" + with pytest.raises(ParseError) as pm: + parse_string(header + input_func_test + "\n") + assert f"Syntax error at line 5, column {position}: {expected_message}" in str( + pm.value + ) diff --git a/tests/coverage/visitor.py b/tests/coverage/visitor.py new file mode 100644 index 000000000..6892bbf1b --- /dev/null +++ b/tests/coverage/visitor.py @@ -0,0 +1,201 @@ +# SPDX-License-Identifier: Apache-2.0 +from tests.coverage.antlr_parser.FuncTestCaseParser import FuncTestCaseParser +from tests.coverage.antlr_parser.FuncTestCaseParserVisitor import ( + FuncTestCaseParserVisitor, +) +from tests.coverage.nodes import ( + CaseGroup, + TestFile, + TestCase, + CaseLiteral, + SubstraitError, +) + + +class TestCaseVisitor(FuncTestCaseParserVisitor): + def __init__(self, file_path): + self.file_path = file_path + + def visitDoc(self, ctx: FuncTestCaseParser.DocContext): + version, include = self.visitHeader(ctx.header()) + testcases = [] + for group in ctx.testGroup(): + _, group_tests = self.visitTestGroup(group) + for test_case in group_tests: + test_case.base_uri = include + testcases.extend(group_tests) + + return TestFile(self.file_path, version, include, testcases) + + def visitHeader(self, ctx: FuncTestCaseParser.HeaderContext): + version = self.visitVersion(ctx.version()) + include = self.visitInclude(ctx.include()) + return version, include + + def visitVersion(self, ctx: FuncTestCaseParser.VersionContext): + return ctx.FormatVersion().getText() + + def visitInclude(self, ctx: FuncTestCaseParser.IncludeContext): + # TODO handle multiple includes + return ctx.StringLiteral(0).getText().strip("'") + + def visitTestGroupDescription( + self, ctx: FuncTestCaseParser.TestGroupDescriptionContext + ): + group = ctx.DescriptionLine().getText().strip("#").strip() + return CaseGroup(group, "") + + def visitTestGroup(self, ctx: FuncTestCaseParser.TestGroupContext): + group = self.visitTestGroupDescription(ctx.testGroupDescription()) + test_cases = [] + for test_case in ctx.testCase(): + testcase = self.visitTestCase(test_case) + testcase.group = group + test_cases.append(testcase) + return group, test_cases + + def visitTestCase(self, ctx: FuncTestCaseParser.TestCaseContext): + # TODO Implement this method + args = self.visitArguments(ctx.arguments()) + result = self.visitResult(ctx.result()) + options = dict() + if ctx.func_options() is not None: + options = self.visitFunc_options(ctx.func_options()) + return TestCase( + func_name=ctx.Identifier().getText(), + base_uri="", + group=None, + options=options, + args=args, + result=result, + comment="", + ) + + def visitFunc_options(self, ctx: FuncTestCaseParser.Func_optionsContext): + options = {} + for option in ctx.func_option(): + key, value = self.visitFunc_option(option) + options[key] = value + return options + + def visitFunc_option(self, ctx: FuncTestCaseParser.Func_optionContext): + key = ctx.option_name().getText() + value = ctx.option_value().getText() + return key, value + + def visitArguments(self, ctx: FuncTestCaseParser.ArgumentsContext): + arguments = [] + for arg in ctx.argument(): + arguments.append(self.visitArgument(arg)) + return arguments + + def visitArgument(self, ctx: FuncTestCaseParser.ArgumentContext): + if ctx.intArg() is not None: + return self.visitIntArg(ctx.intArg()) + if ctx.floatArg() is not None: + return self.visitFloatArg(ctx.floatArg()) + if ctx.booleanArg() is not None: + return self.visitBooleanArg(ctx.booleanArg()) + if ctx.stringArg() is not None: + return self.visitStringArg(ctx.stringArg()) + if ctx.decimalArg() is not None: + return self.visitDecimalArg(ctx.decimalArg()) + if ctx.dateArg() is not None: + return self.visitDateArg(ctx.dateArg()) + if ctx.timeArg() is not None: + return self.visitTimeArg(ctx.timeArg()) + if ctx.timestampArg() is not None: + return self.visitTimestampArg(ctx.timestampArg()) + if ctx.timestampTzArg() is not None: + return self.visitTimestampTzArg(ctx.timestampTzArg()) + if ctx.intervalDayArg() is not None: + return self.visitIntervalDayArg(ctx.intervalDayArg()) + if ctx.intervalYearArg() is not None: + return self.visitIntervalYearArg(ctx.intervalYearArg()) + if ctx.nullArg() is not None: + return self.visitNullArg(ctx.nullArg()) + + return CaseLiteral(value="unknown_value", type="unknown_type") + + def visitNumericLiteral(self, ctx: FuncTestCaseParser.NumericLiteralContext): + if ctx.IntegerLiteral() is not None: + return ctx.IntegerLiteral().getText() + if ctx.DecimalLiteral() is not None: + return ctx.DecimalLiteral().getText() + return self.visitFloatLiteral(ctx.floatLiteral()) + + def visitFloatLiteral(self, ctx: FuncTestCaseParser.FloatLiteralContext): + if ctx.FloatLiteral() is not None: + return ctx.FloatLiteral().getText() + return ctx.NaN().getText() + + def visitNullArg(self, ctx: FuncTestCaseParser.NullArgContext): + datatype = ctx.datatype().getText() + return CaseLiteral(value=None, type=datatype) + + def visitIntArg(self, ctx: FuncTestCaseParser.IntArgContext): + type_str = "i8" + if ctx.I16() is not None: + type_str = "i16" + elif ctx.I32() is not None: + type_str = "i32" + elif ctx.I64() is not None: + type_str = "i64" + return CaseLiteral(value=ctx.IntegerLiteral().getText(), type=type_str) + + def visitFloatArg(self, ctx: FuncTestCaseParser.FloatArgContext): + # TODO add checks on number of decimal places + type_str = "fp32" + if ctx.FP64() is not None: + type_str = "fp64" + return CaseLiteral( + value=self.visitNumericLiteral(ctx.numericLiteral()), type=type_str + ) + + def visitBooleanArg(self, ctx: FuncTestCaseParser.BooleanArgContext): + return CaseLiteral(value=ctx.BooleanLiteral().getText(), type="bool") + + def visitStringArg(self, ctx: FuncTestCaseParser.StringArgContext): + return CaseLiteral(value=ctx.StringLiteral().getText(), type="str") + + def visitDecimalArg(self, ctx: FuncTestCaseParser.DecimalArgContext): + return CaseLiteral( + value=self.visitNumericLiteral(ctx.numericLiteral()), + type=ctx.decimalType().getText().lower(), + ) + + def visitDateArg(self, ctx: FuncTestCaseParser.DateArgContext): + return CaseLiteral(value=ctx.DateLiteral().getText().strip("'"), type="date") + + def visitTimeArg(self, ctx: FuncTestCaseParser.TimeArgContext): + return CaseLiteral(value=ctx.TimeLiteral().getText().strip("'"), type="time") + + def visitTimestampArg(self, ctx: FuncTestCaseParser.TimestampArgContext): + return CaseLiteral(value=ctx.TimestampLiteral().getText().strip("'"), type="ts") + + def visitTimestampTzArg(self, ctx: FuncTestCaseParser.TimestampTzArgContext): + return CaseLiteral( + value=ctx.TimestampTzLiteral().getText().strip("'"), type="tstz" + ) + + def visitIntervalDayArg(self, ctx: FuncTestCaseParser.IntervalDayArgContext): + return CaseLiteral( + value=ctx.IntervalDayLiteral().getText().strip("'"), type="iday" + ) + + def visitIntervalYearArg(self, ctx: FuncTestCaseParser.IntervalYearArgContext): + return CaseLiteral( + value=ctx.IntervalYearLiteral().getText().strip("'"), type="iyear" + ) + + def visitResult(self, ctx: FuncTestCaseParser.ResultContext): + if ctx.argument() is not None: + return self.visitArgument(ctx.argument()) + return self.visitSubstraitError(ctx.substraitError()) + + def visitSubstraitError(self, ctx: FuncTestCaseParser.SubstraitErrorContext): + if ctx.ErrorResult() is not None: + return SubstraitError("error") + if ctx.UndefineResult() is not None: + return SubstraitError("undefined") + return SubstraitError("unknown_error") diff --git a/tests/test_extensions.py b/tests/test_extensions.py new file mode 100644 index 000000000..3cb7e5294 --- /dev/null +++ b/tests/test_extensions.py @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: Apache-2.0 +import os + +from tests.coverage.extensions import build_type_to_short_type + + +# NOTE: this test is run as part of pre-commit hook +def test_read_substrait_extensions(): + from tests.coverage.extensions import Extension + + current_dir = os.path.dirname(os.path.abspath(__file__)) + extensions_path = os.path.join(current_dir, "../extensions") + registry = Extension.read_substrait_extensions(extensions_path) + assert len(registry.registry) >= 161 + num_overloads = sum([len(f) for f in registry.registry.values()]) + assert num_overloads >= 510 + assert len(registry.dependencies) >= 13 + assert len(registry.scalar_functions) >= 162 + assert len(registry.aggregate_functions) >= 29 + assert len(registry.window_functions) >= 0 + + +def test_build_type_to_short_type(): + long_to_short = build_type_to_short_type() + assert long_to_short["i64"] == "i64" + assert long_to_short["fp64"] == "fp64" + assert long_to_short["timestamp"] == "ts" + assert long_to_short["timestamp_tz"] == "tstz" + assert long_to_short["precision_timestamp"] == "pts" + assert long_to_short["precision_timestamp_tz"] == "ptstz" + assert long_to_short["interval_year"] == "iyear" + assert long_to_short["interval_day"] == "iday" + assert long_to_short["decimal"] == "dec" + assert long_to_short["boolean"] == "bool" + assert long_to_short["string"] == "str" + assert long_to_short["binary"] == "vbin" + assert long_to_short["fixedbinary"] == "fbin" + assert long_to_short["fixedchar"] == "fchar" + assert long_to_short["varchar"] == "vchar" + assert long_to_short["list"] == "list" + assert long_to_short["map"] == "map" + assert long_to_short["struct"] == "struct"