├── .asf.yaml ├── .gitattributes ├── .github ├── dependabot.yml └── workflows │ ├── code-coverage.yml │ ├── codeql.yml │ ├── greetings.yml │ ├── site-build.yaml │ ├── unit-test-cpp.yml │ ├── unit-test-java.yml │ └── unit-test-python.yml ├── .gitignore ├── .mvn ├── develocity.xml ├── extensions.xml └── wrapper │ └── maven-wrapper.properties ├── Jenkinsfile ├── LICENSE ├── NOTICE ├── README-zh.md ├── README.md ├── RELEASE_NOTES.md ├── checkstyle.xml ├── codecov.yml ├── cpp ├── .clang-format ├── .gitignore ├── CMakeLists.txt ├── README-zh.md ├── README.md ├── VersionUpdater.groovy ├── bench_mark │ ├── CMakeLists.txt │ ├── bench_mark_src │ │ ├── CMakeLists.txt │ │ ├── bench_conf.h │ │ ├── bench_mark.cc │ │ └── bench_mark.h │ └── build.sh ├── build.sh ├── cmake │ └── CopyToDir.cmake ├── examples │ ├── CMakeLists.txt │ ├── README.md │ ├── build.sh │ ├── c_examples │ │ ├── CMakeLists.txt │ │ ├── c_examples.h │ │ ├── demo_read.c │ │ └── demo_write.c │ ├── cpp_examples │ │ ├── CMakeLists.txt │ │ ├── cpp_examples.h │ │ ├── demo_read.cpp │ │ └── demo_write.cpp │ ├── examples.cc │ └── test_cpp.tsfile ├── pom.xml ├── src │ ├── CMakeLists.txt │ ├── common │ │ ├── CMakeLists.txt │ │ ├── allocator │ │ │ ├── CMakeLists.txt │ │ │ ├── alloc_base.h │ │ │ ├── byte_stream.h │ │ │ ├── mem_alloc.cc │ │ │ ├── my_string.h │ │ │ ├── page_arena.cc │ │ │ └── page_arena.h │ │ ├── cache │ │ │ └── lru_cache.h │ │ ├── config │ │ │ ├── CMakeLists.txt │ │ │ └── config.h │ │ ├── constant │ │ │ ├── CMakeLists.txt │ │ │ └── tsfile_constant.h │ │ ├── container │ │ │ ├── CMakeLists.txt │ │ │ ├── array.h │ │ │ ├── bit_map.cc │ │ │ ├── bit_map.h │ │ │ ├── blocking_queue.cc │ │ │ ├── blocking_queue.h │ │ │ ├── byte_buffer.h │ │ │ ├── hash_func.h │ │ │ ├── hash_node.h │ │ │ ├── hash_segm.h │ │ │ ├── hash_table.h │ │ │ ├── list.h │ │ │ ├── murmur_hash3.cc │ │ │ ├── murmur_hash3.h │ │ │ ├── simple_vector.h │ │ │ ├── slice.h │ │ │ └── sorted_array.h │ │ ├── datatype │ │ │ └── value.h │ │ ├── db_common.h │ │ ├── device_id.h │ │ ├── global.cc │ │ ├── global.h │ │ ├── logger │ │ │ └── elog.h │ │ ├── mutex │ │ │ ├── CMakeLists.txt │ │ │ └── mutex.h │ │ ├── path.h │ │ ├── record.h │ │ ├── row_record.h │ │ ├── schema.h │ │ ├── seq_tvlist.h │ │ ├── seq_tvlist.inc │ │ ├── statistic.h │ │ ├── tablet.cc │ │ ├── tablet.h │ │ ├── tablet_iterator.h │ │ ├── tsblock │ │ │ ├── CMakeLists.txt │ │ │ ├── tsblock.cc │ │ │ ├── tsblock.h │ │ │ ├── tuple_desc.cc │ │ │ ├── tuple_desc.h │ │ │ └── vector │ │ │ │ ├── fixed_length_vector.h │ │ │ │ ├── variable_length_vector.h │ │ │ │ └── vector.h │ │ ├── tsfile_common.cc │ │ ├── tsfile_common.h │ │ ├── tsfile_mgr.cc │ │ └── tsfile_mgr.h │ ├── compress │ │ ├── CMakeLists.txt │ │ ├── compressor.c │ │ ├── compressor.h │ │ ├── compressor_factory.h │ │ ├── gzip_compressor.cc │ │ ├── gzip_compressor.h │ │ ├── lz4_compressor.cc │ │ ├── lz4_compressor.h │ │ ├── lzo_compressor.cc │ │ ├── lzo_compressor.h │ │ ├── snappy_compressor.cc │ │ ├── snappy_compressor.h │ │ └── uncompressed_compressor.h │ ├── cwrapper │ │ ├── CMakeLists.txt │ │ ├── errno_define_c.h │ │ ├── tsfile_cwrapper.cc │ │ ├── tsfile_cwrapper.h │ │ ├── tsfile_cwrapper_expression.cc │ │ └── tsfile_cwrapper_expression.h │ ├── encoding │ │ ├── CMakeLists.txt │ │ ├── bitpack_decoder.h │ │ ├── bitpack_encoder.h │ │ ├── decoder.h │ │ ├── decoder_factory.h │ │ ├── dictionary_decoder.h │ │ ├── dictionary_encoder.h │ │ ├── encode_utils.h │ │ ├── encoder.h │ │ ├── encoder_factory.h │ │ ├── gorilla_decoder.h │ │ ├── gorilla_encoder.h │ │ ├── intpacker.h │ │ ├── plain_decoder.h │ │ ├── plain_encoder.h │ │ ├── ts2diff_decoder.h │ │ ├── ts2diff_encoder.h │ │ ├── zigzag_decoder.h │ │ └── zigzag_encoder.h │ ├── file │ │ ├── CMakeLists.txt │ │ ├── open_file.cc │ │ ├── open_file.h │ │ ├── read_file.cc │ │ ├── read_file.h │ │ ├── tsfile_io_reader.cc │ │ ├── tsfile_io_reader.h │ │ ├── tsfile_io_writer.cc │ │ ├── tsfile_io_writer.h │ │ ├── write_file.cc │ │ └── write_file.h │ ├── parser │ │ ├── CMakeLists.txt │ │ ├── PathLexer.g4 │ │ ├── PathParser.g4 │ │ ├── generated │ │ │ ├── PathLexer.cpp │ │ │ ├── PathLexer.h │ │ │ ├── PathParser.cpp │ │ │ ├── PathParser.h │ │ │ ├── PathParserBaseListener.cpp │ │ │ ├── PathParserBaseListener.h │ │ │ ├── PathParserBaseVisitor.cpp │ │ │ ├── PathParserBaseVisitor.h │ │ │ ├── PathParserListener.cpp │ │ │ ├── PathParserListener.h │ │ │ ├── PathParserVisitor.cpp │ │ │ └── PathParserVisitor.h │ │ ├── path_nodes_generator.cpp │ │ ├── path_nodes_generator.h │ │ ├── path_parser_error.h │ │ ├── path_visitor.cpp │ │ └── path_visitor.h │ ├── reader │ │ ├── CMakeLists.txt │ │ ├── aligned_chunk_reader.cc │ │ ├── aligned_chunk_reader.h │ │ ├── block │ │ │ ├── device_ordered_tsblock_reader.cc │ │ │ ├── device_ordered_tsblock_reader.h │ │ │ ├── single_device_tsblock_reader.cc │ │ │ ├── single_device_tsblock_reader.h │ │ │ └── tsblock_reader.h │ │ ├── bloom_filter.cc │ │ ├── bloom_filter.h │ │ ├── chunk_reader.cc │ │ ├── chunk_reader.h │ │ ├── column_mapping.h │ │ ├── device_meta_iterator.cc │ │ ├── device_meta_iterator.h │ │ ├── expression.cc │ │ ├── expression.h │ │ ├── filter │ │ │ ├── CMakeLists.txt │ │ │ ├── and_filter.h │ │ │ ├── between.h │ │ │ ├── binary_filter.h │ │ │ ├── eq.h │ │ │ ├── filter.h │ │ │ ├── filter_type.h │ │ │ ├── gt.h │ │ │ ├── gt_eq.h │ │ │ ├── in.h │ │ │ ├── lt.h │ │ │ ├── lt_eq.h │ │ │ ├── not_eq.h │ │ │ ├── object.h │ │ │ ├── or_filter.h │ │ │ ├── time_filter.cc │ │ │ ├── time_filter.h │ │ │ ├── time_operator.cc │ │ │ ├── time_operator.h │ │ │ └── unary_filter.h │ │ ├── ichunk_reader.h │ │ ├── imeta_data_querier.h │ │ ├── meta_data_querier.cc │ │ ├── meta_data_querier.h │ │ ├── qds_with_timegenerator.cc │ │ ├── qds_with_timegenerator.h │ │ ├── qds_without_timegenerator.cc │ │ ├── qds_without_timegenerator.h │ │ ├── query_executor.h │ │ ├── result_set.h │ │ ├── scan_iterator.cc │ │ ├── scan_iterator.h │ │ ├── table_query_executor.cc │ │ ├── table_query_executor.h │ │ ├── table_result_set.cc │ │ ├── table_result_set.h │ │ ├── task │ │ │ ├── device_query_task.cc │ │ │ ├── device_query_task.h │ │ │ ├── device_task_iterator.cc │ │ │ └── device_task_iterator.h │ │ ├── tsfile_executor.cc │ │ ├── tsfile_executor.h │ │ ├── tsfile_reader.cc │ │ ├── tsfile_reader.h │ │ ├── tsfile_series_scan_iterator.cc │ │ └── tsfile_series_scan_iterator.h │ ├── utils │ │ ├── CMakeLists.txt │ │ ├── db_utils.h │ │ ├── errno_define.h │ │ ├── injection.h │ │ ├── storage_utils.h │ │ └── util_define.h │ └── writer │ │ ├── CMakeLists.txt │ │ ├── chunk_writer.cc │ │ ├── chunk_writer.h │ │ ├── page_writer.cc │ │ ├── page_writer.h │ │ ├── time_chunk_writer.cc │ │ ├── time_chunk_writer.h │ │ ├── time_page_writer.cc │ │ ├── time_page_writer.h │ │ ├── tsfile_table_writer.cc │ │ ├── tsfile_table_writer.h │ │ ├── tsfile_writer.cc │ │ ├── tsfile_writer.h │ │ ├── value_chunk_writer.cc │ │ ├── value_chunk_writer.h │ │ ├── value_page_writer.cc │ │ └── value_page_writer.h ├── test │ ├── CMakeLists.txt │ ├── common │ │ ├── allocator │ │ │ ├── alloc_base_test.cc │ │ │ ├── byte_stream_test.cc │ │ │ ├── my_string_test.cc │ │ │ └── page_arena_test.cc │ │ ├── container │ │ │ ├── array_test.cc │ │ │ ├── bit_map_test.cc │ │ │ ├── byte_buffer_test.cc │ │ │ ├── list_test.cc │ │ │ ├── murmur_hash3_test.cc │ │ │ ├── simple_vector_test.cc │ │ │ ├── slice_test.cc │ │ │ └── sorted_array_test.cc │ │ ├── datatype │ │ │ └── value_test.cc │ │ ├── record_test.cc │ │ ├── row_record_test.cc │ │ ├── schema_test.cc │ │ ├── statistic_test.cc │ │ ├── tablet_test.cc │ │ ├── tsblock │ │ │ ├── tslock_test.cc │ │ │ ├── tuple_desc_test.cc │ │ │ └── vector │ │ │ │ ├── fixed_length_vector_test.cc │ │ │ │ └── variable_length_vector_test.cc │ │ └── tsfile_common_test.cc │ ├── compress │ │ ├── gzip_compressor_test.cc │ │ ├── lz4_compressor_test.cc │ │ ├── lzo_compressor_test.cc │ │ └── snappy_compressor_test.cc │ ├── cwrapper │ │ ├── c_release_test.cc │ │ └── cwrapper_test.cc │ ├── encoding │ │ ├── bitpack_codec_test.cc │ │ ├── dictionary_codec_test.cc │ │ ├── gorilla_codec_test.cc │ │ ├── inpacker_test.cc │ │ ├── plain_codec_test.cc │ │ ├── ts2diff_codec_test.cc │ │ └── zigzag_codec_test.cc │ ├── file │ │ ├── open_file_test.cc │ │ └── write_file_test.cc │ ├── parser │ │ └── path_name_test.cc │ ├── reader │ │ ├── table_view │ │ │ └── tsfile_reader_table_test.cc │ │ └── tsfile_reader_test.cc │ ├── utils │ │ └── db_utils_test.cc │ └── writer │ │ ├── chunk_writer_test.cc │ │ ├── page_writer_test.cc │ │ ├── table_view │ │ └── tsfile_writer_table_test.cc │ │ ├── time_chunk_writer_test.cc │ │ ├── time_page_writer_test.cc │ │ ├── tsfile_writer_test.cc │ │ ├── value_chunk_writer_test.cc │ │ └── value_page_writer_test.cc ├── test_all.sh └── third_party │ ├── CMakeLists.txt │ ├── antlr4-cpp-runtime-4 │ ├── CMakeLists.txt │ ├── LICENSE.txt │ ├── README.md │ ├── VERSION │ ├── cmake │ │ ├── Antlr4Package.md │ │ ├── ExternalAntlr4Cpp.cmake │ │ ├── FindANTLR.cmake │ │ ├── README.md │ │ ├── antlr4-generator.cmake.in │ │ └── antlr4-runtime.cmake.in │ ├── demo │ │ ├── CMakeLists.txt │ │ ├── Linux │ │ │ └── main.cpp │ │ ├── Mac │ │ │ ├── antlr4-cpp-demo │ │ │ │ └── main.cpp │ │ │ ├── antlrcpp Tests │ │ │ │ ├── Info.plist │ │ │ │ ├── InputHandlingTests.mm │ │ │ │ ├── MiscClassTests.mm │ │ │ │ └── antlrcpp_Tests.mm │ │ │ ├── antlrcpp-demo.xcodeproj │ │ │ │ ├── project.pbxproj │ │ │ │ ├── project.xcworkspace │ │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ │ └── xcshareddata │ │ │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ │ └── xcshareddata │ │ │ │ │ └── xcschemes │ │ │ │ │ ├── antlr4-cpp-demo.xcscheme │ │ │ │ │ └── antlrcpp Tests.xcscheme │ │ │ └── build.sh │ │ ├── README.md │ │ ├── TLexer.g4 │ │ ├── TParser.g4 │ │ ├── Windows │ │ │ ├── antlr4-cpp-demo │ │ │ │ ├── antlr4-cpp-demo-vs2015.vcxproj │ │ │ │ ├── antlr4-cpp-demo-vs2015.vcxproj.filters │ │ │ │ ├── antlr4-cpp-demo.vcxproj │ │ │ │ ├── antlr4-cpp-demo.vcxproj.filters │ │ │ │ └── main.cpp │ │ │ ├── antlr4cpp-vs2013.sln │ │ │ └── antlr4cpp-vs2015.sln │ │ ├── generate.cmd │ │ └── generate.sh │ ├── deploy-macos.sh │ ├── deploy-source.sh │ ├── deploy-windows.cmd │ └── runtime │ │ ├── CMakeLists.txt │ │ ├── antlr4cpp-vs2013.vcxproj │ │ ├── antlr4cpp-vs2013.vcxproj.filters │ │ ├── antlr4cpp-vs2015.vcxproj │ │ ├── antlr4cpp-vs2015.vcxproj.filters │ │ ├── antlr4cpp-vs2017.vcxproj │ │ ├── antlr4cpp-vs2017.vcxproj.filters │ │ ├── antlr4cpp-vs2019.vcxproj │ │ ├── antlr4cpp-vs2019.vcxproj.filters │ │ ├── antlrcpp-ios │ │ ├── Info.plist │ │ └── antlrcpp_ios.h │ │ ├── antlrcpp.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── antlr4.xcscheme │ │ │ ├── antlr4_ios.xcscheme │ │ │ └── antlr4_static.xcscheme │ │ └── src │ │ ├── ANTLRErrorListener.cpp │ │ ├── ANTLRErrorListener.h │ │ ├── ANTLRErrorStrategy.cpp │ │ ├── ANTLRErrorStrategy.h │ │ ├── ANTLRFileStream.cpp │ │ ├── ANTLRFileStream.h │ │ ├── ANTLRInputStream.cpp │ │ ├── ANTLRInputStream.h │ │ ├── BailErrorStrategy.cpp │ │ ├── BailErrorStrategy.h │ │ ├── BaseErrorListener.cpp │ │ ├── BaseErrorListener.h │ │ ├── BufferedTokenStream.cpp │ │ ├── BufferedTokenStream.h │ │ ├── CharStream.cpp │ │ ├── CharStream.h │ │ ├── CommonToken.cpp │ │ ├── CommonToken.h │ │ ├── CommonTokenFactory.cpp │ │ ├── CommonTokenFactory.h │ │ ├── CommonTokenStream.cpp │ │ ├── CommonTokenStream.h │ │ ├── ConsoleErrorListener.cpp │ │ ├── ConsoleErrorListener.h │ │ ├── DefaultErrorStrategy.cpp │ │ ├── DefaultErrorStrategy.h │ │ ├── DiagnosticErrorListener.cpp │ │ ├── DiagnosticErrorListener.h │ │ ├── Exceptions.cpp │ │ ├── Exceptions.h │ │ ├── FailedPredicateException.cpp │ │ ├── FailedPredicateException.h │ │ ├── InputMismatchException.cpp │ │ ├── InputMismatchException.h │ │ ├── IntStream.cpp │ │ ├── IntStream.h │ │ ├── InterpreterRuleContext.cpp │ │ ├── InterpreterRuleContext.h │ │ ├── Lexer.cpp │ │ ├── Lexer.h │ │ ├── LexerInterpreter.cpp │ │ ├── LexerInterpreter.h │ │ ├── LexerNoViableAltException.cpp │ │ ├── LexerNoViableAltException.h │ │ ├── ListTokenSource.cpp │ │ ├── ListTokenSource.h │ │ ├── NoViableAltException.cpp │ │ ├── NoViableAltException.h │ │ ├── Parser.cpp │ │ ├── Parser.h │ │ ├── ParserInterpreter.cpp │ │ ├── ParserInterpreter.h │ │ ├── ParserRuleContext.cpp │ │ ├── ParserRuleContext.h │ │ ├── ProxyErrorListener.cpp │ │ ├── ProxyErrorListener.h │ │ ├── RecognitionException.cpp │ │ ├── RecognitionException.h │ │ ├── Recognizer.cpp │ │ ├── Recognizer.h │ │ ├── RuleContext.cpp │ │ ├── RuleContext.h │ │ ├── RuleContextWithAltNum.cpp │ │ ├── RuleContextWithAltNum.h │ │ ├── RuntimeMetaData.cpp │ │ ├── RuntimeMetaData.h │ │ ├── Token.cpp │ │ ├── Token.h │ │ ├── TokenFactory.h │ │ ├── TokenSource.cpp │ │ ├── TokenSource.h │ │ ├── TokenStream.cpp │ │ ├── TokenStream.h │ │ ├── TokenStreamRewriter.cpp │ │ ├── TokenStreamRewriter.h │ │ ├── UnbufferedCharStream.cpp │ │ ├── UnbufferedCharStream.h │ │ ├── UnbufferedTokenStream.cpp │ │ ├── UnbufferedTokenStream.h │ │ ├── Vocabulary.cpp │ │ ├── Vocabulary.h │ │ ├── WritableToken.cpp │ │ ├── WritableToken.h │ │ ├── antlr4-common.h │ │ ├── antlr4-runtime.h │ │ ├── atn │ │ ├── ATN.cpp │ │ ├── ATN.h │ │ ├── ATNConfig.cpp │ │ ├── ATNConfig.h │ │ ├── ATNConfigSet.cpp │ │ ├── ATNConfigSet.h │ │ ├── ATNDeserializationOptions.cpp │ │ ├── ATNDeserializationOptions.h │ │ ├── ATNDeserializer.cpp │ │ ├── ATNDeserializer.h │ │ ├── ATNSerializer.cpp │ │ ├── ATNSerializer.h │ │ ├── ATNSimulator.cpp │ │ ├── ATNSimulator.h │ │ ├── ATNState.cpp │ │ ├── ATNState.h │ │ ├── ATNType.h │ │ ├── AbstractPredicateTransition.cpp │ │ ├── AbstractPredicateTransition.h │ │ ├── ActionTransition.cpp │ │ ├── ActionTransition.h │ │ ├── AmbiguityInfo.cpp │ │ ├── AmbiguityInfo.h │ │ ├── ArrayPredictionContext.cpp │ │ ├── ArrayPredictionContext.h │ │ ├── AtomTransition.cpp │ │ ├── AtomTransition.h │ │ ├── BasicBlockStartState.cpp │ │ ├── BasicBlockStartState.h │ │ ├── BasicState.cpp │ │ ├── BasicState.h │ │ ├── BlockEndState.cpp │ │ ├── BlockEndState.h │ │ ├── BlockStartState.cpp │ │ ├── BlockStartState.h │ │ ├── ContextSensitivityInfo.cpp │ │ ├── ContextSensitivityInfo.h │ │ ├── DecisionEventInfo.cpp │ │ ├── DecisionEventInfo.h │ │ ├── DecisionInfo.cpp │ │ ├── DecisionInfo.h │ │ ├── DecisionState.cpp │ │ ├── DecisionState.h │ │ ├── EmptyPredictionContext.cpp │ │ ├── EmptyPredictionContext.h │ │ ├── EpsilonTransition.cpp │ │ ├── EpsilonTransition.h │ │ ├── ErrorInfo.cpp │ │ ├── ErrorInfo.h │ │ ├── LL1Analyzer.cpp │ │ ├── LL1Analyzer.h │ │ ├── LexerATNConfig.cpp │ │ ├── LexerATNConfig.h │ │ ├── LexerATNSimulator.cpp │ │ ├── LexerATNSimulator.h │ │ ├── LexerAction.cpp │ │ ├── LexerAction.h │ │ ├── LexerActionExecutor.cpp │ │ ├── LexerActionExecutor.h │ │ ├── LexerActionType.h │ │ ├── LexerChannelAction.cpp │ │ ├── LexerChannelAction.h │ │ ├── LexerCustomAction.cpp │ │ ├── LexerCustomAction.h │ │ ├── LexerIndexedCustomAction.cpp │ │ ├── LexerIndexedCustomAction.h │ │ ├── LexerModeAction.cpp │ │ ├── LexerModeAction.h │ │ ├── LexerMoreAction.cpp │ │ ├── LexerMoreAction.h │ │ ├── LexerPopModeAction.cpp │ │ ├── LexerPopModeAction.h │ │ ├── LexerPushModeAction.cpp │ │ ├── LexerPushModeAction.h │ │ ├── LexerSkipAction.cpp │ │ ├── LexerSkipAction.h │ │ ├── LexerTypeAction.cpp │ │ ├── LexerTypeAction.h │ │ ├── LookaheadEventInfo.cpp │ │ ├── LookaheadEventInfo.h │ │ ├── LoopEndState.cpp │ │ ├── LoopEndState.h │ │ ├── Makefile │ │ ├── NotSetTransition.cpp │ │ ├── NotSetTransition.h │ │ ├── OrderedATNConfigSet.cpp │ │ ├── OrderedATNConfigSet.h │ │ ├── ParseInfo.cpp │ │ ├── ParseInfo.h │ │ ├── ParserATNSimulator.cpp │ │ ├── ParserATNSimulator.h │ │ ├── PlusBlockStartState.cpp │ │ ├── PlusBlockStartState.h │ │ ├── PlusLoopbackState.cpp │ │ ├── PlusLoopbackState.h │ │ ├── PrecedencePredicateTransition.cpp │ │ ├── PrecedencePredicateTransition.h │ │ ├── PredicateEvalInfo.cpp │ │ ├── PredicateEvalInfo.h │ │ ├── PredicateTransition.cpp │ │ ├── PredicateTransition.h │ │ ├── PredictionContext.cpp │ │ ├── PredictionContext.h │ │ ├── PredictionMode.cpp │ │ ├── PredictionMode.h │ │ ├── ProfilingATNSimulator.cpp │ │ ├── ProfilingATNSimulator.h │ │ ├── RangeTransition.cpp │ │ ├── RangeTransition.h │ │ ├── RuleStartState.cpp │ │ ├── RuleStartState.h │ │ ├── RuleStopState.cpp │ │ ├── RuleStopState.h │ │ ├── RuleTransition.cpp │ │ ├── RuleTransition.h │ │ ├── SemanticContext.cpp │ │ ├── SemanticContext.h │ │ ├── SetTransition.cpp │ │ ├── SetTransition.h │ │ ├── SingletonPredictionContext.cpp │ │ ├── SingletonPredictionContext.h │ │ ├── StarBlockStartState.cpp │ │ ├── StarBlockStartState.h │ │ ├── StarLoopEntryState.cpp │ │ ├── StarLoopEntryState.h │ │ ├── StarLoopbackState.cpp │ │ ├── StarLoopbackState.h │ │ ├── TokensStartState.cpp │ │ ├── TokensStartState.h │ │ ├── Transition.cpp │ │ ├── Transition.h │ │ ├── WildcardTransition.cpp │ │ └── WildcardTransition.h │ │ ├── dfa │ │ ├── DFA.cpp │ │ ├── DFA.h │ │ ├── DFASerializer.cpp │ │ ├── DFASerializer.h │ │ ├── DFAState.cpp │ │ ├── DFAState.h │ │ ├── LexerDFASerializer.cpp │ │ └── LexerDFASerializer.h │ │ ├── misc │ │ ├── InterpreterDataReader.cpp │ │ ├── InterpreterDataReader.h │ │ ├── Interval.cpp │ │ ├── Interval.h │ │ ├── IntervalSet.cpp │ │ ├── IntervalSet.h │ │ ├── MurmurHash.cpp │ │ ├── MurmurHash.h │ │ ├── Predicate.cpp │ │ └── Predicate.h │ │ ├── support │ │ ├── Any.cpp │ │ ├── Any.h │ │ ├── Arrays.cpp │ │ ├── Arrays.h │ │ ├── BitSet.h │ │ ├── CPPUtils.cpp │ │ ├── CPPUtils.h │ │ ├── Casts.h │ │ ├── Declarations.h │ │ ├── Guid.cpp │ │ ├── Guid.h │ │ ├── StringUtils.cpp │ │ └── StringUtils.h │ │ └── tree │ │ ├── AbstractParseTreeVisitor.h │ │ ├── ErrorNode.cpp │ │ ├── ErrorNode.h │ │ ├── ErrorNodeImpl.cpp │ │ ├── ErrorNodeImpl.h │ │ ├── IterativeParseTreeWalker.cpp │ │ ├── IterativeParseTreeWalker.h │ │ ├── ParseTree.cpp │ │ ├── ParseTree.h │ │ ├── ParseTreeListener.cpp │ │ ├── ParseTreeListener.h │ │ ├── ParseTreeProperty.h │ │ ├── ParseTreeVisitor.cpp │ │ ├── ParseTreeVisitor.h │ │ ├── ParseTreeWalker.cpp │ │ ├── ParseTreeWalker.h │ │ ├── TerminalNode.cpp │ │ ├── TerminalNode.h │ │ ├── TerminalNodeImpl.cpp │ │ ├── TerminalNodeImpl.h │ │ ├── Trees.cpp │ │ ├── Trees.h │ │ ├── pattern │ │ ├── Chunk.cpp │ │ ├── Chunk.h │ │ ├── ParseTreeMatch.cpp │ │ ├── ParseTreeMatch.h │ │ ├── ParseTreePattern.cpp │ │ ├── ParseTreePattern.h │ │ ├── ParseTreePatternMatcher.cpp │ │ ├── ParseTreePatternMatcher.h │ │ ├── RuleTagToken.cpp │ │ ├── RuleTagToken.h │ │ ├── TagChunk.cpp │ │ ├── TagChunk.h │ │ ├── TextChunk.cpp │ │ ├── TextChunk.h │ │ ├── TokenTagToken.cpp │ │ └── TokenTagToken.h │ │ └── xpath │ │ ├── XPath.cpp │ │ ├── XPath.h │ │ ├── XPathElement.cpp │ │ ├── XPathElement.h │ │ ├── XPathLexer.cpp │ │ ├── XPathLexer.g4 │ │ ├── XPathLexer.h │ │ ├── XPathLexer.tokens │ │ ├── XPathLexerErrorListener.cpp │ │ ├── XPathLexerErrorListener.h │ │ ├── XPathRuleAnywhereElement.cpp │ │ ├── XPathRuleAnywhereElement.h │ │ ├── XPathRuleElement.cpp │ │ ├── XPathRuleElement.h │ │ ├── XPathTokenAnywhereElement.cpp │ │ ├── XPathTokenAnywhereElement.h │ │ ├── XPathTokenElement.cpp │ │ ├── XPathTokenElement.h │ │ ├── XPathWildcardAnywhereElement.cpp │ │ ├── XPathWildcardAnywhereElement.h │ │ ├── XPathWildcardElement.cpp │ │ └── XPathWildcardElement.h │ ├── google_snappy │ ├── AUTHORS │ ├── CMakeLists.txt │ ├── COPYING │ ├── README.md │ ├── cmake │ │ ├── SnappyConfig.cmake.in │ │ └── config.h.in │ ├── snappy-internal.h │ ├── snappy-sinksource.cc │ ├── snappy-sinksource.h │ ├── snappy-stubs-internal.cc │ ├── snappy-stubs-internal.h │ ├── snappy-stubs-public.h.in │ ├── snappy.cc │ └── snappy.h │ ├── lz4 │ ├── CMakeLists.txt │ ├── lz4.c │ └── lz4.h │ ├── lzokay │ ├── CMakeLists.txt │ ├── LICENSE │ ├── lzokay.cpp │ └── lzokay.hpp │ └── zlib-1.2.13 │ ├── CMakeLists.txt │ ├── ChangeLog │ ├── FAQ │ ├── INDEX │ ├── LICENSE │ ├── Makefile │ ├── Makefile.in │ ├── README │ ├── adler32.c │ ├── amiga │ ├── Makefile.pup │ └── Makefile.sas │ ├── compress.c │ ├── configure │ ├── contrib │ ├── README.contrib │ ├── ada │ │ ├── buffer_demo.adb │ │ ├── mtest.adb │ │ ├── read.adb │ │ ├── readme.txt │ │ ├── test.adb │ │ ├── zlib-streams.adb │ │ ├── zlib-streams.ads │ │ ├── zlib-thin.adb │ │ ├── zlib-thin.ads │ │ ├── zlib.adb │ │ ├── zlib.ads │ │ └── zlib.gpr │ ├── blast │ │ ├── Makefile │ │ ├── README │ │ ├── blast.c │ │ ├── blast.h │ │ ├── test.pk │ │ └── test.txt │ ├── delphi │ │ ├── ZLib.pas │ │ ├── ZLibConst.pas │ │ ├── readme.txt │ │ └── zlibd32.mak │ ├── dotzlib │ │ ├── DotZLib.build │ │ ├── DotZLib.chm │ │ ├── DotZLib.sln │ │ ├── DotZLib │ │ │ ├── AssemblyInfo.cs │ │ │ ├── ChecksumImpl.cs │ │ │ ├── CircularBuffer.cs │ │ │ ├── CodecBase.cs │ │ │ ├── Deflater.cs │ │ │ ├── DotZLib.cs │ │ │ ├── DotZLib.csproj │ │ │ ├── GZipStream.cs │ │ │ ├── Inflater.cs │ │ │ └── UnitTests.cs │ │ ├── LICENSE_1_0.txt │ │ └── readme.txt │ ├── gcc_gvmat64 │ │ └── gvmat64.S │ ├── infback9 │ │ ├── README │ │ ├── infback9.c │ │ ├── infback9.h │ │ ├── inffix9.h │ │ ├── inflate9.h │ │ ├── inftree9.c │ │ └── inftree9.h │ ├── iostream │ │ ├── test.cpp │ │ ├── zfstream.cpp │ │ └── zfstream.h │ ├── iostream2 │ │ ├── zstream.h │ │ └── zstream_test.cpp │ ├── iostream3 │ │ ├── README │ │ ├── TODO │ │ ├── test.cc │ │ ├── zfstream.cc │ │ └── zfstream.h │ ├── minizip │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── MiniZip64_Changes.txt │ │ ├── MiniZip64_info.txt │ │ ├── configure.ac │ │ ├── crypt.h │ │ ├── ioapi.c │ │ ├── ioapi.h │ │ ├── iowin32.c │ │ ├── iowin32.h │ │ ├── make_vms.com │ │ ├── miniunz.c │ │ ├── miniunzip.1 │ │ ├── minizip.1 │ │ ├── minizip.c │ │ ├── minizip.pc.in │ │ ├── mztools.c │ │ ├── mztools.h │ │ ├── unzip.c │ │ ├── unzip.h │ │ ├── zip.c │ │ └── zip.h │ ├── pascal │ │ ├── example.pas │ │ ├── readme.txt │ │ ├── zlibd32.mak │ │ └── zlibpas.pas │ ├── puff │ │ ├── Makefile │ │ ├── README │ │ ├── puff.c │ │ ├── puff.h │ │ ├── pufftest.c │ │ └── zeros.raw │ ├── testzlib │ │ ├── testzlib.c │ │ └── testzlib.txt │ ├── untgz │ │ ├── Makefile │ │ ├── Makefile.msc │ │ └── untgz.c │ └── vstudio │ │ ├── readme.txt │ │ ├── vc10 │ │ ├── miniunz.vcxproj │ │ ├── miniunz.vcxproj.filters │ │ ├── minizip.vcxproj │ │ ├── minizip.vcxproj.filters │ │ ├── testzlib.vcxproj │ │ ├── testzlib.vcxproj.filters │ │ ├── testzlibdll.vcxproj │ │ ├── testzlibdll.vcxproj.filters │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibstat.vcxproj.filters │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ ├── zlibvc.vcxproj │ │ └── zlibvc.vcxproj.filters │ │ ├── vc11 │ │ ├── miniunz.vcxproj │ │ ├── minizip.vcxproj │ │ ├── testzlib.vcxproj │ │ ├── testzlibdll.vcxproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcxproj │ │ ├── vc12 │ │ ├── miniunz.vcxproj │ │ ├── minizip.vcxproj │ │ ├── testzlib.vcxproj │ │ ├── testzlibdll.vcxproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcxproj │ │ ├── vc14 │ │ ├── miniunz.vcxproj │ │ ├── minizip.vcxproj │ │ ├── testzlib.vcxproj │ │ ├── testzlibdll.vcxproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcxproj │ │ └── vc9 │ │ ├── miniunz.vcproj │ │ ├── minizip.vcproj │ │ ├── testzlib.vcproj │ │ ├── testzlibdll.vcproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcproj │ ├── crc32.c │ ├── crc32.h │ ├── deflate.c │ ├── deflate.h │ ├── doc │ ├── algorithm.txt │ ├── crc-doc.1.0.pdf │ ├── rfc1950.txt │ ├── rfc1951.txt │ ├── rfc1952.txt │ └── txtvsbin.txt │ ├── examples │ ├── README.examples │ ├── enough.c │ ├── fitblk.c │ ├── gun.c │ ├── gzappend.c │ ├── gzjoin.c │ ├── gzlog.c │ ├── gzlog.h │ ├── gznorm.c │ ├── zlib_how.html │ ├── zpipe.c │ ├── zran.c │ └── zran.h │ ├── gzclose.c │ ├── gzguts.h │ ├── gzlib.c │ ├── gzread.c │ ├── gzwrite.c │ ├── infback.c │ ├── inffast.c │ ├── inffast.h │ ├── inffixed.h │ ├── inflate.c │ ├── inflate.h │ ├── inftrees.c │ ├── inftrees.h │ ├── make_vms.com │ ├── msdos │ ├── Makefile.bor │ ├── Makefile.dj2 │ ├── Makefile.emx │ ├── Makefile.msc │ └── Makefile.tc │ ├── nintendods │ ├── Makefile │ └── README │ ├── old │ ├── Makefile.emx │ ├── Makefile.riscos │ ├── README │ ├── descrip.mms │ ├── os2 │ │ ├── Makefile.os2 │ │ └── zlib.def │ └── visual-basic.txt │ ├── os400 │ ├── README400 │ ├── bndsrc │ ├── make.sh │ └── zlib.inc │ ├── qnx │ └── package.qpg │ ├── test │ ├── example.c │ ├── infcover.c │ └── minigzip.c │ ├── treebuild.xml │ ├── trees.c │ ├── trees.h │ ├── uncompr.c │ ├── watcom │ ├── watcom_f.mak │ └── watcom_l.mak │ ├── win32 │ ├── DLL_FAQ.txt │ ├── Makefile.bor │ ├── Makefile.gcc │ ├── Makefile.msc │ ├── README-WIN32.txt │ ├── VisualC.txt │ ├── zlib.def │ └── zlib1.rc │ ├── zconf.h │ ├── zconf.h.cmakein │ ├── zconf.h.in │ ├── zconf.h.included │ ├── zlib.3 │ ├── zlib.3.pdf │ ├── zlib.h │ ├── zlib.map │ ├── zlib.pc.cmakein │ ├── zlib.pc.in │ ├── zlib2ansi │ ├── zutil.c │ └── zutil.h ├── doap_tsfile.rdf ├── docs ├── .gitignore ├── deploy.cjs ├── deploy_staging.cjs ├── package.json └── src │ ├── .vuepress │ ├── components │ │ ├── PageFooter.vue │ │ └── docsearch │ │ │ ├── client │ │ │ ├── components │ │ │ │ ├── Docsearch.ts │ │ │ │ └── index.ts │ │ │ ├── composables │ │ │ │ ├── index.ts │ │ │ │ └── useDocsearchShim.ts │ │ │ ├── config.js │ │ │ ├── index.ts │ │ │ ├── shims.d.ts │ │ │ └── styles │ │ │ │ └── docsearch.css │ │ │ ├── node │ │ │ ├── docsearchPlugin.ts │ │ │ └── index.ts │ │ │ └── shared │ │ │ ├── index.ts │ │ │ └── types.ts │ ├── config.ts │ ├── navbar │ │ ├── en.ts │ │ ├── index.ts │ │ └── zh.ts │ ├── public │ │ ├── .asf.yaml │ │ ├── bg.svg │ │ ├── favicon.ico │ │ ├── home_icon.svg │ │ ├── logo.svg │ │ └── s.svg │ ├── sidebar │ │ ├── V1.0.x │ │ │ ├── en.ts │ │ │ └── zh.ts │ │ ├── en.ts │ │ ├── index.ts │ │ └── zh.ts │ ├── styles │ │ ├── config.scss │ │ ├── index.scss │ │ └── palette.scss │ └── theme.ts │ ├── Community │ ├── About.md │ └── Feedback.md │ ├── Development │ ├── Community-Project-Committers.md │ └── Powered-By.md │ ├── Download │ └── README.md │ ├── README.md │ ├── UserGuide │ ├── develop │ │ └── QuickStart │ │ │ ├── Data-Model.md │ │ │ ├── Interface-Definitions.md │ │ │ └── QuickStart.md │ └── latest │ │ └── QuickStart │ │ ├── Data-Model.md │ │ ├── Navigating_Time_Series_Data.md │ │ └── QuickStart.md │ ├── stage │ └── QuickStart.md │ └── zh │ ├── Community │ ├── About.md │ └── Feedback.md │ ├── Development │ ├── Community-Project-Committers.md │ └── Powered-By.md │ ├── Download │ └── README.md │ ├── README.md │ ├── UserGuide │ ├── develop │ │ └── QuickStart │ │ │ ├── Data-Model.md │ │ │ ├── Interface-Definitions.md │ │ │ └── QuickStart.md │ └── latest │ │ └── QuickStart │ │ ├── Data-Model.md │ │ ├── Navigating_Time_Series_Data.md │ │ └── QuickStart.md │ └── stage │ └── QuickStart.md ├── java ├── common │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── apache │ │ └── tsfile │ │ ├── annotations │ │ ├── TableModel.java │ │ ├── TreeModel.java │ │ └── TsFileApi.java │ │ ├── block │ │ ├── TsBlockBuilderStatus.java │ │ └── column │ │ │ ├── Column.java │ │ │ ├── ColumnBuilder.java │ │ │ ├── ColumnBuilderStatus.java │ │ │ └── ColumnEncoding.java │ │ ├── enums │ │ ├── ColumnCategory.java │ │ └── TSDataType.java │ │ ├── utils │ │ ├── Accountable.java │ │ ├── Binary.java │ │ ├── BitMap.java │ │ ├── Constants.java │ │ ├── PooledBinary.java │ │ ├── RamUsageEstimator.java │ │ └── TsPrimitiveType.java │ │ └── write │ │ └── UnSupportedDataTypeException.java ├── examples │ ├── pom.xml │ ├── readme.md │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── apache │ │ └── tsfile │ │ ├── Constant.java │ │ ├── DataGenerator.java │ │ ├── TsFileForceAppendWrite.java │ │ ├── TsFileRead.java │ │ ├── TsFileSequenceRead.java │ │ ├── TsFileWriteAlignedWithTSRecord.java │ │ ├── TsFileWriteAlignedWithTablet.java │ │ ├── TsFileWriteWithTSRecord.java │ │ ├── TsFileWriteWithTablet.java │ │ └── v4 │ │ ├── ITsFileReaderAndITsFileWriter.java │ │ └── WriteTabletWithITsFileWriter.java ├── pom.xml ├── tools │ ├── README-zh.md │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── assembly │ │ ├── resources │ │ │ ├── conf │ │ │ │ └── logback-cvs2tsfile.xml │ │ │ └── tools │ │ │ │ ├── csv2tsfile.bat │ │ │ │ └── csv2tsfile.sh │ │ └── tools.xml │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── apache │ │ │ └── tsfile │ │ │ └── tools │ │ │ ├── DateTimeUtils.java │ │ │ ├── SchemaParser.java │ │ │ └── TsFileTool.java │ │ └── test │ │ └── java │ │ └── org │ │ └── apache │ │ └── tsfile │ │ └── tools │ │ └── TsfiletoolsTest.java └── tsfile │ ├── README-zh.md │ ├── README.md │ ├── format-changelist.md │ ├── pom.xml │ └── src │ ├── main │ ├── antlr4 │ │ └── org │ │ │ └── apache │ │ │ └── tsfile │ │ │ └── parser │ │ │ ├── PathLexer.g4 │ │ │ └── PathParser.g4 │ ├── codegen │ │ ├── config.fmpp │ │ ├── dataModel │ │ │ └── AllFilter.tdd │ │ └── templates │ │ │ ├── FilterOperatorsTemplate.ftl │ │ │ └── FilterTemplate.ftl │ └── java │ │ └── org │ │ └── apache │ │ └── tsfile │ │ ├── common │ │ ├── cache │ │ │ ├── Cache.java │ │ │ └── LRUCache.java │ │ ├── conf │ │ │ ├── TSFileConfig.java │ │ │ └── TSFileDescriptor.java │ │ ├── constant │ │ │ ├── JsonFormatConstant.java │ │ │ ├── QueryConstant.java │ │ │ └── TsFileConstant.java │ │ └── regexp │ │ │ ├── DFA.java │ │ │ ├── DenseDfaMatcher.java │ │ │ ├── FjsMatcher.java │ │ │ ├── LikeMatcher.java │ │ │ ├── LikePattern.java │ │ │ ├── Matcher.java │ │ │ ├── NFA.java │ │ │ ├── NfaMatcher.java │ │ │ └── pattern │ │ │ ├── Any.java │ │ │ ├── Literal.java │ │ │ ├── Pattern.java │ │ │ └── ZeroOrMore.java │ │ ├── compatibility │ │ ├── BufferDeserializer.java │ │ ├── CompatibilityUtils.java │ │ ├── DeserializeConfig.java │ │ └── StreamDeserializer.java │ │ ├── compress │ │ ├── ICompressor.java │ │ └── IUnCompressor.java │ │ ├── encoding │ │ ├── bitpacking │ │ │ ├── IntPacker.java │ │ │ └── LongPacker.java │ │ ├── decoder │ │ │ ├── BitmapDecoder.java │ │ │ ├── Decoder.java │ │ │ ├── DeltaBinaryDecoder.java │ │ │ ├── DictionaryDecoder.java │ │ │ ├── DoublePrecisionChimpDecoder.java │ │ │ ├── DoublePrecisionDecoderV1.java │ │ │ ├── DoublePrecisionDecoderV2.java │ │ │ ├── DoubleRLBEDecoder.java │ │ │ ├── DoubleSprintzDecoder.java │ │ │ ├── FloatDecoder.java │ │ │ ├── FloatRLBEDecoder.java │ │ │ ├── FloatSprintzDecoder.java │ │ │ ├── GorillaDecoderV1.java │ │ │ ├── GorillaDecoderV2.java │ │ │ ├── IntChimpDecoder.java │ │ │ ├── IntGorillaDecoder.java │ │ │ ├── IntRLBEDecoder.java │ │ │ ├── IntRleDecoder.java │ │ │ ├── IntSprintzDecoder.java │ │ │ ├── IntZigzagDecoder.java │ │ │ ├── LongChimpDecoder.java │ │ │ ├── LongGorillaDecoder.java │ │ │ ├── LongRLBEDecoder.java │ │ │ ├── LongRleDecoder.java │ │ │ ├── LongSprintzDecoder.java │ │ │ ├── LongZigzagDecoder.java │ │ │ ├── PlainDecoder.java │ │ │ ├── RegularDataDecoder.java │ │ │ ├── RleDecoder.java │ │ │ ├── SinglePrecisionChimpDecoder.java │ │ │ ├── SinglePrecisionDecoderV1.java │ │ │ ├── SinglePrecisionDecoderV2.java │ │ │ └── SprintzDecoder.java │ │ ├── encoder │ │ │ ├── BitmapEncoder.java │ │ │ ├── DeltaBinaryEncoder.java │ │ │ ├── DictionaryEncoder.java │ │ │ ├── DoublePrecisionChimpEncoder.java │ │ │ ├── DoublePrecisionEncoderV1.java │ │ │ ├── DoublePrecisionEncoderV2.java │ │ │ ├── DoubleRLBE.java │ │ │ ├── DoubleSprintzEncoder.java │ │ │ ├── Encoder.java │ │ │ ├── FloatEncoder.java │ │ │ ├── FloatRLBE.java │ │ │ ├── FloatSprintzEncoder.java │ │ │ ├── GorillaEncoderV1.java │ │ │ ├── GorillaEncoderV2.java │ │ │ ├── IntChimpEncoder.java │ │ │ ├── IntGorillaEncoder.java │ │ │ ├── IntRLBE.java │ │ │ ├── IntRleEncoder.java │ │ │ ├── IntSprintzEncoder.java │ │ │ ├── IntZigzagEncoder.java │ │ │ ├── LongChimpEncoder.java │ │ │ ├── LongGorillaEncoder.java │ │ │ ├── LongRLBE.java │ │ │ ├── LongRleEncoder.java │ │ │ ├── LongSprintzEncoder.java │ │ │ ├── LongZigzagEncoder.java │ │ │ ├── PlainEncoder.java │ │ │ ├── RLBE.java │ │ │ ├── RegularDataEncoder.java │ │ │ ├── RleEncoder.java │ │ │ ├── SDTEncoder.java │ │ │ ├── SinglePrecisionChimpEncoder.java │ │ │ ├── SinglePrecisionEncoderV1.java │ │ │ ├── SinglePrecisionEncoderV2.java │ │ │ ├── SprintzEncoder.java │ │ │ └── TSEncodingBuilder.java │ │ └── fire │ │ │ ├── Fire.java │ │ │ ├── IntFire.java │ │ │ └── LongFire.java │ │ ├── encrypt │ │ ├── EncryptParameter.java │ │ ├── EncryptUtils.java │ │ ├── IDecryptor.java │ │ ├── IEncrypt.java │ │ ├── IEncryptor.java │ │ ├── NoDecryptor.java │ │ ├── NoEncryptor.java │ │ └── UNENCRYPTED.java │ │ ├── exception │ │ ├── IllegalDeviceIDException.java │ │ ├── NotCompatibleTsFileException.java │ │ ├── NotImplementedException.java │ │ ├── NullFieldException.java │ │ ├── PathParseException.java │ │ ├── StopReadTsFileByInterruptException.java │ │ ├── TsFileRuntimeException.java │ │ ├── TsFileSequenceReaderTimeseriesMetadataIteratorException.java │ │ ├── TsFileStatisticsMistakesException.java │ │ ├── cache │ │ │ └── CacheException.java │ │ ├── compress │ │ │ ├── CompressionTypeNotSupportedException.java │ │ │ └── GZIPCompressOverflowException.java │ │ ├── encoding │ │ │ ├── TsFileDecodingException.java │ │ │ └── TsFileEncodingException.java │ │ ├── encrypt │ │ │ ├── EncryptException.java │ │ │ └── EncryptKeyLengthNotMatchException.java │ │ ├── filter │ │ │ ├── QueryFilterOptimizationException.java │ │ │ ├── StatisticsClassException.java │ │ │ └── UnSupportFilterDataTypeException.java │ │ ├── read │ │ │ ├── FileVersionTooOldException.java │ │ │ ├── NoColumnException.java │ │ │ ├── ReadProcessException.java │ │ │ └── UnsupportedOrderingException.java │ │ └── write │ │ │ ├── ConflictDataTypeException.java │ │ │ ├── NoDeviceException.java │ │ │ ├── NoMeasurementException.java │ │ │ ├── NoTableException.java │ │ │ ├── PageException.java │ │ │ ├── TsFileNotCompleteException.java │ │ │ ├── UnknownColumnTypeException.java │ │ │ └── WriteProcessException.java │ │ ├── file │ │ ├── IMetadataIndexEntry.java │ │ ├── MetaMarker.java │ │ ├── header │ │ │ ├── ChunkGroupHeader.java │ │ │ ├── ChunkHeader.java │ │ │ └── PageHeader.java │ │ └── metadata │ │ │ ├── AbstractAlignedChunkMetadata.java │ │ │ ├── AbstractAlignedTimeSeriesMetadata.java │ │ │ ├── AlignedChunkMetadata.java │ │ │ ├── AlignedTimeSeriesMetadata.java │ │ │ ├── ChunkGroupMetadata.java │ │ │ ├── ChunkMetadata.java │ │ │ ├── ColumnSchema.java │ │ │ ├── ColumnSchemaBuilder.java │ │ │ ├── DeviceMetadataIndexEntry.java │ │ │ ├── IChunkMetadata.java │ │ │ ├── IDeviceID.java │ │ │ ├── IMetadata.java │ │ │ ├── ITimeSeriesMetadata.java │ │ │ ├── LogicalTableSchema.java │ │ │ ├── MeasurementMetadataIndexEntry.java │ │ │ ├── MetadataIndexConstructor.java │ │ │ ├── MetadataIndexNode.java │ │ │ ├── PlainDeviceID.java │ │ │ ├── StringArrayDeviceID.java │ │ │ ├── TableDeviceChunkMetadata.java │ │ │ ├── TableDeviceTimeSeriesMetadata.java │ │ │ ├── TableSchema.java │ │ │ ├── TimeseriesMetadata.java │ │ │ ├── TsFileMetadata.java │ │ │ ├── enums │ │ │ ├── CompressionType.java │ │ │ ├── EncryptionType.java │ │ │ ├── MetadataIndexNodeType.java │ │ │ └── TSEncoding.java │ │ │ ├── idcolumn │ │ │ ├── FourOrHigherLevelDBExtractor.java │ │ │ ├── ThreeLevelDBExtractor.java │ │ │ └── TwoLevelDBExtractor.java │ │ │ └── statistics │ │ │ ├── BinaryStatistics.java │ │ │ ├── BlobStatistics.java │ │ │ ├── BooleanStatistics.java │ │ │ ├── DateStatistics.java │ │ │ ├── DoubleStatistics.java │ │ │ ├── FloatStatistics.java │ │ │ ├── IntegerStatistics.java │ │ │ ├── LongStatistics.java │ │ │ ├── Statistics.java │ │ │ ├── StringStatistics.java │ │ │ ├── TimeStatistics.java │ │ │ └── TimestampStatistics.java │ │ ├── fileSystem │ │ ├── FSFactoryProducer.java │ │ ├── FSPath.java │ │ ├── FSType.java │ │ ├── fileInputFactory │ │ │ ├── FileInputFactory.java │ │ │ ├── HDFSInputFactory.java │ │ │ ├── HybridFileInputFactory.java │ │ │ ├── LocalFSInputFactory.java │ │ │ └── OSFileInputFactory.java │ │ ├── fileOutputFactory │ │ │ ├── FileOutputFactory.java │ │ │ ├── HDFSOutputFactory.java │ │ │ ├── HybridFileOutputFactory.java │ │ │ ├── LocalFSOutputFactory.java │ │ │ └── OSFileOutputFactory.java │ │ └── fsFactory │ │ │ ├── FSFactory.java │ │ │ ├── HDFSFactory.java │ │ │ ├── HybridFSFactory.java │ │ │ ├── LocalFSFactory.java │ │ │ └── OSFSFactory.java │ │ ├── read │ │ ├── TimeValuePair.java │ │ ├── TsFileAlignedSeriesReaderIterator.java │ │ ├── TsFileCheckStatus.java │ │ ├── TsFileDeviceIterator.java │ │ ├── TsFileReader.java │ │ ├── TsFileRestorableReader.java │ │ ├── TsFileSequenceReader.java │ │ ├── TsFileSequenceReaderTimeseriesMetadataIterator.java │ │ ├── UnClosedTsFileReader.java │ │ ├── common │ │ │ ├── BatchData.java │ │ │ ├── BatchDataFactory.java │ │ │ ├── Chunk.java │ │ │ ├── DescReadBatchData.java │ │ │ ├── DescReadWriteBatchData.java │ │ │ ├── Field.java │ │ │ ├── FullPath.java │ │ │ ├── IBatchDataIterator.java │ │ │ ├── Path.java │ │ │ ├── RowRecord.java │ │ │ ├── SignalBatchData.java │ │ │ ├── TimeRange.java │ │ │ ├── TimeSeries.java │ │ │ ├── block │ │ │ │ ├── TsBlock.java │ │ │ │ ├── TsBlockBuilder.java │ │ │ │ ├── TsBlockUtil.java │ │ │ │ └── column │ │ │ │ │ ├── BinaryArrayColumnEncoder.java │ │ │ │ │ ├── BinaryColumn.java │ │ │ │ │ ├── BinaryColumnBuilder.java │ │ │ │ │ ├── BooleanColumn.java │ │ │ │ │ ├── BooleanColumnBuilder.java │ │ │ │ │ ├── ByteArrayColumnEncoder.java │ │ │ │ │ ├── ColumnEncoder.java │ │ │ │ │ ├── ColumnEncoderFactory.java │ │ │ │ │ ├── ColumnFactory.java │ │ │ │ │ ├── ColumnUtil.java │ │ │ │ │ ├── DictionaryColumn.java │ │ │ │ │ ├── DictionaryColumnEncoder.java │ │ │ │ │ ├── DictionaryId.java │ │ │ │ │ ├── DoubleColumn.java │ │ │ │ │ ├── DoubleColumnBuilder.java │ │ │ │ │ ├── FloatColumn.java │ │ │ │ │ ├── FloatColumnBuilder.java │ │ │ │ │ ├── Int32ArrayColumnEncoder.java │ │ │ │ │ ├── Int64ArrayColumnEncoder.java │ │ │ │ │ ├── IntColumn.java │ │ │ │ │ ├── IntColumnBuilder.java │ │ │ │ │ ├── LongColumn.java │ │ │ │ │ ├── LongColumnBuilder.java │ │ │ │ │ ├── NullColumn.java │ │ │ │ │ ├── RunLengthColumnEncoder.java │ │ │ │ │ ├── RunLengthEncodedColumn.java │ │ │ │ │ ├── TimeColumn.java │ │ │ │ │ ├── TimeColumnBuilder.java │ │ │ │ │ └── TsBlockSerde.java │ │ │ ├── parser │ │ │ │ ├── PathNodesGenerator.java │ │ │ │ ├── PathParseError.java │ │ │ │ └── PathVisitor.java │ │ │ └── type │ │ │ │ ├── AbstractIntType.java │ │ │ │ ├── AbstractLongType.java │ │ │ │ ├── AbstractType.java │ │ │ │ ├── AbstractVarcharType.java │ │ │ │ ├── BinaryType.java │ │ │ │ ├── BlobType.java │ │ │ │ ├── BooleanType.java │ │ │ │ ├── DateType.java │ │ │ │ ├── DoubleType.java │ │ │ │ ├── FloatType.java │ │ │ │ ├── IntType.java │ │ │ │ ├── LongType.java │ │ │ │ ├── RowType.java │ │ │ │ ├── StringType.java │ │ │ │ ├── TimestampType.java │ │ │ │ ├── Type.java │ │ │ │ ├── TypeEnum.java │ │ │ │ ├── TypeFactory.java │ │ │ │ └── UnknownType.java │ │ ├── controller │ │ │ ├── CachedChunkLoaderImpl.java │ │ │ ├── DeviceMetaIterator.java │ │ │ ├── IChunkLoader.java │ │ │ ├── IChunkMetadataLoader.java │ │ │ ├── IMetadataQuerier.java │ │ │ └── MetadataQuerierByFileImpl.java │ │ ├── expression │ │ │ ├── ExpressionTree.java │ │ │ ├── ExpressionType.java │ │ │ ├── IBinaryExpression.java │ │ │ ├── IExpression.java │ │ │ ├── IUnaryExpression.java │ │ │ ├── QueryExpression.java │ │ │ ├── impl │ │ │ │ ├── BinaryExpression.java │ │ │ │ ├── GlobalTimeExpression.java │ │ │ │ └── SingleSeriesExpression.java │ │ │ └── util │ │ │ │ └── ExpressionOptimizer.java │ │ ├── filter │ │ │ ├── PredicateRemoveNotRewriter.java │ │ │ ├── basic │ │ │ │ ├── BinaryLogicalFilter.java │ │ │ │ ├── CompareNullFilter.java │ │ │ │ ├── Filter.java │ │ │ │ ├── OperatorType.java │ │ │ │ ├── TimeFilter.java │ │ │ │ └── ValueFilter.java │ │ │ ├── factory │ │ │ │ ├── FilterFactory.java │ │ │ │ ├── TimeFilterApi.java │ │ │ │ └── ValueFilterApi.java │ │ │ └── operator │ │ │ │ ├── And.java │ │ │ │ ├── GroupByFilter.java │ │ │ │ ├── GroupByMonthFilter.java │ │ │ │ ├── Not.java │ │ │ │ ├── Or.java │ │ │ │ ├── TimeFilterOperators.java │ │ │ │ ├── ValueIsNotNullOperator.java │ │ │ │ └── ValueIsNullOperator.java │ │ ├── query │ │ │ ├── dataset │ │ │ │ ├── AbstractResultSet.java │ │ │ │ ├── DataSetWithTimeGenerator.java │ │ │ │ ├── DataSetWithoutTimeGenerator.java │ │ │ │ ├── QueryDataSet.java │ │ │ │ ├── ResultSet.java │ │ │ │ ├── ResultSetMetadata.java │ │ │ │ ├── ResultSetMetadataImpl.java │ │ │ │ ├── TableResultSet.java │ │ │ │ └── TreeResultSet.java │ │ │ ├── executor │ │ │ │ ├── ExecutorWithTimeGenerator.java │ │ │ │ ├── QueryExecutor.java │ │ │ │ ├── TableQueryExecutor.java │ │ │ │ ├── TsFileExecutor.java │ │ │ │ └── task │ │ │ │ │ ├── DeviceQueryTask.java │ │ │ │ │ └── DeviceTaskIterator.java │ │ │ └── timegenerator │ │ │ │ ├── TimeGenerator.java │ │ │ │ ├── TsFileTimeGenerator.java │ │ │ │ └── node │ │ │ │ ├── AndNode.java │ │ │ │ ├── LeafNode.java │ │ │ │ ├── Node.java │ │ │ │ ├── NodeType.java │ │ │ │ └── OrNode.java │ │ ├── reader │ │ │ ├── IBatchReader.java │ │ │ ├── IChunkReader.java │ │ │ ├── IPageReader.java │ │ │ ├── IPointReader.java │ │ │ ├── LocalTsFileInput.java │ │ │ ├── TsFileInput.java │ │ │ ├── TsFileLastReader.java │ │ │ ├── block │ │ │ │ ├── DeviceOrderedTsBlockReader.java │ │ │ │ ├── SingleDeviceTsBlockReader.java │ │ │ │ └── TsBlockReader.java │ │ │ ├── chunk │ │ │ │ ├── AbstractAlignedChunkReader.java │ │ │ │ ├── AbstractChunkReader.java │ │ │ │ ├── AlignedChunkReader.java │ │ │ │ ├── AlignedChunkReaderWithoutStatistics.java │ │ │ │ ├── ChunkReader.java │ │ │ │ ├── ChunkReaderWithoutStatistics.java │ │ │ │ └── TableChunkReader.java │ │ │ ├── page │ │ │ │ ├── AbstractAlignedPageReader.java │ │ │ │ ├── AlignedPageReader.java │ │ │ │ ├── LazyLoadAlignedPagePointReader.java │ │ │ │ ├── LazyLoadPageData.java │ │ │ │ ├── PageReader.java │ │ │ │ ├── TablePageReader.java │ │ │ │ ├── TimePageReader.java │ │ │ │ └── ValuePageReader.java │ │ │ └── series │ │ │ │ ├── AbstractFileSeriesReader.java │ │ │ │ ├── EmptyFileSeriesReader.java │ │ │ │ ├── FileSeriesReader.java │ │ │ │ ├── FileSeriesReaderByTimestamp.java │ │ │ │ └── PaginationController.java │ │ └── v4 │ │ │ ├── DeviceTableModelReader.java │ │ │ ├── ITsFileReader.java │ │ │ └── TsFileReaderBuilder.java │ │ ├── utils │ │ ├── BloomFilter.java │ │ ├── BytesUtils.java │ │ ├── DateUtils.java │ │ ├── FSUtils.java │ │ ├── FilePathUtils.java │ │ ├── FilterDeserialize.java │ │ ├── Loader.java │ │ ├── MeasurementGroup.java │ │ ├── Murmur128Hash.java │ │ ├── NoSyncBufferedInputStream.java │ │ ├── NoSyncBufferedOutputStream.java │ │ ├── Pair.java │ │ ├── Preconditions.java │ │ ├── PublicBAOS.java │ │ ├── ReadWriteForEncodingUtils.java │ │ ├── ReadWriteIOUtils.java │ │ ├── StringContainer.java │ │ ├── TimeDuration.java │ │ ├── TsFileGeneratorUtils.java │ │ ├── TsFileSketchTool.java │ │ ├── TsFileUtils.java │ │ └── WriteUtils.java │ │ └── write │ │ ├── TsFileWriter.java │ │ ├── chunk │ │ ├── AlignedChunkGroupWriterImpl.java │ │ ├── AlignedChunkWriterImpl.java │ │ ├── ChunkWriterImpl.java │ │ ├── IChunkGroupWriter.java │ │ ├── IChunkWriter.java │ │ ├── NonAlignedChunkGroupWriterImpl.java │ │ ├── TableChunkGroupWriterImpl.java │ │ ├── TimeChunkWriter.java │ │ └── ValueChunkWriter.java │ │ ├── page │ │ ├── PageWriter.java │ │ ├── TimePageWriter.java │ │ └── ValuePageWriter.java │ │ ├── record │ │ ├── TSRecord.java │ │ ├── Tablet.java │ │ └── datapoint │ │ │ ├── BooleanDataPoint.java │ │ │ ├── DataPoint.java │ │ │ ├── DateDataPoint.java │ │ │ ├── DoubleDataPoint.java │ │ │ ├── FloatDataPoint.java │ │ │ ├── IntDataPoint.java │ │ │ ├── LongDataPoint.java │ │ │ └── StringDataPoint.java │ │ ├── schema │ │ ├── IMeasurementSchema.java │ │ ├── MeasurementSchema.java │ │ ├── MeasurementSchemaType.java │ │ ├── Schema.java │ │ ├── TimeseriesSchema.java │ │ └── VectorMeasurementSchema.java │ │ ├── v4 │ │ ├── AbstractTableModelTsFileWriter.java │ │ ├── DeviceTableModelWriter.java │ │ ├── ITsFileWriter.java │ │ └── TsFileWriterBuilder.java │ │ └── writer │ │ ├── FlushChunkMetadataListener.java │ │ ├── ForceAppendTsFileWriter.java │ │ ├── IDataWriter.java │ │ ├── LocalTsFileOutput.java │ │ ├── RestorableTsFileIOWriter.java │ │ ├── TsFileIOWriter.java │ │ ├── TsFileIOWriterEndFileTest.java │ │ ├── TsFileOutput.java │ │ └── tsmiterator │ │ ├── DiskTSMIterator.java │ │ └── TSMIterator.java │ └── test │ ├── java │ └── org │ │ └── apache │ │ └── tsfile │ │ ├── common │ │ ├── LRUCacheTest.java │ │ ├── block │ │ │ ├── BinaryArrayColumnEncoderTest.java │ │ │ ├── ByteArrayColumnEncoderTest.java │ │ │ ├── ColumnEncoderTest.java │ │ │ ├── DictionaryColumnEncodingTest.java │ │ │ ├── Int32ArrayColumnEncoderTest.java │ │ │ ├── Int64ArrayColumnEncoderTest.java │ │ │ ├── NullColumnUnitTest.java │ │ │ ├── RunLengthColumnEncoderTest.java │ │ │ ├── TsBlockSerdeTest.java │ │ │ └── TsBlockTest.java │ │ └── conf │ │ │ └── TSFileDescriptorTest.java │ │ ├── compatibility │ │ └── CompatibilityTest.java │ │ ├── compress │ │ ├── CompressTest.java │ │ ├── GZIPTest.java │ │ ├── LZ4Test.java │ │ ├── LZMA2Test.java │ │ ├── SnappyTest.java │ │ └── ZstdTest.java │ │ ├── constant │ │ └── TestConstant.java │ │ ├── encoding │ │ ├── SDTEncoderTest.java │ │ ├── bitpacking │ │ │ ├── IntPackerTest.java │ │ │ └── LongPackerTest.java │ │ └── decoder │ │ │ ├── BitmapDecoderTest.java │ │ │ ├── ChimpDecoderTest.java │ │ │ ├── DictionaryDecoderTest.java │ │ │ ├── FloatDecoderTest.java │ │ │ ├── GorillaDecoderV1Test.java │ │ │ ├── GorillaDecoderV2Test.java │ │ │ ├── IntRleDecoderTest.java │ │ │ ├── IntZigzagDecoderTest.java │ │ │ ├── LongRleDecoderTest.java │ │ │ ├── LongZigzagDecoderTest.java │ │ │ ├── RLBEDecoderTest.java │ │ │ ├── SprintzDecoderTest.java │ │ │ ├── delta │ │ │ ├── DeltaBinaryEncoderIntegerTest.java │ │ │ └── DeltaBinaryEncoderLongTest.java │ │ │ └── regular │ │ │ ├── RegularDataEncoderIntegerTest.java │ │ │ └── RegularDataEncoderLongTest.java │ │ ├── encrypt │ │ └── EncryptTest.java │ │ ├── exception │ │ └── TsFileExceptionTest.java │ │ ├── file │ │ ├── header │ │ │ └── PageHeaderTest.java │ │ └── metadata │ │ │ ├── ChunkMetadataTest.java │ │ │ ├── IDeviceIDTest.java │ │ │ ├── MetadataIndexNodeTest.java │ │ │ ├── TimeseriesMetadataTest.java │ │ │ ├── TreeDeviceIdColumnValueExtractorTest.java │ │ │ ├── TsFileMetadataTest.java │ │ │ ├── statistics │ │ │ ├── BooleanStatisticsTest.java │ │ │ ├── DoubleStatisticsTest.java │ │ │ ├── FloatStatisticsTest.java │ │ │ ├── IntegerStatisticsTest.java │ │ │ ├── LongStatisticsTest.java │ │ │ ├── StatisticsTest.java │ │ │ └── StringStatisticsTest.java │ │ │ └── utils │ │ │ ├── TestHelper.java │ │ │ └── Utils.java │ │ ├── read │ │ ├── ExpressionTest.java │ │ ├── GetAllDevicesTest.java │ │ ├── MeasurementChunkMetadataListMapIteratorTest.java │ │ ├── ReadInPartitionTest.java │ │ ├── ReadTest.java │ │ ├── TimePlainEncodeReadTest.java │ │ ├── TimeSeriesMetadataReadTest.java │ │ ├── TsFileDeviceIteratorTest.java │ │ ├── TsFileReaderTest.java │ │ ├── TsFileRestorableReaderTest.java │ │ ├── TsFileSequenceReaderTest.java │ │ ├── TsFileSequenceReaderTimeseriesMetadataIteratorTest.java │ │ ├── TsFileV4ReadWriteInterfacesTest.java │ │ ├── UnClosedTsFileReaderTest.java │ │ ├── common │ │ │ ├── BatchDataTest.java │ │ │ ├── ColumnTest.java │ │ │ ├── FieldTest.java │ │ │ ├── PathTest.java │ │ │ └── TimeRangeTest.java │ │ ├── controller │ │ │ ├── ChunkLoaderTest.java │ │ │ └── IMetadataQuerierByFileImplTest.java │ │ ├── filter │ │ │ ├── BinaryOperatorsTest.java │ │ │ ├── BooleanOperatorsTest.java │ │ │ ├── FilterSerializeTest.java │ │ │ ├── FilterTestUtil.java │ │ │ ├── GroupByFilterTest.java │ │ │ ├── GroupByMonthFilterTest.java │ │ │ ├── IExpressionOptimizerTest.java │ │ │ ├── MinTimeMaxTimeFilterTest.java │ │ │ ├── NullOperatorsTest.java │ │ │ ├── NumericalOperatorsTest.java │ │ │ ├── OperatorTest.java │ │ │ ├── PredicateRemoveNotRewriterTest.java │ │ │ ├── StatisticsFilterTest.java │ │ │ └── TsBlockFilterTest.java │ │ ├── query │ │ │ ├── ResultSetTest.java │ │ │ ├── executor │ │ │ │ └── QueryExecutorTest.java │ │ │ └── timegenerator │ │ │ │ ├── NodeTest.java │ │ │ │ ├── ReadWriteTest.java │ │ │ │ ├── ReaderByTimestampTest.java │ │ │ │ ├── TimeGeneratorReadEmptyTest.java │ │ │ │ ├── TimeGeneratorReadWriteTest.java │ │ │ │ ├── TimeGeneratorTest.java │ │ │ │ └── TsFileGeneratorForSeriesReaderByTimestamp.java │ │ └── reader │ │ │ ├── AlignedChunkReaderWithoutStatisticsTest.java │ │ │ ├── AlignedPageReaderPushDownTest.java │ │ │ ├── ChunkReaderTest.java │ │ │ ├── ChunkReaderWithoutStatisticsTest.java │ │ │ ├── FakedBatchReader.java │ │ │ ├── FakedMultiBatchReader.java │ │ │ ├── LazyLoadAlignedPagePointReaderTest.java │ │ │ ├── PageReaderPushDownTest.java │ │ │ ├── PageReaderTest.java │ │ │ ├── ReaderTest.java │ │ │ ├── TsFileLastReaderTest.java │ │ │ ├── TsFileReaderEmptyChunkTest.java │ │ │ └── chunk │ │ │ └── TableChunkReaderTest.java │ │ ├── tableview │ │ ├── PerformanceTest.java │ │ ├── TableSchemaTest.java │ │ └── TableViewTest.java │ │ ├── utils │ │ ├── BitMapTest.java │ │ ├── BloomFilterTest.java │ │ ├── BytesUtilsTest.java │ │ ├── DateUtilsTest.java │ │ ├── FileGenerator.java │ │ ├── FilePathUtilsTest.java │ │ ├── FileUtils.java │ │ ├── FileUtilsTest.java │ │ ├── PairTest.java │ │ ├── ReadWriteForEncodingUtilsTest.java │ │ ├── ReadWriteIOUtilsTest.java │ │ ├── ReadWriteStreamUtilsTest.java │ │ ├── ReadWriteToBytesUtilsTest.java │ │ ├── RecordUtils.java │ │ ├── RecordUtilsTest.java │ │ ├── StringContainerTest.java │ │ ├── TimeDurationTest.java │ │ ├── TsFileGeneratorForTest.java │ │ ├── TsFileUtilsTest.java │ │ ├── TsPrimitiveTypeTest.java │ │ └── TypeCastTest.java │ │ └── write │ │ ├── ChunkRewriteTest.java │ │ ├── DefaultSchemaTemplateTest.java │ │ ├── MetadataIndexConstructorTest.java │ │ ├── PerfTest.java │ │ ├── ReadPageInMemTest.java │ │ ├── SameMeasurementsWithDifferentDataTypesTest.java │ │ ├── TsFileIOWriterTest.java │ │ ├── TsFileIntegrityCheckingTool.java │ │ ├── TsFileReadWriteTest.java │ │ ├── TsFileWriteApiTest.java │ │ ├── TsFileWriterTest.java │ │ ├── WriteTest.java │ │ ├── record │ │ └── TabletTest.java │ │ ├── schema │ │ └── converter │ │ │ └── SchemaBuilderTest.java │ │ └── writer │ │ ├── AlignedChunkWriterImplTest.java │ │ ├── ForceAppendTsFileWriterTest.java │ │ ├── MeasurementSchemaSerializeTest.java │ │ ├── PageWriterTest.java │ │ ├── RestorableTsFileIOWriterTest.java │ │ ├── TestTsFileOutput.java │ │ ├── TimeChunkWriterTest.java │ │ ├── TimePageWriterTest.java │ │ ├── TsFileIOWriterMemoryControlTest.java │ │ ├── ValueChunkWriterTest.java │ │ ├── ValuePageWriterTest.java │ │ └── VectorMeasurementSchemaStub.java │ └── resources │ ├── logback.xml │ └── v3TsFile ├── jenkins.pom ├── mvnw ├── mvnw.cmd ├── pom.xml └── python ├── README-zh.md ├── README.md ├── VersionUpdater.groovy ├── examples └── example.py ├── pom.xml ├── requirements.txt ├── setup.py ├── tests ├── __init__.py ├── test_basic.py ├── test_write.py └── test_write_and_read.py └── tsfile ├── __init__.pxd ├── __init__.py ├── constants.py ├── date_utils.py ├── exceptions.py ├── field.py ├── row_record.py ├── schema.py ├── tablet.py ├── tsfile_cpp.pxd ├── tsfile_py_cpp.pxd ├── tsfile_py_cpp.pyx ├── tsfile_reader.pyx ├── tsfile_table_writer.py └── tsfile_writer.pyx /.gitattributes: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | * text=auto eol=lf 19 | -------------------------------------------------------------------------------- /.github/workflows/greetings.yml: -------------------------------------------------------------------------------- 1 | name: Greetings 2 | 3 | on: [issues, pull_request_target] 4 | 5 | jobs: 6 | greeting: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/first-interaction@v1.3.0 10 | continue-on-error: true 11 | with: 12 | repo-token: ${{ secrets.GITHUB_TOKEN }} 13 | issue-message: 'Hi, this is your first issue in the Apache TsFile project. Thanks for your report. Welcome to join the community!' 14 | pr-message: 'Hi, this is your first pull request in the Apache TsFile project. Thanks for your contribution! TsFile will be better because of you.' 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.mvn/.gradle-enterprise/ 2 | /.mvn/.develocity/ 3 | /.mvn/wrapper/maven-wrapper.jar 4 | **/target/** 5 | /java/tsfile/test.tsfile 6 | 7 | 8 | # intellij IDE files 9 | **/*.iml 10 | **/.idea/ 11 | **/*.log 12 | **/*.ipr 13 | **/*.iws 14 | 15 | .DS_Store 16 | 17 | docs/node_modules/ 18 | docs/src/.vuepress/.cache/ 19 | docs/src/.vuepress/.temp/ 20 | docs/src/.vuepress/dist/ 21 | docs/pnpm-lock.yaml 22 | 23 | # python files 24 | python/build 25 | python/dist 26 | python/__pycache__ 27 | python/tsfile.egg-info 28 | python/tsfile/__pycache__ 29 | python/tsfile/*so* 30 | python/tsfile/*dll* 31 | python/tsfile/*dylib* 32 | python/tsfile/*.h 33 | python/tsfile/*.cpp 34 | python/data 35 | python/venv/* 36 | python/tests/__pycache__/* 37 | python/tests/*.tsfile 38 | python/tsfile/include 39 | 40 | cpp/cmake-build-debug-mingw/ 41 | cpp/third_party/googletest-release-1.12.1.zip 42 | cpp/third_party/zlib-1.2.13/zconf.h 43 | .vscode/ 44 | 45 | build/* 46 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip 19 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache TsFile 2 | Copyright 2023-2025 The Apache Software Foundation. 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | 7 | ============================================================================ 8 | 9 | TsFile project uses 2 Chinese Patents: 10 | * 201711384490X 11 | * 201711319331.1 12 | 13 | According to the Apache 2.0 License. The owner of the patents, Tsinghua University, 14 | grant the users the right to the use of patent under the requirement of Apache 2.0 License. 15 | 16 | ============================================================================ 17 | 18 | Apache Commons Collections 19 | Copyright 2001-2019 The Apache Software Foundation 20 | 21 | This product includes software developed at 22 | The Apache Software Foundation (http://www.apache.org/). 23 | -------------------------------------------------------------------------------- /cpp/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .idea/ 3 | .cproject 4 | .project 5 | .settings/ 6 | .vscode/ 7 | cmake-build-debug/ 8 | cmake*/ -------------------------------------------------------------------------------- /cpp/bench_mark/bench_mark_src/bench_conf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #include 21 | 22 | namespace bench { 23 | int LOOP_NUM = 100000; 24 | int THREAD_NUM = 1; 25 | int TIMESERIES_NUM = 50; 26 | std::vector TYPE_LIST = {0, 0, 1, 0, 1}; 27 | } // namespace bench 28 | -------------------------------------------------------------------------------- /cpp/bench_mark/bench_mark_src/bench_mark.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | -------------------------------------------------------------------------------- /cpp/examples/build.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | build_type=Debug 20 | use_cpp11=1 21 | if [ ${build_type} = "Debug" ] 22 | then 23 | mkdir -p build/Debug 24 | cd build/Debug 25 | else 26 | mkdir -p build/Release 27 | cd build/Release 28 | fi 29 | 30 | 31 | cmake ../../ -DBUILD_TYPE=$build_type 32 | make -------------------------------------------------------------------------------- /cpp/examples/c_examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | 20 | message("Running in examples/c_examples directory") 21 | aux_source_directory(. c_SRC_LIST) 22 | add_library(c_examples_obj OBJECT ${c_SRC_LIST}) 23 | -------------------------------------------------------------------------------- /cpp/examples/cpp_examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | 20 | message("Running in examples/cpp_examples directory") 21 | aux_source_directory(. cpp_SRC_LIST) 22 | add_library(cpp_examples_obj OBJECT ${cpp_SRC_LIST}) 23 | -------------------------------------------------------------------------------- /cpp/examples/test_cpp.tsfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/examples/test_cpp.tsfile -------------------------------------------------------------------------------- /cpp/src/common/allocator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | 20 | message("Running in src/common/allocator directory") 21 | 22 | message("CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}") 23 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 24 | aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} common_allocator_SRC_LIST) 25 | add_library(common_allocator OBJECT ${common_allocator_SRC_LIST}) 26 | 27 | -------------------------------------------------------------------------------- /cpp/src/common/config/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | 20 | 21 | -------------------------------------------------------------------------------- /cpp/src/common/constant/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] -------------------------------------------------------------------------------- /cpp/src/common/container/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | message("Running in src/common/container directory") 20 | 21 | aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} common_container_SRC_LIST) 22 | add_library(common_container OBJECT ${common_container_SRC_LIST}) 23 | -------------------------------------------------------------------------------- /cpp/src/common/mutex/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | 20 | 21 | -------------------------------------------------------------------------------- /cpp/src/common/tsblock/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | message("Running in src/common/tsblock directory") 20 | 21 | aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} common_tsblock_SRC_LIST) 22 | add_library(common_tsblock OBJECT ${common_tsblock_SRC_LIST}) -------------------------------------------------------------------------------- /cpp/src/compress/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | 20 | message("Running in src/storage/tsfile/compress directory") 21 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 22 | aux_source_directory(. compress_SRC_LIST) 23 | add_library(compress_obj OBJECT ${compress_SRC_LIST}) 24 | file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") 25 | copy_to_dir(${HEADERS} "compress_obj") 26 | -------------------------------------------------------------------------------- /cpp/src/compress/compressor.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | -------------------------------------------------------------------------------- /cpp/src/cwrapper/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | message("Running in cwrapper directory") 20 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 21 | aux_source_directory(. CWRAPPER_SRC_LIST) 22 | add_library(cwrapper_obj OBJECT ${CWRAPPER_SRC_LIST}) 23 | 24 | # install header files 25 | file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") 26 | copy_to_dir(${HEADERS} "cwrapper_obj") 27 | -------------------------------------------------------------------------------- /cpp/src/encoding/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | 20 | message("Running in src/encoding directory") 21 | # currently just a place holder for adding dependency of copying headers 22 | add_custom_target( 23 | encoding_obj ALL 24 | ) 25 | file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") 26 | copy_to_dir(${HEADERS} "encoding_obj") -------------------------------------------------------------------------------- /cpp/src/parser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | message("Running in src/parser directory") 20 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 21 | file(GLOB_RECURSE PARSER_SRC_LIST "*.cpp") 22 | add_library(parser_obj OBJECT ${PARSER_SRC_LIST}) 23 | 24 | file(GLOB_RECURSE HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") 25 | copy_to_dir(${HEADERS} "parser_obj") -------------------------------------------------------------------------------- /cpp/src/parser/generated/PathParserBaseListener.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | // Generated from PathParser.g4 by ANTLR 4.9.3 20 | 21 | 22 | #include "PathParserBaseListener.h" 23 | 24 | 25 | -------------------------------------------------------------------------------- /cpp/src/parser/generated/PathParserBaseVisitor.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | // Generated from PathParser.g4 by ANTLR 4.9.3 20 | 21 | 22 | #include "PathParserBaseVisitor.h" 23 | 24 | 25 | -------------------------------------------------------------------------------- /cpp/src/parser/generated/PathParserListener.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | // Generated from PathParser.g4 by ANTLR 4.9.3 20 | 21 | 22 | #include "PathParserListener.h" 23 | 24 | 25 | -------------------------------------------------------------------------------- /cpp/src/parser/generated/PathParserVisitor.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | // Generated from PathParser.g4 by ANTLR 4.9.3 20 | 21 | 22 | #include "PathParserVisitor.h" 23 | 24 | 25 | -------------------------------------------------------------------------------- /cpp/src/parser/path_nodes_generator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | #ifndef PATH_NODES_GENERATOR_H 20 | #define PATH_NODES_GENERATOR_H 21 | 22 | #include 23 | #include 24 | 25 | namespace storage { 26 | class PathNodesGenerator { 27 | public: 28 | static std::vector invokeParser(const std::string& path); 29 | }; 30 | } 31 | 32 | #endif -------------------------------------------------------------------------------- /cpp/src/reader/filter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] -------------------------------------------------------------------------------- /cpp/src/utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | message("Running in src/utils directory") 20 | # currently just a place holder for adding dependency of copying headers 21 | add_custom_target( 22 | utils_obj ALL 23 | ) 24 | # install header files 25 | file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") 26 | copy_to_dir(${HEADERS} "utils_obj") -------------------------------------------------------------------------------- /cpp/test_all.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | -------------------------------------------------------------------------------- /cpp/third_party/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | https://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | ]] 19 | add_subdirectory(antlr4-cpp-runtime-4) 20 | add_subdirectory(google_snappy) 21 | add_subdirectory(lz4) 22 | add_subdirectory(lzokay) 23 | add_subdirectory(zlib-1.2.13) 24 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/VERSION: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/antlr4-cpp-runtime-4/VERSION -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/cmake/antlr4-runtime.cmake.in: -------------------------------------------------------------------------------- 1 | set(ANTLR_VERSION @ANTLR_VERSION@) 2 | 3 | @PACKAGE_INIT@ 4 | 5 | set_and_check(ANTLR4_INCLUDE_DIR "@PACKAGE_ANTLR4_INCLUDE_DIR@") 6 | set_and_check(ANTLR4_LIB_DIR "@PACKAGE_ANTLR4_LIB_DIR@") 7 | 8 | include(${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake) 9 | 10 | check_required_components(antlr) 11 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/demo/Linux/main.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | // 7 | // main.cpp 8 | // antlr4-cpp-demo 9 | // 10 | // Created by Mike Lischke on 13.03.16. 11 | // 12 | 13 | #include 14 | 15 | #include "antlr4-runtime.h" 16 | #include "TLexer.h" 17 | #include "TParser.h" 18 | 19 | using namespace antlrcpptest; 20 | using namespace antlr4; 21 | 22 | int main(int , const char **) { 23 | ANTLRInputStream input(u8"🍴 = 🍐 + \"😎\";(((x * π))) * µ + ∰; a + (x * (y ? 0 : 1) + z);"); 24 | TLexer lexer(&input); 25 | CommonTokenStream tokens(&lexer); 26 | 27 | tokens.fill(); 28 | for (auto token : tokens.getTokens()) { 29 | std::cout << token->toString() << std::endl; 30 | } 31 | 32 | TParser parser(&tokens); 33 | tree::ParseTree* tree = parser.main(); 34 | 35 | std::cout << tree->toStringTree(&parser) << std::endl << std::endl; 36 | 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/demo/Mac/antlr4-cpp-demo/main.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | // 7 | // main.cpp 8 | // antlr4-cpp-demo 9 | // 10 | // Created by Mike Lischke on 13.03.16. 11 | // 12 | 13 | #include 14 | 15 | #include "antlr4-runtime.h" 16 | #include "TLexer.h" 17 | #include "TParser.h" 18 | 19 | using namespace antlrcpptest; 20 | using namespace antlr4; 21 | 22 | int main(int , const char **) { 23 | ANTLRInputStream input(u8"🍴 = 🍐 + \"😎\";(((x * π))) * µ + ∰; a + (x * (y ? 0 : 1) + z);"); 24 | TLexer lexer(&input); 25 | CommonTokenStream tokens(&lexer); 26 | 27 | tokens.fill(); 28 | for (auto token : tokens.getTokens()) { 29 | std::cout << token->toString() << std::endl; 30 | } 31 | 32 | TParser parser(&tokens); 33 | tree::ParseTree *tree = parser.main(); 34 | 35 | std::cout << tree->toStringTree(&parser) << std::endl; 36 | 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/demo/Mac/antlrcpp Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/demo/Mac/antlrcpp-demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/demo/Mac/antlrcpp-demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/demo/README.md: -------------------------------------------------------------------------------- 1 | ## Demo application for the ANTLR 4 C++ target 2 | 3 | This demo app shows how to build the ANTLR runtime both as dynamic and static library and how to use a parser generated from a simple demo grammar. 4 | 5 | A few steps are necessary to get this to work: 6 | 7 | - Download the current ANTLR jar and place it in this folder. 8 | - Open the generation script for your platform (generate.cmd for Windows, generate.sh for *nix/OSX) and update the LOCATION var to the actual name of the jar you downloaded. 9 | - Run the generation script. This will generate a test parser + lexer, along with listener + visitor classes in a subfolder named "generated". This is where the demo application looks for these files. 10 | - Open the project in the folder that matches your system. 11 | - Compile and run. 12 | 13 | Compilation is done as described in the [runtime/cpp/readme.md](../README.md) file. 14 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/demo/generate.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: Created 2016, Mike Lischke (public domain) 3 | 4 | :: This script is used to generate source files from the test grammars in the same folder. The generated files are placed 5 | :: into a subfolder "generated" which the demo project uses to compile a demo binary. 6 | 7 | :: Download the ANLTR jar and place it in the same folder as this script (or adjust the LOCATION var accordingly). 8 | 9 | set LOCATION=antlr-4.9.3-complete.jar 10 | java -jar %LOCATION% -Dlanguage=Cpp -listener -visitor -o generated/ -package antlrcpptest TLexer.g4 TParser.g4 11 | ::java -jar %LOCATION% -Dlanguage=Cpp -listener -visitor -o generated/ -package antlrcpptest -XdbgST TLexer.g4 TParser.g4 12 | ::java -jar %LOCATION% -Dlanguage=Java -listener -visitor -o generated/ -package antlrcpptest TLexer.g4 TParser.g4 13 | 14 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/deploy-source.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Zip it 4 | rm -f antlr4-cpp-runtime-source.zip 5 | zip -r antlr4-cpp-runtime-source.zip "README.md" "cmake" "demo" "runtime" "CMakeLists.txt" "deploy-macos.sh" "deploy-source.sh" "deploy-windows.cmd" "VERSION" \ 6 | -X -x "*.DS_Store*" "antlrcpp.xcodeproj/xcuserdata/*" "*Build*" "*DerivedData*" "*.jar" "demo/generated/*" "*.vscode*" "runtime/build/*" 7 | 8 | # Add the license file from the ANTLR root as well. 9 | pushd ../../ 10 | zip runtime/cpp/antlr4-cpp-runtime-source.zip LICENSE.txt 11 | popd 12 | 13 | # Deploy 14 | #cp antlr4-cpp-runtime-source.zip ~/antlr/sites/website-antlr4/download 15 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/antlrcpp-ios/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/antlrcpp-ios/antlrcpp_ios.h: -------------------------------------------------------------------------------- 1 | // 2 | // antlrcpp-ios.h 3 | // antlrcpp-ios 4 | // 5 | // Created by Mike Lischke on 05.05.16. 6 | // Copyright © 2016 Mike Lischke. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for antlrcpp-ios. 12 | FOUNDATION_EXPORT double antlrcpp_iosVersionNumber; 13 | 14 | //! Project version string for antlrcpp-ios. 15 | FOUNDATION_EXPORT const unsigned char antlrcpp_iosVersionString[]; 16 | 17 | #include "antlr4-runtime.h" 18 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/antlrcpp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/antlrcpp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/ANTLRErrorListener.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "ANTLRErrorListener.h" 7 | 8 | antlr4::ANTLRErrorListener::~ANTLRErrorListener() 9 | { 10 | } 11 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/ANTLRErrorStrategy.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "ANTLRErrorStrategy.h" 7 | 8 | antlr4::ANTLRErrorStrategy::~ANTLRErrorStrategy() 9 | { 10 | } 11 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/ANTLRFileStream.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "support/StringUtils.h" 7 | 8 | #include "ANTLRFileStream.h" 9 | 10 | using namespace antlr4; 11 | 12 | void ANTLRFileStream::loadFromFile(const std::string &fileName) { 13 | _fileName = fileName; 14 | if (_fileName.empty()) { 15 | return; 16 | } 17 | 18 | #ifdef _MSC_VER 19 | std::ifstream stream(antlrcpp::s2ws(fileName), std::ios::binary); 20 | #else 21 | std::ifstream stream(fileName, std::ios::binary); 22 | #endif 23 | 24 | ANTLRInputStream::load(stream); 25 | } 26 | 27 | std::string ANTLRFileStream::getSourceName() const { 28 | return _fileName; 29 | } 30 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/ANTLRFileStream.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "ANTLRInputStream.h" 9 | 10 | namespace antlr4 { 11 | 12 | /// This is an ANTLRInputStream that is loaded from a file all at once 13 | /// when you construct the object (or call load()). 14 | // TODO: this class needs testing. 15 | class ANTLR4CPP_PUBLIC ANTLRFileStream : public ANTLRInputStream { 16 | public: 17 | ANTLRFileStream() = default; 18 | ANTLRFileStream(const std::string &) = delete; 19 | ANTLRFileStream(const char *data, size_t length) = delete; 20 | ANTLRFileStream(std::istream &stream) = delete; 21 | 22 | // Assumes a file name encoded in UTF-8 and file content in the same encoding (with or w/o BOM). 23 | virtual void loadFromFile(const std::string &fileName); 24 | virtual std::string getSourceName() const override; 25 | 26 | private: 27 | std::string _fileName; // UTF-8 encoded file name. 28 | }; 29 | 30 | } // namespace antlr4 31 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/CharStream.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "CharStream.h" 7 | 8 | using namespace antlr4; 9 | 10 | CharStream::~CharStream() { 11 | } 12 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/ConsoleErrorListener.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "ConsoleErrorListener.h" 7 | 8 | using namespace antlr4; 9 | 10 | ConsoleErrorListener ConsoleErrorListener::INSTANCE; 11 | 12 | void ConsoleErrorListener::syntaxError(Recognizer * /*recognizer*/, Token * /*offendingSymbol*/, 13 | size_t line, size_t charPositionInLine, const std::string &msg, std::exception_ptr /*e*/) { 14 | std::cerr << "line " << line << ":" << charPositionInLine << " " << msg << std::endl; 15 | } 16 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/InputMismatchException.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "Parser.h" 7 | 8 | #include "InputMismatchException.h" 9 | 10 | using namespace antlr4; 11 | 12 | InputMismatchException::InputMismatchException(Parser *recognizer) 13 | : RecognitionException(recognizer, recognizer->getInputStream(), recognizer->getContext(), 14 | recognizer->getCurrentToken()) { 15 | } 16 | 17 | InputMismatchException::~InputMismatchException() { 18 | } 19 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/InputMismatchException.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "RecognitionException.h" 9 | 10 | namespace antlr4 { 11 | 12 | /// 13 | /// This signifies any kind of mismatched input exceptions such as 14 | /// when the current input does not match the expected token. 15 | /// 16 | class ANTLR4CPP_PUBLIC InputMismatchException : public RecognitionException { 17 | public: 18 | InputMismatchException(Parser *recognizer); 19 | InputMismatchException(InputMismatchException const&) = default; 20 | ~InputMismatchException(); 21 | InputMismatchException& operator=(InputMismatchException const&) = default; 22 | }; 23 | 24 | } // namespace antlr4 25 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/IntStream.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "IntStream.h" 7 | 8 | using namespace antlr4; 9 | 10 | const std::string IntStream::UNKNOWN_SOURCE_NAME = ""; 11 | 12 | IntStream::~IntStream() = default; 13 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/InterpreterRuleContext.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "InterpreterRuleContext.h" 7 | 8 | using namespace antlr4; 9 | 10 | InterpreterRuleContext::InterpreterRuleContext() : ParserRuleContext() { 11 | } 12 | 13 | InterpreterRuleContext::InterpreterRuleContext(ParserRuleContext *parent, size_t invokingStateNumber, size_t ruleIndex) 14 | : ParserRuleContext(parent, invokingStateNumber), _ruleIndex(ruleIndex) { 15 | } 16 | 17 | size_t InterpreterRuleContext::getRuleIndex() const { 18 | return _ruleIndex; 19 | } 20 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/LexerNoViableAltException.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "RecognitionException.h" 9 | #include "atn/ATNConfigSet.h" 10 | 11 | namespace antlr4 { 12 | 13 | class ANTLR4CPP_PUBLIC LexerNoViableAltException : public RecognitionException { 14 | public: 15 | LexerNoViableAltException(Lexer *lexer, CharStream *input, size_t startIndex, 16 | atn::ATNConfigSet *deadEndConfigs); 17 | 18 | virtual size_t getStartIndex(); 19 | virtual atn::ATNConfigSet* getDeadEndConfigs(); 20 | virtual std::string toString(); 21 | 22 | private: 23 | /// Matching attempted at what input index? 24 | const size_t _startIndex; 25 | 26 | /// Which configurations did we try at input.index() that couldn't match input.LA(1)? 27 | atn::ATNConfigSet *_deadEndConfigs; 28 | 29 | }; 30 | 31 | } // namespace antlr4 32 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/RuleContextWithAltNum.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/ATN.h" 7 | 8 | #include "RuleContextWithAltNum.h" 9 | 10 | using namespace antlr4; 11 | using namespace antlr4::atn; 12 | 13 | RuleContextWithAltNum::RuleContextWithAltNum() : ParserRuleContext() { 14 | altNum = ATN::INVALID_ALT_NUMBER; 15 | } 16 | 17 | RuleContextWithAltNum::RuleContextWithAltNum(ParserRuleContext *parent, int invokingStateNumber) 18 | : ParserRuleContext(parent, invokingStateNumber) { 19 | } 20 | 21 | size_t RuleContextWithAltNum::getAltNumber() const { 22 | return altNum; 23 | } 24 | 25 | void RuleContextWithAltNum::setAltNumber(size_t number) { 26 | altNum = number; 27 | } 28 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/RuleContextWithAltNum.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "ParserRuleContext.h" 9 | 10 | namespace antlr4 { 11 | 12 | /// A handy class for use with 13 | /// 14 | /// options {contextSuperClass=org.antlr.v4.runtime.RuleContextWithAltNum;} 15 | /// 16 | /// that provides a backing field / impl for the outer alternative number 17 | /// matched for an internal parse tree node. 18 | /// 19 | /// I'm only putting into Java runtime as I'm certain I'm the only one that 20 | /// will really every use this. 21 | class ANTLR4CPP_PUBLIC RuleContextWithAltNum : public ParserRuleContext { 22 | public: 23 | size_t altNum = 0; 24 | 25 | RuleContextWithAltNum(); 26 | RuleContextWithAltNum(ParserRuleContext *parent, int invokingStateNumber); 27 | 28 | virtual size_t getAltNumber() const override; 29 | virtual void setAltNumber(size_t altNum) override; 30 | }; 31 | 32 | } // namespace antlr4 33 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/Token.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "Token.h" 7 | 8 | antlr4::Token::~Token() { 9 | } 10 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/TokenSource.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "TokenSource.h" 7 | 8 | antlr4::TokenSource::~TokenSource() { 9 | } 10 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/TokenStream.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "TokenStream.h" 7 | 8 | using namespace antlr4; 9 | 10 | TokenStream::~TokenStream() { 11 | } 12 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/WritableToken.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "WritableToken.h" 7 | 8 | antlr4::WritableToken::~WritableToken() { 9 | } 10 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/WritableToken.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "Token.h" 9 | 10 | namespace antlr4 { 11 | 12 | class ANTLR4CPP_PUBLIC WritableToken : public Token { 13 | public: 14 | virtual ~WritableToken(); 15 | virtual void setText(const std::string &text) = 0; 16 | virtual void setType(size_t ttype) = 0; 17 | virtual void setLine(size_t line) = 0; 18 | virtual void setCharPositionInLine(size_t pos) = 0; 19 | virtual void setChannel(size_t channel) = 0; 20 | virtual void setTokenIndex(size_t index) = 0; 21 | }; 22 | 23 | } // namespace antlr4 24 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/ATNType.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "antlr4-common.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | /// Represents the type of recognizer an ATN applies to. 14 | enum class ATNType { 15 | LEXER = 0, 16 | PARSER = 1, 17 | }; 18 | 19 | } // namespace atn 20 | } // namespace antlr4 21 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/AbstractPredicateTransition.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/AbstractPredicateTransition.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | AbstractPredicateTransition::AbstractPredicateTransition(ATNState *target) : Transition(target) { 11 | } 12 | 13 | AbstractPredicateTransition::~AbstractPredicateTransition() { 14 | } 15 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/AbstractPredicateTransition.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/Transition.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | class ANTState; 14 | 15 | class ANTLR4CPP_PUBLIC AbstractPredicateTransition : public Transition { 16 | 17 | public: 18 | AbstractPredicateTransition(ATNState *target); 19 | ~AbstractPredicateTransition(); 20 | 21 | }; 22 | 23 | } // namespace atn 24 | } // namespace antlr4 25 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/ActionTransition.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/Transition.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | class ANTLR4CPP_PUBLIC ActionTransition final : public Transition { 14 | public: 15 | const size_t ruleIndex; 16 | const size_t actionIndex; 17 | const bool isCtxDependent; // e.g., $i ref in action 18 | 19 | ActionTransition(ATNState *target, size_t ruleIndex); 20 | 21 | ActionTransition(ATNState *target, size_t ruleIndex, size_t actionIndex, bool isCtxDependent); 22 | 23 | virtual SerializationType getSerializationType() const override; 24 | 25 | virtual bool isEpsilon() const override; 26 | 27 | virtual bool matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const override; 28 | 29 | virtual std::string toString() const override; 30 | }; 31 | 32 | } // namespace atn 33 | } // namespace antlr4 34 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/AmbiguityInfo.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/AmbiguityInfo.h" 7 | 8 | using namespace antlr4; 9 | using namespace antlr4::atn; 10 | 11 | AmbiguityInfo::AmbiguityInfo(size_t decision, ATNConfigSet *configs, const antlrcpp::BitSet &ambigAlts, 12 | TokenStream *input, size_t startIndex, size_t stopIndex, bool fullCtx) 13 | : DecisionEventInfo(decision, configs, input, startIndex, stopIndex, fullCtx) { 14 | 15 | this->ambigAlts = ambigAlts; 16 | } 17 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/AtomTransition.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "misc/IntervalSet.h" 7 | #include "atn/Transition.h" 8 | 9 | #include "atn/AtomTransition.h" 10 | 11 | using namespace antlr4::misc; 12 | using namespace antlr4::atn; 13 | 14 | AtomTransition::AtomTransition(ATNState *target, size_t label) : Transition(target), _label(label) { 15 | } 16 | 17 | Transition::SerializationType AtomTransition::getSerializationType() const { 18 | return ATOM; 19 | } 20 | 21 | IntervalSet AtomTransition::label() const { 22 | return IntervalSet::of((int)_label); 23 | } 24 | 25 | bool AtomTransition::matches(size_t symbol, size_t /*minVocabSymbol*/, size_t /*maxVocabSymbol*/) const { 26 | return _label == symbol; 27 | } 28 | 29 | std::string AtomTransition::toString() const { 30 | return "ATOM " + Transition::toString() + " { label: " + std::to_string(_label) + " }"; 31 | } 32 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/AtomTransition.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/Transition.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | /// TODO: make all transitions sets? no, should remove set edges. 14 | class ANTLR4CPP_PUBLIC AtomTransition final : public Transition { 15 | public: 16 | /// The token type or character value; or, signifies special label. 17 | const size_t _label; 18 | 19 | AtomTransition(ATNState *target, size_t label); 20 | 21 | virtual SerializationType getSerializationType() const override; 22 | 23 | virtual misc::IntervalSet label() const override; 24 | virtual bool matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const override; 25 | 26 | virtual std::string toString() const override; 27 | }; 28 | 29 | } // namespace atn 30 | } // namespace antlr4 31 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/BasicBlockStartState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/BasicBlockStartState.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | size_t BasicBlockStartState::getStateType() { 11 | return BLOCK_START; 12 | } 13 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/BasicBlockStartState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "antlr4-common.h" 9 | #include "atn/BlockStartState.h" 10 | 11 | namespace antlr4 { 12 | namespace atn { 13 | 14 | class ANTLR4CPP_PUBLIC BasicBlockStartState final : public BlockStartState { 15 | 16 | public: 17 | virtual size_t getStateType() override; 18 | 19 | }; 20 | 21 | } // namespace atn 22 | } // namespace antlr4 23 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/BasicState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/BasicState.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | size_t BasicState::getStateType() { 11 | return BASIC; 12 | } 13 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/BasicState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/ATNState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | class ANTLR4CPP_PUBLIC BasicState final : public ATNState { 14 | 15 | public: 16 | virtual size_t getStateType() override; 17 | 18 | }; 19 | 20 | } // namespace atn 21 | } // namespace antlr4 22 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/BlockEndState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/BlockEndState.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | BlockEndState::BlockEndState() : startState(nullptr) { 11 | } 12 | 13 | size_t BlockEndState::getStateType() { 14 | return BLOCK_END; 15 | } 16 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/BlockEndState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/ATNState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | /// Terminal node of a simple {@code (a|b|c)} block. 14 | class ANTLR4CPP_PUBLIC BlockEndState final : public ATNState { 15 | public: 16 | BlockStartState *startState = nullptr; 17 | 18 | BlockEndState(); 19 | 20 | virtual size_t getStateType() override; 21 | }; 22 | 23 | } // namespace atn 24 | } // namespace antlr4 25 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/BlockStartState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "BlockStartState.h" 7 | 8 | antlr4::atn::BlockStartState::~BlockStartState() { 9 | } 10 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/BlockStartState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/DecisionState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | /// The start of a regular {@code (...)} block. 14 | class ANTLR4CPP_PUBLIC BlockStartState : public DecisionState { 15 | public: 16 | ~BlockStartState(); 17 | BlockEndState *endState = nullptr; 18 | }; 19 | 20 | } // namespace atn 21 | } // namespace antlr4 22 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/ContextSensitivityInfo.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/ContextSensitivityInfo.h" 7 | 8 | using namespace antlr4; 9 | using namespace antlr4::atn; 10 | 11 | ContextSensitivityInfo::ContextSensitivityInfo(size_t decision, ATNConfigSet *configs, TokenStream *input, 12 | size_t startIndex, size_t stopIndex) 13 | : DecisionEventInfo(decision, configs, input, startIndex, stopIndex, true) { 14 | } 15 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/DecisionEventInfo.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/DecisionEventInfo.h" 7 | 8 | using namespace antlr4; 9 | using namespace antlr4::atn; 10 | 11 | DecisionEventInfo::DecisionEventInfo(size_t decision, ATNConfigSet *configs, TokenStream *input, size_t startIndex, 12 | size_t stopIndex, bool fullCtx) 13 | : decision(decision), configs(configs), input(input), startIndex(startIndex), stopIndex(stopIndex), fullCtx(fullCtx) { 14 | } 15 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/DecisionInfo.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/ErrorInfo.h" 7 | #include "atn/LookaheadEventInfo.h" 8 | 9 | #include "atn/DecisionInfo.h" 10 | 11 | using namespace antlr4::atn; 12 | 13 | DecisionInfo::DecisionInfo(size_t decision) : decision(decision) { 14 | } 15 | 16 | std::string DecisionInfo::toString() const { 17 | std::stringstream ss; 18 | 19 | ss << "{decision=" << decision << ", contextSensitivities=" << contextSensitivities.size() << ", errors="; 20 | ss << errors.size() << ", ambiguities=" << ambiguities.size() << ", SLL_lookahead=" << SLL_TotalLook; 21 | ss << ", SLL_ATNTransitions=" << SLL_ATNTransitions << ", SLL_DFATransitions=" << SLL_DFATransitions; 22 | ss << ", LL_Fallback=" << LL_Fallback << ", LL_lookahead=" << LL_TotalLook << ", LL_ATNTransitions=" << LL_ATNTransitions << '}'; 23 | 24 | return ss.str(); 25 | } 26 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/DecisionState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/DecisionState.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | void DecisionState::InitializeInstanceFields() { 11 | decision = -1; 12 | nonGreedy = false; 13 | } 14 | 15 | std::string DecisionState::toString() const { 16 | return "DECISION " + ATNState::toString(); 17 | } 18 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/DecisionState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/ATNState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | class ANTLR4CPP_PUBLIC DecisionState : public ATNState { 14 | public: 15 | int decision; 16 | bool nonGreedy; 17 | 18 | private: 19 | void InitializeInstanceFields(); 20 | 21 | public: 22 | DecisionState() { 23 | InitializeInstanceFields(); 24 | } 25 | 26 | virtual std::string toString() const override; 27 | }; 28 | 29 | } // namespace atn 30 | } // namespace antlr4 31 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/EmptyPredictionContext.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/EmptyPredictionContext.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | EmptyPredictionContext::EmptyPredictionContext() : SingletonPredictionContext(nullptr, EMPTY_RETURN_STATE) { 11 | } 12 | 13 | bool EmptyPredictionContext::isEmpty() const { 14 | return true; 15 | } 16 | 17 | size_t EmptyPredictionContext::size() const { 18 | return 1; 19 | } 20 | 21 | Ref EmptyPredictionContext::getParent(size_t /*index*/) const { 22 | return nullptr; 23 | } 24 | 25 | size_t EmptyPredictionContext::getReturnState(size_t /*index*/) const { 26 | return returnState; 27 | } 28 | 29 | bool EmptyPredictionContext::operator == (const PredictionContext &o) const { 30 | return this == &o; 31 | } 32 | 33 | std::string EmptyPredictionContext::toString() const { 34 | return "$"; 35 | } 36 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/EmptyPredictionContext.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/SingletonPredictionContext.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | class ANTLR4CPP_PUBLIC EmptyPredictionContext : public SingletonPredictionContext { 14 | public: 15 | EmptyPredictionContext(); 16 | 17 | virtual bool isEmpty() const override; 18 | virtual size_t size() const override; 19 | virtual Ref getParent(size_t index) const override; 20 | virtual size_t getReturnState(size_t index) const override; 21 | virtual std::string toString() const override; 22 | 23 | virtual bool operator == (const PredictionContext &o) const override; 24 | }; 25 | 26 | } // namespace atn 27 | } // namespace antlr4 28 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/ErrorInfo.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/ATNConfigSet.h" 7 | 8 | #include "atn/ErrorInfo.h" 9 | 10 | using namespace antlr4; 11 | using namespace antlr4::atn; 12 | 13 | ErrorInfo::ErrorInfo(size_t decision, ATNConfigSet *configs, TokenStream *input, size_t startIndex, size_t stopIndex, bool fullCtx) 14 | : DecisionEventInfo(decision, configs, input, startIndex, stopIndex, fullCtx) { 15 | } 16 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/LexerAction.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "LexerAction.h" 7 | 8 | antlr4::atn::LexerAction::~LexerAction() { 9 | } 10 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/LookaheadEventInfo.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/LookaheadEventInfo.h" 7 | 8 | using namespace antlr4; 9 | using namespace antlr4::atn; 10 | 11 | LookaheadEventInfo::LookaheadEventInfo(size_t decision, ATNConfigSet *configs, size_t predictedAlt, 12 | TokenStream *input, size_t startIndex, size_t stopIndex, bool fullCtx) 13 | : DecisionEventInfo(decision, configs, input, startIndex, stopIndex, fullCtx) { 14 | 15 | this->predictedAlt = predictedAlt; 16 | } 17 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/LoopEndState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/LoopEndState.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | size_t LoopEndState::getStateType() { 11 | return LOOP_END; 12 | } 13 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/LoopEndState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/ATNState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | /// Mark the end of a * or + loop. 14 | class ANTLR4CPP_PUBLIC LoopEndState final : public ATNState { 15 | public: 16 | ATNState *loopBackState = nullptr; 17 | 18 | virtual size_t getStateType() override; 19 | }; 20 | 21 | } // namespace atn 22 | } // namespace antlr4 23 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/NotSetTransition.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/NotSetTransition.h" 7 | #include "atn/ATNState.h" 8 | #include "misc/IntervalSet.h" 9 | 10 | using namespace antlr4; 11 | using namespace antlr4::atn; 12 | 13 | NotSetTransition::NotSetTransition(ATNState *target, const misc::IntervalSet &set) : SetTransition(target, set) { 14 | } 15 | 16 | Transition::SerializationType NotSetTransition::getSerializationType() const { 17 | return NOT_SET; 18 | } 19 | 20 | bool NotSetTransition::matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const { 21 | return symbol >= minVocabSymbol && symbol <= maxVocabSymbol 22 | && !SetTransition::matches(symbol, minVocabSymbol, maxVocabSymbol); 23 | } 24 | 25 | std::string NotSetTransition::toString() const { 26 | return "NOT_SET " + Transition::toString() + " { " + SetTransition::toString() + " }"; 27 | } 28 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/NotSetTransition.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/SetTransition.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | class ANTLR4CPP_PUBLIC NotSetTransition final : public SetTransition { 14 | public: 15 | NotSetTransition(ATNState *target, const misc::IntervalSet &set); 16 | 17 | virtual SerializationType getSerializationType() const override; 18 | 19 | virtual bool matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const override; 20 | 21 | virtual std::string toString() const override; 22 | }; 23 | 24 | } // namespace atn 25 | } // namespace antlr4 26 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/OrderedATNConfigSet.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/OrderedATNConfigSet.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | size_t OrderedATNConfigSet::getHash(ATNConfig *c) { 11 | return c->hashCode(); 12 | } 13 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/OrderedATNConfigSet.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/ATNConfigSet.h" 9 | #include "atn/ATNConfig.h" 10 | 11 | namespace antlr4 { 12 | namespace atn { 13 | 14 | class ANTLR4CPP_PUBLIC OrderedATNConfigSet : public ATNConfigSet { 15 | protected: 16 | virtual size_t getHash(ATNConfig *c) override; 17 | }; 18 | 19 | } // namespace atn 20 | } // namespace antlr4 21 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/PlusBlockStartState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/PlusBlockStartState.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | size_t PlusBlockStartState::getStateType() { 11 | return PLUS_BLOCK_START; 12 | } 13 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/PlusBlockStartState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/BlockStartState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | /// Start of {@code (A|B|...)+} loop. Technically a decision state, but 14 | /// we don't use for code generation; somebody might need it, so I'm defining 15 | /// it for completeness. In reality, the node is the 16 | /// real decision-making note for {@code A+}. 17 | class ANTLR4CPP_PUBLIC PlusBlockStartState final : public BlockStartState { 18 | public: 19 | PlusLoopbackState *loopBackState = nullptr; 20 | 21 | virtual size_t getStateType() override; 22 | }; 23 | 24 | } // namespace atn 25 | } // namespace antlr4 26 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/PlusLoopbackState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/PlusLoopbackState.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | size_t PlusLoopbackState::getStateType() { 11 | return PLUS_LOOP_BACK; 12 | } 13 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/PlusLoopbackState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/DecisionState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | /// Decision state for {@code A+} and {@code (A|B)+}. It has two transitions: 14 | /// one to the loop back to start of the block and one to exit. 15 | class ANTLR4CPP_PUBLIC PlusLoopbackState final : public DecisionState { 16 | 17 | public: 18 | virtual size_t getStateType() override; 19 | }; 20 | 21 | } // namespace atn 22 | } // namespace antlr4 23 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/PrecedencePredicateTransition.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/AbstractPredicateTransition.h" 9 | #include "SemanticContext.h" 10 | 11 | namespace antlr4 { 12 | namespace atn { 13 | 14 | class ANTLR4CPP_PUBLIC PrecedencePredicateTransition final : public AbstractPredicateTransition { 15 | public: 16 | const int precedence; 17 | 18 | PrecedencePredicateTransition(ATNState *target, int precedence); 19 | 20 | virtual SerializationType getSerializationType() const override; 21 | virtual bool isEpsilon() const override; 22 | virtual bool matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const override; 23 | Ref getPredicate() const; 24 | virtual std::string toString() const override; 25 | 26 | }; 27 | 28 | } // namespace atn 29 | } // namespace antlr4 30 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/PredicateEvalInfo.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "SemanticContext.h" 7 | 8 | #include "atn/PredicateEvalInfo.h" 9 | 10 | using namespace antlr4; 11 | using namespace antlr4::atn; 12 | 13 | PredicateEvalInfo::PredicateEvalInfo(size_t decision, TokenStream *input, size_t startIndex, size_t stopIndex, 14 | Ref const& semctx, bool evalResult, size_t predictedAlt, bool fullCtx) 15 | : DecisionEventInfo(decision, nullptr, input, startIndex, stopIndex, fullCtx), 16 | semctx(semctx), predictedAlt(predictedAlt), evalResult(evalResult) { 17 | } 18 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/RangeTransition.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "misc/IntervalSet.h" 7 | 8 | #include "atn/RangeTransition.h" 9 | 10 | using namespace antlr4; 11 | using namespace antlr4::atn; 12 | 13 | RangeTransition::RangeTransition(ATNState *target, size_t from, size_t to) : Transition(target), from(from), to(to) { 14 | } 15 | 16 | Transition::SerializationType RangeTransition::getSerializationType() const { 17 | return RANGE; 18 | } 19 | 20 | misc::IntervalSet RangeTransition::label() const { 21 | return misc::IntervalSet::of((int)from, (int)to); 22 | } 23 | 24 | bool RangeTransition::matches(size_t symbol, size_t /*minVocabSymbol*/, size_t /*maxVocabSymbol*/) const { 25 | return symbol >= from && symbol <= to; 26 | } 27 | 28 | std::string RangeTransition::toString() const { 29 | return "RANGE " + Transition::toString() + " { from: " + std::to_string(from) + ", to: " + std::to_string(to) + " }"; 30 | } 31 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/RangeTransition.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/Transition.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | class ANTLR4CPP_PUBLIC RangeTransition final : public Transition { 14 | public: 15 | const size_t from; 16 | const size_t to; 17 | 18 | RangeTransition(ATNState *target, size_t from, size_t to); 19 | 20 | virtual SerializationType getSerializationType() const override; 21 | 22 | virtual misc::IntervalSet label() const override; 23 | virtual bool matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const override; 24 | 25 | virtual std::string toString() const override; 26 | }; 27 | 28 | } // namespace atn 29 | } // namespace antlr4 30 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/RuleStartState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/RuleStartState.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | RuleStartState::RuleStartState() { 11 | isLeftRecursiveRule = false; 12 | } 13 | 14 | size_t RuleStartState::getStateType() { 15 | return RULE_START; 16 | } 17 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/RuleStartState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/ATNState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | class ANTLR4CPP_PUBLIC RuleStartState final : public ATNState { 14 | public: 15 | RuleStartState(); 16 | 17 | RuleStopState *stopState = nullptr; 18 | bool isLeftRecursiveRule = false; 19 | 20 | virtual size_t getStateType() override; 21 | 22 | }; 23 | 24 | } // namespace atn 25 | } // namespace antlr4 26 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/RuleStopState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/RuleStopState.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | size_t RuleStopState::getStateType() { 11 | return RULE_STOP; 12 | } 13 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/RuleStopState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/ATNState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | /// The last node in the ATN for a rule, unless that rule is the start symbol. 14 | /// In that case, there is one transition to EOF. Later, we might encode 15 | /// references to all calls to this rule to compute FOLLOW sets for 16 | /// error handling. 17 | class ANTLR4CPP_PUBLIC RuleStopState final : public ATNState { 18 | 19 | public: 20 | virtual size_t getStateType() override; 21 | 22 | }; 23 | 24 | } // namespace atn 25 | } // namespace antlr4 26 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/SetTransition.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "Token.h" 7 | #include "misc/IntervalSet.h" 8 | 9 | #include "atn/SetTransition.h" 10 | 11 | using namespace antlr4; 12 | using namespace antlr4::atn; 13 | 14 | SetTransition::SetTransition(ATNState *target, const misc::IntervalSet &aSet) 15 | : Transition(target), set(aSet.isEmpty() ? misc::IntervalSet::of(Token::INVALID_TYPE) : aSet) { 16 | } 17 | 18 | Transition::SerializationType SetTransition::getSerializationType() const { 19 | return SET; 20 | } 21 | 22 | misc::IntervalSet SetTransition::label() const { 23 | return set; 24 | } 25 | 26 | bool SetTransition::matches(size_t symbol, size_t /*minVocabSymbol*/, size_t /*maxVocabSymbol*/) const { 27 | return set.contains(symbol); 28 | } 29 | 30 | std::string SetTransition::toString() const { 31 | return "SET " + Transition::toString() + " { set: " + set.toString() + "}"; 32 | } 33 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/SetTransition.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/Transition.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | /// 14 | /// A transition containing a set of values. 15 | class ANTLR4CPP_PUBLIC SetTransition : public Transition { 16 | public: 17 | const misc::IntervalSet set; 18 | 19 | SetTransition(ATNState *target, const misc::IntervalSet &set); 20 | 21 | virtual SerializationType getSerializationType() const override; 22 | 23 | virtual misc::IntervalSet label() const override; 24 | virtual bool matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const override; 25 | 26 | virtual std::string toString() const override; 27 | }; 28 | 29 | } // namespace atn 30 | } // namespace antlr4 31 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/StarBlockStartState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/StarBlockStartState.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | size_t StarBlockStartState::getStateType() { 11 | return STAR_BLOCK_START; 12 | } 13 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/StarBlockStartState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/BlockStartState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | /// The block that begins a closure loop. 14 | class ANTLR4CPP_PUBLIC StarBlockStartState final : public BlockStartState { 15 | 16 | public: 17 | virtual size_t getStateType() override; 18 | }; 19 | 20 | } // namespace atn 21 | } // namespace antlr4 22 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/StarLoopEntryState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/StarLoopEntryState.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | StarLoopEntryState::StarLoopEntryState() : DecisionState(), isPrecedenceDecision(false) { 11 | } 12 | 13 | size_t StarLoopEntryState::getStateType() { 14 | return STAR_LOOP_ENTRY; 15 | } 16 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/StarLoopEntryState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/DecisionState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | class ANTLR4CPP_PUBLIC StarLoopEntryState final : public DecisionState { 14 | public: 15 | StarLoopEntryState(); 16 | 17 | /** 18 | * Indicates whether this state can benefit from a precedence DFA during SLL 19 | * decision making. 20 | * 21 | *

