├── .gitignore
├── LICENSE
├── README.md
├── README_CN.md
├── backage.proto
├── doc
├── IL3.md
├── il_select3.md
├── root_set_trace.md
└── tutorial.md
├── ebc
├── AST.cs
├── Backage.cs
├── Logger.cs
├── Program.cs
├── analyzer
│ ├── Semantic.cs
│ ├── Symbol.cs
│ └── pass
│ │ ├── FstPass.cs
│ │ ├── SndPass.cs
│ │ └── TrdPass.cs
├── codegen
│ ├── Assembly.cs
│ ├── Bytecode.cs
│ └── ILGen.cs
├── draft.md
├── ebc.csproj
├── evoBasic.g4
├── parser
│ ├── evoBasic.interp
│ ├── evoBasic.tokens
│ ├── evoBasicBaseListener.cs
│ ├── evoBasicBaseVisitor.cs
│ ├── evoBasicLexer.cs
│ ├── evoBasicLexer.interp
│ ├── evoBasicLexer.tokens
│ ├── evoBasicListener.cs
│ ├── evoBasicParser.cs
│ └── evoBasicVisitor.cs
└── utils
│ ├── ASCIITree.cs
│ ├── Dump.cs
│ ├── Source.cs
│ └── Utils.cs
├── evm
├── CMakeLists.txt
├── CMakeSettings.json
├── asciitree.h
├── backage.pb.cc
├── backage.pb.h
├── bytecode.h
├── dependencies.h
├── deps
│ ├── bin
│ │ └── windows_x64
│ │ │ ├── icudt70.dll
│ │ │ ├── icuin70.dll
│ │ │ ├── icuio70.dll
│ │ │ ├── icutu70.dll
│ │ │ ├── icuuc70.dll
│ │ │ ├── libffi.dll
│ │ │ └── protoc.exe
│ └── include
│ │ ├── ffi.h
│ │ ├── ffitarget.h
│ │ ├── google
│ │ └── protobuf
│ │ │ ├── any.cc
│ │ │ ├── any.h
│ │ │ ├── any.pb.cc
│ │ │ ├── any.pb.h
│ │ │ ├── any.proto
│ │ │ ├── any_lite.cc
│ │ │ ├── any_test.cc
│ │ │ ├── any_test.proto
│ │ │ ├── api.pb.cc
│ │ │ ├── api.pb.h
│ │ │ ├── api.proto
│ │ │ ├── arena.cc
│ │ │ ├── arena.h
│ │ │ ├── arena_impl.h
│ │ │ ├── arena_test_util.cc
│ │ │ ├── arena_test_util.h
│ │ │ ├── arena_unittest.cc
│ │ │ ├── arenastring.cc
│ │ │ ├── arenastring.h
│ │ │ ├── arenastring_unittest.cc
│ │ │ ├── arenaz_sampler.cc
│ │ │ ├── arenaz_sampler.h
│ │ │ ├── arenaz_sampler_test.cc
│ │ │ ├── compiler
│ │ │ ├── annotation_test_util.cc
│ │ │ ├── annotation_test_util.h
│ │ │ ├── code_generator.cc
│ │ │ ├── code_generator.h
│ │ │ ├── command_line_interface.cc
│ │ │ ├── command_line_interface.h
│ │ │ ├── command_line_interface_unittest.cc
│ │ │ ├── cpp
│ │ │ │ ├── bootstrap_unittest.cc
│ │ │ │ ├── cpp_generator.h
│ │ │ │ ├── enum.cc
│ │ │ │ ├── enum.h
│ │ │ │ ├── enum_field.cc
│ │ │ │ ├── enum_field.h
│ │ │ │ ├── extension.cc
│ │ │ │ ├── extension.h
│ │ │ │ ├── field.cc
│ │ │ │ ├── field.h
│ │ │ │ ├── file.cc
│ │ │ │ ├── file.h
│ │ │ │ ├── generator.cc
│ │ │ │ ├── generator.h
│ │ │ │ ├── helpers.cc
│ │ │ │ ├── helpers.h
│ │ │ │ ├── map_field.cc
│ │ │ │ ├── map_field.h
│ │ │ │ ├── message.cc
│ │ │ │ ├── message.h
│ │ │ │ ├── message_field.cc
│ │ │ │ ├── message_field.h
│ │ │ │ ├── message_layout_helper.h
│ │ │ │ ├── message_size_unittest.cc
│ │ │ │ ├── metadata_test.cc
│ │ │ │ ├── move_unittest.cc
│ │ │ │ ├── names.h
│ │ │ │ ├── options.h
│ │ │ │ ├── padding_optimizer.cc
│ │ │ │ ├── padding_optimizer.h
│ │ │ │ ├── parse_function_generator.cc
│ │ │ │ ├── parse_function_generator.h
│ │ │ │ ├── plugin_unittest.cc
│ │ │ │ ├── primitive_field.cc
│ │ │ │ ├── primitive_field.h
│ │ │ │ ├── service.cc
│ │ │ │ ├── service.h
│ │ │ │ ├── string_field.cc
│ │ │ │ ├── string_field.h
│ │ │ │ ├── test_bad_identifiers.proto
│ │ │ │ ├── test_large_enum_value.proto
│ │ │ │ ├── unittest.cc
│ │ │ │ ├── unittest.h
│ │ │ │ └── unittest.inc
│ │ │ ├── csharp
│ │ │ │ ├── csharp_bootstrap_unittest.cc
│ │ │ │ ├── csharp_doc_comment.cc
│ │ │ │ ├── csharp_doc_comment.h
│ │ │ │ ├── csharp_enum.cc
│ │ │ │ ├── csharp_enum.h
│ │ │ │ ├── csharp_enum_field.cc
│ │ │ │ ├── csharp_enum_field.h
│ │ │ │ ├── csharp_field_base.cc
│ │ │ │ ├── csharp_field_base.h
│ │ │ │ ├── csharp_generator.cc
│ │ │ │ ├── csharp_generator.h
│ │ │ │ ├── csharp_generator_unittest.cc
│ │ │ │ ├── csharp_helpers.cc
│ │ │ │ ├── csharp_helpers.h
│ │ │ │ ├── csharp_map_field.cc
│ │ │ │ ├── csharp_map_field.h
│ │ │ │ ├── csharp_message.cc
│ │ │ │ ├── csharp_message.h
│ │ │ │ ├── csharp_message_field.cc
│ │ │ │ ├── csharp_message_field.h
│ │ │ │ ├── csharp_names.h
│ │ │ │ ├── csharp_options.h
│ │ │ │ ├── csharp_primitive_field.cc
│ │ │ │ ├── csharp_primitive_field.h
│ │ │ │ ├── csharp_reflection_class.cc
│ │ │ │ ├── csharp_reflection_class.h
│ │ │ │ ├── csharp_repeated_enum_field.cc
│ │ │ │ ├── csharp_repeated_enum_field.h
│ │ │ │ ├── csharp_repeated_message_field.cc
│ │ │ │ ├── csharp_repeated_message_field.h
│ │ │ │ ├── csharp_repeated_primitive_field.cc
│ │ │ │ ├── csharp_repeated_primitive_field.h
│ │ │ │ ├── csharp_source_generator_base.cc
│ │ │ │ ├── csharp_source_generator_base.h
│ │ │ │ ├── csharp_wrapper_field.cc
│ │ │ │ └── csharp_wrapper_field.h
│ │ │ ├── importer.cc
│ │ │ ├── importer.h
│ │ │ ├── importer_unittest.cc
│ │ │ ├── java
│ │ │ │ ├── context.cc
│ │ │ │ ├── context.h
│ │ │ │ ├── doc_comment.cc
│ │ │ │ ├── doc_comment.h
│ │ │ │ ├── doc_comment_unittest.cc
│ │ │ │ ├── enum.cc
│ │ │ │ ├── enum.h
│ │ │ │ ├── enum_field.cc
│ │ │ │ ├── enum_field.h
│ │ │ │ ├── enum_field_lite.cc
│ │ │ │ ├── enum_field_lite.h
│ │ │ │ ├── enum_lite.cc
│ │ │ │ ├── enum_lite.h
│ │ │ │ ├── extension.cc
│ │ │ │ ├── extension.h
│ │ │ │ ├── extension_lite.cc
│ │ │ │ ├── extension_lite.h
│ │ │ │ ├── field.cc
│ │ │ │ ├── field.h
│ │ │ │ ├── file.cc
│ │ │ │ ├── file.h
│ │ │ │ ├── generator.cc
│ │ │ │ ├── generator.h
│ │ │ │ ├── generator_factory.cc
│ │ │ │ ├── generator_factory.h
│ │ │ │ ├── helpers.cc
│ │ │ │ ├── helpers.h
│ │ │ │ ├── java_generator.h
│ │ │ │ ├── kotlin_generator.cc
│ │ │ │ ├── kotlin_generator.h
│ │ │ │ ├── map_field.cc
│ │ │ │ ├── map_field.h
│ │ │ │ ├── map_field_lite.cc
│ │ │ │ ├── map_field_lite.h
│ │ │ │ ├── message.cc
│ │ │ │ ├── message.h
│ │ │ │ ├── message_builder.cc
│ │ │ │ ├── message_builder.h
│ │ │ │ ├── message_builder_lite.cc
│ │ │ │ ├── message_builder_lite.h
│ │ │ │ ├── message_field.cc
│ │ │ │ ├── message_field.h
│ │ │ │ ├── message_field_lite.cc
│ │ │ │ ├── message_field_lite.h
│ │ │ │ ├── message_lite.cc
│ │ │ │ ├── message_lite.h
│ │ │ │ ├── name_resolver.cc
│ │ │ │ ├── name_resolver.h
│ │ │ │ ├── names.h
│ │ │ │ ├── options.h
│ │ │ │ ├── plugin_unittest.cc
│ │ │ │ ├── primitive_field.cc
│ │ │ │ ├── primitive_field.h
│ │ │ │ ├── primitive_field_lite.cc
│ │ │ │ ├── primitive_field_lite.h
│ │ │ │ ├── service.cc
│ │ │ │ ├── service.h
│ │ │ │ ├── shared_code_generator.cc
│ │ │ │ ├── shared_code_generator.h
│ │ │ │ ├── string_field.cc
│ │ │ │ ├── string_field.h
│ │ │ │ ├── string_field_lite.cc
│ │ │ │ └── string_field_lite.h
│ │ │ ├── main.cc
│ │ │ ├── mock_code_generator.cc
│ │ │ ├── mock_code_generator.h
│ │ │ ├── objectivec
│ │ │ │ ├── objectivec_enum.cc
│ │ │ │ ├── objectivec_enum.h
│ │ │ │ ├── objectivec_enum_field.cc
│ │ │ │ ├── objectivec_enum_field.h
│ │ │ │ ├── objectivec_extension.cc
│ │ │ │ ├── objectivec_extension.h
│ │ │ │ ├── objectivec_field.cc
│ │ │ │ ├── objectivec_field.h
│ │ │ │ ├── objectivec_file.cc
│ │ │ │ ├── objectivec_file.h
│ │ │ │ ├── objectivec_generator.cc
│ │ │ │ ├── objectivec_generator.h
│ │ │ │ ├── objectivec_helpers.cc
│ │ │ │ ├── objectivec_helpers.h
│ │ │ │ ├── objectivec_helpers_unittest.cc
│ │ │ │ ├── objectivec_map_field.cc
│ │ │ │ ├── objectivec_map_field.h
│ │ │ │ ├── objectivec_message.cc
│ │ │ │ ├── objectivec_message.h
│ │ │ │ ├── objectivec_message_field.cc
│ │ │ │ ├── objectivec_message_field.h
│ │ │ │ ├── objectivec_nsobject_methods.h
│ │ │ │ ├── objectivec_oneof.cc
│ │ │ │ ├── objectivec_oneof.h
│ │ │ │ ├── objectivec_primitive_field.cc
│ │ │ │ └── objectivec_primitive_field.h
│ │ │ ├── package_info.h
│ │ │ ├── parser.cc
│ │ │ ├── parser.h
│ │ │ ├── parser_unittest.cc
│ │ │ ├── php
│ │ │ │ ├── php_generator.cc
│ │ │ │ └── php_generator.h
│ │ │ ├── plugin.cc
│ │ │ ├── plugin.h
│ │ │ ├── plugin.pb.cc
│ │ │ ├── plugin.pb.h
│ │ │ ├── plugin.proto
│ │ │ ├── python
│ │ │ │ ├── generator.cc
│ │ │ │ ├── generator.h
│ │ │ │ ├── helpers.cc
│ │ │ │ ├── helpers.h
│ │ │ │ ├── plugin_unittest.cc
│ │ │ │ ├── pyi_generator.cc
│ │ │ │ ├── pyi_generator.h
│ │ │ │ └── python_generator.h
│ │ │ ├── ruby
│ │ │ │ ├── ruby_generated_code.proto
│ │ │ │ ├── ruby_generated_code_pb.rb
│ │ │ │ ├── ruby_generated_code_proto2.proto
│ │ │ │ ├── ruby_generated_code_proto2_import.proto
│ │ │ │ ├── ruby_generated_code_proto2_pb.rb
│ │ │ │ ├── ruby_generated_pkg_explicit.proto
│ │ │ │ ├── ruby_generated_pkg_explicit_legacy.proto
│ │ │ │ ├── ruby_generated_pkg_explicit_legacy_pb.rb
│ │ │ │ ├── ruby_generated_pkg_explicit_pb.rb
│ │ │ │ ├── ruby_generated_pkg_implicit.proto
│ │ │ │ ├── ruby_generated_pkg_implicit_pb.rb
│ │ │ │ ├── ruby_generator.cc
│ │ │ │ ├── ruby_generator.h
│ │ │ │ └── ruby_generator_unittest.cc
│ │ │ ├── scc.h
│ │ │ ├── subprocess.cc
│ │ │ ├── subprocess.h
│ │ │ ├── test_plugin.cc
│ │ │ ├── zip_output_unittest.sh
│ │ │ ├── zip_writer.cc
│ │ │ └── zip_writer.h
│ │ │ ├── descriptor.cc
│ │ │ ├── descriptor.h
│ │ │ ├── descriptor.pb.cc
│ │ │ ├── descriptor.pb.h
│ │ │ ├── descriptor.proto
│ │ │ ├── descriptor_database.cc
│ │ │ ├── descriptor_database.h
│ │ │ ├── descriptor_database_unittest.cc
│ │ │ ├── descriptor_unittest.cc
│ │ │ ├── drop_unknown_fields_test.cc
│ │ │ ├── duration.pb.cc
│ │ │ ├── duration.pb.h
│ │ │ ├── duration.proto
│ │ │ ├── dynamic_message.cc
│ │ │ ├── dynamic_message.h
│ │ │ ├── dynamic_message_unittest.cc
│ │ │ ├── empty.pb.cc
│ │ │ ├── empty.pb.h
│ │ │ ├── empty.proto
│ │ │ ├── endian.h
│ │ │ ├── explicitly_constructed.h
│ │ │ ├── extension_set.cc
│ │ │ ├── extension_set.h
│ │ │ ├── extension_set_heavy.cc
│ │ │ ├── extension_set_inl.h
│ │ │ ├── extension_set_unittest.cc
│ │ │ ├── field_access_listener.h
│ │ │ ├── field_mask.pb.cc
│ │ │ ├── field_mask.pb.h
│ │ │ ├── field_mask.proto
│ │ │ ├── generated_enum_reflection.h
│ │ │ ├── generated_enum_util.cc
│ │ │ ├── generated_enum_util.h
│ │ │ ├── generated_message_bases.cc
│ │ │ ├── generated_message_bases.h
│ │ │ ├── generated_message_reflection.cc
│ │ │ ├── generated_message_reflection.h
│ │ │ ├── generated_message_reflection_unittest.cc
│ │ │ ├── generated_message_tctable_decl.h
│ │ │ ├── generated_message_tctable_full.cc
│ │ │ ├── generated_message_tctable_impl.h
│ │ │ ├── generated_message_tctable_lite.cc
│ │ │ ├── generated_message_tctable_lite_test.cc
│ │ │ ├── generated_message_util.cc
│ │ │ ├── generated_message_util.h
│ │ │ ├── has_bits.h
│ │ │ ├── implicit_weak_message.cc
│ │ │ ├── implicit_weak_message.h
│ │ │ ├── inlined_string_field.cc
│ │ │ ├── inlined_string_field.h
│ │ │ ├── inlined_string_field_unittest.cc
│ │ │ ├── io
│ │ │ ├── coded_stream.cc
│ │ │ ├── coded_stream.h
│ │ │ ├── coded_stream_unittest.cc
│ │ │ ├── gzip_stream.cc
│ │ │ ├── gzip_stream.h
│ │ │ ├── gzip_stream_unittest.sh
│ │ │ ├── io_win32.cc
│ │ │ ├── io_win32.h
│ │ │ ├── io_win32_unittest.cc
│ │ │ ├── package_info.h
│ │ │ ├── printer.cc
│ │ │ ├── printer.h
│ │ │ ├── printer_unittest.cc
│ │ │ ├── strtod.cc
│ │ │ ├── strtod.h
│ │ │ ├── tokenizer.cc
│ │ │ ├── tokenizer.h
│ │ │ ├── tokenizer_unittest.cc
│ │ │ ├── zero_copy_stream.cc
│ │ │ ├── zero_copy_stream.h
│ │ │ ├── zero_copy_stream_impl.cc
│ │ │ ├── zero_copy_stream_impl.h
│ │ │ ├── zero_copy_stream_impl_lite.cc
│ │ │ ├── zero_copy_stream_impl_lite.h
│ │ │ └── zero_copy_stream_unittest.cc
│ │ │ ├── lite_arena_unittest.cc
│ │ │ ├── lite_unittest.cc
│ │ │ ├── map.cc
│ │ │ ├── map.h
│ │ │ ├── map_entry.h
│ │ │ ├── map_entry_lite.h
│ │ │ ├── map_field.cc
│ │ │ ├── map_field.h
│ │ │ ├── map_field_inl.h
│ │ │ ├── map_field_lite.h
│ │ │ ├── map_field_test.cc
│ │ │ ├── map_lite_test_util.cc
│ │ │ ├── map_lite_test_util.h
│ │ │ ├── map_lite_unittest.proto
│ │ │ ├── map_proto2_unittest.proto
│ │ │ ├── map_test.cc
│ │ │ ├── map_test.inc
│ │ │ ├── map_test_util.h
│ │ │ ├── map_test_util.inc
│ │ │ ├── map_test_util_impl.h
│ │ │ ├── map_type_handler.h
│ │ │ ├── map_unittest.proto
│ │ │ ├── message.cc
│ │ │ ├── message.h
│ │ │ ├── message_lite.cc
│ │ │ ├── message_lite.h
│ │ │ ├── message_unittest.cc
│ │ │ ├── message_unittest.inc
│ │ │ ├── metadata.h
│ │ │ ├── metadata_lite.h
│ │ │ ├── no_field_presence_test.cc
│ │ │ ├── package_info.h
│ │ │ ├── parse_context.cc
│ │ │ ├── parse_context.h
│ │ │ ├── port.h
│ │ │ ├── port_def.inc
│ │ │ ├── port_undef.inc
│ │ │ ├── preserve_unknown_enum_test.cc
│ │ │ ├── proto3_arena_lite_unittest.cc
│ │ │ ├── proto3_arena_unittest.cc
│ │ │ ├── proto3_lite_unittest.cc
│ │ │ ├── proto3_lite_unittest.inc
│ │ │ ├── reflection.h
│ │ │ ├── reflection_internal.h
│ │ │ ├── reflection_ops.cc
│ │ │ ├── reflection_ops.h
│ │ │ ├── reflection_ops_unittest.cc
│ │ │ ├── reflection_tester.cc
│ │ │ ├── reflection_tester.h
│ │ │ ├── repeated_field.cc
│ │ │ ├── repeated_field.h
│ │ │ ├── repeated_field_reflection_unittest.cc
│ │ │ ├── repeated_field_unittest.cc
│ │ │ ├── repeated_ptr_field.cc
│ │ │ ├── repeated_ptr_field.h
│ │ │ ├── service.cc
│ │ │ ├── service.h
│ │ │ ├── source_context.pb.cc
│ │ │ ├── source_context.pb.h
│ │ │ ├── source_context.proto
│ │ │ ├── string_member_robber.h
│ │ │ ├── struct.pb.cc
│ │ │ ├── struct.pb.h
│ │ │ ├── struct.proto
│ │ │ ├── stubs
│ │ │ ├── bytestream.cc
│ │ │ ├── bytestream.h
│ │ │ ├── bytestream_unittest.cc
│ │ │ ├── callback.h
│ │ │ ├── casts.h
│ │ │ ├── common.cc
│ │ │ ├── common.h
│ │ │ ├── common_unittest.cc
│ │ │ ├── hash.h
│ │ │ ├── int128.cc
│ │ │ ├── int128.h
│ │ │ ├── int128_unittest.cc
│ │ │ ├── logging.h
│ │ │ ├── macros.h
│ │ │ ├── map_util.h
│ │ │ ├── mathutil.h
│ │ │ ├── mutex.h
│ │ │ ├── once.h
│ │ │ ├── platform_macros.h
│ │ │ ├── port.h
│ │ │ ├── status.cc
│ │ │ ├── status.h
│ │ │ ├── status_macros.h
│ │ │ ├── status_test.cc
│ │ │ ├── statusor.cc
│ │ │ ├── statusor.h
│ │ │ ├── statusor_test.cc
│ │ │ ├── stl_util.h
│ │ │ ├── stringpiece.cc
│ │ │ ├── stringpiece.h
│ │ │ ├── stringpiece_unittest.cc
│ │ │ ├── stringprintf.cc
│ │ │ ├── stringprintf.h
│ │ │ ├── stringprintf_unittest.cc
│ │ │ ├── structurally_valid.cc
│ │ │ ├── structurally_valid_unittest.cc
│ │ │ ├── strutil.cc
│ │ │ ├── strutil.h
│ │ │ ├── strutil_unittest.cc
│ │ │ ├── substitute.cc
│ │ │ ├── substitute.h
│ │ │ ├── template_util.h
│ │ │ ├── template_util_unittest.cc
│ │ │ ├── time.cc
│ │ │ ├── time.h
│ │ │ └── time_test.cc
│ │ │ ├── test_messages_proto2.proto
│ │ │ ├── test_messages_proto3.proto
│ │ │ ├── test_util.cc
│ │ │ ├── test_util.h
│ │ │ ├── test_util.inc
│ │ │ ├── test_util2.h
│ │ │ ├── test_util_lite.cc
│ │ │ ├── test_util_lite.h
│ │ │ ├── testdata
│ │ │ ├── bad_utf8_string
│ │ │ ├── golden_message
│ │ │ ├── golden_message_maps
│ │ │ ├── golden_message_oneof_implemented
│ │ │ ├── golden_message_proto3
│ │ │ ├── golden_packed_fields_message
│ │ │ ├── map_test_data.txt
│ │ │ ├── text_format_unittest_data.txt
│ │ │ ├── text_format_unittest_data_oneof_implemented.txt
│ │ │ ├── text_format_unittest_data_pointy.txt
│ │ │ ├── text_format_unittest_data_pointy_oneof.txt
│ │ │ ├── text_format_unittest_extensions_data.txt
│ │ │ └── text_format_unittest_extensions_data_pointy.txt
│ │ │ ├── testing
│ │ │ ├── file.cc
│ │ │ ├── file.h
│ │ │ ├── googletest.cc
│ │ │ ├── googletest.h
│ │ │ ├── zcgunzip.cc
│ │ │ └── zcgzip.cc
│ │ │ ├── text_format.cc
│ │ │ ├── text_format.h
│ │ │ ├── text_format_unittest.cc
│ │ │ ├── timestamp.pb.cc
│ │ │ ├── timestamp.pb.h
│ │ │ ├── timestamp.proto
│ │ │ ├── type.pb.cc
│ │ │ ├── type.pb.h
│ │ │ ├── type.proto
│ │ │ ├── unittest.proto
│ │ │ ├── unittest_arena.proto
│ │ │ ├── unittest_custom_options.proto
│ │ │ ├── unittest_drop_unknown_fields.proto
│ │ │ ├── unittest_embed_optimize_for.proto
│ │ │ ├── unittest_empty.proto
│ │ │ ├── unittest_enormous_descriptor.proto
│ │ │ ├── unittest_import.proto
│ │ │ ├── unittest_import_lite.proto
│ │ │ ├── unittest_import_public.proto
│ │ │ ├── unittest_import_public_lite.proto
│ │ │ ├── unittest_lazy_dependencies.proto
│ │ │ ├── unittest_lazy_dependencies_custom_option.proto
│ │ │ ├── unittest_lazy_dependencies_enum.proto
│ │ │ ├── unittest_lite.proto
│ │ │ ├── unittest_lite_imports_nonlite.proto
│ │ │ ├── unittest_mset.proto
│ │ │ ├── unittest_mset_wire_format.proto
│ │ │ ├── unittest_no_field_presence.proto
│ │ │ ├── unittest_no_generic_services.proto
│ │ │ ├── unittest_optimize_for.proto
│ │ │ ├── unittest_preserve_unknown_enum.proto
│ │ │ ├── unittest_preserve_unknown_enum2.proto
│ │ │ ├── unittest_proto3.proto
│ │ │ ├── unittest_proto3_arena.proto
│ │ │ ├── unittest_proto3_arena_lite.proto
│ │ │ ├── unittest_proto3_lite.proto
│ │ │ ├── unittest_proto3_optional.proto
│ │ │ ├── unittest_well_known_types.proto
│ │ │ ├── unknown_field_set.cc
│ │ │ ├── unknown_field_set.h
│ │ │ ├── unknown_field_set_unittest.cc
│ │ │ ├── util
│ │ │ ├── delimited_message_util.cc
│ │ │ ├── delimited_message_util.h
│ │ │ ├── delimited_message_util_test.cc
│ │ │ ├── field_comparator.cc
│ │ │ ├── field_comparator.h
│ │ │ ├── field_comparator_test.cc
│ │ │ ├── field_mask_util.cc
│ │ │ ├── field_mask_util.h
│ │ │ ├── field_mask_util_test.cc
│ │ │ ├── internal
│ │ │ │ ├── constants.h
│ │ │ │ ├── datapiece.cc
│ │ │ │ ├── datapiece.h
│ │ │ │ ├── default_value_objectwriter.cc
│ │ │ │ ├── default_value_objectwriter.h
│ │ │ │ ├── default_value_objectwriter_test.cc
│ │ │ │ ├── error_listener.cc
│ │ │ │ ├── error_listener.h
│ │ │ │ ├── expecting_objectwriter.h
│ │ │ │ ├── field_mask_utility.cc
│ │ │ │ ├── field_mask_utility.h
│ │ │ │ ├── json_escaping.cc
│ │ │ │ ├── json_escaping.h
│ │ │ │ ├── json_objectwriter.cc
│ │ │ │ ├── json_objectwriter.h
│ │ │ │ ├── json_objectwriter_test.cc
│ │ │ │ ├── json_stream_parser.cc
│ │ │ │ ├── json_stream_parser.h
│ │ │ │ ├── json_stream_parser_test.cc
│ │ │ │ ├── location_tracker.h
│ │ │ │ ├── mock_error_listener.h
│ │ │ │ ├── object_location_tracker.h
│ │ │ │ ├── object_source.h
│ │ │ │ ├── object_writer.cc
│ │ │ │ ├── object_writer.h
│ │ │ │ ├── proto_writer.cc
│ │ │ │ ├── proto_writer.h
│ │ │ │ ├── protostream_objectsource.cc
│ │ │ │ ├── protostream_objectsource.h
│ │ │ │ ├── protostream_objectsource_test.cc
│ │ │ │ ├── protostream_objectwriter.cc
│ │ │ │ ├── protostream_objectwriter.h
│ │ │ │ ├── protostream_objectwriter_test.cc
│ │ │ │ ├── structured_objectwriter.h
│ │ │ │ ├── testdata
│ │ │ │ │ ├── anys.proto
│ │ │ │ │ ├── books.proto
│ │ │ │ │ ├── default_value.proto
│ │ │ │ │ ├── default_value_test.proto
│ │ │ │ │ ├── field_mask.proto
│ │ │ │ │ ├── maps.proto
│ │ │ │ │ ├── oneofs.proto
│ │ │ │ │ ├── proto3.proto
│ │ │ │ │ ├── struct.proto
│ │ │ │ │ ├── timestamp_duration.proto
│ │ │ │ │ └── wrappers.proto
│ │ │ │ ├── type_info.cc
│ │ │ │ ├── type_info.h
│ │ │ │ ├── type_info_test_helper.cc
│ │ │ │ ├── type_info_test_helper.h
│ │ │ │ ├── utility.cc
│ │ │ │ └── utility.h
│ │ │ ├── json_format.proto
│ │ │ ├── json_format_proto3.proto
│ │ │ ├── json_util.cc
│ │ │ ├── json_util.h
│ │ │ ├── json_util_test.cc
│ │ │ ├── message_differencer.cc
│ │ │ ├── message_differencer.h
│ │ │ ├── message_differencer_unittest.cc
│ │ │ ├── message_differencer_unittest.proto
│ │ │ ├── package_info.h
│ │ │ ├── time_util.cc
│ │ │ ├── time_util.h
│ │ │ ├── time_util_test.cc
│ │ │ ├── type_resolver.h
│ │ │ ├── type_resolver_util.cc
│ │ │ ├── type_resolver_util.h
│ │ │ └── type_resolver_util_test.cc
│ │ │ ├── well_known_types_unittest.cc
│ │ │ ├── wire_format.cc
│ │ │ ├── wire_format.h
│ │ │ ├── wire_format_lite.cc
│ │ │ ├── wire_format_lite.h
│ │ │ ├── wire_format_unittest.cc
│ │ │ ├── wire_format_unittest.inc
│ │ │ ├── wrappers.pb.cc
│ │ │ ├── wrappers.pb.h
│ │ │ └── wrappers.proto
│ │ └── unicode
│ │ ├── alphaindex.h
│ │ ├── appendable.h
│ │ ├── basictz.h
│ │ ├── brkiter.h
│ │ ├── bytestream.h
│ │ ├── bytestrie.h
│ │ ├── bytestriebuilder.h
│ │ ├── calendar.h
│ │ ├── caniter.h
│ │ ├── casemap.h
│ │ ├── char16ptr.h
│ │ ├── chariter.h
│ │ ├── choicfmt.h
│ │ ├── coleitr.h
│ │ ├── coll.h
│ │ ├── compactdecimalformat.h
│ │ ├── curramt.h
│ │ ├── currpinf.h
│ │ ├── currunit.h
│ │ ├── datefmt.h
│ │ ├── dbbi.h
│ │ ├── dcfmtsym.h
│ │ ├── decimfmt.h
│ │ ├── docmain.h
│ │ ├── dtfmtsym.h
│ │ ├── dtintrv.h
│ │ ├── dtitvfmt.h
│ │ ├── dtitvinf.h
│ │ ├── dtptngen.h
│ │ ├── dtrule.h
│ │ ├── edits.h
│ │ ├── enumset.h
│ │ ├── errorcode.h
│ │ ├── fieldpos.h
│ │ ├── filteredbrk.h
│ │ ├── fmtable.h
│ │ ├── format.h
│ │ ├── formattedvalue.h
│ │ ├── fpositer.h
│ │ ├── gender.h
│ │ ├── gregocal.h
│ │ ├── icudataver.h
│ │ ├── icuplug.h
│ │ ├── idna.h
│ │ ├── listformatter.h
│ │ ├── localebuilder.h
│ │ ├── localematcher.h
│ │ ├── localpointer.h
│ │ ├── locdspnm.h
│ │ ├── locid.h
│ │ ├── measfmt.h
│ │ ├── measunit.h
│ │ ├── measure.h
│ │ ├── messagepattern.h
│ │ ├── msgfmt.h
│ │ ├── normalizer2.h
│ │ ├── normlzr.h
│ │ ├── nounit.h
│ │ ├── numberformatter.h
│ │ ├── numberrangeformatter.h
│ │ ├── numfmt.h
│ │ ├── numsys.h
│ │ ├── parseerr.h
│ │ ├── parsepos.h
│ │ ├── platform.h
│ │ ├── plurfmt.h
│ │ ├── plurrule.h
│ │ ├── ptypes.h
│ │ ├── putil.h
│ │ ├── rbbi.h
│ │ ├── rbnf.h
│ │ ├── rbtz.h
│ │ ├── regex.h
│ │ ├── region.h
│ │ ├── reldatefmt.h
│ │ ├── rep.h
│ │ ├── resbund.h
│ │ ├── schriter.h
│ │ ├── scientificnumberformatter.h
│ │ ├── search.h
│ │ ├── selfmt.h
│ │ ├── simpleformatter.h
│ │ ├── simpletz.h
│ │ ├── smpdtfmt.h
│ │ ├── sortkey.h
│ │ ├── std_string.h
│ │ ├── strenum.h
│ │ ├── stringoptions.h
│ │ ├── stringpiece.h
│ │ ├── stringtriebuilder.h
│ │ ├── stsearch.h
│ │ ├── symtable.h
│ │ ├── tblcoll.h
│ │ ├── timezone.h
│ │ ├── tmunit.h
│ │ ├── tmutamt.h
│ │ ├── tmutfmt.h
│ │ ├── translit.h
│ │ ├── tzfmt.h
│ │ ├── tznames.h
│ │ ├── tzrule.h
│ │ ├── tztrans.h
│ │ ├── ubidi.h
│ │ ├── ubiditransform.h
│ │ ├── ubrk.h
│ │ ├── ucal.h
│ │ ├── ucasemap.h
│ │ ├── ucat.h
│ │ ├── uchar.h
│ │ ├── ucharstrie.h
│ │ ├── ucharstriebuilder.h
│ │ ├── uchriter.h
│ │ ├── uclean.h
│ │ ├── ucnv.h
│ │ ├── ucnv_cb.h
│ │ ├── ucnv_err.h
│ │ ├── ucnvsel.h
│ │ ├── ucol.h
│ │ ├── ucoleitr.h
│ │ ├── uconfig.h
│ │ ├── ucpmap.h
│ │ ├── ucptrie.h
│ │ ├── ucsdet.h
│ │ ├── ucurr.h
│ │ ├── udat.h
│ │ ├── udata.h
│ │ ├── udateintervalformat.h
│ │ ├── udatpg.h
│ │ ├── udisplaycontext.h
│ │ ├── uenum.h
│ │ ├── ufieldpositer.h
│ │ ├── uformattable.h
│ │ ├── uformattedvalue.h
│ │ ├── ugender.h
│ │ ├── uidna.h
│ │ ├── uiter.h
│ │ ├── uldnames.h
│ │ ├── ulistformatter.h
│ │ ├── uloc.h
│ │ ├── ulocdata.h
│ │ ├── umachine.h
│ │ ├── umisc.h
│ │ ├── umsg.h
│ │ ├── umutablecptrie.h
│ │ ├── unifilt.h
│ │ ├── unifunct.h
│ │ ├── unimatch.h
│ │ ├── unirepl.h
│ │ ├── uniset.h
│ │ ├── unistr.h
│ │ ├── unorm.h
│ │ ├── unorm2.h
│ │ ├── unum.h
│ │ ├── unumberformatter.h
│ │ ├── unumberrangeformatter.h
│ │ ├── unumsys.h
│ │ ├── uobject.h
│ │ ├── upluralrules.h
│ │ ├── uregex.h
│ │ ├── uregion.h
│ │ ├── ureldatefmt.h
│ │ ├── urename.h
│ │ ├── urep.h
│ │ ├── ures.h
│ │ ├── uscript.h
│ │ ├── usearch.h
│ │ ├── uset.h
│ │ ├── usetiter.h
│ │ ├── ushape.h
│ │ ├── uspoof.h
│ │ ├── usprep.h
│ │ ├── ustdio.h
│ │ ├── ustream.h
│ │ ├── ustring.h
│ │ ├── ustringtrie.h
│ │ ├── utext.h
│ │ ├── utf.h
│ │ ├── utf16.h
│ │ ├── utf32.h
│ │ ├── utf8.h
│ │ ├── utf_old.h
│ │ ├── utmscale.h
│ │ ├── utrace.h
│ │ ├── utrans.h
│ │ ├── utypes.h
│ │ ├── uvernum.h
│ │ ├── uversion.h
│ │ └── vtzone.h
├── ebffi.cpp
├── ebffi.h
├── gc.h
├── interop.cpp
├── interop.h
├── loader.cpp
├── loader.h
├── main.cpp
├── processor.cpp
├── processor.h
├── runtime.cpp
├── runtime.h
├── unicode.cpp
├── unicode.h
└── utils.h
├── langlibs
├── core
│ ├── Array.eb
│ ├── Box.eb
│ ├── Exception.eb
│ ├── LinkedList.eb
│ ├── List.eb
│ ├── Log.eb
│ ├── Object.eb
│ ├── Stack.eb
│ ├── String.eb
│ └── Text.eb
├── intrinsic.eb
├── math
│ └── random.eb
├── test.eb
└── test2.eb
├── testsuite
├── material
│ ├── 10_pass_optional_args.eb
│ ├── 11_pass_paramarray.eb
│ ├── 12_recursive_func.eb
│ ├── 13_enum.eb
│ ├── 14_userdefine_type.eb
│ ├── 15_class.eb
│ ├── 1_hello_world.eb
│ ├── 2_oneline_if.eb
│ ├── 3_if_then_elseif_else.eb
│ ├── 4_dim_special_types.eb
│ ├── 5_ops.eb
│ ├── 6_dim_assign.eb
│ ├── 7_loop.eb
│ ├── 8_array.eb
│ └── 9_pass_normal_args.eb
└── test.py
└── tool
├── debug.txt
└── log_analyzer.py
/.gitignore:
--------------------------------------------------------------------------------
1 | cmake-build-debug
2 | test/cmake-build-debug
3 | .idea
4 | .vscode
5 | doxygen.config
6 | latex
7 | html
8 | build
9 | .cache
10 | .vs
11 | out
12 | Debug
13 | tags
14 | .ycm_extra_conf.py
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Yorkin
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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # What is evoBasic
2 | ENG / [中文](/README_CN.md)
3 |
4 | EvoBasic is a "evolution version" of classic visual basic,which aims to offer simple syntax and modern features.
5 |
6 | It is an cross-platforms,object-oriented,strongly typed programming language, compiled to bytecode and run on evoBasic virtual machine.
7 |
8 | [Language manual](/doc/tutorial.md)
9 |
10 | # Features
11 |
12 | - Data encapsulation
13 |
14 | - Polymorphism
15 |
16 | - Inheritance
17 |
18 | - First-class functions
19 |
20 | # Syntax example
21 |
22 | ```vb
23 | Function Fibonacci(Byval x as Integer) As Integer
24 | If x == 0 Then
25 | Return 0
26 | ElseIf x == 1 Then
27 | Return 1
28 | Else
29 | Return Fibonacci(x - 1) + Fibonacci(x - 2)
30 | End if
31 | End Function
32 | ```
33 |
34 | ```vb
35 | Public Module UI
36 | Public Enum Message
37 | Update = 1
38 | Resize
39 | Hide
40 | End Enum
41 |
42 | Public Interface MessageReciver
43 | Function OnMessage(Byval msg as Message,Optional ByRef sender as UIObject) As Boolean
44 | End Interface
45 |
46 | Private Type Position
47 | x As Integer
48 | Y as Integer
49 | End Type
50 |
51 | Public Class Button Impl MessageReciver
52 | Private pos As Position
53 | Public Override Function OnMessage(Byval msg as Message,Optional ByRef sender as UIObject) As Boolean
54 | // process message...
55 | End Function
56 | End Class
57 | End Module
58 |
59 | Sub Main()
60 | Dim btn As UI.Button, msg As UI.Message
61 | btn = New UI.Button
62 | msg = UI.Message.Update
63 | btn.OnMessage(msg)
64 | End Sub
65 | ```
66 | For a complete definition about syntax, see [grammar.bnf](/doc/grammar.bnf).
67 |
68 |
69 | # Project status
70 |
71 | - [x] lexer and parser: generate parse tree
72 | - [x] semantic check: type check,generate symbol table and translate parse tree to abstract tree
73 | - [x] IL generator: translate abstract tree to intermediate language
74 | - [x] package file (.bkg) generator and loader
75 | - [ ] package manager
76 | - [x] evoBasic vm
77 |
78 |
79 |
--------------------------------------------------------------------------------
/README_CN.md:
--------------------------------------------------------------------------------
1 | # 啥是 evoBasic
2 |
3 | [ENG](/README.md) / 中文
4 |
5 | EvoBasic,即“基于VB6的进化”。它是跨平台、面向对象以及强类型的玩具编程语言,目标是拥有简单的语法和现代语言的特性。
6 | EvoBasic的代码被编译成字节码(.bkg文件),然后运行在自制的简单虚拟机上。
7 |
8 | [语言手册](/doc/tutorial.md)
9 |
10 | # 主要特性
11 |
12 | - 封装
13 |
14 | - 多态
15 |
16 | - 继承
17 |
18 | - 函数是第一公民
19 |
20 | # 语法示例
21 |
22 | ```vb
23 | Function Fibonacci(Byval x as Integer) As Integer
24 | If x == 0 Then
25 | Return 0
26 | ElseIf x == 1 Then
27 | Return 1
28 | Else
29 | Return Fibonacci(x - 1) + Fibonacci(x - 2)
30 | End if
31 | End Function
32 | ```
33 |
34 | ```vb
35 | Public Module UI
36 | Public Enum Message
37 | Update = 1
38 | Resize
39 | Hide
40 | End Enum
41 |
42 | Public Interface MessageReciver
43 | Function OnMessage(Byval msg as Message,Optional ByRef sender as UIObject) As Boolean
44 | End Interface
45 |
46 | Private Type Position
47 | x As Integer
48 | Y as Integer
49 | End Type
50 |
51 | Public Class Button Impl MessageReciver
52 | Private pos As Position
53 | Public Override Function OnMessage(Byval msg as Message,Optional ByRef sender as UIObject) As Boolean
54 | // process message...
55 | End Function
56 | End Class
57 | End Module
58 |
59 | Sub Main()
60 | Dim btn As UI.Button, msg As UI.Message
61 | btn = New UI.Button
62 | msg = UI.Message.Update
63 | btn.OnMessage(msg)
64 | End Sub
65 | ```
66 | 所有的语法定义,见 [grammar.bnf](/doc/grammar.bnf)。
67 |
68 |
69 | # 项目进展
70 |
71 | - [x] 词法分析和语法分析器
72 | - [x] 语义检查
73 | - [x] 中间代码生成
74 | - [x] 包文件 (.bkg) 生成和加载
75 | - [x] evoBasic 虚拟机
76 |
77 |
--------------------------------------------------------------------------------
/doc/root_set_trace.md:
--------------------------------------------------------------------------------
1 | # GC根集追踪
2 |
3 | - √ 表示该操作需要追踪
4 | - x 表示该操作不需要追踪
5 | - 留空表示该操作不存在
6 |
7 | |操作 |向操作栈写入引用|擦除操作栈中的引用|向变量写入引用|擦除变量中的引用|
8 | |-|-|-|-|-|
9 | |starg.ref | |√|√|√|
10 | |ldarg.ref |√| | | |
11 | |stloc.ref | |√|√|√|
12 | |ldloc.ref |√| | | |
13 | |stfld.ref | |√|x|x|
14 | |ldfld.ref |√| | | |
15 | |stsfld.ref | |√|√|√|
16 | |ldsfld.ref |√| | | |
17 | |stelemr.ref | |√|x|x|
18 | |stelem.ref | |√|x|x|
19 | |ldelem.ref |√| | | |
20 | |newarray |√| | | |
21 | |dup.ref |√| | | |
22 | |pop.ref | |√| | |
23 | |store.ref | |√|?|?|
24 | |load.ref |√| | | |
25 | |instanceof | |√| | |
26 | |ldstr |√| | | |
27 | |newobj |√| | | |
28 | |throw | |√| | |
29 | |压入函数栈 | |√|√| |
30 | |弹出函数栈 | | | |√|
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/ebc/draft.md:
--------------------------------------------------------------------------------
1 | ModName
2 | ClsName
3 | VarName
4 | FtnName
5 | ItfName
6 | EnumName
7 | EmConstName
8 |
9 | Mod Cls Var Ftn Itf Enum EnumConst Record
10 |
11 | Mod . Mod -> find snd mod in fst mod
12 | Mod . Cls -> find cls in mod
13 | Mod . Var -> find var in mod
14 | Mod . Ftn -> find ftn in mod
15 | Mod . Enum -> find enum in mod
16 | Mod . EmConst -> ERROR
17 |
18 | Cls . Mod -> ERROR
19 | Cls . Cls -> ERROR
20 | Cls . Var(Non-static) -> ERROR
21 | Cls . Var(Static) -> find static var in cls
22 | Cls . Ftn(Non-static) -> ERROR
23 | Cls . Ftn(Static) -> find static ftn in cls
24 | Cls . Enum -> find enum in cls
25 | Cls . EmConst -> ERROR
26 |
27 | Var . Mod -> ERROR
28 | Var . Cls -> ERROR
29 | Var . Var -> find snd var in fst var type
30 | Var . Ftn -> find ftn in var type
31 | Var . Enum -> ERROR
32 | Var . EmConst -> ERROR
33 |
34 | Ftn . Mod
35 | Ftn . Cls
36 | Ftn . Var
37 | Ftn . Enum
38 | Ftn . EmConst -> ERROR
39 |
40 | Enum . EmConst -> find EmConst in enum
41 |
42 | Record . Var -> find variable in record
43 |
44 |
45 |
--------------------------------------------------------------------------------
/ebc/ebc.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net6.0
6 | enable
7 | enable
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ebc/parser/evoBasic.tokens:
--------------------------------------------------------------------------------
1 | T__0=1
2 | T__1=2
3 | T__2=3
4 | T__3=4
5 | T__4=5
6 | T__5=6
7 | T__6=7
8 | T__7=8
9 | T__8=9
10 | T__9=10
11 | T__10=11
12 | T__11=12
13 | T__12=13
14 | T__13=14
15 | T__14=15
16 | T__15=16
17 | T__16=17
18 | T__17=18
19 | StringLiteral=19
20 | CharLiteral=20
21 | Digit=21
22 | FloatingPoint=22
23 | Comment=23
24 | BlockComment=24
25 | WS=25
26 | Impl=26
27 | Mod=27
28 | Const=28
29 | Continue=29
30 | Nothing=30
31 | Throw=31
32 | Extend=32
33 | Module=33
34 | True=34
35 | False=35
36 | New=36
37 | Xor=37
38 | Not=38
39 | And=39
40 | Or=40
41 | Try=41
42 | Catch=42
43 | Virtual=43
44 | Override=44
45 | Operator=45
46 | Factory=46
47 | Implements=47
48 | Import=48
49 | Class=49
50 | Preserve=50
51 | Redim=51
52 | ParamArray=52
53 | Declare=53
54 | Lib=54
55 | Enum=55
56 | If=56
57 | Super=57
58 | Wend=58
59 | From=59
60 | Namespace=60
61 | Implement=61
62 | Type=62
63 | Alias=63
64 | Self=64
65 | Static=65
66 | ModuleInfo=66
67 | Public=67
68 | Private=68
69 | Protected=69
70 | Get=70
71 | Set=71
72 | Property=72
73 | Var=73
74 | Dim=74
75 | Let=75
76 | Return=76
77 | Function=77
78 | Difference=78
79 | Union=79
80 | Case=80
81 | Select=81
82 | End=82
83 | Until=83
84 | Loop=84
85 | Exit=85
86 | While=86
87 | Do=87
88 | Each=88
89 | To=89
90 | Step=90
91 | Next=91
92 | In=92
93 | For=93
94 | Optional=94
95 | Byval=95
96 | Byref=96
97 | Then=97
98 | Else=98
99 | ElseIf=99
100 | Call=100
101 | Sub=101
102 | As=102
103 | Is=103
104 | ID=104
105 | ','=1
106 | '='=2
107 | '('=3
108 | ')'=4
109 | '+'=5
110 | '-'=6
111 | '*'=7
112 | '/'=8
113 | '.'=9
114 | '['=10
115 | ']'=11
116 | '<'=12
117 | '>'=13
118 | '\\'=14
119 | ':'=15
120 | '\n\r'=16
121 | '\n'=17
122 | '\r'=18
123 |
--------------------------------------------------------------------------------
/ebc/parser/evoBasicLexer.tokens:
--------------------------------------------------------------------------------
1 | T__0=1
2 | T__1=2
3 | T__2=3
4 | T__3=4
5 | T__4=5
6 | T__5=6
7 | T__6=7
8 | T__7=8
9 | T__8=9
10 | T__9=10
11 | T__10=11
12 | T__11=12
13 | T__12=13
14 | T__13=14
15 | T__14=15
16 | T__15=16
17 | T__16=17
18 | T__17=18
19 | StringLiteral=19
20 | CharLiteral=20
21 | Digit=21
22 | FloatingPoint=22
23 | Comment=23
24 | BlockComment=24
25 | WS=25
26 | Impl=26
27 | Mod=27
28 | Const=28
29 | Continue=29
30 | Nothing=30
31 | Throw=31
32 | Extend=32
33 | Module=33
34 | True=34
35 | False=35
36 | New=36
37 | Xor=37
38 | Not=38
39 | And=39
40 | Or=40
41 | Try=41
42 | Catch=42
43 | Virtual=43
44 | Override=44
45 | Operator=45
46 | Factory=46
47 | Implements=47
48 | Import=48
49 | Class=49
50 | Preserve=50
51 | Redim=51
52 | ParamArray=52
53 | Declare=53
54 | Lib=54
55 | Enum=55
56 | If=56
57 | Super=57
58 | Wend=58
59 | From=59
60 | Namespace=60
61 | Implement=61
62 | Type=62
63 | Alias=63
64 | Self=64
65 | Static=65
66 | ModuleInfo=66
67 | Public=67
68 | Private=68
69 | Protected=69
70 | Get=70
71 | Set=71
72 | Property=72
73 | Var=73
74 | Dim=74
75 | Let=75
76 | Return=76
77 | Function=77
78 | Difference=78
79 | Union=79
80 | Case=80
81 | Select=81
82 | End=82
83 | Until=83
84 | Loop=84
85 | Exit=85
86 | While=86
87 | Do=87
88 | Each=88
89 | To=89
90 | Step=90
91 | Next=91
92 | In=92
93 | For=93
94 | Optional=94
95 | Byval=95
96 | Byref=96
97 | Then=97
98 | Else=98
99 | ElseIf=99
100 | Call=100
101 | Sub=101
102 | As=102
103 | Is=103
104 | ID=104
105 | ','=1
106 | '='=2
107 | '('=3
108 | ')'=4
109 | '+'=5
110 | '-'=6
111 | '*'=7
112 | '/'=8
113 | '.'=9
114 | '['=10
115 | ']'=11
116 | '<'=12
117 | '>'=13
118 | '\\'=14
119 | ':'=15
120 | '\n\r'=16
121 | '\n'=17
122 | '\r'=18
123 |
--------------------------------------------------------------------------------
/ebc/utils/ASCIITree.cs:
--------------------------------------------------------------------------------
1 | public class Node{
2 | public Object value = null;
3 | public IEnumerable childs = new List();
4 | public override string ToString(){
5 | return Print("\n",true);
6 | }
7 | private string Print(string indent, bool isLast){
8 | string ret = indent;
9 | if(isLast){
10 | ret += " └─";
11 | indent += " ";
12 | }
13 | else{
14 | ret += " ├─";
15 | indent += " │ ";
16 | }
17 |
18 | if(value!=null){
19 | var content = value.ToString();
20 | if(content.Contains('\n')){
21 | var tmp = '╖' + content.Replace("\n",indent + "║");
22 | var index = tmp.LastIndexOf('║');
23 | ret += tmp.Remove(index,1).Insert(index,"╚");
24 | }
25 | else{
26 | ret += content;
27 | }
28 | }
29 |
30 | if(childs != null){
31 | int i = 0;
32 | foreach(var child in childs){
33 | ret += child.Print(indent,i==childs.Count()-1);
34 | i++;
35 | }
36 | }
37 |
38 | return ret;
39 | }
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/ebc/utils/Dump.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/ebc/utils/Dump.cs
--------------------------------------------------------------------------------
/evm/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.15)
2 |
3 | project(evm)
4 |
5 | set(CMAKE_CXX_STANDARD 20)
6 |
7 |
8 | if(WIN32)
9 | add_compile_options("$<$:/source-charset:utf-8>")
10 | add_compile_options("$<$:/source-charset:utf-8>")
11 | set(DEPS_BIN_DIR "${CMAKE_SOURCE_DIR}/deps/bin/windows_x64")
12 | elseif(LINUX)
13 | add_compile_options("$<$:-g>")
14 | add_compile_options("$<$:-O0>")
15 | set(DEPS_BIN_DIR "${CMAKE_SOURCE_DIR}/deps/bin/linux_64")
16 | endif()
17 |
18 | add_executable(evm
19 | main.cpp
20 | runtime.cpp
21 | loader.cpp
22 | unicode.cpp
23 | processor.cpp
24 | interop.cpp
25 | backage.pb.cc
26 | ebffi.cpp
27 | )
28 |
29 | if(WIN32)
30 | set_property(TARGET evm PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded")
31 | endif()
32 |
33 | target_include_directories(evm PRIVATE "${CMAKE_SOURCE_DIR}/deps/include")
34 |
35 | file(COPY "${DEPS_BIN_DIR}/" DESTINATION ${CMAKE_BINARY_DIR})
36 |
37 | target_link_directories(evm PRIVATE ${DEPS_BIN_DIR})
38 |
39 | target_link_libraries(evm PRIVATE protobuf icuuc libffi)
40 |
41 |
--------------------------------------------------------------------------------
/evm/CMakeSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "name": "x64-Debug",
5 | "generator": "Ninja",
6 | "configurationType": "Debug",
7 | "inheritEnvironments": [ "msvc_x64_x64" ],
8 | "buildRoot": "${projectDir}\\out\\build\\${name}",
9 | "installRoot": "${projectDir}\\out\\install\\${name}",
10 | "cmakeCommandArgs": "",
11 | "ctestCommandArgs": ""
12 | }
13 | ]
14 | }
--------------------------------------------------------------------------------
/evm/asciitree.h:
--------------------------------------------------------------------------------
1 | #ifndef ASCII_TREE
2 | #define ASCII_TREE
3 | #include
4 | #include
5 |
6 | class Node{
7 | std::string Print(std::string indent, bool isLast){
8 | std::string ret = indent;
9 | if(isLast){
10 | ret += " └─";
11 | indent += " ";
12 | }
13 | else{
14 | ret += " ├─";
15 | indent += " │ ";
16 | }
17 |
18 |
19 | ret += value;
20 |
21 | if(!childs.empty()){
22 | int i = 0;
23 | for(auto child : childs){
24 | ret += child.Print(indent,i==childs.size()-1);
25 | i++;
26 | }
27 | }
28 |
29 | return ret;
30 | }
31 | public:
32 | std::string value;
33 | std::list childs;
34 | std::string ToString(){
35 | return Print("\n",true);
36 | }
37 | }
38 |
39 | #endif
--------------------------------------------------------------------------------
/evm/bytecode.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/bytecode.h
--------------------------------------------------------------------------------
/evm/dependencies.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by yorkin on 11/11/21.
3 | //
4 |
5 | #ifndef EVOBASIC2_DEPENDENCIES_H
6 | #define EVOBASIC2_DEPENDENCIES_H
7 | #include
8 | #include