This is a computed property that is calculated during ATN deserialization 22 | * and stored for use in {@link ParserATNSimulator} and 23 | * {@link ParserInterpreter}.

24 | * 25 | * @see DFA#isPrecedenceDfa() 26 | */ 27 | bool isPrecedenceDecision = false; 28 | 29 | StarLoopbackState *loopBackState = nullptr; 30 | 31 | virtual size_t getStateType() override; 32 | }; 33 | 34 | } // namespace atn 35 | } // namespace antlr4 36 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/StarLoopbackState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/StarLoopEntryState.h" 7 | #include "atn/Transition.h" 8 | 9 | #include "atn/StarLoopbackState.h" 10 | 11 | using namespace antlr4::atn; 12 | 13 | StarLoopEntryState *StarLoopbackState::getLoopEntryState() { 14 | return dynamic_cast(transitions[0]->target); 15 | } 16 | 17 | size_t StarLoopbackState::getStateType() { 18 | return STAR_LOOP_BACK; 19 | } 20 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/StarLoopbackState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/ATNState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | class ANTLR4CPP_PUBLIC StarLoopbackState final : public ATNState { 14 | public: 15 | StarLoopEntryState *getLoopEntryState(); 16 | 17 | virtual size_t getStateType() override; 18 | }; 19 | 20 | } // namespace atn 21 | } // namespace antlr4 22 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/TokensStartState.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/TokensStartState.h" 7 | 8 | using namespace antlr4::atn; 9 | 10 | size_t TokensStartState::getStateType() { 11 | return TOKEN_START; 12 | } 13 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/TokensStartState.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/DecisionState.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | /// The Tokens rule start state linking to each lexer rule start state. 14 | class ANTLR4CPP_PUBLIC TokensStartState final : public DecisionState { 15 | 16 | public: 17 | virtual size_t getStateType() override; 18 | }; 19 | 20 | } // namespace atn 21 | } // namespace antlr4 22 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/WildcardTransition.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "atn/ATNState.h" 7 | 8 | #include "atn/WildcardTransition.h" 9 | 10 | using namespace antlr4::atn; 11 | 12 | WildcardTransition::WildcardTransition(ATNState *target) : Transition(target) { 13 | } 14 | 15 | Transition::SerializationType WildcardTransition::getSerializationType() const { 16 | return WILDCARD; 17 | } 18 | 19 | bool WildcardTransition::matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const { 20 | return symbol >= minVocabSymbol && symbol <= maxVocabSymbol; 21 | } 22 | 23 | std::string WildcardTransition::toString() const { 24 | return "WILDCARD " + Transition::toString() + " {}"; 25 | } 26 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/atn/WildcardTransition.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "atn/Transition.h" 9 | 10 | namespace antlr4 { 11 | namespace atn { 12 | 13 | class ANTLR4CPP_PUBLIC WildcardTransition final : public Transition { 14 | public: 15 | WildcardTransition(ATNState *target); 16 | 17 | virtual SerializationType getSerializationType() const override; 18 | 19 | virtual bool matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const override; 20 | 21 | virtual std::string toString() const override; 22 | }; 23 | 24 | } // namespace atn 25 | } // namespace antlr4 26 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/dfa/DFASerializer.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "Vocabulary.h" 9 | 10 | namespace antlr4 { 11 | namespace dfa { 12 | 13 | /// A DFA walker that knows how to dump them to serialized strings. 14 | class ANTLR4CPP_PUBLIC DFASerializer { 15 | public: 16 | DFASerializer(const DFA *dfa, const std::vector& tnames); 17 | DFASerializer(const DFA *dfa, const Vocabulary &vocabulary); 18 | virtual ~DFASerializer(); 19 | 20 | virtual std::string toString() const; 21 | 22 | protected: 23 | virtual std::string getEdgeLabel(size_t i) const; 24 | virtual std::string getStateString(DFAState *s) const; 25 | 26 | private: 27 | const DFA *_dfa; 28 | const Vocabulary &_vocabulary; 29 | }; 30 | 31 | } // namespace atn 32 | } // namespace antlr4 33 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/dfa/LexerDFASerializer.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "Vocabulary.h" 7 | 8 | #include "dfa/LexerDFASerializer.h" 9 | 10 | using namespace antlr4::dfa; 11 | 12 | LexerDFASerializer::LexerDFASerializer(DFA *dfa) : DFASerializer(dfa, Vocabulary::EMPTY_VOCABULARY) { 13 | } 14 | 15 | LexerDFASerializer::~LexerDFASerializer() { 16 | } 17 | 18 | std::string LexerDFASerializer::getEdgeLabel(size_t i) const { 19 | return std::string("'") + static_cast(i) + "'"; 20 | } 21 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/dfa/LexerDFASerializer.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "dfa/DFASerializer.h" 9 | 10 | namespace antlr4 { 11 | namespace dfa { 12 | 13 | class ANTLR4CPP_PUBLIC LexerDFASerializer : public DFASerializer { 14 | public: 15 | LexerDFASerializer(DFA *dfa); 16 | virtual ~LexerDFASerializer(); 17 | 18 | protected: 19 | virtual std::string getEdgeLabel(size_t i) const override; 20 | }; 21 | 22 | } // namespace atn 23 | } // namespace antlr4 24 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/misc/InterpreterDataReader.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "antlr4-common.h" 9 | 10 | namespace antlr4 { 11 | namespace misc { 12 | 13 | struct InterpreterData { 14 | atn::ATN atn; 15 | dfa::Vocabulary vocabulary; 16 | std::vector ruleNames; 17 | std::vector channels; // Only valid for lexer grammars. 18 | std::vector modes; // ditto 19 | 20 | InterpreterData() {}; // For invalid content. 21 | InterpreterData(std::vector const& literalNames, std::vector const& symbolicNames); 22 | }; 23 | 24 | // A class to read plain text interpreter data produced by ANTLR. 25 | class ANTLR4CPP_PUBLIC InterpreterDataReader { 26 | public: 27 | static InterpreterData parseFile(std::string const& fileName); 28 | }; 29 | 30 | } // namespace atn 31 | } // namespace antlr4 32 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/misc/Predicate.cpp: -------------------------------------------------------------------------------- 1 | #include "misc/Predicate.h" 2 | 3 | antlr4::misc::Predicate::~Predicate() { 4 | } 5 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/misc/Predicate.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "antlr4-common.h" 9 | 10 | namespace antlr4 { 11 | namespace misc { 12 | 13 | class ANTLR4CPP_PUBLIC Predicate { 14 | public: 15 | virtual ~Predicate(); 16 | 17 | virtual bool test(tree::ParseTree *t) = 0; 18 | }; 19 | 20 | } // namespace tree 21 | } // namespace antlr4 22 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/support/Any.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "Any.h" 7 | 8 | using namespace antlrcpp; 9 | 10 | Any::~Any() 11 | { 12 | delete _ptr; 13 | } 14 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/support/Arrays.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "tree/ParseTree.h" 7 | #include "Exceptions.h" 8 | 9 | #include "support/Arrays.h" 10 | 11 | using namespace antlrcpp; 12 | 13 | std::string Arrays::listToString(const std::vector &list, const std::string &separator) 14 | { 15 | std::stringstream ss; 16 | bool firstEntry = true; 17 | 18 | ss << '['; 19 | for (const auto &entry : list) { 20 | ss << entry; 21 | if (firstEntry) { 22 | ss << separator; 23 | firstEntry = false; 24 | } 25 | } 26 | 27 | ss << ']'; 28 | return ss.str(); 29 | } 30 | 31 | template <> 32 | std::string Arrays::toString(const std::vector &source) { 33 | std::string result = "["; 34 | bool firstEntry = true; 35 | for (auto *value : source) { 36 | result += value->toStringTree(); 37 | if (firstEntry) { 38 | result += ", "; 39 | firstEntry = false; 40 | } 41 | } 42 | return result + "]"; 43 | } 44 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/ErrorNode.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "tree/ErrorNode.h" 7 | 8 | antlr4::tree::ErrorNode::~ErrorNode() { 9 | } 10 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/ErrorNode.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "tree/TerminalNode.h" 9 | 10 | namespace antlr4 { 11 | namespace tree { 12 | 13 | class ANTLR4CPP_PUBLIC ErrorNode : public virtual TerminalNode { 14 | public: 15 | ~ErrorNode() override; 16 | }; 17 | 18 | } // namespace tree 19 | } // namespace antlr4 20 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/ErrorNodeImpl.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "Exceptions.h" 7 | #include "tree/ParseTreeVisitor.h" 8 | 9 | #include "tree/ErrorNodeImpl.h" 10 | 11 | using namespace antlr4; 12 | using namespace antlr4::misc; 13 | using namespace antlr4::tree; 14 | 15 | ErrorNodeImpl::ErrorNodeImpl(Token *token) : TerminalNodeImpl(token) { 16 | } 17 | 18 | ErrorNodeImpl::~ErrorNodeImpl() { 19 | } 20 | 21 | antlrcpp::Any ErrorNodeImpl::accept(ParseTreeVisitor *visitor) { 22 | return visitor->visitErrorNode(this); 23 | } 24 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/ErrorNodeImpl.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "tree/ErrorNode.h" 9 | #include "tree/TerminalNodeImpl.h" 10 | #include "misc/Interval.h" 11 | 12 | #include "support/Any.h" 13 | 14 | namespace antlr4 { 15 | namespace tree { 16 | 17 | /// 18 | /// Represents a token that was consumed during resynchronization 19 | /// rather than during a valid match operation. For example, 20 | /// we will create this kind of a node during single token insertion 21 | /// and deletion as well as during "consume until error recovery set" 22 | /// upon no viable alternative exceptions. 23 | /// 24 | class ANTLR4CPP_PUBLIC ErrorNodeImpl : public virtual TerminalNodeImpl, public virtual ErrorNode { 25 | public: 26 | ErrorNodeImpl(Token *token); 27 | ~ErrorNodeImpl() override; 28 | 29 | virtual antlrcpp::Any accept(ParseTreeVisitor *visitor) override; 30 | }; 31 | 32 | } // namespace tree 33 | } // namespace antlr4 34 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/ParseTree.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "tree/ParseTree.h" 7 | 8 | using namespace antlr4::tree; 9 | 10 | ParseTree::ParseTree() : parent(nullptr) { 11 | } 12 | 13 | bool ParseTree::operator == (const ParseTree &other) const { 14 | return &other == this; 15 | } 16 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/ParseTreeListener.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "ParseTreeListener.h" 7 | 8 | antlr4::tree::ParseTreeListener::~ParseTreeListener() { 9 | } 10 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/ParseTreeVisitor.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "ParseTreeVisitor.h" 7 | 8 | antlr4::tree::ParseTreeVisitor::~ParseTreeVisitor() { 9 | } 10 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/TerminalNode.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "tree/TerminalNode.h" 7 | 8 | antlr4::tree::TerminalNode::~TerminalNode() { 9 | } 10 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/TerminalNode.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "tree/ParseTree.h" 9 | 10 | namespace antlr4 { 11 | namespace tree { 12 | 13 | class ANTLR4CPP_PUBLIC TerminalNode : public ParseTree { 14 | public: 15 | ~TerminalNode() override; 16 | 17 | virtual Token* getSymbol() = 0; 18 | 19 | /** Set the parent for this leaf node. 20 | * 21 | * Technically, this is not backward compatible as it changes 22 | * the interface but no one was able to create custom 23 | * TerminalNodes anyway so I'm adding as it improves internal 24 | * code quality. 25 | * 26 | * @since 4.7 27 | */ 28 | virtual void setParent(RuleContext *parent) = 0; 29 | }; 30 | 31 | } // namespace tree 32 | } // namespace antlr4 33 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/TerminalNodeImpl.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "tree/TerminalNode.h" 9 | 10 | namespace antlr4 { 11 | namespace tree { 12 | 13 | class ANTLR4CPP_PUBLIC TerminalNodeImpl : public virtual TerminalNode { 14 | public: 15 | Token *symbol; 16 | 17 | TerminalNodeImpl(Token *symbol); 18 | 19 | virtual Token* getSymbol() override; 20 | virtual void setParent(RuleContext *parent) override; 21 | virtual misc::Interval getSourceInterval() override; 22 | 23 | virtual antlrcpp::Any accept(ParseTreeVisitor *visitor) override; 24 | 25 | virtual std::string getText() override; 26 | virtual std::string toStringTree(Parser *parser, bool pretty = false) override; 27 | virtual std::string toString() override; 28 | virtual std::string toStringTree(bool pretty = false) override; 29 | 30 | }; 31 | 32 | } // namespace tree 33 | } // namespace antlr4 34 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/pattern/Chunk.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "tree/pattern/Chunk.h" 7 | 8 | antlr4::tree::pattern::Chunk::~Chunk() { 9 | } 10 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/pattern/TagChunk.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "Exceptions.h" 7 | 8 | #include "tree/pattern/TagChunk.h" 9 | 10 | using namespace antlr4::tree::pattern; 11 | 12 | TagChunk::TagChunk(const std::string &tag) : TagChunk("", tag) { 13 | } 14 | 15 | TagChunk::TagChunk(const std::string &label, const std::string &tag) : _tag(tag), _label(label) { 16 | if (tag.empty()) { 17 | throw IllegalArgumentException("tag cannot be null or empty"); 18 | } 19 | 20 | } 21 | 22 | TagChunk::~TagChunk() { 23 | } 24 | 25 | std::string TagChunk::getTag() { 26 | return _tag; 27 | } 28 | 29 | std::string TagChunk::getLabel() { 30 | return _label; 31 | } 32 | 33 | std::string TagChunk::toString() { 34 | if (!_label.empty()) { 35 | return _label + ":" + _tag; 36 | } 37 | 38 | return _tag; 39 | } 40 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/pattern/TextChunk.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "Exceptions.h" 7 | 8 | #include "tree/pattern/TextChunk.h" 9 | 10 | using namespace antlr4::tree::pattern; 11 | 12 | TextChunk::TextChunk(const std::string &text) : text(text) { 13 | if (text == "") { 14 | throw IllegalArgumentException("text cannot be nul"); 15 | } 16 | 17 | } 18 | 19 | TextChunk::~TextChunk() { 20 | } 21 | 22 | std::string TextChunk::getText() { 23 | return text; 24 | } 25 | 26 | std::string TextChunk::toString() { 27 | return std::string("'") + text + std::string("'"); 28 | } 29 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/pattern/TokenTagToken.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "tree/pattern/TokenTagToken.h" 7 | 8 | using namespace antlr4::tree::pattern; 9 | 10 | TokenTagToken::TokenTagToken(const std::string &/*tokenName*/, int type) 11 | : CommonToken(type), tokenName(""), label("") { 12 | } 13 | 14 | TokenTagToken::TokenTagToken(const std::string &tokenName, int type, const std::string &label) 15 | : CommonToken(type), tokenName(tokenName), label(label) { 16 | } 17 | 18 | std::string TokenTagToken::getTokenName() const { 19 | return tokenName; 20 | } 21 | 22 | std::string TokenTagToken::getLabel() const { 23 | return label; 24 | } 25 | 26 | std::string TokenTagToken::getText() const { 27 | if (!label.empty()) { 28 | return "<" + label + ":" + tokenName + ">"; 29 | } 30 | 31 | return "<" + tokenName + ">"; 32 | } 33 | 34 | std::string TokenTagToken::toString() const { 35 | return tokenName + ":" + std::to_string(_type); 36 | } 37 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathElement.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "support/CPPUtils.h" 7 | 8 | #include "XPathElement.h" 9 | 10 | using namespace antlr4::tree; 11 | using namespace antlr4::tree::xpath; 12 | 13 | XPathElement::XPathElement(const std::string &nodeName) { 14 | _nodeName = nodeName; 15 | } 16 | 17 | XPathElement::~XPathElement() { 18 | } 19 | 20 | std::vector XPathElement::evaluate(ParseTree * /*t*/) { 21 | return {}; 22 | } 23 | 24 | std::string XPathElement::toString() const { 25 | std::string inv = _invert ? "!" : ""; 26 | return antlrcpp::toString(*this) + "[" + inv + _nodeName + "]"; 27 | } 28 | 29 | void XPathElement::setInvert(bool value) { 30 | _invert = value; 31 | } 32 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathLexer.tokens: -------------------------------------------------------------------------------- 1 | TOKEN_REF=1 2 | RULE_REF=2 3 | ANYWHERE=3 4 | ROOT=4 5 | WILDCARD=5 6 | BANG=6 7 | ID=7 8 | STRING=8 9 | '//'=3 10 | '/'=4 11 | '*'=5 12 | '!'=6 13 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathLexerErrorListener.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "XPathLexerErrorListener.h" 7 | 8 | using namespace antlr4; 9 | using namespace antlr4::tree::xpath; 10 | 11 | void XPathLexerErrorListener::syntaxError(Recognizer * /*recognizer*/, Token * /*offendingSymbol*/, 12 | size_t /*line*/, size_t /*charPositionInLine*/, const std::string &/*msg*/, std::exception_ptr /*e*/) { 13 | } 14 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathLexerErrorListener.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "BaseErrorListener.h" 9 | 10 | namespace antlr4 { 11 | namespace tree { 12 | namespace xpath { 13 | 14 | class ANTLR4CPP_PUBLIC XPathLexerErrorListener : public BaseErrorListener { 15 | public: 16 | virtual void syntaxError(Recognizer *recognizer, Token *offendingSymbol, size_t line, 17 | size_t charPositionInLine, const std::string &msg, std::exception_ptr e) override; 18 | }; 19 | 20 | } // namespace xpath 21 | } // namespace tree 22 | } // namespace antlr4 23 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathRuleAnywhereElement.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "tree/ParseTree.h" 7 | #include "tree/Trees.h" 8 | 9 | #include "tree/xpath/XPathRuleAnywhereElement.h" 10 | 11 | using namespace antlr4::tree; 12 | using namespace antlr4::tree::xpath; 13 | 14 | XPathRuleAnywhereElement::XPathRuleAnywhereElement(const std::string &ruleName, int ruleIndex) : XPathElement(ruleName) { 15 | _ruleIndex = ruleIndex; 16 | } 17 | 18 | std::vector XPathRuleAnywhereElement::evaluate(ParseTree *t) { 19 | return Trees::findAllRuleNodes(t, _ruleIndex); 20 | } 21 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathRuleAnywhereElement.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "XPathElement.h" 9 | 10 | namespace antlr4 { 11 | namespace tree { 12 | namespace xpath { 13 | 14 | /// Either {@code ID} at start of path or {@code ...//ID} in middle of path. 15 | class ANTLR4CPP_PUBLIC XPathRuleAnywhereElement : public XPathElement { 16 | public: 17 | XPathRuleAnywhereElement(const std::string &ruleName, int ruleIndex); 18 | 19 | virtual std::vector evaluate(ParseTree *t) override; 20 | 21 | protected: 22 | int _ruleIndex = 0; 23 | }; 24 | 25 | } // namespace xpath 26 | } // namespace tree 27 | } // namespace antlr4 28 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathRuleElement.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "tree/ParseTree.h" 7 | #include "tree/Trees.h" 8 | 9 | #include "XPathRuleElement.h" 10 | 11 | using namespace antlr4::tree; 12 | using namespace antlr4::tree::xpath; 13 | 14 | XPathRuleElement::XPathRuleElement(const std::string &ruleName, size_t ruleIndex) : XPathElement(ruleName) { 15 | _ruleIndex = ruleIndex; 16 | } 17 | 18 | std::vector XPathRuleElement::evaluate(ParseTree *t) { 19 | // return all children of t that match nodeName 20 | std::vector nodes; 21 | for (auto *c : t->children) { 22 | if (antlrcpp::is(c)) { 23 | ParserRuleContext *ctx = dynamic_cast(c); 24 | if ((ctx->getRuleIndex() == _ruleIndex && !_invert) || (ctx->getRuleIndex() != _ruleIndex && _invert)) { 25 | nodes.push_back(ctx); 26 | } 27 | } 28 | } 29 | return nodes; 30 | } 31 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathRuleElement.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "XPathElement.h" 9 | 10 | namespace antlr4 { 11 | namespace tree { 12 | namespace xpath { 13 | 14 | class ANTLR4CPP_PUBLIC XPathRuleElement : public XPathElement { 15 | public: 16 | XPathRuleElement(const std::string &ruleName, size_t ruleIndex); 17 | 18 | virtual std::vector evaluate(ParseTree *t) override; 19 | 20 | protected: 21 | size_t _ruleIndex = 0; 22 | }; 23 | 24 | } // namespace xpath 25 | } // namespace tree 26 | } // namespace antlr4 27 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathTokenAnywhereElement.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "tree/ParseTree.h" 7 | #include "tree/Trees.h" 8 | 9 | #include "XPathTokenAnywhereElement.h" 10 | 11 | using namespace antlr4::tree; 12 | using namespace antlr4::tree::xpath; 13 | 14 | XPathTokenAnywhereElement::XPathTokenAnywhereElement(const std::string &tokenName, int tokenType) : XPathElement(tokenName) { 15 | this->tokenType = tokenType; 16 | } 17 | 18 | std::vector XPathTokenAnywhereElement::evaluate(ParseTree *t) { 19 | return Trees::findAllTokenNodes(t, tokenType); 20 | } 21 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathTokenAnywhereElement.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "XPathElement.h" 9 | 10 | namespace antlr4 { 11 | namespace tree { 12 | namespace xpath { 13 | 14 | class ANTLR4CPP_PUBLIC XPathTokenAnywhereElement : public XPathElement { 15 | protected: 16 | int tokenType = 0; 17 | public: 18 | XPathTokenAnywhereElement(const std::string &tokenName, int tokenType); 19 | 20 | virtual std::vector evaluate(ParseTree *t) override; 21 | }; 22 | 23 | } // namespace xpath 24 | } // namespace tree 25 | } // namespace antlr4 26 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathTokenElement.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "XPathElement.h" 9 | 10 | namespace antlr4 { 11 | namespace tree { 12 | namespace xpath { 13 | 14 | class ANTLR4CPP_PUBLIC XPathTokenElement : public XPathElement { 15 | public: 16 | XPathTokenElement(const std::string &tokenName, size_t tokenType); 17 | 18 | virtual std::vector evaluate(ParseTree *t) override; 19 | 20 | protected: 21 | size_t _tokenType = 0; 22 | }; 23 | 24 | } // namespace xpath 25 | } // namespace tree 26 | } // namespace antlr4 27 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathWildcardAnywhereElement.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "XPath.h" 7 | #include "tree/ParseTree.h" 8 | #include "tree/Trees.h" 9 | 10 | #include "XPathWildcardAnywhereElement.h" 11 | 12 | using namespace antlr4::tree; 13 | using namespace antlr4::tree::xpath; 14 | 15 | XPathWildcardAnywhereElement::XPathWildcardAnywhereElement() : XPathElement(XPath::WILDCARD) { 16 | } 17 | 18 | std::vector XPathWildcardAnywhereElement::evaluate(ParseTree *t) { 19 | if (_invert) { 20 | return {}; // !* is weird but valid (empty) 21 | } 22 | return Trees::getDescendants(t); 23 | } 24 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathWildcardAnywhereElement.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "XPathElement.h" 9 | 10 | namespace antlr4 { 11 | namespace tree { 12 | namespace xpath { 13 | 14 | class ANTLR4CPP_PUBLIC XPathWildcardAnywhereElement : public XPathElement { 15 | public: 16 | XPathWildcardAnywhereElement(); 17 | 18 | virtual std::vector evaluate(ParseTree *t) override; 19 | }; 20 | 21 | } // namespace xpath 22 | } // namespace tree 23 | } // namespace antlr4 24 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathWildcardElement.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "XPath.h" 7 | #include "tree/ParseTree.h" 8 | #include "tree/Trees.h" 9 | 10 | #include "XPathWildcardElement.h" 11 | 12 | using namespace antlr4::tree; 13 | using namespace antlr4::tree::xpath; 14 | 15 | XPathWildcardElement::XPathWildcardElement() : XPathElement(XPath::WILDCARD) { 16 | } 17 | 18 | std::vector XPathWildcardElement::evaluate(ParseTree *t) { 19 | if (_invert) { 20 | return {}; // !* is weird but valid (empty) 21 | } 22 | 23 | return t->children; 24 | } 25 | -------------------------------------------------------------------------------- /cpp/third_party/antlr4-cpp-runtime-4/runtime/src/tree/xpath/XPathWildcardElement.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "XPathElement.h" 9 | 10 | namespace antlr4 { 11 | namespace tree { 12 | namespace xpath { 13 | 14 | class ANTLR4CPP_PUBLIC XPathWildcardElement : public XPathElement { 15 | public: 16 | XPathWildcardElement(); 17 | 18 | virtual std::vector evaluate(ParseTree *t) override; 19 | }; 20 | 21 | } // namespace xpath 22 | } // namespace tree 23 | } // namespace antlr4 24 | -------------------------------------------------------------------------------- /cpp/third_party/google_snappy/AUTHORS: -------------------------------------------------------------------------------- 1 | opensource@google.com 2 | -------------------------------------------------------------------------------- /cpp/third_party/lz4/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.11) 2 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 3 | add_library(LZ4 STATIC lz4.c) -------------------------------------------------------------------------------- /cpp/third_party/lzokay/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.11) 2 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 3 | add_library(lzokay STATIC lzokay.cpp) -------------------------------------------------------------------------------- /cpp/third_party/lzokay/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2018 Jack Andersen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright notice: 2 | 3 | (C) 1995-2022 Jean-loup Gailly and Mark Adler 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | Jean-loup Gailly Mark Adler 22 | jloup@gzip.org madler@alumni.caltech.edu 23 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | -@echo "Please use ./configure first. Thank you." 3 | 4 | distclean: 5 | make -f Makefile.in distclean 6 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/ada/zlib.gpr: -------------------------------------------------------------------------------- 1 | project Zlib is 2 | 3 | for Languages use ("Ada"); 4 | for Source_Dirs use ("."); 5 | for Object_Dir use "."; 6 | for Main use ("test.adb", "mtest.adb", "read.adb", "buffer_demo"); 7 | 8 | package Compiler is 9 | for Default_Switches ("ada") use ("-gnatwcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst"); 10 | end Compiler; 11 | 12 | package Linker is 13 | for Default_Switches ("ada") use ("-lz"); 14 | end Linker; 15 | 16 | package Builder is 17 | for Default_Switches ("ada") use ("-s", "-gnatQ"); 18 | end Builder; 19 | 20 | end Zlib; 21 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/blast/Makefile: -------------------------------------------------------------------------------- 1 | blast: blast.c blast.h 2 | cc -DTEST -o blast blast.c 3 | 4 | test: blast 5 | blast < test.pk | cmp - test.txt 6 | 7 | clean: 8 | rm -f blast blast.o 9 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/blast/README: -------------------------------------------------------------------------------- 1 | Read blast.h for purpose and usage. 2 | 3 | Mark Adler 4 | madler@alumni.caltech.edu 5 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/blast/test.pk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/zlib-1.2.13/contrib/blast/test.pk -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/blast/test.txt: -------------------------------------------------------------------------------- 1 | AIAIAIAIAIAIA -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/delphi/ZLibConst.pas: -------------------------------------------------------------------------------- 1 | unit ZLibConst; 2 | 3 | interface 4 | 5 | resourcestring 6 | sTargetBufferTooSmall = 'ZLib error: target buffer may be too small'; 7 | sInvalidStreamOp = 'Invalid stream operation'; 8 | 9 | implementation 10 | 11 | end. 12 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib.chm -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfiguration) = preSolution 8 | Debug = Debug 9 | Release = Release 10 | EndGlobalSection 11 | GlobalSection(ProjectConfiguration) = postSolution 12 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET 13 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET 14 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET 15 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET 16 | EndGlobalSection 17 | GlobalSection(ExtensibilityGlobals) = postSolution 18 | EndGlobalSection 19 | GlobalSection(ExtensibilityAddIns) = postSolution 20 | EndGlobalSection 21 | EndGlobal 22 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/ChecksumImpl.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/ChecksumImpl.cs -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/CircularBuffer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/CircularBuffer.cs -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/CodecBase.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/CodecBase.cs -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/Deflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/Deflater.cs -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/DotZLib.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/DotZLib.cs -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/GZipStream.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/GZipStream.cs -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/Inflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/zlib-1.2.13/contrib/dotzlib/DotZLib/Inflater.cs -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/infback9/README: -------------------------------------------------------------------------------- 1 | See infback9.h for what this is and how to use it. 2 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/iostream/test.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "zfstream.h" 3 | 4 | int main() { 5 | 6 | // Construct a stream object with this filebuffer. Anything sent 7 | // to this stream will go to standard out. 8 | gzofstream os( 1, ios::out ); 9 | 10 | // This text is getting compressed and sent to stdout. 11 | // To prove this, run 'test | zcat'. 12 | os << "Hello, Mommy" << endl; 13 | 14 | os << setcompressionlevel( Z_NO_COMPRESSION ); 15 | os << "hello, hello, hi, ho!" << endl; 16 | 17 | setcompressionlevel( os, Z_DEFAULT_COMPRESSION ) 18 | << "I'm compressing again" << endl; 19 | 20 | os.close(); 21 | 22 | return 0; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/iostream2/zstream_test.cpp: -------------------------------------------------------------------------------- 1 | #include "zstream.h" 2 | #include 3 | #include 4 | #include 5 | 6 | void main() { 7 | char h[256] = "Hello"; 8 | char* g = "Goodbye"; 9 | ozstream out("temp.gz"); 10 | out < "This works well" < h < g; 11 | out.close(); 12 | 13 | izstream in("temp.gz"); // read it back 14 | char *x = read_string(in), *y = new char[256], z[256]; 15 | in > y > z; 16 | in.close(); 17 | cout << x << endl << y << endl << z << endl; 18 | 19 | out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results 20 | out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl; 21 | out << z << endl << y << endl << x << endl; 22 | out << 1.1234567890123456789 << endl; 23 | 24 | delete[] x; delete[] y; 25 | } 26 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/iostream3/TODO: -------------------------------------------------------------------------------- 1 | Possible upgrades to gzfilebuf: 2 | 3 | - The ability to do putback (e.g. putbackfail) 4 | 5 | - The ability to seek (zlib supports this, but could be slow/tricky) 6 | 7 | - Simultaneous read/write access (does it make sense?) 8 | 9 | - Support for ios_base::ate open mode 10 | 11 | - Locale support? 12 | 13 | - Check public interface to see which calls give problems 14 | (due to dependence on library internals) 15 | 16 | - Override operator<<(ostream&, gzfilebuf*) to allow direct copying 17 | of stream buffer to stream ( i.e. os << is.rdbuf(); ) 18 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/minizip/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS := $(CFLAGS) -O -I../.. 3 | 4 | UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a 5 | ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a 6 | 7 | .c.o: 8 | $(CC) -c $(CFLAGS) $*.c 9 | 10 | all: miniunz minizip 11 | 12 | miniunz: $(UNZ_OBJS) 13 | $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) 14 | 15 | minizip: $(ZIP_OBJS) 16 | $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) 17 | 18 | test: miniunz minizip 19 | @rm -f test.* 20 | @echo hello hello hello > test.txt 21 | ./minizip test test.txt 22 | ./miniunz -l test.zip 23 | @mv test.txt test.old 24 | ./miniunz test.zip 25 | @cmp test.txt test.old 26 | @rm -f test.* 27 | 28 | clean: 29 | /bin/rm -f *.o *~ minizip miniunz test.* 30 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/minizip/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libminizip.la 2 | 3 | if COND_DEMOS 4 | bin_PROGRAMS = miniunzip minizip 5 | endif 6 | 7 | zlib_top_srcdir = $(top_srcdir)/../.. 8 | zlib_top_builddir = $(top_builddir)/../.. 9 | 10 | AM_CPPFLAGS = -I$(zlib_top_srcdir) 11 | AM_LDFLAGS = -L$(zlib_top_builddir) 12 | 13 | if WIN32 14 | iowin32_src = iowin32.c 15 | iowin32_h = iowin32.h 16 | endif 17 | 18 | libminizip_la_SOURCES = \ 19 | ioapi.c \ 20 | mztools.c \ 21 | unzip.c \ 22 | zip.c \ 23 | ${iowin32_src} 24 | 25 | libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz 26 | 27 | minizip_includedir = $(includedir)/minizip 28 | minizip_include_HEADERS = \ 29 | crypt.h \ 30 | ioapi.h \ 31 | mztools.h \ 32 | unzip.h \ 33 | zip.h \ 34 | ${iowin32_h} 35 | 36 | pkgconfigdir = $(libdir)/pkgconfig 37 | pkgconfig_DATA = minizip.pc 38 | 39 | EXTRA_PROGRAMS = miniunzip minizip 40 | 41 | miniunzip_SOURCES = miniunz.c 42 | miniunzip_LDADD = libminizip.la 43 | 44 | minizip_SOURCES = minizip.c 45 | minizip_LDADD = libminizip.la -lz 46 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/minizip/MiniZip64_Changes.txt: -------------------------------------------------------------------------------- 1 | 2 | MiniZip 1.1 was derrived from MiniZip at version 1.01f 3 | 4 | Change in 1.0 (Okt 2009) 5 | - **TODO - Add history** 6 | 7 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/minizip/configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_INIT([minizip], [1.2.13], [bugzilla.redhat.com]) 5 | AC_CONFIG_SRCDIR([minizip.c]) 6 | AM_INIT_AUTOMAKE([foreign]) 7 | LT_INIT 8 | 9 | AC_MSG_CHECKING([whether to build example programs]) 10 | AC_ARG_ENABLE([demos], AC_HELP_STRING([--enable-demos], [build example programs])) 11 | AM_CONDITIONAL([COND_DEMOS], [test "$enable_demos" = yes]) 12 | if test "$enable_demos" = yes 13 | then 14 | AC_MSG_RESULT([yes]) 15 | else 16 | AC_MSG_RESULT([no]) 17 | fi 18 | 19 | case "${host}" in 20 | *-mingw* | mingw*) 21 | WIN32="yes" 22 | ;; 23 | *) 24 | ;; 25 | esac 26 | AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) 27 | 28 | 29 | AC_SUBST([HAVE_UNISTD_H], [0]) 30 | AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], []) 31 | AC_CONFIG_FILES([Makefile minizip.pc]) 32 | AC_OUTPUT 33 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/minizip/iowin32.h: -------------------------------------------------------------------------------- 1 | /* iowin32.h -- IO base function header for compress/uncompress .zip 2 | Version 1.1, February 14h, 2010 3 | part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) 4 | 5 | Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) 6 | 7 | Modifications for Zip64 support 8 | Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) 9 | 10 | For more info read MiniZip_info.txt 11 | 12 | */ 13 | 14 | #include 15 | 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); 22 | void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def)); 23 | void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def)); 24 | void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def)); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/minizip/make_vms.com: -------------------------------------------------------------------------------- 1 | $ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig 2 | $ open/write zdef vmsdefs.h 3 | $ copy sys$input: zdef 4 | $ deck 5 | #define unix 6 | #define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from 7 | #define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator 8 | #define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord 9 | #define Write_EndOfCentralDirectoryRecord Write_EoDRecord 10 | $ eod 11 | $ close zdef 12 | $ copy vmsdefs.h,ioapi.h_orig ioapi.h 13 | $ cc/include=[--]/prefix=all ioapi.c 14 | $ cc/include=[--]/prefix=all miniunz.c 15 | $ cc/include=[--]/prefix=all unzip.c 16 | $ cc/include=[--]/prefix=all minizip.c 17 | $ cc/include=[--]/prefix=all zip.c 18 | $ link miniunz,unzip,ioapi,[--]libz.olb/lib 19 | $ link minizip,zip,ioapi,[--]libz.olb/lib 20 | $ mcr []minizip test minizip_info.txt 21 | $ mcr []miniunz -l test.zip 22 | $ rename minizip_info.txt; minizip_info.txt_old 23 | $ mcr []miniunz test.zip 24 | $ delete test.zip;* 25 | $exit 26 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/minizip/minizip.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@/minizip 5 | 6 | Name: minizip 7 | Description: Minizip zip file manipulation library 8 | Requires: 9 | Version: @PACKAGE_VERSION@ 10 | Libs: -L${libdir} -lminizip 11 | Libs.private: -lz 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/minizip/mztools.h: -------------------------------------------------------------------------------- 1 | /* 2 | Additional tools for Minizip 3 | Code: Xavier Roche '2004 4 | License: Same as ZLIB (www.gzip.org) 5 | */ 6 | 7 | #ifndef _zip_tools_H 8 | #define _zip_tools_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifndef _ZLIB_H 15 | #include "zlib.h" 16 | #endif 17 | 18 | #include "unzip.h" 19 | 20 | /* Repair a ZIP file (missing central directory) 21 | file: file to recover 22 | fileOut: output file after recovery 23 | fileOutTmp: temporary file name used for recovery 24 | */ 25 | extern int ZEXPORT unzRepair(const char* file, 26 | const char* fileOut, 27 | const char* fileOutTmp, 28 | uLong* nRecovered, 29 | uLong* bytesRecovered); 30 | 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/puff/zeros.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/zlib-1.2.13/contrib/puff/zeros.raw -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/testzlib/testzlib.txt: -------------------------------------------------------------------------------- 1 | To build testzLib with Visual Studio 2005: 2 | 3 | copy to a directory file from : 4 | - root of zLib tree 5 | - contrib/testzlib 6 | - contrib/masmx86 7 | - contrib/masmx64 8 | - contrib/vstudio/vc7 9 | 10 | and open testzlib8.sln -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/untgz/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS=-g 3 | 4 | untgz: untgz.o ../../libz.a 5 | $(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz 6 | 7 | untgz.o: untgz.c ../../zlib.h 8 | $(CC) $(CFLAGS) -c -I../.. untgz.c 9 | 10 | ../../libz.a: 11 | cd ../..; ./configure; make 12 | 13 | clean: 14 | rm -f untgz untgz.o *~ 15 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/untgz/Makefile.msc: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS=-MD 3 | 4 | untgz.exe: untgz.obj ..\..\zlib.lib 5 | $(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib 6 | 7 | untgz.obj: untgz.c ..\..\zlib.h 8 | $(CC) $(CFLAGS) -c -I..\.. untgz.c 9 | 10 | ..\..\zlib.lib: 11 | cd ..\.. 12 | $(MAKE) -f win32\makefile.msc 13 | cd contrib\untgz 14 | 15 | clean: 16 | -del untgz.obj 17 | -del untgz.exe 18 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/vstudio/vc10/miniunz.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {048af943-022b-4db6-beeb-a54c34774ee2} 6 | cpp;c;cxx;def;odl;idl;hpj;bat 7 | 8 | 9 | {c1d600d2-888f-4aea-b73e-8b0dd9befa0c} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {0844199a-966b-4f19-81db-1e0125e141b9} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/vstudio/vc10/minizip.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {c0419b40-bf50-40da-b153-ff74215b79de} 6 | cpp;c;cxx;def;odl;idl;hpj;bat 7 | 8 | 9 | {bb87b070-735b-478e-92ce-7383abb2f36c} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {f46ab6a6-548f-43cb-ae96-681abb5bd5db} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/vstudio/vc10/testzlibdll.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {fa61a89f-93fc-4c89-b29e-36224b7592f4} 6 | cpp;c;cxx;def;odl;idl;hpj;bat 7 | 8 | 9 | {d4b85da0-2ba2-4934-b57f-e2584e3848ee} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {e573e075-00bd-4a7d-bd67-a8cc9bfc5aca} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/vstudio/vc10/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 13, 0 6 | PRODUCTVERSION 1, 2, 13, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.13\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/vstudio/vc11/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 13, 0 6 | PRODUCTVERSION 1, 2, 13, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.13\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/vstudio/vc12/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 13, 0 6 | PRODUCTVERSION 1, 2, 13, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.13\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/vstudio/vc14/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 13, 0 6 | PRODUCTVERSION 1, 2, 13, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.13\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/contrib/vstudio/vc9/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 13, 0 6 | PRODUCTVERSION 1, 2, 13, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.13\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/doc/crc-doc.1.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/zlib-1.2.13/doc/crc-doc.1.0.pdf -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(file) 12 | gzFile file; 13 | { 14 | #ifndef NO_GZCOMPRESS 15 | gz_statep state; 16 | 17 | if (file == NULL) 18 | return Z_STREAM_ERROR; 19 | state = (gz_statep)file; 20 | 21 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 22 | #else 23 | return gzclose_r(file); 24 | #endif 25 | } 26 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/nintendods/README: -------------------------------------------------------------------------------- 1 | This Makefile requires devkitARM (http://www.devkitpro.org/category/devkitarm/) and works inside "contrib/nds". It is based on a devkitARM template. 2 | 3 | Eduardo Costa 4 | January 3, 2009 5 | 6 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/old/README: -------------------------------------------------------------------------------- 1 | This directory contains files that have not been updated for zlib 1.2.x 2 | 3 | (Volunteers are encouraged to help clean this up. Thanks.) 4 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/old/os2/zlib.def: -------------------------------------------------------------------------------- 1 | ; 2 | ; Slightly modified version of ../nt/zlib.dnt :-) 3 | ; 4 | 5 | LIBRARY Z 6 | DESCRIPTION "Zlib compression library for OS/2" 7 | CODE PRELOAD MOVEABLE DISCARDABLE 8 | DATA PRELOAD MOVEABLE MULTIPLE 9 | 10 | EXPORTS 11 | adler32 12 | compress 13 | crc32 14 | deflate 15 | deflateCopy 16 | deflateEnd 17 | deflateInit2_ 18 | deflateInit_ 19 | deflateParams 20 | deflateReset 21 | deflateSetDictionary 22 | gzclose 23 | gzdopen 24 | gzerror 25 | gzflush 26 | gzopen 27 | gzread 28 | gzwrite 29 | inflate 30 | inflateEnd 31 | inflateInit2_ 32 | inflateInit_ 33 | inflateReset 34 | inflateSetDictionary 35 | inflateSync 36 | uncompress 37 | zlibVersion 38 | gzprintf 39 | gzputc 40 | gzgetc 41 | gzseek 42 | gzrewind 43 | gztell 44 | gzeof 45 | gzsetparams 46 | zError 47 | inflateSyncPoint 48 | get_crc_table 49 | compress2 50 | gzputs 51 | gzgets 52 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/win32/VisualC.txt: -------------------------------------------------------------------------------- 1 | 2 | To build zlib using the Microsoft Visual C++ environment, 3 | use the appropriate project from the contrib/vstudio/ directory. 4 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/zlib.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/cpp/third_party/zlib-1.2.13/zlib.3.pdf -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/zlib.pc.cmakein: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@ 3 | libdir=@INSTALL_LIB_DIR@ 4 | sharedlibdir=@INSTALL_LIB_DIR@ 5 | includedir=@INSTALL_INC_DIR@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /cpp/third_party/zlib-1.2.13/zlib.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | sharedlibdir=@sharedlibdir@ 5 | includedir=@includedir@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | node_modules/ 3 | src/.vuepress/.cache/ 4 | src/.vuepress/.temp/ 5 | src/.vuepress/dist/ 6 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tsfile-docs", 3 | "version": "1.0.0", 4 | "description": "tsfile docs", 5 | "license": "Apache-2.0", 6 | "type": "module", 7 | "scripts": { 8 | "docs:build": "vuepress build src", 9 | "docs:clean-dev": "vuepress dev src --clean-cache", 10 | "docs:dev": "vuepress dev src", 11 | "docs:update-package": "pnpm dlx vp-update", 12 | "deploy": "node --max_old_space_size=6000 deploy.cjs", 13 | "deploy:staging": "node --max_old_space_size=6000 deploy_staging.cjs" 14 | }, 15 | "devDependencies": { 16 | "@docsearch/css": "^3.5.2", 17 | "@docsearch/js": "^3.5.2", 18 | "@docsearch/react": "^3.5.2", 19 | "@vuepress/client": "2.0.0-rc.0", 20 | "@vuepress/plugin-docsearch": "2.0.0-rc.0", 21 | "@vuepress/shared": "2.0.0-rc.0", 22 | "@vuepress/utils": "2.0.0-rc.0", 23 | "gh-pages": "^6.1.1", 24 | "ts-debounce": "^4.0.0", 25 | "vue": "^3.4.3", 26 | "vue-router": "^4.2.5", 27 | "vuepress": "2.0.0-rc.0", 28 | "vuepress-theme-hope": "2.0.0-rc.11" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/src/.vuepress/components/docsearch/client/components/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | export * from './Docsearch.js'; 21 | -------------------------------------------------------------------------------- /docs/src/.vuepress/components/docsearch/client/composables/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | export * from './useDocsearchShim.js'; 21 | -------------------------------------------------------------------------------- /docs/src/.vuepress/components/docsearch/client/config.js: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | 21 | import { defineClientConfig } from '@vuepress/client'; 22 | import { Docsearch } from './components/index'; 23 | 24 | export default defineClientConfig({ 25 | enhance({ app }) { 26 | app.component('Docsearch', Docsearch); 27 | }, 28 | }); 29 | -------------------------------------------------------------------------------- /docs/src/.vuepress/components/docsearch/client/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | 21 | export * from '../shared/index.js'; 22 | export * from './components/index.js'; 23 | -------------------------------------------------------------------------------- /docs/src/.vuepress/components/docsearch/client/shims.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | declare module '@docsearch/css' { 21 | export {}; 22 | } 23 | 24 | declare module '*.css' { 25 | export {}; 26 | } 27 | -------------------------------------------------------------------------------- /docs/src/.vuepress/components/docsearch/node/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | import { docsearchPlugin } from './docsearchPlugin.js'; 21 | 22 | export * from '../shared/index.js'; 23 | export * from './docsearchPlugin.js'; 24 | export default docsearchPlugin; 25 | -------------------------------------------------------------------------------- /docs/src/.vuepress/components/docsearch/shared/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | export * from './types.js'; 21 | -------------------------------------------------------------------------------- /docs/src/.vuepress/navbar/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | Unless required by applicable law or agreed to in writing, 11 | software distributed under the License is distributed on an 12 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | KIND, either express or implied. See the License for the 14 | specific language governing permissions and limitations 15 | under the License. 16 | */ 17 | 18 | export * from "./en.js"; 19 | export * from "./zh.js"; 20 | -------------------------------------------------------------------------------- /docs/src/.vuepress/public/.asf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | staging: 21 | profile: ~ 22 | whoami: asf-staging 23 | 24 | publish: 25 | whoami: asf-site -------------------------------------------------------------------------------- /docs/src/.vuepress/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/docs/src/.vuepress/public/favicon.ico -------------------------------------------------------------------------------- /docs/src/.vuepress/sidebar/en.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | Unless required by applicable law or agreed to in writing, 11 | software distributed under the License is distributed on an 12 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | KIND, either express or implied. See the License for the 14 | specific language governing permissions and limitations 15 | under the License. 16 | */ 17 | 18 | import { sidebar } from "vuepress-theme-hope"; 19 | import { enSidebar as V100xSidebar } from './V1.0.x/en.js'; 20 | 21 | export const enSidebar = sidebar({ 22 | ...V100xSidebar 23 | }); 24 | -------------------------------------------------------------------------------- /docs/src/.vuepress/sidebar/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | Unless required by applicable law or agreed to in writing, 11 | software distributed under the License is distributed on an 12 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | KIND, either express or implied. See the License for the 14 | specific language governing permissions and limitations 15 | under the License. 16 | */ 17 | 18 | export * from "./en.js"; 19 | export * from "./zh.js"; 20 | -------------------------------------------------------------------------------- /docs/src/.vuepress/sidebar/zh.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | Unless required by applicable law or agreed to in writing, 11 | software distributed under the License is distributed on an 12 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | KIND, either express or implied. See the License for the 14 | specific language governing permissions and limitations 15 | under the License. 16 | */ 17 | 18 | import { sidebar } from "vuepress-theme-hope"; 19 | import { zhSidebar as V100xSidebar } from './V1.0.x/zh.js'; 20 | 21 | export const zhSidebar = sidebar({ 22 | ...V100xSidebar 23 | }); 24 | -------------------------------------------------------------------------------- /docs/src/.vuepress/styles/config.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | // you can change config here 21 | $colors: #c0392b, #d35400, #f39c12, #27ae60, #16a085, #2980b9, #8e44ad, #2c3e50, 22 | #7f8c8d !default; 23 | -------------------------------------------------------------------------------- /docs/src/.vuepress/styles/palette.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | // you can change colors here 21 | $theme-color: #6738BD; 22 | $home-page-width: 1280px; 23 | -------------------------------------------------------------------------------- /docs/src/Community/About.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | Coming Soon -------------------------------------------------------------------------------- /docs/src/Community/Feedback.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | Coming Soon -------------------------------------------------------------------------------- /docs/src/Development/Community-Project-Committers.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | Coming Soon -------------------------------------------------------------------------------- /docs/src/Development/Powered-By.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | Coming Soon 23 | -------------------------------------------------------------------------------- /java/common/src/main/java/org/apache/tsfile/annotations/TsFileApi.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.annotations; 21 | 22 | import java.lang.annotation.Retention; 23 | import java.lang.annotation.RetentionPolicy; 24 | 25 | @Retention(RetentionPolicy.CLASS) 26 | public @interface TsFileApi {} 27 | -------------------------------------------------------------------------------- /java/common/src/main/java/org/apache/tsfile/utils/Accountable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.utils; 21 | 22 | public interface Accountable { 23 | /** Return the memory usage of this object in bytes. Negative values are illegal. */ 24 | long ramBytesUsed(); 25 | } 26 | -------------------------------------------------------------------------------- /java/tsfile/src/main/codegen/config.fmpp: -------------------------------------------------------------------------------- 1 | <#-- 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | --> 18 | 19 | data:{ 20 | tdd(../dataModel/AllFilter.tdd) 21 | } -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/common/regexp/Matcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.common.regexp; 21 | 22 | public interface Matcher { 23 | boolean match(byte[] input, int offset, int length); 24 | } 25 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/common/regexp/pattern/Pattern.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.common.regexp.pattern; 21 | 22 | public interface Pattern {} 23 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/common/regexp/pattern/ZeroOrMore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.common.regexp.pattern; 21 | 22 | public class ZeroOrMore implements Pattern { 23 | @Override 24 | public String toString() { 25 | return "%"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/compatibility/BufferDeserializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.compatibility; 21 | 22 | import java.nio.ByteBuffer; 23 | 24 | public interface BufferDeserializer { 25 | T deserialize(ByteBuffer buffer, DeserializeConfig context); 26 | } 27 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/compatibility/StreamDeserializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.compatibility; 21 | 22 | import java.io.IOException; 23 | import java.io.InputStream; 24 | 25 | public interface StreamDeserializer { 26 | T deserialize(InputStream inputStream, DeserializeConfig context) throws IOException; 27 | } 28 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/exception/IllegalDeviceIDException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.exception; 21 | 22 | public class IllegalDeviceIDException extends RuntimeException { 23 | 24 | public IllegalDeviceIDException(String message) { 25 | super(message); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/exception/PathParseException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.exception; 21 | 22 | public class PathParseException extends TsFileRuntimeException { 23 | 24 | public PathParseException(String path) { 25 | super(String.format("%s is not a legal path.", path)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/exception/StopReadTsFileByInterruptException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.exception; 21 | 22 | import java.io.IOException; 23 | 24 | public class StopReadTsFileByInterruptException extends IOException {} 25 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/exception/TsFileStatisticsMistakesException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.exception; 21 | 22 | public class TsFileStatisticsMistakesException extends TsFileRuntimeException { 23 | 24 | public TsFileStatisticsMistakesException(String message) { 25 | super(message); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/exception/cache/CacheException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.exception.cache; 21 | 22 | public class CacheException extends Exception { 23 | public CacheException(String message) { 24 | super(message); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/exception/filter/QueryFilterOptimizationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.exception.filter; 21 | 22 | public class QueryFilterOptimizationException extends Exception { 23 | 24 | public QueryFilterOptimizationException(String msg) { 25 | super(msg); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/exception/read/NoColumnException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.exception.read; 21 | 22 | public class NoColumnException extends ReadProcessException { 23 | 24 | public NoColumnException(String columnName) { 25 | super(String.format("No column: %s", columnName)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/exception/write/NoTableException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.exception.write; 21 | 22 | public class NoTableException extends WriteProcessException { 23 | 24 | public NoTableException(String tableName) { 25 | super(String.format("Table %s not found", tableName)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/fileSystem/FSType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.fileSystem; 21 | 22 | public enum FSType { 23 | LOCAL, 24 | HDFS, 25 | OBJECT_STORAGE, 26 | } 27 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/fileSystem/fileOutputFactory/FileOutputFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.fileSystem.fileOutputFactory; 21 | 22 | import org.apache.tsfile.write.writer.TsFileOutput; 23 | 24 | public interface FileOutputFactory { 25 | 26 | TsFileOutput getTsFileOutput(String filePath, boolean append); 27 | } 28 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/read/common/type/AbstractType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * License); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.read.common.type; 21 | 22 | public abstract class AbstractType implements Type { 23 | 24 | @Override 25 | public String toString() { 26 | return getDisplayName(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/read/expression/IUnaryExpression.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.read.expression; 21 | 22 | import org.apache.tsfile.read.filter.basic.Filter; 23 | 24 | public interface IUnaryExpression extends IExpression { 25 | 26 | Filter getFilter(); 27 | 28 | void setFilter(Filter filter); 29 | } 30 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/read/query/timegenerator/node/NodeType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.tsfile.read.query.timegenerator.node; 21 | 22 | /** Type of the node. */ 23 | public enum NodeType { 24 | AND, 25 | OR, 26 | LEAF 27 | } 28 | -------------------------------------------------------------------------------- /java/tsfile/src/main/java/org/apache/tsfile/write/writer/IDataWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.tsfile.write.writer; 20 | 21 | public interface IDataWriter {} 22 | -------------------------------------------------------------------------------- /java/tsfile/src/test/resources/v3TsFile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/tsfile/6672d2dade4fb3b44f0c663a12a2c9d1c6bb698e/java/tsfile/src/test/resources/v3TsFile -------------------------------------------------------------------------------- /python/requirements.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | cython==3.0.10 21 | numpy==1.26.4 22 | pandas==2.2.2 23 | setuptools==78.1.1 24 | wheel==0.45.1 25 | 26 | -------------------------------------------------------------------------------- /python/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | -------------------------------------------------------------------------------- /python/tsfile/__init__.pxd: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. --------------------------------------------------------------------------------