Merge: Own rand seed
authorJean Privat <jean@pryen.org>
Fri, 7 Aug 2015 15:38:38 +0000 (11:38 -0400)
committerJean Privat <jean@pryen.org>
Fri, 7 Aug 2015 15:38:38 +0000 (11:38 -0400)
Inject a basic patform-independent reproducible pseudo-random generator when `srand_form` (thus NIT_SRAND) is used.
This will allows to have more reproductible tests on various architecture.

Related with #1387

Pull-Request: #1621
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

424 files changed:
VERSION
benchmarks/bench_nitdoc.sh
contrib/benitlux/Makefile
contrib/benitlux/src/benitlux_db.nit
contrib/benitlux/src/report.nit [new file with mode: 0644]
contrib/friendz/src/friendz_android.nit
contrib/friendz/src/friendz_linux.nit
contrib/github_merge.nit
contrib/inkscape_tools/Makefile
contrib/inkscape_tools/src/svg_to_png_and_nit.nit
contrib/jwrapper/.gitignore
contrib/jwrapper/Makefile
contrib/jwrapper/examples/android_api/.gitignore [new file with mode: 0644]
contrib/jwrapper/examples/android_api/Makefile [new file with mode: 0644]
contrib/jwrapper/examples/java_api/.gitignore [new file with mode: 0644]
contrib/jwrapper/examples/java_api/Makefile [new file with mode: 0644]
contrib/jwrapper/examples/java_api/api_user.nit [new file with mode: 0644]
contrib/jwrapper/examples/java_api/api_user.sav [new file with mode: 0644]
contrib/jwrapper/examples/queue/.gitignore [new file with mode: 0644]
contrib/jwrapper/examples/queue/Makefile [new file with mode: 0644]
contrib/jwrapper/examples/queue/Queue.java [new file with mode: 0644]
contrib/jwrapper/examples/queue/user_test.nit [new file with mode: 0644]
contrib/jwrapper/examples/queue/user_test.sav [new file with mode: 0644]
contrib/jwrapper/grammar/javap.sablecc
contrib/jwrapper/src/code_generator.nit
contrib/jwrapper/src/javap_visitor.nit
contrib/jwrapper/src/jtype_converter.nit
contrib/jwrapper/src/jwrapper.nit
contrib/jwrapper/src/model.nit
contrib/jwrapper/tests/generics.javap [new file with mode: 0644]
contrib/jwrapper/tests/inits.javap [new file with mode: 0644]
contrib/jwrapper/tests/long.javap [new file with mode: 0644]
contrib/jwrapper/tests/many.javap [new file with mode: 0644]
contrib/jwrapper/tests/statics.javap [new file with mode: 0644]
contrib/jwrapper/tests/testjvm.javap [new file with mode: 0644]
contrib/jwrapper/tests/wildcards.javap [new file with mode: 0644]
contrib/neo_doxygen/src/model/linked_text.nit
contrib/nitcc/src/autom.nit
contrib/nitiwiki/README.md
contrib/nitiwiki/examples/default/config.ini
contrib/nitiwiki/examples/nitiwiki/config.ini
contrib/nitiwiki/src/nitiwiki.nit
contrib/nitiwiki/src/wiki_base.nit
contrib/nitiwiki/src/wiki_html.nit
contrib/nitiwiki/src/wiki_links.nit
contrib/nitrpg/src/achievements.nit
contrib/nitrpg/src/events.nit
contrib/nitrpg/src/game.nit
contrib/nitrpg/src/templates/panels.nit
contrib/pep8analysis/src/cfg/dot_printer.nit
contrib/pep8analysis/src/parser/lexer.nit
contrib/refund/src/refund_base.nit
contrib/rss_downloader/src/rss_downloader.nit
contrib/simplan/.gitignore [new file with mode: 0644]
contrib/simplan/Makefile [new file with mode: 0644]
contrib/simplan/plan1.txt [new file with mode: 0644]
contrib/simplan/plan2.txt [new file with mode: 0644]
contrib/simplan/prob1.txt [new file with mode: 0644]
contrib/simplan/prob2.txt [new file with mode: 0644]
contrib/simplan/simplan.nit [new file with mode: 0644]
contrib/simplan/simplan.sablecc [new file with mode: 0644]
contrib/tinks/.gitignore [new file with mode: 0644]
contrib/tinks/Makefile [new file with mode: 0644]
contrib/tinks/README.md [new file with mode: 0644]
contrib/tinks/art/drawing.svg [new file with mode: 0644]
contrib/tinks/art/icon.svg [new file with mode: 0644]
contrib/tinks/assets/images/.gitignore [new file with mode: 0644]
contrib/tinks/assets/sounds/turret_fire.wav [new file with mode: 0644]
contrib/tinks/assets/sounds/turret_ready.mp3 [new file with mode: 0644]
contrib/tinks/bin/.gitignore [new file with mode: 0644]
contrib/tinks/res/.gitignore [new file with mode: 0644]
contrib/tinks/src/client/android_client.nit [new file with mode: 0644]
contrib/tinks/src/client/assets.nit [new file with mode: 0644]
contrib/tinks/src/client/client.nit [new file with mode: 0644]
contrib/tinks/src/client/context.nit [new file with mode: 0644]
contrib/tinks/src/client/controls.nit [new file with mode: 0644]
contrib/tinks/src/client/linux_client.nit [new file with mode: 0644]
contrib/tinks/src/common.nit [new file with mode: 0644]
contrib/tinks/src/game/framework.nit [new file with mode: 0644]
contrib/tinks/src/game/game.nit [new file with mode: 0644]
contrib/tinks/src/game/players.nit [new file with mode: 0644]
contrib/tinks/src/game/powerups.nit [new file with mode: 0644]
contrib/tinks/src/game/tanks.nit [new file with mode: 0644]
contrib/tinks/src/game/world.nit [new file with mode: 0644]
contrib/tinks/src/server/dedicated.nit [new file with mode: 0644]
contrib/tinks/src/server/server.nit [new file with mode: 0644]
examples/calculator/Makefile
examples/mnit_dino/src/dino.nit
examples/mnit_dino/src/game_logic.nit
examples/mnit_moles/src/moles_android.nit
examples/rosettacode/balanced_brackets.nit
examples/rosettacode/entropy.nit [new file with mode: 0644]
examples/rosettacode/entropy_narcissist.nit [new file with mode: 0644]
examples/rosettacode/fibonacci_word.nit [new file with mode: 0644]
examples/rosettacode/one_dimensional_cellular_automata.nit
examples/rosettacode/s_exp.nit [new file with mode: 0644]
lib/android/activities.nit
lib/android/android.nit
lib/android/audio.nit
lib/android/input_events.nit
lib/android/landscape.nit
lib/app/audio.nit
lib/app/data_store.nit
lib/app/ui.nit
lib/base64.nit
lib/binary/binary.nit
lib/binary/serialization.nit [new file with mode: 0644]
lib/bitmap/bitmap.nit
lib/buffered_ropes.nit
lib/c.nit
lib/counter.nit
lib/curl/curl.nit
lib/curl/native_curl.nit
lib/date.nit
lib/dom/dom.nit
lib/dom/examples/checker.nit [new file with mode: 0644]
lib/dom/parser.nit
lib/dom/xml_entities.nit
lib/gamnit/gamnit.nit [new file with mode: 0644]
lib/gamnit/network/client.nit [new file with mode: 0644]
lib/gamnit/network/common.nit [new file with mode: 0644]
lib/gamnit/network/network.nit [new file with mode: 0644]
lib/gamnit/network/server.nit [new file with mode: 0644]
lib/geometry/angles.nit [new file with mode: 0644]
lib/geometry/boxes.nit
lib/geometry/geometry.nit
lib/geometry/points_and_lines.nit
lib/geometry/polygon.nit
lib/github/README.md [new file with mode: 0644]
lib/github/api.nit
lib/github/github.nit
lib/github/github_curl.nit
lib/java/base.nit [new file with mode: 0644]
lib/java/collections.nit
lib/java/io.nit
lib/java/java.nit
lib/libevent.nit
lib/linux/data_store.nit
lib/linux/linux.nit
lib/markdown/markdown.nit
lib/markdown/test_markdown.nit
lib/markdown/test_wikilinks.nit [new file with mode: 0644]
lib/markdown/wikilinks.nit
lib/mnit/opengles1.nit
lib/mnit_android/android_app.nit
lib/mnit_input.nit
lib/more_collections.nit
lib/neo4j/neo4j.nit
lib/nitcorn/http_response.nit
lib/nitcorn/media_types.nit
lib/noise.nit
lib/opts.nit
lib/performance_analysis.nit [new file with mode: 0644]
lib/pthreads/concurrent_collections.nit
lib/pthreads/pthreads.nit
lib/pthreads/redef_collections.nit
lib/realtime.nit
lib/ropes_debug.nit
lib/saxophonit/lexer.nit
lib/serialization/caching.nit
lib/serialization/serialization.nit
lib/sexp.nit [new file with mode: 0644]
lib/socket/socket.nit
lib/socket/socket_c.nit
lib/sqlite3/sqlite3.nit
lib/standard/README.md [new file with mode: 0644]
lib/standard/bytes.nit
lib/standard/collection/abstract_collection.nit
lib/standard/collection/array.nit
lib/standard/collection/list.nit
lib/standard/exec.nit
lib/standard/file.nit
lib/standard/kernel.nit
lib/standard/math.nit
lib/standard/stream.nit
lib/standard/text/abstract_text.nit
lib/standard/text/flat.nit
lib/standard/text/native.nit
lib/standard/text/ropes.nit
lib/websocket/websocket.nit
misc/vim/syntax/nit.vim
share/man/nitc.md
src/Makefile
src/astbuilder.nit
src/astprinter.nit
src/c_tools.nit
src/compiler/abstract_compiler.nit
src/compiler/java_compiler.nit [new file with mode: 0644]
src/compiler/separate_compiler.nit
src/doc/doc_base.nit
src/doc/doc_commands.nit [new file with mode: 0644]
src/doc/doc_down.nit
src/doc/doc_phases/doc_console.nit
src/doc/doc_phases/doc_html.nit
src/doc/doc_phases/doc_pages.nit
src/doc/doc_phases/doc_readme.nit [new file with mode: 0644]
src/doc/html_templates/html_model.nit
src/doc/html_templates/html_templates.nit
src/ffi/cpp.nit
src/ffi/extra_java_files.nit
src/ffi/java.nit
src/ffi/objc.nit
src/frontend/check_annotation.nit
src/frontend/div_by_zero.nit
src/frontend/serialization_phase.nit
src/interpreter/dynamic_loading_ffi/dynamic_loading_ffi.nit
src/interpreter/dynamic_loading_ffi/on_demand_compiler.nit
src/interpreter/naive_interpreter.nit
src/interpreter/primitive_types.nit
src/literal.nit
src/loader.nit
src/location.nit
src/model/mmodule.nit
src/modelbuilder.nit
src/modelize/modelize_property.nit
src/nitdoc.nit
src/nitj.nit [new file with mode: 0644]
src/nitpick.nit
src/nitserial.nit
src/parser/lexer.nit
src/parser/lexer_work.nit
src/parser/nit.sablecc3xx
src/parser/parser.nit
src/parser/parser_abs.nit
src/parser/parser_nodes.nit
src/parser/parser_prod.nit
src/parser/parser_work.nit
src/parser/tables_nit.c
src/platform/android.nit
src/platform/ios.nit
src/platform/pnacl.nit
src/rapid_type_analysis.nit
src/semantize/auto_super_init.nit
src/semantize/typing.nit
src/toolcontext.nit
tests/base_init_basic.nit
tests/base_label_for.nit
tests/base_module_conditional.nit [new file with mode: 0644]
tests/base_module_conditional_client.nit [new file with mode: 0644]
tests/base_test_bases.nit
tests/bench_string_super.nit
tests/bench_string_tos.nit
tests/example_hanoi.nit
tests/example_string.nit
tests/module_0.nit
tests/module_1.nit
tests/module_2.nit [new file with mode: 0644]
tests/niti.skip
tests/nitpick.args
tests/nitvm.skip
tests/sav/base_attr3_alt1.res
tests/sav/base_attr3_alt2.res
tests/sav/base_attr3_alt3.res
tests/sav/base_attr3_alt4.res
tests/sav/base_error_literal.res
tests/sav/base_init_basic_alt3.res
tests/sav/base_init_basic_alt5.res [new file with mode: 0644]
tests/sav/base_init_combine.res
tests/sav/base_init_combine_alt1.res
tests/sav/base_init_inherit6.res
tests/sav/base_init_inherit6_alt1.res
tests/sav/base_init_inherit6_alt2.res
tests/sav/base_init_linext2.res
tests/sav/base_init_linext2_alt2.res
tests/sav/base_init_linext2_alt3.res
tests/sav/base_init_linext2_alt4.res
tests/sav/base_init_linext2_alt5.res
tests/sav/base_init_simple.res
tests/sav/base_module_conditional.res [new file with mode: 0644]
tests/sav/base_module_conditional_alt1.res [new file with mode: 0644]
tests/sav/base_module_conditional_client.res [new file with mode: 0644]
tests/sav/base_module_conditional_client_alt1.res [new file with mode: 0644]
tests/sav/base_module_conditional_client_alt2.res [new file with mode: 0644]
tests/sav/checker.res [new file with mode: 0644]
tests/sav/entropy.res [new file with mode: 0644]
tests/sav/entropy_narcissist.res [new file with mode: 0644]
tests/sav/error_class_glob.res
tests/sav/error_ref_attr.res
tests/sav/example_objet.res
tests/sav/fibonacci_word.res [new file with mode: 0644]
tests/sav/module_0.res [new file with mode: 0644]
tests/sav/module_1.res [new file with mode: 0644]
tests/sav/module_2.res [new file with mode: 0644]
tests/sav/nitce/fixme/base_gen_reassign_alt4.res
tests/sav/nitce/fixme/base_gen_reassign_alt5.res
tests/sav/nitce/fixme/base_gen_reassign_alt6.res
tests/sav/nitce/test_binary_deserialization_alt1.res [new file with mode: 0644]
tests/sav/nitce/test_json_deserialization_alt1.res
tests/sav/nitce/test_new_native.res
tests/sav/nitce/test_new_native_alt1.res
tests/sav/nitdoc_args1.res
tests/sav/nitdoc_args2.res
tests/sav/nitdoc_args3.res
tests/sav/nitdoc_args4.res
tests/sav/niti/fixme/neo_doxygen_dump_args2.res [deleted file]
tests/sav/niti/fixme/neo_doxygen_dump_args3.res [deleted file]
tests/sav/niti/fixme/neo_doxygen_dump_args4.res [deleted file]
tests/sav/niti/fixme/neo_doxygen_dump_args5.res [deleted file]
tests/sav/niti/fixme/neo_doxygen_dump_args6.res [deleted file]
tests/sav/niti/fixme/neo_doxygen_dump_args7.res [deleted file]
tests/sav/niti/fixme/neo_doxygen_dump_args8.res [deleted file]
tests/sav/niti/fixme/neo_doxygen_dump_args9.res [deleted file]
tests/sav/niti/fixme/nitdoc_args4.res [deleted file]
tests/sav/niti/fixme/nitiwiki_args1.res [deleted file]
tests/sav/niti/fixme/test_binary.res [deleted file]
tests/sav/niti/fixme/test_binary_alt1.res [deleted file]
tests/sav/niti/fixme/test_binary_alt2.res [deleted file]
tests/sav/niti/fixme/test_binary_alt3.res [deleted file]
tests/sav/niti/fixme/test_exec.res [deleted file]
tests/sav/niti/fixme/test_fdstream.res [deleted file]
tests/sav/nitiwiki_args1.res
tests/sav/nitiwiki_args2.res
tests/sav/nitj.res [new file with mode: 0644]
tests/sav/nitj/base_autocast_alt1.res [new file with mode: 0644]
tests/sav/nitj/base_autocast_array_alt2.res [new file with mode: 0644]
tests/sav/nitj/base_class_name.res [new file with mode: 0644]
tests/sav/nitj/base_dead_code_alt1.res [new file with mode: 0644]
tests/sav/nitj/base_gen_variance2_alt1.res [new file with mode: 0644]
tests/sav/nitj/base_gen_variance2_alt2.res [new file with mode: 0644]
tests/sav/nitj/base_gen_variance_alt3.res [new file with mode: 0644]
tests/sav/nitj/base_gen_variance_alt5.res [new file with mode: 0644]
tests/sav/nitj/base_gen_variance_alt6.res [new file with mode: 0644]
tests/sav/nitj/base_gen_variance_alt7.res [new file with mode: 0644]
tests/sav/nitj/base_gen_variance_alt8.res [new file with mode: 0644]
tests/sav/nitj/base_isa_gen1.res [new file with mode: 0644]
tests/sav/nitj/base_isa_gen4.res [new file with mode: 0644]
tests/sav/nitj/base_isa_gen5.res [new file with mode: 0644]
tests/sav/nitj/base_isa_gen7.res [new file with mode: 0644]
tests/sav/nitj/base_isa_nullable1.res [new file with mode: 0644]
tests/sav/nitj/base_isa_nullable2.res [new file with mode: 0644]
tests/sav/nitj/base_isa_vt3.res [new file with mode: 0644]
tests/sav/nitj/base_isa_vt_ft.res [new file with mode: 0644]
tests/sav/nitj/base_notnull_lit.res [new file with mode: 0644]
tests/sav/nitj/base_output_class_name.res [new file with mode: 0644]
tests/sav/nitj/base_self_type.res [new file with mode: 0644]
tests/sav/nitj/base_self_type_alt2.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_attr_gen_alt1.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_covar_gen_1alt1_alt1.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_covar_gen_1alt1_alt2.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_covar_gen_alt3.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_covar_gen_alt4.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_covar_int2_alt1.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_covar_int_alt1.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_covar_int_alt5.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_formal_isa.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_gen_reassign_alt1.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_gen_reassign_alt2.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_gen_reassign_alt4.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_gen_reassign_alt5.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_gen_reassign_alt6.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_gen_variance3_alt1.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_gen_variance_int_alt1.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_isa_formal_type.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_isa_gen.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_vararg2.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_vararg2_alt1.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_vararg2_alt2.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_vararg2_alt3.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_vararg2_alt4.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_vararg2_alt5.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_virtual_int2_alt2.res [new file with mode: 0644]
tests/sav/nitj/fixme/base_virtual_type_variance_int_alt1.res [new file with mode: 0644]
tests/sav/nitj/fixme/converter.res [moved from tests/sav/niti/fixme/neo_doxygen_dump_args1.res with 100% similarity]
tests/sav/nitj/test_array_formal.res [new file with mode: 0644]
tests/sav/nitj/test_json_deserialization_alt1.res [new file with mode: 0644]
tests/sav/nitj/test_meta.res [new file with mode: 0644]
tests/sav/nitj/test_new_native.res [new file with mode: 0644]
tests/sav/nitj/test_new_native_alt1.res [new file with mode: 0644]
tests/sav/nitj/test_serialization.res [new file with mode: 0644]
tests/sav/nitj/test_serialization_alt2.res [new file with mode: 0644]
tests/sav/nitj/test_serialization_alt3.res [new file with mode: 0644]
tests/sav/nitj/test_serialization_alt4.res [new file with mode: 0644]
tests/sav/nitj/test_serialization_alt5.res [new file with mode: 0644]
tests/sav/nitj/test_serialization_redef.res [new file with mode: 0644]
tests/sav/nitj/test_serialization_redef_alt0.res [new file with mode: 0644]
tests/sav/nitj/test_serialization_redef_alt1.res [new file with mode: 0644]
tests/sav/nitj/test_serialization_redef_alt2.res [new file with mode: 0644]
tests/sav/nitmetrics_args1.res
tests/sav/nitpick_args1.res
tests/sav/nitpick_args2.res [new file with mode: 0644]
tests/sav/nitpick_args3.res [new file with mode: 0644]
tests/sav/nitunit_args6.res
tests/sav/nitunit_args7.res
tests/sav/s_exp.res [new file with mode: 0644]
tests/sav/shootout_nsieve_bytes_alt.res [new file with mode: 0644]
tests/sav/test_autoinit_optional.res [new file with mode: 0644]
tests/sav/test_binary.res
tests/sav/test_binary_alt1.res
tests/sav/test_binary_alt2.res
tests/sav/test_binary_alt3.res
tests/sav/test_binary_deserialization.res [new file with mode: 0644]
tests/sav/test_binary_deserialization_alt1.res [new file with mode: 0644]
tests/sav/test_binary_deserialization_alt2.res [new file with mode: 0644]
tests/sav/test_buffer_unicode.res [new file with mode: 0644]
tests/sav/test_buffer_unicode_alt1.res [new file with mode: 0644]
tests/sav/test_bufferedfilereader.res
tests/sav/test_file_open_fail.res
tests/sav/test_new_native.res
tests/sav/test_new_native_alt1.res
tests/sav/test_parser_args1.res
tests/sav/test_parser_args7.res
tests/sav/test_path.res [new file with mode: 0644]
tests/sav/test_path_args1.res [new file with mode: 0644]
tests/sav/test_string_bytes.res [new file with mode: 0644]
tests/sav/test_string_unicode.res
tests/sav/test_unicode_4bytes.res [new file with mode: 0644]
tests/sav/test_xml_read_args15.res
tests/sav/test_xml_read_args18.res
tests/sav/test_xml_read_args4.res
tests/sav/test_xml_read_args7.res
tests/shootout_mandelbrot.nit
tests/shootout_nsieve.nit
tests/shootout_nsieve_bytes_alt.nit [new file with mode: 0644]
tests/test_autoinit_optional.nit [new file with mode: 0644]
tests/test_binary.nit
tests/test_binary_deserialization.nit [new file with mode: 0644]
tests/test_buffer_unicode.nit [new file with mode: 0644]
tests/test_new_native.nit
tests/test_path.args [new file with mode: 0644]
tests/test_path.nit [new file with mode: 0644]
tests/test_ropebuffer.nit [new file with mode: 0644]
tests/test_string_bytes.nit [new file with mode: 0644]
tests/test_unicode_4bytes.nit [new file with mode: 0644]
tests/tests.sh

diff --git a/VERSION b/VERSION
index aed5a7d..b977a66 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-v0.7.5
+v0.7.7
index f44e155..07613b2 100755 (executable)
@@ -36,7 +36,7 @@ function die()
 
 function usage()
 {
-       echo "bench_nitdoc [options]* benchname"
+       echo "bench_nitdoc [options]* git-ref"
        echo "  -v: verbose mode"
        echo "  -n count: number of execution for each bar (default: $count)"
        echo "  --dry: Do not run the commands, just reuse the data and generate the graph"
@@ -54,9 +54,9 @@ while [ "$stop" = false ]; do
        esac
 done
 
-NOTSKIPED="$*"
+REF="$*"
 
-if test -z "$NOTSKIPED"; then
+if test -z "$REF"; then
        usage
 fi
 
@@ -73,7 +73,7 @@ function bench_nitdoc()
        tests=(../tests/test_prog ../lib/standard/kernel.nit ../lib/standard)
        mkdir -p $basedir
 
-       prepare_res $basedir/orig.dat "origin/master" "nitdoc.orig"
+       prepare_res $basedir/orig.dat $REF "nitdoc.orig"
        for path in ${tests[@]}; do
                run_gen $basedir ./nitdoc.orig $path
        done
index 133019c..9bf30ac 100644 (file)
@@ -6,3 +6,9 @@ server:
 
 src/benitlux_serial.nit:
        ../../bin/nitserial -o $@ src/benitlux_web.nit
+
+bin/report: $(shell ../../bin/nitls -M src/report.nit)
+       ../../bin/nitc -o bin/report src/report.nit
+
+report: bin/report
+       bin/report
index 05a1a81..36906c8 100644 (file)
@@ -118,6 +118,33 @@ class DB
                return events
        end
 
+       # List known beers
+       #
+       # Return `null` on error.
+       fun beers: nullable Array[Beer]
+       do
+               var stmt = select("name, desc FROM beers")
+               if stmt == null then return null
+               return [for row in stmt do row.to_beer]
+       end
+
+       # Days where `beer` was available, all known days if `beer == null`
+       #
+       # Return `null` on error.
+       fun days(beer: nullable Beer): nullable Array[String]
+       do
+               var stmt
+               if beer == null then
+                       stmt = select("DISTINCT day FROM daily")
+               else
+                       stmt = select("""
+DISTINCT day FROM daily WHERE beer=(SELECT ROWID FROM beers WHERE name="{{{beer.name}}}")""")
+               end
+
+               if stmt == null then return null
+               return [for row in stmt do row[0].to_s]
+       end
+
        # All the subscribers to the mailing list
        fun subscribers: Array[String]
        do
diff --git a/contrib/benitlux/src/report.nit b/contrib/benitlux/src/report.nit
new file mode 100644 (file)
index 0000000..54f22ad
--- /dev/null
@@ -0,0 +1,114 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import benitlux_model
+import benitlux_db
+
+# Sort beers by their availability
+class BeerComparator
+       super Comparator
+
+       # 1st sorting priority
+       var map1: HashMap[COMPARED, Comparable]
+
+       # 2nd sorting priority
+       var map2: HashMap[COMPARED, Comparable]
+
+       # Key compare
+       redef fun compare(a, b) do return if map1[a] == map1[b] then
+                                             map2[a] <=> map2[b]
+                                         else map1[a] <=> map1[b]
+end
+
+# Use the local DB
+var db_path = "benitlux_sherbrooke.db"
+var db = new DB.open(db_path)
+
+# All known beers
+var beers = db.beers
+assert beers != null
+print "{beers.length} known beers"
+
+# All days
+var all_days = db.days
+assert all_days != null
+print "{all_days.length} days, from {all_days.first} to {all_days.last}"
+
+# Beers availability by days
+var beer2days = new HashMap[Beer, Array[String]]
+for beer in beers do
+       var days = db.days(beer)
+       assert days != null
+       default_comparator.sort days
+       beer2days[beer] = days
+end
+
+# Sort beers by their availability and first date of appearance
+var availability = new HashMap[Beer, Int]
+var appearances = new HashMap[Beer, String]
+for beer in beers do
+       var days = beer2days[beer]
+       if days.not_empty then
+               appearances[beer] = days.first
+               availability[beer] = -days.length # Opposite for inverse sort
+       else
+               appearances[beer] = "err"
+               availability[beer] = 1
+       end
+end
+
+# Sort by availability then appearance
+var sorter: Comparator = new BeerComparator(availability, appearances)
+sorter.sort beers
+
+# List all beers
+print "\nBeers:"
+for beer in beers do
+       var days = beer2days[beer]
+
+       # Skip never-available beers, usually name errors
+       if days.is_empty then continue
+
+       var from = days.first
+       if from == all_days.first then from = "      ... "
+
+       var to = days.last
+       if to == all_days.last then to = " ...      "
+
+       print "- {days.length}\t{from} {to}\t{beer.name}: {beer.desc}"
+end
+
+# Sort by appearance then availability
+sorter = new BeerComparator(appearances, availability)
+sorter.sort beers
+
+# Display the batch graph
+print "\nBatches:"
+
+# Compute `column_width` days from all the known days
+var column_width = 70
+var days_sample = [for i in column_width.times do all_days[i*all_days.length/column_width]]
+
+for beer in beers do
+       var days = beer2days[beer]
+
+       # Skip never-available beers, usually name errors
+       if days.is_empty then continue
+
+       # Print a line looking like: "  ############ ######         ######## : Beer"
+       for s in days_sample do printn if days.has(s) then "#" else " "
+       print ": {beer.name}"
+end
+
+db.close
index aca4907..e0dec75 100644 (file)
@@ -13,8 +13,7 @@ module friendz_android
 import friendz
 import mnit_android
 import android::landscape
-import android::audio
-import android::assets_and_resources
+
 redef class App
        # Zoom applied for the device display from the game logic coordinates
        var zoom = 1.0
@@ -40,7 +39,7 @@ redef class App
 end
 
 redef class AndroidPointerEvent
-       redef fun is_motion do return not just_went_down
+       redef fun is_motion do return is_move
 
        redef fun x do return super / app.zoom
        redef fun y do return super / app.zoom
index 7b593ef..7940843 100644 (file)
@@ -12,7 +12,6 @@ module friendz_linux
 
 import friendz
 import mnit_linux
-import linux::audio
 
 redef class Display
        redef fun wanted_width do return app.screen_width
index 8a2c545..311b1b7 100644 (file)
@@ -86,9 +86,8 @@ if "NIT_TESTING".environ == "true" then exit 0
 var auth = get_github_oauth
 
 if auth == "" then
-       print "Not github token, please configure one with"
+       print "Warning: no github oauth token, you can configure one with"
        print "    git config --add github.oauthtoken MYOAUTHTOKEN"
-       return
 end
 
 var curl = new GithubCurl(auth, "Merge-o-matic (privat/nit)")
index bfadf98..d94e33e 100644 (file)
@@ -1,11 +1,8 @@
-all: bins tests
-
-bins:
+all:
        mkdir -p bin
        ../../bin/nitc --dir bin src/svg_to_png_and_nit.nit src/svg_to_icons.nit
 
-check: tests
-tests: test-dino test-app
+check: test-dino test-app
 
 test-app: bin/svg_to_png_and_nit
        make -C tests/app
index f9e690b..abd0912 100644 (file)
@@ -329,8 +329,10 @@ for drawing in drawings do
        end
        svg_file.close
 
-       assert page_width != -1
-       assert page_height != -1
+       if page_width == -1 or page_height == -1 then
+               stderr.write "Source drawing file '{drawing}' doesn't look like an SVG file\n"
+               exit 1
+       end
 
        # Query Inkscape
        var prog = "inkscape"
index 1448c2c..ad11ad5 100644 (file)
@@ -1,4 +1,7 @@
-/gen
+gen/*
 src/javap_lexer.nit
 src/javap_parser.nit
 src/javap_test_parser.nit
+src/serial.nit
+tests/*.nit
+tmp/*
index c3c6991..34faa7a 100644 (file)
@@ -1,21 +1,68 @@
-all: nitcc grammar bin/jwrapper
+all: bin/jwrapper
 
-nitcc:
+../nitcc/src/nitcc:
        make -C ../nitcc
 
-grammar:
+src/javap_test_parser.nit: ../nitcc/src/nitcc grammar/javap.sablecc
        ../nitcc/src/nitcc grammar/javap.sablecc
        mkdir -p src gen
-       mv *.nit src/
+       mv javap_*.nit src/
        mv javap* gen/
 
-bin/jwrapper:
+src/serial.nit: $(shell ../../bin/nitls -M src/jwrapper.nit)
+       ../../bin/nitserial -o src/serial.nit -d project src/jwrapper.nit
+
+bin/jwrapper: src/javap_test_parser.nit src/serial.nit $(shell ../../bin/nitls -M src/jwrapper.nit) ../../bin/nitc
        mkdir -p bin
-       ../../bin/nitc src/jwrapper.nit -o bin/jwrapper
+       ../../bin/nitc src/jwrapper.nit -o bin/jwrapper -m src/serial.nit
 
 clean:
        rm -f bin/javap_test_parser bin/jwrapper
        rm -f gen/*
        rm src/javap_lexer.nit src/javap_parser.nit src/javap_test_parser.nit
 
-.PHONY: grammar bin/jwrapper
+check: bin/jwrapper tests/wildcards.javap
+       mkdir -p tmp
+       bin/jwrapper -v -u stub -o tests/statics.nit tests/statics.javap
+       ../../bin/nitpick -q tests/statics.nit
+       bin/jwrapper -v -u comment -o tests/generics.nit tests/generics.javap
+       ../../bin/nitpick -q tests/generics.nit
+       bin/jwrapper -v -u comment -o tests/long.nit tests/long.javap
+       ../../bin/nitpick -q tests/long.nit
+       bin/jwrapper -v -u comment -o tests/inits.nit tests/inits.javap
+       ../../bin/nitpick -q tests/inits.nit
+       bin/jwrapper -v -u comment -o tests/testjvm.nit tests/testjvm.javap
+       ../../bin/nitpick -q tests/testjvm.nit
+       bin/jwrapper -v -u comment -o tests/many.nit tests/many.javap
+       ../../bin/nitpick -q tests/many.nit
+       bin/jwrapper -v -u comment -o tests/wildcards.nit tests/wildcards.javap
+       ../../bin/nitpick -q tests/wildcards.nit
+       make -C examples/queue/ check
+       make -C examples/java_api/ check
+
+check-libs: bin/jwrapper
+       # This config dependent rule must be tweaked according to each system
+
+       # The full local Java standard library
+       bin/jwrapper -v -u comment -o tests/rt_full.nit /usr/lib/jvm/default-java/jre/lib/rt.jar
+       echo "+ Disabled functions: `grep '#    fun' tests/rt_full.nit | wc -l` / `grep '^      fun' tests/rt_full.nit | wc -l`"
+       nitpick tests/rt_full.nit
+
+       # Only the `java` namespace of the standard library to avoid conflicts with other libs
+       bin/jwrapper -v -u comment -o tests/rt.nit /usr/lib/jvm/default-java/jre/lib/rt.jar -r ^java
+       echo "+ Disabled functions: `grep '#    fun' tests/rt.nit | wc -l` / `grep '^   fun' tests/rt.nit | wc -l`"
+       nitpick tests/rt.nit
+
+       # tools.jar, not using the standard library because of conflicts on sun.tools.jar.*
+       bin/jwrapper -v -u comment -o tests/java_tools.nit /usr/lib/jvm/default-java/lib/tools.jar -i tests/rt.nit
+       sed -i -e "s/import java/import java\nimport rt/" tests/java_tools.nit
+       echo "+ Disabled functions: `grep '#    fun' tests/java_tools.nit | wc -l` / `grep '^   fun' tests/java_tools.nit | wc -l`"
+       nitpick tests/java_tools.nit
+
+       # SableCC using the standard Java library
+       bin/jwrapper -v -u comment -o tests/sablecc.nit ~/apps/sablecc-3-beta.3.altgen.20041114/lib/sablecc.jar -i tests/rt.nit
+       sed -i -e "s/import java/import java\nimport rt/" tests/sablecc.nit
+       echo "+ Disabled functions: `grep '#    fun' tests/sablecc.nit | wc -l` / `grep '^      fun' tests/sablecc.nit | wc -l`"
+       nitpick tests/sablecc.nit
+
+       make -C examples/android_api/ check
diff --git a/contrib/jwrapper/examples/android_api/.gitignore b/contrib/jwrapper/examples/android_api/.gitignore
new file mode 100644 (file)
index 0000000..df61fc5
--- /dev/null
@@ -0,0 +1,4 @@
+android_api.nit
+java_api.nit
+java_api.jwrapper.bin
+tmp/
diff --git a/contrib/jwrapper/examples/android_api/Makefile b/contrib/jwrapper/examples/android_api/Makefile
new file mode 100644 (file)
index 0000000..58b463f
--- /dev/null
@@ -0,0 +1,20 @@
+ANDROID_JAR ?= ~/sdks/android-sdk/platforms/android-10/android.jar
+
+all: android_api.nit
+
+java_api.nit:
+       mkdir -p tmp
+       ../../bin/jwrapper -vv -u comment -o java_api.nit -r "^(java|javax|junit|org)" $(ANDROID_JAR) -i ../../../../lib/java/collections.nit --save-model
+       echo "+ Disabled functions: `grep '#\s*fun' $@ | wc -l` / `grep '^\s*fun' $@ | wc -l`"
+
+android_api.nit: java_api.nit
+       ../../bin/jwrapper -vv -u comment -o android_api.nit -r "^(android|com.android)" -i java_api.nit $(ANDROID_JAR) -i ../../../../lib/java/collections.nit -m java_api.jwrapper.bin
+       echo "+ Disabled functions: `grep '#\s*fun' $@ | wc -l` / `grep '^\s*fun' $@ | wc -l`"
+
+       # Insert an import between the 2 modules
+       sed -i -e "s/import java/import java\nimport java_api/" android_api.nit
+
+check: android_api.nit
+       ../../../../bin/nitpick android_api.nit
+
+.PHONY: android_api.nit java_api.nit
diff --git a/contrib/jwrapper/examples/java_api/.gitignore b/contrib/jwrapper/examples/java_api/.gitignore
new file mode 100644 (file)
index 0000000..f2f6834
--- /dev/null
@@ -0,0 +1,5 @@
+java_api.nit
+api_user
+api_user.res
+api_user.jar
+tmp/
diff --git a/contrib/jwrapper/examples/java_api/Makefile b/contrib/jwrapper/examples/java_api/Makefile
new file mode 100644 (file)
index 0000000..3acbfc9
--- /dev/null
@@ -0,0 +1,34 @@
+RT_JAR ?= /usr/lib/jvm/default-java/jre/lib/rt.jar
+
+all: api_user
+
+java_api.nit:
+       mkdir -p tmp
+       ../../bin/jwrapper -vv -u comment -o java_api.nit $(RT_JAR) \
+               -r "^java.(lang|util|io)" -i ../../../../lib/java/collections.nit
+       echo "+ Disabled functions: `grep '#\s*fun' $@ | wc -l` / `grep '^\s*fun' $@ | wc -l`"
+
+api_user: java_api.nit
+       # Using --semi-global makes it much faster
+       time -f "%E k:%S u:%U" ../../../../bin/nitc -v api_user.nit --semi-global
+
+check: api_user
+       ./api_user > api_user.res
+       diff api_user.sav api_user.res
+
+full_java_api.nit:
+       mkdir -p tmp
+       ../../bin/jwrapper -vv -u comment -o full_java_api.nit $(RT_JAR) \
+               -r "^(java|org)" -i ../../../../lib/java/collections.nit
+       echo "+ Disabled functions: `grep '#\s*fun' $@ | wc -l` / `grep '^\s*fun' $@ | wc -l`"
+
+       # Force compilation of the Java code
+       echo 'fun foo in "Java" `{  `}; foo' >> full_java_api.nit
+
+       # This may take a while...
+       time -f "%E k:%S u:%U" ../../../../bin/nitc -v full_java_api.nit --no-cc
+
+       # Don't compile the C, only the Java
+       make -C nit_compile Nit_full_java_api.class
+
+.PHONY: api_user java_api.nit
diff --git a/contrib/jwrapper/examples/java_api/api_user.nit b/contrib/jwrapper/examples/java_api/api_user.nit
new file mode 100644 (file)
index 0000000..a06bf95
--- /dev/null
@@ -0,0 +1,39 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import java_api
+
+# Get a Java string
+var str = java_lang_integer_to_string_int(5678)
+
+# Do some Java side printing
+java_lang_system_out.println_int 1234
+java_lang_system_out.println_String str
+
+# Test a generic list
+var list = new Java_util_ArrayList
+
+print "List is empty? {list.is_empty}"
+print "List size {list.size}"
+
+list.add str
+print "List is empty? {list.is_empty}"
+print "List size {list.size}"
+
+var str_back = list.get(0)
+java_lang_system_out.println_String str_back.to_string
+
+list.clear
+print "List is empty? {list.is_empty}"
+print "List size {list.size}"
diff --git a/contrib/jwrapper/examples/java_api/api_user.sav b/contrib/jwrapper/examples/java_api/api_user.sav
new file mode 100644 (file)
index 0000000..fc0b3bd
--- /dev/null
@@ -0,0 +1,9 @@
+1234
+5678
+List is empty? true
+List size 0
+List is empty? false
+List size 1
+5678
+List is empty? true
+List size 0
diff --git a/contrib/jwrapper/examples/queue/.gitignore b/contrib/jwrapper/examples/queue/.gitignore
new file mode 100644 (file)
index 0000000..5343079
--- /dev/null
@@ -0,0 +1,5 @@
+Queue.class
+queue.nit
+user_test
+user_test.res
+user_test.jar
diff --git a/contrib/jwrapper/examples/queue/Makefile b/contrib/jwrapper/examples/queue/Makefile
new file mode 100644 (file)
index 0000000..fc9a0ae
--- /dev/null
@@ -0,0 +1,22 @@
+# Nit test program
+user_test: queue.nit $(shell ../../../../bin/nitls -M user_test.nit) ../../../../bin/nitc ../../bin/jwrapper
+       CLASSPATH=`pwd` ../../../../bin/nitc user_test.nit
+
+       # Manually add our class file to the Jar for easy access
+       jar -uf user_test.jar Queue.class
+
+# Compiled Java class
+Queue.class: Queue.java
+       javac Queue.java
+
+# The Nit wrapper to the Java class
+queue.nit: Queue.class
+       ../../bin/jwrapper Queue.class -o queue.nit -p "Java" -i auto
+
+# Test
+check: user_test
+       # Execute test
+       ./user_test > user_test.res
+
+       # Compare the result with the expected
+       diff user_test.sav user_test.res
diff --git a/contrib/jwrapper/examples/queue/Queue.java b/contrib/jwrapper/examples/queue/Queue.java
new file mode 100644 (file)
index 0000000..daf0709
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+* This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/
+
+import java.util.*;
+
+public class Queue
+{
+    // function pointer
+    public native void printError( String errorMsg );
+
+    // internal list
+    private LinkedList<String> list;
+
+    public Queue()
+    {
+        list = new LinkedList<String>();
+    }
+
+    public void push( String element )
+    {
+        System.out.print( "From java, pushing " );
+        System.out.print( element );
+        System.out.print( "\n" );
+        list.addLast( element );
+    }
+
+    public String pop() // knows where is native printError
+    {
+        String element;
+
+        try
+        {
+            element = list.removeFirst();
+        }
+        catch ( NoSuchElementException e )
+        {
+            printError( "From java, empty queue." );
+            element = null;
+            throw e;
+        }
+
+        System.out.print( "From java, popping " );
+        System.out.print( element );
+        System.out.print( "\n" );
+
+        return element;
+    }
+}
diff --git a/contrib/jwrapper/examples/queue/user_test.nit b/contrib/jwrapper/examples/queue/user_test.nit
new file mode 100644 (file)
index 0000000..882a4d4
--- /dev/null
@@ -0,0 +1,23 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import queue
+
+var queue = new JavaQueue
+queue.push "one".to_java_string
+queue.push "two".to_java_string
+queue.push "tree".to_java_string
+print queue.pop
+print queue.pop
+print queue.pop
diff --git a/contrib/jwrapper/examples/queue/user_test.sav b/contrib/jwrapper/examples/queue/user_test.sav
new file mode 100644 (file)
index 0000000..3db08d4
--- /dev/null
@@ -0,0 +1,9 @@
+From java, pushing one
+From java, pushing two
+From java, pushing tree
+From java, popping one
+one
+From java, popping two
+two
+From java, popping tree
+tree
index ba92bc4..8d281ae 100644 (file)
@@ -1,60 +1,78 @@
 Grammar javap;
 
+// ---
 Lexer
 
-identifier = ('a'..'z'|'A'..'Z'|'_'|'$') ('a'..'z'|'A'..'Z'|'_'|'$'|'0'..'9')*;
+identifier = ('a'..'z'|'A'..'Z'|'_'|'$') ('a'..'z'|'A'..'Z'|'_'|'-'|'$'|'0'..'9')*;
 blank = (' '|'\n'|'\t'|'\r')+;
 separator = ('.'|'/');
+brackets = '[]';
+wildcard = '?';
+compiled_from = 'Compiled from "' (Any-'"')* '"';
+dots = '...';
 
+// ---
 Parser
 Ignored blank;
 
-multi_files = compiled_from? class_declaration;
+// ---
+// Class and properties
 
-compiled_from = 'Compiled from "' identifier+ '.java"';
+files = file+;
+file = compiled_from? class_declaration;
 
 class_declaration = modifier* class_or_interface full_class_name
        extends_declaration? implements_declaration? throws_declaration?
        '{' property_declaration* '}';
 
+modifier
+       = 'public'|'private'|'protected'|'static'|'final'|'native'
+       |'synchronized'|'abstract'|'threadsafe'|'transient'|'volatile'|'strictfp';
+
 class_or_interface = 'class'|'interface';
 
-modifier = 'public'|'private'|'protected'|'static'|'final'|'native'|'synchronized'|'abstract'|'threadsafe'|'transient'|'volatile';
-type = type_specifier '[]'*;
-type_specifier = 'boolean'|'byte'|'char'|'short'|'int'|'float'|'long'|'double' | type_ref;
+implements_declaration = 'implements' types;
+extends_declaration = 'extends' types;
+throws_declaration = 'throws' types?;
+
+property_declaration
+       = {method:} modifier* generic_parameters? type identifier '(' types? ')' throws_declaration? ';'
+       | {constructor:} modifier* generic_parameters? full_class_name '(' types? ')' throws_declaration? ';'
+       | {attribute:} modifier* type identifier brackets* throws_declaration? ';'
+       | {static:} modifier* '{' '}' ';'
+       | ';';
+
+// ---
+// Types
 
-type_ref = full_class_name | generic_identifier 'extends' full_class_name | '?';
-type_refs = {tail:} type_refs ',' type_ref | {head:} type_ref;
+type = base_type brackets* dots?;
 
-generic_param = '<' generic_parameter_list '>';
-generic_parameter_list = {tail:} generic_parameter_list ',' parameter | {head:} parameter;
-generic_identifier = full_class_name | '?';
+types
+       = {tail:} types ',' type
+       | {head:} type;
 
-full_class_name = full_class_name separator class_name | class_name;
-class_name = identifier generic_param?;
+base_type
+       = {primitive:} primitive_base_type
+       | {class:} full_class_name
+       | {extends:} generic_identifier 'extends' type_bound
+       | {super:} generic_identifier 'super' type_bound
+       | {wildcard:} wildcard
+       | {void:} 'void';
 
-interface_name = full_class_name;
-interface_list = {tail:} interface_list ',' interface_name | {head:} interface_name;
+primitive_base_type = 'boolean'|'byte'|'char'|'short'|'int'|'float'|'long'|'double';
 
-parameter = type '...'?;
-parameter_list_comp = {tail:} parameter_list_comp ',' parameter | {head:} parameter;
-parameter_list = parameter_list_comp;
+type_bound
+       = {tail:} type_bound '&' full_class_name
+       | {head:} full_class_name;
 
-exception = type;
-exception_list = exception_list ',' exception | exception;
+generic_identifier
+       = {class:} full_class_name
+       | {wildcard:} wildcard;
 
-statement = variable_declaration | statement_block | ';';
-statement_block = '{' statement* '}';
+class_name = identifier generic_parameters?;
 
-variable_id = identifier '[]'*;
-method_id = identifier;
+full_class_name
+       = {tail:} full_class_name separator class_name
+       | {head:} class_name;
 
-property_declaration = method_declaration | constructor_declaration | variable_declaration | static_declaration | ';';
-variable_declaration = modifier* type variable_id throws_declaration? ';';
-method_declaration = modifier* generic_param? type method_id '(' parameter_list? ')' throws_declaration? ';';
-constructor_declaration = modifier* full_class_name '(' parameter_list? ')' throws_declaration? ';';
-implements_declaration = 'implements' interface_list*;
-extends_interface_declaration = 'extends' interface_list*;
-extends_declaration = 'extends' type;
-static_declaration = modifier* '{' '}' ';';
-throws_declaration = 'throws' exception_list?;
+generic_parameters = '<' types '>';
index ee0942f..e716a2e 100644 (file)
@@ -1,6 +1,7 @@
 # This file is part of NIT (http://www.nitlanguage.org).
 #
 # Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
+# Copyright 2015 Alexis Laferrière <alexis.laf@xymus.net>
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -21,78 +22,142 @@ intrude import model
 
 class CodeGenerator
 
-       var with_attributes: Bool
-       var comment_unknown_types: Bool
-       var file_out: FileWriter
-       var java_class: JavaClass
-       var nb_params: Int
-       var module_name: nullable String = null
+       # Path to the output file
+       var file_name: String
 
-       init (file_name: String, jclass: JavaClass, with_attributes, comment: Bool)
-       do
-               file_out = new FileWriter.open(file_name)
+       # Model of Java class being wrapped
+       var model: JavaModel
 
-               var nit_ext = ".nit"
-               if file_name.has_suffix(nit_ext) then
-                       # Output file ends with .nit, we expect it to be a valid name
-                       module_name = file_name.strip_extension(nit_ext)
+       # Comment out methods with unknown (unwrapped) types
+       var comment_unknown_types: Bool
 
-                       # Otherwise, it may be anything so do not declare a module
-               end
+       # Generate stub classes for unknown types used in the generated module
+       var stub_for_unknown_types: Bool
+
+       # Output file
+       var file_out: Writer = new FileWriter.open(file_name) is lazy, writable
 
-               self.java_class = jclass
-               self.with_attributes = with_attributes
-               self.comment_unknown_types = comment
+       # Name of the Nit module to generate
+       var module_name: nullable String is lazy do
+               if file_name.file_extension == "nit" then
+                       # Output file ends with .nit, we expect it to be a valid name
+                       return file_name.basename(".nit")
+               else return null
        end
 
+       # Generate the Nit module into `file_out`
        fun generate
        do
-               var jclass = self.java_class
+               # License
+               file_out.write license
 
-               var class_content = new Array[String]
-               class_content.add(gen_class_header(jclass.class_type))
+               # Module declaration
+               var module_name = module_name
+               if module_name != null then file_out.write "module {module_name} is no_warning(\"useless-superclass\")\n"
+               file_out.write "\n"
+
+               # All importations
+               var imports = new HashSet[String]
+               imports.add "import java\n"
+               for key, jclass in model.classes do
+                       for import_ in jclass.imports do imports.add "import android::{import_}\n"
+               end
+               file_out.write imports.join("\n")
+               file_out.write "\n"
 
-               if with_attributes then
-                       for id, jtype in jclass.attributes do class_content.add(gen_attribute(id, jtype))
+               # Sort classes from top-level classes (java.lang.Object) to leaves
+               var standard_classes = new Array[JavaClass]
+               for name, jclass in model.classes do
+                       if not jclass.class_type.is_anonymous then standard_classes.add jclass
                end
+               var linearized = model.class_hierarchy.linearize(standard_classes)
+
+               for jclass in linearized do
+                       # Skip classes with an invalid name at the Java language level
+                       if jclass.class_type.extern_equivalent.has("-") then continue
+
+                       generate_class_header(jclass)
+
+                       if not sys.opt_no_properties.value then
+
+                               for id, signatures in jclass.local_intro_methods do
+                                       for signature in signatures do
+                                               assert not signature.is_static
+                                               generate_method(jclass, id, id, signature.return_type, signature.params)
+                                               file_out.write "\n"
+                                       end
+                               end
 
-               for id, methods_info in jclass.methods do
-                       for method_info in methods_info do
-                               var nid = id
-                               if methods_info.length > 1 then nid += "{methods_info.index_of(method_info)}"
-                               class_content.add gen_method(id, nid, method_info.return_type, method_info.params)
+                               # Constructors
+                               for constructor in jclass.constructors do
+                                       var complex = jclass.constructors.length != 1 and constructor.params.not_empty
+                                       var base_name = if complex then "from" else ""
+                                       var name = jclass.nit_name_for(base_name, constructor.params, complex, false, local_only=true)
+
+                                       generate_constructor(jclass, constructor, name)
+                               end
+
+                               # Attributes
+                               for id, attribute in jclass.attributes do if not attribute.is_static then
+                                       generate_getter_setter(jclass, id, attribute)
+                               end
                        end
-               end
-               class_content.add("\nend\n")
 
-               var wrappers = new Array[String]
-               for jtype in jclass.unknown_types do
-                       if jtype == jclass.class_type then continue
-                       wrappers.add("\n")
-                       wrappers.add(gen_unknown_class_header(jtype))
-               end
+                       # JNI services
+                       generate_jni_services jclass.class_type
 
-               var imports = new Array[String]
-               imports.add("import mnit_android\n")
-               for import_ in jclass.imports do
-                       imports.add("import android::{import_}\n")
-               end
+                       # Close the class
+                       file_out.write "end\n\n"
 
-               file_out.write(gen_licence)
+                       if not sys.opt_no_properties.value then
 
-               var module_name = module_name
-               if module_name != null then file_out.write "module {module_name}\n"
+                               # Static functions as top-level methods
+                               var static_functions_prefix = jclass.class_type.extern_name.to_snake_case
+                               for id, signatures in jclass.methods do
+                                       for signature in signatures do if signature.is_static then
+                                               var nit_id = static_functions_prefix + "_" + id
+                                               generate_method(jclass, id, nit_id, signature.return_type, signature.params, is_static=true)
+                                               file_out.write "\n"
+                                       end
+                               end
+
+                               # Static attributes as top-level getters and setters
+                               for id, attribute in jclass.attributes do if attribute.is_static then
+                                       generate_getter_setter(jclass, id, attribute)
+                               end
+                       end
+
+                       # Primitive arrays
+                       for d in [1..opt_arrays.value] do
+                               generate_primitive_array(jclass, d)
+                       end
+               end
+
+               if stub_for_unknown_types then
+                       for jtype, nit_type in model.unknown_types do
+                               generate_unknown_class_header(jtype)
+                               file_out.write "\n"
+                       end
+               end
 
-               file_out.write("\n")
-               file_out.write(imports.join(""))
-               file_out.write("\n")
-               file_out.write(class_content.join(""))
-               file_out.write(wrappers.join(""))
+               file_out.close
        end
 
-       fun gen_licence: String
+       # Serialize `model` to a file next to `file_name`
+       fun write_model_to_file
        do
-               return """
+               if not sys.opt_save_model.value then return
+
+               # Write the model to file next to the Nit module
+               var model_path = file_name.strip_extension + ".jwrapper.bin"
+               var model_stream = model_path.to_path.open_wo
+               var serializer = new BinarySerializer(model_stream)
+               serializer.serialize model
+               model_stream.close
+       end
+
+       # License for the header of the generated Nit module
+       var license = """
 # This file is part of NIT (http://www.nitlanguage.org).
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -108,138 +173,277 @@ class CodeGenerator
 # limitations under the License.
 
 # This code has been generated using `jwrapper`
-"""
-       end
+""" is writable
 
-       fun gen_class_header(jtype: JavaType): String
+       private fun generate_class_header(java_class: JavaClass)
        do
-               var temp = new Array[String]
-               temp.add("extern class Native{jtype.id} in \"Java\" `\{ {jtype} `\}\n")
-               temp.add("\tsuper JavaObject\n\n")
+               var java_type = java_class.class_type
+               var nit_type = model.java_to_nit_type(java_type)
 
-               return temp.join("")
-       end
+               var super_java_types = new HashSet[JavaType]
+               super_java_types.add_all java_class.extends
+               super_java_types.add_all java_class.implements
 
-       fun gen_unknown_class_header(jtype: JavaType): String
-       do
-               var nit_type: NitType
-               if jtype.extern_name.has_generic_params then
-                       nit_type = jtype.extern_name.generic_params.first
-               else
-                       nit_type = jtype.extern_name
+               var supers = new Array[String]
+               var effective_supers = 0
+               for java_super in super_java_types do
+                       var nit_super = model.java_to_nit_type(java_super)
+
+                       # Comment out unknown types
+                       var c = ""
+                       if not nit_super.is_known and comment_unknown_types then c = "# "
+
+                       supers.add "{c}super {nit_super}"
+                       if c != "# " then effective_supers += 1
+               end
+
+               if effective_supers == 0 then
+                       if java_class.class_type.package_name == "java.lang.Object" or
+                          not model.knows_the_object_class then
+                               supers.add "super JavaObject"
+                       else supers.add "super Java_lang_Object"
                end
 
-               var temp = new Array[String]
-               temp.add("extern class {nit_type} in \"Java\" `\{ {jtype.to_package_name} `\}\n")
-               temp.add("\tsuper JavaObject\n\nend\n")
+               file_out.write """
+# Java class: {{{java_type}}}
+extern class {{{nit_type}}} in "Java" `{ {{{java_type.extern_equivalent}}} `}
+       {{{supers.join("\n\t")}}}
 
-               return temp.join("")
+"""
        end
 
-       fun gen_attribute(jid: String, jtype: JavaType): String
+       private fun generate_unknown_class_header(jtype: JavaType)
        do
-               return "\tvar {jid.to_nit_method_name}: {jtype.to_nit_type}\n"
+               var nit_type = jtype.extern_name
+
+               file_out.write "extern class {nit_type} in \"Java\" `\{ {jtype.extern_equivalent} `\}\n"
+               file_out.write "\tsuper JavaObject\n\nend\n"
        end
 
-       fun gen_method(jmethod_id: String, nmethod_id: String, jreturn_type: JavaType, jparam_list: Array[JavaType]): String
+       private fun generate_method(java_class: JavaClass, java_method_id, method_id: String,
+               java_return_type: JavaType, java_params: Array[JavaType], is_static: nullable Bool)
        do
-               var java_params = ""
-               var nit_params  = ""
+               var java_args = new Array[String]
+               var nit_params = new Array[String]
                var nit_id = "arg"
                var nit_id_no = 0
-               var nit_types = new Array[NitType]
-               var comment = ""
+               var c = ""
 
                # Parameters
-               for i in [0..jparam_list.length[ do
-                       var jparam = jparam_list[i]
-                       var nit_type = jparam.to_nit_type
-
-                       if not nit_type.is_complete then
-                               if jparam.is_wrapped then
-                                       java_class.imports.add nit_type.mod.as(not null)
-                               else
-                                       if comment_unknown_types then
-                                               comment = "#"
-                                       else
-                                               nit_type = jparam.extern_name
-                                               java_class.unknown_types.add(jparam)
-                                       end
-                               end
-                       end
-
-                       var cast = ""
+               for jparam in java_params do
+                       var nit_type = model.java_to_nit_type(jparam)
 
-                       if not jparam.is_collection then cast = jparam.param_cast
+                       if not nit_type.is_known and comment_unknown_types then c = "#"
+                       if jparam.is_vararg then c = "#"
 
-                       nit_types.add(nit_type)
-                       nit_type.arg_id = "{nit_id}{nit_id_no}"
-
-                       if i == jparam_list.length - 1 then
-                               java_params += "{cast}{nit_id}{nit_id_no}"
-                               nit_params  += "{nit_id}{nit_id_no}: {nit_type}"
-                       else
-                               java_params += "{cast}{nit_id}{nit_id_no}" + ", "
-                               nit_params  += "{nit_id}{nit_id_no}: {nit_type}, "
-                       end
+                       java_args.add "{jparam.param_cast}{nit_id}{nit_id_no}"
+                       nit_params.add "{nit_id}{nit_id_no}: {nit_type}"
 
                        nit_id_no += 1
                end
 
                # Method identifier
-               var method_id = nmethod_id.to_nit_method_name
+               method_id = method_id.to_nit_method_name
+               method_id = java_class.nit_name_for(method_id, java_params, java_class.methods[java_method_id].length > 1, is_static == true)
+
+               # Build the signature
                var nit_signature = new Array[String]
+               nit_signature.add "fun {method_id}"
+               if not java_params.is_empty then nit_signature.add "({nit_params.join(", ")})"
+
+               # Return value
+               var return_type = null
+               if not java_return_type.is_void then
+                       return_type = model.java_to_nit_type(java_return_type)
 
-               nit_signature.add "\tfun {method_id}"
+                       if not return_type.is_known and comment_unknown_types then c = "#"
+                       if java_return_type.is_vararg then c = "#"
 
-               if not jparam_list.is_empty then
-                       nit_signature.add "({nit_params})"
+                       nit_signature.add ": " + return_type.to_s
                end
 
-               var return_type = null
+               # Build the call in Java
+               var java_call
+               if is_static == true then
+                       java_call = java_class.class_type.package_name
+               else java_call = "self"
+               java_call += ".{java_method_id}({java_args.join(", ")})"
+
+               if return_type != null then java_call = "return {java_return_type.return_cast}" + java_call
+
+               # Tabulation
+               var t = "\t"
+               if is_static == true then t = ""
+               var ct = c+t
+
+               # Write
+               file_out.write """
+{{{t}}}# Java implementation: {{{java_return_type}}} {{{java_class}}}.{{{java_method_id}}}({{{java_params.join(", ")}}})
+{{{ct}}}{{{nit_signature.join}}} in "Java" `{
+{{{ct}}}       {{{java_call}}};
+{{{ct}}}`}
+"""
+       end
 
-               if not jreturn_type.is_void then
-                       return_type = jreturn_type.to_nit_type
-
-                       if not return_type.is_complete then
-                               if jreturn_type.is_wrapped then
-                                       java_class.imports.add return_type.mod.as(not null)
-                               else
-                                       if comment_unknown_types then
-                                               comment = "#"
-                                       else
-                                               return_type = jreturn_type.extern_name
-                                               java_class.unknown_types.add(jreturn_type)
-                                       end
-                               end
+       # Generate getter and setter to access an attribute, of field
+       private fun generate_getter_setter(java_class: JavaClass, java_id: String,
+               attribute: JavaAttribute)
+       do
+               var java_type = attribute.java_type
+               var nit_type = model.java_to_nit_type(java_type)
+
+               var nit_id = java_id
+               if attribute.is_static then nit_id = java_class.class_type.extern_name.to_snake_case + "_" + nit_id
+               nit_id = nit_id.to_nit_method_name
+               nit_id = java_class.nit_name_for(nit_id, [java_type], false, attribute.is_static)
+
+               var c = ""
+               if not nit_type.is_known and comment_unknown_types then c = "#"
+               if java_type.is_vararg then c = "#"
+
+               var recv
+               if attribute.is_static then
+                       recv = java_class.class_type.package_name
+               else recv = "self"
+
+               # Tabulation
+               var t = "\t"
+               if attribute.is_static then t = ""
+               var ct = c+t
+
+               file_out.write """
+{{{t}}}# Java getter: {{{java_class}}}.{{{java_id}}}
+{{{ct}}}fun {{{nit_id}}}: {{{nit_type}}} in "Java" `{
+{{{ct}}}       return {{{recv}}}.{{{java_id}}};
+{{{ct}}}`}
+
+{{{t}}}# Java setter: {{{java_class}}}.{{{java_id}}}
+{{{ct}}}fun {{{nit_id}}}=(value: {{{nit_type}}}) in "Java" `{
+{{{ct}}}       {{{recv}}}.{{{java_id}}} = value;
+{{{ct}}}`}
+
+"""
+       end
+
+       # Generate getter and setter to access an attribute, of field
+       private fun generate_constructor(java_class: JavaClass, constructor: JavaConstructor, name: String)
+       do
+               var c = ""
+               var nit_params_s = ""
+               var java_params_s = ""
+
+               if constructor.params.not_empty then
+                       var nit_params = new Array[String]
+                       var java_params = new Array[String]
+                       var param_id = 'a'
+                       for java_type in constructor.params do
+
+                               java_params.add "{java_type.param_cast}{param_id}"
+
+                               var nit_type = model.java_to_nit_type(java_type)
+                               nit_params.add  "{param_id}: {nit_type}"
+                               param_id = param_id.successor(1)
+
+                               if not nit_type.is_known and comment_unknown_types then c = "#"
+                               if java_type.is_vararg then c = "#"
                        end
 
-                       nit_signature.add ": {return_type} "
+                       nit_params_s = "(" + nit_params.join(", ") + ")"
+                       java_params_s = java_params.join(", ")
                end
 
-               var temp = new Array[String]
+               file_out.write """
+       # Java constructor: {{{java_class}}}
+{{{c}}}        new {{{name}}}{{{nit_params_s}}} in "Java" `{
+{{{c}}}                return new {{{java_class.class_type.package_name}}}({{{java_params_s}}});
+{{{c}}}        `}
 
-               temp.add(comment + nit_signature.join(""))
+"""
+       end
 
-               # FIXME : This huge `if` block is only necessary to copy primitive arrays as long as there's no better way to do it
-               if comment == "#" then
-                       temp.add(" in \"Java\" `\{\n{comment}\t\tself.{jmethod_id}({java_params});\n{comment}\t`\}\n")
-               # Methods with return type
-               else if return_type != null then
-                       temp.add(" in \"Java\" `\{\n{comment}\t\treturn {jreturn_type.return_cast}self.{jmethod_id}({java_params});\n{comment}\t`\}\n")
-               # Methods without return type
-               else if jreturn_type.is_void then
-                       temp.add(" in \"Java\" `\{\n{comment}\t\tself.{jmethod_id}({java_params});\n{comment}\t`\}\n")
-               # No copy
-               else
-                       temp.add(" in \"Java\" `\{\n{comment}\t\tself.{jmethod_id}({java_params});\n{comment}\t`\}\n")
-               end
+       private fun generate_primitive_array(java_class: JavaClass, dimensions: Int)
+       do
+               var base_java_type = java_class.class_type
+               var java_type = base_java_type.clone
+               java_type.array_dimension = dimensions
+
+               var base_nit_type = model.java_to_nit_type(base_java_type)
+               var nit_type = model.java_to_nit_type(java_type)
+
+               file_out.write """
+# Java primitive array: {{{java_type}}}
+extern class {{{nit_type}}} in "Java" `{ {{{java_type.extern_equivalent}}} `}
+       super AbstractJavaArray[{{{base_nit_type}}}]
+
+       # Get a new array of the given `size`
+       new(size: Int) in "Java" `{ return new {{{base_java_type}}}[(int)size]; `}
 
-               return temp.join("")
+       redef fun [](i) in "Java" `{ return self[(int)i]; `}
+
+       redef fun []=(i, e) in "Java" `{ self[(int)i] = e; `}
+
+       redef fun length in "Java" `{ return self.length; `}
+
+"""
+               generate_jni_services(java_type)
+               file_out.write """
+end
+
+"""
+       end
+
+       # Generate JNI related services
+       #
+       # For now, mostly avoid issue #845, but more services could be generated as needed.
+       private fun generate_jni_services(java_type: JavaType)
+       do
+               var nit_type = model.java_to_nit_type(java_type)
+
+               file_out.write """
+       redef fun new_global_ref import sys, Sys.jni_env `{
+               Sys sys = {{{nit_type}}}_sys(self);
+               JNIEnv *env = Sys_jni_env(sys);
+               return (*env)->NewGlobalRef(env, self);
+       `}
+
+       redef fun pop_from_local_frame_with_env(jni_env) `{
+               return (*jni_env)->PopLocalFrame(jni_env, self);
+       `}
+"""
        end
 end
 
+redef class Sys
+       # List of Nit keywords
+       #
+       # These may also be keywords in Java, but there they would be used capitalized.
+       private var nit_keywords = new HashSet[String].from(["abort", "abstract", "and", "assert",
+               "break", "class", "continue", "do", "else", "end", "enum", "extern", "false", "implies",
+               "import", "init", "interface", "intrude", "if", "in", "is", "isa", "isset", "for", "label",
+               "loop", "module", "new", "not", "null", "nullable", "or", "package", "private",
+               "protected", "public", "return", "self", "super", "then", "true", "type", "var", "while",
+
+       # Top-level methods
+               "class_name", "get_time", "hash", "inspect", "inspect_head", "is_same_type",
+               "is_same_instance", "object_id", "output", "output_class_name", "sys", "to_s",
+
+       # Pointer or JavaObject methods
+               "free"])
+
+       # Name of methods used at the top-level
+       #
+       # Used by `JavaClass::nit_name_for` with static properties.
+       private var top_level_used_names = new HashSet[String]
+
+       # Option to _not_ generate properties (static or from classes)
+       var opt_no_properties = new OptionBool("Do not wrap properties, only classes and basic services", "-n", "--no-properties")
+
+       # Should the model be serialized to a file?
+       var opt_save_model = new OptionBool("Save the model next to the generated Nit module", "-s", "--save-model")
+end
+
 redef class String
+
        # Convert the Java method name `self` to the Nit style
        #
        # * Converts to snake case
@@ -248,12 +452,70 @@ redef class String
        fun to_nit_method_name: String
        do
                var name = self.to_snake_case
-               if name.has_prefix("get_") then
-                       name = name.substring_from(4)
-               else if name.has_prefix("set_") then
-                       name = name.substring_from(4) + "="
+
+               # Strip the '_' prefix
+               while name.has_prefix("_") do name = name.substring(1, name.length-1)
+
+               # Escape Nit keywords
+               if nit_keywords.has(name) then name += "_"
+
+               # If the name starts by something other than a letter, prefix with `java_`
+               if not name.chars.first.is_letter then name = "java_" + name
+
+               name = name.replace("$", "_")
+
+               return name
+       end
+end
+
+redef class JavaClass
+       # Property names used in this class
+       private var used_names = new HashSet[String] is serialize
+
+       # Get an available property name for the Java property with `name` and parameters
+       #
+       # If `use_parameters_name` then expect that there will be conflicts,
+       # so use the types of `parameters` to build the name.
+       private fun nit_name_for(name: String, parameters: Array[JavaType], use_parameters_name: Bool, is_static: Bool, local_only: nullable Bool): String
+       do
+               # Append the name of each parameter
+               if use_parameters_name then
+                       for param in parameters do
+                               var id = param.id
+                               id += "Array"*param.array_dimension
+                               name += "_" + id
+                       end
+               end
+
+               # Set of sets of property names, local or top-level
+               var local_used_names
+               var used_names
+               if is_static then
+                       # Top-level methods
+                       local_used_names = sys.top_level_used_names
+                       used_names = sys.top_level_used_names
+               else if local_only == true then
+                       # Local only: constructors
+                       local_used_names = self.used_names
+                       used_names = self.used_names
+               else
+                       # Avoid conflicts with all super classes
+                       local_used_names = self.used_names
+                       used_names = new HashSet[String]
+                       for sup in in_hierarchy.greaters do
+                               used_names.add_all sup.used_names
+                       end
+               end
+
+               # As a last resort, append numbers to the name
+               var base_name = name
+               var count = 1
+               while used_names.has(name) do
+                       name = base_name + count.to_s
+                       count += 1
                end
 
+               local_used_names.add name
                return name
        end
 end
index 9c1440d..115dbcd 100644 (file)
@@ -1,6 +1,7 @@
 # This file is part of NIT (http://www.nitlanguage.org).
 #
 # Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
+# Copyright 2015 Alexis Laferrière <alexis.laf@xymus.net>
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -23,208 +24,36 @@ import code_generator
 import jtype_converter
 intrude import model
 
+# Visitor of the AST generated from javap output
 class JavaVisitor
        super Visitor
 
-       var converter: JavaTypeConverter
+       # Model of all the analyzed classes
+       var model: JavaModel
 
-       var java_class = new JavaClass
-       var declaration_type: nullable String =  null
-       var declaration_element: nullable String = null
-       var class_type: JavaType
-
-       var variable_id = ""
-       var variable_type: JavaType
-
-       var is_generic_param = false
-       var is_generic_id = false
-       var generic_id = ""
-       var gen_params_index = 0
-
-       # Used to resolve generic return types (T -> foo.faz.Bar)
-       var generic_map = new HashMap[String, Array[String]]
-
-       var is_primitive_array = false
-
-       var method_id = ""
-       var method_return_type: JavaType
-       var method_params = new Array[JavaType]
-       var param_index = 0
+       # Java class in construction
+       var java_class: JavaClass is noinit
 
        redef fun visit(n) do n.accept_visitor(self)
-
-       init(converter: JavaTypeConverter)
-       do
-               self.converter = converter
-               self.class_type = new JavaType(self.converter)
-               self.method_return_type = new JavaType(self.converter)
-               self.variable_type = new JavaType(self.converter)
-               super
-       end
-
-       # Add the identifier from `token` to the current context
-       fun add_identifier(token: NToken)
-       do
-               if declaration_type == "variable" then
-                       if declaration_element == "type" then
-                               variable_type.identifier.add(token.text)
-                       end
-               else if declaration_type == "method" then
-                       if declaration_element == "return_type" then
-                               method_return_type.identifier.add(token.text)
-                       else if declaration_element == "parameter_list" then
-                               method_params[param_index].identifier.add(token.text)
-                       end
-               end
-       end
 end
 
 redef class Node
-       fun accept_visitor(v: JavaVisitor) do visit_children(v)
-end
-
-redef class Nidentifier
-       redef fun accept_visitor(v)
-       do
-               if v.declaration_type == "class_header" then
-
-                       if v.declaration_element == "id" then
-                               v.class_type.identifier.add(self.text)
-                       end
-
-               else if v.declaration_type == "variable" then
-
-                       if v.declaration_element == "id" then
-                               v.variable_id += self.text
-                       else if v.declaration_element == "type" then
-                               if v.is_generic_param then
-                                       v.variable_type.generic_params[v.gen_params_index].identifier.add(self.text)
-                               else
-                                       v.variable_type.identifier.add(self.text)
-                               end
-                       end
-
-               else if v.declaration_type == "method" then
-
-                       if v.declaration_element == "id" then
-                               v.method_id = self.text
-                       else if v.declaration_element == "return_type" then
-                               if self.text == "void" then 
-                                       v.method_return_type.is_void = true
-                               else if v.is_generic_param then
-                                       v.method_return_type.generic_params[v.gen_params_index].identifier.add(self.text)
-                               else
-                                       v.method_return_type.identifier.add(self.text)
-                               end
-                       else if v.declaration_element == "parameter_list" then
-                               if v.is_generic_param then
-                                       v.method_params[v.param_index].generic_params[v.gen_params_index].identifier.add(self.text)
-                               else
-                                       v.method_params[v.param_index].identifier.add(self.text)
-                               end
-
-                       # Creates a map to resolve generic return types
-                       # Exemple : public **<T extends android/os/Bundle>** T foo();
-                       else if v.is_generic_param then
-                               if v.is_generic_id then
-                                       v.generic_id = self.text
-                                       v.generic_map[self.text] = new Array[String]
-
-                                       if not v.method_return_type.has_unresolved_types then v.method_return_type.has_unresolved_types = true
-                               else
-                                       v.generic_map[v.generic_id].add(self.text)
-                               end
-                       end
-
-               end
-
-               super
-       end
-end
-
-# Primitive array node
-redef class N_39d_91d_93d_39d
-       redef fun accept_visitor(v)
-       do
-               if v.declaration_type == "variable" then
-                       if v.declaration_element == "type" then
-                               if v.is_generic_param then
-                                       v.variable_type.generic_params[v.gen_params_index].array_dimension += 1
-                               else
-                                       v.variable_type.array_dimension += 1
-                               end
-                       end
-
-               else if v.declaration_type == "method" then
-
-                       if v.declaration_element == "return_type" then
-                               if v.is_generic_param then
-                                       v.method_return_type.generic_params[v.gen_params_index].array_dimension += 1
-                               else
-                                       v.method_return_type.array_dimension += 1
-                               end
-                       else if v.declaration_element == "parameter_list" then
-                               if v.is_generic_param then
-                                       v.method_params[v.param_index].generic_params[v.gen_params_index].array_dimension += 1
-                               else
-                                       v.method_params[v.param_index].array_dimension += 1
-                               end
-                       end
-
-               end
-
-               super
-       end
-end
-
-redef class N_39dchar_39d
-       redef fun accept_visitor(v) do v.add_identifier self
-end
-
-redef class N_39dboolean_39d
-       redef fun accept_visitor(v) do v.add_identifier self
-end
-
-redef class N_39dfloat_39d
-       redef fun accept_visitor(v) do v.add_identifier self
+       private fun accept_visitor(v: JavaVisitor) do visit_children(v)
 end
 
-redef class N_39ddouble_39d
-       redef fun accept_visitor(v) do v.add_identifier self
-end
-
-redef class N_39dbyte_39d
-       redef fun accept_visitor(v) do v.add_identifier self
-end
-
-redef class N_39dshort_39d
-       redef fun accept_visitor(v) do v.add_identifier self
-end
-
-redef class N_39dint_39d
-       redef fun accept_visitor(v) do v.add_identifier self
-end
-
-redef class N_39dlong_39d
-       redef fun accept_visitor(v) do v.add_identifier self
-end
-
-#                                  #
-#    C L A S S     H E A D E R     #
-#                                  #
+# ---
+# Class Header
 
 redef class Nclass_declaration
        redef fun accept_visitor(v)
        do
-               v.declaration_type = "class_header"
-               v.declaration_element = "id"
-               super
+               var jtype = n_full_class_name.to_java_type
 
-               # Exit class declaration
-               v.declaration_type = null
-               v.declaration_element = null
+               v.java_class = new JavaClass(jtype)
+               v.model.add_class v.java_class
 
-               v.java_class.class_type = v.class_type
+               # Visit all properties
+               super
        end
 end
 
@@ -232,9 +61,7 @@ end
 redef class Nextends_declaration
        redef fun accept_visitor(v)
        do
-               v.declaration_element = "extends"
-               super
-               v.declaration_element = null
+               v.java_class.extends.add_all n_types.to_a
        end
 end
 
@@ -242,209 +69,267 @@ end
 redef class Nimplements_declaration
        redef fun accept_visitor(v)
        do
-               v.declaration_element = "implements"
-               super
-               v.declaration_element = null
+               v.java_class.implements.add_all n_types.to_a
        end
 end
 
-#                                            #
-# P R O P E R T Y    D E C L A R A T I O N S #
-#                                            #
+# ---
+# Properties
 
 # Method declaration
-redef class Nmethod_declaration
+redef class Nproperty_declaration_method
        redef fun accept_visitor(v)
        do
-               v.declaration_type = "method"
-               super
-               v.declaration_type = null
-
-               if v.method_return_type.has_unresolved_types then v.method_return_type.resolve_types(v.generic_map)
-               v.java_class.add_method(v.method_id, v.method_return_type, v.method_params)
-
-               v.method_params.clear
-               v.method_id = ""
-               v.method_return_type = new JavaType(v.converter)
+               var is_static = false
+               var modifiers = n_modifier
+               if modifiers != null then is_static = modifiers.has_static
+
+               var id = n_identifier.text
+               var return_jtype = n_type.to_java_type
+
+               # Generic parameters
+               var n_params = n_generic_parameters
+               var generic_params
+               if n_params != null then
+                       generic_params = n_params.n_types.to_a
+               else generic_params = new Array[JavaType]
+
+               # Collect parameters
+               var n_types = n_types
+               var params
+               if n_types != null then
+                       params = n_types.to_a
+               else params = new Array[JavaType]
+
+               var method = new JavaMethod(is_static, return_jtype, params, generic_params)
+               v.java_class.methods[id].add method
        end
 end
 
 # Constructor declaration
-redef class Nconstructor_declaration
+redef class Nproperty_declaration_constructor
        redef fun accept_visitor(v)
        do
-               v.declaration_type = "constructor"
-               super
-               v.declaration_type = null
+               # Collect parameters
+               var n_types = n_types
+               var params
+               if n_types != null then
+                       params = n_types.to_a
+               else params = new Array[JavaType]
+
+               # Generic parameters
+               var n_params = n_generic_parameters
+               var generic_params
+               if n_params != null then
+                       generic_params = n_params.n_types.to_a
+               else generic_params = new Array[JavaType]
+
+               var method = new JavaConstructor(params, generic_params)
+               v.java_class.constructors.add method
        end
 end
 
 # Variable property declaration
-redef class Nvariable_declaration
+redef class Nproperty_declaration_attribute
        redef fun accept_visitor(v)
        do
-               v.declaration_type = "variable"
-               super
-               v.declaration_type = null
+               var id = n_identifier.text
+               var jtype = n_type.to_java_type
+
+               # Manually count the array depth as it is after the id
+               var brackets = n_brackets
+               if brackets != null then jtype.array_dimension += brackets.children.length
 
-               v.java_class.attributes[v.variable_id] = v.variable_type
+               var is_static = false
+               var modifiers = n_modifier
+               if modifiers != null then is_static = modifiers.has_static
 
-               v.variable_id = ""
-               v.variable_type = new JavaType(v.converter)
+               v.java_class.attributes[id] = new JavaAttribute(is_static, jtype)
        end
 end
 
 # Static property declaration
-redef class Nstatic_declaration
+redef class Nproperty_declaration_static
        redef fun accept_visitor(v)
        do
-               v.declaration_type = "static"
-               super
-               v.declaration_type = null
+               # TODO
        end
 end
 
-# Identifier of a variable
-redef class Nvariable_id
-       redef fun accept_visitor(v)
+# ---
+# Services
+
+redef class Ntype
+       private fun to_java_type: JavaType
        do
-               v.declaration_element = "id"
-               super
-               v.declaration_element = null
+               var jtype = n_base_type.to_java_type
+
+               var brackets = n_brackets
+               if brackets != null then jtype.array_dimension += brackets.children.length
+
+               var dots = n_dots
+               if dots != null then jtype.is_vararg = true
+
+               return jtype
        end
 end
 
-# Identifier of the method
-redef class Nmethod_id
-       redef fun accept_visitor(v)
+redef class Nbase_type
+       private fun to_java_type: JavaType
        do
-               v.declaration_element = "id"
-               super
-               v.declaration_element = null
+               # By default, everything is bound by object
+               var jtype = new JavaType
+               jtype.identifier.add_all(["java", "lang", "object"])
+               return jtype
        end
 end
 
-redef class Ntype
-       redef fun accept_visitor(v)
+redef class Nbase_type_class
+       redef fun to_java_type do return n_full_class_name.to_java_type
+end
+
+redef class Nbase_type_primitive
+       redef fun to_java_type
        do
-               if v.declaration_type == "variable" and v.declaration_element != "id" then
-                       v.declaration_element = "type"
-               end
+               # All the concrete nodes under this production are tokens
+               for node in depth do
+                       if not node isa NToken then continue
 
-               if v.declaration_type == "method" and v.declaration_element == null then
-                       # Makes sure it is not the generic return type definition
-                       if not (v.method_return_type.identifier.is_empty and v.is_generic_param) then
-                               v.declaration_element = "return_type"
-                       end
+                       var jtype = new JavaType
+                       jtype.identifier.add node.text
+                       return jtype
                end
 
-               super
-
-               if v.declaration_element == "variable" then
-                       v.declaration_element = null
-               end
+               abort
        end
 end
 
-redef class Ngeneric_param
-       redef fun accept_visitor(v)
+redef class Nbase_type_void
+       redef fun to_java_type
        do
-               # Ignore the weird generic return type declaration
-               if v.declaration_type == "method" then
-                       if v.declaration_element == null then
-                               v.is_generic_param = true
-                       else
-                               v.is_generic_param = true
-                               v.gen_params_index = 0
-
-                               if v.declaration_element == "return_type" then
-                                       v.method_return_type.generic_params = new Array[JavaType]
-                               else if v.declaration_element == "parameter_list" then
-                                       v.method_params[v.param_index].generic_params = new Array[JavaType]
-                               end
-                       end
-               else if v.declaration_type == "variable" then
-                       if v.declaration_element == "type" then
-                               v.is_generic_param = true
-                               v.gen_params_index = 0
-                               v.variable_type.generic_params = new Array[JavaType]
-                       end
-               end
+               var jtype = new JavaType
+               jtype.is_void = true
+               return jtype
+       end
+end
 
-               super
+redef class Nbase_type_extends
+       redef fun to_java_type do return n_generic_identifier.to_java_type
+end
 
-               v.declaration_element = null
-               v.is_generic_param = false
+redef class Nbase_type_super
+       redef fun to_java_type
+       do
+               var bounds = n_type_bound.to_a
+
+               # Java use more than one lower bound,
+               # it can't be translated statically to Nit,
+               # so we use the only the first one.
+               # This may cause problems on complex generic types,
+               # but these cases can be handled manually.
+               return bounds.first
        end
 end
 
 redef class Ngeneric_identifier
-       redef fun accept_visitor(v)
-       do
-               if v.declaration_type == "method" then
-                       if v.declaration_element == null then
-                               v.is_generic_id = true
-                       end
-               end
-
-               super
-
-               v.is_generic_id = false
+       private fun to_java_type: JavaType is abstract
+end
 
-       end
+redef class Ngeneric_identifier_class
+       redef fun to_java_type do return n_full_class_name.to_java_type
 end
 
-redef class Nparameter_list
-       redef fun accept_visitor(v)
+redef class Ngeneric_identifier_wildcard
+       redef fun to_java_type
        do
-               v.declaration_element = "parameter_list"
-               v.param_index = 0
-               super
-               v.declaration_element = null
-               v.param_index = 0
+               var jtype = new JavaType
+               jtype.identifier.add_all(["java", "lang", "Object"])
+               return jtype
        end
 end
 
-redef class Nparameter
-       redef fun accept_visitor(v)
+redef class Nfull_class_name
+       # All the identifiers composing this class name
+       private fun to_a: Array[String] is abstract
+
+       # Access `n_class_name` on both alternatives
+       private fun n_class_name_common: Nclass_name is abstract
+
+       private fun to_java_type: JavaType
        do
-               if v.declaration_type == "method" then
-                       if v.declaration_element == "parameter_list" then
-                               if v.is_generic_param then
-                                       v.method_params[v.param_index].generic_params.add(new JavaType(v.converter))
+               var jtype = new JavaType
+               jtype.identifier = to_a
 
-                                       super
+               # Generic parameters
+               var n_params = n_class_name_common.n_generic_parameters
+               if n_params != null then jtype.generic_params = n_params.n_types.to_a
 
-                                       v.gen_params_index += 1
-                               else
-                                       v.method_params.add(new JavaType(v.converter))
+               return jtype
+       end
+end
 
-                                       super
+redef class Nfull_class_name_head
+       redef fun n_class_name_common do return n_class_name
 
-                                       v.param_index += 1
-                               end
-                       else if v.declaration_element == "return_type" and v.is_generic_param then
+       redef fun to_a do return [n_class_name.n_identifier.text]
+end
 
-                               v.method_return_type.generic_params.add(new JavaType(v.converter))
+redef class Nfull_class_name_tail
+       redef fun n_class_name_common do return n_class_name
 
-                               super
+       redef fun to_a
+       do
+               var a = n_full_class_name.to_a
+               a.add n_class_name.n_identifier.text
+               return a
+       end
+end
 
-                               v.gen_params_index += 1
+redef class Ntypes
+       # Get the types composing this list of parameters
+       #
+       # This is used both on methods signatures and type parameters.
+       private fun to_a: Array[JavaType] is abstract
+end
 
-                       # For generic return type definition
-                       else if v.declaration_element == null then
-                               super
-                       end
-               else if v.declaration_type == "variable" then
-                       if v.declaration_element == "type" and v.is_generic_param then
-                               v.variable_type.generic_params.add(new JavaType(v.converter))
+redef class Ntypes_head
+       redef fun to_a do return [n_type.to_java_type]
+end
 
-                               super
+redef class Ntypes_tail
+       redef fun to_a
+       do
+               var a = n_types.to_a
+               a.add n_type.to_java_type
+               return a
+       end
+end
 
-                               v.gen_params_index += 1
-                       end
-               else
-                       super
+redef class Nodes
+       private fun has_static: Bool
+       do
+               for modifier in depth do
+                       if modifier isa NToken and modifier.text == "static" then return true
                end
+
+               return false
+       end
+end
+
+redef class Ntype_bound
+       # Get the types composing this bound
+       private fun to_a: Array[JavaType] is abstract
+end
+
+redef class Ntype_bound_head
+       redef fun to_a do return [n_full_class_name.to_java_type]
+end
+
+redef class Ntype_bound_tail
+       redef fun to_a
+       do
+               var a = n_type_bound.to_a
+               a.add n_full_class_name.to_java_type
+               return a
        end
 end
index f70d6ed..b574985 100644 (file)
@@ -1,6 +1,7 @@
 # This file is part of NIT (http://www.nitlanguage.org).
 #
 # Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
+# Copyright 2015 Alexis Laferrière <alexis.laf@xymus.net>
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # Services to convert java type to nit type and get casts if needed
 module jtype_converter
 
+import opts
+
+redef class Sys
+       # Converter between Java and Nit type
+       var converter = new JavaTypeConverter is lazy
+
+       # Option to treat base Java objects as an equivalent to those in Nit?
+       #
+       # This concerns `Byte, Integer, Float, etc`.
+       var opt_cast_objects = new OptionBool("Convert base objects as their primitive equivalent", "-c")
+end
+
 class JavaTypeConverter
 
        var type_map = new HashMap[String, String]
@@ -27,38 +40,39 @@ class JavaTypeConverter
        do
                # Java type to nit type
                type_map["byte"] = "Int"
-               type_map["Byte"] = "Int"
                type_map["short"] = "Int"
-               type_map["Short"] = "Int"
                type_map["int"] = "Int"
-               type_map["Integer"] = "Int"
                type_map["long"] = "Int"
-               type_map["Long"] = "Int"
                type_map["char"] = "Char"
-               type_map["Character"] = "Char"
                type_map["float"] = "Float"
-               type_map["Float"] = "Float"
                type_map["double"] = "Float"
-               type_map["Double"] = "Float"
                type_map["boolean"] = "Bool"
-               type_map["Boolean"] = "Bool"
-               type_map["Object"] = "JavaObject"
-               type_map["String"] = "JavaString"
-               type_map["CharSequence"] = "JavaString"
-
 
                # Cast if the type is given as a parameter
                param_cast_map["byte"] = "(byte)"
-               param_cast_map["Byte"] = "(Byte)"
                param_cast_map["short"] = "(short)"
-               param_cast_map["Short"] = "(short)"
                param_cast_map["float"] = "(float)"
-               param_cast_map["Float"] = "(float)"
                param_cast_map["int"] = "(int)"
-               param_cast_map["Integer"] = "(int)"
 
-               # Cast if the type is given as a return value
-               return_cast_map["CharSequence"] = "(String)"
+               if opt_cast_objects.value then
+                       type_map["Byte"] = "Int"
+                       type_map["Short"] = "Int"
+                       type_map["Integer"] = "Int"
+                       type_map["Long"] = "Int"
+                       type_map["Character"] = "Char"
+                       type_map["Float"] = "Float"
+                       type_map["Double"] = "Float"
+                       type_map["Boolean"] = "Bool"
+                       type_map["CharSequence"] = "JavaString"
+
+                       param_cast_map["Byte"] = "(Byte)"
+                       param_cast_map["Short"] = "(short)"
+                       param_cast_map["Float"] = "(float)"
+                       param_cast_map["Integer"] = "(int)"
+
+                       # Cast if the type is given as a return value
+                       return_cast_map["CharSequence"] = "(String)"
+               end
        end
 
        fun to_nit_type(java_type: String): nullable String
@@ -70,7 +84,7 @@ class JavaTypeConverter
        do
                return self.param_cast_map.get_or_default(java_type, "")
        end
-       
+
        fun cast_as_return(java_type: String): String
        do
                return self.return_cast_map.get_or_default(java_type, "")
index dd3f8ef..bf25f1e 100644 (file)
@@ -1,6 +1,7 @@
 # This file is part of NIT (http://www.nitlanguage.org).
 #
 # Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
+# Copyright 2015 Alexis Laferrière <alexis.laf@xymus.net>
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# jwrapper is a Nit extern class generator `in "Java"`.
-# It takes a .class file and output a Nit file. For further details on installation and usage, refer to the README file.
+# jwrapper wraps Java classes in extern Nit classes
+#
+# This tool takes class file, Jar archives and javap files as input,
+# and it outputs a Nit source file.
+# For further details on installation and usage, refer to the README file.
 #
 # Here's an overview of the project design :
 # * Grammar and lexer : `grammar/javap.sablecc`
 # * The `javap_visitor` implements the visitor that extracts data from the AST
 # * The `code_generator` takes these data and converts it to Nit code via the `jtype_converter` module and generate the output Nit file.
-# * The `types` contains data structures used to represent the data
+# * The `model` contains data structures used to represent the data
 # * The `jwrapper` module implements the user interface
 module jwrapper
 
 import opts
+import performance_analysis
+
 import javap_test_parser
 import code_generator
 import javap_visitor
 
 var opts = new OptionContext
 
-var opt_attr = new OptionBool("Generate attributes", "-a", "--with-attributes")
-var opt_comment = new OptionBool("Comment methods/attributes containing unknown types", "-c", "--comment")
-var opt_wrap = new OptionBool("Create extern classes wrapping unknown types (Default)", "-w", "--wrap")
+var opt_unknown = new OptionEnum(["comment", "stub", "ignore"], "How to deal with unknown types", 0, "-u")
+var opt_verbose = new OptionCount("Verbosity", "-v")
+var opt_output = new OptionString("Output file", "-o")
+var opt_regex = new OptionString("Regex pattern to filter classes in Jar archives", "-r")
 var opt_help = new OptionBool("Show this help message", "-h", "--help")
 
-opts.add_option(opt_attr, opt_comment, opt_wrap, opt_help)
-
-opts.parse(args)
-
-if opt_wrap.value and opt_comment.value then
-       print "Error: Can't use both '-c' and '-w'"
-       exit 1
-end
+opts.add_option(opt_output, opt_unknown, opt_extern_class_prefix, opt_libs, opt_regex, opt_cast_objects, opt_arrays, opt_save_model, opt_load_models, opt_no_properties, opt_verbose, opt_help)
+opts.parse args
 
-if not opts.errors.is_empty or opts.rest.length != 2 or opt_help.value then
-       print "USAGE: jwrapper [OPTIONS] class_file nit_file"
-       print "Options:"
+if opts.errors.not_empty or opts.rest.is_empty or opt_help.value then
+       print """
+Usage: jwrapper [options] file [other_file [...]]
+Input files: bytecode Java class (.class), Jar archive (.jar) or javap output (.javap)
+Options:"""
        opts.usage
 
        if opt_help.value then exit 0
        exit 1
 end
 
-var dot_class = opts.rest[0]
-var out_file = opts.rest[1]
+var out_file = opt_output.value
+if out_file == null then out_file = "out.nit"
 
 if not "javap".program_is_in_path then
-       print "ERROR: 'javap' not found."
+       print "Error: 'javap' must be in PATH"
        exit 1
 end
 
-var javap = new ProcessReader("javap", "-public", dot_class)
+var regex = null
+var regex_code = opt_regex.value
+if regex_code != null then
+       regex = regex_code.to_re
+       var error = regex.compile
+       if error != null then
+               print_error "Regex Error: {error}"
+               exit 1
+       end
+end
+
+# List of bytecode Java classes and javap output files
+var class_files = new Array[String]
+var javap_files = new Array[String]
+var clock = new Clock
+
+# Sort through input files passed as arguments
+for input in opts.rest do
+       var ext = input.file_extension
+       if ext == "class" then
+               class_files.add input
+       else if ext == "javap" then
+               javap_files.add input
+       else if ext == "jar" then
+               clock.lapse
+
+               var out_dir = "tmp"
+               if not out_dir.file_exists then out_dir.mkdir
+
+               if opt_verbose.value > 0 then print "# Extracting {input}"
+
+               # Extract all files
+               var cmd = "cd {out_dir}; jar -xf {input}"
+               var status = system(cmd)
+               if status != 0 then
+                       print_error "Warning: Failed to extract Jar archive '{input}'"
+                       continue
+               end
+
+               # List .class files
+               var javap = new ProcessReader("jar", "-tf", input)
+               var output = javap.read_all
+               javap.wait
+               for path in output.split("\n") do
+                       if path.file_extension == "class" then
+
+                               # Filter out the classes that do not answer to the Regex
+                               if regex != null and not path.has(regex) then continue
+
+                               class_files.add out_dir / path
+                       end
+               end
+               javap.close
+
+               sys.perfs["jar extract"].add clock.lapse
+       else
+               print_error "Warning: Unsupported file extension for input file '{input}'"
+       end
+end
 
-var p = new TestParser_javap
-var tree = p.work(javap.read_all)
+if class_files.is_empty and javap_files.is_empty then
+       print_error "Error: No valid input files, quitting"
+       exit 1
+end
 
+var model = new JavaModel
 var converter = new JavaTypeConverter
 
-var visitor = new JavaVisitor(converter)
-visitor.enter_visit(tree)
+# Concatenated javap output for all the target files
+var javap_output = ""
+
+# Parse and analyze all the classes at once
+if class_files.not_empty then
 
-var generator = new CodeGenerator(out_file, visitor.java_class, opt_attr.value, opt_comment.value)
+       if opt_verbose.value > 0 then print "# Running javap on {class_files.length} Java classes"
+       clock.lapse
+
+       # Run javap of the class file
+       class_files.unshift "-public"
+       var javap = new ProcessReader("javap", class_files...)
+       javap_output += javap.read_all
+       javap.wait
+       javap.close
+       var status = javap.status
+
+       if status != 0 then
+               print_error "Warning: javap failed to parse all class files, is it a valid class file?"
+               exit 1
+       end
+
+       sys.perfs["javap"].add clock.lapse
+end
+
+# Concatenate the preprocessed javap outputs
+for class_file in javap_files do
+       if opt_verbose.value > 0 then print "# Using the preprocessed file {class_file}"
+
+       var ext = class_file.file_extension
+       assert ext == "javap"
+
+       javap_output += class_file.to_path.read_all
+end
+
+if opt_verbose.value > 0 then print "# Parsing javap output"
+if opt_verbose.value > 1 then javap_output.write_to_file "tests/javap.javap"
+
+# Lexer
+var lexer = new Lexer_javap(javap_output)
+var parser = new Parser_javap
+var tokens = lexer.lex
+parser.tokens.add_all tokens
+sys.perfs["core lexer"].add clock.lapse
+
+# Parser
+var root_node = parser.parse
+if root_node isa NError then
+       print_error "Warning: Parsing failed with {root_node.message}:{root_node.position or else ""}"
+       exit 1
+end
+sys.perfs["core parser"].add clock.lapse
+
+# Build model
+if opt_verbose.value > 0 then print "# Building model"
+assert root_node isa NStart
+var visitor = new JavaVisitor(model)
+visitor.enter_visit root_node
+sys.perfs["core model"].add clock.lapse
+
+# Resolve types
+model.resolve_types
+sys.perfs["core resolve"].add clock.lapse
+
+# Build class hierarchy
+model.build_class_hierarchy
+sys.perfs["core hierarchy"].add clock.lapse
+
+if opt_verbose.value > 0 then print "# Generating Nit code"
+
+# Generate the Nit module
+var use_comment = opt_unknown.value == 0
+var use_stub = opt_unknown.value == 1
+var generator = new CodeGenerator(out_file, model, use_comment, use_stub)
 generator.generate
+sys.perfs["code generator"].add clock.lapse
+
+# Write the model to a file, for use by subsequent passes
+generator.write_model_to_file
+sys.perfs["writing model"].add clock.lapse
+
+if opt_verbose.value > 1 then
+       print "# Performance Analysis:"
+       print sys.perfs
+
+       print "# {model.unknown_types.length} unknown types:"
+       var c = 0
+       for id, ntype in model.unknown_types do
+               print "* {id}"
+               c += 1
+               if c > 100 then
+                       print "* ..."
+                       break
+               end
+       end
+end
index d38a7a1..74f90b5 100644 (file)
@@ -1,6 +1,7 @@
 # This file is part of NIT (http://www.nitlanguage.org).
 #
 # Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
+# Copyright 2015 Alexis Laferrière <alexis.laf@xymus.net>
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Contains the java and nit type representation used to convert java to nit code
-module model
+# Model of the parsed Java classes and their corresponding Nit types
+module model is serialize
+
+import more_collections
+import opts
+import poset
+import binary::serialization
 
 import jtype_converter
 
 class JavaType
-       private var converter: JavaTypeConverter
+       super Cloneable
+
+       # Identifiers composing the namespace and class name
+       #
+       # An array of all the names that would be separated by `.`.
+       # Each name may contain `$`.
        var identifier = new Array[String]
+
        var generic_params: nullable Array[JavaType] = null
+
+       # Is this a void return type?
        var is_void = false
 
+       # Is this type a vararg?
+       var is_vararg = false is writable
+
+       # Is this type based on an anonymous class?
+       var is_anonymous: Bool is lazy do
+               for id in identifier do
+                       for part in id.split("$") do
+                               if part.chars.first.is_digit then return true
+                       end
+               end
+               return false
+       end
+
        # Has some generic type to be resolved (T extends foo => T is resolved to foo)
        var has_unresolved_types = false
 
@@ -34,10 +61,6 @@ class JavaType
        fun is_primitive_array: Bool do return array_dimension > 0
 
        fun has_generic_params: Bool do return not generic_params == null
-       fun full_id: String do return identifier.join(".")
-       fun id: String do return identifier.last.replace("$", "")
-
-       init(converter: JavaTypeConverter) do self.converter = converter
 
        fun return_cast: String do return converter.cast_as_return(self.id)
 
@@ -50,275 +73,508 @@ class JavaType
                return converter.cast_as_param(self.id)
        end
 
-       fun to_nit_type: NitType
+       # Name to give an extern class wrapping this type
+       fun extern_name: String
        do
-               var nit_type: NitType
-               var type_id = null
-
-               if not is_primitive_array then
-                       type_id = converter.to_nit_type(self.id)
+               var name
+               var prefix = extern_class_prefix
+               if prefix == null then
+                       # Use the namespace, e.g. java.lang.String -> Java_lang_String
+                       assert not identifier.is_empty
+                       if identifier.length == 1 then
+                               name = identifier.last
+                       else
+                               var first = identifier.first
+                               var last = identifier.last
+                               var mid = identifier.subarray(1, identifier.length-2)
+                               name = first.simple_capitalized + "_"
+                               if mid.not_empty then name += mid.join("_") + "_"
+                               name += last
+                       end
+               else
+                       # Use the prefix and the short class name
+                       # e.g. given the prefix Native: java.lang.String -> NativeString
+                       name = prefix + id
                end
 
-               if type_id == null then
-                       nit_type = self.extern_name
-                       nit_type.is_complete = false
-               else
-                       nit_type = new NitType(type_id)
+               if is_primitive_array then
+                       name += "_" + "Array" * array_dimension
                end
 
-               if not self.has_generic_params then return nit_type
+               name = name.replace("-", "_")
+               name = name.replace("$", "_")
+               return name
+       end
+
+       # Short name of the class, mangled to remove `$` (e.g. `Set`)
+       fun id: String do return identifier.last.replace("$", "")
 
-               nit_type.generic_params = new Array[NitType]
+       # Full name of this class as used in an importation (e.g. `java.lang.Set`)
+       fun package_name: String do return identifier.join(".")
 
-               for param in generic_params do
-                       var nit_param = param.to_nit_type
+       # Name of this class for the extern declaration in Nit (e.g. `java.lang.Set[]`)
+       fun extern_equivalent: String do return package_name + "[]" * array_dimension
 
-                       nit_type.generic_params.add(nit_param)
+       # Full name of this class with arrays and generic values (e.g. `java.lang.Set<E>[]`)
+       redef fun to_s do
+               var id = self.package_name
 
-                       if not nit_param.is_complete then nit_type.is_complete = false
+               if self.is_primitive_array then
+                       id += "[]" * array_dimension
+               else if self.has_generic_params then
+                       var params = [for param in generic_params do param.to_s]
+                       id += "<{params.join(", ")}>"
                end
 
-               return nit_type
+               return id
        end
 
-       fun is_iterable: Bool do return iterable.has(self.id)
+       # Get a copy of `self`
+       redef fun clone
+       do
+               var jtype = new JavaType
+               jtype.identifier = identifier
+               jtype.generic_params = generic_params
+               jtype.is_void = is_void
+               jtype.is_vararg = is_vararg
+               jtype.array_dimension = array_dimension
+               return jtype
+       end
 
-       fun is_collection: Bool do return is_primitive_array or collections_list.has(self.id)
+       # Comparison based on fully qualified named
+       redef fun ==(other) do return other isa JavaType and
+               self.package_name == other.package_name and
+               self.array_dimension == other.array_dimension
 
-       fun is_wrapped: Bool do return find_extern_class != null
+       redef fun hash do return self.package_name.hash
+end
 
-       fun extern_name: NitType
-       do
-               if is_wrapped then return new NitType.with_module(find_extern_class.as(not null).first, find_extern_class.as(not null).second)
+class NitType
+       # Nit class name
+       var identifier: String
 
-               var name
-               if is_primitive_array then
-                       # Primitive arrays have a special naming convention
-                       name = "Native" + extern_class_name.join("").capitalized + "Array"
-               else
-                       name = "Native" + extern_class_name.join("")
-               end
+       # If this NitType was found in `lib/android`, contains the module name to import
+       var mod: nullable NitModule
 
-               var nit_type = new NitType(name)
-               nit_type.is_complete = false
-               return nit_type
-       end
+       # Is this type known, wrapped and available in Nit?
+       var is_known: Bool = true
 
-       fun to_cast(jtype: String, is_param: Bool): String
-       do
-               if is_param then
-                       return converter.cast_as_param(jtype)
-               end
+       redef fun to_s do return identifier
+end
 
-               return converter.cast_as_return(jtype)
-       end
+# Model of a single Java class
+class JavaClass
+       # Type of this class
+       var class_type: JavaType
 
-       redef fun to_s: String
-       do
-               var id = self.full_id
+       # Attributes of this class
+       var attributes = new HashMap[String, JavaAttribute]
 
-               if self.is_primitive_array then
-                       for i in [0..array_dimension[ do
-                               id += "[]"
-                       end
-               else if self.has_generic_params then
-                       var gen_list = new Array[String]
+       # Methods of this class organized by their name
+       var methods = new MultiHashMap[String, JavaMethod]
 
-                       for param in generic_params do
-                               gen_list.add(param.to_s)
-                       end
+       # Methods signatures introduced by this class
+       var local_intro_methods = new MultiHashMap[String, JavaMethod]
 
-                       id += "<{gen_list.join(", ")}>"
-               end
+       # Constructors of this class
+       var constructors = new Array[JavaConstructor]
 
-               return id
-       end
+       # Importations from this class
+       var imports = new HashSet[NitModule]
 
-       # To fully qualified package name
-       # Cuts the primitive array `[]`
-       fun to_package_name: String
-       do
-               var str = self.to_s
-               var len = str.length
+       # Interfaces implemented by this class
+       var implements = new HashSet[JavaType]
 
-               return str.substring(0, len - (2*array_dimension))
-       end
+       # Super classes of this class
+       var extends = new HashSet[JavaType]
+
+       # Position of self in `model.class_hierarchy`
+       var in_hierarchy: nullable POSetElement[JavaClass] = null is noserialize
 
-       fun resolve_types(conversion_map: HashMap[String, Array[String]])
+       redef fun to_s do return class_type.to_s
+
+       # Resolve the types in `other` in the context of this class
+       private fun resolve_types_of(other: JavaClass)
        do
-               if identifier.length == 1 then
-                       var resolved_id = conversion_map.get_or_null(self.id)
-                       if resolved_id != null then self.identifier = new Array[String].from(resolved_id)
+               # Methods
+               for mid, method in other.methods do
+                       for signature in method do
+                               self.resolve(signature.return_type, signature.generic_params)
+                               for param in signature.params do self.resolve(param, signature.generic_params)
+                       end
                end
 
-               if self.has_generic_params then
-                       for params in generic_params do params.resolve_types(conversion_map)
+               # Constructors
+               for signature in other.constructors do
+                       for param in signature.params do self.resolve(param, signature.generic_params)
+               end
+
+               # Attributes
+               for aid, attribute in other.attributes do
+                       self.resolve attribute.java_type
                end
        end
 
-       private fun extern_class_name: Array[String]
+       # Resolve `java_type` in the context of this class
+       #
+       # Replace, in place, parameter types by their bound.
+       private fun resolve(java_type: JavaType, property_generic_params: nullable Array[JavaType])
        do
-               var class_name = new Array[String]
-               class_name.add(self.id)
+               # Skip types with a full package name
+               if java_type.identifier.length != 1 then return
+
+               # Skip primitive types
+               if converter.type_map.keys.has(java_type.id) then return
+
+               # Gather the generic parameters of the method, then the class
+               var params = new Array[JavaType]
+               if property_generic_params != null then params.add_all property_generic_params
+               var class_generic_params = class_type.generic_params
+               if class_generic_params != null then params.add_all class_generic_params
+
+               # Skip if there is not parameters usable to resolve
+               if params.is_empty then return
+
+               for param in params do
+                       if param.identifier == java_type.identifier then
+                               # Found a marching parameter type
+                               # TODO use a more precise bound
+                               java_type.identifier = ["java", "lang", "Object"]
+                               return
+                       end
+               end
+       end
 
-               if not self.has_generic_params then return class_name
+       redef fun hash do return class_type.hash
+       redef fun ==(o) do return o isa JavaClass and o.class_type == class_type
+end
 
-               class_name.add "Of"
+# Model of all the Java class analyzed in one run
+class JavaModel
 
-               for param in generic_params do class_name.add_all param.extern_class_name
+       # Classes analyzed in this pass
+       var classes = new HashMap[String, JavaClass]
 
-               return class_name
-       end
+       # All classes, from this pass and from other passes
+       var all_classes: HashMap[String, JavaClass] is noserialize, lazy do
+               var classes = new HashMap[String, JavaClass]
+               classes.recover_with self.classes
 
-       # Search inside `lib/android` directory for already wrapped classes
-       # If found, contains the class identifier and the Nit Module name
-       var find_extern_class: nullable Couple[String, NitModule] is lazy do
-
-               var regex = "extern class [a-zA-Z1-9]\\\+[ ]\\\+in[ ]\\\+\"Java\"[ ]*`\{[ ]*" + self.to_s + "\\\+[ ]*`\}"
-               var nit_dir = "NIT_DIR".environ
-               var grep = new ProcessReader("grep", "-r", regex, nit_dir/"lib/android/", nit_dir/"lib/java/")
-               var to_eat = ["private", "extern", "class"]
+               for model_path in sys.opt_load_models.value do
+                       if not model_path.file_exists then
+                               print_error "Error: model file '{model_path}' does not exist"
+                               continue
+                       end
 
-               var output = grep.read_line
+                       var file = model_path.to_path.open_ro
+                       var d = new BinaryDeserializer(file)
+                       var model = d.deserialize
+                       file.close
 
-               var output_class = output.substring_from(output.index_of(':') + 1)
-               var tokens = output_class.split(" ")
+                       if d.errors.not_empty then
+                               print_error "Error: failed to deserialize model file '{model_path}' with: {d.errors.join(", ")}"
+                               continue
+                       end
 
-               var nclass_name = ""
+                       if not model isa JavaModel then
+                               print_error "Error: model file contained a '{if model == null then "null" else model.class_name}'"
+                               continue
+                       end
 
-               for token in tokens do
-                       if to_eat.has(token) then continue
-                       nclass_name = token
-                       break
+                       classes.recover_with model.classes
                end
 
-               if nclass_name == "" then return null
-
-               var str = output.substring(0, output.search(".nit").from)
-               str = str.substring_from(str.last_index_of('/') + 1)
-               var mod = new NitModule(str)
-
-               return new Couple[String, NitModule](nclass_name, mod)
+               return classes
        end
 
-       # Comparison based on fully qualified named and generic params
-       # Ignores primitive array so `a.b.c[][] == a.b.c`
-       redef fun ==(other)
+       # Does this model have access to the `java.lang.Object`?
+       var knows_the_object_class: Bool = all_classes.keys.has("java.lang.Object") is lazy
+
+       # Add a class in `classes`
+       fun add_class(jclass: JavaClass)
        do
-               if other isa JavaType then
-                       return self.repr == other.repr
-               end
-               return false
+               var key = jclass.class_type.package_name
+               classes[key] = jclass
        end
 
-       redef fun hash do return self.repr.hash
+       # Unknown types, not already wrapped and not in this pass
+       var unknown_types = new HashMap[JavaType, NitType] is noserialize
 
-       private fun repr: String
-       do
-               var id = self.full_id
+       # Wrapped types, or classes analyzed in this pass
+       var known_types = new HashMap[JavaType, NitType] is noserialize
 
-               if self.has_generic_params then
-                       var gen_list = new Array[String]
+       # Get the `NitType` corresponding to the `JavaType`
+       #
+       # Also registers types so they can be reused and
+       # to keep track of unknown types.
+       fun java_to_nit_type(jtype: JavaType): NitType
+       do
+               # Check cache
+               if known_types.keys.has(jtype) then return known_types[jtype]
+               if unknown_types.keys.has(jtype) then return unknown_types[jtype]
+
+               # Is it a compatible primitive type?
+               if not jtype.is_primitive_array then
+                       var name = converter.to_nit_type(jtype.id)
+                       if name != null then
+                               # We got a Nit equivalent
+                               var nit_type = new NitType(name)
+                               known_types[jtype] = nit_type
+                               return nit_type
+                       end
+               end
 
-                       for param in generic_params do
-                               gen_list.add(param.to_s)
+               # Is being wrapped in this pass?
+               var key = jtype.package_name
+               if classes.keys.has(key) then
+                       if jtype.array_dimension <= opt_arrays.value then
+                               var nit_type = new NitType(jtype.extern_name)
+                               known_types[jtype] = nit_type
+                               return nit_type
                        end
+               end
 
-                       id += "<{gen_list.join(", ")}>"
+               # Search in lib
+               var nit_type = find_extern_class[jtype.extern_equivalent]
+               if nit_type != null then
+                       known_types[jtype] = nit_type
+                       return nit_type
                end
 
-               return id
+               # Unknown type
+               nit_type = new NitType(jtype.extern_name)
+               nit_type.is_known = false
+               unknown_types[jtype] = nit_type
+               return nit_type
        end
 
-       var collections_list: Array[String] is lazy do return ["List", "ArrayList", "LinkedList", "Vector", "Set", "SortedSet", "HashSet", "TreeSet", "LinkedHashSet", "Map", "SortedMap", "HashMap", "TreeMap", "Hashtable", "LinkedHashMap"]
-       var iterable: Array[String] is lazy do return ["ArrayList", "Set", "HashSet", "LinkedHashSet", "LinkedList", "Stack", "TreeSet", "Vector"]
-       var maps: Array[String] is lazy do return ["Map", "SortedMap", "HashMap", "TreeMap", "Hashtable", "LinkedHashMap"]
-end
+       # Resolve the types in methods and attributes of this class
+       fun resolve_types
+       do
+               for id, java_class in classes do
+                       java_class.resolve_types_of java_class
+
+                       # Ask nester classes for resolve too
+                       var matches = id.search_all("$")
+                       for match in matches do
+                               var nester_name = id.substring(0, match.from)
+                               if classes.keys.has(nester_name) then
+                                       var nester = classes[nester_name]
+                                       nester.resolve_types_of java_class
+                               end
+                       end
+               end
+       end
 
-class NitType
-       var identifier: String
-       var arg_id: String
-       var generic_params: nullable Array[NitType] = null
+       # Specialization hierarchy of `classes`
+       var class_hierarchy = new POSet[JavaClass] is noserialize
 
-       # If this NitType was found in `lib/android`, contains the module name to import
-       var mod: nullable NitModule
+       # Fill `class_hierarchy`
+       fun build_class_hierarchy
+       do
+               var object_type = new JavaType
+               object_type.identifier = ["java","lang","Object"]
 
-       # Returns `true` if all types have been successfully converted to Nit type
-       var is_complete: Bool = true
+               # Fill POSet
+               for name, java_class in all_classes do
+                       # Skip anonymous classes
+                       if java_class.class_type.is_anonymous then continue
 
-       fun has_generic_params: Bool do return not generic_params == null
+                       java_class.in_hierarchy = class_hierarchy.add_node(java_class)
 
-       fun id: String do return identifier
+                       # Collect explicit super classes
+                       var super_classes = new Array[JavaType]
+                       super_classes.add_all java_class.implements
+                       super_classes.add_all java_class.extends
 
-       init (id: String)
-       do
-               self.identifier = id
-       end
+                       # Remove unavailable super classes
+                       for super_type in super_classes.reverse_iterator do
+                               # Is the super class available?
+                               if not all_classes.keys.has(super_type.package_name) then super_classes.remove(super_type)
+                       end
 
-       init with_generic_params(id: String, gen_params: String...)
-       do
-               self.init(id)
-               self.generic_params = new Array[NitType]
-               for param in gen_params do self.generic_params.add new NitType(param)
-       end
+                       # If the is no explicit supers, add `java.lang.Object` (if it is known)
+                       if super_classes.is_empty and java_class.class_type != object_type and
+                          knows_the_object_class then
+                               super_classes.add object_type
+                       end
 
-       init with_module(id: String, mod: NitModule)
-       do
-               self.init(id)
-               self.mod = mod
-       end
+                       for super_type in super_classes do
+                               # Is the super class available?
+                               if not all_classes.keys.has(super_type.package_name) then continue
 
-       redef fun to_s: String
-       do
-               var id = self.identifier
+                               var super_class = all_classes[super_type.package_name]
+                               class_hierarchy.add_edge(java_class, super_class)
+                       end
+               end
 
-               if self.has_generic_params then
-                       var gen_list = new Array[String]
+               # Flatten classes from the top one (Object like)
+               var linearized = class_hierarchy.linearize(class_hierarchy)
 
-                       for param in generic_params do
-                               gen_list.add(param.to_s)
-                       end
+               # Methods intro
+               for java_class in linearized do
+                       var greaters = java_class.in_hierarchy.greaters
 
-                       id += "[{gen_list.join(", ")}]"
-               end
+                       for mid, signatures in java_class.methods do
+                               for signature in signatures do
+                                       if signature.is_static then continue
 
-               return id
-       end
-end
+                                       # Check if this signature exists in a parent
+                                       for parent in greaters do
+                                               if parent == java_class then continue
 
-class JavaClass
-       var class_type = new JavaType(new JavaTypeConverter)
-       var attributes = new HashMap[String, JavaType]
+                                               if not parent.methods.keys.has(mid) then continue
 
-       # Methods of this class organized by their name
-       var methods = new HashMap[String, Array[JavaMethod]]
+                                               if parent.methods[mid].has(signature) then continue label
+                                       end
 
-       var unknown_types = new HashSet[JavaType]
-       var imports = new HashSet[NitModule]
+                                       # This is an introduction! register it
+                                       java_class.local_intro_methods[mid].add signature
 
-       fun add_method(id: String, return_type: JavaType, params: Array[JavaType])
-       do
-               var signatures = methods.get_or_default(id, new Array[JavaMethod])
-               signatures.add(new JavaMethod(return_type, new Array[JavaType].from(params)))
-               methods[id] = signatures
+                               end label
+                       end
+               end
        end
 end
 
+# A property to a Java class
+abstract class JavaProperty
+
+       # Is this property marked static?
+       var is_static: Bool
+end
+
 # A Java method, with its signature
 class JavaMethod
+       super JavaProperty
+
        # Type returned by the method
        var return_type: JavaType
 
        # Type of the arguments of the method
        var params: Array[JavaType]
+
+       # Generic parameters of this method
+       var generic_params: Array[JavaType]
+
+       redef fun ==(o) do return o isa JavaMethod and o.is_static == is_static and o.params == params
+       redef fun hash do return params.hash
+end
+
+# An attribute in a Java class
+class JavaAttribute
+       super JavaProperty
+
+       # Type of the attribute
+       var java_type: JavaType
+end
+
+# A Java method, with its signature
+class JavaConstructor
+       # Type of the parameters of this constructor
+       var params: Array[JavaType]
+
+       # Generic parameters of this constructor
+       var generic_params: Array[JavaType]
 end
 
 # A Nit module, use to import the referenced extern classes
 class NitModule
+       # Relative path to the module
+       var path: String
+
        # Name of the module
-       var name: String
+       var name: String is lazy do return path.basename(".nit")
 
-       redef fun ==(other): Bool do return self.to_s == other.to_s
-       redef fun to_s: String do return self.name
-       redef fun hash: Int do return self.name.hash
+       redef fun to_s do return self.name
+       redef fun ==(other) do return other isa NitModule and self.path == other.path
+       redef fun hash do return self.path.hash
+end
+
+redef class Sys
+       # Collection of Java classes already wrapped in the library
+       #
+       # * The key uses `JavaType.to_s`.
+       # * The value is the corresponding `NitType`.
+       var find_extern_class: DefaultMap[String, nullable NitType] is lazy do
+               var map = new DefaultMap[String, nullable NitType](null)
+               var modules = new HashMap[String, NitModule]
+
+               var lib_paths = opt_libs.value
+               if lib_paths == null then lib_paths = new Array[String]
+
+               if lib_paths.has("auto") then
+                       lib_paths.remove "auto"
+                       var nit_dir = "NIT_DIR".environ
+                       if nit_dir.is_empty then
+                               # Simple heuristic to find the Nit lib
+                               var dir = sys.program_name.dirname / "../../../lib/"
+                               dir = dir.simplify_path
+                               if dir.file_exists then lib_paths.add dir.simplify_path
+                       end
+               end
+
+               if lib_paths.is_empty then return map
+
+               # Use grep to find all extern classes implemented in Java
+               var grep_regex = "extern class [a-zA-Z0-9_]\\\+[ ]\\\+in[ ]\\\+\"Java\""
+               var grep_args = ["-r", "--with-filename", grep_regex]
+               grep_args.add_all lib_paths
+
+               var grep = new ProcessReader("grep", grep_args...)
+               var lines = grep.read_lines
+               grep.close
+               grep.wait
+
+               # Sort out the modules, Nit class names and Java types
+               var regex = """(.+):\\s*extern +class +([a-zA-Z0-9_]+) *in *"Java" *`\\{(.+)`\\}""".to_re
+               for line in lines do
+                       var matches = line.search_all(regex)
+                       for match in matches do
+                               var path = match[1].to_s
+                               var nit_name = match[2].to_s
+                               var java_name = match[3].to_s.trim
+
+                               # Debug code
+                               # print "+ Found {nit_name}: {java_name} at {path}"
+
+                               var mod = modules.get_or_null(path)
+                               if mod == null then
+                                       mod = new NitModule(path)
+                                       modules[path] = mod
+                               end
+
+                               map[java_name] = new NitType(nit_name, mod)
+                       end
+               end
+
+               return map
+       end
+
+       # Option to set `extern_class_prefix`
+       var opt_extern_class_prefix = new OptionString("Prefix to extern classes (By default uses the full namespace)", "-p")
+
+       # Prefix used to name extern classes, if `null` use the full namespace
+       var extern_class_prefix: nullable String is lazy do return opt_extern_class_prefix.value
+
+       # Libraries to search for existing wrappers
+       var opt_libs = new OptionArray("Paths to libraries with wrappers of Java classes ('auto' to use the full Nit lib)", "-i")
+
+       # Generate the primitive array version of each class up to the given depth
+       var opt_arrays = new OptionInt("Depth of the primitive array for each wrapped class (default: 1)", 1, "-a")
+
+       # Generate the primitive array version of each class up to the given depth
+       var opt_load_models = new OptionArray("Saved models to search for super-classes", "-m")
+end
+
+redef abstract class Text
+       # Get a copy of `self` where the first letter is capitalized
+       fun simple_capitalized: String
+       do
+               if is_empty then return to_s
+
+               var c = chars.first.to_upper
+               var s = c.to_s + substring_from(1)
+               return s
+       end
 end
diff --git a/contrib/jwrapper/tests/generics.javap b/contrib/jwrapper/tests/generics.javap
new file mode 100644 (file)
index 0000000..0753c90
--- /dev/null
@@ -0,0 +1,6 @@
+public abstract class android.os.asynctask<params, progress, result> {
+  public android.os.asynctask();
+  public final android.os.asynctask$status getstatus();
+  public final result get(long, java.util.concurrent.timeunit) throws java.lang.interruptedexception, java.util.concurrent.executionexception, java.util.concurrent.timeoutexception;
+  public final android.os.asynctask<params, progress, result> execute(params...);
+}
diff --git a/contrib/jwrapper/tests/inits.javap b/contrib/jwrapper/tests/inits.javap
new file mode 100644 (file)
index 0000000..270934d
--- /dev/null
@@ -0,0 +1,5 @@
+public class org.example.ClassA {
+       public org.example.ClassA();
+       public org.example.ClassA(long);
+       public org.example.ClassA(java.lang.Object);
+}
diff --git a/contrib/jwrapper/tests/long.javap b/contrib/jwrapper/tests/long.javap
new file mode 100644 (file)
index 0000000..5cf849f
--- /dev/null
@@ -0,0 +1,3 @@
+
+class com.sun.xml.internal.bind.v2.model.impl.RuntimeElementInfoImpl$RuntimePropertyImpl extends com.sun.xml.internal.bind.v2.model.impl.ElementInfoImpl<java.lang.reflect.Type, java.lang.Class, java.lang.reflect.Field, java.lang.reflect.Method>.PropertyImpl implements com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementPropertyInfo, com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef {
+}
diff --git a/contrib/jwrapper/tests/many.javap b/contrib/jwrapper/tests/many.javap
new file mode 100644 (file)
index 0000000..9e05bcf
--- /dev/null
@@ -0,0 +1,8 @@
+public class org.example.ClassA {
+       public org.example.ClassB Foo(org.example.ClassC);
+       public org.example.ClassB Bar(org.example.ClassC);
+       public org.example.ClassB an_attribute;
+}
+public class org.example.ClassB extends org.example.ClassA {
+       public org.example.ClassA Foo(org.example.ClassC);
+}
diff --git a/contrib/jwrapper/tests/statics.javap b/contrib/jwrapper/tests/statics.javap
new file mode 100644 (file)
index 0000000..a10cc75
--- /dev/null
@@ -0,0 +1,18 @@
+public final class com.oracle.net.Sdp {
+  public static java.net.Socket openSocket() throws java.io.IOException;
+  public static java.net.ServerSocket openServerSocket() throws java.io.IOException;
+  public static java.nio.channels.SocketChannel openSocketChannel() throws java.io.IOException;
+  public static java.nio.channels.ServerSocketChannel openServerSocketChannel() throws java.io.IOException;
+}
+public class com.sun.activation.registries.LogSupport {
+  public static void log(java.lang.String);
+  public static void log(java.lang.String, java.lang.Throwable);
+  public static boolean isLoggable();
+}
+public class com.sun.activation.registries.MailcapTokenizer {
+  public static final int UNKNOWN_TOKEN;
+}
+public final class com.sun.beans.TypeResolver {
+  public com.sun.beans.TypeResolver();
+  public static java.lang.reflect.Type resolveInClass(java.lang.Class<?>, java.lang.reflect.Type);
+}
diff --git a/contrib/jwrapper/tests/testjvm.javap b/contrib/jwrapper/tests/testjvm.javap
new file mode 100644 (file)
index 0000000..1c08c8c
--- /dev/null
@@ -0,0 +1,9 @@
+Compiled from "TestJvm.java"
+public class test_jvm.TestJvm {
+  public test_jvm.TestJvm();
+  public test_jvm.Test2 getTest();
+  public boolean isBool();
+  public char getC();
+  public int getI();
+  public float getF();
+}
diff --git a/contrib/jwrapper/tests/wildcards.javap b/contrib/jwrapper/tests/wildcards.javap
new file mode 100644 (file)
index 0000000..f4b2777
--- /dev/null
@@ -0,0 +1,9 @@
+public abstract class android.net.Uri implements android.os.Parcelable, java.lang.Comparable<android.net.Uri> {
+       public <T extends java/lang/Object> com.sun.jmx.mbeanserver.MXBeanSupport(T, java.lang.Class<T>) throws javax.management.NotCompliantMBeanException;
+
+       public static <T extends java/lang/Object & java/lang/Comparable<? super T>> T max(java.util.Collection<? extends T>);
+
+       public <T extends java/lang/Object> com.sun.jmx.mbeanserver.MXBeanSupport(T, java.lang.Class<T>) throws javax.management.NotCompliantMBeanException;
+
+       public strictfp double doubleValue();
+}
index bfdf6a5..83fa3b8 100644 (file)
@@ -112,7 +112,7 @@ abstract class LinkedText
                var text = self["text"]
 
                if text isa JsonArray then
-                       return text.join("")
+                       return text.join
                else
                        return "UNDEFINED"
                end
index f286894..d143684 100644 (file)
@@ -21,7 +21,7 @@ import grammar
 # A finite automaton
 class Automaton
        # The start state
-       var start: State
+       var start: State is noinit
 
        # State that are accept states
        var accept = new Array[State]
index 1c764d4..77e0b56 100644 (file)
@@ -108,7 +108,6 @@ Settings:
 * `wiki.name`: Displayed name
 * `wiki.desc`: Long description
 * `wiki.logo`: Logo image url
-* `wiki.root_url`: Base url used to resolve links
 * `wiki.root_dir`: Absolute path of base directory
 * `wiki.source_dir`: Source directory (relative path from `wiki.root_dir`)
 * `wiki.out_dir`: Output directory (relative)
@@ -337,4 +336,4 @@ from git:
 
 Be sure to set `wiki.rsync_dir` in order to correctly push your changes.
 When using `--rsync`, keep in mind that the rendered output must be configured
-to work on the web server and set `wiki.root_url` accordingly.
+to work on the web server.
index 21e85ef..7917052 100644 (file)
@@ -1,5 +1,4 @@
 wiki.name=MyWiki
 wiki.desc=proudly powered by nit
 wiki.logo=assets/logo.png
-wiki.root_url=http://localhost/
 wiki.root_dir=/full/path/to/your/wiki/root/dir
index 16eaffe..315462d 100644 (file)
@@ -1,6 +1,5 @@
 wiki.name=nitiwiki
 wiki.desc=proudly powered by nit
 wiki.logo=assets/logo.png
-wiki.root_url=http://moz-code.org/nitiwiki/
 wiki.root_dir=.
 wiki.rsync_dir=moz-code.org:nitiwiki/
index 803da02..71ab129 100644 (file)
@@ -71,7 +71,7 @@ var opt_help = new OptionBool("Display this help message", "-h", "--help")
 var opt_verbose = new OptionCount("Verbose level", "-v")
 var opt_config = new OptionString("Path to config.ini file", "-c", "--config")
 var opt_init = new OptionBool("Initialize a new wiki in the current directory", "--init")
-var opt_status = new OptionBool("Display wiki status", "-s", "--status")
+var opt_status = new OptionBool("Display wiki status", "--status")
 var opt_render = new OptionBool("Render the out directory from markdown sources", "-r", "--render")
 var opt_force = new OptionBool("Force render even if source files are unchanged", "-f", "--force")
 var opt_clean = new OptionBool("Clean the output directory", "--clean")
@@ -107,7 +107,7 @@ if opt_init.value then
                print "You can initialize nitiwiki manually by copying the default skeletton here."
                exit 1
        end
-       sys.system "cp -R {tpl}/* ."
+       sys.system "cp -R -- {tpl.escape_to_sh}/* ."
        print "Initialized new nitiwiki."
        print "Set wiki settings by editing {config_filename}."
        exit 0
index 9cd3eb0..8257091 100644 (file)
@@ -50,12 +50,17 @@ class Nitiwiki
        # Synchronize local output with the distant `WikiConfig::rsync_dir`.
        fun sync do
                var root = expand_path(config.root_dir, config.out_dir)
-               sys.system "rsync -vr --delete {root}/ {config.rsync_dir}"
+               var rsync_dir = config.rsync_dir
+               if rsync_dir == "" then
+                       message("Error: configure `wiki.rsync_dir` to use rsync.", 0)
+                       return
+               end
+               sys.system "rsync -vr --delete -- {root.escape_to_sh}/ {rsync_dir.escape_to_sh}"
        end
 
        # Pull data from git repository.
        fun fetch do
-               sys.system "git pull {config.git_origin} {config.git_branch}"
+               sys.system "git pull {config.git_origin.escape_to_sh} {config.git_branch.escape_to_sh}"
        end
 
        # Analyze wiki files from `dir` to build wiki entries.
@@ -79,7 +84,6 @@ class Nitiwiki
                print "nitiWiki"
                print "name: {config.wiki_name}"
                print "config: {config.ini_file}"
-               print "url: {config.root_url}"
                print ""
                if root_section.is_dirty then
                        print "There is modified files:"
@@ -147,7 +151,7 @@ class Nitiwiki
                path = path.simplify_path
                if entries.has_key(path) then return entries[path].as(WikiSection)
                var root = expand_path(config.root_dir, config.source_dir)
-               var name = path.basename("")
+               var name = path.basename
                var section = new WikiSection(self, name)
                entries[path] = section
                if path == root then return section
@@ -473,7 +477,7 @@ class WikiSection
        private fun try_load_config do
                var cfile = wiki.expand_path(wiki.config.root_dir, src_path, wiki.config_filename)
                if not cfile.file_exists then return
-               wiki.message("Custom config for section {name}", 1)
+               wiki.message("Custom config for section {name}", 2)
                config = new SectionConfig(cfile)
        end
 
@@ -640,12 +644,6 @@ class WikiConfig
        # * default: ``
        var wiki_logo: String is lazy do return value_or_default("wiki.logo", "")
 
-       # Root url of the wiki.
-       #
-       # * key: `wiki.root_url`
-       # * default: `http://localhost/`
-       var root_url: String is lazy do return value_or_default("wiki.root_url", "http://localhost/")
-
        # Markdown extension recognized by this wiki.
        #
        # We allow only one kind of extension per wiki.
index a937351..2e96567 100644 (file)
@@ -36,7 +36,7 @@ redef class Nitiwiki
                var src = expand_path(config.root_dir, config.assets_dir)
                var out = expand_path(config.root_dir, config.out_dir)
                if need_render(src, expand_path(out, config.assets_dir)) then
-                       if src.file_exists then sys.system "cp -R {src} {out}"
+                       if src.file_exists then sys.system "cp -R -- {src.escape_to_sh} {out.escape_to_sh}"
                end
        end
 
@@ -83,15 +83,15 @@ redef class WikiSection
                if is_new then
                        out_full_path.mkdir
                else
-                       sys.system "touch {out_full_path}"
+                       sys.system "touch -- {out_full_path.escape_to_sh}"
                end
                if has_source then
-                       wiki.message("Render section {out_path}", 1)
+                       wiki.message("Render section {name} -> {out_path}", 1)
                        copy_files
                end
                var index = self.index
                if index isa WikiSectionIndex then
-                       wiki.message("Render auto-index for section {out_path}", 1)
+                       wiki.message("Render auto-index for section {name} -> {out_path}", 1)
                        index.is_dirty = true
                        add_child index
                end
@@ -109,7 +109,7 @@ redef class WikiSection
                        var src = wiki.expand_path(dir, name)
                        var out = wiki.expand_path(out_full_path, name)
                        if not wiki.need_render(src, out) then continue
-                       sys.system "cp -R {src} {out_full_path}"
+                       sys.system "cp -R -- {src.escape_to_sh} {out_full_path.escape_to_sh}"
                end
        end
 
@@ -175,8 +175,8 @@ redef class WikiArticle
        redef fun render do
                super
                if not is_dirty and not wiki.force_render then return
-               wiki.message("Render article {name}", 2)
                var file = out_full_path
+               wiki.message("Render article {name} -> {file}", 1)
                file.dirname.mkdir
                tpl_page.write_to_file file
        end
index bdb27da..340ec74 100644 (file)
@@ -90,10 +90,6 @@ end
 
 redef class WikiEntry
 
-       # Absolute url to `self` once generated.
-       # If you use this, the generated files will hard-code `root_url`
-       fun url: String do return wiki.config.root_url / href
-
        # Relative path to `self` from the target root_url
        fun href: String do return breadcrumbs.join("/")
 
@@ -227,12 +223,15 @@ private class NitiwikiDecorator
        # Article used to contextualize links.
        var context: WikiEntry
 
-       redef fun add_wikilink(v, link, name, comment) do
+       redef fun add_wikilink(v, token) do
+               var wiki = v.processor.as(NitiwikiMdProcessor).wiki
+               var target: nullable WikiEntry = null
                var anchor: nullable String = null
+               var link = token.link
+               if link == null then return
+               var name = token.name
                v.add "<a "
                if not link.has_prefix("http://") and not link.has_prefix("https://") then
-                       var wiki = v.processor.as(NitiwikiMdProcessor).wiki
-                       var target: nullable WikiEntry = null
                        if link.has("#") then
                                var parts = link.split_with("#")
                                link = parts.first
@@ -250,8 +249,7 @@ private class NitiwikiDecorator
                                if name == null then name = target.title
                                link = target.href_from(context)
                        else
-                               var loc = context.src_path or else context.name
-                               wiki.message("Warning: unknown wikilink `{link}` (in {loc})", 0)
+                               wiki.message("Warning: unknown wikilink `{link}` (in {context.src_path.as(not null)})", 0)
                                v.add "class=\"broken\" "
                        end
                end
@@ -259,6 +257,7 @@ private class NitiwikiDecorator
                append_value(v, link)
                if anchor != null then append_value(v, "#{anchor}")
                v.add "\""
+               var comment = token.comment
                if comment != null and not comment.is_empty then
                        v.add " title=\""
                        append_value(v, comment)
index c799b86..9b18a6b 100644 (file)
@@ -97,11 +97,7 @@ class Achievement
        #
        # Used to load achievements from storage.
        init from_json(game: Game, json: JsonObject) do
-               self.game = game
-               id = json["id"].to_s
-               name = json["name"].to_s
-               desc = json["desc"].to_s
-               reward = json["reward"].as(Int)
+               init(game, json["id"].to_s, json["name"].to_s, json["desc"].to_s, json["reward"].as(Int))
        end
 
        redef fun to_json do
index dde2c55..d1ba25a 100644 (file)
@@ -89,11 +89,9 @@ class GameEvent
        #
        # Used to load events from json storage.
        init from_json(game: Game, json: JsonObject) do
-               self.game = game
+               init(game, json["kind"].to_s, json["data"].as(JsonObject))
                internal_id = json["internal_id"].to_s
-               kind = json["kind"].to_s
                time = new ISODate.from_string(json["time"].to_s)
-               data = json["data"].as(JsonObject)
        end
 
        redef fun to_json do
index 1ab143e..a8175a8 100644 (file)
@@ -212,8 +212,7 @@ class Player
        #
        # Used to load players from saved data.
        init from_json(game: Game, json: JsonObject) do
-               self.game = game
-               name = json["name"].to_s
+               init(game, json["name"].to_s)
                nitcoins = json["nitcoins"].as(Int)
        end
 
index 97078ab..6d5e339 100644 (file)
@@ -371,8 +371,10 @@ class PlayerReviewsPanel
                        "-involves:{player.name}"
 
                var issues = new ArraySet[Issue]
-               issues.add_all game.repo.search_issues(q).as(not null)
-               issues.add_all game.repo.search_issues(q2).as(not null)
+               var rq = game.repo.search_issues(q)
+               if rq != null then issues.add_all rq
+               var rq2 = game.repo.search_issues(q2)
+               if rq2 != null then issues.add_all rq2
                if issues.is_empty then
                        add "<em>No pull request or issue to review yet...</em>"
                        return
@@ -417,8 +419,10 @@ class PlayerWorkPanel
                var q2 = "is:open sort:updated-asc assignee:{player.name}"
 
                var issues = new ArraySet[Issue]
-               issues.add_all game.repo.search_issues(q).as(not null)
-               issues.add_all game.repo.search_issues(q2).as(not null)
+               var rq = game.repo.search_issues(q)
+               if rq != null then issues.add_all rq
+               var rq2 = game.repo.search_issues(q2)
+               if rq2 != null then issues.add_all rq2
                if issues.is_empty then
                        add "<em>No work to do yet...</em>"
                        return
index 0bf39c0..116c91c 100644 (file)
@@ -23,7 +23,7 @@ redef class BasicBlock
        do
                var code_lines = new Array[String]
                for line in lines do code_lines.add(line.text)
-               var code = code_lines.join("")
+               var code = code_lines.join
 
                code = code.replace("\n","\\l").replace("\"","\\\"").replace("\\n","|n").replace("/","\\/").replace("\r","")
                # the last one is a hack
index 96f5430..912336c 100644 (file)
@@ -338,6 +338,7 @@ class Lexer
                                dfa_state = -1
                        else
                                var c = string[sp].ascii
+                               if c >= 255 then c = 255
                                sp += 1
 
                                var cr = _cr
index fbd5fee..ec1de5a 100644 (file)
@@ -402,7 +402,7 @@ class Dollar
 
        # Inits `self` from a float `value`.
        init from_float(value: Float) do
-               self.value = (value * 100.0).to_i
+               init((value * 100.0).to_i)
        end
 
        redef fun to_s do return "{value / 100}.{value % 100}$"
index ed5fc72..b5c884b 100644 (file)
@@ -18,6 +18,7 @@
 module rss_downloader
 
 import curl
+import dom
 
 redef class Sys
        # Lazy man's verbose option
@@ -47,6 +48,22 @@ class Config
 
        # Exception where we ignore uniqueness and can be downloaded again (may be empty)
        var unique_exceptions: Array[Pattern]
+
+       # XML tag used for pattern recognition
+       fun tag_title: String do return "title"
+
+       # XML tag of the link to act upon
+       fun tag_link: String do return "link"
+
+       # Are the feeds at `rss_source_urls` compressed?
+       var compressed: nullable Bool
+
+       # Action to apply on each selected RSS element
+       fun act_on(element: Element)
+       do
+               var local_path = download_destination_folder.to_s / element.title
+               element.download_to(local_path)
+       end
 end
 
 # An element from an RSS feed
@@ -120,6 +137,7 @@ class Downloader
                var elements = new HashSet[Element]
                for rss_url in config.rss_source_urls do
                        var rss = rss_url.fetch_rss_content
+                       if config.compressed == true then rss = rss.gunzip
                        elements.add_all rss.to_rss_elements
                end
 
@@ -133,30 +151,26 @@ class Downloader
 
                if sys.verbose then
                        print "\n# {matches.length} matching elements:"
-                       print matches.join("\n")
+                       print "* " + matches.join("\n* ")
                        print "\n# Downloading..."
                end
 
                for element in matches do
-                       var local_path = config.download_destination_folder.to_s / element.title
                        var unique_id = element.unique_id(config)
 
-                       if local_path.to_path.exists then
-                               # Do not redownload a file (we assume that the file name is unique by itself)
-                               if sys.verbose then print "File exists, skipping {element}"
-                               continue
-                       else if history.has(unique_id) then
+                       if history.has(unique_id) then
                                # Do not download a file that is not unique according to `unique_id`
                                if not element.is_unique_exception(config) then
                                        # We make some exceptions
-                                       if sys.verbose then print "File in log, skipping {element}"
+                                       if sys.verbose then print "- Skipping {element}"
                                        continue
                                end
                        end
 
                        # Download element
-                       if sys.verbose then print "Fetching {element} as {local_path}"
-                       element.download_to(local_path)
+                       if sys.verbose then print "+ Acting on {element}"
+
+                       tool_config.act_on element
 
                        # Add `unique_id` to log
                        history.add unique_id
@@ -192,7 +206,7 @@ class Downloader
                        end
 
                        for dir in source_folder.files do if dir.stat.is_dir then
-                               folder_names.add dir.to_s
+                               folder_names.add dir.filename
                        end
                end
 
@@ -248,32 +262,37 @@ redef class Text
        # Get this RSS feed content as an `Array[Element]`
        fun to_rss_elements: Array[Element]
        do
-               var title_re = "<title><![^/]*</title>".to_re
-               var link_re = "<link>[^<]*download[^<]*</link>".to_re
-
-               var title_prefix_len = "<title><![CDATA[".length
-               var title_suffix_len = "]]</title>".length+1
-
-               var titles = search_all(title_re)
-               var links = search_all(link_re)
-
-               if sys.verbose then print "\n# Found {titles.length} titles and {links.length} links"
-               assert titles.length == links.length
+               var xml = to_xml
+               if xml isa XMLError then
+                       print_error "RSS Parse Error: {xml.message}:{xml.location or else "null"}"
+                       return new Array[Element]
+               end
+               var items = xml["rss"].first["channel"].first["item"]
 
                var elements = new Array[Element]
-               for i in titles.length.times do
-                       var title = titles[i].to_s.substring(title_prefix_len, titles[i].length - title_prefix_len - title_suffix_len)
-                       var link = links[i].to_s.substring(6, links[i].length - 6 - 7)
+               for item in items do
+                       var title = item[tool_config.tag_title].first.as(XMLStartTag).data
+                       var link = item[tool_config.tag_link].first.as(XMLStartTag).data
+
                        elements.add new Element(title, link)
                end
 
                if sys.verbose then
                        print "# Found elements:"
-                       print elements.join("\n")
+                       print "* " + elements.join("\n* ")
                end
 
                return elements
        end
+
+       # Expand the Lempel-Ziv encoded `self`
+       fun gunzip: String
+       do
+               var proc = new ProcessDuplex("gunzip", new Array[String]...)
+               var res = proc.write_and_read(self)
+               assert proc.status == 0 else print_error "gunzip failed: {proc.last_error or else "Unknown"}"
+               return res
+       end
 end
 
 # Implement this method in your module to configure this tool
diff --git a/contrib/simplan/.gitignore b/contrib/simplan/.gitignore
new file mode 100644 (file)
index 0000000..9ab9e7a
--- /dev/null
@@ -0,0 +1,6 @@
+*_lexer.nit
+*_parser.nit
+
+*.dot
+*.out
+simplan
diff --git a/contrib/simplan/Makefile b/contrib/simplan/Makefile
new file mode 100644 (file)
index 0000000..530c25e
--- /dev/null
@@ -0,0 +1,18 @@
+NITC=../../bin/nitc
+NITCC=../nitcc/src/nitcc
+
+all: simplan
+
+simplan: simplan.nit simplan_parser.nit
+       ${NITC} simplan.nit
+
+check: simplan
+       ./simplan prob1.txt | tee plan1.txt.out
+       ./simplan prob1.txt plan1.txt
+       diff plan1.txt plan1.txt.out
+
+simplan_parser.nit: ${NITCC} simplan.sablecc
+       ${NITCC} simplan.sablecc
+
+${NITCC}:
+       ${MAKE} -C ../nitcc
diff --git a/contrib/simplan/plan1.txt b/contrib/simplan/plan1.txt
new file mode 100644 (file)
index 0000000..f6e32d5
--- /dev/null
@@ -0,0 +1,42 @@
+# 50 locations
+# 216 roads
+# 1 robot
+# 3 parcels
+# 1 goal
+# size of the problem: 6250000
+SimplePlan {
+Drive(r0,l28,l13);
+Drive(r0,l13,l45);
+Drive(r0,l45,l30);
+Drive(r0,l30,l14);
+Load(r0,b1);
+Drive(r0,l14,l42);
+Drive(r0,l42,l25);
+Load(r0,b2);
+Drive(r0,l25,l20);
+Drive(r0,l20,l21);
+Drive(r0,l21,l1);
+Drive(r0,l1,l2);
+Drive(r0,l2,l49);
+Unload(r0,b1);
+Drive(r0,l49,l2);
+Drive(r0,l2,l34);
+Drive(r0,l34,l18);
+Drive(r0,l18,l22);
+Drive(r0,l22,l23);
+Unload(r0,b2);
+Drive(r0,l23,l43);
+Drive(r0,l43,l27);
+Load(r0,b0);
+Drive(r0,l27,l43);
+Drive(r0,l43,l7);
+Drive(r0,l7,l10);
+Drive(r0,l10,l42);
+Drive(r0,l42,l46);
+Drive(r0,l46,l30);
+Drive(r0,l30,l47);
+Unload(r0,b0);
+}
+# plan in 31 steps; cost=3613.363
+
+# solver infos: steps=63740 nodes=165751 todo=95238 n=374949 (bf=5.882) mem=228651 last=#63740/165750 d=31 f=3613.363 g=3613.363 h=0.0: l47,l47,l49,l23
diff --git a/contrib/simplan/plan2.txt b/contrib/simplan/plan2.txt
new file mode 100644 (file)
index 0000000..d972e1d
--- /dev/null
@@ -0,0 +1,46 @@
+# 50 locations
+# 216 roads
+# 1 robot
+# 4 parcels
+# 1 goal
+# size of the problem: 312500000
+SimplePlan {
+Drive(r0,l28,l13);
+Drive(r0,l13,l29);
+Drive(r0,l29,l24);
+Drive(r0,l24,l9);
+Drive(r0,l9,l25);
+Load(r0,b2);
+Load(r0,b3);
+Drive(r0,l25,l10);
+Drive(r0,l10,l7);
+Drive(r0,l7,l23);
+Unload(r0,b2);
+Drive(r0,l23,l43);
+Drive(r0,l43,l27);
+Load(r0,b0);
+Drive(r0,l27,l43);
+Drive(r0,l43,l7);
+Drive(r0,l7,l10);
+Drive(r0,l10,l42);
+Drive(r0,l42,l46);
+Drive(r0,l46,l30);
+Drive(r0,l30,l47);
+Unload(r0,b0);
+Drive(r0,l47,l30);
+Drive(r0,l30,l14);
+Load(r0,b1);
+Unload(r0,b3);
+Drive(r0,l14,l26);
+Drive(r0,l26,l10);
+Drive(r0,l10,l7);
+Drive(r0,l7,l22);
+Drive(r0,l22,l18);
+Drive(r0,l18,l34);
+Drive(r0,l34,l2);
+Drive(r0,l2,l49);
+Unload(r0,b1);
+}
+# plan in 35 steps; cost=3817.866
+
+# solver infos: steps=642940 nodes=1735072 todo=1028967 n=3826575 (bf=5.952) mem=2275189 last=#642940/1735070 d=35 f=3817.866 g=3817.866 h=0.0: l49,l47,l49,l23,l14
diff --git a/contrib/simplan/prob1.txt b/contrib/simplan/prob1.txt
new file mode 100644 (file)
index 0000000..3244b30
--- /dev/null
@@ -0,0 +1,175 @@
+Locations {
+ l0 54.0 157.0;
+ l1 142.0 322.0;
+ l2 17.625145191109436 362.7287804981639;
+ l3 8.752924683883949 652.4538767470752;
+ l4 280.29942326716036 112.84657877925903;
+ l5 280.07476562437296 316.83759171242434;
+ l6 352.0 383.0;
+ l7 427.7973423614033 534.5569693075433;
+ l8 645.0 50.0;
+ l9 594.1567879434075 207.08971743408088;
+ l10 551.1448100068717 396.37036744450734;
+ l11 689.6923649366455 606.8179646038893;
+ l12 798.2444364374692 172.9460838932327;
+ l13 1041.0 208.0;
+ l14 730.0 503.0;
+ l15 764.0 650.0;
+ l16 109.0 106.0;
+ l17 176.23541418756668 217.45343995171842;
+ l18 174.0 449.0;
+ l19 185.86325364192228 636.4256578638509;
+ l20 456.0 158.0;
+ l21 251.036774762431 216.80730259283249;
+ l22 279.0 486.0;
+ l23 376.78872928105346 637.727566657247;
+ l24 649.5978269032476 173.14673180434525;
+ l25 522.0 293.0;
+ l26 621.0 484.0;
+ l27 665.0 673.0;
+ l28 993.0 58.0;
+ l29 759.1098336783851 230.9431550946424;
+ l30 784.6590413371292 406.09174619635155;
+ l31 846.7583112657318 585.1443328897806;
+ l32 189.0 71.0;
+ l33 70.0 287.0;
+ l34 52.0 454.0;
+ l35 19.0 573.0;
+ l36 283.82289949208706 56.855981241276524;
+ l37 394.0 316.0;
+ l38 243.0 381.0;
+ l39 259.50875035171345 689.0999806128916;
+ l40 593.1572931438346 143.91140279750383;
+ l41 674.0 289.0;
+ l42 633.0542256736045 382.3427298569007;
+ l43 493.32885850446525 649.6309903737257;
+ l44 824.0 43.0;
+ l45 896.7591861159066 286.66409701463397;
+ l46 703.024710767699 376.0847997537542;
+ l47 822.5827054085579 548.0316713994954;
+ l48 49.81730069726453 28.577354623284567;
+ l49 9.259029707623585 256.40948013940505;
+}
+Roads {
+l0 l16;
+l0 l17;
+l0 l48;
+l1 l17;
+l1 l18;
+l1 l2;
+l1 l21;
+l1 l38;
+l1 l5;
+l1 l6;
+l10 l25;
+l10 l26;
+l10 l41;
+l10 l42;
+l10 l7;
+l11 l15;
+l11 l27;
+l11 l43;
+l12 l29;
+l13 l28;
+l13 l29;
+l13 l44;
+l13 l45;
+l14 l26;
+l14 l30;
+l14 l42;
+l14 l46;
+l15 l27;
+l16 l17;
+l16 l32;
+l16 l48;
+l17 l20;
+l17 l21;
+l17 l32;
+l17 l4;
+l17 l5;
+l18 l22;
+l18 l34;
+l18 l38;
+l18 l5;
+l18 l6;
+l19 l23;
+l19 l3;
+l19 l35;
+l19 l39;
+l2 l33;
+l2 l34;
+l2 l49;
+l20 l21;
+l20 l25;
+l20 l32;
+l20 l36;
+l20 l37;
+l20 l4;
+l20 l40;
+l20 l41;
+l20 l5;
+l20 l6;
+l20 l8;
+l20 l9;
+l21 l32;
+l21 l4;
+l21 l5;
+l22 l23;
+l22 l38;
+l22 l6;
+l22 l7;
+l23 l39;
+l23 l43;
+l23 l7;
+l24 l29;
+l24 l40;
+l24 l8;
+l24 l9;
+l25 l41;
+l25 l42;
+l25 l9;
+l26 l30;
+l26 l42;
+l27 l43;
+l28 l44;
+l29 l45;
+l3 l35;
+l30 l45;
+l30 l46;
+l30 l47;
+l31 l47;
+l32 l48;
+l33 l34;
+l33 l49;
+l36 l4;
+l37 l38;
+l37 l5;
+l37 l6;
+l37 l7;
+l38 l5;
+l38 l6;
+l38 l7;
+l39 l7;
+l40 l8;
+l40 l9;
+l41 l42;
+l41 l9;
+l42 l46;
+l43 l7;
+l45 l46;
+l5 l6;
+l6 l7;
+}
+Robots{
+ r0 l28;
+}
+Parcels{
+ b0 l27;
+ b1 l14;
+ b2 l25;
+}
+Goals{
+  b0 l47;
+  b1 l49;
+  b2 l23;
+}
diff --git a/contrib/simplan/prob2.txt b/contrib/simplan/prob2.txt
new file mode 100644 (file)
index 0000000..172b276
--- /dev/null
@@ -0,0 +1,177 @@
+Locations {
+ l0 54.0 157.0;
+ l1 142.0 322.0;
+ l2 17.625145191109436 362.7287804981639;
+ l3 8.752924683883949 652.4538767470752;
+ l4 280.29942326716036 112.84657877925903;
+ l5 280.07476562437296 316.83759171242434;
+ l6 352.0 383.0;
+ l7 427.7973423614033 534.5569693075433;
+ l8 645.0 50.0;
+ l9 594.1567879434075 207.08971743408088;
+ l10 551.1448100068717 396.37036744450734;
+ l11 689.6923649366455 606.8179646038893;
+ l12 798.2444364374692 172.9460838932327;
+ l13 1041.0 208.0;
+ l14 730.0 503.0;
+ l15 764.0 650.0;
+ l16 109.0 106.0;
+ l17 176.23541418756668 217.45343995171842;
+ l18 174.0 449.0;
+ l19 185.86325364192228 636.4256578638509;
+ l20 456.0 158.0;
+ l21 251.036774762431 216.80730259283249;
+ l22 279.0 486.0;
+ l23 376.78872928105346 637.727566657247;
+ l24 649.5978269032476 173.14673180434525;
+ l25 522.0 293.0;
+ l26 621.0 484.0;
+ l27 665.0 673.0;
+ l28 993.0 58.0;
+ l29 759.1098336783851 230.9431550946424;
+ l30 784.6590413371292 406.09174619635155;
+ l31 846.7583112657318 585.1443328897806;
+ l32 189.0 71.0;
+ l33 70.0 287.0;
+ l34 52.0 454.0;
+ l35 19.0 573.0;
+ l36 283.82289949208706 56.855981241276524;
+ l37 394.0 316.0;
+ l38 243.0 381.0;
+ l39 259.50875035171345 689.0999806128916;
+ l40 593.1572931438346 143.91140279750383;
+ l41 674.0 289.0;
+ l42 633.0542256736045 382.3427298569007;
+ l43 493.32885850446525 649.6309903737257;
+ l44 824.0 43.0;
+ l45 896.7591861159066 286.66409701463397;
+ l46 703.024710767699 376.0847997537542;
+ l47 822.5827054085579 548.0316713994954;
+ l48 49.81730069726453 28.577354623284567;
+ l49 9.259029707623585 256.40948013940505;
+}
+Roads {
+l0 l16;
+l0 l17;
+l0 l48;
+l1 l17;
+l1 l18;
+l1 l2;
+l1 l21;
+l1 l38;
+l1 l5;
+l1 l6;
+l10 l25;
+l10 l26;
+l10 l41;
+l10 l42;
+l10 l7;
+l11 l15;
+l11 l27;
+l11 l43;
+l12 l29;
+l13 l28;
+l13 l29;
+l13 l44;
+l13 l45;
+l14 l26;
+l14 l30;
+l14 l42;
+l14 l46;
+l15 l27;
+l16 l17;
+l16 l32;
+l16 l48;
+l17 l20;
+l17 l21;
+l17 l32;
+l17 l4;
+l17 l5;
+l18 l22;
+l18 l34;
+l18 l38;
+l18 l5;
+l18 l6;
+l19 l23;
+l19 l3;
+l19 l35;
+l19 l39;
+l2 l33;
+l2 l34;
+l2 l49;
+l20 l21;
+l20 l25;
+l20 l32;
+l20 l36;
+l20 l37;
+l20 l4;
+l20 l40;
+l20 l41;
+l20 l5;
+l20 l6;
+l20 l8;
+l20 l9;
+l21 l32;
+l21 l4;
+l21 l5;
+l22 l23;
+l22 l38;
+l22 l6;
+l22 l7;
+l23 l39;
+l23 l43;
+l23 l7;
+l24 l29;
+l24 l40;
+l24 l8;
+l24 l9;
+l25 l41;
+l25 l42;
+l25 l9;
+l26 l30;
+l26 l42;
+l27 l43;
+l28 l44;
+l29 l45;
+l3 l35;
+l30 l45;
+l30 l46;
+l30 l47;
+l31 l47;
+l32 l48;
+l33 l34;
+l33 l49;
+l36 l4;
+l37 l38;
+l37 l5;
+l37 l6;
+l37 l7;
+l38 l5;
+l38 l6;
+l38 l7;
+l39 l7;
+l40 l8;
+l40 l9;
+l41 l42;
+l41 l9;
+l42 l46;
+l43 l7;
+l45 l46;
+l5 l6;
+l6 l7;
+}
+Robots{
+ r0 l28;
+}
+Parcels{
+ b0 l27;
+ b1 l14;
+ b2 l25;
+ b3 l25;
+}
+Goals{
+  b0 l47;
+  b1 l49;
+  b2 l23;
+  b3 l14;
+}
diff --git a/contrib/simplan/simplan.nit b/contrib/simplan/simplan.nit
new file mode 100644 (file)
index 0000000..ba32497
--- /dev/null
@@ -0,0 +1,639 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# A simple planning problem solver using A* for a robot that delivers parcels.
+#
+# A map is made of `Location`s (with cartesian coordinates) connected with `Road`s.
+# Some parcels and a robot are placed on the map.
+#
+# The goal of the robot is to plan the delivery of the parcels to their destination in the most
+# efficient way knowing that:
+#
+# * the robot has a given speed to drive
+# * the loading and unloading of parcels take time
+# * the capacity of the robot is limited
+module simplan
+
+import ai::search
+
+private import simplan_lexer
+private import simplan_parser
+
+# The description of the planing problem to solve
+class PlanProblem
+       super SearchProblem[State, Action]
+
+       # Some parameters of the problem
+
+       # The speed on the road.
+       # Used for the action `Drive`
+       var speed = 1.0
+
+       # Cost of loading a parcel in a robot
+       # Used for the action `Load`
+       var duration_loading = 30.0
+
+       # Cost of unloading a parcel in a robot
+       # Used for the action `Unload`
+       var duration_unloading = 30.0
+
+       # How many parcels can a robot transport at the same time?
+       var capacity = 2
+
+       # The name of the robot
+       var robot_name = "r0"
+
+       # Locations on the map, by their names
+       var locations = new HashMap[String, Location]
+
+       # All the parcels, by their `id`
+       var parcels = new Array[Parcel]
+
+       # All the parcels, by their names
+       var parcel_by_name = new HashMap[String, Parcel]
+
+       # +infinite, used to initialize some floats with the maximum value.
+       private var infinite: Float = 1.0 / 0.0
+
+       # The starting state
+       redef var initial_state: State is noinit
+
+       # Parse and initialize a problem from description `text`
+       fun parse(text: String)
+       do
+               var l = new Lexer_simplan(text)
+               var p = new Parser_simplan
+               p.tokens.add_all l.lex
+               var n = p.parse
+               if n isa NError then
+                       print n.message
+                       exit 1
+               end
+               n = n.children.first.children.first.as(not null)
+               if n isa Nplan then
+                       print "Error: expected a problem, got a plan."
+                       exit 1
+               end
+               assert n isa Nproblem
+
+               # Load all locations
+               for n2 in n.n_locations.n_list.children do
+                       var e = new Location(locations.length, n2.n_name.text, n2.n_x.text.to_f, n2.n_y.text.to_f)
+                       assert not locations.has_key(e.name)
+                       locations[e.name] = e
+               end
+               print "# {locations.length} locations"
+
+               # Load all roads
+               var nbr = 0
+               for n2 in n.n_roads.n_list.children do
+                       var o = locations.get_or_null(n2.n_orig.text)
+                       var d = locations.get_or_null(n2.n_dest.text)
+                       assert o != null and d != null
+                       var r = new Road(o,d)
+                       o.roads.add(r)
+                       r = new Road(d,o)
+                       d.roads.add(r)
+                       nbr += 2
+               end
+               print "# {nbr} roads"
+
+               # Compute all road durations
+               for e in locations.values do
+                       e.durations = new Array[Float].filled_with(infinite, locations.length)
+                       e.durations[e.id] = 0.0
+                       for r in e.roads do
+                               e.durations[r.dest.id] = r.distance / speed
+                       end
+               end
+
+               # Close the duration relation between each pair of locations
+               for k in locations.values do
+                       for i in locations.values do
+                               for j in locations.values do
+                                       var d = i.durations[k.id] + k.durations[j.id]
+                                       if i.durations[j.id] > d then
+                                               i.durations[j.id] = d
+                                       end
+                               end
+                       end
+               end
+
+               # Load the robot
+               var robot = null
+               for n2 in n.n_robots.n_list.children do
+                       var name = n2.n_name.text
+                       robot = locations.get_or_null(n2.n_emplacement.text)
+                       assert name == robot_name and robot != null
+               end
+               assert robot != null
+               print "# 1 robot"
+
+               # Load the parcels
+               var parcel_locations = new Array[nullable Location]
+               for n2 in n.n_parcels.n_list.children do
+                       var name = n2.n_name.text
+                       var e = locations.get_or_null(n2.n_emplacement.text)
+                       assert e != null
+                       var parcel = new Parcel(parcels.length, name, e, e)
+                       parcels.add parcel
+                       parcel_locations.add e
+                       parcel_by_name[name] = parcel
+
+               end
+               print "# {parcels.length} parcels"
+
+               # Load the goal of parcels
+               for n2 in n.n_goal.n_list.children do
+                       var parcel = parcel_by_name.get_or_null(n2.n_name.text)
+                       var e = locations.get_or_null(n2.n_emplacement.text)
+                       assert parcel != null and e != null
+                       parcel.goal = e
+               end
+               print "# 1 goal"
+
+               print "# size of the problem: {locations.length.to_f.pow(parcels.length.to_f+1.0).to_precision(0)}"
+
+               initial_state = new State(self, robot, parcel_locations, 0)
+       end
+
+       # Parse a plan for a given problem
+       fun parse_plan(text: String): Plan
+       do
+               var l = new Lexer_simplan(text)
+               var p = new Parser_simplan
+               p.tokens.add_all l.lex
+               var n = p.parse
+               if n isa NError then
+                       print n.message
+                       exit 1
+               end
+               n = n.children.first.children.first.as(not null)
+               if n isa Nproblem then
+                       print "Error: expected a plan, got a problem."
+                       exit 1
+               end
+               assert n isa Nplan
+
+               var res = new Plan(self)
+               var e = initial_state
+               var cost = 0.0
+               for n2 in n.n_actions.children do
+                       if n2 isa Naction_load then
+                               var parcel = parcel_by_name.get_or_null(n2.n_parcel.text)
+                               assert parcel != null
+                               var a = new Load(self, parcel)
+                               res.actions.add(a)
+                               e = a.trans(e)
+                               cost += a.cost
+                       else if n2 isa Naction_unload then
+                               var parcel = parcel_by_name.get_or_null(n2.n_parcel.text)
+                               assert parcel != null
+                               var a = new Unload(self, parcel)
+                               res.actions.add(a)
+                               e = a.trans(e)
+                               cost += a.cost
+                       else if n2 isa Naction_drive then
+                               var o = locations.get_or_null(n2.n_orig.text)
+                               var d = locations.get_or_null(n2.n_dest.text)
+                               assert o != null and d != null
+                               var road: nullable Road = null
+                               for r in o.roads do if r.dest == d then
+                                       road = r
+                                       break
+                               end
+                               assert road != null
+                               var a = new Drive(self, road)
+                               res.actions.add(a)
+                               e = a.trans(e)
+                               cost += a.cost
+                       else abort
+               end
+               print "# loaded plan in {res.actions.length} steps; cost = {cost}"
+               return res
+       end
+
+       redef fun actions(state)
+       do
+               var res = new Array[Action]
+
+               # Driving?
+               for road in state.robot.roads do
+                       res.add(new Drive(self, road))
+               end
+
+               # Loading?
+               for i in [0..state.parcels.length[ do
+                       if state.parcels[i] == state.robot and state.nb_parcels < self.capacity and self.parcels[i].goal != state.robot then
+                               res.add(new Load(self, parcels[i]))
+                       end
+               end
+
+               # Unloading?
+               for i in [0..state.parcels.length[ do
+                       # Unloading is always a valid action,
+                       # even if dropping a parcel outside of its goal is unlikely (but possible)
+                       # to be a part of an optimal plan.
+                       if state.parcels[i] == null then #and self.parcels[i].goal == state.robot then
+                               res.add(new Unload(self, parcels[i]))
+                       end
+               end
+
+               return res
+       end
+
+       redef fun apply_action(state, action) do return action.trans(state)
+
+       redef fun cost(state1, action, state2) do return action.cost
+
+       redef fun is_goal(state)
+       do
+               for i in [0..parcels.length[ do
+                       if state.parcels[i] != parcels[i].goal then return false
+               end
+               return true
+       end
+
+       redef fun heuristic(state)
+       do
+               # Combination (maximum) of two heuristic:
+               # Heuristic 1: maximum driving time to take and deliver a single parcel
+               var max_for_one = 0.0
+               # Heuristic 2: driving time to take the nearest parcel, then deliver all parcels
+               var total_deliver_drive = 0.0
+               var min_take_one = infinite
+               # Total loading/unloading time (incompressible cost, added to both heuristics)
+               var total_load = 0.0
+
+               for i in [0..parcels.length[ do
+                       # The parcel location
+                       var c = state.parcels[i]
+
+                       # Its goal location
+                       var b = parcels[i].goal
+
+                       # Parcel is fine, nothing to do.
+                       if c == b then continue
+
+                       # Driving time to take and deliver this parcel
+                       var t = 0.0
+
+                       # Current position of the parcel (somewhere or in the robot)
+                       var current: Location
+
+                       if c == null then
+                               # The parcel is in the robot
+                               current = state.robot
+                               min_take_one = 0.0
+                       else
+                               # The parcel is somewhere
+                               current = c
+                               # So go get it.
+                               var tt = state.robot.duration(c)
+                               total_load += duration_loading
+
+                               t += tt
+                               if tt < min_take_one then min_take_one = tt
+                       end
+
+                       # Drive and unload the parcel
+                       var td = current.duration(b)
+                       total_load += duration_unloading
+
+                       t += td
+                       if t > max_for_one then max_for_one = t
+                       total_deliver_drive += td
+               end
+
+               # Since one robot can transport several parcels at the same time,
+               # the best optimistic scenario is to deliver at full capacity
+               if min_take_one == infinite then min_take_one = 0.0
+               var res = min_take_one + total_deliver_drive / capacity.to_f
+
+               # Get best of both heuristics
+               if res < max_for_one then res = max_for_one
+
+               # Add incompressible (un)loading costs
+               res += total_load
+
+               return res
+       end
+
+       redef fun make_memory
+       do
+               var res = super
+               res.add new RBTreeMap[State, SearchNode[State, Action]]
+               res.add new BinTreeMap[State, SearchNode[State, Action]]
+               return res
+       end
+end
+
+# A node on the map
+class Location
+       # Indexed identifier, starting at 0
+       # Used to access locations in arrays.
+       var id: Int
+
+       # The name of the location, from the problem description
+       var name: String
+
+       # The x-coordinate of the location
+       var x: Float
+
+       # The y-coordinate of the location
+       var y: Float
+
+       # All roads from this location
+       var roads = new Array[Road]
+
+       # Drive duration to any other location on the map
+       fun duration(dest: Location): Float
+       do
+               return durations[dest.id]
+       end
+
+       private var durations = new Array[Float]
+
+       redef fun to_s do return "{id}({x}, {y})"
+end
+
+# A directed road segment between two locations
+class Road
+       # The origin
+       var orig: Location
+
+       # The destination
+       var dest: Location
+
+       # The distance according to the coordinates of the locations.
+       var distance: Float is noautoinit
+
+       init
+       do
+               var dx = orig.x-dest.x
+               var dy = orig.y-dest.y
+               distance = (dx*dx + dy*dy).sqrt
+       end
+end
+
+# A parcel to move
+class Parcel
+       # Indexed identifier, starting by 0
+       # Used to access parcels in arrays.
+       var id: Int
+       # The name of the parcel according to the problem description
+       # Used for output
+       var name: String
+       # The starting location
+       var start: Location
+       # The goal location
+       var goal: Location
+end
+
+
+# A plan on a problem
+class Plan
+       # The original problem
+       var problem: PlanProblem
+
+       # The sequence of actions in the plan
+       var actions = new Array[Action]
+
+       # Check and write the plan
+       fun dump(verbose: Bool)
+       do
+               var e = problem.initial_state
+               print "SimplePlan \{"
+               var cost = 0.0
+               if verbose then print "#{e} {cost}"
+               for a in actions do
+                       print "{a}"
+                       e = a.trans(e)
+                       cost += a.cost
+                       if verbose then
+                               print "#{e} {cost}"
+                               if a isa Drive then
+                                       print "#{a.road.orig} -- {a.road.dest}: {a.road.distance}"
+                               end
+                       end
+
+               end
+               print "\}"
+               if not problem.is_goal(e) then
+                       print "# /!\\ Goal Failed"
+               end
+               print "# plan in {actions.length} steps; cost={cost}\n"
+       end
+end
+
+# A primitive movement
+abstract class Action
+       # The unitary cost of the action
+       fun cost: Float is abstract
+
+       # The state resulting to the application of the action
+       fun trans(e: State): State is abstract
+
+       # The original problem
+       var problem: PlanProblem
+end
+
+# A loading of a parcel
+class Load
+       super Action
+
+       # The loaded parcel
+       var parcel: Parcel
+
+       redef fun cost do return problem.duration_loading
+
+       redef fun to_s do return "Load({problem.robot_name},{parcel.name});"
+
+       redef fun trans(e)
+       do
+               var res = e.clone
+               assert res.parcels[parcel.id] == res.robot
+               res.parcels = res.parcels.clone
+               res.parcels[parcel.id] = null
+               assert res.nb_parcels < problem.capacity
+               res.nb_parcels += 1
+               return res
+       end
+end
+
+# A unloading of a parcel
+class Unload
+       super Action
+
+       # The unloaded parcel
+       var parcel: Parcel
+
+       redef fun cost do return problem.duration_unloading
+
+       redef fun to_s do return "Unload({problem.robot_name},{parcel.name});"
+
+       redef fun trans(e)
+       do
+               var res = e.clone
+               assert res.parcels[parcel.id] == null
+               res.parcels = res.parcels.clone
+               res.parcels[parcel.id] = res.robot
+               assert res.nb_parcels > 0
+               res.nb_parcels -= 1
+               return res
+       end
+end
+
+# A road driving
+class Drive
+       super Action
+
+       # The road drove on
+       var road: Road
+
+       redef fun cost do return road.distance / problem.speed
+
+       redef fun to_s do return "Drive({problem.robot_name},{road.orig.name},{road.dest.name});"
+
+       redef fun trans(e)
+       do
+               var res = e.clone
+               assert res.robot == road.orig
+               res.robot = road.dest
+               return res
+       end
+end
+
+# Where each robot and parcel are?
+class State
+       super Comparable
+       redef type OTHER: State
+
+       # The original problem
+       var problem: PlanProblem
+
+       # Where is the robot
+       var robot: Location
+
+       # Where each parcel is
+       # `null` if the parcel is loaded
+       var parcels: Array[nullable Location]
+
+       # Number of loaded parcels
+       # Must be consistent with `parcels`
+       var nb_parcels: Int
+
+       # Clone of the state
+       # Used by `Action::trans`
+       #
+       # Warning: the `parcels` array is not cloned for efficiency.
+       # You need to clone it if you mutate it
+       private fun clone: State
+       do
+               var res = new State(problem, robot, parcels, nb_parcels)
+               return res
+       end
+
+       redef fun hash
+       do
+               var res = hash_cache
+               if res != 0 then return res
+               res = robot.hash * 23 + parcels.hash * 7
+               hash_cache = res
+               return res
+       end
+
+       private var hash_cache = 0
+
+       redef fun ==(o)
+       do
+               if not o isa State then return false
+               return robot == o.robot and parcels == o.parcels
+       end
+
+       redef fun <(o) do return (self <=> o) < 0
+
+       redef fun <=>(o) do
+               var res = robot.id <=> o.robot.id
+               if res != 0 then return res
+               for i in [0..parcels.length[ do
+                       var c = parcels[i]
+                       var oc = o.parcels[i]
+                       if c == oc then continue
+                       if c == null then return -1
+                       if oc == null then return 1
+                       res = c.id <=> oc.id
+                       if res != 0 then return res
+               end
+               return 0
+       end
+
+       redef fun to_s
+       do
+               var res = "{robot.name}"
+               for c in parcels do
+                       res += ","
+                       if c != null then
+                               res += c.name
+                       end
+               end
+               return res
+       end
+end
+
+# --configs
+var configs = false
+if not args.is_empty and args.first == "--configs" then
+       configs = true
+       args.shift
+end
+
+# Usage
+if args.is_empty then
+       print "Usage: plan [--configs] problem.txt [plan.txt]\nSearch, or apply, a plan to a problem."
+       exit 0
+end
+
+var problem = new PlanProblem
+
+# Load
+var problem_text = args.first.to_path.read_all
+problem.parse(problem_text)
+
+# Apply a plan
+if args.length == 2 then
+       var plan_text = args[1].to_path.read_all
+       var plan = problem.parse_plan(plan_text)
+       plan.dump(false)
+       exit 0
+end
+
+# run --configs?
+if configs then
+       problem.run_configs(100000)
+       exit 0
+end
+
+# Solve the plan
+var solver = problem.astar
+solver.memorize = true
+var res = solver.run
+if res == null then
+       print "No plan found :("
+       return
+end
+var plan = new Plan(problem)
+plan.actions.add_all res.plan
+plan.dump(false)
+print "# solver infos: {solver}"
diff --git a/contrib/simplan/simplan.sablecc b/contrib/simplan/simplan.sablecc
new file mode 100644 (file)
index 0000000..ca02f34
--- /dev/null
@@ -0,0 +1,36 @@
+Grammar simplan;
+
+Lexer
+
+letter = 'a'..'z'|'a'..'Z';
+digit = '0'..'9';
+name = letter (letter|digit)*;
+nb = digit* '.' digit+ | digit+;
+
+eol = #10 | #13 | #10 #13;
+comment = '#' (Any-eol)* eol?;
+
+blank = #9 | #10 | #13 | ' ' | comment;
+
+Parser
+
+Ignored blank;
+
+file = problem | plan ;
+
+problem = locations roads robots parcels goal;
+locations = 'Locations' '{' [list:]location* '}';
+location = name [x:]nb [y:]nb ';';
+roads = 'Roads' '{' [list:]road* '}';
+road = [orig:]name [dest:]name ';' ;
+robots = 'Robots' '{' [list:]robot* '}';
+robot = name [emplacement:]name ';';
+parcels = 'Parcels' '{' [list:]parcel* '}';
+parcel = name [emplacement:]name ';';
+goal = 'Goals' '{' [list:]parcel* '}';
+
+plan = 'SimplePlan' '{' [actions:]action* '}';
+action =
+       {load:} 'Load' '(' [robot:]name ',' [parcel:]name ')' ';' |
+       {unload:} 'Unload' '(' [robot:]name ',' [parcel:]name ')' ';' |
+       {drive:} 'Drive' '(' [robot:]name ',' [orig:]name ',' [dest:]name ')' ';' ;
diff --git a/contrib/tinks/.gitignore b/contrib/tinks/.gitignore
new file mode 100644 (file)
index 0000000..467c3d3
--- /dev/null
@@ -0,0 +1,3 @@
+src/*/*_serialize.nit
+src/client/drawing.nit
+config.json
diff --git a/contrib/tinks/Makefile b/contrib/tinks/Makefile
new file mode 100644 (file)
index 0000000..b22453a
--- /dev/null
@@ -0,0 +1,48 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+all: bin/server bin/tinks
+
+# Client
+bin/tinks: assets/images/drawing.png src/client/client_serialize.nit $(shell ../../bin/nitls -M src/client/linux_client.nit)
+       ../../bin/nitc -o bin/tinks src/client/linux_client.nit -m src/client/client_serialize.nit
+
+src/client/client_serialize.nit: $(shell ../../bin/nitls -M src/client/client.nit)
+       ../../bin/nitserial -o src/client/client_serialize.nit src/client/client.nit
+
+assets/images/drawing.png: art/drawing.svg
+       ../inkscape_tools/bin/svg_to_png_and_nit art/drawing.svg -a assets/ -s src/client/ -x 2.0
+
+# Server
+bin/server: src/server/server_serialize.nit $(shell ../../bin/nitls -M src/server/dedicated.nit)
+       ../../bin/nitc -o bin/server src/server/dedicated.nit -m src/server/server_serialize.nit
+
+src/server/server_serialize.nit: $(shell ../../bin/nitls -M src/server/dedicated.nit)
+       ../../bin/nitserial -o src/server/server_serialize.nit src/server/dedicated.nit
+
+# Android
+bin/tinks.apk: assets/images/drawing.png src/client/client_serialize.nit res/drawable-ldpi/icon.png $(shell ../../bin/nitls -M src/client/android_client.nit)
+       ../../bin/nitc -o bin/tinks.apk src/client/android_client.nit -m src/client/client_serialize.nit --compile-dir nit_compile
+       adb install -r bin/tinks.apk
+
+res/drawable-ldpi/icon.png: art/icon.svg
+       ../inkscape_tools/bin/svg_to_icons art/icon.svg --android --out res/
+
+# Archive
+pub: assets/images/drawing.png src/client/client_serialize.nit bin/tinks.apk
+       ../../bin/nitc --no-stacktrace -o bin/tinks src/client/linux_client.nit -m src/client/client_serialize.nit
+       tar -czvf bin/tinks.tar.gz bin/tinks assets/
+       scp bin/tinks.tar.gz bin/tinks.apk xymus.net:/var/www/pub/
+
+.PHONY: pub
diff --git a/contrib/tinks/README.md b/contrib/tinks/README.md
new file mode 100644 (file)
index 0000000..4a26077
--- /dev/null
@@ -0,0 +1,47 @@
+Tinks! a multiplayer crossplatform action game with destructible procedurally generated worlds
+
+# Project description
+
+Each player controls a tank, opens fire from the turret and navigates between the terrain features.
+Explosions from turret fire and tank destruction have different forces and destroy the terrain.
+Each tank needs 4 hits to be destroyed.
+Destroyed tanks drop health powerups which can repair other tanks.
+
+The game is optimized for the multiplayer mode but one can play alone to practice.
+Upon launch, a client searches for server by broadcasting a UDP socket.
+A server may respond with its TCP connection port.
+If there is no answer, the client starts its own server which will accept other clients.
+
+The game logic is mostly event based.
+Only the events are passed to the clients at each frame, by serializing them to binary.
+So both the clients and the server keep the game knowledge.
+
+The world is different in each game, it is procedurally generated with an "unlimited" size.
+Each world feature is discovered only as needed by either the server or the clients.
+The server discovers the features affected by possible collisions and by explosions.
+The clients discover the features visible on screen.
+The clients and servers share the seed for the noise generator, so they discover the same features.
+Only the destroyed features and new powerups are passed to the clients by the server as events.
+
+# Modifications
+
+This game was developed quickly while aiming to keep it simple.
+It should be easy to add features as refinements on both the client and the server.
+
+# Usage
+
+Compile with: `make`
+
+Launch with: `bin/tinks`
+
+Compile for Android with: `make bin/tinks.apk`
+
+Launch a server with: `bin/server [server_port]`
+
+Connect to a precise server with: `bin/tinks server_address [server_port]`
+
+# Configuration on desktop
+
+You can configure the client by modifying the file `./config.json` created when you first launch the game.
+The fields `res_x` and `res_y` specify the resolution of the window.
+The field `play_sounds` should be clear enough.
diff --git a/contrib/tinks/art/drawing.svg b/contrib/tinks/art/drawing.svg
new file mode 100644 (file)
index 0000000..47d648a
--- /dev/null
@@ -0,0 +1,1727 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="728.41846"
+   height="519.99341"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   sodipodi:docname="drawing.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient4024">
+      <stop
+         id="stop4049"
+         offset="0"
+         style="stop-color:#e6e6e6;stop-opacity:0;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:0.0397351;"
+         offset="0.5"
+         id="stop4051" />
+      <stop
+         id="stop3977"
+         offset="0.96052629"
+         style="stop-color:#e6e6e6;stop-opacity:0.76158941;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:0;"
+         offset="1"
+         id="stop4028" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3927">
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1;"
+         offset="0"
+         id="stop3929" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:0;"
+         offset="1"
+         id="stop3931" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3909">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop3911" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop3913" />
+    </linearGradient>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect4008"
+       effect="spiro" />
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect4006"
+       is_visible="true" />
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect4004"
+       effect="spiro" />
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect3161"
+       effect="spiro" />
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect3157"
+       is_visible="true" />
+    <linearGradient
+       id="linearGradient3771">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop3773" />
+      <stop
+         id="stop3795"
+         offset="0.46052632"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1"
+         id="stop3775" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3829"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,0.33243869,-1.4983791,0,690.78032,359.10278)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3831"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.35546222,0.09524581,-0.38780905,-1.4473231,590.56362,644.53452)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3833"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.23937237,-0.24458338,0.97464411,-0.99586156,344.03542,654.43573)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3835"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.14945417,-0.27574285,1.3692459,0.49897051,192.06465,416.1818)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3837"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.30945331,-0.10648859,0.38089919,1.4342744,310.38892,228.91286)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3839"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.25321654,0.18876246,-0.76597563,1.034515,512.69634,219.42448)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3841"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.09974529,-0.26010206,1.1547951,-0.37245631,285.61183,551.09526)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3843"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.19843343,0.19551567,-0.80354002,-0.90917483,623.69734,531.37012)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3845"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.09219417,0.25996074,-1.0629657,0.374089,596.78104,309.88047)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3847"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.25446796,0.0279428,-0.13072229,0.92539534,408.33237,277.18662)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <filter
+       inkscape:collect="always"
+       id="filter3843"
+       color-interpolation-filters="sRGB">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.46728973"
+         id="feGaussianBlur3845" />
+    </filter>
+    <filter
+       inkscape:collect="always"
+       id="filter3884"
+       color-interpolation-filters="sRGB">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.12339844"
+         id="feGaussianBlur3886" />
+    </filter>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4946"
+       id="radialGradient4952"
+       cx="286.16666"
+       cy="1026.8622"
+       fx="286.16666"
+       fy="1026.8622"
+       r="53"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient4946">
+      <stop
+         style="stop-color:#e4e4ff;stop-opacity:0;"
+         offset="0"
+         id="stop4948" />
+      <stop
+         id="stop4956"
+         offset="0.47959185"
+         style="stop-color:#eeefff;stop-opacity:0.36078432;" />
+      <stop
+         id="stop4954"
+         offset="0.883753"
+         style="stop-color:#ebecff;stop-opacity:0.68421054;" />
+      <stop
+         style="stop-color:#f2f3ff;stop-opacity:0.36078432;"
+         offset="0.95870173"
+         id="stop4958" />
+      <stop
+         style="stop-color:#ebeeff;stop-opacity:0;"
+         offset="1"
+         id="stop4950" />
+    </linearGradient>
+    <radialGradient
+       r="53"
+       fy="1026.8622"
+       fx="286.16666"
+       cy="1026.8622"
+       cx="286.16666"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient8208"
+       xlink:href="#linearGradient4946"
+       inkscape:collect="always" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4946"
+       id="radialGradient3936"
+       gradientUnits="userSpaceOnUse"
+       cx="286.16666"
+       cy="1026.8622"
+       fx="286.16666"
+       fy="1026.8622"
+       r="53" />
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect3157-7"
+       is_visible="true" />
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect3157-7-3"
+       is_visible="true" />
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect3157-7-3-7"
+       is_visible="true" />
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect4008-3"
+       effect="spiro" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3927"
+       id="radialGradient3951"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,26.000001,-449.84036,-17710.121)"
+       cx="-126.19385"
+       cy="697.01298"
+       fx="-126.19385"
+       fy="697.01298"
+       r="2.6785715" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3927"
+       id="radialGradient3953"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,26.000001,538.41022,-17546.303)"
+       cx="-126.19385"
+       cy="697.01298"
+       fx="-126.19385"
+       fy="697.01298"
+       r="2.6785715" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3927-1"
+       id="radialGradient3953-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,26.000001,538.41022,-17546.303)"
+       cx="-126.19385"
+       cy="697.013"
+       fx="-126.19385"
+       fy="697.013"
+       r="2.6785715" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3927-1">
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1;"
+         offset="0"
+         id="stop3929-1" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:0;"
+         offset="1"
+         id="stop3931-6" />
+    </linearGradient>
+    <radialGradient
+       r="2.6785715"
+       fy="697.013"
+       fx="-126.19385"
+       cy="697.013"
+       cx="-126.19385"
+       gradientTransform="matrix(3.849378,0,0,100.08383,1133.3239,-68702.357)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient3203"
+       xlink:href="#linearGradient3927-1"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4024"
+       id="linearGradient4030"
+       x1="737.87946"
+       y1="555.55243"
+       x2="547.46301"
+       y2="555.55243"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4024"
+       id="radialGradient4047"
+       cx="-768.57141"
+       cy="422.85056"
+       fx="-768.57141"
+       fy="422.85056"
+       r="220"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4024"
+       id="radialGradient4055"
+       gradientUnits="userSpaceOnUse"
+       cx="-768.57141"
+       cy="422.85056"
+       fx="-768.57141"
+       fy="422.85056"
+       r="220" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4024"
+       id="linearGradient3207"
+       x1="546.12756"
+       y1="554.87079"
+       x2="736.12756"
+       y2="554.87079"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4024"
+       id="linearGradient3210"
+       gradientUnits="userSpaceOnUse"
+       x1="546.12756"
+       y1="554.87079"
+       x2="736.12756"
+       y2="554.87079" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.98994949"
+     inkscape:cx="706.89916"
+     inkscape:cy="51.63157"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="2558"
+     inkscape:window-height="1379"
+     inkscape:window-x="2560"
+     inkscape:window-y="27"
+     inkscape:window-maximized="1"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     showguides="true"
+     inkscape:guide-bbox="true" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(225.30099,-308.80528)">
+    <g
+       id="0tank_hit0"
+       inkscape:label="#g4051">
+      <g
+         inkscape:tile-y0="3.1002866"
+         inkscape:tile-x0="33.364892"
+         inkscape:tile-h="62.01872"
+         inkscape:tile-w="98.018719"
+         inkscape:tile-cy="34.109646"
+         inkscape:tile-cx="82.374251"
+         style="stroke:#000000;stroke-width:3.88934855;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         transform="matrix(0,0.52030001,-0.50822079,0,513.48903,211.52973)"
+         inkscape:label="#g3757"
+         id="0tank">
+        <rect
+           style="fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:3.88934855;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           id="rect2985"
+           width="119.198"
+           height="192.86641"
+           x="188.89853"
+           y="354.48859" />
+        <rect
+           y="395.07166"
+           x="214.06789"
+           height="152.28334"
+           width="68.859299"
+           id="rect3755"
+           style="fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:3.88934855;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      </g>
+    </g>
+    <g
+       id="0turret"
+       inkscape:label="#g3769"
+       transform="matrix(0,0.5190835,-0.5190835,0,494.10916,184.75488)"
+       style="stroke:#000000;stroke-width:3.85294461;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none">
+      <rect
+         y="320.93359"
+         x="456.42859"
+         height="102.14286"
+         width="8.5714283"
+         id="rect3763"
+         style="fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:4.81618083;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         transform="matrix(1.4059702,0,0,1.4059702,-139.83581,-163.85023)"
+         d="m 456.42857,438.79074 c 0,16.17405 -13.11166,29.28572 -29.28572,29.28572 -16.17405,0 -29.28571,-13.11167 -29.28571,-29.28572 0,-16.17405 13.11166,-29.28571 29.28571,-29.28571 16.17406,0 29.28572,13.11166 29.28572,29.28571 z"
+         sodipodi:ry="29.285715"
+         sodipodi:rx="29.285715"
+         sodipodi:cy="438.79074"
+         sodipodi:cx="427.14285"
+         id="path3761"
+         style="fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:3.42552127;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         sodipodi:type="arc" />
+      <rect
+         y="309.50504"
+         x="453.21432"
+         height="23.571428"
+         width="15"
+         id="rect3765"
+         style="fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:4.81618083;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         sodipodi:type="arc"
+         style="opacity:0;fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:1.70015218;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="path3767"
+         sodipodi:cx="427.14285"
+         sodipodi:cy="438.79074"
+         sodipodi:rx="29.285715"
+         sodipodi:ry="29.285715"
+         d="m 456.42857,438.79074 c 0,16.17405 -13.11166,29.28572 -29.28572,29.28572 -16.17405,0 -29.28571,-13.11167 -29.28571,-29.28572 0,-16.17405 13.11166,-29.28571 29.28571,-29.28571 16.17406,0 29.28572,13.11166 29.28572,29.28571 z"
+         transform="matrix(1.5854423,0,0,5.0615034,-216.49604,-1767.8643)" />
+    </g>
+    <g
+       id="0splash"
+       inkscape:label="#g3762"
+       transform="translate(-46.972093,-37.778134)">
+      <use
+         height="285.1698"
+         width="301.58823"
+         transform="matrix(0.96592583,0.25881905,-0.25881905,0.96592583,141.29987,270.09432)"
+         id="use2990"
+         xlink:href="#0tank"
+         y="0"
+         x="0" />
+      <use
+         height="285.1698"
+         width="301.58823"
+         transform="translate(69.801501,249.32226)"
+         id="use2992"
+         xlink:href="#0turret"
+         y="0"
+         x="0" />
+      <text
+         sodipodi:linespacing="125%"
+         id="text2994"
+         y="644.93927"
+         x="244.55299"
+         style="font-size:52.50814056px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#e6e6e6;fill-opacity:1;stroke:none;font-family:Sans"
+         xml:space="preserve"><tspan
+           style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#e6e6e6;fill-opacity:1;font-family:Armalite Rifle;-inkscape-font-specification:Armalite Rifle"
+           y="644.93927"
+           x="244.55299"
+           id="tspan2996"
+           sodipodi:role="line">TINKS!</tspan></text>
+    </g>
+    <g
+       id="0blast"
+       transform="matrix(0.87926197,-0.47633853,0.47633853,0.87926197,-154.11696,190.35652)"
+       inkscape:label="#g3817"
+       style="opacity:0.58260869">
+      <path
+         inkscape:transform-center-x="-19.285714"
+         sodipodi:nodetypes="ssscs"
+         inkscape:connector-curvature="0"
+         id="path3768"
+         d="m 456.28998,448.19275 c -17.85254,0 -21.96774,-5.23151 -21.96774,-11.68489 0,-6.45338 4.1152,-11.68489 21.96774,-11.68489 17.85254,0 47.32488,5.23151 47.32488,11.68489 0,6.45338 -29.47234,11.68489 -47.32488,11.68489 z"
+         style="fill:url(#radialGradient3829);fill-opacity:1;stroke:none" />
+      <path
+         inkscape:transform-center-y="18.415015"
+         style="fill:url(#radialGradient3831);fill-opacity:1;stroke:none"
+         d="m 434.61303,443.5591 c -4.62058,-17.24423 -0.0918,-22.71807 6.80847,-24.56701 6.90032,-1.84893 13.55924,0.62719 18.17982,17.87142 4.62057,17.24422 6.65475,47.21118 -0.24557,49.06011 -6.90032,1.84894 -20.12215,-25.12029 -24.74272,-42.36452 z"
+         id="path3779"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ssscs"
+         inkscape:transform-center-x="-2.8825555" />
+      <path
+         inkscape:transform-center-x="11.32163"
+         sodipodi:nodetypes="ssscs"
+         inkscape:connector-curvature="0"
+         id="path3783"
+         d="m 432.41411,433.04167 c 11.61247,-11.86526 18.05624,-10.75133 22.70297,-6.00346 4.64675,4.7479 5.7369,11.33193 -5.87556,23.19719 -11.61246,11.86525 -34.55016,27.60438 -39.19691,22.85648 -4.64676,-4.74792 10.75703,-28.18495 22.3695,-40.05021 z"
+         style="fill:url(#radialGradient3833);fill-opacity:1;stroke:none"
+         inkscape:transform-center-y="11.568106" />
+      <path
+         inkscape:transform-center-y="-4.6850987"
+         style="fill:url(#radialGradient3835);fill-opacity:1;stroke:none"
+         d="m 446.39826,420.37258 c 16.31397,5.94501 17.72256,11.65474 14.82136,17.0075 -2.90124,5.35278 -9.01372,8.32169 -25.32769,2.37668 -16.31396,-5.94502 -40.8944,-20.09882 -37.99316,-25.4516 2.90124,-5.35279 32.18552,0.1224 48.49949,6.06742 z"
+         id="path3787"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ssscs"
+         inkscape:transform-center-x="17.139753" />
+      <path
+         inkscape:transform-center-x="3.00924"
+         sodipodi:nodetypes="ssscs"
+         inkscape:connector-curvature="0"
+         id="path3791"
+         d="m 452.92826,424.83328 c 4.53826,17.08875 0.71453,22.70369 -5.29261,24.77088 -6.00718,2.06718 -11.92309,-0.19619 -16.46134,-17.28495 -4.53824,-17.08875 -7.16054,-46.97597 -1.15336,-49.04315 6.00719,-2.06719 18.36907,24.46845 22.90731,41.55722 z"
+         style="fill:url(#radialGradient3837);fill-opacity:1;stroke:none"
+         inkscape:transform-center-y="-18.198804" />
+      <path
+         inkscape:transform-center-y="-12.480479"
+         style="fill:url(#radialGradient3839);fill-opacity:1;stroke:none"
+         d="m 460.68351,431.90825 c -9.12627,12.3258 -15.21478,12.19653 -20.13029,8.53222 -4.91549,-3.66431 -6.7966,-9.47604 2.32966,-21.80184 9.12627,-12.32581 28.17742,-29.70367 33.09293,-26.03937 4.9155,3.66431 -6.16604,26.9832 -15.2923,39.30899 z"
+         id="path3797"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ssscs"
+         inkscape:transform-center-x="-8.4119042" />
+      <path
+         inkscape:transform-center-y="3.1646153"
+         style="fill:url(#radialGradient3841);fill-opacity:1;stroke:none"
+         d="m 439.60198,423.1028 c 13.75888,-4.43765 18.50013,-1.36738 20.4364,3.68175 1.93628,5.04916 0.33438,10.16525 -13.4245,14.60291 -13.75888,4.43765 -38.04278,7.67051 -39.97905,2.62135 -1.93628,-5.04918 19.20826,-16.46836 32.96715,-20.90601 z"
+         id="path3801"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ssscs"
+         inkscape:transform-center-x="14.589202" />
+      <path
+         inkscape:transform-center-x="-9.326116"
+         sodipodi:nodetypes="ssscs"
+         inkscape:connector-curvature="0"
+         id="path3805"
+         d="m 444.76853,441.48398 c -9.57383,-10.83242 -8.65797,-16.40622 -4.80596,-20.20159 3.85203,-3.7954 9.1816,-4.37519 18.75544,6.45723 9.57382,10.83242 22.25634,31.79221 18.4043,35.5876 -3.85205,3.7954 -22.77995,-11.0108 -32.35378,-21.84324 z"
+         style="fill:url(#radialGradient3843);fill-opacity:1;stroke:none"
+         inkscape:transform-center-y="10.762037" />
+      <path
+         inkscape:transform-center-y="-3.1857099"
+         style="fill:url(#radialGradient3845);fill-opacity:1;stroke:none"
+         d="m 455.1382,438.09057 c -12.66478,4.45711 -17.03499,1.39354 -18.82467,-3.65284 -1.78971,-5.04642 -0.32118,-10.16477 12.3436,-14.62189 12.66477,-4.45709 35.0236,-7.72429 36.81329,-2.67787 1.78969,5.04643 -17.66744,16.4955 -30.33222,20.9526 z"
+         id="path3809"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ssscs"
+         inkscape:transform-center-x="-13.427262" />
+      <path
+         inkscape:transform-center-x="-0.69416206"
+         sodipodi:nodetypes="ssscs"
+         inkscape:connector-curvature="0"
+         id="path3813"
+         d="m 456.06952,429.49566 c -1.5575,11.02568 -5.92106,13.12748 -10.86081,12.58505 -4.93981,-0.54242 -8.58528,-3.52369 -7.02779,-14.54938 1.55751,-11.02567 8.13326,-28.78799 13.07304,-28.24556 4.9398,0.54244 6.37306,19.1842 4.81556,30.20989 z"
+         style="fill:url(#radialGradient3847);fill-opacity:1;stroke:none"
+         inkscape:transform-center-y="-11.878046" />
+    </g>
+    <g
+       id="0explosion"
+       inkscape:label="#g3913"
+       transform="translate(0,-8.5862966)">
+      <g
+         style="fill:#fafbc0;fill-opacity:1"
+         id="g3849"
+         transform="matrix(1.0442033,-0.56569519,0.56569519,1.0442033,-270.03957,283.29403)"
+         inkscape:label="#g3817">
+        <path
+           inkscape:transform-center-x="-19.285714"
+           sodipodi:nodetypes="ssscs"
+           inkscape:connector-curvature="0"
+           id="path3851"
+           d="m 456.28998,448.19275 c -17.85254,0 -21.96774,-5.23151 -21.96774,-11.68489 0,-6.45338 4.1152,-11.68489 21.96774,-11.68489 17.85254,0 47.32488,5.23151 47.32488,11.68489 0,6.45338 -29.47234,11.68489 -47.32488,11.68489 z"
+           style="fill:#fafbc0;fill-opacity:1;stroke:none" />
+        <path
+           inkscape:transform-center-y="18.415015"
+           style="fill:#fafbc0;fill-opacity:1;stroke:none"
+           d="m 434.61303,443.5591 c -4.62058,-17.24423 -0.0918,-22.71807 6.80847,-24.56701 6.90032,-1.84893 13.55924,0.62719 18.17982,17.87142 4.62057,17.24422 6.65475,47.21118 -0.24557,49.06011 -6.90032,1.84894 -20.12215,-25.12029 -24.74272,-42.36452 z"
+           id="path3853"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ssscs"
+           inkscape:transform-center-x="-2.8825555" />
+        <path
+           inkscape:transform-center-x="11.32163"
+           sodipodi:nodetypes="ssscs"
+           inkscape:connector-curvature="0"
+           id="path3855"
+           d="m 432.41411,433.04167 c 11.61247,-11.86526 18.05624,-10.75133 22.70297,-6.00346 4.64675,4.7479 5.7369,11.33193 -5.87556,23.19719 -11.61246,11.86525 -34.55016,27.60438 -39.19691,22.85648 -4.64676,-4.74792 10.75703,-28.18495 22.3695,-40.05021 z"
+           style="fill:#fafbc0;fill-opacity:1;stroke:none"
+           inkscape:transform-center-y="11.568106" />
+        <path
+           inkscape:transform-center-y="-4.6850987"
+           style="fill:#fafbc0;fill-opacity:1;stroke:none"
+           d="m 446.39826,420.37258 c 16.31397,5.94501 17.72256,11.65474 14.82136,17.0075 -2.90124,5.35278 -9.01372,8.32169 -25.32769,2.37668 -16.31396,-5.94502 -40.8944,-20.09882 -37.99316,-25.4516 2.90124,-5.35279 32.18552,0.1224 48.49949,6.06742 z"
+           id="path3857"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ssscs"
+           inkscape:transform-center-x="17.139753" />
+        <path
+           inkscape:transform-center-x="3.00924"
+           sodipodi:nodetypes="ssscs"
+           inkscape:connector-curvature="0"
+           id="path3859"
+           d="m 452.92826,424.83328 c 4.53826,17.08875 0.71453,22.70369 -5.29261,24.77088 -6.00718,2.06718 -11.92309,-0.19619 -16.46134,-17.28495 -4.53824,-17.08875 -7.16054,-46.97597 -1.15336,-49.04315 6.00719,-2.06719 18.36907,24.46845 22.90731,41.55722 z"
+           style="fill:#fafbc0;fill-opacity:1;stroke:none"
+           inkscape:transform-center-y="-18.198804" />
+        <path
+           inkscape:transform-center-y="-12.480479"
+           style="fill:#fafbc0;fill-opacity:1;stroke:none"
+           d="m 460.68351,431.90825 c -9.12627,12.3258 -15.21478,12.19653 -20.13029,8.53222 -4.91549,-3.66431 -6.7966,-9.47604 2.32966,-21.80184 9.12627,-12.32581 28.17742,-29.70367 33.09293,-26.03937 4.9155,3.66431 -6.16604,26.9832 -15.2923,39.30899 z"
+           id="path3861"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ssscs"
+           inkscape:transform-center-x="-8.4119042" />
+        <path
+           inkscape:transform-center-y="3.1646153"
+           style="fill:#fafbc0;fill-opacity:1;stroke:none"
+           d="m 439.60198,423.1028 c 13.75888,-4.43765 18.50013,-1.36738 20.4364,3.68175 1.93628,5.04916 0.33438,10.16525 -13.4245,14.60291 -13.75888,4.43765 -38.04278,7.67051 -39.97905,2.62135 -1.93628,-5.04918 19.20826,-16.46836 32.96715,-20.90601 z"
+           id="path3863"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ssscs"
+           inkscape:transform-center-x="14.589202" />
+        <path
+           inkscape:transform-center-x="-9.326116"
+           sodipodi:nodetypes="ssscs"
+           inkscape:connector-curvature="0"
+           id="path3865"
+           d="m 444.76853,441.48398 c -9.57383,-10.83242 -8.65797,-16.40622 -4.80596,-20.20159 3.85203,-3.7954 9.1816,-4.37519 18.75544,6.45723 9.57382,10.83242 22.25634,31.79221 18.4043,35.5876 -3.85205,3.7954 -22.77995,-11.0108 -32.35378,-21.84324 z"
+           style="fill:#fafbc0;fill-opacity:1;stroke:none"
+           inkscape:transform-center-y="10.762037" />
+        <path
+           inkscape:transform-center-y="-3.1857099"
+           style="fill:#fafbc0;fill-opacity:1;stroke:none"
+           d="m 455.1382,438.09057 c -12.66478,4.45711 -17.03499,1.39354 -18.82467,-3.65284 -1.78971,-5.04642 -0.32118,-10.16477 12.3436,-14.62189 12.66477,-4.45709 35.0236,-7.72429 36.81329,-2.67787 1.78969,5.04643 -17.66744,16.4955 -30.33222,20.9526 z"
+           id="path3867"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ssscs"
+           inkscape:transform-center-x="-13.427262" />
+        <path
+           inkscape:transform-center-x="-0.69416206"
+           sodipodi:nodetypes="ssscs"
+           inkscape:connector-curvature="0"
+           id="path3869"
+           d="m 456.06952,429.49566 c -1.5575,11.02568 -5.92106,13.12748 -10.86081,12.58505 -4.93981,-0.54242 -8.58528,-3.52369 -7.02779,-14.54938 1.55751,-11.02567 8.13326,-28.78799 13.07304,-28.24556 4.9398,0.54244 6.37306,19.1842 4.81556,30.20989 z"
+           style="fill:#fafbc0;fill-opacity:1;stroke:none"
+           inkscape:transform-center-y="-11.878046" />
+      </g>
+      <g
+         inkscape:label="#g3817"
+         transform="matrix(0.5300651,-0.28716178,0.28716178,0.5300651,80.281923,382.46863)"
+         id="g3891"
+         style="fill:#fa6b08;fill-opacity:1">
+        <path
+           style="fill:#fa6b08;fill-opacity:1;stroke:none"
+           d="m 456.28998,448.19275 c -17.85254,0 -21.96774,-5.23151 -21.96774,-11.68489 0,-6.45338 4.1152,-11.68489 21.96774,-11.68489 17.85254,0 47.32488,5.23151 47.32488,11.68489 0,6.45338 -29.47234,11.68489 -47.32488,11.68489 z"
+           id="path3893"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ssscs"
+           inkscape:transform-center-x="-19.285714" />
+        <path
+           inkscape:transform-center-x="-2.8825555"
+           sodipodi:nodetypes="ssscs"
+           inkscape:connector-curvature="0"
+           id="path3895"
+           d="m 434.61303,443.5591 c -4.62058,-17.24423 -0.0918,-22.71807 6.80847,-24.56701 6.90032,-1.84893 13.55924,0.62719 18.17982,17.87142 4.62057,17.24422 6.65475,47.21118 -0.24557,49.06011 -6.90032,1.84894 -20.12215,-25.12029 -24.74272,-42.36452 z"
+           style="fill:#fa6b08;fill-opacity:1;stroke:none"
+           inkscape:transform-center-y="18.415015" />
+        <path
+           inkscape:transform-center-y="11.568106"
+           style="fill:#fa6b08;fill-opacity:1;stroke:none"
+           d="m 432.41411,433.04167 c 11.61247,-11.86526 18.05624,-10.75133 22.70297,-6.00346 4.64675,4.7479 5.7369,11.33193 -5.87556,23.19719 -11.61246,11.86525 -34.55016,27.60438 -39.19691,22.85648 -4.64676,-4.74792 10.75703,-28.18495 22.3695,-40.05021 z"
+           id="path3897"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ssscs"
+           inkscape:transform-center-x="11.32163" />
+        <path
+           inkscape:transform-center-x="17.139753"
+           sodipodi:nodetypes="ssscs"
+           inkscape:connector-curvature="0"
+           id="path3899"
+           d="m 446.39826,420.37258 c 16.31397,5.94501 17.72256,11.65474 14.82136,17.0075 -2.90124,5.35278 -9.01372,8.32169 -25.32769,2.37668 -16.31396,-5.94502 -40.8944,-20.09882 -37.99316,-25.4516 2.90124,-5.35279 32.18552,0.1224 48.49949,6.06742 z"
+           style="fill:#fa6b08;fill-opacity:1;stroke:none"
+           inkscape:transform-center-y="-4.6850987" />
+        <path
+           inkscape:transform-center-y="-18.198804"
+           style="fill:#fa6b08;fill-opacity:1;stroke:none"
+           d="m 452.92826,424.83328 c 4.53826,17.08875 0.71453,22.70369 -5.29261,24.77088 -6.00718,2.06718 -11.92309,-0.19619 -16.46134,-17.28495 -4.53824,-17.08875 -7.16054,-46.97597 -1.15336,-49.04315 6.00719,-2.06719 18.36907,24.46845 22.90731,41.55722 z"
+           id="path3901"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ssscs"
+           inkscape:transform-center-x="3.00924" />
+        <path
+           inkscape:transform-center-x="-8.4119042"
+           sodipodi:nodetypes="ssscs"
+           inkscape:connector-curvature="0"
+           id="path3903"
+           d="m 460.68351,431.90825 c -9.12627,12.3258 -15.21478,12.19653 -20.13029,8.53222 -4.91549,-3.66431 -6.7966,-9.47604 2.32966,-21.80184 9.12627,-12.32581 28.17742,-29.70367 33.09293,-26.03937 4.9155,3.66431 -6.16604,26.9832 -15.2923,39.30899 z"
+           style="fill:#fa6b08;fill-opacity:1;stroke:none"
+           inkscape:transform-center-y="-12.480479" />
+        <path
+           inkscape:transform-center-x="14.589202"
+           sodipodi:nodetypes="ssscs"
+           inkscape:connector-curvature="0"
+           id="path3905"
+           d="m 439.60198,423.1028 c 13.75888,-4.43765 18.50013,-1.36738 20.4364,3.68175 1.93628,5.04916 0.33438,10.16525 -13.4245,14.60291 -13.75888,4.43765 -38.04278,7.67051 -39.97905,2.62135 -1.93628,-5.04918 19.20826,-16.46836 32.96715,-20.90601 z"
+           style="fill:#fa6b08;fill-opacity:1;stroke:none"
+           inkscape:transform-center-y="3.1646153" />
+        <path
+           inkscape:transform-center-y="10.762037"
+           style="fill:#fa6b08;fill-opacity:1;stroke:none"
+           d="m 444.76853,441.48398 c -9.57383,-10.83242 -8.65797,-16.40622 -4.80596,-20.20159 3.85203,-3.7954 9.1816,-4.37519 18.75544,6.45723 9.57382,10.83242 22.25634,31.79221 18.4043,35.5876 -3.85205,3.7954 -22.77995,-11.0108 -32.35378,-21.84324 z"
+           id="path3907"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ssscs"
+           inkscape:transform-center-x="-9.326116" />
+        <path
+           inkscape:transform-center-x="-13.427262"
+           sodipodi:nodetypes="ssscs"
+           inkscape:connector-curvature="0"
+           id="path3909"
+           d="m 455.1382,438.09057 c -12.66478,4.45711 -17.03499,1.39354 -18.82467,-3.65284 -1.78971,-5.04642 -0.32118,-10.16477 12.3436,-14.62189 12.66477,-4.45709 35.0236,-7.72429 36.81329,-2.67787 1.78969,5.04643 -17.66744,16.4955 -30.33222,20.9526 z"
+           style="fill:#fa6b08;fill-opacity:1;stroke:none"
+           inkscape:transform-center-y="-3.1857099" />
+        <path
+           inkscape:transform-center-y="-11.878046"
+           style="fill:#fa6b08;fill-opacity:1;stroke:none"
+           d="m 456.06952,429.49566 c -1.5575,11.02568 -5.92106,13.12748 -10.86081,12.58505 -4.93981,-0.54242 -8.58528,-3.52369 -7.02779,-14.54938 1.55751,-11.02567 8.13326,-28.78799 13.07304,-28.24556 4.9398,0.54244 6.37306,19.1842 4.81556,30.20989 z"
+           id="path3911"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ssscs"
+           inkscape:transform-center-x="-0.69416206" />
+      </g>
+    </g>
+    <g
+       id="0trees0"
+       inkscape:label="#g3941"
+       transform="matrix(1.107328,0,0,1.1095558,-38.012453,-58.538853)"
+       style="fill:#006700;fill-opacity:1;stroke-width:2.25541931;stroke-miterlimit:4;stroke-dasharray:none;stroke:#000000;stroke-opacity:1">
+      <path
+         sodipodi:type="arc"
+         style="fill:#006700;fill-opacity:1;stroke:#000000;stroke-width:4.13688339;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="path3048"
+         sodipodi:cx="192.43405"
+         sodipodi:cy="260.92615"
+         sodipodi:rx="16.162441"
+         sodipodi:ry="16.162441"
+         d="m 208.59649,260.92615 c 0,8.92627 -7.23617,16.16244 -16.16244,16.16244 -8.92627,0 -16.16244,-7.23617 -16.16244,-16.16244 0,-8.92627 7.23617,-16.16244 16.16244,-16.16244 8.92627,0 16.16244,7.23617 16.16244,16.16244 z"
+         transform="matrix(0.5451977,0,0,0.5451977,291.97568,422.78751)" />
+      <path
+         transform="matrix(0.68940331,0,0,0.68940331,266.90724,398.15942)"
+         d="m 208.59649,260.92615 c 0,8.92627 -7.23617,16.16244 -16.16244,16.16244 -8.92627,0 -16.16244,-7.23617 -16.16244,-16.16244 0,-8.92627 7.23617,-16.16244 16.16244,-16.16244 8.92627,0 16.16244,7.23617 16.16244,16.16244 z"
+         sodipodi:ry="16.162441"
+         sodipodi:rx="16.162441"
+         sodipodi:cy="260.92615"
+         sodipodi:cx="192.43405"
+         id="path3050"
+         style="fill:#006700;fill-opacity:1;stroke:#000000;stroke-width:3.27155277;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:#006700;fill-opacity:1;stroke:#000000;stroke-width:2.86759308;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="path3052"
+         sodipodi:cx="192.43405"
+         sodipodi:cy="260.92615"
+         sodipodi:rx="16.162441"
+         sodipodi:ry="16.162441"
+         d="m 208.59649,260.92615 c 0,8.92627 -7.23617,16.16244 -16.16244,16.16244 -8.92627,0 -16.16244,-7.23617 -16.16244,-16.16244 0,-8.92627 7.23617,-16.16244 16.16244,-16.16244 8.92627,0 16.16244,7.23617 16.16244,16.16244 z"
+         transform="matrix(0.78652,0,0,0.78652,256.07519,365.36388)" />
+    </g>
+    <g
+       id="0debris0"
+       inkscape:label="#g3050"
+       transform="matrix(1.1877783,0,0,1.1877783,-69.131812,-104.67586)"
+       style="stroke:#000000;stroke-opacity:1;stroke-width:2.10476989;stroke-miterlimit:4;stroke-dasharray:none">
+      <rect
+         style="fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:2.10476989;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="rect3066"
+         width="29.531679"
+         height="29.531681"
+         x="426.64539"
+         y="558.90302" />
+    </g>
+    <path
+       inkscape:label="#path3047"
+       sodipodi:nodetypes="sssssssss"
+       inkscape:connector-curvature="0"
+       id="0rock0"
+       d="m 522.32863,577.10507 c -2.27422,4.40554 -4.35831,9.03612 -6.09035,12.89275 -4.13585,9.20893 -2.62256,6.94931 -13.92781,4.82827 -2.12702,-0.39906 -5.53885,-1.82088 -12.65516,-5.25248 -5.66496,-2.73173 -5.45406,-3.06229 -5.24196,-12.68064 0.10915,-4.95091 5.82107,-3.7086 9.05982,-6.95386 3.23874,-3.24526 3.89516,-10.97927 8.8373,-10.97927 4.94216,0 11.36852,0.85183 12.65518,5.2525 1.586,5.42446 9.62748,8.50603 7.36298,12.89273 z"
+       style="fill:#7f6b41;fill-opacity:1;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <g
+       style="fill:#006700;fill-opacity:1;stroke-width:2.25541931;stroke-miterlimit:4;stroke-dasharray:none;stroke:#000000;stroke-opacity:1"
+       transform="matrix(1.107328,0,0,1.1095558,-38.012453,-10.603516)"
+       inkscape:label="#g3941"
+       id="0trees1">
+      <path
+         sodipodi:type="arc"
+         style="fill:#006700;fill-opacity:1;stroke:#000000;stroke-width:3.75593998;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="path3066"
+         sodipodi:cx="192.43405"
+         sodipodi:cy="260.92615"
+         sodipodi:rx="16.162441"
+         sodipodi:ry="16.162441"
+         d="m 208.59649,260.92615 c 0,8.92627 -7.23617,16.16244 -16.16244,16.16244 -8.92627,0 -16.16244,-7.23617 -16.16244,-16.16244 0,-8.92627 7.23617,-16.16244 16.16244,-16.16244 8.92627,0 16.16244,7.23617 16.16244,16.16244 z"
+         transform="matrix(0.60049397,0,0,0.60049397,293.62091,411.22436)" />
+      <path
+         sodipodi:type="arc"
+         style="fill:#006700;fill-opacity:1;stroke:#000000;stroke-width:2.71756777;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="path3062"
+         sodipodi:cx="192.43405"
+         sodipodi:cy="260.92615"
+         sodipodi:rx="16.162441"
+         sodipodi:ry="16.162441"
+         d="m 208.59649,260.92615 c 0,8.92627 -7.23617,16.16244 -16.16244,16.16244 -8.92627,0 -16.16244,-7.23617 -16.16244,-16.16244 0,-8.92627 7.23617,-16.16244 16.16244,-16.16244 8.92627,0 16.16244,7.23617 16.16244,16.16244 z"
+         transform="matrix(0.82994041,0,0,0.82994041,241.49806,357.05217)" />
+      <path
+         transform="matrix(0.47243244,0,0,0.47243244,315.3327,456.40843)"
+         d="m 208.59649,260.92615 c 0,8.92627 -7.23617,16.16244 -16.16244,16.16244 -8.92627,0 -16.16244,-7.23617 -16.16244,-16.16244 0,-8.92627 7.23617,-16.16244 16.16244,-16.16244 8.92627,0 16.16244,7.23617 16.16244,16.16244 z"
+         sodipodi:ry="16.162441"
+         sodipodi:rx="16.162441"
+         sodipodi:cy="260.92615"
+         sodipodi:cx="192.43405"
+         id="path3080"
+         style="fill:#006700;fill-opacity:1;stroke:#000000;stroke-width:4.77405681;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         sodipodi:type="arc" />
+      <path
+         transform="matrix(0.5451977,0,0,0.5451977,290.35037,425.76127)"
+         d="m 208.59649,260.92615 c 0,8.92627 -7.23617,16.16244 -16.16244,16.16244 -8.92627,0 -16.16244,-7.23617 -16.16244,-16.16244 0,-8.92627 7.23617,-16.16244 16.16244,-16.16244 8.92627,0 16.16244,7.23617 16.16244,16.16244 z"
+         sodipodi:ry="16.162441"
+         sodipodi:rx="16.162441"
+         sodipodi:cy="260.92615"
+         sodipodi:cx="192.43405"
+         id="path3060"
+         style="fill:#006700;fill-opacity:1;stroke:#000000;stroke-width:4.13688339;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         sodipodi:type="arc" />
+    </g>
+    <g
+       id="0trees2"
+       inkscape:label="#g3941"
+       transform="matrix(1.107328,0,0,1.1095558,-38.012453,34.362374)"
+       style="fill:#006700;fill-opacity:1;stroke-width:2.25541931;stroke-miterlimit:4;stroke-dasharray:none;stroke:#000000;stroke-opacity:1">
+      <path
+         sodipodi:type="arc"
+         style="fill:#006700;fill-opacity:1;stroke:#000000;stroke-width:2.66417172;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="path3076"
+         sodipodi:cx="192.43405"
+         sodipodi:cy="260.92615"
+         sodipodi:rx="16.162441"
+         sodipodi:ry="16.162441"
+         d="m 208.59649,260.92615 c 0,8.92627 -7.23617,16.16244 -16.16244,16.16244 -8.92627,0 -16.16244,-7.23617 -16.16244,-16.16244 0,-8.92627 7.23617,-16.16244 16.16244,-16.16244 8.92627,0 16.16244,7.23617 16.16244,16.16244 z"
+         transform="matrix(0.8465743,0,0,0.8465743,238.7901,354.32672)" />
+      <path
+         transform="matrix(0.55580797,0,0,0.55580797,295.32041,436.67318)"
+         d="m 208.59649,260.92615 c 0,8.92627 -7.23617,16.16244 -16.16244,16.16244 -8.92627,0 -16.16244,-7.23617 -16.16244,-16.16244 0,-8.92627 7.23617,-16.16244 16.16244,-16.16244 8.92627,0 16.16244,7.23617 16.16244,16.16244 z"
+         sodipodi:ry="16.162441"
+         sodipodi:rx="16.162441"
+         sodipodi:cy="260.92615"
+         sodipodi:cx="192.43405"
+         id="path3074"
+         style="fill:#006700;fill-opacity:1;stroke:#000000;stroke-width:4.05791106;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         sodipodi:type="arc" />
+      <path
+         transform="matrix(0.49018786,0,0,0.49018786,315.12079,441.00333)"
+         d="m 208.59649,260.92615 c 0,8.92627 -7.23617,16.16244 -16.16244,16.16244 -8.92627,0 -16.16244,-7.23617 -16.16244,-16.16244 0,-8.92627 7.23617,-16.16244 16.16244,-16.16244 8.92627,0 16.16244,7.23617 16.16244,16.16244 z"
+         sodipodi:ry="16.162441"
+         sodipodi:rx="16.162441"
+         sodipodi:cy="260.92615"
+         sodipodi:cx="192.43405"
+         id="path3082"
+         style="fill:#006700;fill-opacity:1;stroke:#000000;stroke-width:4.60113253;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         sodipodi:type="arc" />
+      <path
+         transform="matrix(0.58738416,0,0,0.58738416,284.26157,422.44023)"
+         d="m 208.59649,260.92615 c 0,8.92627 -7.23617,16.16244 -16.16244,16.16244 -8.92627,0 -16.16244,-7.23617 -16.16244,-16.16244 0,-8.92627 7.23617,-16.16244 16.16244,-16.16244 8.92627,0 16.16244,7.23617 16.16244,16.16244 z"
+         sodipodi:ry="16.162441"
+         sodipodi:rx="16.162441"
+         sodipodi:cy="260.92615"
+         sodipodi:cx="192.43405"
+         id="path3078"
+         style="fill:#006700;fill-opacity:1;stroke:#000000;stroke-width:3.83976869;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         sodipodi:type="arc" />
+    </g>
+    <path
+       style="fill:#6b5830;fill-opacity:1;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 522.32863,625.04041 c -2.27422,4.40554 -4.35831,9.03612 -6.09035,12.89273 -4.13585,9.20895 -2.62256,6.94933 -13.92781,4.82829 -2.12702,-0.39906 -5.53885,-1.82089 -12.65516,-5.25249 -5.66496,-2.73173 -5.45406,-3.06228 -5.24196,-12.68063 0.10915,-4.95091 5.82107,-3.7086 9.05982,-6.95386 3.23874,-3.24526 3.89516,-10.97928 8.8373,-10.97928 4.94216,0 11.36852,0.85184 12.65518,5.2525 1.586,5.42446 9.62748,8.50604 7.36298,12.89274 z"
+       id="0rock1"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="sssssssss"
+       inkscape:label="#path3047" />
+    <path
+       inkscape:label="#path3047"
+       sodipodi:nodetypes="sssssssss"
+       inkscape:connector-curvature="0"
+       id="0rock2"
+       d="m 522.32863,675.94518 c -2.27422,4.40555 -4.35831,9.03613 -6.09035,12.89275 -4.13585,9.20893 -2.62256,6.94932 -13.92781,4.82828 -2.12702,-0.39905 -5.53885,-1.82089 -12.65516,-5.25248 -5.66496,-2.73174 -5.45406,-3.06228 -5.24196,-12.68065 0.10915,-4.9509 5.82107,-3.7086 9.05982,-6.95386 3.23874,-3.24525 3.89516,-10.97927 8.8373,-10.97927 4.94216,0 11.36852,0.85184 12.65518,5.2525 1.586,5.42446 9.62748,8.50604 7.36298,12.89273 z"
+       style="fill:#686358;fill-opacity:1;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <g
+       inkscape:label="#g3050"
+       id="0debris1"
+       transform="matrix(1.1877783,0,0,1.1877783,-69.131812,-56.740523)"
+       style="stroke:#000000;stroke-opacity:1;stroke-width:2.10476989;stroke-miterlimit:4;stroke-dasharray:none">
+      <rect
+         y="558.90302"
+         x="426.64539"
+         height="29.531681"
+         width="29.531679"
+         id="rect3070"
+         style="fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:2.10476989;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    </g>
+    <g
+       transform="matrix(1.1877783,0,0,1.1877783,-69.131812,-7.1083607)"
+       id="0debris5"
+       inkscape:label="#g3050"
+       style="stroke:#000000;stroke-opacity:1;stroke-width:2.10476989;stroke-miterlimit:4;stroke-dasharray:none">
+      <rect
+         style="fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:2.10476989;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="rect3074"
+         width="29.531679"
+         height="29.531681"
+         x="426.64539"
+         y="558.90302" />
+      <rect
+         y="569.69788"
+         x="437.44034"
+         height="14.370327"
+         width="14.370327"
+         id="rect3087"
+         style="fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:2.10476989;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    </g>
+    <g
+       style="stroke:#000000;stroke-width:3.85294461;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       transform="matrix(0,0.5190835,-0.5190835,0,66.89581,389.68202)"
+       inkscape:label="#g3757"
+       id="0stencils0">
+      <rect
+         style="opacity:0;fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:3.85294461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="rect3068"
+         width="119.198"
+         height="192.86641"
+         x="188.89853"
+         y="354.48859" />
+      <path
+         sodipodi:type="star"
+         style="opacity:0.8;fill:#e6e6e6;fill-opacity:1;stroke:none;filter:url(#filter3843)"
+         id="path3073"
+         sodipodi:sides="5"
+         sodipodi:cx="113.57143"
+         sodipodi:cy="-49.473057"
+         sodipodi:r1="10.714286"
+         sodipodi:r2="5.4156551"
+         sodipodi:arg1="3.1415927"
+         sodipodi:arg2="3.7699112"
+         inkscape:flatsided="false"
+         inkscape:rounded="0"
+         inkscape:randomized="0"
+         d="m 102.85714,-49.473057 6.33293,-3.183242 1.07046,-7.006649 4.98443,5.039297 6.99451,-1.147105 -3.25239,6.297699 3.25239,6.2977 -6.99451,-1.147106 -4.98443,5.039297 -1.07046,-7.006649 z"
+         transform="matrix(0,-1.7122825,1.9264723,0,343.806,568.95452)"
+         inkscape:transform-center-x="2.3547626" />
+    </g>
+    <g
+       id="0stencils1"
+       inkscape:label="#g3757"
+       transform="matrix(0,0.5190835,-0.5190835,0,66.89581,307.53917)"
+       style="stroke:#000000;stroke-width:3.85294461;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none">
+      <rect
+         y="354.48859"
+         x="188.89853"
+         height="192.86641"
+         width="119.198"
+         id="rect3849"
+         style="opacity:0;fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:3.85294461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <g
+         id="0rank1"
+         inkscape:label="#g6067"
+         transform="matrix(-5.3663884,0,0,-5.3663884,7637.5456,5491.7226)"
+         style="opacity:0.8;fill:#e6e6e6;fill-opacity:1;stroke:none;filter:url(#filter3884)">
+        <path
+           transform="translate(1216.3469,585.24088)"
+           id="rect6039"
+           d="m 160.6875,366.40625 -1.03125,1.03125 -2.28125,2.28125 1.03125,1.03125 2.28125,-2.28125 2.28125,2.28125 1.03125,-1.03125 -2.28125,-2.28125 -1.03125,-1.03125 z"
+           style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+           inkscape:connector-curvature="0" />
+      </g>
+    </g>
+    <g
+       style="stroke:#000000;stroke-width:3.85294461;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       transform="matrix(0,0.5190835,-0.5190835,0,494.10916,272.51921)"
+       inkscape:label="#g3769"
+       id="0turret_firing">
+      <path
+         transform="matrix(1.6736524,0,0,7.1213515,-254.17437,-2670.495)"
+         d="m 456.42857,438.79074 c 0,16.17405 -13.11166,29.28572 -29.28572,29.28572 -16.17405,0 -29.28571,-13.11167 -29.28571,-29.28572 0,-16.17405 13.11166,-29.28571 29.28571,-29.28571 16.17406,0 29.28572,13.11166 29.28572,29.28571 z"
+         sodipodi:ry="29.285715"
+         sodipodi:rx="29.285715"
+         sodipodi:cy="438.79074"
+         sodipodi:cx="427.14285"
+         id="path3091"
+         style="opacity:0;fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:1.44432509;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         sodipodi:type="arc" />
+      <path
+         style="fill:#fafbc0;fill-opacity:1;stroke:none"
+         d="m 438.26325,288.72302 c 0.41837,4.37732 5.50796,11.30306 10.90648,16.88461 -0.25983,0.65035 -0.49903,1.31016 -0.75455,1.96861 l 25.44845,0 c -0.25422,-0.57656 -0.49719,-1.17403 -0.75454,-1.74147 3.4551,-3.76097 6.10502,-7.88649 5.89911,-10.82734 -0.19557,-2.79317 -2.9234,-3.9582 -6.37926,-4.01294 4.00364,-10.83931 7.18191,-22.34834 5.89909,-26.12192 -1.45131,-4.26927 -8.1456,2.60608 -13.99321,11.20593 -1.71977,-15.34214 -4.63923,-31.49388 -6.85941,-30.58915 -2.00097,0.81541 -2.82451,15.3025 -2.81237,29.83199 -2.5852,-5.3196 -4.86211,-8.77539 -5.83051,-7.2687 -1.08387,1.68633 -0.24761,9.25263 1.37189,17.71748 -6.0332,-2.08817 -11.9033,-2.2095 -12.14117,2.12003 -0.0148,0.26809 -0.028,0.54106 0,0.83287 z"
+         id="path3851-7"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#fa6b08;fill-opacity:1;stroke:none"
+         d="m 449.23831,294.62885 c 0.34521,2.22647 2.84224,5.58903 5.48755,8.32873 -0.61198,1.5313 -1.18627,3.07651 -1.71486,4.61866 l 15.84525,0 c -0.58292,-1.49879 -1.26103,-3.01116 -1.92063,-4.46724 1.7567,-1.91079 3.05418,-4.03276 2.94955,-5.52724 -0.0978,-1.39845 -1.43525,-2.00161 -3.15533,-2.04432 2.01726,-5.47754 3.5974,-11.26878 2.94954,-13.17454 -0.73919,-2.17446 -4.1583,1.29255 -7.13378,5.67868 -0.87263,-7.79496 -2.30157,-16.05716 -3.42972,-15.59743 -1.01927,0.41535 -1.44983,7.8932 -1.44047,15.29456 -1.33387,-2.76476 -2.51973,-4.56123 -3.01815,-3.78578 -0.552,0.85885 -0.073,4.69595 0.75453,9.01017 -3.07874,-1.07555 -6.05212,-1.14882 -6.17348,1.06002 -0.0113,0.20061 -0.0351,0.37914 0,0.60573 z"
+         id="path3893-0"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       id="0red_dot"
+       inkscape:label="#g3090">
+      <path
+         transform="translate(201.94695,306.71335)"
+         d="m 169.45309,9.1456165 c 0,1.3947295 -1.13066,2.5253815 -2.52539,2.5253815 -1.39473,0 -2.52538,-1.130652 -2.52538,-2.5253815 0,-1.3947296 1.13065,-2.5253813 2.52538,-2.5253813 1.39473,0 2.52539,1.1306517 2.52539,2.5253813 z"
+         sodipodi:ry="2.5253813"
+         sodipodi:rx="2.5253813"
+         sodipodi:cy="9.1456165"
+         sodipodi:cx="166.9277"
+         id="path3088"
+         style="fill:#ff2a2a;fill-opacity:1;stroke:none"
+         sodipodi:type="arc" />
+    </g>
+    <g
+       id="0stencils2"
+       inkscape:label="#g3757"
+       transform="matrix(0,0.5190835,-0.5190835,0,192.6598,389.68202)"
+       style="stroke:#000000;stroke-width:3.85294461;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none">
+      <rect
+         y="354.48859"
+         x="188.89853"
+         height="192.86641"
+         width="119.198"
+         id="rect3100"
+         style="opacity:0;fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:3.85294461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <text
+         xml:space="preserve"
+         style="font-size:32.52328873px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:2.06132531px;word-spacing:0px;opacity:0.8;fill:#e6e6e6;fill-opacity:1;stroke:none;font-family:Sans"
+         x="-277.52396"
+         y="-362.40561"
+         id="text3112"
+         sodipodi:linespacing="125%"
+         transform="scale(-1,-1)"><tspan
+           sodipodi:role="line"
+           id="tspan3114"
+           x="-277.52396"
+           y="-362.40561"
+           style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:2.06132531px;fill:#e6e6e6;fill-opacity:1;font-family:Armalite Rifle;-inkscape-font-specification:Armalite Rifle">Nit</tspan></text>
+    </g>
+    <g
+       style="stroke:#000000;stroke-width:3.85294461;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       transform="matrix(0,0.5190835,-0.5190835,0,192.6598,308.11221)"
+       inkscape:label="#g3757"
+       id="0stencils3">
+      <rect
+         style="opacity:0;fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:3.85294461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="rect3118"
+         width="119.198"
+         height="192.86641"
+         x="188.89853"
+         y="354.48859" />
+      <text
+         transform="scale(-1,-1)"
+         sodipodi:linespacing="125%"
+         id="text3120"
+         y="-361.26242"
+         x="-270.396"
+         style="font-size:34.82661438px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:3.98779774px;word-spacing:0px;opacity:0.8;fill:#e6e6e6;fill-opacity:1;stroke:none;font-family:Sans"
+         xml:space="preserve"><tspan
+           style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:3.98779774px;fill:#e6e6e6;fill-opacity:1;font-family:Armalite Rifle;-inkscape-font-specification:Armalite Rifle"
+           y="-361.26242"
+           x="-270.396"
+           id="tspan3122"
+           sodipodi:role="line">Xy</tspan></text>
+    </g>
+    <g
+       id="0arrow"
+       inkscape:label="#g3119"
+       transform="translate(-472.75139,179.80715)">
+      <g
+         id="g3107"
+         inkscape:label="#g4191"
+         transform="matrix(0,-4.7070559,-4.2935135,0,5263.6203,6128.1984)"
+         style="fill:#4a4a4a;fill-opacity:1;stroke-width:0.55521804;stroke-miterlimit:4;stroke-dasharray:none">
+        <path
+           inkscape:connector-curvature="0"
+           id="path3109"
+           d="m 1246.9007,1077.1272 -5.8563,6.3886 1.914,0 0,3.1124 7.9696,0 0,-3.1124 1.7879,0 z"
+           style="fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:0.44488618;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+           sodipodi:nodetypes="cccccccc" />
+      </g>
+      <g
+         id="g3111"
+         inkscape:label="#g3757"
+         transform="matrix(0,0.5190835,-0.71132942,0,892.00519,130.07282)"
+         style="stroke:#000000;stroke-width:3.85294461;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none">
+        <rect
+           y="354.48859"
+           x="188.89853"
+           height="192.86641"
+           width="119.198"
+           id="rect3113"
+           style="opacity:0;fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:3.85294461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      </g>
+    </g>
+    <path
+       style="fill:#e31700;fill-opacity:0.99608059000000004;stroke:#000000;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       d="m 450.80857,732.08502 0,11.57351 -11.57389,0 0,11.85554 11.57389,0 0,11.57336 11.85517,0 0,-11.57336 11.57275,0 0,-11.85554 -11.57275,0 0,-11.57351 -11.85517,0 z"
+       id="0health"
+       inkscape:connector-curvature="0"
+       inkscape:label="#rect5353" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.7;fill:url(#radialGradient8208);fill-opacity:1;stroke:none"
+       id="path4174"
+       sodipodi:cx="282.5"
+       sodipodi:cy="1026.8622"
+       sodipodi:rx="53"
+       sodipodi:ry="53"
+       d="m 335.5,1026.8622 c 0,29.2711 -23.72891,53 -53,53 -29.27109,0 -53,-23.7289 -53,-53 0,-29.27111 23.72891,-53.00002 53,-53.00002 29.27109,0 53,23.72891 53,53.00002 z"
+       transform="matrix(2.1732321,0,0,1.2297878,-377.99213,-499.20265)"
+       mask="none" />
+    <g
+       transform="matrix(0.57931372,0,0,0.57931372,135.53919,418.80375)"
+       id="g3930"
+       inkscape:label="#g3050"
+       style="stroke:#000000;stroke-opacity:1;stroke-width:4.31545105;stroke-miterlimit:4;stroke-dasharray:none">
+      <rect
+         style="fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:4.31545105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="rect3932"
+         width="29.531679"
+         height="29.531681"
+         x="426.64539"
+         y="558.90302" />
+    </g>
+    <path
+       mask="none"
+       transform="matrix(0.3957946,0,0,0.3957946,277.32176,344.71148)"
+       d="m 335.5,1026.8622 c 0,29.2711 -23.72891,53 -53,53 -29.27109,0 -53,-23.7289 -53,-53 0,-29.27111 23.72891,-53.00002 53,-53.00002 29.27109,0 53,23.72891 53,53.00002 z"
+       sodipodi:ry="53"
+       sodipodi:rx="53"
+       sodipodi:cy="1026.8622"
+       sodipodi:cx="282.5"
+       id="path3934"
+       style="opacity:0.69999999999999996;fill:url(#radialGradient3936);fill-opacity:1;stroke:none;stroke-opacity:1;stroke-width:6.31640755000000009;stroke-miterlimit:4;stroke-dasharray:none"
+       sodipodi:type="arc" />
+    <g
+       id="0shot"
+       inkscape:label="#g3944"
+       transform="translate(-156.42857,52.142857)">
+      <rect
+         y="491.87805"
+         x="534.28711"
+         height="5.0507631"
+         width="125.25893"
+         id="rect3942"
+         style="fill:#fafbc0;fill-opacity:1;stroke:none" />
+    </g>
+    <g
+       id="g3143">
+      <use
+         height="285.1698"
+         width="301.58823"
+         id="use3141"
+         transform="translate(-111.99124,0)"
+         xlink:href="#0tank"
+         inkscape:tiled-clone-of="#0tank"
+         y="0"
+         x="0" />
+      <path
+         sodipodi:nodetypes="ccccccc"
+         inkscape:connector-curvature="0"
+         inkscape:original-d="m 123.56727,371.43965 -0.21157,-12.82973 15.46133,0.17522 18.63668,5.40197 -25.91115,3.98315 6.47424,3.5821 z"
+         inkscape:path-effect="#path-effect3161"
+         id="path3159"
+         d="m 123.56727,371.43965 -0.21157,-12.82973 15.46133,0.17522 18.63668,5.40197 -25.91115,3.98315 6.47424,3.5821 -14.44953,-0.31271"
+         style="fill:#1a1a1a;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    </g>
+    <g
+       id="0tank_hit1"
+       inkscape:label="#g4046">
+      <g
+         id="g3954">
+        <use
+           x="0"
+           y="0"
+           xlink:href="#g3143"
+           id="use3952"
+           transform="translate(-115.66247,0)"
+           width="301.58823"
+           height="285.1698" />
+        <path
+           sodipodi:nodetypes="cccccccc"
+           inkscape:connector-curvature="0"
+           inkscape:original-d="m 105.65934,333.92467 -0.07,-18.78339 -7.151033,-1.09732 -8.84187,2.28503 -11.74606,-3.14455 12.1729,9.6096 7.4409,-1.08563 z"
+           inkscape:path-effect="#path-effect4008"
+           id="path3155-2"
+           d="m 105.65934,333.92467 -0.07,-18.78339 -7.151033,-1.09732 -8.84187,2.28503 -11.74606,-3.14455 12.1729,9.6096 7.4409,-1.08563 8.195163,12.21626"
+           style="fill:#1a1a1a;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      </g>
+    </g>
+    <g
+       id="0tank_hit2"
+       inkscape:label="#g4040">
+      <g
+         id="g3980">
+        <use
+           x="0"
+           y="0"
+           xlink:href="#g3954"
+           id="use3978"
+           transform="translate(-117.68277,0)"
+           width="301.58823"
+           height="285.1698" />
+        <path
+           sodipodi:nodetypes="cccccccc"
+           inkscape:connector-curvature="0"
+           inkscape:original-d="m -109.5358,309.93655 28.069103,-0.0193 -4.079722,6.01462 2.267012,7.12115 -7.569746,0.0496 -3.9846,-8.06576 -15.164357,1.57696 z"
+           inkscape:path-effect="#path-effect3157-7-3-7"
+           id="path3155-2-6"
+           d="m -109.5358,309.93655 28.069103,-0.0193 -4.079722,6.01462 2.267012,7.12115 -7.569746,0.0496 -3.9846,-8.06576 -15.164357,1.57696 0.46231,-6.67727"
+           style="fill:#1a1a1a;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+        <path
+           style="fill:#1a1a1a;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           d="m -75.544863,333.59201 23.971571,-6.69516 -25.449195,1.37285 -6.25692,-5.21668 -7.569746,0.0496 -9.609597,7.91638 10.371354,-2.61947 7.865647,4.13918 2.859536,8.00423 7.342089,8.82498 -3.624838,-10.19237 0.100099,-5.58354"
+           id="path4010"
+           inkscape:path-effect="#path-effect3157-7-3-7"
+           inkscape:original-d="m -75.544863,333.59201 23.971571,-6.69516 -25.449195,1.37285 -6.25692,-5.21668 -7.569746,0.0496 -9.609597,7.91638 10.371354,-2.61947 7.865647,4.13918 2.859536,8.00423 7.342089,8.82498 -3.624838,-10.19237 z"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="cccccccccccc" />
+      </g>
+    </g>
+    <g
+       id="0tank_hit3"
+       inkscape:label="#g4026">
+      <use
+         height="285.1698"
+         width="301.58823"
+         transform="translate(-114.28571,0)"
+         id="use4012"
+         xlink:href="#g3980"
+         y="0"
+         x="0" />
+      <path
+         style="fill:#1a1a1a;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         d="m -170.3103,371.43223 33.55687,-0.07 -6.60509,-4.62565 16.90787,-11.87233 -0.26472,-10.86217 -9.23079,-1.96924 2.24745,12.30675 -13.15738,4.98314 -8.57038,-0.2587 -14.88383,12.3682"
+         id="path3155-2-8"
+         inkscape:path-effect="#path-effect4008-3"
+         inkscape:original-d="m -170.3103,371.43223 33.55687,-0.07 -6.60509,-4.62565 16.90787,-11.87233 -0.26472,-10.86217 -9.23079,-1.96924 2.24745,12.30675 -13.15738,4.98314 -8.57038,-0.2587 z"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="cccccccccc" />
+      <path
+         sodipodi:nodetypes="cccccc"
+         inkscape:connector-curvature="0"
+         inkscape:original-d="m -153.44662,342.16809 6.7122,4.22507 -0.12167,12.39386 -37.11815,-0.22172 25.99668,-5.35755 z"
+         inkscape:path-effect="#path-effect4008-3"
+         id="path4038"
+         d="m -153.44662,342.16809 6.7122,4.22507 -0.12167,12.39386 -37.11815,-0.22172 25.99668,-5.35755 4.53094,-11.03966"
+         style="fill:#1a1a1a;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    </g>
+    <g
+       id="0joystick_cross"
+       transform="matrix(2.1914457,0,0,2.1914457,162.91109,-493.77327)"
+       inkscape:label="#g3947">
+      <rect
+         transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)"
+         y="342.57352"
+         x="-578.71277"
+         height="139.28572"
+         width="5.3571429"
+         id="rect3139"
+         style="fill:url(#radialGradient3951);fill-opacity:1;stroke:none" />
+      <rect
+         transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)"
+         style="fill:url(#radialGradient3953);fill-opacity:1;stroke:none"
+         id="rect3935"
+         width="5.3571429"
+         height="139.28572"
+         x="409.53781"
+         y="506.39136" />
+    </g>
+    <g
+       id="0wheel"
+       inkscape:label="#g4093"
+       transform="matrix(0.96203626,0,0,0.96203626,127.93699,-33.409999)">
+      <path
+         style="fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         d="m 177.03125,263.5625 0,59.75 c -6.93196,1.09069 -12.25,7.07412 -12.25,14.3125 0,1.74211 0.34324,3.39002 0.90625,4.9375 l -51.40625,29.65625 2.28125,3.9375 51.3125,-29.625 c 2.6552,3.3928 6.764,5.59375 11.40625,5.59375 4.64412,0 8.78242,-2.19861 11.4375,-5.59375 l 51.3125,29.625 2.25,-3.9375 -51.375,-29.65625 c 0.56301,-1.54748 0.90625,-3.19539 0.90625,-4.9375 0,-7.23838 -5.31804,-13.22181 -12.25,-14.3125 l 0,-59.75 -4.53125,0 z"
+         transform="translate(-287.44385,387.37671)"
+         id="path4082"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         d="m 179.28125,257.0625 c -1.75842,0 -3.32399,0.7151 -4.46875,1.875 -11.08931,0.62405 -21.56972,3.53578 -30.96875,8.28125 -1.56843,-0.42829 -3.29322,-0.2209 -4.8125,0.65625 -1.52842,0.88243 -2.52901,2.29118 -2.9375,3.875 -9.02227,5.93169 -16.78944,13.63227 -22.71875,22.65625 -1.5607,0.41819 -2.97204,1.42766 -3.84375,2.9375 -0.87692,1.51887 -1.05285,3.2444 -0.625,4.8125 -4.74547,9.39903 -7.6572,19.87944 -8.28125,30.96875 -1.16045,1.14483 -1.875,2.7411 -1.875,4.5 0,1.7589 0.71455,3.32392 1.875,4.46875 0.62324,11.09127 3.53482,21.57116 8.28125,30.96875 -0.42785,1.5681 -0.25192,3.29363 0.625,4.8125 0.87171,1.50984 2.28305,2.51931 3.84375,2.9375 5.92931,9.02011 13.69648,16.72843 22.71875,22.65625 0.40849,1.58382 1.40908,3.02382 2.9375,3.90625 1.53186,0.88442 3.26509,1.03563 4.84375,0.59375 9.38379,4.73025 19.83831,7.65457 30.90625,8.28125 1.14683,1.17737 2.72656,1.90625 4.5,1.90625 1.77439,0 3.38429,-0.72777 4.53125,-1.90625 11.07007,-0.62582 21.52376,-3.54997 30.90625,-8.28125 1.57777,0.44069 3.31299,0.29003 4.84375,-0.59375 1.52886,-0.88269 2.52925,-2.32188 2.9375,-3.90625 9.01245,-5.9239 16.73235,-13.6438 22.65625,-22.65625 1.58437,-0.40825 2.99231,-1.40864 3.875,-2.9375 0.88378,-1.53076 1.06569,-3.26598 0.625,-4.84375 4.73128,-9.38249 7.65543,-19.83618 8.28125,-30.90625 1.17848,-1.14696 1.90625,-2.72561 1.90625,-4.5 0,-1.77439 -0.72777,-3.38429 -1.90625,-4.53125 -0.62668,-11.06794 -3.551,-21.52246 -8.28125,-30.90625 0.44069,-1.57777 0.25878,-3.31299 -0.625,-4.84375 -0.88269,-1.52886 -2.29063,-2.52925 -3.875,-2.9375 -5.9239,-9.01632 -13.6438,-16.72848 -22.65625,-22.65625 -0.40825,-1.58437 -1.40864,-2.99231 -2.9375,-3.875 -1.51887,-0.87692 -3.2444,-1.0841 -4.8125,-0.65625 -9.39759,-4.74643 -19.87748,-7.65801 -30.96875,-8.28125 -1.14483,-1.16045 -2.7411,-1.875 -4.5,-1.875 z m -4,11.1875 c 1.09134,0.90065 2.47451,1.4375 4,1.4375 1.52549,0 2.93991,-0.53685 4.03125,-1.4375 9.73228,0.55443 18.93335,3.09694 27.1875,7.25 0.49191,1.33738 1.41945,2.51306 2.75,3.28125 1.32111,0.76274 2.79205,1.01557 4.1875,0.78125 7.90748,5.20385 14.69472,11.94178 19.90625,19.84375 -0.25127,1.41296 -0.0237,2.90987 0.75,4.25 0.76274,1.32111 1.95559,2.2552 3.28125,2.75 4.1551,8.25099 6.75393,17.42688 7.3125,27.15625 -0.91783,1.09628 -1.46875,2.52089 -1.46875,4.0625 0,1.54161 0.55092,2.93497 1.46875,4.03125 -0.55836,9.72583 -3.16007,18.90757 -7.3125,27.15625 -1.32566,0.4948 -2.51851,1.42889 -3.28125,2.75 -0.76851,1.3311 -0.99318,2.84533 -0.75,4.25 -5.19878,7.88263 -11.96112,14.64497 -19.84375,19.84375 -1.41296,-0.25127 -2.90987,0.008 -4.25,0.78125 -1.33055,0.76819 -2.25809,1.94387 -2.75,3.28125 -8.24541,4.14867 -17.4354,6.72317 -27.15625,7.28125 -1.09628,-0.91783 -2.52089,-1.46875 -4.0625,-1.46875 -1.54161,0 -2.93497,0.55092 -4.03125,1.46875 -9.72583,-0.55836 -18.90757,-3.16007 -27.15625,-7.3125 -0.4948,-1.32566 -1.42889,-2.48726 -2.75,-3.25 -1.33062,-0.76823 -2.84577,-1.024 -4.25,-0.78125 -7.88374,-5.19951 -14.64468,-11.9597 -19.84375,-19.84375 0.24295,-1.40443 -0.0129,-2.91916 -0.78125,-4.25 -0.76819,-1.33055 -1.94387,-2.25809 -3.28125,-2.75 -4.14867,-8.24541 -6.72317,-17.4354 -7.28125,-27.15625 0.91783,-1.09628 1.46875,-2.48964 1.46875,-4.03125 0,-1.54161 -0.55092,-2.96622 -1.46875,-4.0625 0.55857,-9.72937 3.1574,-18.90526 7.3125,-27.15625 1.32566,-0.4948 2.48726,-1.42889 3.25,-2.75 0.77347,-1.33969 1.03212,-2.83745 0.78125,-4.25 5.207,-7.89608 11.97581,-14.64108 19.875,-19.84375 1.39545,0.23432 2.89764,-0.0185 4.21875,-0.78125 1.32111,-0.76274 2.2552,-1.92434 2.75,-3.25 0.004,-0.009 -0.003,-0.0218 0,-0.0312 8.25415,-4.15306 17.45522,-6.69557 27.1875,-7.25 z"
+         transform="translate(-287.44385,387.37671)"
+         id="path3957"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       transform="translate(137.9043,111.33725)"
+       inkscape:label="#g4093"
+       id="g4112">
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         d="m 117.15625,337.375 c -43.515565,0 -78.8125,35.29694 -78.8125,78.8125 0,43.51556 35.296935,78.78125 78.8125,78.78125 43.51556,0 78.78125,-35.26569 78.78125,-78.78125 0,-43.51556 -35.26569,-78.8125 -78.78125,-78.8125 z m 0,9.3125 c 38.38721,0 69.5,31.11279 69.5,69.5 0,38.38721 -31.11279,69.5 -69.5,69.5 -38.387206,0 -69.5,-31.11279 -69.5,-69.5 0,-38.38721 31.112794,-69.5 69.5,-69.5 z"
+         transform="translate(-225.30099,308.80528)"
+         id="path4114" />
+      <path
+         sodipodi:type="arc"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         id="path4116"
+         sodipodi:cx="117.93531"
+         sodipodi:cy="342.20657"
+         sodipodi:rx="6.3134532"
+         sodipodi:ry="6.3134532"
+         d="m 124.24876,342.20657 c 0,3.48683 -2.82663,6.31346 -6.31345,6.31346 -3.48682,0 -6.31345,-2.82663 -6.31345,-6.31346 0,-3.48682 2.82663,-6.31345 6.31345,-6.31345 3.48682,0 6.31345,2.82663 6.31345,6.31345 z"
+         transform="translate(-226.08577,308.55274)" />
+      <path
+         transform="matrix(0.8660254,0.5,-0.5,0.8660254,-2.0680094,305.37678)"
+         d="m 124.24876,342.20657 c 0,3.48683 -2.82663,6.31346 -6.31345,6.31346 -3.48682,0 -6.31345,-2.82663 -6.31345,-6.31346 0,-3.48682 2.82663,-6.31345 6.31345,-6.31345 3.48682,0 6.31345,2.82663 6.31345,6.31345 z"
+         sodipodi:ry="6.3134532"
+         sodipodi:rx="6.3134532"
+         sodipodi:cy="342.20657"
+         sodipodi:cx="117.93531"
+         id="path4118"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         id="path4120"
+         sodipodi:cx="117.93531"
+         sodipodi:cy="342.20657"
+         sodipodi:rx="6.3134532"
+         sodipodi:ry="6.3134532"
+         d="m 124.24876,342.20657 c 0,3.48683 -2.82663,6.31346 -6.31345,6.31346 -3.48682,0 -6.31345,-2.82663 -6.31345,-6.31346 0,-3.48682 2.82663,-6.31345 6.31345,-6.31345 3.48682,0 6.31345,2.82663 6.31345,6.31345 z"
+         transform="matrix(0.5,0.8660254,-0.8660254,0.5,193.52504,414.63519)" />
+      <path
+         transform="matrix(0,1,-1,0,308.28439,607.05228)"
+         d="m 124.24876,342.20657 c 0,3.48683 -2.82663,6.31346 -6.31345,6.31346 -3.48682,0 -6.31345,-2.82663 -6.31345,-6.31346 0,-3.48682 2.82663,-6.31345 6.31345,-6.31345 3.48682,0 6.31345,2.82663 6.31345,6.31345 z"
+         sodipodi:ry="6.3134532"
+         sodipodi:rx="6.3134532"
+         sodipodi:cy="342.20657"
+         sodipodi:cx="117.93531"
+         id="path4122"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         id="path4124"
+         sodipodi:cx="117.93531"
+         sodipodi:cy="342.20657"
+         sodipodi:rx="6.3134532"
+         sodipodi:ry="6.3134532"
+         d="m 124.24876,342.20657 c 0,3.48683 -2.82663,6.31346 -6.31345,6.31346 -3.48682,0 -6.31345,-2.82663 -6.31345,-6.31346 0,-3.48682 2.82663,-6.31345 6.31345,-6.31345 3.48682,0 6.31345,2.82663 6.31345,6.31345 z"
+         transform="matrix(-0.5,0.8660254,-0.8660254,-0.5,311.46035,831.07001)" />
+      <path
+         transform="matrix(-0.8660254,0.5,-0.5,-0.8660254,202.20194,1026.6631)"
+         d="m 124.24876,342.20657 c 0,3.48683 -2.82663,6.31346 -6.31345,6.31346 -3.48682,0 -6.31345,-2.82663 -6.31345,-6.31346 0,-3.48682 2.82663,-6.31345 6.31345,-6.31345 3.48682,0 6.31345,2.82663 6.31345,6.31345 z"
+         sodipodi:ry="6.3134532"
+         sodipodi:rx="6.3134532"
+         sodipodi:cy="342.20657"
+         sodipodi:cx="117.93531"
+         id="path4126"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         id="path4128"
+         sodipodi:cx="117.93531"
+         sodipodi:cy="342.20657"
+         sodipodi:rx="6.3134532"
+         sodipodi:ry="6.3134532"
+         d="m 124.24876,342.20657 c 0,3.48683 -2.82663,6.31346 -6.31345,6.31346 -3.48682,0 -6.31345,-2.82663 -6.31345,-6.31346 0,-3.48682 2.82663,-6.31345 6.31345,-6.31345 3.48682,0 6.31345,2.82663 6.31345,6.31345 z"
+         transform="matrix(-1,0,0,-1,9.78485,1141.4225)" />
+      <path
+         transform="matrix(-0.8660254,-0.5,0.5,-0.8660254,-214.23291,1144.5985)"
+         d="m 124.24876,342.20657 c 0,3.48683 -2.82663,6.31346 -6.31345,6.31346 -3.48682,0 -6.31345,-2.82663 -6.31345,-6.31346 0,-3.48682 2.82663,-6.31345 6.31345,-6.31345 3.48682,0 6.31345,2.82663 6.31345,6.31345 z"
+         sodipodi:ry="6.3134532"
+         sodipodi:rx="6.3134532"
+         sodipodi:cy="342.20657"
+         sodipodi:cx="117.93531"
+         id="path4130"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         id="path4132"
+         sodipodi:cx="117.93531"
+         sodipodi:cy="342.20657"
+         sodipodi:rx="6.3134532"
+         sodipodi:ry="6.3134532"
+         d="m 124.24876,342.20657 c 0,3.48683 -2.82663,6.31346 -6.31345,6.31346 -3.48682,0 -6.31345,-2.82663 -6.31345,-6.31346 0,-3.48682 2.82663,-6.31345 6.31345,-6.31345 3.48682,0 6.31345,2.82663 6.31345,6.31345 z"
+         transform="matrix(-0.5,-0.8660254,0.8660254,-0.5,-409.82596,1035.3401)" />
+      <path
+         transform="matrix(0,-1,1,0,-524.58531,842.92297)"
+         d="m 124.24876,342.20657 c 0,3.48683 -2.82663,6.31346 -6.31345,6.31346 -3.48682,0 -6.31345,-2.82663 -6.31345,-6.31346 0,-3.48682 2.82663,-6.31345 6.31345,-6.31345 3.48682,0 6.31345,2.82663 6.31345,6.31345 z"
+         sodipodi:ry="6.3134532"
+         sodipodi:rx="6.3134532"
+         sodipodi:cy="342.20657"
+         sodipodi:cx="117.93531"
+         id="path4134"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         id="path4136"
+         sodipodi:cx="117.93531"
+         sodipodi:cy="342.20657"
+         sodipodi:rx="6.3134532"
+         sodipodi:ry="6.3134532"
+         d="m 124.24876,342.20657 c 0,3.48683 -2.82663,6.31346 -6.31345,6.31346 -3.48682,0 -6.31345,-2.82663 -6.31345,-6.31346 0,-3.48682 2.82663,-6.31345 6.31345,-6.31345 3.48682,0 6.31345,2.82663 6.31345,6.31345 z"
+         transform="matrix(0.5,-0.8660254,0.8660254,0.5,-527.76127,618.90521)" />
+      <path
+         transform="matrix(0.8660254,-0.5,0.5,0.8660254,-418.50286,423.31215)"
+         d="m 124.24876,342.20657 c 0,3.48683 -2.82663,6.31346 -6.31345,6.31346 -3.48682,0 -6.31345,-2.82663 -6.31345,-6.31346 0,-3.48682 2.82663,-6.31345 6.31345,-6.31345 3.48682,0 6.31345,2.82663 6.31345,6.31345 z"
+         sodipodi:ry="6.3134532"
+         sodipodi:rx="6.3134532"
+         sodipodi:cy="342.20657"
+         sodipodi:cx="117.93531"
+         id="path4138"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         id="path4140"
+         sodipodi:cx="135.86552"
+         sodipodi:cy="480.09238"
+         sodipodi:rx="42.426407"
+         sodipodi:ry="42.426407"
+         d="m 178.29193,480.09238 c 0,23.43145 -18.99495,42.4264 -42.42641,42.4264 -23.43145,0 -42.426403,-18.99495 -42.426403,-42.4264 0,-23.43146 18.994953,-42.42641 42.426403,-42.42641 23.43146,0 42.42641,18.99495 42.42641,42.42641 z"
+         transform="matrix(0.34191407,0,0,0.34191407,-154.60478,560.83724)" />
+      <rect
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         id="rect4142"
+         width="4.5456862"
+         height="68.185295"
+         x="-110.42329"
+         y="650.93787"
+         inkscape:transform-center-y="-39.469916" />
+      <rect
+         inkscape:transform-center-y="19.824264"
+         y="-342.41962"
+         x="679.39282"
+         height="68.185295"
+         width="4.5456862"
+         id="rect4144"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         transform="matrix(-0.5,0.8660254,-0.8660254,-0.5,0,0)"
+         inkscape:transform-center-x="-34.336597" />
+      <rect
+         inkscape:transform-center-x="34.336634"
+         transform="matrix(-0.5,-0.8660254,0.8660254,-0.5,0,0)"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none"
+         id="rect4146"
+         width="4.5456862"
+         height="68.185295"
+         x="-575.78802"
+         y="-529.7417"
+         inkscape:transform-center-y="19.824239" />
+    </g>
+    <g
+       id="0handle_track"
+       inkscape:label="#g4199"
+       transform="matrix(1.3940936,0,0,1.3940936,273.10435,-252.93676)">
+      <rect
+         y="276.88766"
+         x="641.2583"
+         height="23.507523"
+         width="163.98499"
+         id="rect2985-0"
+         style="fill:#4d4d4d;fill-opacity:1;stroke:#000000;stroke-width:1.57774007;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         transform="matrix(0,1,-1,0,0,0)"
+         rx="5" />
+      <rect
+         style="fill:#4d4d4d;fill-opacity:1;stroke:#000000;stroke-width:1.12868094;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="rect3755-7"
+         width="21.019911"
+         height="38.577435"
+         x="-733.76074"
+         y="269.35272"
+         transform="matrix(0,-1,-1,0,0,0)"
+         rx="5"
+         ry="5" />
+      <path
+         id="path4175"
+         d="m -288.93817,647.43824 c -1.29447,0.0918 -2.52115,0.79171 -3.21875,2 -0.8745,1.51468 -0.62733,3.36006 0.4375,4.625 l 0,65.78125 c -1.56334,1.41366 -1.97149,3.78833 -0.875,5.6875 0.24053,0.41662 0.5379,0.75427 0.875,1.0625 l 0,66.3125 c -0.15283,0.18103 -0.31489,0.38137 -0.4375,0.59375 -1.11619,1.93328 -0.43328,4.41507 1.5,5.53125 0,0 4.38383,0.43328 5.5,-1.5 0.87855,-1.52168 0.67137,-3.35962 -0.40625,-4.625 l 0,-66.28125 c 1.56259,-1.41375 1.97127,-3.75745 0.875,-5.65625 -0.23857,-0.41322 -0.54133,-0.75587 -0.875,-1.0625 l 0,-65.84375 c 0.15283,-0.18103 0.28364,-0.38136 0.40625,-0.59375 0.41857,-0.72498 0.61738,-1.50465 0.5625,-2.28125 -0.0915,-1.29435 -0.82295,-2.52113 -2.03125,-3.21875 -0.72499,-0.41857 -1.53583,-0.58632 -2.3125,-0.53125 z"
+         style="fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       id="0handle"
+       inkscape:label="#g4196"
+       transform="matrix(1.3940936,0,0,1.3940936,122.74666,-196.11401)">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4118-1"
+         d="m -211.33952,565.98832 c -2.02168,0.14287 -3.94161,1.26895 -5.03125,3.15625 -1.74341,3.01968 -0.70717,6.88159 2.3125,8.625 2.36583,1.36591 5.24299,1.00694 7.21875,-0.65625 l 54.78125,0 c 0.28276,0.23871 0.57453,0.46473 0.90625,0.65625 3.01968,1.74341 6.88159,0.70718 8.625,-2.3125 1.74341,-3.01968 0.70718,-6.88159 -2.3125,-8.625 -2.37677,-1.37223 -5.27356,-1.02693 -7.25,0.65625 l -54.75,0 c -0.28275,-0.23871 -0.57452,-0.46473 -0.90625,-0.65625 -1.13237,-0.65378 -2.38074,-0.92947 -3.59375,-0.84375 z"
+         style="fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    </g>
+    <g
+       id="0track"
+       inkscape:label="#g3965"
+       transform="translate(-478.30723,124.24876)">
+      <rect
+         style="opacity:0.2;fill:#000000;fill-opacity:1;stroke:none"
+         id="rect3945"
+         width="20.714298"
+         height="5.3571515"
+         x="406.29874"
+         y="-533.98468"
+         rx="1"
+         ry="1"
+         transform="matrix(0,1,-1,0,0,0)" />
+      <rect
+         transform="matrix(0,1,-1,0,0,0)"
+         ry="1"
+         rx="1"
+         y="-541.60376"
+         x="406.29874"
+         height="5.3571515"
+         width="20.714298"
+         id="rect3947"
+         style="opacity:0.4;fill:#000000;fill-opacity:1;stroke:none" />
+      <rect
+         style="opacity:0.5;fill:#000000;fill-opacity:1;stroke:none"
+         id="rect3949"
+         width="20.714298"
+         height="5.3571515"
+         x="406.29874"
+         y="-549.22278"
+         rx="1"
+         ry="1"
+         transform="matrix(0,1,-1,0,0,0)" />
+      <rect
+         transform="matrix(0,1,-1,0,0,0)"
+         ry="1"
+         rx="1"
+         y="-556.84186"
+         x="406.29874"
+         height="5.3571515"
+         width="20.714298"
+         id="rect3951"
+         style="opacity:0.4;fill:#000000;fill-opacity:1;stroke:none" />
+      <rect
+         transform="matrix(0,1,-1,0,0,0)"
+         ry="1"
+         rx="1"
+         y="-533.98468"
+         x="367.01303"
+         height="5.3571515"
+         width="20.714298"
+         id="rect3953"
+         style="opacity:0.2;fill:#000000;fill-opacity:1;stroke:none" />
+      <rect
+         style="opacity:0.4;fill:#000000;fill-opacity:1;stroke:none"
+         id="rect3955"
+         width="20.714298"
+         height="5.3571515"
+         x="367.01303"
+         y="-541.60376"
+         rx="1"
+         ry="1"
+         transform="matrix(0,1,-1,0,0,0)" />
+      <rect
+         transform="matrix(0,1,-1,0,0,0)"
+         ry="1"
+         rx="1"
+         y="-549.22278"
+         x="367.01303"
+         height="5.3571515"
+         width="20.714298"
+         id="rect3957"
+         style="opacity:0.5;fill:#000000;fill-opacity:1;stroke:none" />
+      <rect
+         style="opacity:0.4;fill:#000000;fill-opacity:1;stroke:none"
+         id="rect3959"
+         width="20.714298"
+         height="5.3571515"
+         x="367.01303"
+         y="-556.84186"
+         rx="1"
+         ry="1"
+         transform="matrix(0,1,-1,0,0,0)" />
+      <rect
+         style="opacity:0.2;fill:#000000;fill-opacity:1;stroke:none"
+         id="rect3961"
+         width="20.714298"
+         height="5.3571515"
+         x="406.29874"
+         y="-564.67053"
+         rx="1"
+         ry="1"
+         transform="matrix(0,1,-1,0,0,0)" />
+      <rect
+         transform="matrix(0,1,-1,0,0,0)"
+         ry="1"
+         rx="1"
+         y="-564.67053"
+         x="367.01303"
+         height="5.3571515"
+         width="20.714298"
+         id="rect3963"
+         style="opacity:0.2;fill:#000000;fill-opacity:1;stroke:none" />
+    </g>
+    <g
+       id="0joystick_zone"
+       transform="matrix(1,0,0,0.1183206,-494.15234,979.71617)"
+       inkscape:label="#g4032"
+       style="fill:url(#linearGradient3207);fill-opacity:1">
+      <rect
+         y="323.72241"
+         x="546.45557"
+         height="529.31995"
+         width="191.92899"
+         id="rect3222"
+         style="opacity:0.4;fill:url(#linearGradient3210);fill-opacity:1;stroke:none" />
+    </g>
+    <g
+       id="0joystick_back"
+       inkscape:label="#g4057"
+       transform="matrix(0.56929864,0,0,0.56929864,-190.74607,665.0211)">
+      <path
+         inkscape:label="#path4037"
+         transform="translate(1811.8419,83.090999)"
+         d="m -548.57141,422.85056 c 0,121.50264 -98.49736,220 -220,220 -121.50265,0 -220,-98.49736 -220,-220 0,-121.50265 98.49735,-220 220,-220 121.50264,0 220,98.49735 220,220 z"
+         sodipodi:ry="220"
+         sodipodi:rx="220"
+         sodipodi:cy="422.85056"
+         sodipodi:cx="-768.57141"
+         id="asdf"
+         style="opacity:0.4;fill:url(#radialGradient4047);fill-opacity:1;stroke:none"
+         sodipodi:type="arc" />
+    </g>
+    <g
+       id="0joystick_handle"
+       inkscape:label="#g4060"
+       transform="matrix(0.56929864,0,0,0.56929864,-406.08249,313.94848)">
+      <path
+         inkscape:label="#path4053"
+         sodipodi:type="arc"
+         style="opacity:0.4;fill:url(#radialGradient4055);fill-opacity:1;stroke:none"
+         id="asdf123"
+         sodipodi:cx="-768.57141"
+         sodipodi:cy="422.85056"
+         sodipodi:rx="220"
+         sodipodi:ry="220"
+         d="m -548.57141,422.85056 c 0,121.50264 -98.49736,220 -220,220 -121.50265,0 -220,-98.49736 -220,-220 0,-121.50265 98.49735,-220 220,-220 121.50264,0 220,98.49735 220,220 z"
+         transform="matrix(0.46737411,0,0,0.46737411,1404.5012,827.53056)" />
+    </g>
+  </g>
+</svg>
diff --git a/contrib/tinks/art/icon.svg b/contrib/tinks/art/icon.svg
new file mode 100644 (file)
index 0000000..20a590d
--- /dev/null
@@ -0,0 +1,391 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="256"
+   height="260"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   sodipodi:docname="icon.svg">
+  <defs
+     id="defs4">
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect4008"
+       effect="spiro" />
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect4006"
+       is_visible="true" />
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect4004"
+       effect="spiro" />
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect3161"
+       effect="spiro" />
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect3157"
+       is_visible="true" />
+    <linearGradient
+       id="linearGradient3771">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop3773" />
+      <stop
+         id="stop3795"
+         offset="0.46052632"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0"
+         offset="1"
+         id="stop3775" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3829"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,0.33243869,-1.4983791,0,690.78032,359.10278)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3831"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.35546222,0.09524581,-0.38780905,-1.4473231,590.56362,644.53452)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3833"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.23937237,-0.24458338,0.97464411,-0.99586156,344.03542,654.43573)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3835"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.14945417,-0.27574285,1.3692459,0.49897051,192.06465,416.1818)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3837"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.30945331,-0.10648859,0.38089919,1.4342744,310.38892,228.91286)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3839"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.25321654,0.18876246,-0.76597563,1.034515,512.69634,219.42448)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3841"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.09974529,-0.26010206,1.1547951,-0.37245631,285.61183,551.09526)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3843"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.19843343,0.19551567,-0.80354002,-0.90917483,623.69734,531.37012)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3845"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.09219417,0.25996074,-1.0629657,0.374089,596.78104,309.88047)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771"
+       id="radialGradient3847"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.25446796,0.0279428,-0.13072229,0.92539534,408.33237,277.18662)"
+       cx="232.84016"
+       cy="159.23706"
+       fx="232.84016"
+       fy="159.23706"
+       r="33.324886" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4946"
+       id="radialGradient4952"
+       cx="286.16666"
+       cy="1026.8622"
+       fx="286.16666"
+       fy="1026.8622"
+       r="53"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient4946">
+      <stop
+         style="stop-color:#e4e4ff;stop-opacity:0;"
+         offset="0"
+         id="stop4948" />
+      <stop
+         id="stop4956"
+         offset="0.47959185"
+         style="stop-color:#eeefff;stop-opacity:0.36078432;" />
+      <stop
+         id="stop4954"
+         offset="0.883753"
+         style="stop-color:#ebecff;stop-opacity:0.68421054;" />
+      <stop
+         style="stop-color:#f2f3ff;stop-opacity:0.36078432;"
+         offset="0.95870173"
+         id="stop4958" />
+      <stop
+         style="stop-color:#ebeeff;stop-opacity:0;"
+         offset="1"
+         id="stop4950" />
+    </linearGradient>
+    <radialGradient
+       r="53"
+       fy="1026.8622"
+       fx="286.16666"
+       cy="1026.8622"
+       cx="286.16666"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient8208"
+       xlink:href="#linearGradient4946"
+       inkscape:collect="always" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4946"
+       id="radialGradient3936"
+       gradientUnits="userSpaceOnUse"
+       cx="286.16666"
+       cy="1026.8622"
+       fx="286.16666"
+       fy="1026.8622"
+       r="53" />
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect3157-7"
+       is_visible="true" />
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect3157-7-3"
+       is_visible="true" />
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect3157-7-3-7"
+       is_visible="true" />
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect4008-3"
+       effect="spiro" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.979899"
+     inkscape:cx="107.98668"
+     inkscape:cy="65.759563"
+     inkscape:document-units="px"
+     inkscape:current-layer="0splash"
+     showgrid="false"
+     inkscape:window-width="2558"
+     inkscape:window-height="1379"
+     inkscape:window-x="2560"
+     inkscape:window-y="27"
+     inkscape:window-maximized="1"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     showguides="true"
+     inkscape:guide-bbox="true" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-199.28051,-418.7416)">
+    <g
+       id="0splash"
+       inkscape:label="#g3762"
+       transform="matrix(1.4858489,0,0,1.4858489,-166.61365,-424.47172)">
+      <g
+         id="use2990"
+         inkscape:label="#g3757"
+         transform="matrix(0.53315693,0.53315693,-0.52077923,0.52077923,434.16308,287.36041)"
+         style="stroke:#000000;stroke-width:3.85294461;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:tile-x0="33.364892"
+         inkscape:tile-y0="3.1002866">
+        <rect
+           y="354.48859"
+           x="188.89853"
+           height="192.86641"
+           width="119.198"
+           id="rect3141"
+           style="fill:#4a4a4a;fill-opacity:1;stroke:#000000;stroke-width:3.85294461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+        <rect
+           style="fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:3.85294461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           id="rect3143"
+           width="68.859299"
+           height="152.28334"
+           x="214.06789"
+           y="395.07166" />
+      </g>
+      <g
+         id="g3253"
+         transform="matrix(0.9571749,0,0,0.9571749,14.241487,126.08446)">
+        <path
+           style="font-size:52.50814056px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:-1px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Armalite Rifle;-inkscape-font-specification:Armalite Rifle"
+           d="m 258.625,595.8125 c -4.89966,1.4313 -12.56953,-1.70866 -15.1875,4.5625 -0.4775,5.90634 -3.5509,14.50575 2.71875,18.6875 2.28891,1.18746 5.12,1.54986 7.5625,0.59375 0.52227,3.72431 1.0541,7.99473 -2.03125,10.59375 -3.51238,6.69348 3.86364,14.87896 10.90625,12.96875 6.54546,1.2404 16.20527,-0.87285 16.34375,-9 1.15076,-4.65522 -4.58661,-6.69297 -3.46875,-11.1875 -0.95739,-2.94159 3.31489,-1.69978 4.46875,-3.78125 5.83868,-2.11249 5.55685,-9.07334 5.53125,-14.34375 1.81324,-6.47371 -5.8435,-9.85183 -11.15625,-8.5625 -4.34595,0.15294 -9.06169,-1.83389 -13.21875,-0.125 0.0516,-2.21144 -1.36209,-0.68823 -2.46875,-0.40625 z"
+           id="path3211"
+           inkscape:connector-curvature="0" />
+        <path
+           style="font-size:52.50814056px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:-1px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Armalite Rifle;-inkscape-font-specification:Armalite Rifle"
+           d="m 286.25,592.6875 c -2.39783,0.63195 -3.74457,2.90332 -6.59375,2.8125 -5.4632,2.29227 -6.35616,10.35289 -2.0625,14.25 -0.60542,4.15669 0.70607,8.39731 0.4375,12.3125 -0.0599,3.57375 -1.98208,6.31549 -3.3125,9.34375 -1.62554,5.38708 2.55698,12.80186 8.96875,10.96875 6.47834,0.22337 16.30714,2.49861 19.125,-5.53125 1.23942,-3.73894 -0.38135,-7.90712 -3.59375,-10.09375 0.3082,-5.37065 -0.71586,-11.3191 0.59375,-16.375 6.74005,-4.69817 1.76294,-18.17585 -6.625,-15.0625 -2.79844,0.69065 -4.06188,-3.31293 -6.9375,-2.625 z"
+           id="path3213"
+           inkscape:connector-curvature="0" />
+        <path
+           style="font-size:52.50814056px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:-1px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Armalite Rifle;-inkscape-font-specification:Armalite Rifle"
+           d="m 335.09375,595.625 c -6.11741,1.41046 -13.70548,-2.83773 -18.875,1.96875 -4.92676,-3.38655 -11.24855,-1.39485 -16.78125,-1.5 -6.41074,0.63929 -9.2314,9.80913 -3.875,13.375 -2.66087,6.08774 0.25237,13.48804 -1.21875,19.59375 -5.38108,5.18981 -0.0423,15.96693 7.46875,13.96875 4.45643,-0.22766 9.52169,0.6793 13.5,-0.25 1.52536,-2.4215 4.389,1.28979 6.875,0.4375 8.78077,1.24633 15.93879,-9.45985 11.28125,-17.03125 -1.13454,-1.93742 2.34919,-3.81652 1.59375,-6.40625 -0.24351,-4.08247 -1.98061,-8.55312 1.5625,-11.59375 2.06416,-4.14959 0.75484,-8.94395 1.0625,-13.375 -0.86458,0.27083 -1.72917,0.54167 -2.59375,0.8125 z"
+           id="path3215"
+           inkscape:connector-curvature="0" />
+        <path
+           style="font-size:52.50814056px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:-1px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Armalite Rifle;-inkscape-font-specification:Armalite Rifle"
+           d="m 362.71875,595.53125 c -4.88629,0.1191 -10.06204,0.70685 -14.78125,0.75 -5.47787,-0.76679 -11.36437,-0.40783 -16.78125,-0.15625 -5.17104,2.08849 -5.75771,9.90066 -1.65625,13.3125 -0.73815,5.29915 0.55713,11.35287 -0.28125,16.21875 -1.57391,2.43976 0.0174,5.43494 -1.9375,7.65625 -1.21338,8.01052 8.60308,12.27891 15.15625,10.1875 4.10866,1.15111 8.03361,-0.96492 11.90625,0.75 4.70244,-0.0919 9.41322,-0.76127 13.9375,-1.21875 6.34357,-2.47232 7.27867,-12.62071 1.1875,-15.90625 -2.84504,-3.85906 -6.71699,-8.25024 -7.5,-12.8125 2.57537,-4.33547 10.38664,-3.74912 10.125,-10.0625 0.19504,-4.87459 -4.47645,-9.43549 -9.375,-8.71875 z"
+           id="path3217"
+           inkscape:connector-curvature="0" />
+        <path
+           style="font-size:52.50814056px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:-1px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Armalite Rifle;-inkscape-font-specification:Armalite Rifle"
+           d="m 387.9375,595.15625 c -4.67722,2.02978 -9.78906,-1.62403 -14.46875,1.25 -9.65979,4.02935 -13.06716,17.5954 -7.09375,25.71875 -5.60204,3.65765 -3.86108,11.71823 -2.5625,17.15625 1.89135,4.23664 7.4795,4.74734 11.125,3.125 3.94271,1.07416 7.9082,-0.0824 11.78125,1.1875 12.90654,0.16282 22.05847,-17.35307 13.34375,-27.46875 4.21701,-4.46396 3.58479,-12.34862 1.53125,-17.90625 -3.12179,-4.23683 -8.89538,-1.69513 -13.1875,-3.09375 l -0.46875,0.0312 z"
+           id="path3219"
+           inkscape:connector-curvature="0" />
+        <path
+           style="font-size:52.50814056px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:-1px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Armalite Rifle;-inkscape-font-specification:Armalite Rifle"
+           d="m 413.09375,593.625 c -5.989,0.79809 -12.31873,3.77439 -13.59375,10.28125 -2.37552,6.92367 2.58427,13.98287 3.0625,20.28125 -6.66505,6.69348 -1.32209,20.82556 8.75,19.25 7.10297,0.39661 12.84047,-7.75209 9.8125,-14.21875 0.3156,-2.89071 -3.70654,-4.76237 -1.46875,-7.53125 2.44848,-7.39695 6.24638,-18.36454 -1.53125,-23.75 -0.23875,-2.6484 -2.19852,-4.85675 -5.03125,-4.3125 z"
+           id="path3221"
+           inkscape:connector-curvature="0" />
+      </g>
+      <g
+         style="stroke:#000000;stroke-width:3.85294461;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         transform="matrix(0.53191035,-0.53191037,0.53191037,0.53191035,-153.38921,657.46125)"
+         inkscape:label="#g3769"
+         id="use2992">
+        <rect
+           style="fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:3.85294461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           id="rect3153"
+           width="8.5714283"
+           height="102.14286"
+           x="456.42859"
+           y="320.93359" />
+        <path
+           sodipodi:type="arc"
+           style="fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:2.740417;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           id="path3155"
+           sodipodi:cx="427.14285"
+           sodipodi:cy="438.79074"
+           sodipodi:rx="29.285715"
+           sodipodi:ry="29.285715"
+           d="m 456.42857,438.79074 c 0,16.17405 -13.11166,29.28572 -29.28572,29.28572 -16.17405,0 -29.28571,-13.11167 -29.28571,-29.28572 0,-16.17405 13.11166,-29.28571 29.28571,-29.28571 16.17406,0 29.28572,13.11166 29.28572,29.28571 z"
+           transform="matrix(1.4059702,0,0,1.4059702,-139.83581,-163.85023)" />
+        <rect
+           style="fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:3.85294461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           id="rect3157"
+           width="15"
+           height="23.571428"
+           x="453.21432"
+           y="309.50504" />
+        <path
+           transform="matrix(1.5854423,0,0,5.0615034,-216.49604,-1767.8643)"
+           d="m 456.42857,438.79074 c 0,16.17405 -13.11166,29.28572 -29.28572,29.28572 -16.17405,0 -29.28571,-13.11167 -29.28571,-29.28572 0,-16.17405 13.11166,-29.28571 29.28571,-29.28571 16.17406,0 29.28572,13.11166 29.28572,29.28571 z"
+           sodipodi:ry="29.285715"
+           sodipodi:rx="29.285715"
+           sodipodi:cy="438.79074"
+           sodipodi:cx="427.14285"
+           id="path3160"
+           style="opacity:0;fill:#383838;fill-opacity:1;stroke:#000000;stroke-width:1.44432509;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           sodipodi:type="arc" />
+      </g>
+      <text
+         sodipodi:linespacing="125%"
+         id="text2994"
+         y="735.54163"
+         x="251.05626"
+         style="font-size:50.25947571px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#e6e6e6;fill-opacity:1;stroke:none;font-family:Sans"
+         xml:space="preserve"><tspan
+           style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:-0.9571749px;fill:#e6e6e6;fill-opacity:1;font-family:Armalite Rifle;-inkscape-font-specification:Armalite Rifle"
+           y="735.54163"
+           x="251.05626"
+           id="tspan2996"
+           sodipodi:role="line">TINKS!</tspan></text>
+    </g>
+  </g>
+</svg>
diff --git a/contrib/tinks/assets/images/.gitignore b/contrib/tinks/assets/images/.gitignore
new file mode 100644 (file)
index 0000000..72e8ffc
--- /dev/null
@@ -0,0 +1 @@
+*
diff --git a/contrib/tinks/assets/sounds/turret_fire.wav b/contrib/tinks/assets/sounds/turret_fire.wav
new file mode 100644 (file)
index 0000000..dc0b717
Binary files /dev/null and b/contrib/tinks/assets/sounds/turret_fire.wav differ
diff --git a/contrib/tinks/assets/sounds/turret_ready.mp3 b/contrib/tinks/assets/sounds/turret_ready.mp3
new file mode 100644 (file)
index 0000000..ff21920
Binary files /dev/null and b/contrib/tinks/assets/sounds/turret_ready.mp3 differ
diff --git a/contrib/tinks/bin/.gitignore b/contrib/tinks/bin/.gitignore
new file mode 100644 (file)
index 0000000..72e8ffc
--- /dev/null
@@ -0,0 +1 @@
+*
diff --git a/contrib/tinks/res/.gitignore b/contrib/tinks/res/.gitignore
new file mode 100644 (file)
index 0000000..72e8ffc
--- /dev/null
@@ -0,0 +1 @@
+*
diff --git a/contrib/tinks/src/client/android_client.nit b/contrib/tinks/src/client/android_client.nit
new file mode 100644 (file)
index 0000000..c90e3a4
--- /dev/null
@@ -0,0 +1,183 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Android client with a joystick
+module android_client is
+       app_name "Tinks!"
+       app_namespace "net.xymus.tinks"
+       android_manifest """<uses-permission android:name="android.permission.INTERNET" />"""
+       android_api_target 10
+end
+
+import mnit_android
+import android::audio
+import android::vibration
+import android::landscape
+
+intrude import client
+import controls
+
+redef class App
+
+       # Tank direction control
+       var joystick = new Joystick is lazy
+
+       redef var controls = new Array[Control].with_items(joystick) is lazy
+
+       redef fun input(event)
+       do
+               var local_player = context.local_player
+               var local_tank = local_tank
+               if local_player != null and local_tank != null and event isa ControlEvent then
+                       local_player.orders.add new TankDirectionOrder(local_tank, joystick.value_x, joystick.value_y)
+                       return true
+               end
+
+               if event isa AndroidKeyEvent then
+                       if event.is_back_key then
+                               quit = true
+                               native_activity.finish
+                               return false
+                       end
+               end
+
+               return super
+       end
+end
+
+redef class ExplosionEvent
+       redef fun client_react(display, turn)
+       do
+               super
+
+               var local_tank = app.local_tank
+               var d = 20
+               if local_tank != null then
+                       d = local_tank.pos.dist(pos).to_i
+                       d = 100 - d*5
+                       d = d.max(10)
+               end
+
+               app.vibrator.vibrate d
+       end
+end
+
+# On-demand joystick that popups up when tapping the left border of the screen
+class Joystick
+       super Control
+
+       # Current position of the joystick from its center on the X axis, in `[-1.0..1.0]`
+       var value_x = 0.0
+
+       # Current position of the joystick from its center on the Y axis, in `[-1.0..1.0]`
+       var value_y = 0.0
+
+       # Deadzone at the center of the joystick where the values are set at 0.0
+       var deadzone = 0.3
+
+       # Position of the center of the joystick, set at where the screen is first tapped
+       var center: nullable ScreenPos
+
+       # Position of the top of the joystick, the one that follows the finger
+       var handle: nullable ScreenPos
+
+       # Id of the pointer/finger that triggered the joystick
+       var captured_pointer: Int = -1
+
+       # Image of the left border
+       var img_zone: Image = app.assets.drawing.joystick_zone
+
+       # Image of the joystick base
+       var img_back: Image = app.assets.drawing.joystick_back
+
+       # Image of the top of the joystick
+       var img_handle: Image = app.assets.drawing.joystick_handle
+
+       # Radius where the top of the joystick can move around the center
+       var radius: Float = img_back.width.to_f / 2.0 - 4.0
+
+       # Width of the left border used to trigger the joystick
+       var capture_width = 400.0
+
+       redef fun draw(display)
+       do
+               display.blit_stretched(img_zone,
+                       0, -128,
+                       0, display.height+128,
+                       capture_width, display.height+128,
+                       capture_width, -128)
+
+               var center = center
+               var handle = handle
+               if center != null and handle != null then
+                       img_back.scale = 1.0
+                       img_handle.scale = 1.0
+                       display.blit_centered(img_back, center.x, center.y)
+                       display.blit_centered(img_handle, handle.x, handle.y)
+               end
+       end
+
+       redef fun input(event)
+       do
+               if event isa AndroidPointerEvent then
+                       var center = center
+                       if center == null then
+                               # New joystick?
+                               print "New joystick? {event.just_went_down} {event.x} < {capture_width}"
+                               if event.just_went_down and
+                                  event.x < capture_width then
+                                       # Capture it!
+                                       self.center = new ScreenPos(event.x, event.y)
+                                       self.captured_pointer = event.pointer_id
+                                       self.handle = center
+                                       return true
+                               end
+                       else
+                               # Already down
+
+                               # Is it the finger already on the joystick?
+                               if captured_pointer != event.pointer_id then return false
+
+                               if event.depressed then
+                                       self.center = null
+                                       self.handle = null
+                                       self.value_x = 0.0
+                                       self.value_y = 0.0
+                               else
+                                       # Update values
+                                       var dx = center.x - event.x
+                                       var dy = center.y - event.y # This is inverted, as is the input
+                                       var d = dx.hypot_with(dy)
+                                       if d < deadzone then
+                                               self.value_x = 0.0
+                                               self.value_y = 0.0
+                                               self.handle = center
+                                       else
+                                               var a = atan2(dx, dy)+pi/2.0
+                                               self.value_x = a.cos
+                                               self.value_y = a.sin
+
+                                               if d > radius then d = radius
+                                               self.handle = new ScreenPos(center.x+a.cos*d, center.y-a.sin*d)
+                                       end
+                               end
+
+                               app.input new ControlEvent(self)
+                               return true
+                       end
+               end
+
+               return false
+       end
+end
diff --git a/contrib/tinks/src/client/assets.nit b/contrib/tinks/src/client/assets.nit
new file mode 100644 (file)
index 0000000..1b4b25d
--- /dev/null
@@ -0,0 +1,81 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Client `Assets` and client-only services on game elements
+module assets is no_warning("attr-in-refinement")
+
+import app::audio
+
+import game
+
+import drawing
+
+redef class App
+       redef fun load_image(path)
+       do
+               var img = super
+               img.scale = 0.5
+               return img
+       end
+end
+
+redef class FeatureRule
+       # Images of different alternatives
+       var images: Array[Image]
+end
+
+redef class TankRule
+       # Image of the base tank structure, at different health level
+       var base_images: Array[Image]
+
+       # Image of the turret
+       var turret_image: Image
+end
+
+redef class Feature
+       # Rotation angle of this feature
+       var angle: Float = pi.rand
+
+       # Index within `rule.images` of the image of this instance
+       var image_index: Int = rule.images.length.rand is lazy
+end
+
+# Collection of assets
+class Assets
+
+       # Images from the `art/drawing.svg` file
+       var drawing = new DrawingImages
+       init do drawing.load_all(app)
+
+       # Firing sound
+       var turret_fire = new Sound("sounds/turret_fire.wav")
+
+       # Turret is ready to fire sound
+       var turret_ready = new Sound("sounds/turret_ready.mp3")
+
+       # Associate images to the `story` rules
+       fun assign_images_to_story(story: Story)
+       do
+               story.tree.images = drawing.trees
+               story.rock.images = drawing.rock
+               story.debris.images = drawing.debris
+
+               for tank in story.tanks do
+                       tank.base_images = drawing.tank_hit
+                       tank.turret_image = drawing.turret
+               end
+
+               story.health.images = [drawing.health]
+       end
+end
diff --git a/contrib/tinks/src/client/client.nit b/contrib/tinks/src/client/client.nit
new file mode 100644 (file)
index 0000000..32a9852
--- /dev/null
@@ -0,0 +1,433 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Portable client
+module client
+
+import mnit
+import mnit::opengles1
+import performance_analysis
+
+import game
+import common
+
+import assets
+import context
+
+# A position within the screen
+class ScreenPos
+       super Point[Float]
+
+       # Convert to a game logic `Pos` by applying camera transformation
+       fun to_logic(camera: Camera): Pos do
+               return new Pos(x/camera.basic_zoom + camera.dx, y/camera.basic_zoom + camera.dy)
+       end
+end
+
+redef class Pos
+       # Convert to a `ScreenPos` by applying camera transformation
+       fun to_screen(camera: Camera): ScreenPos do
+               return new ScreenPos((x - camera.dx) * camera.basic_zoom, (y - camera.dy) * camera.basic_zoom)
+       end
+end
+
+# Camera managing the screen view on the world
+class Camera
+       # Offset of the top left corner of the screen, X part
+       var dx = 0.0
+
+       # Offset of the top left corner of the screen, Y part
+       var dy = 0.0
+
+       # Basic zoom, the distance between 2 features
+       #
+       # In the world logic, the distance is of 1.
+       # This value depends on the size of the graphical assets.
+       #
+       # TODO make it a full zoom by scaling images too, if needed.
+       var basic_zoom = 32.0
+
+       # Center of the `display` as world `Pos`
+       fun center(display: Display): Pos
+       do
+               return (new ScreenPos(display.width.to_f * 0.5, display.height.to_f * 0.5)).to_logic(self)
+       end
+
+       # Center the `display` on the world `pos`
+       fun center_on(display: Display, pos: Pos)
+       do
+               self.dx = pos.x - display.width.to_f * 0.5 / basic_zoom
+               self.dy = pos.y - display.height.to_f * 0.5 / basic_zoom
+       end
+end
+
+redef class App
+
+       # Collection of assets
+       var assets = new Assets is lazy
+
+       redef fun on_create
+       do
+               super
+               maximum_fps = 60
+               assets.assign_images_to_story context.game.story
+       end
+
+       # Camera managing transformation between world and screen positions
+       var camera = new Camera
+
+       # Context of the game, either local or remote
+       var context: GameContext is lazy do
+
+               # Server info
+               var address = null
+               var port = default_listening_port
+
+               if args.not_empty then
+                       # Use first argument as the server address
+                       address = args[0]
+                       if args.length > 1 then port = args[1].to_i
+               else
+                       print "Looking for a server..."
+
+                       var s = new UDPSocket
+                       s.enable_broadcast = true
+                       s.blocking = false
+                       s.broadcast(discovery_port, "Server? {handshake_app_name}")
+                       nanosleep(0, 100_000_000)
+
+                       var ptr = new Ref[nullable SocketAddress](null)
+                       var resp = s.recv_from(1024, ptr)
+                       var src = ptr.item
+
+                       if not resp.is_empty then
+                               var words = resp.split(" ")
+                               if words.length == 3 and words[0] == "Server!" and words[1] == handshake_app_name and words[2].is_numeric then
+                                       address = src.address
+                                       port = words[2].to_i
+                               end
+                       end
+               end
+
+               if address == null then
+                       print "Launching a local server"
+
+                       # No command line
+                       return new LocalServerContext
+               else
+                       print "Connecting to:{address}:{port}"
+                       maximum_fps = 0
+
+                       # Args are: tinks server_address {port}
+                       #var address = "riph" # args[0]
+                       #var port = sys.default_listening_port
+                       if args.length > 1 then port = args[1].to_i
+
+                       # Setup connection config
+                       var server_config = new RemoteServerConfig(address, port)
+                       var server = new RemoteServer(server_config)
+
+                       # Connect then complete handshake
+                       assert server.connect else print_error "Connection to server failed with {server.socket.last_error or else "none"}"
+                       assert server.handshake else print_error "Handshake with server failed"
+
+                       # Download and setup remote game
+                       var context = new RemoteGameContext(server)
+                       context.setup
+
+                       return context
+               end
+       end
+
+       # `Tank` of the local player, if any
+       fun local_tank: nullable Tank
+       do
+               # FIXME use a ? to one line this
+               var local_player = context.local_player
+               if local_player == null then return null
+               return local_player.tank
+       end
+
+       # Square of the minimum distance from the tank for an object to be "far"
+       #
+       # This value influences which sounds are heard,
+       # the strength of vibrations and
+       # whether an arrow points to a far unit
+       private var far_dist2 = 2000.0
+
+       # Tank tracks tracks on the ground
+       #
+       # TODO use particles or at least optimize drawing
+       var tracks = new List[Couple[Pos, Float]]
+
+       redef fun frame_core(display)
+       do
+               var clock = new Clock
+
+               var turn = context.do_turn
+               sys.perfs["do_turn"].add clock.lapse
+
+               # Draw
+
+               # Update camera
+               if down_keys.has("left") then camera.dx -= 1.0
+               if down_keys.has("right") then camera.dx += 1.0
+               if down_keys.has("up") then camera.dy -= 1.0
+               if down_keys.has("down") then camera.dy += 1.0
+
+               var local_tank = local_tank
+               if local_tank != null then
+                       var tank_speed = local_tank.direction_forwards*local_tank.rule.max_speed
+                       tank_speed = tank_speed.min(0.5).max(-0.5)
+
+                       var prop_pos = local_tank.pos + local_tank.heading.to_vector(tank_speed * 16.0)
+                       var old_pos = camera.center(display)
+                       var half = old_pos.lerp(prop_pos, 0.02)
+
+                       camera.center_on(display, new Pos(half.x, half.y))
+               end
+
+               # Grass
+               display.clear(0.0, 0.45, 0.0)
+
+               # Past tank tracks
+               for track in tracks do
+                       var pos = track.first.to_screen(camera)
+                       display.blit_rotated(assets.drawing.track, pos.x, pos.y, track.second)
+               end
+
+               # Past blast sites
+               for blast in context.game.world.blast_sites do
+                       var pos = blast.to_screen(camera)
+                       display.blit_centered(assets.drawing.blast, pos.x, pos.y)
+               end
+
+               # Terrain features
+               var tl = (new ScreenPos(0.0, 0.0)).to_logic(camera)
+               var br = (new ScreenPos(display.width.to_f, display.height.to_f)).to_logic(camera)
+               for x in [tl.x.floor.to_i .. br.x.ceil.to_i] do
+                       for y in [tl.y.floor.to_i .. br.y.ceil.to_i] do
+                               var feature = context.game.world[x, y]
+                               if feature != null then
+                                       var pos = feature.pos.to_screen(camera)
+                                       var image = feature.rule.images[feature.image_index]
+                                       display.blit_rotated(image, pos.x, pos.y, feature.angle)
+                               end
+                       end
+               end
+
+               # Tanks
+               for tank in context.game.tanks do
+                       # Add random tracks
+                       if (tank.direction_heading != 0.0 and 40.rand == 0) or
+                          (tank.direction_forwards != 0.0 and 100.rand == 0) then
+
+                               tracks.add new Couple[Pos, Float](tank.pos, tank.heading)
+                               if tracks.length > 1000 then tracks.shift
+                       end
+
+                       # Get the player stencil
+                       var player = tank.player
+                       var stencil = null
+                       if player != null then stencil = assets.drawing.stencils[player.stencil_index]
+
+                       if camera.center(display).dist2(tank.pos) > far_dist2 then
+                               var hw = (display.width/2).to_f
+                               var hh = (display.height/2).to_f
+
+                               var angle = camera.center(display).atan2(tank.pos)
+                               var x = hw + angle.cos * (hw-128.0)
+                               var y = hh + angle.sin * (hh-128.0)
+
+                               var screen_pos = new ScreenPos(x, y)
+                               display.blit_rotated(assets.drawing.arrow, screen_pos.x, screen_pos.y, angle)
+                               if stencil != null then display.blit_rotated(stencil, screen_pos.x, screen_pos.y, angle)
+                               continue
+                       end
+
+                       var screen_pos = tank.pos.to_screen(camera)
+
+                       var damage = tank.rule.max_health - tank.health
+                       damage = damage.max(0).min(tank.rule.base_images.length)
+
+                       var base_image = tank.rule.base_images[damage]
+                       display.blit_rotated(base_image, screen_pos.x, screen_pos.y, tank.heading)
+                       if stencil != null then display.blit_rotated(stencil, screen_pos.x, screen_pos.y, tank.heading)
+                       display.blit_rotated(tank.rule.turret_image, screen_pos.x, screen_pos.y, tank.turret.heading)
+
+                       if debug then
+                               var corners = tank.corners_at(new Couple[Pos, Float](tank.pos, tank.heading))
+                               for c in corners do
+                                       var p = c.to_screen(camera)
+                                       display.blit_centered(assets.drawing.red_dot, p.x, p.y)
+                               end
+                       end
+               end
+
+               # Events
+               for event in turn.events do
+                       event.client_react(display, turn)
+
+                       if event isa ExplosionEvent then
+                               var pos = event.pos.to_screen(camera)
+                               display.blit_centered(assets.drawing.explosion, pos.x, pos.y)
+                       else if event isa OpenFireEvent then
+                               var tank = event.tank
+                               var screen_pos = tank.pos.to_screen(camera)
+                               display.blit_rotated(assets.drawing.turret_firing, screen_pos.x, screen_pos.y, tank.turret.heading)
+
+                               if tank.pos.dist2(camera.center(display)) < far_dist2 then
+                                       assets.turret_fire.play
+                               end
+                       else if event isa TurretReadyEvent then
+                               if event.tank.pos.dist2(camera.center(display)) < far_dist2 then
+                                       assets.turret_ready.play
+                               end
+                       end
+               end
+
+               # Gather and show some performance stats!
+               sys.perfs["draw"].add clock.lapse
+               if context.game.tick % 300 == 5 then print sys.perfs
+       end
+
+       # Keys currently down
+       #
+       # TODO find a nice API and move up to mnit/gamnit
+       var down_keys = new HashSet[String]
+
+       redef fun input(ie)
+       do
+               var local_tank = local_tank
+               var local_player = context.local_player
+
+               # Quit?
+               if ie isa QuitEvent or
+                 (ie isa KeyEvent and ie.name == "escape") then
+
+                       quit = true
+                       return true
+               end
+
+               # Spawn a new tank?
+               if local_tank == null and local_player != null then
+                       if (ie isa KeyEvent and ie.name == "space") or
+                          (ie isa PointerEvent and ie.depressed) then
+
+                               local_player.orders.add new SpawnTankOrder(local_player)
+                               return true
+                       end
+               end
+
+               if ie isa KeyEvent then
+
+                       # Update `down_keys`
+                       var name = ie.name
+                       if ie.is_down then
+                               down_keys.add name
+                       else if down_keys.has(name) then
+                               down_keys.remove name
+                       end
+
+                       # wasd to move tank
+                       var direction_change = ["w", "a", "s", "d"].has(ie.name)
+                       if direction_change and local_tank != null and local_player != null then
+                               var forward = down_keys.has("w")
+                               var backward = down_keys.has("s")
+                               var left = down_keys.has("a")
+                               var right = down_keys.has("d")
+
+                               # Cancel contradictory commands
+                               if forward and backward then
+                                       forward = false
+                                       backward = false
+                               end
+
+                               if left and right then
+                                       left = false
+                                       right = false
+                               end
+
+                               # Set movement and direction
+                               var move = 0.0
+                               if forward then
+                                       move = 0.5
+                               else if backward then move = -0.5
+
+                               var ori = 0.0
+                               if left then
+                                       ori = -local_tank.rule.max_direction/2.0
+                               else if right then ori = local_tank.rule.max_direction/2.0
+
+                               # Activate to invert the orientation on reverse, (for at @R4p4Ss)
+                               #if backward then ori = -ori
+
+                               # Bonus when only moving or only turning
+                               if not forward and not backward then ori *= 2.0
+                               if not left and not right then move *= 2.0
+
+                               # Give order
+                               local_player.orders.add new TankDirectionOrder(local_tank, ori, move)
+                               return true
+                       end
+               end
+
+               # On click (or tap), aim and fire
+               if ie isa PointerEvent then
+
+                       if ie.pressed and local_tank != null and local_player != null then
+                               var target = (new ScreenPos(ie.x, ie.y)).to_logic(camera)
+                               local_player.orders.add new AimAndFireOrder(local_tank, target)
+                               return true
+                       end
+               end
+
+               return false
+       end
+end
+
+redef class TEvent
+       fun client_react(display: Display, turn: TTurn) do end
+end
+
+redef class ExplosionEvent
+       redef fun client_react(display, turn)
+       do
+               var pos = pos.to_screen(app.camera)
+               display.blit_centered(app.assets.drawing.explosion, pos.x, pos.y)
+       end
+end
+
+redef class OpenFireEvent
+       redef fun client_react(display, turn)
+       do
+               var screen_pos = tank.pos.to_screen(app.camera)
+               display.blit_rotated(app.assets.drawing.turret_firing, screen_pos.x, screen_pos.y, tank.turret.heading)
+
+               if tank.pos.dist2(app.camera.center(display)) < app.far_dist2 then
+                       # Within earshot
+                       app.assets.turret_fire.play
+               end
+       end
+end
+
+redef class TurretReadyEvent
+       redef fun client_react(display, turn)
+       do
+               if tank.pos.dist2(app.camera.center(display)) < app.far_dist2 then
+                       # Within earshot
+                       app.assets.turret_ready.play
+               end
+       end
+end
diff --git a/contrib/tinks/src/client/context.nit b/contrib/tinks/src/client/context.nit
new file mode 100644 (file)
index 0000000..a8323eb
--- /dev/null
@@ -0,0 +1,116 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Provides context to abstract the exchanges with a local game or a remote game
+module context
+
+import gamnit::network
+
+import game
+intrude import game::players
+import server
+
+# Interface to a game
+abstract class GameContext
+
+       # The current game
+       var game: TGame
+
+       # The local player on this client, if any
+       var local_player: nullable Player = null
+
+       # Do a turn
+       fun do_turn: TTurn is abstract
+end
+
+# Simple local single-player game
+class LocalGameContext
+       super GameContext
+
+       noautoinit
+
+       init
+       do
+               # Create basic game
+               game = new TGame
+               var setup_turn = game.do_turn
+
+               var local_player = new Player
+               game.players.add local_player
+               self.local_player = local_player
+               setup_turn.spawn_tank local_player
+       end
+
+       redef fun do_turn do return game.do_turn
+end
+
+# Multiplayer game running on a remote server
+class RemoteGameContext
+       super GameContext
+
+       autoinit remote_server
+
+       # Remote server that controls the `game`
+       var remote_server: RemoteServer
+
+       # Setup `game` from `remote_server`
+       fun setup
+       do
+               var game = remote_server.reader.deserialize
+               var errors = remote_server.reader.errors
+               assert errors.is_empty else print_error errors.join("\n")
+               assert game isa TGame else print_error "Server sent a {game.class_name}"
+               self.game = game
+
+               var local_player = remote_server.reader.deserialize
+               errors = remote_server.reader.errors
+               assert errors.is_empty else print_error errors.join("\n")
+               assert local_player isa Player else print_error "Server sent a {local_player.class_name}"
+               self.local_player = local_player
+       end
+
+       redef fun do_turn
+       do
+               # Get turn from server
+               var turn = remote_server.reader.deserialize
+               var errors = remote_server.reader.errors
+               assert errors.is_empty else print_error errors.join("\n")
+               assert turn isa TTurn else print_error "Server sent a {turn.class_name}"
+
+               # Apply the turn locally
+               game.apply_turn turn
+
+               # Send orders to server
+               var local_player = local_player
+               if local_player != null and local_player.orders.not_empty then
+                       remote_server.writer.serialize local_player.orders
+                       remote_server.socket.flush
+                       local_player.orders = new Array[TOrder]
+               end
+
+               return turn
+       end
+end
+
+# Local game ran by a server accepting other clients
+class LocalServerContext
+       super LocalGameContext
+
+       # The server managing the game and other clients
+       var server = new Server(default_listening_port)
+
+       init do server.game = game
+
+       redef fun do_turn do return server.do_turn
+end
diff --git a/contrib/tinks/src/client/controls.nit b/contrib/tinks/src/client/controls.nit
new file mode 100644 (file)
index 0000000..c3a186f
--- /dev/null
@@ -0,0 +1,59 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# On-screen alternative controls
+module controls
+
+import client
+
+redef class App
+
+       # All active UI controls
+       fun controls: Array[Control] is abstract
+
+       redef fun frame_core(display)
+       do
+               super
+
+               for control in controls do control.draw(display)
+       end
+
+       redef fun input(event)
+       do
+               for control in controls do
+                       var hit = control.input(event)
+                       if hit then return true
+               end
+
+               return super
+       end
+end
+
+# An event raised by a `Control`
+class ControlEvent
+       super InputEvent
+
+       # Sender control
+       var sender: Control
+end
+
+# UI control
+abstract class Control
+
+       # Draw `self` to `display`
+       fun draw(display: Display) do end
+
+       # Intercept and act upon events concerving `self`
+       fun input(event: InputEvent): Bool do return false
+end
diff --git a/contrib/tinks/src/client/linux_client.nit b/contrib/tinks/src/client/linux_client.nit
new file mode 100644 (file)
index 0000000..d464cc8
--- /dev/null
@@ -0,0 +1,77 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# GNU/Linux client with config saved to `config.json`
+module linux_client
+
+import mnit_linux
+import linux::audio
+import json::serialization
+
+import client
+
+# Configuration of the client
+class ClientConfig
+       serialize
+
+       # Resolution width
+       var res_x = 1920 is lazy
+
+       # Resolution height
+       var res_y = 1080 is lazy
+
+       # Should the client play sounds?
+       var play_sounds = true is lazy
+end
+
+redef class App
+       private var config_path: String = sys.program_name.dirname / "../config.json"
+
+       private var config: ClientConfig do
+               if config_path.file_exists then
+                       var content = config_path.to_path.read_all
+                       var deser = new JsonDeserializer(content)
+                       var cc = deser.deserialize
+
+                       if cc == null then
+                               print_error "Client Error: Deserializing config file failed with {deser.errors.join(", ")}"
+                       else if not cc isa ClientConfig then
+                               print_error "Client Error: Deserializing config file failed, got '{cc}'"
+                               # TODO simplify the previous lines with ? or similar
+                       else return cc
+               end
+
+               # Save the default config to pretty Json
+               var cc = new ClientConfig
+               var json = cc.to_plain_json
+               json = json.replace(",", ",\n")
+               json.write_to_file config_path
+
+               return cc
+       end
+end
+
+redef class Display
+       redef fun wanted_width do return app.config.res_x
+       redef fun wanted_height do return app.config.res_y
+end
+
+redef class Sound
+       redef fun play do if app.config.play_sounds then super
+end
+
+redef class JsonDeserializer
+       # The only class we deserialize from pretty Json is ClientConfig
+       redef fun class_name_heuristic(object) do return "ClientConfig"
+end
diff --git a/contrib/tinks/src/common.nit b/contrib/tinks/src/common.nit
new file mode 100644 (file)
index 0000000..b215d09
--- /dev/null
@@ -0,0 +1,31 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Services common to the client and server
+module common
+
+import gamnit::network
+
+redef class Sys
+       # Name of this app
+       redef fun handshake_app_name do return "tinks"
+
+       redef fun handshake_app_version do return "0.1"
+
+       # Default listening port of the server
+       fun default_listening_port: Int do return 18721
+
+       # Port to which clients send discovery requests
+       fun discovery_port: Int do return 18722
+end
diff --git a/contrib/tinks/src/game/framework.nit b/contrib/tinks/src/game/framework.nit
new file mode 100644 (file)
index 0000000..49c74b0
--- /dev/null
@@ -0,0 +1,138 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Structure of a client/server game, based on turns, events, orders and rules
+module framework is serialize
+
+import geometry
+import realtime
+
+# Main game object containing the world, players and tanks
+#
+# The game object is shared by both the client and the server.
+# So a method using the game object as visitor is to be executed client-side.
+class TGame
+
+       # `Story`, or rule book, with all the stats for this game
+       var story = new Story
+
+       # `Clock` timing the elapsed time between turns
+       private var clock = new Clock is noserialize
+
+       # Tick count of the last turn (The first turn as a tick of 0)
+       var tick: Int = -1
+
+       # Execute the next turn and return it as a `TTurn`
+       #
+       # This is to be executed server-side only.
+       fun do_turn: TTurn
+       do
+               var dt = clock.lapse
+               tick += 1
+
+               var turn = new TTurn(self, tick, dt.to_f, dt.millisec)
+               return turn
+       end
+
+       # Apply `turn` locally by updating `tick` and applying all events
+       #
+       # This is to be executed client-side only.
+       fun apply_turn(turn: TTurn)
+       do
+               tick = turn.tick
+               for event in turn.events do event.apply self
+       end
+end
+
+# A single turn of a `TGame`
+#
+# The turn object is created and populated by the server (using `TGame::do_turn`).
+# It is transmitted to the client but it cannot modify it.
+# So methods using the turn object as visitor are to be executed server-side.
+class TTurn
+
+       # `TGame` of which `self` is part of
+       var game: TGame
+
+       # Tick of this turn
+       var tick: Int
+
+       # Elapsed seconds since previous turn (as a `Float`)
+       var dts: Float
+
+       # Elapsed milliseconds since previous turn (as a `Int`)
+       var dt: Int
+
+       # `TEvent` that happened during this turn
+       #
+       # Events are added using `add`.
+       # This information is used to apply the turn client-side to update its game object.
+       # It is also used by effects on the UI and could be used by an AI.
+       var events: SequenceRead[TEvent] = new Array[TEvent]
+
+       # Add an `event` to `events` and apply it right away server-side
+       fun add(event: TEvent)
+       do
+               event.apply game
+               events.as(Array[TEvent]).add event
+       end
+end
+
+# Game event sent from the server to the client
+class TEvent
+
+       # Executed client-side to apply this event on the `game`
+       fun apply(game: TGame) do end
+end
+
+# An order sent from the client to the server
+class TOrder
+
+       # Apply order server-side on `turn`, usually spawns `GameEvent`
+       fun apply(turn: TTurn) do end
+end
+
+# An entity acting on each turn
+class TTurnable
+
+       # Act on `turn`
+       fun do_turn(turn: TTurn) do end
+end
+
+# A collection of `Rule` guiding the game
+#
+# Changing the story could (in theory) be enough to completely change the context of the game.
+# In _Tinks!_ however, we use this class lightly and fill it with static content.
+class Story
+end
+
+# Metadata of in game `Ruled` entities, keep their stats and assets in a single place
+class Rule
+
+       # `Story` to which `self` belongs
+       var story: Story
+end
+
+# A game entity with metadata in its `rule`
+class Ruled
+
+       # Kind of `Rule` for `rule`
+       type R: Rule
+
+       # Metadata of this entity
+       var rule: R
+end
+
+# Should the game show more information for debugging?
+fun debug: Bool do return false
diff --git a/contrib/tinks/src/game/game.nit b/contrib/tinks/src/game/game.nit
new file mode 100644 (file)
index 0000000..06a0a09
--- /dev/null
@@ -0,0 +1,18 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import tanks
+import players
+import world
+import powerups
diff --git a/contrib/tinks/src/game/players.nit b/contrib/tinks/src/game/players.nit
new file mode 100644 (file)
index 0000000..ac5bb76
--- /dev/null
@@ -0,0 +1,149 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Player related and tank spawning logic
+module players is serialize
+
+import tanks
+
+redef class TGame
+
+       # All the known players in the game
+       var players = new Array[Player]
+
+       redef fun do_turn
+       do
+               var turn = super
+               for player in players do
+                       player.do_turn turn
+               end
+               return turn
+       end
+end
+
+redef class TTurn
+
+       # Range around the center of the world (0, 0) where a tank can spawn
+       var spawn_range = 256.0
+
+       # Spawn a new tank for `player`
+       fun spawn_tank(player: Player)
+       do
+               var pos = new Pos(spawn_range.rand, spawn_range.rand)
+               var tank = new Tank(game.story.tanks.rand, pos, 2.0*pi.rand)
+
+               if tank.next_move_collisions(self).not_empty then
+                       # Clear the way
+                       game.world.explode(self, pos, 3)
+               end
+
+               add new TankSpawnEvent(tank, player)
+       end
+end
+
+# A player in the game
+class Player
+       super TTurnable
+
+       # Queue of orders to apply at the end of the turn
+       var orders = new Array[TOrder]
+
+       # The tank controlled by this player, if any
+       var tank: nullable Tank = null
+
+       # Index of the "unique" player stencil applied on all its tanks
+       var stencil_index: Int do
+               var counter = once new Ref[Int](0)
+               var val = counter.item
+               counter.item = (counter.item+1) % 4
+               return val
+       end
+
+       redef fun do_turn(turn)
+       do
+               # Apply orders if they are legal
+               for order in orders do
+                       if order.is_legal(turn.game, self) then
+                               order.apply turn
+                       else print "Server Warning: Order {order} is now illegal"
+               end
+
+               orders.clear
+       end
+end
+
+redef class Tank
+       # The player controlling this tank, if any
+       var player: nullable Player = null
+end
+
+redef class TOrder
+
+       # Is this order (still) legal?
+       #
+       # This is executed client-side.
+       fun is_legal(game: TGame, issed_by: Player): Bool do return true
+end
+
+redef abstract class TankOrder
+       redef fun is_legal(game, issed_by) do return issed_by == tank.player
+end
+
+# A request to spawn a new tank
+class SpawnTankOrder
+       super TOrder
+
+       # Requester
+       var player: Player
+
+       redef fun is_legal(turn, issed_by) do return issed_by == player and player.tank == null
+
+       redef fun apply(turn)
+       do
+               turn.spawn_tank player
+       end
+end
+
+# A new tank appeared
+class TankSpawnEvent
+       super TEvent
+
+       # The new tank
+       var tank: Tank
+
+       # The `tank` owner
+       var player: nullable Player
+
+       redef fun apply(game)
+       do
+               var player = player
+               if player != null then player.tank = tank
+               tank.player = player
+               game.tanks.add tank
+       end
+end
+
+redef class TankDeathEvent
+
+       redef fun apply(game)
+       do
+               super
+
+               # `player` has no tank anymore
+               var player = tank.player
+               if player != null then
+                       player.tank = null
+               end
+       end
+end
diff --git a/contrib/tinks/src/game/powerups.nit b/contrib/tinks/src/game/powerups.nit
new file mode 100644 (file)
index 0000000..2c7cd5b
--- /dev/null
@@ -0,0 +1,91 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Support for pickable powerups (only health for now)
+module powerups is serialize
+
+import tanks
+
+# A powerup item
+class Powerup
+       super Feature
+       redef type R: PowerupRule
+end
+
+# Metadata of a powerup item
+class PowerupRule
+       super FeatureRule
+
+       # Restore all health when picked up
+       var restore_health: Bool
+end
+
+redef class Story
+       # A powerup that restores all health
+       var health = new PowerupRule(self, 2, true)
+
+       # All `PowerupRule` in this story
+       var powerups: Array[PowerupRule] = [health]
+end
+
+redef class Tank
+
+       redef fun destroy(turn)
+       do
+               super
+
+               # Put a random powerup at the center of the old tank
+               var pos = new Pos(pos.x.floor+0.5, pos.y.floor+0.5)
+               var powerup = new Powerup(turn.game.story.powerups.rand, pos)
+               turn.add new FeatureChangeEvent(powerup, pos)
+
+               # Add some debris around it
+               var forward = new Pos((pos.x+heading.cos*1.1).floor+0.5, (pos.y+heading.sin*1.1).floor+0.5)
+               var backward = new Pos((pos.x-heading.cos*1.1).floor+0.5, (pos.y-heading.sin*1.1).floor+0.5)
+               turn.add new FeatureChangeEvent(new Feature(turn.game.story.debris, forward), forward)
+               turn.add new FeatureChangeEvent(new Feature(turn.game.story.debris, backward), backward)
+       end
+
+       # Intercept collision detection of "absorb" powerups
+       #
+       # This is a wee bit hackish.
+       # The collision detection on tank move can return a max of 4 items (1 per side).
+       # If there is powerups, they may have hidden other features.
+       # This could cause the tank to move over a feature and get stuck.
+       # This is not a big problem as the tank can open fire to liberate itself,
+       # or even simply go back as the speed is static.
+       redef fun next_move_collisions(turn)
+       do
+               var collisions = super
+               if collisions.is_empty then return collisions
+
+               for coll in collisions do if not coll isa Powerup then
+                       # An unavoidable collision
+                       return collisions
+               end
+
+               # Only powerups! absorb them
+               for powerup in collisions do
+                       if powerup isa Powerup then
+                               turn.add new FeatureChangeEvent(null, powerup.pos)
+
+                               if powerup.rule.restore_health then
+                                       turn.add new TankHealthChange(self, rule.max_health)
+                               end
+                       end
+               end
+
+               return new HashSet[Feature]
+       end
+end
diff --git a/contrib/tinks/src/game/tanks.nit b/contrib/tinks/src/game/tanks.nit
new file mode 100644 (file)
index 0000000..9d82965
--- /dev/null
@@ -0,0 +1,384 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Tank and tank turret related logic
+module tanks is serialize
+
+import world
+
+redef class TGame
+       # All of the tanks in game
+       var tanks = new TankSet
+
+       redef fun do_turn
+       do
+               var turn = super
+               for tank in tanks do tank.do_turn turn
+               return turn
+       end
+end
+
+# Stats of a tank kind, its config should be move to the `Story` if we want more than 1
+class TankRule
+       super Rule
+
+       # Width of this tank
+       var width: Float = 64.0/32.0
+
+       # Height of this tank
+       var length: Float = 100.0/32.0
+
+       # Maximum `health` this tank can normally have
+       var max_health = 4
+
+       # Maximum speed of this tank (in world coordinate units per seconds)
+       var max_speed = 2.0
+
+       # Turret turning speed (in radians per second)
+       var turret_turn_speed = 1.6
+
+       # Waiting time between shots can be fired
+       var turret_cooldown_time = 2.0
+
+       # Maximum `direction_heading` heading, may be double
+       var max_direction = 1.0
+end
+
+redef class Story
+       # The main (and only) tank configuration in this game
+       var tanks: Array[TankRule] = [new TankRule(self)]
+end
+
+# A tank!
+class Tank
+       super TTurnable
+       super Ruled
+       redef type R: TankRule
+
+       # In world `Pos` of this entity
+       var pos: Pos
+
+       # Orientation of this entity
+       var heading: Float
+
+       # The turret mounted on this tank
+       var turret = new Turret(self)
+
+       # Commanded direction
+       var direction_heading = 0.0
+
+       # Commanded speed
+       var direction_forwards = 0.0
+
+       # Health of this tank, out of `rule.max_health`
+       var health: Int = rule.max_health is lazy
+
+       redef fun do_turn(turn)
+       do
+               var collisions = next_move_collisions(turn)
+
+               if collisions.is_empty then
+                       var next = normal_next_pos(turn)
+                       self.pos = next.first
+                       self.heading = next.second
+               end
+
+               turret.do_turn turn
+
+               turn.add new TankMoveEvent(self, pos, direction_heading, direction_forwards, heading, turret.relative_heading)
+       end
+
+       # What would be the next position if not blocked by terrain features?
+       #
+       # Returns a couple of the new position and heading.
+       fun normal_next_pos(turn: TTurn): Couple[Pos, Float]
+       do
+               var heading = (heading + direction_heading * turn.dts).angle_normalize
+
+               var speed = direction_forwards * rule.max_speed * turn.dts
+               var pos = pos
+               if speed != 0.0 then
+                       pos += heading.to_vector(speed)
+               end
+
+               return new Couple[Pos, Float](pos, heading)
+       end
+
+       # Damage this tank, server-side
+       fun hit(turn: TTurn)
+       do
+               var damage = 1
+               var health = health - damage
+
+               if health <= 0 then
+                       destroy turn
+               else
+                       turn.add new TankHealthChange(self, health)
+               end
+       end
+
+       # Destroy this tank, server-side
+       fun destroy(turn: TTurn)
+       do
+               turn.add new TankDeathEvent(self)
+               turn.game.world.explode(turn, pos, 3)
+       end
+
+       # Collisions on the next move
+       fun next_move_collisions(turn: TTurn): HashSet[Feature]
+       do
+               var next = normal_next_pos(turn)
+               var features = new HashSet[Feature]
+
+               # Use the lines between the corners to detect collisions
+               var corners = corners_at(next)
+               var prev_corner = corners.last
+               for corner in corners do
+                       var feature = turn.game.world.first_collision(prev_corner, corner)
+                       if feature != null then features.add feature
+                       prev_corner = corner
+               end
+
+               return features
+       end
+
+       # Get the 4 corners at a `next` position
+       fun corners_at(next: Couple[Pos, Float]): Array[Pos]
+       do
+               var next_pos = next.first
+               var heading = next.second
+
+               var corners = new Array[Pos]
+
+               var hwy = rule.width/2.0 * (heading+pi/2.0).sin
+               var hwx = rule.width/2.0 * (heading+pi/2.0).cos
+               var hly = rule.length/2.0 * heading.sin
+               var hlx = rule.length/2.0 * heading.cos
+               corners.add new Pos(next_pos.x + hlx + hwx, next_pos.y + hly + hwy)
+               corners.add new Pos(next_pos.x + hlx - hwx, next_pos.y + hly - hwy)
+               corners.add new Pos(next_pos.x - hlx - hwx, next_pos.y - hly - hwy)
+               corners.add new Pos(next_pos.x - hlx + hwx, next_pos.y - hly + hwy)
+
+               return corners
+       end
+end
+
+# A tank turret
+class Turret
+       super TTurnable
+
+       # The `Tank` on which is mounted this turret
+       var tank: Tank
+
+       # Orientation of this turret relative to the tank
+       var relative_heading = 0.0
+
+       # Absolute orientation of this turret
+       fun heading: Float do return (tank.heading+relative_heading).angle_normalize
+
+       # Current target to aim for and fire upon
+       var target: nullable Pos = null
+
+       # Seconds left before the turret can open fire again
+       var cooldown = 0.0
+
+       redef fun do_turn(turn)
+       do
+               if cooldown > 0.0 then
+                       cooldown = cooldown - turn.dts
+
+                       if cooldown <= 0.0 then
+                               cooldown = 0.0
+
+                               # Notify clients
+                               turn.add new TurretReadyEvent(tank)
+                       end
+               end
+
+               var target = target
+               if target != null then
+
+                       var angle_to_target = tank.pos.atan2(target)
+                       var d = (heading - angle_to_target).angle_normalize
+
+                       var max_angle = tank.rule.turret_turn_speed * turn.dts
+                       if d.abs < max_angle then
+                               self.relative_heading = angle_to_target - tank.heading
+
+                               if cooldown == 0.0 then
+                                       # On target, fire
+                                       fire turn
+                                       self.target = null
+                               end
+                       else
+                               # Turn towards target
+                               if d < 0.0 then
+                                       self.relative_heading += max_angle
+                               else self.relative_heading -= max_angle
+                       end
+               end
+       end
+
+       # Open fire!
+       fun fire(turn: TTurn)
+       do
+               var dst = target
+               assert dst != null
+
+               # Is there something between the tank and the target?
+               var hit = turn.game.world.first_collision(tank.pos, dst)
+               if hit != null then dst = hit.pos
+
+               # Events!
+               turn.add new OpenFireEvent(tank)
+               turn.game.world.explode(turn, dst, 2)
+
+               # The turret need time to reload, cooldown!
+               cooldown = tank.rule.turret_cooldown_time
+       end
+end
+
+redef class World
+       redef fun explode(turn, center, force)
+       do
+               super
+
+               for tank in game.tanks do
+                       if tank.health == 0 then continue
+                       if center.dist(tank.pos) <= force.to_f + 1.0 then
+                               tank.hit turn
+                       end
+               end
+       end
+end
+
+# A collection of `Tank` that could be optimized
+class TankSet
+       super HashSet[Tank]
+end
+
+# A `tank` centric order
+abstract class TankOrder
+       super TOrder
+
+       # The `Tank` at the center of this order
+       var tank: Tank
+end
+
+# A command to change the behavior of `tank`
+class TankDirectionOrder
+       super TankOrder
+
+       # Desired direction, in [-1.0..1.0]
+       var direction_heading: Float
+
+       # Desired speed, in [-1.0..1.0]
+       var direction_forwards: Float
+
+       redef fun apply(game)
+       do
+               # TODO use events
+               var direction_heading = direction_heading
+               direction_heading = direction_heading.min(1.0).max(-1.0)
+               tank.direction_heading = direction_heading*tank.rule.max_direction
+
+               var direction_forwards = direction_forwards
+               direction_forwards = direction_forwards.min(1.0).max(-1.0)
+               tank.direction_forwards = direction_forwards*tank.rule.max_speed
+       end
+end
+
+# Order to aim and fire at `target`
+class AimAndFireOrder
+       super TankOrder
+
+       # Target for the turret
+       var target: Pos
+
+       redef fun apply(game)
+       do
+               tank.turret.target = target
+       end
+end
+
+# A `tank` centric event
+abstract class TankEvent
+       super TEvent
+
+       # The `Tank` at the center of this event
+       var tank: Tank
+end
+
+# `tank` opens fire
+class OpenFireEvent
+       super TankEvent
+end
+
+# The turret of `tank` is ready to open fire
+class TurretReadyEvent
+       super TankEvent
+end
+
+# `tank` has been destroyed
+class TankDeathEvent
+       super TankEvent
+
+       redef fun apply(game)
+       do
+               tank.health = 0
+               game.tanks.remove tank
+       end
+end
+
+# The health of `tank` changes to `new_health`
+class TankHealthChange
+       super TankEvent
+
+       # The new health for `tank`
+       var new_health: Int
+
+       redef fun apply(game)
+       do
+               tank.health = new_health
+       end
+end
+
+# A `tank` moved
+#
+# TODO this event is too big, divide in 2 or more and move more logic client-side
+class TankMoveEvent
+       super TankEvent
+
+       # The position
+       var pos: Pos
+
+       # The direction of the "wheels"
+       var direction_heading: Float
+
+       # The speed
+       var direction_forwards: Float
+
+       # Orientation of the tank
+       var tank_heading: Float
+
+       # Orientation of the turret
+       var turret_heading: Float
+
+       redef fun apply(game)
+       do
+               tank.pos = pos
+               tank.direction_heading = direction_heading
+               tank.direction_forwards = direction_forwards
+               tank.heading = tank_heading
+               tank.turret.relative_heading = turret_heading
+       end
+end
diff --git a/contrib/tinks/src/game/world.nit b/contrib/tinks/src/game/world.nit
new file mode 100644 (file)
index 0000000..a9e1844
--- /dev/null
@@ -0,0 +1,276 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Physical world logic
+module world is serialize
+
+import noise
+import more_collections
+
+import framework
+
+redef class TGame
+       # The physical world in which this game happens
+       var world = new World(self)
+end
+
+# A terrain features (a rock, a tree, etc.)
+class Feature
+       super Ruled
+       redef type R: FeatureRule
+
+       # Top-left corner of this feature
+       var pos: Pos
+end
+
+# Metadata for a `Feature`
+class FeatureRule
+       super Rule
+
+       # Strength to resist on `World::explode`
+       var strength: Int
+end
+
+# The physical world of the `game`
+class World
+       # Associated `TGame`
+       var game: TGame
+
+       # Past blast sites
+       var blast_sites = new Array[Pos]
+
+       private var mountain_map: Noise do
+               var map = new PerlinNoise
+               map.period = 10.0
+               return map
+       end
+
+       private var forest_map: Noise do
+               var map = new PerlinNoise
+               map.period = 24.0
+               return map
+       end
+
+       # Cache of discovered features, also keeps tracks of changes
+       private var features_cache = new FeatureMap
+
+       # Get the `Feature` at `x, y`, if any
+       fun [](x, y: Int): nullable Feature
+       do
+               if features_cache.has(x, y) then return features_cache[x, y]
+
+               # Generate a feature from the noise map
+               var pos = new Pos(x.to_f+0.5, y.to_f+0.5)
+
+               var feature = null
+               if mountain_map[x.to_f, y.to_f] > 0.55 then
+                       feature = new Feature(game.story.rock, pos)
+               else if forest_map[x.to_f, y.to_f] > 0.5 then
+                       feature = new Feature(game.story.tree, pos)
+               end
+
+               # Update cache
+               features_cache[x, y] = feature
+
+               return feature
+       end
+
+       # Detect the first collision with a `Feature` from `src` to `dst`
+       #
+       # This is the main collision detection method used by tanks shots, and at tank movement.
+       # The idea is to check all cases between `src` and `dst` and return the first feature found.
+       # Returns `null` if there is no obstacle features.
+       #
+       # Example of the cases that would be checked between `s` and `d`:
+       #
+       # ~~~raw
+       # ................
+       # .s###...........
+       # ....######......
+       # .........####d..
+       # ................
+       # ~~~
+       fun first_collision(src, dst: Pos): nullable Feature
+       do
+               var going_left = dst.x < src.x
+               var angle = src.atan2(dst)
+               var slope = angle.tan
+
+               # Soften slopes approaching infinity
+               if slope > 100.0 then slope = 100.0
+               if slope < -100.0 then slope = -100.0
+
+               # For each column (over x) from src.x to dst.x
+               var x0 = src.x.floor.to_i
+               var x1 = dst.x.floor.to_i
+               for x in [x0 .. x1].smart_step do
+                       var dx = x.to_f - src.x
+                       var y0 = src.y + dx*slope
+                       var y1 = src.y + (dx+1.0)*slope
+
+                       var first = y0.floor.to_i
+                       var last = y1.floor.to_i
+                       if going_left then
+                               # Invert the first and last element of the range
+                               var swap = first
+                               first = last
+                               last = swap
+                       end
+
+                       # For each row (over y)
+                       # from where the line enters the column to where it leaves it
+                       for y in [first .. last].smart_step do
+                               if not y.in_between_floats(src.y, dst.y) then continue
+
+                               var feature = self[x.to_i, y]
+                               if feature != null then return feature
+                       end
+               end
+
+               return null
+       end
+
+       # Apply an explosion at `center` of the given `power`
+       fun explode(turn: TTurn, center: Pos, power: Int)
+       do
+               var x = center.x.floor.to_i
+               var y = center.y.floor.to_i
+               var range = [-power .. power]
+               var features = new Array[Feature]
+
+               for dx in range do
+                       for dy in range do
+                               var f = self[x+dx, y+dy]
+                               var force = (power-dx.abs) + (power-dy.abs)
+                               if f != null and f.rule.strength <= force then features.add f
+                       end
+               end
+
+               turn.add new ExplosionEvent(center, power, features)
+       end
+end
+
+# Map of features organized by their coordinates
+#
+# The naive implementation is using a `HashMap2`.
+# This class can be redefed with optimizations as needed.
+class FeatureMap
+       super HashMap2[Int, Int, nullable Feature]
+end
+
+redef class Story
+       # Forest tree
+       var tree = new FeatureRule(self, 2)
+
+       # Big rock
+       var rock = new FeatureRule(self, 3)
+
+       # Metallic debris
+       var debris = new FeatureRule(self, 4)
+end
+
+# An explosion
+class ExplosionEvent
+       super TEvent
+
+       # Center of the explosion
+       var pos: Pos
+
+       # Power of the blast
+       var power: Int
+
+       # All the features this explosion destroys
+       var destroyed_features: Array[Feature]
+
+       redef fun apply(game)
+       do
+               for feature in destroyed_features do
+                       game.world.features_cache[feature.pos.x.floor.to_i, feature.pos.y.floor.to_i] = null
+               end
+
+               game.world.blast_sites.add pos
+               if game.world.blast_sites.length > 100 then game.world.blast_sites.shift
+       end
+end
+
+# The feature at `pos` changes to `feature`
+class FeatureChangeEvent
+       super TEvent
+
+       # New `Feature`, if any
+       var feature: nullable Feature
+
+       # `Pos` of this change
+       var pos: Pos
+
+       redef fun apply(game)
+       do
+               game.world.features_cache[pos.x.floor.to_i, pos.y.floor.to_i] = feature
+       end
+end
+
+# ---
+# Services
+
+# Position in the world
+class Pos
+       super Point[Float]
+
+       # Add `self` to `other` and return the new position
+       fun +(other: Point[Float]): Pos
+       do
+               var nx = other.x.add(x)
+               var ny = other.y.add(y)
+               return new Pos(x.value_of(nx), y.value_of(ny))
+       end
+end
+
+redef universal Int
+       # Is `self` in between `a` and `b`?
+       #
+       # ~~~
+       # assert 1.in_between_floats(0.0, 2.0)
+       # assert 1.in_between_floats(2.0, 0.0)
+       # assert not 1.in_between_floats(2.0, 4.0)
+       # ~~~
+       fun in_between_floats(a, b: Float): Bool
+       do
+               var f = to_f
+               if a < b then return a.floor - 1.0 < f and f < b.ceil
+               return a.ceil > f and f > b.floor - 1.0
+       end
+end
+
+redef universal Float
+       # Get the vector with `self` as direction and the given `magnitude`
+       fun to_vector(magnitude: Float): Pos
+       do
+               return new Pos(cos*magnitude, sin*magnitude)
+       end
+end
+
+redef class Range[E]
+       # Step appropriately to go from `first` to `last`
+       #
+       # ~~~
+       # assert [1..3].smart_step.to_a == [1, 2, 3]
+       # assert [3..1].smart_step.to_a == [3, 2, 1]
+       # ~~~
+       fun smart_step: Iterator[E]
+       do
+               var step = 1
+               if first > last then step = -1
+               return self.step(step)
+       end
+end
diff --git a/contrib/tinks/src/server/dedicated.nit b/contrib/tinks/src/server/dedicated.nit
new file mode 100644 (file)
index 0000000..db7bd9c
--- /dev/null
@@ -0,0 +1,24 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Dedicated server program
+module dedicated
+
+import server
+
+var port = sys.default_listening_port
+if args.length > 0 then port = args[0].to_i
+
+var server = new Server(port)
+server.run_dedicated
diff --git a/contrib/tinks/src/server/server.nit b/contrib/tinks/src/server/server.nit
new file mode 100644 (file)
index 0000000..58555ae
--- /dev/null
@@ -0,0 +1,133 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Server to host multiplayer games
+module server
+
+import gamnit::network
+
+import game
+import common
+
+redef class RemoteClient
+       # `Player` associated to this client
+       var player = new Player
+end
+
+redef class Server
+       # `UDPSocket` to which clients send discovery requests
+       var discovery_socket: UDPSocket do
+               var s = new UDPSocket
+               s.blocking = false
+               s.bind(null, discovery_port)
+               return s
+       end
+
+       # The current game
+       var game = new TGame is lazy, writable
+
+       # Is this a dedicated server
+       var dedicated = false
+
+       # Create and run a new `Game`
+       fun run_dedicated
+       do
+               dedicated = true
+
+               # Setup game
+               print "Server: Setup game"
+               game
+
+               # Play
+               print "Server: Starting play"
+               loop do_turn
+       end
+
+       # Run the server logic over a single turn
+       fun do_turn: TTurn
+       do
+               var game = game
+
+               # Do game logic
+               var turn = game.do_turn
+
+               # Respond to discovery requests
+               loop
+                       var ptr = new Ref[nullable SocketAddress](null)
+                       var read = discovery_socket.recv_from(1024, ptr)
+
+                       # No sender means there is no request (an error would also do it)
+                       var sender = ptr.item
+                       if sender == null then break
+
+                       var words = read.split(" ")
+                       if words.length != 2 or words[0] != "Server?" or words[1] != handshake_app_name then
+                               print "Server Warning: Rejected discovery request '{read}'"
+                               continue
+                       end
+
+                       discovery_socket.send_to(sender.address, sender.port,
+                               "Server! {handshake_app_name} {self.port}")
+               end
+
+               # Setup clients
+               var new_clients = accept_clients
+               for client in new_clients do
+                       # Register player and spawn first tank
+                       game.players.add client.player
+                       turn.spawn_tank client.player
+
+                       client.writer.serialize game
+                       client.writer.serialize client.player
+                       client.socket.flush
+
+                       clients.add client
+               end
+
+               if dedicated and clients.is_empty then
+                       # No clients, sleep for a while
+                       nanosleep(0, 10000000)
+                       return turn
+               end
+
+               # Update clients
+               broadcast turn
+
+               # Get orders from players
+               var clients_to_remove = new Array[RemoteClient]
+               for client in clients do
+                       if not client.socket.poll_in then continue
+
+                       var orders = client.reader.deserialize
+                       var errors = client.reader.errors
+                       if errors.not_empty then
+                               print_error "Comm Error: (Dropping client) {errors.join(", ")}"
+                               clients_to_remove.add client
+                       else if not orders isa Array[TOrder] then
+                               if orders == null then
+                                       print_error "Comm Error: (Dropping client) Unexpected null"
+                               else print_error "Comm Error: (Dropping client) Unexpected {orders.class_name}"
+                               # TODO remove code duplication when we have ? or an equivalent
+
+                               clients_to_remove.add client
+                       else
+                               client.player.orders.add_all orders
+                       end
+               end
+
+               for client in clients_to_remove do clients.remove client
+
+               return turn
+       end
+end
index 071fa2b..7e5ad0d 100644 (file)
@@ -3,14 +3,14 @@ NITLS=../../bin/nitls
 
 all: bin/calculator bin/calculator.apk bin/test
 
-bin/calculator: $(shell ${NITLS} -M src/calculator.nit ../../lib/linux/ui.nit) ${NITC}
+bin/calculator: $(shell ${NITLS} -M src/calculator.nit -m linux) ${NITC}
        mkdir -p bin
-       ${NITC} -o $@ src/calculator.nit -m ../../lib/linux/ui.nit
+       ${NITC} -o $@ src/calculator.nit -m linux
 
-bin/calculator.apk: $(shell ${NITLS} -M src/calculator.nit ../../lib/android/ui/) ${NITC} ../../contrib/inkscape_tools/bin/svg_to_icons
+bin/calculator.apk: $(shell ${NITLS} -M src/calculator.nit -m android) ${NITC} ../../contrib/inkscape_tools/bin/svg_to_icons
        mkdir -p bin res
        ../../contrib/inkscape_tools/bin/svg_to_icons art/icon.svg --android --out res/
-       ${NITC} -o $@ src/calculator.nit -m ../../lib/android/ui/
+       ${NITC} -o $@ src/calculator.nit -m android
 
 ../../contrib/inkscape_tools/bin/svg_to_icons:
        make -C ../../contrib/inkscape_tools/
index d92c468..df97ad5 100644 (file)
@@ -31,7 +31,7 @@ redef class App
        var cavemen_incr = 4
 
        var game : nullable Game = null
-       var score = new Container[Int](0)
+       var score = new Ref[Int](0)
        var imgs : nullable ImageSet = null
        var splash : nullable SplashScreen = null
 
@@ -81,7 +81,7 @@ redef class App
                                if game.won then
                                        next_nbr_caveman += cavemen_incr
                                else
-                                       score = new Container[Int](0)
+                                       score = new Ref[Int](0)
                                        next_nbr_caveman = cavemen_at_first_level
                                end
                                game = new Game( next_nbr_caveman, score )
index 8d1a849..29712de 100644 (file)
@@ -34,7 +34,7 @@ class Game
 
        var over_since = 0
 
-       var score: Container[Int]
+       var score: Ref[Int]
 
        var random_radius_min = 200
        var random_radius_max = 400
@@ -43,7 +43,7 @@ class Game
 
        var entities_sorter = new EntitiesSorter
 
-       init( cavemen_nbr : Int, score: Container[Int] )
+       init( cavemen_nbr : Int, score: Ref[Int] )
        do
                srand_from(cavemen_nbr)
 
index ad2b1f1..677cb5b 100644 (file)
@@ -47,7 +47,7 @@ redef class App
        end
 end
 
-fun display_scale_container: Container[Float] do return once new Container[Float](0.1)
+fun display_scale_container: Ref[Float] do return once new Ref[Float](0.1)
 redef fun display_scale do return display_scale_container.item
 redef fun display_offset_x: Int do return (300.0*display_scale).to_i
 redef fun display_offset_y: Int do return (800.0*display_scale).to_i
index a1ae476..acf50a0 100644 (file)
@@ -34,6 +34,6 @@ if args.not_empty then n = args.first.to_i
 for i in [0..10[ do
        var a = (['[', ']'] * n)
        a.shuffle
-       var b = a.join("")
+       var b = a.join
        if is_balanced(b) then print "{b} is well-balanced" else print "{b} is not well-balanced"
 end
diff --git a/examples/rosettacode/entropy.nit b/examples/rosettacode/entropy.nit
new file mode 100644 (file)
index 0000000..f47910c
--- /dev/null
@@ -0,0 +1,32 @@
+#!/usr/bin/env nit
+#
+# This file is part of NIT ( http://www.nitlanguage.org ).
+# This program is public domain
+
+# Task: Entropy
+# SEE: <http://rosettacode.org/wiki/Entropy>
+module entropy
+
+import counter
+
+# Basic implementation with a hashmap of chars to count them
+fun entropy(string: String): Float
+do
+       var cpt = new HashMap[Char, Int]
+       for char in string.chars do
+               var occ = cpt.get_or_default(char, 0)
+               cpt[char] = occ + 1
+       end
+
+       var len = string.length.to_f
+       var e = 0.0
+       for char, occ in cpt do
+               var freq = occ.to_f / len
+               e = e - freq * freq.log_base(2.0)
+       end
+       return e
+end
+print entropy("1223334444")
+
+# Alternative one-liner implementation using the `Counter::entropy` method of the library `counter`
+print "1223334444".chars.to_counter.entropy
diff --git a/examples/rosettacode/entropy_narcissist.nit b/examples/rosettacode/entropy_narcissist.nit
new file mode 100644 (file)
index 0000000..28b6212
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/env nit
+#
+# This file is part of NIT ( http://www.nitlanguage.org ).
+# This program is public domain
+
+# Task: Entropy/Narcissist
+# SEE: <http://rosettacode.org/wiki/Entropy/Narcissist>
+module entropy_narcissist
+
+import counter
+
+# Should be run in the right directory
+print "entropy_narcissist.nit".to_path.read_all.chars.to_counter.entropy
diff --git a/examples/rosettacode/fibonacci_word.nit b/examples/rosettacode/fibonacci_word.nit
new file mode 100644 (file)
index 0000000..fec4929
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/env nit
+#
+# This file is part of NIT ( http://www.nitlanguage.org ).
+# This program is public domain
+
+# Task: Fibonacci_word
+# SEE: <http://rosettacode.org/wiki/Fibonacci_word>
+module fibonacci_word
+
+import counter
+
+var words = new Array[String]
+words[0] = ""
+words[1] = "1"
+words[2] = "0"
+
+for i in [1..37] do
+       var w
+       if i >= words.length then
+               w = words[i-1] + words[i-2]
+               words[i] = w
+       else
+               w = words[i]
+       end
+       var out = w
+       if w.length > 40 then out = "..."
+       print "{i}\t{w.length}\t{w.chars.to_counter.entropy.to_precision(16)}\t{out}"
+end
index 77b2ed2..fd3ead4 100644 (file)
@@ -33,7 +33,7 @@ end
 
 var ary = "_###_##_#_#_#_#__#__".chars
 loop
-       print ary.join("")
+       print ary.join
        var nxt = evolve(ary)
        if ary == nxt then break
        ary = nxt
diff --git a/examples/rosettacode/s_exp.nit b/examples/rosettacode/s_exp.nit
new file mode 100644 (file)
index 0000000..e44cec3
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/env nit
+#
+# This file is part of NIT ( http://www.nitlanguage.org ).
+# This program is public domain
+
+# Simple Rosetta-code task : Parsing a S-Expression
+module s_exp
+
+import sexp
+
+var src = """((data "quoted data" 123 4.5)
+(data (!@# (4.5) "(more" "data)")))"""
+
+var sexp = src.to_sexp
+
+if sexp isa SExpError then
+       print sexp
+       exit(1)
+end
+
+print sexp
+
+if sexp isa SExp then print sexp.pretty_to_s
index c037d7b..ed8e1f6 100644 (file)
@@ -37,4 +37,7 @@ extern class NativeActivity in "Java" `{ android.app.Activity `}
                JNIEnv *env = Sys_jni_env(sys);
                return (*env)->NewGlobalRef(env, self);
        `}
+
+       # Notify the OS that this activity is done and should be closed
+       fun finish in "Java" `{ self.finish(); `}
 end
index a92ed8d..f083dd9 100644 (file)
@@ -24,7 +24,6 @@ import platform
 import native_app_glue
 import dalvik
 private import log
-private import data_store
 
 redef class App
        redef fun init_window
index 7dd2767..6cec4e1 100644 (file)
 # limitations under the License.
 
 # Android audio services, wraps a part of android audio API
+# This module modifies the default behaviour of the audio loading:
+# It is first loaded from the `res/raw` folder.
+# The file extension is not needed for the `res/raw` loading part.
+# If it didn't work, it is loaded from the `assets` folder.
+# The file extension is needed for the `assets` loading part.
+#
+# `assets` contains the portable version of sounds, since the `res` folder exsists only in android projects.
 #
 # For this example, the sounds "test_sound" and "test_music" are located in the "assets/sounds" folder,
 # they both have ".ogg" extension. "test_sound" is a short sound and "test_music" a music track
@@ -503,28 +510,28 @@ redef class Sound
 
        redef fun load do
                if is_loaded then return
-               var nam = app.asset_manager.open_fd(self.name)
-               if nam.is_java_null then
-                       self.error = new Error("Failed to get file descriptor for " + self.name)
-                       var retval_resources = app.default_soundpool.load_name_rid(app.resource_manager, app.native_activity, self.name)
-                       if retval_resources == -1 then
-                               self.error = new Error("Failed to load" + self.name)
+               var retval_resources = app.default_soundpool.load_name_rid(app.resource_manager, app.native_activity, self.name.strip_extension)
+               if retval_resources == -1 then
+                       self.error = new Error("failed to load" + self.name)
+                       var nam = app.asset_manager.open_fd(self.name)
+                       if nam.is_java_null then
+                               self.error = new Error("Failed to get file descriptor for " + self.name)
                        else
-                               self.soundpool_id = retval_resources
-                               self.soundpool = app.default_soundpool
-                               self.error = null
-                               self.soundpool.error = null
+                               var retval_assets = app.default_soundpool.load_asset_fd_rid(nam)
+                               if retval_assets == -1 then
+                                       self.error = new Error("Failed to load" + self.name)
+                               else
+                                       self.soundpool_id = retval_assets
+                                       self.soundpool = app.default_soundpool
+                                       self.error = null
+                                       self.soundpool.error = null
+                               end
                        end
                else
-                       var retval_assets = app.default_soundpool.load_asset_fd_rid(nam)
-                       if retval_assets == -1 then
-                               self.error = new Error("Failed to load" + self.name)
-                       else
-                               self.soundpool_id = retval_assets
-                               self.soundpool = app.default_soundpool
-                               self.error = null
-                               self.soundpool.error = null
-                       end
+                       self.soundpool_id = retval_resources
+                       self.soundpool = app.default_soundpool
+                       self.error = null
+                       self.soundpool.error = null
                end
                is_loaded = true
        end
@@ -567,26 +574,26 @@ redef class Music
 
        redef fun load do
                if is_loaded then return
-               var nam = app.asset_manager.open_fd(self.name)
-               if nam.is_java_null then
-                       self.error = new Error("Failed to get file descriptor for " + self.name)
-                       var mp_sound_resources = app.default_mediaplayer.load_sound(app.resource_manager.raw_id(self.name), app.native_activity)
-                       if mp_sound_resources.error != null then
-                               self.error = mp_sound_resources.error
+               var mp_sound_resources = app.default_mediaplayer.load_sound(app.resource_manager.raw_id(self.name.strip_extension), app.native_activity)
+               if mp_sound_resources.error != null then
+                       self.error = mp_sound_resources.error
+                       var nam = app.asset_manager.open_fd(self.name)
+                       if nam.is_java_null then
+                               self.error = new Error("Failed to get file descriptor for " + self.name)
                        else
-                               self.media_player = app.default_mediaplayer
-                               self.error = null
-                               self.media_player.error = null
+                               var mp_sound_assets = app.default_mediaplayer.data_source_fd(nam)
+                               if mp_sound_assets.error != null then
+                                       self.error = mp_sound_assets.error
+                               else
+                                       self.media_player = app.default_mediaplayer
+                                       self.error = null
+                                       self.media_player.error = null
+                               end
                        end
                else
-                       var mp_sound_assets = app.default_mediaplayer.data_source_fd(nam)
-                       if mp_sound_assets.error != null then
-                               self.error = mp_sound_assets.error
-                       else
-                               self.media_player = app.default_mediaplayer
-                               self.error = null
-                               self.media_player.error = null
-                       end
+                       self.media_player = app.default_mediaplayer
+                       self.error = null
+                       self.media_player.error = null
                end
                is_loaded = true
        end
@@ -649,7 +656,7 @@ redef class App
 
        # Retrieves a music with a media player in the `assets` folder using its name.
        # Used to play long sounds or musics, can't play multiple sounds simultaneously
-       redef fun load_music(path: String): Music do
+       redef fun load_music(path) do
                var fd = asset_manager.open_fd(path)
                if not fd.is_java_null then
                        return add_to_sounds(default_mediaplayer.data_source_fd(fd)).as(Music)
index 351040e..cbb10b1 100644 (file)
@@ -57,11 +57,6 @@ private extern class NativeAndroidMotionEvent `{AInputEvent *`}
                return AMotionEvent_getPointerCount(self);
        `}
 
-       # Did this motion event just started?
-       fun just_went_down: Bool `{
-               return (AMotionEvent_getAction(self) & AMOTION_EVENT_ACTION_MASK) == AMOTION_EVENT_ACTION_DOWN;
-       `}
-
        fun edge: Int `{
                return AMotionEvent_getEdgeFlags(self);
        `}
@@ -80,6 +75,13 @@ end
 private extern class AMotionEventAction `{ int32_t `}
        fun action: Int `{ return self & AMOTION_EVENT_ACTION_MASK; `}
 
+       # Pointer index concerned by this action
+       #
+       # Require: `is_pointer_down or is_pointer_up`
+       fun pointer_index: Int `{
+               return (self & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
+       `}
+
        fun is_down: Bool do return action == 0
        fun is_up: Bool do return action == 1
        fun is_move: Bool do return action == 2
@@ -101,26 +103,24 @@ class AndroidMotionEvent
 
        private var native: NativeAndroidMotionEvent
 
-       private var pointers_cache: nullable Array[AndroidPointerEvent] = null
-
        # Pointers (or fingers) composing this motion event
-       fun pointers: Array[AndroidPointerEvent]
-       do
-               if pointers_cache != null then
-                       return pointers_cache.as(not null)
-               else
-                       var pointers = new Array[AndroidPointerEvent]
-                       var pointers_count = native.pointers_count
-                       for i in [0 .. pointers_count [do
-                               var pointer_event = new AndroidPointerEvent(self, i)
-                               pointers.add(pointer_event)
-                       end
-                       pointers_cache = pointers
-                       return pointers
+       var pointers: Array[AndroidPointerEvent] is lazy do
+               return [for i in native.pointers_count.times do new AndroidPointerEvent(self, i)]
+       end
+
+       # The pointer (or finger) causing this event
+       var acting_pointer: AndroidPointerEvent is lazy do
+               var action = native.action
+               var index = 0
+
+               if action.is_pointer_down or action.is_pointer_up then
+                       index = native.action.pointer_index
                end
+
+               return new AndroidPointerEvent(self, index)
        end
 
-       redef fun just_went_down: Bool do return native.just_went_down
+       redef fun just_went_down do return native.action.is_down or native.action.is_pointer_down
 
        # Was the top edge of the screen intersected by this event?
        fun touch_to_edge: Bool do return native.edge == 1
@@ -158,40 +158,49 @@ class AndroidPointerEvent
 
        private var motion_event: AndroidMotionEvent
 
-       private var pointer_id: Int
+       private var pointer_index: Int
 
-       redef fun x: Float do return native_x(motion_event.native, pointer_id)
+       redef fun x do return native_x(motion_event.native, pointer_index)
 
-       private fun native_x(motion_event: NativeAndroidMotionEvent, pointer_id: Int): Float `{
-               return AMotionEvent_getX(motion_event, pointer_id);
+       private fun native_x(motion_event: NativeAndroidMotionEvent, pointer_index: Int): Float `{
+               return AMotionEvent_getX(motion_event, pointer_index);
        `}
 
-       redef fun y: Float do return native_y(motion_event.native, pointer_id)
+       redef fun y do return native_y(motion_event.native, pointer_index)
 
-       private fun native_y(motion_event: NativeAndroidMotionEvent, pointer_id: Int): Float `{
-               return AMotionEvent_getY(motion_event, pointer_id);
+       private fun native_y(motion_event: NativeAndroidMotionEvent, pointer_index: Int): Float `{
+               return AMotionEvent_getY(motion_event, pointer_index);
        `}
 
        # Pressure applied by this pointer
-       fun pressure: Float do return native_pressure(motion_event.native, pointer_id)
+       fun pressure: Float do return native_pressure(motion_event.native, pointer_index)
 
-       private fun native_pressure(motion_event: NativeAndroidMotionEvent, pointer_id: Int): Float `{
-               return AMotionEvent_getPressure(motion_event, pointer_id);
+       private fun native_pressure(motion_event: NativeAndroidMotionEvent, pointer_index: Int): Float `{
+               return AMotionEvent_getPressure(motion_event, pointer_index);
        `}
 
        redef fun pressed
        do
                var action = motion_event.native.action
-               return action.is_down or action.is_move
+               return action.is_down or action.is_move or action.is_pointer_down
        end
 
+       # Is this a move event?
+       fun is_move: Bool do return motion_event.acting_pointer == self and
+               motion_event.native.action.is_move
+
        redef fun depressed do return not pressed
 
        # Does this pointer just began touching the screen?
-       fun just_went_down: Bool
-       do
-               return motion_event.down_pointer == self
-       end
+       fun just_went_down: Bool do return motion_event.acting_pointer == self and
+               motion_event.just_went_down
+
+       # Unique id of this pointer since the beginning of the gesture
+       fun pointer_id: Int do return native_pointer_id(motion_event.native, pointer_index)
+
+       private fun native_pointer_id(motion_event: NativeAndroidMotionEvent, pointer_index: Int): Int `{
+               return AMotionEvent_getPointerId(motion_event, pointer_index);
+       `}
 end
 
 # An hardware key event
@@ -201,8 +210,8 @@ extern class AndroidKeyEvent `{AInputEvent *`}
 
        private fun action: Int `{ return AKeyEvent_getAction(self); `}
 
-       redef fun is_down: Bool do return action == 0
-       redef fun is_up: Bool do return action == 1
+       redef fun is_down do return action == 0
+       redef fun is_up do return action == 1
 
        # Hardware code of the key raising this event
        fun key_code: Int `{ return AKeyEvent_getKeyCode(self); `}
index a3fceaf..be79eb5 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Config to set the landscape orientation
-module landscape is android_manifest_activity """
-               android:screenOrientation="landscape"
-"""
+# Lock the application in the landscape orientation
+#
+# Adds `android:screenOrientation=="sensorLandscape"` to the manifest.
+module landscape is
+       android_api_min 9
+       android_manifest_activity """android:screenOrientation="sensorLandscape" """
+end
 
 import platform
index 1b5eff4..759ed81 100644 (file)
@@ -15,6 +15,8 @@
 # limitations under the License.
 
 # App audio abstraction
+# Default behaviour is loading the audio from the `assets` folder of the project with its name and extension
+# Platforms implementations can modify this comportement
 #
 # Once the application has started (after `App.setup`)
 # use `App.load_sound` to get a sound
@@ -24,6 +26,11 @@ module audio
 import app_base
 import standard::error
 
+# Platform variations
+# TODO: move on the platform once qualified names are understand in the condition
+import linux::audio is conditional(linux)
+import android::audio is conditional(android)
+
 # Abstraction of a playable Audio
 abstract class PlayableAudio
 
@@ -36,7 +43,7 @@ abstract class PlayableAudio
        # Is this already loaded ?
        protected var is_loaded = false is writable
 
-       # load this playable audio
+       # Load this playable audio
        fun load is abstract
 
        # Plays the sound
index 13891fc..5c59036 100644 (file)
@@ -22,6 +22,11 @@ module data_store
 import app_base
 import serialization
 
+# Platform variations
+# TODO: move on the platform once qualified names are understand in the condition
+import linux::data_store is conditional(linux)
+import android::data_store is conditional(android)
+
 redef class App
        # Services to store and load data
        fun data_store: DataStore is abstract
index 2e30c76..3006a47 100644 (file)
@@ -17,6 +17,11 @@ module ui
 
 import app_base
 
+# Platform variations
+# TODO: move on the platform once qualified names are understand in the condition
+import linux::ui is conditional(linux)
+import android::ui is conditional(android)
+
 redef class App
        super AppComponent
 
index 7b78d78..5f1c920 100644 (file)
@@ -24,121 +24,121 @@ redef class String
        do
                return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
        end
-       private fun inverted_base64_chars : HashMap[Char,Int]
+       private fun inverted_base64_chars : HashMap[Byte, Byte]
        do
-               var inv_base64_chars = new HashMap[Char,Int]
-               for k in [0..base64_chars.length[ do
-                       inv_base64_chars[ base64_chars.chars[k] ] = k
+               var inv_base64_chars = new HashMap[Byte, Byte]
+               for k in [0..base64_chars.bytelen[ do
+                       inv_base64_chars[base64_chars.bytes[k]] = k.to_b
                end
                return inv_base64_chars
        end
 
        # Encodes the receiver string to base64.
        # By default, uses "=" for padding.
-       fun encode_base64 : String do return encode_base64_custom_padding( '=' )
+       fun encode_base64 : String do return encode_base64_custom_padding('='.ascii.to_b)
 
        # Encodes the receiver string to base64 using a custom padding character.
        #
        # If using the default padding character `=`, see `encode_base64`.
-       fun encode_base64_custom_padding( padding : Char ) : String
+       fun encode_base64_custom_padding(padding : Byte) : String
        do
-               var base64_chars = once base64_chars
-               var length = length
+               var base64_bytes = once base64_chars.bytes
+               var length = bytelen
 
                var steps = length / 3
-               var chars_in_last_step = length % 3
-               var result_length = steps*4
-               if chars_in_last_step > 0 then result_length += 4
-               var result = (padding.to_s*result_length).to_cstring
+               var bytes_in_last_step = length % 3
+               var result_length = steps * 4
+               if bytes_in_last_step > 0 then result_length += 4
+               var result = new NativeString(result_length + 1)
+               var bytes = self.bytes
+               result[result_length] = 0u8
 
-               var mask_6bit = 63
+               var mask_6bit = 0b0011_1111
 
-               for s in [0..steps[ do
+               for s in [0 .. steps[ do
                        var e = 0
-                       for ss in [0..3[ do
-                               e += self.chars[s*3+ss].ascii.lshift((2-ss)*8)
+                       for ss in [0 .. 3[ do
+                               e += bytes[s * 3 + ss].to_i << ((2 - ss) * 8)
                        end
                        for ss in [0..4[ do
-                               result[s*4+3-ss] = base64_chars.chars[ e.rshift(ss*6).bin_and( mask_6bit ) ]
+                               result[s * 4 + 3 - ss] = base64_bytes[(e >> (ss * 6)) & mask_6bit]
                        end
                end
 
-               if chars_in_last_step == 1 then
-                       var e = self.chars[length-1].ascii.lshift(16)
-                       for ss in [0..2[ do
-                               result[steps*4+1-ss] = base64_chars.chars[ e.rshift((ss+2)*6).bin_and( mask_6bit ) ]
-                       end
-               else if chars_in_last_step == 2 then
-                       var e = self.chars[length-2].ascii.lshift(16) +
-                               self.chars[length-1].ascii.lshift(8)
-                       for ss in [0..3[ do
-                               result[steps*4+2-ss] = base64_chars.chars[ e.rshift((ss+1)*6).bin_and( mask_6bit ) ]
-                       end
+               var out_off = result_length - 4
+               var in_off = length - bytes_in_last_step
+               if bytes_in_last_step == 1 then
+                       result[out_off] = base64_bytes[((bytes[in_off] & 0b1111_1100u8) >> 2).to_i]
+                       result[out_off + 1] = base64_bytes[((bytes[in_off] & 0b0000_0011u8) << 4).to_i]
+                       out_off += 2
+               else if bytes_in_last_step == 2 then
+                       result[out_off] = base64_bytes[((bytes[in_off] & 0b1111_1100u8) >> 2).to_i]
+                       result[out_off + 1] = base64_bytes[(((bytes[in_off] & 0b0000_0011u8) << 4) | ((bytes[in_off + 1] & 0b1111_0000u8) >> 4)).to_i]
+                       result[out_off + 2] = base64_bytes[((bytes[in_off + 1] & 0b0000_1111u8) << 2).to_i]
+                       out_off += 3
+               end
+               if bytes_in_last_step > 0 then
+                       for i in [out_off .. result_length[ do result[i] = padding
                end
 
-               return result.to_s
+               return result.to_s_with_length(result_length)
        end
 
        # Decodes the receiver string from base64.
        # By default, uses "=" for padding.
-       fun decode_base64 : String do return decode_base64_custom_padding( '=' )
+       fun decode_base64 : String do return decode_base64_custom_padding('='.ascii.to_b)
 
        # Decodes the receiver string to base64 using a custom padding character.
        #
        # If using the default padding character `=`, see `decode_base64`.
-       fun decode_base64_custom_padding( padding : Char ) : String
+       fun decode_base64_custom_padding(padding : Byte) : String
        do
-               var inverted_base64_chars = once inverted_base64_chars
-               var length = length
+               var inv = once inverted_base64_chars
+               var length = bytelen
+               if length == 0 then return ""
                assert length % 4 == 0 else print "base64::decode_base64 only supports strings of length multiple of 4"
 
+               var bytes = self.bytes
                var steps = length / 4
-               var result_length = steps*3
-
-               var padding_begin = self.search(padding)
-               var padding_count : Int
-               if padding_begin == null then
-                       padding_count = 0
-               else
-                       padding_count = length - padding_begin.from
-                       steps -= 1
-                       result_length -= padding_count
-               end
-
-               var result = ("#"*result_length).to_cstring
-
-               var mask_8bit = 255
-
-               for s in [0..steps[ do
-                       var e = 0
-                       for ss in [0..4[ do
-                               e += inverted_base64_chars[self.chars[s*4+ss]].lshift((3-ss)*6)
-                       end
+               var result_length = steps * 3
 
-                       for ss in [0..3[ do
-                               result[s*3+ss] = e.rshift((2-ss)*8).bin_and( mask_8bit ).ascii
-                       end
+               var epos = length - 1
+               var padding_len = 0
+               while epos >= 0 and bytes[epos] == padding do
+                       epos -= 1
+                       padding_len += 1
                end
 
-               var s = steps
-               if padding_count == 1 then
-                       var e = 0
-                       for ss in [0..3[ do
-                               e += inverted_base64_chars[self.chars[s*4+ss]].lshift((3-ss)*6)
-                       end
-
-                       for ss in [0..2[ do
-                               result[s*3+ss] = e.rshift((2-ss)*8).bin_and( mask_8bit ).ascii
-                       end
-               else if padding_count == 2 then
-                       var e = 0
-                       for ss in [0..2[ do
-                               e += inverted_base64_chars[self.chars[s*4+ss]].lshift((3-ss)*6)
-                       end
+               if padding_len != 0 then steps -= 1
+               if padding_len == 1 then result_length -= 1
+               if padding_len == 2 then result_length -= 2
+
+               var result = new NativeString(result_length + 1)
+               result[result_length] = 0u8
+
+               for s in [0 .. steps[ do
+                       var c0 = inv[bytes[s * 4]]
+                       var c1 = inv[bytes[s * 4 + 1]]
+                       var c2 = inv[bytes[s * 4 + 2]]
+                       var c3 = inv[bytes[s * 4 + 3]]
+                       result[s * 3] = ((c0 & 0b0011_1111u8) << 2) | ((c1 & 0b0011_0000u8) >> 4)
+                       result[s * 3 + 1] = ((c1 & 0b0000_1111u8) << 4) | ((c2 & 0b0011_1100u8) >> 2)
+                       result[s * 3 + 2] = ((c2 & 0b0000_0011u8) << 6) | (c3 & 0b0011_1111u8)
+               end
 
-                       result[s*3] = e.rshift(2*8).bin_and( mask_8bit ).ascii
+               var last_start = steps * 4
+               if padding_len == 1 then
+                       var c0 = inv[bytes[last_start]]
+                       var c1 = inv[bytes[last_start + 1]]
+                       var c2 = inv[bytes[last_start + 2]]
+                       result[result_length - 2] = ((c0 & 0b0011_1111u8) << 2) | ((c1 & 0b0011_0000u8) >> 4)
+                       result[result_length - 1] = ((c1 & 0b0000_1111u8) << 4) | ((c2 & 0b0011_1100u8) >> 2)
+               else if padding_len == 2 then
+                       var c0 = inv[bytes[last_start]]
+                       var c1 = inv[bytes[last_start + 1]]
+                       result[result_length - 1] = ((c0 & 0b0011_1111u8) << 2) | ((c1 & 0b0011_0000u8) >> 4)
                end
 
-               return result.to_s
+               return result.to_s_with_length(result_length)
        end
 end
index f4be1eb..263ad95 100644 (file)
@@ -18,7 +18,7 @@
 # var w = new FileWriter.open("/tmp/data.bin")
 # w.write "hello"
 # w.write_int64 123456789
-# w.write_byte 3
+# w.write_byte 3u8
 # w.write_float 1.25
 # w.write_double 1.234567
 # w.write_bits(true, false, true)
@@ -28,7 +28,7 @@
 # var r = new FileReader.open("/tmp/data.bin")
 # assert r.read(5) == "hello"
 # assert r.read_int64 == 123456789
-# assert r.read_byte == 3
+# assert r.read_byte == 3u8
 # assert r.read_float == 1.25
 # assert r.read_double == 1.234567
 #
@@ -70,7 +70,7 @@ redef abstract class Writer
        super BinaryStream
 
        # Write a boolean `value` on a byte, using 0 for `false` and 1 for `true`
-       fun write_bool(value: Bool) do write_byte if value then 1 else 0
+       fun write_bool(value: Bool) do write_byte if value then 1u8 else 0u8
 
        # Write up to 8 `Bool` in a byte
        #
@@ -81,9 +81,9 @@ redef abstract class Writer
        do
                assert bits.length <= 8
 
-               var int = 0
+               var int = 0u8
                for b in bits.length.times do
-                       if bits[b] then int += 2**b
+                       if bits[b] then int |= 1u8 << (7 - b)
                end
 
                write_byte int
@@ -97,7 +97,7 @@ redef abstract class Writer
        fun write_string(text: Text)
        do
                write text
-               write_byte 0x00
+               write_byte 0x00u8
        end
 
        # Write the length as a 64 bits integer, then the content of `text`
@@ -153,7 +153,7 @@ redef abstract class Reader
        # Read a single byte and return `true` if its value is different than 0
        #
        # Returns `false` when an error is pending (`last_error != null`).
-       fun read_bool: Bool do return read_byte != 0
+       fun read_bool: Bool do return read_byte != 0u8
 
        # Get an `Array` of 8 `Bool` by reading a single byte
        #
@@ -164,7 +164,11 @@ redef abstract class Reader
        do
                var int = read_byte
                if int == null then return new Array[Bool]
-               return [for b in 8.times do int.bin_and(2**b) > 0]
+               var arr = new Array[Bool]
+               for i in [7 .. 0].step(-1) do
+                       arr.push(((int >> i) & 1u8) != 0u8)
+               end
+               return arr
        end
 
        # Read a null terminated string
@@ -177,8 +181,8 @@ redef abstract class Reader
                var buf = new FlatBuffer
                loop
                        var byte = read_byte
-                       if byte == null or byte == 0x00 then return buf.to_s
-                       buf.chars.add byte.ascii
+                       if byte == null or byte == 0x00u8 then return buf.to_s
+                       buf.bytes.add byte
                end
        end
 
@@ -216,7 +220,7 @@ redef abstract class Reader
        end
 
        # Utility for `read_float`
-       private fun native_read_float(b0, b1, b2, b3: Int, big_endian: Bool): Float `{
+       private fun native_read_float(b0, b1, b2, b3: Byte, big_endian: Bool): Float `{
                union {
                        unsigned char b[4];
                        float val;
@@ -259,7 +263,7 @@ redef abstract class Reader
        end
 
        # Utility for `read_double`
-       private fun native_read_double(b0, b1, b2, b3, b4, b5, b6, b7: Int, big_endian: Bool): Float `{
+       private fun native_read_double(b0, b1, b2, b3, b4, b5, b6, b7: Byte, big_endian: Bool): Float `{
                union {
                        unsigned char b[8];
                        double val;
@@ -309,7 +313,7 @@ redef abstract class Reader
        end
 
        # Utility for `read_int64`
-       private fun native_read_int64(b0, b1, b2, b3, b4, b5, b6, b7: Int, big_endian: Bool): Int `{
+       private fun native_read_int64(b0, b1, b2, b3, b4, b5, b6, b7: Byte, big_endian: Bool): Int `{
                union {
                        unsigned char b[8];
                        int64_t val;
@@ -335,7 +339,7 @@ end
 
 redef class Int
        # Utility for `BinaryWriter`
-       private fun int64_byte_at(index: Int, big_endian: Bool): Int `{
+       private fun int64_byte_at(index: Int, big_endian: Bool): Byte `{
                union {
                        unsigned char bytes[8];
                        int64_t val;
@@ -354,7 +358,7 @@ end
 
 redef class Float
        # Utility for `BinaryWriter`
-       private fun float_byte_at(index: Int, big_endian: Bool): Int `{
+       private fun float_byte_at(index: Int, big_endian: Bool): Byte `{
                union {
                        unsigned char bytes[4];
                        float val;
@@ -371,7 +375,7 @@ redef class Float
        `}
 
        # Utility for `BinaryWriter`
-       private fun double_byte_at(index: Int, big_endian: Bool): Int `{
+       private fun double_byte_at(index: Int, big_endian: Bool): Byte `{
                union {
                        unsigned char bytes[8];
                        double val;
diff --git a/lib/binary/serialization.nit b/lib/binary/serialization.nit
new file mode 100644 (file)
index 0000000..d36f9c0
--- /dev/null
@@ -0,0 +1,500 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Serialize and deserialize Nit objects to binary streams
+#
+# The serialized data format uses a dictionary structure similar to BSON:
+#
+# ~~~raw
+# object = 0x01                   # null
+#        | 0x02 id attributes     # New object
+#        | 0x03 id                # Ref to object
+#        | 0x04 int64             # Int
+#        | 0x05 int8              # Bool (int8 != 0)
+#        | 0x06 int8              # Char
+#        | 0x07 double(64 bits)   # Float
+#        | 0x08 block             # String
+#        | 0x09 block             # NativeString
+#        | 0x0A flat_array;       # Array[nullable Object]
+#
+# block = int64 int8*;
+# cstring = int8* 0x00;
+# id = int64;
+#
+# attributes = attribute* 0x00;
+# attribute = cstring object;
+# ~~~
+module serialization
+
+import ::serialization::caching
+private import ::serialization::engine_tools
+import binary
+import more_collections
+
+# ---
+# Special bytes, marking the kind of objects in the stream and the end on an object
+
+private fun kind_null: Byte do return 0x01u8
+private fun kind_object_new: Byte do return 0x02u8
+private fun kind_object_ref: Byte do return 0x03u8
+private fun kind_int: Byte do return 0x04u8
+private fun kind_bool: Byte do return 0x05u8
+private fun kind_char: Byte do return 0x06u8
+private fun kind_float: Byte do return 0x07u8
+private fun kind_string: Byte do return 0x08u8
+private fun kind_native_string: Byte do return 0x09u8
+private fun kind_flat_array: Byte do return 0x0Au8
+
+private fun new_object_end: Byte do return 0x00u8
+
+#---
+# Engines
+
+# Writes Nit objects to the binary `stream`
+#
+# The output can be deserialized with `BinaryDeserializer`.
+class BinarySerializer
+       super CachingSerializer
+
+       # Target writing stream
+       var stream: Writer is writable
+
+       redef fun serialize(object)
+       do
+               if object == null then
+                       stream.write_byte kind_null
+               else serialize_reference(object)
+       end
+
+       redef fun serialize_attribute(name, value)
+       do
+               stream.write_string name
+               super
+       end
+
+       redef fun serialize_reference(object)
+       do
+               if cache.has_object(object) then
+                       # if already serialized, add local reference
+                       var id = cache.id_for(object)
+                       stream.write_byte kind_object_ref
+                       stream.write_int64 id
+               else
+                       # serialize here
+                       object.serialize_to_binary self
+               end
+       end
+
+       # Write `collection` as a simple list of objects
+       private fun serialize_flat_array(collection: Collection[nullable Object])
+       do
+               stream.write_byte kind_flat_array
+               stream.write_int64 collection.length
+               for e in collection do
+                       if not try_to_serialize(e) then
+                               assert e != null
+                               warn "Element of {collection} is not serializable, it is a {e}"
+                               serialize null
+                       end
+               end
+       end
+end
+
+# Deserialize Nit objects from a binary `stream`
+#
+# Used with `BinarySerializer`.
+class BinaryDeserializer
+       super CachingDeserializer
+
+       # Source `Reader` stream
+       var stream: Reader
+
+       # Last encountered object reference id.
+       #
+       # See `cache.received`.
+       private var just_opened_id: nullable Int = null
+
+       # Tree of attributes, deserialized but not yet claimed
+       private var unclaimed_attributes = new UnrolledList[HashMap[String, nullable Object]]
+
+       # Read and deserialize the next attribute name and value
+       #
+       # A `peeked_char` can suffix the next attribute name.
+       #
+       # Returns `null` on error.
+       private fun deserialize_next_attribute(peeked_char: nullable Byte):
+               nullable Couple[String, nullable Object]
+       do
+               # Try the next attribute
+               var next_attribute_name = stream.read_string
+               var next_object = deserialize_next_object
+
+               if stream.last_error != null then return null
+
+               if peeked_char != null then
+                       # Replace a char peeked to find an object end
+                       next_attribute_name = "{peeked_char}{next_attribute_name}"
+               end
+
+               return new Couple[String, nullable Object](next_attribute_name, next_object)
+       end
+
+       redef fun deserialize_attribute(name)
+       do
+               if unclaimed_attributes.last.keys.has(name) then
+                       # Pick in already deserialized attributes
+                       var value = unclaimed_attributes.last[name]
+                       unclaimed_attributes.last.keys.remove(name)
+                       return value
+               end
+
+               # Read attributes until we find the wanted one named `name`
+               loop
+                       var next = deserialize_next_attribute
+                       if next == null then
+                               # Error was already logged
+                               return null
+                       end
+
+                       var next_attribute_name = next.first
+                       var next_object = next.second
+
+                       # Got the wanted object
+                       if next_attribute_name == name then return next_object
+
+                       # An invalid attribute name is an heuristic for invalid data.
+                       # Hitting an object end marker will result in an empty string.
+                       assert next_attribute_name.is_valid_id else
+
+                               var error
+                               if next_attribute_name.is_empty then
+                                       # Reached the end of the object
+                                       error = new Error("Deserialization Error: Attributes '{name}' not in stream.")
+                               else
+                                       error = new Error("Deserialization Error: Got an invalid attribute name '{next_attribute_name}', expected '{name}'")
+                                       # TODO this is invalid data, break even on keep_going
+                               end
+                               errors.add error
+                               return null
+                       end
+
+                       # It's not the next attribute, put it aside
+                       unclaimed_attributes.last[next_attribute_name] = next_object
+               end
+       end
+
+       redef fun notify_of_creation(new_object)
+       do
+               var id = just_opened_id
+               if id == null then return
+               cache[id] = new_object
+       end
+
+       # Convert from simple Json object to Nit object
+       private fun deserialize_next_object: nullable Object
+       do
+               var kind = stream.read_byte
+               assert kind isa Byte else
+                       # TODO break even on keep_going
+                       return null
+               end
+
+               # After this point, all stream reading errors are caught later
+
+               if kind == kind_null then return null
+               if kind == kind_int then return stream.read_int64
+               if kind == kind_bool then return stream.read_bool
+               if kind == kind_float then return stream.read_double
+               if kind == kind_char then
+                       var b = stream.read_byte
+                       if b == null then return 0
+                       return b.to_i.ascii
+               end
+               if kind == kind_string then return stream.read_block
+               if kind == kind_native_string then return stream.read_block.to_cstring
+
+               if kind == kind_flat_array then
+                       # An array
+                       var length = stream.read_int64
+                       var array = new Array[nullable Object]
+                       for i in length.times do
+                               array.add deserialize_next_object
+                       end
+                       return array
+               end
+
+               if kind == kind_object_ref then
+                       # A reference
+                       var id = stream.read_int64
+                       if stream.last_error != null then return null
+
+                       if not cache.has_id(id) then
+                               errors.add new Error("Deserialization Error: Unknown reference to id #{id}")
+                               return null
+                       end
+                       return cache.object_for(id)
+               end
+
+               if kind == kind_object_new then
+                       # A new object
+                       var id = stream.read_int64
+                       if stream.last_error != null then return null
+
+                       if cache.has_id(id) then
+                               errors.add new Error("Deserialization Error: Duplicated use of reference #{id}")
+                               return null
+                       end
+
+                       var class_name = stream.read_string
+
+                       if stream.last_error != null then return null
+
+                       # Use the validity of the `class_name` as heuristic to detect invalid data
+                       if not class_name.is_valid_id then
+                               errors.add new Error("Deserialization Error: got an invalid class name '{class_name}'")
+                               return null
+                       end
+
+                       # Prepare opening a new object
+                       just_opened_id = id
+                       unclaimed_attributes.push new HashMap[String, nullable Object]
+
+                       var value = deserialize_class(class_name)
+
+                       # Check for the attributes end marker
+                       loop
+                               var next_byte = stream.read_byte
+                               if next_byte == new_object_end then break
+
+                               # Fetch an additional attribute, even if it isn't expected
+                               deserialize_next_attribute(next_byte)
+                       end
+
+                       # Close object
+                       unclaimed_attributes.pop
+                       just_opened_id = null
+
+                       return value
+               end
+
+               errors.add new Error("Deserialization Error: Unknown binary object kind `{kind}`")
+               # TODO fatal error and break even on keep_going
+               return null
+       end
+
+       redef fun deserialize
+       do
+               errors.clear
+
+               var value = deserialize_next_object
+
+               var error = stream.last_error
+               if error != null then
+                       errors.add error
+                       return true
+               end
+
+               return value
+       end
+end
+
+# ---
+# Services
+
+redef class Text
+       # Is `self` a valid identifier for a Nit class or property?
+       private fun is_valid_id: Bool
+       do
+               if trim.is_empty then return false
+
+               for c in chars do
+                       if not (c.is_letter or c.is_numeric or c == '[' or c == ']' or
+                               c == ' ' or c == ',' or c == '_') then return false
+               end
+
+               return true
+       end
+end
+
+# ---
+# Per class serialization behavior
+
+redef class Serializable
+       # Write the binary serialization header
+       #
+       # The header for a normal object is:
+       # 1. The kind of object on 8 bits, `0x01` for a new object.
+       # 2. The id of this object so it is not serialized more than once.
+       # 3. The name of the object type as a null terminated string.
+       private fun serialize_header_to_binary(v: BinarySerializer)
+       do
+               var id = v.cache.new_id_for(self)
+               v.stream.write_byte kind_object_new # is object intro
+               v.stream.write_int64 id
+               v.stream.write_string class_name
+       end
+
+       # Write a normal object to binary
+       private fun serialize_to_binary(v: BinarySerializer)
+       do
+               serialize_header_to_binary v
+               core_serialize_to v
+               v.stream.write_byte new_object_end
+       end
+end
+
+redef class Int
+       redef fun serialize_to_binary(v)
+       do
+               v.stream.write_byte kind_int
+               v.stream.write_int64 self
+       end
+end
+
+redef class Float
+       redef fun serialize_to_binary(v)
+       do
+               v.stream.write_byte kind_float
+               v.stream.write_double self
+       end
+end
+
+redef class Bool
+       redef fun serialize_to_binary(v)
+       do
+               v.stream.write_byte kind_bool
+               v.stream.write_bool self
+       end
+end
+
+redef class Char
+       redef fun serialize_to_binary(v)
+       do
+               v.stream.write_byte kind_char
+               # Fix when UTF-8
+               v.stream.write_byte self.ascii.to_b
+       end
+end
+
+redef class String
+       redef fun serialize_to_binary(v)
+       do
+               v.stream.write_byte kind_string
+               v.stream.write_block self
+       end
+end
+
+redef class NativeString
+       redef fun serialize_to_binary(v)
+       do
+               v.stream.write_byte kind_native_string
+               v.stream.write_block to_s
+       end
+end
+
+redef class SimpleCollection[E]
+
+       redef fun serialize_to_binary(v)
+       do
+               serialize_header_to_binary v
+
+               v.stream.write_string "items"
+               v.serialize_flat_array self
+
+               v.stream.write_byte new_object_end
+       end
+
+       redef init from_deserializer(v)
+       do
+               # Give a chance to other engines, and defs
+               super
+
+               if v isa BinaryDeserializer then
+                       v.notify_of_creation self
+                       init
+
+                       var items = v.deserialize_attribute("items")
+                       assert items isa Array[nullable Object]
+                       for item in items do
+                               assert item isa E else
+                                       var item_type = "null"
+                                       if item != null then item_type = item.class_name
+
+                                       v.errors.add new Error("Deserialization Error: invalid type '{item_type}' for the collection '{class_name}'")
+                                       continue
+                               end
+
+                               add item
+                       end
+               end
+       end
+end
+
+redef class Map[K, V]
+       redef fun serialize_to_binary(v)
+       do
+               serialize_header_to_binary v
+
+               core_serialize_to v
+
+               v.stream.write_string "keys"
+               v.serialize_flat_array keys
+
+               v.stream.write_string "values"
+               v.serialize_flat_array values
+
+               v.stream.write_byte new_object_end
+       end
+
+       # Instantiate a new `Array` from its serialized representation.
+       redef init from_deserializer(v)
+       do
+               # Give a chance to other engines, and defs
+               super
+
+               if v isa BinaryDeserializer then
+                       v.notify_of_creation self
+
+                       init
+
+                       var keys = v.deserialize_attribute("keys")
+                       var values = v.deserialize_attribute("values")
+                       assert keys isa Array[nullable Object]
+                       assert values isa Array[nullable Object]
+
+                       for i in keys.length.times do
+                               var key = keys[i]
+                               var value = values[i]
+
+                               if not key isa K then
+                                       var item_type = "null"
+                                       if key != null then item_type = key.class_name
+
+                                       v.errors.add new Error("Deserialization Error: Invalid key type '{item_type}' for '{class_name}'")
+                                       continue
+                               end
+
+                               if not value isa V then
+                                       var item_type = "null"
+                                       if value != null then item_type = value.class_name
+
+                                       v.errors.add new Error("Deserialization Error: Invalid value type '{item_type}' for '{class_name}'")
+                                       continue
+                               end
+
+                               self[key] = value
+                       end
+               end
+       end
+end
index 003eb6f..505abcf 100644 (file)
@@ -133,7 +133,7 @@ class Bitmap
                        if b == null then
                                return
                        end
-                       bitmap_header[x] = b
+                       bitmap_header[x] = b.to_i
                end
                self.file_size = get_value(bitmap_header.subarray(2, 4))
                self.data_offset = get_value(bitmap_header.subarray(10, 4))
@@ -142,7 +142,7 @@ class Bitmap
                for x in [0..39] do
                        var b = fileReader.read_byte
                        if b == null then return
-                       dib_header[x] = b
+                       dib_header[x] = b.to_i
                end
                var dib_size = get_value(dib_header.subarray(0, 4))
                # only support BITMAPINFOHEADER
@@ -176,7 +176,7 @@ class Bitmap
                                        var red = bts[0] << 16
                                        var green = bts[1] << 8
                                        var blue = bts[2]
-                                       row.add(red + green + blue)
+                                       row.add(red.to_i + green.to_i + blue.to_i)
                                end
                                self.data.add(row)
                        end
index 06b2415..1f92337 100644 (file)
@@ -59,7 +59,7 @@ private class ManualBuffer
 
        init do ns = new NativeString(maxlen)
 
-       fun [](i: Int): Char do return ns[i]
+       fun [](i: Int): Byte do return ns[i]
 end
 
 # Simple implementation of the iterator on Substrings for `Leaf`
@@ -92,21 +92,24 @@ private class Leaf
 
        var buf: ManualBuffer
        var bns: NativeString is noinit
-       redef var length: Int is noinit
+       redef var length is noinit
+
+       # Unsafe, but since it is an experiment, don't mind
+       redef fun bytelen do return length
 
        redef fun empty do return new Leaf(new ManualBuffer)
 
        redef fun to_cstring do
                var len = length
                var ns = new NativeString(len + 1)
-               ns[len] = '\0'
+               ns[len] = 0u8
                buf.ns.copy_to(ns, len, 0, 0)
                return ns
        end
 
        redef fun substrings do return new LeafSubstrings(self)
 
-       redef fun [](i) do return buf[i]
+       redef fun [](i) do return buf[i].to_i.ascii
 
        init do
                bns = buf.ns
@@ -116,27 +119,15 @@ private class Leaf
        redef fun output do new FlatString.with_infos(buf.ns, length, 0, length - 1).output
 
        redef fun to_upper do
-               var x = new ManualBuffer
-               var nns = x.ns
-               var ns = bns
-               var mlen = length
-               for i in [0..mlen[ do
-                       nns[i] = ns[i].to_upper
-               end
-               x.pos = mlen - 1
-               return new Leaf(x)
+               var x = new FlatBuffer
+               for i in chars do x.add(i.to_upper)
+               return x.to_s
        end
 
        redef fun to_lower do
-               var x = new ManualBuffer
-               var nns = x.ns
-               var ns = bns
-               var mlen = length
-               for i in [0..mlen[ do
-                       nns[i] = ns[i].to_lower
-               end
-               x.pos = mlen - 1
-               return new Leaf(x)
+               var x = new FlatBuffer
+               for i in chars do x.add(i.to_lower)
+               return x.to_s
        end
 
        redef fun reversed do
@@ -165,8 +156,8 @@ private class Leaf
 
        redef fun +(o) do
                var s = o.to_s
-               var slen = s.length
-               var mlen = length
+               var slen = s.bytelen
+               var mlen = bytelen
                if slen == 0 then return self
                if mlen == 0 then return s
                var nlen = mlen + slen
@@ -175,14 +166,14 @@ private class Leaf
                        var bpos = buf.pos
                        var sits = s.items
                        if bpos == mlen then
-                               sits.copy_to(buf.ns, slen, s.index_from, bpos)
+                               sits.copy_to(buf.ns, slen, s.first_byte, bpos)
                                buf.pos = bpos + slen
                                return new Leaf(buf)
                        else
                                var b = new ManualBuffer
                                var nbns = b.ns
                                bns.copy_to(nbns, mlen, 0, 0)
-                               sits.copy_to(nbns, slen, s.index_from, mlen)
+                               sits.copy_to(nbns, slen, s.first_byte, mlen)
                                b.pos = nlen
                                return new Leaf(b)
                        end
@@ -213,7 +204,7 @@ private class Leaf
                                b = new ManualBuffer
                                bns.copy_to(b.ns, mlen, 0, 0)
                        end
-                       for i in s.chars do
+                       for i in s.bytes do
                                bns[bpos] = i
                                bpos += 1
                        end
@@ -226,12 +217,12 @@ redef class Concat
        redef fun to_cstring do
                var len = length
                var ns = new NativeString(len + 1)
-               ns[len] = '\0'
+               ns[len] = 0u8
                var off = 0
                for i in substrings do
                        var ilen = i.length
                        if i isa FlatString then
-                               i.items.copy_to(ns, ilen, i.index_from, off)
+                               i.items.copy_to(ns, ilen, i.first_byte, off)
                        else if i isa Leaf then
                                i.buf.ns.copy_to(ns, ilen, 0, off)
                        else
@@ -273,8 +264,8 @@ redef class FlatString
                if s isa FlatString then
                        if slen + mlen > maxlen then return new Concat(self, s)
                        var mits = items
-                       var sifrom = s.index_from
-                       var mifrom = index_from
+                       var sifrom = s.first_byte
+                       var mifrom = first_byte
                        var sits = s.items
                        var b = new ManualBuffer
                        var bns = b.ns
@@ -289,7 +280,7 @@ redef class FlatString
                        return new Concat(sl + self, s.right)
                else if s isa Leaf then
                        if slen + mlen > maxlen then return new Concat(self, s)
-                       var mifrom = index_from
+                       var mifrom = first_byte
                        var sb = s.buf
                        var b = new ManualBuffer
                        var bns = b.ns
@@ -328,20 +319,20 @@ redef class Array[E]
                        mypos += 1
                end
                var ns = new NativeString(sl + 1)
-               ns[sl] = '\0'
+               ns[sl] = 0u8
                i = 0
                var off = 0
                while i < mypos do
                        var tmp = na[i]
                        var tpl = tmp.length
                        if tmp isa FlatString then
-                               tmp.items.copy_to(ns, tpl, tmp.index_from, off)
+                               tmp.items.copy_to(ns, tpl, tmp.first_byte, off)
                                off += tpl
                        else
                                for j in tmp.substrings do
                                        var slen = j.length
                                        if j isa FlatString then
-                                               j.items.copy_to(ns, slen, j.index_from, off)
+                                               j.items.copy_to(ns, slen, j.first_byte, off)
                                        else if j isa Leaf then
                                                j.buf.ns.copy_to(ns, slen, 0, off)
                                        end
index a8e0c2f..04f7b20 100644 (file)
--- a/lib/c.nit
+++ b/lib/c.nit
@@ -119,7 +119,7 @@ end
 
 # Wrapper around an array of `unsigned char` in C (`unsigned char*`) with length and destroy state
 class CByteArray
-       super CArray[Int]
+       super CArray[Byte]
        redef type NATIVE: NativeCByteArray
 
        # Allocate a new array of `size`
@@ -128,8 +128,8 @@ class CByteArray
                super size
        end
 
-       # Build from an `Array[Int]`
-       new from(array: Array[Int])
+       # Build from a `SequenceRead[Byte]`
+       new from(array: SequenceRead[Byte])
        do
                var carray = new CByteArray(array.length)
                for i in array.length.times do
@@ -142,7 +142,7 @@ end
 # An array of `unsigned char` in C (`unsigned char*`)
 extern class NativeCByteArray `{ unsigned char* `}
        super NativeCArray
-       redef type E: Int
+       redef type E: Byte
 
        # Allocate a new array of `size`
        new(size: Int) `{ return calloc(size, sizeof(unsigned char)); `}
index befce9c..644c115 100644 (file)
@@ -254,6 +254,36 @@ class Counter[E]
                end
                return (sum / map.length.to_f).sqrt
        end
+
+       # The information entropy (Shannon entropy) of the elements in the counter (in bits).
+       fun entropy: Float
+       do
+               var res = 0.0
+               var sum = self.sum.to_f
+               for k, v in self do
+                       var f = v.to_f / sum
+                       res = res - f * f.log_base(2.0)
+               end
+               return res
+       end
+end
+
+redef class Collection[E]
+       # Create and fill up a counter with the elements of `self.
+       #
+       # ~~~
+       # var cpt = "abaa".chars.to_counter
+       # assert cpt['a'] == 3
+       # assert cpt['b'] == 1
+       # assert cpt.length == 2
+       # assert cpt.sum == 4
+       # ~~~
+       fun to_counter: Counter[E]
+       do
+               var res = new Counter[E]
+               res.inc_all(self)
+               return res
+       end
 end
 
 private class CounterComparator[E]
index b68623b..11c39bf 100644 (file)
@@ -165,7 +165,7 @@ class CurlHTTPRequest
                if not output_file_name == null then
                        opt_name = output_file_name
                else if not self.url.substring(self.url.length-1, self.url.length) == "/" then
-                       opt_name = self.url.basename("")
+                       opt_name = self.url.basename
                else
                        return answer_failure(0, "Unable to extract file name, please specify one")
                end
index 29ab34d..dab58bf 100644 (file)
@@ -115,59 +115,59 @@ extern class NativeCurl `{ CURL * `}
        # Request Chars internal information from the CURL session
        fun easy_getinfo_chars(opt: CURLInfoChars): nullable String
        do
-                var answ = new Container[NativeString]("".to_cstring)
+                var answ = new Ref[NativeString]("".to_cstring)
                 if not native_getinfo_chars(opt, answ).is_ok then return null
                 if answ.item.address_is_null then return null
                 return answ.item.to_s
        end
 
        # Internal method used to get String object information initially knowns as C Chars type
-       private fun native_getinfo_chars(opt: CURLInfoChars, res: Container[NativeString]): CURLCode
-       import Container[NativeString].item= `{
+       private fun native_getinfo_chars(opt: CURLInfoChars, res: Ref[NativeString]): CURLCode
+       import Ref[NativeString].item= `{
                char *r;
                CURLcode c = curl_easy_getinfo( self, opt, &r);
-               if (c == CURLE_OK) Container_of_NativeString_item__assign(res, r);
+               if (c == CURLE_OK) Ref_of_NativeString_item__assign(res, r);
                return c;
        `}
 
        # Request Long internal information from the CURL session
        fun easy_getinfo_long(opt: CURLInfoLong): nullable Int
        do
-                var answ = new Container[Int](0)
+                var answ = new Ref[Int](0)
                 if not native_getinfo_long(opt, answ).is_ok then return null
                 return answ.item
        end
 
        # Internal method used to get Int object information initially knowns as C Long type
-       private fun native_getinfo_long(opt: CURLInfoLong, res: Container[Int]): CURLCode
-       import Container[Int].item= `{
+       private fun native_getinfo_long(opt: CURLInfoLong, res: Ref[Int]): CURLCode
+       import Ref[Int].item= `{
                long r;
                CURLcode c = curl_easy_getinfo( self, opt, &r);
-               if (c == CURLE_OK) Container_of_Int_item__assign(res, r);
+               if (c == CURLE_OK) Ref_of_Int_item__assign(res, r);
                return c;
        `}
 
        # Request Double internal information from the CURL session
        fun easy_getinfo_double(opt: CURLInfoDouble): nullable Float
        do
-                var answ = new Container[Float](0.0)
+                var answ = new Ref[Float](0.0)
                 if not native_getinfo_double(opt, answ).is_ok then return null
                 return answ.item
        end
 
        # Internal method used to get Int object information initially knowns as C Double type
-       private fun native_getinfo_double(opt: CURLInfoDouble, res: Container[Float]): CURLCode
-       import Container[Float].item= `{
+       private fun native_getinfo_double(opt: CURLInfoDouble, res: Ref[Float]): CURLCode
+       import Ref[Float].item= `{
                double r;
                CURLcode c = curl_easy_getinfo(self, opt, &r);
-               if (c == CURLE_OK) Container_of_Float_item__assign(res, r);
+               if (c == CURLE_OK) Ref_of_Float_item__assign(res, r);
                return c;
        `}
 
        # Request SList internal information from the CURL session
        fun easy_getinfo_slist(opt: CURLInfoSList): nullable Array[String]
        do
-               var answ = new Container[CURLSList](new CURLSList)
+               var answ = new Ref[CURLSList](new CURLSList)
                if not native_getinfo_slist(opt, answ).is_ok then return null
 
                var native = answ.item
@@ -177,11 +177,11 @@ extern class NativeCurl `{ CURL * `}
        end
 
        # Internal method used to get Array[String] object information initially knowns as C SList type
-       private fun native_getinfo_slist(opt: CURLInfoSList, res: Container[CURLSList]): CURLCode
-       import Container[CURLSList].item= `{
+       private fun native_getinfo_slist(opt: CURLInfoSList, res: Ref[CURLSList]): CURLCode
+       import Ref[CURLSList].item= `{
                struct curl_slist* csl;
                CURLcode c = curl_easy_getinfo(self, opt, &csl);
-               if (c == CURLE_OK) Container_of_CURLSList_item__assign(res, csl);
+               if (c == CURLE_OK) Ref_of_CURLSList_item__assign(res, csl);
                return c;
        `}
 
@@ -342,6 +342,7 @@ redef class Collection[E]
                assert collectionItemType: self isa Collection[String] else
                        print "Collection item must be strings."
                end
+               if is_empty then return new CURLSList
                var primList = new CURLSList.with_str(self.first)
                var is_first = true
                for s in self do
@@ -696,8 +697,12 @@ extern class CURLOption `{ CURLoption `}
 
        # Connection Options
 
-#      new     `{ return CURLOPT_TIMEOUT; `}
-#      new     `{ return CURLOPT_TIMEOUT_MS; `}
+       # Set maximum time the request is allowed to take.
+       new     timeout `{ return CURLOPT_TIMEOUT; `}
+
+       # Set maximum time the request is allowed to take (in ms).
+       new     timeout_ms `{ return CURLOPT_TIMEOUT_MS; `}
+
 #      new     `{ return CURLOPT_LOW_SPEED_LIMIT; `}
 #      new     `{ return CURLOPT_LOW_SPEED_TIME; `}
 #      new     `{ return CURLOPT_MAX_SEND_SPEED_LARGE; `}
index 19e8ceb..d47b33f 100755 (executable)
@@ -58,9 +58,7 @@ class Time
        # Get the current time of the day
        init now do
                var tm = new Tm.localtime
-               hour = tm.hour
-               minute = tm.min
-               second = tm.sec
+               init(tm.hour, tm.min, tm.sec)
        end
 
        # Get the difference between two times in second
@@ -104,9 +102,7 @@ class Date
        # The date of this day
        init today do
                var tm = new Tm.localtime
-               year = 1900 + tm.year
-               month = tm.mon + 1
-               day = tm.mday
+               init(1900 + tm.year, tm.mon + 1, tm.mday)
        end
 
        # `self` formatted according to ISO 8601
index 9234057..786bdcc 100644 (file)
 module dom
 
 import parser
+
+redef class XMLEntity
+
+       # The `XMLTag` children with the `tag_name`
+       #
+       # ~~~
+       # var code = """
+       # <?xml version="1.0" encoding="us-ascii"?>
+       # <animal>
+       #     <cat/>
+       #     <tiger>This is a white tiger!</tiger>
+       #     <cat/>
+       # </animal>"""
+       #
+       # var xml = code.to_xml
+       # assert xml["animal"].length == 1
+       # assert xml["animal"].first["cat"].length == 2
+       # ~~~
+       fun [](tag_name: String): Array[XMLEntity]
+       do
+               var res = new Array[XMLEntity]
+               for child in children do
+                       if child isa XMLTag and child.tag_name == tag_name then
+                               res.add child
+                       end
+               end
+               return res
+       end
+end
+
+redef class XMLStartTag
+
+       # Content of this XML tag held within a `PCDATA` or `CDATA`
+       #
+       # ~~~
+       # var code = """
+       # <?xml version="1.0" encoding="us-ascii"?>
+       # <animal>
+       #     <cat/>
+       #     <tiger>This is a white tiger!</tiger>
+       #     <cat/>
+       # </animal>"""
+       #
+       # var xml = code.to_xml
+       # assert xml["animal"].first["tiger"].first.as(XMLStartTag).data == "This is a white tiger!"
+       # ~~~
+       fun data: String
+       do
+               for child in children do
+                       if child isa PCDATA then return child.content
+                       if child isa CDATA then return child.content
+               end
+               abort
+       end
+end
diff --git a/lib/dom/examples/checker.nit b/lib/dom/examples/checker.nit
new file mode 100644 (file)
index 0000000..cc3b341
--- /dev/null
@@ -0,0 +1,43 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# This file is free software, which comes along with NIT.  This software is
+# distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+# without  even  the implied warranty of  MERCHANTABILITY or  FITNESS FOR A
+# PARTICULAR PURPOSE.  You can modify it is you want,  provided this header
+# is kept unaltered, and a notification of the changes is added.
+# You  are  allowed  to  redistribute it and sell it, alone or is a part of
+# another product.
+
+# Simple XML validity checker using the `dom` module
+module checker
+
+import dom
+
+# Check arguments
+if args.length != 1 then
+       print_error "Usage: checker xml_file"
+       exit 2
+end
+
+var path = args.first
+if not path.file_exists then
+       print_error "Path '{path}' does not exist"
+       exit 3
+end
+
+# Read file
+var content = path.to_path.read_all
+
+# Parse XML
+var xml = content.to_xml
+
+# Check for errors
+if xml isa XMLError then
+       print_error "XML file at '{path}' is invalid:"
+       print_error xml.message
+       var loc = xml.location
+       if loc != null then print_error loc
+       exit 1
+else
+       print "XML file at '{path}' is valid"
+end
index a4d8d41..fe95094 100644 (file)
@@ -37,7 +37,7 @@ class XMLProcessor
                                        stack.push tag
                                else if tag isa XMLEndTag then
                                        if stack.is_empty then
-                                               return new XMLError(location = tag.location, "Missing matching tag for `{tag.tag_name}`")
+                                               return new XMLError(tag.location, "Missing matching tag for `{tag.tag_name}`")
                                        end
                                        var st_last = stack.last
                                        if tag.tag_name == st_last.tag_name then
@@ -46,7 +46,7 @@ class XMLProcessor
                                                stack.pop
                                        else
                                                var miss = stack.pop
-                                               return new XMLError("Missing matching tag for `{miss.tag_name}`", location=miss.location)
+                                               return new XMLError(miss.location, "Missing matching tag for `{miss.tag_name}`")
                                        end
                                else if tag isa XMLError then
                                        return tag
@@ -60,7 +60,8 @@ class XMLProcessor
                        else
                                var st = pos
                                var end_pc = ignore_until("<") - 1
-                               var pc = new PCDATA(src.substring(st, end_pc - st + 1).trim)
+                               var loc = new Location(line, line_offset)
+                               var pc = new PCDATA(loc, src.substring(st, end_pc - st + 1).trim)
                                if stack.is_empty then
                                        pc.parent = doc
                                else
@@ -70,7 +71,7 @@ class XMLProcessor
                end
                if not stack.is_empty then
                        var miss = stack.pop
-                       return new XMLError("Missing matching tag for `{miss.tag_name}`", location=miss.location)
+                       return new XMLError(miss.location, "Missing matching tag for `{miss.tag_name}`")
                end
                return doc
        end
@@ -79,8 +80,7 @@ class XMLProcessor
        private fun read_tag: XMLEntity do
                var st_loc = new Location(line, line_offset)
                var c = src[pos]
-               if not c == '<' then return new XMLError(location=st_loc, "Expected start of tag, got `{c}`")
-               var st = pos
+               if not c == '<' then return new XMLError(st_loc, "Expected start of tag, got `{c}`")
                pos += 1
                c = src[pos]
                if c == '!' then
@@ -104,14 +104,14 @@ class XMLProcessor
        private fun read_special_tag(st_loc: Location): XMLEntity do
                var srclen = src.length
                pos += 1
-               if (pos + 2) >= srclen then return new XMLError(location=st_loc, "Unexpected EOF on start of Special tag")
+               if (pos + 2) >= srclen then return new XMLError(st_loc, "Unexpected EOF on start of Special tag")
                if src[pos] == '-' and src[pos + 1] == '-' then
                        pos += 2
                        var comst = pos
                        var endcom = ignore_until("-->")
-                       if endcom == -1 then return new XMLError(location=st_loc, "Malformatted comment")
+                       if endcom == -1 then return new XMLError(st_loc, "Malformed comment")
                        pos += 3
-                       return new XMLCommentTag(location=st_loc ,src.substring(comst, endcom - comst + 1))
+                       return new XMLCommentTag(st_loc ,src.substring(comst, endcom - comst + 1))
                end
                var st = pos
                if srclen - pos >= 7 then
@@ -121,8 +121,8 @@ class XMLProcessor
                                var cdst = pos
                                var cdend = ignore_until("]]>")
                                pos += 3
-                               if pos >= srclen then return new XMLError(location = st_loc, "Unfinished CDATA block")
-                               return new CDATA(src.substring(cdst, cdend - cdst))
+                               if pos >= srclen then return new XMLError(st_loc, "Unfinished CDATA block")
+                               return new CDATA(st_loc, src.substring(cdst, cdend - cdst))
                        else if spe_type == "DOCTYPE" then
                                pos += 7
                                return parse_doctype(st_loc)
@@ -130,7 +130,7 @@ class XMLProcessor
                end
                var end_spec = ignore_until(">")
                pos += 1
-               return new XMLSpecialTag(location=st_loc, src.substring(st, end_spec - st))
+               return new XMLSpecialTag(st_loc, src.substring(st, end_spec - st))
        end
 
        # Parse a Doctype declaration tag
@@ -139,27 +139,27 @@ class XMLProcessor
                var srclen = src.length
                loop
                        ignore_whitespaces
-                       if pos >= srclen then return new XMLError(location = st_loc, "Malformatted doctype")
+                       if pos >= srclen then return new XMLError(st_loc, "Malformed doctype")
                        var c = src[pos]
                        # TODO: Properly support intern DOCTYPE definitions
                        if c == '[' then
                                var intern_st = pos
                                var intern_end = ignore_until("]")
-                               if intern_end == -1 then return new XMLError(location = st_loc, "Unfinished internal doctype declaration")
+                               if intern_end == -1 then return new XMLError(st_loc, "Unfinished internal doctype declaration")
                                pos += 1
                                elemts.push src.substring(intern_st, intern_end - intern_st + 1)
                                continue
                        end
                        var elm_st = pos
                        while pos < srclen and not src[pos].is_whitespace and src[pos] != '>' do pos += 1
-                       if pos >= srclen then return new XMLError(location = st_loc, "Malformatted doctype")
+                       if pos >= srclen then return new XMLError(st_loc, "Malformed doctype")
                        if pos - elm_st > 1 then
                                var str = src.substring(elm_st, pos - elm_st)
                                elemts.push str
                        end
                        if src[pos] == '>' then
                                pos += 1
-                               return new XMLDoctypeTag(location = st_loc, "DOCTYPE", elemts.join(" "))
+                               return new XMLDoctypeTag(st_loc, "DOCTYPE", elemts.join(" "))
                        end
                end
        end
@@ -170,70 +170,67 @@ class XMLProcessor
        private fun read_prolog_tag(st_loc: Location): XMLEntity do
                var srclen = src.length
                pos += 1
-               if pos >= srclen then return new XMLError(location=st_loc, "Invalid start of prolog")
-               var idst = pos
+               if pos >= srclen then return new XMLError(st_loc, "Invalid start of prolog")
                var tag_name = parse_tag_name(['<', '>'])
                var c = src[pos]
-               if c == '<' or c == '>' then return new XMLError(location=st_loc ,"Unexpected character `{c}` in prolog declaration")
+               if c == '<' or c == '>' then return new XMLError(st_loc ,"Unexpected character `{c}` in prolog declaration")
                if tag_name == "xml" then
                        var args = parse_args(['?'])
                        for i in args do
-                               if i isa BadXMLAttribute then return new XMLError(location = i.location, i.name)
+                               if i isa BadXMLAttribute then return new XMLError(i.location, i.name)
                        end
                        if src[pos] == '?' then
                                if src[pos + 1] == '>' then
                                        pos += 2
-                                       return new XMLPrologTag(location=st_loc, tag_name, args)
+                                       return new XMLPrologTag(st_loc, tag_name, args)
                                end
                        end
                else
-                       if tag_name.has("xml") then return new XMLError(location = st_loc, "Forbidden keyword xml in Processing Instruction")
+                       if tag_name.has("xml") then return new XMLError(st_loc, "Forbidden keyword xml in Processing Instruction")
                        var cont_st = pos
                        var cont_end = ignore_until("?>")
                        if cont_end == -1 then
                                pos += 2
-                               return new XMLError(location = st_loc, "Malformatted Processing Instruction tag")
+                               return new XMLError(st_loc, "Malformed Processing Instruction tag")
                        end
                        pos += 2
-                       return new XMLProcessingInstructionTag(location=st_loc, tag_name, src.substring(cont_st, cont_end - cont_st))
+                       return new XMLProcessingInstructionTag(st_loc, tag_name, src.substring(cont_st, cont_end - cont_st))
                end
                pos += 1
-               return new XMLError(location=st_loc, "Malformatted prolog tag")
+               return new XMLError(st_loc, "Malformed prolog tag")
        end
 
        # Reads an End tag (starting with </)
        #
        # In case of error, returns a `XMLError`
        private fun read_end_tag(st_loc: Location): XMLEntity do
-               var srclen = src.length
                pos += 1
                var tag_name = parse_tag_name(['<', '>'])
                ignore_whitespaces
                if src[pos] == '>' then
                        pos += 1
-                       return new XMLEndTag(location=st_loc, tag_name)
+                       return new XMLEndTag(st_loc, tag_name)
                end
-               return new XMLError(location = st_loc, "Bad end tag `{tag_name}`")
+               return new XMLError(st_loc, "Bad end tag `{tag_name}`")
        end
 
        # Reads a Start tag (starting with <)
        #
        # In case of error, returns a `XMLError`
        private fun read_start_tag(st_loc: Location): XMLEntity do
-               var srclen = src.length
                var tag_name = parse_tag_name(['/', '>'])
                var args = parse_args(['/', '>'])
                for i in args do
-                       if i isa BadXMLAttribute then return new XMLError(location=i.location, i.name)
+                       if i isa BadXMLAttribute then return new XMLError(i.location, i.name)
                end
                if src[pos] == '/' then
                        if src[pos + 1] == '>' then
                                pos += 2
-                               return new XMLOnelinerTag(location=st_loc, tag_name, args)
+                               return new XMLOnelinerTag(st_loc, tag_name, args)
                        end
                end
                pos += 1
-               return new XMLStartTag(location=st_loc, tag_name, args)
+               return new XMLStartTag(st_loc, tag_name, args)
        end
 
        # Parses an xml tag name
@@ -262,31 +259,30 @@ class XMLProcessor
        # Parses the next argument in `src`
        private fun parse_arg(endtags: Array[Char]): XMLAttribute do
                var srclen = src.length
-               var attr: XMLAttribute
                ignore_whitespaces
                var st_loc = new Location(line, line_offset)
-               if pos >= srclen then return new BadXMLAttribute(location = st_loc, "Unfinished attribute name")
+               if pos >= srclen then return new BadXMLAttribute(st_loc, "Unfinished attribute name")
                # FIXME: Ugly, but as long as it remains private, it is OK I guess
-               if endtags.has(src[pos]) then return new XMLAttributeEnd("")
+               if endtags.has(src[pos]) then return new XMLAttributeEnd(st_loc, "")
                var attrname_st = pos
                while pos < srclen and src[pos] != '=' and not endtags.has(src[pos]) do pos += 1
-               if pos >= srclen then return new BadXMLAttribute(location = st_loc, "Unfinished attribute name")
-               if src[pos] != '=' then return new BadXMLAttribute(location = st_loc, "Malformatted attribute")
+               if pos >= srclen then return new BadXMLAttribute(st_loc, "Unfinished attribute name")
+               if src[pos] != '=' then return new BadXMLAttribute(st_loc, "Malformed attribute")
                var attrname_end = pos - 1
                var name = src.substring(attrname_st, attrname_end - attrname_st + 1).trim
                pos += 1
                ignore_whitespaces
                var attrval_st = pos
-               if pos >= srclen then return new BadXMLAttribute(location=st_loc, "Unfinished attribute `{name}`")
+               if pos >= srclen then return new BadXMLAttribute(st_loc, "Unfinished attribute `{name}`")
                var match = src[pos]
-               if match != '\'' and match != '"' then return new BadXMLAttribute(location=st_loc, "Invalid string delimiter `{match}` for attribute `{name}`")
+               if match != '\'' and match != '"' then return new BadXMLAttribute(st_loc, "Invalid string delimiter `{match}` for attribute `{name}`")
                pos += 1
                while pos < srclen and src[pos] != match do pos += 1
-               if pos >= srclen then return new BadXMLAttribute(location=st_loc, "Unfinished attribute `{name}`")
+               if pos >= srclen then return new BadXMLAttribute(st_loc, "Unfinished attribute `{name}`")
                var attrval_end = pos
                var val = src.substring(attrval_st, attrval_end - attrval_st + 1).trim
                pos += 1
-               return new XMLStringAttr(location=st_loc, name, val.substring(1, val.length - 2), match)
+               return new XMLStringAttr(st_loc, name, val.substring(1, val.length - 2), match)
        end
 end
 
index ef080d4..8aa4f6b 100644 (file)
@@ -36,7 +36,7 @@ import parser_base
 # Any kind of XML Entity
 abstract class XMLEntity
        # Optional parent of `self`
-       var parent: nullable XMLEntity is private writable(set_parent)
+       var parent: nullable XMLEntity = null is private writable(set_parent)
 
        # Optional location of the entity in source
        var location: nullable Location
@@ -46,6 +46,7 @@ abstract class XMLEntity
 
        # Sets the parent of `self` to `e`
        fun parent=(e: XMLEntity) do
+               var parent = self.parent
                if parent != null then
                        parent.children.remove(self)
                end
@@ -60,7 +61,7 @@ private class XMLEntities
        # The owner, aka, the parent
        var owner: XMLEntity
 
-       private var entities = new List[XMLEntity]
+       var entities = new List[XMLEntity]
 
        redef fun length do return entities.length
 
@@ -68,8 +69,9 @@ private class XMLEntities
 
        redef fun []=(index, el) do
                var olde = self[index]
-               if olde.parent != null then
-                       olde.parent.children.remove(el)
+               var olde_parent = olde.parent
+               if olde_parent != null then
+                       olde_parent.children.remove(el)
                end
                entities[index] = el
                el.set_parent owner
@@ -129,7 +131,7 @@ end
 class XMLDocument
        super XMLEntity
 
-       redef fun to_s do return children.join("")
+       redef fun to_s do return children.join
 end
 
 # PCDATA is any kind of non-xml formatted text
@@ -198,6 +200,7 @@ class XMLStartTag
                end
                s += ">"
                for i in children do s += i.to_s
+               var matching = self.matching
                if matching != null then s += matching.to_s
                return s
        end
@@ -214,6 +217,7 @@ end
 class XMLProcessingInstructionTag
        super XMLTag
 
+       # Raw content usable by the third-party application
        var content: String
 
        redef fun to_s do return "<?{tag_name} {content}?>"
@@ -240,6 +244,7 @@ end
 class XMLDoctypeTag
        super XMLTag
 
+       # Raw content
        var content: String
 
        redef fun to_s do return "<!DOCTYPE {content}>"
@@ -294,5 +299,12 @@ class XMLError
        # Error message reported by the parser
        var message: String
 
-       redef fun to_s do return "XML Error: {message} at {location.to_s}"
+       redef fun to_s do
+               var l = self.location
+               if l == null then
+                       return "XML Error: {message}"
+               else
+                       return "XML Error: {message} at {l}"
+               end
+       end
 end
diff --git a/lib/gamnit/gamnit.nit b/lib/gamnit/gamnit.nit
new file mode 100644 (file)
index 0000000..2fa5b8e
--- /dev/null
@@ -0,0 +1,16 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Game and multimedia framework for Nit
+module gamnit
diff --git a/lib/gamnit/network/client.nit b/lib/gamnit/network/client.nit
new file mode 100644 (file)
index 0000000..38db2db
--- /dev/null
@@ -0,0 +1,128 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Client-side network services for games and such
+#
+# The following code implements a client to connect to a local server and
+# briefly exchange with it.
+#
+# ~~~
+# redef fun handshake_app_name do return "nitwork_test"
+# redef fun handshake_app_version do return "1.0"
+#
+# # Prepare connection with remote server
+# var config = new RemoteServerConfig("localhost", 4444)
+# var server = new RemoteServer(config)
+#
+# # Try to connect
+# if not server.connect then return
+#
+# # Make sure the server is compatible
+# if not server.handshake then return
+#
+# # Connection up! communicate
+# server.writer.serialize "hello server"
+# print server.reader.deserialize.as(Object)
+#
+# # Done, close socket
+# server.socket.close
+# ~~~
+module client
+
+import common
+
+# Information of the remove server
+class RemoteServerConfig
+
+       # Address of the remote server, either a domain name or an Internet address
+       var address: Text
+
+       # Listening port of the server
+       var port: Int
+end
+
+# Connection to a remote server
+class RemoteServer
+
+       # `RemoteServerConfig` used to initiate connection to the server
+       var config: RemoteServerConfig
+
+       # Communication socket with the server
+       var socket: nullable TCPStream = null
+
+       # Is this connection connected?
+       fun connected: Bool do return socket != null and socket.connected == true
+
+       # `BinarySerializer` used to send data to this client through `socket`
+       var writer: BinarySerializer is noinit
+
+       # `BinaryDeserializer` used to receive data from this client through `socket`
+       var reader: BinaryDeserializer is noinit
+
+       # Attempt connection with the remote server
+       fun connect: Bool
+       do
+               print "Connecting to {config.address}:{config.port}..."
+               var socket = new TCPStream.connect(config.address.to_s, config.port)
+               self.socket = socket
+
+               if not socket.connected then
+                       print "Connection failed: {socket.last_error or else "Internal error"}"
+                       return false
+               end
+
+               # Setup serialization
+               writer = new BinarySerializer(socket)
+               writer.cache = new AsyncCache(false)
+               reader = new BinaryDeserializer(socket)
+               writer.link reader
+
+               return true
+       end
+
+       # Attempt handshake with server
+       #
+       # Validates compatibility between `handshake_app_name` and `handshake_app_version`.
+       #
+       # On error, close `socket`.
+       fun handshake: Bool
+       do
+               # The client goes first so that the server doesn't show its hand
+               var socket = socket
+               assert socket != null
+
+               # App name
+               var app_name = sys.handshake_app_name
+               socket.write_string app_name
+
+               var server_app = socket.read_string
+               if server_app != app_name then
+                       print_error "Handshake Error: server app name is '{server_app}'"
+                       socket.close
+                       return false
+               end
+
+               # App version
+               socket.write_string sys.handshake_app_version
+
+               var server_version = socket.read_string
+               if server_version != sys.handshake_app_version then
+                       print_error "Handshake Error: server version is different '{server_version}'"
+                       socket.close
+                       return false
+               end
+
+               return true
+       end
+end
diff --git a/lib/gamnit/network/common.nit b/lib/gamnit/network/common.nit
new file mode 100644 (file)
index 0000000..54e764a
--- /dev/null
@@ -0,0 +1,35 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Services common to the `client` and `server` modules
+module common
+
+import socket
+import binary::serialization
+
+# Unique name of the application to use in the handshake
+#
+# This name must be the same between client/server and
+# it should not be used by other programs that may interfere.
+#
+# Both client and server refuse connections with a different name.
+fun handshake_app_name: String do return program_name
+
+# Version of the communication protocol to use in the handshake
+#
+# Its value should change with the communication protocol in such a way
+# that different versions indicates incompatible protocols.
+#
+# Both client and server refuse connections with a different version.
+fun handshake_app_version: String do return "0.0"
diff --git a/lib/gamnit/network/network.nit b/lib/gamnit/network/network.nit
new file mode 100644 (file)
index 0000000..83fd35d
--- /dev/null
@@ -0,0 +1,19 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Easy client/server logic for games and simple distributed applications
+module network
+
+import server
+import client
diff --git a/lib/gamnit/network/server.nit b/lib/gamnit/network/server.nit
new file mode 100644 (file)
index 0000000..fcff7a2
--- /dev/null
@@ -0,0 +1,160 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Server-side network services for games and such
+#
+# The following code creates a server that continuously listen for new clients,
+# and exchange with them briefly before disconnecting.
+#
+# ~~~nitish
+# redef fun handshake_app_name do return "nitwork_test"
+# redef fun handshake_app_version do return "1.0"
+#
+# Open a server on port 4444
+# var server = new Server(4444)
+#
+# loop
+#     # Accept new clients
+#     var new_clients = server.accept_clients
+#     for client in new_clients do
+#         # A client is connected, communicate!
+#         print ""
+#         print client.reader.deserialize.as(Object)
+#         client.writer.serialize "Goodbye client"
+#
+#         # Done, close socket
+#         client.socket.close
+#     end
+#
+#     # `accept_clients` in non-blocking,
+#     # sleep before tying again, or do something else.
+#     nanosleep(0, 50000000)
+#     printn "."
+# end
+# ~~~
+module server
+
+import common
+
+# Game server controller
+class Server
+
+       # Port for the `listening_socket`
+       var port: Int
+
+       # All connected `RemoteClient`
+       var clients = new Array[RemoteClient]
+
+       # Socket accepting new connections
+       var listening_socket: TCPServer is lazy do
+               print port
+               var socket = new TCPServer(port)
+               socket.listen 8
+               socket.blocking = false
+               return socket
+       end
+       init do listening_socket
+
+       # Accept currently waiting clients and return them as an array
+       fun accept_clients: Array[RemoteClient]
+       do
+               assert not listening_socket.closed
+
+               var new_clients = new Array[RemoteClient]
+               loop
+                       var client_socket = listening_socket.accept
+                       if client_socket == null then break
+
+                       var rc = new RemoteClient(client_socket)
+
+                       var handshake_success = rc.handshake
+                       if handshake_success then
+                               new_clients.add rc
+                               print "Server: Client at {client_socket.address} passed the handshake"
+                       else
+                               print_error "Server Error: Client at {client_socket.address} failed the handshake"
+                               client_socket.close
+                       end
+               end
+               return new_clients
+       end
+
+       # Broadcast a `message` to all `clients`, then flush the connection
+       fun broadcast(message: Serializable)
+       do
+               for client in clients do
+                       client.writer.serialize(message)
+                       client.socket.flush
+               end
+       end
+end
+
+# Reference to a remote client connected to this server
+class RemoteClient
+
+       # Communication socket with the client
+       var socket: TCPStream
+
+       # Is this client connected?
+       fun connected: Bool do return socket.connected
+
+       # `BinarySerializer` used to send data to this client through `socket`
+       var writer: BinarySerializer is noinit
+
+       # `BinaryDeserializer` used to receive data from this client through `socket`
+       var reader: BinaryDeserializer is noinit
+
+       init
+       do
+               # Setup serialization
+               writer = new BinarySerializer(socket)
+               writer.cache = new AsyncCache(true)
+               reader = new BinaryDeserializer(socket)
+               writer.link reader
+       end
+
+       # Check for compatibility with the client
+       fun handshake: Bool
+       do
+               print "Server: Handshake requested by {socket.address}"
+
+               # Make sure it is the same app
+               var server_app = sys.handshake_app_name
+               var client_app = socket.read_string
+               if server_app != client_app then
+                       print_error "Server Error: Client app name is '{client_app}'"
+
+                       # Send an empty string so the client read it and give up
+                       socket.write_string ""
+                       socket.close
+                       return false
+               end
+
+               socket.write_string server_app
+
+               # App version
+               var app_version = sys.handshake_app_version
+               var client_version = socket.read_string
+               if client_version != app_version then
+                       print_error "Handshake Error: client version is different '{client_version}'"
+                       socket.write_string ""
+                       socket.close
+                       return false
+               end
+
+               socket.write_string app_version
+
+               return true
+       end
+end
diff --git a/lib/geometry/angles.nit b/lib/geometry/angles.nit
new file mode 100644 (file)
index 0000000..f999637
--- /dev/null
@@ -0,0 +1,70 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Angle related service using `Float` to represent an angle in radians
+module angles
+
+import points_and_lines
+
+redef class Point[N]
+       # Arctangent function using the difference between `self` and `other` as trigonometric ratio
+       #
+       # Behave similarly to the toplevel `atan2` as it returns the angle in the appropriate quadrant.
+       #
+       # ~~~
+       # var p0 = new Point[Float](0.0, 0.0)
+       # var p1 = new Point[Float](1.0, 1.0)
+       # assert p0.atan2(p1).is_approx(0.25*pi, 0.0001)
+       # ~~~
+       fun atan2(other: Point[N]): Float
+       do
+               var dx = other.x.to_f - x.to_f
+               var dy = other.y.to_f - y.to_f
+               var a = sys.atan2(dy.to_f, dx.to_f)
+               return a
+       end
+end
+
+redef universal Float
+       # Normalize the `self` angle in radians to be within `[-pi .. pi[`
+       #
+       # ~~~
+       # assert (1.5*pi).angle_normalize.is_approx(-0.5*pi, 0.0001)
+       # assert 8.0.angle_normalize.is_approx(1.7168, 0.0001)
+       # assert (-1.0).angle_normalize == -1.0
+       # ~~~
+       fun angle_normalize: Float
+       do
+               var s = self
+               while s < -pi do s += 2.0*pi
+               while s >= pi do s -= 2.0*pi
+               return s
+       end
+
+       # Linear interpolation on the arc delimited by `self` and `other` at `p` out of 1.0
+       #
+       # The result is normalized with `angle_normalize`.
+       #
+       # ~~~
+       # assert 0.0.angle_lerp(pi, 0.5).is_approx(0.5*pi, 0.0001)
+       # assert 0.0.angle_lerp(pi, 8.5).is_approx(0.5*pi, 0.0001)
+       # assert 0.0.angle_lerp(pi, 7.5).is_approx(-0.5*pi, 0.0001)
+       # ~~~
+       fun angle_lerp(other, p: Float): Float
+       do
+               var d = other - self
+               var a = self + d*p
+               return a.angle_normalize
+       end
+end
index fc35c20..0e2d4b5 100644 (file)
@@ -120,48 +120,31 @@ class Box[N: Numeric]
 
                assert left != null and right != null and top != null and bottom != null
 
-               self.left = left
-               self.right = right
-               self.top = top
-               self.bottom = bottom
+               init(left, right, top, bottom)
        end
 
        # Create a `Box` using left, right, bottom and top
        init lrbt(left, right, bottom, top: N)
        do
-               self.left = left
-               self.right = right
-               self.top = top
-               self.bottom = bottom
+               init(left, right, top, bottom)
        end
 
        # Create a `Box` using left, right, top and bottom
        init lrtb(left, right, top, bottom: N)
        do
-               self.left = left
-               self.right = right
-               self.top = top
-               self.bottom = bottom
+               init(left, right, top, bottom)
        end
 
        # Create a `Box` using left, bottom, width and height
        init lbwh(left, bottom, width, height: N)
        do
-               self.left = left
-               self.bottom = bottom
-
-               self.right = left + width
-               self.top = bottom + height
+               init(left, left + width, bottom + height, bottom)
        end
 
        # Create a `Box` using left, top, width and height
        init ltwh(left, top, width, height: N)
        do
-               self.left = left
-               self.top = top
-
-               self.right = left + width
-               self.bottom = top - height
+               init(left, left+width, top, top - height)
        end
 
        redef fun to_s do return "<left: {left}, right: {right}, top: {top}, bottom: {bottom}>"
index d8fa6b3..7f01507 100644 (file)
@@ -19,3 +19,4 @@ module geometry
 
 import points_and_lines
 import boxes
+import angles
index 6c7fda6..f1efc72 100644 (file)
 # limitations under the License.
 
 # Provides interfaces and classes to represent basic geometry needs.
-module points_and_lines
+module points_and_lines is serialize
+
+import serialization
 
 # An abstract 2d point, strongly linked to its implementation `Point`
 interface IPoint[N: Numeric]
-       # horizontal coordinate
+
+       # Horizontal coordinate
        fun x: N is abstract
-       # vertical coordinate
+
+       # Vertical coordinate
        fun y: N is abstract
 
        redef fun to_s do return "({x}, {y})"
+
+       # Distance with `other`
+       #
+       # ~~~
+       # var p0 = new Point[Float](0.0, 0.0)
+       # var p1 = new Point[Float](2.0, 3.0)
+       # assert p0.dist(p1).is_approx(3.6, 0.01)
+       # ~~~
+       #
+       # TODO 3D implementation.
+       fun dist(other: Point[Numeric]): N
+       do
+               return x.value_of(dist2(other).to_f.sqrt)
+       end
+
+       # Square of the distance with `other`
+       #
+       # May be used as an approximation to compare distance between two points.
+       #
+       # ~~~
+       # var p0 = new Point[Float](0.0, 0.0)
+       # var p1 = new Point[Float](2.0, 3.0)
+       # assert p0.dist2(p1) == 13.0
+       # ~~~
+       #
+       # TODO 3D implementation.
+       fun dist2(other: Point[Numeric]): N
+       do
+               var dx = other.x.sub(x)
+               var dy = other.y.sub(y)
+               var s = (dx.mul(dx)).add(dy.mul(dy))
+               return x.value_of(s)
+       end
+
+       # Linear interpolation between `self` and `other` at `p` out of `1.0`
+       #
+       # ~~~
+       # var p0 = new Point[Float](0.0, 0.0)
+       # var p1 = new Point[Float](2.0, 3.0)
+       # assert p0.lerp(p1, 0.0) == p0
+       # assert p0.lerp(p1, 1.0) == p1
+       # assert p0.lerp(p1, 0.5) == new Point[Float](1.0, 1.5)
+       # ~~~
+       #
+       # TODO 3D implementation.
+       fun lerp(other: Point[Numeric], p: Float): Point[N]
+       do
+               var xx = x.to_f + (other.x.to_f - x.to_f).to_f * p
+               var yy = y.to_f + (other.y.to_f - y.to_f).to_f * p
+               return new Point[N](x.value_of(xx), y.value_of(yy))
+       end
+
+       redef fun ==(o) do return o isa IPoint[Numeric] and o.x == x and o.y == y
 end
 
 # A 2d point and an implementation of `IPoint`
@@ -83,7 +140,6 @@ class Line[N: Numeric]
                        point_right = a
                end
        end
-
 end
 
 # An abstract 3d line segment
index 8fc1969..7d274a5 100644 (file)
@@ -302,7 +302,7 @@ private abstract class PolygonSorter
 
        # init calculating the center
        init with_center(pts : Array[Array[Float]]) do
-               center = calc_center(pts)
+               init(calc_center(pts))
        end
 
        # Calculate the center
diff --git a/lib/github/README.md b/lib/github/README.md
new file mode 100644 (file)
index 0000000..64a7e98
--- /dev/null
@@ -0,0 +1,71 @@
+# Nit wrapper for Github API
+
+This module provides a Nit object oriented interface to access the Github api.
+
+## Accessing the API
+
+[[doc: GithubAPI]]
+
+### Authentification
+
+[[doc: GithubAPI::auth]]
+
+Token can also be recovered from user config with `get_github_oauth`.
+
+[[doc: get_github_oauth]]
+
+### Retrieving user data
+
+[[doc: load_user]]
+[[doc: User]]
+[[list: User]]
+
+### Retrieving repo data
+
+[[doc: load_repo]]
+[[doc: Repo]]
+[[list: Repo]]
+
+### Other data
+
+[[list: api]]
+
+### Advanced uses
+
+#### Caching
+
+[[doc: cache]]
+
+#### Custom requests
+
+[[doc: GithubAPI::get]]
+
+#### Change the user agent
+
+[[doc: GithubAPI::user_agent]]
+
+#### Debugging
+
+[[doc: verbose_lvl]]
+
+#### Using with GitLab
+
+If URL scheme of GitLab API follows the one of Github API, it may be possible to
+configure this wrapper to use a custom URL.
+
+[[doc: api_url]]
+
+## Creating hooks
+
+Using this API you can create Github hooks able to respond to actions performed
+on a repository.
+
+[[doc: hooks]]
+
+## Dealing with events
+
+GithubAPI can trigger different events depending on the hook configuration.
+
+[[doc: GithubEvent]]
+
+[[list: github::events]]
index 6f7c7d9..0d5a67a 100644 (file)
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Nit object oriented interface to Github api.
+# Nit object oriented interface to [Github api](https://developer.github.com/v3/).
 #
 # This modules reifies Github API elements as Nit classes.
 #
@@ -21,11 +21,9 @@ module api
 
 import github_curl
 
-# Interface to Github REST API.
+# Client to Github API
 #
-# Used by all `GithubEntity` to perform requests.
-#
-# Usage:
+# To access the API you need an instance of a `GithubAPI` client.
 #
 # ~~~
 # # Get Github authentification token.
@@ -36,7 +34,7 @@ import github_curl
 # var api = new GithubAPI(token)
 # ~~~
 #
-# The API client allows to get Github API entities:
+# The API client allows you to get Github API entities.
 #
 # ~~~
 # var repo = api.load_repo("privat/nit")
@@ -49,9 +47,16 @@ import github_curl
 # ~~~
 class GithubAPI
 
-       # Github API OAuth token.
+       # Github API OAuth token
+       #
+       # To access your private ressources, you must
+       # [authenticate](https://developer.github.com/guides/basics-of-authentication/).
+       #
+       # For client applications, Github recommands to use the
+       # [OAuth tokens](https://developer.github.com/v3/oauth/) authentification method.
+       #
+       #
        #
-       # This token is used to authenticate the application on Github API.
        # Be aware that there is [rate limits](https://developer.github.com/v3/rate_limit/)
        # associated to the key.
        var auth: String
@@ -140,9 +145,9 @@ class GithubAPI
                return res.as(JsonObject)
        end
 
-       # Get the Github user with `login`.
+       # Get the Github user with `login`
        #
-       # Returns `null` if the user cannot be found.
+       # Loads the `User` from the API or returns `null` if the user cannot be found.
        #
        #     var api = new GithubAPI(get_github_oauth)
        #     var user = api.load_user("Morriar")
@@ -154,7 +159,7 @@ class GithubAPI
 
        # Get the Github repo with `full_name`.
        #
-       # Returns `null` if the repo cannot be found.
+       # Loads the `Repo` from the API or returns `null` if the repo cannot be found.
        #
        #     var api = new GithubAPI(get_github_oauth)
        #     var repo = api.load_repo("privat/nit")
@@ -349,11 +354,10 @@ abstract class GithubEntity
        fun html_url: String do return json["html_url"].to_s
 end
 
-# A Github user.
+# A Github user
 #
+# Provides access to [Github user data](https://developer.github.com/v3/users/).
 # Should be accessed from `GithubAPI::load_user`.
-#
-# See <https://developer.github.com/v3/users/>.
 class User
        super GithubEntity
 
@@ -374,9 +378,8 @@ end
 
 # A Github repository.
 #
+# Provides access to [Github repo data](https://developer.github.com/v3/repos/).
 # Should be accessed from `GithubAPI::load_repo`.
-#
-# See <https://developer.github.com/v3/repos/>.
 class Repo
        super GithubEntity
 
index 9bc63a8..d4d5904 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Github API related features.
+# Nit wrapper for Github API
+#
+# This module provides a Nit object oriented interface to access the
+# [Github api](https://developer.github.com/v3/).
 module github
 
 import cache
index 62776e6..a15d439 100644 (file)
@@ -26,6 +26,9 @@ class GithubCurl
        var header: HeaderMap is noinit
 
        # OAuth token
+       #
+       # Use an empty string to disable authentication and connect
+       # anonymously (thus less capabilities and more rate limits)
        var auth: String
 
        # User agent (is used by github to contact devs in case of problems)
@@ -34,7 +37,7 @@ class GithubCurl
 
        init do
                header = new HeaderMap
-               header["Authorization"] = "token {auth}"
+               if auth != "" then header["Authorization"] = "token {auth}"
        end
 
        # Get the requested URI, and check the HTTP response. Then convert to JSON
@@ -131,8 +134,10 @@ class GithubError
        redef fun to_s do return "[{name}] {super}"
 end
 
+# Gets the Github token from `git` configuration
+#
 # Return the value of `git config --get github.oauthtoken`
-# return "" if no such a key
+# or `""` if no key exists.
 fun get_github_oauth: String
 do
        var p = new ProcessReader("git", "config", "--get", "github.oauthtoken")
diff --git a/lib/java/base.nit b/lib/java/base.nit
new file mode 100644 (file)
index 0000000..0db04a4
--- /dev/null
@@ -0,0 +1,195 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Supporting services for the FFI with Java
+#
+# This modules relies on `Sys::jvm`, `Sys::jni_env` and
+# `Sys::create_default_jvm` to get a handle on a JVM. You can adapt the
+# behavior of the FFI and services in this module by redefing
+# `Sys::create_default_jvm` and supply your own JVM object. You can manage
+# multiple java thread by switching the current environment in a redef
+# of `Sys::jni_env`, and multiple JVM using `Sys::jvm`.
+module base is
+       cflags "-I $(JAVA_HOME)/include/ -I $(JAVA_HOME)/include/linux/"
+       ldflags "-L $(JNI_LIB_PATH) -ljvm"
+       new_annotation extra_java_files
+end
+
+import jvm
+
+redef class Sys
+       private var jvm_cache: nullable JavaVM = null
+       private var jni_env_cache: nullable JniEnv = null
+
+       # Default Java Virtual Machine to use (will be instantiated using
+       # `create_default_jvm` if not already set)
+       fun jvm: JavaVM
+       do
+               if jvm_cache == null then create_default_jvm
+               return jvm_cache.as(not null)
+       end
+
+       # Sets the current default Java Virtual Machine (use with `jni_env=`)
+       fun jvm=(jvm: JavaVM) do jvm_cache = jvm
+
+       # Current main `JniEnv`
+       fun jni_env: JniEnv
+       do
+               if jni_env_cache == null then create_default_jvm
+               return jni_env_cache.as(not null)
+       end
+
+       # Sets the current default JNI env (use with `jvm=`)
+       fun jni_env=(jni_env: JniEnv) do jni_env_cache = jni_env
+
+       # Called by `jvm` and `jni_env` to instantiate a Java Virtual Machine.
+       # Used mostly for the FFI with Java.
+       protected fun create_default_jvm
+       do
+               var builder = new JavaVMBuilder
+
+               # By default, look for Java classes in a jar file the same directory as the executable
+               builder.options.add "-Djava.class.path={sys.program_name}.jar"
+
+               var jvm = builder.create_jvm
+               assert jvm != null else print "JVM creation failed"
+
+               self.jvm = jvm
+               self.jni_env = builder.jni_env.as(not null)
+       end
+
+       # Get a Java class by its name from the current `jni_env`
+       fun load_jclass(name: NativeString): JClass import jni_env `{
+               JNIEnv *nit_ffi_jni_env = Sys_jni_env(self);
+
+               // retrieve the implementation Java class
+               jclass java_class = (*nit_ffi_jni_env)->FindClass(nit_ffi_jni_env, name);
+               if (java_class == NULL) {
+                       fprintf(stderr, "Nit FFI with Java error: failed to load class.\\n");
+                       (*nit_ffi_jni_env)->ExceptionDescribe(nit_ffi_jni_env);
+                       exit(1);
+               }
+
+               return java_class;
+       `}
+end
+
+# A standard Java string `java.lang.String`
+#
+# Converted to a Nit string using `to_s`, or to a C string with `to_cstring`.
+# Created using `String::to_java_string` or `NativeString::to_java_string`.
+extern class JavaString in "Java" `{ java.lang.String `}
+       super JavaObject
+
+       # Get the string from Java and copy it to Nit memory
+       fun to_cstring: NativeString import sys, Sys.jni_env `{
+               Sys sys = JavaString_sys(self);
+               JNIEnv *env = Sys_jni_env(sys);
+
+               // Get the data from Java
+               const char *java_cstr = (*env)->GetStringUTFChars(env, self, NULL);
+               jsize len = (*env)->GetStringUTFLength(env, self);
+
+               // Copy it in control of Nit
+               char *nit_cstr = (char*)malloc(len+1);
+               memcpy(nit_cstr, java_cstr, len);
+               nit_cstr[len] = '\0';
+
+               // Free JNI ref and return
+               (*env)->ReleaseStringUTFChars(env, self, java_cstr);
+               return nit_cstr;
+       `}
+
+       redef fun to_s do return to_cstring.to_s
+end
+
+redef class NativeString
+       # Get a Java string from this C string
+       #
+       # This instance is only valid until the next execution of Java code.
+       # You can use `new_local_ref` to keep it longer.
+       fun to_java_string: JavaString import sys, Sys.jni_env `{
+               Sys sys = JavaString_sys(self);
+               JNIEnv *env = Sys_jni_env(sys);
+               return (*env)->NewStringUTF(env, self);
+       `}
+end
+
+redef class Text
+       # Get `self` as a `JavaString`
+       fun to_java_string: JavaString do return to_cstring.to_java_string
+end
+
+redef extern class JavaObject
+
+       # Returns a global reference to the Java object behind this reference
+       #
+       # You must use a global reference when keeping a Java object
+       # across execution of Java code, per JNI specification.
+       fun new_global_ref: SELF import sys, Sys.jni_env `{
+               Sys sys = JavaObject_sys(self);
+               JNIEnv *env = Sys_jni_env(sys);
+               return (*env)->NewGlobalRef(env, self);
+       `}
+
+       # Delete this global reference
+       fun delete_global_ref import sys, Sys.jni_env `{
+               Sys sys = JavaObject_sys(self);
+               JNIEnv *env = Sys_jni_env(sys);
+               (*env)->DeleteGlobalRef(env, self);
+       `}
+
+       # Delete this local reference
+       fun delete_local_ref import sys, Sys.jni_env `{
+               Sys sys = JavaObject_sys(self);
+               JNIEnv *env = Sys_jni_env(sys);
+               (*env)->DeleteLocalRef(env, self);
+       `}
+
+       # Pops the current local reference frame and return a valid reference to self
+       #
+       # Similar to `JavaVM::pop_local_frame` but returns a value.
+       fun pop_from_local_frame: SELF
+       do
+               var jni_env = sys.jni_env
+               return pop_from_local_frame_with_env(jni_env)
+       end
+
+       # Java implementation of `pop_from_local_frame`
+       protected fun pop_from_local_frame_with_env(jni_env: JniEnv): SELF `{
+               return (*jni_env)->PopLocalFrame(jni_env, self);
+       `}
+
+       # Is `self` null in Java?
+       #
+       # Since Java type system doesn't have the same `nullable` concept as Nit's,
+       # the two systems are not directly compatible. Any Nit instances of
+       # `JavaObject` may hold a Java null.
+       #
+       # To benefit from the safer type system of Nit, it is recommended to check
+       # the return of all extern methods implemented in Java to ensure the value
+       # is not a Java null. In case it is, you should replace it by a normal Nit
+       # `null`.
+       fun is_java_null: Bool in "Java" `{ return self == null; `}
+
+       # `JavaString` representation of `self` using Java's `toString`
+       fun to_java_string: JavaString in "Java" `{ return self.toString(); `}
+
+       # Use Java's `toString` for any `JavaObject`
+       redef fun to_s
+       do
+               if is_java_null then return super
+               return to_java_string.to_s
+       end
+end
index 0c24718..097158f 100644 (file)
@@ -28,7 +28,7 @@
 # ~~~
 module collections
 
-import java
+import base
 
 # Java primitive array
 #
index 6731c85..40d3f02 100644 (file)
@@ -19,7 +19,7 @@
 # This module is used by `android::assets_and_resources` and `android::audio`.
 module io
 
-import java
+import base
 
 in "Java" `{
        import java.io.File;
index cef7b22..116f40d 100644 (file)
@@ -1,7 +1,5 @@
 # This file is part of NIT ( http://www.nitlanguage.org ).
 #
-# Copyright 2014 Alexis Laferrière <alexis.laf@xymus.net>
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
 # The module `jvm` gives more control over the JVM instances and wraps
 # most of JNI functions. You can use it to further customize the behavior
 # of your code.
-module java is
-       cflags "-I $(JAVA_HOME)/include/ -I $(JAVA_HOME)/include/linux/"
-       ldflags "-L $(JNI_LIB_PATH) -ljvm"
-       new_annotation extra_java_files
-end
-
-import jvm
-
-redef class Sys
-       private var jvm_cache: nullable JavaVM = null
-       private var jni_env_cache: nullable JniEnv = null
-
-       # Default Java Virtual Machine to use (will be instantiated using
-       # `create_default_jvm` if not already set)
-       fun jvm: JavaVM
-       do
-               if jvm_cache == null then create_default_jvm
-               return jvm_cache.as(not null)
-       end
-
-       # Sets the current default Java Virtual Machine (use with `jni_env=`)
-       fun jvm=(jvm: JavaVM) do jvm_cache = jvm
-
-       # Current main `JniEnv`
-       fun jni_env: JniEnv
-       do
-               if jni_env_cache == null then create_default_jvm
-               return jni_env_cache.as(not null)
-       end
-
-       # Sets the current default JNI env (use with `jvm=`)
-       fun jni_env=(jni_env: JniEnv) do jni_env_cache = jni_env
-
-       # Called by `jvm` and `jni_env` to instantiate a Java Virtual Machine.
-       # Used mostly for the FFI with Java.
-       protected fun create_default_jvm
-       do
-               var builder = new JavaVMBuilder
-
-               # By default, look for Java classes in a jar file the same directory as the executable
-               builder.options.add "-Djava.class.path={sys.program_name}.jar"
-
-               var jvm = builder.create_jvm
-               assert jvm != null else print "JVM creation failed"
-
-               self.jvm = jvm
-               self.jni_env = builder.jni_env.as(not null)
-       end
-
-       # Get a Java class by its name from the current `jni_env`
-       fun load_jclass(name: NativeString): JClass import jni_env `{
-               JNIEnv *nit_ffi_jni_env = Sys_jni_env(self);
-
-               // retrieve the implementation Java class
-               jclass java_class = (*nit_ffi_jni_env)->FindClass(nit_ffi_jni_env, name);
-               if (java_class == NULL) {
-                       fprintf(stderr, "Nit FFI with Java error: failed to load class.\\n");
-                       (*nit_ffi_jni_env)->ExceptionDescribe(nit_ffi_jni_env);
-                       exit(1);
-               }
-
-               return java_class;
-       `}
-end
-
-# A standard Java string `java.lang.String`
-#
-# Converted to a Nit string using `to_s`, or to a C string with `to_cstring`.
-# Created using `String::to_java_string` or `NativeString::to_java_string`.
-extern class JavaString in "Java" `{ java.lang.String `}
-       super JavaObject
-
-       # Get the string from Java and copy it to Nit memory
-       fun to_cstring: NativeString import sys, Sys.jni_env `{
-               Sys sys = JavaString_sys(self);
-               JNIEnv *env = Sys_jni_env(sys);
-
-               // Get the data from Java
-               const jbyte *java_cstr = (char*)(*env)->GetStringUTFChars(env, self, NULL);
-               jsize len = (*env)->GetStringUTFLength(env, self);
-
-               // Copy it in control of Nit
-               char *nit_cstr = (char*)malloc(len+1);
-               memcpy(nit_cstr, java_cstr, len);
-               nit_cstr[len] = '\0';
-
-               // Free JNI ref and return
-               (*env)->ReleaseStringUTFChars(env, self, java_cstr);
-               return nit_cstr;
-       `}
-
-       redef fun to_s do return to_cstring.to_s
-end
-
-redef class NativeString
-       # Get a Java string from this C string
-       #
-       # This instance is only valid until the next execution of Java code.
-       # You can use `new_local_ref` to keep it longer.
-       fun to_java_string: JavaString import sys, Sys.jni_env `{
-               Sys sys = JavaString_sys(self);
-               JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewStringUTF(env, self);
-       `}
-end
-
-redef class Text
-       # Get `self` as a `JavaString`
-       fun to_java_string: JavaString do return to_cstring.to_java_string
-end
-
-redef extern class JavaObject
-
-       # Returns a global reference to the Java object behind this reference
-       #
-       # You must use a global reference when keeping a Java object
-       # across execution of Java code, per JNI specification.
-       fun new_global_ref: SELF import sys, Sys.jni_env `{
-               Sys sys = JavaObject_sys(self);
-               JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, self);
-       `}
-
-       # Delete this global reference
-       fun delete_global_ref import sys, Sys.jni_env `{
-               Sys sys = JavaObject_sys(self);
-               JNIEnv *env = Sys_jni_env(sys);
-               (*env)->DeleteGlobalRef(env, self);
-       `}
-
-       # Delete this local reference
-       fun delete_local_ref import sys, Sys.jni_env `{
-               Sys sys = JavaObject_sys(self);
-               JNIEnv *env = Sys_jni_env(sys);
-               (*env)->DeleteLocalRef(env, self);
-       `}
-
-       # Pops the current local reference frame and return a valid reference to self
-       #
-       # Similar to `JavaVM::pop_local_frame` but returns a value.
-       fun pop_from_local_frame: SELF
-       do
-               var jni_env = sys.jni_env
-               return pop_from_local_frame_with_env(jni_env)
-       end
-
-       private fun pop_from_local_frame_with_env(jni_env: JniEnv): SELF `{
-               return (*jni_env)->PopLocalFrame(jni_env, self);
-       `}
-
-       # Is `self` null in Java?
-       #
-       # Since Java type system doesn't have the same `nullable` concept as Nit's,
-       # the two systems are not directly compatible. Any Nit instances of
-       # `JavaObject` may hold a Java null.
-       #
-       # To benefit from the safer type system of Nit, it is recommended to check
-       # the return of all extern methods implemented in Java to ensure the value
-       # is not a Java null. In case it is, you should replace it by a normal Nit
-       # `null`.
-       fun is_java_null: Bool in "Java" `{ return self == null; `}
-
-       # `JavaString` representation of `self` using Java's `toString`
-       fun to_java_string: JavaString in "Java" `{ return self.toString(); `}
+module java
 
-       # Use Java's `toString` for any `JavaObject`
-       redef fun to_s
-       do
-               if is_java_null then return super
-               return to_java_string.to_s
-       end
-end
+import base
+import collections
index 7ba6763..7794ed5 100644 (file)
@@ -157,7 +157,7 @@ class Connection
        # Write a string to the connection
        redef fun write(str)
        do
-               native_buffer_event.write(str.to_cstring, str.length)
+               native_buffer_event.write(str.to_cstring, str.bytelen)
        end
 
        redef fun write_byte(byte) do native_buffer_event.write_byte(byte)
@@ -186,7 +186,7 @@ extern class NativeBufferEvent `{ struct bufferevent * `}
        `}
 
        # Write the byte `value`
-       fun write_byte(value: Int): Int `{
+       fun write_byte(value: Byte): Int `{
                unsigned char byt = (unsigned char)value;
                return bufferevent_write(self, &byt, 1);
        `}
index 8291616..4d7ff2b 100644 (file)
@@ -45,7 +45,7 @@ private class LinuxStore
 
                # Find DB path
                var config_home = xdg_basedir.config_home.to_s
-               var config_dir = config_home.join_path(sys.program_name.basename(""))
+               var config_dir = config_home.join_path(sys.program_name.basename)
                if not config_dir.file_exists then config_dir.mkdir
                var db_path = config_dir.join_path(db_file)
 
index 2fecee8..8b90102 100644 (file)
@@ -18,4 +18,3 @@
 module linux
 
 import app
-private import data_store
index eac11c2..854eed5 100644 (file)
@@ -396,7 +396,11 @@ class MarkdownProcessor
                        c2 = ' '
                end
 
-               var loc = text.pos_to_loc(pos)
+               var loc = new MDLocation(
+                       current_loc.line_start,
+                       current_loc.column_start + pos,
+                       current_loc.line_start,
+                       current_loc.column_start + pos)
 
                if c == '*' then
                        if c1 == '*' then
@@ -476,6 +480,12 @@ class MarkdownProcessor
                end
                return -1
        end
+
+       # Location used for next parsed token.
+       #
+       # This location can be changed by the emitter to adjust with `\n` found
+       # in the input.
+       private fun current_loc: MDLocation do return emitter.current_loc
 end
 
 # Emit output corresponding to blocks content.
@@ -519,15 +529,19 @@ class MarkdownEmitter
        # Transform and emit mardown text
        fun emit_text(text: Text) do emit_text_until(text, 0, null)
 
-       # Transform and emit mardown text starting at `from` and
+       # Transform and emit mardown text starting at `start` and
        # until a token with the same type as `token` is found.
-       # Go until the end of text if `token` is null.
+       # Go until the end of `text` if `token` is null.
        fun emit_text_until(text: Text, start: Int, token: nullable Token): Int do
                var old_text = current_text
                var old_pos = current_pos
                current_text = text
                current_pos = start
                while current_pos < text.length do
+                       if text[current_pos] == '\n' then
+                               current_loc.line_start += 1
+                               current_loc.column_start = -current_pos
+                       end
                        var mt = processor.token_at(text, current_pos)
                        if (token != null and not token isa TokenNone) and
                        (mt.is_same_type(token) or
@@ -570,6 +584,21 @@ class MarkdownEmitter
                return buffer_stack.last
        end
 
+       # Stacked locations.
+       private var loc_stack = new List[MDLocation]
+
+       # Push a new MDLocation on the stack.
+       private fun push_loc(location: MDLocation) do loc_stack.add location
+
+       # Pop the last buffer.
+       private fun pop_loc: MDLocation do return loc_stack.pop
+
+       # Current output buffer.
+       private fun current_loc: MDLocation do
+               assert not loc_stack.is_empty
+               return loc_stack.last
+       end
+
        # Append `e` to current buffer.
        fun add(e: Writable) do
                if e isa Text then
@@ -900,6 +929,11 @@ class MDLocation
        var column_end: Int
 
        redef fun to_s do return "{line_start},{column_start}--{line_end},{column_end}"
+
+       # Return a copy of `self`.
+       fun copy: MDLocation do
+               return new MDLocation(line_start, column_start, line_end, column_end)
+       end
 end
 
 # A block of markdown lines.
@@ -1128,7 +1162,9 @@ abstract class Block
        fun emit_blocks(v: MarkdownEmitter) do
                var block = self.block.first_block
                while block != null do
+                       v.push_loc(block.location)
                        block.kind.emit(v)
+                       v.pop_loc
                        block = block.next
                end
        end
@@ -1209,7 +1245,15 @@ end
 class BlockHeadline
        super Block
 
-       redef fun emit(v) do v.decorator.add_headline(v, self)
+       redef fun emit(v) do
+               var loc = block.location.copy
+               loc.column_start += start
+               v.push_loc(loc)
+               v.decorator.add_headline(v, self)
+               v.pop_loc
+       end
+
+       private var start = 0
 
        # Depth of the headline used to determine the headline level.
        var depth = 0
@@ -1238,6 +1282,7 @@ class BlockHeadline
                        line.leading = 0
                        line.trailing = 0
                end
+               self.start = start
                depth = level.min(6)
        end
 end
@@ -2495,24 +2540,6 @@ redef class Text
                return null
        end
 
-       # Init a `MDLocation` instance at `pos` in `self`.
-       private fun pos_to_loc(pos: Int): MDLocation do
-               assert pos <= length
-               var line = 1
-               var col = 0
-               var i = 0
-               while i <= pos do
-                       col += 1
-                       var c = self[i]
-                       if c == '\n' then
-                               line +=1
-                               col = 0
-                       end
-                       i +=1
-               end
-               return new MDLocation(line, col, line, col)
-       end
-
        # Is `self` an unsafe HTML element?
        private fun is_html_unsafe: Bool do return html_unsafe_tags.has(self.write_to_string)
 
index c6ea559..53c355f 100644 (file)
@@ -2800,6 +2800,26 @@ class TestTokenLocation
                        "TokenLink at 4,1--4,1"]
                (new TestTokenProcessor(stack)).process(string)
        end
+
+       fun test_token_location4 do
+               var string = "**Hello**\n\n`World`"
+               var stack =  [
+                       "TokenStrongStar at 1,1--1,1",
+                       "TokenStrongStar at 1,8--1,8",
+                       "TokenCodeSingle at 3,1--3,1",
+                       "TokenCodeSingle at 3,7--3,7"]
+               (new TestTokenProcessor(stack)).process(string)
+       end
+
+       fun test_token_location5 do
+               var string = "# *Title1*\n\n# *Title2*"
+               var stack =  [
+                       "TokenEmStar at 1,3--1,3",
+                       "TokenEmStar at 1,10--1,10",
+                       "TokenEmStar at 3,3--3,3",
+                       "TokenEmStar at 3,10--3,10"]
+               (new TestTokenProcessor(stack)).process(string)
+       end
 end
 
 class TestTokenProcessor
@@ -2811,8 +2831,10 @@ class TestTokenProcessor
                var token = super
                if token isa TokenNone then return token
                var res = "{token.class_name} at {token.location}"
-               print res
                var exp = test_stack.shift
+               print ""
+               print "EXP {exp}"
+               print "RES {res}"
                assert exp == res
                return token
        end
@@ -2852,6 +2874,15 @@ some code
                proc.emitter.decorator = new TestBlockDecorator(stack)
                proc.process(string)
        end
+
+       fun test_block_location3 do
+               var stack = [
+                       "BlockHeadline: 1,1--1,8",
+                       "BlockHeadline: 3,1--3,10"]
+               var string ="""# Title\n\n## Title 2"""
+               proc.emitter.decorator = new TestBlockDecorator(stack)
+               proc.process(string)
+       end
 end
 
 class TestBlockDecorator
diff --git a/lib/markdown/test_wikilinks.nit b/lib/markdown/test_wikilinks.nit
new file mode 100644 (file)
index 0000000..5c4fb7e
--- /dev/null
@@ -0,0 +1,73 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Test suites for module `markdown`
+module test_wikilinks is test_suite
+
+import test_markdown
+import wikilinks
+
+class TestTokenWikilink
+       super TestSuite
+
+       fun test_token_location1 do
+               var string = "[[wikilink]]"
+               var stack =  ["TokenWikiLink at 1,1--1,1"]
+               (new TestTokenProcessor(stack)).process(string)
+       end
+
+       fun test_token_location2 do
+               var string = "Hello [[World]]"
+               var stack =  ["TokenWikiLink at 1,7--1,7"]
+               (new TestTokenProcessor(stack)).process(string)
+       end
+
+       fun test_token_location3 do
+               var string = "\nHello\nworld [[wikilink]] !"
+               var stack =  ["TokenWikiLink at 3,7--3,7"]
+               (new TestTokenProcessor(stack)).process(string)
+       end
+
+       fun test_token_location4 do
+               var string = "[[link1]]\n\n[[link2]]"
+               var stack =  [
+                       "TokenWikiLink at 1,1--1,1",
+                       "TokenWikiLink at 3,1--3,1"]
+               (new TestTokenProcessor(stack)).process(string)
+       end
+
+       fun test_token_location5 do
+               var string = "[[link1]]\n[[link2]]"
+               var stack =  [
+                       "TokenWikiLink at 1,1--1,1",
+                       "TokenWikiLink at 2,1--2,1"]
+               (new TestTokenProcessor(stack)).process(string)
+       end
+
+       fun test_token_location6 do
+               var string = """
+[[doc: github]]
+
+[[loollll]]
+
+## Accessing the API
+
+[[doc: GithubAPI]]"""
+               var stack =  [
+                       "TokenWikiLink at 1,1--1,1",
+                       "TokenWikiLink at 3,1--3,1",
+                       "TokenWikiLink at 7,1--7,1"]
+               (new TestTokenProcessor(stack)).process(string)
+       end
+end
index 28fd1e0..9f3097c 100644 (file)
@@ -41,11 +41,11 @@ end
 redef class Decorator
 
        # Renders a `[[wikilink]]` item.
-       fun add_wikilink(v: EMITTER, link: Text, name, comment: nullable Text) do
-               if name != null then
-                       v.add "[[{name}|{link}]]"
+       fun add_wikilink(v: EMITTER, token: TokenWikiLink) do
+               if token.name != null then
+                       v.add "[[{token.name.to_s}|{token.link.to_s}]]"
                else
-                       v.add "[[{link}]]"
+                       v.add "[[{token.link.to_s}]]"
                end
        end
 end
@@ -67,7 +67,7 @@ class TokenWikiLink
        super TokenLink
 
        redef fun emit_hyper(v) do
-               v.decorator.add_wikilink(v, link.as(not null), name, comment)
+               v.decorator.add_wikilink(v, self)
        end
 
        redef fun check_link(v, out, start, token) do
index faa370c..3ee92fe 100644 (file)
@@ -152,7 +152,7 @@ class Opengles1Display
                                EGL_RED_SIZE, 8,
                                EGL_NONE
                };
-               EGLint w, h, dummy, format;
+               EGLint w, h, format;
                EGLint numConfigs;
                EGLConfig config;
                EGLSurface surface;
index 9d0d6c4..41ed7f8 100644 (file)
@@ -61,9 +61,7 @@ redef class App
                var handled = input(ie)
 
                if not handled then
-                       for pe in ie.pointers do
-                               input(pe)
-                       end
+                       input ie.acting_pointer
                end
 
                return handled
index 58864e4..ea035b3 100644 (file)
@@ -66,7 +66,7 @@ interface KeyEvent
        fun is_down: Bool is abstract
 
        # Key is currently up?
-       fun is_up: Bool is abstract
+       fun is_up: Bool do return not is_down
 
        # Key is the up arrow key?
        fun is_arrow_up: Bool is abstract
index 019dc67..9fb05bb 100644 (file)
@@ -97,6 +97,13 @@ class HashMap2[K1, K2, V]
                level2.keys.remove(k2)
        end
 
+       # Is there a value at `k1, k2`?
+       fun has(k1: K1, k2: K2): Bool
+       do
+               if not level1.keys.has(k1) then return false
+               return level1[k1].keys.has(k2)
+       end
+
        # Remove all items
        fun clear do level1.clear
 end
@@ -145,6 +152,13 @@ class HashMap3[K1, K2, K3, V]
                level2.remove_at(k2, k3)
        end
 
+       # Is there a value at `k1, k2, k3`?
+       fun has(k1: K1, k2: K2, k3: K3): Bool
+       do
+               if not level1.keys.has(k1) then return false
+               return level1[k1].has(k2, k3)
+       end
+
        # Remove all items
        fun clear do level1.clear
 end
index a45a116..9f96118 100644 (file)
@@ -509,13 +509,13 @@ abstract class NeoEntity
        private var batch_id: nullable Int = null
 
        # Load the entity from base
-       private init from_neo(neo: Neo4jClient, url: String) do
+       private init from_neo(neo: Neo4jClient, url: String) is nosuper do
                self.neo = neo
                self.url = url
        end
 
        # Init entity from JSON representation
-       private init from_json(neo: Neo4jClient, obj: JsonObject) do
+       private init from_json(neo: Neo4jClient, obj: JsonObject) is nosuper do
                self.neo = neo
                self.url = obj["self"].to_s
                self.internal_properties = obj["data"].as(JsonObject)
index ef87adb..523c051 100644 (file)
@@ -42,7 +42,7 @@ class HttpResponse
        do
                # Set the content length if not already set
                if not header.keys.has("Content-Length") then
-                       header["Content-Length"] = body.length.to_s
+                       header["Content-Length"] = body.bytelen.to_s
                end
 
                # Set server ID
index e16798e..73c9626 100644 (file)
@@ -96,6 +96,12 @@ class MediaTypes
                types["asf"]        = "video/x-ms-asf"
                types["mng"]        = "video/x-mng"
                types["apk"]        = "application/vnd.android.package-archive"
+               types["svg"]        = "image/svg+xml"
+               types["ttf"]        = "application/x-font-ttf"
+               types["otf"]        = "application/x-font-opentype"
+               types["eof"]        = "application/vnd.ms-fontobject"
+               types["woff"]       = "application/font-woff"
+               types["woff2"]      = "application/font-woff2"
        end
 end
 
index 0754d4b..1a0d7ce 100644 (file)
@@ -13,7 +13,9 @@
 # limitations under the License.
 
 # Provides the noise generators `PerlinNoise` and `InterpolatedNoise`
-module noise
+module noise is serialize
+
+import serialization
 
 # 2D noise generator
 abstract class Noise
@@ -64,7 +66,7 @@ abstract class Noise
        # Seed to the random number generator `gradient_vector`
        #
        # By default, `seed` has a random value created with `Int::rand`.
-       var seed: Int = 19559.rand is lazy, writable
+       var seed: Int = 19511359.rand is lazy, writable
 end
 
 # 2D Perlin noise generator using layered `InterpolatedNoise`
@@ -195,7 +197,7 @@ class PerlinNoise
        # Used to get seeds for layers from the previous layers or `seed`.
        protected fun pseudo_random(value: Int): Int
        do
-               return value + 2935391 % 954847
+               return (value * 3537391).mask % 1291377
        end
 end
 
@@ -299,7 +301,8 @@ class InterpolatedNoise
                var ix1 = sx.lerp(n0, n1)
                var val = sy.lerp(ix0, ix1)
 
-               # Return value in [min...max] from val in [-0.5...0.5]
+               # Return value in [min...max] from val in [-1.0...1.0]
+               val /= 2.0
                val += 0.5
                return val.lerp(min, max)
        end
@@ -319,10 +322,20 @@ class InterpolatedNoise
                #
                # These magic prime numbers were determined good enough by
                # non-emperical experimentation. They may need to be changed/improved.
-               var i = 17957*seed + 45127*x + 22613*y
-               var mod = 19031
+               var seed = 817721 + self.seed
+               var i = seed * (x+seed) * 25111217 * (y+seed) * 72233613
+               var mod = 137121
+               var angle = (i.mask.abs%mod).to_f*2.0*pi/mod.to_f
+
+               # Debug code to evaluate the efficiency of the random angle generator
+               # The average of the produced angles should be at pi
+               #
+               #var sum = once new Container[Float](0.0)
+               #var count = once new Container[Float](0.0)
+               #sum.item += angle
+               #count.item += 1.0
+               #if count.item.to_i % 1000 == 0 then print "avg:{sum.item/count.item}/{count.item} i:{i} a:{angle} ({x}, {y}: {seed})"
 
-               var angle = (i%mod).to_f*2.0*pi/mod.to_f
                if w == 0 then return angle.cos
                return angle.sin
        end
@@ -335,3 +348,14 @@ class InterpolatedNoise
                return dx*gradient_vector(ix, iy, 0) + dy*gradient_vector(ix, iy, 1)
        end
 end
+
+redef universal Int
+       # The value of the least-significant 30 bits of `self`
+       #
+       # This mask is used as compatibility with 32 bits architecture.
+       # The missing 2 bits are used to tag integers by the Nit system.
+       private fun mask: Int
+       do
+               return bin_and(0x3FFF_FFFF)
+       end
+end
index fa5ce15..1d8a264 100644 (file)
@@ -163,7 +163,7 @@ abstract class OptionParameter
        end
 end
 
-# An option with a String as parameter
+# An option with a `String` as parameter
 class OptionString
        super OptionParameter
        redef type VALUE: nullable String
@@ -174,9 +174,10 @@ class OptionString
        redef fun convert(str) do return str
 end
 
-# An option with an enum as parameter
-# In the code, declaring an option enum (-e) with an enum like `["zero", "one", "two"]
-# In the command line, typing `myprog -e one` is giving 1 as value
+# An option to choose from an enumeration
+#
+# Declare an enumeration option with all its possible values as an array.
+# Once the arguments are processed, `value` is set as the index of the selected value, if any.
 class OptionEnum
        super OptionParameter
        redef type VALUE: Int
diff --git a/lib/performance_analysis.nit b/lib/performance_analysis.nit
new file mode 100644 (file)
index 0000000..8403ea7
--- /dev/null
@@ -0,0 +1,102 @@
+# This file is part of NIT (http://www.nitlanguage.org).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Services to gather information on the performance of events by categories
+#
+# Provides `PerfMap` to manage all the categories and
+# `PerfEntry` for per-category statistics.
+#
+# ~~~
+# for i in 100.times do
+#     var clock = new Clock
+#
+#     # Do some "work" here
+#     nanosleep(0, 1000000)
+#
+#     # Register the perf
+#     sys.perfs["sleep 1ms"].add clock.lapse
+#
+#     # Do some other "work" here
+#     nanosleep(0, 5000000)
+#
+#     # Register the perf
+#     sys.perfs["sleep 5ms"].add clock.lapse
+# end
+#
+# assert sys.perfs["sleep 1ms"].count == 100
+# assert sys.perfs["sleep 1ms"].avg.is_approx(0.001, 0.001)
+# assert sys.perfs["sleep 5ms"].avg.is_approx(0.005, 0.005)
+# ~~~
+module performance_analysis
+
+import realtime
+
+redef class Sys
+       # Main `PerfMap` available by default
+       var perfs = new PerfMap
+end
+
+# Collection of statistics on many events
+class PerfMap
+       super HashMap[String, PerfEntry]
+
+       redef fun provide_default_value(key)
+       do
+               if not key isa String then return super
+
+               var ts = new PerfEntry(key)
+               self[key] = ts
+               return ts
+       end
+
+       redef fun to_s do return "* " + join("\n* ", ": ")
+end
+
+# Statistics on wall clock execution time of a category of events by `name`
+class PerfEntry
+
+       # Name of the category
+       var name: String
+
+       # Shortest execution time of registered events
+       var min = 0.0
+
+       # Longest execution time of registered events
+       var max = 0.0
+
+       # Average execution time of registered events
+       var avg = 0.0
+
+       # Number of registered events
+       var count = 0
+
+       # Total execution time of this event
+       var sum = 0.0
+
+       # Register a new event execution time with a `Timespec`
+       fun add(lapse: Timespec) do add_float lapse.to_f
+
+       # Register a new event execution time in seconds using a `Float`
+       fun add_float(time: Float)
+       do
+               if time.to_f < min.to_f or count == 0 then min = time
+               if time.to_f > max.to_f then max = time
+
+               sum += time
+               count += 1
+               avg = sum / count.to_f
+       end
+
+       redef fun to_s do return "min {min}, max {max}, avg {avg}, sum {sum}, count {count}"
+end
index 00201a9..6df0ea5 100644 (file)
@@ -26,7 +26,7 @@
 # - [x] `ConcurrentList`
 # - [ ] `ConcurrentHashMap`
 # - [ ] `ConcurrentHashSet`
-# - [ ] `ConcurrentContainer`
+# - [ ] `ConcurrentRef`
 # - [ ] `ConcurrentQueue`
 #
 # Introduced collections specialize their critical methods according to the
index 900063f..bbff9fc 100644 (file)
@@ -155,7 +155,11 @@ end
 private extern class NativePthreadMutex in "C" `{ pthread_mutex_t * `}
        new (attr: NativePthreadMutexAttr) `{
                pthread_mutex_t *mutex = malloc(sizeof(pthread_mutex_t));
-               int res = pthread_mutex_init(mutex, attr);
+               int r = pthread_mutex_init(mutex, attr);
+               if (r != 0) {
+                       free(mutex);
+                       return NULL;
+               }
                return mutex;
        `}
 
@@ -169,7 +173,11 @@ end
 private extern class NativePthreadMutexAttr in "C" `{ pthread_mutexattr_t * `}
        new `{
                pthread_mutexattr_t *attr = malloc(sizeof(pthread_mutexattr_t));
-               int res = pthread_mutexattr_init(attr);
+               int r = pthread_mutexattr_init(attr);
+               if (r != 0) {
+                       free(attr);
+                       return NULL;
+               }
                return attr;
        `}
 
@@ -188,7 +196,11 @@ end
 private extern class NativePthreadKey in "C" `{ pthread_key_t * `}
        new `{
                pthread_key_t *key = malloc(sizeof(pthread_key_t));
-               int res = pthread_key_create(key, NULL);
+               int r = pthread_key_create(key, NULL);
+               if (r != 0) {
+                       free(key);
+                       return NULL;
+               }
                return key;
        `}
 
index 5e0a18c..4893cb2 100644 (file)
@@ -27,7 +27,7 @@
 # - [ ] `List`
 # - [ ] `HashMap`
 # - [ ] `HashSet`
-# - [ ] `Container`
+# - [ ] `Ref`
 # - [ ] `Queue`
 module redef_collections
 
index 960a3cb..ad64930 100644 (file)
@@ -21,6 +21,28 @@ in "C header" `{
 #include <time.h>
 `}
 
+in "C" `{
+
+#ifdef __MACH__
+/* OS X does not have clock_gettime, mascarade it and use clock_get_time
+ * cf http://stackoverflow.com/questions/11680461/monotonic-clock-on-osx
+*/
+#include <mach/clock.h>
+#include <mach/mach.h>
+#define CLOCK_REALTIME CALENDAR_CLOCK
+#define CLOCK_MONOTONIC SYSTEM_CLOCK
+void clock_gettime(clock_t clock_name, struct timespec *ts) {
+       clock_serv_t cclock;
+       mach_timespec_t mts;
+       host_get_clock_service(mach_host_self(), clock_name, &cclock);
+       clock_get_time(cclock, &mts);
+       mach_port_deallocate(mach_task_self(), cclock);
+       ts->tv_sec = mts.tv_sec;
+       ts->tv_nsec = mts.tv_nsec;
+}
+#endif
+`}
+
 # Elapsed time representation.
 extern class Timespec `{struct timespec*`}
 
@@ -72,8 +94,23 @@ extern class Timespec `{struct timespec*`}
                return self->tv_nsec;
        `}
 
-       # Seconds in Float
-       # Loss of precision but great to print
+       # Elapsed time in microseconds, with both whole seconds and the rest
+       #
+       # May cause an `Int` overflow, use only with a low number of seconds.
+       fun microsec: Int `{
+               return self->tv_sec*1000000 + self->tv_nsec/1000;
+       `}
+
+       # Elapsed time in milliseconds, with both whole seconds and the rest
+       #
+       # May cause an `Int` overflow, use only with a low number of seconds.
+       fun millisec: Int `{
+               return self->tv_sec*1000 + self->tv_nsec/1000000;
+       `}
+
+       # Number of seconds as a `Float`
+       #
+       # Incurs a loss of precision, but the result is pretty to print.
        fun to_f: Float do return sec.to_f + nanosec.to_f / 1000000000.0
 
        redef fun to_s do return "{to_f}s"
@@ -90,7 +127,18 @@ class Clock
        # Smallest time frame reported by clock
        fun resolution : Timespec `{
                struct timespec* tv = malloc( sizeof(struct timespec) );
+#ifdef __MACH__
+               clock_serv_t cclock;
+               int nsecs;
+               mach_msg_type_number_t count;
+               host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);
+               clock_get_attributes(cclock, CLOCK_GET_TIME_RES, (clock_attr_t)&nsecs, &count);
+               mach_port_deallocate(mach_task_self(), cclock);
+               tv->tv_sec = 0;
+               tv->tv_nsec = nsecs;
+#else
                clock_getres( CLOCK_MONOTONIC, tv );
+#endif
                return tv;
        `}
 
index a87e8d4..8482352 100644 (file)
@@ -45,7 +45,7 @@ redef class RopeBuffer
                s += "n{object_id} -> n{str.object_id} [label = \"str\"];\n"
                s += str.internal_to_dot
                s += "n{object_id} -> n{ns.object_id} [label = \"ns\"];\n"
-               s += "n{ns.object_id}[label = \"NativeString\", content=\"{ns.to_s_with_length(rpos)}\"];\n"
+               s += "n{ns.object_id}[label = \"Items\", content=\"{ns}\"];\n"
                return s
        end
 end
@@ -53,14 +53,14 @@ end
 redef class FlatString
        redef fun internal_to_dot: String
        do
-               return "n{object_id} [label=\"FlatString\\nindex_from = {index_from}\\nindex_to = {index_to}\\nNativeString = {items.to_s_with_length(items.cstring_length)}\"];\n"
+               return "n{object_id} [label=\"FlatString\\nlength = {length}\\nbytelen = {bytelen}\\nfirst_byte = {first_byte}\\nlast_byte = {last_byte}\\nText = {self.escape_to_dot}\"];\n"
        end
 end
 
 redef class FlatBuffer
        redef fun internal_to_dot: String
        do
-               return "n{object_id} [label=\"FlatBuffer\\length = {length}\\ncapacity = {capacity}\\nitems = {items.to_s_with_length(items.cstring_length)}\"];\n"
+               return "n{object_id} [label=\"FlatBuffer\\nbytelen = {bytelen}\\nlength = {length}\\ncapacity = {capacity}\\nText = {escape_to_dot}\"];\n"
        end
 end
 
index a84802d..acfe9fa 100644 (file)
@@ -259,7 +259,7 @@ class XophonLexer
                        last_char = -1
                        return
                end
-               last_char = s
+               last_char = s.to_i
 
                # XML 1.0 end-of-line handling
                # Note: Regardless the XML version, any EOL defined by the
@@ -267,8 +267,11 @@ class XophonLexer
                if was_cr and last_char == '\n'.ascii then
                        # EOL already reported. => Skip this byte.
                        s = input.read_byte
-                       if s == null then s = -1
-                       last_char = s
+                       if s == null then
+                               last_char = -1
+                       else
+                               last_char = s.to_i
+                       end
                end
                was_cr = last_char == '\r'.ascii
                if was_cr then
index 186c96c..4541428 100644 (file)
@@ -74,10 +74,13 @@ class SerializerCache
        # Require: `not has_object(object)`
        fun new_id_for(object: Serializable): Int
        do
-               var id = sent.length
+               var id = next_available_id
                sent[object] = id
                return id
        end
+
+       # Get a free id to associate to an object in the cache
+       protected fun next_available_id: Int do return sent.length
 end
 
 # Cache of received objects sorted by there reference id
@@ -116,3 +119,19 @@ class DuplexCache
                sent[object] = id
        end
 end
+
+# A shared cache where 2 clients serialize objects at the same types, prevents references collision
+class AsyncCache
+       super DuplexCache
+
+       # Should this end use even numbers?
+       var use_even: Bool
+
+       private var last_id: Int is lazy do return if use_even then 0 else 1
+
+       redef fun next_available_id
+       do
+               last_id += 2
+               return last_id
+       end
+end
index b0dc728..1fec7e9 100644 (file)
@@ -106,7 +106,7 @@ abstract class Deserializer
        # This method should be redefined for each custom subclass of `Serializable`.
        # All refinement should look for a precise `class_name` and call super
        # on unsupported classes.
-       protected fun deserialize_class(class_name: String): Object do
+       protected fun deserialize_class(class_name: String): nullable Object do
                return deserialize_class_intern(class_name)
        end
 
@@ -115,9 +115,9 @@ abstract class Deserializer
        # Refinements to this method will be generated by the serialization phase.
        # To avoid conflicts, there should not be any other refinements to this method.
        # You can instead use `deserialize_class`.
-       protected fun deserialize_class_intern(class_name: String): Object do
-               print "Error: doesn't know how to deserialize class \"{class_name}\""
-               abort
+       protected fun deserialize_class_intern(class_name: String): nullable Object do
+               errors.add new Error("Deserialization Error: Doesn't know how to deserialize class \"{class_name}\"")
+               return null
        end
 
        # Should `self` keep trying to deserialize an object after an error?
@@ -242,7 +242,7 @@ redef class Couple[F, S]
        end
 end
 
-redef class Container[E]
+redef class Ref[E]
        super Serializable
 
        redef init from_deserializer(v)
diff --git a/lib/sexp.nit b/lib/sexp.nit
new file mode 100644 (file)
index 0000000..491abdc
--- /dev/null
@@ -0,0 +1,153 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# This file is free software, which comes along with NIT.  This software is
+# distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+# without  even  the implied warranty of  MERCHANTABILITY or  FITNESS FOR A
+# PARTICULAR PURPOSE.  You can modify it is you want,  provided this header
+# is kept unaltered, and a notification of the changes is added.
+# You  are  allowed  to  redistribute it and sell it, alone or is a part of
+# another product.
+
+# S-Expression parsing facilities
+module sexp
+
+intrude import parser_base
+
+# Any S-Expression entity
+abstract class SExpEntity
+
+       # Location in the source document
+       var location: nullable Location
+end
+
+# A full S-Expression, delimited by `(` and `)`
+class SExp
+       super SExpEntity
+
+       # Children of a SExp
+       var content = new Array[SExpEntity]
+
+       redef fun to_s do return "({content.join(" ")})"
+
+       # Returns a pretty-printable version of self
+       #
+       #     assert "( ( sp 12.3 ) \"DQString\")".to_sexp.as(SExp).pretty_to_s == "(\n\t(\n\t\tsp\n\t\t12.30\n\t)\n\t\"DQString\"\n)"
+       fun pretty_to_s: String do return recurse_to_s(0)
+
+       private fun recurse_to_s(depth: Int): String do
+               var s = "{"\t" * depth}(\n"
+               for i in content do
+                       if i isa SExp then
+                               s += i.recurse_to_s(depth + 1)
+                               s += "\n"
+                               continue
+                       end
+                       s += "\t" * (depth + 1)
+                       s += i.to_s
+                       s += "\n"
+               end
+               return s + "{"\t" * depth})"
+       end
+end
+
+# A Double-quoted String
+class SExpDQString
+       super SExpEntity
+
+       # Double-quoted string
+       var content: String
+
+       redef fun to_s do return content
+end
+
+# A float-value
+class SExpFloat
+       super SExpEntity
+
+       # Floating-point value
+       var content: Float
+
+       redef fun to_s do return content.to_precision(2)
+end
+
+# Any Identifier, non string and non-float
+class SExpId
+       super SExpEntity
+
+       # S-Exp compatible identifier
+       var content: String
+
+       redef fun to_s do return content
+end
+
+# An error parsing S-Expressions
+class SExpError
+       super SExpEntity
+
+       # Cause of the error
+       var message: String
+
+       redef fun to_s do return "S-Expression error: {message} at {location or else "unknown location"}"
+end
+
+# S-Expression processor
+class SExpProcessor
+       super StringProcessor
+
+       # Parses an S-Expression entity
+       fun parse_entity: SExpEntity do
+               var srclen = src.length
+               var delims = once ['(', ')', '"']
+               ignore_whitespaces
+               if pos >= srclen then return new SExpError("Empty S-Expression", location = new Location(line, line_offset))
+               var c = src[pos]
+               if pos >= srclen then return new SExpError("Empty S-Expression")
+               if c == '(' then
+                       var cnt = new SExp
+                       var loc = new Location(line, line_offset)
+                       pos += 1
+                       while pos < srclen and src[pos] != ')' do
+                               var p = parse_entity
+                               if p isa SExpError then break
+                               cnt.content.add p
+                               ignore_whitespaces
+                       end
+                       if pos < srclen and src[pos] == ')' then
+                               pos += 1
+                               return cnt
+                       else
+                               return new SExpError("Incomplete S-Expression", location = loc)
+                       end
+               else if c == '"' then
+                       var stdq = pos
+                       pos += 1
+                       ignore_until("\"")
+                       pos += 1
+                       var endq = pos
+                       return new SExpDQString(src.substring(stdq, endq - stdq))
+               else
+                       var stid = pos
+                       while pos < srclen and not c.is_whitespace and not delims.has(c) do
+                               c = src[pos]
+                               pos += 1
+                       end
+                       if delims.has(c) or c.is_whitespace then pos -= 1
+                       if pos >= srclen then return new SExpError("Invalid S-Expression")
+                       var endid = pos
+                       var cntstr = src.substring(stid, endid - stid)
+                       var cnt: SExpEntity
+                       if cntstr.is_numeric then
+                               cnt = new SExpFloat(cntstr.to_f)
+                       else
+                               cnt = new SExpId(cntstr)
+                       end
+                       return cnt
+               end
+       end
+end
+
+redef class Text
+
+       # Tries to parse `self` as an S-Expression
+       fun to_sexp: SExpEntity do return (new SExpProcessor(self.to_s)).parse_entity
+end
index a40cc5d..a75f7fb 100644 (file)
@@ -20,11 +20,28 @@ module socket
 private import socket_c
 intrude import standard::stream
 
-# A general TCP socket, either a `TCPStream` or a `TCPServer`
+# A general Socket, either TCP or UDP
 abstract class Socket
 
        # Underlying C socket
-       private var socket: NativeSocket is noinit
+       private var native: NativeSocket is noinit
+
+       # Is this socket closed?
+       var closed = false
+
+       # Set whether calls to `accept` are blocking
+       fun blocking=(value: Bool)
+       do
+               # We use the opposite from the native version as the native API
+               # is closer to the C API. In the Nity API, we use a positive version
+               # of the name.
+               native.non_blocking = not value
+       end
+end
+
+# A general TCP socket, either a `TCPStream` or a `TCPServer`
+abstract class TCPSocket
+       super Socket
 
        # Port used by the socket
        var port: Int
@@ -33,14 +50,11 @@ abstract class Socket
        #
        # Formatted as xxx.xxx.xxx.xxx.
        var address: String is noinit
-
-       # Is this socket closed?
-       var closed = false
 end
 
 # Simple communication stream with a remote socket
 class TCPStream
-       super Socket
+       super TCPSocket
        super BufferedReader
        super Writer
        super PollableReader
@@ -59,24 +73,23 @@ class TCPStream
        do
                _buffer = new NativeString(1024)
                _buffer_pos = 0
-               socket = new NativeSocket.socket(new NativeSocketAddressFamilies.af_inet,
+               native = new NativeSocket.socket(new NativeSocketAddressFamilies.af_inet,
                        new NativeSocketTypes.sock_stream, new NativeSocketProtocolFamilies.pf_null)
-               if socket.address_is_null then
+               if native.address_is_null then
                        end_reached = true
                        closed = true
                        return
                end
-               if not socket.setsockopt(new NativeSocketOptLevels.socket, new NativeSocketOptNames.reuseaddr, 1) then
+               if not native.setsockopt(new NativeSocketOptLevels.socket, new NativeSocketOptNames.reuseaddr, 1) then
                        end_reached = true
                        closed = true
                        return
                end
 
-               var hostname = sys.gethostbyname(host.to_cstring)
-               if hostname.address_is_null then
+               var hostent = sys.gethostbyname(host.to_cstring)
+               if hostent.address_is_null then
                        # Error in name lookup
-                       var err = sys.h_errno
-                       last_error = new IOError(err.to_s)
+                       last_error = new IOError.from_h_errno
 
                        closed = true
                        end_reached = true
@@ -84,28 +97,33 @@ class TCPStream
                        return
                end
 
-               addrin = new NativeSocketAddrIn.with_hostent(hostname, port)
-               address = addrin.address
-               init(addrin.port, hostname.h_name)
+               addrin = new NativeSocketAddrIn
+               addrin.fill_from_hostent hostent
+               addrin.port = port
+
+               address = addrin.address.to_s
+               init(addrin.port, hostent.h_name.to_s)
 
                closed = not internal_connect
                end_reached = closed
                if closed then
                        # Connection failed
-                       last_error = new IOError(errno.strerror)
+                       last_error = new IOError.from_errno
                end
+
+               prepare_buffer(1024)
        end
 
        # Creates a client socket, this is meant to be used by accept only
        private init server_side(h: SocketAcceptResult)
        do
-               _buffer = new NativeString(1024)
-               _buffer_pos = 0
-               socket = h.socket
+               native = h.socket
                addrin = h.addr_in
-               address = addrin.address
+               address = addrin.address.to_s
 
                init(addrin.port, address)
+
+               prepare_buffer(1024)
        end
 
        redef fun poll_in do return ready_to_read(0)
@@ -117,7 +135,7 @@ class TCPStream
        # timeout : Time in milliseconds before stopping listening for events on this socket
        private fun pollin(event_types: Array[NativeSocketPollValues], timeout: Int): Array[NativeSocketPollValues] do
                if end_reached then return new Array[NativeSocketPollValues]
-               return socket.socket_poll(new PollFD(socket.descriptor, event_types), timeout)
+               return native.socket_poll(new PollFD(native.descriptor, event_types), timeout)
        end
 
        # Easier use of pollin to check for something to read on all channels of any priority
@@ -131,12 +149,11 @@ class TCPStream
                return pollin(events, timeout).length != 0
        end
 
-       # Checks if the socket still is connected
+       # Is this socket still connected?
        fun connected: Bool
        do
                if closed then return false
-               var events = [new NativeSocketPollValues.pollhup, new NativeSocketPollValues.pollerr]
-               if pollin(events, 0).length == 0 then
+               if native.poll_hup_err == 0 then
                        return true
                else
                        closed = true
@@ -152,52 +169,53 @@ class TCPStream
        private fun internal_connect: Bool
        do
                assert not closed
-               return socket.connect(addrin) >= 0
+               return native.connect(addrin) >= 0
        end
 
        # If socket.end_reached, nothing will happen
        redef fun write(msg)
        do
                if closed then return
-               socket.write(msg.to_s)
+               native.write(msg.to_cstring, msg.length)
        end
 
        redef fun write_byte(value)
        do
                if closed then return
-               socket.write_byte value
+               native.write_byte value
        end
 
-       redef fun write_bytes(s) do
+       redef fun write_bytes(bytes) do
                if closed then return
-               socket.write(s.to_s)
+               var s = bytes.to_s
+               native.write(s.to_cstring, s.length)
        end
 
        fun write_ln(msg: Text)
        do
-               if end_reached then return
-               write(msg.to_s)
-               write("\n")
+               if closed then return
+               write msg.to_s
+               write "\n"
        end
 
        redef fun fill_buffer
        do
-               _buffer_length = 0
-               _buffer_pos = 0
                if not connected then return
-               var read = socket.read
-               if read.length == 0 then
+
+               var read = native.read(_buffer, _buffer_capacity)
+               if read == -1 then
                        close
                        end_reached = true
                end
-               enlarge(_buffer_length + read.length)
-               read.copy_to_native(_buffer, read.length, 0, 0)
-               _buffer_length = read.length
+
+               _buffer_length = read
+               _buffer_pos = 0
        end
 
        fun enlarge(len: Int) do
                if _buffer_capacity >= len then return
-               while _buffer_capacity < len do _buffer_capacity = _buffer_capacity * 2 + 2
+               _buffer_capacity = len
+
                var ns = new NativeString(_buffer_capacity)
                _buffer.copy_to(ns, _buffer_length - _buffer_pos, _buffer_pos, 0)
                _buffer = ns
@@ -206,7 +224,7 @@ class TCPStream
        redef fun close
        do
                if closed then return
-               if socket.close >= 0 then
+               if native.close >= 0 then
                        closed = true
                        end_reached = true
                end
@@ -215,8 +233,8 @@ class TCPStream
        # Send the data present in the socket buffer
        fun flush
        do
-               if not socket.setsockopt(new NativeSocketOptLevels.tcp, new NativeSocketOptNames.tcp_nodelay, 1) or
-                  not socket.setsockopt(new NativeSocketOptLevels.tcp, new NativeSocketOptNames.tcp_nodelay, 0) then
+               if not native.setsockopt(new NativeSocketOptLevels.tcp, new NativeSocketOptNames.tcp_nodelay, 1) or
+                  not native.setsockopt(new NativeSocketOptLevels.tcp, new NativeSocketOptNames.tcp_nodelay, 0) then
                        closed = true
                end
        end
@@ -226,22 +244,27 @@ end
 #
 # Create streams to communicate with clients using `accept`.
 class TCPServer
-       super Socket
+       super TCPSocket
 
        private var addrin: NativeSocketAddrIn is noinit
 
        # Create and bind a listening server socket on port `port`
        init
        do
-               socket = new NativeSocket.socket(new NativeSocketAddressFamilies.af_inet,
+               native = new NativeSocket.socket(new NativeSocketAddressFamilies.af_inet,
                        new NativeSocketTypes.sock_stream, new NativeSocketProtocolFamilies.pf_null)
-               assert not socket.address_is_null
-               if not socket.setsockopt(new NativeSocketOptLevels.socket, new NativeSocketOptNames.reuseaddr, 1) then
+               assert not native.address_is_null
+               if not native.setsockopt(new NativeSocketOptLevels.socket, new NativeSocketOptNames.reuseaddr, 1) then
                        closed = true
                        return
                end
-               addrin = new NativeSocketAddrIn.with_port(port, new NativeSocketAddressFamilies.af_inet)
-               address = addrin.address
+
+               addrin = new NativeSocketAddrIn
+               addrin.family = new NativeSocketAddressFamilies.af_inet
+               addrin.port = port
+               addrin.address_any
+
+               address = addrin.address.to_s
 
                # Bind it
                closed = not bind
@@ -251,14 +274,14 @@ class TCPServer
        #
        # Returns whether the socket has been be bound.
        private fun bind: Bool do
-               return socket.bind(addrin) >= 0
+               return native.bind(addrin) >= 0
        end
 
        # Sets the socket as ready to accept incoming connections, `size` is the maximum number of queued clients
        #
        # Returns `true` if the socket could be set, `false` otherwise
        fun listen(size: Int): Bool do
-               return socket.listen(size) >= 0
+               return native.listen(size) >= 0
        end
 
        # Accepts an incoming connection from a client
@@ -271,27 +294,18 @@ class TCPServer
        fun accept: nullable TCPStream
        do
                assert not closed
-               var native = socket.accept
+               var native = native.accept
                if native == null then return null
                return new TCPStream.server_side(native)
        end
 
-       # Set whether calls to `accept` are blocking
-       fun blocking=(value: Bool)
-       do
-               # We use the opposite from the native version as the native API
-               # is closer to the C API. In the Nity API, we use a positive version
-               # of the name.
-               socket.non_blocking = not value
-       end
-
        # Close this socket
        fun close
        do
                # FIXME unify with `SocketStream::close` when we can use qualified names
 
                if closed then return
-               if socket.close >= 0 then
+               if native.close >= 0 then
                        closed = true
                end
        end
@@ -304,13 +318,13 @@ class SocketSet
        init do clear
 
        # Add `socket` to this set
-       fun add(socket: Socket) do native.set(socket.socket)
+       fun add(socket: Socket) do native.set(socket.native)
 
        # Remove `socket` from this set
-       fun remove(socket: Socket) do native.clear(socket.socket)
+       fun remove(socket: Socket) do native.clear(socket.native)
 
        # Does this set has `socket`?
-       fun has(socket: Socket): Bool do return native.is_set(socket.socket)
+       fun has(socket: Socket): Bool do return native.is_set(socket.native)
 
        # Clear all sockets from this set
        fun clear do native.zero
@@ -339,6 +353,167 @@ class SocketObserver
                # `NativeSockectObserver::select` is not stable.
 
                var timeval = new NativeTimeval(seconds, microseconds)
-               return native.select(max.socket, read_set.native, write_set.native, except_set.native, timeval) > 0
+               return native.select(max.native, read_set.native, write_set.native, except_set.native, timeval) > 0
        end
 end
+
+# Socket over UDP, sends and receive data without the need for a connection
+class UDPSocket
+       super Socket
+
+       # Last error raised by this socket
+       var error: nullable Error = null
+
+       init do native = new NativeSocket.socket(
+                       new NativeSocketAddressFamilies.af_inet,
+                       new NativeSocketTypes.sock_dgram,
+                       new NativeSocketProtocolFamilies.pf_null)
+
+       # Bind this socket to an `address`, on `port` (to all addresses if `null`)
+       #
+       # On error, sets `error` appropriately.
+       fun bind(address: nullable Text, port: Int)
+       do
+               var addr_in = new NativeSocketAddrIn
+               addr_in.port = port
+               if address != null then
+                       # FIXME replace all use of gethostbyname with something not obsolete
+                       var hostent = sys.gethostbyname(address.to_cstring)
+                       if hostent.address_is_null then
+                               error = new IOError.from_h_errno
+                               addr_in.free
+                               return
+                       end
+
+                       addr_in.fill_from_hostent hostent
+               else
+                       addr_in.family = new NativeSocketAddressFamilies.af_inet
+                       addr_in.address_any
+               end
+
+               if native.bind(addr_in) != 0 then error = new IOError.from_errno
+
+               addr_in.free
+       end
+
+       # Receive `length` bytes of data from any sender
+       #
+       # On error, returns an empty string and sets `error` appropriately.
+       fun recv(length: Int): String
+       do
+               var buf = new NativeString(length)
+               var len = native.recvfrom(buf, length, 0, new NativeSocketAddrIn.nul)
+               if len == -1 then
+                       error = new IOError.from_errno
+                       return ""
+               end
+               return buf.to_s_with_length(len)
+       end
+
+       # Receive `length` bytes of data from any sender and store the sender info in `sender.item`
+       #
+       # On error, returns an empty string and sets `error` appropriately.
+       fun recv_from(length: Int, sender: Ref[nullable SocketAddress]): String
+       do
+               var src = new NativeSocketAddrIn
+               var buf = new NativeString(length)
+
+               var len = native.recvfrom(buf, length, 0, src)
+               if len == -1 then
+                       error = new IOError.from_errno
+                       src.free
+                       return ""
+               end
+
+               sender.item = new SocketAddress(src)
+               return buf.to_s_with_length(len)
+       end
+
+       # Send `data` to `dest_address` on `port`
+       #
+       # On error, sets `error` appropriately.
+       fun send_to(dest_address: Text, port: Int, data: Text)
+       do
+               var hostent = sys.gethostbyname(dest_address.to_cstring)
+               if hostent.address_is_null then
+                       error = new IOError.from_h_errno
+                       return
+               end
+
+               var dest = new NativeSocketAddrIn
+               dest.fill_from_hostent hostent
+               dest.port = port
+               native.setsockopt(new NativeSocketOptLevels.socket, new NativeSocketOptNames.broadcast, 1)
+
+               var buf = data.to_cstring
+               if native.sendto(buf, data.length, 0, dest) == -1 then
+                       error = new IOError.from_errno
+               end
+               dest.free
+       end
+
+       # Enable broadcasting for this socket
+       #
+       # On error, sets `error` appropriately.
+       fun enable_broadcast=(value: Bool) do
+               var res = native.setsockopt(new NativeSocketOptLevels.socket, new NativeSocketOptNames.broadcast, value.to_i)
+               if res == -1 then error = new IOError.from_errno
+       end
+
+       # Broadcast `data` on the network on `port`
+       #
+       # On error, sets `error` appropriately.
+       #
+       # Require: setting `enable_broadcast = true`
+       fun broadcast(port: Int, data: Text)
+       do
+               var addr_in = new NativeSocketAddrIn
+               addr_in.port = port
+               addr_in.family = new NativeSocketAddressFamilies.af_inet
+               addr_in.address_broadcast
+
+               var buf = data.to_cstring
+               if native.sendto(buf, data.length, 0, addr_in) == -1 then
+                       error = new IOError.from_errno
+               end
+
+               addr_in.free
+       end
+end
+
+# Address of a socket in the Internet namespace
+#
+# Used in one of the out parameters of `UDPSocket::recv_from`.
+class SocketAddress
+       super FinalizableOnce
+
+       # FIXME make init private
+
+       private var native: NativeSocketAddrIn
+
+       init
+       do
+               address = native.address.to_s
+               port = native.port
+       end
+
+       # Internet address
+       var address: String is noinit
+
+       # Port of the socket
+       var port: Int is noinit
+
+       redef fun ==(o) do return o isa SocketAddress and o.address == address and o.port == port
+
+       redef fun finalize_once do native.free
+end
+
+redef class IOError
+       # Fill a new `IOError` from the message of `errno`
+       init from_errno do init errno.strerror
+
+       # Fill a new `IOError` from the message of `h_errno`
+       #
+       # Used with `gethostbyname`.
+       init from_h_errno do init h_errno.to_s
+end
index 03d9ddc..6842554 100644 (file)
@@ -125,25 +125,20 @@ extern class NativeSocket `{ int* `}
                return connect(*self, (struct sockaddr*)addrIn, sizeof(*addrIn));
        `}
 
-       fun write(buffer: String): Int
-       import String.to_cstring, String.length `{
-               return write(*self, (char*)String_to_cstring(buffer), String_length(buffer));
+       # Write `length` bytes from `buffer`
+       fun write(buffer: NativeString, length: Int): Int `{
+               return write(*self, buffer, length);
        `}
 
        # Write `value` as a single byte
-       fun write_byte(value: Int): Int `{
+       fun write_byte(value: Byte): Int `{
                unsigned char byt = (unsigned char)value;
                return write(*self, &byt, 1);
        `}
 
-       fun read: String import NativeString.to_s_with_length, NativeString `{
-               char *c = new_NativeString(1024);
-               int n = read(*self, c, 1023);
-               if(n < 0) {
-                       return NativeString_to_s_with_length("",0);
-               }
-               c[n] = 0;
-               return NativeString_to_s_with_length(c, n);
+       # Read `length` bytes into `buffer`, returns the number of bytes read
+       fun read(buffer: NativeString, length: Int): Int `{
+               return read(*self, buffer, length);
        `}
 
        # Sets an option for the socket
@@ -169,6 +164,15 @@ extern class NativeSocket `{ int* `}
                return filedesc.check_response(result)
        end
 
+       # Poll this socket with `POLLHUP|POLLERR`
+       #
+       # A return value of 0 means there is no errors.
+       fun poll_hup_err: Int `{
+               struct pollfd fd = {*self, POLLHUP|POLLERR, 0};
+               int res = poll(&fd, 1, 0);
+               return res;
+       `}
+
        # Call to the poll function of the C socket
        #
        # Signature:
@@ -207,7 +211,7 @@ extern class NativeSocket `{ int* `}
                return new SocketAcceptResult(s, addrIn)
        end
 
-       # Set wether this socket is non blocking
+       # Set whether this socket is non blocking
        fun non_blocking=(value: Bool) `{
                int flags = fcntl(*self, F_GETFL, 0);
                if (flags == -1) flags = 0;
@@ -221,6 +225,22 @@ extern class NativeSocket `{ int* `}
                }
                fcntl(*self, F_SETFL, flags);
        `}
+
+       # Send `len` bytes from `buf` to `dest_addr`
+       fun sendto(buf: NativeString, len: Int, flags: Int, dest_addr: NativeSocketAddrIn): Int `{
+               return sendto(*self, buf, len, flags, (struct sockaddr*)dest_addr, sizeof(struct sockaddr_in));
+       `}
+
+       # Receive a message into `buf` of maximum `len` bytes
+       fun recv(buf: NativeString, len: Int, flags: Int): Int `{
+               return recv(*self, buf, len, flags);
+       `}
+
+       # Receive a message into `buf` of maximum `len` bytes and store sender info into `src_addr`
+       fun recvfrom(buf: NativeString, len: Int, flags: Int, src_addr: NativeSocketAddrIn): Int `{
+               socklen_t srclen = sizeof(struct sockaddr_in);
+               return recvfrom(*self, buf, len, flags, (struct sockaddr*)src_addr, &srclen);
+       `}
 end
 
 # Result of a call to `NativeSocket::accept`
@@ -233,64 +253,76 @@ class SocketAcceptResult
        var addr_in: NativeSocketAddrIn
 end
 
+# Socket address in the Internet namespace, pointer to a `struct sockaddr_in`
 extern class NativeSocketAddrIn `{ struct sockaddr_in* `}
+
+       # `NULL` pointer
+       new nul `{ return NULL; `}
+
+       # `malloc` a new instance
        new `{
                struct sockaddr_in *sai = NULL;
                sai = malloc(sizeof(struct sockaddr_in));
                return sai;
        `}
 
-       new with_port(port: Int, family: NativeSocketAddressFamilies) `{
-               struct sockaddr_in *sai = NULL;
-               sai = malloc(sizeof(struct sockaddr_in));
-               sai->sin_family = family;
-               sai->sin_port = htons(port);
-               sai->sin_addr.s_addr = INADDR_ANY;
-               return sai;
+       # Set `address` and `family` from `hostent` (to use with `Sys::gethostbyname`)
+       fun fill_from_hostent(hostent: NativeSocketHostent) `{
+               self->sin_family = hostent->h_addrtype;
+               memcpy((char*)&self->sin_addr.s_addr,
+                      (char*)hostent->h_addr,
+                          hostent->h_length);
        `}
 
-       new with_hostent(hostent: NativeSocketHostent, port: Int) `{
-               struct sockaddr_in *sai = NULL;
-               sai = malloc(sizeof(struct sockaddr_in));
-               sai->sin_family = hostent->h_addrtype;
-               sai->sin_port = htons(port);
-               memcpy((char*)&sai->sin_addr.s_addr, (char*)hostent->h_addr, hostent->h_length);
-               return sai;
-       `}
+       # Internet address as then IPV4 numbers-and-dots notation
+       fun address: NativeString `{ return (char*)inet_ntoa(self->sin_addr); `}
 
-       fun address: String import NativeString.to_s `{ return NativeString_to_s((char*)inet_ntoa(self->sin_addr)); `}
+       # Set `address` to `INADDR_ANY`
+       fun address_any `{ self->sin_addr.s_addr = INADDR_ANY; `}
 
+       # Set `address` to `INADDR_BROADCAST`
+       fun address_broadcast `{ self->sin_addr.s_addr = INADDR_BROADCAST; `}
+
+       # Address family
        fun family: NativeSocketAddressFamilies `{ return self->sin_family; `}
 
+       # Address family
+       fun family=(value: NativeSocketAddressFamilies) `{ self->sin_family = value; `}
+
+       # Port
        fun port: Int `{ return ntohs(self->sin_port); `}
 
-       fun destroy `{ free(self); `}
+       # Port
+       fun port=(value: Int) `{ self->sin_port = htons(value); `}
 end
 
+# Host entry information, a pointer to a `struct hostent`
 extern class NativeSocketHostent `{ struct hostent* `}
-       private fun native_h_aliases(i: Int): String import NativeString.to_s `{ return NativeString_to_s(self->h_aliases[i]); `}
-
-       private fun native_h_aliases_reachable(i: Int): Bool `{ return (self->h_aliases[i] != NULL); `}
+       private fun native_h_aliases(i: Int): NativeString `{
+               return self->h_aliases[i];
+       `}
 
+       # Alternative names for the host
        fun h_aliases: Array[String]
        do
-               var i=0
-               var d=new Array[String]
+               var res = new Array[String]
                loop
-                       d.add(native_h_aliases(i))
-                       if native_h_aliases_reachable(i+1) == false then break
-                       i += 1
+                       var ha = native_h_aliases(res.length)
+                       if ha.address_is_null then break
+                       res.add ha.to_s
                end
-               return d
+               return res
        end
 
-       fun h_addr: String import NativeString.to_s `{ return NativeString_to_s((char*)inet_ntoa(*(struct in_addr*)self->h_addr)); `}
+       fun h_addr: NativeString `{
+               return (char*)inet_ntoa(*(struct in_addr*)self->h_addr);
+       `}
 
        fun h_addrtype: Int `{ return self->h_addrtype; `}
 
        fun h_length: Int `{ return self->h_length; `}
 
-       fun h_name: String import NativeString.to_s `{ return NativeString_to_s(self->h_name); `}
+       fun h_name: NativeString `{ return self->h_name; `}
 end
 
 extern class NativeTimeval `{ struct timeval* `}
@@ -397,6 +429,7 @@ extern class NativeSocketProtocolFamilies `{ int `}
        new pf_key `{ return PF_KEY; `}
        new pf_inet6 `{ return PF_INET6; `}
        new pf_max `{ return PF_MAX; `}
+       new ipproto_udp `{ return IPPROTO_UDP; `}
 end
 
 # Level on which to set options
index 5f90801..023c6c1 100644 (file)
@@ -35,7 +35,7 @@ class Sqlite3DB
        # Open a connection to the database file at `path`
        init open(path: Text)
        do
-               native_connection = new NativeSqlite3.open(path.to_s)
+               init(new NativeSqlite3.open(path.to_s))
                if native_connection.is_valid then is_open = true
        end
 
diff --git a/lib/standard/README.md b/lib/standard/README.md
new file mode 100644 (file)
index 0000000..cd780d0
--- /dev/null
@@ -0,0 +1,46 @@
+# Nit Core Library
+
+Core classes and methods used by default by Nit programs and libraries.
+
+## Core Basic Types and Operations
+
+[[doc:kernel]]
+
+### Object
+
+[[doc:Object]]
+
+#### Equality
+
+[[doc:Object::==]]
+[[doc:Object::!=]]
+[[doc:Object::hash]]
+[[doc:Object::is_same_instance]]
+[[doc:Object::object_id]]
+
+#### Debuging
+
+[[doc:Object::output]]
+[[doc:Object::output_class_name]]
+[[doc:Object::is_same_type]]
+
+### Sys
+
+[[doc:Sys]]
+
+#### Program Execution
+
+[[doc:Sys::main]]
+[[doc:Sys::run]]
+
+### Other
+
+[[list:kernel]]
+
+## Core Collections
+
+[[doc:collection]]
+
+## String and Text manipulation
+
+[[doc:text]]
index c02ff00..b8cc1fb 100644 (file)
@@ -22,10 +22,8 @@ intrude import text::flat
 # A buffer containing Byte-manipulation facilities
 #
 # Uses Copy-On-Write when persisted
-#
-# TODO: Change the bound to Byte when available in stdlib and bootstrap
 class Bytes
-       super AbstractArray[Int]
+       super AbstractArray[Byte]
 
        # A NativeString being a char*, it can be used as underlying representation here.
        private var items: NativeString
@@ -48,6 +46,7 @@ class Bytes
                init(ns, 0, 0)
        end
 
+       # Init a `Bytes` with capacity `cap`
        init with_capacity(cap: Int) do
                var ns = new NativeString(cap)
                init(ns, 0, cap)
@@ -56,39 +55,39 @@ class Bytes
        redef fun is_empty do return length != 0
 
        #     var b = new Bytes.empty
-       #     b.add 101
-       #     assert b[0] == 101
+       #     b.add 101u8
+       #     assert b[0] == 101u8
        redef fun [](i) do
                assert i >= 0
                assert i < length
-               return items[i].ascii
+               return items[i]
        end
 
        #     var b = new Bytes.with_capacity(1)
-       #     b[0] = 101
+       #     b[0] = 101u8
        #     assert b.to_s == "e"
        redef fun []=(i, v) do
                if persisted then regen
                assert i >= 0
                assert i <= length
                if i == length then add(v)
-               items[i] = v.ascii
+               items[i] = v
        end
 
        #     var b = new Bytes.empty
-       #     b.add 101
+       #     b.add 101u8
        #     assert b.to_s == "e"
        redef fun add(c) do
                if persisted then regen
                if length >= capacity then
                        enlarge(length)
                end
-               items[length] = c.ascii
+               items[length] = c
                length += 1
        end
 
        #     var b = new Bytes.empty
-       #     b.append([104, 101, 108, 108, 111])
+       #     b.append([104u8, 101u8, 108u8, 108u8, 111u8])
        #     assert b.to_s == "hello"
        redef fun append(arr) do
                if arr isa Bytes then
@@ -98,6 +97,16 @@ class Bytes
                end
        end
 
+       #     var b = new Bytes.empty
+       #     b.append([0x41u8, 0x41u8, 0x18u8])
+       #     b.pop
+       #     assert b.to_s == "AA"
+       redef fun pop do
+               assert length >= 1
+               length -= 1
+               return items[length]
+       end
+
        redef fun clear do length = 0
 
        # Regenerates the buffer, necessary when it was persisted
@@ -143,7 +152,7 @@ class Bytes
 end
 
 private class BytesIterator
-       super IndexedIterator[Int]
+       super IndexedIterator[Byte]
 
        var tgt: NativeString
 
@@ -157,10 +166,38 @@ private class BytesIterator
 
        redef fun next do index += 1
 
-       redef fun item do return tgt[index].ascii
+       redef fun item do return tgt[index]
+end
+
+redef class Text
+       # Returns a mutable copy of `self`'s bytes
+       #
+       # ~~~nit
+       # assert "String".to_bytes isa Bytes
+       # assert "String".to_bytes == [83u8, 116u8, 114u8, 105u8, 110u8, 103u8]
+       # ~~~
+       fun to_bytes: Bytes do
+               var b = new Bytes.with_capacity(bytelen)
+               for s in substrings do
+                       var from = if s isa FlatString then s.first_byte else 0
+                       b.append_ns_from(s.items, s.bytelen, from)
+               end
+               return b
+       end
+end
+
+redef class FlatText
+       redef fun to_bytes do
+               var len = bytelen
+               var b = new Bytes.with_capacity(len)
+               var from = if self isa FlatString then first_byte else 0
+               b.append_ns_from(items, len, from)
+               return b
+       end
 end
 
 redef class NativeString
+       # Creates a new `Bytes` object from `self` with `strlen` as length
        fun to_bytes: Bytes do
                var len = cstring_length
                return new Bytes(self, len, len)
index 16e4b1e..5192797 100644 (file)
@@ -282,7 +282,7 @@ end
 #
 # Also used when one want to give a single element when a full
 # collection is expected
-class Container[E]
+class Ref[E]
        super Collection[E]
 
        redef fun first do return item
@@ -304,14 +304,14 @@ class Container[E]
                end
        end
 
-       redef fun iterator do return new ContainerIterator[E](self)
+       redef fun iterator do return new RefIterator[E](self)
 
        # The stored item
        var item: E is writable
 end
 
 # This iterator is quite stupid since it is used for only one item.
-private class ContainerIterator[E]
+private class RefIterator[E]
        super Iterator[E]
        redef fun item do return _container.item
 
@@ -319,7 +319,7 @@ private class ContainerIterator[E]
 
        redef var is_ok = true
 
-       var container: Container[E]
+       var container: Ref[E]
 end
 
 # Items can be removed from this collection
@@ -534,6 +534,16 @@ interface MapRead[K, V]
        #     assert x.is_empty  == false
        fun is_empty: Bool is abstract
 
+       # Alias for `not is_empty`.
+       #
+       # Some people prefer to have conditions grammatically easier to read.
+       #
+       #     var map = new HashMap[String, Int]
+       #     assert map.not_empty == false
+       #     map["one"] = 1
+       #     assert map.not_empty == true
+       fun not_empty: Bool do return not self.is_empty
+
        # Number of items in the collection.
        #
        #     var x = new HashMap[String, Int]
index b6721df..ce89435 100644 (file)
@@ -553,6 +553,9 @@ private class ArrayReverseIterator[E]
        do
                _index = _array.length - 1
        end
+
+       # Do not cache `self`
+       redef fun finish do end
 end
 
 # Others collections ##########################################################
index 2cdc431..021a80c 100644 (file)
@@ -327,7 +327,7 @@ end
 
 # Linked nodes that constitute a linked list.
 private class ListNode[E]
-       super Container[E]
+       super Ref[E]
 
        # The next node.
        var next: nullable ListNode[E] = null
index 517edf3..3e0d97a 100644 (file)
@@ -272,9 +272,49 @@ class ProcessDuplex
 
        redef fun pipeflags do return 3
 
-       redef fun execute
+       redef fun execute do super
+
+       # Write `input` to process and return its output
+       #
+       # Writing and reading are processed line by line,
+       # reading only when something is available.
+       #
+       # ~~~
+       # var proc = new ProcessDuplex("tr", "[:lower:]", "[:upper:]")
+       # assert proc.write_and_read("""
+       #     Alice
+       #     Bob
+       # """) == """
+       #     ALICE
+       #     BOB
+       # """
+       # ~~~
+       fun write_and_read(input: Text): String
        do
-               super
+               var read = new Buffer #new Array[String]
+
+               # Main loop, read and write line by line
+               var prev = 0
+               for delimiter in input.search_all('\n') do
+                       write input.substring(prev, delimiter.after-prev)
+                       prev = delimiter.after
+
+                       while stream_in.poll_in do
+                               read.append stream_in.read_line
+                       end
+               end
+
+               # Write the last line
+               write input.substring_from(prev)
+               stream_out.close
+
+               # Read the rest, may be everything for some programs
+               read.append stream_in.read_all
+               stream_in.close
+
+               # Clean up
+               wait
+               return read.to_s
        end
 end
 
index 00575f2..e5fc85b 100644 (file)
@@ -109,7 +109,7 @@ class FileReader
                last_error = null
                _file = new NativeFile.io_open_read(path.to_cstring)
                if _file.address_is_null then
-                       last_error = new IOError("Error: Opening file at '{path.as(not null)}' failed with '{sys.errno.strerror}'")
+                       last_error = new IOError("Cannot open `{path.as(not null)}`: {sys.errno.strerror}")
                        end_reached = true
                        return
                end
@@ -127,6 +127,10 @@ class FileReader
        redef fun fill_buffer
        do
                var nb = _file.io_read(_buffer, _buffer_capacity)
+               if last_error == null and _file.ferror then
+                       last_error = new IOError("Cannot read `{path.as(not null)}`: {sys.errno.strerror}")
+                       end_reached = true
+               end
                if nb <= 0 then
                        end_reached = true
                        nb = 0
@@ -155,7 +159,7 @@ class FileReader
                prepare_buffer(10)
                _file = new NativeFile.io_open_read(path.to_cstring)
                if _file.address_is_null then
-                       last_error = new IOError("Error: Opening file at '{path}' failed with '{sys.errno.strerror}'")
+                       last_error = new IOError("Cannot open `{path}`: {sys.errno.strerror}")
                        end_reached = true
                end
        end
@@ -172,6 +176,20 @@ class FileReader
                        end_reached = true
                end
        end
+
+       redef fun poll_in
+       do
+               var res = native_poll_in(fd)
+               if res == -1 then
+                       last_error = new IOError(errno.to_s)
+                       return false
+               else return res > 0
+       end
+
+       private fun native_poll_in(fd: Int): Int `{
+               struct pollfd fds = {fd, POLLIN, 0};
+               return poll(&fds, 1, 0);
+       `}
 end
 
 # `Stream` that can write to a File
@@ -185,7 +203,7 @@ class FileWriter
                        last_error = new IOError("cannot write to non-writable stream")
                        return
                end
-               write_native(s.items, s.length)
+               write_native(s.items, 0, s.length)
        end
 
        redef fun write(s)
@@ -195,7 +213,7 @@ class FileWriter
                        last_error = new IOError("cannot write to non-writable stream")
                        return
                end
-               for i in s.substrings do write_native(i.to_cstring, i.length)
+               s.write_native_to(self)
        end
 
        redef fun write_byte(value)
@@ -226,7 +244,7 @@ class FileWriter
        redef var is_writable = false
 
        # Write `len` bytes from `native`.
-       private fun write_native(native: NativeString, len: Int)
+       private fun write_native(native: NativeString, from, len: Int)
        do
                if last_error != null then return
                if not _is_writable then
@@ -238,7 +256,7 @@ class FileWriter
                        _is_writable = false
                        return
                end
-               var err = _file.io_write(native, len)
+               var err = _file.io_write(native, from, len)
                if err != len then
                        # Big problem
                        last_error = new IOError("Problem in writing : {err} {len} \n")
@@ -252,7 +270,7 @@ class FileWriter
                self.path = path
                _is_writable = true
                if _file.address_is_null then
-                       last_error = new IOError("Error: Opening file at '{path}' failed with '{sys.errno.strerror}'")
+                       last_error = new IOError("Cannot open `{path}`: {sys.errno.strerror}")
                        is_writable = false
                end
        end
@@ -301,16 +319,6 @@ class Stdin
                path = "/dev/stdin"
                prepare_buffer(1)
        end
-
-       redef fun poll_in `{
-               struct pollfd fd = {0, POLLIN, 0};
-               int res = poll(&fd, 1, 0);
-               if (res == -1) {
-                       perror("Error poll stdin");
-                       exit(EXIT_FAILURE);
-               }
-               return res > 0;
-       `}
 end
 
 # Standard output stream.
@@ -350,9 +358,13 @@ redef class Writable
        end
 end
 
-# Utility class to access file system services
+# Utility class to access file system services.
 #
 # Usually created with `Text::to_path`.
+#
+# `Path` objects does not necessarily represent existing files in a file system.
+# They are sate-less objects that efficiently represent path information.
+# They also provide an easy to use API on file-system services and are used to store their error status (see `last_error`)
 class Path
 
        private var path: String
@@ -360,20 +372,69 @@ class Path
        # Path to this file
        redef fun to_s do return path
 
-       # Name of the file name at `to_s`
+       # Short name of the file at `to_s`
        #
        # ~~~
        # var path = "/tmp/somefile".to_path
        # assert path.filename == "somefile"
        # ~~~
-       var filename: String = path.basename("") is lazy
+       #
+       # The result does not depend of the file system, thus is cached for efficiency.
+       var filename: String = path.basename is lazy
+
+       # The path simplified by removing useless `.`, removing `//`, and resolving `..`
+       #
+       # ~~~
+       # var path = "somedir/./tmp/../somefile".to_path
+       # assert path.simplified.to_s == "somedir/somefile"
+       # ~~~
+       #
+       # See `String:simplify_path` for details.
+       #
+       # The result does not depend of the file system, thus is cached for efficiency.
+       var simplified: Path is lazy do
+               var res = path.simplify_path.to_path
+               res.simplified = res
+               return res
+       end
+
+       # Return the directory part of the path.
+       #
+       # ~~~
+       # var path = "/foo/bar/baz".to_path
+       # assert path.dir.to_s == "/foo/bar"
+       # assert path.dir.dir.to_s == "/foo"
+       # assert path.dir.dir.dir.to_s == "/"
+       # ~~~
+       #
+       # See `String:dirname` for details.
+       #
+       # The result does not depend of the file system, thus is cached for efficiency.
+       var dir: Path is lazy do
+               return path.dirname.to_path
+       end
+
+       # Last error produced by I/O operations.
+       #
+       # ~~~
+       # var path = "/does/not/exists".to_path
+       # assert path.last_error == null
+       # path.read_all
+       # assert path.last_error != null
+       # ~~~
+       #
+       # Since `Path` objects are stateless, `last_error` is reset on most operations and reflect its status.
+       var last_error: nullable IOError = null is writable
 
        # Does the file at `path` exists?
+       #
+       # If the file does not exists, `last_error` is set to the information.
        fun exists: Bool do return stat != null
 
        # Information on the file at `self` following symbolic links
        #
        # Returns `null` if there is no file at `self`.
+       # `last_error` is updated to contains the error information on error, and null on success.
        #
        #     assert "/etc/".to_path.stat.is_dir
        #     assert "/etc/issue".to_path.stat.is_file
@@ -385,12 +446,18 @@ class Path
        # if stat != null then # Does `p` exist?
        #     print "It's size is {stat.size}"
        #     if stat.is_dir then print "It's a directory"
+       # else
+       #     print p.last_error.to_s
        # end
        # ~~~
        fun stat: nullable FileStat
        do
                var stat = path.to_cstring.file_stat
-               if stat.address_is_null then return null
+               if stat.address_is_null then
+                       last_error = new IOError("Cannot open `{path}`: {sys.errno.strerror}")
+                       return null
+               end
+               last_error = null
                return new FileStat(stat)
        end
 
@@ -400,18 +467,33 @@ class Path
        fun link_stat: nullable FileStat
        do
                var stat = path.to_cstring.file_lstat
-               if stat.address_is_null then return null
+               if stat.address_is_null then
+                       last_error = new IOError("Cannot open `{path}`: {sys.errno.strerror}")
+                       return null
+               end
+               last_error = null
                return new FileStat(stat)
        end
 
-       # Delete a file from the file system, return `true` on success
-       fun delete: Bool do return path.to_cstring.file_delete
+       # Delete a file from the file system.
+       #
+       # `last_error` is updated to contains the error information on error, and null on success.
+       fun delete
+       do
+               var res = path.to_cstring.file_delete
+               if not res then
+                       last_error = new IOError("Cannot delete `{path}`: {sys.errno.strerror}")
+               else
+                       last_error = null
+               end
+       end
 
-       # Copy content of file at `path` to `dest`
+       # Copy content of file at `path` to `dest`.
        #
-       # Require: `exists`
+       # `last_error` is updated to contains the error information on error, and null on success.
        fun copy(dest: Path)
        do
+               last_error = null
                var input = open_ro
                var output = dest.open_wo
 
@@ -422,41 +504,75 @@ class Path
 
                input.close
                output.close
+               last_error = input.last_error or else output.last_error
        end
 
-       # Open this file for reading
+       # Open this file for reading.
+       #
+       # ~~~
+       # var file = "/etc/issue".to_path.open_ro
+       # print file.read_line
+       # file.close
+       # ~~~
+       #
+       # Note that it is the user's responsibility to close the stream.
+       # Therefore, for simple use case, look at `read_all` or `each_line`.
        #
-       # Require: `exists and not link_stat.is_dir`
+       # ENSURE `last_error == result.last_error`
        fun open_ro: FileReader
        do
-               # TODO manage streams error when they are merged
-               return new FileReader.open(path)
+               var res = new FileReader.open(path)
+               last_error = res.last_error
+               return res
        end
 
        # Open this file for writing
        #
-       # Require: `not exists or not stat.is_dir`
+       # ~~~
+       # var file = "bla.log".to_path.open_wo
+       # file.write "Blabla\n"
+       # file.close
+       # ~~~
+       #
+       # Note that it is the user's responsibility to close the stream.
+       # Therefore, for simple use case, look at `Writable::write_to_file`.
+       #
+       # ENSURE `last_error == result.last_error`
        fun open_wo: FileWriter
        do
-               # TODO manage streams error when they are merged
-               return new FileWriter.open(path)
+               var res = new FileWriter.open(path)
+               last_error = res.last_error
+               return res
        end
 
-       # Read all the content of the file
+       # Read all the content of the file as a string.
        #
        # ~~~
        # var content = "/etc/issue".to_path.read_all
        # print content
        # ~~~
        #
+       # `last_error` is updated to contains the error information on error, and null on success.
+       # In case of error, the result might be empty or truncated.
+       #
        # See `Reader::read_all` for details.
        fun read_all: String do return read_all_bytes.to_s
 
+       # Read all the content on the file as a raw sequence of bytes.
+       #
+       # ~~~
+       # var content = "/etc/issue".to_path.read_all_bytes
+       # print content.to_s
+       # ~~~
+       #
+       # `last_error` is updated to contains the error information on error, and null on success.
+       # In case of error, the result might be empty or truncated.
        fun read_all_bytes: Bytes
        do
                var s = open_ro
                var res = s.read_all_bytes
                s.close
+               last_error = s.last_error
                return res
        end
 
@@ -473,12 +589,16 @@ class Path
        # end
        # ~~~
        #
+       # `last_error` is updated to contains the error information on error, and null on success.
+       # In case of error, the result might be empty or truncated.
+       #
        # See `Reader::read_lines` for details.
        fun read_lines: Array[String]
        do
                var s = open_ro
                var res = s.read_lines
                s.close
+               last_error = s.last_error
                return res
        end
 
@@ -493,52 +613,97 @@ class Path
        #
        # Note: the stream is automatically closed at the end of the file (see `LineIterator::close_on_finish`)
        #
+       # `last_error` is updated to contains the error information on error, and null on success.
+       #
        # See `Reader::each_line` for details.
        fun each_line: LineIterator
        do
                var s = open_ro
                var res = s.each_line
                res.close_on_finish = true
+               last_error = s.last_error
                return res
        end
 
 
-       # Lists the name of the files contained within the directory at `path`
+       # Lists the files contained within the directory at `path`.
+       #
+       #     var files = "/etc".to_path.files
+       #     assert files.has("/etc/issue".to_path)
        #
-       # Require: `exists and is_dir`
+       # `last_error` is updated to contains the error information on error, and null on success.
+       # In case of error, the result might be empty or truncated.
+       #
+       #     var path = "/etc/issue".to_path
+       #     files = path.files
+       #     assert files.is_empty
+       #     assert path.last_error != null
        fun files: Array[Path]
        do
-               var files = new Array[Path]
-               for filename in path.files do
-                       files.add new Path(path / filename)
+               last_error = null
+               var res = new Array[Path]
+               var d = new NativeDir.opendir(path.to_cstring)
+               if d.address_is_null then
+                       last_error = new IOError("Cannot list directory `{path}`: {sys.errno.strerror}")
+                       return res
                end
-               return files
+
+               loop
+                       var de = d.readdir
+                       if de.address_is_null then
+                               # readdir cannot fail, so null means end of list
+                               break
+                       end
+                       var name = de.to_s_with_copy
+                       if name == "." or name == ".." then continue
+                       res.add new Path(path / name)
+               end
+               d.closedir
+
+               return res
        end
 
-       # Delete a directory and all of its content, return `true` on success
+       # Delete a directory and all of its content
        #
        # Does not go through symbolic links and may get stuck in a cycle if there
        # is a cycle in the file system.
-       fun rmdir: Bool
+       #
+       # `last_error` is updated to contains the error information on error, and null on success.
+       # The method does not stop on the first error and try to remove most file and directories.
+       #
+       # ~~~
+       # var path = "/does/not/exists/".to_path
+       # path.rmdir
+       # assert path.last_error != null
+       # ~~~
+       fun rmdir
        do
-               var ok = true
+               last_error = null
                for file in self.files do
                        var stat = file.link_stat
+                       if stat == null then
+                               last_error = file.last_error
+                               continue
+                       end
                        if stat.is_dir then
-                               ok = file.rmdir and ok
+                               # Recursively rmdir
+                               file.rmdir
                        else
-                               ok = file.delete and ok
+                               file.delete
                        end
+                       if last_error == null then last_error = file.last_error
                end
 
-               # Delete the directory itself
-               if ok then ok = path.to_cstring.rmdir and ok
-
-               return ok
+               # Delete the directory itself if things are fine
+               if last_error == null then
+                       if path.to_cstring.rmdir then
+                               last_error = new IOError("Cannot remove `{self}`: {sys.errno.strerror}")
+                       end
+               end
        end
 
-       redef fun ==(other) do return other isa Path and path.simplify_path == other.path.simplify_path
-       redef fun hash do return path.simplify_path.hash
+       redef fun ==(other) do return other isa Path and simplified.path == other.simplified.path
+       redef fun hash do return simplified.path.hash
 end
 
 # Information on a file
@@ -676,6 +841,11 @@ end
 redef class Text
        # Access file system related services on the path at `self`
        fun to_path: Path do return new Path(to_s)
+
+       private fun write_native_to(s: FileWriter)
+       do
+               for i in substrings do s.write_native(i.to_cstring, 0, i.bytelen)
+       end
 end
 
 redef class String
@@ -704,36 +874,51 @@ redef class String
        # Copy content of file at `self` to `dest`
        fun file_copy_to(dest: String) do to_path.copy(dest.to_path)
 
-       # Remove the trailing extension `ext`.
+       # Remove the trailing `extension`.
        #
-       # `ext` usually starts with a dot but could be anything.
+       # `extension` usually starts with a dot but could be anything.
        #
-       #     assert "file.txt".strip_extension(".txt")  == "file"
-       #     assert "file.txt".strip_extension("le.txt")  == "fi"
-       #     assert "file.txt".strip_extension("xt")  == "file.t"
+       #     assert "file.txt".strip_extension(".txt")   == "file"
+       #     assert "file.txt".strip_extension("le.txt") == "fi"
+       #     assert "file.txt".strip_extension("xt")     == "file.t"
        #
-       # if `ext` is not present, `self` is returned unmodified.
+       # If `extension == null`, the rightmost extension is stripped, including the last dot.
+       #
+       #     assert "file.txt".strip_extension           == "file"
+       #
+       # If `extension` is not present, `self` is returned unmodified.
        #
        #     assert "file.txt".strip_extension(".tar.gz")  == "file.txt"
-       fun strip_extension(ext: String): String
+       fun strip_extension(extension: nullable String): String
        do
-               if has_suffix(ext) then
-                       return substring(0, length - ext.length)
+               if extension == null then
+                       extension = file_extension
+                       if extension == null then
+                               return self
+                       else extension = ".{extension}"
+               end
+
+               if has_suffix(extension) then
+                       return substring(0, length - extension.length)
                end
                return self
        end
 
-       # Extract the basename of a path and remove the extension
+       # Extract the basename of a path and strip the `extension`
        #
-       #     assert "/path/to/a_file.ext".basename(".ext")         == "a_file"
-       #     assert "path/to/a_file.ext".basename(".ext")          == "a_file"
-       #     assert "path/to".basename(".ext")                     == "to"
-       #     assert "path/to/".basename(".ext")                    == "to"
+       # The extension is stripped only if `extension != null`.
+       #
+       #     assert "/path/to/a_file.ext".basename(".ext")     == "a_file"
+       #     assert "path/to/a_file.ext".basename(".ext")      == "a_file"
+       #     assert "path/to/a_file.ext".basename              == "a_file.ext"
+       #     assert "path/to".basename(".ext")                 == "to"
+       #     assert "path/to/".basename(".ext")                == "to"
+       #     assert "path/to".basename                         == "to"
        #     assert "path".basename("")                        == "path"
        #     assert "/path".basename("")                       == "path"
        #     assert "/".basename("")                           == "/"
        #     assert "".basename("")                            == ""
-       fun basename(ext: String): String
+       fun basename(extension: nullable String): String
        do
                var l = length - 1 # Index of the last char
                while l > 0 and self.chars[l] == '/' do l -= 1 # remove all trailing `/`
@@ -743,7 +928,10 @@ redef class String
                if pos >= 0 then
                        n = substring(pos+1, l-pos)
                end
-               return n.strip_extension(ext)
+
+               if extension != null then
+                       return n.strip_extension(extension)
+               else return n
        end
 
        # Extract the dirname of a path
@@ -902,7 +1090,7 @@ redef class String
        # In other cases, parts of the current directory may be exhibited:
        #
        #     var p = "../foo/bar".relpath("baz")
-       #     var c = getcwd.basename("")
+       #     var c = getcwd.basename
        #     assert p == "../../{c}/baz"
        #
        # For path resolution independent of the current directory (eg. for paths in URL),
@@ -989,10 +1177,9 @@ redef class String
        #     assert "/fail/does not/exist".rmdir != null
        fun rmdir: nullable Error
        do
-               var res = to_path.rmdir
-               if res then return null
-               var error = new IOError("Cannot change remove `{self}`: {sys.errno.strerror}")
-               return error
+               var p = to_path
+               p.rmdir
+               return p.last_error
        end
 
        # Change the current working directory
@@ -1073,6 +1260,13 @@ redef class String
        end
 end
 
+redef class FlatString
+       redef fun write_native_to(s)
+       do
+               s.write_native(items, first_byte, bytelen)
+       end
+end
+
 redef class NativeString
        private fun file_exists: Bool `{
                FILE *hdl = fopen(self,"r");
@@ -1160,11 +1354,11 @@ private extern class NativeFile `{ FILE* `}
                return fread(buf, 1, len, self);
        `}
 
-       fun io_write(buf: NativeString, len: Int): Int `{
-               return fwrite(buf, 1, len, self);
+       fun io_write(buf: NativeString, from, len: Int): Int `{
+               return fwrite(buf+from, 1, len, self);
        `}
 
-       fun write_byte(value: Int): Int `{
+       fun write_byte(value: Byte): Int `{
                unsigned char b = (unsigned char)value;
                return fwrite(&b, 1, 1, self);
        `}
@@ -1181,6 +1375,8 @@ private extern class NativeFile `{ FILE* `}
                return 0;
        `}
 
+       fun ferror: Bool `{ return ferror(self); `}
+
        fun fileno: Int `{ return fileno(self); `}
 
        # Flushes the buffer, forcing the write operation
index e05d152..11c4419 100644 (file)
 # You  are  allowed  to  redistribute it and sell it, alone or is a part of
 # another product.
 
-# Most minimal classes and methods.
-# This module is the root of the standard module hierarchy.
+# Most basic classes and methods.
+#
+# This module is the root of the module hierarchy.
+# It provides a very minimal set of classes and services used as a
+# foundation to define other classes and methods.
 module kernel
 
 import end # Mark this module is a top level one. (must be only one)
@@ -27,9 +30,13 @@ in "C" `{
 ###############################################################################
 
 # The root of the class hierarchy.
-# Each class implicitly specialize Object.
 #
-# Currently, Object is also used to collect all top-level methods.
+# Each other class implicitly specializes Object,
+# therefore the services of Object are inherited by every other class and are usable
+# on each value, including primitive types like integers (`Int`), strings (`String`) and arrays (`Array`).
+#
+# Note that `nullable Object`, not `Object`, is the root of the type hierarchy
+# since the special value `null` is not considered as an instance of Object.
 interface Object
        # Type of this instance, automatically specialized in every class
        #
@@ -53,33 +60,124 @@ interface Object
        # `SELF`, pretty much the same things as you would do with parameter types.
        type SELF: Object
 
-       # The unique object identifier in the class.
-       # Unless specific code, you should not use this method.
-       # The identifier is used internally to provide a hash value.
+       # An internal hash code for the object based on its identity.
+       #
+       # Unless specific code, you should not use this method but
+       # use `hash` instead.
+       #
+       # As its name hints it, the internal hash code, is used internally
+       # to provide a hash value.
+       # It is also used by the `inspect` method to loosely identify objects
+       # and helps debugging.
+       #
+       # ~~~
+       # var a = "Hello"
+       # var b = a
+       # assert a.object_id == b.object_id
+       # ~~~
+       #
+       # The specific details of the internal hash code it let to the specific
+       # engine. The rules are the following:
+       #
+       # * The `object_id` MUST be invariant for the whole life of the object.
+       # * Two living instances of the same classes SHOULD NOT share the same `object_id`.
+       # * Two instances of different classes MIGHT share the same `object_id`.
+       # * The `object_id` of a garbage-collected instance MIGHT be reused by new instances.
+       # * The `object_id` of an object MIGHT be non constant across different executions.
+       #
+       # For instance, the `nitc` compiler uses the address of the object in memory
+       # as its `object_id`.
+       #
+       # TODO rename in something like `internal_hash_code`
        fun object_id: Int is intern
 
        # Return true if `self` and `other` have the same dynamic type.
-       # Unless specific code, you should not use this method.
+       #
+       # ~~~
+       # assert 1.is_same_type(2)
+       # assert "Hello".is_same_type("World")
+       # assert not "Hello".is_same_type(2)
+       # ~~~
+       #
+       # The method returns false if the dynamic type of `other` is a subtype of the dynamic type of `self`
+       # (or the other way around).
+       #
+       # Unless specific code, you should not use this method because it is inconsistent
+       # with the fact that a subclass can be used in lieu of a superclass.
        fun is_same_type(other: Object): Bool is intern
 
-       # Return true if `self` and `other` are the same instance.
-       # Unless specific code, you should use `==` instead.
+       # Return true if `self` and `other` are the same instance (i.e. same identity).
+       #
+       # ~~~
+       # var a = new Buffer
+       # var b = a
+       # var c = new Buffer
+       # assert a.is_same_instance(b)
+       # assert not a.is_same_instance(c)
+       # assert a == c # because both buffers are empty
+       # ~~~
+       #
+       # Obviously, the identity of an object is preserved even if the object is mutated.
+       #
+       # ~~~
+       # var x = [1]
+       # var y = x
+       # x.add 2
+       # assert x.is_same_instance(y)
+       # ~~~
+       #
+       # Unless specific code, you should use `==` instead of `is_same_instance` because
+       # most of the time is it the semantic (and user-defined) comparison that make sense.
+       #
+       # Moreover, relying on `is_same_instance` on objects you do not control
+       # might have unexpected effects when libraries reuse objects or intern them.
        fun is_same_instance(other: nullable Object): Bool is intern
 
        # Have `self` and `other` the same value?
        #
-       # The exact meaning of "same value" is left to the subclasses.
-       # Implicitly, the default implementation, is `is_same_instance`
+       # ~~~
+       # assert 1 + 1 == 2
+       # assert not 1 == "1"
+       # assert 1.to_s == "1"
+       # ~~~
+       #
+       # The exact meaning of *same value* is left to the subclasses.
+       # Implicitly, the default implementation, is `is_same_instance`.
+       #
+       # The laws of `==` are the following:
+       #
+       # * reflexivity `a.is_same_instance(b) implies a == b`
+       # * symmetry: `(a == b) == (b == a)`
+       # * transitivity: `(a == b) and (b == c) implies (a == c)`
+       #
+       # `==` might not be constant on some objects overtime because of their evolution.
+       #
+       # ~~~
+       # var a = [1]
+       # var b = [1]
+       # var c = [1,2]
+       # assert a == b and not a == c
+       # a.add 2
+       # assert not a == b and a == c
+       # ~~~
+       #
+       # Lastly, `==` is highly linked with `hash` and a specific redefinition of `==` should
+       # usually be associated with a specific redefinition of `hash`.
+       #
+       # ENSURE `result implies self.hash == other.hash`
        fun ==(other: nullable Object): Bool do return self.is_same_instance(other)
 
        # Have `self` and `other` different values?
        #
-       # != is equivalent with "not ==".
+       # `!=` is equivalent with `not ==`.
        fun !=(other: nullable Object): Bool do return not (self == other)
 
        # Display self on stdout (debug only).
+       #
        # This method MUST not be used by programs, it is here for debugging
-       # only and can be removed without any notice
+       # only and can be removed without any notice.
+       #
+       # TODO: rename to avoid blocking a good identifier like `output`.
        fun output
        do
                '<'.output
@@ -88,26 +186,112 @@ interface Object
        end
 
        # Display class name on stdout (debug only).
+       #
        # This method MUST not be used by programs, it is here for debugging
-       # only and can be removed without any notice
+       # only and can be removed without any notice.
+       #
+       # TODO: rename to avoid blocking a good identifier like `output`.
        fun output_class_name is intern
 
        # The hash code of the object.
-       # Assuming that a == b -> a.hash == b.hash
        #
-       # Without redefinition, it is based on the `object_id` of the instance.
+       # The hash code is used in many data-structures and algorithms to identify objects that might be equal.
+       # Therefore, the precise semantic of `hash` is highly linked with the semantic of `==`
+       # and the only law of `hash` is that `a == b implies a.hash == b.hash`.
+       #
+       # ~~~
+       # assert (1+1).hash == 2.hash
+       # assert 1.to_s.hash == "1".hash
+       # ~~~
+       #
+       # `hash` (like `==`) might not be constant on some objects over time because of their evolution.
+       #
+       # ~~~
+       # var a = [1]
+       # var b = [1]
+       # var c = [1,2]
+       # assert a.hash == b.hash
+       # a.add 2
+       # assert a.hash == c.hash
+       # # There is a very high probability that `b.hash != c.hash`
+       # ~~~
+       #
+       # A specific redefinition of `==` should usually be associated with a specific redefinition of `hash`.
+       # Note that, unfortunately, a correct definition of `hash` that is lawful with `==` is sometime tricky
+       # and a cause of bugs.
+       #
+       # Without redefinition, `hash` is based on the `object_id` of the instance.
        fun hash: Int do return object_id / 8
 end
 
 # The main class of the program.
-# `Sys` is a singleton class, its only instance is `sys` defined in `Object`.
-# `sys` is used to invoke methods on the program on the system.
+#
+# `Sys` is a singleton class, its only instance is accessible from everywhere with `sys`.
+#
+# Because of this, methods that should be accessible from everywhere, like `print` or `exit`,
+# are defined in `Sys`.
+# Moreover, unless there is an ambiguity with `self`, the receiver of a call to these methods is implicitly `sys`.
+# Basically it means that the two following instructions are equivalent.
+#
+# ~~~nit
+# print "Hello World"
+# sys.print "Hello World"
+# ~~~
+#
+# ## Methods Implicitly Defined in Sys
+#
+# `Sys` is the class where are defined top-level methods,
+# i.e. those defined outside of any class like in a procedural language.
+# Basically it means that
+#
+# ~~~nitish
+# redef class Sys
+#    fun foo do print "hello"
+# end
+# ~~~
+#
+# is equivalent with
+#
+# ~~~nitish
+# fun foo print "hello"
+# ~~~
+#
+# As a corollary, in a top-level method, `self` (the current receiver) is always `sys`.
 class Sys
-       # Instructions outside classes implicitly redefine this method.
+       # The main method of a program.
+       #
+       # In a module, the instructions defined outside any classes or methods
+       # (usually called the *main* of the module) is
+       # an implicit definition of this `main` method.
+       # Basically it means that the following program
+       #
+       # ~~~nit
+       # print "Hello World"
+       # ~~~
+       #
+       # is equivalent with
+       #
+       # ~~~nit
+       # redef class Sys
+       #    redef fun main do
+       #       print "Hello World"
+       #    end
+       # end
+       # ~~~
        fun main do end
 
        # The entry point for the execution of the whole program.
-       # Its job is to call `main` but some modules may want to refine it
+       #
+       # When a program starts, the following implicit sequence of instructions is executed
+       #
+       # ~~~nitish
+       # sys = new Sys
+       # sys.run
+       # ~~~
+       #
+       # Whereas the job of the `run` method is just to execute `main`.
+       #
+       # The only reason of the existence of `run` is to allow modules to refine it
        # and inject specific work before or after the main part.
        fun run do main
 
@@ -719,10 +903,23 @@ universal Char
        redef type OTHER: Char
 
        redef fun object_id is intern
+       redef fun output `{
+               if(self < 128){
+                       printf("%c", self);
+               }else if(self < 2048){
+                       printf("%c%c", 0xC0 | ((0x7C0 & self) >> 6), 0x80 | (0x3F & self));
+               }else if(self < 65536){
+                       printf("%c%c%c", 0xE0 | ((0xF000 & self) >> 12), 0x80 | ((0xFC0 & self) >> 6) ,0x80 | (0x3F & self));
+               }else if(self < 2097152){
+                       printf("%c%c%c%c", 0xF0 | ((0x1C0000 & self) >> 18), 0x80 | ((0x3F000 & self) >> 12), 0x80 | ((0xFC0 & self) >> 6), 0x80 | (0x3F & self));
+               }else{
+                       // Bad char
+                       printf("%c", self);
+               }
+       `}
        redef fun hash do return ascii
        redef fun ==(o) is intern
        redef fun !=(o) is intern
-       redef fun output is intern
 
        redef fun <=(i) is intern
        redef fun <(i) is intern
index 6e5926f..337355a 100644 (file)
@@ -316,6 +316,14 @@ redef class Float
        fun hypot_with(b: Float): Float `{ return hypotf(self, b); `}
 
        # Returns true is self is not a number.
+       #
+       # As `nan != nan`, `is_nan` should be used to test if a float is the special *not a number* value.
+       #
+       # ~~~
+       # assert nan != nan # By IEEE 754
+       # assert nan.is_nan
+       # assert not 10.0.is_nan
+       # ~~~
        fun is_nan: Bool `{ return isnan(self); `}
 
        # Is the float an infinite value
@@ -324,6 +332,12 @@ redef class Float
        #  * 1 if self is positive infinity
        #  * -1 if self is negative infinity
        #  * 0 otherwise
+       #
+       # ~~~
+       # assert 10.0.is_inf == 0
+       # assert inf.is_inf == 1
+       # assert (-inf).is_inf == -1
+       # ~~~
        fun is_inf: Int do
                if native_is_inf then
                        if self < 0.0 then return -1
@@ -345,6 +359,42 @@ redef class Float
        fun lerp(a, b: Float): Float do return (1.0 - self) * a + self * b
 end
 
+# Positive float infinite (IEEE 754)
+#
+#     assert inf > 10.0
+#     assert inf.is_inf == 1
+#
+# `inf` follows the arithmetic of infinites
+#
+#     assert (inf - 1.0) == inf
+#     assert (inf - inf).is_nan
+#
+# The negative infinite can be used as `-inf`.
+#
+#     assert -inf < -10.0
+#     assert (-inf).is_inf == -1
+fun inf: Float do return 1.0 / 0.0
+
+# Not a Number, representation of an undefined or unrepresentable float (IEEE 754).
+#
+# `nan` is not comparable with itself, you should use `Float::is_nan` to test it.
+#
+# ~~~
+# assert nan.is_nan
+# assert nan != nan # By IEEE 754
+# ~~~
+#
+# `nan` is the quiet result of some undefined operations.
+#
+# ~~~
+# assert (1.0 + nan).is_nan
+# assert (0.0 / 0.0).is_nan
+# assert (inf - inf).is_nan
+# assert (inf / inf).is_nan
+# assert (-1.0).sqrt.is_nan
+# ~~~
+fun nan: Float do return 0.0 / 0.0
+
 redef class Collection[ E ]
        # Return a random element form the collection
        # There must be at least one element in the collection
index ecda97e..ce6e9b3 100644 (file)
@@ -47,7 +47,7 @@ abstract class Reader
        fun read_char: nullable Char is abstract
 
        # Reads a byte. Returns `null` on EOF or timeout
-       fun read_byte: nullable Int is abstract
+       fun read_byte: nullable Byte is abstract
 
        # Reads a String of at most `i` length
        fun read(i: Int): String do return read_bytes(i).to_s
@@ -166,7 +166,32 @@ abstract class Reader
        # var i = new StringReader(txt)
        # assert i.read_all == txt
        # ~~~
-       fun read_all: String do return read_all_bytes.to_s
+       fun read_all: String do
+               var s = read_all_bytes
+               var slen = s.length
+               if slen == 0 then return ""
+               var rets = ""
+               var pos = 0
+               var sits = s.items
+               var remsp = slen
+               while pos < slen do
+                       # The 129 size was decided more or less arbitrarily
+                       # It will require some more benchmarking to compute
+                       # if this is the best size or not
+                       var chunksz = 129
+                       if chunksz > remsp then
+                               rets += new FlatString.with_infos(sits, remsp, pos, pos + remsp - 1)
+                               break
+                       end
+                       var st = sits.find_beginning_of_char_at(pos + chunksz - 1)
+                       var bytelen = st - pos
+                       rets += new FlatString.with_infos(sits, bytelen, pos, st - 1)
+                       pos = st
+                       remsp -= bytelen
+               end
+               if rets isa Concat then return rets.balance
+               return rets
+       end
 
        # Read all the stream until the eof.
        #
@@ -360,7 +385,7 @@ abstract class Writer
        fun write(s: Text) is abstract
 
        # Write a single byte
-       fun write_byte(value: Int) is abstract
+       fun write_byte(value: Byte) is abstract
 
        # Can the stream be used to write
        fun is_writable: Bool is abstract
@@ -405,7 +430,8 @@ abstract class BufferedReader
                        last_error = new IOError("Stream has reached eof")
                        return null
                end
-               var c = _buffer[_buffer_pos]
+               # TODO: Fix when supporting UTF-8
+               var c = _buffer[_buffer_pos].to_i.ascii
                _buffer_pos += 1
                return c
        end
@@ -417,7 +443,7 @@ abstract class BufferedReader
                        last_error = new IOError("Stream has reached eof")
                        return null
                end
-               var c = _buffer[_buffer_pos].ascii
+               var c = _buffer[_buffer_pos]
                _buffer_pos += 1
                return c
        end
@@ -496,7 +522,7 @@ abstract class BufferedReader
                        var j = _buffer_pos
                        var k = _buffer_length
                        while j < k do
-                               s.add(_buffer[j].ascii)
+                               s.add(_buffer[j])
                                j += 1
                        end
                        _buffer_pos = j
@@ -510,13 +536,13 @@ abstract class BufferedReader
                loop
                        # First phase: look for a '\n'
                        var i = _buffer_pos
-                       while i < _buffer_length and _buffer[i] != '\n' do
+                       while i < _buffer_length and _buffer[i] != 0xAu8 do
                                i += 1
                        end
 
                        var eol
                        if i < _buffer_length then
-                               assert _buffer[i] == '\n'
+                               assert _buffer[i] == 0xAu8
                                i += 1
                                eol = true
                        else
@@ -526,12 +552,12 @@ abstract class BufferedReader
                        # if there is something to append
                        if i > _buffer_pos then
                                # Enlarge the string (if needed)
-                               s.enlarge(s.length + i - _buffer_pos)
+                               s.enlarge(s.bytelen + i - _buffer_pos)
 
                                # Copy from the buffer to the string
                                var j = _buffer_pos
                                while j < i do
-                                       s.add(_buffer[j])
+                                       s.bytes.add(_buffer[j])
                                        j += 1
                                end
                                _buffer_pos = i
@@ -628,13 +654,13 @@ class StringReader
        # The string to read from.
        var source: String
 
-       # The current position in the string.
+       # The current position in the string (bytewise).
        private var cursor: Int = 0
 
        redef fun read_char do
                if cursor < source.length then
+                       # Fix when supporting UTF-8
                        var c = source[cursor]
-
                        cursor += 1
                        return c
                else
@@ -644,10 +670,9 @@ class StringReader
 
        redef fun read_byte do
                if cursor < source.length then
-                       var c = source[cursor]
-
+                       var c = source.bytes[cursor]
                        cursor += 1
-                       return c.ascii
+                       return c
                else
                        return null
                end
@@ -664,5 +689,5 @@ class StringReader
                return new Bytes(nns, nslen, nslen)
        end
 
-       redef fun eof do return cursor >= source.length
+       redef fun eof do return cursor >= source.bytelen
 end
index 1571a9d..22f25f2 100644 (file)
@@ -36,18 +36,31 @@ abstract class Text
        #     assert "hello".chars.to_a == ['h', 'e', 'l', 'l', 'o']
        fun chars: SequenceRead[Char] is abstract
 
+       # Gets a view on the bytes of the Text object
+       #
+       #     assert "hello".bytes.to_a == [104u8, 101u8, 108u8, 108u8, 111u8]
+       fun bytes: SequenceRead[Byte] is abstract
+
        # Number of characters contained in self.
        #
        #     assert "12345".length == 5
        #     assert "".length == 0
+       #     assert "あいうえお".length == 5
        fun length: Int is abstract
 
+       # Number of bytes in `self`
+       #
+       #     assert "12345".bytelen == 5
+       #     assert "あいうえお".bytelen == 15
+       fun bytelen: Int is abstract
+
        # Create a substring.
        #
        #     assert "abcd".substring(1, 2)      ==  "bc"
        #     assert "abcd".substring(-1, 2)     ==  "a"
        #     assert "abcd".substring(1, 0)      ==  ""
        #     assert "abcd".substring(2, 5)      ==  "cd"
+       #     assert "あいうえお".substring(1,3) ==  "いうえ"
        #
        # A `from` index < 0 will be replaced by 0.
        # Unless a `count` value is > 0 at the same time.
@@ -218,14 +231,172 @@ abstract class Text
        #     assert "abcd".has_suffix("bcd")        ==  true
        fun has_suffix(suffix: String): Bool do return has_substring(suffix, length - suffix.length)
 
-       # If `self` contains only digits, return the corresponding integer
+       # Returns a copy of `self` minus all occurences of `c`
+       #
+       #     assert "__init__".remove_all('_') == "init"
+       fun remove_all(c: Char): String do
+               var b = new Buffer
+               for i in chars do if i != c then b.add i
+               return b.to_s
+       end
+
+       # Is `self` a well-formed Integer (i.e. parsable via `to_i`)
+       #
+       #     assert "123".is_int
+       #     assert "0b1011".is_int
+       #     assert not "0x_".is_int
+       #     assert not "0xGE".is_int
+       fun is_int: Bool do
+               var s = remove_all('_')
+               var pos = 0
+               while s[pos] == '-' do
+                       pos += 1
+               end
+               s = s.substring_from(pos)
+               var rets = s.strip_numhead
+               if rets == "" then return false
+               var hd = get_numhead
+               if hd == "0x" or hd == "0X" then return rets.is_hex
+               if hd == "0b" or hd == "0B" then return rets.is_bin
+               if hd == "0o" or hd == "0O" then return rets.is_oct
+               return hd.is_dec
+       end
+
+       # Removes the numeric head of `self` if present
+       #
+       #     intrude import standard::text::abstract_text
+       #     assert "0xFFEF".strip_numhead  == "FFEF"
+       #     assert "0o7364".strip_numhead  == "7364"
+       #     assert "0b01001".strip_numhead == "01001"
+       #     assert "98".strip_numhead      == "98"
+       private fun strip_numhead: Text do
+               if get_numhead != "" then return substring_from(2)
+               return self
+       end
+
+       # Gets the numeric head of `self` if present
+       # Returns "" otherwise
+       #
+       #     intrude import standard::text::abstract_text
+       #     assert "0xFEFF".get_numhead  == "0x"
+       #     assert "0b01001".get_numhead == "0b"
+       #     assert "0o872".get_numhead   == "0o"
+       #     assert "98".get_numhead      == ""
+       private fun get_numhead: Text do
+               if self.length < 2 then return ""
+               var c = self[0]
+               if c != '0' then return ""
+               c = self[1]
+               if c == 'x' or c == 'b' or c == 'o' or
+                  c == 'X' or c == 'B' or c == 'O' then return substring(0, 2)
+               return ""
+       end
+
+       # Removes the numeric extension if present
+       #
+       #     intrude import standard::text::abstract_text
+       #     assert "0xFEFFu8".strip_numext  == "0xFEFF"
+       #     assert "0b01001u8".strip_numext == "0b01001"
+       #     assert "0o872u8".strip_numext   == "0o872"
+       #     assert "98".strip_numext        == "98"
+       private fun strip_numext: Text do
+               var ext = get_numext
+               if ext != "" then return substring(0, length - ext.length)
+               return self
+       end
+
+       # Gets the numeric extension (i/u 8/16/32) in `self` is present
+       # Returns "" otherwise
+       #
+       #     intrude import standard::text::abstract_text
+       #     assert "0xFEFFu8".get_numext  == "u8"
+       #     assert "0b01001u8".get_numext == "u8"
+       #     assert "0o872u8".get_numext   == "u8"
+       #     assert "98".get_numext        == ""
+       private fun get_numext: Text do
+               var len = self.length
+               var max = if self.length < 3 then self.length else 3
+               for i in [1 .. max] do
+                       var c = self[len - i]
+                       if c == 'i' or c == 'u' then return substring_from(len - i)
+               end
+               return ""
+       end
+
+       # Returns `self` as the corresponding integer
        #
        #     assert "123".to_i        == 123
        #     assert "-1".to_i         == -1
+       #     assert "0x64".to_i       == 100
+       #     assert "0b1100_0011".to_i== 195
+       #     assert "--12".to_i       == 12
+       #
+       # REQUIRE: `self`.`is_int`
        fun to_i: Int
        do
-               # Shortcut
-               return to_s.to_cstring.atoi
+               assert self.is_int
+               var s = remove_all('_')
+               var val = 0
+               var neg = false
+               var pos = 0
+               while s[pos] == '-' do
+                       neg = not neg
+                       pos += 1
+               end
+               s = s.substring_from(pos)
+               if s.length >= 2 then
+                       var s1 = s[1]
+                       if s1 == 'x' or s1 == 'X' then
+                               val = s.substring_from(2).to_hex
+                       else if s1 == 'o' or s1 == 'O' then
+                               val = s.substring_from(2).to_oct
+                       else if s1 == 'b' or s1 == 'B' then
+                               val = s.substring_from(2).to_bin
+                       else if s1.is_numeric then
+                               val = s.to_dec
+                       end
+               else
+                       val = s.to_dec
+               end
+               return if neg then -val else val
+       end
+
+       # Is `self` a valid integer ?
+       #
+       #     assert "0xFE46u8".is_num
+       #     assert "0b0100".is_num
+       #     assert "0o645".is_num
+       #     assert "897u8".is_num
+       fun is_num: Bool do
+               var prefix = get_numhead
+               var s = strip_numhead.strip_numext.remove_all('_')
+               if prefix != "" then
+                       var c = prefix[1]
+                       if c == 'x' or c == 'X' then return s.is_hex
+                       if c == 'o' or c == 'O' then return s.is_oct
+                       if c == 'b' or c == 'B' then return s.is_bin
+               end
+               return s.is_dec
+       end
+
+       # Is `self` is a properly formatted integer, returns the corresponding value
+       #
+       #     assert "0xFEu8".to_num  == 254u8
+       #     assert "0b10_10".to_num != 10u8
+       fun to_num: nullable Numeric do
+               if not is_num then return null
+               var s = remove_all('_')
+               var ext = s.get_numext
+               var trunk = s.strip_numext
+               if trunk.strip_numhead == "" then return null
+               var trval = trunk.to_i
+               if ext == "u8" then
+                       return trval.to_b
+               else if ext == "" then
+                       return trval
+               else
+                       return null
+               end
        end
 
        # If `self` contains a float, return the corresponding float
@@ -254,6 +425,11 @@ abstract class Text
        #     assert "101101".to_bin == 45
        fun to_bin: Int do return a_to(2)
 
+       # If `self` contains only digits '0' .. '9', return the corresponding integer.
+       #
+       #     assert "108".to_dec == 108
+       fun to_dec: Int do return a_to(10)
+
        # If `self` contains only digits and letters, return the corresponding integer in a given base
        #
        #     assert "120".a_to(3)     == 15
@@ -322,6 +498,33 @@ abstract class Text
                return true
        end
 
+       # Returns `true` if the string contains only Binary digits
+       #
+       #     assert "1101100".is_bin  == true
+       #     assert "1101020".is_bin  == false
+       fun is_bin: Bool do
+               for i in chars do if i != '0' and i != '1' then return false
+               return true
+       end
+
+       # Returns `true` if the string contains only Octal digits
+       #
+       #     assert "213453".is_oct  == true
+       #     assert "781".is_oct     == false
+       fun is_oct: Bool do
+               for i in chars do if i < '0' or i > '7' then return false
+               return true
+       end
+
+       # Returns `true` if the string contains only Decimal digits
+       #
+       #     assert "10839".is_dec == true
+       #     assert "164F".is_dec  == false
+       fun is_dec: Bool do
+               for i in chars do if i < '0' or i > '9' then return false
+               return true
+       end
+
        # Are all letters in `self` upper-case ?
        #
        #     assert "HELLO WORLD".is_upper == true
@@ -902,7 +1105,7 @@ abstract class Text
                var mypos = src_offset
                var itspos = dest_offset
                while n > 0 do
-                       dest[itspos] = self.chars[mypos]
+                       dest[itspos] = self.bytes[mypos]
                        itspos += 1
                        mypos += 1
                        n -= 1
@@ -924,7 +1127,7 @@ abstract class FlatText
        # Real items, used as cache for to_cstring is called
        private var real_items: nullable NativeString = null
 
-       # Returns a char* starting at position `index_from`
+       # Returns a char* starting at position `first_byte`
        #
        # WARNING: If you choose to use this service, be careful of the following.
        #
@@ -943,6 +1146,8 @@ abstract class FlatText
 
        redef var length = 0
 
+       redef var bytelen = 0
+
        redef fun output
        do
                var i = 0
@@ -958,7 +1163,7 @@ abstract class FlatText
 end
 
 # Abstract class for the SequenceRead compatible
-# views on String and Buffer objects
+# views on the chars of any Text
 private abstract class StringCharView
        super SequenceRead[Char]
 
@@ -975,6 +1180,24 @@ private abstract class StringCharView
        redef fun reverse_iterator do return self.reverse_iterator_from(self.length - 1)
 end
 
+# Abstract class for the SequenceRead compatible
+# views on the bytes of any Text
+private abstract class StringByteView
+       super SequenceRead[Byte]
+
+       type SELFTYPE: Text
+
+       var target: SELFTYPE
+
+       redef fun is_empty do return target.is_empty
+
+       redef fun length do return target.length
+
+       redef fun iterator do return self.iterator_from(0)
+
+       redef fun reverse_iterator do return self.reverse_iterator_from(target.bytelen - 1)
+end
+
 # Immutable sequence of characters.
 #
 # String objects may be created using literals.
@@ -1278,9 +1501,13 @@ abstract class Buffer
        # In Buffers, the internal sequence of character is mutable
        # Thus, `chars` can be used to modify the buffer.
        redef fun chars: Sequence[Char] is abstract
+
+       # In Buffers, the internal sequence of bytes is mutable
+       # Thus, `bytes` can be used to modify the buffer.
+       redef fun bytes: Sequence[Byte] is abstract
 end
 
-# View on Buffer objects, extends Sequence
+# View for chars on Buffer objects, extends Sequence
 # for mutation operations
 private abstract class BufferCharView
        super StringCharView
@@ -1290,6 +1517,15 @@ private abstract class BufferCharView
 
 end
 
+# View for bytes on Buffer objects, extends Sequence
+# for mutation operations
+private abstract class BufferByteView
+       super StringByteView
+       super Sequence[Byte]
+
+       redef type SELFTYPE: Buffer
+end
+
 redef class Object
        # User readable representation of `self`.
        fun to_s: String do return inspect
@@ -1348,7 +1584,7 @@ redef class Byte
        redef fun to_s do
                var nslen = byte_to_s_len
                var ns = new NativeString(nslen + 1)
-               ns[nslen] = '\0'
+               ns[nslen] = 0u8
                native_byte_to_s(ns, nslen + 1)
                return ns.to_s_with_length(nslen)
        end
@@ -1482,20 +1718,58 @@ redef class Float
 end
 
 redef class Char
+
+       # Length of `self` in a UTF-8 String
+       private fun u8char_len: Int do
+               var c = self.ascii
+               if c < 0x80 then return 1
+               if c <= 0x7FF then return 2
+               if c <= 0xFFFF then return 3
+               if c <= 0x10FFFF then return 4
+               # Bad character format
+               return 1
+       end
+
        #     assert 'x'.to_s    == "x"
-       redef fun to_s
-       do
-               var s = new Buffer.with_cap(1)
-               s.chars[0] = self
-               return s.to_s
+       redef fun to_s do
+               var ln = u8char_len
+               var ns = new NativeString(ln + 1)
+               u8char_tos(ns, ln)
+               return ns.to_s_with_length(ln)
        end
 
+       private fun u8char_tos(r: NativeString, len: Int) `{
+               r[len] = '\0';
+               switch(len){
+                       case 1:
+                               r[0] = self;
+                               break;
+                       case 2:
+                               r[0] = 0xC0 | ((self & 0x7C0) >> 6);
+                               r[1] = 0x80 | (self & 0x3F);
+                               break;
+                       case 3:
+                               r[0] = 0xE0 | ((self & 0xF000) >> 12);
+                               r[1] = 0x80 | ((self & 0xFC0) >> 6);
+                               r[2] = 0x80 | (self & 0x3F);
+                               break;
+                       case 4:
+                               r[0] = 0xF0 | ((self & 0x1C0000) >> 18);
+                               r[1] = 0x80 | ((self & 0x3F000) >> 12);
+                               r[2] = 0x80 | ((self & 0xFC0) >> 6);
+                               r[3] = 0x80 | (self & 0x3F);
+                               break;
+               }
+       `}
+
        # Returns true if the char is a numerical digit
        #
        #     assert '0'.is_numeric
        #     assert '9'.is_numeric
        #     assert not 'a'.is_numeric
        #     assert not '?'.is_numeric
+       #
+       # FIXME: Works on ASCII-range only
        fun is_numeric: Bool
        do
                return self >= '0' and self <= '9'
@@ -1507,6 +1781,8 @@ redef class Char
        #     assert 'Z'.is_alpha
        #     assert not '0'.is_alpha
        #     assert not '?'.is_alpha
+       #
+       # FIXME: Works on ASCII-range only
        fun is_alpha: Bool
        do
                return (self >= 'a' and self <= 'z') or (self >= 'A' and self <= 'Z')
@@ -1519,6 +1795,8 @@ redef class Char
        #     assert '0'.is_alphanumeric
        #     assert '9'.is_alphanumeric
        #     assert not '?'.is_alphanumeric
+       #
+       # FIXME: Works on ASCII-range only
        fun is_alphanumeric: Bool
        do
                return self.is_numeric or self.is_alpha
@@ -1556,11 +1834,14 @@ redef class Collection[E]
                return s.to_s
        end
 
-       # Concatenate and separate each elements with `sep`.
+       # Concatenate and separate each elements with `separator`.
+       #
+       # Only concatenate if `separator == null`.
        #
-       #     assert [1, 2, 3].join(":")         == "1:2:3"
-       #     assert [1..3].join(":")            == "1:2:3"
-       fun join(sep: Text): String
+       #     assert [1, 2, 3].join(":")    == "1:2:3"
+       #     assert [1..3].join(":")       == "1:2:3"
+       #     assert [1..3].join            == "123"
+       fun join(separator: nullable Text): String
        do
                if is_empty then return ""
 
@@ -1574,7 +1855,7 @@ redef class Collection[E]
                # Concat other items
                i.next
                while i.is_ok do
-                       s.append(sep)
+                       if separator != null then s.append(separator)
                        e = i.item
                        if e != null then s.append(e.to_s)
                        i.next
@@ -1584,15 +1865,15 @@ redef class Collection[E]
 end
 
 redef class Map[K,V]
-       # Concatenate couple of 'key value'.
-       # key and value are separated by `couple_sep`.
-       # each couple is separated each couple with `sep`.
+       # Concatenate couples of key value.
+       # Key and value are separated by `couple_sep`.
+       # Couples are separated by `sep`.
        #
-       #     var m = new ArrayMap[Int, String]
+       #     var m = new HashMap[Int, String]
        #     m[1] = "one"
        #     m[10] = "ten"
        #     assert m.join("; ", "=") == "1=one; 10=ten"
-       fun join(sep: String, couple_sep: String): String is abstract
+       fun join(sep, couple_sep: String): String is abstract
 end
 
 redef class Sys
index cec70f6..26c1a90 100644 (file)
@@ -12,6 +12,7 @@
 module flat
 
 intrude import abstract_text
+intrude import native
 
 `{
 #include <stdio.h>
@@ -38,43 +39,86 @@ class FlatString
        super FlatText
        super String
 
-       # Index in _items of the start of the string
-       private var index_from: Int is noinit
+       # Index at which `self` begins in `items`, inclusively
+       private var first_byte: Int is noinit
 
-       # Indes in _items of the last item of the string
-       private var index_to: Int is noinit
+       # Index at which `self` ends in `items`, inclusively
+       private var last_byte: Int is noinit
 
        redef var chars = new FlatStringCharView(self) is lazy
 
-       redef fun [](index)
-       do
-               # Check that the index (+ index_from) is not larger than indexTo
-               # In other terms, if the index is valid
-               assert index >= 0
-               assert (index + index_from) <= index_to
-               return items[index + index_from]
+       redef var bytes = new FlatStringByteView(self) is lazy
+
+       # Cache of the latest position (char) explored in the string
+       var position: Int = 0
+       # Cached position (bytes) in the NativeString underlying the String
+       var bytepos: Int = first_byte is lateinit
+
+       redef var length is lazy do
+               if bytelen == 0 then return 0
+               var st = first_byte
+               var its = items
+               var ln = 0
+               var lst = last_byte
+               while st <= lst do
+                       st += its.length_of_char_at(st)
+                       ln += 1
+               end
+               return ln
        end
 
-       ################################################
-       #       AbstractString specific methods        #
-       ################################################
+       redef fun [](index) do return items.char_at(char_to_byte_index(index))
+
+       # Index of the character `index` in `items`
+       private fun char_to_byte_index(index: Int): Int do
+               var ln = length
+               assert index >= 0
+               assert index < ln
+
+               # Find best insertion point
+               var delta_begin = index
+               var delta_end = (ln - 1) - index
+               var delta_cache = (position - index).abs
+               var min = delta_begin
+               var its = items
+
+               if delta_cache < min then min = delta_cache
+               if delta_end < min then min = delta_end
+
+               var ns_i: Int
+               var my_i: Int
+
+               if min == delta_begin then
+                       ns_i = first_byte
+                       my_i = 0
+               else if min == delta_cache then
+                       ns_i = bytepos
+                       my_i = position
+               else
+                       ns_i = its.find_beginning_of_char_at(last_byte)
+                       my_i = length - 1
+               end
+
+               ns_i = its.char_to_byte_index_cached(index, my_i, ns_i)
+
+               position = index
+               bytepos = ns_i
+
+               return ns_i
+       end
 
        redef fun reversed
        do
-               var native = new NativeString(self.length + 1)
-               var length = self.length
-               var items = self.items
-               var pos = 0
-               var ipos = length-1
-               while pos < length do
-                       native[pos] = items[ipos]
-                       pos += 1
-                       ipos -= 1
+               var b = new FlatBuffer.with_capacity(bytelen + 1)
+               for i in [length - 1 .. 0].step(-1) do
+                       b.add self[i]
                end
-               return native.to_s_with_length(self.length)
+               var s = b.to_s.as(FlatString)
+               s.length = self.length
+               return s
        end
 
-       redef fun fast_cstring do return items.fast_cstring(index_from)
+       redef fun fast_cstring do return items.fast_cstring(first_byte)
 
        redef fun substring(from, count)
        do
@@ -86,100 +130,91 @@ class FlatString
                        from = 0
                end
 
-               var new_from = index_from + from
+               if (count + from) > length then count = length - from
+               if count <= 0 then return ""
+               var end_index = from + count - 1
 
-               if (new_from + count) > index_to then
-                       var new_len = index_to - new_from + 1
-                       if new_len <= 0 then return empty
-                       return new FlatString.with_infos(items, new_len, new_from, index_to)
-               end
-
-               if count <= 0 then return empty
+               var bytefrom = char_to_byte_index(from)
+               var byteto = char_to_byte_index(end_index)
+               byteto += items.length_of_char_at(byteto) - 1
 
-               var to = new_from + count - 1
-
-               return new FlatString.with_infos(items, to - new_from + 1, new_from, to)
+               var s = new FlatString.full(items, byteto - bytefrom + 1, bytefrom, byteto, count)
+               return s
        end
 
        redef fun empty do return "".as(FlatString)
 
        redef fun to_upper
        do
-               var outstr = new NativeString(self.length + 1)
-               var out_index = 0
+               var outstr = new FlatBuffer.with_capacity(self.bytelen + 1)
 
-               var myitems = self.items
-               var index_from = self.index_from
-               var max = self.index_to
+               var mylen = length
+               var pos = 0
 
-               while index_from <= max do
-                       outstr[out_index] = myitems[index_from].to_upper
-                       out_index += 1
-                       index_from += 1
+               while pos < mylen do
+                       outstr.add(chars[pos].to_upper)
+                       pos += 1
                end
 
-               outstr[self.length] = '\0'
-
-               return outstr.to_s_with_length(self.length)
+               return outstr.to_s
        end
 
        redef fun to_lower
        do
-               var outstr = new NativeString(self.length + 1)
-               var out_index = 0
+               var outstr = new FlatBuffer.with_capacity(self.bytelen + 1)
 
-               var myitems = self.items
-               var index_from = self.index_from
-               var max = self.index_to
+               var mylen = length
+               var pos = 0
 
-               while index_from <= max do
-                       outstr[out_index] = myitems[index_from].to_lower
-                       out_index += 1
-                       index_from += 1
+               while pos < mylen do
+                       outstr.add(chars[pos].to_lower)
+                       pos += 1
                end
 
-               outstr[self.length] = '\0'
-
-               return outstr.to_s_with_length(self.length)
+               return outstr.to_s
        end
 
        redef fun output
        do
-               var i = self.index_from
-               var imax = self.index_to
-               while i <= imax do
-                       items[i].output
-                       i += 1
-               end
+               for i in chars do i.output
        end
 
        ##################################################
        #              String Specific Methods           #
        ##################################################
 
-       # Low-level creation of a new string with given data.
+       # Low-level creation of a new string with minimal data.
        #
        # `items` will be used as is, without copy, to retrieve the characters of the string.
        # Aliasing issues is the responsibility of the caller.
-       private init with_infos(items: NativeString, length: Int, from: Int, to: Int)
+       private init with_infos(items: NativeString, bytelen, from, to: Int)
        do
                self.items = items
-               self.length = length
-               index_from = from
-               index_to = to
+               self.bytelen = bytelen
+               first_byte = from
+               last_byte = to
        end
 
-       redef fun to_cstring
+       # Low-level creation of a new string with all the data.
+       #
+       # `items` will be used as is, without copy, to retrieve the characters of the string.
+       # Aliasing issues is the responsibility of the caller.
+       private init full(items: NativeString, bytelen, from, to, length: Int)
        do
-               if real_items != null then
-                       return real_items.as(not null)
-               else
-                       var newItems = new NativeString(length + 1)
-                       self.items.copy_to(newItems, length, index_from, 0)
-                       newItems[length] = '\0'
-                       self.real_items = newItems
-                       return newItems
-               end
+               self.items = items
+               self.length = length
+               self.bytelen = bytelen
+               first_byte = from
+               last_byte = to
+       end
+
+       redef fun to_cstring do
+               if real_items != null then return real_items.as(not null)
+               var new_items = new NativeString(bytelen + 1)
+               self.items.copy_to(new_items, bytelen, first_byte, 0)
+               new_items[bytelen] = 0u8
+               real_items = new_items
+               return new_items
        end
 
        redef fun ==(other)
@@ -188,12 +223,12 @@ class FlatString
 
                if self.object_id == other.object_id then return true
 
-               var my_length = length
+               var my_length = bytelen
 
-               if other.length != my_length then return false
+               if other.bytelen != my_length then return false
 
-               var my_index = index_from
-               var its_index = other.index_from
+               var my_index = first_byte
+               var its_index = other.first_byte
 
                var last_iteration = my_index + my_length
 
@@ -215,99 +250,74 @@ class FlatString
 
                if self.object_id == other.object_id then return false
 
-               var my_curr_char : Char
-               var its_curr_char : Char
-
-               var curr_id_self = self.index_from
-               var curr_id_other = other.index_from
+               var my_length = self.bytelen
+               var its_length = other.bytelen
 
-               var my_items = self.items
-               var its_items = other.items
+               var max = if my_length < its_length then my_length else its_length
 
-               var my_length = self.length
-               var its_length = other.length
+               var myits = self.bytes
+               var itsits = other.bytes
 
-               var max_iterations = curr_id_self + my_length
-
-               while curr_id_self < max_iterations do
-                       my_curr_char = my_items[curr_id_self]
-                       its_curr_char = its_items[curr_id_other]
+               for i in [0 .. max[ do
+                       var my_curr_char = myits[i]
+                       var its_curr_char = itsits[i]
 
                        if my_curr_char != its_curr_char then
                                if my_curr_char < its_curr_char then return true
                                return false
                        end
-
-                       curr_id_self += 1
-                       curr_id_other += 1
                end
 
                return my_length < its_length
        end
 
-       redef fun +(s)
-       do
-               var my_length = self.length
-               var its_length = s.length
-
-               var total_length = my_length + its_length
-
-               var target_string = new NativeString(my_length + its_length + 1)
-
-               self.items.copy_to(target_string, my_length, index_from, 0)
-               if s isa FlatString then
-                       s.items.copy_to(target_string, its_length, s.index_from, my_length)
-               else if s isa FlatBuffer then
-                       s.items.copy_to(target_string, its_length, 0, my_length)
+       redef fun +(o) do
+               var s = o.to_s
+               var slen = s.bytelen
+               var mlen = bytelen
+               var nlen = mlen + slen
+               var mits = items
+               var mifrom = first_byte
+               if s isa FlatText then
+                       var sits = s.items
+                       var sifrom = s.as(FlatString).first_byte
+                       var ns = new NativeString(nlen + 1)
+                       mits.copy_to(ns, mlen, mifrom, 0)
+                       sits.copy_to(ns, slen, sifrom, mlen)
+                       return new FlatString.full(ns, nlen, 0, nlen - 1, length + o.length)
                else
-                       var curr_pos = my_length
-                       for i in [0..s.length[ do
-                               var c = s.chars[i]
-                               target_string[curr_pos] = c
-                               curr_pos += 1
-                       end
+                       abort
                end
-
-               target_string[total_length] = '\0'
-
-               return target_string.to_s_with_length(total_length)
        end
 
-       redef fun *(i)
-       do
-               assert i >= 0
-
-               var my_length = self.length
-
-               var final_length = my_length * i
-
-               var my_items = self.items
-
-               var target_string = new NativeString(final_length + 1)
-
-               target_string[final_length] = '\0'
-
-               var current_last = 0
-
-               for iteration in [1 .. i] do
-                       my_items.copy_to(target_string, my_length, 0, current_last)
-                       current_last += my_length
+       redef fun *(i) do
+               var mybtlen = bytelen
+               var new_bytelen = mybtlen * i
+               var mylen = length
+               var newlen = mylen * i
+               var ns = new NativeString(new_bytelen + 1)
+               ns[new_bytelen] = 0u8
+               var offset = 0
+               while i > 0 do
+                       items.copy_to(ns, bytelen, first_byte, offset)
+                       offset += mybtlen
+                       i -= 1
                end
-
-               return target_string.to_s_with_length(final_length)
+               return new FlatString.full(ns, new_bytelen, 0, new_bytelen - 1, newlen)
        end
 
+
        redef fun hash
        do
                if hash_cache == null then
                        # djb2 hash algorithm
                        var h = 5381
-                       var i = index_from
+                       var i = first_byte
 
                        var myitems = items
 
-                       while i <= index_to do
-                               h = h.lshift(5) + h + myitems[i].ascii
+                       while i <= last_byte do
+                               h = h.lshift(5) + h + myitems[i].to_i
                                i += 1
                        end
 
@@ -320,34 +330,91 @@ class FlatString
        redef fun substrings do return new FlatSubstringsIter(self)
 end
 
-private class FlatStringReverseIterator
+private class FlatStringCharReverseIterator
        super IndexedIterator[Char]
 
        var target: FlatString
 
+       var curr_pos: Int
+
+       init with_pos(tgt: FlatString, pos: Int)
+       do
+               init(tgt, pos)
+       end
+
+       redef fun is_ok do return curr_pos >= 0
+
+       redef fun item do return target[curr_pos]
+
+       redef fun next do curr_pos -= 1
+
+       redef fun index do return curr_pos
+
+end
+
+private class FlatStringCharIterator
+       super IndexedIterator[Char]
+
+       var target: FlatString
+
+       var max: Int
+
+       var curr_pos: Int
+
+       init with_pos(tgt: FlatString, pos: Int)
+       do
+               init(tgt, tgt.length - 1, pos)
+       end
+
+       redef fun is_ok do return curr_pos <= max
+
+       redef fun item do return target[curr_pos]
+
+       redef fun next do curr_pos += 1
+
+       redef fun index do return curr_pos
+
+end
+
+private class FlatStringCharView
+       super StringCharView
+
+       redef type SELFTYPE: FlatString
+
+       redef fun [](index) do return target[index]
+
+       redef fun iterator_from(start) do return new FlatStringCharIterator.with_pos(target, start)
+
+       redef fun reverse_iterator_from(start) do return new FlatStringCharReverseIterator.with_pos(target, start)
+
+end
+
+private class FlatStringByteReverseIterator
+       super IndexedIterator[Byte]
+
+       var target: FlatString
+
        var target_items: NativeString
 
        var curr_pos: Int
 
        init with_pos(tgt: FlatString, pos: Int)
        do
-               target = tgt
-               target_items = tgt.items
-               curr_pos = pos + tgt.index_from
+               init(tgt, tgt.items, pos + tgt.first_byte)
        end
 
-       redef fun is_ok do return curr_pos >= target.index_from
+       redef fun is_ok do return curr_pos >= target.first_byte
 
        redef fun item do return target_items[curr_pos]
 
        redef fun next do curr_pos -= 1
 
-       redef fun index do return curr_pos - target.index_from
+       redef fun index do return curr_pos - target.first_byte
 
 end
 
-private class FlatStringIterator
-       super IndexedIterator[Char]
+private class FlatStringByteIterator
+       super IndexedIterator[Byte]
 
        var target: FlatString
 
@@ -357,39 +424,37 @@ private class FlatStringIterator
 
        init with_pos(tgt: FlatString, pos: Int)
        do
-               target = tgt
-               target_items = tgt.items
-               curr_pos = pos + target.index_from
+               init(tgt, tgt.items, pos + tgt.first_byte)
        end
 
-       redef fun is_ok do return curr_pos <= target.index_to
+       redef fun is_ok do return curr_pos <= target.last_byte
 
        redef fun item do return target_items[curr_pos]
 
        redef fun next do curr_pos += 1
 
-       redef fun index do return curr_pos - target.index_from
+       redef fun index do return curr_pos - target.first_byte
 
 end
 
-private class FlatStringCharView
-       super StringCharView
+private class FlatStringByteView
+       super StringByteView
 
        redef type SELFTYPE: FlatString
 
        redef fun [](index)
        do
-               # Check that the index (+ index_from) is not larger than indexTo
+               # Check that the index (+ first_byte) is not larger than last_byte
                # In other terms, if the index is valid
                assert index >= 0
                var target = self.target
-               assert (index + target.index_from) <= target.index_to
-               return target.items[index + target.index_from]
+               assert (index + target.first_byte) <= target.last_byte
+               return target.items[index + target.first_byte]
        end
 
-       redef fun iterator_from(start) do return new FlatStringIterator.with_pos(target, start)
+       redef fun iterator_from(start) do return new FlatStringByteIterator.with_pos(target, start)
 
-       redef fun reverse_iterator_from(start) do return new FlatStringReverseIterator.with_pos(target, start)
+       redef fun reverse_iterator_from(start) do return new FlatStringByteReverseIterator.with_pos(target, start)
 
 end
 
@@ -406,7 +471,25 @@ class FlatBuffer
 
        redef var chars: Sequence[Char] = new FlatBufferCharView(self) is lazy
 
-       private var capacity: Int = 0
+       redef var bytes: Sequence[Byte] = new FlatBufferByteView(self) is lazy
+
+       redef var bytelen = 0
+
+       # O(n)
+       redef fun length do
+               var max = bytelen
+               if max == 0 then return 0
+               var pos = 0
+               var ln = 0
+               var its = items
+               while pos < max do
+                       pos += its.length_of_char_at(pos)
+                       ln += 1
+               end
+               return ln
+       end
+
+       private var capacity = 0
 
        redef fun fast_cstring do return items.fast_cstring(0)
 
@@ -418,42 +501,84 @@ class FlatBuffer
        # the Copy-On-Write flag `written` is set at true.
        private fun reset do
                var nns = new NativeString(capacity)
-               items.copy_to(nns, length, 0, 0)
+               items.copy_to(nns, bytelen, 0, 0)
                items = nns
                written = false
        end
 
-       redef fun [](index)
+       # Shifts the content of the buffer by `len` bytes to the right, starting at byte `from`
+       #
+       # Internal only, does not modify bytelen or length, this is the caller's responsability
+       private fun rshift_bytes(from: Int, len: Int) do
+               var oit = items
+               var nit = items
+               if bytelen + len > capacity then
+                       capacity = capacity * 2 + 2
+                       nit = new NativeString(capacity)
+                       oit.copy_to(nit, 0, 0, from)
+               end
+               oit.copy_to(nit, bytelen - from, from, from + len)
+       end
+
+       # Shifts the content of the buffer by `len` bytes to the left, starting at `from`
+       #
+       # Internal only, does not modify bytelen or length, this is the caller's responsability
+       private fun lshift_bytes(from: Int, len: Int) do
+               items.copy_to(items, bytelen - from, from, from - len)
+       end
+
+       redef fun [](i)
        do
-               assert index >= 0
-               assert index  < length
-               return items[index]
+               assert i < length and i >= 0
+               return items.char_at(items.char_to_byte_index(i))
        end
 
        redef fun []=(index, item)
        do
+               assert index >= 0 and index <= length
+               if written then reset
                is_dirty = true
                if index == length then
-                       add(item)
+                       add item
                        return
                end
-               if written then reset
-               assert index >= 0 and index < length
-               items[index] = item
+               var ip = items.char_to_byte_index(index)
+               var c = items.char_at(ip)
+               var clen = c.u8char_len
+               var itemlen = item.u8char_len
+               var size_diff = itemlen - clen
+               if size_diff > 0 then
+                       rshift_bytes(ip + clen, size_diff)
+               else if size_diff < 0 then
+                       lshift_bytes(ip + clen, -size_diff)
+               end
+               bytelen += size_diff
+               items.set_char_at(ip, item)
        end
 
        redef fun add(c)
        do
+               if written then reset
+               is_dirty = true
+               var clen = c.u8char_len
+               enlarge(bytelen + clen)
+               items.set_char_at(bytelen, c)
+               bytelen += clen
+       end
+
+       private fun add_byte(b: Byte) do
+               if written then reset
                is_dirty = true
-               if capacity <= length then enlarge(length + 5)
-               items[length] = c
-               length += 1
+               enlarge(bytelen + 1)
+               items[bytelen] = b
+               # FIXME: Might trigger errors
+               bytelen += 1
        end
 
        redef fun clear do
                is_dirty = true
                if written then reset
-               length = 0
+               bytelen = 0
        end
 
        redef fun empty do return new Buffer
@@ -467,7 +592,7 @@ class FlatBuffer
                # it does a copy of the current `Buffer`
                written = false
                var a = new NativeString(c+1)
-               if length > 0 then items.copy_to(a, length, 0, 0)
+               if bytelen > 0 then items.copy_to(a, bytelen, 0, 0)
                items = a
                capacity = c
        end
@@ -475,16 +600,16 @@ class FlatBuffer
        redef fun to_s
        do
                written = true
-               if length == 0 then items = new NativeString(1)
-               return new FlatString.with_infos(items, length, 0, length - 1)
+               if bytelen == 0 then items = new NativeString(1)
+               return new FlatString.with_infos(items, bytelen, 0, bytelen - 1)
        end
 
        redef fun to_cstring
        do
                if is_dirty then
-                       var new_native = new NativeString(length + 1)
-                       new_native[length] = '\0'
-                       if length > 0 then items.copy_to(new_native, length, 0, 0)
+                       var new_native = new NativeString(bytelen + 1)
+                       new_native[bytelen] = 0u8
+                       if length > 0 then items.copy_to(new_native, bytelen, 0, 0)
                        real_items = new_native
                        is_dirty = false
                end
@@ -501,61 +626,51 @@ class FlatBuffer
        #
        # If `items` is shared, `written` should be set to true after the creation
        # so that a modification will do a copy-on-write.
-       private init with_infos(items: NativeString, capacity, length: Int)
+       private init with_infos(items: NativeString, capacity, bytelen: Int)
        do
                self.items = items
-               self.length = length
                self.capacity = capacity
+               self.bytelen = bytelen
        end
 
        # Create a new string copied from `s`.
        init from(s: Text)
        do
-               capacity = s.length + 1
-               length = s.length
-               items = new NativeString(capacity)
-               if s isa FlatString then
-                       s.items.copy_to(items, length, s.index_from, 0)
-               else if s isa FlatBuffer then
-                       s.items.copy_to(items, length, 0, 0)
+               items = new NativeString(s.bytelen)
+               if s isa FlatText then
+                       items = s.items
                else
-                       var curr_pos = 0
-                       for i in [0..s.length[ do
-                               var c = s.chars[i]
-                               items[curr_pos] = c
-                               curr_pos += 1
-                       end
+                       for i in substrings do i.as(FlatString).items.copy_to(items, i.bytelen, 0, 0)
                end
+               bytelen = s.bytelen
+               capacity = s.bytelen
+               written = true
        end
 
        # Create a new empty string with a given capacity.
        init with_capacity(cap: Int)
        do
                assert cap >= 0
-               items = new NativeString(cap+1)
+               items = new NativeString(cap + 1)
                capacity = cap
-               length = 0
+               bytelen = 0
        end
 
        redef fun append(s)
        do
                if s.is_empty then return
                is_dirty = true
-               var sl = s.length
-               if capacity < length + sl then enlarge(length + sl)
+               var sl = s.bytelen
+               enlarge(bytelen + sl)
                if s isa FlatString then
-                       s.items.copy_to(items, sl, s.index_from, length)
+                       s.items.copy_to(items, sl, s.first_byte, bytelen)
                else if s isa FlatBuffer then
-                       s.items.copy_to(items, sl, 0, length)
+                       s.items.copy_to(items, sl, 0, bytelen)
                else
-                       var curr_pos = self.length
-                       for i in [0..s.length[ do
-                               var c = s.chars[i]
-                               items[curr_pos] = c
-                               curr_pos += 1
-                       end
+                       for i in s.substrings do append i
+                       return
                end
-               length += sl
+               bytelen += sl
        end
 
        # Copies the content of self in `dest`
@@ -571,15 +686,16 @@ class FlatBuffer
        redef fun substring(from, count)
        do
                assert count >= 0
-               count += from
                if from < 0 then from = 0
-               if count > length then count = length
-               if from < count then
-                       var len = count - from
-                       var r_items = new NativeString(len)
-                       items.copy_to(r_items, len, from, 0)
-                       var r = new FlatBuffer.with_infos(r_items, len, len)
-                       return r
+               if (from + count) > length then count = length - from
+               if count != 0 then
+                       var bytefrom = items.char_to_byte_index(from)
+                       var byteto = items.char_to_byte_index(count + from - 1)
+                       byteto += items.char_at(byteto).u8char_len - 1
+                       var byte_length = byteto - bytefrom + 1
+                       var r_items = new NativeString(byte_length)
+                       items.copy_to(r_items, byte_length, bytefrom, 0)
+                       return new FlatBuffer.with_infos(r_items, byte_length, byte_length)
                else
                        return new Buffer
                end
@@ -588,22 +704,15 @@ class FlatBuffer
        redef fun reverse
        do
                written = false
-               var ns = new NativeString(capacity)
-               var si = length - 1
-               var ni = 0
-               var it = items
-               while si >= 0 do
-                       ns[ni] = it[si]
-                       ni += 1
-                       si -= 1
-               end
-               items = ns
+               var ns = new FlatBuffer.with_capacity(capacity)
+               for i in chars.reverse_iterator do ns.add i
+               items = ns.items
        end
 
        redef fun times(repeats)
        do
-               var x = new FlatString.with_infos(items, length, 0, length - 1)
-               for i in [1..repeats[ do
+               var x = new FlatString.with_infos(items, bytelen, 0, bytelen - 1)
+               for i in [1 .. repeats[ do
                        append(x)
                end
        end
@@ -611,28 +720,18 @@ class FlatBuffer
        redef fun upper
        do
                if written then reset
-               var it = items
-               var id = length - 1
-               while id >= 0 do
-                       it[id] = it[id].to_upper
-                       id -= 1
-               end
+               for i in [0 .. length[ do self[i] = self[i].to_upper
        end
 
        redef fun lower
        do
                if written then reset
-               var it = items
-               var id = length - 1
-               while id >= 0 do
-                       it[id] = it[id].to_lower
-                       id -= 1
-               end
+               for i in [0 .. length[ do self[i] = self[i].to_lower
        end
 end
 
-private class FlatBufferReverseIterator
-       super IndexedIterator[Char]
+private class FlatBufferByteReverseIterator
+       super IndexedIterator[Byte]
 
        var target: FlatBuffer
 
@@ -642,9 +741,7 @@ private class FlatBufferReverseIterator
 
        init with_pos(tgt: FlatBuffer, pos: Int)
        do
-               target = tgt
-               if tgt.length > 0 then target_items = tgt.items
-               curr_pos = pos
+               init(tgt, tgt.items, pos)
        end
 
        redef fun index do return curr_pos
@@ -657,12 +754,104 @@ private class FlatBufferReverseIterator
 
 end
 
+private class FlatBufferByteView
+       super BufferByteView
+
+       redef type SELFTYPE: FlatBuffer
+
+       redef fun [](index) do return target.items[index]
+
+       redef fun []=(index, item)
+       do
+               assert index >= 0 and index <= target.bytelen
+               if index == target.bytelen then
+                       add(item)
+                       return
+               end
+               target.items[index] = item
+       end
+
+       redef fun push(c)
+       do
+               target.add_byte(c)
+       end
+
+       fun enlarge(cap: Int)
+       do
+               target.enlarge(cap)
+       end
+
+       redef fun append(s)
+       do
+               var s_length = s.length
+               if target.capacity < (target.length + s_length) then enlarge(s_length + target.length)
+               var pos = target.length
+               var its = target.items
+               for i in s do
+                       its[pos] = i
+                       pos += 1
+               end
+               target.length += s.length
+       end
+
+       redef fun iterator_from(pos) do return new FlatBufferByteIterator.with_pos(target, pos)
+
+       redef fun reverse_iterator_from(pos) do return new FlatBufferByteReverseIterator.with_pos(target, pos)
+
+end
+
+private class FlatBufferByteIterator
+       super IndexedIterator[Byte]
+
+       var target: FlatBuffer
+
+       var target_items: NativeString
+
+       var curr_pos: Int
+
+       init with_pos(tgt: FlatBuffer, pos: Int)
+       do
+               init(tgt, tgt.items, pos)
+       end
+
+       redef fun index do return curr_pos
+
+       redef fun is_ok do return curr_pos < target.bytelen
+
+       redef fun item do return target_items[curr_pos]
+
+       redef fun next do curr_pos += 1
+
+end
+
+private class FlatBufferCharReverseIterator
+       super IndexedIterator[Char]
+
+       var target: FlatBuffer
+
+       var curr_pos: Int
+
+       init with_pos(tgt: FlatBuffer, pos: Int)
+       do
+               init(tgt, pos)
+       end
+
+       redef fun index do return curr_pos
+
+       redef fun is_ok do return curr_pos >= 0
+
+       redef fun item do return target[curr_pos]
+
+       redef fun next do curr_pos -= 1
+
+end
+
 private class FlatBufferCharView
        super BufferCharView
 
        redef type SELFTYPE: FlatBuffer
 
-       redef fun [](index) do return target.items[index]
+       redef fun [](index) do return target[index]
 
        redef fun []=(index, item)
        do
@@ -671,7 +860,7 @@ private class FlatBufferCharView
                        add(item)
                        return
                end
-               target.items[index] = item
+               target[index] = item
        end
 
        redef fun push(c)
@@ -693,35 +882,34 @@ private class FlatBufferCharView
        do
                var s_length = s.length
                if target.capacity < s.length then enlarge(s_length + target.length)
+               for i in s do target.add i
        end
 
-       redef fun iterator_from(pos) do return new FlatBufferIterator.with_pos(target, pos)
+       redef fun iterator_from(pos) do return new FlatBufferCharIterator.with_pos(target, pos)
 
-       redef fun reverse_iterator_from(pos) do return new FlatBufferReverseIterator.with_pos(target, pos)
+       redef fun reverse_iterator_from(pos) do return new FlatBufferCharReverseIterator.with_pos(target, pos)
 
 end
 
-private class FlatBufferIterator
+private class FlatBufferCharIterator
        super IndexedIterator[Char]
 
        var target: FlatBuffer
 
-       var target_items: NativeString
+       var max: Int
 
        var curr_pos: Int
 
        init with_pos(tgt: FlatBuffer, pos: Int)
        do
-               target = tgt
-               if tgt.length > 0 then target_items = tgt.items
-               curr_pos = pos
+               init(tgt, tgt.length - 1, pos)
        end
 
        redef fun index do return curr_pos
 
-       redef fun is_ok do return curr_pos < target.length
+       redef fun is_ok do return curr_pos <= max
 
-       redef fun item do return target_items[curr_pos]
+       redef fun item do return target[curr_pos]
 
        redef fun next do curr_pos += 1
 
@@ -748,10 +936,42 @@ redef class NativeString
                var new_self = new NativeString(length + 1)
                copy_to(new_self, length, 0, 0)
                var str = new FlatString.with_infos(new_self, length, 0, length - 1)
-               new_self[length] = '\0'
+               new_self[length] = 0u8
                str.real_items = new_self
                return str
        end
+
+       # Sets the next bytes at position `pos` to the value of `c`, encoded in UTF-8
+       #
+       # Very unsafe, make sure to have room for this char prior to calling this function.
+       private fun set_char_at(pos: Int, c: Char) do
+               var ln = c.u8char_len
+               native_set_char(pos, c, ln)
+       end
+
+       private fun native_set_char(pos: Int, c: Char, ln: Int) `{
+               char* dst = self + pos;
+               switch(ln){
+                       case 1:
+                               dst[0] = c;
+                               break;
+                       case 2:
+                               dst[0] = 0xC0 | ((c & 0x7C0) >> 6);
+                               dst[1] = 0x80 | (c & 0x3F);
+                               break;
+                       case 3:
+                               dst[0] = 0xE0 | ((c & 0xF000) >> 12);
+                               dst[1] = 0x80 | ((c & 0xFC0) >> 6);
+                               dst[2] = 0x80 | (c & 0x3F);
+                               break;
+                       case 4:
+                               dst[0] = 0xF0 | ((c & 0x1C0000) >> 18);
+                               dst[1] = 0x80 | ((c & 0x3F000) >> 12);
+                               dst[2] = 0x80 | ((c & 0xFC0) >> 6);
+                               dst[3] = 0x80 | (c & 0x3F);
+                               break;
+               }
+       `}
 end
 
 redef class Int
@@ -774,9 +994,9 @@ redef class Int
 
                var nslen = int_to_s_len
                var ns = new NativeString(nslen + 1)
-               ns[nslen] = '\0'
+               ns[nslen] = 0u8
                native_int_to_s(ns, nslen + 1)
-               return ns.to_s_with_length(nslen)
+               return new FlatString.full(ns, nslen, 0, nslen - 1, nslen)
        end
 end
 
@@ -800,26 +1020,26 @@ redef class Array[E]
                                continue
                        end
                        var tmp = itsi.to_s
-                       sl += tmp.length
+                       sl += tmp.bytelen
                        na[mypos] = tmp
                        i += 1
                        mypos += 1
                end
                var ns = new NativeString(sl + 1)
-               ns[sl] = '\0'
+               ns[sl] = 0u8
                i = 0
                var off = 0
                while i < mypos do
                        var tmp = na[i]
-                       var tpl = tmp.length
                        if tmp isa FlatString then
-                               tmp.items.copy_to(ns, tpl, tmp.index_from, off)
+                               var tpl = tmp.bytelen
+                               tmp.items.copy_to(ns, tpl, tmp.first_byte, off)
                                off += tpl
                        else
                                for j in tmp.substrings do
                                        var s = j.as(FlatString)
-                                       var slen = s.length
-                                       s.items.copy_to(ns, slen, s.index_from, off)
+                                       var slen = s.bytelen
+                                       s.items.copy_to(ns, slen, s.first_byte, off)
                                        off += slen
                                end
                        end
@@ -838,25 +1058,25 @@ redef class NativeArray[E]
                var sl = 0
                var mypos = 0
                while i < l do
-                       sl += na[i].length
+                       sl += na[i].bytelen
                        i += 1
                        mypos += 1
                end
                var ns = new NativeString(sl + 1)
-               ns[sl] = '\0'
+               ns[sl] = 0u8
                i = 0
                var off = 0
                while i < mypos do
                        var tmp = na[i]
-                       var tpl = tmp.length
                        if tmp isa FlatString then
-                               tmp.items.copy_to(ns, tpl, tmp.index_from, off)
+                               var tpl = tmp.bytelen
+                               tmp.items.copy_to(ns, tpl, tmp.first_byte, off)
                                off += tpl
                        else
                                for j in tmp.substrings do
                                        var s = j.as(FlatString)
-                                       var slen = s.length
-                                       s.items.copy_to(ns, slen, s.index_from, off)
+                                       var slen = s.bytelen
+                                       s.items.copy_to(ns, slen, s.first_byte, off)
                                        off += slen
                                end
                        end
index c50caa0..170b196 100644 (file)
 module native
 
 import kernel
+import math
+
+redef class Byte
+       # Gives the length of the UTF-8 char starting with `self`
+       private fun u8len: Int do
+               if self & 0b1000_0000u8 == 0u8 then
+                       return 1
+               else if self & 0b1110_0000u8 == 0b1100_0000u8 then
+                       return 2
+               else if self & 0b1111_0000u8 == 0b1110_0000u8 then
+                       return 3
+               else if self & 0b1111_1000u8 == 0b1111_0000u8 then
+                       return 4
+               else
+                       return 1
+               end
+       end
+end
 
 # Native strings are simple C char *
 extern class NativeString `{ char* `}
@@ -25,10 +43,10 @@ extern class NativeString `{ char* `}
        fun fast_cstring(index: Int): NativeString is intern
 
        # Get char at `index`.
-       fun [](index: Int): Char is intern
+       fun [](index: Int): Byte is intern
 
        # Set char `item` at index.
-       fun []=(index: Int, item: Char) is intern
+       fun []=(index: Int, item: Byte) is intern
 
        # Copy `self` to `dest`.
        fun copy_to(dest: NativeString, length: Int, from: Int, to: Int) is intern
@@ -37,7 +55,7 @@ extern class NativeString `{ char* `}
        fun cstring_length: Int
        do
                var l = 0
-               while self[l] != '\0' do l += 1
+               while self[l] != 0u8 do l += 1
                return l
        end
 
@@ -46,4 +64,90 @@ extern class NativeString `{ char* `}
 
        # Parse `self` as a Float.
        fun atof: Float `{ return atof(self); `}
+
+       # Gets the UTF-8 char at index `pos`
+       #
+       # Index is expressed in Unicode chars
+       #
+       # ~~~raw
+       #     assert "かきく".as(FlatString).items.char_at(0) == 'か'
+       # ~~~
+       #
+       # If the char at position pos is an invalid Unicode char,
+       # the Unicode replacement character � (0xFFFD) will be used.
+       #
+       # ~~~raw
+       #     assert "かきく".as(FlatString).items.char_at(1) == '�'
+       # ~~~
+       fun char_at(pos: Int): Char `{
+               char c = self[pos];
+               if((c & 0x80) == 0x00) return (uint32_t)c;
+               if(((c & 0xE0) == 0xC0) && ((self[pos + 1] & 0xC0) == 0x80)) return ((((uint32_t)c) & 0x1F) << 6) + ((((uint32_t)self[pos + 1] & 0x3F)));
+               if(((c & 0xF0) == 0xE0) && ((self[pos + 1] & 0xC0) == 0x80) && ((self[pos + 2] & 0xC0) == 0x80)) return ((((uint32_t)c) & 0xF) << 12) + ((((uint32_t)self[pos + 1]) & 0x3F) << 6) + ((((uint32_t)self[pos + 2] & 0x3F)));
+               if(((c & 0xF8) == 0xF0) && ((self[pos + 1] & 0xC0) == 0x80) && ((self[pos + 2] & 0xC0) == 0x80) && ((self[pos + 3] & 0xC0) == 0x80)) return ((((uint32_t)c) & 0x7) << 18) + ((((uint32_t)self[pos + 1]) & 0x3F) << 12) + ((((uint32_t)self[pos + 2]) & 0x3F) << 6) + ((((uint32_t)self[pos + 3] & 0x3F)));
+               return 0xFFFD;
+       `}
+
+       # Gets the byte index of char at position `n` in UTF-8 String
+       fun char_to_byte_index(n: Int): Int do return char_to_byte_index_cached(n, 0, 0)
+
+       # Gets the length of the character at position `pos` (1 if invalid sequence)
+       fun length_of_char_at(pos: Int): Int do
+               var c = self[pos]
+               if c & 0x80u8 == 0x00u8 then
+                       return 1
+               else if c & 0xE0u8 == 0xC0u8 and self[pos + 1] & 0xC0u8 == 0x80u8 then
+                       return 2
+               else if c & 0xF0u8 == 0xE0u8 and self[pos + 1] & 0xC0u8 == 0x80u8 and self[pos + 2] & 0xC0u8 == 0x80u8 then
+                       return 3
+               else if c & 0xF8u8 == 0xF0u8 and self[pos + 1] & 0xC0u8 == 0x80u8 and self[pos + 2] & 0xC0u8 == 0x80u8 and self[pos + 3] & 0xC0u8 == 0x80u8 then
+                       return 4
+               else
+                       return 1
+               end
+       end
+
+       # Gets the byte index of char at position `n` in UTF-8 String
+       #
+       # `char_from` and `byte_from` are cached values to seek from.
+       #
+       # NOTE: char_from and byte_from are not guaranteed to be valid cache values
+       # It it up to the client to ensure the validity of the information
+       fun char_to_byte_index_cached(n, char_from, byte_from: Int): Int do
+               var ns_i = byte_from
+               var my_i = char_from
+
+               while my_i < n do
+                       ns_i += length_of_char_at(ns_i)
+                       my_i += 1
+               end
+
+               while my_i > n do
+                       ns_i = find_beginning_of_char_at(ns_i - 1)
+                       my_i -= 1
+               end
+
+               return ns_i
+       end
+
+       # Returns the beginning position of the char at position `pos`
+       #
+       # If the char is invalid UTF-8, `pos` is returned as-is
+       #
+       # ~~~raw
+       #       assert "abc".items.find_beginning_of_char_at(2) == 2
+       #       assert "か".items.find_beginning_of_char_at(1) == 0
+       #       assert [0x41u8, 233u8].to_s.items.find_beginning_of_char_at(1) == 1
+       # ~~~
+       fun find_beginning_of_char_at(pos: Int): Int do
+               var endpos = pos
+               var c = self[pos]
+               while c & 0xC0u8 == 0x80u8 do
+                       pos -= 1
+                       c = self[pos]
+               end
+               var stpos = pos
+               if length_of_char_at(stpos) >= (endpos - stpos + 1) then return pos
+               return endpos
+       end
 end
index 4f6a0be..08611b7 100644 (file)
@@ -72,20 +72,30 @@ private class Concat
 
        redef var chars is lazy do return new RopeChars(self)
 
+       redef var bytes is lazy do return new RopeBytes(self)
+
        redef var length is noinit
 
+       redef var bytelen is noinit
+
        redef fun substrings do return new RopeSubstrings(self)
 
        redef fun empty do return ""
 
+       # Cache for the latest accessed FlatString in `self`
+       var flat_cache: String = ""
+
+       # Position of the beginning of `flat_cache` in `self`
+       var flat_last_pos_start: Int = -1
+
        redef var to_cstring is lazy do
-               var len = length
+               var len = bytelen
                var ns = new NativeString(len + 1)
-               ns[len] = '\0'
+               ns[len] = 0u8
                var off = 0
                for i in substrings do
-                       var ilen = i.length
-                       i.as(FlatString).items.copy_to(ns, ilen, i.as(FlatString).index_from, off)
+                       var ilen = i.bytelen
+                       i.as(FlatString).items.copy_to(ns, ilen, i.as(FlatString).first_byte, off)
                        off += ilen
                end
                return ns
@@ -98,6 +108,7 @@ private class Concat
 
        init do
                length = left.length + right.length
+               bytelen = left.bytelen + right.bytelen
        end
 
        redef fun output do
@@ -105,7 +116,7 @@ private class Concat
                right.output
        end
 
-       redef fun iterator do return new RopeIter(self)
+       redef fun iterator do return new RopeCharIterator(self)
 
        redef fun *(i) do
                var x: String = self
@@ -114,9 +125,27 @@ private class Concat
        end
 
        redef fun [](i) do
-               var llen = left.length
-               if i >= llen then return right[i - llen]
-               return left[i]
+               if flat_last_pos_start != -1 then
+                       var fsp = i - flat_last_pos_start
+                       if fsp >= 0 and fsp < flat_cache.length then return flat_cache[fsp]
+               end
+               var s: String = self
+               var st = i
+               loop
+                       if s isa FlatString then break
+                       s = s.as(Concat)
+                       var lft = s.left
+                       var llen = lft.length
+                       if i >= llen then
+                               s = s.right
+                               i -= llen
+                       else
+                               s = s.left
+                       end
+               end
+               flat_last_pos_start = st - i
+               flat_cache = s
+               return s[i]
        end
 
        redef fun substring(from, len) do
@@ -145,12 +174,12 @@ private class Concat
 
        redef fun +(o) do
                var s = o.to_s
-               var slen = s.length
+               var slen = s.bytelen
                if s isa Concat then
                        return new Concat(self, s)
                else
                        var r = right
-                       var rlen = r.length
+                       var rlen = r.bytelen
                        if rlen + slen > maxlen then return new Concat(self, s)
                        return new Concat(left, r + s)
                end
@@ -175,6 +204,50 @@ private class Concat
                        st = 0
                end
        end
+
+       # Returns a balanced version of `self`
+       fun balance: String do
+               var children = new Array[String]
+               var rnod: String
+               var iter: nullable RopeCharIteratorPiece = new RopeCharIteratorPiece(self, false, false, null)
+               loop
+                       if iter == null then break
+                       rnod = iter.node
+                       if not rnod isa Concat then
+                               children.push rnod
+                               iter = iter.prev
+                               continue
+                       end
+                       if not iter.ldone then
+                               iter.ldone = true
+                               iter = new RopeCharIteratorPiece(rnod.left, false, false, iter)
+                       else if not iter.rdone then
+                               iter.rdone = true
+                               iter = new RopeCharIteratorPiece(rnod.right, false, false, iter)
+                       else
+                               iter = iter.prev
+                       end
+
+               end
+               return recurse_balance(children, children.length)
+       end
+
+       fun recurse_balance(nodes: Array[String], len: Int): String do
+               var finpos = 0
+               var stpos = 0
+               while stpos < len do
+                       if len - stpos > 1 then
+                               nodes[finpos] = new Concat(nodes[stpos], nodes[stpos + 1])
+                               stpos += 2
+                       else
+                               nodes[finpos] = nodes[stpos]
+                               stpos += 1
+                       end
+                       finpos += 1
+               end
+               if finpos == 1 then return nodes[0]
+               return recurse_balance(nodes, finpos)
+       end
 end
 
 # Mutable `Rope`, optimized for concatenation operations
@@ -197,8 +270,10 @@ class RopeBuffer
 
        redef var chars: Sequence[Char] is lazy do return new RopeBufferChars(self)
 
+       redef var bytes: Sequence[Byte] is lazy do return new RopeBufferBytes(self)
+
        # The final string being built on the fly
-       private var str: String is noinit
+       private var str: String = ""
 
        # Current concatenation buffer
        private var ns: NativeString is noinit
@@ -213,10 +288,21 @@ class RopeBuffer
        # a long string (length > maxlen) is appended.
        private var dumped: Int is noinit
 
-       # Length of the complete rope
-       redef var length = 0
+       # Length of the complete rope in chars (0)
+       redef fun length do
+               var st = dumped
+               var len = str.length
+               while st < rpos do
+                       st += ns[st].u8len
+                       len += 1
+               end
+               return len
+       end
 
-       # Length of the mutable part
+       # Length of the complete rope in bytes
+       redef var bytelen = 0
+
+       # Length of the mutable part (in bytes)
        #
        # Is also used as base to compute the size of the next
        # mutable native string (`ns`)
@@ -226,7 +312,6 @@ class RopeBuffer
 
        # Builds an empty `RopeBuffer`
        init do
-               str = ""
                ns = new NativeString(maxlen)
                buf_size = maxlen
                dumped = 0
@@ -237,7 +322,7 @@ class RopeBuffer
                self.str = str
                ns = new NativeString(maxlen)
                buf_size = maxlen
-               length = str.length
+               bytelen = str.length
                dumped = 0
        end
 
@@ -255,11 +340,54 @@ class RopeBuffer
                written = false
        end
 
+       redef fun [](i) do
+               if i < str.length then
+                       return str[i]
+               else
+                       var index = ns.char_to_byte_index_cached(i - str.length, 0, dumped)
+                       return ns.char_at(index)
+               end
+       end
+
+       redef fun []=(i, c) do
+               assert i >= 0 and i <= length
+               if i == length then add c
+               if i < str.length then
+                       bytelen += c.u8char_len - str[i].u8char_len
+                       var s = str
+                       var l = s.substring(0, i)
+                       var r = s.substring_from(i + 1)
+                       str = l + c.to_s + r
+               else
+                       var reali = i - str.length
+                       var index = ns.char_to_byte_index_cached(reali, 0, dumped)
+                       var st_nxt = ns.char_to_byte_index_cached(reali + 1, reali, index)
+                       var loc_c = ns.char_at(index)
+                       if loc_c.u8char_len != c.u8char_len then
+                               var delta = c.u8char_len - loc_c.u8char_len
+                               var remsp = buf_size - rpos
+                               if remsp < delta then
+                                       buf_size *= 2
+                                       var nns = new NativeString(buf_size)
+                                       ns.copy_to(nns, index - dumped, dumped, 0)
+                                       ns.copy_to(nns, rpos - index - loc_c.u8char_len, index + loc_c.u8char_len, index - dumped + delta)
+                                       ns = nns
+                                       index = index - dumped
+                               else
+                                       ns.copy_to(ns, rpos - st_nxt, st_nxt, st_nxt + delta)
+                               end
+                               bytelen += delta
+                               rpos += delta
+                       end
+                       ns.set_char_at(index, c)
+               end
+       end
+
        redef fun empty do return new RopeBuffer
 
        redef fun clear do
                str = ""
-               length = 0
+               bytelen = 0
                rpos = 0
                dumped = 0
                if written then
@@ -300,63 +428,29 @@ class RopeBuffer
        end
 
        redef fun append(s) do
-               var slen = s.length
-               length += slen
-               var rp = rpos
-               if s isa Rope or slen > maxlen then
-                       if rp > 0 and dumped != rp then
-                               str += new FlatString.with_infos(ns, rp - dumped, dumped, rp - 1)
-                               dumped = rp
-                       end
-                       str = str + s
+               var slen = s.bytelen
+               if slen >= maxlen then
+                       persist_buffer
+                       str += s.to_s
                        return
                end
-               var remsp = buf_size - rp
-               var sits: NativeString
-               var begin: Int
-               if s isa FlatString then
-                       begin = s.index_from
-                       sits = s.items
-               else if s isa FlatBuffer then
-                       begin = 0
-                       sits = s.items
-               else
+               if s isa FlatText then
+                       var oits = s.items
+                       var from = if s isa FlatString then s.first_byte else 0
+                       var remsp = buf_size - rpos
                        if slen <= remsp then
-                               for i in s.chars do
-                                       ns[rpos] = i
-                                       rpos += 1
-                               end
-                       else
-                               var spos = 0
-                               for i in [0..remsp[ do
-                                       ns[rpos] = s[spos]
-                                       rpos += 1
-                                       spos += 1
-                               end
-                               dump_buffer
-                               while spos < slen do
-                                       ns[rpos] = s[spos]
-                                       spos += 1
-                                       rpos += 1
-                               end
-                       end
-                       return
-               end
-               if slen <= remsp then
-                       if remsp <= 0 then
-                               dump_buffer
-                               rpos = 0
-                       else
-                               sits.copy_to(ns, slen, begin, rp)
+                               oits.copy_to(ns, slen, from, rpos)
                                rpos += slen
+                               return
                        end
-               else
-                       sits.copy_to(ns, remsp, begin, rp)
-                       rpos = buf_size
+                       var brk = oits.find_beginning_of_char_at(from + remsp)
+                       oits.copy_to(ns, brk, from, rpos)
+                       rpos += brk
                        dump_buffer
-                       var nlen = slen - remsp
-                       sits.copy_to(ns, nlen, begin + remsp, 0)
-                       rpos = nlen
+                       oits.copy_to(ns, slen - remsp, brk, 0)
+                       rpos = slen - remsp
+               else
+                       for i in s.substrings do append i
                end
        end
 
@@ -366,9 +460,22 @@ class RopeBuffer
                        dump_buffer
                        rp = 0
                end
-               ns[rp] = c
+               # TODO: Fix when supporting UTF-8
+               ns[rp] = c.ascii.to_b
+               rp += 1
+               bytelen += 1
+               rpos = rp
+       end
+
+       private fun add_byte(b: Byte) do
+               var rp = rpos
+               if rp >= buf_size then
+                       dump_buffer
+                       rp = 0
+               end
+               ns[rp] = b
                rp += 1
-               length += 1
+               bytelen += 1
                rpos = rp
        end
 
@@ -383,6 +490,15 @@ class RopeBuffer
                ns = new NativeString(bs)
                buf_size = bs
                dumped = 0
+               rpos = 0
+       end
+
+       # Similar to dump_buffer, but does not reallocate a new NativeString
+       private fun persist_buffer do
+               if rpos == dumped then return
+               var nstr = new FlatString.with_infos(ns, rpos - dumped, dumped, rpos - 1)
+               str += nstr
+               dumped = rpos
        end
 
        redef fun output do
@@ -401,10 +517,9 @@ class RopeBuffer
        redef fun enlarge(i) do end
 
        redef fun to_s do
+               persist_buffer
                written = true
-               var nnslen = rpos - dumped
-               if nnslen == 0 then return str
-               return str + new FlatString.with_infos(ns, rpos - dumped, dumped, rpos - 1)
+               return str
        end
 
        redef fun reverse do
@@ -418,20 +533,14 @@ class RopeBuffer
 
        redef fun upper do
                if written then reset
+               persist_buffer
                str = str.to_upper
-               var mits = ns
-               for i in [0 .. rpos[ do
-                       mits[i] = mits[i].to_upper
-               end
        end
 
        redef fun lower do
                if written then reset
+               persist_buffer
                str = str.to_lower
-               var mits = ns
-               for i in [0 .. rpos[ do
-                       mits[i] = mits[i].to_lower
-               end
        end
 end
 
@@ -445,16 +554,16 @@ redef class FlatString
 
        redef fun +(o) do
                var s = o.to_s
-               var slen = s.length
-               var mlen = length
+               var slen = s.bytelen
+               var mlen = bytelen
                if slen == 0 then return self
                if mlen == 0 then return s
                var nlen = slen + mlen
                if s isa FlatString then
                        if nlen > maxlen then return new Concat(self, s)
                        var mits = items
-                       var sifrom = s.index_from
-                       var mifrom = index_from
+                       var sifrom = s.first_byte
+                       var mifrom = first_byte
                        var sits = s.items
                        var ns = new NativeString(nlen + 1)
                        mits.copy_to(ns, mlen, mifrom, 0)
@@ -462,7 +571,7 @@ redef class FlatString
                        return ns.to_s_with_length(nlen)
                else if s isa Concat then
                        var sl = s.left
-                       var sllen = sl.length
+                       var sllen = sl.bytelen
                        if sllen + mlen > maxlen then return new Concat(self, s)
                        return new Concat(self + sl, s.right)
                else
@@ -472,7 +581,7 @@ redef class FlatString
 end
 
 # A simple linked list for use with iterators
-private class RopeIterPiece
+private class RopeCharIteratorPiece
        # The encapsulated node of the `Rope`
        var node: String
        # Was its left child (if any) visited ?
@@ -480,11 +589,110 @@ private class RopeIterPiece
        # Was its right child (if any) visited ?
        var rdone: Bool
        # The previous node in the list.
-       var prev: nullable RopeIterPiece
+       var prev: nullable RopeCharIteratorPiece
+end
+
+# A reverse iterator capable of working with `Rope` objects
+private class RopeByteReverseIterator
+       super IndexedIterator[Byte]
+
+       # Current NativeString
+       var ns: NativeString
+       # Current position in NativeString
+       var pns: Int
+       # Position in the Rope (0-indexed)
+       var pos: Int
+       # Iterator on the substrings, does the Postfix part of
+       # the Rope traversal.
+       var subs: IndexedIterator[FlatString]
+
+       init(root: Concat) is old_style_init do
+               pos = root.bytelen - 1
+               subs = new ReverseRopeSubstrings(root)
+               var s = subs.item
+               ns = s.items
+               pns = s.last_byte
+       end
+
+       init from(root: Concat, pos: Int) do
+               self.pos = pos
+               subs = new ReverseRopeSubstrings.from(root, pos)
+               var s = subs.item
+               ns = s.items
+               pns = pos - subs.index
+       end
+
+       redef fun index do return pos
+
+       redef fun is_ok do return pos >= 0
+
+       redef fun item do return ns[pns]
+
+       redef fun next do
+               pns -= 1
+               pos -= 1
+               if pns >= 0 then return
+               if not subs.is_ok then return
+               subs.next
+               if not subs.is_ok then return
+               var s = subs.item
+               ns = s.items
+               pns = s.last_byte
+       end
+end
+
+# Forward iterator on the bytes of a `Rope`
+private class RopeByteIterator
+       super IndexedIterator[Byte]
+
+       # Position in current `String`
+       var pns: Int
+       # Current `String` being iterated on
+       var ns: NativeString
+       # Substrings of the Rope
+       var subs: IndexedIterator[FlatString]
+       # Maximum position to iterate on (e.g. Rope.length)
+       var max: Int
+       # Position (char) in the Rope (0-indexed)
+       var pos: Int
+
+       init(root: Concat) is old_style_init do
+               subs = new RopeSubstrings(root)
+               pns = 0
+               ns = subs.item.items
+               max = root.length - 1
+               pos = 0
+       end
+
+       init from(root: Concat, pos: Int) do
+               subs = new RopeSubstrings.from(root, pos)
+               pns = pos - subs.index
+               self.pos = pos
+               ns = subs.item.items
+               max = root.length - 1
+       end
+
+       redef fun item do return ns[pns]
+
+       redef fun is_ok do return pos <= max
+
+       redef fun index do return pos
+
+       redef fun next do
+               pns += 1
+               pos += 1
+               if pns < subs.item.bytelen then return
+               if not subs.is_ok then return
+               subs.next
+               if not subs.is_ok then return
+               ns = subs.item.items
+               pns = 0
+       end
 end
 
+
 # A reverse iterator capable of working with `Rope` objects
-private class RopeReviter
+private class RopeCharReverseIterator
        super IndexedIterator[Char]
 
        # Current NativeString
@@ -530,7 +738,7 @@ private class RopeReviter
 end
 
 # Forward iterator on the chars of a `Rope`
-private class RopeIter
+private class RopeCharIterator
        super IndexedIterator[Char]
 
        # Position in current `String`
@@ -580,26 +788,26 @@ end
 
 # Substrings of a Rope (i.e. Reverse postfix iterator on leaves)
 private class ReverseRopeSubstrings
-       super IndexedIterator[String]
+       super IndexedIterator[FlatString]
 
        # Visit Stack
-       var iter: RopeIterPiece is noinit
+       var iter: RopeCharIteratorPiece is noinit
        # Position in `Rope`
        var pos: Int is noinit
 
        # Current leaf
-       var str: String is noinit
+       var str: FlatString is noinit
 
        init(root: Concat) is old_style_init do
-               var r = new RopeIterPiece(root, false, true, null)
+               var r = new RopeCharIteratorPiece(root, false, true, null)
                pos = root.length - 1
                var lnod: String = root
                loop
                        if lnod isa Concat then
                                lnod = lnod.right
-                               r = new RopeIterPiece(lnod, false, true, r)
+                               r = new RopeCharIteratorPiece(lnod, false, true, r)
                        else
-                               str = lnod
+                               str = lnod.as(FlatString)
                                iter = r
                                break
                        end
@@ -607,7 +815,7 @@ private class ReverseRopeSubstrings
        end
 
        init from(root: Concat, pos: Int) do
-               var r = new RopeIterPiece(root, false, true, null)
+               var r = new RopeCharIteratorPiece(root, false, true, null)
                var rnod: String = root
                var off = pos
                loop
@@ -615,14 +823,14 @@ private class ReverseRopeSubstrings
                                if off >= rnod.left.length then
                                        off -= rnod.left.length
                                        rnod = rnod.right
-                                       r = new RopeIterPiece(rnod, false, true, r)
+                                       r = new RopeCharIteratorPiece(rnod, false, true, r)
                                else
                                        r.ldone = true
                                        rnod = rnod.left
-                                       r = new RopeIterPiece(rnod, false, true, r)
+                                       r = new RopeCharIteratorPiece(rnod, false, true, r)
                                end
                        else
-                               str = rnod
+                               str = rnod.as(FlatString)
                                r.ldone = true
                                iter = r
                                self.pos = pos - off
@@ -644,19 +852,19 @@ private class ReverseRopeSubstrings
                while curr != null do
                        currit = curr.node
                        if not currit isa Concat then
-                               str = currit
+                               str = currit.as(FlatString)
                                pos -= str.length
                                iter = curr
                                return
                        end
                        if not curr.rdone then
                                curr.rdone = true
-                               curr = new RopeIterPiece(currit.right, false, false, curr)
+                               curr = new RopeCharIteratorPiece(currit.right, false, false, curr)
                                continue
                        end
                        if not curr.ldone then
                                curr.ldone = true
-                               curr = new RopeIterPiece(currit.left, false, false, curr)
+                               curr = new RopeCharIteratorPiece(currit.left, false, false, curr)
                                continue
                        end
                        curr = curr.prev
@@ -703,7 +911,7 @@ private class RopeSubstrings
        super IndexedIterator[FlatString]
 
        # Visit Stack
-       var iter: RopeIterPiece is noinit
+       var iter: RopeCharIteratorPiece is noinit
        # Position in `Rope`
        var pos: Int is noinit
        # Maximum position in `Rope` (i.e. length - 1)
@@ -713,14 +921,14 @@ private class RopeSubstrings
        var str: FlatString is noinit
 
        init(root: Concat) is old_style_init do
-               var r = new RopeIterPiece(root, true, false, null)
+               var r = new RopeCharIteratorPiece(root, true, false, null)
                pos = 0
                max = root.length - 1
                var rnod: String = root
                loop
                        if rnod isa Concat then
                                rnod = rnod.left
-                               r = new RopeIterPiece(rnod, true, false, r)
+                               r = new RopeCharIteratorPiece(rnod, true, false, r)
                        else
                                str = rnod.as(FlatString)
                                r.rdone = true
@@ -731,7 +939,7 @@ private class RopeSubstrings
        end
 
        init from(root: Concat, pos: Int) do
-               var r = new RopeIterPiece(root, true, false, null)
+               var r = new RopeCharIteratorPiece(root, true, false, null)
                max = root.length - 1
                var rnod: String = root
                var off = pos
@@ -741,10 +949,10 @@ private class RopeSubstrings
                                        r.rdone = true
                                        off -= rnod.left.length
                                        rnod = rnod.right
-                                       r = new RopeIterPiece(rnod, true, false, r)
+                                       r = new RopeCharIteratorPiece(rnod, true, false, r)
                                else
                                        rnod = rnod.left
-                                       r = new RopeIterPiece(rnod, true, false, r)
+                                       r = new RopeCharIteratorPiece(rnod, true, false, r)
                                end
                        else
                                str = rnod.as(FlatString)
@@ -778,11 +986,11 @@ private class RopeSubstrings
                        if not it.ldone then
                                rnod = rnod.left
                                it.ldone = true
-                               it = new RopeIterPiece(rnod, false, false, it)
+                               it = new RopeCharIteratorPiece(rnod, false, false, it)
                        else if not it.rdone then
                                it.rdone = true
                                rnod = rnod.right
-                               it = new RopeIterPiece(rnod, false, false, it)
+                               it = new RopeCharIteratorPiece(rnod, false, false, it)
                        else
                                it = it.prev
                                rnod = it.node
@@ -802,19 +1010,125 @@ private class RopeChars
                return target[i]
        end
 
-       redef fun iterator_from(i) do return new RopeIter.from(target, i)
+       redef fun iterator_from(i) do return new RopeCharIterator.from(target, i)
+
+       redef fun reverse_iterator_from(i) do return new RopeCharReverseIterator.from(target, i)
+
+end
+
+# Implementation of a `StringCharView` for `Concat` objects
+private class RopeBytes
+       super StringByteView
+
+       redef type SELFTYPE: Concat
+
+       redef fun [](i) do
+               var nod: String = target
+               loop
+                       if nod isa FlatString then return nod.items[i]
+                       if not nod isa Concat then abort
+                       if nod.left.bytelen >= i then
+                               nod = nod.right
+                       else
+                               nod = nod.left
+                       end
+               end
+       end
+
+       redef fun iterator_from(i) do return new RopeByteIterator.from(target, i)
 
-       redef fun reverse_iterator_from(i) do return new RopeReviter.from(target, i)
+       redef fun reverse_iterator_from(i) do return new RopeByteReverseIterator.from(target, i)
 
 end
 
 # An Iterator over a RopeBuffer.
-class RopeBufferIter
+class RopeBufferCharIterator
+       super IndexedIterator[Char]
+
+       # Subiterator.
+       var sit: IndexedIterator[Char]
+
+       redef fun index do return sit.index
+
+       # Init the iterator from a RopeBuffer.
+       init(t: RopeBuffer) is old_style_init do
+               t.persist_buffer
+               sit = t.str.chars.iterator
+       end
+
+       # Init the iterator from a RopeBuffer starting from `pos`.
+       init from(t: RopeBuffer, pos: Int) do
+               t.persist_buffer
+               sit = t.str.chars.iterator_from(pos)
+       end
+
+       redef fun is_ok do return sit.is_ok
+
+       redef fun item do
+               assert is_ok
+               return sit.item
+       end
+
+       redef fun next do sit.next
+end
+
+# Reverse iterator over a RopeBuffer.
+class RopeBufferCharReverseIterator
        super IndexedIterator[Char]
 
        # Subiterator.
        var sit: IndexedIterator[Char]
 
+       redef fun index do return sit.index
+
+       # Init the iterator from a RopeBuffer.
+       init(tgt: RopeBuffer) is old_style_init do
+               tgt.persist_buffer
+               sit = tgt.str.chars.reverse_iterator
+       end
+
+       # Init the iterator from a RopeBuffer starting from `pos`.
+       init from(tgt: RopeBuffer, pos: Int) do
+               tgt.persist_buffer
+               sit = tgt.str.chars.reverse_iterator_from(pos)
+       end
+
+       redef fun is_ok do return sit.is_ok
+
+       redef fun item do
+               assert is_ok
+               return sit.item
+       end
+
+       redef fun next do sit.next
+end
+
+# View on the chars of a `RopeBuffer`
+class RopeBufferChars
+       super BufferCharView
+
+       redef type SELFTYPE: RopeBuffer
+
+       redef fun [](i) do return target[i]
+
+       redef fun []=(i,c) do target[i] = c
+
+       redef fun add(c) do target.add c
+
+       redef fun push(c) do target.add c
+
+       redef fun iterator_from(i) do return new RopeBufferCharIterator.from(target, i)
+
+       redef fun reverse_iterator_from(i) do return new RopeBufferCharReverseIterator.from(target, i)
+end
+
+# An Iterator over a RopeBuffer.
+class RopeBufferByteIterator
+       super IndexedIterator[Byte]
+
+       # Subiterator.
+       var sit: IndexedIterator[Byte]
+
        # Native string iterated over.
        var ns: NativeString
 
@@ -829,8 +1143,8 @@ class RopeBufferIter
        # Init the iterator from a RopeBuffer.
        init(t: RopeBuffer) is old_style_init do
                ns = t.ns
-               maxpos = t.rpos
-               sit = t.str.chars.iterator
+               maxpos = t.bytelen
+               sit = t.str.bytes.iterator
                pns = t.dumped
                index = 0
        end
@@ -838,8 +1152,8 @@ class RopeBufferIter
        # Init the iterator from a RopeBuffer starting from `pos`.
        init from(t: RopeBuffer, pos: Int) do
                ns = t.ns
-               maxpos = t.length
-               sit = t.str.chars.iterator_from(pos)
+               maxpos = t.bytelen
+               sit = t.str.bytes.iterator_from(pos)
                pns = pos - t.str.length
                index = pos
        end
@@ -862,11 +1176,11 @@ class RopeBufferIter
 end
 
 # Reverse iterator over a RopeBuffer.
-class RopeBufferReviter
-       super IndexedIterator[Char]
+class RopeBufferByteReverseIterator
+       super IndexedIterator[Byte]
 
        # Subiterator.
-       var sit: IndexedIterator[Char]
+       var sit: IndexedIterator[Byte]
 
        # Native string iterated over.
        var ns: NativeString
@@ -878,21 +1192,21 @@ class RopeBufferReviter
 
        # Init the iterator from a RopeBuffer.
        init(tgt: RopeBuffer) is old_style_init do
-               sit = tgt.str.chars.reverse_iterator
+               sit = tgt.str.bytes.reverse_iterator
                pns = tgt.rpos - 1
-               index = tgt.length - 1
+               index = tgt.bytelen - 1
                ns = tgt.ns
        end
 
        # Init the iterator from a RopeBuffer starting from `pos`.
        init from(tgt: RopeBuffer, pos: Int) do
-               sit = tgt.str.chars.reverse_iterator_from(pos - tgt.rpos - tgt.dumped)
-               pns = pos - tgt.str.length
+               sit = tgt.str.bytes.reverse_iterator_from(pos - (tgt.rpos - tgt.dumped))
+               pns = pos - tgt.str.bytelen + tgt.rpos
                index = pos
                ns = tgt.ns
        end
 
-       redef fun is_ok do return index > 0
+       redef fun is_ok do return index >= 0
 
        redef fun item do
                if pns >= 0 then return ns[pns]
@@ -901,7 +1215,7 @@ class RopeBufferReviter
 
        redef fun next do
                index -= 1
-               if pns >= 0 then
+               if pns > 0 then
                        pns -= 1
                else
                        sit.next
@@ -910,36 +1224,37 @@ class RopeBufferReviter
 end
 
 # View on the chars of a `RopeBuffer`
-class RopeBufferChars
-       super BufferCharView
+class RopeBufferBytes
+       super BufferByteView
 
        redef type SELFTYPE: RopeBuffer
 
        redef fun [](i) do
-               if i < target.str.length then
-                       return target.str[i]
+               if i < target.str.bytelen then
+                       return target.str.bytes[i]
                else
-                       return target.ns[i - target.str.length]
+                       return target.ns[i - target.str.bytelen]
                end
        end
 
        redef fun []=(i,c) do
-               if i == target.length then target.add c
+               if i == target.length then target.add_byte c
                if i < target.str.length then
+                       # FIXME: Will need to be optimized and rewritten with Unicode
                        var s = target.str
                        var l = s.substring(0, i)
                        var r = s.substring_from(i + 1)
-                       target.str = l + c.to_s + r
+                       target.str = l + c.to_i.ascii.to_s + r
                else
                        target.ns[i - target.str.length] = c
                end
        end
 
-       redef fun add(c) do target.add c
+       redef fun add(c) do target.add_byte c
 
-       redef fun push(c) do target.add c
+       redef fun push(c) do target.add_byte c
 
-       redef fun iterator_from(i) do return new RopeBufferIter.from(target, i)
+       redef fun iterator_from(i) do return new RopeBufferByteIterator.from(target, i)
 
-       redef fun reverse_iterator_from(i) do return new RopeBufferReviter.from(target, i)
+       redef fun reverse_iterator_from(i) do return new RopeBufferByteReverseIterator.from(target, i)
 end
index 6eac618..441df14 100644 (file)
@@ -127,20 +127,20 @@ class WebsocketConnection
                var ans_buffer = new Bytes.with_capacity(msg.length)
                # Flag for final frame set to 1
                # opcode set to 1 (for text)
-               ans_buffer.add(129)
+               ans_buffer.add(129u8)
                if msg.length < 126 then
-                       ans_buffer.add(msg.length)
+                       ans_buffer.add(msg.length.to_b)
                end
                if msg.length >= 126 and msg.length <= 65535 then
-                       ans_buffer.add(126)
-                       ans_buffer.add(msg.length.rshift(8))
-                       ans_buffer.add(msg.length)
+                       ans_buffer.add(126u8)
+                       ans_buffer.add((msg.length >> 8).to_b)
+                       ans_buffer.add(msg.length.to_b)
                end
                if msg isa FlatString then
-                       ans_buffer.append_ns_from(msg.items, msg.length, msg.index_from)
+                       ans_buffer.append_ns_from(msg.items, msg.length, msg.first_byte)
                else
                        for i in msg.substrings do
-                               ans_buffer.append_ns_from(i.as(FlatString).items, i.length, i.as(FlatString).index_from)
+                               ans_buffer.append_ns_from(i.as(FlatString).items, i.length, i.as(FlatString).first_byte)
                        end
                end
                return ans_buffer
@@ -149,8 +149,9 @@ class WebsocketConnection
        # Reads an HTTP frame
        protected fun read_http_frame(buf: Buffer): String
        do
-               buf.append client.read_line
-               buf.append("\r\n")
+               var ln = client.read_line
+               buf.append ln
+               buf.append "\r\n"
                if buf.has_suffix("\r\n\r\n") then return buf.to_s
                return read_http_frame(buf)
        end
@@ -180,12 +181,12 @@ class WebsocketConnection
                        #       %x9 denotes a ping
                        #       %xA denotes a pong
                        #       %xB-F are reserved for further control frames
-                       var fin_flag = fst_byte.bin_and(128)
+                       var fin_flag = fst_byte & 0b1000_0000u8
                        if fin_flag != 0 then fin = true
-                       var opcode = fst_byte.bin_and(15)
+                       var opcode = fst_byte & 0b0000_1111u8
                        if opcode == 9 then
-                               bf.add(138)
-                               bf.add(0)
+                               bf.add(138u8)
+                               bf.add(0u8)
                                client.write(bf.to_s)
                                _buffer_pos = _buffer_length
                                return
@@ -198,8 +199,8 @@ class WebsocketConnection
                        # |(mask - 1bit)|(payload length - 7 bits)
                        # As specified, if the payload length is 126 or 127
                        # The next 16 or 64 bits contain an extended payload length
-                       var mask_flag = snd_byte.bin_and(128)
-                       var len = snd_byte.bin_and(127)
+                       var mask_flag = snd_byte & 0b1000_0000u8
+                       var len = (snd_byte & 0b0111_1111u8).to_i
                        var payload_ext_len = 0
                        if len == 126 then
                                var tmp = client.read_bytes(2)
@@ -208,19 +209,17 @@ class WebsocketConnection
                                        client.close
                                        return
                                end
-                               payload_ext_len = tmp[1] + tmp[0].lshift(8)
+                               payload_ext_len += tmp[0].to_i << 8
+                               payload_ext_len += tmp[1].to_i
                        else if len == 127 then
-                               # 64 bits for length are not supported,
-                               # only the last 32 will be interpreted as a Nit Integer
                                var tmp = client.read_bytes(8)
                                if tmp.length != 8 then
                                        last_error = new IOError("Error: received interrupted frame")
                                        client.close
                                        return
                                end
-                               for pos in [0 .. tmp.length[ do
-                                       var i = tmp[pos]
-                                       payload_ext_len += i.lshift(8 * (7 - pos))
+                               for i in [0 .. 8[ do
+                                       payload_ext_len += tmp[i].to_i << (8 * (7 - i))
                                end
                        end
                        if mask_flag != 0 then
@@ -242,7 +241,7 @@ class WebsocketConnection
                var return_message = new NativeString(len)
 
                for i in [0 .. len[ do
-                       return_message[i] = message[i].ascii.bin_xor(key[i%4].ascii).ascii
+                       return_message[i] = message[i] ^ key[i % 4]
                end
 
                return return_message
index 9c3ede7..2930d81 100644 (file)
@@ -36,8 +36,9 @@ syn match NITExprSubst "{\([^}]\|\n\)*}" contained
 syn match NITExprSubstLong "\\." contained
 syn match NITExprSubstLong "{*\zs{{{\([^}]\|\n\)*}}}\ze}*" contained
 
-" Numbers and ASCII Codes
-syn match NITNumber "\<\(\d\+\.\d\+\|\d\+\)\>"
+" Numbers
+syn match NITNumber "\<\([0-9_]\+\|0[bB][01_]\+\|0[oO][0-7_]\+\|0[xX][0-9a-fA-F_]\+\)\([iu]\(8\|16\|32\)\)\?\>"
+syn match NITNumber "\<[0-9_]\+\.[0-9_]\+\>"
 
 " Identifiers
 syn match NITClass             "\<\u\w*"
index 3aa7950..21fb966 100644 (file)
@@ -223,6 +223,14 @@ See the documentation of these specific modules for details.
 
     Currently, this only affect the android platform.
 
+`-g`, `--debug`
+:   Compile in debug mode.
+
+    Currently removes gcc optimizations.
+    Also preserves the source-files directory for C-debuggers.
+
+    For more debugging-related options, see also `--hardening` and `NIT_GC_OPTION`
+
 ## COMPILATION MODES
 
 `nitc` includes distinct compilation modes.
index eec154e..b46e488 100644 (file)
 # limitations under the License.
 
 NITCOPT=--semi-global
-OLDNITCOPT=
+OLDNITCOPT=--semi-global
 OBJS=nitc nitpick nit nitdoc nitls nitunit nitpretty nitmetrics nitx nitlight nitdbg_client nitserial
 SRCS=$(patsubst %,%.nit,$(OBJS))
 BINS=$(patsubst %,../bin/%,$(OBJS))
 
-all: $(BINS)
+all: bin/nitc
 
 nitc_0: ../c_src/nitc parser/parser.nit
        @echo '***************************************************************'
@@ -29,14 +29,13 @@ nitc_0: ../c_src/nitc parser/parser.nit
        ./git-gen-version.sh
        ../c_src/nitc ${OLDNITCOPT} -o nitc_0 -v nitc.nit
 
-$(BINS): nitc_0 parser/parser.nit
+bin/nitc: nitc_0 parser/parser.nit
        @echo '***************************************************************'
        @echo '* Compile binaries from NIT source files                      *'
        @echo '***************************************************************'
        ./git-gen-version.sh
        test -d ../bin || mkdir ../bin
        ./nitc_0 ${NITCOPT} -v --dir ../bin $(SRCS)
-       rm -r .nit_compile || true # to clean old .nit_compile generated file
 
 $(OBJS): nitc_0 parser/parser.nit
        ./git-gen-version.sh
index 7dafd2f..ef969d7 100644 (file)
@@ -30,9 +30,9 @@ class ASTBuilder
        var anchor: nullable MClassType
 
        # Make a new Int literal
-       fun make_int(value: Int): AIntExpr
+       fun make_int(value: Int): AIntegerExpr
        do
-               return new ADecIntExpr.make(value, mmodule.int_type)
+               return new AIntegerExpr.make(value, mmodule.int_type)
        end
 
        # Make a new instatiation
@@ -260,11 +260,11 @@ redef class AType
        end
 end
 
-redef class ADecIntExpr
+redef class AIntegerExpr
        private init make(value: Int, t: MType)
        do
                self.value = value
-               self._n_number = new TNumber # dummy
+               self._n_integer = new TInteger # dummy
                self.mtype = t
        end
 end
index 61a1083..91aee2f 100644 (file)
@@ -90,14 +90,7 @@ redef class ABlockExpr
        end
 end
 
-redef class AIntExpr
-       redef fun accept_printer(v)
-       do
-               v.write(value.to_s)
-       end
-end
-
-redef class AByteExpr
+redef class AIntegerExpr
        redef fun accept_printer(v)
        do
                v.write(value.to_s)
index 3b63675..5df891e 100644 (file)
@@ -142,7 +142,7 @@ class ExternCFile
        end
 
        redef fun makefile_rule_content do
-               var ff = filename.basename("")
+               var ff = filename.basename
                var o = makefile_rule_name
                var pkg = ""
                if not pkgconfigs.is_empty then
index 8fae169..b1245d2 100644 (file)
@@ -69,6 +69,8 @@ redef class ToolContext
        var opt_no_gcc_directive = new OptionArray("Disable a advanced gcc directives for optimization", "--no-gcc-directive")
        # --release
        var opt_release = new OptionBool("Compile in release mode and finalize application", "--release")
+       # -g
+       var opt_debug = new OptionBool("Compile in debug mode (no C-side optimization)", "--debug", "-g")
 
        redef init
        do
@@ -80,6 +82,7 @@ redef class ToolContext
                self.option_context.add_option(self.opt_no_gcc_directive)
                self.option_context.add_option(self.opt_release)
                self.option_context.add_option(self.opt_max_c_lines, self.opt_group_c_files)
+               self.option_context.add_option(self.opt_debug)
 
                opt_no_main.hidden = true
        end
@@ -156,10 +159,13 @@ class MakefileToolchain
 
        redef fun write_and_make
        do
+               var debug = toolcontext.opt_debug.value
                var compile_dir = compile_dir
 
                # Remove the compilation directory unless explicitly set
                var auto_remove = toolcontext.opt_compile_dir.value == null
+               # If debug flag is set, do not remove sources
+               if debug then auto_remove = false
 
                # Generate the .h and .c files
                # A single C file regroups many compiled rumtime functions
@@ -220,7 +226,7 @@ class MakefileToolchain
 
                # Copy original .[ch] files to compile_dir
                for src in compiler.files_to_copy do
-                       var basename = src.basename("")
+                       var basename = src.basename
                        var dst = "{compile_dir}/{basename}"
                        src.file_copy_to dst
                end
@@ -341,8 +347,9 @@ class MakefileToolchain
                        var libs = m.collect_linker_libs
                        if libs != null then linker_options.add_all(libs)
                end
+               var debug = toolcontext.opt_debug.value
 
-               makefile.write("CC = ccache cc\nCXX = ccache c++\nCFLAGS = -g -O2 -Wno-unused-value -Wno-switch -Wno-attributes\nCINCL =\nLDFLAGS ?= \nLDLIBS  ?= -lm {linker_options.join(" ")}\n\n")
+               makefile.write("CC = ccache cc\nCXX = ccache c++\nCFLAGS = -g{ if not debug then " -O2 " else " "}-Wno-unused-value -Wno-switch -Wno-attributes\nCINCL =\nLDFLAGS ?= \nLDLIBS  ?= -lm {linker_options.join(" ")}\n\n")
 
                makefile.write "\n# SPECIAL CONFIGURATION FLAGS\n"
                if platform.supports_libunwind then
@@ -389,6 +396,15 @@ endif
                        makefile.write("CFLAGS += -D NO_STACKTRACE\n\n")
                end
 
+               makefile.write """
+# Special configuration for Darwin
+ifeq ($(uname_S),Darwin)
+       # Remove POSIX flag -lrt
+       LDLIBS := $(filter-out -lrt,$(LDLIBS))
+endif
+
+"""
+
                makefile.write("all: {outpath}\n")
                if outpath != real_outpath then
                        makefile.write("\tcp -- {outpath.escape_to_sh} {real_outpath.escape_to_sh.replace("$","$$")}")
@@ -444,7 +460,7 @@ endif
                # Compile each required extern body into a specific .o
                for f in compiler.extern_bodies do
                        var o = f.makefile_rule_name
-                       var ff = f.filename.basename("")
+                       var ff = f.filename.basename
                        makefile.write("{o}: {ff}\n")
                        makefile.write("\t{f.makefile_rule_content}\n\n")
                        dep_rules.add(f.makefile_rule_name)
@@ -842,7 +858,7 @@ extern void nitni_global_ref_decr( struct nitni_ref *ref );
                v.add("signal(SIGINT, sig_handler);")
                v.add("signal(SIGTERM, sig_handler);")
                v.add("signal(SIGSEGV, sig_handler);")
-               v.add("signal(SIGPIPE, sig_handler);")
+               v.add("signal(SIGPIPE, SIG_IGN);")
 
                v.add("glob_argc = argc; glob_argv = argv;")
                v.add("initialize_gc_option();")
@@ -1494,8 +1510,12 @@ abstract class AbstractCompilerVisitor
        fun char_instance(value: Char): RuntimeVariable
        do
                var t = mmodule.char_type
-               var res = new RuntimeVariable("'{value.to_s.escape_to_c}'", t, t)
-               return res
+
+               if value.ascii < 128 then
+                       return new RuntimeVariable("'{value.to_s.escape_to_c}'", t, t)
+               else
+                       return new RuntimeVariable("{value.ascii}", t, t)
+               end
        end
 
        # Generate a float value
@@ -1537,7 +1557,7 @@ abstract class AbstractCompilerVisitor
                var native_mtype = mmodule.native_string_type
                var nat = self.new_var(native_mtype)
                self.add("{nat} = \"{string.escape_to_c}\";")
-               var length = self.int_instance(string.length)
+               var length = self.int_instance(string.bytelen)
                self.add("{res} = {self.send(self.get_property("to_s_with_length", native_mtype), [nat, length]).as(not null)};")
                self.add("{name} = {res};")
                self.add("\}")
@@ -1598,12 +1618,12 @@ abstract class AbstractCompilerVisitor
                file = file.strip_extension(".nit")
                var tryfile = file + ".nit.h"
                if tryfile.file_exists then
-                       self.declare_once("#include \"{tryfile.basename("")}\"")
+                       self.declare_once("#include \"{tryfile.basename}\"")
                        self.compiler.files_to_copy.add(tryfile)
                end
                tryfile = file + "_nit.h"
                if tryfile.file_exists then
-                       self.declare_once("#include \"{tryfile.basename("")}\"")
+                       self.declare_once("#include \"{tryfile.basename}\"")
                        self.compiler.files_to_copy.add(tryfile)
                end
 
@@ -1614,7 +1634,7 @@ abstract class AbstractCompilerVisitor
                        tryfile = file + "_nit.c"
                        if not tryfile.file_exists then return
                end
-               var f = new ExternCFile(tryfile.basename(""), "")
+               var f = new ExternCFile(tryfile.basename, "")
                self.compiler.extern_bodies.add(f)
                self.compiler.files_to_copy.add(tryfile)
        end
@@ -2157,10 +2177,7 @@ redef class AMethPropdef
                                return true
                        end
                else if cname == "Char" then
-                       if pname == "output" then
-                               v.add("printf(\"%c\", ((unsigned char){arguments.first}));")
-                               return true
-                       else if pname == "object_id" then
+                       if pname == "object_id" then
                                v.ret(v.new_expr("(long){arguments.first}", ret.as(not null)))
                                return true
                        else if pname == "successor" then
@@ -2332,7 +2349,7 @@ redef class AMethPropdef
                        end
                else if cname == "NativeString" then
                        if pname == "[]" then
-                               v.ret(v.new_expr("(uint32_t)(unsigned char){arguments[0]}[{arguments[1]}]", ret.as(not null)))
+                               v.ret(v.new_expr("(unsigned char)((int){arguments[0]}[{arguments[1]}])", ret.as(not null)))
                                return true
                        else if pname == "[]=" then
                                v.add("{arguments[0]}[{arguments[1]}]=(unsigned char){arguments[2]};")
@@ -2901,12 +2918,13 @@ redef class AOrElseExpr
        end
 end
 
-redef class AIntExpr
-       redef fun expr(v) do return v.int_instance(self.value.as(not null))
-end
-
-redef class AByteExpr
-       redef fun expr(v) do return v.byte_instance(self.value.as(not null))
+redef class AIntegerExpr
+       redef fun expr(v) do
+               if value isa Int then return v.int_instance(value.as(Int))
+               if value isa Byte then return v.byte_instance(value.as(Byte))
+               # Should never happen
+               abort
+       end
 end
 
 redef class AFloatExpr
diff --git a/src/compiler/java_compiler.nit b/src/compiler/java_compiler.nit
new file mode 100644 (file)
index 0000000..f1e3437
--- /dev/null
@@ -0,0 +1,2307 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Compile Nit code to Java code
+#
+# 3 runtime structures are used to represent Nit instance in Java generated code:
+# * `RTClass` to represent a class, it's super-type table and its VFT
+# * `RTMethod` to reprensent a compiled method definition
+# * `RTVal` to reprensent a Nit instance, the null value or a native value
+#
+# More details are given in the documentation of these 3 classes.
+#
+# TODO Factorize with `abstract_compiler`
+module java_compiler
+
+import rapid_type_analysis
+import transform
+import frontend
+
+redef class ToolContext
+
+       # Where to output the generated binary
+       var opt_output = new OptionString("Output file", "-o", "--output")
+
+       # Where to output tmp files
+       var opt_compile_dir = new OptionString("Directory used to generate temporary files", "--compile-dir")
+
+       # Compile using ant instead of make (faster, but no error display)
+       var opt_ant = new OptionBool("Batch with ant (faster, but no error display)", "--ant")
+
+       redef init do
+               super
+               option_context.add_option(opt_output, opt_compile_dir, opt_ant)
+       end
+end
+
+redef class ModelBuilder
+
+       # Start the Java compiler
+       fun run_java_compiler(mainmodule: MModule, runtime_type_analysis: RapidTypeAnalysis) do
+               var time0 = get_time
+               toolcontext.info("*** GENERATING JAVA ***", 1)
+
+               var compiler = new JavaCompiler(mainmodule, self, runtime_type_analysis)
+               compiler.do_compilation
+
+               var time1 = get_time
+               toolcontext.info("*** END GENERATING JAVA: {time1-time0} ***", 2)
+               write_and_make(compiler)
+       end
+
+       # Write Java code and compile it into an executable jar
+       fun write_and_make(compiler: JavaCompiler) do
+               var time0 = get_time
+               toolcontext.info("*** WRITING JAVA ***", 1)
+
+               compiler.compile_dir.mkdir
+
+               var jfiles = write_java_files(compiler)
+
+               var time1 = get_time
+               toolcontext.info("*** END WRITING JAVA: {time1-time0} ***", 2)
+
+               time0 = time1
+               toolcontext.info("*** COMPILING JAVA ***", 1)
+
+               if toolcontext.opt_ant.value then
+                       build_with_ant(compiler, jfiles)
+               else
+                       build_with_make(compiler, jfiles)
+               end
+               write_shell_script(compiler)
+
+               time1 = get_time
+               toolcontext.info("*** END COMPILING JAVA: {time1-time0} ***", 2)
+       end
+
+       # Write files managed by `compiler` into concrete files
+       fun write_java_files(compiler: JavaCompiler): Array[String] do
+               var jfiles = new Array[String]
+               for f in compiler.files do
+                       var filepath = "{compiler.compile_dir}/{f.filename}"
+                       var file = cache_file(filepath)
+                       for line in f.lines do file.write(line)
+                       close_cache(filepath, file)
+                       jfiles.add(f.filename)
+               end
+               return jfiles
+       end
+
+       # Cache a file as `{filepath}.tmp` and replace the original if different
+       private fun cache_file(filepath: String): FileWriter do
+               if toolcontext.opt_ant.value and filepath.file_exists then
+                       return new FileWriter.open("{filepath}.tmp")
+               else
+                       return new FileWriter.open(filepath)
+               end
+       end
+
+       # Close the writer and move tmp file to original if modified
+       private fun close_cache(filepath: String, file: FileWriter) do
+               file.close
+               if "{filepath}.tmp".file_exists then
+                       sys.system("if ! diff {filepath}.tmp {filepath} > /dev/null; then mv {filepath}.tmp {filepath}; else rm {filepath}.tmp; fi")
+               end
+       end
+
+       # Compile Java generated files using `make`
+       fun build_with_make(compiler: JavaCompiler, jfiles: Array[String]) do
+               write_manifest(compiler)
+               write_makefile(compiler, jfiles)
+               var compile_dir = compiler.compile_dir
+               var outname = compiler.outname.to_path.filename
+               toolcontext.info("make -N -C {compile_dir} -f {outname}.mk", 2)
+               var res
+               if toolcontext.verbose_level >= 3 then
+                       res = sys.system("make -B -C {compile_dir} -f {outname}.mk 2>&1")
+               else
+                       res = sys.system("make -B -C {compile_dir} -f {outname}.mk 2>&1 > /dev/null")
+               end
+               if res != 0 then toolcontext.error(null, "make failed! Error code: {res}.")
+       end
+
+       # Compile Java sources using `ant`
+       fun build_with_ant(compiler: JavaCompiler, jfiles: Array[String]) do
+               compile_antfile(compiler, jfiles)
+               var outname = compiler.outname.to_path.filename
+               var antpath = "{compiler.compile_dir}/{outname}.xml"
+               self.toolcontext.info("ant jar -f {antpath}", 2)
+               var res
+               if self.toolcontext.verbose_level >= 3 then
+                       res = sys.system("ant jar -f {antpath} 2>&1")
+               else
+                       res = sys.system("ant jar -f {antpath} 2>&1 > /dev/null")
+               end
+               if res != 0 then
+                       toolcontext.error(null, "ant compile failed! Error code: {res}.")
+               end
+       end
+
+       # Write the Makefile used to compile Java generated files into an executable jar
+       fun write_makefile(compiler: JavaCompiler, jfiles: Array[String]) do
+               # list class files from jfiles
+               var ofiles = new List[String]
+               for f in jfiles do ofiles.add(f.strip_extension(".java") + ".class")
+
+               var compile_dir = compiler.compile_dir
+               var outname = compiler.outname.to_path.filename
+               var outpath = (sys.getcwd / compiler.outname).simplify_path
+               var makename = "{compile_dir}/{outname}.mk"
+               var makefile = new FileWriter.open(makename)
+
+               makefile.write("JC = javac\n")
+               makefile.write("JAR = jar\n\n")
+
+               makefile.write("all: {outpath}.jar\n\n")
+
+               makefile.write("{outpath}.jar: {compiler.mainmodule.jname}_Main.class\n")
+               makefile.write("\t$(JAR) cfm {outpath}.jar {outname}.mf {ofiles.join(" ")}\n\n")
+
+               makefile.write("{compiler.mainmodule.jname}_Main.class:\n")
+               makefile.write("\t$(JC) {jfiles.join(" ")}\n\n")
+
+               makefile.write("clean:\n")
+               makefile.write("\trm {ofiles.join(" ")} 2>/dev/null\n\n")
+
+               makefile.close
+               toolcontext.info("Generated makefile: {makename}", 2)
+       end
+
+       # The Ant `build.xml` script used to compile build the final jar
+       fun compile_antfile(compiler: JavaCompiler, jfiles: Array[String]) do
+               var compile_dir = compiler.compile_dir
+               var outname = compiler.outname.to_path.filename
+               var outpath = (sys.getcwd / compiler.outname).simplify_path
+               var antname = "{compile_dir}/{outname}.xml"
+               var antfile = new FileWriter.open(antname)
+               var jname = compiler.mainmodule.jname
+               antfile.write("<project>")
+               antfile.write(" <target name=\"compile\">")
+               antfile.write("  <mkdir dir=\"classes\"/>")
+               antfile.write("  <javac includes=\"{compiler.mainmodule.jname}_Main.java {jfiles.join(" ")}\" srcdir=\".\" destdir=\"classes\"/>")
+               antfile.write(" </target>")
+               antfile.write(" <target name=\"jar\" depends=\"compile\">")
+               antfile.write("  <jar destfile=\"{outpath}.jar\" basedir=\"classes\">")
+               antfile.write("   <manifest>")
+               antfile.write("    <attribute name=\"Main-Class\" value=\"{jname}_Main\"/>")
+               antfile.write("   </manifest>")
+               antfile.write("  </jar>")
+               antfile.write(" </target>")
+               antfile.write("</project>")
+               antfile.close
+               toolcontext.info("Generated antfile: {antname}", 2)
+       end
+
+       # Write the Java manifest file
+       private fun write_manifest(compiler: JavaCompiler) do
+               var compile_dir = compiler.compile_dir
+               var outname = compiler.outname.to_path.filename
+               var maniffile = new FileWriter.open("{compile_dir}/{outname}.mf")
+               maniffile.write("Manifest-Version: 1.0\n")
+               maniffile.write("Main-Class: {compiler.mainmodule.jname}_Main\n")
+               maniffile.close
+       end
+
+       # Write a simple bash script that runs the jar like it was a binary generated by nitc
+       private fun write_shell_script(compiler: JavaCompiler) do
+               var outname = compiler.outname
+               var shfile = new FileWriter.open(outname)
+               shfile.write("#!/bin/bash\n")
+               shfile.write("java -jar {outname}.jar \"$@\"\n")
+               shfile.close
+               sys.system("chmod +x {outname}")
+       end
+end
+
+# Compiler that translates Nit code to Java code
+class JavaCompiler
+       # The main module of the program currently compiled
+       var mainmodule: MModule
+
+       # Modelbuilder used to know the model and the AST
+       var modelbuilder: ModelBuilder
+
+       # The result of the RTA (used to know live types and methods)
+       var runtime_type_analysis: RapidTypeAnalysis
+
+       # Where to generate tmp files
+       var compile_dir: String is lazy do
+               var dir = modelbuilder.toolcontext.opt_compile_dir.value
+               if dir == null then dir = "nitj_compile"
+               return dir
+       end
+
+       # Name of the generated executable
+       var outname: String is lazy do
+               var name = modelbuilder.toolcontext.opt_output.value
+               if name == null then name = mainmodule.jname
+               return name
+       end
+
+       # The list of all associated files
+       # Used to generate .java files
+       var files: Array[JavaCodeFile] = new Array[JavaCodeFile]
+
+       # Force the creation of a new file
+       # The point is to avoid contamination between must-be-compiled-separately files
+       fun new_file(name: String): JavaCodeFile do
+               var file = new JavaCodeFile(name)
+               files.add(file)
+               return file
+       end
+
+       # Kind of visitor to use
+       type VISITOR: JavaCompilerVisitor
+
+       # Initialize a visitor specific for the compiler engine
+       fun new_visitor(filename: String): VISITOR do
+               return new JavaCompilerVisitor(self, new_file(filename))
+       end
+
+       # RuntimeModel representation
+       private var rt_model: JavaRuntimeModel is lazy do return new JavaRuntimeModel
+
+       # Compile Nit code to Java
+       fun do_compilation do
+               # compile java classes used to represents the runtime model of the program
+               rt_model.compile_rtmodel(self)
+               compile_box_kinds
+
+               # compile class structures
+               compile_mclasses_to_java
+
+               # compile method structures
+               compile_mmethods_to_java
+
+               # compile main
+               compile_main_function
+       end
+
+       # Prepare the boxes used to represent Java primitive types
+       fun compile_box_kinds do
+               # Collect all bas box class
+               # FIXME: this is not completely fine with a separate compilation scheme
+               for classname in ["Int", "Bool", "Byte", "Char", "Float"] do
+                       var classes = mainmodule.model.get_mclasses_by_name(classname)
+                       if classes == null then continue
+                       assert classes.length == 1 else print classes.join(", ")
+                       box_kinds.add(classes.first.mclass_type)
+               end
+       end
+
+       # Types of boxes used to represent Java primitive types
+       var box_kinds = new Array[MClassType]
+
+       # Generate a `RTClass` for each `MClass` found in model
+       #
+       # This is a global phase because we need to know all the program to build
+       # attributes, fill vft and type table.
+       fun compile_mclasses_to_java do
+               for mclass in mainmodule.model.mclasses do
+                       mclass.compile_to_java(new_visitor("{mclass.rt_name}.java"))
+               end
+       end
+
+       # Generate a `RTMethod` for each `MMethodDef` found in model
+       #
+       # This is a separate phase.
+       fun compile_mmethods_to_java do
+               for mmodule in mainmodule.in_importation.greaters do
+                       for mclassdef in mmodule.mclassdefs do
+                               for mdef in mclassdef.mpropdefs do
+                                       if mdef isa MMethodDef then
+                                               mdef.compile_to_java(new_visitor("{mdef.rt_name}.java"))
+                                       end
+                               end
+                       end
+               end
+       end
+
+       # Generate Java main that call Sys.main
+       fun compile_main_function do
+               var v = new_visitor("{mainmodule.jname}_Main.java")
+               v.add("public class {mainmodule.jname}_Main \{")
+               v.add("  public static void main(String[] args) \{")
+
+               var main_type = mainmodule.sys_type
+               if main_type != null then
+                       var mainmodule = v.compiler.mainmodule
+                       var glob_sys = v.init_instance(main_type)
+                       var main_init = mainmodule.try_get_primitive_method("init", main_type.mclass)
+                       if main_init != null then
+                               v.send(main_init, [glob_sys])
+                       end
+                       var main_method = mainmodule.try_get_primitive_method("run", main_type.mclass) or else
+                               mainmodule.try_get_primitive_method("main", main_type.mclass)
+                       if main_method != null then
+                               v.send(main_method, [glob_sys])
+                       end
+               end
+               v.add("  \}")
+               v.add("\}")
+       end
+end
+
+# The class visiting the AST
+#
+# A visitor is attached to one JavaCodeFile it writes into.
+class JavaCompilerVisitor
+       super Visitor
+
+       # JavaCompiler used with this visitor
+       type COMPILER: JavaCompiler
+
+       # The associated compiler
+       var compiler: JavaCompiler
+
+       # The file to write generated code into
+       var file: JavaCodeFile
+
+       # Names handling
+
+       private var names = new HashSet[String]
+       private var last: Int = 0
+
+       # Return a new name based on `s` and unique in the visitor
+       fun get_name(s: String): String do
+               if not self.names.has(s) then
+                       self.names.add(s)
+                       return s
+               end
+               var i = self.last + 1
+               loop
+                       var s2 = s + i.to_s
+                       if not self.names.has(s2) then
+                               self.last = i
+                               self.names.add(s2)
+                               return s2
+                       end
+                       i = i + 1
+               end
+       end
+
+       # Return an unique and stable identifier associated with an escapemark
+       fun escapemark_name(e: nullable EscapeMark): String do
+               assert e != null
+               var frame = self.frame
+               assert frame != null
+               if frame.escapemark_names.has_key(e) then return frame.escapemark_names[e]
+               var name = e.name
+               if name == null then name = "label"
+               name = get_name(name)
+               frame.escapemark_names[e] = name
+               return name
+       end
+
+       # Insert a C label for associated with an escapemark
+       fun add_escape_label(e: nullable EscapeMark) do
+               if e == null then return
+               if e.escapes.is_empty then return
+               add("BREAK_{escapemark_name(e)}: ")
+       end
+
+       # Variables handling
+
+       # Registered variables
+       protected var variables = new HashMap[Variable, RuntimeVariable]
+
+       # Return the local RuntimeVariable associated to a Nit local variable
+       fun variable(variable: Variable): RuntimeVariable do
+               if variables.has_key(variable) then
+                       return variables[variable]
+               else
+                       var name = get_name("var_{variable.name}")
+                       var mtype = variable.declared_type.as(not null)
+                       mtype = anchor(mtype)
+                       var res = decl_var(name, mtype)
+                       variables[variable] = res
+                       return res
+               end
+       end
+
+       # Return a new uninitialized local RuntimeVariable with `name`
+       fun decl_var(name: String, mtype: MType): RuntimeVariable do
+               var res = new RuntimeVariable(name, mtype, mtype)
+               res.is_boxed = not mtype.is_java_primitive
+               add("{mtype.java_type} {name} /* : {mtype} */;")
+               return res
+       end
+
+       # Return a new uninitialized local RuntimeVariable
+       fun new_var(mtype: MType): RuntimeVariable do
+               mtype = anchor(mtype)
+               var name = self.get_name("var")
+               return decl_var(name, mtype)
+       end
+
+       # Calls handling
+
+       # The current `JavaStaticFrame`
+       var frame: nullable JavaStaticFrame = null is writable
+
+       # Return a new local RuntimeVariable initialized from `args[0]`
+       fun new_recv(mtype: MType): RuntimeVariable do
+               var res = new_var(mtype)
+               add("{res} = args[0];")
+               return res
+       end
+
+       # Calls handling
+
+       # Compile a call within a callsite
+       fun compile_callsite(callsite: CallSite, arguments: Array[RuntimeVariable]): nullable RuntimeVariable do
+               var initializers = callsite.mpropdef.initializers
+               if not initializers.is_empty then
+                       var recv = arguments.first
+
+                       var i = 1
+                       for p in initializers do
+                               if p isa MMethod then
+                                       var args = [recv]
+                                       var msignature = p.intro.msignature
+                                       if msignature != null then
+                                               for x in msignature.mparameters do
+                                                       args.add arguments[i]
+                                                       i += 1
+                                               end
+                                       end
+                                       send(p, args)
+                               else if p isa MAttribute then
+                                       info("NOT YET IMPLEMENTED {class_name}::compile_callsite for MAttribute `{p}`")
+                                       #self.write_attribute(p, recv, arguments[i])
+                                       i += 1
+                               else abort
+                       end
+                       assert i == arguments.length
+
+                       return send(callsite.mproperty, [recv])
+               end
+
+               return send(callsite.mproperty, arguments)
+       end
+
+       # Evaluate `args` as expressions in the call of `mpropdef` on `recv`.
+       #
+       # This method is used to manage varargs in signatures and returns the real array
+       # of runtime variables to use in the call.
+       fun varargize(mpropdef: MMethodDef, map: nullable SignatureMap, recv: RuntimeVariable, args: SequenceRead[AExpr]): Array[RuntimeVariable] do
+               var msignature = mpropdef.new_msignature or else mpropdef.msignature.as(not null)
+               var res = new Array[RuntimeVariable]
+               res.add(recv)
+
+               if msignature.arity == 0 then return res
+
+               if map == null then
+                       assert args.length == msignature.arity
+                       for ne in args do
+                               res.add expr(ne, null)
+                       end
+                       return res
+               end
+
+               # Eval in order of arguments, not parameters
+               var exprs = new Array[RuntimeVariable].with_capacity(args.length)
+               for ne in args do
+                       exprs.add expr(ne, null)
+               end
+
+               # Fill `res` with the result of the evaluation according to the mapping
+               for i in [0..msignature.arity[ do
+                       var param = msignature.mparameters[i]
+                       var j = map.map.get_or_null(i)
+                       if j == null then
+                               # default value
+                               res.add(null_instance)
+                               continue
+                       end
+                       if param.is_vararg and map.vararg_decl > 0 then
+                               var vararg = exprs.sub(j, map.vararg_decl)
+                               var elttype = param.mtype
+                               var arg = self.vararg_instance(mpropdef, recv, vararg, elttype)
+                               res.add(arg)
+                               continue
+                       end
+                       res.add exprs[j]
+               end
+               return res
+       end
+
+       #  Generate a static call on a method definition (no receiver needed).
+       fun static_call(mmethoddef: MMethodDef, arguments: Array[RuntimeVariable]): nullable RuntimeVariable do
+               var res: nullable RuntimeVariable
+               var ret = mmethoddef.msignature.as(not null).return_mtype
+               if ret == null then
+                       res = null
+               else
+                       ret = ret.resolve_for(mmethoddef.mclassdef.bound_mtype, mmethoddef.mclassdef.bound_mtype, mmethoddef.mclassdef.mmodule, true)
+                       res = self.new_var(ret)
+               end
+
+               # Autobox arguments
+               adapt_signature(mmethoddef, arguments)
+
+               var rt_name = mmethoddef.rt_name
+               if res == null then
+                       add("{rt_name}.get{rt_name}().exec(new RTVal[]\{{arguments.join(",")}\});")
+                       return null
+               end
+               var ress = new_expr("{rt_name}.get{rt_name}().exec(new RTVal[]\{{arguments.join(",")}\});", compiler.mainmodule.object_type)
+               assign(res, ress)
+               return res
+       end
+
+       #  Generate a polymorphic send for `method` with `arguments`
+       fun send(mmethod: MMethod, arguments: Array[RuntimeVariable]): nullable RuntimeVariable do
+               # Shortcut calls on primitives
+               if arguments.first.mcasttype.is_java_primitive then
+                       return monomorphic_send(mmethod, arguments.first.mcasttype, arguments)
+               end
+               # Polymorphic send
+               return table_send(mmethod, arguments)
+       end
+
+
+       # Handle common special cases before doing the effective method invocation
+       # This methods handle the `==` and `!=` methods and the case of the null receiver.
+       # Note: a { is open in the generated C, that enclose and protect the effective method invocation.
+       # Client must not forget to close the } after them.
+       #
+       # The value returned is the result of the common special cases.
+       # If not null, client must compile it with the result of their own effective method invocation.
+       #
+       # If `before_send` can shortcut the whole message sending, a dummy `if(0){`
+       # is generated to cancel the effective method invocation that will follow
+       # TODO: find a better approach
+       private fun before_send(res: nullable RuntimeVariable, mmethod: MMethodDef, arguments: Array[RuntimeVariable]) do
+               var bool_type = compiler.mainmodule.bool_type
+               var recv = arguments.first
+               var consider_null = mmethod.name == "==" or mmethod.name == "!=" or mmethod.name == "is_same_instance"
+               if recv.mcasttype isa MNullableType or recv.mcasttype isa MNullType then
+                       add("if ({recv} == null || {recv}.is_null()) \{")
+                       if mmethod.name == "==" or mmethod.name == "is_same_instance" then
+                               if res == null then res = new_var(bool_type)
+                               var arg = arguments[1]
+                               if arg.mcasttype isa MNullableType then
+                                       add("{res} = ({arg} == null || {arg}.is_null());")
+                               else if arg.mcasttype isa MNullType then
+                                       add("{res} = true; /* is null */")
+                               else
+                                       add("{res} = false; /* {arg.inspect} cannot be null */")
+                               end
+                       else if mmethod.name == "!=" then
+                               if res == null then res = new_var(bool_type)
+                               # res = self.new_var(bool_type)
+                               var arg = arguments[1]
+                               if arg.mcasttype isa MNullableType then
+                                       add("{res} = ({arg} != null && !{arg}.is_null());")
+                               else if arg.mcasttype isa MNullType then
+                                       add("{res} = false; /* is null */")
+                               else
+                                       add("{res} = true; /* {arg.inspect} cannot be null */")
+                               end
+                       else
+                               add_abort("Receiver is null")
+                               ret(null_instance)
+                       end
+                       add("\} else \{")
+               else
+                       add "\{"
+                       add "/* recv ({recv}) cannot be null since it's a {recv.mcasttype}"
+               end
+               if consider_null then
+                       var arg = arguments[1]
+                       if arg.mcasttype isa MNullType then
+                               if res == null then res = new_var(bool_type)
+                               if mmethod.name == "!=" then
+                                       add("{res} = true; /* arg is null and recv is not */")
+                               else # `==` and `is_same_instance`
+                                       add("{res} = false; /* arg is null but recv is not */")
+                               end
+                               add("\}") # closes the null case
+                               add("if (false) \{") # what follow is useless, Javac will drop it
+                       end
+               end
+       end
+
+       # Perform a method call through vft
+       private fun table_send(mmethod: TableCallable, arguments: Array[RuntimeVariable]): nullable RuntimeVariable do
+               var mdef: MMethodDef
+               var name: String
+               if mmethod isa MMethod then
+                       mdef = mmethod.intro
+                       name = mmethod.full_name
+               else if mmethod isa MMethodDef then
+                       mdef = mmethod
+                       name = mmethod.full_name
+               else
+                       abort
+               end
+
+               var recv = arguments.first
+               var rect = mdef.mclassdef.bound_mtype
+               var msignature = mdef.msignature.as(not null)
+               msignature = msignature.resolve_for(rect, rect, compiler.mainmodule, true)
+               adapt_signature(mdef, arguments)
+
+               var res: nullable RuntimeVariable
+               var ret = msignature.return_mtype
+               if ret == null then
+                       res = null
+               else
+                       res = self.new_var(ret)
+               end
+
+               before_send(res, mdef, arguments)
+
+               add "/* concrete call to {mdef} */"
+               if res != null then
+                       var ress = new_expr("{recv}.rtclass.vft.get(\"{name}\").exec(new RTVal[]\{{arguments.join(",")}\});", compiler.mainmodule.object_type)
+                       assign(res, ress)
+               else
+                       add("{recv}.rtclass.vft.get(\"{name}\").exec(new RTVal[]\{{arguments.join(",")}\});")
+               end
+
+               add("\}") # closes the null case
+
+               return res
+       end
+
+       # Generate a super call from a method definition
+       fun supercall(m: MMethodDef, recvtype: MClassType, args: Array[RuntimeVariable]): nullable RuntimeVariable do
+               return table_send(m, args)
+       end
+
+       # Generate a monomorphic send for the method `m`, the type `t` and the arguments `args`
+       fun monomorphic_send(m: MMethod, t: MType, args: Array[RuntimeVariable]): nullable RuntimeVariable do
+               assert t isa MClassType
+               var propdef = m.lookup_first_definition(self.compiler.mainmodule, t)
+               return self.static_call(propdef, args)
+       end
+
+       # Code generation
+
+       # Add a line (will be suffixed by `\n`)
+       fun add(line: String) do file.lines.add("{line}\n")
+
+       # Add a new partial line (no `\n` suffix)
+       fun addn(line: String) do file.lines.add(line)
+
+       # Compile a statement (if any)
+       fun stmt(nexpr: nullable AExpr) do
+               if nexpr == null then return
+               if nexpr.mtype == null and not nexpr.is_typed then
+                       # Untyped expression.
+                       # Might mean dead code or invalid code
+                       # so aborts
+                       add_abort("FATAL: bad statement executed.")
+                       return
+               end
+
+               var old = self.current_node
+               current_node = nexpr
+               nexpr.stmt(self)
+               current_node = old
+       end
+
+       # Compile an expression an return its result
+       # `mtype` is the expected return type, pass null if no specific type is expected.
+       fun expr(nexpr: AExpr, mtype: nullable MType): RuntimeVariable do
+               var old = current_node
+               current_node = nexpr
+
+               var res = null
+               if nexpr.mtype != null then
+                       res = nexpr.expr(self)
+               end
+
+               if res == null then
+                       # Untyped expression.
+                       # Might mean dead code or invalid code.
+                       # so aborts
+                       add_abort("FATAL: bad expression executed.")
+                       # and return a placebo result to please the C compiler
+                       if mtype == null then mtype = compiler.mainmodule.object_type
+                       res = null_instance
+
+                       self.current_node = old
+                       return res
+               end
+
+               if mtype != null then
+                       mtype = anchor(mtype)
+                       res = autobox(res, mtype)
+               end
+
+               current_node = old
+               return res
+       end
+
+       # Alias for `self.expr(nexpr, self.bool_type)`
+       fun expr_bool(nexpr: AExpr): RuntimeVariable do
+               return expr(nexpr, compiler.mainmodule.bool_type)
+       end
+
+       # Correctly assign a left and a right value
+       # Boxing and unboxing is performed if required
+       fun assign(left, right: RuntimeVariable) do
+               add("{left} = {autobox(right, left.mtype)};")
+       end
+
+       # Generate a return with `value`
+       fun ret(value: RuntimeVariable) do
+               var frame = self.frame
+               assert frame != null
+               var returnvar = frame.returnvar
+               if returnvar != null then
+                       assign(returnvar, value)
+               end
+               self.add("break {frame.returnlabel.as(not null)};")
+       end
+
+       # Return a new local RuntimeVariable initialized with the Java expression `jexpr`.
+       #
+       # `mtype` is used for the Java return variable initialization.
+       fun new_expr(jexpr: String, mtype: MType): RuntimeVariable do
+               var res = new_var(mtype)
+               add("{res} = {jexpr};")
+               return res
+       end
+
+       # Generate generic abort
+       #
+       # Used by aborts, asserts, casts, etc.
+       fun add_abort(message: String) do
+               add("System.err.print(\"Runtime error: {message}\");")
+               add_raw_abort
+       end
+
+       # Abort without displaying the cause.
+       #
+       # Used to customizable errors.
+       private fun add_raw_abort do
+               var node = current_node
+               if node != null then
+                       add("System.err.print(\" ({node.location.short_location})\");")
+               end
+               add("System.err.println(\"\");")
+               add("System.exit(1);")
+       end
+
+       # Add a dynamic cast
+       fun add_cast(value: RuntimeVariable, mtype: MType) do
+               var res = type_test(value, mtype)
+               add("if (!{res}) \{")
+               add("System.err.print(\"Runtime error: Cast failed. Expected `{mtype.to_s.escape_to_c}`, got `\" + {value}.rtclass.class_name + \"`\");")
+               add_raw_abort
+               add("\}")
+       end
+
+       # Types handling
+
+       # Anchor a type to the main module and the current receiver
+       fun anchor(mtype: MType): MType do
+               if not mtype.need_anchor then return mtype
+               return mtype.anchor_to(compiler.mainmodule, frame.as(not null).receiver)
+       end
+
+       # Adapt the arguments of a method according to targetted `MMethodDef`
+       fun adapt_signature(m: MMethodDef, args: Array[RuntimeVariable]) do
+               var msignature = m.msignature.as(not null).resolve_for(
+                       m.mclassdef.bound_mtype,
+                       m.mclassdef.bound_mtype,
+                       m.mclassdef.mmodule, true)
+               args.first = autobox(args.first, compiler.mainmodule.object_type)
+               for i in [0..msignature.arity[ do
+                       args[i+1] = autobox(args[i + 1], compiler.mainmodule.object_type)
+               end
+       end
+
+       # Box primitive `value` to `mtype`.
+       private fun box(value: RuntimeVariable, mtype: MType): RuntimeVariable do
+               if value.is_boxed then return value
+               var obj_type = compiler.mainmodule.object_type
+               if value.mtype isa MNullType then
+                       return new_expr("new RTVal(null, null)", compiler.mainmodule.model.null_type)
+               end
+               var mbox = value.mtype.as(MClassType).mclass
+               return new_expr("new RTVal({mbox.rt_name}.get{mbox.rt_name}(), {value})", obj_type)
+       end
+
+       # Unbox primitive `value` to `mtype`.
+       private fun unbox(value: RuntimeVariable, mtype: MType): RuntimeVariable do
+               if not value.is_boxed then return value
+               if not mtype.is_java_primitive then return value
+               if compiler.box_kinds.has(mtype) then
+                       return new_expr("({mtype.java_type}){value}.value", mtype)
+               else
+                       info "NOT YET IMPLEMENTED unbox for {value} ({mtype})"
+                       abort
+               end
+       end
+
+       # Box or unbox primitive `value` to `mtype` if needed.
+       private fun autobox(value: RuntimeVariable, mtype: MType): RuntimeVariable do
+               if mtype.is_java_primitive then return unbox(value, mtype)
+               return box(value, mtype)
+       end
+
+       # Can this `value` be a primitive Java value?
+       private fun can_be_primitive(value: RuntimeVariable): Bool do
+               var t = value.mcasttype.undecorate
+               if not t isa MClassType then return false
+               var k = t.mclass.kind
+               return k == interface_kind or t.is_java_primitive
+       end
+
+       #  Generate a polymorphic subtype test
+       fun type_test(value: RuntimeVariable, mtype: MType): RuntimeVariable do
+               add("/* {value.inspect} isa {mtype} */")
+               var res = self.new_var(compiler.mainmodule.bool_type)
+
+               # check color is in table
+               var maybenull = (value.mcasttype isa MNullableType or value.mcasttype isa MNullType)
+               if maybenull then
+                       add("if({value} == null || {value}.is_null()) \{")
+                       add("{res} = true && {mtype isa MNullableType};")
+                       add("\} else \{")
+               end
+               if mtype isa MNullableType then mtype = mtype.mtype
+               var mclass = mtype.as(MClassType).mclass
+               add("{res} = {value}.rtclass.supers.get(\"{mclass.jname}\") == {mclass.rt_name}.get{mclass.rt_name}();")
+               if maybenull then
+                       add("\}")
+               end
+               return res
+       end
+
+       # Generate the code required to dynamically check if 2 objects share the same runtime type
+       fun is_same_type_test(value1, value2: RuntimeVariable): RuntimeVariable do
+               var res = self.new_var(compiler.mainmodule.bool_type)
+               add("{res} = {value1}.rtclass == {value2}.rtclass;")
+               return res
+       end
+
+       # Native instances
+
+       # Generate an integer value
+       fun int_instance(value: Int): RuntimeVariable do
+               var t = compiler.mainmodule.int_type
+               return new RuntimeVariable(value.to_s, t, t)
+       end
+
+       # Generate a byte value
+       fun byte_instance(value: Byte): RuntimeVariable do
+               var t = compiler.mainmodule.byte_type
+               return new RuntimeVariable(value.to_s, t, t)
+       end
+
+       # Generate a char value
+       fun char_instance(value: Char): RuntimeVariable do
+               var t = compiler.mainmodule.char_type
+               return new RuntimeVariable("'{value.to_s.escape_to_c}'", t, t)
+       end
+
+       # Generate a float value
+       #
+       # FIXME pass a Float, not a string
+       fun float_instance(value: String): RuntimeVariable do
+               var t = compiler.mainmodule.float_type
+               return new RuntimeVariable(value.to_s, t, t)
+       end
+
+       # Generate an integer value
+       fun bool_instance(value: Bool): RuntimeVariable do
+               var t = compiler.mainmodule.bool_type
+               return new RuntimeVariable(value.to_s, t, t)
+       end
+
+       # Generate the `null` value
+       fun null_instance: RuntimeVariable do
+               var t = compiler.mainmodule.model.null_type
+               return new RuntimeVariable("null", t, t)
+       end
+
+       # Get an instance of a array for a vararg
+       fun vararg_instance(mpropdef: MPropDef, recv: RuntimeVariable, varargs: Array[RuntimeVariable], elttype: MType): RuntimeVariable do
+               # TODO handle dynamic types
+               info("NOT YET IMPLEMENTED vararg_instance")
+               return null_instance
+               # TODO return array_instance(varargs, elttype)
+       end
+
+       # Nit instances
+
+       # Generate a alloc-instance + init-attributes
+       fun init_instance(mtype: MClassType): RuntimeVariable do
+               var rt_name = mtype.mclass.rt_name
+               var res = new_expr("new RTVal({rt_name}.get{rt_name}())", mtype)
+               generate_init_attr(self, res, mtype)
+               return res
+       end
+
+       # Generate code that initialize the attributes on a new instance
+       fun generate_init_attr(v: JavaCompilerVisitor, recv: RuntimeVariable, mtype: MClassType) do
+               var cds = mtype.collect_mclassdefs(v.compiler.mainmodule).to_a
+               v.compiler.mainmodule.linearize_mclassdefs(cds)
+               for cd in cds do
+                       for npropdef in v.compiler.modelbuilder.collect_attr_propdef(cd) do
+                               npropdef.init_expr(v, recv)
+                       end
+               end
+       end
+
+       #  Generate a Nit "is" for two runtime_variables
+       fun equal_test(value1, value2: RuntimeVariable): RuntimeVariable do
+               var res = new_var(compiler.mainmodule.bool_type)
+               if value2.mtype.is_java_primitive and not value1.mtype.is_java_primitive then
+                       var tmp = value1
+                       value1 = value2
+                       value2 = tmp
+               end
+               if value1.mtype.is_java_primitive then
+                       if value2.mtype == value1.mtype then
+                               add("{res} = {value1} == {value2}; /* == with two primitives */")
+                       else if value2.mtype.is_java_primitive then
+                               add("{res} = true; /* incompatible types {value1.mtype} vs. {value2.mtype}*/")
+                       # else if value1.mtype.is_tagged then
+                               # add("{res} = ({value2} != NULL) && ({autobox(value2, value1.mtype)} == {value1});")
+                       else
+                               var rt_name = value1.mtype.as(MClassType).mclass.rt_name
+                               add("{res} = ({value2} != null) && ({value2}.rtclass == {rt_name}.get{rt_name}());")
+                               add("if ({res}) \{")
+                               add("{res} = ({self.autobox(value2, value1.mtype)} == {value1});")
+                               add("\}")
+                       end
+                       return res
+               end
+               var maybe_null = true
+               var test = new Array[String]
+               var t1 = value1.mcasttype
+               if t1 isa MNullableType then
+                       test.add("{value1} != null && !{value1}.is_null()")
+                       t1 = t1.mtype
+               else
+                       maybe_null = false
+               end
+               var t2 = value2.mcasttype
+               if t2 isa MNullableType then
+                       test.add("{value2} != null && !{value2}.is_null()")
+                       t2 = t2.mtype
+               else
+                       maybe_null = false
+               end
+
+               var incompatible = false
+               var primitive
+               if t1.is_java_primitive then
+                       primitive = t1
+                       if t1 == t2 then
+                               # No need to compare class
+                       else if t2.is_java_primitive then
+                               incompatible = true
+                       else if can_be_primitive(value2) then
+                               if t1.is_java_primitive then
+                                       self.add("{res} = {value1} == {value2}; /* t1 is primitive and t2 can be */")
+                                       return res
+                               end
+                               # if not compiler.modelbuilder.toolcontext.opt_no_tag_primitives.value then
+                                       # test.add("(!{extract_tag(value2)})")
+                               # end
+                               test.add("{value1}.rtclass == {value2}.rtclass")
+                       else
+                               incompatible = true
+                       end
+               else if t2.is_java_primitive then
+                       primitive = t2
+                       if can_be_primitive(value1) then
+                               if t2.is_java_primitive then
+                                       self.add("{res} = {value1} == {value2}; /* t2 is primitive and t1 can be */")
+                                       return res
+                               end
+                               test.add("{value1}.rtclass == {value2}.rtclass")
+                       else
+                               incompatible = true
+                       end
+               else
+                       primitive = null
+               end
+
+               if incompatible then
+                       if maybe_null then
+                               self.add("{res} = {value1} == {value2}; /* incompatible types {t1} vs. {t2}; but may be NULL*/")
+                               return res
+                       else
+                               self.add("{res} = false; /* incompatible types {t1} vs. {t2}; cannot be NULL */")
+                               return res
+                       end
+               end
+               if primitive != null then
+                       if primitive.is_java_primitive then
+                               self.add("{res} = {value1} == {value2};")
+                               return res
+                       end
+                       test.add("({value1}.value == {value2}.value")
+               else if can_be_primitive(value1) and can_be_primitive(value2) then
+                       test.add("{value1}.rtclass == {value2}.rtclass")
+                       var s = new Array[String]
+                       for b in compiler.box_kinds do
+                               var rt_name = b.mclass.rt_name
+                               s.add "({value1}.rtclass == {rt_name}.get{rt_name}()) && ({value1}.value.equals({value2}.value))"
+                               if b.mclass.name == "Float" then
+                                       s.add "({value1}.rtclass == RTClass_kernel_Float.getRTClass_kernel_Float() && {value1}.rtclass == {value2}.rtclass && Math.abs((double)({value1}.value)) == 0.0 && Math.abs((double)({value2}.value)) == 0.0)"
+                               end
+                       end
+                       if s.is_empty then
+                               self.add("{res} = {value1} == {value2}; /* both can be primitive */")
+                               return res
+                       end
+                       test.add("({s.join(" || ")})")
+               else
+                       self.add("{res} = {value1} == {value2}; /* no primitives */")
+                       return res
+               end
+               self.add("{res} = {value1} == {value2} || ({test.join(" && ")});")
+               return res
+       end
+
+       # Attributes
+
+       # Generate a polymorphic attribute is_set test
+       fun isset_attribute(a: MAttribute, recv: RuntimeVariable): RuntimeVariable do
+               # TODO self.check_recv_notnull(recv)
+               var res = new_var(compiler.mainmodule.bool_type)
+
+               # What is the declared type of the attribute?
+               var mtype = a.intro.static_mtype.as(not null)
+               var intromclassdef = a.intro.mclassdef
+               mtype = mtype.resolve_for(intromclassdef.bound_mtype, intromclassdef.bound_mtype, intromclassdef.mmodule, true)
+
+               if mtype isa MNullableType then
+                       add("{res} = true; /* easy isset: {a} on {recv.inspect} */")
+                       return res
+               end
+               add("{res} = {recv}.attrs.get(\"{a.jname}\") != null; /* {a} on {recv.inspect} */")
+               return res
+       end
+
+       # Generate a polymorphic attribute read
+       fun read_attribute(a: MAttribute, recv: RuntimeVariable): RuntimeVariable do
+               # TODO check_recv_notnull(recv)
+               # TODO compile_check(v)
+               # What is the declared type of the attribute?
+               var ret = a.intro.static_mtype.as(not null)
+               var intromclassdef = a.intro.mclassdef
+               ret = ret.resolve_for(intromclassdef.bound_mtype, intromclassdef.bound_mtype, intromclassdef.mmodule, true)
+
+               # Check for Uninitialized attribute
+               if not ret isa MNullableType then check_attribute(a, recv)
+
+               return new_expr("{recv}.attrs.get(\"{a.jname}\")", ret)
+       end
+
+       # Generate a polymorphic attribute write
+       fun write_attribute(a: MAttribute, recv: RuntimeVariable, value: RuntimeVariable) do
+               # TODO check_recv_notnull(recv)
+               add "{recv}.attrs.put(\"{a.jname}\", {autobox(value, compiler.mainmodule.object_type)});"
+       end
+
+       # Check uninitialized attribute
+       fun check_attribute(a: MAttribute, recv: RuntimeVariable) do
+               add "if({recv}.attrs.get(\"{a.jname}\") == null) \{"
+               add_abort "Uninitialized attribute {a.name}"
+               add "\}"
+       end
+
+       # Utils
+
+       # Display a info message
+       fun info(str: String) do compiler.modelbuilder.toolcontext.info(str, 0)
+end
+
+# A file containing Java code.
+class JavaCodeFile
+
+       # File name
+       var filename: String
+
+       # Lines to write
+       var lines: List[String] = new List[String]
+end
+
+redef class MEntity
+       # A Java compatible name for `self`
+       private fun jname: String do return name.to_cmangle
+end
+
+# Handler for runtime classes generation
+#
+# We need 3 kinds of runtime structures:
+# * `RTClass` to represent a global class
+# * `RTMethod` to represent a method definition
+# * `RTVal` to represent runtime variables
+class JavaRuntimeModel
+
+       # Compile JavaRuntimeModel structures
+       fun compile_rtmodel(compiler: JavaCompiler) do
+               compile_rtclass(compiler)
+               compile_rtmethod(compiler)
+               compile_rtval(compiler)
+       end
+
+       # Compile the abstract runtime class structure
+       #
+       # Runtime classes have 3 attributes:
+       # * `class_name`: the class name as a String
+       # * `vft`: the virtual function table for the class (flattened)
+       # * `supers`: the super type table (used for type tests)
+       fun compile_rtclass(compiler: JavaCompiler) do
+               var v = compiler.new_visitor("RTClass.java")
+               v.add("import java.util.HashMap;")
+               v.add("public abstract class RTClass \{")
+               v.add("  public String class_name;")
+               v.add("  public HashMap<String, RTMethod> vft = new HashMap<>();")
+               v.add("  public HashMap<String, RTClass> supers = new HashMap<>();")
+               v.add("  protected RTClass() \{\}")
+               v.add("\}")
+       end
+
+       # Compile the abstract runtime method structure
+       #
+       # Method body is executed through the `exec` method:
+       # * `exec` always take an array of RTVal as arg, the first one must be the receiver
+       # * `exec` always returns a RTVal (or null if the Nit return type is void)
+       fun compile_rtmethod(compiler: JavaCompiler) do
+               var v = compiler.new_visitor("RTMethod.java")
+               v.add("public abstract class RTMethod \{")
+               v.add("  protected RTMethod() \{\}")
+               v.add("  public abstract RTVal exec(RTVal[] args);")
+               v.add("\}")
+       end
+
+       # Compile the runtime value structure
+       #
+       # RTVal both represents object instances and primitives values:
+       # * object instances:
+       #   * `rtclass` the class of the RTVal is instance of
+       #   * `attrs` contains the attributes of the instance
+       # * primitive values:
+       #   * `rtclass` represents the class of the primitive value Nit type
+       #   * `value` contains the primitive value of the instance
+       # * null values:
+       #   * they must have both `rtclass` and `value` as null
+       fun compile_rtval(compiler: JavaCompiler) do
+               var v = compiler.new_visitor("RTVal.java")
+               v.add("import java.util.HashMap;")
+               v.add("public class RTVal \{")
+               v.add("  public RTClass rtclass;")
+               v.add("  public HashMap<String, RTVal> attrs = new HashMap<>();")
+               v.add("  Object value;")
+               v.add("  public RTVal(RTClass rtclass) \{")
+               v.add("    this.rtclass = rtclass;")
+               v.add("  \}")
+               v.add("  public RTVal(RTClass rtclass, Object value) \{")
+               v.add("    this.rtclass = rtclass;")
+               v.add("    this.value = value;")
+               v.add("  \}")
+               v.add("  public boolean is_null() \{ return rtclass == null && value == null; \}")
+               v.add("\}")
+       end
+end
+
+# A runtime variable hold a runtime value in Java.
+# Runtime variables are associated to Nit local variables and intermediate results in Nit expressions.
+class RuntimeVariable
+
+       # The name of the variable in the Java code
+       var name: String
+
+       # The static type of the variable (as declard in Java)
+       var mtype: MType
+
+       # The current casted type of the variable (as known in Nit)
+       var mcasttype: MType is writable
+
+       # If the variable exaclty a mcasttype?
+       # false (usual value) means that the variable is a mcasttype or a subtype.
+       var is_exact: Bool = false is writable
+
+       # Is this variable declared as a RTVal or a Java primitive one?
+       var is_boxed = false
+
+       redef fun to_s do return name
+
+       redef fun inspect
+       do
+               var exact_str
+               if self.is_exact then
+                       exact_str = " exact"
+               else
+                       exact_str = ""
+               end
+               var type_str
+               if self.mtype == self.mcasttype then
+                       type_str = "{mtype}{exact_str}"
+               else
+                       type_str = "{mtype}({mcasttype}{exact_str})"
+               end
+               return "<{name}:{type_str}>"
+       end
+end
+
+# The static context of a visited property in a `JavaCompilerVisitor`
+class JavaStaticFrame
+       # The associated visitor
+       var visitor: JavaCompilerVisitor
+
+       # The executed property.
+       # A Method in case of a call, an attribute in case of a default initialization.
+       var mpropdef: MPropDef
+
+       # The static type of the receiver
+       var receiver: MClassType
+
+       # Arguments of the method (the first is the receiver)
+       var arguments: Array[RuntimeVariable]
+
+       # The runtime_variable associated to the return (in a function)
+       var returnvar: nullable RuntimeVariable = null is writable
+
+       # The label at the end of the property
+       var returnlabel: nullable String = null is writable
+
+       # Labels associated to a each escapemarks.
+       # Because of inlinings, escape-marks must be associated to their context (the frame)
+       private var escapemark_names = new HashMap[EscapeMark, String]
+end
+
+redef class Location
+       # Return a shortened version of the location with `"{file}:{line_start}"`
+       fun short_location: String do
+               var file = self.file
+               if file == null then return "<no file>:{line_start}"
+               return "{file.filename.escape_to_c}:{line_start}"
+       end
+end
+
+redef class MType
+       # Return the Java type associated to a given Nit static type
+       fun java_type: String do return "RTVal"
+
+       # Is the associated Java type a primitive one?
+       #
+       # ENSURE `result == (java_type != "Object")`
+       var is_java_primitive: Bool is lazy do return java_type != "RTVal"
+end
+
+redef class MClassType
+
+       redef var java_type is lazy do
+               if mclass.name == "Int" then
+                       return "int"
+               else if mclass.name == "Bool" then
+                       return "boolean"
+               else if mclass.name == "Char" then
+                       return "char"
+               else if mclass.name == "Float" then
+                       return "double"
+               else if mclass.name == "Byte" then
+                       return "byte"
+               else if mclass.name == "NativeString" then
+                       return "String"
+               else if mclass.name == "NativeArray" then
+                       return "Array"
+               end
+               return "RTVal"
+       end
+end
+
+redef class MClass
+
+       # Runtime name
+       private fun rt_name: String do return "RTClass_{intro.mmodule.jname}_{jname}"
+
+       # Generate a Java RTClass for a Nit MClass
+       fun compile_to_java(v: JavaCompilerVisitor) do
+               v.add("public class {rt_name} extends RTClass \{")
+               v.add("  protected static RTClass instance;")
+               v.add("  private {rt_name}() \{")
+               v.add("    this.class_name = \"{name}\";")
+               compile_vft(v)
+               compile_type_table(v)
+               v.add("  \}")
+               v.add("  public static RTClass get{rt_name}() \{")
+               v.add("    if(instance == null) \{")
+               v.add("      instance = new {rt_name}();")
+               v.add("    \}")
+               v.add("    return instance;")
+               v.add("  \}")
+               v.add("\}")
+       end
+
+       # Compile the virtual function table for the mclass
+       private fun compile_vft(v: JavaCompilerVisitor) do
+               # TODO handle generics
+               if mclass_type.need_anchor then return
+               var mclassdefs = mclass_type.collect_mclassdefs(v.compiler.mainmodule).to_a
+               v.compiler.mainmodule.linearize_mclassdefs(mclassdefs)
+
+               var mainmodule = v.compiler.mainmodule
+               for mclassdef in mclassdefs.reversed do
+                       for mprop in mclassdef.intro_mproperties do
+                               var mpropdef = mprop.lookup_first_definition(mainmodule, intro.bound_mtype)
+                               if not mpropdef isa MMethodDef then continue
+                               var rt_name = mpropdef.rt_name
+                               v.add("this.vft.put(\"{mprop.full_name}\", {rt_name}.get{rt_name}());")
+
+                               # fill super next definitions
+                               while mpropdef.has_supercall do
+                                       var prefix = mpropdef.full_name
+                                       mpropdef = mpropdef.lookup_next_definition(mainmodule, intro.bound_mtype)
+                                       rt_name = mpropdef.rt_name
+                                       v.add("this.vft.put(\"{prefix}\", {rt_name}.get{rt_name}());")
+                               end
+                       end
+               end
+       end
+
+       # Compile the type table for the MClass
+       fun compile_type_table(v: JavaCompilerVisitor) do
+               for pclass in in_hierarchy(v.compiler.mainmodule).greaters do
+                       if pclass == self then
+                               v.add("supers.put(\"{pclass.jname}\", this);")
+                       else
+                               v.add("supers.put(\"{pclass.jname}\", {pclass.rt_name}.get{pclass.rt_name}());")
+                       end
+               end
+       end
+end
+
+# Used as a common type between MMethod and MMethodDef for `table_send`
+private interface TableCallable
+end
+
+redef class MMethod
+       super TableCallable
+end
+
+redef class MMethodDef
+       super TableCallable
+
+       # Runtime name
+       private fun rt_name: String do
+               return "RTMethod_{mclassdef.mmodule.jname}_{mclassdef.mclass.jname}_{mproperty.jname}"
+       end
+
+       # Generate a Java RTMethod for `self`
+       fun compile_to_java(v: JavaCompilerVisitor) do
+               v.add("public class {rt_name} extends RTMethod \{")
+               v.add("  protected static RTMethod instance;")
+               v.add("  public static RTMethod get{rt_name}() \{")
+               v.add("    if(instance == null) \{")
+               v.add("      instance = new {rt_name}();")
+               v.add("    \}")
+               v.add("    return instance;")
+               v.add("  \}")
+               v.add("  @Override")
+               v.add("  public RTVal exec(RTVal[] args) \{")
+               compile_inside_to_java(v)
+               v.add("  \}")
+               v.add("\}")
+       end
+
+       # Compile the body of this function
+       fun compile_inside_to_java(v: JavaCompilerVisitor) do
+
+               var modelbuilder = v.compiler.modelbuilder
+               var node = modelbuilder.mpropdef2node(self)
+
+               var recv = mclassdef.bound_mtype
+               var arguments = new Array[RuntimeVariable]
+               var frame = new JavaStaticFrame(v, self, recv, arguments)
+               v.frame = frame
+
+               var selfvar = v.decl_var("self", recv)
+               arguments.add(selfvar)
+               var boxed = v.new_expr("args[0]", v.compiler.mainmodule.object_type)
+               v.add "{selfvar} = {v.autobox(boxed, recv)};"
+
+               var msignature = self.msignature
+               var ret = null
+               if msignature != null then
+                       ret = msignature.return_mtype
+                       if ret != null then
+                               var retvar = v.decl_var("ret", ret)
+                               if ret.name == "Int" then v.add "{retvar} = 0;"
+                               if ret.name == "Float" then v.add "{retvar} = 0.0;"
+                               if ret.name == "Bool" then v.add "{retvar} = false;"
+                               if ret.name == "Char" then v.add "{retvar} = 0;"
+                               if ret.name == "Byte" then v.add "{retvar} = 0;"
+                               frame.returnvar = retvar
+                       end
+               end
+               frame.returnlabel = v.get_name("RET_LABEL")
+
+               v.current_node = node
+               if is_abstract then
+                       v.add_abort("Abstract method `{mproperty.name}` called on `\"  + {selfvar}.rtclass.class_name +\"`")
+                       v.add("return null;")
+                       return
+               end
+               v.current_node = null
+
+               v.add("{frame.returnlabel.as(not null)}: \{")
+
+               if node isa APropdef then
+                       node.compile_to_java(v, self, arguments)
+               else if node isa AClassdef then
+                       node.compile_to_java(v, self, arguments)
+               else
+                       abort
+               end
+
+               v.add("\}")
+               if ret != null then
+                       v.add("return {v.autobox(frame.returnvar.as(not null), v.compiler.mainmodule.object_type)};")
+               else
+                       v.add("return null;")
+               end
+       end
+end
+
+redef class AClassdef
+       private fun compile_to_java(v: JavaCompilerVisitor, mpropdef: MMethodDef, arguments: Array[RuntimeVariable]) do
+               if mpropdef == self.mfree_init then
+                       assert mpropdef.mproperty.is_root_init
+                       if not mpropdef.is_intro then
+                               v.supercall(mpropdef, arguments.first.mtype.as(MClassType), arguments)
+                       end
+               else
+                       abort
+               end
+       end
+end
+
+redef class APropdef
+
+       # Compile that property definition to java code
+       fun compile_to_java(v: JavaCompilerVisitor, mpropdef: MMethodDef, arguments: Array[RuntimeVariable]) do
+               v.info("NOT YET IMPLEMENTED {class_name}::compile_to_java")
+       end
+end
+
+redef class AMethPropdef
+       redef fun compile_to_java(v, mpropdef, arguments) do
+               if mpropdef.msignature != null then
+                       var i = 0
+                       for mparam in mpropdef.msignature.as(not null).mparameters do
+                               var variable = n_signature.as(not null).n_params[i].variable
+                               if variable == null then continue
+                               var argvar = v.variable(variable)
+                               v.assign(argvar, v.new_expr("args[{i + 1}]", v.compiler.mainmodule.object_type))
+                               arguments.add(argvar)
+                               i += 1
+                       end
+               end
+
+               # Call the implicit super-init
+               var auto_super_inits = self.auto_super_inits
+               if auto_super_inits != null then
+                       var args = [arguments.first]
+                       for auto_super_init in auto_super_inits do
+                               assert auto_super_init.mproperty != mpropdef.mproperty
+                               args.clear
+                               for i in [0..auto_super_init.msignature.arity+1[ do
+                                       args.add(arguments[i])
+                               end
+                               assert auto_super_init.mproperty != mpropdef.mproperty
+                               v.compile_callsite(auto_super_init, args)
+                       end
+               end
+               if auto_super_call then
+                       v.supercall(mpropdef, arguments.first.mtype.as(MClassType), arguments)
+               end
+
+               compile_inside_to_java(v, mpropdef, arguments)
+       end
+
+       # Compile the inside of the method body
+       private fun compile_inside_to_java(v: JavaCompilerVisitor, mpropdef: MMethodDef, arguments: Array[RuntimeVariable]) do
+               # Compile intern methods
+               if mpropdef.is_intern then
+                       if compile_intern_to_java(v, mpropdef, arguments) then return
+                       v.info("NOT YET IMPLEMENTED compile_intern for {mpropdef}")
+                       v.ret(v.null_instance)
+                       return
+               end
+
+               # Compile block if any
+               var n_block = n_block
+               if n_block != null then
+                       v.stmt(n_block)
+                       return
+               end
+       end
+
+       # Compile an intern method using Java primitives
+       fun compile_intern_to_java(v: JavaCompilerVisitor, mpropdef: MMethodDef, arguments: Array[RuntimeVariable]): Bool do
+               var pname = mpropdef.mproperty.name
+               var cname = mpropdef.mclassdef.mclass.name
+               var ret = mpropdef.msignature.as(not null).return_mtype
+               if cname == "Int" then
+                       if pname == "output" then
+                               v.add("System.out.println({arguments[0]});")
+                               v.ret(v.null_instance)
+                               return true
+                       else if pname == "object_id" then
+                               v.ret(arguments.first)
+                               return true
+                       else if pname == "+" then
+                               v.ret(v.new_expr("{arguments[0]} + {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "-" then
+                               v.ret(v.new_expr("{arguments[0]} - {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "unary -" then
+                               v.ret(v.new_expr("-{arguments[0]}", ret.as(not null)))
+                               return true
+                       else if pname == "unary +" then
+                               v.ret(arguments[0])
+                               return true
+                       else if pname == "*" then
+                               v.ret(v.new_expr("{arguments[0]} * {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "/" then
+                               v.ret(v.new_expr("{arguments[0]} / {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "%" then
+                               v.ret(v.new_expr("{arguments[0]} % {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "lshift" then
+                               v.ret(v.new_expr("{arguments[0]} << {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "rshift" then
+                               v.ret(v.new_expr("{arguments[0]} >> {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "==" then
+                               v.ret(v.equal_test(arguments[0], arguments[1]))
+                               return true
+                       else if pname == "!=" then
+                               var res = v.equal_test(arguments[0], arguments[1])
+                               v.ret(v.new_expr("!{res}", ret.as(not null)))
+                               return true
+                       else if pname == "<" then
+                               v.ret(v.new_expr("{arguments[0]} < {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == ">" then
+                               v.ret(v.new_expr("{arguments[0]} > {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "<=" then
+                               v.ret(v.new_expr("{arguments[0]} <= {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == ">=" then
+                               v.ret(v.new_expr("{arguments[0]} >= {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "to_f" then
+                               v.ret(v.new_expr("(double){arguments[0]}", ret.as(not null)))
+                               return true
+                       else if pname == "to_b" then
+                               v.ret(v.new_expr("(byte){arguments[0]}", ret.as(not null)))
+                               return true
+                       else if pname == "ascii" then
+                               v.ret(v.new_expr("(char){arguments[0]}", ret.as(not null)))
+                               return true
+                       end
+               else if cname == "Char" then
+                       if pname == "output" then
+                               v.add("System.out.print({arguments[0]});")
+                               v.ret(v.null_instance)
+                               return true
+                       else if pname == "object_id" then
+                               v.ret(v.new_expr("(int){arguments[0]}", ret.as(not null)))
+                               return true
+                       else if pname == "successor" then
+                               v.ret(v.new_expr("(char)({arguments[0]} + {arguments[1]})", ret.as(not null)))
+                               return true
+                       else if pname == "predecessor" then
+                               v.ret(v.new_expr("(char)({arguments[0]} - {arguments[1]})", ret.as(not null)))
+                               return true
+                       else if pname == "==" then
+                               v.ret(v.equal_test(arguments[0], arguments[1]))
+                               return true
+                       else if pname == "!=" then
+                               var res = v.equal_test(arguments[0], arguments[1])
+                               v.ret(v.new_expr("!{res}", ret.as(not null)))
+                               return true
+                       else if pname == "<" then
+                               v.ret(v.new_expr("{arguments[0]} < {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == ">" then
+                               v.ret(v.new_expr("{arguments[0]} > {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "<=" then
+                               v.ret(v.new_expr("{arguments[0]} <= {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == ">=" then
+                               v.ret(v.new_expr("{arguments[0]} >= {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "to_i" then
+                               v.ret(v.new_expr("(int){arguments[0]}", ret.as(not null)))
+                               return true
+                       else if pname == "ascii" then
+                               v.ret(v.new_expr("(int){arguments[0]}", ret.as(not null)))
+                               return true
+                       end
+               else if cname == "Byte" then
+                       if pname == "output" then
+                               v.add("System.out.println({arguments[0]});")
+                               v.ret(v.null_instance)
+                               return true
+                       else if pname == "object_id" then
+                               v.ret(v.new_expr("(int){arguments[0]}", ret.as(not null)))
+                               return true
+                       else if pname == "+" then
+                               v.ret(v.new_expr("(byte)({arguments[0]} + {arguments[1]})", ret.as(not null)))
+                               return true
+                       else if pname == "-" then
+                               v.ret(v.new_expr("(byte)({arguments[0]} - {arguments[1]})", ret.as(not null)))
+                               return true
+                       else if pname == "unary -" then
+                               v.ret(v.new_expr("(byte)(-{arguments[0]})", ret.as(not null)))
+                               return true
+                       else if pname == "unary +" then
+                               v.ret(arguments[0])
+                               return true
+                       else if pname == "*" then
+                               v.ret(v.new_expr("(byte)({arguments[0]} * {arguments[1]})", ret.as(not null)))
+                               return true
+                       else if pname == "/" then
+                               v.ret(v.new_expr("(byte)({arguments[0]} / {arguments[1]})", ret.as(not null)))
+                               return true
+                       else if pname == "%" then
+                               v.ret(v.new_expr("(byte)({arguments[0]} % {arguments[1]})", ret.as(not null)))
+                               return true
+                       else if pname == "lshift" then
+                               v.ret(v.new_expr("(byte)({arguments[0]} << {arguments[1]})", ret.as(not null)))
+                               return true
+                       else if pname == "rshift" then
+                               v.ret(v.new_expr("(byte)({arguments[0]} >> {arguments[1]})", ret.as(not null)))
+                               return true
+                       else if pname == "==" then
+                               v.ret(v.equal_test(arguments[0], arguments[1]))
+                               return true
+                       else if pname == "!=" then
+                               var res = v.equal_test(arguments[0], arguments[1])
+                               v.ret(v.new_expr("!{res}", ret.as(not null)))
+                               return true
+                       else if pname == "<" then
+                               v.ret(v.new_expr("{arguments[0]} < {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == ">" then
+                               v.ret(v.new_expr("{arguments[0]} > {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "<=" then
+                               v.ret(v.new_expr("{arguments[0]} <= {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == ">=" then
+                               v.ret(v.new_expr("{arguments[0]} >= {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "to_i" then
+                               v.ret(v.new_expr("(int){arguments[0]}", ret.as(not null)))
+                               return true
+                       else if pname == "to_f" then
+                               v.ret(v.new_expr("(double){arguments[0]}", ret.as(not null)))
+                               return true
+                       else if pname == "ascii" then
+                               v.ret(v.new_expr("{arguments[0]}", ret.as(not null)))
+                               return true
+                       end
+               else if cname == "Bool" then
+                       if pname == "output" then
+                               v.add("System.out.println({arguments[0]});")
+                               v.ret(v.null_instance)
+                               return true
+                       else if pname == "object_id" then
+                               v.ret(v.new_expr("{arguments[0]}?1:0", ret.as(not null)))
+                               return true
+                       else if pname == "==" then
+                               v.ret(v.equal_test(arguments[0], arguments[1]))
+                               return true
+                       else if pname == "!=" then
+                               var res = v.equal_test(arguments[0], arguments[1])
+                               v.ret(v.new_expr("!{res}", ret.as(not null)))
+                               return true
+                       end
+               else if cname == "Float" then
+                       if pname == "output" then
+                               v.add "if({arguments[0]} == Double.POSITIVE_INFINITY) \{"
+                               v.add "System.out.println(\"inf\");"
+                               v.add "\} else if({arguments[0]} == Double.POSITIVE_INFINITY) \{"
+                               v.add "System.out.println(\"-inf\");"
+                               v.add "\} else \{"
+                               var df = v.get_name("df")
+                               v.add "java.text.DecimalFormat {df} = new java.text.DecimalFormat(\"0.000000\");"
+                               v.add "System.out.println({df}.format({arguments[0]}));"
+                               v.add "\}"
+                               v.ret(v.null_instance)
+                               return true
+                       else if pname == "object_id" then
+                               v.ret(v.new_expr("(int){arguments[0]}", ret.as(not null)))
+                               return true
+                       else if pname == "+" then
+                               v.ret(v.new_expr("{arguments[0]} + {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "-" then
+                               v.ret(v.new_expr("{arguments[0]} - {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "unary -" then
+                               v.ret(v.new_expr("-{arguments[0]}", ret.as(not null)))
+                               return true
+                       else if pname == "unary +" then
+                               v.ret(arguments[0])
+                               return true
+                       else if pname == "succ" then
+                               v.ret(v.new_expr("{arguments[0]} + 1", ret.as(not null)))
+                               return true
+                       else if pname == "prec" then
+                               v.ret(v.new_expr("{arguments[0]} - 1", ret.as(not null)))
+                               return true
+                       else if pname == "*" then
+                               v.ret(v.new_expr("{arguments[0]} * {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "/" then
+                               v.ret(v.new_expr("{arguments[0]} / {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "==" then
+                               v.ret(v.equal_test(arguments[0], arguments[1]))
+                               return true
+                       else if pname == "!=" then
+                               var res = v.equal_test(arguments[0], arguments[1])
+                               v.ret(v.new_expr("!{res}", ret.as(not null)))
+                               return true
+                       else if pname == "<" then
+                               v.ret(v.new_expr("{arguments[0]} < {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == ">" then
+                               v.ret(v.new_expr("{arguments[0]} > {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "<=" then
+                               v.ret(v.new_expr("{arguments[0]} <= {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == ">=" then
+                               v.ret(v.new_expr("{arguments[0]} >= {arguments[1]}", ret.as(not null)))
+                               return true
+                       else if pname == "to_i" then
+                               v.ret(v.new_expr("(int){arguments[0]}", ret.as(not null)))
+                               return true
+                       else if pname == "to_b" then
+                               v.ret(v.new_expr("(byte){arguments[0]}", ret.as(not null)))
+                               return true
+                       end
+               end
+               if pname == "exit" then
+                       v.add("System.exit({arguments[1]});")
+                       v.ret(v.null_instance)
+                       return true
+               else if pname == "sys" then
+                       # TODO singleton
+                       var main_type = v.compiler.mainmodule.sys_type.as(not null)
+                       var sys = main_type.mclass
+                       v.ret(v.new_expr("new RTVal({sys.rt_name}.get{sys.rt_name}())", main_type))
+                       return true
+               else if pname == "object_id" then
+                       v.ret(v.new_expr("{arguments[0]}.hashCode()", ret.as(not null)))
+                       return true
+               else if pname == "is_same_type" then
+                       v.ret(v.is_same_type_test(arguments[0], arguments[1]))
+                       return true
+               else if pname == "is_same_instance" then
+                       v.ret(v.equal_test(arguments[0], arguments[1]))
+                       return true
+               else if pname == "output_class_name" then
+                       v.add("System.out.println({arguments[0]}.rtclass.class_name);")
+                       v.ret(v.null_instance)
+                       return true
+               end
+               return false
+       end
+end
+
+redef class AAttrPropdef
+       redef fun compile_to_java(v, mpropdef, arguments) do
+               v.current_node = self
+               if mpropdef == mreadpropdef then
+                       compile_getter(v, mpropdef, arguments)
+               else if mpropdef == mwritepropdef then
+                       compile_setter(v, mpropdef, arguments)
+               else
+                       abort
+               end
+               v.current_node = null
+       end
+
+       # Compile the setter method
+       private fun compile_setter(v: JavaCompilerVisitor, mpropdef: MPropDef, arguments: Array[RuntimeVariable]) do
+               var mtype = v.compiler.mainmodule.object_type
+               var recv = arguments.first
+               var val = v.new_expr("args[1]", mtype)
+               v.write_attribute(self.mpropdef.as(not null).mproperty, recv, val)
+               v.ret v.null_instance
+       end
+
+       # Compile the getter method
+       private fun compile_getter(v: JavaCompilerVisitor, mpropdef: MPropDef, arguments: Array[RuntimeVariable]) do
+               var recv = arguments.first
+               v.ret v.read_attribute(self.mpropdef.as(not null).mproperty, recv)
+       end
+
+       private fun init_expr(v: JavaCompilerVisitor, recv: RuntimeVariable) do
+               if has_value and not is_lazy and not n_expr isa ANullExpr then evaluate_expr(v, recv)
+       end
+
+       # Evaluate, store and return the default value of the attribute
+       private fun evaluate_expr(v: JavaCompilerVisitor, recv: RuntimeVariable): RuntimeVariable do
+               var old = v.frame
+               var frame = new JavaStaticFrame(v, self.mreadpropdef.as(not null), recv.mcasttype.undecorate.as(MClassType), [recv])
+               v.frame = frame
+
+               var value
+               var mtype = self.mtype
+               assert mtype != null
+
+               var nexpr = self.n_expr
+               var nblock = self.n_block
+               if nexpr != null then
+                       value = v.expr(nexpr, mtype)
+               else if nblock != null then
+                       value = v.new_var(mtype)
+                       frame.returnvar = value
+                       frame.returnlabel = v.get_name("RET_LABEL")
+                       v.add("{frame.returnlabel.as(not null)}: \{")
+                       v.stmt(nblock)
+                       v.add("\}")
+               else
+                       abort
+               end
+
+               v.write_attribute(self.mpropdef.as(not null).mproperty, recv, value)
+               v.frame = old
+               return value
+       end
+end
+
+redef class AExpr
+       # Try to compile self as an expression
+       # Do not call this method directly, use `v.expr` instead
+       private fun expr(v: JavaCompilerVisitor): nullable RuntimeVariable do
+               v.info("NOT YET IMPLEMENTED {class_name}::expr")
+               return null
+       end
+
+       # Try to compile self as a statement
+       # Do not call this method directly, use `v.stmt` instead
+       private fun stmt(v: JavaCompilerVisitor) do expr(v)
+end
+
+redef class ABlockExpr
+       redef fun stmt(v)
+       do
+               for e in self.n_expr do v.stmt(e)
+       end
+       redef fun expr(v)
+       do
+               var last = self.n_expr.last
+               for e in self.n_expr do
+                       if e == last then break
+                       v.stmt(e)
+               end
+               return v.expr(last, null)
+       end
+end
+
+redef class ASendExpr
+       redef fun expr(v) do
+               var recv = v.expr(n_expr, null)
+               var callsite = callsite.as(not null)
+               var args = v.varargize(callsite.mpropdef, callsite.signaturemap, recv, raw_arguments)
+               return v.compile_callsite(callsite, args)
+       end
+end
+
+redef class ANewExpr
+       redef fun expr(v)
+       do
+               var mtype = self.recvtype
+               assert mtype != null
+
+               if mtype.mclass.name == "NativeArray" then
+                       # TODO handle native arrays
+                       v.info("NOT YET IMPLEMENTED new NativeArray")
+               end
+
+               var recv = v.init_instance(mtype)
+
+               var callsite = self.callsite
+               if callsite == null then return recv
+
+               var args = v.varargize(callsite.mpropdef, callsite.signaturemap, recv, self.n_args.n_exprs)
+               var res2 = v.compile_callsite(callsite, args)
+               if res2 != null then
+                       return res2
+               end
+               return recv
+       end
+end
+
+redef class ASuperExpr
+       redef fun expr(v)
+       do
+               var frame = v.frame
+               assert frame != null
+               var recv = frame.arguments.first
+
+               var callsite = self.callsite
+               if callsite != null then
+                       var args
+
+                       if self.n_args.n_exprs.is_empty then
+                               # Add automatic arguments for the super init call
+                               args = [recv]
+                               for i in [0..callsite.msignature.arity[ do
+                                       args.add(frame.arguments[i+1])
+                               end
+                       else
+                               args = v.varargize(callsite.mpropdef, callsite.signaturemap, recv, self.n_args.n_exprs)
+                       end
+
+                       # Super init call
+                       var res = v.compile_callsite(callsite, args)
+                       return res
+               end
+
+               var mpropdef = self.mpropdef.as(not null)
+
+               var args
+               if self.n_args.n_exprs.is_empty then
+                       args = frame.arguments
+               else
+                       args = v.varargize(mpropdef, signaturemap, recv, self.n_args.n_exprs)
+               end
+
+               # Standard call-next-method
+               return v.supercall(mpropdef, recv.mtype.as(MClassType), args)
+       end
+end
+
+redef class ASelfExpr
+       redef fun expr(v) do return v.frame.as(not null).arguments.first
+end
+
+redef class AImplicitSelfExpr
+       redef fun expr(v) do return v.frame.as(not null).arguments.first
+end
+
+redef class AAttrExpr
+       redef fun expr(v) do
+               var recv = v.expr(self.n_expr, null)
+               var mproperty = self.mproperty.as(not null)
+               return v.read_attribute(mproperty, recv)
+       end
+end
+
+redef class AAttrAssignExpr
+       redef fun expr(v) do
+               var recv = v.expr(self.n_expr, null)
+               var i = v.expr(self.n_value, null)
+               var mproperty = self.mproperty.as(not null)
+               v.write_attribute(mproperty, recv, i)
+               return i
+       end
+end
+
+redef class AAttrReassignExpr
+       redef fun stmt(v) do
+               var recv = v.expr(self.n_expr, null)
+               var value = v.expr(self.n_value, null)
+               var mproperty = self.mproperty.as(not null)
+               var attr = v.read_attribute(mproperty, recv)
+               var res = v.compile_callsite(self.reassign_callsite.as(not null), [attr, value])
+               assert res != null
+               v.write_attribute(mproperty, recv, res)
+       end
+end
+
+redef class AIssetAttrExpr
+       redef fun expr(v) do
+               var recv = v.expr(self.n_expr, null)
+               var mproperty = self.mproperty.as(not null)
+               return v.isset_attribute(mproperty, recv)
+       end
+end
+
+redef class AReturnExpr
+       redef fun stmt(v) do
+               var nexpr = self.n_expr
+               var frame = v.frame
+               assert frame != null
+               if nexpr != null then
+                       v.ret(v.expr(nexpr, frame.returnvar.as(not null).mtype))
+               else
+                       v.ret(v.null_instance)
+               end
+       end
+end
+
+redef class AIfExpr
+       redef fun stmt(v) do
+               var cond = v.expr_bool(self.n_expr)
+               v.add("if ({cond})\{")
+               v.stmt(self.n_then)
+               v.add("\} else \{")
+               v.stmt(self.n_else)
+               v.add("\}")
+       end
+
+       redef fun expr(v) do
+               var res = v.new_var(self.mtype.as(not null))
+               var cond = v.expr_bool(self.n_expr)
+               v.add("if ({cond})\{")
+               v.assign(res, v.expr(self.n_then.as(not null), null))
+               v.add("\} else \{")
+               v.assign(res, v.expr(self.n_else.as(not null), null))
+               v.add("\}")
+               return res
+       end
+end
+
+redef class ADoExpr
+       redef fun stmt(v)
+       do
+               v.add_escape_label(break_mark)
+               v.add "\{"
+               v.stmt(self.n_block)
+               v.add "\}"
+       end
+end
+
+redef class AWhileExpr
+       redef fun stmt(v)
+       do
+               v.add_escape_label(break_mark)
+               v.add_escape_label(continue_mark)
+               v.add("for(;;) \{")
+               var cond = v.expr_bool(self.n_expr)
+               v.add("if (!{cond}) break;")
+               v.stmt(self.n_block)
+               v.add("\}")
+       end
+end
+
+redef class ALoopExpr
+       redef fun stmt(v)
+       do
+               v.add_escape_label(break_mark)
+               v.add_escape_label(continue_mark)
+               v.add("for(;;) \{")
+               v.stmt(self.n_block)
+               v.add("\}")
+       end
+end
+
+redef class AEscapeExpr
+       redef fun stmt(v) do v.add("break BREAK_{v.escapemark_name(escapemark)};")
+end
+
+redef class AVardeclExpr
+       redef fun stmt(v) do
+               var variable = self.variable.as(not null)
+               var ne = self.n_expr
+               var decl = v.variable(variable)
+               if ne != null then
+                       var i = v.expr(ne, variable.declared_type)
+                       v.assign(decl, i)
+               end
+       end
+end
+
+redef class AVarExpr
+       redef fun expr(v) do
+               return v.variable(self.variable.as(not null))
+       end
+end
+
+redef class AVarAssignExpr
+       redef fun expr(v) do
+               var variable = self.variable.as(not null)
+               var i = v.expr(self.n_value, variable.declared_type)
+               v.assign(v.variable(variable), i)
+               return i
+       end
+end
+
+
+redef class AAssertExpr
+       redef fun stmt(v) do
+               var cond = v.expr_bool(self.n_expr)
+               v.add("if (!{cond}) \{")
+               v.stmt(self.n_else)
+               var nid = self.n_id
+               if nid != null then
+                       v.add_abort("Assert '{nid.text}' failed")
+               else
+                       v.add_abort("Assert failed")
+               end
+               v.add("\}")
+       end
+end
+
+redef class AImpliesExpr
+       redef fun expr(v) do
+               var res = v.new_var(mtype.as(not null))
+               var i1 = v.expr_bool(n_expr)
+               v.add("if (!{i1}) \{")
+               v.add("{res} = true;")
+               v.add("\} else \{")
+               var i2 = v.expr_bool(n_expr2)
+               v.add("{res} = {i2};")
+               v.add("\}")
+               return res
+       end
+end
+
+redef class AOrElseExpr
+       redef fun expr(v)
+       do
+               var res = v.new_var(self.mtype.as(not null))
+               var i1 = v.expr(self.n_expr, null)
+               v.add("if ({i1} != null && !{i1}.is_null()) \{")
+               v.assign(res, i1)
+               v.add("\} else \{")
+               var i2 = v.expr(self.n_expr2, null)
+               v.assign(res, i2)
+               v.add("\}")
+               return res
+       end
+end
+
+redef class AOrExpr
+       redef fun expr(v) do
+               var res = v.new_var(self.mtype.as(not null))
+               var i1 = v.expr_bool(self.n_expr)
+               v.add("if ({i1}) \{")
+               v.add("{res} = true;")
+               v.add("\} else \{")
+               var i2 = v.expr_bool(self.n_expr2)
+               v.add("{res} = {i2};")
+               v.add("\}")
+               return res
+       end
+end
+
+redef class AAndExpr
+       redef fun expr(v) do
+               var res = v.new_var(self.mtype.as(not null))
+               var i1 = v.expr_bool(self.n_expr)
+               v.add("if (!{i1}) \{")
+               v.add("{res} = false;")
+               v.add("\} else \{")
+               var i2 = v.expr_bool(self.n_expr2)
+               v.add("{res} = {i2};")
+               v.add("\}")
+               return res
+       end
+end
+
+redef class ANotExpr
+       redef fun expr(v) do
+               var cond = v.expr_bool(self.n_expr)
+               return v.new_expr("!{cond}", self.mtype.as(not null))
+       end
+end
+
+redef class AIntegerExpr
+       redef fun expr(v) do
+               if value isa Int then
+                       return v.int_instance(self.value.as(Int))
+               else if value isa Byte then
+                       return v.byte_instance(self.value.as(Byte))
+               else
+                       # Should not happen
+                       abort
+               end
+       end
+end
+
+redef class AFloatExpr
+       redef fun expr(v) do return v.float_instance("{self.n_float.text}") # FIXME use value, not n_float
+end
+
+redef class ACharExpr
+       redef fun expr(v) do return v.char_instance(self.value.as(not null))
+end
+
+redef class ATrueExpr
+       redef fun expr(v) do return v.bool_instance(true)
+end
+
+redef class AFalseExpr
+       redef fun expr(v) do return v.bool_instance(false)
+end
+
+redef class ANullExpr
+       redef fun expr(v) do return v.null_instance
+end
+
+redef class AAsCastExpr
+       redef fun expr(v)
+       do
+               var i = v.expr(n_expr, null)
+               v.add_cast(i, mtype.as(not null))
+               return i
+       end
+end
+
+redef class AAsNotnullExpr
+       redef fun expr(v) do
+               var i = v.expr(n_expr, null)
+               if i.mtype.is_java_primitive then return i
+
+               v.add("if ({i} == null || {i}.is_null()) \{")
+               v.add_abort("Cast failed")
+               v.add("\}")
+               return i
+       end
+end
+
+redef class AIsaExpr
+       redef fun expr(v)
+       do
+               var i = v.expr(self.n_expr, null)
+               var cast_type = self.cast_type
+               if cast_type == null then return null # no-no on broken node
+               return v.type_test(i, cast_type)
+       end
+end
+
+redef class AParExpr
+       redef fun expr(v) do return v.expr(self.n_expr, null)
+end
+
+redef class AAbortExpr
+       redef fun stmt(v) do v.add_abort("Aborted")
+end
+
+redef class ADebugTypeExpr
+       redef fun stmt(v) do end # do nothing
+end
index b1e08c8..c73bf58 100644 (file)
@@ -819,12 +819,15 @@ class SeparateCompiler
                var v = new_visitor
 
                var rta = runtime_type_analysis
-               var is_dead = rta != null and not rta.live_classes.has(mclass) and not mtype.is_c_primitive and mclass.name != "NativeArray" and mclass.name != "Pointer"
+               var is_dead = rta != null and not rta.live_classes.has(mclass)
+               # While the class may be dead, some part of separately compiled code may use symbols associated to the class, so
+               # in order to compile and link correctly the C code, these symbols should be declared and defined.
+               var need_corpse = is_dead and mtype.is_c_primitive or mclass.kind == extern_kind or mclass.kind == enum_kind
 
-               v.add_decl("/* runtime class {c_name} */")
+               v.add_decl("/* runtime class {c_name}: {mclass.full_name} (dead={is_dead}; need_corpse={need_corpse})*/")
 
                # Build class vft
-               if not is_dead then
+               if not is_dead or need_corpse then
                        self.provide_declaration("class_{c_name}", "extern const struct class class_{c_name};")
                        v.add_decl("const struct class class_{c_name} = \{")
                        v.add_decl("{self.box_kind_of(mclass)}, /* box_kind */")
@@ -861,7 +864,8 @@ class SeparateCompiler
                        self.header.add_decl("{mtype.ctype_extern} value;")
                        self.header.add_decl("\};")
 
-                       if not rta.live_types.has(mtype) and mtype.mclass.name != "Pointer" then return
+                       # Pointer is needed by extern types, live or not
+                       if is_dead and mtype.mclass.name != "Pointer" then return
 
                        #Build BOX
                        self.provide_declaration("BOX_{c_name}", "val* BOX_{c_name}({mtype.ctype_extern});")
@@ -877,6 +881,7 @@ class SeparateCompiler
                        v.add("return (val*)res;")
                        v.add("\}")
 
+                       # A Pointer class also need its constructor
                        if mtype.mclass.name != "Pointer" then return
 
                        v = new_visitor
@@ -931,7 +936,7 @@ class SeparateCompiler
                        var pointer_type = mainmodule.pointer_type
 
                        self.provide_declaration("NEW_{c_name}", "{mtype.ctype} NEW_{c_name}(const struct type* type);")
-                       v.add_decl("/* allocate {mtype} */")
+                       v.add_decl("/* allocate extern {mtype} */")
                        v.add_decl("{mtype.ctype} NEW_{c_name}(const struct type* type) \{")
                        if is_dead then
                                v.add_abort("{mclass} is DEAD")
@@ -1203,27 +1208,29 @@ class SeparateCompilerVisitor
                        end
                        return self.new_expr("((struct instance_{mtype.c_name}*){value})->value; /* autounbox from {value.mtype} to {mtype} */", mtype)
                else if not mtype.is_c_primitive then
+                       assert value.mtype == value.mcasttype
                        if value.mtype.is_tagged then
+                               var res
                                if value.mtype.name == "Int" then
-                                       return self.new_expr("(val*)({value}<<2|1)", mtype)
+                                       res = self.new_expr("(val*)({value}<<2|1)", mtype)
                                else if value.mtype.name == "Char" then
-                                       return self.new_expr("(val*)((long)({value})<<2|2)", mtype)
+                                       res = self.new_expr("(val*)((long)({value})<<2|2)", mtype)
                                else if value.mtype.name == "Bool" then
-                                       return self.new_expr("(val*)((long)({value})<<2|3)", mtype)
+                                       res = self.new_expr("(val*)((long)({value})<<2|3)", mtype)
                                else
                                        abort
                                end
+                               # Do not loose type info
+                               res.mcasttype = value.mcasttype
+                               return res
                        end
                        var valtype = value.mtype.as(MClassType)
                        if mtype isa MClassType and mtype.mclass.kind == extern_kind and mtype.mclass.name != "NativeString" then
                                valtype = compiler.mainmodule.pointer_type
                        end
                        var res = self.new_var(mtype)
-                       if compiler.runtime_type_analysis != null and not compiler.runtime_type_analysis.live_types.has(valtype) then
-                               self.add("/*no autobox from {value.mtype} to {mtype}: {value.mtype} is not live! */")
-                               self.add("PRINT_ERROR(\"Dead code executed!\\n\"); fatal_exit(1);")
-                               return res
-                       end
+                       # Do not loose type info
+                       res.mcasttype = value.mcasttype
                        self.require_declaration("BOX_{valtype.c_name}")
                        self.add("{res} = BOX_{valtype.c_name}({value}); /* autobox from {value.mtype} to {mtype} */")
                        return res
@@ -1259,11 +1266,7 @@ class SeparateCompilerVisitor
                   mtype.mclass.name != "NativeString" then
                        var valtype = compiler.mainmodule.pointer_type
                        var res = self.new_var(mtype)
-                       if compiler.runtime_type_analysis != null and not compiler.runtime_type_analysis.live_types.has(value.mtype.as(MClassType)) then
-                               self.add("/*no boxing of {value.mtype}: {value.mtype} is not live! */")
-                               self.add("PRINT_ERROR(\"Dead code executed!\\n\"); fatal_exit(1);")
-                               return res
-                       end
+                       compiler.undead_types.add(mtype)
                        self.require_declaration("BOX_{valtype.c_name}")
                        self.add("{res} = BOX_{valtype.c_name}({value}); /* boxing {value.mtype} */")
                        self.require_declaration("type_{mtype.c_name}")
index c866351..29efa62 100644 (file)
@@ -111,7 +111,7 @@ abstract class DocComposite
        var id: String is writable
 
        # Item title if any.
-       var title: nullable String
+       var title: nullable String is writable
 
        # Does `self` have a `parent`?
        fun is_root: Bool do return parent == null
diff --git a/src/doc/doc_commands.nit b/src/doc/doc_commands.nit
new file mode 100644 (file)
index 0000000..e69bb38
--- /dev/null
@@ -0,0 +1,155 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Parsing of commands understood by documentation tools.
+#
+# This can be through:
+# * `nitx` commands like `code: MEntity::name`
+# * `nitdoc` wikilinks like `[[doc: MEntity::name]]`
+module doc_commands
+
+import doc_base
+
+# A command aimed at a documentation tool like `nitdoc` or `nitx`.
+#
+# `DocCommand` are generally of the form `command: args`.
+interface DocCommand
+
+       # Original command string.
+       fun string: String is abstract
+
+       # Command name.
+       fun name: String is abstract
+
+       # Command arguments.
+       #
+       # FIXME: define a syntax
+       fun args: Array[String] is abstract
+
+       # Command factory.
+       #
+       # Returns a concrete instance of `DocCommand` depending on the string.
+       new(command_string: String) do
+               if command_string.has_prefix("doc:") then
+                       return new ArticleCommand(command_string)
+               else if command_string.has_prefix("comment:") then
+                       return new CommentCommand(command_string)
+               else if command_string.has_prefix("list:") then
+                       return new ListCommand(command_string)
+               else if command_string.has_prefix("param:") then
+                       return new ParamCommand(command_string)
+               else if command_string.has_prefix("return:") then
+                       return new ReturnCommand(command_string)
+               else if command_string.has_prefix("new:") then
+                       return new NewCommand(command_string)
+               else if command_string.has_prefix("call:") then
+                       return new CallCommand(command_string)
+               else if command_string.has_prefix("code:") then
+                       return new CodeCommand(command_string)
+               end
+               return new UnknownCommand(command_string)
+       end
+
+       redef fun to_s do return string
+end
+
+# Used to factorize initialization of DocCommands.
+abstract class AbstractDocCommand
+       super DocCommand
+
+       redef var string
+       redef var name is noinit
+       redef var args = new Array[String]
+
+       init do
+               # parse command
+               var str = new FlatBuffer
+               var i = 0
+               while i < string.length do
+                       var c = string[i]
+                       i += 1
+                       if c == ':' then break
+                       str.add c
+               end
+               name = str.write_to_string
+               # parse args
+               args.add string.substring_from(i).trim
+       end
+end
+
+# A `DocCommand` not recognized by documentation tools.
+#
+# Used to provide warnings or any other behavior for unexisting commands.
+class UnknownCommand
+       super AbstractDocCommand
+end
+
+# A `DocCommand` that includes the documentation article of a `MEntity`.
+#
+# Syntax: `doc: MEntity::name`.
+class ArticleCommand
+       super AbstractDocCommand
+end
+
+# A `DocCommand` that includes the MDoc of a `MEntity`.
+#
+# Syntax: `comment: MEntity::name`.
+class CommentCommand
+       super AbstractDocCommand
+end
+
+# A `DocCommand` that includes a list of something.
+#
+# Syntax: `list:kind: <arg>`.
+class ListCommand
+       super AbstractDocCommand
+end
+
+# A `DocCommand` that includes the list of methods tanking a `MType` as parameter.
+#
+# Syntax: `param: MType`.
+class ParamCommand
+       super AbstractDocCommand
+end
+
+# A `DocCommand` that includes the list of methods returning a `MType` as parameter.
+#
+# Syntax: `param: MType`.
+class ReturnCommand
+       super AbstractDocCommand
+end
+
+# A `DocCommand` that includes the list of methods creating new instances of a specific `MType`
+#
+# Syntax: `new: MType`.
+class NewCommand
+       super AbstractDocCommand
+end
+
+# A `DocCommand` that includes the list of methods calling a specific `MProperty`.
+#
+# Syntax: `call: MEntity::name`.
+class CallCommand
+       super AbstractDocCommand
+end
+
+# A `DocCommand` that includes the source code of a `MEntity`.
+#
+# Syntax:
+# * `code: MEntity::name`
+# * `./src/file.nit` to include source code from a file.
+# * `./src/file.nit:1,2--3,4` to select code between positions.
+class CodeCommand
+       super AbstractDocCommand
+end
index e1a5348..5284dc1 100644 (file)
@@ -20,11 +20,19 @@ import highlight
 private import parser_util
 
 redef class MDoc
-       # Comment synopsys HTML escaped
-       var short_comment: String is lazy do return content.first.html_escape
 
-       # Full comment HTML escaped
-       var full_comment: String is lazy do return content.join("\n").html_escape
+       # Synopsis HTML escaped.
+       var synopsis: String is lazy do return content.first.html_escape
+
+       # Comment without synopsis HTML escaped
+       var comment: String is lazy do
+               var lines = content.to_a
+               if not lines.is_empty then lines.shift
+               return content.join("\n").html_escape
+       end
+
+       # Full comment HTML escaped.
+       var documentation: String is lazy do return content.join("\n").html_escape
 
        private var markdown_proc: MarkdownProcessor is lazy do
                return original_mentity.model.nitdoc_md_processor
@@ -34,8 +42,8 @@ redef class MDoc
                return original_mentity.model.nitdoc_inline_processor
        end
 
-       # Synopsys in a template
-       var tpl_short_comment: Writable is lazy do
+       # Renders the synopsis as a HTML comment block.
+       var html_synopsis: Writable is lazy do
                var res = new Template
                var syn = inline_proc.process(content.first)
                res.add "<span class=\"synopsys nitdoc\">{syn}</span>"
@@ -43,17 +51,28 @@ redef class MDoc
 
        end
 
-       # Full comment in a template
-       var tpl_comment: Writable is lazy do
-               var res = new Template
+       # Renders the comment without the synopsis as a HTML comment block.
+       var html_comment: Writable is lazy do
                var lines = content.to_a
+               if not lines.is_empty then lines.shift
+               return lines_to_html(lines)
+       end
+
+       # Renders the synopsis and the comment as a HTML comment block.
+       var html_documentation: Writable is lazy do return lines_to_html(content.to_a)
+
+       # Renders markdown line as a HTML comment block.
+       private fun lines_to_html(lines: Array[String]): Writable do
+               var res = new Template
                res.add "<div class=\"nitdoc\">"
                # do not use DocUnit as synopsys
-               if not content.first.has_prefix("    ") and
-                  not content.first.has_prefix("\t") then
-                       # parse synopsys
-                       var syn = inline_proc.process(lines.shift)
-                       res.add "<p class=\"synopsys\">{syn}</p>"
+               if not lines.is_empty then
+                       if not lines.first.has_prefix("    ") and
+                          not lines.first.has_prefix("\t") then
+                               # parse synopsys
+                               var syn = inline_proc.process(lines.shift)
+                               res.add "<p class=\"synopsys\">{syn}</p>"
+                       end
                end
                # check for annotations
                for i in [0 .. lines.length[ do
@@ -70,6 +89,7 @@ redef class MDoc
                res.add markdown_proc.process(lines.join("\n"))
                res.add "</div>"
                return res
+
        end
 end
 
@@ -185,7 +205,7 @@ end
 
 redef class Model
        # Get a markdown processor for Nitdoc comments.
-       private var nitdoc_md_processor: MarkdownProcessor is lazy do
+       var nitdoc_md_processor: MarkdownProcessor is lazy do
                var proc = new MarkdownProcessor
                proc.emitter.decorator = new NitdocDecorator
                return proc
@@ -194,7 +214,7 @@ redef class Model
        # Get a markdown inline processor for Nitdoc comments.
        #
        # This processor is specificaly designed to inlinable doc elements like synopsys.
-       private var nitdoc_inline_processor: MarkdownProcessor is lazy do
+       var nitdoc_inline_processor: MarkdownProcessor is lazy do
                var proc = new MarkdownProcessor
                proc.emitter.decorator = new InlineDecorator
                return proc
index b6d08dc..9734ed3 100644 (file)
@@ -19,6 +19,7 @@
 module doc_console
 
 import semantize
+import doc_commands
 import doc_extract
 import doc_poset
 import doc::console_templates
@@ -89,7 +90,7 @@ class Nitx
 
        # Processes the query string and performs it.
        fun do_query(str: String) do
-               var query = new NitxQuery(str)
+               var query = new DocCommand(str)
                if query isa NitxCommand then
                        query.execute(self)
                        return
@@ -100,49 +101,19 @@ class Nitx
        end
 end
 
-# A query performed on Nitx.
-#
-# Queries are responsible to collect matching results and render them as a
-# DocPage.
-#
-# Used as a factory to concrete instances.
-interface NitxQuery
-
-       # Original query string.
-       fun query_string: String is abstract
+redef interface DocCommand
 
-       # Query factory.
-       #
-       # Will return a concrete instance of NitxQuery.
-       new(query_string: String) do
+       redef new(query_string) do
                if query_string == ":q" then
                        return new NitxQuit
                else if query_string == ":h" then
                        return new NitxHelp
-               else if query_string.has_prefix("comment:") then
-                       return new CommentQuery(query_string)
-               else if query_string.has_prefix("doc:") then
-                       return new DocQuery(query_string)
-               else if query_string.has_prefix("param:") then
-                       return new ParamQuery(query_string)
-               else if query_string.has_prefix("return:") then
-                       return new ReturnQuery(query_string)
-               else if query_string.has_prefix("new:") then
-                       return new NewQuery(query_string)
-               else if query_string.has_prefix("call:") then
-                       return new CallQuery(query_string)
-               else if query_string.has_prefix("code:") then
-                       return new CodeQuery(query_string)
-               else if query_string.has_prefix("parents:") then
-                       return new ParentsQuery(query_string)
-               else if query_string.has_prefix("ancestors:") then
-                       return new AncestorsQuery(query_string)
-               else if query_string.has_prefix("children:") then
-                       return new ChildrenQuery(query_string)
-               else if query_string.has_prefix("descendants:") then
-                       return new DescendantsQuery(query_string)
                end
-               return new CommentQuery("comment: {query_string}")
+               var cmd = super(query_string)
+               if cmd isa UnknownCommand then
+                       return new CommentCommand("comment: {query_string}")
+               end
+               return cmd
        end
 
        # Looks up the `doc` model and returns possible matches.
@@ -151,54 +122,22 @@ interface NitxQuery
        # Pretty prints the results for the console.
        fun make_results(nitx: Nitx, results: Array[NitxMatch]): DocPage do
                var page = new DocPage("results", "Results")
-               page.root.add_child(new QueryResultArticle("results.article", "Results", self, results))
+               page.root.add_child(new QueryResultArticle("results", "Results", self, results))
                return page
        end
-
-       redef fun to_s do return query_string
 end
 
-# Something that matches a `NitxQuery`.
+# Something that matches a `DocCommand`.
 abstract class NitxMatch
 
        # Query matched by `self`.
-       var query: NitxQuery
+       var query: DocCommand
 
        # Pretty prints `self` for console.
        fun make_list_item: String is abstract
 end
 
-# A query that contains a meta command.
-#
-# In Nitx, commands are written such as `command: args...`.
-abstract class MetaQuery
-       super NitxQuery
-
-       redef var query_string
-
-       # Meta command used.
-       var command: String is noinit
-
-       # Arguments passed to the `command`.
-       var args = new Array[String]
-
-       init do
-               # parse command
-               var str = new FlatBuffer
-               var i = 0
-               while i < query_string.length do
-                       var c = query_string[i]
-                       i += 1
-                       if c == ':' then break
-                       str.add c
-               end
-               command = str.write_to_string
-               # parse args
-               args.add query_string.substring_from(i).trim
-       end
-end
-
-# A match between a `NitxQuery` and a `MEntity`.
+# A match between a `DocCommand` and a `MEntity`.
 class MEntityMatch
        super NitxMatch
 
@@ -208,10 +147,7 @@ class MEntityMatch
        redef fun make_list_item do return mentity.cs_list_item
 end
 
-# A query to search a `MEntity` comment by its name or namespace.
-class CommentQuery
-       super MetaQuery
-
+redef class CommentCommand
        redef fun perform(nitx, doc) do
                var name = args.first
                var res = new Array[NitxMatch]
@@ -226,8 +162,8 @@ class CommentQuery
                if len == 1 then
                        var res = results.first.as(MEntityMatch)
                        var mentity = res.mentity
-                       var page = new DocPage("results", "Results")
-                       var article = new DefinitionArticle("results.article", "Results", mentity)
+                       var page = new DocPage("resultats", "Results")
+                       var article = new DefinitionArticle("results", "Results", mentity)
                        article.cs_title = mentity.name
                        article.cs_subtitle = mentity.cs_declaration
                        page.root.add_child article
@@ -239,9 +175,7 @@ class CommentQuery
 end
 
 # A query to search signatures using a specific `MType` as parameter.
-class ParamQuery
-       super MetaQuery
-
+redef class ParamCommand
        redef fun perform(nitx, doc) do
                var res = new Array[NitxMatch]
                var mtype_name = args.first
@@ -261,9 +195,7 @@ class ParamQuery
 end
 
 # A query to search signatures using a specific `MType` as return.
-class ReturnQuery
-       super MetaQuery
-
+redef class ReturnCommand
        redef fun perform(nitx, doc) do
                var res = new Array[NitxMatch]
                var mtype_name = args.first
@@ -282,9 +214,7 @@ class ReturnQuery
 end
 
 # A query to search methods creating new instances of a specific `MType`.
-class NewQuery
-       super MetaQuery
-
+redef class NewCommand
        redef fun perform(nitx, doc) do
                var res = new Array[NitxMatch]
                var mtype_name = args.first
@@ -302,9 +232,7 @@ class NewQuery
 end
 
 # A query to search methods calling a specific `MProperty`.
-class CallQuery
-       super MetaQuery
-
+redef class CallCommand
        redef fun perform(nitx, doc) do
                var res = new Array[NitxMatch]
                var mprop_name = args.first
@@ -323,9 +251,7 @@ class CallQuery
 end
 
 # A query to search a Nitdoc documentation page by its name.
-class DocQuery
-       super MetaQuery
-
+redef class ArticleCommand
        redef fun perform(nitx, doc) do
                var res = new Array[NitxMatch]
                var name = args.first
@@ -377,7 +303,7 @@ end
 # It actually searches for pages about the mentity and extracts the
 # pre-calculated hierarchies by the `doc_post` phase.
 abstract class HierarchiesQuery
-       super DocQuery
+       super DocCommand
 
        redef fun make_results(nitx, results) do
                var page = new DocPage("hierarchy", "Hierarchy")
@@ -443,9 +369,7 @@ class DescendantsQuery
 end
 
 # A query to search source code from a file name.
-class CodeQuery
-       super MetaQuery
-
+redef class CodeCommand
        # FIXME refactor this!
        redef fun perform(nitx, doc) do
                var res = new Array[NitxMatch]
@@ -470,7 +394,7 @@ class CodeQuery
        redef fun make_results(nitx, results) do
                var page = new DocPage("results", "Code Results")
                for res in results do
-                       page.add new CodeQueryArticle("results.article", "Results", self, res.as(CodeMatch))
+                       page.add new CodeQueryArticle("results", "Results", self, res.as(CodeMatch))
                end
                return page
        end
@@ -495,7 +419,7 @@ end
 # These commands are prefixed with `:` and are used to control the execution of
 # `nitx` like displaying the help or quiting.
 interface NitxCommand
-       super NitxQuery
+       super DocCommand
 
        # Executes the command.
        fun execute(nitx: Nitx) is abstract
@@ -548,7 +472,7 @@ private class MPropertyCallVisitor
        do
                node.visit_all(self)
                if not node isa ASendExpr then return
-               calls.add node.callsite.mproperty
+               calls.add node.callsite.as(not null).mproperty
        end
 end
 
@@ -559,7 +483,7 @@ private class QueryResultArticle
        super DocArticle
 
        # Query linked to the results to display.
-       var query: NitxQuery
+       var query: DocCommand
 
        # Results to display.
        var results: Array[NitxMatch]
@@ -567,9 +491,9 @@ private class QueryResultArticle
        redef fun render_title do
                var len = results.length
                if len == 0 then
-                       add "No result found for '{query.query_string}'..."
+                       add "No result found for '{query.string}'..."
                else
-                       add "# {len} result(s) for '{query.query_string}'".green.bold
+                       add "# {len} result(s) for '{query.string}'".green.bold
                end
        end
 
@@ -587,7 +511,7 @@ private class CodeQueryArticle
        super DocArticle
 
        # The query linked to the result to display.
-       var query: NitxQuery
+       var query: DocCommand
 
        # The result to display.
        var result: CodeMatch
index 6532a1d..722724b 100644 (file)
@@ -238,7 +238,13 @@ redef class SearchPage
 end
 
 redef class MEntityPage
-       redef var html_url is lazy do return mentity.nitdoc_url
+       redef var html_url is lazy do
+               if mentity isa MGroup and mentity.mdoc != null then
+                       return "api_{mentity.nitdoc_url}"
+               end
+               return mentity.nitdoc_url
+       end
+
        redef fun init_title(v, doc) do title = mentity.html_name
 end
 
@@ -246,6 +252,26 @@ end
 # doc phases. This is to preserve the compatibility with the current
 # `doc_templates` module.
 
+redef class ReadmePage
+       redef var html_url is lazy do return mentity.nitdoc_url
+
+       redef fun init_topmenu(v, doc) do
+               super
+               var mproject = mentity.mproject
+               if not mentity.is_root then
+                       topmenu.add_li new ListItem(new Link(mproject.nitdoc_url, mproject.html_name))
+               end
+               topmenu.add_li new ListItem(new Link(html_url, mproject.html_name))
+               topmenu.active_item = topmenu.items.last
+       end
+
+       redef fun init_sidebar(v, doc) do
+               super
+               var api_lnk = """<a href="api_{{{mentity.nitdoc_url}}}">Go to API</a>"""
+               sidebar.boxes.unshift new DocSideBox(api_lnk, "")
+       end
+end
+
 redef class MGroupPage
        redef fun init_topmenu(v, doc) do
                super
@@ -259,6 +285,12 @@ redef class MGroupPage
 
        redef fun init_sidebar(v, doc) do
                super
+               # README link
+               if mentity.mdoc != null then
+                       var doc_lnk = """<a href="{{{mentity.nitdoc_url}}}">Go to README</a>"""
+                       sidebar.boxes.unshift new DocSideBox(doc_lnk, "")
+               end
+               # MClasses list
                var mclasses = new HashSet[MClass]
                mclasses.add_all intros
                mclasses.add_all redefs
@@ -375,7 +407,7 @@ redef class MClassPage
                        var def_url = "{cls_url}#{mprop.nitdoc_id}.definition"
                        var lnk = new Link(def_url, mprop.html_name)
                        var mdoc = mprop.intro.mdoc_or_fallback
-                       if mdoc != null then lnk.title = mdoc.short_comment
+                       if mdoc != null then lnk.title = mdoc.synopsis
                        var item = new Template
                        item.add new DocHTMLLabel.with_classes(classes)
                        item.add lnk
@@ -585,15 +617,19 @@ end
 
 redef class GraphArticle
        redef fun init_html_render(v, doc, page) do
-               var output_dir = v.ctx.output_dir
-               var path = output_dir / graph_id
-               var path_sh = path.escape_to_sh
+               var path = v.ctx.output_dir / graph_id
                var file = new FileWriter.open("{path}.dot")
                file.write(dot)
                file.close
-               sys.system("\{ test -f {path_sh}.png && test -f {path_sh}.s.dot && diff -- {path_sh}.dot {path_sh}.s.dot >/dev/null 2>&1 ; \} || \{ cp -- {path_sh}.dot {path_sh}.s.dot && dot -Tpng -o{path_sh}.png -Tcmapx -o{path_sh}.map {path_sh}.s.dot ; \}")
-               var fmap = new FileReader.open("{path}.map")
-               self.map = fmap.read_all
-               fmap.close
+               var proc = new ProcessReader("dot", "-Tsvg", "-Tcmapx", "{path}.dot")
+               var svg = new Buffer
+               var i = 0
+               while not proc.eof do
+                       i += 1
+                       if i < 6 then continue # skip dot default header
+                       svg.append proc.read_line
+               end
+               proc.close
+               self.svg = svg.write_to_string
        end
 end
index 3f83001..e08a385 100644 (file)
@@ -26,6 +26,7 @@ class MakePagePhase
                doc.add_page new OverviewPage("overview", "Overview")
                doc.add_page new SearchPage("search", "Index")
                for mgroup in doc.mgroups do
+                       doc.add_page new ReadmePage(mgroup)
                        doc.add_page new MGroupPage(mgroup)
                end
                for mmodule in doc.mmodules do
@@ -65,6 +66,14 @@ class MEntityPage
        redef var title is lazy do return mentity.nitdoc_name
 end
 
+# A page that displays a `MGroup` README.
+class ReadmePage
+       super MEntityPage
+
+       redef type MENTITY: MGroup
+       redef var id is lazy do return "readme_{mentity.nitdoc_id}"
+end
+
 # A documentation page about a MGroup.
 class MGroupPage
        super MEntityPage
diff --git a/src/doc/doc_phases/doc_readme.nit b/src/doc/doc_phases/doc_readme.nit
new file mode 100644 (file)
index 0000000..0a43edb
--- /dev/null
@@ -0,0 +1,314 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This phase parses README files.
+module doc_readme
+
+import markdown::decorators
+intrude import markdown::wikilinks
+import doc_commands
+import doc_down
+import doc_intros_redefs
+
+# Generate content of `ReadmePage`.
+#
+# This phase extracts the structure of a `ReadmePage` from the markdown content
+# of the README file.
+# It also resolves Wikilinks and commands.
+class ReadmePhase
+       super DocPhase
+
+       redef fun apply do
+               for page in doc.pages.values do page.build_content(self, doc)
+       end
+
+       # Display a warning about something wrong in the readme file.
+       fun warning(location: nullable MDLocation, page: ReadmePage, message: String) do
+               var loc = null
+               if location != null then
+                       loc = location.to_location(page.mentity.mdoc.location.file)
+               end
+               ctx.warning(loc, "readme-warning", message)
+       end
+end
+
+redef class DocPage
+       # Build content of `ReadmePage` based on the content of the readme file.
+       private fun build_content(v: ReadmePhase, doc: DocModel) do end
+end
+
+redef class ReadmePage
+       redef fun build_content(v, doc) do
+               if mentity.mdoc == null then
+                       v.warning(null, self, "Empty README for group `{mentity}`")
+                       return
+               end
+               var proc = new MarkdownProcessor
+               proc.emitter = new ReadmeMdEmitter(proc, self, v)
+               proc.emitter.decorator = new ReadmeDecorator
+               var md = mentity.mdoc.content.join("\n")
+               proc.process(md)
+       end
+end
+
+# Markdown emitter used to produce the `ReadmeArticle`.
+class ReadmeMdEmitter
+       super MarkdownEmitter
+
+       # Readme page being decorated.
+       var page: ReadmePage
+
+       # Phase used to access doc model and toolcontext.
+       var phase: ReadmePhase
+
+       init do open_article
+
+       # Push the article template on top of the buffer stack.
+       #
+       # Subsequent markdown writting will be done in the article template.
+       #
+       # See `ReadmeArticle::md`.
+       private fun push_article(article: ReadmeArticle) do
+               buffer_stack.add article.md
+       end
+
+       private var context = new Array[DocComposite]
+
+       # Creates a new ReadmeSection in `self.toc.page`.
+       #
+       # Called from `add_headline`.
+       private fun open_section(lvl: Int, title: String) do
+               var section = new ReadmeSection(title.escape_to_c, title, lvl, processor)
+               if current_section == null then
+                       page.root.add_child(section)
+               else
+                       current_section.add_child(section)
+               end
+               current_section = section
+               context.add section
+       end
+       private var current_section: nullable ReadmeSection is noinit
+
+       # Close the current section.
+       #
+       # Ensure `context.last isa ReadmeSection`.
+       private fun close_section do
+               assert context.last isa ReadmeSection
+               context.pop
+               if context.is_empty then
+                       current_section = null
+               else
+                       current_section = context.last.as(ReadmeSection)
+               end
+       end
+
+       # Add an article at current location.
+       #
+       # This closes the current article, inserts `article` then opens a new article.
+       private fun add_article(article: DocArticle) do
+               close_article
+               if current_section == null then
+                       page.root.add_child(article)
+               else
+                       current_section.add_child(article)
+               end
+               open_article
+       end
+
+       # Creates a new ReadmeArticle in `self.toc.page`.
+       #
+       # Called from `add_headline`.
+       private fun open_article do
+               var section: DocComposite = page.root
+               if current_section != null then section = current_section.as(not null)
+               var article = new ReadmeArticle("mdarticle-{section.children.length}", null, processor)
+               section.add_child(article)
+               context.add article
+               push_article article
+       end
+
+       # Close the current article.
+       #
+       # Ensure `context.last isa ReadmeArticle`.
+       fun close_article do
+               assert context.last isa ReadmeArticle
+               context.pop
+               pop_buffer
+       end
+end
+
+# MarkdownDecorator used to decorated the Readme file with links between doc entities.
+class ReadmeDecorator
+       super MdDecorator
+
+       redef type EMITTER: ReadmeMdEmitter
+
+       redef fun add_headline(v, block) do
+               var txt = block.block.first_line.value
+               var lvl = block.depth
+               if not v.context.is_empty then
+                       v.close_article
+                       while v.current_section != null do
+                               if v.current_section.depth < lvl then break
+                               v.close_section
+                       end
+               end
+               v.open_section(lvl, txt)
+               v.open_article
+       end
+
+       redef fun add_wikilink(v, token) do
+               var link = token.link.to_s
+               var cmd = new DocCommand(link)
+               if cmd isa UnknownCommand then
+                       # search MEntities by name
+                       var res = v.phase.doc.mentities_by_name(link.to_s)
+                       # no match, print warning and display wikilink as is
+                       if res.is_empty then
+                               v.phase.warning(token.location, v.page, "Link to unknown entity `{link}`")
+                               super
+                       else
+                               add_mentity_link(v, res.first, token.name, token.comment)
+                       end
+                       return
+               end
+               cmd.render(v, token)
+       end
+
+       # Renders a link to a mentity.
+       private fun add_mentity_link(v: EMITTER, mentity: MEntity, name, comment: nullable Text) do
+               # TODO real link
+               var link = mentity.full_name
+               if name == null then name = mentity.name
+               if comment == null and mentity.mdoc != null then
+                       comment = mentity.mdoc.synopsis
+               end
+               add_link(v, link, name, comment)
+       end
+end
+
+redef interface DocCommand
+
+       # Render the content of the doc command.
+       fun render(v: ReadmeMdEmitter, token: TokenWikiLink) is abstract
+
+       # Search `doc` model for mentities match `string`.
+       fun search_model(doc: DocModel, string: String): Array[MEntity] do
+               var res
+               if string.has("::") then
+                       res = doc.mentities_by_namespace(string).to_a
+               else
+                       res = doc.mentities_by_name(string).to_a
+               end
+               return res
+       end
+end
+
+redef class ArticleCommand
+       redef fun render(v, token) do
+               var string = args.first
+               var res = search_model(v.phase.doc, string)
+               res = filter_results(res)
+               if res.is_empty then
+                       v.phase.warning(
+                               token.location, v.page,
+                               "Try to include documentation of unknown entity `{args.first}`")
+                       return
+               end
+               if res.length > 1 then
+                       v.phase.warning(token.location, v.page, "conflicting article for `{args.first}` (choices : {res.join(", ")})")
+               end
+               v.add_article new DocumentationArticle("readme", "Readme", res.first)
+       end
+
+       private fun filter_results(res: Array[MEntity]): Array[MEntity] do
+               var out = new Array[MEntity]
+               for e in res do
+                       if e isa MProject then continue
+                       if e isa MGroup then continue
+                       out.add e
+               end
+               return out
+       end
+end
+
+redef class ListCommand
+       redef fun render(v, token) do
+               var string = args.first
+               var res = search_model(v.phase.doc, string)
+               if res.is_empty then
+                       v.phase.warning(token.location, v.page, "include article for unknown entity `{args.first}`")
+                       return
+               end
+               if res.length > 1 then
+                       v.phase.warning(token.location, v.page, "conflicting article for `{args.first}` (choices : {res.join(", ")})")
+               end
+               var mentity = res.first
+               if mentity isa MModule then
+                       v.add_article new MEntitiesListArticle("Classes", mentity.mclassdefs)
+               else if mentity isa MClass then
+                       var mprops = mentity.collect_intro_mproperties(public_visibility)
+                       v.add_article new MEntitiesListArticle("Methods", mprops.to_a)
+               else if mentity isa MClassDef then
+                       v.add_article new MEntitiesListArticle("Methods", mentity.mpropdefs)
+               end
+       end
+end
+
+
+# A section found in a README.
+#
+# Produced by markdown headlines like `## Section 1.1`.
+class ReadmeSection
+       super DocSection
+
+       # The depth is based on the markdown headline depth.
+       redef var depth
+
+       # Markdown processor used to process the section title.
+       var markdown_processor: MarkdownProcessor
+
+       redef var is_hidden = false
+end
+
+# An article found in a README file.
+#
+# Basically, everything found in a README that is not a headline.
+class ReadmeArticle
+       super DocArticle
+
+       # Markdown processor used to process the article content.
+       var markdown_processor: MarkdownProcessor
+
+       # Markdown content of this article extracted from the README file.
+       var md = new FlatBuffer
+
+       redef fun is_hidden do return super and md.trim.is_empty
+end
+
+# Documentation Article to introduce from the directive `doc: Something`.
+#
+# TODO merge with DefinitionArticle once the html is simplified
+class DocumentationArticle
+       super MEntityArticle
+
+       redef var is_hidden = false
+end
+
+redef class MDLocation
+       # Translate a Markdown location in Nit location.
+       private fun to_location(file: nullable SourceFile): Location do
+               return new Location(file, line_start, line_end, column_start, column_end)
+       end
+end
index b5ccd96..ed895ee 100644 (file)
@@ -44,7 +44,7 @@ redef class MEntity
                var tpl = new Link(nitdoc_url, html_name)
                var mdoc = mdoc_or_fallback
                if mdoc != null then
-                       tpl.title = mdoc.short_comment
+                       tpl.title = mdoc.synopsis
                end
                return tpl
        end
@@ -56,7 +56,7 @@ redef class MEntity
                var tpl = new Link("#{nitdoc_id}", html_name)
                var mdoc = mdoc_or_fallback
                if mdoc != null then
-                       tpl.title = mdoc.short_comment
+                       tpl.title = mdoc.synopsis
                end
                return tpl
        end
@@ -94,18 +94,25 @@ redef class MEntity
        # * MPropdef: `mclassdef:mpropdef`
        fun html_namespace: Template is abstract
 
-       # Returns the comment of this MEntity formatted as HTML.
-       var html_comment: nullable Writable is lazy do
+       # Returns the synopsis and the comment of this MEntity formatted as HTML.
+       var html_documentation: nullable Writable is lazy do
+               var mdoc = mdoc_or_fallback
+               if mdoc == null then return null
+               return mdoc.html_documentation
+       end
+
+       # Returns the synopsis of this MEntity formatted as HTML.
+       var html_synopsis: nullable Writable is lazy do
                var mdoc = mdoc_or_fallback
                if mdoc == null then return null
-               return mdoc.tpl_comment
+               return mdoc.html_synopsis
        end
 
-       # Returns the comment of this MEntity formatted as HTML.
-       var html_short_comment: nullable Writable is lazy do
+       # Returns the the comment without the synopsis formatted as HTML.
+       var html_comment: nullable Writable is lazy do
                var mdoc = mdoc_or_fallback
                if mdoc == null then return null
-               return mdoc.tpl_short_comment
+               return mdoc.html_comment
        end
 
        # Icon that will be displayed before the title
@@ -125,7 +132,7 @@ redef class MEntity
                var tpl = new Template
                tpl.add new DocHTMLLabel.with_classes(css_classes)
                tpl.add html_link
-               var comment = html_short_comment
+               var comment = html_synopsis
                if comment != null then
                        tpl.add ": "
                        tpl.add comment
@@ -688,7 +695,7 @@ redef class MConcern
                var lnk = html_link
                var tpl = new Template
                tpl.add new Link.with_title("#{nitdoc_id}.concern", lnk.text, lnk.title)
-               var comment = html_short_comment
+               var comment = html_synopsis
                if comment != null then
                        tpl.add ": "
                        tpl.add comment
index ecff87f..a497ad3 100644 (file)
@@ -22,6 +22,8 @@ import doc_phases::doc_hierarchies
 import doc_phases::doc_graphs
 import doc_phases::doc_intros_redefs
 import doc_phases::doc_lin
+import doc_phases::doc_readme
+intrude import doc_down
 
 # Renders the page as HTML.
 redef class DocPage
@@ -265,7 +267,6 @@ redef class DocComposite
                if html_title != null then
                var header = new Header(hlvl, html_title.write_to_string)
                header.css_classes.add "signature"
-               if hlvl == 2 then header.css_classes.add "well well-sm"
                addn header
                end
                if html_subtitle != null then
@@ -447,7 +448,10 @@ redef class IntroArticle
 
        redef fun render_body do
                var tabs = new DocTabs("{html_id}.tabs", "")
-               var comment = mentity.html_comment
+               var comment = mentity.html_documentation
+               if mentity isa MProject then
+                       comment = mentity.html_synopsis
+               end
                if comment != null then
                        tabs.add_panel new DocTabPanel("{html_tab_id}-comment", "Comment", comment)
                end
@@ -502,10 +506,10 @@ redef class DefinitionArticle
                var tabs = new DocTabs("{html_id}.tabs", "")
                if not is_no_body then
                        var comment
-                       if is_short_comment then
-                               comment = mentity.html_short_comment
+                       if is_short_comment or mentity isa MProject then
+                               comment = mentity.html_synopsis
                        else
-                               comment = mentity.html_comment
+                               comment = mentity.html_documentation
                        end
                        if comment != null then
                                tabs.add_panel new DocTabPanel("{html_tab_id}-comment", "Comment", comment)
@@ -543,7 +547,7 @@ redef class DefinitionLinArticle
                        if not mentity isa MPropDef then continue # TODO handle all mentities
                        var tpl = new Template
                        tpl.add mentity.mclassdef.html_namespace
-                       var comment = mentity.mclassdef.html_short_comment
+                       var comment = mentity.mclassdef.html_synopsis
                        if comment != null then
                                tpl.add ": "
                                tpl.add comment
@@ -559,16 +563,61 @@ end
 redef class GraphArticle
        redef var html_title = null
 
-       # HTML map used to display link.
+       # Graph in SVG with clickable map.
        #
        # This attribute is set by the `doc_render` phase who knows the context.
-       var map: String is noinit, writable
+       var svg: nullable String = null is writable
 
        redef fun render_body do
                addn "<div class=\"text-center\">"
-               addn " <img src='{graph_id}.png' usemap='#{graph_id}' style='margin:auto'"
-               addn "  alt='{title or else ""}'/>"
-               add map
+               var svg = self.svg
+               if svg != null then add svg
                addn "</div>"
        end
 end
+
+redef class ReadmeSection
+       redef var html_id is lazy do
+               return markdown_processor.emitter.decorator.strip_id(html_title.as(not null).to_s)
+       end
+
+       redef var html_title is lazy do
+               return markdown_processor.process(title.as(not null))
+       end
+end
+
+redef class ReadmeArticle
+       redef var html_id = ""
+       redef var html_title = null
+       redef var is_toc_hidden = true
+
+       redef fun render_body do
+               add markdown_processor.process(md.trim.write_to_string)
+       end
+end
+
+redef class DocumentationArticle
+       redef var html_title is lazy do
+               var synopsis = mentity.html_synopsis
+               if synopsis == null then return mentity.html_link
+               return "{mentity.html_link.write_to_string} &ndash; {synopsis.write_to_string}"
+       end
+
+       redef var html_subtitle is lazy do return null
+       redef var html_toc_title is lazy do return mentity.html_name
+       redef var is_toc_hidden is lazy do return depth > 3
+
+       redef fun render_body do
+               var tabs = new DocTabs("{html_id}.tabs", "")
+               var comment = mentity.html_comment
+               if comment != null then
+                       tabs.add_panel new DocTabPanel("{html_tab_id}-comment", "Comment", comment)
+               end
+               for child in children do
+                       if child.is_hidden then continue
+                       var title = child.html_toc_title or else child.toc_title or else ""
+                       tabs.add_panel new DocTabPanel(child.html_tab_id, title, child)
+               end
+               addn tabs
+       end
+end
index 7a5dec0..b96c600 100644 (file)
@@ -180,8 +180,8 @@ class ExternCppFile
 
        var mmodule: MModule
 
-       redef fun makefile_rule_name do return "{filename.basename("")}.o"
-       redef fun makefile_rule_content do return "$(CXX) $(CFLAGS) {mmodule.cppflags[""].join(" ")} -c {filename.basename("")} -o {filename.basename("")}.o"
+       redef fun makefile_rule_name do return "{filename.basename}.o"
+       redef fun makefile_rule_content do return "$(CXX) $(CFLAGS) {mmodule.cppflags[""].join(" ")} -c {filename.basename} -o {filename.basename}.o"
        redef fun compiles_to_o_file do return true
 end
 
index 71485cc..0e093a0 100644 (file)
@@ -97,7 +97,7 @@ redef class JavaLanguage
                var extra_java_files = mmodule.extra_java_files
                if extra_java_files != null then for file in extra_java_files do
                        var path = file.filename
-                       path.file_copy_to("{compdir}/{path.basename("")}")
+                       path.file_copy_to("{compdir}/{path.basename}")
                end
        end
 end
index c26fea2..dd32712 100644 (file)
@@ -362,7 +362,7 @@ class JavaFile
        super ExternFile
 
        redef fun makefile_rule_name do return "{filename.basename(".java")}.class"
-       redef fun makefile_rule_content do return "javac {filename.basename("")} -d ."
+       redef fun makefile_rule_content do return "javac {filename.basename} -d ."
        redef fun add_to_jar do return true
 end
 
@@ -457,7 +457,7 @@ redef class MType
        # JNI type name (in C)
        #
        # So this is a C type, usually defined in `jni.h`
-       private fun jni_type: String do return "jint"
+       private fun jni_type: String do return "long"
 
        # JNI short type name (for signatures)
        #
@@ -606,7 +606,7 @@ redef class MMethod
                        else format.add "V"
                end
 
-               return format.join("")
+               return format.join
        end
 
        # Similar to `build_c_signature` but adapted to create the signature expected by JNI for C functions
index 4aafb91..7c293cf 100644 (file)
@@ -169,7 +169,7 @@ class ExternObjCFile
 
        redef fun makefile_rule_name do return "{filename.basename(".m")}_m.o"
        redef fun makefile_rule_content do
-               return "clang $(CFLAGS) -c {filename.basename("")} -o {makefile_rule_name}"
+               return "clang $(CFLAGS) -c {filename.basename} -o {makefile_rule_name}"
        end
        redef fun compiles_to_o_file do return true
 end
index eb05a14..d640ac2 100644 (file)
@@ -76,6 +76,8 @@ private class CheckAnnotationPhase
        var primtives_annotations_list = """
 new_annotation
 
+conditional
+
 deprecated
 fixed
 lazy
index b7426e1..16802c0 100644 (file)
@@ -68,7 +68,7 @@ private class DivByZeroVisitor
 
                # 2. The second operand must be an integer literal
                var op2 = node.n_expr2
-               if not op2 isa AIntExpr then return
+               if not op2 isa AIntegerExpr then return
 
                # 3. Its value must be 0
                # Note: because of `literal_phase` the `value` method exists
index 87b7433..3a70e66 100644 (file)
@@ -116,33 +116,17 @@ private class SerializationPhasePreModel
        do
                if not nclassdef isa AStdClassdef then return
 
-               # Is there a declaration on the classdef or the module?
-               var serialize = nclassdef.is_serialize
-
-               if not serialize and not nclassdef.is_noserialize then
-                       # Is the module marked serialize?
-                       serialize = nclassdef.parent.as(AModule).is_serialize
-               end
+               var serialize_by_default = nclassdef.how_serialize
 
-               var per_attribute = false
-               if not serialize then
-                       # Is there an attribute marked serialize?
-                       for npropdef in nclassdef.n_propdefs do
-                               if npropdef.is_serialize then
-                                       serialize = true
-                                       per_attribute = true
-                                       break
-                               end
-                       end
-               end
+               if serialize_by_default != null then
 
-               if serialize then
                        # Add `super Serializable`
                        var sc = toolcontext.parse_superclass("Serializable")
                        sc.location = nclassdef.location
                        nclassdef.n_propdefs.add sc
 
                        # Add services
+                       var per_attribute = not serialize_by_default
                        generate_serialization_method(nclassdef, per_attribute)
                        generate_deserialization_init(nclassdef, per_attribute)
                end
@@ -156,7 +140,7 @@ private class SerializationPhasePreModel
                # collect all classes
                var auto_serializable_nclassdefs = new Array[AStdClassdef]
                for nclassdef in nmodule.n_classdefs do
-                       if nclassdef isa AStdClassdef and nclassdef.is_serialize then
+                       if nclassdef isa AStdClassdef and nclassdef.how_serialize != null then
                                auto_serializable_nclassdefs.add nclassdef
                        end
                end
@@ -269,7 +253,7 @@ do
                for nclassdef in nclassdefs do
                        var name = nclassdef.n_id.text
                        if nclassdef.n_formaldefs.is_empty and
-                               not nclassdef.n_classkind isa AAbstractClasskind then
+                          nclassdef.n_classkind isa AConcreteClasskind then
 
                                code.add "              if name == \"{name}\" then return new {name}.from_deserializer(self)"
                        end
@@ -380,4 +364,34 @@ redef class AStdClassdef
 
                return null
        end
+
+       # Is this classed marked `serialize`? in part or fully?
+       #
+       # This method returns 3 possible values:
+       # * `null`, this class is not to be serialized.
+       # * `true`, the attributes of this class are to be serialized by default.
+       # * `false`, the attributes of this class are to be serialized on demand only.
+       fun how_serialize: nullable Bool
+       do
+               # Is there a declaration on the classdef or the module?
+               var serialize = is_serialize
+
+               if not serialize and not is_noserialize then
+                       # Is the module marked serialize?
+                       serialize = parent.as(AModule).is_serialize
+               end
+
+               if serialize then return true
+
+               if not serialize then
+                       # Is there an attribute marked serialize?
+                       for npropdef in n_propdefs do
+                               if npropdef.is_serialize then
+                                       return false
+                               end
+                       end
+               end
+
+               return null
+       end
 end
index 3e4f4af..3f1bf0d 100644 (file)
@@ -119,8 +119,8 @@ private extern class CallArg `{ nit_call_arg* `}
                        assert value isa PrimitiveInstance[Float]
                        self.float = value.val
                else if static_type.name == "NativeString" then
-                       assert value isa PrimitiveInstance[Buffer]
-                       self.pointer = value.val.to_cstring
+                       assert value isa PrimitiveInstance[NativeString]
+                       self.pointer = value.val
                else if static_type isa MClassType and static_type.mclass.kind == extern_kind then
                        assert value isa PrimitiveInstance[Pointer] else print value.class_name
                        self.pointer = value.val
@@ -148,7 +148,9 @@ private extern class CallArg `{ nit_call_arg* `}
                else if name == "Float" then
                        return v.float_instance(self.float)
                else if name == "NativeString" then
-                       return v.native_string_instance(self.native_string.to_s)
+                       var instance = new PrimitiveInstance[NativeString](static_type, self.native_string)
+                       v.init_instance_primitive instance
+                       return instance
                else if static_type isa MClassType and static_type.mclass.kind == extern_kind then
                        # We tag it with the most precise known type
                        var instance = new PrimitiveInstance[Pointer](static_type, self.pointer)
index f9c8fb5..5953647 100644 (file)
@@ -75,7 +75,7 @@ redef class AModule
                var compile_dir = v.compile_dir
                var foreign_code_lib_path = v.foreign_code_lib_path(mmodule)
 
-               compile_dir.mkdir
+               if not compile_dir.file_exists then compile_dir.mkdir
 
                # Compile the common FFI part
                ensure_compile_ffi_wrapper
index e36de7a..a484659 100644 (file)
@@ -275,10 +275,21 @@ class NaiveInterpreter
        # Return a new native string initialized with `txt`
        fun native_string_instance(txt: String): Instance
        do
-               var val = new FlatBuffer.from(txt)
-               val.add('\0')
+               var instance = native_string_instance_len(txt.bytelen+1)
+               var val = instance.val
+               val[txt.bytelen] = 0u8
+               txt.to_cstring.copy_to(val, txt.bytelen, 0, 0)
+
+               return instance
+       end
+
+       # Return a new native string initialized of `length`
+       fun native_string_instance_len(length: Int): PrimitiveInstance[NativeString]
+       do
+               var val = new NativeString(length)
+
                var t = mainmodule.native_string_type
-               var instance = new PrimitiveInstance[Buffer](t, val)
+               var instance = new PrimitiveInstance[NativeString](t, val)
                init_instance_primitive(instance)
                return instance
        end
@@ -287,7 +298,7 @@ class NaiveInterpreter
        fun string_instance(txt: String): Instance
        do
                var nat = native_string_instance(txt)
-               var res = self.send(self.force_get_primitive_method("to_s_with_length", nat.mtype), [nat, self.int_instance(txt.length)])
+               var res = self.send(self.force_get_primitive_method("to_s_with_length", nat.mtype), [nat, self.int_instance(txt.bytelen)])
                assert res != null
                return res
        end
@@ -907,17 +918,6 @@ redef class AMethPropdef
                                return v.int_instance(args[0].to_i.bin_xor(args[1].to_i))
                        else if pname == "bin_not" then
                                return v.int_instance(args[0].to_i.bin_not)
-                       else if pname == "int_to_s_len" then
-                               return v.int_instance(recvval.to_s.length)
-                       else if pname == "native_int_to_s" then
-                               var s = recvval.to_s
-                               var srecv = args[1].val.as(Buffer)
-                               srecv.clear
-                               srecv.append(s)
-                               srecv.add('\0')
-                               return null
-                       else if pname == "strerror_ext" then
-                               return v.native_string_instance(recvval.strerror)
                        end
                else if cname == "Byte" then
                        var recvval = args[0].to_b
@@ -955,13 +955,6 @@ redef class AMethPropdef
                                return v.byte_instance(args[0].to_b.rshift(args[1].to_i))
                        else if pname == "byte_to_s_len" then
                                return v.int_instance(recvval.to_s.length)
-                       else if pname == "native_byte_to_s" then
-                               var s = recvval.to_s
-                               var srecv = args[1].val.as(Buffer)
-                               srecv.clear
-                               srecv.append(s)
-                               srecv.add('\0')
-                               return null
                        end
                else if cname == "Char" then
                        var recv = args[0].val.as(Char)
@@ -1043,76 +1036,32 @@ redef class AMethPropdef
                        end
                else if cname == "NativeString" then
                        if pname == "new" then
-                               return v.native_string_instance("!" * args[1].to_i)
+                               return v.native_string_instance_len(args[1].to_i)
                        end
-                       var recvval = args.first.val.as(Buffer)
+                       var recvval = args.first.val.as(NativeString)
                        if pname == "[]" then
                                var arg1 = args[1].to_i
-                               if arg1 >= recvval.length or arg1 < 0 then
-                                       debug("Illegal access on {recvval} for element {arg1}/{recvval.length}")
-                               end
-                               return v.char_instance(recvval.chars[arg1])
+                               return v.byte_instance(recvval[arg1])
                        else if pname == "[]=" then
                                var arg1 = args[1].to_i
-                               if arg1 >= recvval.length or arg1 < 0 then
-                                       debug("Illegal access on {recvval} for element {arg1}/{recvval.length}")
-                               end
-                               recvval.chars[arg1] = args[2].val.as(Char)
+                               recvval[arg1] = args[2].val.as(Byte)
                                return null
                        else if pname == "copy_to" then
                                # sig= copy_to(dest: NativeString, length: Int, from: Int, to: Int)
-                               var destval = args[1].val.as(FlatBuffer)
+                               var destval = args[1].val.as(NativeString)
                                var lenval = args[2].to_i
                                var fromval = args[3].to_i
                                var toval = args[4].to_i
-                               if fromval < 0 then
-                                       debug("Illegal access on {recvval} for element {fromval}/{recvval.length}")
-                               end
-                               if fromval + lenval > recvval.length then
-                                       debug("Illegal access on {recvval} for element {fromval}+{lenval}/{recvval.length}")
-                               end
-                               if toval < 0 then
-                                       debug("Illegal access on {destval} for element {toval}/{destval.length}")
-                               end
-                               if toval + lenval > destval.length then
-                                       debug("Illegal access on {destval} for element {toval}+{lenval}/{destval.length}")
-                               end
-                               recvval.as(FlatBuffer).copy(fromval, lenval, destval, toval)
+                               recvval.copy_to(destval, lenval, fromval, toval)
                                return null
                        else if pname == "atoi" then
-                               return v.int_instance(recvval.to_i)
-                       else if pname == "file_exists" then
-                               return v.bool_instance(recvval.to_s.file_exists)
-                       else if pname == "file_mkdir" then
-                               var res = recvval.to_s.mkdir
-                               return v.bool_instance(res == null)
-                       else if pname == "file_chdir" then
-                               var res = recvval.to_s.chdir
-                               return v.bool_instance(res == null)
-                       else if pname == "file_realpath" then
-                               return v.native_string_instance(recvval.to_s.realpath)
-                       else if pname == "get_environ" then
-                               var txt = recvval.to_s.environ
-                               return v.native_string_instance(txt)
-                       else if pname == "system" then
-                               var res = sys.system(recvval.to_s)
-                               return v.int_instance(res)
-                       else if pname == "atof" then
-                               return v.float_instance(recvval.to_f)
+                               return v.int_instance(recvval.atoi)
                        else if pname == "fast_cstring" then
-                               var ns = recvval.to_cstring.to_s.substring_from(args[1].to_i)
+                               var ns = recvval.to_s.substring_from(args[1].to_i)
                                return v.native_string_instance(ns)
                        end
-               else if cname == "String" then
-                       var cs = v.send(v.force_get_primitive_method("to_cstring", args.first.mtype), [args.first])
-                       var str = cs.val.to_s
-                       if pname == "files" then
-                               var res = new Array[Instance]
-                               for f in str.files do res.add v.string_instance(f)
-                               return v.array_instance(res, v.mainmodule.string_type)
-                       end
                else if pname == "calloc_string" then
-                       return v.native_string_instance("!" * args[1].to_i)
+                       return v.native_string_instance_len(args[1].to_i)
                else if cname == "NativeArray" then
                        if pname == "new" then
                                var val = new Array[Instance].filled_with(v.null_instance, args[1].to_i)
@@ -1122,9 +1071,6 @@ redef class AMethPropdef
                        end
                        var recvval = args.first.val.as(Array[Instance])
                        if pname == "[]" then
-                               if args[1].to_i >= recvval.length or args[1].to_i < 0 then
-                                       debug("Illegal access on {recvval} for element {args[1].to_i}/{recvval.length}")
-                               end
                                return recvval[args[1].to_i]
                        else if pname == "[]=" then
                                recvval[args[1].to_i] = args[2]
@@ -1135,54 +1081,6 @@ redef class AMethPropdef
                                recvval.copy_to(0, args[2].to_i, args[1].val.as(Array[Instance]), 0)
                                return null
                        end
-               else if cname == "NativeFile" then
-                       if pname == "native_stdout" then
-                               var inst = new PrimitiveNativeFile.native_stdout
-                               var instance = new PrimitiveInstance[PrimitiveNativeFile](mpropdef.mclassdef.mclass.mclass_type, inst)
-                               v.init_instance_primitive(instance)
-                               return instance
-                       else if pname == "native_stdin" then
-                               var inst = new PrimitiveNativeFile.native_stdin
-                               var instance = new PrimitiveInstance[PrimitiveNativeFile](mpropdef.mclassdef.mclass.mclass_type, inst)
-                               v.init_instance_primitive(instance)
-                               return instance
-                       else if pname == "native_stderr" then
-                               var inst = new PrimitiveNativeFile.native_stderr
-                               var instance = new PrimitiveInstance[PrimitiveNativeFile](mpropdef.mclassdef.mclass.mclass_type, inst)
-                               v.init_instance_primitive(instance)
-                               return instance
-                       else if pname == "io_open_read" then
-                               var a1 = args[1].val.as(Buffer)
-                               var inst = new PrimitiveNativeFile.io_open_read(a1.to_s)
-                               var instance = new PrimitiveInstance[PrimitiveNativeFile](mpropdef.mclassdef.mclass.mclass_type, inst)
-                               v.init_instance_primitive(instance)
-                               return instance
-                       else if pname == "io_open_write" then
-                               var a1 = args[1].val.as(Buffer)
-                               var inst = new PrimitiveNativeFile.io_open_write(a1.to_s)
-                               var instance = new PrimitiveInstance[PrimitiveNativeFile](mpropdef.mclassdef.mclass.mclass_type, inst)
-                               v.init_instance_primitive(instance)
-                               return instance
-                       end
-                       var recvval = args.first.val
-                       if pname == "io_write" then
-                               var a1 = args[1].val.as(Buffer)
-                               return v.int_instance(recvval.as(PrimitiveNativeFile).io_write(a1.to_cstring, args[2].to_i))
-                       else if pname == "io_read" then
-                               var a1 = args[1].val.as(Buffer)
-                               var ns = new NativeString(a1.length)
-                               var len = recvval.as(PrimitiveNativeFile).io_read(ns, args[2].to_i)
-                               a1.clear
-                               a1.append(ns.to_s_with_length(len))
-                               return v.int_instance(len)
-                       else if pname == "flush" then
-                               recvval.as(PrimitiveNativeFile).flush
-                               return null
-                       else if pname == "io_close" then
-                               return v.int_instance(recvval.as(PrimitiveNativeFile).io_close)
-                       else if pname == "set_buffering_type" then
-                               return v.int_instance(recvval.as(PrimitiveNativeFile).set_buffering_type(args[1].to_i, args[2].to_i))
-                       end
                else if pname == "native_argc" then
                        return v.int_instance(v.arguments.length)
                else if pname == "native_argv" then
@@ -1193,18 +1091,6 @@ redef class AMethPropdef
                else if pname == "native_argv" then
                        var txt = v.arguments[args[1].to_i]
                        return v.native_string_instance(txt)
-               else if pname == "get_time" then
-                       return v.int_instance(get_time)
-               else if pname == "srand" then
-                       srand
-                       return null
-               else if pname == "srand_from" then
-                       srand_from(args[1].to_i)
-                       return null
-               else if pname == "atan2" then
-                       return v.float_instance(atan2(args[1].to_f, args[2].to_f))
-               else if pname == "pi" then
-                       return v.float_instance(pi)
                else if pname == "lexer_goto" then
                        return v.int_instance(lexer_goto(args[1].to_i, args[2].to_i))
                else if pname == "lexer_accept" then
@@ -1213,16 +1099,6 @@ redef class AMethPropdef
                        return v.int_instance(parser_goto(args[1].to_i, args[2].to_i))
                else if pname == "parser_action" then
                        return v.int_instance(parser_action(args[1].to_i, args[2].to_i))
-               else if pname == "file_getcwd" then
-                       return v.native_string_instance(getcwd)
-               else if pname == "errno" then
-                       return v.int_instance(sys.errno)
-               else if pname == "address_is_null" then
-                       var recv = args[0]
-                       if recv isa PrimitiveInstance[PrimitiveNativeFile] then
-                               return v.bool_instance(recv.val.address_is_null)
-                       end
-                       return v.false_instance
                end
                return v.error_instance
        end
@@ -1639,17 +1515,12 @@ redef class AOrElseExpr
        end
 end
 
-redef class AIntExpr
-       redef fun expr(v)
-       do
-               return v.int_instance(self.value.as(not null))
-       end
-end
-
-redef class AByteExpr
+redef class AIntegerExpr
        redef fun expr(v)
        do
-               return v.byte_instance(self.value.as(not null))
+               if value isa Int then return v.int_instance(value.as(Int))
+               if value isa Byte then return v.byte_instance(value.as(Byte))
+               return null
        end
 end
 
index 8f12c78..a82e953 100644 (file)
@@ -23,23 +23,23 @@ class PrimitiveNativeFile
        var file: Stream
 
        init native_stdin do
-               file = sys.stdin
+               init(sys.stdin)
        end
 
        init native_stdout do
-               file = sys.stdout
+               init(sys.stdout)
        end
 
        init native_stderr do
-               file = sys.stderr
+               init(sys.stderr)
        end
 
        init io_open_read(path: String) do
-               file = new FileReader.open(path.to_s)
+               init(new FileReader.open(path.to_s))
        end
 
        init io_open_write(path: String) do
-               file = new FileWriter.open(path.to_s)
+               init(new FileWriter.open(path.to_s))
        end
 
        fun address_is_null: Bool do
@@ -54,9 +54,9 @@ class PrimitiveNativeFile
                return str.length
        end
 
-       fun io_write(buf: NativeString, len: Int): Int do
-               if file isa FileStream then return file.as(FileStream)._file.io_write(buf, len)
-               file.as(Writer).write(buf.to_s_with_length(len))
+       fun io_write(buf: NativeString, from, len: Int): Int do
+               if file isa FileStream then return file.as(FileStream)._file.io_write(buf, from, len)
+               file.as(Writer).write(buf.to_s_with_length(len).substring_from(from))
                return len
        end
 
index f9b8b5f..b183301 100644 (file)
@@ -69,132 +69,20 @@ redef class AExpr
        # Return null if not an integer.
        fun as_int: nullable Int
        do
-               if not self isa AIntExpr then return null
-               return self.value.as(not null)
-       end
-
-       # Get `self` as a single identifier.
-       # Return null if not a single identifier.
-       fun as_id: nullable String
-       do
-               if self isa AMethidExpr then
-                       return self.collect_text
-               end
-               if not self isa ACallExpr then return null
-               if not self.n_expr isa AImplicitSelfExpr then return null
-               if not self.n_args.n_exprs.is_empty then return null
-               return self.n_id.text
-       end
-end
-
-redef class Text
-       private fun remove_underscores: Text do
-               var b = new FlatBuffer
-               for i in chars do
-                       if i == '_' then continue
-                       b.add i
-               end
-               return b
+               if not self isa AIntegerExpr then return null
+               return self.value.as(not null).to_i
        end
 end
 
-redef class AIntExpr
+redef class AIntegerExpr
        # The value of the literal int once computed.
-       var value: nullable Int
-end
-
-redef class ADecIntExpr
-       redef fun accept_literal(v)
-       do
-               value = self.n_number.text.to_i
-       end
-end
+       var value: nullable Numeric
 
-redef class AHexIntExpr
-       redef fun accept_literal(v)
-       do
-               var s = self.n_hex_number.text.substring_from(2).remove_underscores
-               if s.is_empty then
-                       v.toolcontext.error(location, "Error: invalid hexadecimal literal")
-                       return
-               end
-               value = s.to_hex
-       end
-end
-
-redef class ABinIntExpr
-       redef fun accept_literal(v)
-       do
-               var s = self.n_bin_number.text.substring_from(2).remove_underscores
-               if s.is_empty then
-                       v.toolcontext.error(location, "Error: invalid binary literal")
-                       return
-               end
-               value = s.to_bin
-       end
-end
-
-redef class AOctIntExpr
-       redef fun accept_literal(v)
-       do
-               var s = self.n_oct_number.text.substring_from(2).remove_underscores
-               if s.is_empty then
-                       v.toolcontext.error(location, "Error: invalid octal literal")
-                       return
-               end
-               value = s.to_oct
-       end
-end
-
-redef class AByteExpr
-       # The value of the literal int once computed.
-       var value: nullable Byte
-end
-
-redef class ADecByteExpr
-       redef fun accept_literal(v)
-       do
-               var t = self.n_bytenum.text
-               value = t.substring(0, t.length - 2).to_i.to_b
-       end
-end
-
-redef class AHexByteExpr
-       redef fun accept_literal(v)
-       do
-               var t = self.n_hex_bytenum.text
-               var s = t.substring(2, t.length - 4).remove_underscores
-               if s.is_empty then
-                       v.toolcontext.error(location, "Error: invalid hexadecimal literal")
-                       return
-               end
-               value = s.to_hex.to_b
-       end
-end
-
-redef class ABinByteExpr
-       redef fun accept_literal(v)
-       do
-               var t = self.n_bin_bytenum.text
-               var s = t.substring(2, t.length - 4).remove_underscores
-               if s.is_empty then
-                       v.toolcontext.error(location, "Error: invalid binary literal")
-                       return
-               end
-               value = s.to_bin.to_b
-       end
-end
-
-redef class AOctByteExpr
-       redef fun accept_literal(v)
-       do
-               var t = self.n_oct_bytenum.text
-               var s = t.substring(2, t.length - 4).remove_underscores
-               if s.is_empty then
-                       v.toolcontext.error(location, "Error: invalid octal literal")
-                       return
+       redef fun accept_literal(v) do
+               value = n_integer.text.to_num
+               if value == null then
+                       v.toolcontext.error(hot_location, "Error: invalid literal `{n_integer.text}`")
                end
-               value = s.to_oct.to_b
        end
 end
 
index d78ac71..4e0e2e8 100644 (file)
@@ -272,6 +272,14 @@ redef class ModelBuilder
        do
                var path = search_mmodule_by_name(anode, mgroup, name)
                if path == null then return null # Forward error
+               return load_module_path(path)
+       end
+
+       # Load and process importation of a given ModulePath.
+       #
+       # Basically chains `load_module` and `build_module_importation`.
+       fun load_module_path(path: ModulePath): nullable MModule
+       do
                var res = self.load_module(path.filepath)
                if res == null then return null # Forward error
                # Load imported module
@@ -345,7 +353,7 @@ redef class ModelBuilder
                # special case for not a nit file
                if path.file_extension != "nit" then
                        # search dirless files in known -I paths
-                       if path.dirname == "" then
+                       if path.dirname == "." then
                                var res = search_module_in_paths(null, path, self.paths)
                                if res != null then return res
                        end
@@ -431,7 +439,7 @@ redef class ModelBuilder
                        if pn == "src" then
                                # With a src directory, the group name is the name of the parent directory
                                dirpath2 = rdp.dirname
-                               pn = dirpath2.basename("")
+                               pn = dirpath2.basename
                        else
                                # Check a `src` subdirectory
                                dirpath = dirpath2 / "src"
@@ -479,11 +487,21 @@ redef class ModelBuilder
        # Load a markdown file as a documentation object
        fun load_markdown(filepath: String): MDoc
        do
-               var mdoc = new MDoc(new Location(new SourceFile.from_string(filepath, ""),0,0,0,0))
                var s = new FileReader.open(filepath)
+               var lines = new Array[String]
+               var line_starts = new Array[Int]
+               var len = 1
                while not s.eof do
-                       mdoc.content.add(s.read_line)
-               end
+                       var line = s.read_line
+                       lines.add(line)
+                       line_starts.add(len)
+                       len += line.length + 1
+               end
+               s.close
+               var source = new SourceFile.from_string(filepath, lines.join("\n"))
+               source.line_starts.add_all line_starts
+               var mdoc = new MDoc(new Location(source, 1, lines.length, 0, 0))
+               mdoc.content.add_all(lines)
                return mdoc
        end
 
@@ -676,6 +694,21 @@ redef class ModelBuilder
                return mmodule
        end
 
+       # Resolve the module identification for a given `AModuleName`.
+       #
+       # This method handles qualified names as used in `AModuleName`.
+       fun seach_module_by_amodule_name(n_name: AModuleName, mgroup: nullable MGroup): nullable ModulePath
+       do
+               if n_name.n_quad != null then mgroup = null # Start from top level
+               for grp in n_name.n_path do
+                       var path = search_mmodule_by_name(grp, mgroup, grp.text)
+                       if path == null then return null # Forward error
+                       mgroup = path.mgroup
+               end
+               var mod_name = n_name.n_id.text
+               return search_mmodule_by_name(n_name, mgroup, mod_name)
+       end
+
        # Analyze the module importation and fill the module_importation_hierarchy
        #
        # Unless you used `load_module`, the importation is already done and this method does a no-op.
@@ -687,26 +720,27 @@ redef class ModelBuilder
                var stdimport = true
                var imported_modules = new Array[MModule]
                for aimport in nmodule.n_imports do
+                       # Do not imports conditional
+                       var atconditionals = aimport.get_annotations("conditional")
+                       if atconditionals.not_empty then continue
+
                        stdimport = false
                        if not aimport isa AStdImport then
                                continue
                        end
-                       var mgroup = mmodule.mgroup
-                       if aimport.n_name.n_quad != null then mgroup = null # Start from top level
-                       for grp in aimport.n_name.n_path do
-                               var path = search_mmodule_by_name(grp, mgroup, grp.text)
-                               if path == null then
-                                       nmodule.mmodule = null # invalidate the module
-                                       return # Skip error
-                               end
-                               mgroup = path.mgroup
+
+                       # Load the imported module
+                       var suppath = seach_module_by_amodule_name(aimport.n_name, mmodule.mgroup)
+                       if suppath == null then
+                               nmodule.mmodule = null # invalidate the module
+                               continue # Skip error
                        end
-                       var mod_name = aimport.n_name.n_id.text
-                       var sup = self.get_mmodule_by_name(aimport.n_name, mgroup, mod_name)
+                       var sup = load_module_path(suppath)
                        if sup == null then
                                nmodule.mmodule = null # invalidate the module
                                continue # Skip error
                        end
+
                        aimport.mmodule = sup
                        imported_modules.add(sup)
                        var mvisibility = aimport.n_visibility.mvisibility
@@ -736,9 +770,56 @@ redef class ModelBuilder
                                mmodule.set_visibility_for(sup, public_visibility)
                        end
                end
-               self.toolcontext.info("{mmodule} imports {imported_modules.join(", ")}", 3)
+
+               # Declare conditional importation
+               for aimport in nmodule.n_imports do
+                       if not aimport isa AStdImport then continue
+                       var atconditionals = aimport.get_annotations("conditional")
+                       if atconditionals.is_empty then continue
+
+                       var suppath = seach_module_by_amodule_name(aimport.n_name, mmodule.mgroup)
+                       if suppath == null then continue # skip error
+
+                       for atconditional in atconditionals do
+                               var nargs = atconditional.n_args
+                               if nargs.is_empty then
+                                       error(atconditional, "Syntax Error: `conditional` expects module identifiers as arguments.")
+                                       continue
+                               end
+
+                               # The rule
+                               var rule = new Array[Object]
+
+                               # First element is the goal, thus
+                               rule.add suppath
+
+                               # Second element is the first condition, that is to be a client of the current module
+                               rule.add mmodule
+
+                               # Other condition are to be also a client of each modules indicated as arguments of the annotation
+                               for narg in nargs do
+                                       var id = narg.as_id
+                                       if id == null then
+                                               error(narg, "Syntax Error: `conditional` expects module identifier as arguments.")
+                                               continue
+                                       end
+
+                                       var mp = search_mmodule_by_name(narg, mmodule.mgroup, id)
+                                       if mp == null then continue
+
+                                       rule.add mp
+                               end
+
+                               conditional_importations.add rule
+                       end
+               end
+
                mmodule.set_imported_mmodules(imported_modules)
 
+               apply_conditional_importations(mmodule)
+
+               self.toolcontext.info("{mmodule} imports {mmodule.in_importation.direct_greaters.join(", ")}", 3)
+
                # Force standard to be public if imported
                for sup in mmodule.in_importation.greaters do
                        if sup.name == "standard" then
@@ -759,6 +840,72 @@ redef class ModelBuilder
                end
        end
 
+       # Global list of conditional importation rules.
+       #
+       # Each rule is a "Horn clause"-like sequence of modules.
+       # It means that the first module is the module to automatically import.
+       # The remaining modules are the conditions of the rule.
+       #
+       # Each module is either represented by a MModule (if the module is already loaded)
+       # or by a ModulePath (if the module is not yet loaded).
+       #
+       # Rules are declared by `build_module_importation` and are applied by `apply_conditional_importations`
+       # (and `build_module_importation` that calls it).
+       #
+       # TODO (when the loader will be rewritten): use a better representation and move up rules in the model.
+       private var conditional_importations = new Array[SequenceRead[Object]]
+
+       # Extends the current importations according to imported rules about conditional importation
+       fun apply_conditional_importations(mmodule: MModule)
+       do
+               # Because a conditional importation may cause additional conditional importation, use a fixed point
+               # The rules are checked naively because we assume that it does not worth to be optimized
+               var check_conditional_importations = true
+               while check_conditional_importations do
+                       check_conditional_importations = false
+
+                       for ci in conditional_importations do
+                               # Check conditions
+                               for i in [1..ci.length[ do
+                                       var rule_element = ci[i]
+                                       # An element of a rule is either a MModule or a ModulePath
+                                       # We need the mmodule to resonate on the importation
+                                       var m
+                                       if rule_element isa MModule then
+                                               m = rule_element
+                                       else if rule_element isa ModulePath then
+                                               m = rule_element.mmodule
+                                               # Is loaded?
+                                               if m == null then continue label
+                                       else
+                                               abort
+                                       end
+                                       # Is imported?
+                                       if not mmodule.in_importation.greaters.has(m) then continue label
+                               end
+                               # Still here? It means that all conditions modules are loaded and imported
+
+                               # Identify the module to automatically import
+                               var suppath = ci.first.as(ModulePath)
+                               var sup = load_module_path(suppath)
+                               if sup == null then continue
+
+                               # Do nothing if already imported
+                               if mmodule.in_importation.greaters.has(sup) then continue label
+
+                               # Import it
+                               self.toolcontext.info("{mmodule} conditionally imports {sup}", 3)
+                               # TODO visibility rules (currently always public)
+                               mmodule.set_visibility_for(sup, public_visibility)
+                               # TODO linearization rules (currently added at the end in the order of the rules)
+                               mmodule.set_imported_mmodules([sup])
+
+                               # Prepare to reapply the rules
+                               check_conditional_importations = true
+                       end label
+               end
+       end
+
        # All the loaded modules
        var nmodules = new Array[AModule]
 
index 1a27697..786ffc2 100644 (file)
@@ -35,14 +35,17 @@ class SourceFile
        end
 
        # Create a new sourcefile using a dummy filename and a given content
-       init from_string(filename: String, string: String)
+       init from_string(filename: String, string: String) is
+               nosuper
        do
                self.filename = filename
                self.string = string
                line_starts[0] = 0
        end
 
-       # Position of each line start
+       # Offset of each line start in the content `string`.
+       #
+       # Used for fast access to each line when rendering parts of the `string`.
        var line_starts = new Array[Int]
 end
 
@@ -97,7 +100,9 @@ class Location
        # loc = new Location.from_string("location.nit:82--105,8")
        # assert loc.to_s == "location.nit:82,0--105,8"
        # ~~~
-       init from_string(string: String) do
+       init from_string(string: String) is
+               nosuper
+       do
                self.line_start = 0
                self.line_end = 0
                self.column_start = 0
index ef548a8..659660b 100644 (file)
@@ -171,11 +171,9 @@ class MModule
        end
 
        # Register the imported modules (ie "import some_module")
-       # This function can only invoked once by mmodule.
        # The visibility must be set with `set_visibility_for`.
        fun set_imported_mmodules(imported_mmodules: Array[MModule])
        do
-               assert unique_invocation: self.in_importation.direct_greaters.is_empty
                for m in imported_mmodules do
                        self.model.mmodule_importation_hierarchy.add_edge(self, m)
                end
index 27d6710..eaccbb0 100644 (file)
@@ -45,6 +45,8 @@ redef class ToolContext
                        mainmodule = new MModule(modelbuilder.model, null, mmodules.first.name + "-m", new Location(mmodules.first.location.file, 0, 0, 0, 0))
                        mainmodule.is_fictive = true
                        mainmodule.set_imported_mmodules(mmodules)
+                       modelbuilder.apply_conditional_importations(mainmodule)
+                       modelbuilder.run_phases
                end
                return mainmodule
        end
index 1afce19..824ac8c 100644 (file)
@@ -305,7 +305,12 @@ redef class ModelBuilder
                                        var i = 0
                                        for p in spd.initializers do
                                                if p != longest.initializers[i] then
-                                                       self.error(nclassdef, "Error: conflict for inherited inits {spd}({spd.initializers.join(", ")}) and {longest}({longest.initializers.join(", ")})")
+                                                       var proposal = new ArraySet[MProperty]
+                                                       for spd2 in spropdefs do
+                                                               proposal.add_all spd2.initializers
+                                                       end
+                                                       proposal.add_all initializers
+                                                       self.error(nclassdef, "Error: cannot generate automatic init for class {mclassdef.mclass}. Conflict in the order in inherited initializers {spd}({spd.initializers.join(", ")}) and {longest}({longest.initializers.join(", ")}). Use `autoinit` to order initializers. eg `autoinit {proposal.join(", ")}`")
                                                        # TODO: invalidate the initializer to avoid more errors
                                                        return
                                                end
@@ -1270,7 +1275,9 @@ redef class AAttrPropdef
                        if atwritable != null then
                                mvisibility = new_property_visibility(modelbuilder, mclassdef, atwritable.n_visibility)
                        else
-                               mvisibility = private_visibility
+                               mvisibility = mreadprop.visibility
+                               # By default, use protected visibility at most
+                               if mvisibility > protected_visibility then mvisibility = protected_visibility
                        end
                        mwriteprop = new MMethod(mclassdef, writename, mvisibility)
                        if not self.check_redef_keyword(modelbuilder, mclassdef, nwkwredef, false, mwriteprop) then return
@@ -1340,11 +1347,16 @@ redef class AAttrPropdef
                        if nexpr != null then
                                if nexpr isa ANewExpr then
                                        mtype = modelbuilder.resolve_mtype_unchecked(mmodule, mclassdef, nexpr.n_type, true)
-                               else if nexpr isa AIntExpr then
-                                       var cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "Int")
-                                       if cla != null then mtype = cla.mclass_type
-                               else if nexpr isa AByteExpr then
-                                       var cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "Byte")
+                               else if nexpr isa AIntegerExpr then
+                                       var cla: nullable MClass = null
+                                       if nexpr.value isa Int then
+                                               cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "Int")
+                                       else if nexpr.value isa Byte then
+                                               cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "Byte")
+                                       else
+                                               # Should not happen, and should be updated as new types are added
+                                               abort
+                                       end
                                        if cla != null then mtype = cla.mclass_type
                                else if nexpr isa AFloatExpr then
                                        var cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "Float")
index d9e17f3..bda79e7 100644 (file)
@@ -51,7 +51,8 @@ private class Nitdoc
                        new InheritanceListsPhase(toolcontext, doc),
                        new IntroRedefListPhase(toolcontext, doc),
                        new LinListPhase(toolcontext, doc),
-                       new GraphPhase(toolcontext, doc): DocPhase]
+                       new GraphPhase(toolcontext, doc),
+                       new ReadmePhase(toolcontext, doc): DocPhase]
 
                if not toolcontext.opt_test.value then
                        phases.add new RenderHTMLPhase(toolcontext, doc)
diff --git a/src/nitj.nit b/src/nitj.nit
new file mode 100644 (file)
index 0000000..f58c22a
--- /dev/null
@@ -0,0 +1,59 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Compile Nit into Java code runnable on the Java Virtual Machine.
+module nitj
+
+import compiler::java_compiler
+
+# Create a tool context to handle options and paths
+var toolcontext = new ToolContext
+toolcontext.process_options(args)
+
+# We need a model to collect stufs
+var model = new Model
+# And a model builder to parse files
+var modelbuilder = new ModelBuilder(model, toolcontext)
+
+# Collect arguments
+var arguments = toolcontext.option_context.rest
+if arguments.is_empty then
+       toolcontext.option_context.usage
+       return
+end
+if arguments.length > 1 then
+       print "Too much arguments: {arguments.join(" ")}"
+       toolcontext.option_context.usage
+       return
+end
+var progname = arguments.first
+
+# Here we load an process all modules passed on the command line
+var mmodules = modelbuilder.parse([progname])
+
+if mmodules.is_empty then return
+modelbuilder.run_phases
+
+var mainmodule
+if mmodules.length == 1 then
+       mainmodule = mmodules.first
+else
+       mainmodule = new MModule(model, null, mmodules.first.name, mmodules.first.location)
+       mainmodule.set_imported_mmodules(mmodules)
+end
+
+var analysis = modelbuilder.do_rapid_type_analysis(mainmodule)
+
+# Do compilation
+modelbuilder.run_java_compiler(mainmodule, analysis)
index 4d00945..d876c38 100644 (file)
@@ -55,3 +55,4 @@ toolcontext.mmodules_to_check.add_all mmodules
 
 modelbuilder.run_phases
 toolcontext.run_global_phases(mmodules)
+if toolcontext.error_count > 0 then exit(1)
index 83c4c6c..2a416ef 100644 (file)
@@ -152,7 +152,7 @@ for mmodule in mmodules do
        else if module_path.has_suffix(".nit") then
                module_name = module_path.basename(".nit")
        else
-               module_name = module_path.basename("")
+               module_name = module_path.basename
                module_path += ".nit"
        end
 
index 9a3372c..5db5755 100644 (file)
@@ -1194,7 +1194,7 @@ redef class TAttrid
     end
 end
 
-redef class TNumber
+redef class TInteger
     redef fun parser_index: Int
     do
        return 99
@@ -1206,94 +1206,10 @@ redef class TNumber
     end
 end
 
-redef class THexNumber
-    redef fun parser_index: Int
-    do
-       return 100
-    end
-
-    init init_tk(loc: Location)
-    do
-               _location = loc
-    end
-end
-
-redef class TBinNumber
-    redef fun parser_index: Int
-    do
-       return 101
-    end
-
-    init init_tk(loc: Location)
-    do
-               _location = loc
-    end
-end
-
-redef class TOctNumber
-    redef fun parser_index: Int
-    do
-       return 102
-    end
-
-    init init_tk(loc: Location)
-    do
-               _location = loc
-    end
-end
-
-redef class TBytenum
-    redef fun parser_index: Int
-    do
-       return 103
-    end
-
-    init init_tk(loc: Location)
-    do
-               _location = loc
-    end
-end
-
-redef class THexBytenum
-    redef fun parser_index: Int
-    do
-       return 104
-    end
-
-    init init_tk(loc: Location)
-    do
-               _location = loc
-    end
-end
-
-redef class TBinBytenum
-    redef fun parser_index: Int
-    do
-       return 105
-    end
-
-    init init_tk(loc: Location)
-    do
-               _location = loc
-    end
-end
-
-redef class TOctBytenum
-    redef fun parser_index: Int
-    do
-       return 106
-    end
-
-    init init_tk(loc: Location)
-    do
-               _location = loc
-    end
-end
-
 redef class TFloat
     redef fun parser_index: Int
     do
-       return 107
+       return 100
     end
 
     init init_tk(loc: Location)
@@ -1305,7 +1221,7 @@ end
 redef class TString
     redef fun parser_index: Int
     do
-       return 108
+       return 101
     end
 
     init init_tk(loc: Location)
@@ -1317,7 +1233,7 @@ end
 redef class TStartString
     redef fun parser_index: Int
     do
-       return 109
+       return 102
     end
 
     init init_tk(loc: Location)
@@ -1329,7 +1245,7 @@ end
 redef class TMidString
     redef fun parser_index: Int
     do
-       return 110
+       return 103
     end
 
     init init_tk(loc: Location)
@@ -1341,7 +1257,7 @@ end
 redef class TEndString
     redef fun parser_index: Int
     do
-       return 111
+       return 104
     end
 
     init init_tk(loc: Location)
@@ -1353,7 +1269,7 @@ end
 redef class TChar
     redef fun parser_index: Int
     do
-       return 112
+       return 105
     end
 
     init init_tk(loc: Location)
@@ -1365,7 +1281,7 @@ end
 redef class TBadString
     redef fun parser_index: Int
     do
-       return 113
+       return 106
     end
 
     init init_tk(loc: Location)
@@ -1377,7 +1293,7 @@ end
 redef class TBadChar
     redef fun parser_index: Int
     do
-       return 114
+       return 107
     end
 
     init init_tk(loc: Location)
@@ -1389,7 +1305,7 @@ end
 redef class TExternCodeSegment
     redef fun parser_index: Int
     do
-       return 115
+       return 108
     end
 
     init init_tk(loc: Location)
@@ -1402,7 +1318,7 @@ end
 redef class EOF
     redef fun parser_index: Int
     do
-       return 116
+       return 109
     end
 end
 
@@ -1707,54 +1623,33 @@ redef class Lexer
                        return new TAttrid.init_tk(location)
                end
                if accept_token == 100 then
-                       return new TNumber.init_tk(location)
+                       return new TInteger.init_tk(location)
                end
                if accept_token == 101 then
-                       return new THexNumber.init_tk(location)
-               end
-               if accept_token == 102 then
-                       return new TBinNumber.init_tk(location)
-               end
-               if accept_token == 103 then
-                       return new TOctNumber.init_tk(location)
-               end
-               if accept_token == 104 then
-                       return new TBytenum.init_tk(location)
-               end
-               if accept_token == 105 then
-                       return new THexBytenum.init_tk(location)
-               end
-               if accept_token == 106 then
-                       return new TBinBytenum.init_tk(location)
-               end
-               if accept_token == 107 then
-                       return new TOctBytenum.init_tk(location)
-               end
-               if accept_token == 108 then
                        return new TFloat.init_tk(location)
                end
-               if accept_token == 109 then
+               if accept_token == 102 then
                        return new TString.init_tk(location)
                end
-               if accept_token == 110 then
+               if accept_token == 103 then
                        return new TStartString.init_tk(location)
                end
-               if accept_token == 111 then
+               if accept_token == 104 then
                        return new TMidString.init_tk(location)
                end
-               if accept_token == 112 then
+               if accept_token == 105 then
                        return new TEndString.init_tk(location)
                end
-               if accept_token == 113 then
+               if accept_token == 106 then
                        return new TChar.init_tk(location)
                end
-               if accept_token == 114 then
+               if accept_token == 107 then
                        return new TBadString.init_tk(location)
                end
-               if accept_token == 115 then
+               if accept_token == 108 then
                        return new TBadChar.init_tk(location)
                end
-               if accept_token == 116 then
+               if accept_token == 109 then
                        return new TExternCodeSegment.init_tk(location)
                end
                abort # unknown token index `accept_token`
index 0f06bce..94810af 100644 (file)
@@ -164,7 +164,17 @@ class Lexer
                        if sp >= string_len then
                                dfa_state = -1
                        else
+                               # Very ugly hack, this is because of the way SableCC generates its tables.
+                               # Due to the 0xFFFF limit of a Java char, when a big Nit char is read (i.e.
+                               # code point > 65535), it crashes.
+                               #
+                               # Hence, if a char has a code point <= 255 (ISO8859 range), it is left as is.
+                               # Else, it is replaced by 255.
+                               # This does not corrupt the lexer and works perfectly on any character.
+                               #
+                               # TL;DR: Java fucked up, need retarded solution to cope for retarded decision
                                var c = string[sp].ascii
+                               if c >= 256 then c = 255
                                sp += 1
 
                                var cr = _cr
index 592cc42..3466248 100644 (file)
@@ -26,10 +26,17 @@ Helpers
 all = [0 .. 0xFF];
 lowercase = ['a' .. 'z'];
 uppercase = ['A' .. 'Z'];
+
 digit = ['0' .. '9'];
 hexdigit = ['0'..'9'] | ['a'..'f'] | ['A'..'F'] | '_';
 bindigit = '0' | '1' | '_';
 octdigit = ['0' .. '7'] | '_';
+number = digit (digit | '_')*;
+hex_number = ('0x' | '0X') hexdigit+;
+bin_number = ('0b' | '0B') bindigit+;
+oct_number = ('0o' | '0O') octdigit+;
+prec = '8' | '16' | '32';
+
 letter = lowercase | uppercase | digit | '_';
 
 tab = 9;
@@ -199,14 +206,7 @@ classid = uppercase letter*;
 id = lowercase letter*;
 attrid = '_' lowercase letter*;
 
-number = digit+;
-hex_number = ('0x' | '0X') hexdigit+;
-bin_number = ('0b' | '0B') bindigit+;
-oct_number = ('0o' | '0O') octdigit+;
-bytenum = digit+ 'u8';
-hex_bytenum = ('0x' | '0X') hexdigit+ 'u8';
-bin_bytenum = ('0b' | '0B') bindigit+ 'u8';
-oct_bytenum = ('0o' | '0O') octdigit+ 'u8';
+integer = (number | hex_number | bin_number | oct_number) (('u' prec) | ('i' prec) |);
 float = digit* '.' digit+ | (digit+ | digit* '.' digit+) ('E'|'e') ('+'|'-'|) digit+;
 string = '"' str_body '"' | '"' '"' '"' long_str_body lsend1 | ''' ''' ''' long_sstr_body ''' ''' ''';
 start_string = '"' str_body '{' | '"' '"' '"' long_str_body lsend2;
@@ -640,14 +640,7 @@ expr_single~nopar~nobra {-> expr}
        | {true} kwtrue annotations_o {-> New expr.true(kwtrue, annotations_o.annotations)}
        | {false} kwfalse annotations_o {-> New expr.false(kwfalse, annotations_o.annotations)}
        | {null} kwnull annotations_o {-> New expr.null(kwnull, annotations_o.annotations)}
-       | {int} number annotations_o {-> New expr.dec_int(number, annotations_o.annotations)}
-       | {hex_int} hex_number annotations_o {-> New expr.hex_int(hex_number, annotations_o.annotations)}
-       | {bin_int} bin_number annotations_o {-> New expr.bin_int(bin_number, annotations_o.annotations)}
-       | {oct_int} oct_number annotations_o {-> New expr.oct_int(oct_number, annotations_o.annotations)}
-       | {byte} bytenum annotations_o {-> New expr.dec_byte(bytenum, annotations_o.annotations)}
-       | {hex_byte} hex_bytenum annotations_o {-> New expr.hex_byte(hex_bytenum, annotations_o.annotations)}
-       | {bin_byte} bin_bytenum annotations_o {-> New expr.bin_byte(bin_bytenum, annotations_o.annotations)}
-       | {oct_byte} oct_bytenum annotations_o {-> New expr.oct_byte(oct_bytenum, annotations_o.annotations)}
+       | {integer} integer annotations_o {-> New expr.integer(integer, annotations_o.annotations)}
        | {float} float annotations_o {-> New expr.float(float, annotations_o.annotations)}
        | {char} char annotations_o {-> New expr.char(char, annotations_o.annotations)}
        | {string} string annotations_o {-> New expr.string(string, annotations_o.annotations)}
@@ -1011,14 +1004,7 @@ expr     = {block} expr* kwend?
        | {true} kwtrue annotations?
        | {false} kwfalse annotations?
        | {null} kwnull annotations?
-       | {dec_int} number annotations?
-       | {hex_int} hex_number annotations?
-       | {bin_int} bin_number annotations?
-       | {oct_int} oct_number annotations?
-       | {dec_byte} bytenum annotations?
-       | {hex_byte} hex_bytenum annotations?
-       | {bin_byte} bin_bytenum annotations?
-       | {oct_byte} oct_bytenum annotations?
+       | {integer} integer annotations?
        | {float} float annotations?
        | {char} char annotations?
        | {string} string annotations?
index 0446324..34237c2 100644 (file)
@@ -9,7 +9,7 @@ private import tables
 redef class Parser
        redef fun build_reduce_table
        do
-               var reduce_table = new Array[ReduceAction].with_capacity(1116)
+               var reduce_table = new Array[ReduceAction].with_capacity(1088)
                self.reduce_table = reduce_table
                reduce_table.add new ReduceAction0(0)
                reduce_table.add new ReduceAction1(0)
@@ -388,126 +388,119 @@ redef class Parser
                reduce_table.add new ReduceAction374(74)
                reduce_table.add new ReduceAction375(74)
                reduce_table.add new ReduceAction376(74)
-               reduce_table.add new ReduceAction377(74)
-               reduce_table.add new ReduceAction378(74)
+               reduce_table.add new ReduceAction159(74)
+               reduce_table.add new ReduceAction159(74)
                reduce_table.add new ReduceAction379(74)
                reduce_table.add new ReduceAction380(74)
                reduce_table.add new ReduceAction381(74)
-               reduce_table.add new ReduceAction382(74)
-               reduce_table.add new ReduceAction383(74)
-               reduce_table.add new ReduceAction159(74)
-               reduce_table.add new ReduceAction159(74)
-               reduce_table.add new ReduceAction386(74)
-               reduce_table.add new ReduceAction387(74)
-               reduce_table.add new ReduceAction388(74)
-               reduce_table.add new ReduceAction389(75)
-               reduce_table.add new ReduceAction389(75)
-               reduce_table.add new ReduceAction391(76)
-               reduce_table.add new ReduceAction392(77)
-               reduce_table.add new ReduceAction393(78)
-               reduce_table.add new ReduceAction394(78)
-               reduce_table.add new ReduceAction392(79)
-               reduce_table.add new ReduceAction396(80)
+               reduce_table.add new ReduceAction382(75)
+               reduce_table.add new ReduceAction382(75)
+               reduce_table.add new ReduceAction384(76)
+               reduce_table.add new ReduceAction385(77)
+               reduce_table.add new ReduceAction386(78)
+               reduce_table.add new ReduceAction387(78)
+               reduce_table.add new ReduceAction385(79)
+               reduce_table.add new ReduceAction389(80)
                reduce_table.add new ReduceAction272(80)
-               reduce_table.add new ReduceAction398(80)
-               reduce_table.add new ReduceAction399(81)
-               reduce_table.add new ReduceAction400(81)
-               reduce_table.add new ReduceAction401(82)
-               reduce_table.add new ReduceAction402(82)
-               reduce_table.add new ReduceAction403(83)
-               reduce_table.add new ReduceAction401(84)
-               reduce_table.add new ReduceAction402(84)
-               reduce_table.add new ReduceAction406(85)
-               reduce_table.add new ReduceAction407(86)
-               reduce_table.add new ReduceAction408(87)
-               reduce_table.add new ReduceAction409(87)
-               reduce_table.add new ReduceAction410(88)
+               reduce_table.add new ReduceAction391(80)
+               reduce_table.add new ReduceAction392(81)
+               reduce_table.add new ReduceAction393(81)
+               reduce_table.add new ReduceAction394(82)
+               reduce_table.add new ReduceAction395(82)
+               reduce_table.add new ReduceAction396(83)
+               reduce_table.add new ReduceAction394(84)
+               reduce_table.add new ReduceAction395(84)
+               reduce_table.add new ReduceAction399(85)
+               reduce_table.add new ReduceAction400(86)
+               reduce_table.add new ReduceAction401(87)
+               reduce_table.add new ReduceAction402(87)
+               reduce_table.add new ReduceAction403(88)
                reduce_table.add new ReduceAction22(88)
-               reduce_table.add new ReduceAction412(89)
-               reduce_table.add new ReduceAction413(89)
-               reduce_table.add new ReduceAction414(90)
-               reduce_table.add new ReduceAction415(90)
-               reduce_table.add new ReduceAction412(91)
-               reduce_table.add new ReduceAction413(91)
-               reduce_table.add new ReduceAction418(91)
+               reduce_table.add new ReduceAction405(89)
+               reduce_table.add new ReduceAction406(89)
+               reduce_table.add new ReduceAction407(90)
+               reduce_table.add new ReduceAction408(90)
+               reduce_table.add new ReduceAction405(91)
+               reduce_table.add new ReduceAction406(91)
+               reduce_table.add new ReduceAction411(91)
                reduce_table.add new ReduceAction159(92)
-               reduce_table.add new ReduceAction420(93)
-               reduce_table.add new ReduceAction421(94)
-               reduce_table.add new ReduceAction422(94)
-               reduce_table.add new ReduceAction423(94)
-               reduce_table.add new ReduceAction424(94)
-               reduce_table.add new ReduceAction425(94)
-               reduce_table.add new ReduceAction426(95)
-               reduce_table.add new ReduceAction427(95)
-               reduce_table.add new ReduceAction428(95)
-               reduce_table.add new ReduceAction429(95)
-               reduce_table.add new ReduceAction430(95)
-               reduce_table.add new ReduceAction393(96)
-               reduce_table.add new ReduceAction394(96)
-               reduce_table.add new ReduceAction392(97)
-               reduce_table.add new ReduceAction434(98)
+               reduce_table.add new ReduceAction413(93)
+               reduce_table.add new ReduceAction414(94)
+               reduce_table.add new ReduceAction415(94)
+               reduce_table.add new ReduceAction416(94)
+               reduce_table.add new ReduceAction417(94)
+               reduce_table.add new ReduceAction418(94)
+               reduce_table.add new ReduceAction419(95)
+               reduce_table.add new ReduceAction420(95)
+               reduce_table.add new ReduceAction421(95)
+               reduce_table.add new ReduceAction422(95)
+               reduce_table.add new ReduceAction423(95)
+               reduce_table.add new ReduceAction386(96)
+               reduce_table.add new ReduceAction387(96)
+               reduce_table.add new ReduceAction385(97)
+               reduce_table.add new ReduceAction427(98)
                reduce_table.add new ReduceAction159(98)
                reduce_table.add new ReduceAction159(98)
-               reduce_table.add new ReduceAction437(98)
-               reduce_table.add new ReduceAction438(98)
-               reduce_table.add new ReduceAction439(98)
-               reduce_table.add new ReduceAction440(99)
-               reduce_table.add new ReduceAction441(99)
-               reduce_table.add new ReduceAction442(99)
-               reduce_table.add new ReduceAction443(100)
-               reduce_table.add new ReduceAction444(100)
-               reduce_table.add new ReduceAction443(101)
-               reduce_table.add new ReduceAction446(101)
-               reduce_table.add new ReduceAction444(101)
-               reduce_table.add new ReduceAction448(101)
-               reduce_table.add new ReduceAction449(102)
-               reduce_table.add new ReduceAction402(103)
-               reduce_table.add new ReduceAction451(103)
-               reduce_table.add new ReduceAction452(104)
-               reduce_table.add new ReduceAction453(105)
-               reduce_table.add new ReduceAction454(105)
-               reduce_table.add new ReduceAction455(106)
-               reduce_table.add new ReduceAction456(106)
-               reduce_table.add new ReduceAction457(107)
-               reduce_table.add new ReduceAction458(107)
-               reduce_table.add new ReduceAction459(107)
-               reduce_table.add new ReduceAction460(107)
-               reduce_table.add new ReduceAction461(108)
-               reduce_table.add new ReduceAction462(108)
-               reduce_table.add new ReduceAction463(108)
+               reduce_table.add new ReduceAction430(98)
+               reduce_table.add new ReduceAction431(98)
+               reduce_table.add new ReduceAction432(98)
+               reduce_table.add new ReduceAction433(99)
+               reduce_table.add new ReduceAction434(99)
+               reduce_table.add new ReduceAction435(99)
+               reduce_table.add new ReduceAction436(100)
+               reduce_table.add new ReduceAction437(100)
+               reduce_table.add new ReduceAction436(101)
+               reduce_table.add new ReduceAction439(101)
+               reduce_table.add new ReduceAction437(101)
+               reduce_table.add new ReduceAction441(101)
+               reduce_table.add new ReduceAction442(102)
+               reduce_table.add new ReduceAction395(103)
+               reduce_table.add new ReduceAction444(103)
+               reduce_table.add new ReduceAction445(104)
+               reduce_table.add new ReduceAction446(105)
+               reduce_table.add new ReduceAction447(105)
+               reduce_table.add new ReduceAction448(106)
+               reduce_table.add new ReduceAction449(106)
+               reduce_table.add new ReduceAction450(107)
+               reduce_table.add new ReduceAction451(107)
+               reduce_table.add new ReduceAction452(107)
+               reduce_table.add new ReduceAction453(107)
+               reduce_table.add new ReduceAction454(108)
+               reduce_table.add new ReduceAction455(108)
+               reduce_table.add new ReduceAction456(108)
                reduce_table.add new ReduceAction22(108)
-               reduce_table.add new ReduceAction465(109)
-               reduce_table.add new ReduceAction466(109)
-               reduce_table.add new ReduceAction467(109)
-               reduce_table.add new ReduceAction466(109)
-               reduce_table.add new ReduceAction469(110)
-               reduce_table.add new ReduceAction470(110)
-               reduce_table.add new ReduceAction471(110)
-               reduce_table.add new ReduceAction470(110)
-               reduce_table.add new ReduceAction473(111)
-               reduce_table.add new ReduceAction474(112)
+               reduce_table.add new ReduceAction458(109)
+               reduce_table.add new ReduceAction459(109)
+               reduce_table.add new ReduceAction460(109)
+               reduce_table.add new ReduceAction459(109)
+               reduce_table.add new ReduceAction462(110)
+               reduce_table.add new ReduceAction463(110)
+               reduce_table.add new ReduceAction464(110)
+               reduce_table.add new ReduceAction463(110)
+               reduce_table.add new ReduceAction466(111)
+               reduce_table.add new ReduceAction467(112)
                reduce_table.add new ReduceAction22(113)
-               reduce_table.add new ReduceAction476(113)
-               reduce_table.add new ReduceAction477(114)
-               reduce_table.add new ReduceAction477(114)
-               reduce_table.add new ReduceAction477(114)
-               reduce_table.add new ReduceAction480(115)
-               reduce_table.add new ReduceAction481(115)
+               reduce_table.add new ReduceAction469(113)
+               reduce_table.add new ReduceAction470(114)
+               reduce_table.add new ReduceAction470(114)
+               reduce_table.add new ReduceAction470(114)
+               reduce_table.add new ReduceAction473(115)
+               reduce_table.add new ReduceAction474(115)
                reduce_table.add new ReduceAction23(115)
                reduce_table.add new ReduceAction23(115)
-               reduce_table.add new ReduceAction484(115)
-               reduce_table.add new ReduceAction484(115)
-               reduce_table.add new ReduceAction486(115)
-               reduce_table.add new ReduceAction487(115)
-               reduce_table.add new ReduceAction488(115)
-               reduce_table.add new ReduceAction488(115)
-               reduce_table.add new ReduceAction490(115)
+               reduce_table.add new ReduceAction477(115)
+               reduce_table.add new ReduceAction477(115)
+               reduce_table.add new ReduceAction479(115)
+               reduce_table.add new ReduceAction480(115)
+               reduce_table.add new ReduceAction481(115)
+               reduce_table.add new ReduceAction481(115)
+               reduce_table.add new ReduceAction483(115)
                reduce_table.add new ReduceAction22(116)
-               reduce_table.add new ReduceAction492(116)
-               reduce_table.add new ReduceAction493(117)
-               reduce_table.add new ReduceAction477(117)
-               reduce_table.add new ReduceAction477(118)
-               reduce_table.add new ReduceAction496(118)
+               reduce_table.add new ReduceAction485(116)
+               reduce_table.add new ReduceAction486(117)
+               reduce_table.add new ReduceAction470(117)
+               reduce_table.add new ReduceAction470(118)
+               reduce_table.add new ReduceAction489(118)
                reduce_table.add new ReduceAction48(119)
                reduce_table.add new ReduceAction49(119)
                reduce_table.add new ReduceAction50(119)
@@ -537,10 +530,10 @@ redef class Parser
                reduce_table.add new ReduceAction105(121)
                reduce_table.add new ReduceAction106(121)
                reduce_table.add new ReduceAction107(121)
-               reduce_table.add new ReduceAction469(122)
-               reduce_table.add new ReduceAction470(122)
-               reduce_table.add new ReduceAction471(122)
-               reduce_table.add new ReduceAction470(122)
+               reduce_table.add new ReduceAction462(122)
+               reduce_table.add new ReduceAction463(122)
+               reduce_table.add new ReduceAction464(122)
+               reduce_table.add new ReduceAction463(122)
                reduce_table.add new ReduceAction146(123)
                reduce_table.add new ReduceAction147(123)
                reduce_table.add new ReduceAction159(124)
@@ -636,13 +629,6 @@ redef class Parser
                reduce_table.add new ReduceAction374(139)
                reduce_table.add new ReduceAction375(139)
                reduce_table.add new ReduceAction376(139)
-               reduce_table.add new ReduceAction377(139)
-               reduce_table.add new ReduceAction378(139)
-               reduce_table.add new ReduceAction379(139)
-               reduce_table.add new ReduceAction380(139)
-               reduce_table.add new ReduceAction381(139)
-               reduce_table.add new ReduceAction382(139)
-               reduce_table.add new ReduceAction383(139)
                reduce_table.add new ReduceAction159(139)
                reduce_table.add new ReduceAction159(139)
                reduce_table.add new ReduceAction146(140)
@@ -815,27 +801,20 @@ redef class Parser
                reduce_table.add new ReduceAction374(158)
                reduce_table.add new ReduceAction375(158)
                reduce_table.add new ReduceAction376(158)
-               reduce_table.add new ReduceAction377(158)
-               reduce_table.add new ReduceAction378(158)
-               reduce_table.add new ReduceAction379(158)
-               reduce_table.add new ReduceAction380(158)
-               reduce_table.add new ReduceAction381(158)
-               reduce_table.add new ReduceAction382(158)
-               reduce_table.add new ReduceAction383(158)
                reduce_table.add new ReduceAction159(158)
-               reduce_table.add new ReduceAction408(159)
-               reduce_table.add new ReduceAction409(159)
-               reduce_table.add new ReduceAction410(160)
+               reduce_table.add new ReduceAction401(159)
+               reduce_table.add new ReduceAction402(159)
+               reduce_table.add new ReduceAction403(160)
                reduce_table.add new ReduceAction22(160)
-               reduce_table.add new ReduceAction412(161)
-               reduce_table.add new ReduceAction412(162)
-               reduce_table.add new ReduceAction393(163)
-               reduce_table.add new ReduceAction394(163)
-               reduce_table.add new ReduceAction434(164)
+               reduce_table.add new ReduceAction405(161)
+               reduce_table.add new ReduceAction405(162)
+               reduce_table.add new ReduceAction386(163)
+               reduce_table.add new ReduceAction387(163)
+               reduce_table.add new ReduceAction427(164)
                reduce_table.add new ReduceAction159(164)
                reduce_table.add new ReduceAction159(164)
-               reduce_table.add new ReduceAction437(164)
-               reduce_table.add new ReduceAction438(164)
+               reduce_table.add new ReduceAction430(164)
+               reduce_table.add new ReduceAction431(164)
                reduce_table.add new ReduceAction146(165)
                reduce_table.add new ReduceAction147(165)
                reduce_table.add new ReduceAction159(166)
@@ -882,21 +861,21 @@ redef class Parser
                reduce_table.add new ReduceAction159(178)
                reduce_table.add new ReduceAction325(178)
                reduce_table.add new ReduceAction326(178)
-               reduce_table.add new ReduceAction871(178)
+               reduce_table.add new ReduceAction850(178)
                reduce_table.add new ReduceAction159(179)
-               reduce_table.add new ReduceAction873(179)
-               reduce_table.add new ReduceAction874(179)
-               reduce_table.add new ReduceAction875(179)
-               reduce_table.add new ReduceAction876(179)
-               reduce_table.add new ReduceAction877(179)
+               reduce_table.add new ReduceAction852(179)
+               reduce_table.add new ReduceAction853(179)
+               reduce_table.add new ReduceAction854(179)
+               reduce_table.add new ReduceAction855(179)
+               reduce_table.add new ReduceAction856(179)
                reduce_table.add new ReduceAction183(179)
                reduce_table.add new ReduceAction333(179)
-               reduce_table.add new ReduceAction876(179)
-               reduce_table.add new ReduceAction877(179)
+               reduce_table.add new ReduceAction855(179)
+               reduce_table.add new ReduceAction856(179)
                reduce_table.add new ReduceAction191(179)
                reduce_table.add new ReduceAction349(179)
-               reduce_table.add new ReduceAction884(179)
-               reduce_table.add new ReduceAction885(179)
+               reduce_table.add new ReduceAction863(179)
+               reduce_table.add new ReduceAction864(179)
                reduce_table.add new ReduceAction355(179)
                reduce_table.add new ReduceAction356(179)
                reduce_table.add new ReduceAction357(179)
@@ -919,16 +898,9 @@ redef class Parser
                reduce_table.add new ReduceAction374(181)
                reduce_table.add new ReduceAction375(181)
                reduce_table.add new ReduceAction376(181)
-               reduce_table.add new ReduceAction377(181)
-               reduce_table.add new ReduceAction378(181)
-               reduce_table.add new ReduceAction379(181)
-               reduce_table.add new ReduceAction380(181)
-               reduce_table.add new ReduceAction381(181)
-               reduce_table.add new ReduceAction382(181)
-               reduce_table.add new ReduceAction383(181)
                reduce_table.add new ReduceAction159(181)
-               reduce_table.add new ReduceAction916(182)
-               reduce_table.add new ReduceAction917(182)
+               reduce_table.add new ReduceAction888(182)
+               reduce_table.add new ReduceAction889(182)
                reduce_table.add new ReduceAction156(183)
                reduce_table.add new ReduceAction157(183)
                reduce_table.add new ReduceAction158(183)
@@ -1084,49 +1056,49 @@ redef class Parser
                reduce_table.add new ReduceAction159(198)
                reduce_table.add new ReduceAction159(198)
                reduce_table.add new ReduceAction200(198)
-               reduce_table.add new ReduceAction440(199)
-               reduce_table.add new ReduceAction442(199)
-               reduce_table.add new ReduceAction480(200)
-               reduce_table.add new ReduceAction481(200)
+               reduce_table.add new ReduceAction433(199)
+               reduce_table.add new ReduceAction435(199)
+               reduce_table.add new ReduceAction473(200)
+               reduce_table.add new ReduceAction474(200)
                reduce_table.add new ReduceAction23(200)
-               reduce_table.add new ReduceAction1078(201)
-               reduce_table.add new ReduceAction1079(201)
-               reduce_table.add new ReduceAction1080(202)
-               reduce_table.add new ReduceAction1081(202)
-               reduce_table.add new ReduceAction1082(203)
-               reduce_table.add new ReduceAction1083(203)
+               reduce_table.add new ReduceAction1050(201)
+               reduce_table.add new ReduceAction1051(201)
+               reduce_table.add new ReduceAction1052(202)
+               reduce_table.add new ReduceAction1053(202)
+               reduce_table.add new ReduceAction1054(203)
+               reduce_table.add new ReduceAction1055(203)
                reduce_table.add new ReduceAction37(204)
-               reduce_table.add new ReduceAction1085(204)
+               reduce_table.add new ReduceAction1057(204)
                reduce_table.add new ReduceAction45(205)
-               reduce_table.add new ReduceAction1087(205)
-               reduce_table.add new ReduceAction414(206)
-               reduce_table.add new ReduceAction1089(206)
-               reduce_table.add new ReduceAction1090(207)
-               reduce_table.add new ReduceAction1091(207)
-               reduce_table.add new ReduceAction1092(208)
-               reduce_table.add new ReduceAction1093(208)
+               reduce_table.add new ReduceAction1059(205)
+               reduce_table.add new ReduceAction407(206)
+               reduce_table.add new ReduceAction1061(206)
+               reduce_table.add new ReduceAction1062(207)
+               reduce_table.add new ReduceAction1063(207)
+               reduce_table.add new ReduceAction1064(208)
+               reduce_table.add new ReduceAction1065(208)
                reduce_table.add new ReduceAction150(209)
-               reduce_table.add new ReduceAction1095(209)
-               reduce_table.add new ReduceAction393(210)
-               reduce_table.add new ReduceAction1097(210)
-               reduce_table.add new ReduceAction393(211)
-               reduce_table.add new ReduceAction1097(211)
-               reduce_table.add new ReduceAction393(212)
-               reduce_table.add new ReduceAction1097(212)
-               reduce_table.add new ReduceAction454(213)
-               reduce_table.add new ReduceAction1103(213)
-               reduce_table.add new ReduceAction414(214)
-               reduce_table.add new ReduceAction1089(214)
-               reduce_table.add new ReduceAction393(215)
-               reduce_table.add new ReduceAction1097(215)
-               reduce_table.add new ReduceAction393(216)
-               reduce_table.add new ReduceAction1097(216)
-               reduce_table.add new ReduceAction455(217)
-               reduce_table.add new ReduceAction1111(217)
-               reduce_table.add new ReduceAction1112(218)
-               reduce_table.add new ReduceAction1113(218)
-               reduce_table.add new ReduceAction477(219)
-               reduce_table.add new ReduceAction496(219)
+               reduce_table.add new ReduceAction1067(209)
+               reduce_table.add new ReduceAction386(210)
+               reduce_table.add new ReduceAction1069(210)
+               reduce_table.add new ReduceAction386(211)
+               reduce_table.add new ReduceAction1069(211)
+               reduce_table.add new ReduceAction386(212)
+               reduce_table.add new ReduceAction1069(212)
+               reduce_table.add new ReduceAction447(213)
+               reduce_table.add new ReduceAction1075(213)
+               reduce_table.add new ReduceAction407(214)
+               reduce_table.add new ReduceAction1061(214)
+               reduce_table.add new ReduceAction386(215)
+               reduce_table.add new ReduceAction1069(215)
+               reduce_table.add new ReduceAction386(216)
+               reduce_table.add new ReduceAction1069(216)
+               reduce_table.add new ReduceAction448(217)
+               reduce_table.add new ReduceAction1083(217)
+               reduce_table.add new ReduceAction1084(218)
+               reduce_table.add new ReduceAction1085(218)
+               reduce_table.add new ReduceAction470(219)
+               reduce_table.add new ReduceAction489(219)
        end
 end
 
@@ -9159,12 +9131,12 @@ private class ReduceAction373
                                        var node_list: nullable Object = null
                                        var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
-                                       var tnumbernode2 = nodearraylist1
-                                       assert tnumbernode2 isa nullable TNumber
+                                       var tintegernode2 = nodearraylist1
+                                       assert tintegernode2 isa nullable TInteger
                                        var pannotationsnode3 = nodearraylist2
                                        assert pannotationsnode3 isa nullable AAnnotations
-                                       var pexprnode1: nullable ADecIntExpr = new ADecIntExpr.init_adecintexpr(
-                                               tnumbernode2,
+                                       var pexprnode1: nullable AIntegerExpr = new AIntegerExpr.init_aintegerexpr(
+                                               tintegernode2,
                                                pannotationsnode3
                                        )
                                        node_list = pexprnode1
@@ -9178,139 +9150,6 @@ private class ReduceAction374
                                        var node_list: nullable Object = null
                                        var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
-                                       var thexnumbernode2 = nodearraylist1
-                                       assert thexnumbernode2 isa nullable THexNumber
-                                       var pannotationsnode3 = nodearraylist2
-                                       assert pannotationsnode3 isa nullable AAnnotations
-                                       var pexprnode1: nullable AHexIntExpr = new AHexIntExpr.init_ahexintexpr(
-                                               thexnumbernode2,
-                                               pannotationsnode3
-                                       )
-                                       node_list = pexprnode1
-                                       p.push(p.go_to(_goto), node_list)
-       end
-end
-private class ReduceAction375
-       super ReduceAction
-       redef fun action(p: Parser)
-       do
-                                       var node_list: nullable Object = null
-                                       var nodearraylist2 = p.pop
-                                       var nodearraylist1 = p.pop
-                                       var tbinnumbernode2 = nodearraylist1
-                                       assert tbinnumbernode2 isa nullable TBinNumber
-                                       var pannotationsnode3 = nodearraylist2
-                                       assert pannotationsnode3 isa nullable AAnnotations
-                                       var pexprnode1: nullable ABinIntExpr = new ABinIntExpr.init_abinintexpr(
-                                               tbinnumbernode2,
-                                               pannotationsnode3
-                                       )
-                                       node_list = pexprnode1
-                                       p.push(p.go_to(_goto), node_list)
-       end
-end
-private class ReduceAction376
-       super ReduceAction
-       redef fun action(p: Parser)
-       do
-                                       var node_list: nullable Object = null
-                                       var nodearraylist2 = p.pop
-                                       var nodearraylist1 = p.pop
-                                       var toctnumbernode2 = nodearraylist1
-                                       assert toctnumbernode2 isa nullable TOctNumber
-                                       var pannotationsnode3 = nodearraylist2
-                                       assert pannotationsnode3 isa nullable AAnnotations
-                                       var pexprnode1: nullable AOctIntExpr = new AOctIntExpr.init_aoctintexpr(
-                                               toctnumbernode2,
-                                               pannotationsnode3
-                                       )
-                                       node_list = pexprnode1
-                                       p.push(p.go_to(_goto), node_list)
-       end
-end
-private class ReduceAction377
-       super ReduceAction
-       redef fun action(p: Parser)
-       do
-                                       var node_list: nullable Object = null
-                                       var nodearraylist2 = p.pop
-                                       var nodearraylist1 = p.pop
-                                       var tbytenumnode2 = nodearraylist1
-                                       assert tbytenumnode2 isa nullable TBytenum
-                                       var pannotationsnode3 = nodearraylist2
-                                       assert pannotationsnode3 isa nullable AAnnotations
-                                       var pexprnode1: nullable ADecByteExpr = new ADecByteExpr.init_adecbyteexpr(
-                                               tbytenumnode2,
-                                               pannotationsnode3
-                                       )
-                                       node_list = pexprnode1
-                                       p.push(p.go_to(_goto), node_list)
-       end
-end
-private class ReduceAction378
-       super ReduceAction
-       redef fun action(p: Parser)
-       do
-                                       var node_list: nullable Object = null
-                                       var nodearraylist2 = p.pop
-                                       var nodearraylist1 = p.pop
-                                       var thexbytenumnode2 = nodearraylist1
-                                       assert thexbytenumnode2 isa nullable THexBytenum
-                                       var pannotationsnode3 = nodearraylist2
-                                       assert pannotationsnode3 isa nullable AAnnotations
-                                       var pexprnode1: nullable AHexByteExpr = new AHexByteExpr.init_ahexbyteexpr(
-                                               thexbytenumnode2,
-                                               pannotationsnode3
-                                       )
-                                       node_list = pexprnode1
-                                       p.push(p.go_to(_goto), node_list)
-       end
-end
-private class ReduceAction379
-       super ReduceAction
-       redef fun action(p: Parser)
-       do
-                                       var node_list: nullable Object = null
-                                       var nodearraylist2 = p.pop
-                                       var nodearraylist1 = p.pop
-                                       var tbinbytenumnode2 = nodearraylist1
-                                       assert tbinbytenumnode2 isa nullable TBinBytenum
-                                       var pannotationsnode3 = nodearraylist2
-                                       assert pannotationsnode3 isa nullable AAnnotations
-                                       var pexprnode1: nullable ABinByteExpr = new ABinByteExpr.init_abinbyteexpr(
-                                               tbinbytenumnode2,
-                                               pannotationsnode3
-                                       )
-                                       node_list = pexprnode1
-                                       p.push(p.go_to(_goto), node_list)
-       end
-end
-private class ReduceAction380
-       super ReduceAction
-       redef fun action(p: Parser)
-       do
-                                       var node_list: nullable Object = null
-                                       var nodearraylist2 = p.pop
-                                       var nodearraylist1 = p.pop
-                                       var toctbytenumnode2 = nodearraylist1
-                                       assert toctbytenumnode2 isa nullable TOctBytenum
-                                       var pannotationsnode3 = nodearraylist2
-                                       assert pannotationsnode3 isa nullable AAnnotations
-                                       var pexprnode1: nullable AOctByteExpr = new AOctByteExpr.init_aoctbyteexpr(
-                                               toctbytenumnode2,
-                                               pannotationsnode3
-                                       )
-                                       node_list = pexprnode1
-                                       p.push(p.go_to(_goto), node_list)
-       end
-end
-private class ReduceAction381
-       super ReduceAction
-       redef fun action(p: Parser)
-       do
-                                       var node_list: nullable Object = null
-                                       var nodearraylist2 = p.pop
-                                       var nodearraylist1 = p.pop
                                        var tfloatnode2 = nodearraylist1
                                        assert tfloatnode2 isa nullable TFloat
                                        var pannotationsnode3 = nodearraylist2
@@ -9323,7 +9162,7 @@ private class ReduceAction381
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction382
+private class ReduceAction375
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9342,7 +9181,7 @@ private class ReduceAction382
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction383
+private class ReduceAction376
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9361,7 +9200,7 @@ private class ReduceAction383
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction386
+private class ReduceAction379
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9400,7 +9239,7 @@ private class ReduceAction386
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction387
+private class ReduceAction380
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9439,7 +9278,7 @@ private class ReduceAction387
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction388
+private class ReduceAction381
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9473,7 +9312,7 @@ private class ReduceAction388
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction389
+private class ReduceAction382
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9502,7 +9341,7 @@ private class ReduceAction389
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction391
+private class ReduceAction384
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9525,7 +9364,7 @@ private class ReduceAction391
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction392
+private class ReduceAction385
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9538,7 +9377,7 @@ private class ReduceAction392
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction393
+private class ReduceAction386
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9553,7 +9392,7 @@ private class ReduceAction393
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction394
+private class ReduceAction387
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9572,7 +9411,7 @@ private class ReduceAction394
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction396
+private class ReduceAction389
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9584,7 +9423,7 @@ private class ReduceAction396
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction398
+private class ReduceAction391
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9616,7 +9455,7 @@ private class ReduceAction398
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction399
+private class ReduceAction392
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9643,7 +9482,7 @@ private class ReduceAction399
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction400
+private class ReduceAction393
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9674,7 +9513,7 @@ private class ReduceAction400
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction401
+private class ReduceAction394
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9696,7 +9535,7 @@ private class ReduceAction401
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction402
+private class ReduceAction395
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9712,7 +9551,7 @@ private class ReduceAction402
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction403
+private class ReduceAction396
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9727,7 +9566,7 @@ private class ReduceAction403
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction406
+private class ReduceAction399
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9742,7 +9581,7 @@ private class ReduceAction406
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction407
+private class ReduceAction400
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9757,7 +9596,7 @@ private class ReduceAction407
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction408
+private class ReduceAction401
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9784,7 +9623,7 @@ private class ReduceAction408
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction409
+private class ReduceAction402
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9817,7 +9656,7 @@ private class ReduceAction409
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction410
+private class ReduceAction403
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9828,7 +9667,7 @@ private class ReduceAction410
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction412
+private class ReduceAction405
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9860,7 +9699,7 @@ private class ReduceAction412
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction413
+private class ReduceAction406
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9904,7 +9743,7 @@ private class ReduceAction413
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction414
+private class ReduceAction407
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9919,7 +9758,7 @@ private class ReduceAction414
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction415
+private class ReduceAction408
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9938,7 +9777,7 @@ private class ReduceAction415
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction418
+private class ReduceAction411
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9973,7 +9812,7 @@ private class ReduceAction418
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction420
+private class ReduceAction413
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9986,7 +9825,7 @@ private class ReduceAction420
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction421
+private class ReduceAction414
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10019,7 +9858,7 @@ private class ReduceAction421
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction422
+private class ReduceAction415
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10055,7 +9894,7 @@ private class ReduceAction422
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction423
+private class ReduceAction416
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10099,7 +9938,7 @@ private class ReduceAction423
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction424
+private class ReduceAction417
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10146,7 +9985,7 @@ private class ReduceAction424
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction425
+private class ReduceAction418
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10183,7 +10022,7 @@ private class ReduceAction425
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction426
+private class ReduceAction419
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10209,7 +10048,7 @@ private class ReduceAction426
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction427
+private class ReduceAction420
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10238,7 +10077,7 @@ private class ReduceAction427
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction428
+private class ReduceAction421
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10275,7 +10114,7 @@ private class ReduceAction428
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction429
+private class ReduceAction422
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10315,7 +10154,7 @@ private class ReduceAction429
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction430
+private class ReduceAction423
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10345,7 +10184,7 @@ private class ReduceAction430
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction434
+private class ReduceAction427
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10360,7 +10199,7 @@ private class ReduceAction434
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction437
+private class ReduceAction430
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10381,7 +10220,7 @@ private class ReduceAction437
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction438
+private class ReduceAction431
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10398,7 +10237,7 @@ private class ReduceAction438
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction439
+private class ReduceAction432
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10413,7 +10252,7 @@ private class ReduceAction439
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction440
+private class ReduceAction433
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10428,7 +10267,7 @@ private class ReduceAction440
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction441
+private class ReduceAction434
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10443,7 +10282,7 @@ private class ReduceAction441
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction442
+private class ReduceAction435
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10458,7 +10297,7 @@ private class ReduceAction442
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction443
+private class ReduceAction436
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10484,7 +10323,7 @@ private class ReduceAction443
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction444
+private class ReduceAction437
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10506,7 +10345,7 @@ private class ReduceAction444
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction446
+private class ReduceAction439
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10525,7 +10364,7 @@ private class ReduceAction446
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction448
+private class ReduceAction441
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10538,7 +10377,7 @@ private class ReduceAction448
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction449
+private class ReduceAction442
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10564,7 +10403,7 @@ private class ReduceAction449
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction451
+private class ReduceAction444
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10584,7 +10423,7 @@ private class ReduceAction451
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction452
+private class ReduceAction445
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10598,7 +10437,7 @@ private class ReduceAction452
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction453
+private class ReduceAction446
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10616,7 +10455,7 @@ private class ReduceAction453
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction454
+private class ReduceAction447
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10630,7 +10469,7 @@ private class ReduceAction454
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction455
+private class ReduceAction448
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10645,7 +10484,7 @@ private class ReduceAction455
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction456
+private class ReduceAction449
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10666,7 +10505,7 @@ private class ReduceAction456
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction457
+private class ReduceAction450
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10684,7 +10523,7 @@ private class ReduceAction457
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction458
+private class ReduceAction451
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10706,7 +10545,7 @@ private class ReduceAction458
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction459
+private class ReduceAction452
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10728,7 +10567,7 @@ private class ReduceAction459
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction460
+private class ReduceAction453
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10754,7 +10593,7 @@ private class ReduceAction460
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction461
+private class ReduceAction454
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10771,7 +10610,7 @@ private class ReduceAction461
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction462
+private class ReduceAction455
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10792,7 +10631,7 @@ private class ReduceAction462
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction463
+private class ReduceAction456
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10810,7 +10649,7 @@ private class ReduceAction463
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction465
+private class ReduceAction458
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10821,7 +10660,7 @@ private class ReduceAction465
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction466
+private class ReduceAction459
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10833,7 +10672,7 @@ private class ReduceAction466
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction467
+private class ReduceAction460
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10846,7 +10685,7 @@ private class ReduceAction467
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction469
+private class ReduceAction462
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10857,7 +10696,7 @@ private class ReduceAction469
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction470
+private class ReduceAction463
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10869,7 +10708,7 @@ private class ReduceAction470
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction471
+private class ReduceAction464
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10882,7 +10721,7 @@ private class ReduceAction471
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction473
+private class ReduceAction466
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10895,7 +10734,7 @@ private class ReduceAction473
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction474
+private class ReduceAction467
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10908,7 +10747,7 @@ private class ReduceAction474
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction476
+private class ReduceAction469
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10919,7 +10758,7 @@ private class ReduceAction476
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction477
+private class ReduceAction470
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10928,7 +10767,7 @@ private class ReduceAction477
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction480
+private class ReduceAction473
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10945,7 +10784,7 @@ private class ReduceAction480
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction481
+private class ReduceAction474
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10963,7 +10802,7 @@ private class ReduceAction481
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction484
+private class ReduceAction477
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10974,7 +10813,7 @@ private class ReduceAction484
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction486
+private class ReduceAction479
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10986,7 +10825,7 @@ private class ReduceAction486
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction487
+private class ReduceAction480
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10998,7 +10837,7 @@ private class ReduceAction487
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction488
+private class ReduceAction481
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11011,7 +10850,7 @@ private class ReduceAction488
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction490
+private class ReduceAction483
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11025,7 +10864,7 @@ private class ReduceAction490
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction492
+private class ReduceAction485
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11036,7 +10875,7 @@ private class ReduceAction492
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction493
+private class ReduceAction486
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11044,7 +10883,7 @@ private class ReduceAction493
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction496
+private class ReduceAction489
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11054,7 +10893,7 @@ private class ReduceAction496
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction871
+private class ReduceAction850
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11078,7 +10917,7 @@ private class ReduceAction871
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction873
+private class ReduceAction852
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11098,7 +10937,7 @@ private class ReduceAction873
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction874
+private class ReduceAction853
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11121,7 +10960,7 @@ private class ReduceAction874
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction875
+private class ReduceAction854
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11145,7 +10984,7 @@ private class ReduceAction875
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction876
+private class ReduceAction855
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11169,7 +11008,7 @@ private class ReduceAction876
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction877
+private class ReduceAction856
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11194,7 +11033,7 @@ private class ReduceAction877
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction884
+private class ReduceAction863
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11217,7 +11056,7 @@ private class ReduceAction884
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction885
+private class ReduceAction864
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11241,7 +11080,7 @@ private class ReduceAction885
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction916
+private class ReduceAction888
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11254,7 +11093,7 @@ private class ReduceAction916
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction917
+private class ReduceAction889
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11264,7 +11103,7 @@ private class ReduceAction917
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1078
+private class ReduceAction1050
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11279,7 +11118,7 @@ private class ReduceAction1078
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1079
+private class ReduceAction1051
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11298,7 +11137,7 @@ private class ReduceAction1079
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1080
+private class ReduceAction1052
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11313,7 +11152,7 @@ private class ReduceAction1080
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1081
+private class ReduceAction1053
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11332,7 +11171,7 @@ private class ReduceAction1081
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1082
+private class ReduceAction1054
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11347,7 +11186,7 @@ private class ReduceAction1082
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1083
+private class ReduceAction1055
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11366,7 +11205,7 @@ private class ReduceAction1083
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1085
+private class ReduceAction1057
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11385,7 +11224,7 @@ private class ReduceAction1085
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1087
+private class ReduceAction1059
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11404,7 +11243,7 @@ private class ReduceAction1087
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1089
+private class ReduceAction1061
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11423,7 +11262,7 @@ private class ReduceAction1089
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1090
+private class ReduceAction1062
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11438,7 +11277,7 @@ private class ReduceAction1090
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1091
+private class ReduceAction1063
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11457,7 +11296,7 @@ private class ReduceAction1091
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1092
+private class ReduceAction1064
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11472,7 +11311,7 @@ private class ReduceAction1092
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1093
+private class ReduceAction1065
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11491,7 +11330,7 @@ private class ReduceAction1093
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1095
+private class ReduceAction1067
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11510,7 +11349,7 @@ private class ReduceAction1095
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1097
+private class ReduceAction1069
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11529,7 +11368,7 @@ private class ReduceAction1097
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1103
+private class ReduceAction1075
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11547,7 +11386,7 @@ private class ReduceAction1103
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1111
+private class ReduceAction1083
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11566,7 +11405,7 @@ private class ReduceAction1111
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1112
+private class ReduceAction1084
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11581,7 +11420,7 @@ private class ReduceAction1112
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1113
+private class ReduceAction1085
        super ReduceAction
        redef fun action(p: Parser)
        do
index e2763e5..0110c86 100644 (file)
@@ -301,28 +301,7 @@ end
 class TAttrid
        super Token
 end
-class TNumber
-       super Token
-end
-class THexNumber
-       super Token
-end
-class TBinNumber
-       super Token
-end
-class TOctNumber
-       super Token
-end
-class TBytenum
-       super Token
-end
-class THexBytenum
-       super Token
-end
-class TBinBytenum
-       super Token
-end
-class TOctBytenum
+class TInteger
        super Token
 end
 class TFloat
@@ -1098,44 +1077,9 @@ class ANullExpr
        var n_kwnull: TKwnull is writable, noinit
        var n_annotations: nullable AAnnotations = null is writable
 end
-class ADecIntExpr
-       super AExpr
-       var n_number: TNumber is writable, noinit
-       var n_annotations: nullable AAnnotations = null is writable
-end
-class AHexIntExpr
-       super AExpr
-       var n_hex_number: THexNumber is writable, noinit
-       var n_annotations: nullable AAnnotations = null is writable
-end
-class ABinIntExpr
-       super AExpr
-       var n_bin_number: TBinNumber is writable, noinit
-       var n_annotations: nullable AAnnotations = null is writable
-end
-class AOctIntExpr
-       super AExpr
-       var n_oct_number: TOctNumber is writable, noinit
-       var n_annotations: nullable AAnnotations = null is writable
-end
-class ADecByteExpr
-       super AExpr
-       var n_bytenum: TBytenum is writable, noinit
-       var n_annotations: nullable AAnnotations = null is writable
-end
-class AHexByteExpr
-       super AExpr
-       var n_hex_bytenum: THexBytenum is writable, noinit
-       var n_annotations: nullable AAnnotations = null is writable
-end
-class ABinByteExpr
-       super AExpr
-       var n_bin_bytenum: TBinBytenum is writable, noinit
-       var n_annotations: nullable AAnnotations = null is writable
-end
-class AOctByteExpr
+class AIntegerExpr
        super AExpr
-       var n_oct_bytenum: TOctBytenum is writable, noinit
+       var n_integer: TInteger is writable, noinit
        var n_annotations: nullable AAnnotations = null is writable
 end
 class AFloatExpr
index 5e24989..06a18a2 100644 (file)
@@ -965,43 +965,8 @@ abstract class TokenLiteral
        end
 end
 
-# A literal decimal integer
-class TNumber
-       super TokenLiteral
-end
-
-# A literal hexadecimal integer
-class THexNumber
-       super TokenLiteral
-end
-
-# A literal binary integer
-class TBinNumber
-       super TokenLiteral
-end
-
-# A literal octal integer
-class TOctNumber
-       super TokenLiteral
-end
-
-# A literal decimal byte
-class TBytenum
-       super TokenLiteral
-end
-
-# A literal hexadecimal byte
-class THexBytenum
-       super TokenLiteral
-end
-
-# A literal binary byte
-class TBinBytenum
-       super TokenLiteral
-end
-
-# A literal octal byte
-class TOctBytenum
+# A literal integer
+class TInteger
        super TokenLiteral
 end
 
@@ -2508,77 +2473,11 @@ class ANullExpr
 end
 
 # An integer literal
-class AIntExpr
+class AIntegerExpr
        super AExpr
-end
-
-# An integer literal in decimal format
-class ADecIntExpr
-       super AIntExpr
-
-       # The decimal token
-       var n_number: TNumber is writable, noinit
-end
-
-# An integer literal in hexadecimal format
-class AHexIntExpr
-       super AIntExpr
-
-       # The hexadecimal token
-       var n_hex_number: THexNumber is writable, noinit
-end
-
-# An integer literal in binary format
-class ABinIntExpr
-       super AIntExpr
-
-       # The binary token
-       var n_bin_number: TBinNumber is writable, noinit
-end
-
-# An integer literal in octal format
-class AOctIntExpr
-       super AIntExpr
-
-       # The octal token
-       var n_oct_number: TOctNumber is writable, noinit
-end
-
-# An byte literal
-class AByteExpr
-       super AExpr
-end
-
-# An byte literal in decimal format
-class ADecByteExpr
-       super AByteExpr
-
-       # The decimal token
-       var n_bytenum: TBytenum is writable, noinit
-end
-
-# An byte literal in hexadecimal format
-class AHexByteExpr
-       super AByteExpr
-
-       # The hexadecimal token
-       var n_hex_bytenum: THexBytenum is writable, noinit
-end
-
-# An byte literal in binary format
-class ABinByteExpr
-       super AByteExpr
-
-       # The binary token
-       var n_bin_bytenum: TBinBytenum is writable, noinit
-end
-
-# An byte literal in octal format
-class AOctByteExpr
-       super AByteExpr
 
-       # The octal token
-       var n_oct_bytenum: TOctBytenum is writable, noinit
+       # The integer token
+       var n_integer: TInteger is writable, noinit
 end
 
 # A float literal
index f3826dc..3e5de8c 100644 (file)
@@ -6352,22 +6352,22 @@ redef class ANullExpr
                v.enter_visit(_n_annotations)
        end
 end
-redef class ADecIntExpr
-       init init_adecintexpr (
-               n_number: nullable TNumber,
+redef class AIntegerExpr
+       init init_aintegerexpr (
+               n_integer: nullable TInteger,
                n_annotations: nullable AAnnotations
        )
        do
-               _n_number = n_number.as(not null)
-               n_number.parent = self
+               _n_integer = n_integer.as(not null)
+               n_integer.parent = self
                _n_annotations = n_annotations
                if n_annotations != null then n_annotations.parent = self
        end
 
        redef fun replace_child(old_child: ANode, new_child: nullable ANode)
        do
-               if _n_number == old_child then
-                       n_number = new_child.as(TNumber)
+               if _n_integer == old_child then
+                       n_integer = new_child.as(TInteger)
                        return
                end
                if _n_annotations == old_child then
@@ -6376,9 +6376,9 @@ redef class ADecIntExpr
                end
        end
 
-       redef fun n_number=(node)
+       redef fun n_integer=(node)
        do
-               _n_number = node
+               _n_integer = node
                node.parent = self
        end
        redef fun n_annotations=(node)
@@ -6390,301 +6390,7 @@ redef class ADecIntExpr
 
        redef fun visit_all(v: Visitor)
        do
-               v.enter_visit(_n_number)
-               v.enter_visit(_n_annotations)
-       end
-end
-redef class AHexIntExpr
-       init init_ahexintexpr (
-               n_hex_number: nullable THexNumber,
-               n_annotations: nullable AAnnotations
-       )
-       do
-               _n_hex_number = n_hex_number.as(not null)
-               n_hex_number.parent = self
-               _n_annotations = n_annotations
-               if n_annotations != null then n_annotations.parent = self
-       end
-
-       redef fun replace_child(old_child: ANode, new_child: nullable ANode)
-       do
-               if _n_hex_number == old_child then
-                       n_hex_number = new_child.as(THexNumber)
-                       return
-               end
-               if _n_annotations == old_child then
-                       n_annotations = new_child.as(nullable AAnnotations)
-                       return
-               end
-       end
-
-       redef fun n_hex_number=(node)
-       do
-               _n_hex_number = node
-               node.parent = self
-       end
-       redef fun n_annotations=(node)
-       do
-               _n_annotations = node
-               if node != null then node.parent = self
-       end
-
-
-       redef fun visit_all(v: Visitor)
-       do
-               v.enter_visit(_n_hex_number)
-               v.enter_visit(_n_annotations)
-       end
-end
-redef class ABinIntExpr
-       init init_abinintexpr (
-               n_bin_number: nullable TBinNumber,
-               n_annotations: nullable AAnnotations
-       )
-       do
-               _n_bin_number = n_bin_number.as(not null)
-               n_bin_number.parent = self
-               _n_annotations = n_annotations
-               if n_annotations != null then n_annotations.parent = self
-       end
-
-       redef fun replace_child(old_child: ANode, new_child: nullable ANode)
-       do
-               if _n_bin_number == old_child then
-                       n_bin_number = new_child.as(TBinNumber)
-                       return
-               end
-               if _n_annotations == old_child then
-                       n_annotations = new_child.as(nullable AAnnotations)
-                       return
-               end
-       end
-
-       redef fun n_bin_number=(node)
-       do
-               _n_bin_number = node
-               node.parent = self
-       end
-       redef fun n_annotations=(node)
-       do
-               _n_annotations = node
-               if node != null then node.parent = self
-       end
-
-
-       redef fun visit_all(v: Visitor)
-       do
-               v.enter_visit(_n_bin_number)
-               v.enter_visit(_n_annotations)
-       end
-end
-redef class AOctIntExpr
-       init init_aoctintexpr (
-               n_oct_number: nullable TOctNumber,
-               n_annotations: nullable AAnnotations
-       )
-       do
-               _n_oct_number = n_oct_number.as(not null)
-               n_oct_number.parent = self
-               _n_annotations = n_annotations
-               if n_annotations != null then n_annotations.parent = self
-       end
-
-       redef fun replace_child(old_child: ANode, new_child: nullable ANode)
-       do
-               if _n_oct_number == old_child then
-                       n_oct_number = new_child.as(TOctNumber)
-                       return
-               end
-               if _n_annotations == old_child then
-                       n_annotations = new_child.as(nullable AAnnotations)
-                       return
-               end
-       end
-
-       redef fun n_oct_number=(node)
-       do
-               _n_oct_number = node
-               node.parent = self
-       end
-       redef fun n_annotations=(node)
-       do
-               _n_annotations = node
-               if node != null then node.parent = self
-       end
-
-
-       redef fun visit_all(v: Visitor)
-       do
-               v.enter_visit(_n_oct_number)
-               v.enter_visit(_n_annotations)
-       end
-end
-redef class ADecByteExpr
-       init init_adecbyteexpr (
-               n_bytenum: nullable TBytenum,
-               n_annotations: nullable AAnnotations
-       )
-       do
-               _n_bytenum = n_bytenum.as(not null)
-               n_bytenum.parent = self
-               _n_annotations = n_annotations
-               if n_annotations != null then n_annotations.parent = self
-       end
-
-       redef fun replace_child(old_child: ANode, new_child: nullable ANode)
-       do
-               if _n_bytenum == old_child then
-                       n_bytenum = new_child.as(TBytenum)
-                       return
-               end
-               if _n_annotations == old_child then
-                       n_annotations = new_child.as(nullable AAnnotations)
-                       return
-               end
-       end
-
-       redef fun n_bytenum=(node)
-       do
-               _n_bytenum = node
-               node.parent = self
-       end
-       redef fun n_annotations=(node)
-       do
-               _n_annotations = node
-               if node != null then node.parent = self
-       end
-
-
-       redef fun visit_all(v: Visitor)
-       do
-               v.enter_visit(_n_bytenum)
-               v.enter_visit(_n_annotations)
-       end
-end
-redef class AHexByteExpr
-       init init_ahexbyteexpr (
-               n_hex_bytenum: nullable THexBytenum,
-               n_annotations: nullable AAnnotations
-       )
-       do
-               _n_hex_bytenum = n_hex_bytenum.as(not null)
-               n_hex_bytenum.parent = self
-               _n_annotations = n_annotations
-               if n_annotations != null then n_annotations.parent = self
-       end
-
-       redef fun replace_child(old_child: ANode, new_child: nullable ANode)
-       do
-               if _n_hex_bytenum == old_child then
-                       n_hex_bytenum = new_child.as(THexBytenum)
-                       return
-               end
-               if _n_annotations == old_child then
-                       n_annotations = new_child.as(nullable AAnnotations)
-                       return
-               end
-       end
-
-       redef fun n_hex_bytenum=(node)
-       do
-               _n_hex_bytenum = node
-               node.parent = self
-       end
-       redef fun n_annotations=(node)
-       do
-               _n_annotations = node
-               if node != null then node.parent = self
-       end
-
-
-       redef fun visit_all(v: Visitor)
-       do
-               v.enter_visit(_n_hex_bytenum)
-               v.enter_visit(_n_annotations)
-       end
-end
-redef class ABinByteExpr
-       init init_abinbyteexpr (
-               n_bin_bytenum: nullable TBinBytenum,
-               n_annotations: nullable AAnnotations
-       )
-       do
-               _n_bin_bytenum = n_bin_bytenum.as(not null)
-               n_bin_bytenum.parent = self
-               _n_annotations = n_annotations
-               if n_annotations != null then n_annotations.parent = self
-       end
-
-       redef fun replace_child(old_child: ANode, new_child: nullable ANode)
-       do
-               if _n_bin_bytenum == old_child then
-                       n_bin_bytenum = new_child.as(TBinBytenum)
-                       return
-               end
-               if _n_annotations == old_child then
-                       n_annotations = new_child.as(nullable AAnnotations)
-                       return
-               end
-       end
-
-       redef fun n_bin_bytenum=(node)
-       do
-               _n_bin_bytenum = node
-               node.parent = self
-       end
-       redef fun n_annotations=(node)
-       do
-               _n_annotations = node
-               if node != null then node.parent = self
-       end
-
-
-       redef fun visit_all(v: Visitor)
-       do
-               v.enter_visit(_n_bin_bytenum)
-               v.enter_visit(_n_annotations)
-       end
-end
-redef class AOctByteExpr
-       init init_aoctbyteexpr (
-               n_oct_bytenum: nullable TOctBytenum,
-               n_annotations: nullable AAnnotations
-       )
-       do
-               _n_oct_bytenum = n_oct_bytenum.as(not null)
-               n_oct_bytenum.parent = self
-               _n_annotations = n_annotations
-               if n_annotations != null then n_annotations.parent = self
-       end
-
-       redef fun replace_child(old_child: ANode, new_child: nullable ANode)
-       do
-               if _n_oct_bytenum == old_child then
-                       n_oct_bytenum = new_child.as(TOctBytenum)
-                       return
-               end
-               if _n_annotations == old_child then
-                       n_annotations = new_child.as(nullable AAnnotations)
-                       return
-               end
-       end
-
-       redef fun n_oct_bytenum=(node)
-       do
-               _n_oct_bytenum = node
-               node.parent = self
-       end
-       redef fun n_annotations=(node)
-       do
-               _n_annotations = node
-               if node != null then node.parent = self
-       end
-
-
-       redef fun visit_all(v: Visitor)
-       do
-               v.enter_visit(_n_oct_bytenum)
+               v.enter_visit(_n_integer)
                v.enter_visit(_n_annotations)
        end
 end
index a344fc7..66941c2 100644 (file)
@@ -298,3 +298,19 @@ private abstract class ReduceAction
        end
        var goto: Int
 end
+
+redef class AExpr
+
+       # Get `self` as a single identifier.
+       # Return null if not a single identifier.
+       fun as_id: nullable String
+       do
+               if self isa AMethidExpr then
+                       return self.collect_text
+               end
+               if not self isa ACallExpr then return null
+               if not self.n_expr isa AImplicitSelfExpr then return null
+               if not self.n_args.n_exprs.is_empty then return null
+               return self.n_id.text
+       end
+end
index 4fd03ae..e31b9c4 100644 (file)
@@ -140,258 +140,261 @@ static const int lexer_goto_row19[] = {
        61, 61, 75
 };
 static const int lexer_goto_row20[] = {
-       11,
+       13,
        46, 46, 76,
-       48, 57, 20,
-       66, 66, 77,
-       69, 69, 78,
-       79, 79, 79,
-       88, 88, 80,
-       98, 98, 81,
-       101, 101, 82,
-       111, 111, 83,
-       117, 117, 84,
-       120, 120, 85
+       48, 57, 77,
+       66, 66, 78,
+       69, 69, 79,
+       79, 79, 80,
+       88, 88, 81,
+       95, 95, 82,
+       98, 98, 83,
+       101, 101, 84,
+       105, 105, 85,
+       111, 111, 86,
+       117, 117, 87,
+       120, 120, 88
 };
 static const int lexer_goto_row21[] = {
-       4,
+       5,
        46, 57, -21,
-       69, 69, 78,
-       101, 101, 82,
-       117, 117, 84
+       69, 69, 79,
+       95, 95, 82,
+       101, 105, -21,
+       117, 117, 87
 };
 static const int lexer_goto_row22[] = {
        1,
-       58, 58, 86
+       58, 58, 89
 };
 static const int lexer_goto_row24[] = {
        2,
-       60, 60, 87,
-       61, 61, 88
+       60, 60, 90,
+       61, 61, 91
 };
 static const int lexer_goto_row25[] = {
        1,
-       61, 61, 89
+       61, 61, 92
 };
 static const int lexer_goto_row26[] = {
        2,
-       61, 61, 90,
-       62, 62, 91
+       61, 61, 93,
+       62, 62, 94
 };
 static const int lexer_goto_row28[] = {
        4,
-       48, 57, 92,
-       65, 90, 93,
-       95, 95, 94,
-       97, 122, 95
+       48, 57, 95,
+       65, 90, 96,
+       95, 95, 97,
+       97, 122, 98
 };
 static const int lexer_goto_row31[] = {
        1,
-       61, 61, 96
+       61, 61, 99
 };
 static const int lexer_goto_row32[] = {
        2,
-       95, 95, 97,
-       97, 122, 98
+       95, 95, 100,
+       97, 122, 101
 };
 static const int lexer_goto_row33[] = {
        1,
-       123, 123, 99
+       123, 123, 102
 };
 static const int lexer_goto_row34[] = {
        10,
-       48, 57, 100,
-       65, 90, 101,
-       95, 95, 102,
-       97, 97, 103,
-       98, 98, 104,
-       99, 109, 103,
-       110, 110, 105,
-       111, 114, 103,
-       115, 115, 106,
-       116, 122, 103
+       48, 57, 103,
+       65, 90, 104,
+       95, 95, 105,
+       97, 97, 106,
+       98, 98, 107,
+       99, 109, 106,
+       110, 110, 108,
+       111, 114, 106,
+       115, 115, 109,
+       116, 122, 106
 };
 static const int lexer_goto_row35[] = {
        4,
        48, 95, -35,
-       97, 113, 103,
-       114, 114, 107,
-       115, 122, 103
+       97, 113, 106,
+       114, 114, 110,
+       115, 122, 106
 };
 static const int lexer_goto_row36[] = {
        6,
        48, 95, -35,
-       97, 107, 103,
-       108, 108, 108,
-       109, 110, 103,
-       111, 111, 109,
-       112, 122, 103
+       97, 107, 106,
+       108, 108, 111,
+       109, 110, 106,
+       111, 111, 112,
+       112, 122, 106
 };
 static const int lexer_goto_row37[] = {
        4,
        48, 95, -35,
-       97, 110, 103,
-       111, 111, 110,
-       112, 122, 103
+       97, 110, 106,
+       111, 111, 113,
+       112, 122, 106
 };
 static const int lexer_goto_row38[] = {
        7,
        48, 107, -37,
-       108, 108, 111,
-       109, 109, 103,
-       110, 110, 112,
-       111, 119, 103,
-       120, 120, 113,
-       121, 122, 103
+       108, 108, 114,
+       109, 109, 106,
+       110, 110, 115,
+       111, 119, 106,
+       120, 120, 116,
+       121, 122, 106
 };
 static const int lexer_goto_row39[] = {
        7,
        48, 95, -35,
-       97, 97, 114,
-       98, 110, 103,
-       111, 111, 115,
-       112, 116, 103,
-       117, 117, 116,
-       118, 122, 103
+       97, 97, 117,
+       98, 110, 106,
+       111, 111, 118,
+       112, 116, 106,
+       117, 117, 119,
+       118, 122, 106
 };
 static const int lexer_goto_row40[] = {
        2,
        48, 95, -35,
-       97, 122, 103
+       97, 122, 106
 };
 static const int lexer_goto_row41[] = {
        9,
        48, 95, -35,
-       97, 101, 103,
-       102, 102, 117,
-       103, 108, 103,
-       109, 109, 118,
-       110, 110, 119,
-       111, 114, 103,
-       115, 115, 120,
-       116, 122, 103
+       97, 101, 106,
+       102, 102, 120,
+       103, 108, 106,
+       109, 109, 121,
+       110, 110, 122,
+       111, 114, 106,
+       115, 115, 123,
+       116, 122, 106
 };
 static const int lexer_goto_row42[] = {
        5,
        48, 95, -35,
-       97, 97, 121,
-       98, 110, 103,
-       111, 111, 122,
-       112, 122, 103
+       97, 97, 124,
+       98, 110, 106,
+       111, 111, 125,
+       112, 122, 106
 };
 static const int lexer_goto_row43[] = {
        3,
        48, 110, -38,
-       111, 111, 123,
-       112, 122, 103
+       111, 111, 126,
+       112, 122, 106
 };
 static const int lexer_goto_row44[] = {
        8,
        48, 95, -35,
-       97, 100, 103,
-       101, 101, 124,
-       102, 110, 103,
-       111, 111, 125,
-       112, 116, 103,
-       117, 117, 126,
-       118, 122, 103
+       97, 100, 106,
+       101, 101, 127,
+       102, 110, 106,
+       111, 111, 128,
+       112, 116, 106,
+       117, 117, 129,
+       118, 122, 106
 };
 static const int lexer_goto_row45[] = {
        6,
        48, 95, -35,
-       97, 109, 103,
-       110, 110, 127,
-       111, 113, 103,
-       114, 114, 128,
-       115, 122, 103
+       97, 109, 106,
+       110, 110, 130,
+       111, 113, 106,
+       114, 114, 131,
+       115, 122, 106
 };
 static const int lexer_goto_row46[] = {
        7,
        48, 95, -35,
-       97, 97, 129,
-       98, 113, 103,
-       114, 114, 130,
-       115, 116, 103,
-       117, 117, 131,
-       118, 122, 103
+       97, 97, 132,
+       98, 113, 106,
+       114, 114, 133,
+       115, 116, 106,
+       117, 117, 134,
+       118, 122, 106
 };
 static const int lexer_goto_row47[] = {
        3,
        48, 100, -45,
-       101, 101, 132,
-       102, 122, 103
+       101, 101, 135,
+       102, 122, 106
 };
 static const int lexer_goto_row48[] = {
        5,
        48, 100, -45,
-       101, 101, 133,
-       102, 116, 103,
-       117, 117, 134,
-       118, 122, 103
+       101, 101, 136,
+       102, 116, 106,
+       117, 117, 137,
+       118, 122, 106
 };
 static const int lexer_goto_row49[] = {
        8,
        48, 95, -35,
-       97, 103, 103,
-       104, 104, 135,
-       105, 113, 103,
-       114, 114, 136,
-       115, 120, 103,
-       121, 121, 137,
-       122, 122, 103
+       97, 103, 106,
+       104, 104, 138,
+       105, 113, 106,
+       114, 114, 139,
+       115, 120, 106,
+       121, 121, 140,
+       122, 122, 106
 };
 static const int lexer_goto_row50[] = {
        3,
        48, 109, -46,
-       110, 110, 138,
-       111, 122, 103
+       110, 110, 141,
+       111, 122, 106
 };
 static const int lexer_goto_row51[] = {
        3,
        48, 95, -35,
-       97, 97, 139,
-       98, 122, 103
+       97, 97, 142,
+       98, 122, 106
 };
 static const int lexer_goto_row52[] = {
        4,
        48, 103, -50,
-       104, 104, 140,
-       105, 105, 141,
-       106, 122, 103
+       104, 104, 143,
+       105, 105, 144,
+       106, 122, 106
 };
 static const int lexer_goto_row53[] = {
        1,
-       61, 61, 142
+       61, 61, 145
 };
 static const int lexer_goto_row54[] = {
        11,
-       0, 9, 143,
-       11, 12, 143,
-       14, 33, 143,
-       34, 34, 144,
-       35, 91, 143,
-       92, 92, 145,
-       93, 122, 143,
-       123, 123, 146,
-       124, 124, 143,
-       125, 125, 147,
-       126, 255, 143
+       0, 9, 146,
+       11, 12, 146,
+       14, 33, 146,
+       34, 34, 147,
+       35, 91, 146,
+       92, 92, 148,
+       93, 122, 146,
+       123, 123, 149,
+       124, 124, 146,
+       125, 125, 150,
+       126, 255, 146
 };
 static const int lexer_goto_row58[] = {
        3,
        0, 33, -8,
-       34, 34, 148,
+       34, 34, 151,
        35, 255, -8
 };
 static const int lexer_goto_row59[] = {
        1,
-       34, 34, 149
+       34, 34, 152
 };
 static const int lexer_goto_row60[] = {
        3,
-       0, 9, 150,
-       11, 12, 150,
-       14, 255, 150
+       0, 9, 153,
+       11, 12, 153,
+       14, 255, 153
 };
 static const int lexer_goto_row62[] = {
        1,
@@ -399,1611 +402,1638 @@ static const int lexer_goto_row62[] = {
 };
 static const int lexer_goto_row64[] = {
        1,
-       10, 10, 151
+       10, 10, 154
 };
 static const int lexer_goto_row67[] = {
        1,
-       39, 39, 152
+       39, 39, 155
 };
 static const int lexer_goto_row68[] = {
        1,
-       39, 39, 153
+       39, 39, 156
 };
 static const int lexer_goto_row69[] = {
        3,
-       0, 9, 154,
-       11, 12, 154,
-       14, 255, 154
+       0, 9, 157,
+       11, 12, 157,
+       14, 255, 157
 };
 static const int lexer_goto_row70[] = {
        1,
-       61, 61, 155
+       61, 61, 158
 };
 static const int lexer_goto_row74[] = {
        1,
-       46, 46, 156
+       46, 46, 159
 };
 static const int lexer_goto_row75[] = {
-       2,
+       3,
        48, 57, 74,
-       69, 101, -22
+       69, 69, 79,
+       101, 101, 84
 };
 static const int lexer_goto_row77[] = {
        1,
        48, 57, 74
 };
 static const int lexer_goto_row78[] = {
-       3,
-       48, 48, 157,
-       49, 49, 158,
-       95, 95, 159
+       1,
+       46, 117, -22
 };
 static const int lexer_goto_row79[] = {
        3,
-       43, 43, 160,
-       45, 45, 161,
-       48, 57, 162
+       48, 48, 160,
+       49, 49, 161,
+       95, 95, 162
 };
 static const int lexer_goto_row80[] = {
-       2,
-       48, 55, 163,
-       95, 95, 164
+       3,
+       43, 43, 163,
+       45, 45, 164,
+       48, 57, 165
 };
 static const int lexer_goto_row81[] = {
-       4,
-       48, 57, 165,
-       65, 70, 166,
-       95, 95, 167,
-       97, 102, 168
+       2,
+       48, 55, 166,
+       95, 95, 167
 };
 static const int lexer_goto_row82[] = {
-       1,
-       48, 95, -79
+       4,
+       48, 57, 168,
+       65, 70, 169,
+       95, 95, 170,
+       97, 102, 171
 };
 static const int lexer_goto_row83[] = {
-       1,
-       43, 57, -80
+       3,
+       48, 57, 172,
+       95, 95, 82,
+       105, 117, -22
 };
 static const int lexer_goto_row84[] = {
        1,
-       48, 95, -81
+       48, 95, -80
 };
 static const int lexer_goto_row85[] = {
        1,
-       56, 56, 169
+       43, 57, -81
 };
 static const int lexer_goto_row86[] = {
+       3,
+       49, 49, 173,
+       51, 51, 174,
+       56, 56, 175
+};
+static const int lexer_goto_row87[] = {
        1,
-       48, 102, -82
+       48, 95, -82
 };
 static const int lexer_goto_row88[] = {
-       1,
-       61, 61, 170
+       3,
+       49, 49, 176,
+       51, 51, 177,
+       56, 56, 178
 };
 static const int lexer_goto_row89[] = {
        1,
-       62, 62, 171
+       48, 102, -83
+};
+static const int lexer_goto_row91[] = {
+       1,
+       61, 61, 179
 };
 static const int lexer_goto_row92[] = {
        1,
-       61, 61, 172
+       62, 62, 180
 };
-static const int lexer_goto_row93[] = {
+static const int lexer_goto_row95[] = {
+       1,
+       61, 61, 181
+};
+static const int lexer_goto_row96[] = {
        1,
        48, 122, -29
 };
-static const int lexer_goto_row94[] = {
+static const int lexer_goto_row97[] = {
        1,
        48, 122, -29
 };
-static const int lexer_goto_row95[] = {
+static const int lexer_goto_row98[] = {
        1,
        48, 122, -29
 };
-static const int lexer_goto_row96[] = {
+static const int lexer_goto_row99[] = {
        1,
        48, 122, -29
 };
-static const int lexer_goto_row98[] = {
+static const int lexer_goto_row101[] = {
        1,
-       100, 100, 173
+       100, 100, 182
 };
-static const int lexer_goto_row99[] = {
+static const int lexer_goto_row102[] = {
        4,
-       48, 57, 174,
-       65, 90, 175,
-       95, 95, 176,
-       97, 122, 177
+       48, 57, 183,
+       65, 90, 184,
+       95, 95, 185,
+       97, 122, 186
 };
-static const int lexer_goto_row100[] = {
+static const int lexer_goto_row103[] = {
        5,
-       0, 91, 178,
-       92, 92, 179,
-       93, 95, 178,
-       96, 96, 180,
-       97, 255, 178
+       0, 91, 187,
+       92, 92, 188,
+       93, 95, 187,
+       96, 96, 189,
+       97, 255, 187
 };
-static const int lexer_goto_row101[] = {
+static const int lexer_goto_row104[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row102[] = {
+static const int lexer_goto_row105[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row103[] = {
+static const int lexer_goto_row106[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row104[] = {
+static const int lexer_goto_row107[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row105[] = {
+static const int lexer_goto_row108[] = {
        5,
        48, 110, -38,
-       111, 111, 181,
-       112, 114, 103,
-       115, 115, 182,
-       116, 122, 103
+       111, 111, 190,
+       112, 114, 106,
+       115, 115, 191,
+       116, 122, 106
 };
-static const int lexer_goto_row106[] = {
+static const int lexer_goto_row109[] = {
        4,
        48, 95, -35,
-       97, 99, 103,
-       100, 100, 183,
-       101, 122, 103
+       97, 99, 106,
+       100, 100, 192,
+       101, 122, 106
 };
-static const int lexer_goto_row107[] = {
+static const int lexer_goto_row110[] = {
        4,
        48, 95, -35,
-       97, 114, 103,
-       115, 115, 184,
-       116, 122, 103
+       97, 114, 106,
+       115, 115, 193,
+       116, 122, 106
 };
-static const int lexer_goto_row108[] = {
+static const int lexer_goto_row111[] = {
        3,
        48, 100, -45,
-       101, 101, 185,
-       102, 122, 103
+       101, 101, 194,
+       102, 122, 106
 };
-static const int lexer_goto_row109[] = {
+static const int lexer_goto_row112[] = {
        3,
        48, 95, -35,
-       97, 97, 186,
-       98, 122, 103
+       97, 97, 195,
+       98, 122, 106
 };
-static const int lexer_goto_row110[] = {
+static const int lexer_goto_row113[] = {
        3,
        48, 109, -46,
-       110, 110, 187,
-       111, 122, 103
+       110, 110, 196,
+       111, 122, 106
 };
-static const int lexer_goto_row111[] = {
+static const int lexer_goto_row114[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row112[] = {
+static const int lexer_goto_row115[] = {
        3,
-       48, 114, -108,
-       115, 115, 188,
-       116, 122, 103
+       48, 114, -111,
+       115, 115, 197,
+       116, 122, 106
 };
-static const int lexer_goto_row113[] = {
+static const int lexer_goto_row116[] = {
        5,
-       48, 99, -107,
-       100, 100, 189,
-       101, 116, 103,
-       117, 117, 190,
-       118, 122, 103
+       48, 99, -110,
+       100, 100, 198,
+       101, 116, 106,
+       117, 117, 199,
+       118, 122, 106
 };
-static const int lexer_goto_row114[] = {
+static const int lexer_goto_row117[] = {
        4,
        48, 95, -35,
-       97, 115, 103,
-       116, 116, 191,
-       117, 122, 103
+       97, 115, 106,
+       116, 116, 200,
+       117, 122, 106
 };
-static const int lexer_goto_row115[] = {
+static const int lexer_goto_row118[] = {
        3,
        48, 107, -37,
-       108, 108, 192,
-       109, 122, 103
+       108, 108, 201,
+       109, 122, 106
 };
-static const int lexer_goto_row116[] = {
+static const int lexer_goto_row119[] = {
        3,
        48, 113, -36,
-       114, 114, 193,
-       115, 122, 103
+       114, 114, 202,
+       115, 122, 106
 };
-static const int lexer_goto_row117[] = {
+static const int lexer_goto_row120[] = {
        3,
        48, 109, -46,
-       110, 110, 194,
-       111, 122, 103
+       110, 110, 203,
+       111, 122, 106
 };
-static const int lexer_goto_row118[] = {
+static const int lexer_goto_row121[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row119[] = {
+static const int lexer_goto_row122[] = {
        4,
        48, 95, -35,
-       97, 111, 103,
-       112, 112, 195,
-       113, 122, 103
+       97, 111, 106,
+       112, 112, 204,
+       113, 122, 106
 };
-static const int lexer_goto_row120[] = {
+static const int lexer_goto_row123[] = {
        6,
        48, 95, -35,
-       97, 104, 103,
-       105, 105, 196,
-       106, 115, 103,
-       116, 116, 197,
-       117, 122, 103
+       97, 104, 106,
+       105, 105, 205,
+       106, 115, 106,
+       116, 116, 206,
+       117, 122, 106
 };
-static const int lexer_goto_row121[] = {
+static const int lexer_goto_row124[] = {
        5,
        48, 95, -35,
-       97, 97, 198,
-       98, 114, 103,
-       115, 115, 199,
-       116, 122, 103
+       97, 97, 207,
+       98, 114, 106,
+       115, 115, 208,
+       116, 122, 106
 };
-static const int lexer_goto_row122[] = {
+static const int lexer_goto_row125[] = {
        3,
        48, 97, -35,
-       98, 98, 200,
-       99, 122, 103
+       98, 98, 209,
+       99, 122, 106
 };
-static const int lexer_goto_row123[] = {
+static const int lexer_goto_row126[] = {
        3,
        48, 110, -38,
-       111, 111, 201,
-       112, 122, 103
+       111, 111, 210,
+       112, 122, 106
 };
-static const int lexer_goto_row124[] = {
+static const int lexer_goto_row127[] = {
        3,
-       48, 99, -107,
-       100, 100, 202,
-       101, 122, 103
+       48, 99, -110,
+       100, 100, 211,
+       101, 122, 106
 };
-static const int lexer_goto_row125[] = {
+static const int lexer_goto_row128[] = {
        4,
        48, 95, -35,
-       97, 118, 103,
-       119, 119, 203,
-       120, 122, 103
+       97, 118, 106,
+       119, 119, 212,
+       120, 122, 106
 };
-static const int lexer_goto_row126[] = {
+static const int lexer_goto_row129[] = {
        3,
-       48, 115, -115,
-       116, 116, 204,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 213,
+       117, 122, 106
 };
-static const int lexer_goto_row127[] = {
+static const int lexer_goto_row130[] = {
        3,
        48, 107, -37,
-       108, 108, 205,
-       109, 122, 103
+       108, 108, 214,
+       109, 122, 106
 };
-static const int lexer_goto_row128[] = {
+static const int lexer_goto_row131[] = {
        4,
        48, 95, -35,
-       97, 98, 103,
-       99, 99, 206,
-       100, 122, 103
+       97, 98, 106,
+       99, 99, 215,
+       100, 122, 106
 };
-static const int lexer_goto_row129[] = {
+static const int lexer_goto_row132[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row130[] = {
+static const int lexer_goto_row133[] = {
        3,
-       48, 98, -129,
-       99, 99, 207,
-       100, 122, 103
+       48, 98, -132,
+       99, 99, 216,
+       100, 122, 106
 };
-static const int lexer_goto_row131[] = {
+static const int lexer_goto_row134[] = {
        5,
-       48, 104, -121,
-       105, 105, 208,
-       106, 110, 103,
-       111, 111, 209,
-       112, 122, 103
+       48, 104, -124,
+       105, 105, 217,
+       106, 110, 106,
+       111, 111, 218,
+       112, 122, 106
 };
-static const int lexer_goto_row132[] = {
+static const int lexer_goto_row135[] = {
        3,
        48, 97, -35,
-       98, 98, 210,
-       99, 122, 103
+       98, 98, 219,
+       99, 122, 106
 };
-static const int lexer_goto_row133[] = {
+static const int lexer_goto_row136[] = {
        5,
-       48, 99, -107,
-       100, 100, 211,
-       101, 115, 103,
-       116, 116, 212,
-       117, 122, 103
+       48, 99, -110,
+       100, 100, 220,
+       101, 115, 106,
+       116, 116, 221,
+       117, 122, 106
 };
-static const int lexer_goto_row134[] = {
+static const int lexer_goto_row137[] = {
        3,
        48, 107, -37,
-       108, 108, 213,
-       109, 122, 103
+       108, 108, 222,
+       109, 122, 106
 };
-static const int lexer_goto_row135[] = {
+static const int lexer_goto_row138[] = {
        3,
-       48, 111, -120,
-       112, 112, 214,
-       113, 122, 103
+       48, 111, -123,
+       112, 112, 223,
+       113, 122, 106
 };
-static const int lexer_goto_row136[] = {
+static const int lexer_goto_row139[] = {
        3,
        48, 100, -45,
-       101, 101, 215,
-       102, 122, 103
+       101, 101, 224,
+       102, 122, 106
 };
-static const int lexer_goto_row137[] = {
+static const int lexer_goto_row140[] = {
        4,
        48, 95, -35,
-       97, 116, 103,
-       117, 117, 216,
-       118, 122, 103
+       97, 116, 106,
+       117, 117, 225,
+       118, 122, 106
 };
-static const int lexer_goto_row138[] = {
+static const int lexer_goto_row141[] = {
        3,
-       48, 111, -120,
-       112, 112, 217,
-       113, 122, 103
+       48, 111, -123,
+       112, 112, 226,
+       113, 122, 106
 };
-static const int lexer_goto_row139[] = {
+static const int lexer_goto_row142[] = {
        3,
-       48, 104, -121,
-       105, 105, 218,
-       106, 122, 103
+       48, 104, -124,
+       105, 105, 227,
+       106, 122, 106
 };
-static const int lexer_goto_row140[] = {
+static const int lexer_goto_row143[] = {
        3,
        48, 113, -36,
-       114, 114, 219,
-       115, 122, 103
+       114, 114, 228,
+       115, 122, 106
 };
-static const int lexer_goto_row141[] = {
+static const int lexer_goto_row144[] = {
        3,
-       48, 104, -121,
-       105, 105, 220,
-       106, 122, 103
+       48, 104, -124,
+       105, 105, 229,
+       106, 122, 106
 };
-static const int lexer_goto_row142[] = {
+static const int lexer_goto_row145[] = {
        3,
-       48, 115, -115,
-       116, 116, 221,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 230,
+       117, 122, 106
 };
-static const int lexer_goto_row144[] = {
+static const int lexer_goto_row147[] = {
        2,
        0, 123, -55,
-       124, 255, 143
+       124, 255, 146
 };
-static const int lexer_goto_row146[] = {
+static const int lexer_goto_row149[] = {
        3,
-       0, 9, 222,
-       11, 12, 222,
-       14, 255, 222
+       0, 9, 231,
+       11, 12, 231,
+       14, 255, 231
 };
-static const int lexer_goto_row148[] = {
+static const int lexer_goto_row151[] = {
        3,
        0, 124, -55,
-       125, 125, 223,
-       126, 255, 143
+       125, 125, 232,
+       126, 255, 146
 };
-static const int lexer_goto_row150[] = {
+static const int lexer_goto_row153[] = {
        11,
-       0, 9, 224,
-       10, 10, 225,
-       11, 12, 224,
-       13, 13, 226,
-       14, 33, 224,
-       34, 34, 227,
-       35, 91, 224,
-       92, 92, 228,
-       93, 122, 224,
-       123, 123, 229,
-       124, 255, 224
+       0, 9, 233,
+       10, 10, 234,
+       11, 12, 233,
+       13, 13, 235,
+       14, 33, 233,
+       34, 34, 236,
+       35, 91, 233,
+       92, 92, 237,
+       93, 122, 233,
+       123, 123, 238,
+       124, 255, 233
 };
-static const int lexer_goto_row151[] = {
+static const int lexer_goto_row154[] = {
        1,
        0, 255, -59
 };
-static const int lexer_goto_row154[] = {
+static const int lexer_goto_row157[] = {
        9,
-       0, 9, 230,
-       10, 10, 231,
-       11, 12, 230,
-       13, 13, 232,
-       14, 38, 230,
-       39, 39, 233,
-       40, 91, 230,
-       92, 92, 234,
-       93, 255, 230
-};
-static const int lexer_goto_row155[] = {
-       1,
-       39, 39, 235
+       0, 9, 239,
+       10, 10, 240,
+       11, 12, 239,
+       13, 13, 241,
+       14, 38, 239,
+       39, 39, 242,
+       40, 91, 239,
+       92, 92, 243,
+       93, 255, 239
 };
 static const int lexer_goto_row158[] = {
-       2,
-       48, 95, -79,
-       117, 117, 236
-};
-static const int lexer_goto_row159[] = {
        1,
-       48, 117, -159
-};
-static const int lexer_goto_row160[] = {
-       1,
-       48, 117, -159
+       39, 39, 244
 };
 static const int lexer_goto_row161[] = {
-       1,
-       48, 57, 162
+       2,
+       48, 95, -80,
+       105, 117, -22
 };
 static const int lexer_goto_row162[] = {
        1,
-       48, 57, 162
+       48, 117, -162
 };
 static const int lexer_goto_row163[] = {
        1,
-       48, 57, 162
+       48, 117, -162
 };
 static const int lexer_goto_row164[] = {
-       2,
-       48, 95, -81,
-       117, 117, 237
+       1,
+       48, 57, 165
 };
 static const int lexer_goto_row165[] = {
        1,
-       48, 117, -165
+       48, 57, 165
 };
 static const int lexer_goto_row166[] = {
-       2,
-       48, 102, -82,
-       117, 117, 238
+       1,
+       48, 57, 165
 };
 static const int lexer_goto_row167[] = {
-       1,
-       48, 117, -167
+       2,
+       48, 95, -82,
+       105, 117, -22
 };
 static const int lexer_goto_row168[] = {
        1,
-       48, 117, -167
+       48, 117, -168
 };
 static const int lexer_goto_row169[] = {
+       2,
+       48, 102, -83,
+       105, 117, -22
+};
+static const int lexer_goto_row170[] = {
        1,
-       48, 117, -167
+       48, 117, -170
 };
-static const int lexer_goto_row174[] = {
+static const int lexer_goto_row171[] = {
        1,
-       101, 101, 239
+       48, 117, -170
 };
-static const int lexer_goto_row175[] = {
+static const int lexer_goto_row172[] = {
+       1,
+       48, 117, -170
+};
+static const int lexer_goto_row173[] = {
        1,
-       48, 122, -100
+       48, 117, -84
 };
-static const int lexer_goto_row176[] = {
+static const int lexer_goto_row174[] = {
+       1,
+       54, 54, 245
+};
+static const int lexer_goto_row175[] = {
        1,
-       48, 122, -100
+       50, 50, 246
 };
 static const int lexer_goto_row177[] = {
        1,
-       48, 122, -100
+       54, 54, 247
 };
 static const int lexer_goto_row178[] = {
        1,
-       48, 122, -100
+       50, 50, 248
 };
-static const int lexer_goto_row179[] = {
+static const int lexer_goto_row183[] = {
+       1,
+       101, 101, 249
+};
+static const int lexer_goto_row184[] = {
+       1,
+       48, 122, -103
+};
+static const int lexer_goto_row185[] = {
+       1,
+       48, 122, -103
+};
+static const int lexer_goto_row186[] = {
+       1,
+       48, 122, -103
+};
+static const int lexer_goto_row187[] = {
+       1,
+       48, 122, -103
+};
+static const int lexer_goto_row188[] = {
        1,
-       0, 255, -101
+       0, 255, -104
 };
-static const int lexer_goto_row180[] = {
+static const int lexer_goto_row189[] = {
        1,
-       0, 255, 240
+       0, 255, 250
 };
-static const int lexer_goto_row181[] = {
+static const int lexer_goto_row190[] = {
        3,
-       0, 124, 241,
-       125, 125, 242,
-       126, 255, 241
+       0, 124, 251,
+       125, 125, 252,
+       126, 255, 251
 };
-static const int lexer_goto_row182[] = {
+static const int lexer_goto_row191[] = {
        3,
        48, 113, -36,
-       114, 114, 243,
-       115, 122, 103
+       114, 114, 253,
+       115, 122, 106
 };
-static const int lexer_goto_row183[] = {
+static const int lexer_goto_row192[] = {
        3,
-       48, 115, -115,
-       116, 116, 244,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 254,
+       117, 122, 106
 };
-static const int lexer_goto_row184[] = {
+static const int lexer_goto_row193[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row185[] = {
+static const int lexer_goto_row194[] = {
        3,
        48, 100, -45,
-       101, 101, 245,
-       102, 122, 103
+       101, 101, 255,
+       102, 122, 106
 };
-static const int lexer_goto_row186[] = {
+static const int lexer_goto_row195[] = {
        3,
        48, 95, -35,
-       97, 97, 246,
-       98, 122, 103
+       97, 97, 256,
+       98, 122, 106
 };
-static const int lexer_goto_row187[] = {
+static const int lexer_goto_row196[] = {
        3,
-       48, 114, -108,
-       115, 115, 247,
-       116, 122, 103
+       48, 114, -111,
+       115, 115, 257,
+       116, 122, 106
 };
-static const int lexer_goto_row188[] = {
+static const int lexer_goto_row197[] = {
        3,
-       48, 115, -115,
-       116, 116, 248,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 258,
+       117, 122, 106
 };
-static const int lexer_goto_row189[] = {
+static const int lexer_goto_row198[] = {
        3,
        48, 100, -45,
-       101, 101, 249,
-       102, 122, 103
+       101, 101, 259,
+       102, 122, 106
 };
-static const int lexer_goto_row190[] = {
+static const int lexer_goto_row199[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row191[] = {
+static const int lexer_goto_row200[] = {
        4,
        48, 95, -35,
-       97, 108, 103,
-       109, 109, 250,
-       110, 122, 103
+       97, 108, 106,
+       109, 109, 260,
+       110, 122, 106
 };
-static const int lexer_goto_row192[] = {
+static const int lexer_goto_row201[] = {
        3,
        48, 100, -45,
-       101, 101, 251,
-       102, 122, 103
+       101, 101, 261,
+       102, 122, 106
 };
-static const int lexer_goto_row193[] = {
+static const int lexer_goto_row202[] = {
        3,
-       48, 114, -108,
-       115, 115, 252,
-       116, 122, 103
+       48, 114, -111,
+       115, 115, 262,
+       116, 122, 106
 };
-static const int lexer_goto_row194[] = {
+static const int lexer_goto_row203[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row195[] = {
+static const int lexer_goto_row204[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row196[] = {
+static const int lexer_goto_row205[] = {
        5,
        48, 107, -37,
-       108, 108, 253,
-       109, 110, 103,
-       111, 111, 254,
-       112, 122, 103
+       108, 108, 263,
+       109, 110, 106,
+       111, 111, 264,
+       112, 122, 106
 };
-static const int lexer_goto_row197[] = {
+static const int lexer_goto_row206[] = {
        3,
-       48, 115, -115,
-       116, 116, 255,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 265,
+       117, 122, 106
 };
-static const int lexer_goto_row198[] = {
+static const int lexer_goto_row207[] = {
        5,
        48, 100, -45,
-       101, 101, 256,
-       102, 113, 103,
-       114, 114, 257,
-       115, 122, 103
+       101, 101, 266,
+       102, 113, 106,
+       114, 114, 267,
+       115, 122, 106
 };
-static const int lexer_goto_row199[] = {
+static const int lexer_goto_row208[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row200[] = {
+static const int lexer_goto_row209[] = {
        3,
        48, 100, -45,
-       101, 101, 258,
-       102, 122, 103
+       101, 101, 268,
+       102, 122, 106
 };
-static const int lexer_goto_row201[] = {
+static const int lexer_goto_row210[] = {
        3,
        48, 100, -45,
-       101, 101, 259,
-       102, 122, 103
+       101, 101, 269,
+       102, 122, 106
 };
-static const int lexer_goto_row202[] = {
+static const int lexer_goto_row211[] = {
        3,
-       48, 111, -120,
-       112, 112, 260,
-       113, 122, 103
+       48, 111, -123,
+       112, 112, 270,
+       113, 122, 106
 };
-static const int lexer_goto_row203[] = {
+static const int lexer_goto_row212[] = {
        3,
-       48, 116, -138,
-       117, 117, 261,
-       118, 122, 103
+       48, 116, -141,
+       117, 117, 271,
+       118, 122, 106
 };
-static const int lexer_goto_row204[] = {
+static const int lexer_goto_row213[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row205[] = {
+static const int lexer_goto_row214[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row206[] = {
+static const int lexer_goto_row215[] = {
        3,
        48, 107, -37,
-       108, 108, 262,
-       109, 122, 103
+       108, 108, 272,
+       109, 122, 106
 };
-static const int lexer_goto_row207[] = {
+static const int lexer_goto_row216[] = {
        3,
        48, 100, -45,
-       101, 101, 263,
-       102, 122, 103
+       101, 101, 273,
+       102, 122, 106
 };
-static const int lexer_goto_row208[] = {
+static const int lexer_goto_row217[] = {
        4,
        48, 95, -35,
-       97, 106, 103,
-       107, 107, 264,
-       108, 122, 103
+       97, 106, 106,
+       107, 107, 274,
+       108, 122, 106
 };
-static const int lexer_goto_row209[] = {
+static const int lexer_goto_row218[] = {
        4,
        48, 95, -35,
-       97, 117, 103,
-       118, 118, 265,
-       119, 122, 103
+       97, 117, 106,
+       118, 118, 275,
+       119, 122, 106
 };
-static const int lexer_goto_row210[] = {
+static const int lexer_goto_row219[] = {
        3,
-       48, 115, -115,
-       116, 116, 266,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 276,
+       117, 122, 106
 };
-static const int lexer_goto_row211[] = {
+static const int lexer_goto_row220[] = {
        3,
        48, 107, -37,
-       108, 108, 267,
-       109, 122, 103
+       108, 108, 277,
+       109, 122, 106
 };
-static const int lexer_goto_row212[] = {
+static const int lexer_goto_row221[] = {
        3,
        48, 100, -45,
-       101, 101, 268,
-       102, 122, 103
+       101, 101, 278,
+       102, 122, 106
 };
-static const int lexer_goto_row213[] = {
+static const int lexer_goto_row222[] = {
        3,
-       48, 116, -138,
-       117, 117, 269,
-       118, 122, 103
+       48, 116, -141,
+       117, 117, 279,
+       118, 122, 106
 };
-static const int lexer_goto_row214[] = {
+static const int lexer_goto_row223[] = {
        3,
        48, 101, -42,
-       102, 102, 270,
-       103, 122, 103
+       102, 102, 280,
+       103, 122, 106
 };
-static const int lexer_goto_row215[] = {
+static const int lexer_goto_row224[] = {
        3,
        48, 100, -45,
-       101, 101, 271,
-       102, 122, 103
+       101, 101, 281,
+       102, 122, 106
 };
-static const int lexer_goto_row216[] = {
+static const int lexer_goto_row225[] = {
        3,
        48, 109, -46,
-       110, 110, 272,
-       111, 122, 103
+       110, 110, 282,
+       111, 122, 106
 };
-static const int lexer_goto_row217[] = {
+static const int lexer_goto_row226[] = {
        3,
        48, 100, -45,
-       101, 101, 273,
-       102, 122, 103
+       101, 101, 283,
+       102, 122, 106
 };
-static const int lexer_goto_row218[] = {
+static const int lexer_goto_row227[] = {
        3,
        48, 100, -45,
-       101, 101, 274,
-       102, 122, 103
+       101, 101, 284,
+       102, 122, 106
 };
-static const int lexer_goto_row219[] = {
+static const int lexer_goto_row228[] = {
        3,
-       48, 117, -210,
-       118, 118, 275,
-       119, 122, 103
+       48, 117, -219,
+       118, 118, 285,
+       119, 122, 106
 };
-static const int lexer_goto_row220[] = {
+static const int lexer_goto_row229[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row221[] = {
+static const int lexer_goto_row230[] = {
        3,
        48, 107, -37,
-       108, 108, 276,
-       109, 122, 103
+       108, 108, 286,
+       109, 122, 106
 };
-static const int lexer_goto_row222[] = {
+static const int lexer_goto_row231[] = {
        3,
        48, 103, -50,
-       104, 104, 277,
-       105, 122, 103
+       104, 104, 287,
+       105, 122, 106
 };
-static const int lexer_goto_row223[] = {
+static const int lexer_goto_row232[] = {
        1,
-       0, 255, -145
+       0, 255, -148
 };
-static const int lexer_goto_row224[] = {
+static const int lexer_goto_row233[] = {
        11,
-       0, 9, 278,
-       10, 10, 279,
-       11, 12, 278,
-       13, 13, 280,
-       14, 33, 278,
-       34, 34, 281,
-       35, 91, 278,
-       92, 92, 282,
-       93, 122, 278,
-       123, 123, 283,
-       124, 255, 278
+       0, 9, 288,
+       10, 10, 289,
+       11, 12, 288,
+       13, 13, 290,
+       14, 33, 288,
+       34, 34, 291,
+       35, 91, 288,
+       92, 92, 292,
+       93, 122, 288,
+       123, 123, 293,
+       124, 255, 288
 };
-static const int lexer_goto_row225[] = {
+static const int lexer_goto_row234[] = {
        1,
-       0, 255, -151
+       0, 255, -154
 };
-static const int lexer_goto_row226[] = {
+static const int lexer_goto_row235[] = {
        1,
-       0, 255, -151
+       0, 255, -154
 };
-static const int lexer_goto_row227[] = {
+static const int lexer_goto_row236[] = {
        1,
-       0, 255, -151
+       0, 255, -154
 };
-static const int lexer_goto_row228[] = {
+static const int lexer_goto_row237[] = {
        5,
-       0, 33, -151,
-       34, 34, 284,
-       35, 122, -151,
-       123, 123, 285,
-       124, 255, 224
+       0, 33, -154,
+       34, 34, 294,
+       35, 122, -154,
+       123, 123, 295,
+       124, 255, 233
 };
-static const int lexer_goto_row229[] = {
+static const int lexer_goto_row238[] = {
        3,
-       0, 9, 286,
-       11, 12, 286,
-       14, 255, 286
+       0, 9, 296,
+       11, 12, 296,
+       14, 255, 296
 };
-static const int lexer_goto_row230[] = {
+static const int lexer_goto_row239[] = {
        5,
-       0, 33, -151,
-       34, 34, 287,
-       35, 122, -151,
-       123, 123, 288,
-       124, 255, 224
+       0, 33, -154,
+       34, 34, 297,
+       35, 122, -154,
+       123, 123, 298,
+       124, 255, 233
 };
-static const int lexer_goto_row231[] = {
+static const int lexer_goto_row240[] = {
        1,
-       0, 255, -155
+       0, 255, -158
 };
-static const int lexer_goto_row232[] = {
+static const int lexer_goto_row241[] = {
        1,
-       0, 255, -155
+       0, 255, -158
 };
-static const int lexer_goto_row233[] = {
+static const int lexer_goto_row242[] = {
        1,
-       0, 255, -155
+       0, 255, -158
 };
-static const int lexer_goto_row234[] = {
+static const int lexer_goto_row243[] = {
        9,
-       0, 9, 289,
-       10, 10, 290,
-       11, 12, 289,
-       13, 13, 291,
-       14, 38, 289,
-       39, 39, 292,
-       40, 91, 289,
-       92, 92, 293,
-       93, 255, 289
+       0, 9, 299,
+       10, 10, 300,
+       11, 12, 299,
+       13, 13, 301,
+       14, 38, 299,
+       39, 39, 302,
+       40, 91, 299,
+       92, 92, 303,
+       93, 255, 299
 };
-static const int lexer_goto_row235[] = {
+static const int lexer_goto_row244[] = {
        3,
-       0, 9, 294,
-       11, 12, 294,
-       14, 255, 294
-};
-static const int lexer_goto_row237[] = {
-       1,
-       56, 56, 295
-};
-static const int lexer_goto_row238[] = {
-       1,
-       56, 56, 296
-};
-static const int lexer_goto_row239[] = {
-       1,
-       56, 56, 297
+       0, 9, 304,
+       11, 12, 304,
+       14, 255, 304
 };
-static const int lexer_goto_row240[] = {
+static const int lexer_goto_row250[] = {
        1,
-       98, 98, 298
+       98, 98, 305
 };
-static const int lexer_goto_row241[] = {
+static const int lexer_goto_row251[] = {
        1,
-       0, 255, -101
+       0, 255, -104
 };
-static const int lexer_goto_row242[] = {
+static const int lexer_goto_row252[] = {
        1,
-       0, 255, -101
+       0, 255, -104
 };
-static const int lexer_goto_row244[] = {
+static const int lexer_goto_row254[] = {
        3,
-       48, 115, -115,
-       116, 116, 299,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 306,
+       117, 122, 106
 };
-static const int lexer_goto_row245[] = {
+static const int lexer_goto_row255[] = {
        3,
        48, 113, -36,
-       114, 114, 300,
-       115, 122, 103
+       114, 114, 307,
+       115, 122, 106
 };
-static const int lexer_goto_row246[] = {
+static const int lexer_goto_row256[] = {
        3,
        48, 113, -36,
-       114, 114, 301,
-       115, 122, 103
+       114, 114, 308,
+       115, 122, 106
 };
-static const int lexer_goto_row247[] = {
+static const int lexer_goto_row257[] = {
        3,
-       48, 106, -209,
-       107, 107, 302,
-       108, 122, 103
+       48, 106, -218,
+       107, 107, 309,
+       108, 122, 106
 };
-static const int lexer_goto_row248[] = {
+static const int lexer_goto_row258[] = {
        3,
-       48, 114, -108,
-       115, 115, 303,
-       116, 122, 103
+       48, 114, -111,
+       115, 115, 310,
+       116, 122, 106
 };
-static const int lexer_goto_row249[] = {
+static const int lexer_goto_row259[] = {
        3,
-       48, 104, -121,
-       105, 105, 304,
-       106, 122, 103
+       48, 104, -124,
+       105, 105, 311,
+       106, 122, 106
 };
-static const int lexer_goto_row250[] = {
+static const int lexer_goto_row260[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row251[] = {
+static const int lexer_goto_row261[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row252[] = {
+static const int lexer_goto_row262[] = {
        3,
        48, 113, -36,
-       114, 114, 305,
-       115, 122, 103
+       114, 114, 312,
+       115, 122, 106
 };
-static const int lexer_goto_row253[] = {
+static const int lexer_goto_row263[] = {
        3,
        48, 100, -45,
-       101, 101, 306,
-       102, 122, 103
+       101, 101, 313,
+       102, 122, 106
 };
-static const int lexer_goto_row254[] = {
+static const int lexer_goto_row264[] = {
        3,
-       48, 104, -121,
-       105, 105, 307,
-       106, 122, 103
+       48, 104, -124,
+       105, 105, 314,
+       106, 122, 106
 };
-static const int lexer_goto_row255[] = {
+static const int lexer_goto_row265[] = {
        3,
        48, 113, -36,
-       114, 114, 308,
-       115, 122, 103
+       114, 114, 315,
+       115, 122, 106
 };
-static const int lexer_goto_row256[] = {
+static const int lexer_goto_row266[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row257[] = {
+static const int lexer_goto_row267[] = {
        3,
        48, 113, -36,
-       114, 114, 309,
-       115, 122, 103
+       114, 114, 316,
+       115, 122, 106
 };
-static const int lexer_goto_row258[] = {
+static const int lexer_goto_row268[] = {
        3,
-       48, 116, -138,
-       117, 117, 310,
-       118, 122, 103
+       48, 116, -141,
+       117, 117, 317,
+       118, 122, 106
 };
-static const int lexer_goto_row259[] = {
+static const int lexer_goto_row269[] = {
        3,
-       48, 115, -115,
-       116, 116, 311,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 318,
+       117, 122, 106
 };
-static const int lexer_goto_row260[] = {
+static const int lexer_goto_row270[] = {
        3,
        48, 107, -37,
-       108, 108, 312,
-       109, 122, 103
+       108, 108, 319,
+       109, 122, 106
 };
-static const int lexer_goto_row261[] = {
+static const int lexer_goto_row271[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row262[] = {
+static const int lexer_goto_row272[] = {
        3,
        48, 107, -37,
-       108, 108, 313,
-       109, 122, 103
+       108, 108, 320,
+       109, 122, 106
 };
-static const int lexer_goto_row263[] = {
+static const int lexer_goto_row273[] = {
        3,
        48, 95, -35,
-       97, 97, 314,
-       98, 122, 103
+       97, 97, 321,
+       98, 122, 106
 };
-static const int lexer_goto_row264[] = {
+static const int lexer_goto_row274[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row265[] = {
+static const int lexer_goto_row275[] = {
        3,
        48, 95, -35,
-       97, 97, 315,
-       98, 122, 103
+       97, 97, 322,
+       98, 122, 106
 };
-static const int lexer_goto_row266[] = {
+static const int lexer_goto_row276[] = {
        3,
        48, 95, -35,
-       97, 97, 316,
-       98, 122, 103
+       97, 97, 323,
+       98, 122, 106
 };
-static const int lexer_goto_row267[] = {
+static const int lexer_goto_row277[] = {
        3,
        48, 100, -45,
-       101, 101, 317,
-       102, 122, 103
+       101, 101, 324,
+       102, 122, 106
 };
-static const int lexer_goto_row268[] = {
+static const int lexer_goto_row278[] = {
        3,
-       48, 104, -121,
-       105, 105, 318,
-       106, 122, 103
+       48, 104, -124,
+       105, 105, 325,
+       106, 122, 106
 };
-static const int lexer_goto_row269[] = {
+static const int lexer_goto_row279[] = {
        3,
        48, 101, -42,
-       102, 102, 319,
-       103, 122, 103
+       102, 102, 326,
+       103, 122, 106
 };
-static const int lexer_goto_row270[] = {
+static const int lexer_goto_row280[] = {
        3,
        48, 113, -36,
-       114, 114, 320,
-       115, 122, 103
+       114, 114, 327,
+       115, 122, 106
 };
-static const int lexer_goto_row271[] = {
+static const int lexer_goto_row281[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row272[] = {
+static const int lexer_goto_row282[] = {
        3,
        48, 113, -36,
-       114, 114, 321,
-       115, 122, 103
+       114, 114, 328,
+       115, 122, 106
 };
-static const int lexer_goto_row273[] = {
+static const int lexer_goto_row283[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row274[] = {
+static const int lexer_goto_row284[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row275[] = {
+static const int lexer_goto_row285[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row276[] = {
+static const int lexer_goto_row286[] = {
        3,
        48, 100, -45,
-       101, 101, 322,
-       102, 122, 103
+       101, 101, 329,
+       102, 122, 106
 };
-static const int lexer_goto_row277[] = {
+static const int lexer_goto_row287[] = {
        3,
        48, 100, -45,
-       101, 101, 323,
-       102, 122, 103
+       101, 101, 330,
+       102, 122, 106
 };
-static const int lexer_goto_row278[] = {
+static const int lexer_goto_row288[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row279[] = {
+static const int lexer_goto_row289[] = {
        1,
-       0, 255, -225
+       0, 255, -234
 };
-static const int lexer_goto_row280[] = {
+static const int lexer_goto_row290[] = {
        11,
-       0, 9, 324,
-       10, 10, 279,
-       11, 12, 324,
-       13, 13, 280,
-       14, 33, 324,
-       34, 34, 325,
-       35, 91, 324,
-       92, 92, 326,
-       93, 122, 324,
-       123, 123, 327,
-       124, 255, 324
+       0, 9, 331,
+       10, 10, 289,
+       11, 12, 331,
+       13, 13, 290,
+       14, 33, 331,
+       34, 34, 332,
+       35, 91, 331,
+       92, 92, 333,
+       93, 122, 331,
+       123, 123, 334,
+       124, 255, 331
 };
-static const int lexer_goto_row281[] = {
+static const int lexer_goto_row291[] = {
        1,
-       0, 255, -281
+       0, 255, -291
 };
-static const int lexer_goto_row282[] = {
+static const int lexer_goto_row292[] = {
        5,
-       0, 33, -281,
-       34, 34, 328,
-       35, 122, -281,
-       123, 123, 329,
-       124, 255, 324
+       0, 33, -291,
+       34, 34, 335,
+       35, 122, -291,
+       123, 123, 336,
+       124, 255, 331
 };
-static const int lexer_goto_row283[] = {
+static const int lexer_goto_row293[] = {
        3,
-       0, 9, 330,
-       11, 12, 330,
-       14, 255, 330
+       0, 9, 337,
+       11, 12, 337,
+       14, 255, 337
 };
-static const int lexer_goto_row284[] = {
+static const int lexer_goto_row294[] = {
        5,
-       0, 33, -281,
-       34, 34, 331,
-       35, 122, -281,
-       123, 123, 332,
-       124, 255, 324
+       0, 33, -291,
+       34, 34, 338,
+       35, 122, -291,
+       123, 123, 339,
+       124, 255, 331
 };
-static const int lexer_goto_row285[] = {
+static const int lexer_goto_row295[] = {
        3,
-       0, 33, -151,
-       34, 34, 333,
-       35, 255, -229
+       0, 33, -154,
+       34, 34, 340,
+       35, 255, -238
 };
-static const int lexer_goto_row286[] = {
+static const int lexer_goto_row296[] = {
        3,
-       0, 122, -231,
-       123, 123, 334,
-       124, 255, 224
+       0, 122, -240,
+       123, 123, 341,
+       124, 255, 233
 };
-static const int lexer_goto_row287[] = {
+static const int lexer_goto_row297[] = {
        1,
-       0, 255, -151
+       0, 255, -154
 };
-static const int lexer_goto_row288[] = {
+static const int lexer_goto_row298[] = {
        3,
-       0, 33, -151,
-       34, 34, 335,
-       35, 255, -229
+       0, 33, -154,
+       34, 34, 342,
+       35, 255, -238
 };
-static const int lexer_goto_row289[] = {
+static const int lexer_goto_row299[] = {
        3,
-       0, 122, -231,
-       123, 123, 336,
-       124, 255, 224
+       0, 122, -240,
+       123, 123, 343,
+       124, 255, 233
 };
-static const int lexer_goto_row290[] = {
+static const int lexer_goto_row300[] = {
        1,
-       0, 255, -155
+       0, 255, -158
 };
-static const int lexer_goto_row291[] = {
+static const int lexer_goto_row301[] = {
        1,
-       0, 255, -155
+       0, 255, -158
 };
-static const int lexer_goto_row292[] = {
+static const int lexer_goto_row302[] = {
        1,
-       0, 255, -155
+       0, 255, -158
 };
-static const int lexer_goto_row293[] = {
+static const int lexer_goto_row303[] = {
        9,
-       0, 9, 337,
-       10, 10, 338,
-       11, 12, 337,
-       13, 13, 339,
-       14, 38, 337,
-       39, 39, 340,
-       40, 91, 337,
-       92, 92, 341,
-       93, 255, 337
+       0, 9, 344,
+       10, 10, 345,
+       11, 12, 344,
+       13, 13, 346,
+       14, 38, 344,
+       39, 39, 347,
+       40, 91, 344,
+       92, 92, 348,
+       93, 255, 344
 };
-static const int lexer_goto_row294[] = {
+static const int lexer_goto_row304[] = {
        3,
-       0, 9, 342,
-       11, 12, 342,
-       14, 255, 342
+       0, 9, 349,
+       11, 12, 349,
+       14, 255, 349
 };
-static const int lexer_goto_row295[] = {
+static const int lexer_goto_row305[] = {
        1,
-       0, 255, -155
+       0, 255, -158
 };
-static const int lexer_goto_row299[] = {
+static const int lexer_goto_row306[] = {
        1,
-       117, 117, 343
+       117, 117, 350
 };
-static const int lexer_goto_row300[] = {
+static const int lexer_goto_row307[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row301[] = {
+static const int lexer_goto_row308[] = {
        3,
        48, 95, -35,
-       97, 97, 344,
-       98, 122, 103
+       97, 97, 351,
+       98, 122, 106
 };
-static const int lexer_goto_row302[] = {
+static const int lexer_goto_row309[] = {
        3,
-       48, 115, -115,
-       116, 116, 345,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 352,
+       117, 122, 106
 };
-static const int lexer_goto_row303[] = {
+static const int lexer_goto_row310[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row304[] = {
+static const int lexer_goto_row311[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row305[] = {
+static const int lexer_goto_row312[] = {
        3,
        48, 109, -46,
-       110, 110, 346,
-       111, 122, 103
+       110, 110, 353,
+       111, 122, 106
 };
-static const int lexer_goto_row306[] = {
+static const int lexer_goto_row313[] = {
        3,
        48, 109, -46,
-       110, 110, 347,
-       111, 122, 103
+       110, 110, 354,
+       111, 122, 106
 };
-static const int lexer_goto_row307[] = {
+static const int lexer_goto_row314[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row308[] = {
+static const int lexer_goto_row315[] = {
        3,
        48, 100, -45,
-       101, 101, 348,
-       102, 122, 103
+       101, 101, 355,
+       102, 122, 106
 };
-static const int lexer_goto_row309[] = {
+static const int lexer_goto_row316[] = {
        3,
-       48, 115, -115,
-       116, 116, 349,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 356,
+       117, 122, 106
 };
-static const int lexer_goto_row310[] = {
+static const int lexer_goto_row317[] = {
        3,
        48, 101, -42,
-       102, 102, 350,
-       103, 122, 103
+       102, 102, 357,
+       103, 122, 106
 };
-static const int lexer_goto_row311[] = {
+static const int lexer_goto_row318[] = {
        3,
-       48, 99, -107,
-       100, 100, 351,
-       101, 122, 103
+       48, 99, -110,
+       100, 100, 358,
+       101, 122, 106
 };
-static const int lexer_goto_row312[] = {
+static const int lexer_goto_row319[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row313[] = {
+static const int lexer_goto_row320[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row314[] = {
+static const int lexer_goto_row321[] = {
        3,
        48, 100, -45,
-       101, 101, 352,
-       102, 122, 103
+       101, 101, 359,
+       102, 122, 106
 };
-static const int lexer_goto_row315[] = {
+static const int lexer_goto_row322[] = {
        3,
        48, 97, -35,
-       98, 98, 353,
-       99, 122, 103
+       98, 98, 360,
+       99, 122, 106
 };
-static const int lexer_goto_row316[] = {
+static const int lexer_goto_row323[] = {
        4,
        48, 95, -35,
-       97, 102, 103,
-       103, 103, 354,
-       104, 122, 103
+       97, 102, 106,
+       103, 103, 361,
+       104, 122, 106
 };
-static const int lexer_goto_row317[] = {
+static const int lexer_goto_row324[] = {
        3,
-       48, 115, -115,
-       116, 116, 355,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 362,
+       117, 122, 106
 };
-static const int lexer_goto_row318[] = {
+static const int lexer_goto_row325[] = {
        3,
-       48, 98, -129,
-       99, 99, 356,
-       100, 122, 103
+       48, 98, -132,
+       99, 99, 363,
+       100, 122, 106
 };
-static const int lexer_goto_row319[] = {
+static const int lexer_goto_row326[] = {
        3,
-       48, 98, -129,
-       99, 99, 357,
-       100, 122, 103
+       48, 98, -132,
+       99, 99, 364,
+       100, 122, 106
 };
-static const int lexer_goto_row320[] = {
+static const int lexer_goto_row327[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row321[] = {
+static const int lexer_goto_row328[] = {
        3,
        48, 109, -46,
-       110, 110, 358,
-       111, 122, 103
+       110, 110, 365,
+       111, 122, 106
 };
-static const int lexer_goto_row322[] = {
+static const int lexer_goto_row329[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row323[] = {
+static const int lexer_goto_row330[] = {
        3,
        48, 113, -36,
-       114, 114, 359,
-       115, 122, 103
+       114, 114, 366,
+       115, 122, 106
 };
-static const int lexer_goto_row324[] = {
+static const int lexer_goto_row331[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row325[] = {
+static const int lexer_goto_row332[] = {
        1,
-       0, 255, -281
+       0, 255, -291
 };
-static const int lexer_goto_row326[] = {
+static const int lexer_goto_row333[] = {
        1,
-       0, 255, -283
+       0, 255, -293
 };
-static const int lexer_goto_row327[] = {
+static const int lexer_goto_row334[] = {
        3,
-       0, 9, 360,
-       11, 12, 360,
-       14, 255, 360
+       0, 9, 367,
+       11, 12, 367,
+       14, 255, 367
 };
-static const int lexer_goto_row328[] = {
+static const int lexer_goto_row335[] = {
        1,
-       0, 255, -285
+       0, 255, -295
 };
-static const int lexer_goto_row329[] = {
+static const int lexer_goto_row336[] = {
        3,
-       0, 33, -281,
-       34, 34, 361,
-       35, 255, -283
+       0, 33, -291,
+       34, 34, 368,
+       35, 255, -293
 };
-static const int lexer_goto_row330[] = {
+static const int lexer_goto_row337[] = {
        3,
-       0, 122, -285,
-       123, 123, 362,
-       124, 255, 324
+       0, 122, -295,
+       123, 123, 369,
+       124, 255, 331
 };
-static const int lexer_goto_row331[] = {
+static const int lexer_goto_row338[] = {
        1,
-       0, 255, -225
+       0, 255, -234
 };
-static const int lexer_goto_row332[] = {
+static const int lexer_goto_row339[] = {
        3,
-       0, 33, -281,
-       34, 34, 363,
-       35, 255, -283
+       0, 33, -291,
+       34, 34, 370,
+       35, 255, -293
 };
-static const int lexer_goto_row333[] = {
+static const int lexer_goto_row340[] = {
        3,
-       0, 122, -285,
-       123, 123, 364,
-       124, 255, 324
+       0, 122, -295,
+       123, 123, 371,
+       124, 255, 331
 };
-static const int lexer_goto_row334[] = {
+static const int lexer_goto_row341[] = {
        1,
-       34, 34, 365
+       34, 34, 372
 };
-static const int lexer_goto_row335[] = {
+static const int lexer_goto_row342[] = {
        1,
-       0, 255, -290
+       0, 255, -300
 };
-static const int lexer_goto_row336[] = {
+static const int lexer_goto_row343[] = {
        1,
-       0, 255, -286
+       0, 255, -296
 };
-static const int lexer_goto_row337[] = {
+static const int lexer_goto_row344[] = {
        1,
-       123, 123, 366
+       123, 123, 373
 };
-static const int lexer_goto_row338[] = {
+static const int lexer_goto_row345[] = {
        1,
-       0, 255, -155
+       0, 255, -158
 };
-static const int lexer_goto_row339[] = {
+static const int lexer_goto_row346[] = {
        1,
-       0, 255, -155
+       0, 255, -158
 };
-static const int lexer_goto_row340[] = {
+static const int lexer_goto_row347[] = {
        1,
-       0, 255, -155
+       0, 255, -158
 };
-static const int lexer_goto_row342[] = {
+static const int lexer_goto_row349[] = {
        3,
-       0, 9, 367,
-       11, 12, 367,
-       14, 255, 367
+       0, 9, 374,
+       11, 12, 374,
+       14, 255, 374
 };
-static const int lexer_goto_row343[] = {
+static const int lexer_goto_row350[] = {
        1,
-       0, 255, -155
+       0, 255, -158
 };
-static const int lexer_goto_row344[] = {
+static const int lexer_goto_row351[] = {
        1,
-       103, 103, 368
+       103, 103, 375
 };
-static const int lexer_goto_row345[] = {
+static const int lexer_goto_row352[] = {
        3,
-       48, 98, -129,
-       99, 99, 369,
-       100, 122, 103
+       48, 98, -132,
+       99, 99, 376,
+       100, 122, 106
 };
-static const int lexer_goto_row346[] = {
+static const int lexer_goto_row353[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row347[] = {
+static const int lexer_goto_row354[] = {
        3,
-       48, 116, -138,
-       117, 117, 370,
-       118, 122, 103
+       48, 116, -141,
+       117, 117, 377,
+       118, 122, 106
 };
-static const int lexer_goto_row348[] = {
+static const int lexer_goto_row355[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row349[] = {
+static const int lexer_goto_row356[] = {
        3,
-       48, 114, -108,
-       115, 115, 371,
-       116, 122, 103
+       48, 114, -111,
+       115, 115, 378,
+       116, 122, 106
 };
-static const int lexer_goto_row350[] = {
+static const int lexer_goto_row357[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row351[] = {
+static const int lexer_goto_row358[] = {
        3,
        48, 95, -35,
-       97, 97, 372,
-       98, 122, 103
+       97, 97, 379,
+       98, 122, 106
 };
-static const int lexer_goto_row352[] = {
+static const int lexer_goto_row359[] = {
        3,
        48, 100, -45,
-       101, 101, 373,
-       102, 122, 103
+       101, 101, 380,
+       102, 122, 106
 };
-static const int lexer_goto_row353[] = {
+static const int lexer_goto_row360[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row354[] = {
+static const int lexer_goto_row361[] = {
        3,
        48, 107, -37,
-       108, 108, 374,
-       109, 122, 103
+       108, 108, 381,
+       109, 122, 106
 };
-static const int lexer_goto_row355[] = {
+static const int lexer_goto_row362[] = {
        3,
        48, 100, -45,
-       101, 101, 375,
-       102, 122, 103
+       101, 101, 382,
+       102, 122, 106
 };
-static const int lexer_goto_row356[] = {
+static const int lexer_goto_row363[] = {
        3,
        48, 100, -45,
-       101, 101, 376,
-       102, 122, 103
+       101, 101, 383,
+       102, 122, 106
 };
-static const int lexer_goto_row357[] = {
+static const int lexer_goto_row364[] = {
        3,
-       48, 115, -115,
-       116, 116, 377,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 384,
+       117, 122, 106
 };
-static const int lexer_goto_row358[] = {
+static const int lexer_goto_row365[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row359[] = {
+static const int lexer_goto_row366[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row360[] = {
+static const int lexer_goto_row367[] = {
        3,
-       48, 114, -108,
-       115, 115, 378,
-       116, 122, 103
+       48, 114, -111,
+       115, 115, 385,
+       116, 122, 106
 };
-static const int lexer_goto_row361[] = {
+static const int lexer_goto_row368[] = {
        1,
-       0, 255, -281
+       0, 255, -291
 };
-static const int lexer_goto_row362[] = {
+static const int lexer_goto_row369[] = {
        1,
-       34, 34, 379
+       34, 34, 386
 };
-static const int lexer_goto_row363[] = {
+static const int lexer_goto_row370[] = {
        1,
-       0, 255, -334
+       0, 255, -341
 };
-static const int lexer_goto_row364[] = {
+static const int lexer_goto_row371[] = {
        1,
-       0, 255, -330
+       0, 255, -337
 };
-static const int lexer_goto_row365[] = {
+static const int lexer_goto_row372[] = {
        1,
-       123, 123, 380
+       123, 123, 387
 };
-static const int lexer_goto_row366[] = {
+static const int lexer_goto_row373[] = {
        1,
-       34, 34, 365
+       34, 34, 372
 };
-static const int lexer_goto_row367[] = {
+static const int lexer_goto_row374[] = {
        1,
-       123, 123, 366
+       123, 123, 373
 };
-static const int lexer_goto_row368[] = {
+static const int lexer_goto_row375[] = {
        1,
-       0, 255, -155
+       0, 255, -158
 };
-static const int lexer_goto_row369[] = {
+static const int lexer_goto_row376[] = {
        1,
-       95, 95, 381
+       95, 95, 388
 };
-static const int lexer_goto_row370[] = {
+static const int lexer_goto_row377[] = {
        3,
-       48, 115, -115,
-       116, 116, 382,
-       117, 122, 103
+       48, 115, -118,
+       116, 116, 389,
+       117, 122, 106
 };
-static const int lexer_goto_row371[] = {
+static const int lexer_goto_row378[] = {
        3,
        48, 100, -45,
-       101, 101, 383,
-       102, 122, 103
+       101, 101, 390,
+       102, 122, 106
 };
-static const int lexer_goto_row372[] = {
+static const int lexer_goto_row379[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row373[] = {
+static const int lexer_goto_row380[] = {
        3,
-       48, 98, -129,
-       99, 99, 384,
-       100, 122, 103
+       48, 98, -132,
+       99, 99, 391,
+       100, 122, 106
 };
-static const int lexer_goto_row374[] = {
+static const int lexer_goto_row381[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row375[] = {
+static const int lexer_goto_row382[] = {
        3,
        48, 100, -45,
-       101, 101, 385,
-       102, 122, 103
+       101, 101, 392,
+       102, 122, 106
 };
-static const int lexer_goto_row376[] = {
+static const int lexer_goto_row383[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row377[] = {
+static const int lexer_goto_row384[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row378[] = {
+static const int lexer_goto_row385[] = {
        3,
        48, 100, -45,
-       101, 101, 386,
-       102, 122, 103
+       101, 101, 393,
+       102, 122, 106
 };
-static const int lexer_goto_row379[] = {
+static const int lexer_goto_row386[] = {
        3,
        48, 95, -35,
-       97, 97, 387,
-       98, 122, 103
+       97, 97, 394,
+       98, 122, 106
 };
-static const int lexer_goto_row380[] = {
+static const int lexer_goto_row387[] = {
        1,
-       34, 34, 379
+       34, 34, 386
 };
-static const int lexer_goto_row381[] = {
+static const int lexer_goto_row388[] = {
        1,
-       123, 123, 380
+       123, 123, 387
 };
-static const int lexer_goto_row382[] = {
+static const int lexer_goto_row389[] = {
        1,
-       95, 95, 388
+       95, 95, 395
 };
-static const int lexer_goto_row383[] = {
+static const int lexer_goto_row390[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row384[] = {
+static const int lexer_goto_row391[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row385[] = {
+static const int lexer_goto_row392[] = {
        3,
        48, 100, -45,
-       101, 101, 389,
-       102, 122, 103
+       101, 101, 396,
+       102, 122, 106
 };
-static const int lexer_goto_row386[] = {
+static const int lexer_goto_row393[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row387[] = {
+static const int lexer_goto_row394[] = {
        3,
-       48, 99, -107,
-       100, 100, 390,
-       101, 122, 103
+       48, 99, -110,
+       100, 100, 397,
+       101, 122, 106
 };
-static const int lexer_goto_row388[] = {
+static const int lexer_goto_row395[] = {
        3,
        48, 107, -37,
-       108, 108, 391,
-       109, 122, 103
+       108, 108, 398,
+       109, 122, 106
 };
-static const int lexer_goto_row390[] = {
+static const int lexer_goto_row397[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row391[] = {
+static const int lexer_goto_row398[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row392[] = {
+static const int lexer_goto_row399[] = {
        1,
        48, 122, -41
 };
@@ -2095,20 +2125,20 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row84,
        lexer_goto_row85,
        lexer_goto_row86,
-       lexer_goto_row_null,
+       lexer_goto_row87,
        lexer_goto_row88,
        lexer_goto_row89,
        lexer_goto_row_null,
-       lexer_goto_row_null,
+       lexer_goto_row91,
        lexer_goto_row92,
-       lexer_goto_row93,
-       lexer_goto_row94,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
        lexer_goto_row95,
        lexer_goto_row96,
-       lexer_goto_row_null,
+       lexer_goto_row97,
        lexer_goto_row98,
        lexer_goto_row99,
-       lexer_goto_row100,
+       lexer_goto_row_null,
        lexer_goto_row101,
        lexer_goto_row102,
        lexer_goto_row103,
@@ -2151,24 +2181,24 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row140,
        lexer_goto_row141,
        lexer_goto_row142,
-       lexer_goto_row_null,
+       lexer_goto_row143,
        lexer_goto_row144,
+       lexer_goto_row145,
        lexer_goto_row_null,
-       lexer_goto_row146,
+       lexer_goto_row147,
        lexer_goto_row_null,
-       lexer_goto_row148,
+       lexer_goto_row149,
        lexer_goto_row_null,
-       lexer_goto_row150,
        lexer_goto_row151,
        lexer_goto_row_null,
-       lexer_goto_row_null,
+       lexer_goto_row153,
        lexer_goto_row154,
-       lexer_goto_row155,
        lexer_goto_row_null,
        lexer_goto_row_null,
+       lexer_goto_row157,
        lexer_goto_row158,
-       lexer_goto_row159,
-       lexer_goto_row160,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
        lexer_goto_row161,
        lexer_goto_row162,
        lexer_goto_row163,
@@ -2178,19 +2208,19 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row167,
        lexer_goto_row168,
        lexer_goto_row169,
-       lexer_goto_row_null,
-       lexer_goto_row_null,
-       lexer_goto_row_null,
-       lexer_goto_row_null,
+       lexer_goto_row170,
+       lexer_goto_row171,
+       lexer_goto_row172,
+       lexer_goto_row173,
        lexer_goto_row174,
        lexer_goto_row175,
-       lexer_goto_row176,
+       lexer_goto_row_null,
        lexer_goto_row177,
        lexer_goto_row178,
-       lexer_goto_row179,
-       lexer_goto_row180,
-       lexer_goto_row181,
-       lexer_goto_row182,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
        lexer_goto_row183,
        lexer_goto_row184,
        lexer_goto_row185,
@@ -2244,24 +2274,24 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row233,
        lexer_goto_row234,
        lexer_goto_row235,
-       lexer_goto_row_null,
+       lexer_goto_row236,
        lexer_goto_row237,
        lexer_goto_row238,
        lexer_goto_row239,
        lexer_goto_row240,
        lexer_goto_row241,
        lexer_goto_row242,
-       lexer_goto_row_null,
+       lexer_goto_row243,
        lexer_goto_row244,
-       lexer_goto_row245,
-       lexer_goto_row246,
-       lexer_goto_row247,
-       lexer_goto_row248,
-       lexer_goto_row249,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
        lexer_goto_row250,
        lexer_goto_row251,
        lexer_goto_row252,
-       lexer_goto_row253,
+       lexer_goto_row_null,
        lexer_goto_row254,
        lexer_goto_row255,
        lexer_goto_row256,
@@ -2304,9 +2334,9 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row293,
        lexer_goto_row294,
        lexer_goto_row295,
-       lexer_goto_row_null,
-       lexer_goto_row_null,
-       lexer_goto_row_null,
+       lexer_goto_row296,
+       lexer_goto_row297,
+       lexer_goto_row298,
        lexer_goto_row299,
        lexer_goto_row300,
        lexer_goto_row301,
@@ -2349,14 +2379,14 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row338,
        lexer_goto_row339,
        lexer_goto_row340,
-       lexer_goto_row_null,
+       lexer_goto_row341,
        lexer_goto_row342,
        lexer_goto_row343,
        lexer_goto_row344,
        lexer_goto_row345,
        lexer_goto_row346,
        lexer_goto_row347,
-       lexer_goto_row348,
+       lexer_goto_row_null,
        lexer_goto_row349,
        lexer_goto_row350,
        lexer_goto_row351,
@@ -2397,37 +2427,44 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row386,
        lexer_goto_row387,
        lexer_goto_row388,
-       lexer_goto_row_null,
+       lexer_goto_row389,
        lexer_goto_row390,
        lexer_goto_row391,
-       lexer_goto_row392
+       lexer_goto_row392,
+       lexer_goto_row393,
+       lexer_goto_row394,
+       lexer_goto_row395,
+       lexer_goto_row_null,
+       lexer_goto_row397,
+       lexer_goto_row398,
+       lexer_goto_row399
 };
 
 const int lexer_accept_table[] = {
-       -1,0,1,1,0,94,114,2,80,83,-1,53,54,77,75,57,76,74,79,100,100,58,96,87,60,90,95,97,55,56,82,-1,-1,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,81,114,84,1,86,114,109,-1,110,2,2,2,65,69,115,115,115,78,63,61,62,73,108,64,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,59,89,88,85,91,92,97,97,97,97,68,-1,99,-1,98,98,98,98,98,98,47,98,98,98,16,98,98,98,98,98,98,23,98,29,15,98,98,98,98,98,98,98,31,98,98,98,98,98,98,98,98,98,98,98,98,98,67,114,112,-1,111,114,109,114,114,2,113,114,115,66,72,102,102,102,-1,-1,108,103,103,101,101,101,101,104,70,93,71,-1,99,99,99,99,-1,-1,-1,98,98,30,98,98,98,98,98,10,98,98,98,28,11,98,98,98,40,98,98,98,98,39,32,98,98,98,98,98,98,98,98,98,98,98,98,98,98,17,98,98,114,114,114,114,114,-1,-1,-1,114,114,114,-1,-1,113,-1,-1,-1,-1,-1,-1,116,98,98,98,98,98,98,25,9,98,98,98,98,13,98,98,98,98,27,98,46,41,98,98,98,98,98,98,43,98,24,44,12,98,98,51,114,-1,-1,112,-1,111,-1,-1,114,-1,-1,114,114,114,-1,-1,114,106,107,105,-1,37,98,98,36,6,98,98,45,98,98,98,98,49,50,98,98,98,98,98,98,14,98,42,98,26,-1,-1,-1,-1,-1,-1,114,-1,-1,109,-1,-1,110,114,114,114,109,-1,114,-1,98,38,98,18,98,5,98,98,4,98,98,98,98,19,34,98,-1,112,-1,-1,111,109,110,114,-1,98,98,33,98,22,98,3,21,98,98,112,111,-1,7,35,98,48,98,98,52,8,20,9
+       -1,0,1,1,0,94,107,2,80,83,-1,53,54,77,75,57,76,74,79,100,100,58,96,87,60,90,95,97,55,56,82,-1,-1,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,81,107,84,1,86,107,102,-1,103,2,2,2,65,69,108,108,108,78,63,61,62,73,101,64,-1,100,-1,-1,-1,-1,100,-1,-1,-1,-1,-1,-1,59,89,88,85,91,92,97,97,97,97,68,-1,99,-1,98,98,98,98,98,98,47,98,98,98,16,98,98,98,98,98,98,23,98,29,15,98,98,98,98,98,98,98,31,98,98,98,98,98,98,98,98,98,98,98,98,98,67,107,105,-1,104,107,102,107,107,2,106,107,108,66,72,100,100,100,-1,-1,101,100,100,100,100,100,100,100,-1,-1,100,-1,-1,100,70,93,71,-1,99,99,99,99,-1,-1,-1,98,98,30,98,98,98,98,98,10,98,98,98,28,11,98,98,98,40,98,98,98,98,39,32,98,98,98,98,98,98,98,98,98,98,98,98,98,98,17,98,98,107,107,107,107,107,-1,-1,-1,107,107,107,-1,-1,106,100,100,100,100,-1,-1,-1,109,98,98,98,98,98,98,25,9,98,98,98,98,13,98,98,98,98,27,98,46,41,98,98,98,98,98,98,43,98,24,44,12,98,98,51,107,-1,-1,105,-1,104,-1,-1,107,-1,-1,107,107,107,-1,-1,107,-1,37,98,98,36,6,98,98,45,98,98,98,98,49,50,98,98,98,98,98,98,14,98,42,98,26,-1,-1,-1,-1,-1,-1,107,-1,-1,102,-1,-1,103,107,107,107,102,-1,107,-1,98,38,98,18,98,5,98,98,4,98,98,98,98,19,34,98,-1,105,-1,-1,104,102,103,107,-1,98,98,33,98,22,98,3,21,98,98,105,104,-1,7,35,98,48,98,98,52,8,20,9
 };
 
 static int parser_action_row1[] = {
        7,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 493,
+       28, 1, 486,
        95, 0, 3,
-       115, 1, 493,
-       116, 1, 22
+       108, 1, 486,
+       109, 1, 22
 };
 static int parser_action_row2[] = {
        1,
-       -1, 1, 495
+       -1, 1, 488
 };
 static int parser_action_row3[] = {
        1,
-       -1, 1, 1112
+       -1, 1, 1084
 };
 static int parser_action_row4[] = {
        4,
-       -1, 1, 483,
+       -1, 1, 476,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
@@ -2435,25 +2472,25 @@ static int parser_action_row4[] = {
 static int parser_action_row5[] = {
        2,
        -1, 3, 4,
-       116, 2, -1
+       109, 2, -1
 };
 static int parser_action_row6[] = {
        7,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 493,
+       28, 1, 486,
        95, 0, 3,
-       115, 1, 493,
-       116, 1, 22
+       108, 1, 486,
+       109, 1, 22
 };
 static int parser_action_row7[] = {
        1,
-       -1, 1, 1078
+       -1, 1, 1050
 };
 static int parser_action_row8[] = {
        1,
-       -1, 1, 1082
+       -1, 1, 1054
 };
 static int parser_action_row9[] = {
        1,
@@ -2469,15 +2506,15 @@ static int parser_action_row11[] = {
 };
 static int parser_action_row12[] = {
        1,
-       -1, 1, 1080
+       -1, 1, 1052
 };
 static int parser_action_row13[] = {
        2,
-       -1, 1, 492,
-       116, 1, 23
+       -1, 1, 485,
+       109, 1, 23
 };
 static int parser_action_row14[] = {
-       39,
+       32,
        -1, 1, 30,
        12, 0, 31,
        13, 0, 32,
@@ -2493,7 +2530,7 @@ static int parser_action_row14[] = {
        36, 0, 42,
        37, 0, 43,
        38, 0, 44,
-       41, 1, 464,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
@@ -2504,113 +2541,106 @@ static int parser_action_row14[] = {
        54, 0, 52,
        96, 0, 53,
        97, 0, 54,
-       98, 1, 464,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
 static int parser_action_row15[] = {
        3,
        -1, 3, 14,
-       28, 0, 90,
-       115, 0, 91
+       28, 0, 83,
+       108, 0, 84
 };
 static int parser_action_row16[] = {
        1,
-       -1, 1, 1114
+       -1, 1, 1086
 };
 static int parser_action_row17[] = {
        4,
        -1, 3, 16,
-       0, 0, 94,
-       1, 0, 95,
-       95, 0, 96
+       0, 0, 87,
+       1, 0, 88,
+       95, 0, 89
 };
 static int parser_action_row18[] = {
        1,
-       -1, 1, 494
+       -1, 1, 487
 };
 static int parser_action_row19[] = {
        7,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 493,
+       28, 1, 486,
        95, 0, 3,
-       115, 1, 493,
-       116, 1, 22
+       108, 1, 486,
+       109, 1, 22
 };
 static int parser_action_row20[] = {
        7,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 493,
+       28, 1, 486,
        95, 0, 3,
-       115, 1, 493,
-       116, 1, 22
+       108, 1, 486,
+       109, 1, 22
 };
 static int parser_action_row21[] = {
        5,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       116, 1, 22
+       109, 1, 22
 };
 static int parser_action_row22[] = {
        7,
-       -1, 1, 480,
-       0, 0, 108,
-       1, 0, 109,
-       9, 1, 1075,
-       28, 1, 1075,
-       95, 0, 110,
-       115, 1, 1075
+       -1, 1, 473,
+       0, 0, 101,
+       1, 0, 102,
+       9, 1, 1047,
+       28, 1, 1047,
+       95, 0, 103,
+       108, 1, 1047
 };
 static int parser_action_row23[] = {
        7,
-       -1, 1, 482,
+       -1, 1, 475,
        0, 0, 1,
        1, 0, 2,
-       9, 1, 1077,
-       28, 1, 1077,
-       95, 0, 111,
-       115, 1, 1077
+       9, 1, 1049,
+       28, 1, 1049,
+       95, 0, 104,
+       108, 1, 1049
 };
 static int parser_action_row24[] = {
        1,
-       -1, 1, 487
+       -1, 1, 480
 };
 static int parser_action_row25[] = {
        4,
-       -1, 1, 480,
-       0, 0, 108,
-       1, 0, 109,
-       95, 0, 110
+       -1, 1, 473,
+       0, 0, 101,
+       1, 0, 102,
+       95, 0, 103
 };
 static int parser_action_row26[] = {
        4,
-       -1, 1, 482,
+       -1, 1, 475,
        0, 0, 1,
        1, 0, 2,
-       95, 0, 111
+       95, 0, 104
 };
 static int parser_action_row27[] = {
        1,
        -1, 1, 1
 };
 static int parser_action_row28[] = {
-       39,
+       32,
        -1, 1, 30,
        12, 0, 31,
        13, 0, 32,
@@ -2626,7 +2656,7 @@ static int parser_action_row28[] = {
        36, 0, 42,
        37, 0, 43,
        38, 0, 44,
-       41, 1, 464,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
@@ -2637,94 +2667,80 @@ static int parser_action_row28[] = {
        54, 0, 52,
        96, 0, 53,
        97, 0, 54,
-       98, 1, 464,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
 static int parser_action_row29[] = {
        7,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 493,
+       28, 1, 486,
        95, 0, 3,
-       115, 1, 493,
-       116, 1, 22
+       108, 1, 486,
+       109, 1, 22
 };
 static int parser_action_row30[] = {
        7,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 493,
+       28, 1, 486,
        95, 0, 3,
-       115, 1, 493,
-       116, 1, 22
+       108, 1, 486,
+       109, 1, 22
 };
 static int parser_action_row31[] = {
        5,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       116, 1, 22
+       109, 1, 22
 };
 static int parser_action_row32[] = {
-       33,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+       26,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 353,
        73, 1, 353,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
 static int parser_action_row33[] = {
        1,
        -1, 1, 31
 };
 static int parser_action_row34[] = {
-       40,
-       -1, 1, 464,
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 169,
+       9, 0, 155,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -2753,38 +2769,31 @@ static int parser_action_row34[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
 static int parser_action_row35[] = {
        2,
        -1, 3, 34,
-       97, 0, 174
+       97, 0, 160
 };
 static int parser_action_row36[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row37[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row38[] = {
-       40,
-       -1, 1, 464,
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 169,
+       9, 0, 155,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -2813,448 +2822,385 @@ static int parser_action_row38[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
 static int parser_action_row39[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row40[] = {
-       32,
+       25,
        -1, 1, 169,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
 static int parser_action_row41[] = {
        2,
        -1, 1, 174,
-       49, 0, 209
+       49, 0, 195
 };
 static int parser_action_row42[] = {
        2,
        -1, 1, 171,
-       49, 0, 209
+       49, 0, 195
 };
 static int parser_action_row43[] = {
        1,
        -1, 1, 173
 };
 static int parser_action_row44[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 212,
+       97, 0, 198,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
 static int parser_action_row45[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row46[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
 static int parser_action_row47[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
 static int parser_action_row48[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
 static int parser_action_row49[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
 static int parser_action_row50[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row51[] = {
        2,
        -1, 3, 50,
-       11, 0, 223
+       11, 0, 209
 };
 static int parser_action_row52[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row53[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row54[] = {
        2,
        -1, 3, 53,
-       58, 0, 226
+       58, 0, 212
 };
 static int parser_action_row55[] = {
-       46,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+       39,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 341,
-       58, 0, 227,
-       59, 0, 228,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       58, 0, 213,
+       59, 0, 214,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 341,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
 static int parser_action_row56[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
 static int parser_action_row57[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
 static int parser_action_row58[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
 static int parser_action_row59[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
+       1,
+       -1, 1, 396
 };
 static int parser_action_row60[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
 static int parser_action_row61[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row62[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row63[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row64[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row65[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row66[] = {
-       1,
-       -1, 1, 403
-};
-static int parser_action_row67[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row68[] = {
        5,
        -1, 1, 81,
-       18, 0, 254,
-       19, 0, 255,
-       20, 0, 256,
-       21, 0, 257
+       18, 0, 233,
+       19, 0, 234,
+       20, 0, 235,
+       21, 0, 236
 };
-static int parser_action_row69[] = {
+static int parser_action_row62[] = {
        1,
        -1, 1, 24
 };
-static int parser_action_row70[] = {
+static int parser_action_row63[] = {
        1,
        -1, 1, 25
 };
-static int parser_action_row71[] = {
+static int parser_action_row64[] = {
        4,
        -1, 1, 160,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row72[] = {
+static int parser_action_row65[] = {
        1,
        -1, 1, 167
 };
-static int parser_action_row73[] = {
+static int parser_action_row66[] = {
        1,
        -1, 1, 168
 };
-static int parser_action_row74[] = {
+static int parser_action_row67[] = {
        1,
        -1, 1, 176
 };
-static int parser_action_row75[] = {
+static int parser_action_row68[] = {
        1,
        -1, 1, 177
 };
-static int parser_action_row76[] = {
+static int parser_action_row69[] = {
        1,
        -1, 1, 179
 };
-static int parser_action_row77[] = {
+static int parser_action_row70[] = {
        1,
        -1, 1, 178
 };
-static int parser_action_row78[] = {
+static int parser_action_row71[] = {
        1,
        -1, 1, 180
 };
-static int parser_action_row79[] = {
+static int parser_action_row72[] = {
        1,
        -1, 1, 181
 };
-static int parser_action_row80[] = {
+static int parser_action_row73[] = {
        1,
        -1, 1, 182
 };
-static int parser_action_row81[] = {
+static int parser_action_row74[] = {
        3,
-       -1, 3, 80,
-       54, 0, 262,
-       73, 0, 263
+       -1, 3, 73,
+       54, 0, 241,
+       73, 0, 242
 };
-static int parser_action_row82[] = {
+static int parser_action_row75[] = {
        1,
        -1, 1, 329
 };
-static int parser_action_row83[] = {
+static int parser_action_row76[] = {
        1,
-       -1, 1, 385
+       -1, 1, 378
 };
-static int parser_action_row84[] = {
+static int parser_action_row77[] = {
        1,
-       -1, 1, 384
+       -1, 1, 377
 };
-static int parser_action_row85[] = {
+static int parser_action_row78[] = {
        3,
-       -1, 3, 84,
-       110, 0, 265,
-       111, 0, 266
+       -1, 3, 77,
+       103, 0, 244,
+       104, 0, 245
 };
-static int parser_action_row86[] = {
+static int parser_action_row79[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row87[] = {
+static int parser_action_row80[] = {
        3,
-       -1, 3, 86,
-       41, 0, 272,
-       98, 0, 273
+       -1, 3, 79,
+       41, 0, 251,
+       98, 0, 252
 };
-static int parser_action_row88[] = {
+static int parser_action_row81[] = {
        1,
-       -1, 1, 1110
+       -1, 1, 1082
 };
-static int parser_action_row89[] = {
+static int parser_action_row82[] = {
        3,
-       -1, 1, 461,
-       12, 0, 274,
-       97, 0, 275
+       -1, 1, 454,
+       12, 0, 253,
+       97, 0, 254
 };
-static int parser_action_row90[] = {
+static int parser_action_row83[] = {
        4,
-       -1, 1, 463,
-       12, 0, 276,
+       -1, 1, 456,
+       12, 0, 255,
        96, 0, 53,
-       97, 0, 277
+       97, 0, 256
 };
-static int parser_action_row91[] = {
+static int parser_action_row84[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row92[] = {
+static int parser_action_row85[] = {
        1,
        -1, 1, 141
 };
-static int parser_action_row93[] = {
+static int parser_action_row86[] = {
        2,
-       -1, 3, 92,
-       115, 0, 281
+       -1, 3, 85,
+       108, 0, 260
 };
-static int parser_action_row94[] = {
+static int parser_action_row87[] = {
        1,
        -1, 1, 145
 };
-static int parser_action_row95[] = {
+static int parser_action_row88[] = {
        1,
-       -1, 1, 478
+       -1, 1, 471
 };
-static int parser_action_row96[] = {
+static int parser_action_row89[] = {
        1,
-       -1, 1, 477
+       -1, 1, 470
 };
-static int parser_action_row97[] = {
+static int parser_action_row90[] = {
        1,
-       -1, 1, 479
+       -1, 1, 472
 };
-static int parser_action_row98[] = {
+static int parser_action_row91[] = {
        1,
        -1, 1, 20
 };
-static int parser_action_row99[] = {
+static int parser_action_row92[] = {
        1,
-       -1, 1, 1079
+       -1, 1, 1051
 };
-static int parser_action_row100[] = {
+static int parser_action_row93[] = {
        1,
        -1, 1, 2
 };
-static int parser_action_row101[] = {
+static int parser_action_row94[] = {
        7,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 493,
+       28, 1, 486,
        95, 0, 3,
-       115, 1, 493,
-       116, 1, 22
+       108, 1, 486,
+       109, 1, 22
 };
-static int parser_action_row102[] = {
+static int parser_action_row95[] = {
        5,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       116, 1, 22
+       109, 1, 22
 };
-static int parser_action_row103[] = {
+static int parser_action_row96[] = {
        1,
        -1, 1, 4
 };
-static int parser_action_row104[] = {
+static int parser_action_row97[] = {
        1,
-       -1, 1, 1081
+       -1, 1, 1053
 };
-static int parser_action_row105[] = {
-       39,
+static int parser_action_row98[] = {
+       32,
        -1, 1, 30,
        12, 0, 31,
        13, 0, 32,
@@ -3270,7 +3216,7 @@ static int parser_action_row105[] = {
        36, 0, 42,
        37, 0, 43,
        38, 0, 44,
-       41, 1, 464,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
@@ -3281,488 +3227,418 @@ static int parser_action_row105[] = {
        54, 0, 52,
        96, 0, 53,
        97, 0, 54,
-       98, 1, 464,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row106[] = {
+static int parser_action_row99[] = {
        5,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       116, 1, 22
+       109, 1, 22
 };
-static int parser_action_row107[] = {
+static int parser_action_row100[] = {
        1,
-       -1, 1, 1083
+       -1, 1, 1055
 };
-static int parser_action_row108[] = {
+static int parser_action_row101[] = {
        1,
        -1, 1, 8
 };
-static int parser_action_row109[] = {
+static int parser_action_row102[] = {
        1,
-       -1, 1, 496
+       -1, 1, 489
 };
-static int parser_action_row110[] = {
+static int parser_action_row103[] = {
        1,
-       -1, 1, 1113
+       -1, 1, 1085
 };
-static int parser_action_row111[] = {
+static int parser_action_row104[] = {
        4,
-       -1, 1, 485,
+       -1, 1, 478,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row112[] = {
+static int parser_action_row105[] = {
        4,
-       -1, 1, 484,
+       -1, 1, 477,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row113[] = {
+static int parser_action_row106[] = {
        1,
-       -1, 1, 1115
+       -1, 1, 1087
 };
-static int parser_action_row114[] = {
+static int parser_action_row107[] = {
        7,
-       -1, 1, 481,
-       0, 0, 108,
-       1, 0, 109,
-       9, 1, 1076,
-       28, 1, 1076,
-       95, 0, 289,
-       115, 1, 1076
+       -1, 1, 474,
+       0, 0, 101,
+       1, 0, 102,
+       9, 1, 1048,
+       28, 1, 1048,
+       95, 0, 268,
+       108, 1, 1048
 };
-static int parser_action_row115[] = {
+static int parser_action_row108[] = {
        4,
-       -1, 1, 481,
-       0, 0, 108,
-       1, 0, 109,
-       95, 0, 289
+       -1, 1, 474,
+       0, 0, 101,
+       1, 0, 102,
+       95, 0, 268
 };
-static int parser_action_row116[] = {
+static int parser_action_row109[] = {
        5,
        -1, 1, 81,
-       18, 0, 254,
-       19, 0, 255,
-       20, 0, 256,
-       21, 0, 257
+       18, 0, 233,
+       19, 0, 234,
+       20, 0, 235,
+       21, 0, 236
 };
-static int parser_action_row117[] = {
+static int parser_action_row110[] = {
        1,
        -1, 1, 3
 };
-static int parser_action_row118[] = {
+static int parser_action_row111[] = {
        7,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 493,
+       28, 1, 486,
        95, 0, 3,
-       115, 1, 493,
-       116, 1, 22
+       108, 1, 486,
+       109, 1, 22
 };
-static int parser_action_row119[] = {
+static int parser_action_row112[] = {
        5,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       116, 1, 22
+       109, 1, 22
 };
-static int parser_action_row120[] = {
+static int parser_action_row113[] = {
        1,
        -1, 1, 5
 };
-static int parser_action_row121[] = {
+static int parser_action_row114[] = {
        5,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       116, 1, 22
+       109, 1, 22
 };
-static int parser_action_row122[] = {
+static int parser_action_row115[] = {
        1,
        -1, 1, 9
 };
-static int parser_action_row123[] = {
+static int parser_action_row116[] = {
        2,
-       -1, 1, 780,
-       52, 0, 295
+       -1, 1, 766,
+       52, 0, 274
 };
-static int parser_action_row124[] = {
+static int parser_action_row117[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row125[] = {
+static int parser_action_row118[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row126[] = {
+static int parser_action_row119[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row127[] = {
+static int parser_action_row120[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row128[] = {
+static int parser_action_row121[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row129[] = {
+static int parser_action_row122[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row130[] = {
+static int parser_action_row123[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row131[] = {
+static int parser_action_row124[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row132[] = {
-       21,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 305,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row125[] = {
+       14,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 284,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row133[] = {
+static int parser_action_row126[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row134[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row127[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row135[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row128[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row136[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row129[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row137[] = {
+static int parser_action_row130[] = {
        3,
-       -1, 1, 768,
-       52, 0, 295,
-       58, 0, 227
-};
-static int parser_action_row138[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row139[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row140[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row141[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row142[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row143[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row144[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 754,
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row145[] = {
+static int parser_action_row131[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row146[] = {
+static int parser_action_row132[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row147[] = {
+static int parser_action_row133[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row148[] = {
+static int parser_action_row134[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row149[] = {
+static int parser_action_row135[] = {
        1,
-       -1, 1, 811
+       -1, 1, 790
 };
-static int parser_action_row150[] = {
+static int parser_action_row136[] = {
        1,
        -1, 1, 352
 };
-static int parser_action_row151[] = {
+static int parser_action_row137[] = {
        1,
        -1, 1, 193
 };
-static int parser_action_row152[] = {
+static int parser_action_row138[] = {
        3,
-       -1, 3, 151,
-       41, 0, 324,
-       98, 0, 325
+       -1, 3, 137,
+       41, 0, 296,
+       98, 0, 297
 };
-static int parser_action_row153[] = {
+static int parser_action_row139[] = {
        2,
-       -1, 1, 461,
-       97, 0, 326
+       -1, 1, 454,
+       97, 0, 298
 };
-static int parser_action_row154[] = {
+static int parser_action_row140[] = {
        1,
-       -1, 1, 446
+       -1, 1, 439
 };
-static int parser_action_row155[] = {
+static int parser_action_row141[] = {
        4,
-       -1, 1, 710,
-       29, 0, 327,
-       30, 0, 328,
-       32, 0, 329
+       -1, 1, 696,
+       29, 0, 299,
+       30, 0, 300,
+       32, 0, 301
 };
-static int parser_action_row156[] = {
+static int parser_action_row142[] = {
        1,
-       -1, 1, 712
+       -1, 1, 698
 };
-static int parser_action_row157[] = {
+static int parser_action_row143[] = {
        1,
-       -1, 1, 717
+       -1, 1, 703
 };
-static int parser_action_row158[] = {
+static int parser_action_row144[] = {
        10,
-       -1, 1, 719,
-       39, 0, 330,
-       80, 0, 331,
-       84, 0, 332,
-       85, 0, 333,
-       86, 0, 334,
-       87, 0, 335,
-       89, 0, 336,
-       90, 0, 337,
-       92, 0, 338
+       -1, 1, 705,
+       39, 0, 302,
+       80, 0, 303,
+       84, 0, 304,
+       85, 0, 305,
+       86, 0, 306,
+       87, 0, 307,
+       89, 0, 308,
+       90, 0, 309,
+       92, 0, 310
 };
-static int parser_action_row159[] = {
+static int parser_action_row145[] = {
        2,
-       -1, 1, 728,
-       81, 0, 339
+       -1, 1, 714,
+       81, 0, 311
 };
-static int parser_action_row160[] = {
+static int parser_action_row146[] = {
        2,
-       -1, 1, 730,
-       82, 0, 340
+       -1, 1, 716,
+       82, 0, 312
 };
-static int parser_action_row161[] = {
+static int parser_action_row147[] = {
        3,
-       -1, 1, 732,
-       88, 0, 341,
-       91, 0, 342
+       -1, 1, 718,
+       88, 0, 313,
+       91, 0, 314
 };
-static int parser_action_row162[] = {
+static int parser_action_row148[] = {
        3,
-       -1, 1, 734,
-       74, 0, 343,
-       75, 0, 344
+       -1, 1, 720,
+       74, 0, 315,
+       75, 0, 316
 };
-static int parser_action_row163[] = {
+static int parser_action_row149[] = {
        4,
-       -1, 1, 737,
-       76, 0, 345,
-       78, 0, 346,
-       79, 0, 347
+       -1, 1, 723,
+       76, 0, 317,
+       78, 0, 318,
+       79, 0, 319
 };
-static int parser_action_row164[] = {
+static int parser_action_row150[] = {
        1,
-       -1, 1, 740
+       -1, 1, 726
 };
-static int parser_action_row165[] = {
+static int parser_action_row151[] = {
        2,
-       -1, 1, 744,
-       77, 0, 348
+       -1, 1, 730,
+       77, 0, 320
 };
-static int parser_action_row166[] = {
+static int parser_action_row152[] = {
        1,
-       -1, 1, 746
+       -1, 1, 732
 };
-static int parser_action_row167[] = {
+static int parser_action_row153[] = {
        3,
-       -1, 1, 751,
-       54, 0, 262,
-       73, 0, 349
+       -1, 1, 737,
+       54, 0, 241,
+       73, 0, 321
 };
-static int parser_action_row168[] = {
+static int parser_action_row154[] = {
        1,
-       -1, 1, 756
+       -1, 1, 742
 };
-static int parser_action_row169[] = {
+static int parser_action_row155[] = {
        3,
-       -1, 1, 463,
+       -1, 1, 456,
        96, 0, 53,
-       97, 0, 351
+       97, 0, 323
 };
-static int parser_action_row170[] = {
+static int parser_action_row156[] = {
        2,
        -1, 1, 158,
-       49, 1, 1005
+       49, 1, 977
 };
-static int parser_action_row171[] = {
+static int parser_action_row157[] = {
        1,
        -1, 1, 257
 };
-static int parser_action_row172[] = {
+static int parser_action_row158[] = {
        1,
        -1, 1, 159
 };
-static int parser_action_row173[] = {
-       37,
-       -1, 1, 464,
-       9, 0, 353,
+static int parser_action_row159[] = {
+       30,
+       -1, 1, 457,
+       9, 0, 325,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -3790,152 +3666,131 @@ static int parser_action_row173[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row174[] = {
+static int parser_action_row160[] = {
        2,
-       -1, 3, 173,
-       49, 0, 209
+       -1, 3, 159,
+       49, 0, 195
 };
-static int parser_action_row175[] = {
+static int parser_action_row161[] = {
        3,
        -1, 1, 155,
-       57, 0, 357,
-       94, 0, 216
+       57, 0, 329,
+       94, 0, 202
 };
-static int parser_action_row176[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row162[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row177[] = {
+static int parser_action_row163[] = {
        3,
-       -1, 1, 1075,
-       0, 0, 108,
-       1, 0, 109
+       -1, 1, 1047,
+       0, 0, 101,
+       1, 0, 102
 };
-static int parser_action_row178[] = {
+static int parser_action_row164[] = {
        3,
-       -1, 1, 1077,
+       -1, 1, 1049,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row179[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row165[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row180[] = {
+static int parser_action_row166[] = {
        1,
        -1, 1, 268
 };
-static int parser_action_row181[] = {
+static int parser_action_row167[] = {
        2,
-       -1, 3, 180,
-       49, 0, 209
+       -1, 3, 166,
+       49, 0, 195
 };
-static int parser_action_row182[] = {
+static int parser_action_row168[] = {
        3,
-       -1, 3, 181,
-       52, 0, 364,
-       97, 0, 365
+       -1, 3, 167,
+       52, 0, 336,
+       97, 0, 337
 };
-static int parser_action_row183[] = {
+static int parser_action_row169[] = {
        2,
        -1, 1, 353,
-       52, 0, 295
+       52, 0, 274
 };
-static int parser_action_row184[] = {
+static int parser_action_row170[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row185[] = {
+static int parser_action_row171[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row186[] = {
+static int parser_action_row172[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row187[] = {
+static int parser_action_row173[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row188[] = {
-       23,
-       -1, 1, 464,
-       12, 0, 182,
+static int parser_action_row174[] = {
+       16,
+       -1, 1, 457,
+       12, 0, 168,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
@@ -3944,670 +3799,572 @@ static int parser_action_row188[] = {
        52, 0, 51,
        54, 0, 52,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row189[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row175[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row190[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row176[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row191[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row177[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row192[] = {
+static int parser_action_row178[] = {
        3,
        -1, 1, 341,
-       52, 0, 295,
-       58, 0, 227
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row193[] = {
+static int parser_action_row179[] = {
        1,
        -1, 1, 170
 };
-static int parser_action_row194[] = {
+static int parser_action_row180[] = {
        4,
        -1, 1, 283,
-       29, 0, 378,
-       30, 0, 379,
-       32, 0, 380
+       29, 0, 350,
+       30, 0, 351,
+       32, 0, 352
 };
-static int parser_action_row195[] = {
+static int parser_action_row181[] = {
        1,
        -1, 1, 285
 };
-static int parser_action_row196[] = {
+static int parser_action_row182[] = {
        1,
        -1, 1, 290
 };
-static int parser_action_row197[] = {
+static int parser_action_row183[] = {
        10,
        -1, 1, 292,
-       39, 0, 381,
-       80, 0, 382,
-       84, 0, 383,
-       85, 0, 384,
-       86, 0, 385,
-       87, 0, 386,
-       89, 0, 387,
-       90, 0, 388,
-       92, 0, 389
+       39, 0, 353,
+       80, 0, 354,
+       84, 0, 355,
+       85, 0, 356,
+       86, 0, 357,
+       87, 0, 358,
+       89, 0, 359,
+       90, 0, 360,
+       92, 0, 361
 };
-static int parser_action_row198[] = {
+static int parser_action_row184[] = {
        2,
        -1, 1, 301,
-       81, 0, 390
+       81, 0, 362
 };
-static int parser_action_row199[] = {
+static int parser_action_row185[] = {
        2,
        -1, 1, 303,
-       82, 0, 391
+       82, 0, 363
 };
-static int parser_action_row200[] = {
+static int parser_action_row186[] = {
        3,
        -1, 1, 305,
-       88, 0, 392,
-       91, 0, 393
+       88, 0, 364,
+       91, 0, 365
 };
-static int parser_action_row201[] = {
+static int parser_action_row187[] = {
        3,
        -1, 1, 307,
-       74, 0, 394,
-       75, 0, 395
+       74, 0, 366,
+       75, 0, 367
 };
-static int parser_action_row202[] = {
+static int parser_action_row188[] = {
        4,
        -1, 1, 310,
-       76, 0, 396,
-       78, 0, 397,
-       79, 0, 398
+       76, 0, 368,
+       78, 0, 369,
+       79, 0, 370
 };
-static int parser_action_row203[] = {
+static int parser_action_row189[] = {
        1,
        -1, 1, 313
 };
-static int parser_action_row204[] = {
+static int parser_action_row190[] = {
        2,
        -1, 1, 317,
-       77, 0, 399
+       77, 0, 371
 };
-static int parser_action_row205[] = {
+static int parser_action_row191[] = {
        1,
        -1, 1, 319
 };
-static int parser_action_row206[] = {
+static int parser_action_row192[] = {
        3,
        -1, 1, 324,
-       54, 0, 262,
-       73, 0, 400
+       54, 0, 241,
+       73, 0, 372
 };
-static int parser_action_row207[] = {
+static int parser_action_row193[] = {
        3,
-       -1, 3, 206,
-       41, 0, 402,
-       98, 0, 403
+       -1, 3, 192,
+       41, 0, 374,
+       98, 0, 375
 };
-static int parser_action_row208[] = {
+static int parser_action_row194[] = {
        2,
-       -1, 1, 461,
-       97, 0, 404
+       -1, 1, 454,
+       97, 0, 376
 };
-static int parser_action_row209[] = {
+static int parser_action_row195[] = {
        3,
-       -1, 1, 463,
+       -1, 1, 456,
        96, 0, 53,
-       97, 0, 405
+       97, 0, 377
 };
-static int parser_action_row210[] = {
+static int parser_action_row196[] = {
        2,
        -1, 1, 201,
-       97, 0, 407
+       97, 0, 379
 };
-static int parser_action_row211[] = {
+static int parser_action_row197[] = {
        1,
        -1, 1, 175
 };
-static int parser_action_row212[] = {
+static int parser_action_row198[] = {
        1,
        -1, 1, 172
 };
-static int parser_action_row213[] = {
+static int parser_action_row199[] = {
        4,
        -1, 1, 341,
-       52, 0, 295,
-       57, 0, 408,
-       58, 0, 227
+       52, 0, 274,
+       57, 0, 380,
+       58, 0, 213
 };
-static int parser_action_row214[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row200[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row215[] = {
+static int parser_action_row201[] = {
        2,
        -1, 1, 280,
-       24, 0, 410
+       24, 0, 382
 };
-static int parser_action_row216[] = {
+static int parser_action_row202[] = {
        3,
-       -1, 3, 215,
-       47, 0, 411,
-       96, 0, 412
+       -1, 3, 201,
+       47, 0, 383,
+       96, 0, 384
 };
-static int parser_action_row217[] = {
+static int parser_action_row203[] = {
        3,
        -1, 1, 30,
        13, 0, 32,
-       52, 0, 414
+       52, 0, 386
 };
-static int parser_action_row218[] = {
+static int parser_action_row204[] = {
        1,
-       -1, 1, 410
+       -1, 1, 403
 };
-static int parser_action_row219[] = {
+static int parser_action_row205[] = {
        1,
        -1, 1, 369
 };
-static int parser_action_row220[] = {
+static int parser_action_row206[] = {
        1,
        -1, 1, 370
 };
-static int parser_action_row221[] = {
+static int parser_action_row207[] = {
        1,
        -1, 1, 371
 };
-static int parser_action_row222[] = {
+static int parser_action_row208[] = {
        1,
        -1, 1, 372
 };
-static int parser_action_row223[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row209[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 417,
+       97, 0, 389,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row224[] = {
+static int parser_action_row210[] = {
        3,
-       -1, 3, 223,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 209,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row225[] = {
-       60,
-       -1, 1, 464,
-       12, 0, 182,
+static int parser_action_row211[] = {
+       53,
+       -1, 1, 457,
+       12, 0, 168,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 183,
+       22, 0, 169,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 184,
-       33, 0, 423,
-       34, 0, 424,
-       35, 0, 425,
-       36, 0, 426,
+       31, 0, 170,
+       33, 0, 395,
+       34, 0, 396,
+       35, 0, 397,
+       36, 0, 398,
        37, 0, 43,
-       38, 0, 185,
-       40, 0, 186,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 420,
-       48, 0, 187,
+       47, 0, 392,
+       48, 0, 173,
        50, 0, 49,
-       51, 0, 427,
+       51, 0, 399,
        52, 0, 51,
-       54, 0, 428,
-       74, 0, 429,
-       75, 0, 430,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 438,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       94, 0, 216,
-       96, 0, 448,
-       97, 0, 449,
+       54, 0, 400,
+       74, 0, 401,
+       75, 0, 402,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 410,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       94, 0, 202,
+       96, 0, 420,
+       97, 0, 421,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row226[] = {
-       31,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 470,
-       27, 0, 471,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row212[] = {
+       24,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 442,
+       27, 0, 443,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row227[] = {
+static int parser_action_row213[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row228[] = {
+static int parser_action_row214[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row229[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row215[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row230[] = {
+static int parser_action_row216[] = {
        1,
        -1, 1, 245
 };
-static int parser_action_row231[] = {
+static int parser_action_row217[] = {
        1,
        -1, 1, 246
 };
-static int parser_action_row232[] = {
+static int parser_action_row218[] = {
        1,
        -1, 1, 247
 };
-static int parser_action_row233[] = {
+static int parser_action_row219[] = {
        1,
        -1, 1, 248
 };
-static int parser_action_row234[] = {
+static int parser_action_row220[] = {
        1,
        -1, 1, 249
 };
-static int parser_action_row235[] = {
+static int parser_action_row221[] = {
        1,
        -1, 1, 250
 };
-static int parser_action_row236[] = {
+static int parser_action_row222[] = {
        1,
        -1, 1, 251
 };
-static int parser_action_row237[] = {
+static int parser_action_row223[] = {
        1,
        -1, 1, 252
 };
-static int parser_action_row238[] = {
+static int parser_action_row224[] = {
        1,
        -1, 1, 253
 };
-static int parser_action_row239[] = {
+static int parser_action_row225[] = {
        1,
        -1, 1, 254
 };
-static int parser_action_row240[] = {
+static int parser_action_row226[] = {
        1,
        -1, 1, 255
 };
-static int parser_action_row241[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row227[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row242[] = {
+static int parser_action_row228[] = {
        13,
        -1, 1, 340,
-       59, 0, 479,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       59, 0, 451,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row243[] = {
+static int parser_action_row229[] = {
        1,
        -1, 1, 187
 };
-static int parser_action_row244[] = {
+static int parser_action_row230[] = {
        1,
        -1, 1, 373
 };
-static int parser_action_row245[] = {
+static int parser_action_row231[] = {
        1,
        -1, 1, 374
 };
-static int parser_action_row246[] = {
-       1,
-       -1, 1, 375
-};
-static int parser_action_row247[] = {
+static int parser_action_row232[] = {
        1,
        -1, 1, 376
 };
-static int parser_action_row248[] = {
-       1,
-       -1, 1, 377
-};
-static int parser_action_row249[] = {
-       1,
-       -1, 1, 378
-};
-static int parser_action_row250[] = {
-       1,
-       -1, 1, 379
-};
-static int parser_action_row251[] = {
-       1,
-       -1, 1, 380
-};
-static int parser_action_row252[] = {
-       1,
-       -1, 1, 381
-};
-static int parser_action_row253[] = {
-       1,
-       -1, 1, 383
-};
-static int parser_action_row254[] = {
+static int parser_action_row233[] = {
        1,
-       -1, 1, 382
+       -1, 1, 375
 };
-static int parser_action_row255[] = {
+static int parser_action_row234[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row256[] = {
+static int parser_action_row235[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row257[] = {
+static int parser_action_row236[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row258[] = {
+static int parser_action_row237[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row259[] = {
+static int parser_action_row238[] = {
        9,
-       -1, 3, 258,
-       3, 0, 485,
-       4, 0, 486,
-       5, 0, 487,
-       6, 0, 488,
-       7, 0, 489,
-       8, 0, 490,
-       10, 0, 491,
-       17, 0, 492
+       -1, 3, 237,
+       3, 0, 457,
+       4, 0, 458,
+       5, 0, 459,
+       6, 0, 460,
+       7, 0, 461,
+       8, 0, 462,
+       10, 0, 463,
+       17, 0, 464
 };
-static int parser_action_row260[] = {
+static int parser_action_row239[] = {
        1,
-       -1, 1, 1096
+       -1, 1, 1068
 };
-static int parser_action_row261[] = {
-       38,
+static int parser_action_row240[] = {
+       31,
        -1, 1, 162,
        12, 0, 31,
        15, 0, 33,
@@ -4622,7 +4379,7 @@ static int parser_action_row261[] = {
        36, 0, 42,
        37, 0, 43,
        38, 0, 44,
-       41, 1, 464,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
@@ -4633,1232 +4390,1106 @@ static int parser_action_row261[] = {
        54, 0, 52,
        96, 0, 53,
        97, 0, 54,
-       98, 1, 464,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row262[] = {
+static int parser_action_row241[] = {
        4,
        -1, 1, 161,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row263[] = {
+static int parser_action_row242[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row264[] = {
+static int parser_action_row243[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row265[] = {
+static int parser_action_row244[] = {
        13,
        -1, 1, 354,
-       59, 0, 499,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       59, 0, 471,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row266[] = {
+static int parser_action_row245[] = {
        1,
-       -1, 1, 406
+       -1, 1, 399
 };
-static int parser_action_row267[] = {
+static int parser_action_row246[] = {
        1,
-       -1, 1, 407
+       -1, 1, 400
 };
-static int parser_action_row268[] = {
+static int parser_action_row247[] = {
        1,
-       -1, 1, 1102
+       -1, 1, 1074
 };
-static int parser_action_row269[] = {
+static int parser_action_row248[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row270[] = {
+static int parser_action_row249[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row271[] = {
+static int parser_action_row250[] = {
        3,
-       -1, 3, 270,
-       110, 0, 265,
-       111, 0, 266
+       -1, 3, 249,
+       103, 0, 244,
+       104, 0, 245
 };
-static int parser_action_row272[] = {
-       32,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row251[] = {
+       25,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       110, 1, 402,
-       111, 1, 402,
-       112, 0, 66
+       103, 1, 395,
+       104, 1, 395,
+       105, 0, 59
 };
-static int parser_action_row273[] = {
-       33,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row252[] = {
+       26,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 349,
        73, 1, 349,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row274[] = {
+static int parser_action_row253[] = {
        13,
        -1, 1, 331,
-       59, 0, 508,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       59, 0, 480,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row275[] = {
-       31,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 510,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row254[] = {
+       24,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 482,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row276[] = {
-       45,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row255[] = {
+       38,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 343,
-       59, 0, 512,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       59, 0, 484,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 343,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row277[] = {
-       31,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 510,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row256[] = {
+       24,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 482,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row278[] = {
-       46,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
-       54, 1, 347,
-       58, 0, 227,
-       59, 0, 517,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+static int parser_action_row257[] = {
+       39,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
+       54, 1, 347,
+       58, 0, 213,
+       59, 0, 489,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 347,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row279[] = {
+static int parser_action_row258[] = {
        1,
-       -1, 1, 1111
+       -1, 1, 1083
 };
-static int parser_action_row280[] = {
+static int parser_action_row259[] = {
        3,
-       -1, 1, 462,
-       12, 0, 521,
-       97, 0, 522
+       -1, 1, 455,
+       12, 0, 493,
+       97, 0, 494
 };
-static int parser_action_row281[] = {
+static int parser_action_row260[] = {
        2,
-       -1, 3, 280,
-       108, 0, 523
+       -1, 3, 259,
+       101, 0, 495
 };
-static int parser_action_row282[] = {
+static int parser_action_row261[] = {
        1,
        -1, 1, 142
 };
-static int parser_action_row283[] = {
+static int parser_action_row262[] = {
        1,
        -1, 1, 6
 };
-static int parser_action_row284[] = {
+static int parser_action_row263[] = {
        5,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       116, 1, 22
+       109, 1, 22
 };
-static int parser_action_row285[] = {
+static int parser_action_row264[] = {
        1,
        -1, 1, 10
 };
-static int parser_action_row286[] = {
+static int parser_action_row265[] = {
        5,
        -1, 1, 81,
-       18, 0, 254,
-       19, 0, 255,
-       20, 0, 256,
-       21, 0, 257
+       18, 0, 233,
+       19, 0, 234,
+       20, 0, 235,
+       21, 0, 236
 };
-static int parser_action_row287[] = {
+static int parser_action_row266[] = {
        1,
        -1, 1, 12
 };
-static int parser_action_row288[] = {
+static int parser_action_row267[] = {
        1,
-       -1, 1, 489
+       -1, 1, 482
 };
-static int parser_action_row289[] = {
+static int parser_action_row268[] = {
        1,
-       -1, 1, 488
+       -1, 1, 481
 };
-static int parser_action_row290[] = {
+static int parser_action_row269[] = {
        4,
-       -1, 1, 486,
+       -1, 1, 479,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row291[] = {
+static int parser_action_row270[] = {
        8,
-       -1, 3, 290,
-       4, 0, 486,
-       5, 0, 487,
-       6, 0, 488,
-       7, 0, 489,
-       8, 0, 490,
-       10, 0, 491,
-       17, 0, 492
+       -1, 3, 269,
+       4, 0, 458,
+       5, 0, 459,
+       6, 0, 460,
+       7, 0, 461,
+       8, 0, 462,
+       10, 0, 463,
+       17, 0, 464
 };
-static int parser_action_row292[] = {
+static int parser_action_row271[] = {
        1,
        -1, 1, 7
 };
-static int parser_action_row293[] = {
+static int parser_action_row272[] = {
        5,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       116, 1, 22
+       109, 1, 22
 };
-static int parser_action_row294[] = {
+static int parser_action_row273[] = {
        1,
        -1, 1, 11
 };
-static int parser_action_row295[] = {
+static int parser_action_row274[] = {
        1,
        -1, 1, 13
 };
-static int parser_action_row296[] = {
+static int parser_action_row275[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row297[] = {
+static int parser_action_row276[] = {
        1,
-       -1, 1, 779
+       -1, 1, 765
 };
-static int parser_action_row298[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row277[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row299[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 122,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row278[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 115,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row300[] = {
+static int parser_action_row279[] = {
        3,
-       -1, 3, 299,
-       47, 0, 411,
-       96, 0, 412
+       -1, 3, 278,
+       47, 0, 383,
+       96, 0, 384
 };
-static int parser_action_row301[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row280[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row302[] = {
+static int parser_action_row281[] = {
        1,
-       -1, 1, 796
+       -1, 1, 782
 };
-static int parser_action_row303[] = {
+static int parser_action_row282[] = {
        1,
-       -1, 1, 797
+       -1, 1, 783
 };
-static int parser_action_row304[] = {
+static int parser_action_row283[] = {
        1,
-       -1, 1, 798
+       -1, 1, 784
 };
-static int parser_action_row305[] = {
+static int parser_action_row284[] = {
        1,
-       -1, 1, 799
+       -1, 1, 785
 };
-static int parser_action_row306[] = {
+static int parser_action_row285[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row307[] = {
+static int parser_action_row286[] = {
        3,
-       -1, 3, 306,
-       41, 0, 324,
-       98, 0, 534
+       -1, 3, 285,
+       41, 0, 296,
+       98, 0, 506
 };
-static int parser_action_row308[] = {
+static int parser_action_row287[] = {
        3,
-       -1, 3, 307,
-       54, 0, 262,
-       73, 0, 535
+       -1, 3, 286,
+       54, 0, 241,
+       73, 0, 507
 };
-static int parser_action_row309[] = {
-       31,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row288[] = {
+       24,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
-       53, 0, 536,
+       53, 0, 508,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 537,
+       97, 0, 509,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
-};
-static int parser_action_row310[] = {
-       1,
-       -1, 1, 748
-};
-static int parser_action_row311[] = {
-       1,
-       -1, 1, 747
-};
-static int parser_action_row312[] = {
-       1,
-       -1, 1, 749
-};
-static int parser_action_row313[] = {
-       1,
-       -1, 1, 767
-};
-static int parser_action_row314[] = {
-       1,
-       -1, 1, 800
-};
-static int parser_action_row315[] = {
-       1,
-       -1, 1, 801
-};
-static int parser_action_row316[] = {
-       1,
-       -1, 1, 802
+       105, 0, 59
 };
-static int parser_action_row317[] = {
+static int parser_action_row289[] = {
        1,
-       -1, 1, 803
+       -1, 1, 734
 };
-static int parser_action_row318[] = {
+static int parser_action_row290[] = {
        1,
-       -1, 1, 804
+       -1, 1, 733
 };
-static int parser_action_row319[] = {
+static int parser_action_row291[] = {
        1,
-       -1, 1, 805
+       -1, 1, 735
 };
-static int parser_action_row320[] = {
+static int parser_action_row292[] = {
        1,
-       -1, 1, 806
+       -1, 1, 753
 };
-static int parser_action_row321[] = {
+static int parser_action_row293[] = {
        1,
-       -1, 1, 807
+       -1, 1, 786
 };
-static int parser_action_row322[] = {
+static int parser_action_row294[] = {
        1,
-       -1, 1, 808
+       -1, 1, 787
 };
-static int parser_action_row323[] = {
+static int parser_action_row295[] = {
        1,
-       -1, 1, 810
+       -1, 1, 789
 };
-static int parser_action_row324[] = {
+static int parser_action_row296[] = {
        1,
-       -1, 1, 809
+       -1, 1, 788
 };
-static int parser_action_row325[] = {
+static int parser_action_row297[] = {
        2,
-       -1, 1, 776,
-       52, 0, 295
+       -1, 1, 762,
+       52, 0, 274
 };
-static int parser_action_row326[] = {
+static int parser_action_row298[] = {
        1,
-       -1, 1, 758
+       -1, 1, 744
 };
-static int parser_action_row327[] = {
+static int parser_action_row299[] = {
        2,
-       -1, 1, 770,
-       52, 0, 295
+       -1, 1, 756,
+       52, 0, 274
 };
-static int parser_action_row328[] = {
+static int parser_action_row300[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row329[] = {
+static int parser_action_row301[] = {
        4,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       24, 0, 544
+       24, 0, 516
 };
-static int parser_action_row330[] = {
+static int parser_action_row302[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row331[] = {
+static int parser_action_row303[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row332[] = {
+static int parser_action_row304[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row333[] = {
+static int parser_action_row305[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row334[] = {
+static int parser_action_row306[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row335[] = {
+static int parser_action_row307[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row336[] = {
+static int parser_action_row308[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row337[] = {
+static int parser_action_row309[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row338[] = {
+static int parser_action_row310[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row339[] = {
+static int parser_action_row311[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row340[] = {
+static int parser_action_row312[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row341[] = {
+static int parser_action_row313[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row342[] = {
+static int parser_action_row314[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row343[] = {
+static int parser_action_row315[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row344[] = {
+static int parser_action_row316[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row345[] = {
+static int parser_action_row317[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row346[] = {
+static int parser_action_row318[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row347[] = {
+static int parser_action_row319[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row348[] = {
+static int parser_action_row320[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row349[] = {
+static int parser_action_row321[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row350[] = {
+static int parser_action_row322[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row351[] = {
+static int parser_action_row323[] = {
        1,
-       -1, 1, 781
+       -1, 1, 767
 };
-static int parser_action_row352[] = {
+static int parser_action_row324[] = {
        3,
-       -1, 1, 774,
-       52, 0, 295,
-       58, 0, 227
+       -1, 1, 760,
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row353[] = {
+static int parser_action_row325[] = {
        2,
-       -1, 1, 462,
-       97, 0, 568
+       -1, 1, 455,
+       97, 0, 540
 };
-static int parser_action_row354[] = {
+static int parser_action_row326[] = {
        2,
        -1, 1, 157,
-       49, 1, 1004
+       49, 1, 976
 };
-static int parser_action_row355[] = {
+static int parser_action_row327[] = {
        2,
        -1, 1, 156,
-       49, 1, 1003
+       49, 1, 975
 };
-static int parser_action_row356[] = {
+static int parser_action_row328[] = {
        4,
-       -1, 3, 355,
+       -1, 3, 327,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row357[] = {
+static int parser_action_row329[] = {
        1,
        -1, 1, 256
 };
-static int parser_action_row358[] = {
+static int parser_action_row330[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row359[] = {
+static int parser_action_row331[] = {
        2,
        -1, 1, 203,
-       59, 0, 572
+       59, 0, 544
 };
-static int parser_action_row360[] = {
+static int parser_action_row332[] = {
        2,
        -1, 1, 155,
-       57, 0, 357
+       57, 0, 329
 };
-static int parser_action_row361[] = {
+static int parser_action_row333[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row362[] = {
+static int parser_action_row334[] = {
        3,
-       -1, 1, 1076,
-       0, 0, 108,
-       1, 0, 109
+       -1, 1, 1048,
+       0, 0, 101,
+       1, 0, 102
 };
-static int parser_action_row363[] = {
+static int parser_action_row335[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row364[] = {
+static int parser_action_row336[] = {
        1,
        -1, 1, 267
 };
-static int parser_action_row365[] = {
+static int parser_action_row337[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row366[] = {
+static int parser_action_row338[] = {
        1,
-       -1, 1, 455
+       -1, 1, 448
 };
-static int parser_action_row367[] = {
+static int parser_action_row339[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row368[] = {
+static int parser_action_row340[] = {
        2,
-       -1, 1, 454,
-       56, 0, 578
+       -1, 1, 447,
+       56, 0, 550
 };
-static int parser_action_row369[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row341[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row370[] = {
-       29,
-       -1, 1, 464,
-       12, 0, 182,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row342[] = {
+       22,
+       -1, 1, 457,
+       12, 0, 168,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row371[] = {
+static int parser_action_row343[] = {
        3,
-       -1, 3, 370,
-       47, 0, 411,
-       96, 0, 412
+       -1, 3, 342,
+       47, 0, 383,
+       96, 0, 384
 };
-static int parser_action_row372[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row344[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row373[] = {
+static int parser_action_row345[] = {
        3,
-       -1, 3, 372,
-       54, 0, 262,
-       73, 0, 583
+       -1, 3, 344,
+       54, 0, 241,
+       73, 0, 555
 };
-static int parser_action_row374[] = {
+static int parser_action_row346[] = {
        3,
-       -1, 3, 373,
-       41, 0, 402,
-       98, 0, 584
+       -1, 3, 345,
+       41, 0, 374,
+       98, 0, 556
 };
-static int parser_action_row375[] = {
+static int parser_action_row347[] = {
        1,
        -1, 1, 321
 };
-static int parser_action_row376[] = {
+static int parser_action_row348[] = {
        1,
        -1, 1, 320
 };
-static int parser_action_row377[] = {
+static int parser_action_row349[] = {
        1,
        -1, 1, 322
 };
-static int parser_action_row378[] = {
+static int parser_action_row350[] = {
        1,
        -1, 1, 340
 };
-static int parser_action_row379[] = {
+static int parser_action_row351[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row380[] = {
+static int parser_action_row352[] = {
        4,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       24, 0, 586
+       24, 0, 558
 };
-static int parser_action_row381[] = {
+static int parser_action_row353[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row382[] = {
+static int parser_action_row354[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row383[] = {
+static int parser_action_row355[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row384[] = {
+static int parser_action_row356[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row385[] = {
+static int parser_action_row357[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row386[] = {
+static int parser_action_row358[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row387[] = {
+static int parser_action_row359[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row388[] = {
+static int parser_action_row360[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row389[] = {
+static int parser_action_row361[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row390[] = {
+static int parser_action_row362[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row391[] = {
+static int parser_action_row363[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row392[] = {
+static int parser_action_row364[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row393[] = {
+static int parser_action_row365[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row394[] = {
+static int parser_action_row366[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row395[] = {
+static int parser_action_row367[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row396[] = {
+static int parser_action_row368[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row397[] = {
+static int parser_action_row369[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row398[] = {
+static int parser_action_row370[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row399[] = {
+static int parser_action_row371[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row400[] = {
+static int parser_action_row372[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row401[] = {
+static int parser_action_row373[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row402[] = {
+static int parser_action_row374[] = {
        1,
        -1, 1, 354
 };
-static int parser_action_row403[] = {
+static int parser_action_row375[] = {
        2,
        -1, 1, 349,
-       52, 0, 295
+       52, 0, 274
 };
-static int parser_action_row404[] = {
+static int parser_action_row376[] = {
        1,
        -1, 1, 331
 };
-static int parser_action_row405[] = {
+static int parser_action_row377[] = {
        2,
        -1, 1, 343,
-       52, 0, 295
+       52, 0, 274
 };
-static int parser_action_row406[] = {
+static int parser_action_row378[] = {
        3,
        -1, 1, 347,
-       52, 0, 295,
-       58, 0, 227
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row407[] = {
+static int parser_action_row379[] = {
        2,
-       -1, 1, 462,
-       97, 0, 611
+       -1, 1, 455,
+       97, 0, 583
 };
-static int parser_action_row408[] = {
+static int parser_action_row380[] = {
        1,
        -1, 1, 202
 };
-static int parser_action_row409[] = {
+static int parser_action_row381[] = {
        1,
        -1, 1, 282
 };
-static int parser_action_row410[] = {
+static int parser_action_row382[] = {
        2,
        -1, 1, 281,
-       24, 0, 612
+       24, 0, 584
 };
-static int parser_action_row411[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row383[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -5887,667 +5518,618 @@ static int parser_action_row411[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row412[] = {
+static int parser_action_row384[] = {
        2,
-       -1, 3, 411,
-       96, 0, 616
+       -1, 3, 383,
+       96, 0, 588
 };
-static int parser_action_row413[] = {
+static int parser_action_row385[] = {
        3,
-       -1, 1, 815,
-       54, 0, 617,
-       94, 0, 618
+       -1, 1, 794,
+       54, 0, 589,
+       94, 0, 590
 };
-static int parser_action_row414[] = {
+static int parser_action_row386[] = {
        2,
-       -1, 3, 413,
-       73, 0, 621
+       -1, 3, 385,
+       73, 0, 593
 };
-static int parser_action_row415[] = {
+static int parser_action_row387[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row416[] = {
+static int parser_action_row388[] = {
        5,
        -1, 1, 81,
-       18, 0, 254,
-       19, 0, 255,
-       20, 0, 256,
-       21, 0, 257
+       18, 0, 233,
+       19, 0, 234,
+       20, 0, 235,
+       21, 0, 236
 };
-static int parser_action_row417[] = {
+static int parser_action_row389[] = {
        1,
-       -1, 1, 408
+       -1, 1, 401
 };
-static int parser_action_row418[] = {
+static int parser_action_row390[] = {
        6,
        -1, 1, 341,
-       52, 0, 295,
-       57, 0, 357,
-       58, 0, 227,
+       52, 0, 274,
+       57, 0, 329,
+       58, 0, 213,
        59, 1, 155,
-       94, 0, 216
+       94, 0, 202
 };
-static int parser_action_row419[] = {
+static int parser_action_row391[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row420[] = {
+static int parser_action_row392[] = {
        1,
        -1, 1, 277
 };
-static int parser_action_row421[] = {
+static int parser_action_row393[] = {
        2,
-       -1, 3, 420,
-       96, 0, 627
+       -1, 3, 392,
+       96, 0, 599
 };
-static int parser_action_row422[] = {
+static int parser_action_row394[] = {
        3,
-       -1, 1, 411,
-       54, 0, 628,
-       94, 0, 216
+       -1, 1, 404,
+       54, 0, 600,
+       94, 0, 202
 };
-static int parser_action_row423[] = {
+static int parser_action_row395[] = {
        2,
-       -1, 3, 422,
-       57, 0, 630
+       -1, 3, 394,
+       57, 0, 602
 };
-static int parser_action_row424[] = {
-       32,
-       -1, 1, 1011,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row396[] = {
+       25,
+       -1, 1, 983,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row425[] = {
+static int parser_action_row397[] = {
        2,
-       -1, 1, 1016,
-       49, 0, 209
+       -1, 1, 988,
+       49, 0, 195
 };
-static int parser_action_row426[] = {
+static int parser_action_row398[] = {
        2,
-       -1, 1, 1013,
-       49, 0, 209
+       -1, 1, 985,
+       49, 0, 195
 };
-static int parser_action_row427[] = {
+static int parser_action_row399[] = {
        1,
-       -1, 1, 1015
+       -1, 1, 987
 };
-static int parser_action_row428[] = {
+static int parser_action_row400[] = {
        2,
-       -1, 3, 427,
-       11, 0, 634
+       -1, 3, 399,
+       11, 0, 606
 };
-static int parser_action_row429[] = {
+static int parser_action_row401[] = {
        4,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       55, 0, 635
+       55, 0, 607
 };
-static int parser_action_row430[] = {
-       30,
-       -1, 1, 504,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row402[] = {
+       23,
+       -1, 1, 497,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row431[] = {
-       30,
-       -1, 1, 505,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row403[] = {
+       23,
+       -1, 1, 498,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row432[] = {
+static int parser_action_row404[] = {
        1,
-       -1, 1, 506
+       -1, 1, 499
 };
-static int parser_action_row433[] = {
+static int parser_action_row405[] = {
        1,
-       -1, 1, 507
+       -1, 1, 500
 };
-static int parser_action_row434[] = {
+static int parser_action_row406[] = {
        1,
-       -1, 1, 508
+       -1, 1, 501
 };
-static int parser_action_row435[] = {
+static int parser_action_row407[] = {
        1,
-       -1, 1, 509
+       -1, 1, 502
 };
-static int parser_action_row436[] = {
+static int parser_action_row408[] = {
        1,
-       -1, 1, 510
+       -1, 1, 503
 };
-static int parser_action_row437[] = {
+static int parser_action_row409[] = {
        1,
-       -1, 1, 511
+       -1, 1, 504
 };
-static int parser_action_row438[] = {
+static int parser_action_row410[] = {
        1,
-       -1, 1, 512
+       -1, 1, 505
 };
-static int parser_action_row439[] = {
-       30,
-       -1, 1, 513,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row411[] = {
+       23,
+       -1, 1, 506,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row440[] = {
+static int parser_action_row412[] = {
        1,
-       -1, 1, 514
+       -1, 1, 507
 };
-static int parser_action_row441[] = {
+static int parser_action_row413[] = {
        1,
-       -1, 1, 515
+       -1, 1, 508
 };
-static int parser_action_row442[] = {
+static int parser_action_row414[] = {
        1,
-       -1, 1, 518
+       -1, 1, 511
 };
-static int parser_action_row443[] = {
+static int parser_action_row415[] = {
        1,
-       -1, 1, 516
+       -1, 1, 509
 };
-static int parser_action_row444[] = {
+static int parser_action_row416[] = {
        1,
-       -1, 1, 520
+       -1, 1, 513
 };
-static int parser_action_row445[] = {
+static int parser_action_row417[] = {
        1,
-       -1, 1, 519
+       -1, 1, 512
 };
-static int parser_action_row446[] = {
+static int parser_action_row418[] = {
        1,
-       -1, 1, 517
+       -1, 1, 510
 };
-static int parser_action_row447[] = {
+static int parser_action_row419[] = {
        1,
-       -1, 1, 521
+       -1, 1, 514
 };
-static int parser_action_row448[] = {
+static int parser_action_row420[] = {
        1,
-       -1, 1, 523
+       -1, 1, 516
 };
-static int parser_action_row449[] = {
+static int parser_action_row421[] = {
        4,
-       -1, 1, 411,
-       54, 0, 628,
-       58, 0, 226,
-       94, 0, 216
+       -1, 1, 404,
+       54, 0, 600,
+       58, 0, 212,
+       94, 0, 202
 };
-static int parser_action_row450[] = {
+static int parser_action_row422[] = {
        15,
        -1, 1, 341,
-       52, 0, 295,
-       58, 0, 227,
-       59, 0, 636,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       52, 0, 274,
+       58, 0, 213,
+       59, 0, 608,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row451[] = {
+static int parser_action_row423[] = {
        1,
-       -1, 1, 434
+       -1, 1, 427
 };
-static int parser_action_row452[] = {
+static int parser_action_row424[] = {
        1,
-       -1, 1, 1009
+       -1, 1, 981
 };
-static int parser_action_row453[] = {
+static int parser_action_row425[] = {
        1,
-       -1, 1, 1010
+       -1, 1, 982
 };
-static int parser_action_row454[] = {
+static int parser_action_row426[] = {
        1,
-       -1, 1, 1018
+       -1, 1, 990
 };
-static int parser_action_row455[] = {
+static int parser_action_row427[] = {
        1,
-       -1, 1, 1020
+       -1, 1, 992
 };
-static int parser_action_row456[] = {
+static int parser_action_row428[] = {
        1,
-       -1, 1, 1019
+       -1, 1, 991
 };
-static int parser_action_row457[] = {
+static int parser_action_row429[] = {
        1,
-       -1, 1, 1021
+       -1, 1, 993
 };
-static int parser_action_row458[] = {
+static int parser_action_row430[] = {
        1,
-       -1, 1, 1022
+       -1, 1, 994
 };
-static int parser_action_row459[] = {
+static int parser_action_row431[] = {
        1,
-       -1, 1, 1023
+       -1, 1, 995
 };
-static int parser_action_row460[] = {
+static int parser_action_row432[] = {
        1,
-       -1, 1, 435
+       -1, 1, 428
 };
-static int parser_action_row461[] = {
+static int parser_action_row433[] = {
        3,
        -1, 1, 324,
-       54, 0, 262,
-       73, 0, 637
+       54, 0, 241,
+       73, 0, 609
 };
-static int parser_action_row462[] = {
+static int parser_action_row434[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row463[] = {
+static int parser_action_row435[] = {
        1,
-       -1, 1, 439
+       -1, 1, 432
 };
-static int parser_action_row464[] = {
+static int parser_action_row436[] = {
        4,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       56, 0, 639
+       56, 0, 611
 };
-static int parser_action_row465[] = {
+static int parser_action_row437[] = {
        3,
-       -1, 3, 464,
-       41, 0, 402,
-       98, 0, 273
+       -1, 3, 436,
+       41, 0, 374,
+       98, 0, 252
 };
-static int parser_action_row466[] = {
+static int parser_action_row438[] = {
        22,
-       -1, 1, 461,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       97, 0, 647
+       -1, 1, 454,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       97, 0, 619
 };
-static int parser_action_row467[] = {
+static int parser_action_row439[] = {
        1,
-       -1, 1, 526
+       -1, 1, 519
 };
-static int parser_action_row468[] = {
+static int parser_action_row440[] = {
        1,
-       -1, 1, 438
+       -1, 1, 431
 };
-static int parser_action_row469[] = {
+static int parser_action_row441[] = {
        1,
-       -1, 1, 436
+       -1, 1, 429
 };
-static int parser_action_row470[] = {
+static int parser_action_row442[] = {
        23,
-       -1, 1, 463,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       96, 0, 53,
-       97, 0, 649
+       -1, 1, 456,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       96, 0, 53,
+       97, 0, 621
 };
-static int parser_action_row471[] = {
+static int parser_action_row443[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row472[] = {
+static int parser_action_row444[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row473[] = {
+static int parser_action_row445[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row474[] = {
+static int parser_action_row446[] = {
        2,
        -1, 1, 155,
-       57, 0, 357
+       57, 0, 329
 };
-static int parser_action_row475[] = {
+static int parser_action_row447[] = {
        2,
-       -1, 1, 393,
-       56, 0, 656
+       -1, 1, 386,
+       56, 0, 628
 };
-static int parser_action_row476[] = {
+static int parser_action_row448[] = {
        1,
-       -1, 1, 474
+       -1, 1, 467
 };
-static int parser_action_row477[] = {
+static int parser_action_row449[] = {
        1,
-       -1, 1, 473
+       -1, 1, 466
 };
-static int parser_action_row478[] = {
+static int parser_action_row450[] = {
        1,
        -1, 1, 218
 };
-static int parser_action_row479[] = {
+static int parser_action_row451[] = {
        1,
        -1, 1, 237
 };
-static int parser_action_row480[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row452[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row481[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row453[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row482[] = {
+static int parser_action_row454[] = {
        1,
        -1, 1, 82
 };
-static int parser_action_row483[] = {
+static int parser_action_row455[] = {
        1,
        -1, 1, 84
 };
-static int parser_action_row484[] = {
+static int parser_action_row456[] = {
        1,
        -1, 1, 83
 };
-static int parser_action_row485[] = {
+static int parser_action_row457[] = {
        1,
        -1, 1, 85
 };
-static int parser_action_row486[] = {
+static int parser_action_row458[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row487[] = {
+static int parser_action_row459[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row488[] = {
+static int parser_action_row460[] = {
        1,
        -1, 1, 32
 };
-static int parser_action_row489[] = {
+static int parser_action_row461[] = {
        2,
-       -1, 3, 488,
-       5, 0, 663
+       -1, 3, 460,
+       5, 0, 635
 };
-static int parser_action_row490[] = {
+static int parser_action_row462[] = {
        1,
        -1, 1, 34
 };
-static int parser_action_row491[] = {
+static int parser_action_row463[] = {
        1,
        -1, 1, 35
 };
-static int parser_action_row492[] = {
+static int parser_action_row464[] = {
        23,
-       -1, 3, 491,
-       54, 0, 664,
-       74, 0, 665,
-       75, 0, 666,
-       76, 0, 667,
-       77, 0, 668,
-       78, 0, 669,
-       79, 0, 670,
-       80, 0, 671,
-       81, 0, 672,
-       82, 0, 673,
-       83, 0, 674,
-       84, 0, 675,
-       85, 0, 676,
-       86, 0, 677,
-       87, 0, 678,
-       88, 0, 679,
-       89, 0, 680,
-       90, 0, 681,
-       91, 0, 682,
-       92, 0, 683,
-       96, 0, 53,
-       97, 0, 684
+       -1, 3, 463,
+       54, 0, 636,
+       74, 0, 637,
+       75, 0, 638,
+       76, 0, 639,
+       77, 0, 640,
+       78, 0, 641,
+       79, 0, 642,
+       80, 0, 643,
+       81, 0, 644,
+       82, 0, 645,
+       83, 0, 646,
+       84, 0, 647,
+       85, 0, 648,
+       86, 0, 649,
+       87, 0, 650,
+       88, 0, 651,
+       89, 0, 652,
+       90, 0, 653,
+       91, 0, 654,
+       92, 0, 655,
+       96, 0, 53,
+       97, 0, 656
 };
-static int parser_action_row493[] = {
+static int parser_action_row465[] = {
        2,
-       -1, 3, 492,
-       5, 0, 689
+       -1, 3, 464,
+       5, 0, 661
 };
-static int parser_action_row494[] = {
+static int parser_action_row466[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row495[] = {
+static int parser_action_row467[] = {
        1,
        -1, 1, 166
 };
-static int parser_action_row496[] = {
+static int parser_action_row468[] = {
        1,
-       -1, 1, 1097
+       -1, 1, 1069
 };
-static int parser_action_row497[] = {
-       38,
+static int parser_action_row469[] = {
+       31,
        -1, 1, 163,
        12, 0, 31,
        15, 0, 33,
@@ -6562,7 +6144,7 @@ static int parser_action_row497[] = {
        36, 0, 42,
        37, 0, 43,
        38, 0, 44,
-       41, 1, 464,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
@@ -6573,1311 +6155,1066 @@ static int parser_action_row497[] = {
        54, 0, 52,
        96, 0, 53,
        97, 0, 54,
-       98, 1, 464,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row498[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row470[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 537,
+       97, 0, 509,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row499[] = {
+static int parser_action_row471[] = {
        5,
-       -1, 1, 464,
-       12, 0, 692,
-       46, 0, 693,
+       -1, 1, 457,
+       12, 0, 664,
+       46, 0, 665,
        96, 0, 53,
-       97, 0, 694
+       97, 0, 666
 };
-static int parser_action_row500[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row472[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row501[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row473[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row502[] = {
-       32,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row474[] = {
+       25,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       110, 1, 405,
-       111, 1, 405,
-       112, 0, 66
+       103, 1, 398,
+       104, 1, 398,
+       105, 0, 59
 };
-static int parser_action_row503[] = {
+static int parser_action_row475[] = {
        1,
-       -1, 1, 399
+       -1, 1, 392
 };
-static int parser_action_row504[] = {
+static int parser_action_row476[] = {
        1,
-       -1, 1, 1103
+       -1, 1, 1075
 };
-static int parser_action_row505[] = {
+static int parser_action_row477[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row506[] = {
+static int parser_action_row478[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row507[] = {
+static int parser_action_row479[] = {
        1,
        -1, 1, 348
 };
-static int parser_action_row508[] = {
+static int parser_action_row480[] = {
        1,
        -1, 1, 191
 };
-static int parser_action_row509[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row481[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row510[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row482[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row511[] = {
+static int parser_action_row483[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row512[] = {
+static int parser_action_row484[] = {
        1,
        -1, 1, 197
 };
-static int parser_action_row513[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row485[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row514[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row486[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row515[] = {
+static int parser_action_row487[] = {
        13,
        -1, 1, 342,
-       59, 0, 708,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       59, 0, 680,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row516[] = {
+static int parser_action_row488[] = {
        1,
        -1, 1, 188
 };
-static int parser_action_row517[] = {
+static int parser_action_row489[] = {
        1,
        -1, 1, 199
 };
-static int parser_action_row518[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row490[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row519[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row491[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row520[] = {
+static int parser_action_row492[] = {
        13,
        -1, 1, 346,
-       59, 0, 712,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       59, 0, 684,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row521[] = {
+static int parser_action_row493[] = {
        1,
        -1, 1, 190
 };
-static int parser_action_row522[] = {
-       31,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 510,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row494[] = {
+       24,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 482,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row523[] = {
-       45,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row495[] = {
+       38,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 345,
-       59, 0, 715,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       59, 0, 687,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 345,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row524[] = {
+static int parser_action_row496[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row525[] = {
+static int parser_action_row497[] = {
        1,
        -1, 1, 14
 };
-static int parser_action_row526[] = {
+static int parser_action_row498[] = {
        7,
-       -1, 3, 525,
-       5, 0, 487,
-       6, 0, 488,
-       7, 0, 489,
-       8, 0, 490,
-       10, 0, 491,
-       17, 0, 492
+       -1, 3, 497,
+       5, 0, 459,
+       6, 0, 460,
+       7, 0, 461,
+       8, 0, 462,
+       10, 0, 463,
+       17, 0, 464
 };
-static int parser_action_row527[] = {
+static int parser_action_row499[] = {
        1,
-       -1, 1, 490
+       -1, 1, 483
 };
-static int parser_action_row528[] = {
+static int parser_action_row500[] = {
        1,
        -1, 1, 15
 };
-static int parser_action_row529[] = {
-       31,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row501[] = {
+       24,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
-       53, 0, 720,
+       53, 0, 692,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 537,
+       97, 0, 509,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row530[] = {
+static int parser_action_row502[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row531[] = {
+static int parser_action_row503[] = {
        1,
-       -1, 1, 718
+       -1, 1, 704
 };
-static int parser_action_row532[] = {
+static int parser_action_row504[] = {
        3,
-       -1, 1, 753,
-       52, 0, 295,
-       73, 0, 723
+       -1, 1, 739,
+       52, 0, 274,
+       73, 0, 695
 };
-static int parser_action_row533[] = {
+static int parser_action_row505[] = {
        1,
-       -1, 1, 750
+       -1, 1, 736
 };
-static int parser_action_row534[] = {
+static int parser_action_row506[] = {
        3,
-       -1, 3, 533,
-       47, 0, 411,
-       96, 0, 412
+       -1, 3, 505,
+       47, 0, 383,
+       96, 0, 384
 };
-static int parser_action_row535[] = {
+static int parser_action_row507[] = {
        3,
-       -1, 1, 755,
-       54, 1, 758,
-       73, 1, 758
+       -1, 1, 741,
+       54, 1, 744,
+       73, 1, 744
 };
-static int parser_action_row536[] = {
+static int parser_action_row508[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row537[] = {
+static int parser_action_row509[] = {
        9,
-       -1, 1, 444,
-       0, 1, 447,
-       1, 1, 447,
-       9, 1, 447,
-       24, 1, 447,
-       53, 1, 447,
-       56, 1, 447,
-       95, 1, 447,
-       116, 1, 447
+       -1, 1, 437,
+       0, 1, 440,
+       1, 1, 440,
+       9, 1, 440,
+       24, 1, 440,
+       53, 1, 440,
+       56, 1, 440,
+       95, 1, 440,
+       109, 1, 440
 };
-static int parser_action_row538[] = {
+static int parser_action_row510[] = {
        4,
        -1, 1, 341,
-       52, 0, 295,
-       58, 0, 227,
-       59, 0, 727
+       52, 0, 274,
+       58, 0, 213,
+       59, 0, 699
 };
-static int parser_action_row539[] = {
+static int parser_action_row511[] = {
        2,
        -1, 1, 366,
-       71, 0, 728
+       71, 0, 700
 };
-static int parser_action_row540[] = {
+static int parser_action_row512[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row541[] = {
+static int parser_action_row513[] = {
        2,
-       -1, 3, 540,
-       53, 0, 730
+       -1, 3, 512,
+       53, 0, 702
 };
-static int parser_action_row542[] = {
+static int parser_action_row514[] = {
        1,
-       -1, 1, 775
+       -1, 1, 761
 };
-static int parser_action_row543[] = {
+static int parser_action_row515[] = {
        1,
-       -1, 1, 769
+       -1, 1, 755
 };
-static int parser_action_row544[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 122,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row516[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 115,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row545[] = {
+static int parser_action_row517[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row546[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 122,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row518[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 115,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row547[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 122,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row519[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 115,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row548[] = {
+static int parser_action_row520[] = {
        3,
-       -1, 3, 547,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 519,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row549[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row521[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row550[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row522[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row551[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row523[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row552[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row524[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row553[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row525[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row554[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row526[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row555[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row527[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row556[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row528[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row557[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row529[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row558[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row530[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row559[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row531[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row560[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row532[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row561[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row533[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row562[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row534[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row563[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row535[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row564[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row536[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row565[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row537[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row566[] = {
-       26,
-       -1, 1, 464,
-       12, 0, 122,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row538[] = {
+       19,
+       -1, 1, 457,
+       12, 0, 115,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row567[] = {
+static int parser_action_row539[] = {
        5,
-       -1, 1, 464,
-       12, 0, 754,
-       46, 0, 755,
+       -1, 1, 457,
+       12, 0, 726,
+       46, 0, 727,
        96, 0, 53,
-       97, 0, 756
+       97, 0, 728
 };
-static int parser_action_row568[] = {
+static int parser_action_row540[] = {
        1,
-       -1, 1, 773
+       -1, 1, 759
 };
-static int parser_action_row569[] = {
+static int parser_action_row541[] = {
        2,
-       -1, 1, 772,
-       52, 0, 295
+       -1, 1, 758,
+       52, 0, 274
 };
-static int parser_action_row570[] = {
-       37,
-       -1, 1, 464,
-       9, 0, 761,
+static int parser_action_row542[] = {
+       30,
+       -1, 1, 457,
+       9, 0, 733,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -7905,790 +7242,636 @@ static int parser_action_row570[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row571[] = {
+static int parser_action_row543[] = {
        4,
-       -1, 3, 570,
+       -1, 3, 542,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row572[] = {
+static int parser_action_row544[] = {
        3,
-       -1, 3, 571,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 543,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row573[] = {
+static int parser_action_row545[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row574[] = {
+static int parser_action_row546[] = {
        2,
        -1, 1, 204,
-       59, 0, 765
+       59, 0, 737
 };
-static int parser_action_row575[] = {
+static int parser_action_row547[] = {
        2,
-       -1, 3, 574,
-       23, 0, 766
+       -1, 3, 546,
+       23, 0, 738
 };
-static int parser_action_row576[] = {
+static int parser_action_row548[] = {
        2,
-       -1, 3, 575,
-       15, 0, 767
+       -1, 3, 547,
+       15, 0, 739
 };
-static int parser_action_row577[] = {
+static int parser_action_row549[] = {
        2,
-       -1, 3, 576,
-       97, 0, 365
+       -1, 3, 548,
+       97, 0, 337
 };
-static int parser_action_row578[] = {
+static int parser_action_row550[] = {
        2,
-       -1, 3, 577,
-       28, 0, 769
+       -1, 3, 549,
+       28, 0, 741
 };
-static int parser_action_row579[] = {
+static int parser_action_row551[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row580[] = {
+static int parser_action_row552[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row581[] = {
+static int parser_action_row553[] = {
        1,
        -1, 1, 291
 };
-static int parser_action_row582[] = {
+static int parser_action_row554[] = {
        3,
        -1, 1, 326,
-       52, 0, 295,
-       73, 0, 621
+       52, 0, 274,
+       73, 0, 593
 };
-static int parser_action_row583[] = {
+static int parser_action_row555[] = {
        1,
        -1, 1, 323
 };
-static int parser_action_row584[] = {
+static int parser_action_row556[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row585[] = {
+static int parser_action_row557[] = {
        3,
        -1, 1, 328,
        54, 1, 331,
        73, 1, 331
 };
-static int parser_action_row586[] = {
-       29,
-       -1, 1, 464,
-       12, 0, 182,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row558[] = {
+       22,
+       -1, 1, 457,
+       12, 0, 168,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row587[] = {
+static int parser_action_row559[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row588[] = {
-       29,
-       -1, 1, 464,
-       12, 0, 182,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row560[] = {
+       22,
+       -1, 1, 457,
+       12, 0, 168,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row589[] = {
-       29,
-       -1, 1, 464,
-       12, 0, 182,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row561[] = {
+       22,
+       -1, 1, 457,
+       12, 0, 168,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row590[] = {
+static int parser_action_row562[] = {
        3,
-       -1, 3, 589,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 561,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row591[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row563[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row592[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row564[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row593[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row565[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row594[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row566[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row595[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row567[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row596[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row568[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row597[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row569[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row598[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row570[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row599[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row571[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row600[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row572[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row601[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row573[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row602[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row574[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row603[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row575[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row604[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row576[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row605[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row577[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row606[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row578[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row607[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row579[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row608[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row580[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row609[] = {
+static int parser_action_row581[] = {
        5,
-       -1, 1, 464,
-       12, 0, 797,
-       46, 0, 693,
+       -1, 1, 457,
+       12, 0, 769,
+       46, 0, 665,
        96, 0, 53,
-       97, 0, 798
+       97, 0, 770
 };
-static int parser_action_row610[] = {
+static int parser_action_row582[] = {
        1,
        -1, 1, 342
 };
-static int parser_action_row611[] = {
+static int parser_action_row583[] = {
        1,
        -1, 1, 346
 };
-static int parser_action_row612[] = {
+static int parser_action_row584[] = {
        2,
        -1, 1, 345,
-       52, 0, 295
+       52, 0, 274
 };
-static int parser_action_row613[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row585[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -8717,27 +7900,20 @@ static int parser_action_row613[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row614[] = {
+static int parser_action_row586[] = {
        1,
        -1, 1, 158
 };
-static int parser_action_row615[] = {
+static int parser_action_row587[] = {
        1,
        -1, 1, 278
 };
-static int parser_action_row616[] = {
-       37,
-       -1, 1, 464,
-       9, 0, 804,
+static int parser_action_row588[] = {
+       30,
+       -1, 1, 457,
+       9, 0, 776,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -8765,1241 +7941,1136 @@ static int parser_action_row616[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row617[] = {
+static int parser_action_row589[] = {
        3,
-       -1, 1, 815,
-       54, 0, 806,
-       94, 0, 618
+       -1, 1, 794,
+       54, 0, 778,
+       94, 0, 590
 };
-static int parser_action_row618[] = {
+static int parser_action_row590[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row619[] = {
+static int parser_action_row591[] = {
        3,
        -1, 1, 30,
        13, 0, 32,
-       52, 0, 809
+       52, 0, 781
 };
-static int parser_action_row620[] = {
+static int parser_action_row592[] = {
        1,
-       -1, 1, 814
+       -1, 1, 793
 };
-static int parser_action_row621[] = {
+static int parser_action_row593[] = {
        1,
-       -1, 1, 634
+       -1, 1, 620
 };
-static int parser_action_row622[] = {
+static int parser_action_row594[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row623[] = {
+static int parser_action_row595[] = {
        2,
        -1, 1, 30,
        13, 0, 32
 };
-static int parser_action_row624[] = {
+static int parser_action_row596[] = {
        4,
-       -1, 3, 623,
-       6, 0, 816,
-       17, 0, 817,
-       97, 0, 818
+       -1, 3, 595,
+       6, 0, 788,
+       17, 0, 789,
+       97, 0, 790
 };
-static int parser_action_row625[] = {
+static int parser_action_row597[] = {
        2,
-       -1, 3, 624,
-       59, 0, 820
+       -1, 3, 596,
+       59, 0, 792
 };
-static int parser_action_row626[] = {
+static int parser_action_row598[] = {
        2,
        -1, 1, 155,
-       57, 0, 357
+       57, 0, 329
 };
-static int parser_action_row627[] = {
+static int parser_action_row599[] = {
        2,
-       -1, 3, 626,
-       15, 0, 822
+       -1, 3, 598,
+       15, 0, 794
 };
-static int parser_action_row628[] = {
+static int parser_action_row600[] = {
        3,
-       -1, 1, 411,
-       54, 0, 823,
-       94, 0, 216
+       -1, 1, 404,
+       54, 0, 795,
+       94, 0, 202
 };
-static int parser_action_row629[] = {
+static int parser_action_row601[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row630[] = {
+static int parser_action_row602[] = {
        1,
        -1, 1, 146
 };
-static int parser_action_row631[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row603[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row632[] = {
+static int parser_action_row604[] = {
        1,
-       -1, 1, 1012
+       -1, 1, 984
 };
-static int parser_action_row633[] = {
+static int parser_action_row605[] = {
        1,
-       -1, 1, 1017
+       -1, 1, 989
 };
-static int parser_action_row634[] = {
+static int parser_action_row606[] = {
        1,
-       -1, 1, 1014
+       -1, 1, 986
 };
-static int parser_action_row635[] = {
+static int parser_action_row607[] = {
        3,
-       -1, 3, 634,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 606,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row636[] = {
+static int parser_action_row608[] = {
        2,
-       -1, 1, 522,
-       59, 0, 828
+       -1, 1, 515,
+       59, 0, 800
 };
-static int parser_action_row637[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row609[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row638[] = {
+static int parser_action_row610[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row639[] = {
+static int parser_action_row611[] = {
        2,
-       -1, 3, 638,
-       53, 0, 830
+       -1, 3, 610,
+       53, 0, 802
 };
-static int parser_action_row640[] = {
+static int parser_action_row612[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row641[] = {
+static int parser_action_row613[] = {
        1,
-       -1, 1, 1098
+       -1, 1, 1070
 };
-static int parser_action_row642[] = {
+static int parser_action_row614[] = {
        2,
-       -1, 3, 641,
-       53, 0, 832
+       -1, 3, 613,
+       53, 0, 804
 };
-static int parser_action_row643[] = {
+static int parser_action_row615[] = {
        2,
-       -1, 1, 391,
-       56, 0, 639
+       -1, 1, 384,
+       56, 0, 611
 };
-static int parser_action_row644[] = {
+static int parser_action_row616[] = {
        2,
-       -1, 3, 643,
-       55, 0, 635
+       -1, 3, 615,
+       55, 0, 607
 };
-static int parser_action_row645[] = {
+static int parser_action_row617[] = {
        1,
-       -1, 1, 504
+       -1, 1, 497
 };
-static int parser_action_row646[] = {
+static int parser_action_row618[] = {
        1,
-       -1, 1, 505
+       -1, 1, 498
 };
-static int parser_action_row647[] = {
+static int parser_action_row619[] = {
        1,
-       -1, 1, 513
+       -1, 1, 506
 };
-static int parser_action_row648[] = {
+static int parser_action_row620[] = {
        14,
        -1, 1, 343,
-       52, 0, 295,
-       59, 0, 834,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       52, 0, 274,
+       59, 0, 806,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row649[] = {
+static int parser_action_row621[] = {
        1,
-       -1, 1, 527
+       -1, 1, 520
 };
-static int parser_action_row650[] = {
+static int parser_action_row622[] = {
        15,
        -1, 1, 347,
-       52, 0, 295,
-       58, 0, 227,
-       59, 0, 835,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       52, 0, 274,
+       58, 0, 213,
+       59, 0, 807,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row651[] = {
+static int parser_action_row623[] = {
        22,
-       -1, 1, 462,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       97, 0, 836
+       -1, 1, 455,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       97, 0, 808
 };
-static int parser_action_row652[] = {
+static int parser_action_row624[] = {
        1,
-       -1, 1, 529
+       -1, 1, 522
 };
-static int parser_action_row653[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row625[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row654[] = {
+static int parser_action_row626[] = {
        3,
-       -1, 3, 653,
-       52, 0, 364,
-       97, 0, 365
+       -1, 3, 625,
+       52, 0, 336,
+       97, 0, 337
 };
-static int parser_action_row655[] = {
+static int parser_action_row627[] = {
        2,
-       -1, 1, 396,
-       72, 0, 840
+       -1, 1, 389,
+       72, 0, 812
 };
-static int parser_action_row656[] = {
+static int parser_action_row628[] = {
        2,
-       -1, 3, 655,
-       55, 0, 841
+       -1, 3, 627,
+       55, 0, 813
 };
-static int parser_action_row657[] = {
+static int parser_action_row629[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row658[] = {
+static int parser_action_row630[] = {
        1,
-       -1, 1, 1100
+       -1, 1, 1072
 };
-static int parser_action_row659[] = {
+static int parser_action_row631[] = {
        2,
-       -1, 1, 394,
-       56, 0, 656
+       -1, 1, 387,
+       56, 0, 628
 };
-static int parser_action_row660[] = {
+static int parser_action_row632[] = {
        1,
        -1, 1, 217
 };
-static int parser_action_row661[] = {
+static int parser_action_row633[] = {
        1,
        -1, 1, 236
 };
-static int parser_action_row662[] = {
+static int parser_action_row634[] = {
        3,
-       -1, 3, 661,
-       58, 0, 844,
-       97, 0, 845
+       -1, 3, 633,
+       58, 0, 816,
+       97, 0, 817
 };
-static int parser_action_row663[] = {
+static int parser_action_row635[] = {
        4,
-       -1, 3, 662,
-       9, 0, 848,
-       58, 0, 844,
-       97, 0, 845
+       -1, 3, 634,
+       9, 0, 820,
+       58, 0, 816,
+       97, 0, 817
 };
-static int parser_action_row664[] = {
+static int parser_action_row636[] = {
        1,
        -1, 1, 33
 };
-static int parser_action_row665[] = {
+static int parser_action_row637[] = {
        2,
-       -1, 3, 664,
-       55, 0, 850
+       -1, 3, 636,
+       55, 0, 822
 };
-static int parser_action_row666[] = {
+static int parser_action_row638[] = {
        1,
        -1, 1, 86
 };
-static int parser_action_row667[] = {
+static int parser_action_row639[] = {
        1,
        -1, 1, 87
 };
-static int parser_action_row668[] = {
+static int parser_action_row640[] = {
        1,
        -1, 1, 88
 };
-static int parser_action_row669[] = {
+static int parser_action_row641[] = {
        1,
        -1, 1, 89
 };
-static int parser_action_row670[] = {
+static int parser_action_row642[] = {
        1,
        -1, 1, 90
 };
-static int parser_action_row671[] = {
+static int parser_action_row643[] = {
        1,
        -1, 1, 91
 };
-static int parser_action_row672[] = {
+static int parser_action_row644[] = {
        1,
        -1, 1, 92
 };
-static int parser_action_row673[] = {
+static int parser_action_row645[] = {
        1,
        -1, 1, 93
 };
-static int parser_action_row674[] = {
+static int parser_action_row646[] = {
        1,
        -1, 1, 94
 };
-static int parser_action_row675[] = {
+static int parser_action_row647[] = {
        1,
        -1, 1, 95
 };
-static int parser_action_row676[] = {
+static int parser_action_row648[] = {
        1,
        -1, 1, 96
 };
-static int parser_action_row677[] = {
+static int parser_action_row649[] = {
        1,
        -1, 1, 97
 };
-static int parser_action_row678[] = {
+static int parser_action_row650[] = {
        1,
        -1, 1, 100
 };
-static int parser_action_row679[] = {
+static int parser_action_row651[] = {
        1,
        -1, 1, 98
 };
-static int parser_action_row680[] = {
+static int parser_action_row652[] = {
        1,
        -1, 1, 102
 };
-static int parser_action_row681[] = {
+static int parser_action_row653[] = {
        1,
        -1, 1, 101
 };
-static int parser_action_row682[] = {
+static int parser_action_row654[] = {
        1,
        -1, 1, 99
 };
-static int parser_action_row683[] = {
+static int parser_action_row655[] = {
        1,
        -1, 1, 103
 };
-static int parser_action_row684[] = {
+static int parser_action_row656[] = {
        1,
        -1, 1, 105
 };
-static int parser_action_row685[] = {
+static int parser_action_row657[] = {
        3,
        -1, 1, 108,
-       58, 0, 227,
-       59, 0, 851
+       58, 0, 213,
+       59, 0, 823
 };
-static int parser_action_row686[] = {
+static int parser_action_row658[] = {
        1,
-       -1, 1, 469
+       -1, 1, 462
 };
-static int parser_action_row687[] = {
+static int parser_action_row659[] = {
        5,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       52, 0, 852,
-       57, 0, 853
+       52, 0, 824,
+       57, 0, 825
 };
-static int parser_action_row688[] = {
+static int parser_action_row660[] = {
        22,
-       -1, 3, 687,
-       54, 0, 664,
-       74, 0, 665,
-       75, 0, 666,
-       76, 0, 667,
-       77, 0, 668,
-       78, 0, 669,
-       79, 0, 670,
-       80, 0, 671,
-       81, 0, 672,
-       82, 0, 673,
-       83, 0, 674,
-       84, 0, 675,
-       85, 0, 676,
-       86, 0, 677,
-       87, 0, 678,
-       88, 0, 679,
-       89, 0, 680,
-       90, 0, 681,
-       91, 0, 682,
-       92, 0, 683,
-       97, 0, 857
+       -1, 3, 659,
+       54, 0, 636,
+       74, 0, 637,
+       75, 0, 638,
+       76, 0, 639,
+       77, 0, 640,
+       78, 0, 641,
+       79, 0, 642,
+       80, 0, 643,
+       81, 0, 644,
+       82, 0, 645,
+       83, 0, 646,
+       84, 0, 647,
+       85, 0, 648,
+       86, 0, 649,
+       87, 0, 650,
+       88, 0, 651,
+       89, 0, 652,
+       90, 0, 653,
+       91, 0, 654,
+       92, 0, 655,
+       97, 0, 829
 };
-static int parser_action_row689[] = {
+static int parser_action_row661[] = {
        23,
-       -1, 3, 688,
-       54, 0, 664,
-       74, 0, 665,
-       75, 0, 666,
-       76, 0, 667,
-       77, 0, 668,
-       78, 0, 669,
-       79, 0, 670,
-       80, 0, 671,
-       81, 0, 672,
-       82, 0, 673,
-       83, 0, 674,
-       84, 0, 675,
-       85, 0, 676,
-       86, 0, 677,
-       87, 0, 678,
-       88, 0, 679,
-       89, 0, 680,
-       90, 0, 681,
-       91, 0, 682,
-       92, 0, 683,
-       96, 0, 53,
-       97, 0, 684
+       -1, 3, 660,
+       54, 0, 636,
+       74, 0, 637,
+       75, 0, 638,
+       76, 0, 639,
+       77, 0, 640,
+       78, 0, 641,
+       79, 0, 642,
+       80, 0, 643,
+       81, 0, 644,
+       82, 0, 645,
+       83, 0, 646,
+       84, 0, 647,
+       85, 0, 648,
+       86, 0, 649,
+       87, 0, 650,
+       88, 0, 651,
+       89, 0, 652,
+       90, 0, 653,
+       91, 0, 654,
+       92, 0, 655,
+       96, 0, 53,
+       97, 0, 656
 };
-static int parser_action_row690[] = {
+static int parser_action_row662[] = {
        1,
        -1, 1, 36
 };
-static int parser_action_row691[] = {
+static int parser_action_row663[] = {
        3,
-       -1, 3, 690,
-       96, 0, 861,
-       97, 0, 862
+       -1, 3, 662,
+       96, 0, 833,
+       97, 0, 834
 };
-static int parser_action_row692[] = {
+static int parser_action_row664[] = {
        2,
-       -1, 3, 691,
-       55, 0, 866
+       -1, 3, 663,
+       55, 0, 838
 };
-static int parser_action_row693[] = {
-       33,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row665[] = {
+       26,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 351,
        73, 1, 351,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row694[] = {
+static int parser_action_row666[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row695[] = {
-       46,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row667[] = {
+       39,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 333,
-       58, 0, 227,
-       59, 0, 870,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       58, 0, 213,
+       59, 0, 842,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 333,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row696[] = {
+static int parser_action_row668[] = {
        2,
-       -1, 3, 695,
-       98, 0, 874
+       -1, 3, 667,
+       98, 0, 846
 };
-static int parser_action_row697[] = {
+static int parser_action_row669[] = {
        3,
-       -1, 1, 461,
-       12, 0, 875,
-       97, 0, 876
+       -1, 1, 454,
+       12, 0, 847,
+       97, 0, 848
 };
-static int parser_action_row698[] = {
+static int parser_action_row670[] = {
        4,
-       -1, 1, 463,
-       12, 0, 877,
+       -1, 1, 456,
+       12, 0, 849,
        96, 0, 53,
-       97, 0, 878
+       97, 0, 850
 };
-static int parser_action_row699[] = {
+static int parser_action_row671[] = {
        1,
        -1, 1, 225
 };
-static int parser_action_row700[] = {
+static int parser_action_row672[] = {
        1,
        -1, 1, 244
 };
-static int parser_action_row701[] = {
+static int parser_action_row673[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row702[] = {
+static int parser_action_row674[] = {
        1,
-       -1, 1, 400
+       -1, 1, 393
 };
-static int parser_action_row703[] = {
+static int parser_action_row675[] = {
        1,
-       -1, 1, 401
+       -1, 1, 394
 };
-static int parser_action_row704[] = {
+static int parser_action_row676[] = {
        1,
        -1, 1, 208
 };
-static int parser_action_row705[] = {
+static int parser_action_row677[] = {
        1,
        -1, 1, 227
 };
-static int parser_action_row706[] = {
-       31,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row678[] = {
+       24,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
-       53, 0, 881,
+       53, 0, 853,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 537,
+       97, 0, 509,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row707[] = {
+static int parser_action_row679[] = {
        1,
        -1, 1, 220
 };
-static int parser_action_row708[] = {
+static int parser_action_row680[] = {
        1,
        -1, 1, 239
 };
-static int parser_action_row709[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row681[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row710[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row682[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row711[] = {
+static int parser_action_row683[] = {
        1,
        -1, 1, 224
 };
-static int parser_action_row712[] = {
+static int parser_action_row684[] = {
        1,
        -1, 1, 243
 };
-static int parser_action_row713[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row685[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row714[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row686[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row715[] = {
+static int parser_action_row687[] = {
        1,
        -1, 1, 198
 };
-static int parser_action_row716[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row688[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row717[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row689[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row718[] = {
+static int parser_action_row690[] = {
        13,
        -1, 1, 344,
-       59, 0, 889,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       59, 0, 861,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row719[] = {
+static int parser_action_row691[] = {
        1,
        -1, 1, 189
 };
-static int parser_action_row720[] = {
+static int parser_action_row692[] = {
        1,
        -1, 1, 140
 };
-static int parser_action_row721[] = {
+static int parser_action_row693[] = {
        1,
-       -1, 1, 444
+       -1, 1, 437
 };
-static int parser_action_row722[] = {
+static int parser_action_row694[] = {
        2,
-       -1, 3, 721,
-       53, 0, 891
+       -1, 3, 693,
+       53, 0, 863
 };
-static int parser_action_row723[] = {
+static int parser_action_row695[] = {
        2,
-       -1, 3, 722,
-       23, 0, 892
+       -1, 3, 694,
+       23, 0, 864
 };
-static int parser_action_row724[] = {
+static int parser_action_row696[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row725[] = {
+static int parser_action_row697[] = {
        1,
-       -1, 1, 752
+       -1, 1, 738
 };
-static int parser_action_row726[] = {
+static int parser_action_row698[] = {
        2,
-       -1, 3, 725,
-       73, 0, 723
+       -1, 3, 697,
+       73, 0, 695
 };
-static int parser_action_row727[] = {
+static int parser_action_row699[] = {
        5,
-       -1, 1, 464,
-       12, 0, 754,
-       46, 0, 755,
+       -1, 1, 457,
+       12, 0, 726,
+       46, 0, 727,
        96, 0, 53,
-       97, 0, 756
+       97, 0, 728
 };
-static int parser_action_row728[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row700[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row729[] = {
+static int parser_action_row701[] = {
        1,
        -1, 1, 367
 };
-static int parser_action_row730[] = {
+static int parser_action_row702[] = {
        2,
-       -1, 1, 450,
-       56, 0, 896
+       -1, 1, 443,
+       56, 0, 868
 };
-static int parser_action_row731[] = {
+static int parser_action_row703[] = {
        9,
-       -1, 1, 443,
-       0, 1, 445,
-       1, 1, 445,
-       9, 1, 445,
-       24, 1, 445,
-       53, 1, 445,
-       56, 1, 445,
-       95, 1, 445,
-       116, 1, 445
+       -1, 1, 436,
+       0, 1, 438,
+       1, 1, 438,
+       9, 1, 438,
+       24, 1, 438,
+       53, 1, 438,
+       56, 1, 438,
+       95, 1, 438,
+       109, 1, 438
 };
-static int parser_action_row732[] = {
+static int parser_action_row704[] = {
        1,
-       -1, 1, 714
+       -1, 1, 700
 };
-static int parser_action_row733[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 122,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row705[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 115,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row734[] = {
+static int parser_action_row706[] = {
        1,
-       -1, 1, 713
+       -1, 1, 699
 };
-static int parser_action_row735[] = {
+static int parser_action_row707[] = {
        1,
-       -1, 1, 716
+       -1, 1, 702
 };
-static int parser_action_row736[] = {
+static int parser_action_row708[] = {
        1,
-       -1, 1, 727
+       -1, 1, 713
 };
-static int parser_action_row737[] = {
+static int parser_action_row709[] = {
        2,
-       -1, 1, 729,
-       81, 0, 339
+       -1, 1, 715,
+       81, 0, 311
 };
-static int parser_action_row738[] = {
+static int parser_action_row710[] = {
        2,
-       -1, 1, 720,
-       80, 0, 331
+       -1, 1, 706,
+       80, 0, 303
 };
-static int parser_action_row739[] = {
+static int parser_action_row711[] = {
        2,
-       -1, 1, 721,
-       80, 0, 331
+       -1, 1, 707,
+       80, 0, 303
 };
-static int parser_action_row740[] = {
+static int parser_action_row712[] = {
        2,
-       -1, 1, 722,
-       80, 0, 331
+       -1, 1, 708,
+       80, 0, 303
 };
-static int parser_action_row741[] = {
+static int parser_action_row713[] = {
        2,
-       -1, 1, 723,
-       80, 0, 331
+       -1, 1, 709,
+       80, 0, 303
 };
-static int parser_action_row742[] = {
+static int parser_action_row714[] = {
        2,
-       -1, 1, 724,
-       80, 0, 331
+       -1, 1, 710,
+       80, 0, 303
 };
-static int parser_action_row743[] = {
+static int parser_action_row715[] = {
        2,
-       -1, 1, 725,
-       80, 0, 331
+       -1, 1, 711,
+       80, 0, 303
 };
-static int parser_action_row744[] = {
+static int parser_action_row716[] = {
        2,
-       -1, 1, 726,
-       80, 0, 331
+       -1, 1, 712,
+       80, 0, 303
 };
-static int parser_action_row745[] = {
+static int parser_action_row717[] = {
        2,
-       -1, 1, 731,
-       82, 0, 340
+       -1, 1, 717,
+       82, 0, 312
 };
-static int parser_action_row746[] = {
+static int parser_action_row718[] = {
        3,
-       -1, 1, 733,
-       88, 0, 341,
-       91, 0, 342
+       -1, 1, 719,
+       88, 0, 313,
+       91, 0, 314
 };
-static int parser_action_row747[] = {
+static int parser_action_row719[] = {
        3,
-       -1, 1, 735,
-       74, 0, 343,
-       75, 0, 344
+       -1, 1, 721,
+       74, 0, 315,
+       75, 0, 316
 };
-static int parser_action_row748[] = {
+static int parser_action_row720[] = {
        3,
-       -1, 1, 736,
-       74, 0, 343,
-       75, 0, 344
+       -1, 1, 722,
+       74, 0, 315,
+       75, 0, 316
 };
-static int parser_action_row749[] = {
+static int parser_action_row721[] = {
        4,
-       -1, 1, 738,
-       76, 0, 345,
-       78, 0, 346,
-       79, 0, 347
+       -1, 1, 724,
+       76, 0, 317,
+       78, 0, 318,
+       79, 0, 319
 };
-static int parser_action_row750[] = {
+static int parser_action_row722[] = {
        4,
-       -1, 1, 739,
-       76, 0, 345,
-       78, 0, 346,
-       79, 0, 347
+       -1, 1, 725,
+       76, 0, 317,
+       78, 0, 318,
+       79, 0, 319
 };
-static int parser_action_row751[] = {
+static int parser_action_row723[] = {
        1,
-       -1, 1, 741
+       -1, 1, 727
 };
-static int parser_action_row752[] = {
+static int parser_action_row724[] = {
        1,
-       -1, 1, 742
+       -1, 1, 728
 };
-static int parser_action_row753[] = {
+static int parser_action_row725[] = {
        1,
-       -1, 1, 743
+       -1, 1, 729
 };
-static int parser_action_row754[] = {
+static int parser_action_row726[] = {
        1,
-       -1, 1, 745
+       -1, 1, 731
 };
-static int parser_action_row755[] = {
+static int parser_action_row727[] = {
        2,
-       -1, 1, 778,
-       52, 0, 295
+       -1, 1, 764,
+       52, 0, 274
 };
-static int parser_action_row756[] = {
+static int parser_action_row728[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row757[] = {
+static int parser_action_row729[] = {
        3,
-       -1, 1, 760,
-       52, 0, 295,
-       58, 0, 227
+       -1, 1, 746,
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row758[] = {
+static int parser_action_row730[] = {
        2,
-       -1, 3, 757,
-       98, 0, 903
+       -1, 3, 729,
+       98, 0, 875
 };
-static int parser_action_row759[] = {
+static int parser_action_row731[] = {
        2,
-       -1, 1, 461,
-       97, 0, 904
+       -1, 1, 454,
+       97, 0, 876
 };
-static int parser_action_row760[] = {
+static int parser_action_row732[] = {
        3,
-       -1, 1, 463,
+       -1, 1, 456,
        96, 0, 53,
-       97, 0, 905
+       97, 0, 877
 };
-static int parser_action_row761[] = {
+static int parser_action_row733[] = {
        1,
-       -1, 1, 771
+       -1, 1, 757
 };
-static int parser_action_row762[] = {
+static int parser_action_row734[] = {
        1,
        -1, 1, 164
 };
-static int parser_action_row763[] = {
-       37,
-       -1, 1, 464,
-       9, 0, 907,
+static int parser_action_row735[] = {
+       30,
+       -1, 1, 457,
+       9, 0, 879,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -10027,108 +9098,87 @@ static int parser_action_row763[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row764[] = {
+static int parser_action_row736[] = {
        1,
        -1, 1, 154
 };
-static int parser_action_row765[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row737[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row766[] = {
+static int parser_action_row738[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row767[] = {
-       41,
-       -1, 1, 464,
+static int parser_action_row739[] = {
+       34,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 910,
-       12, 0, 911,
-       15, 0, 912,
+       9, 0, 882,
+       12, 0, 883,
+       15, 0, 884,
        16, 0, 34,
-       22, 0, 913,
-       24, 0, 914,
-       25, 0, 915,
-       26, 0, 916,
-       27, 0, 917,
-       33, 0, 918,
-       34, 0, 919,
-       35, 0, 920,
-       36, 0, 921,
-       37, 0, 922,
+       22, 0, 885,
+       24, 0, 886,
+       25, 0, 887,
+       26, 0, 888,
+       27, 0, 889,
+       33, 0, 890,
+       34, 0, 891,
+       35, 0, 892,
+       36, 0, 893,
+       37, 0, 894,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 923,
-       51, 0, 924,
+       50, 0, 895,
+       51, 0, 896,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 925,
+       97, 0, 897,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row768[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row740[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 169,
+       9, 0, 155,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -10157,328 +9207,314 @@ static int parser_action_row768[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row769[] = {
+static int parser_action_row741[] = {
        4,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       56, 0, 578
+       56, 0, 550
 };
-static int parser_action_row770[] = {
+static int parser_action_row742[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row771[] = {
+static int parser_action_row743[] = {
        2,
-       -1, 3, 770,
-       97, 0, 947
+       -1, 3, 742,
+       97, 0, 919
 };
-static int parser_action_row772[] = {
+static int parser_action_row744[] = {
        2,
-       -1, 3, 771,
-       23, 0, 948
+       -1, 3, 743,
+       23, 0, 920
 };
-static int parser_action_row773[] = {
+static int parser_action_row745[] = {
        1,
        -1, 1, 325
 };
-static int parser_action_row774[] = {
+static int parser_action_row746[] = {
        5,
-       -1, 1, 464,
-       12, 0, 797,
-       46, 0, 693,
+       -1, 1, 457,
+       12, 0, 769,
+       46, 0, 665,
        96, 0, 53,
-       97, 0, 798
+       97, 0, 770
 };
-static int parser_action_row775[] = {
+static int parser_action_row747[] = {
        1,
        -1, 1, 287
 };
-static int parser_action_row776[] = {
-       29,
-       -1, 1, 464,
-       12, 0, 182,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row748[] = {
+       22,
+       -1, 1, 457,
+       12, 0, 168,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row777[] = {
+static int parser_action_row749[] = {
        1,
        -1, 1, 286
 };
-static int parser_action_row778[] = {
+static int parser_action_row750[] = {
        1,
        -1, 1, 289
 };
-static int parser_action_row779[] = {
+static int parser_action_row751[] = {
        1,
        -1, 1, 300
 };
-static int parser_action_row780[] = {
+static int parser_action_row752[] = {
        2,
        -1, 1, 302,
-       81, 0, 390
+       81, 0, 362
 };
-static int parser_action_row781[] = {
+static int parser_action_row753[] = {
        2,
        -1, 1, 293,
-       80, 0, 382
+       80, 0, 354
 };
-static int parser_action_row782[] = {
+static int parser_action_row754[] = {
        2,
        -1, 1, 294,
-       80, 0, 382
+       80, 0, 354
 };
-static int parser_action_row783[] = {
+static int parser_action_row755[] = {
        2,
        -1, 1, 295,
-       80, 0, 382
+       80, 0, 354
 };
-static int parser_action_row784[] = {
+static int parser_action_row756[] = {
        2,
        -1, 1, 296,
-       80, 0, 382
+       80, 0, 354
 };
-static int parser_action_row785[] = {
+static int parser_action_row757[] = {
        2,
        -1, 1, 297,
-       80, 0, 382
+       80, 0, 354
 };
-static int parser_action_row786[] = {
+static int parser_action_row758[] = {
        2,
        -1, 1, 298,
-       80, 0, 382
+       80, 0, 354
 };
-static int parser_action_row787[] = {
+static int parser_action_row759[] = {
        2,
        -1, 1, 299,
-       80, 0, 382
+       80, 0, 354
 };
-static int parser_action_row788[] = {
+static int parser_action_row760[] = {
        2,
        -1, 1, 304,
-       82, 0, 391
+       82, 0, 363
 };
-static int parser_action_row789[] = {
+static int parser_action_row761[] = {
        3,
        -1, 1, 306,
-       88, 0, 392,
-       91, 0, 393
+       88, 0, 364,
+       91, 0, 365
 };
-static int parser_action_row790[] = {
+static int parser_action_row762[] = {
        3,
        -1, 1, 308,
-       74, 0, 394,
-       75, 0, 395
+       74, 0, 366,
+       75, 0, 367
 };
-static int parser_action_row791[] = {
+static int parser_action_row763[] = {
        3,
        -1, 1, 309,
-       74, 0, 394,
-       75, 0, 395
+       74, 0, 366,
+       75, 0, 367
 };
-static int parser_action_row792[] = {
+static int parser_action_row764[] = {
        4,
        -1, 1, 311,
-       76, 0, 396,
-       78, 0, 397,
-       79, 0, 398
+       76, 0, 368,
+       78, 0, 369,
+       79, 0, 370
 };
-static int parser_action_row793[] = {
+static int parser_action_row765[] = {
        4,
        -1, 1, 312,
-       76, 0, 396,
-       78, 0, 397,
-       79, 0, 398
+       76, 0, 368,
+       78, 0, 369,
+       79, 0, 370
 };
-static int parser_action_row794[] = {
+static int parser_action_row766[] = {
        1,
        -1, 1, 314
 };
-static int parser_action_row795[] = {
+static int parser_action_row767[] = {
        1,
        -1, 1, 315
 };
-static int parser_action_row796[] = {
+static int parser_action_row768[] = {
        1,
        -1, 1, 316
 };
-static int parser_action_row797[] = {
+static int parser_action_row769[] = {
        1,
        -1, 1, 318
 };
-static int parser_action_row798[] = {
+static int parser_action_row770[] = {
        2,
        -1, 1, 351,
-       52, 0, 295
+       52, 0, 274
 };
-static int parser_action_row799[] = {
+static int parser_action_row771[] = {
        3,
        -1, 1, 333,
-       52, 0, 295,
-       58, 0, 227
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row800[] = {
+static int parser_action_row772[] = {
        2,
-       -1, 3, 799,
-       98, 0, 952
+       -1, 3, 771,
+       98, 0, 924
 };
-static int parser_action_row801[] = {
+static int parser_action_row773[] = {
        2,
-       -1, 1, 461,
-       97, 0, 953
+       -1, 1, 454,
+       97, 0, 925
 };
-static int parser_action_row802[] = {
+static int parser_action_row774[] = {
        3,
-       -1, 1, 463,
+       -1, 1, 456,
        96, 0, 53,
-       97, 0, 954
+       97, 0, 926
 };
-static int parser_action_row803[] = {
+static int parser_action_row775[] = {
        1,
        -1, 1, 344
 };
-static int parser_action_row804[] = {
+static int parser_action_row776[] = {
        1,
        -1, 1, 279
 };
-static int parser_action_row805[] = {
+static int parser_action_row777[] = {
        1,
        -1, 1, 157
 };
-static int parser_action_row806[] = {
+static int parser_action_row778[] = {
        1,
        -1, 1, 156
 };
-static int parser_action_row807[] = {
+static int parser_action_row779[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row808[] = {
+static int parser_action_row780[] = {
        1,
-       -1, 1, 635
+       -1, 1, 621
 };
-static int parser_action_row809[] = {
+static int parser_action_row781[] = {
        3,
-       -1, 3, 808,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 780,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row810[] = {
+static int parser_action_row782[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row811[] = {
+static int parser_action_row783[] = {
        5,
        -1, 1, 81,
-       18, 0, 254,
-       19, 0, 255,
-       20, 0, 256,
-       21, 0, 257
+       18, 0, 233,
+       19, 0, 234,
+       20, 0, 235,
+       21, 0, 236
 };
-static int parser_action_row812[] = {
+static int parser_action_row784[] = {
        1,
-       -1, 1, 812
+       -1, 1, 791
 };
-static int parser_action_row813[] = {
+static int parser_action_row785[] = {
        3,
-       -1, 3, 812,
+       -1, 3, 784,
        96, 0, 53,
-       97, 0, 961
+       97, 0, 933
 };
-static int parser_action_row814[] = {
+static int parser_action_row786[] = {
        5,
        -1, 1, 81,
-       18, 0, 254,
-       19, 0, 255,
-       20, 0, 256,
-       21, 0, 257
+       18, 0, 233,
+       19, 0, 234,
+       20, 0, 235,
+       21, 0, 236
 };
-static int parser_action_row815[] = {
+static int parser_action_row787[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row816[] = {
+static int parser_action_row788[] = {
        2,
-       -1, 1, 414,
-       56, 0, 966
+       -1, 1, 407,
+       56, 0, 938
 };
-static int parser_action_row817[] = {
+static int parser_action_row789[] = {
        1,
-       -1, 1, 442
+       -1, 1, 435
 };
-static int parser_action_row818[] = {
+static int parser_action_row790[] = {
        1,
-       -1, 1, 441
+       -1, 1, 434
 };
-static int parser_action_row819[] = {
+static int parser_action_row791[] = {
        1,
-       -1, 1, 440
+       -1, 1, 433
 };
-static int parser_action_row820[] = {
+static int parser_action_row792[] = {
        3,
-       -1, 1, 411,
-       52, 0, 969,
-       94, 0, 216
+       -1, 1, 404,
+       52, 0, 941,
+       94, 0, 202
 };
-static int parser_action_row821[] = {
+static int parser_action_row793[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row822[] = {
+static int parser_action_row794[] = {
        2,
-       -1, 3, 821,
-       59, 0, 972
+       -1, 3, 793,
+       59, 0, 944
 };
-static int parser_action_row823[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row795[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 169,
+       9, 0, 155,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -10507,1049 +9543,937 @@ static int parser_action_row823[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row824[] = {
+static int parser_action_row796[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row825[] = {
+static int parser_action_row797[] = {
        1,
        -1, 1, 147
 };
-static int parser_action_row826[] = {
+static int parser_action_row798[] = {
        3,
-       -1, 3, 825,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 797,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row827[] = {
+static int parser_action_row799[] = {
        1,
        -1, 1, 200
 };
-static int parser_action_row828[] = {
+static int parser_action_row800[] = {
        2,
-       -1, 3, 827,
-       57, 0, 977
+       -1, 3, 799,
+       57, 0, 949
 };
-static int parser_action_row829[] = {
+static int parser_action_row801[] = {
        1,
-       -1, 1, 525
+       -1, 1, 518
 };
-static int parser_action_row830[] = {
+static int parser_action_row802[] = {
        25,
-       -1, 1, 464,
-       12, 0, 797,
-       46, 0, 693,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       96, 0, 53,
-       97, 0, 978
+       -1, 1, 457,
+       12, 0, 769,
+       46, 0, 665,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       96, 0, 53,
+       97, 0, 950
 };
-static int parser_action_row831[] = {
+static int parser_action_row803[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row832[] = {
-       60,
-       -1, 1, 464,
-       12, 0, 182,
+static int parser_action_row804[] = {
+       53,
+       -1, 1, 457,
+       12, 0, 168,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 183,
+       22, 0, 169,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 184,
-       33, 0, 423,
-       34, 0, 424,
-       35, 0, 425,
-       36, 0, 426,
+       31, 0, 170,
+       33, 0, 395,
+       34, 0, 396,
+       35, 0, 397,
+       36, 0, 398,
        37, 0, 43,
-       38, 0, 185,
-       40, 0, 186,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 420,
-       48, 0, 187,
+       47, 0, 392,
+       48, 0, 173,
        50, 0, 49,
-       51, 0, 427,
+       51, 0, 399,
        52, 0, 51,
-       54, 0, 428,
-       74, 0, 429,
-       75, 0, 430,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 438,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       94, 0, 216,
-       96, 0, 448,
-       97, 0, 449,
+       54, 0, 400,
+       74, 0, 401,
+       75, 0, 402,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 410,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       94, 0, 202,
+       96, 0, 420,
+       97, 0, 421,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row833[] = {
+static int parser_action_row805[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row834[] = {
+static int parser_action_row806[] = {
        1,
-       -1, 1, 1099
+       -1, 1, 1071
 };
-static int parser_action_row835[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row807[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row836[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row808[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row837[] = {
+static int parser_action_row809[] = {
        14,
        -1, 1, 345,
-       52, 0, 295,
-       59, 0, 985,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       52, 0, 274,
+       59, 0, 957,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row838[] = {
+static int parser_action_row810[] = {
        1,
-       -1, 1, 528
+       -1, 1, 521
 };
-static int parser_action_row839[] = {
+static int parser_action_row811[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row840[] = {
+static int parser_action_row812[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row841[] = {
+static int parser_action_row813[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row842[] = {
+static int parser_action_row814[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row843[] = {
-       31,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 470,
-       27, 0, 471,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row815[] = {
+       24,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 442,
+       27, 0, 443,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row844[] = {
+static int parser_action_row816[] = {
        1,
-       -1, 1, 1101
+       -1, 1, 1073
 };
-static int parser_action_row845[] = {
+static int parser_action_row817[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row846[] = {
+static int parser_action_row818[] = {
        2,
-       -1, 1, 457,
-       58, 0, 227
+       -1, 1, 450,
+       58, 0, 213
 };
-static int parser_action_row847[] = {
+static int parser_action_row819[] = {
        2,
        -1, 1, 78,
-       14, 0, 993
+       14, 0, 965
 };
-static int parser_action_row848[] = {
+static int parser_action_row820[] = {
        2,
-       -1, 3, 847,
-       97, 0, 995
+       -1, 3, 819,
+       97, 0, 967
 };
-static int parser_action_row849[] = {
+static int parser_action_row821[] = {
        4,
-       -1, 3, 848,
-       0, 0, 94,
-       1, 0, 95,
-       95, 0, 96
+       -1, 3, 820,
+       0, 0, 87,
+       1, 0, 88,
+       95, 0, 89
 };
-static int parser_action_row850[] = {
+static int parser_action_row822[] = {
        2,
        -1, 1, 78,
-       14, 0, 993
+       14, 0, 965
 };
-static int parser_action_row851[] = {
+static int parser_action_row823[] = {
        2,
        -1, 1, 104,
-       59, 0, 998
+       59, 0, 970
 };
-static int parser_action_row852[] = {
+static int parser_action_row824[] = {
        1,
        -1, 1, 106
 };
-static int parser_action_row853[] = {
+static int parser_action_row825[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row854[] = {
+static int parser_action_row826[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row855[] = {
+static int parser_action_row827[] = {
        4,
        -1, 1, 124,
-       4, 0, 1001,
-       14, 0, 1002,
-       15, 0, 1003
+       4, 0, 973,
+       14, 0, 974,
+       15, 0, 975
 };
-static int parser_action_row856[] = {
+static int parser_action_row828[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row857[] = {
+static int parser_action_row829[] = {
        1,
        -1, 1, 112
 };
-static int parser_action_row858[] = {
+static int parser_action_row830[] = {
        2,
        -1, 1, 108,
-       59, 0, 851
+       59, 0, 823
 };
-static int parser_action_row859[] = {
+static int parser_action_row831[] = {
        1,
-       -1, 1, 470
+       -1, 1, 463
 };
-static int parser_action_row860[] = {
+static int parser_action_row832[] = {
        1,
-       -1, 1, 472
+       -1, 1, 465
 };
-static int parser_action_row861[] = {
+static int parser_action_row833[] = {
        22,
-       -1, 3, 860,
-       54, 0, 664,
-       74, 0, 665,
-       75, 0, 666,
-       76, 0, 667,
-       77, 0, 668,
-       78, 0, 669,
-       79, 0, 670,
-       80, 0, 671,
-       81, 0, 672,
-       82, 0, 673,
-       83, 0, 674,
-       84, 0, 675,
-       85, 0, 676,
-       86, 0, 677,
-       87, 0, 678,
-       88, 0, 679,
-       89, 0, 680,
-       90, 0, 681,
-       91, 0, 682,
-       92, 0, 683,
-       97, 0, 857
+       -1, 3, 832,
+       54, 0, 636,
+       74, 0, 637,
+       75, 0, 638,
+       76, 0, 639,
+       77, 0, 640,
+       78, 0, 641,
+       79, 0, 642,
+       80, 0, 643,
+       81, 0, 644,
+       82, 0, 645,
+       83, 0, 646,
+       84, 0, 647,
+       85, 0, 648,
+       86, 0, 649,
+       87, 0, 650,
+       88, 0, 651,
+       89, 0, 652,
+       90, 0, 653,
+       91, 0, 654,
+       92, 0, 655,
+       97, 0, 829
 };
-static int parser_action_row862[] = {
+static int parser_action_row834[] = {
        2,
-       -1, 1, 465,
-       58, 0, 226
+       -1, 1, 458,
+       58, 0, 212
 };
-static int parser_action_row863[] = {
+static int parser_action_row835[] = {
        2,
-       -1, 3, 862,
-       58, 0, 227
+       -1, 3, 834,
+       58, 0, 213
 };
-static int parser_action_row864[] = {
+static int parser_action_row836[] = {
        7,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       28, 0, 90,
-       54, 0, 1009,
+       28, 0, 83,
+       54, 0, 981,
        95, 0, 3,
-       115, 0, 91
+       108, 0, 84
 };
-static int parser_action_row865[] = {
+static int parser_action_row837[] = {
        2,
-       -1, 3, 864,
-       96, 0, 1019
+       -1, 3, 836,
+       96, 0, 991
 };
-static int parser_action_row866[] = {
+static int parser_action_row838[] = {
        3,
-       -1, 3, 865,
-       96, 0, 1020,
-       97, 0, 862
+       -1, 3, 837,
+       96, 0, 992,
+       97, 0, 834
 };
-static int parser_action_row867[] = {
+static int parser_action_row839[] = {
        1,
-       -1, 1, 449
+       -1, 1, 442
 };
-static int parser_action_row868[] = {
+static int parser_action_row840[] = {
        1,
        -1, 1, 350
 };
-static int parser_action_row869[] = {
+static int parser_action_row841[] = {
        1,
        -1, 1, 192
 };
-static int parser_action_row870[] = {
+static int parser_action_row842[] = {
        3,
-       -1, 3, 869,
-       31, 0, 1022,
-       52, 0, 1023
+       -1, 3, 841,
+       31, 0, 994,
+       52, 0, 995
 };
-static int parser_action_row871[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row843[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row872[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row844[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row873[] = {
+static int parser_action_row845[] = {
        13,
        -1, 1, 332,
-       59, 0, 1026,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       59, 0, 998,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row874[] = {
+static int parser_action_row846[] = {
        1,
        -1, 1, 183
 };
-static int parser_action_row875[] = {
+static int parser_action_row847[] = {
        13,
        -1, 1, 330,
-       59, 0, 1028,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       59, 0, 1000,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row876[] = {
-       31,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 510,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row848[] = {
+       24,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 482,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row877[] = {
-       45,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row849[] = {
+       38,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 335,
-       59, 0, 1031,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       59, 0, 1003,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 335,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row878[] = {
-       31,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 510,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row850[] = {
+       24,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 482,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row879[] = {
-       46,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row851[] = {
+       39,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 339,
-       58, 0, 227,
-       59, 0, 1036,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       58, 0, 213,
+       59, 0, 1008,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 339,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row880[] = {
+static int parser_action_row852[] = {
        3,
-       -1, 1, 462,
-       12, 0, 1040,
-       97, 0, 1041
+       -1, 1, 455,
+       12, 0, 1012,
+       97, 0, 1013
 };
-static int parser_action_row881[] = {
+static int parser_action_row853[] = {
        1,
-       -1, 1, 404
+       -1, 1, 397
 };
-static int parser_action_row882[] = {
+static int parser_action_row854[] = {
        1,
-       -1, 1, 447
+       -1, 1, 440
 };
-static int parser_action_row883[] = {
+static int parser_action_row855[] = {
        2,
-       -1, 3, 882,
-       53, 0, 1042
+       -1, 3, 854,
+       53, 0, 1014
 };
-static int parser_action_row884[] = {
+static int parser_action_row856[] = {
        1,
        -1, 1, 219
 };
-static int parser_action_row885[] = {
+static int parser_action_row857[] = {
        1,
        -1, 1, 238
 };
-static int parser_action_row886[] = {
+static int parser_action_row858[] = {
        1,
        -1, 1, 223
 };
-static int parser_action_row887[] = {
+static int parser_action_row859[] = {
        1,
        -1, 1, 242
 };
-static int parser_action_row888[] = {
+static int parser_action_row860[] = {
        1,
        -1, 1, 222
 };
-static int parser_action_row889[] = {
+static int parser_action_row861[] = {
        1,
        -1, 1, 241
 };
-static int parser_action_row890[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row862[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row891[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row863[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row892[] = {
+static int parser_action_row864[] = {
        1,
-       -1, 1, 443
+       -1, 1, 436
 };
-static int parser_action_row893[] = {
+static int parser_action_row865[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row894[] = {
+static int parser_action_row866[] = {
        3,
-       -1, 3, 893,
+       -1, 3, 865,
        96, 0, 53,
-       97, 0, 1046
+       97, 0, 1018
 };
-static int parser_action_row895[] = {
+static int parser_action_row867[] = {
        2,
-       -1, 3, 894,
-       98, 0, 1049
+       -1, 3, 866,
+       98, 0, 1021
 };
-static int parser_action_row896[] = {
+static int parser_action_row868[] = {
        1,
        -1, 1, 368
 };
-static int parser_action_row897[] = {
+static int parser_action_row869[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row898[] = {
+static int parser_action_row870[] = {
        1,
-       -1, 1, 1108
+       -1, 1, 1080
 };
-static int parser_action_row899[] = {
+static int parser_action_row871[] = {
        2,
-       -1, 1, 451,
-       56, 0, 896
+       -1, 1, 444,
+       56, 0, 868
 };
-static int parser_action_row900[] = {
+static int parser_action_row872[] = {
        1,
-       -1, 1, 715
+       -1, 1, 701
 };
-static int parser_action_row901[] = {
+static int parser_action_row873[] = {
        1,
-       -1, 1, 777
+       -1, 1, 763
 };
-static int parser_action_row902[] = {
+static int parser_action_row874[] = {
        3,
-       -1, 3, 901,
-       31, 0, 1052,
-       52, 0, 1053
+       -1, 3, 873,
+       31, 0, 1024,
+       52, 0, 1025
 };
-static int parser_action_row903[] = {
+static int parser_action_row875[] = {
        1,
-       -1, 1, 759
+       -1, 1, 745
 };
-static int parser_action_row904[] = {
+static int parser_action_row876[] = {
        1,
-       -1, 1, 757
+       -1, 1, 743
 };
-static int parser_action_row905[] = {
+static int parser_action_row877[] = {
        2,
-       -1, 1, 762,
-       52, 0, 295
+       -1, 1, 748,
+       52, 0, 274
 };
-static int parser_action_row906[] = {
+static int parser_action_row878[] = {
        3,
-       -1, 1, 766,
-       52, 0, 295,
-       58, 0, 227
+       -1, 1, 752,
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row907[] = {
+static int parser_action_row879[] = {
        2,
-       -1, 1, 462,
-       97, 0, 1056
+       -1, 1, 455,
+       97, 0, 1028
 };
-static int parser_action_row908[] = {
+static int parser_action_row880[] = {
        1,
        -1, 1, 165
 };
-static int parser_action_row909[] = {
+static int parser_action_row881[] = {
        1,
        -1, 1, 205
 };
-static int parser_action_row910[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row882[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row911[] = {
+static int parser_action_row883[] = {
        1,
        -1, 1, 266
 };
-static int parser_action_row912[] = {
-       33,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row884[] = {
+       26,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 353,
        73, 1, 353,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row913[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row885[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1059,
-       12, 0, 911,
-       15, 0, 912,
+       9, 0, 1031,
+       12, 0, 883,
+       15, 0, 884,
        16, 0, 34,
-       22, 0, 913,
-       25, 0, 915,
-       26, 0, 916,
-       27, 0, 917,
-       33, 0, 918,
-       34, 0, 919,
-       35, 0, 920,
-       36, 0, 921,
-       37, 0, 922,
+       22, 0, 885,
+       25, 0, 887,
+       26, 0, 888,
+       27, 0, 889,
+       33, 0, 890,
+       34, 0, 891,
+       35, 0, 892,
+       36, 0, 893,
+       37, 0, 894,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 923,
-       51, 0, 924,
+       50, 0, 895,
+       51, 0, 896,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 925,
+       97, 0, 897,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row914[] = {
+static int parser_action_row886[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row915[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row887[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -11578,261 +10502,226 @@ static int parser_action_row915[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row916[] = {
+static int parser_action_row888[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row917[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row889[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1059,
-       12, 0, 911,
-       15, 0, 912,
+       9, 0, 1031,
+       12, 0, 883,
+       15, 0, 884,
        16, 0, 34,
-       22, 0, 913,
-       25, 0, 915,
-       26, 0, 916,
-       27, 0, 917,
-       33, 0, 918,
-       34, 0, 919,
-       35, 0, 920,
-       36, 0, 921,
-       37, 0, 922,
+       22, 0, 885,
+       25, 0, 887,
+       26, 0, 888,
+       27, 0, 889,
+       33, 0, 890,
+       34, 0, 891,
+       35, 0, 892,
+       36, 0, 893,
+       37, 0, 894,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 923,
-       51, 0, 924,
+       50, 0, 895,
+       51, 0, 896,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 925,
+       97, 0, 897,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row918[] = {
+static int parser_action_row890[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row919[] = {
-       33,
+static int parser_action_row891[] = {
+       26,
        -1, 1, 169,
-       12, 0, 182,
-       22, 0, 183,
-       24, 1, 924,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+       12, 0, 168,
+       22, 0, 169,
+       24, 1, 896,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row920[] = {
+static int parser_action_row892[] = {
        3,
        -1, 1, 174,
-       24, 1, 929,
-       49, 0, 209
+       24, 1, 901,
+       49, 0, 195
 };
-static int parser_action_row921[] = {
+static int parser_action_row893[] = {
        3,
        -1, 1, 171,
-       24, 1, 926,
-       49, 0, 209
+       24, 1, 898,
+       49, 0, 195
 };
-static int parser_action_row922[] = {
+static int parser_action_row894[] = {
        2,
        -1, 1, 173,
-       24, 1, 928
+       24, 1, 900
 };
-static int parser_action_row923[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row895[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 212,
+       97, 0, 198,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row924[] = {
+static int parser_action_row896[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row925[] = {
+static int parser_action_row897[] = {
        2,
-       -1, 3, 924,
-       11, 0, 1076
+       -1, 3, 896,
+       11, 0, 1048
 };
-static int parser_action_row926[] = {
-       46,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row898[] = {
+       39,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 341,
-       58, 0, 227,
-       59, 0, 228,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       58, 0, 213,
+       59, 0, 214,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 341,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row927[] = {
+static int parser_action_row899[] = {
        1,
        -1, 1, 259
 };
-static int parser_action_row928[] = {
+static int parser_action_row900[] = {
        2,
        -1, 1, 167,
-       24, 1, 922
+       24, 1, 894
 };
-static int parser_action_row929[] = {
+static int parser_action_row901[] = {
        2,
        -1, 1, 168,
-       24, 1, 923
+       24, 1, 895
 };
-static int parser_action_row930[] = {
+static int parser_action_row902[] = {
        1,
        -1, 1, 264
 };
-static int parser_action_row931[] = {
+static int parser_action_row903[] = {
        3,
-       -1, 3, 930,
-       54, 0, 262,
-       73, 0, 1078
+       -1, 3, 902,
+       54, 0, 241,
+       73, 0, 1050
 };
-static int parser_action_row932[] = {
+static int parser_action_row904[] = {
        3,
-       -1, 3, 931,
-       41, 0, 1079,
-       98, 0, 273
+       -1, 3, 903,
+       41, 0, 1051,
+       98, 0, 252
 };
-static int parser_action_row933[] = {
+static int parser_action_row905[] = {
        3,
-       -1, 1, 461,
-       12, 0, 1080,
-       97, 0, 1081
+       -1, 1, 454,
+       12, 0, 1052,
+       97, 0, 1053
 };
-static int parser_action_row934[] = {
-       38,
-       -1, 1, 464,
-       9, 0, 910,
+static int parser_action_row906[] = {
+       31,
+       -1, 1, 457,
+       9, 0, 882,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
        22, 0, 35,
-       24, 0, 1082,
+       24, 0, 1054,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
@@ -11856,568 +10745,526 @@ static int parser_action_row934[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row935[] = {
+static int parser_action_row907[] = {
        2,
-       -1, 3, 934,
-       24, 0, 1086
+       -1, 3, 906,
+       24, 0, 1058
 };
-static int parser_action_row936[] = {
+static int parser_action_row908[] = {
        1,
-       -1, 1, 931
+       -1, 1, 903
 };
-static int parser_action_row937[] = {
+static int parser_action_row909[] = {
        1,
-       -1, 1, 932
+       -1, 1, 904
 };
-static int parser_action_row938[] = {
+static int parser_action_row910[] = {
        1,
-       -1, 1, 934
+       -1, 1, 906
 };
-static int parser_action_row939[] = {
+static int parser_action_row911[] = {
        1,
-       -1, 1, 933
+       -1, 1, 905
 };
-static int parser_action_row940[] = {
+static int parser_action_row912[] = {
        1,
-       -1, 1, 935
+       -1, 1, 907
 };
-static int parser_action_row941[] = {
+static int parser_action_row913[] = {
        1,
-       -1, 1, 936
+       -1, 1, 908
 };
-static int parser_action_row942[] = {
+static int parser_action_row914[] = {
        1,
-       -1, 1, 937
+       -1, 1, 909
 };
-static int parser_action_row943[] = {
+static int parser_action_row915[] = {
        4,
-       -1, 1, 463,
-       12, 0, 1087,
+       -1, 1, 456,
+       12, 0, 1059,
        96, 0, 53,
-       97, 0, 1088
+       97, 0, 1060
 };
-static int parser_action_row944[] = {
+static int parser_action_row916[] = {
        1,
        -1, 1, 270
 };
-static int parser_action_row945[] = {
+static int parser_action_row917[] = {
        2,
-       -1, 3, 944,
-       49, 0, 209
+       -1, 3, 916,
+       49, 0, 195
 };
-static int parser_action_row946[] = {
+static int parser_action_row918[] = {
        2,
-       -1, 3, 945,
-       53, 0, 1091
+       -1, 3, 917,
+       53, 0, 1063
 };
-static int parser_action_row947[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row919[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row948[] = {
+static int parser_action_row920[] = {
        1,
-       -1, 1, 456
+       -1, 1, 449
 };
-static int parser_action_row949[] = {
+static int parser_action_row921[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row950[] = {
+static int parser_action_row922[] = {
        2,
-       -1, 3, 949,
-       98, 0, 1094
+       -1, 3, 921,
+       98, 0, 1066
 };
-static int parser_action_row951[] = {
+static int parser_action_row923[] = {
        1,
        -1, 1, 288
 };
-static int parser_action_row952[] = {
+static int parser_action_row924[] = {
        1,
        -1, 1, 332
 };
-static int parser_action_row953[] = {
+static int parser_action_row925[] = {
        1,
        -1, 1, 330
 };
-static int parser_action_row954[] = {
+static int parser_action_row926[] = {
        2,
        -1, 1, 335,
-       52, 0, 295
+       52, 0, 274
 };
-static int parser_action_row955[] = {
+static int parser_action_row927[] = {
        3,
        -1, 1, 339,
-       52, 0, 295,
-       58, 0, 227
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row956[] = {
+static int parser_action_row928[] = {
        2,
-       -1, 1, 462,
-       97, 0, 1097
+       -1, 1, 455,
+       97, 0, 1069
 };
-static int parser_action_row957[] = {
+static int parser_action_row929[] = {
        3,
-       -1, 3, 956,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 928,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row958[] = {
+static int parser_action_row930[] = {
        2,
        -1, 1, 150,
-       56, 0, 1099
+       56, 0, 1071
 };
-static int parser_action_row959[] = {
+static int parser_action_row931[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row960[] = {
+static int parser_action_row932[] = {
        2,
        -1, 1, 30,
        13, 0, 32
 };
-static int parser_action_row961[] = {
+static int parser_action_row933[] = {
        4,
-       -1, 3, 960,
-       6, 0, 816,
-       17, 0, 817,
-       97, 0, 818
+       -1, 3, 932,
+       6, 0, 788,
+       17, 0, 789,
+       97, 0, 790
 };
-static int parser_action_row962[] = {
+static int parser_action_row934[] = {
        3,
        -1, 1, 356,
-       52, 0, 295,
-       58, 0, 227
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row963[] = {
+static int parser_action_row935[] = {
        2,
-       -1, 3, 962,
-       97, 0, 1106
+       -1, 3, 934,
+       97, 0, 1078
 };
-static int parser_action_row964[] = {
+static int parser_action_row936[] = {
        3,
-       -1, 3, 963,
+       -1, 3, 935,
        96, 0, 53,
-       97, 0, 1107
+       97, 0, 1079
 };
-static int parser_action_row965[] = {
+static int parser_action_row937[] = {
        4,
-       -1, 3, 964,
-       6, 0, 816,
-       17, 0, 817,
-       97, 0, 818
+       -1, 3, 936,
+       6, 0, 788,
+       17, 0, 789,
+       97, 0, 790
 };
-static int parser_action_row966[] = {
+static int parser_action_row938[] = {
        2,
-       -1, 3, 965,
-       53, 0, 1110
+       -1, 3, 937,
+       53, 0, 1082
 };
-static int parser_action_row967[] = {
+static int parser_action_row939[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row968[] = {
+static int parser_action_row940[] = {
        1,
-       -1, 1, 1104
+       -1, 1, 1076
 };
-static int parser_action_row969[] = {
+static int parser_action_row941[] = {
        2,
-       -1, 1, 415,
-       56, 0, 966
+       -1, 1, 408,
+       56, 0, 938
 };
-static int parser_action_row970[] = {
+static int parser_action_row942[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row971[] = {
+static int parser_action_row943[] = {
        1,
-       -1, 1, 412
+       -1, 1, 405
 };
-static int parser_action_row972[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row944[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row973[] = {
+static int parser_action_row945[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row974[] = {
+static int parser_action_row946[] = {
        1,
        -1, 1, 274
 };
-static int parser_action_row975[] = {
+static int parser_action_row947[] = {
        2,
-       -1, 3, 974,
-       49, 0, 209
+       -1, 3, 946,
+       49, 0, 195
 };
-static int parser_action_row976[] = {
+static int parser_action_row948[] = {
        3,
-       -1, 3, 975,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 947,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row977[] = {
+static int parser_action_row949[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row978[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row950[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row979[] = {
+static int parser_action_row951[] = {
        15,
        -1, 1, 333,
-       52, 0, 295,
-       58, 0, 227,
-       59, 0, 1120,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       52, 0, 274,
+       58, 0, 213,
+       59, 0, 1092,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row980[] = {
+static int parser_action_row952[] = {
        22,
-       -1, 1, 461,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       97, 0, 1121
+       -1, 1, 454,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       97, 0, 1093
 };
-static int parser_action_row981[] = {
+static int parser_action_row953[] = {
        1,
-       -1, 1, 437
+       -1, 1, 430
 };
-static int parser_action_row982[] = {
+static int parser_action_row954[] = {
        23,
-       -1, 1, 463,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       96, 0, 53,
-       97, 0, 1122
+       -1, 1, 456,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       96, 0, 53,
+       97, 0, 1094
 };
-static int parser_action_row983[] = {
+static int parser_action_row955[] = {
        1,
-       -1, 1, 390
+       -1, 1, 383
 };
-static int parser_action_row984[] = {
+static int parser_action_row956[] = {
        1,
-       -1, 1, 392
+       -1, 1, 385
 };
-static int parser_action_row985[] = {
+static int parser_action_row957[] = {
        1,
-       -1, 1, 389
+       -1, 1, 382
 };
-static int parser_action_row986[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row958[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row987[] = {
+static int parser_action_row959[] = {
        2,
-       -1, 3, 986,
-       23, 0, 1124
+       -1, 3, 958,
+       23, 0, 1096
 };
-static int parser_action_row988[] = {
+static int parser_action_row960[] = {
        2,
-       -1, 3, 987,
-       28, 0, 1125
+       -1, 3, 959,
+       28, 0, 1097
 };
-static int parser_action_row989[] = {
-       29,
-       -1, 1, 464,
-       12, 0, 1126,
-       22, 0, 1127,
-       31, 0, 1128,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row961[] = {
+       22,
+       -1, 1, 457,
+       12, 0, 1098,
+       22, 0, 1099,
+       31, 0, 1100,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row990[] = {
+static int parser_action_row962[] = {
        1,
-       -1, 1, 388
+       -1, 1, 381
 };
-static int parser_action_row991[] = {
+static int parser_action_row963[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row992[] = {
+static int parser_action_row964[] = {
        1,
-       -1, 1, 395
+       -1, 1, 388
 };
-static int parser_action_row993[] = {
+static int parser_action_row965[] = {
        2,
-       -1, 3, 992,
-       97, 0, 1172
+       -1, 3, 964,
+       97, 0, 1137
 };
-static int parser_action_row994[] = {
+static int parser_action_row966[] = {
        5,
        -1, 1, 30,
-       0, 0, 94,
-       1, 0, 95,
+       0, 0, 87,
+       1, 0, 88,
        13, 0, 32,
-       95, 0, 96
+       95, 0, 89
 };
-static int parser_action_row995[] = {
+static int parser_action_row967[] = {
        4,
-       -1, 3, 994,
-       0, 0, 94,
-       1, 0, 95,
-       95, 0, 96
+       -1, 3, 966,
+       0, 0, 87,
+       1, 0, 88,
+       95, 0, 89
 };
-static int parser_action_row996[] = {
+static int parser_action_row968[] = {
        2,
-       -1, 1, 458,
-       58, 0, 227
+       -1, 1, 451,
+       58, 0, 213
 };
-static int parser_action_row997[] = {
+static int parser_action_row969[] = {
        1,
        -1, 1, 18
 };
-static int parser_action_row998[] = {
+static int parser_action_row970[] = {
        4,
-       -1, 3, 997,
-       0, 0, 94,
-       1, 0, 95,
-       95, 0, 96
+       -1, 3, 969,
+       0, 0, 87,
+       1, 0, 88,
+       95, 0, 89
 };
-static int parser_action_row999[] = {
+static int parser_action_row971[] = {
        1,
        -1, 1, 107
 };
-static int parser_action_row1000[] = {
+static int parser_action_row972[] = {
        2,
        -1, 1, 115,
-       97, 0, 1178
+       97, 0, 1143
 };
-static int parser_action_row1001[] = {
+static int parser_action_row973[] = {
        3,
-       -1, 3, 1000,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 972,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row1002[] = {
+static int parser_action_row974[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1003[] = {
+static int parser_action_row975[] = {
        5,
        -1, 1, 30,
-       0, 0, 94,
-       1, 0, 95,
+       0, 0, 87,
+       1, 0, 88,
        13, 0, 32,
-       95, 0, 96
+       95, 0, 89
 };
-static int parser_action_row1004[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row976[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -12446,674 +11293,583 @@ static int parser_action_row1004[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1005[] = {
+static int parser_action_row977[] = {
        3,
        -1, 1, 124,
-       4, 0, 1001,
-       15, 0, 1186
+       4, 0, 973,
+       15, 0, 1151
 };
-static int parser_action_row1006[] = {
+static int parser_action_row978[] = {
        3,
-       -1, 3, 1005,
-       28, 0, 90,
-       115, 0, 91
+       -1, 3, 977,
+       28, 0, 83,
+       108, 0, 84
 };
-static int parser_action_row1007[] = {
+static int parser_action_row979[] = {
        1,
-       -1, 1, 499
+       -1, 1, 492
 };
-static int parser_action_row1008[] = {
+static int parser_action_row980[] = {
        1,
        -1, 1, 111
 };
-static int parser_action_row1009[] = {
+static int parser_action_row981[] = {
        1,
-       -1, 1, 471
+       -1, 1, 464
 };
-static int parser_action_row1010[] = {
+static int parser_action_row982[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1011[] = {
+static int parser_action_row983[] = {
        2,
        -1, 1, 75,
        9, 1, 45
 };
-static int parser_action_row1012[] = {
+static int parser_action_row984[] = {
        2,
-       -1, 3, 1011,
-       9, 0, 1190
+       -1, 3, 983,
+       9, 0, 1155
 };
-static int parser_action_row1013[] = {
+static int parser_action_row985[] = {
        1,
-       -1, 1, 1086
+       -1, 1, 1058
 };
-static int parser_action_row1014[] = {
+static int parser_action_row986[] = {
        4,
-       -1, 3, 1013,
-       0, 0, 94,
-       1, 0, 95,
-       95, 0, 96
+       -1, 3, 985,
+       0, 0, 87,
+       1, 0, 88,
+       95, 0, 89
 };
-static int parser_action_row1015[] = {
+static int parser_action_row987[] = {
        4,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1016[] = {
+static int parser_action_row988[] = {
        1,
        -1, 1, 74
 };
-static int parser_action_row1017[] = {
+static int parser_action_row989[] = {
        1,
-       -1, 1, 492
+       -1, 1, 485
 };
-static int parser_action_row1018[] = {
+static int parser_action_row990[] = {
        5,
        -1, 1, 30,
-       6, 0, 1193,
+       6, 0, 1158,
        9, 1, 46,
        13, 0, 32,
-       97, 0, 1194
+       97, 0, 1159
 };
-static int parser_action_row1019[] = {
+static int parser_action_row991[] = {
        5,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       9, 1, 493,
+       9, 1, 486,
        95, 0, 3
 };
-static int parser_action_row1020[] = {
+static int parser_action_row992[] = {
        1,
-       -1, 1, 466
+       -1, 1, 459
 };
-static int parser_action_row1021[] = {
+static int parser_action_row993[] = {
        2,
-       -1, 1, 468,
-       58, 0, 226
+       -1, 1, 461,
+       58, 0, 212
 };
-static int parser_action_row1022[] = {
+static int parser_action_row994[] = {
        2,
-       -1, 3, 1021,
-       96, 0, 1201
+       -1, 3, 993,
+       96, 0, 1166
 };
-static int parser_action_row1023[] = {
+static int parser_action_row995[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1024[] = {
+static int parser_action_row996[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1025[] = {
+static int parser_action_row997[] = {
        1,
        -1, 1, 210
 };
-static int parser_action_row1026[] = {
+static int parser_action_row998[] = {
        1,
        -1, 1, 229
 };
-static int parser_action_row1027[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row999[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1028[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1000[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1029[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1001[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1030[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1002[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1031[] = {
+static int parser_action_row1003[] = {
        1,
        -1, 1, 194
 };
-static int parser_action_row1032[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1004[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1033[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1005[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1034[] = {
+static int parser_action_row1006[] = {
        13,
        -1, 1, 334,
-       59, 0, 1210,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       59, 0, 1175,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1035[] = {
+static int parser_action_row1007[] = {
        1,
        -1, 1, 184
 };
-static int parser_action_row1036[] = {
+static int parser_action_row1008[] = {
        1,
        -1, 1, 196
 };
-static int parser_action_row1037[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1009[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1038[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1010[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1039[] = {
+static int parser_action_row1011[] = {
        13,
        -1, 1, 338,
-       59, 0, 1214,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       59, 0, 1179,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1040[] = {
+static int parser_action_row1012[] = {
        1,
        -1, 1, 186
 };
-static int parser_action_row1041[] = {
-       31,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 510,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row1013[] = {
+       24,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 482,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1042[] = {
-       45,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row1014[] = {
+       38,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 337,
-       59, 0, 1217,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       59, 0, 1182,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 337,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1043[] = {
+static int parser_action_row1015[] = {
        1,
-       -1, 1, 445
+       -1, 1, 438
 };
-static int parser_action_row1044[] = {
+static int parser_action_row1016[] = {
        1,
        -1, 1, 221
 };
-static int parser_action_row1045[] = {
+static int parser_action_row1017[] = {
        1,
        -1, 1, 240
 };
-static int parser_action_row1046[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1018[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1047[] = {
+static int parser_action_row1019[] = {
        3,
-       -1, 1, 783,
-       52, 0, 295,
-       58, 0, 227
+       -1, 1, 769,
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row1048[] = {
+static int parser_action_row1020[] = {
        2,
-       -1, 3, 1047,
-       97, 0, 1223
+       -1, 3, 1019,
+       97, 0, 1188
 };
-static int parser_action_row1049[] = {
+static int parser_action_row1021[] = {
        3,
-       -1, 3, 1048,
+       -1, 3, 1020,
        96, 0, 53,
-       97, 0, 1224
+       97, 0, 1189
 };
-static int parser_action_row1050[] = {
+static int parser_action_row1022[] = {
        3,
-       -1, 1, 754,
-       54, 1, 757,
-       73, 1, 757
+       -1, 1, 740,
+       54, 1, 743,
+       73, 1, 743
 };
-static int parser_action_row1051[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1023[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 537,
+       97, 0, 509,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1052[] = {
+static int parser_action_row1024[] = {
        1,
-       -1, 1, 1109
+       -1, 1, 1081
 };
-static int parser_action_row1053[] = {
+static int parser_action_row1025[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1054[] = {
+static int parser_action_row1026[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1055[] = {
+static int parser_action_row1027[] = {
        1,
-       -1, 1, 761
+       -1, 1, 747
 };
-static int parser_action_row1056[] = {
+static int parser_action_row1028[] = {
        1,
-       -1, 1, 765
+       -1, 1, 751
 };
-static int parser_action_row1057[] = {
+static int parser_action_row1029[] = {
        2,
-       -1, 1, 764,
-       52, 0, 295
+       -1, 1, 750,
+       52, 0, 274
 };
-static int parser_action_row1058[] = {
+static int parser_action_row1030[] = {
        1,
        -1, 1, 206
 };
-static int parser_action_row1059[] = {
+static int parser_action_row1031[] = {
        2,
        -1, 1, 193,
-       24, 1, 948
+       24, 1, 920
 };
-static int parser_action_row1060[] = {
+static int parser_action_row1032[] = {
        3,
        -1, 1, 158,
-       24, 1, 920,
-       49, 1, 1005
+       24, 1, 892,
+       49, 1, 977
 };
-static int parser_action_row1061[] = {
-       37,
-       -1, 1, 464,
-       9, 0, 1230,
+static int parser_action_row1033[] = {
+       30,
+       -1, 1, 457,
+       9, 0, 1195,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -13141,340 +11897,284 @@ static int parser_action_row1061[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1062[] = {
+static int parser_action_row1034[] = {
        1,
-       -1, 1, 957
+       -1, 1, 929
 };
-static int parser_action_row1063[] = {
+static int parser_action_row1035[] = {
        1,
-       -1, 1, 921
+       -1, 1, 893
 };
-static int parser_action_row1064[] = {
+static int parser_action_row1036[] = {
        2,
-       -1, 3, 1063,
-       49, 0, 209
+       -1, 3, 1035,
+       49, 0, 195
 };
-static int parser_action_row1065[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1037[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1066[] = {
+static int parser_action_row1038[] = {
        1,
        -1, 1, 261
 };
-static int parser_action_row1067[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1039[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1068[] = {
+static int parser_action_row1040[] = {
        1,
-       -1, 1, 960
+       -1, 1, 932
 };
-static int parser_action_row1069[] = {
+static int parser_action_row1041[] = {
        2,
-       -1, 3, 1068,
-       49, 0, 209
+       -1, 3, 1040,
+       49, 0, 195
 };
-static int parser_action_row1070[] = {
+static int parser_action_row1042[] = {
        3,
-       -1, 3, 1069,
-       52, 0, 364,
-       97, 0, 365
+       -1, 3, 1041,
+       52, 0, 336,
+       97, 0, 337
 };
-static int parser_action_row1071[] = {
+static int parser_action_row1043[] = {
        2,
        -1, 1, 170,
-       24, 1, 925
+       24, 1, 897
 };
-static int parser_action_row1072[] = {
+static int parser_action_row1044[] = {
        2,
        -1, 1, 175,
-       24, 1, 930
+       24, 1, 902
 };
-static int parser_action_row1073[] = {
+static int parser_action_row1045[] = {
        2,
        -1, 1, 172,
-       24, 1, 927
+       24, 1, 899
 };
-static int parser_action_row1074[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1046[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1075[] = {
+static int parser_action_row1047[] = {
        2,
        -1, 1, 280,
-       24, 0, 1238
+       24, 0, 1203
 };
-static int parser_action_row1076[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1048[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 417,
+       97, 0, 389,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1077[] = {
+static int parser_action_row1049[] = {
        3,
-       -1, 3, 1076,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 1048,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row1078[] = {
+static int parser_action_row1050[] = {
        2,
        -1, 1, 187,
-       24, 1, 942
+       24, 1, 914
 };
-static int parser_action_row1079[] = {
+static int parser_action_row1051[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1080[] = {
-       33,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row1052[] = {
+       26,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 349,
        73, 1, 349,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1081[] = {
-       31,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 510,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row1053[] = {
+       24,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 482,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1082[] = {
-       45,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row1054[] = {
+       38,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 343,
-       59, 0, 512,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       59, 0, 484,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 343,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1083[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1055[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -13503,38 +12203,31 @@ static int parser_action_row1083[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1084[] = {
+static int parser_action_row1056[] = {
        3,
-       -1, 3, 1083,
-       9, 0, 910,
-       24, 0, 1246
+       -1, 3, 1055,
+       9, 0, 882,
+       24, 0, 1211
 };
-static int parser_action_row1085[] = {
+static int parser_action_row1057[] = {
        4,
-       -1, 3, 1084,
+       -1, 3, 1056,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1086[] = {
+static int parser_action_row1058[] = {
        1,
        -1, 1, 265
 };
-static int parser_action_row1087[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1059[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -13563,931 +12256,812 @@ static int parser_action_row1087[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1088[] = {
-       31,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 510,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row1060[] = {
+       24,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 482,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1089[] = {
-       46,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row1061[] = {
+       39,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 347,
-       58, 0, 227,
-       59, 0, 517,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       58, 0, 213,
+       59, 0, 489,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 347,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1090[] = {
+static int parser_action_row1062[] = {
        3,
-       -1, 1, 462,
-       12, 0, 1252,
-       97, 0, 1253
+       -1, 1, 455,
+       12, 0, 1217,
+       97, 0, 1218
 };
-static int parser_action_row1091[] = {
+static int parser_action_row1063[] = {
        1,
        -1, 1, 269
 };
-static int parser_action_row1092[] = {
+static int parser_action_row1064[] = {
        1,
-       -1, 1, 453
+       -1, 1, 446
 };
-static int parser_action_row1093[] = {
+static int parser_action_row1065[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1094[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1066[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1095[] = {
+static int parser_action_row1067[] = {
        3,
        -1, 1, 327,
        54, 1, 330,
        73, 1, 330
 };
-static int parser_action_row1096[] = {
+static int parser_action_row1068[] = {
        1,
        -1, 1, 334
 };
-static int parser_action_row1097[] = {
+static int parser_action_row1069[] = {
        1,
        -1, 1, 338
 };
-static int parser_action_row1098[] = {
+static int parser_action_row1070[] = {
        2,
        -1, 1, 337,
-       52, 0, 295
+       52, 0, 274
 };
-static int parser_action_row1099[] = {
+static int parser_action_row1071[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1100[] = {
+static int parser_action_row1072[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1101[] = {
+static int parser_action_row1073[] = {
        1,
-       -1, 1, 1094
+       -1, 1, 1066
 };
-static int parser_action_row1102[] = {
+static int parser_action_row1074[] = {
        2,
        -1, 1, 151,
-       56, 0, 1099
+       56, 0, 1071
 };
-static int parser_action_row1103[] = {
+static int parser_action_row1075[] = {
        2,
-       -1, 3, 1102,
-       55, 0, 1260
+       -1, 3, 1074,
+       55, 0, 1225
 };
-static int parser_action_row1104[] = {
+static int parser_action_row1076[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1105[] = {
+static int parser_action_row1077[] = {
        2,
-       -1, 1, 815,
-       94, 0, 618
+       -1, 1, 794,
+       94, 0, 590
 };
-static int parser_action_row1106[] = {
+static int parser_action_row1078[] = {
        1,
        -1, 1, 355
 };
-static int parser_action_row1107[] = {
+static int parser_action_row1079[] = {
        2,
        -1, 1, 358,
-       52, 0, 295
+       52, 0, 274
 };
-static int parser_action_row1108[] = {
+static int parser_action_row1080[] = {
        3,
        -1, 1, 362,
-       52, 0, 295,
-       58, 0, 227
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row1109[] = {
+static int parser_action_row1081[] = {
        2,
-       -1, 3, 1108,
-       97, 0, 1265
+       -1, 3, 1080,
+       97, 0, 1230
 };
-static int parser_action_row1110[] = {
-       19,
-       -1, 1, 411,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       52, 0, 1266,
-       94, 0, 216,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row1082[] = {
+       12,
+       -1, 1, 404,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       52, 0, 1231,
+       94, 0, 202,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1111[] = {
+static int parser_action_row1083[] = {
        1,
-       -1, 1, 409
+       -1, 1, 402
 };
-static int parser_action_row1112[] = {
+static int parser_action_row1084[] = {
        2,
        -1, 1, 30,
        13, 0, 32
 };
-static int parser_action_row1113[] = {
+static int parser_action_row1085[] = {
        1,
-       -1, 1, 1105
+       -1, 1, 1077
 };
-static int parser_action_row1114[] = {
-       60,
-       -1, 1, 464,
-       12, 0, 182,
+static int parser_action_row1086[] = {
+       53,
+       -1, 1, 457,
+       12, 0, 168,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 183,
+       22, 0, 169,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 184,
-       33, 0, 423,
-       34, 0, 424,
-       35, 0, 425,
-       36, 0, 426,
+       31, 0, 170,
+       33, 0, 395,
+       34, 0, 396,
+       35, 0, 397,
+       36, 0, 398,
        37, 0, 43,
-       38, 0, 185,
-       40, 0, 186,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 420,
-       48, 0, 187,
+       47, 0, 392,
+       48, 0, 173,
        50, 0, 49,
-       51, 0, 427,
+       51, 0, 399,
        52, 0, 51,
-       54, 0, 428,
-       74, 0, 429,
-       75, 0, 430,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 438,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       94, 0, 216,
-       96, 0, 448,
-       97, 0, 449,
+       54, 0, 400,
+       74, 0, 401,
+       75, 0, 402,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 410,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       94, 0, 202,
+       96, 0, 420,
+       97, 0, 421,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1115[] = {
+static int parser_action_row1087[] = {
        1,
        -1, 1, 275
 };
-static int parser_action_row1116[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1088[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1117[] = {
+static int parser_action_row1089[] = {
        1,
        -1, 1, 273
 };
-static int parser_action_row1118[] = {
+static int parser_action_row1090[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1119[] = {
+static int parser_action_row1091[] = {
        2,
-       -1, 3, 1118,
-       55, 0, 1275
+       -1, 3, 1090,
+       55, 0, 1240
 };
-static int parser_action_row1120[] = {
+static int parser_action_row1092[] = {
        1,
-       -1, 1, 1024
+       -1, 1, 996
 };
-static int parser_action_row1121[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1093[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1122[] = {
+static int parser_action_row1094[] = {
        14,
        -1, 1, 335,
-       52, 0, 295,
-       59, 0, 1276,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       52, 0, 274,
+       59, 0, 1241,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1123[] = {
+static int parser_action_row1095[] = {
        15,
        -1, 1, 339,
-       52, 0, 295,
-       58, 0, 227,
-       59, 0, 1277,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       52, 0, 274,
+       58, 0, 213,
+       59, 0, 1242,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1124[] = {
+static int parser_action_row1096[] = {
        22,
-       -1, 1, 462,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       97, 0, 1278
+       -1, 1, 455,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       97, 0, 1243
 };
-static int parser_action_row1125[] = {
+static int parser_action_row1097[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1126[] = {
+static int parser_action_row1098[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1127[] = {
+static int parser_action_row1099[] = {
        2,
-       -1, 1, 602,
-       52, 0, 295
+       -1, 1, 595,
+       52, 0, 274
 };
-static int parser_action_row1128[] = {
+static int parser_action_row1100[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1129[] = {
+static int parser_action_row1101[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1130[] = {
+static int parser_action_row1102[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1131[] = {
+static int parser_action_row1103[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1132[] = {
+static int parser_action_row1104[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1133[] = {
+static int parser_action_row1105[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1134[] = {
+static int parser_action_row1106[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1135[] = {
+static int parser_action_row1107[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1136[] = {
-       22,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1290,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
+static int parser_action_row1108[] = {
+       15,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1255,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
        52, 0, 51,
        96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1137[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1109[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1138[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1110[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1139[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1111[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1140[] = {
+static int parser_action_row1112[] = {
        3,
-       -1, 1, 584,
-       52, 0, 295,
-       58, 0, 227
-};
-static int parser_action_row1141[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 577,
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row1142[] = {
+static int parser_action_row1113[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1143[] = {
+static int parser_action_row1114[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1144[] = {
+static int parser_action_row1115[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1145[] = {
+static int parser_action_row1116[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1146[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row1147[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row1148[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row1149[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row1150[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row1151[] = {
-       2,
-       -1, 1, 411,
-       94, 0, 216
-};
-static int parser_action_row1152[] = {
+static int parser_action_row1117[] = {
        1,
-       -1, 1, 633
+       -1, 1, 619
 };
-static int parser_action_row1153[] = {
+static int parser_action_row1118[] = {
        1,
-       -1, 1, 632
+       -1, 1, 618
 };
-static int parser_action_row1154[] = {
+static int parser_action_row1119[] = {
        3,
-       -1, 3, 1153,
-       41, 0, 1308,
-       98, 0, 1309
+       -1, 3, 1118,
+       41, 0, 1266,
+       98, 0, 1267
 };
-static int parser_action_row1155[] = {
+static int parser_action_row1120[] = {
        2,
-       -1, 1, 461,
-       97, 0, 1310
+       -1, 1, 454,
+       97, 0, 1268
 };
-static int parser_action_row1156[] = {
+static int parser_action_row1121[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1157[] = {
+static int parser_action_row1122[] = {
        4,
-       -1, 1, 532,
-       29, 0, 1312,
-       30, 0, 1313,
-       32, 0, 1314
+       -1, 1, 525,
+       29, 0, 1270,
+       30, 0, 1271,
+       32, 0, 1272
 };
-static int parser_action_row1158[] = {
+static int parser_action_row1123[] = {
        1,
-       -1, 1, 534
+       -1, 1, 527
 };
-static int parser_action_row1159[] = {
+static int parser_action_row1124[] = {
        1,
-       -1, 1, 539
+       -1, 1, 532
 };
-static int parser_action_row1160[] = {
+static int parser_action_row1125[] = {
        10,
-       -1, 1, 541,
-       39, 0, 1315,
-       80, 0, 1316,
-       84, 0, 1317,
-       85, 0, 1318,
-       86, 0, 1319,
-       87, 0, 1320,
-       89, 0, 1321,
-       90, 0, 1322,
-       92, 0, 1323
+       -1, 1, 534,
+       39, 0, 1273,
+       80, 0, 1274,
+       84, 0, 1275,
+       85, 0, 1276,
+       86, 0, 1277,
+       87, 0, 1278,
+       89, 0, 1279,
+       90, 0, 1280,
+       92, 0, 1281
 };
-static int parser_action_row1161[] = {
+static int parser_action_row1126[] = {
        2,
-       -1, 1, 550,
-       81, 0, 1324
+       -1, 1, 543,
+       81, 0, 1282
 };
-static int parser_action_row1162[] = {
+static int parser_action_row1127[] = {
        2,
-       -1, 1, 552,
-       82, 0, 1325
+       -1, 1, 545,
+       82, 0, 1283
 };
-static int parser_action_row1163[] = {
+static int parser_action_row1128[] = {
        3,
-       -1, 1, 554,
-       88, 0, 1326,
-       91, 0, 1327
+       -1, 1, 547,
+       88, 0, 1284,
+       91, 0, 1285
 };
-static int parser_action_row1164[] = {
+static int parser_action_row1129[] = {
        3,
-       -1, 1, 556,
-       74, 0, 1328,
-       75, 0, 1329
+       -1, 1, 549,
+       74, 0, 1286,
+       75, 0, 1287
 };
-static int parser_action_row1165[] = {
+static int parser_action_row1130[] = {
        4,
-       -1, 1, 559,
-       76, 0, 1330,
-       78, 0, 1331,
-       79, 0, 1332
+       -1, 1, 552,
+       76, 0, 1288,
+       78, 0, 1289,
+       79, 0, 1290
 };
-static int parser_action_row1166[] = {
+static int parser_action_row1131[] = {
        1,
-       -1, 1, 562
+       -1, 1, 555
 };
-static int parser_action_row1167[] = {
+static int parser_action_row1132[] = {
        2,
-       -1, 1, 566,
-       77, 0, 1333
+       -1, 1, 559,
+       77, 0, 1291
 };
-static int parser_action_row1168[] = {
+static int parser_action_row1133[] = {
        1,
-       -1, 1, 568
+       -1, 1, 561
 };
-static int parser_action_row1169[] = {
+static int parser_action_row1134[] = {
        2,
-       -1, 1, 573,
-       73, 0, 1334
+       -1, 1, 566,
+       73, 0, 1292
 };
-static int parser_action_row1170[] = {
+static int parser_action_row1135[] = {
        1,
-       -1, 1, 578
+       -1, 1, 571
 };
-static int parser_action_row1171[] = {
+static int parser_action_row1136[] = {
        3,
-       -1, 1, 463,
+       -1, 1, 456,
        96, 0, 53,
-       97, 0, 1335
+       97, 0, 1293
 };
-static int parser_action_row1172[] = {
+static int parser_action_row1137[] = {
        1,
-       -1, 1, 396
+       -1, 1, 389
 };
-static int parser_action_row1173[] = {
+static int parser_action_row1138[] = {
        2,
-       -1, 1, 459,
-       58, 0, 227
+       -1, 1, 452,
+       58, 0, 213
 };
-static int parser_action_row1174[] = {
+static int parser_action_row1139[] = {
        2,
-       -1, 3, 1173,
-       97, 0, 1337
+       -1, 3, 1138,
+       97, 0, 1295
 };
-static int parser_action_row1175[] = {
+static int parser_action_row1140[] = {
        1,
        -1, 1, 76
 };
-static int parser_action_row1176[] = {
+static int parser_action_row1141[] = {
        4,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1177[] = {
+static int parser_action_row1142[] = {
        1,
        -1, 1, 16
 };
-static int parser_action_row1178[] = {
+static int parser_action_row1143[] = {
        1,
        -1, 1, 17
 };
-static int parser_action_row1179[] = {
+static int parser_action_row1144[] = {
        3,
-       -1, 1, 411,
-       57, 0, 853,
-       94, 0, 216
+       -1, 1, 404,
+       57, 0, 825,
+       94, 0, 202
 };
-static int parser_action_row1180[] = {
+static int parser_action_row1145[] = {
        2,
-       -1, 3, 1179,
-       53, 0, 1344
+       -1, 3, 1144,
+       53, 0, 1302
 };
-static int parser_action_row1181[] = {
+static int parser_action_row1146[] = {
        4,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       56, 0, 1345
+       56, 0, 1303
 };
-static int parser_action_row1182[] = {
+static int parser_action_row1147[] = {
        1,
        -1, 1, 153
 };
-static int parser_action_row1183[] = {
+static int parser_action_row1148[] = {
        25,
-       -1, 3, 1182,
-       41, 0, 1349,
-       47, 0, 420,
-       54, 0, 664,
-       74, 0, 665,
-       75, 0, 666,
-       76, 0, 667,
-       77, 0, 668,
-       78, 0, 669,
-       79, 0, 670,
-       80, 0, 671,
-       81, 0, 672,
-       82, 0, 673,
-       83, 0, 674,
-       84, 0, 675,
-       85, 0, 676,
-       86, 0, 677,
-       87, 0, 678,
-       88, 0, 679,
-       89, 0, 680,
-       90, 0, 681,
-       91, 0, 682,
-       92, 0, 683,
-       96, 0, 448,
-       97, 0, 684
+       -1, 3, 1147,
+       41, 0, 1307,
+       47, 0, 392,
+       54, 0, 636,
+       74, 0, 637,
+       75, 0, 638,
+       76, 0, 639,
+       77, 0, 640,
+       78, 0, 641,
+       79, 0, 642,
+       80, 0, 643,
+       81, 0, 644,
+       82, 0, 645,
+       83, 0, 646,
+       84, 0, 647,
+       85, 0, 648,
+       86, 0, 649,
+       87, 0, 650,
+       88, 0, 651,
+       89, 0, 652,
+       90, 0, 653,
+       91, 0, 654,
+       92, 0, 655,
+       96, 0, 420,
+       97, 0, 656
 };
-static int parser_action_row1184[] = {
+static int parser_action_row1149[] = {
        4,
        -1, 1, 79,
-       0, 1, 502,
-       1, 1, 502,
-       95, 1, 502
+       0, 1, 495,
+       1, 1, 495,
+       95, 1, 495
 };
-static int parser_action_row1185[] = {
+static int parser_action_row1150[] = {
        4,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1186[] = {
+static int parser_action_row1151[] = {
        2,
-       -1, 1, 475,
-       9, 0, 1356
+       -1, 1, 468,
+       9, 0, 1314
 };
-static int parser_action_row1187[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1152[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -14516,593 +13090,530 @@ static int parser_action_row1187[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1188[] = {
+static int parser_action_row1153[] = {
        3,
-       -1, 3, 1187,
-       28, 0, 90,
-       115, 0, 91
+       -1, 3, 1152,
+       28, 0, 83,
+       108, 0, 84
 };
-static int parser_action_row1189[] = {
+static int parser_action_row1154[] = {
        1,
-       -1, 1, 500
+       -1, 1, 493
 };
-static int parser_action_row1190[] = {
+static int parser_action_row1155[] = {
        2,
        -1, 1, 39,
-       96, 0, 1360
+       96, 0, 1318
 };
-static int parser_action_row1191[] = {
+static int parser_action_row1156[] = {
        1,
        -1, 1, 26
 };
-static int parser_action_row1192[] = {
+static int parser_action_row1157[] = {
        1,
        -1, 1, 47
 };
-static int parser_action_row1193[] = {
+static int parser_action_row1158[] = {
        2,
-       -1, 3, 1192,
-       9, 0, 1363
+       -1, 3, 1157,
+       9, 0, 1321
 };
-static int parser_action_row1194[] = {
+static int parser_action_row1159[] = {
        1,
-       -1, 1, 1074
+       -1, 1, 1046
 };
-static int parser_action_row1195[] = {
+static int parser_action_row1160[] = {
        1,
-       -1, 1, 1073
+       -1, 1, 1045
 };
-static int parser_action_row1196[] = {
+static int parser_action_row1161[] = {
        5,
        -1, 1, 81,
-       18, 0, 254,
-       19, 0, 255,
-       20, 0, 256,
-       21, 0, 257
+       18, 0, 233,
+       19, 0, 234,
+       20, 0, 235,
+       21, 0, 236
 };
-static int parser_action_row1197[] = {
-       62,
-       -1, 1, 426,
-       12, 0, 122,
+static int parser_action_row1162[] = {
+       55,
+       -1, 1, 419,
+       12, 0, 115,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 123,
+       22, 0, 116,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 124,
-       33, 0, 1365,
-       34, 0, 1366,
-       35, 0, 1367,
-       36, 0, 1368,
+       31, 0, 117,
+       33, 0, 1323,
+       34, 0, 1324,
+       35, 0, 1325,
+       36, 0, 1326,
        37, 0, 43,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       47, 0, 420,
-       48, 0, 131,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       47, 0, 392,
+       48, 0, 124,
        50, 0, 49,
-       51, 0, 1369,
-       52, 0, 1370,
-       54, 0, 643,
-       74, 0, 1371,
-       75, 0, 1372,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 1373,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       94, 0, 216,
-       96, 0, 448,
-       97, 0, 1374,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       51, 0, 1327,
+       52, 0, 1328,
+       54, 0, 615,
+       74, 0, 1329,
+       75, 0, 1330,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 1331,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       94, 0, 202,
+       96, 0, 420,
+       97, 0, 1332,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1198[] = {
+static int parser_action_row1163[] = {
        1,
        -1, 1, 75
 };
-static int parser_action_row1199[] = {
+static int parser_action_row1164[] = {
        1,
-       -1, 1, 1087
+       -1, 1, 1059
 };
-static int parser_action_row1200[] = {
+static int parser_action_row1165[] = {
        4,
        -1, 1, 30,
-       6, 0, 1193,
+       6, 0, 1158,
        13, 0, 32,
-       97, 0, 1194
+       97, 0, 1159
 };
-static int parser_action_row1201[] = {
+static int parser_action_row1166[] = {
        1,
        -1, 1, 44
 };
-static int parser_action_row1202[] = {
+static int parser_action_row1167[] = {
        1,
-       -1, 1, 467
+       -1, 1, 460
 };
-static int parser_action_row1203[] = {
+static int parser_action_row1168[] = {
        2,
-       -1, 3, 1202,
-       45, 0, 1394
+       -1, 3, 1167,
+       45, 0, 1352
 };
-static int parser_action_row1204[] = {
+static int parser_action_row1169[] = {
        4,
-       -1, 3, 1203,
-       31, 0, 1395,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 1168,
+       31, 0, 1353,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row1205[] = {
+static int parser_action_row1170[] = {
        1,
        -1, 1, 209
 };
-static int parser_action_row1206[] = {
+static int parser_action_row1171[] = {
        1,
        -1, 1, 228
 };
-static int parser_action_row1207[] = {
+static int parser_action_row1172[] = {
        1,
        -1, 1, 207
 };
-static int parser_action_row1208[] = {
+static int parser_action_row1173[] = {
        1,
        -1, 1, 226
 };
-static int parser_action_row1209[] = {
+static int parser_action_row1174[] = {
        1,
        -1, 1, 212
 };
-static int parser_action_row1210[] = {
+static int parser_action_row1175[] = {
        1,
        -1, 1, 231
 };
-static int parser_action_row1211[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1176[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1212[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1177[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1213[] = {
+static int parser_action_row1178[] = {
        1,
        -1, 1, 216
 };
-static int parser_action_row1214[] = {
+static int parser_action_row1179[] = {
        1,
        -1, 1, 235
 };
-static int parser_action_row1215[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1180[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1216[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1181[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1217[] = {
+static int parser_action_row1182[] = {
        1,
        -1, 1, 195
 };
-static int parser_action_row1218[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1183[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1219[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1184[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1220[] = {
+static int parser_action_row1185[] = {
        13,
        -1, 1, 336,
-       59, 0, 1403,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       59, 0, 1361,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1221[] = {
+static int parser_action_row1186[] = {
        1,
        -1, 1, 185
 };
-static int parser_action_row1222[] = {
+static int parser_action_row1187[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1223[] = {
+static int parser_action_row1188[] = {
        1,
-       -1, 1, 782
+       -1, 1, 768
 };
-static int parser_action_row1224[] = {
+static int parser_action_row1189[] = {
        2,
-       -1, 1, 785,
-       52, 0, 295
+       -1, 1, 771,
+       52, 0, 274
 };
-static int parser_action_row1225[] = {
+static int parser_action_row1190[] = {
        3,
-       -1, 1, 789,
-       52, 0, 295,
-       58, 0, 227
+       -1, 1, 775,
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row1226[] = {
+static int parser_action_row1191[] = {
        2,
-       -1, 3, 1225,
-       97, 0, 1408
+       -1, 3, 1190,
+       97, 0, 1366
 };
-static int parser_action_row1227[] = {
+static int parser_action_row1192[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1228[] = {
+static int parser_action_row1193[] = {
        2,
-       -1, 3, 1227,
-       45, 0, 1410
+       -1, 3, 1192,
+       45, 0, 1368
 };
-static int parser_action_row1229[] = {
+static int parser_action_row1194[] = {
        4,
-       -1, 3, 1228,
-       31, 0, 1411,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 1193,
+       31, 0, 1369,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row1230[] = {
+static int parser_action_row1195[] = {
        1,
-       -1, 1, 763
+       -1, 1, 749
 };
-static int parser_action_row1231[] = {
+static int parser_action_row1196[] = {
        3,
        -1, 1, 157,
-       24, 1, 919,
-       49, 1, 1004
+       24, 1, 891,
+       49, 1, 976
 };
-static int parser_action_row1232[] = {
+static int parser_action_row1197[] = {
        3,
        -1, 1, 156,
-       24, 1, 918,
-       49, 1, 1003
+       24, 1, 890,
+       49, 1, 975
 };
-static int parser_action_row1233[] = {
+static int parser_action_row1198[] = {
        2,
        -1, 1, 256,
-       24, 1, 956
+       24, 1, 928
 };
-static int parser_action_row1234[] = {
+static int parser_action_row1199[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1235[] = {
+static int parser_action_row1200[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1236[] = {
+static int parser_action_row1201[] = {
        2,
        -1, 1, 267,
-       24, 1, 959
+       24, 1, 931
 };
-static int parser_action_row1237[] = {
+static int parser_action_row1202[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1238[] = {
+static int parser_action_row1203[] = {
        2,
        -1, 1, 281,
-       24, 0, 1416
+       24, 0, 1374
 };
-static int parser_action_row1239[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1204[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1417,
-       12, 0, 911,
-       15, 0, 912,
+       9, 0, 1375,
+       12, 0, 883,
+       15, 0, 884,
        16, 0, 34,
-       22, 0, 913,
-       25, 0, 915,
-       26, 0, 916,
-       27, 0, 917,
-       33, 0, 918,
-       34, 0, 919,
-       35, 0, 920,
-       36, 0, 921,
-       37, 0, 922,
+       22, 0, 885,
+       25, 0, 887,
+       26, 0, 888,
+       27, 0, 889,
+       33, 0, 890,
+       34, 0, 891,
+       35, 0, 892,
+       36, 0, 893,
+       37, 0, 894,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 923,
-       51, 0, 924,
+       50, 0, 895,
+       51, 0, 896,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 925,
+       97, 0, 897,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1240[] = {
+static int parser_action_row1205[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1241[] = {
+static int parser_action_row1206[] = {
        2,
-       -1, 3, 1240,
-       57, 0, 1421
+       -1, 3, 1205,
+       57, 0, 1379
 };
-static int parser_action_row1242[] = {
+static int parser_action_row1207[] = {
        5,
-       -1, 1, 464,
-       12, 0, 1422,
-       46, 0, 693,
+       -1, 1, 457,
+       12, 0, 1380,
+       46, 0, 665,
        96, 0, 53,
-       97, 0, 1423
+       97, 0, 1381
 };
-static int parser_action_row1243[] = {
+static int parser_action_row1208[] = {
        2,
        -1, 1, 191,
-       24, 1, 946
+       24, 1, 918
 };
-static int parser_action_row1244[] = {
+static int parser_action_row1209[] = {
        2,
        -1, 1, 197,
-       24, 1, 952
+       24, 1, 924
 };
-static int parser_action_row1245[] = {
+static int parser_action_row1210[] = {
        2,
        -1, 1, 188,
-       24, 1, 943
+       24, 1, 915
 };
-static int parser_action_row1246[] = {
+static int parser_action_row1211[] = {
        1,
        -1, 1, 262
 };
-static int parser_action_row1247[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1212[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -15131,1408 +13642,1261 @@ static int parser_action_row1247[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1248[] = {
+static int parser_action_row1213[] = {
        1,
        -1, 1, 263
 };
-static int parser_action_row1249[] = {
+static int parser_action_row1214[] = {
        4,
-       -1, 3, 1248,
+       -1, 3, 1213,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1250[] = {
+static int parser_action_row1215[] = {
        1,
        -1, 1, 258
 };
-static int parser_action_row1251[] = {
+static int parser_action_row1216[] = {
        2,
        -1, 1, 199,
-       24, 1, 954
+       24, 1, 926
 };
-static int parser_action_row1252[] = {
+static int parser_action_row1217[] = {
        2,
        -1, 1, 190,
-       24, 1, 945
+       24, 1, 917
 };
-static int parser_action_row1253[] = {
-       31,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 510,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row1218[] = {
+       24,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 482,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1254[] = {
-       45,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row1219[] = {
+       38,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 345,
-       59, 0, 715,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       59, 0, 687,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 345,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1255[] = {
+static int parser_action_row1220[] = {
        2,
-       -1, 3, 1254,
-       15, 0, 1429
+       -1, 3, 1219,
+       15, 0, 1387
 };
-static int parser_action_row1256[] = {
+static int parser_action_row1221[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1257[] = {
+static int parser_action_row1222[] = {
        1,
        -1, 1, 336
 };
-static int parser_action_row1258[] = {
+static int parser_action_row1223[] = {
        2,
-       -1, 3, 1257,
-       55, 0, 1431
+       -1, 3, 1222,
+       55, 0, 1389
 };
-static int parser_action_row1259[] = {
+static int parser_action_row1224[] = {
        3,
-       -1, 3, 1258,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 1223,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row1260[] = {
+static int parser_action_row1225[] = {
        1,
-       -1, 1, 1095
+       -1, 1, 1067
 };
-static int parser_action_row1261[] = {
+static int parser_action_row1226[] = {
        2,
-       -1, 1, 815,
-       94, 0, 618
+       -1, 1, 794,
+       94, 0, 590
 };
-static int parser_action_row1262[] = {
+static int parser_action_row1227[] = {
        2,
-       -1, 3, 1261,
-       53, 0, 1434
+       -1, 3, 1226,
+       53, 0, 1392
 };
-static int parser_action_row1263[] = {
+static int parser_action_row1228[] = {
        1,
-       -1, 1, 816
+       -1, 1, 795
 };
-static int parser_action_row1264[] = {
+static int parser_action_row1229[] = {
        1,
        -1, 1, 357
 };
-static int parser_action_row1265[] = {
+static int parser_action_row1230[] = {
        1,
        -1, 1, 361
 };
-static int parser_action_row1266[] = {
+static int parser_action_row1231[] = {
        2,
        -1, 1, 360,
-       52, 0, 295
+       52, 0, 274
 };
-static int parser_action_row1267[] = {
+static int parser_action_row1232[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1268[] = {
+static int parser_action_row1233[] = {
        1,
-       -1, 1, 416
+       -1, 1, 409
 };
-static int parser_action_row1269[] = {
+static int parser_action_row1234[] = {
        1,
-       -1, 1, 418
+       -1, 1, 411
 };
-static int parser_action_row1270[] = {
+static int parser_action_row1235[] = {
        1,
-       -1, 1, 419
+       -1, 1, 412
 };
-static int parser_action_row1271[] = {
+static int parser_action_row1236[] = {
        1,
-       -1, 1, 420
+       -1, 1, 413
 };
-static int parser_action_row1272[] = {
+static int parser_action_row1237[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1273[] = {
+static int parser_action_row1238[] = {
        2,
-       -1, 1, 431,
-       56, 0, 1438
+       -1, 1, 424,
+       56, 0, 1396
 };
-static int parser_action_row1274[] = {
+static int parser_action_row1239[] = {
        1,
        -1, 1, 276
 };
-static int parser_action_row1275[] = {
+static int parser_action_row1240[] = {
        2,
-       -1, 3, 1274,
-       55, 0, 1441
+       -1, 3, 1239,
+       55, 0, 1399
 };
-static int parser_action_row1276[] = {
+static int parser_action_row1241[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1277[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1242[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1278[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1243[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1279[] = {
+static int parser_action_row1244[] = {
        14,
        -1, 1, 337,
-       52, 0, 295,
-       59, 0, 1443,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       52, 0, 274,
+       59, 0, 1401,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1280[] = {
-       31,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 470,
-       27, 0, 471,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1245[] = {
+       24,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 442,
+       27, 0, 443,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1281[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1246[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1282[] = {
+static int parser_action_row1247[] = {
        1,
-       -1, 1, 600
+       -1, 1, 593
 };
-static int parser_action_row1283[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1248[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1284[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 1126,
-       31, 0, 1128,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1249[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 1098,
+       31, 0, 1100,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1285[] = {
+static int parser_action_row1250[] = {
        3,
-       -1, 3, 1284,
-       47, 0, 1449,
-       96, 0, 1450
+       -1, 3, 1249,
+       47, 0, 1407,
+       96, 0, 1408
 };
-static int parser_action_row1286[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1251[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1287[] = {
+static int parser_action_row1252[] = {
        1,
-       -1, 1, 617
+       -1, 1, 610
 };
-static int parser_action_row1288[] = {
+static int parser_action_row1253[] = {
        1,
-       -1, 1, 618
+       -1, 1, 611
 };
-static int parser_action_row1289[] = {
+static int parser_action_row1254[] = {
        1,
-       -1, 1, 619
+       -1, 1, 612
 };
-static int parser_action_row1290[] = {
+static int parser_action_row1255[] = {
        1,
-       -1, 1, 620
+       -1, 1, 613
 };
-static int parser_action_row1291[] = {
+static int parser_action_row1256[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1292[] = {
+static int parser_action_row1257[] = {
        3,
-       -1, 3, 1291,
-       41, 0, 1308,
-       98, 0, 1454
+       -1, 3, 1256,
+       41, 0, 1266,
+       98, 0, 1412
 };
-static int parser_action_row1293[] = {
+static int parser_action_row1258[] = {
        2,
-       -1, 3, 1292,
-       73, 0, 1455
-};
-static int parser_action_row1294[] = {
-       1,
-       -1, 1, 570
-};
-static int parser_action_row1295[] = {
-       1,
-       -1, 1, 569
-};
-static int parser_action_row1296[] = {
-       1,
-       -1, 1, 571
-};
-static int parser_action_row1297[] = {
-       1,
-       -1, 1, 582
-};
-static int parser_action_row1298[] = {
-       1,
-       -1, 1, 621
-};
-static int parser_action_row1299[] = {
-       1,
-       -1, 1, 622
-};
-static int parser_action_row1300[] = {
-       1,
-       -1, 1, 623
+       -1, 3, 1257,
+       73, 0, 1413
 };
-static int parser_action_row1301[] = {
+static int parser_action_row1259[] = {
        1,
-       -1, 1, 624
+       -1, 1, 563
 };
-static int parser_action_row1302[] = {
+static int parser_action_row1260[] = {
        1,
-       -1, 1, 625
+       -1, 1, 562
 };
-static int parser_action_row1303[] = {
+static int parser_action_row1261[] = {
        1,
-       -1, 1, 626
+       -1, 1, 564
 };
-static int parser_action_row1304[] = {
+static int parser_action_row1262[] = {
        1,
-       -1, 1, 627
+       -1, 1, 575
 };
-static int parser_action_row1305[] = {
+static int parser_action_row1263[] = {
        1,
-       -1, 1, 628
+       -1, 1, 614
 };
-static int parser_action_row1306[] = {
+static int parser_action_row1264[] = {
        1,
-       -1, 1, 629
+       -1, 1, 615
 };
-static int parser_action_row1307[] = {
+static int parser_action_row1265[] = {
        1,
-       -1, 1, 631
+       -1, 1, 617
 };
-static int parser_action_row1308[] = {
+static int parser_action_row1266[] = {
        1,
-       -1, 1, 630
+       -1, 1, 616
 };
-static int parser_action_row1309[] = {
+static int parser_action_row1267[] = {
        2,
-       -1, 1, 598,
-       52, 0, 295
+       -1, 1, 591,
+       52, 0, 274
 };
-static int parser_action_row1310[] = {
+static int parser_action_row1268[] = {
        1,
-       -1, 1, 580
+       -1, 1, 573
 };
-static int parser_action_row1311[] = {
+static int parser_action_row1269[] = {
        2,
-       -1, 1, 588,
-       52, 0, 295
+       -1, 1, 581,
+       52, 0, 274
 };
-static int parser_action_row1312[] = {
+static int parser_action_row1270[] = {
        3,
-       -1, 3, 1311,
-       54, 0, 1458,
-       55, 0, 1459
+       -1, 3, 1269,
+       54, 0, 1416,
+       55, 0, 1417
 };
-static int parser_action_row1313[] = {
+static int parser_action_row1271[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1314[] = {
+static int parser_action_row1272[] = {
        4,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       24, 0, 1461
+       24, 0, 1419
 };
-static int parser_action_row1315[] = {
+static int parser_action_row1273[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1316[] = {
+static int parser_action_row1274[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1317[] = {
+static int parser_action_row1275[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1318[] = {
+static int parser_action_row1276[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1319[] = {
+static int parser_action_row1277[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1320[] = {
+static int parser_action_row1278[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1321[] = {
+static int parser_action_row1279[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1322[] = {
+static int parser_action_row1280[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1323[] = {
+static int parser_action_row1281[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1324[] = {
+static int parser_action_row1282[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1325[] = {
+static int parser_action_row1283[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1326[] = {
+static int parser_action_row1284[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1327[] = {
+static int parser_action_row1285[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1328[] = {
+static int parser_action_row1286[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1329[] = {
+static int parser_action_row1287[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1330[] = {
+static int parser_action_row1288[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1331[] = {
+static int parser_action_row1289[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1332[] = {
+static int parser_action_row1290[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1333[] = {
+static int parser_action_row1291[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1334[] = {
+static int parser_action_row1292[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1335[] = {
+static int parser_action_row1293[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1336[] = {
+static int parser_action_row1294[] = {
        3,
-       -1, 1, 596,
-       52, 0, 295,
-       58, 0, 227
+       -1, 1, 589,
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row1337[] = {
+static int parser_action_row1295[] = {
        2,
-       -1, 1, 462,
-       97, 0, 1485
+       -1, 1, 455,
+       97, 0, 1443
 };
-static int parser_action_row1338[] = {
+static int parser_action_row1296[] = {
        2,
-       -1, 1, 460,
-       58, 0, 227
+       -1, 1, 453,
+       58, 0, 213
 };
-static int parser_action_row1339[] = {
+static int parser_action_row1297[] = {
        1,
-       -1, 1, 1088
+       -1, 1, 1060
 };
-static int parser_action_row1340[] = {
+static int parser_action_row1298[] = {
        2,
        -1, 1, 30,
        13, 0, 32
 };
-static int parser_action_row1341[] = {
+static int parser_action_row1299[] = {
        5,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1487,
+       9, 0, 1445,
        95, 0, 3
 };
-static int parser_action_row1342[] = {
+static int parser_action_row1300[] = {
        2,
        -1, 1, 118,
-       71, 0, 1489
+       71, 0, 1447
 };
-static int parser_action_row1343[] = {
+static int parser_action_row1301[] = {
        2,
-       -1, 1, 410,
-       57, 0, 853
+       -1, 1, 403,
+       57, 0, 825
 };
-static int parser_action_row1344[] = {
+static int parser_action_row1302[] = {
        1,
        -1, 1, 117
 };
-static int parser_action_row1345[] = {
+static int parser_action_row1303[] = {
        4,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       57, 0, 853
+       57, 0, 825
 };
-static int parser_action_row1346[] = {
+static int parser_action_row1304[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1347[] = {
+static int parser_action_row1305[] = {
        1,
-       -1, 1, 1090
+       -1, 1, 1062
 };
-static int parser_action_row1348[] = {
+static int parser_action_row1306[] = {
        1,
        -1, 1, 113
 };
-static int parser_action_row1349[] = {
+static int parser_action_row1307[] = {
        4,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       56, 0, 1345
+       56, 0, 1303
 };
-static int parser_action_row1350[] = {
+static int parser_action_row1308[] = {
        1,
        -1, 1, 128
 };
-static int parser_action_row1351[] = {
+static int parser_action_row1309[] = {
        2,
        -1, 1, 122,
-       56, 0, 1496
+       56, 0, 1454
 };
-static int parser_action_row1352[] = {
+static int parser_action_row1310[] = {
        1,
        -1, 1, 126
 };
-static int parser_action_row1353[] = {
+static int parser_action_row1311[] = {
        1,
        -1, 1, 127
 };
-static int parser_action_row1354[] = {
+static int parser_action_row1312[] = {
        2,
        -1, 1, 131,
-       73, 0, 1499
+       73, 0, 1457
 };
-static int parser_action_row1355[] = {
+static int parser_action_row1313[] = {
        1,
        -1, 1, 129
 };
-static int parser_action_row1356[] = {
+static int parser_action_row1314[] = {
        9,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        4, 1, 80,
-       9, 0, 1500,
+       9, 0, 1458,
        15, 1, 80,
        28, 1, 80,
        95, 0, 3,
-       115, 1, 80
+       108, 1, 80
 };
-static int parser_action_row1357[] = {
+static int parser_action_row1315[] = {
        1,
-       -1, 1, 476
+       -1, 1, 469
 };
-static int parser_action_row1358[] = {
+static int parser_action_row1316[] = {
        1,
-       -1, 1, 497
+       -1, 1, 490
 };
-static int parser_action_row1359[] = {
+static int parser_action_row1317[] = {
        2,
-       -1, 1, 475,
-       9, 0, 1356
+       -1, 1, 468,
+       9, 0, 1314
 };
-static int parser_action_row1360[] = {
+static int parser_action_row1318[] = {
        1,
-       -1, 1, 501
+       -1, 1, 494
 };
-static int parser_action_row1361[] = {
+static int parser_action_row1319[] = {
        3,
        -1, 1, 155,
-       57, 0, 357,
-       94, 0, 216
+       57, 0, 329,
+       94, 0, 202
 };
-static int parser_action_row1362[] = {
+static int parser_action_row1320[] = {
        2,
-       -1, 3, 1361,
-       55, 0, 1504
+       -1, 3, 1319,
+       55, 0, 1462
 };
-static int parser_action_row1363[] = {
+static int parser_action_row1321[] = {
        2,
        -1, 1, 37,
-       56, 0, 1505
+       56, 0, 1463
 };
-static int parser_action_row1364[] = {
+static int parser_action_row1322[] = {
        1,
        -1, 1, 27
 };
-static int parser_action_row1365[] = {
+static int parser_action_row1323[] = {
        7,
-       -1, 3, 1364,
-       10, 0, 1508,
-       11, 0, 1509,
-       12, 0, 1510,
-       16, 0, 1511,
-       38, 0, 1512,
-       41, 0, 1513
+       -1, 3, 1322,
+       10, 0, 1466,
+       11, 0, 1467,
+       12, 0, 1468,
+       16, 0, 1469,
+       38, 0, 1470,
+       41, 0, 1471
 };
-static int parser_action_row1366[] = {
-       32,
-       -1, 1, 1027,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1324[] = {
+       25,
+       -1, 1, 999,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1367[] = {
+static int parser_action_row1325[] = {
        2,
-       -1, 1, 1032,
-       49, 0, 209
+       -1, 1, 1004,
+       49, 0, 195
 };
-static int parser_action_row1368[] = {
+static int parser_action_row1326[] = {
        2,
-       -1, 1, 1029,
-       49, 0, 209
+       -1, 1, 1001,
+       49, 0, 195
 };
-static int parser_action_row1369[] = {
+static int parser_action_row1327[] = {
        1,
-       -1, 1, 1031
+       -1, 1, 1003
 };
-static int parser_action_row1370[] = {
+static int parser_action_row1328[] = {
        2,
-       -1, 3, 1369,
-       11, 0, 1517
+       -1, 3, 1327,
+       11, 0, 1475
 };
-static int parser_action_row1371[] = {
+static int parser_action_row1329[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1372[] = {
-       30,
-       -1, 1, 504,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1330[] = {
+       23,
+       -1, 1, 497,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1373[] = {
-       30,
-       -1, 1, 505,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1331[] = {
+       23,
+       -1, 1, 498,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1374[] = {
-       30,
-       -1, 1, 513,
-       12, 0, 182,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1332[] = {
+       23,
+       -1, 1, 506,
+       12, 0, 168,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1375[] = {
+static int parser_action_row1333[] = {
        15,
-       -1, 1, 768,
-       52, 0, 295,
-       58, 0, 227,
-       59, 0, 1519,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 754,
+       52, 0, 274,
+       58, 0, 213,
+       59, 0, 1477,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1376[] = {
+static int parser_action_row1334[] = {
        1,
-       -1, 1, 820
+       -1, 1, 799
 };
-static int parser_action_row1377[] = {
+static int parser_action_row1335[] = {
        1,
-       -1, 1, 1025
+       -1, 1, 997
 };
-static int parser_action_row1378[] = {
+static int parser_action_row1336[] = {
        1,
-       -1, 1, 1034
+       -1, 1, 1006
 };
-static int parser_action_row1379[] = {
+static int parser_action_row1337[] = {
        1,
-       -1, 1, 1036
+       -1, 1, 1008
 };
-static int parser_action_row1380[] = {
+static int parser_action_row1338[] = {
        1,
-       -1, 1, 1035
+       -1, 1, 1007
 };
-static int parser_action_row1381[] = {
+static int parser_action_row1339[] = {
        1,
-       -1, 1, 1037
+       -1, 1, 1009
 };
-static int parser_action_row1382[] = {
+static int parser_action_row1340[] = {
        1,
-       -1, 1, 1038
+       -1, 1, 1010
 };
-static int parser_action_row1383[] = {
+static int parser_action_row1341[] = {
        1,
-       -1, 1, 1039
+       -1, 1, 1011
 };
-static int parser_action_row1384[] = {
+static int parser_action_row1342[] = {
        1,
-       -1, 1, 427
+       -1, 1, 420
 };
-static int parser_action_row1385[] = {
+static int parser_action_row1343[] = {
        3,
-       -1, 3, 1384,
-       41, 0, 324,
-       98, 0, 1522
+       -1, 3, 1342,
+       41, 0, 296,
+       98, 0, 1480
 };
-static int parser_action_row1386[] = {
+static int parser_action_row1344[] = {
        22,
-       -1, 1, 461,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       97, 0, 1523
+       -1, 1, 454,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       97, 0, 1481
 };
-static int parser_action_row1387[] = {
+static int parser_action_row1345[] = {
        1,
-       -1, 1, 824
+       -1, 1, 803
 };
-static int parser_action_row1388[] = {
+static int parser_action_row1346[] = {
        1,
-       -1, 1, 1026
+       -1, 1, 998
 };
-static int parser_action_row1389[] = {
+static int parser_action_row1347[] = {
        1,
-       -1, 1, 821
+       -1, 1, 800
 };
-static int parser_action_row1390[] = {
+static int parser_action_row1348[] = {
        3,
-       -1, 1, 751,
-       54, 0, 262,
-       73, 0, 1524
+       -1, 1, 737,
+       54, 0, 241,
+       73, 0, 1482
 };
-static int parser_action_row1391[] = {
+static int parser_action_row1349[] = {
        1,
-       -1, 1, 430
+       -1, 1, 423
 };
-static int parser_action_row1392[] = {
+static int parser_action_row1350[] = {
        2,
-       -1, 1, 818,
-       56, 0, 1438
+       -1, 1, 797,
+       56, 0, 1396
 };
-static int parser_action_row1393[] = {
+static int parser_action_row1351[] = {
        1,
-       -1, 1, 822
+       -1, 1, 801
 };
-static int parser_action_row1394[] = {
+static int parser_action_row1352[] = {
        23,
-       -1, 1, 463,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       96, 0, 53,
-       97, 0, 1527
+       -1, 1, 456,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       96, 0, 53,
+       97, 0, 1485
 };
-static int parser_action_row1395[] = {
+static int parser_action_row1353[] = {
        1,
        -1, 1, 365
 };
-static int parser_action_row1396[] = {
+static int parser_action_row1354[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1397[] = {
+static int parser_action_row1355[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1398[] = {
+static int parser_action_row1356[] = {
        1,
        -1, 1, 211
 };
-static int parser_action_row1399[] = {
+static int parser_action_row1357[] = {
        1,
        -1, 1, 230
 };
-static int parser_action_row1400[] = {
+static int parser_action_row1358[] = {
        1,
        -1, 1, 215
 };
-static int parser_action_row1401[] = {
+static int parser_action_row1359[] = {
        1,
        -1, 1, 234
 };
-static int parser_action_row1402[] = {
+static int parser_action_row1360[] = {
        1,
        -1, 1, 214
 };
-static int parser_action_row1403[] = {
+static int parser_action_row1361[] = {
        1,
        -1, 1, 233
 };
-static int parser_action_row1404[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1362[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1405[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1363[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1406[] = {
+static int parser_action_row1364[] = {
        2,
-       -1, 3, 1405,
-       24, 0, 1533
+       -1, 3, 1363,
+       24, 0, 1491
 };
-static int parser_action_row1407[] = {
+static int parser_action_row1365[] = {
        1,
-       -1, 1, 784
+       -1, 1, 770
 };
-static int parser_action_row1408[] = {
+static int parser_action_row1366[] = {
        1,
-       -1, 1, 788
+       -1, 1, 774
 };
-static int parser_action_row1409[] = {
+static int parser_action_row1367[] = {
        2,
-       -1, 1, 787,
-       52, 0, 295
+       -1, 1, 773,
+       52, 0, 274
 };
-static int parser_action_row1410[] = {
+static int parser_action_row1368[] = {
        1,
-       -1, 1, 452
+       -1, 1, 445
 };
-static int parser_action_row1411[] = {
+static int parser_action_row1369[] = {
        1,
-       -1, 1, 792
+       -1, 1, 778
 };
-static int parser_action_row1412[] = {
+static int parser_action_row1370[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1413[] = {
+static int parser_action_row1371[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1414[] = {
+static int parser_action_row1372[] = {
        2,
-       -1, 3, 1413,
-       23, 0, 1537
+       -1, 3, 1371,
+       23, 0, 1495
 };
-static int parser_action_row1415[] = {
+static int parser_action_row1373[] = {
        2,
-       -1, 3, 1414,
-       15, 0, 1538
+       -1, 3, 1372,
+       15, 0, 1496
 };
-static int parser_action_row1416[] = {
+static int parser_action_row1374[] = {
        2,
-       -1, 3, 1415,
-       28, 0, 1539
+       -1, 3, 1373,
+       28, 0, 1497
 };
-static int parser_action_row1417[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1375[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1417,
-       12, 0, 911,
-       15, 0, 912,
+       9, 0, 1375,
+       12, 0, 883,
+       15, 0, 884,
        16, 0, 34,
-       22, 0, 913,
-       25, 0, 915,
-       26, 0, 916,
-       27, 0, 917,
-       33, 0, 918,
-       34, 0, 919,
-       35, 0, 920,
-       36, 0, 921,
-       37, 0, 922,
+       22, 0, 885,
+       25, 0, 887,
+       26, 0, 888,
+       27, 0, 889,
+       33, 0, 890,
+       34, 0, 891,
+       35, 0, 892,
+       36, 0, 893,
+       37, 0, 894,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 923,
-       51, 0, 924,
+       50, 0, 895,
+       51, 0, 896,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 925,
+       97, 0, 897,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1418[] = {
+static int parser_action_row1376[] = {
        2,
        -1, 1, 158,
-       24, 1, 920
+       24, 1, 892
 };
-static int parser_action_row1419[] = {
-       37,
-       -1, 1, 464,
-       9, 0, 1541,
+static int parser_action_row1377[] = {
+       30,
+       -1, 1, 457,
+       9, 0, 1499,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -16560,175 +14924,147 @@ static int parser_action_row1419[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1420[] = {
+static int parser_action_row1378[] = {
        1,
-       -1, 1, 967
+       -1, 1, 939
 };
-static int parser_action_row1421[] = {
+static int parser_action_row1379[] = {
        2,
-       -1, 3, 1420,
-       15, 0, 1543
+       -1, 3, 1378,
+       15, 0, 1501
 };
-static int parser_action_row1422[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1380[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1423[] = {
-       33,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row1381[] = {
+       26,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 351,
        73, 1, 351,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1424[] = {
-       46,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row1382[] = {
+       39,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 333,
-       58, 0, 227,
-       59, 0, 870,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       58, 0, 213,
+       59, 0, 842,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 333,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1425[] = {
+static int parser_action_row1383[] = {
        3,
-       -1, 1, 461,
-       12, 0, 1547,
-       97, 0, 1548
+       -1, 1, 454,
+       12, 0, 1505,
+       97, 0, 1506
 };
-static int parser_action_row1426[] = {
+static int parser_action_row1384[] = {
        4,
-       -1, 1, 463,
-       12, 0, 1549,
+       -1, 1, 456,
+       12, 0, 1507,
        96, 0, 53,
-       97, 0, 1550
+       97, 0, 1508
 };
-static int parser_action_row1427[] = {
+static int parser_action_row1385[] = {
        1,
        -1, 1, 260
 };
-static int parser_action_row1428[] = {
+static int parser_action_row1386[] = {
        2,
        -1, 1, 198,
-       24, 1, 953
+       24, 1, 925
 };
-static int parser_action_row1429[] = {
+static int parser_action_row1387[] = {
        2,
        -1, 1, 189,
-       24, 1, 944
+       24, 1, 916
 };
-static int parser_action_row1430[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1388[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 169,
+       9, 0, 155,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -16757,3187 +15093,2816 @@ static int parser_action_row1430[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1431[] = {
+static int parser_action_row1389[] = {
        2,
-       -1, 3, 1430,
-       24, 0, 1554
+       -1, 3, 1388,
+       24, 0, 1512
 };
-static int parser_action_row1432[] = {
+static int parser_action_row1390[] = {
        2,
-       -1, 1, 815,
-       94, 0, 618
+       -1, 1, 794,
+       94, 0, 590
 };
-static int parser_action_row1433[] = {
+static int parser_action_row1391[] = {
        1,
        -1, 1, 152
 };
-static int parser_action_row1434[] = {
+static int parser_action_row1392[] = {
        1,
-       -1, 1, 636
+       -1, 1, 622
 };
-static int parser_action_row1435[] = {
+static int parser_action_row1393[] = {
        1,
-       -1, 1, 813
+       -1, 1, 792
 };
-static int parser_action_row1436[] = {
+static int parser_action_row1394[] = {
        1,
        -1, 1, 359
 };
-static int parser_action_row1437[] = {
-       60,
-       -1, 1, 464,
-       12, 0, 182,
+static int parser_action_row1395[] = {
+       53,
+       -1, 1, 457,
+       12, 0, 168,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 183,
+       22, 0, 169,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 184,
-       33, 0, 423,
-       34, 0, 424,
-       35, 0, 425,
-       36, 0, 426,
+       31, 0, 170,
+       33, 0, 395,
+       34, 0, 396,
+       35, 0, 397,
+       36, 0, 398,
        37, 0, 43,
-       38, 0, 185,
-       40, 0, 186,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 420,
-       48, 0, 187,
+       47, 0, 392,
+       48, 0, 173,
        50, 0, 49,
-       51, 0, 427,
+       51, 0, 399,
        52, 0, 51,
-       54, 0, 428,
-       74, 0, 429,
-       75, 0, 430,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 438,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       94, 0, 216,
-       96, 0, 448,
-       97, 0, 449,
+       54, 0, 400,
+       74, 0, 401,
+       75, 0, 402,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 410,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       94, 0, 202,
+       96, 0, 420,
+       97, 0, 421,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1438[] = {
+static int parser_action_row1396[] = {
        2,
-       -1, 3, 1437,
-       53, 0, 1557
+       -1, 3, 1395,
+       53, 0, 1515
 };
-static int parser_action_row1439[] = {
+static int parser_action_row1397[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1440[] = {
+static int parser_action_row1398[] = {
        1,
-       -1, 1, 1106
+       -1, 1, 1078
 };
-static int parser_action_row1441[] = {
+static int parser_action_row1399[] = {
        2,
-       -1, 1, 432,
-       56, 0, 1438
+       -1, 1, 425,
+       56, 0, 1396
 };
-static int parser_action_row1442[] = {
+static int parser_action_row1400[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1443[] = {
+static int parser_action_row1401[] = {
        1,
        -1, 1, 148
 };
-static int parser_action_row1444[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1402[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1445[] = {
+static int parser_action_row1403[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1446[] = {
+static int parser_action_row1404[] = {
        1,
-       -1, 1, 398
+       -1, 1, 391
 };
-static int parser_action_row1447[] = {
+static int parser_action_row1405[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1448[] = {
+static int parser_action_row1406[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1449[] = {
+static int parser_action_row1407[] = {
        1,
-       -1, 1, 540
+       -1, 1, 533
 };
-static int parser_action_row1450[] = {
+static int parser_action_row1408[] = {
        2,
-       -1, 3, 1449,
-       96, 0, 1564
+       -1, 3, 1407,
+       96, 0, 1522
 };
-static int parser_action_row1451[] = {
+static int parser_action_row1409[] = {
        2,
-       -1, 1, 815,
-       94, 0, 618
+       -1, 1, 794,
+       94, 0, 590
 };
-static int parser_action_row1452[] = {
+static int parser_action_row1410[] = {
        3,
-       -1, 1, 575,
-       52, 0, 295,
-       73, 0, 1566
+       -1, 1, 568,
+       52, 0, 274,
+       73, 0, 1524
 };
-static int parser_action_row1453[] = {
+static int parser_action_row1411[] = {
        1,
-       -1, 1, 572
+       -1, 1, 565
 };
-static int parser_action_row1454[] = {
+static int parser_action_row1412[] = {
        3,
-       -1, 3, 1453,
-       47, 0, 1449,
-       96, 0, 1450
+       -1, 3, 1411,
+       47, 0, 1407,
+       96, 0, 1408
 };
-static int parser_action_row1455[] = {
+static int parser_action_row1413[] = {
        2,
-       -1, 1, 577,
-       73, 1, 580
+       -1, 1, 570,
+       73, 1, 573
 };
-static int parser_action_row1456[] = {
+static int parser_action_row1414[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1457[] = {
+static int parser_action_row1415[] = {
        1,
-       -1, 1, 597
+       -1, 1, 590
 };
-static int parser_action_row1458[] = {
+static int parser_action_row1416[] = {
        1,
-       -1, 1, 586
+       -1, 1, 579
 };
-static int parser_action_row1459[] = {
+static int parser_action_row1417[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1460[] = {
+static int parser_action_row1418[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1461[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 1126,
-       31, 0, 1128,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1419[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 1098,
+       31, 0, 1100,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1462[] = {
+static int parser_action_row1420[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1463[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 1126,
-       31, 0, 1128,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1421[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 1098,
+       31, 0, 1100,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1464[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 1126,
-       31, 0, 1128,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1422[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 1098,
+       31, 0, 1100,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1465[] = {
+static int parser_action_row1423[] = {
        3,
-       -1, 3, 1464,
-       47, 0, 1576,
-       96, 0, 1577
+       -1, 3, 1422,
+       47, 0, 1534,
+       96, 0, 1535
 };
-static int parser_action_row1466[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1424[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1467[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1425[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1468[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1426[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1469[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1427[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1470[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1428[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1471[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1429[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1472[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1430[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1473[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1431[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1474[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1432[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1475[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1433[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1476[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1434[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1477[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1435[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1478[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1436[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1479[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1437[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1480[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1438[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1481[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1439[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1482[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1440[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1483[] = {
-       27,
-       -1, 1, 464,
-       12, 0, 1126,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1441[] = {
+       20,
+       -1, 1, 457,
+       12, 0, 1098,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1484[] = {
+static int parser_action_row1442[] = {
        5,
-       -1, 1, 464,
-       12, 0, 1597,
-       46, 0, 1598,
+       -1, 1, 457,
+       12, 0, 1555,
+       46, 0, 1556,
        96, 0, 53,
-       97, 0, 1599
+       97, 0, 1557
 };
-static int parser_action_row1485[] = {
+static int parser_action_row1443[] = {
        1,
-       -1, 1, 594
+       -1, 1, 587
 };
-static int parser_action_row1486[] = {
+static int parser_action_row1444[] = {
        2,
-       -1, 1, 592,
-       52, 0, 295
+       -1, 1, 585,
+       52, 0, 274
 };
-static int parser_action_row1487[] = {
+static int parser_action_row1445[] = {
        5,
        -1, 1, 81,
-       18, 0, 254,
-       19, 0, 255,
-       20, 0, 256,
-       21, 0, 257
+       18, 0, 233,
+       19, 0, 234,
+       20, 0, 235,
+       21, 0, 236
 };
-static int parser_action_row1488[] = {
+static int parser_action_row1446[] = {
        1,
        -1, 1, 77
 };
-static int parser_action_row1489[] = {
+static int parser_action_row1447[] = {
        1,
-       -1, 1, 1089
+       -1, 1, 1061
 };
-static int parser_action_row1490[] = {
+static int parser_action_row1448[] = {
        1,
        -1, 1, 120
 };
-static int parser_action_row1491[] = {
+static int parser_action_row1449[] = {
        2,
        -1, 1, 119,
-       71, 0, 1605
+       71, 0, 1563
 };
-static int parser_action_row1492[] = {
+static int parser_action_row1450[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1493[] = {
+static int parser_action_row1451[] = {
        1,
        -1, 1, 110
 };
-static int parser_action_row1494[] = {
+static int parser_action_row1452[] = {
        2,
-       -1, 3, 1493,
-       97, 0, 1178
+       -1, 3, 1451,
+       97, 0, 1143
 };
-static int parser_action_row1495[] = {
+static int parser_action_row1453[] = {
        1,
-       -1, 1, 1091
+       -1, 1, 1063
 };
-static int parser_action_row1496[] = {
+static int parser_action_row1454[] = {
        1,
        -1, 1, 114
 };
-static int parser_action_row1497[] = {
+static int parser_action_row1455[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1498[] = {
+static int parser_action_row1456[] = {
        1,
-       -1, 1, 1092
+       -1, 1, 1064
 };
-static int parser_action_row1499[] = {
+static int parser_action_row1457[] = {
        2,
        -1, 1, 123,
-       56, 0, 1496
+       56, 0, 1454
 };
-static int parser_action_row1500[] = {
+static int parser_action_row1458[] = {
        24,
-       -1, 3, 1499,
-       46, 0, 1610,
-       54, 0, 664,
-       74, 0, 665,
-       75, 0, 666,
-       76, 0, 667,
-       77, 0, 668,
-       78, 0, 669,
-       79, 0, 670,
-       80, 0, 671,
-       81, 0, 672,
-       82, 0, 673,
-       83, 0, 674,
-       84, 0, 675,
-       85, 0, 676,
-       86, 0, 677,
-       87, 0, 678,
-       88, 0, 679,
-       89, 0, 680,
-       90, 0, 681,
-       91, 0, 682,
-       92, 0, 683,
-       96, 0, 53,
-       97, 0, 684
+       -1, 3, 1457,
+       46, 0, 1568,
+       54, 0, 636,
+       74, 0, 637,
+       75, 0, 638,
+       76, 0, 639,
+       77, 0, 640,
+       78, 0, 641,
+       79, 0, 642,
+       80, 0, 643,
+       81, 0, 644,
+       82, 0, 645,
+       83, 0, 646,
+       84, 0, 647,
+       85, 0, 648,
+       86, 0, 649,
+       87, 0, 650,
+       88, 0, 651,
+       89, 0, 652,
+       90, 0, 653,
+       91, 0, 654,
+       92, 0, 655,
+       96, 0, 53,
+       97, 0, 656
 };
-static int parser_action_row1501[] = {
+static int parser_action_row1459[] = {
        1,
-       -1, 1, 503
+       -1, 1, 496
 };
-static int parser_action_row1502[] = {
+static int parser_action_row1460[] = {
        1,
-       -1, 1, 498
+       -1, 1, 491
 };
-static int parser_action_row1503[] = {
+static int parser_action_row1461[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1504[] = {
+static int parser_action_row1462[] = {
        2,
        -1, 1, 155,
-       57, 0, 357
+       57, 0, 329
 };
-static int parser_action_row1505[] = {
+static int parser_action_row1463[] = {
        6,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       28, 0, 90,
+       28, 0, 83,
        95, 0, 3,
-       115, 0, 91
+       108, 0, 84
 };
-static int parser_action_row1506[] = {
+static int parser_action_row1464[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1507[] = {
+static int parser_action_row1465[] = {
        1,
-       -1, 1, 1084
+       -1, 1, 1056
 };
-static int parser_action_row1508[] = {
+static int parser_action_row1466[] = {
        2,
        -1, 1, 38,
-       56, 0, 1505
+       56, 0, 1463
 };
-static int parser_action_row1509[] = {
+static int parser_action_row1467[] = {
        23,
-       -1, 3, 1508,
-       54, 0, 664,
-       74, 0, 665,
-       75, 0, 666,
-       76, 0, 667,
-       77, 0, 668,
-       78, 0, 669,
-       79, 0, 670,
-       80, 0, 671,
-       81, 0, 672,
-       82, 0, 673,
-       83, 0, 674,
-       84, 0, 675,
-       85, 0, 676,
-       86, 0, 677,
-       87, 0, 678,
-       88, 0, 679,
-       89, 0, 680,
-       90, 0, 681,
-       91, 0, 682,
-       92, 0, 683,
-       96, 0, 53,
-       97, 0, 684
+       -1, 3, 1466,
+       54, 0, 636,
+       74, 0, 637,
+       75, 0, 638,
+       76, 0, 639,
+       77, 0, 640,
+       78, 0, 641,
+       79, 0, 642,
+       80, 0, 643,
+       81, 0, 644,
+       82, 0, 645,
+       83, 0, 646,
+       84, 0, 647,
+       85, 0, 648,
+       86, 0, 649,
+       87, 0, 650,
+       88, 0, 651,
+       89, 0, 652,
+       90, 0, 653,
+       91, 0, 654,
+       92, 0, 655,
+       96, 0, 53,
+       97, 0, 656
 };
-static int parser_action_row1510[] = {
+static int parser_action_row1468[] = {
        2,
-       -1, 3, 1509,
-       96, 0, 1619
+       -1, 3, 1467,
+       96, 0, 1577
 };
-static int parser_action_row1511[] = {
+static int parser_action_row1469[] = {
        27,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       52, 0, 852,
-       54, 0, 664,
-       57, 0, 853,
-       74, 0, 665,
-       75, 0, 666,
-       76, 0, 667,
-       77, 0, 668,
-       78, 0, 669,
-       79, 0, 670,
-       80, 0, 671,
-       81, 0, 672,
-       82, 0, 673,
-       83, 0, 674,
-       84, 0, 675,
-       85, 0, 676,
-       86, 0, 677,
-       87, 0, 678,
-       88, 0, 679,
-       89, 0, 680,
-       90, 0, 681,
-       91, 0, 682,
-       92, 0, 683,
-       96, 0, 53,
-       97, 0, 684
+       52, 0, 824,
+       54, 0, 636,
+       57, 0, 825,
+       74, 0, 637,
+       75, 0, 638,
+       76, 0, 639,
+       77, 0, 640,
+       78, 0, 641,
+       79, 0, 642,
+       80, 0, 643,
+       81, 0, 644,
+       82, 0, 645,
+       83, 0, 646,
+       84, 0, 647,
+       85, 0, 648,
+       86, 0, 649,
+       87, 0, 650,
+       88, 0, 651,
+       89, 0, 652,
+       90, 0, 653,
+       91, 0, 654,
+       92, 0, 655,
+       96, 0, 53,
+       97, 0, 656
 };
-static int parser_action_row1512[] = {
+static int parser_action_row1470[] = {
        2,
-       -1, 3, 1511,
-       97, 0, 1622
+       -1, 3, 1469,
+       97, 0, 1580
 };
-static int parser_action_row1513[] = {
+static int parser_action_row1471[] = {
        27,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       52, 0, 852,
-       54, 0, 664,
-       57, 0, 853,
-       74, 0, 665,
-       75, 0, 666,
-       76, 0, 667,
-       77, 0, 668,
-       78, 0, 669,
-       79, 0, 670,
-       80, 0, 671,
-       81, 0, 672,
-       82, 0, 673,
-       83, 0, 674,
-       84, 0, 675,
-       85, 0, 676,
-       86, 0, 677,
-       87, 0, 678,
-       88, 0, 679,
-       89, 0, 680,
-       90, 0, 681,
-       91, 0, 682,
-       92, 0, 683,
-       96, 0, 53,
-       97, 0, 684
+       52, 0, 824,
+       54, 0, 636,
+       57, 0, 825,
+       74, 0, 637,
+       75, 0, 638,
+       76, 0, 639,
+       77, 0, 640,
+       78, 0, 641,
+       79, 0, 642,
+       80, 0, 643,
+       81, 0, 644,
+       82, 0, 645,
+       83, 0, 646,
+       84, 0, 647,
+       85, 0, 648,
+       86, 0, 649,
+       87, 0, 650,
+       88, 0, 651,
+       89, 0, 652,
+       90, 0, 653,
+       91, 0, 654,
+       92, 0, 655,
+       96, 0, 53,
+       97, 0, 656
 };
-static int parser_action_row1514[] = {
+static int parser_action_row1472[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1515[] = {
+static int parser_action_row1473[] = {
        1,
-       -1, 1, 1028
+       -1, 1, 1000
 };
-static int parser_action_row1516[] = {
+static int parser_action_row1474[] = {
        1,
-       -1, 1, 1033
+       -1, 1, 1005
 };
-static int parser_action_row1517[] = {
+static int parser_action_row1475[] = {
        1,
-       -1, 1, 1030
+       -1, 1, 1002
 };
-static int parser_action_row1518[] = {
+static int parser_action_row1476[] = {
        3,
-       -1, 3, 1517,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 1475,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row1519[] = {
-       60,
-       -1, 1, 464,
-       12, 0, 182,
+static int parser_action_row1477[] = {
+       53,
+       -1, 1, 457,
+       12, 0, 168,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 183,
+       22, 0, 169,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 184,
-       33, 0, 423,
-       34, 0, 424,
-       35, 0, 425,
-       36, 0, 426,
+       31, 0, 170,
+       33, 0, 395,
+       34, 0, 396,
+       35, 0, 397,
+       36, 0, 398,
        37, 0, 43,
-       38, 0, 185,
-       40, 0, 186,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 420,
-       48, 0, 187,
+       47, 0, 392,
+       48, 0, 173,
        50, 0, 49,
-       51, 0, 427,
+       51, 0, 399,
        52, 0, 51,
-       54, 0, 428,
-       74, 0, 429,
-       75, 0, 430,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 438,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       94, 0, 216,
-       96, 0, 448,
-       97, 0, 449,
+       54, 0, 400,
+       74, 0, 401,
+       75, 0, 402,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 410,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       94, 0, 202,
+       96, 0, 420,
+       97, 0, 421,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1520[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1478[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1521[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1479[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1522[] = {
+static int parser_action_row1480[] = {
        13,
-       -1, 1, 767,
-       59, 0, 1630,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 753,
+       59, 0, 1588,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1523[] = {
+static int parser_action_row1481[] = {
        13,
-       -1, 1, 758,
-       59, 0, 1632,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 744,
+       59, 0, 1590,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1524[] = {
+static int parser_action_row1482[] = {
        14,
-       -1, 1, 770,
-       52, 0, 295,
-       59, 0, 1634,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 756,
+       52, 0, 274,
+       59, 0, 1592,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1525[] = {
+static int parser_action_row1483[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1526[] = {
+static int parser_action_row1484[] = {
        13,
-       -1, 1, 781,
-       59, 0, 1638,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 767,
+       59, 0, 1596,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1527[] = {
+static int parser_action_row1485[] = {
        2,
-       -1, 1, 819,
-       56, 0, 1438
+       -1, 1, 798,
+       56, 0, 1396
 };
-static int parser_action_row1528[] = {
+static int parser_action_row1486[] = {
        15,
-       -1, 1, 774,
-       52, 0, 295,
-       58, 0, 227,
-       59, 0, 1640,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 760,
+       52, 0, 274,
+       58, 0, 213,
+       59, 0, 1598,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1529[] = {
+static int parser_action_row1487[] = {
        22,
-       -1, 1, 462,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       97, 0, 1643
+       -1, 1, 455,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       97, 0, 1601
 };
-static int parser_action_row1530[] = {
+static int parser_action_row1488[] = {
        2,
-       -1, 3, 1529,
-       45, 0, 1644
+       -1, 3, 1487,
+       45, 0, 1602
 };
-static int parser_action_row1531[] = {
+static int parser_action_row1489[] = {
        2,
-       -1, 3, 1530,
-       53, 0, 1645
+       -1, 3, 1488,
+       53, 0, 1603
 };
-static int parser_action_row1532[] = {
+static int parser_action_row1490[] = {
        1,
        -1, 1, 213
 };
-static int parser_action_row1533[] = {
+static int parser_action_row1491[] = {
        1,
        -1, 1, 232
 };
-static int parser_action_row1534[] = {
+static int parser_action_row1492[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1535[] = {
+static int parser_action_row1493[] = {
        1,
-       -1, 1, 786
+       -1, 1, 772
 };
-static int parser_action_row1536[] = {
+static int parser_action_row1494[] = {
        2,
-       -1, 3, 1535,
-       45, 0, 1647
+       -1, 3, 1493,
+       45, 0, 1605
 };
-static int parser_action_row1537[] = {
+static int parser_action_row1495[] = {
        2,
-       -1, 3, 1536,
-       53, 0, 1648
+       -1, 3, 1494,
+       53, 0, 1606
 };
-static int parser_action_row1538[] = {
-       41,
-       -1, 1, 464,
+static int parser_action_row1496[] = {
+       34,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 910,
-       12, 0, 911,
-       15, 0, 912,
+       9, 0, 882,
+       12, 0, 883,
+       15, 0, 884,
        16, 0, 34,
-       22, 0, 913,
-       24, 0, 914,
-       25, 0, 915,
-       26, 0, 916,
-       27, 0, 917,
-       33, 0, 918,
-       34, 0, 919,
-       35, 0, 920,
-       36, 0, 921,
-       37, 0, 922,
+       22, 0, 885,
+       24, 0, 886,
+       25, 0, 887,
+       26, 0, 888,
+       27, 0, 889,
+       33, 0, 890,
+       34, 0, 891,
+       35, 0, 892,
+       36, 0, 893,
+       37, 0, 894,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 923,
-       51, 0, 924,
+       50, 0, 895,
+       51, 0, 896,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 925,
+       97, 0, 897,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1539[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1497[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1059,
-       12, 0, 911,
-       15, 0, 912,
+       9, 0, 1031,
+       12, 0, 883,
+       15, 0, 884,
        16, 0, 34,
-       22, 0, 913,
-       25, 0, 915,
-       26, 0, 916,
-       27, 0, 917,
-       33, 0, 918,
-       34, 0, 919,
-       35, 0, 920,
-       36, 0, 921,
-       37, 0, 922,
+       22, 0, 885,
+       25, 0, 887,
+       26, 0, 888,
+       27, 0, 889,
+       33, 0, 890,
+       34, 0, 891,
+       35, 0, 892,
+       36, 0, 893,
+       37, 0, 894,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 923,
-       51, 0, 924,
+       50, 0, 895,
+       51, 0, 896,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 925,
+       97, 0, 897,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1540[] = {
+static int parser_action_row1498[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1541[] = {
+static int parser_action_row1499[] = {
        1,
-       -1, 1, 968
+       -1, 1, 940
 };
-static int parser_action_row1542[] = {
+static int parser_action_row1500[] = {
        2,
        -1, 1, 157,
-       24, 1, 919
+       24, 1, 891
 };
-static int parser_action_row1543[] = {
+static int parser_action_row1501[] = {
        2,
        -1, 1, 156,
-       24, 1, 918
+       24, 1, 890
 };
-static int parser_action_row1544[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1502[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1059,
-       12, 0, 911,
-       15, 0, 912,
+       9, 0, 1031,
+       12, 0, 883,
+       15, 0, 884,
        16, 0, 34,
-       22, 0, 913,
-       25, 0, 915,
-       26, 0, 916,
-       27, 0, 917,
-       33, 0, 918,
-       34, 0, 919,
-       35, 0, 920,
-       36, 0, 921,
-       37, 0, 922,
+       22, 0, 885,
+       25, 0, 887,
+       26, 0, 888,
+       27, 0, 889,
+       33, 0, 890,
+       34, 0, 891,
+       35, 0, 892,
+       36, 0, 893,
+       37, 0, 894,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 923,
-       51, 0, 924,
+       50, 0, 895,
+       51, 0, 896,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 925,
+       97, 0, 897,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1545[] = {
+static int parser_action_row1503[] = {
        2,
        -1, 1, 200,
-       24, 1, 955
+       24, 1, 927
 };
-static int parser_action_row1546[] = {
+static int parser_action_row1504[] = {
        2,
        -1, 1, 192,
-       24, 1, 947
+       24, 1, 919
 };
-static int parser_action_row1547[] = {
+static int parser_action_row1505[] = {
        2,
        -1, 1, 183,
-       24, 1, 938
+       24, 1, 910
 };
-static int parser_action_row1548[] = {
-       31,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 510,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row1506[] = {
+       24,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 482,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1549[] = {
-       45,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row1507[] = {
+       38,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 335,
-       59, 0, 1031,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       59, 0, 1003,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 335,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1550[] = {
-       31,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 510,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row1508[] = {
+       24,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 482,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1551[] = {
-       46,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row1509[] = {
+       39,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 339,
-       58, 0, 227,
-       59, 0, 1036,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       58, 0, 213,
+       59, 0, 1008,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 339,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1552[] = {
+static int parser_action_row1510[] = {
        3,
-       -1, 1, 462,
-       12, 0, 1659,
-       97, 0, 1660
+       -1, 1, 455,
+       12, 0, 1617,
+       97, 0, 1618
 };
-static int parser_action_row1553[] = {
+static int parser_action_row1511[] = {
        1,
        -1, 1, 272
 };
-static int parser_action_row1554[] = {
+static int parser_action_row1512[] = {
        2,
-       -1, 3, 1553,
-       49, 0, 209
+       -1, 3, 1511,
+       49, 0, 195
 };
-static int parser_action_row1555[] = {
+static int parser_action_row1513[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1556[] = {
+static int parser_action_row1514[] = {
        1,
-       -1, 1, 637
+       -1, 1, 623
 };
-static int parser_action_row1557[] = {
+static int parser_action_row1515[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1558[] = {
+static int parser_action_row1516[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1559[] = {
-       60,
-       -1, 1, 464,
-       12, 0, 182,
+static int parser_action_row1517[] = {
+       53,
+       -1, 1, 457,
+       12, 0, 168,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 183,
+       22, 0, 169,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 184,
-       33, 0, 423,
-       34, 0, 424,
-       35, 0, 425,
-       36, 0, 426,
+       31, 0, 170,
+       33, 0, 395,
+       34, 0, 396,
+       35, 0, 397,
+       36, 0, 398,
        37, 0, 43,
-       38, 0, 185,
-       40, 0, 186,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 420,
-       48, 0, 187,
+       47, 0, 392,
+       48, 0, 173,
        50, 0, 49,
-       51, 0, 427,
+       51, 0, 399,
        52, 0, 51,
-       54, 0, 428,
-       74, 0, 429,
-       75, 0, 430,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 438,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       94, 0, 216,
-       96, 0, 448,
-       97, 0, 449,
+       54, 0, 400,
+       74, 0, 401,
+       75, 0, 402,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 410,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       94, 0, 202,
+       96, 0, 420,
+       97, 0, 421,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1560[] = {
+static int parser_action_row1518[] = {
        1,
-       -1, 1, 1107
+       -1, 1, 1079
 };
-static int parser_action_row1561[] = {
+static int parser_action_row1519[] = {
        1,
        -1, 1, 149
 };
-static int parser_action_row1562[] = {
+static int parser_action_row1520[] = {
        2,
-       -1, 1, 396,
-       24, 0, 1554
+       -1, 1, 389,
+       24, 0, 1512
 };
-static int parser_action_row1563[] = {
+static int parser_action_row1521[] = {
        2,
-       -1, 3, 1562,
-       15, 0, 1666
+       -1, 3, 1520,
+       15, 0, 1624
 };
-static int parser_action_row1564[] = {
+static int parser_action_row1522[] = {
        2,
-       -1, 3, 1563,
-       23, 0, 1667
+       -1, 3, 1521,
+       23, 0, 1625
 };
-static int parser_action_row1565[] = {
+static int parser_action_row1523[] = {
        2,
-       -1, 1, 815,
-       94, 0, 618
+       -1, 1, 794,
+       94, 0, 590
 };
-static int parser_action_row1566[] = {
+static int parser_action_row1524[] = {
        1,
-       -1, 1, 825
+       -1, 1, 804
 };
-static int parser_action_row1567[] = {
+static int parser_action_row1525[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1568[] = {
+static int parser_action_row1526[] = {
        1,
-       -1, 1, 574
+       -1, 1, 567
 };
-static int parser_action_row1569[] = {
+static int parser_action_row1527[] = {
        2,
-       -1, 3, 1568,
-       73, 0, 1566
+       -1, 3, 1526,
+       73, 0, 1524
 };
-static int parser_action_row1570[] = {
+static int parser_action_row1528[] = {
        5,
-       -1, 1, 464,
-       12, 0, 1597,
-       46, 0, 1598,
+       -1, 1, 457,
+       12, 0, 1555,
+       46, 0, 1556,
        96, 0, 53,
-       97, 0, 1599
+       97, 0, 1557
 };
-static int parser_action_row1571[] = {
+static int parser_action_row1529[] = {
        1,
-       -1, 1, 387
+       -1, 1, 380
 };
-static int parser_action_row1572[] = {
+static int parser_action_row1530[] = {
        1,
-       -1, 1, 386
+       -1, 1, 379
 };
-static int parser_action_row1573[] = {
+static int parser_action_row1531[] = {
        1,
-       -1, 1, 536
+       -1, 1, 529
 };
-static int parser_action_row1574[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 1126,
-       31, 0, 1128,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+static int parser_action_row1532[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 1098,
+       31, 0, 1100,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
 };
-static int parser_action_row1575[] = {
+static int parser_action_row1533[] = {
        1,
-       -1, 1, 535
+       -1, 1, 528
 };
-static int parser_action_row1576[] = {
+static int parser_action_row1534[] = {
        1,
-       -1, 1, 538
+       -1, 1, 531
 };
-static int parser_action_row1577[] = {
+static int parser_action_row1535[] = {
        2,
-       -1, 3, 1576,
-       96, 0, 1672
+       -1, 3, 1534,
+       96, 0, 1630
 };
-static int parser_action_row1578[] = {
+static int parser_action_row1536[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1579[] = {
+static int parser_action_row1537[] = {
        1,
-       -1, 1, 549
+       -1, 1, 542
 };
-static int parser_action_row1580[] = {
+static int parser_action_row1538[] = {
        2,
-       -1, 1, 551,
-       81, 0, 1324
+       -1, 1, 544,
+       81, 0, 1282
 };
-static int parser_action_row1581[] = {
+static int parser_action_row1539[] = {
        2,
-       -1, 1, 542,
-       80, 0, 1316
+       -1, 1, 535,
+       80, 0, 1274
 };
-static int parser_action_row1582[] = {
+static int parser_action_row1540[] = {
        2,
-       -1, 1, 543,
-       80, 0, 1316
+       -1, 1, 536,
+       80, 0, 1274
 };
-static int parser_action_row1583[] = {
+static int parser_action_row1541[] = {
        2,
-       -1, 1, 544,
-       80, 0, 1316
+       -1, 1, 537,
+       80, 0, 1274
 };
-static int parser_action_row1584[] = {
+static int parser_action_row1542[] = {
        2,
-       -1, 1, 545,
-       80, 0, 1316
+       -1, 1, 538,
+       80, 0, 1274
 };
-static int parser_action_row1585[] = {
+static int parser_action_row1543[] = {
        2,
-       -1, 1, 546,
-       80, 0, 1316
+       -1, 1, 539,
+       80, 0, 1274
 };
-static int parser_action_row1586[] = {
+static int parser_action_row1544[] = {
        2,
-       -1, 1, 547,
-       80, 0, 1316
+       -1, 1, 540,
+       80, 0, 1274
 };
-static int parser_action_row1587[] = {
+static int parser_action_row1545[] = {
        2,
-       -1, 1, 548,
-       80, 0, 1316
+       -1, 1, 541,
+       80, 0, 1274
 };
-static int parser_action_row1588[] = {
+static int parser_action_row1546[] = {
        2,
-       -1, 1, 553,
-       82, 0, 1325
+       -1, 1, 546,
+       82, 0, 1283
 };
-static int parser_action_row1589[] = {
+static int parser_action_row1547[] = {
        3,
-       -1, 1, 555,
-       88, 0, 1326,
-       91, 0, 1327
+       -1, 1, 548,
+       88, 0, 1284,
+       91, 0, 1285
 };
-static int parser_action_row1590[] = {
+static int parser_action_row1548[] = {
        3,
-       -1, 1, 557,
-       74, 0, 1328,
-       75, 0, 1329
+       -1, 1, 550,
+       74, 0, 1286,
+       75, 0, 1287
 };
-static int parser_action_row1591[] = {
+static int parser_action_row1549[] = {
        3,
-       -1, 1, 558,
-       74, 0, 1328,
-       75, 0, 1329
+       -1, 1, 551,
+       74, 0, 1286,
+       75, 0, 1287
 };
-static int parser_action_row1592[] = {
+static int parser_action_row1550[] = {
        4,
-       -1, 1, 560,
-       76, 0, 1330,
-       78, 0, 1331,
-       79, 0, 1332
+       -1, 1, 553,
+       76, 0, 1288,
+       78, 0, 1289,
+       79, 0, 1290
 };
-static int parser_action_row1593[] = {
+static int parser_action_row1551[] = {
        4,
-       -1, 1, 561,
-       76, 0, 1330,
-       78, 0, 1331,
-       79, 0, 1332
+       -1, 1, 554,
+       76, 0, 1288,
+       78, 0, 1289,
+       79, 0, 1290
 };
-static int parser_action_row1594[] = {
+static int parser_action_row1552[] = {
        1,
-       -1, 1, 563
+       -1, 1, 556
 };
-static int parser_action_row1595[] = {
+static int parser_action_row1553[] = {
        1,
-       -1, 1, 564
+       -1, 1, 557
 };
-static int parser_action_row1596[] = {
+static int parser_action_row1554[] = {
        1,
-       -1, 1, 565
+       -1, 1, 558
 };
-static int parser_action_row1597[] = {
+static int parser_action_row1555[] = {
        1,
-       -1, 1, 567
+       -1, 1, 560
 };
-static int parser_action_row1598[] = {
+static int parser_action_row1556[] = {
        2,
-       -1, 1, 601,
-       52, 0, 295
+       -1, 1, 594,
+       52, 0, 274
 };
-static int parser_action_row1599[] = {
+static int parser_action_row1557[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1600[] = {
+static int parser_action_row1558[] = {
        3,
-       -1, 1, 583,
-       52, 0, 295,
-       58, 0, 227
+       -1, 1, 576,
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row1601[] = {
+static int parser_action_row1559[] = {
        2,
-       -1, 3, 1600,
-       98, 0, 1677
+       -1, 3, 1558,
+       98, 0, 1635
 };
-static int parser_action_row1602[] = {
+static int parser_action_row1560[] = {
        2,
-       -1, 1, 461,
-       97, 0, 1678
+       -1, 1, 454,
+       97, 0, 1636
 };
-static int parser_action_row1603[] = {
+static int parser_action_row1561[] = {
        3,
-       -1, 1, 463,
+       -1, 1, 456,
        96, 0, 53,
-       97, 0, 1679
+       97, 0, 1637
 };
-static int parser_action_row1604[] = {
+static int parser_action_row1562[] = {
        1,
-       -1, 1, 590
+       -1, 1, 583
 };
-static int parser_action_row1605[] = {
+static int parser_action_row1563[] = {
        4,
-       -1, 3, 1604,
-       6, 0, 816,
-       17, 0, 817,
-       97, 0, 818
+       -1, 3, 1562,
+       6, 0, 788,
+       17, 0, 789,
+       97, 0, 790
 };
-static int parser_action_row1606[] = {
+static int parser_action_row1564[] = {
        1,
        -1, 1, 121
 };
-static int parser_action_row1607[] = {
+static int parser_action_row1565[] = {
        1,
        -1, 1, 109
 };
-static int parser_action_row1608[] = {
+static int parser_action_row1566[] = {
        1,
        -1, 1, 116
 };
-static int parser_action_row1609[] = {
+static int parser_action_row1567[] = {
        25,
-       -1, 3, 1608,
-       41, 0, 1349,
-       47, 0, 420,
-       54, 0, 664,
-       74, 0, 665,
-       75, 0, 666,
-       76, 0, 667,
-       77, 0, 668,
-       78, 0, 669,
-       79, 0, 670,
-       80, 0, 671,
-       81, 0, 672,
-       82, 0, 673,
-       83, 0, 674,
-       84, 0, 675,
-       85, 0, 676,
-       86, 0, 677,
-       87, 0, 678,
-       88, 0, 679,
-       89, 0, 680,
-       90, 0, 681,
-       91, 0, 682,
-       92, 0, 683,
-       96, 0, 448,
-       97, 0, 684
+       -1, 3, 1566,
+       41, 0, 1307,
+       47, 0, 392,
+       54, 0, 636,
+       74, 0, 637,
+       75, 0, 638,
+       76, 0, 639,
+       77, 0, 640,
+       78, 0, 641,
+       79, 0, 642,
+       80, 0, 643,
+       81, 0, 644,
+       82, 0, 645,
+       83, 0, 646,
+       84, 0, 647,
+       85, 0, 648,
+       86, 0, 649,
+       87, 0, 650,
+       88, 0, 651,
+       89, 0, 652,
+       90, 0, 653,
+       91, 0, 654,
+       92, 0, 655,
+       96, 0, 420,
+       97, 0, 656
 };
-static int parser_action_row1610[] = {
+static int parser_action_row1568[] = {
        1,
-       -1, 1, 1093
+       -1, 1, 1065
 };
-static int parser_action_row1611[] = {
+static int parser_action_row1569[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1612[] = {
+static int parser_action_row1570[] = {
        1,
        -1, 1, 130
 };
-static int parser_action_row1613[] = {
+static int parser_action_row1571[] = {
        1,
        -1, 1, 41
 };
-static int parser_action_row1614[] = {
+static int parser_action_row1572[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1615[] = {
+static int parser_action_row1573[] = {
        2,
-       -1, 3, 1614,
-       9, 0, 1685
+       -1, 3, 1572,
+       9, 0, 1643
 };
-static int parser_action_row1616[] = {
+static int parser_action_row1574[] = {
        4,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1617[] = {
+static int parser_action_row1575[] = {
        2,
-       -1, 3, 1616,
-       96, 0, 1360
+       -1, 3, 1574,
+       96, 0, 1318
 };
-static int parser_action_row1618[] = {
+static int parser_action_row1576[] = {
        1,
-       -1, 1, 1085
+       -1, 1, 1057
 };
-static int parser_action_row1619[] = {
+static int parser_action_row1577[] = {
        5,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       52, 0, 852,
-       57, 0, 853
+       52, 0, 824,
+       57, 0, 825
 };
-static int parser_action_row1620[] = {
+static int parser_action_row1578[] = {
        2,
-       -1, 3, 1619,
-       57, 0, 853
+       -1, 3, 1577,
+       57, 0, 825
 };
-static int parser_action_row1621[] = {
+static int parser_action_row1579[] = {
        3,
-       -1, 3, 1620,
-       14, 0, 1690,
-       15, 0, 1691
+       -1, 3, 1578,
+       14, 0, 1648,
+       15, 0, 1649
 };
-static int parser_action_row1622[] = {
+static int parser_action_row1580[] = {
        5,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       52, 0, 852,
-       57, 0, 853
+       52, 0, 824,
+       57, 0, 825
 };
-static int parser_action_row1623[] = {
+static int parser_action_row1581[] = {
        2,
        -1, 1, 155,
-       57, 0, 357
+       57, 0, 329
 };
-static int parser_action_row1624[] = {
+static int parser_action_row1582[] = {
        4,
        -1, 1, 124,
-       4, 0, 1001,
-       14, 0, 1002,
-       15, 0, 1695
+       4, 0, 973,
+       14, 0, 974,
+       15, 0, 1653
 };
-static int parser_action_row1625[] = {
+static int parser_action_row1583[] = {
        5,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       52, 0, 852,
-       57, 0, 853
+       52, 0, 824,
+       57, 0, 825
 };
-static int parser_action_row1626[] = {
+static int parser_action_row1584[] = {
        3,
-       -1, 3, 1625,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 1583,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row1627[] = {
+static int parser_action_row1585[] = {
        2,
-       -1, 3, 1626,
-       57, 0, 1701
+       -1, 3, 1584,
+       57, 0, 1659
 };
-static int parser_action_row1628[] = {
+static int parser_action_row1586[] = {
        2,
-       -1, 3, 1627,
-       53, 0, 1702
+       -1, 3, 1585,
+       53, 0, 1660
 };
-static int parser_action_row1629[] = {
+static int parser_action_row1587[] = {
        1,
-       -1, 1, 683
+       -1, 1, 669
 };
-static int parser_action_row1630[] = {
+static int parser_action_row1588[] = {
        1,
-       -1, 1, 702
+       -1, 1, 688
 };
-static int parser_action_row1631[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1589[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1632[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1590[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1633[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1591[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1634[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1592[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1635[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1593[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1636[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1594[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1637[] = {
+static int parser_action_row1595[] = {
        13,
-       -1, 1, 769,
-       59, 0, 1709,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 755,
+       59, 0, 1667,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1638[] = {
+static int parser_action_row1596[] = {
        25,
-       -1, 1, 464,
-       12, 0, 754,
-       46, 0, 755,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       96, 0, 53,
-       97, 0, 1711
+       -1, 1, 457,
+       12, 0, 726,
+       46, 0, 727,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       96, 0, 53,
+       97, 0, 1669
 };
-static int parser_action_row1639[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1597[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1640[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1598[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1641[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1599[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1642[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1600[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1643[] = {
+static int parser_action_row1601[] = {
        13,
-       -1, 1, 773,
-       59, 0, 1720,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 759,
+       59, 0, 1678,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1644[] = {
+static int parser_action_row1602[] = {
        14,
-       -1, 1, 772,
-       52, 0, 295,
-       59, 0, 1722,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 758,
+       52, 0, 274,
+       59, 0, 1680,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1645[] = {
+static int parser_action_row1603[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1646[] = {
+static int parser_action_row1604[] = {
        1,
        -1, 1, 363
 };
-static int parser_action_row1647[] = {
-       28,
-       -1, 1, 464,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row1605[] = {
+       21,
+       -1, 1, 457,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1648[] = {
+static int parser_action_row1606[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1649[] = {
+static int parser_action_row1607[] = {
        1,
-       -1, 1, 790
+       -1, 1, 776
 };
-static int parser_action_row1650[] = {
+static int parser_action_row1608[] = {
        2,
-       -1, 3, 1649,
-       24, 0, 1728
+       -1, 3, 1607,
+       24, 0, 1686
 };
-static int parser_action_row1651[] = {
+static int parser_action_row1609[] = {
        1,
-       -1, 1, 962
+       -1, 1, 934
 };
-static int parser_action_row1652[] = {
+static int parser_action_row1610[] = {
        2,
-       -1, 3, 1651,
-       49, 0, 209
+       -1, 3, 1609,
+       49, 0, 195
 };
-static int parser_action_row1653[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1611[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1654[] = {
+static int parser_action_row1612[] = {
        1,
-       -1, 1, 966
+       -1, 1, 938
 };
-static int parser_action_row1655[] = {
+static int parser_action_row1613[] = {
        2,
-       -1, 3, 1654,
-       49, 0, 209
+       -1, 3, 1612,
+       49, 0, 195
 };
-static int parser_action_row1656[] = {
+static int parser_action_row1614[] = {
        2,
        -1, 1, 194,
-       24, 1, 949
+       24, 1, 921
 };
-static int parser_action_row1657[] = {
+static int parser_action_row1615[] = {
        2,
        -1, 1, 184,
-       24, 1, 939
+       24, 1, 911
 };
-static int parser_action_row1658[] = {
+static int parser_action_row1616[] = {
        2,
        -1, 1, 196,
-       24, 1, 951
+       24, 1, 923
 };
-static int parser_action_row1659[] = {
+static int parser_action_row1617[] = {
        2,
        -1, 1, 186,
-       24, 1, 941
+       24, 1, 913
 };
-static int parser_action_row1660[] = {
-       31,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 510,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+static int parser_action_row1618[] = {
+       24,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 482,
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1661[] = {
-       45,
-       -1, 1, 448,
-       12, 0, 122,
-       22, 0, 123,
-       31, 0, 124,
-       38, 0, 125,
-       40, 0, 126,
-       41, 1, 464,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       48, 0, 131,
-       52, 0, 132,
+static int parser_action_row1619[] = {
+       38,
+       -1, 1, 441,
+       12, 0, 115,
+       22, 0, 116,
+       31, 0, 117,
+       38, 0, 118,
+       40, 0, 119,
+       41, 1, 457,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       48, 0, 124,
+       52, 0, 125,
        54, 1, 337,
-       59, 0, 1217,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239,
+       59, 0, 1182,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225,
        73, 1, 337,
-       74, 0, 133,
-       75, 0, 134,
-       83, 0, 135,
-       96, 0, 53,
-       97, 0, 136,
-       98, 1, 464,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       74, 0, 126,
+       75, 0, 127,
+       83, 0, 128,
+       96, 0, 53,
+       97, 0, 129,
+       98, 1, 457,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1662[] = {
+static int parser_action_row1620[] = {
        1,
        -1, 1, 271
 };
-static int parser_action_row1663[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1621[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1664[] = {
+static int parser_action_row1622[] = {
        2,
-       -1, 3, 1663,
-       53, 0, 1735
+       -1, 3, 1621,
+       53, 0, 1693
 };
-static int parser_action_row1665[] = {
+static int parser_action_row1623[] = {
        1,
-       -1, 1, 413
+       -1, 1, 406
 };
-static int parser_action_row1666[] = {
+static int parser_action_row1624[] = {
        1,
-       -1, 1, 433
+       -1, 1, 426
 };
-static int parser_action_row1667[] = {
-       31,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 470,
-       27, 0, 471,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1625[] = {
+       24,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 442,
+       27, 0, 443,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1668[] = {
+static int parser_action_row1626[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1669[] = {
+static int parser_action_row1627[] = {
        1,
-       -1, 1, 826
+       -1, 1, 805
 };
-static int parser_action_row1670[] = {
+static int parser_action_row1628[] = {
        3,
-       -1, 3, 1669,
+       -1, 3, 1627,
        96, 0, 53,
-       97, 0, 1738
+       97, 0, 1696
 };
-static int parser_action_row1671[] = {
+static int parser_action_row1629[] = {
        2,
-       -1, 3, 1670,
-       98, 0, 1741
+       -1, 3, 1628,
+       98, 0, 1699
 };
-static int parser_action_row1672[] = {
+static int parser_action_row1630[] = {
        1,
-       -1, 1, 537
+       -1, 1, 530
 };
-static int parser_action_row1673[] = {
+static int parser_action_row1631[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1674[] = {
+static int parser_action_row1632[] = {
        1,
-       -1, 1, 530
+       -1, 1, 523
 };
-static int parser_action_row1675[] = {
+static int parser_action_row1633[] = {
        1,
-       -1, 1, 599
+       -1, 1, 592
 };
-static int parser_action_row1676[] = {
+static int parser_action_row1634[] = {
        3,
-       -1, 3, 1675,
-       31, 0, 1743,
-       52, 0, 1744
+       -1, 3, 1633,
+       31, 0, 1701,
+       52, 0, 1702
 };
-static int parser_action_row1677[] = {
+static int parser_action_row1635[] = {
        1,
-       -1, 1, 581
+       -1, 1, 574
 };
-static int parser_action_row1678[] = {
+static int parser_action_row1636[] = {
        1,
-       -1, 1, 579
+       -1, 1, 572
 };
-static int parser_action_row1679[] = {
+static int parser_action_row1637[] = {
        2,
-       -1, 1, 587,
-       52, 0, 295
+       -1, 1, 580,
+       52, 0, 274
 };
-static int parser_action_row1680[] = {
+static int parser_action_row1638[] = {
        3,
-       -1, 1, 595,
-       52, 0, 295,
-       58, 0, 227
+       -1, 1, 588,
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row1681[] = {
+static int parser_action_row1639[] = {
        2,
-       -1, 1, 462,
-       97, 0, 1747
+       -1, 1, 455,
+       97, 0, 1705
 };
-static int parser_action_row1682[] = {
-       63,
-       -1, 1, 464,
-       0, 0, 94,
-       1, 0, 95,
-       12, 0, 122,
+static int parser_action_row1640[] = {
+       56,
+       -1, 1, 457,
+       0, 0, 87,
+       1, 0, 88,
+       12, 0, 115,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 123,
+       22, 0, 116,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 124,
-       33, 0, 1365,
-       34, 0, 1366,
-       35, 0, 1367,
-       36, 0, 1368,
+       31, 0, 117,
+       33, 0, 1323,
+       34, 0, 1324,
+       35, 0, 1325,
+       36, 0, 1326,
        37, 0, 43,
-       38, 0, 125,
-       40, 0, 126,
-       42, 0, 127,
-       43, 0, 128,
-       44, 0, 129,
-       45, 0, 130,
-       47, 0, 420,
-       48, 0, 131,
+       38, 0, 118,
+       40, 0, 119,
+       42, 0, 120,
+       43, 0, 121,
+       44, 0, 122,
+       45, 0, 123,
+       47, 0, 392,
+       48, 0, 124,
        50, 0, 49,
-       51, 0, 1369,
-       52, 0, 1748,
-       54, 0, 643,
-       74, 0, 1371,
-       75, 0, 1372,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 1373,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       94, 0, 216,
-       95, 0, 96,
-       96, 0, 448,
-       97, 0, 1374,
-       99, 0, 137,
-       100, 0, 138,
-       101, 0, 139,
-       102, 0, 140,
-       103, 0, 141,
-       104, 0, 142,
-       105, 0, 143,
-       106, 0, 144,
-       107, 0, 145,
-       108, 0, 146,
-       109, 0, 65,
-       112, 0, 147
+       51, 0, 1327,
+       52, 0, 1706,
+       54, 0, 615,
+       74, 0, 1329,
+       75, 0, 1330,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 1331,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       94, 0, 202,
+       95, 0, 89,
+       96, 0, 420,
+       97, 0, 1332,
+       99, 0, 130,
+       100, 0, 131,
+       101, 0, 132,
+       102, 0, 58,
+       105, 0, 133
 };
-static int parser_action_row1683[] = {
+static int parser_action_row1641[] = {
        1,
        -1, 1, 125
 };
-static int parser_action_row1684[] = {
+static int parser_action_row1642[] = {
        5,
-       -1, 3, 1683,
-       31, 0, 1752,
-       47, 0, 1753,
-       52, 0, 1754,
-       96, 0, 421
+       -1, 3, 1641,
+       31, 0, 1710,
+       47, 0, 1711,
+       52, 0, 1712,
+       96, 0, 393
 };
-static int parser_action_row1685[] = {
+static int parser_action_row1643[] = {
        1,
        -1, 1, 42
 };
-static int parser_action_row1686[] = {
+static int parser_action_row1644[] = {
        1,
        -1, 1, 28
 };
-static int parser_action_row1687[] = {
+static int parser_action_row1645[] = {
        2,
-       -1, 3, 1686,
-       9, 0, 1756
+       -1, 3, 1644,
+       9, 0, 1714
 };
-static int parser_action_row1688[] = {
+static int parser_action_row1646[] = {
        1,
        -1, 1, 40
 };
-static int parser_action_row1689[] = {
+static int parser_action_row1647[] = {
        4,
        -1, 1, 124,
-       4, 0, 1001,
-       14, 0, 1002,
-       15, 0, 1757
+       4, 0, 973,
+       14, 0, 974,
+       15, 0, 1715
 };
-static int parser_action_row1690[] = {
+static int parser_action_row1648[] = {
        2,
        -1, 1, 78,
-       14, 0, 993
+       14, 0, 965
 };
-static int parser_action_row1691[] = {
+static int parser_action_row1649[] = {
        5,
        -1, 1, 30,
-       0, 0, 94,
-       1, 0, 95,
+       0, 0, 87,
+       1, 0, 88,
        13, 0, 32,
-       95, 0, 96
+       95, 0, 89
 };
-static int parser_action_row1692[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1650[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -19966,39 +17931,32 @@ static int parser_action_row1692[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1693[] = {
+static int parser_action_row1651[] = {
        2,
-       -1, 3, 1692,
-       15, 0, 1765
+       -1, 3, 1650,
+       15, 0, 1723
 };
-static int parser_action_row1694[] = {
+static int parser_action_row1652[] = {
        3,
-       -1, 3, 1693,
-       14, 0, 1690,
-       15, 0, 1766
+       -1, 3, 1651,
+       14, 0, 1648,
+       15, 0, 1724
 };
-static int parser_action_row1695[] = {
+static int parser_action_row1653[] = {
        4,
        -1, 1, 78,
-       14, 0, 1768,
-       15, 0, 1769,
-       59, 0, 1770
+       14, 0, 1726,
+       15, 0, 1727,
+       59, 0, 1728
 };
-static int parser_action_row1696[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1654[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -20027,650 +17985,580 @@ static int parser_action_row1696[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1697[] = {
+static int parser_action_row1655[] = {
        3,
        -1, 1, 124,
-       4, 0, 1001,
-       15, 0, 1774
+       4, 0, 973,
+       15, 0, 1732
 };
-static int parser_action_row1698[] = {
+static int parser_action_row1656[] = {
        3,
-       -1, 3, 1697,
-       28, 0, 90,
-       115, 0, 91
+       -1, 3, 1655,
+       28, 0, 83,
+       108, 0, 84
 };
-static int parser_action_row1699[] = {
+static int parser_action_row1657[] = {
        1,
        -1, 1, 51
 };
-static int parser_action_row1700[] = {
+static int parser_action_row1658[] = {
        4,
        -1, 1, 124,
-       4, 0, 1001,
-       14, 0, 1002,
-       15, 0, 1777
+       4, 0, 973,
+       14, 0, 974,
+       15, 0, 1735
 };
-static int parser_action_row1701[] = {
+static int parser_action_row1659[] = {
        2,
        -1, 1, 78,
-       14, 0, 993
+       14, 0, 965
 };
-static int parser_action_row1702[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1660[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1703[] = {
+static int parser_action_row1661[] = {
        2,
-       -1, 1, 428,
-       94, 0, 216
+       -1, 1, 421,
+       94, 0, 202
 };
-static int parser_action_row1704[] = {
+static int parser_action_row1662[] = {
        1,
-       -1, 1, 682
+       -1, 1, 668
 };
-static int parser_action_row1705[] = {
+static int parser_action_row1663[] = {
        1,
-       -1, 1, 701
+       -1, 1, 687
 };
-static int parser_action_row1706[] = {
+static int parser_action_row1664[] = {
        1,
-       -1, 1, 673
+       -1, 1, 659
 };
-static int parser_action_row1707[] = {
+static int parser_action_row1665[] = {
        1,
-       -1, 1, 692
+       -1, 1, 678
 };
-static int parser_action_row1708[] = {
+static int parser_action_row1666[] = {
        1,
-       -1, 1, 685
+       -1, 1, 671
 };
-static int parser_action_row1709[] = {
+static int parser_action_row1667[] = {
        1,
-       -1, 1, 704
+       -1, 1, 690
 };
-static int parser_action_row1710[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1668[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1711[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1669[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1712[] = {
+static int parser_action_row1670[] = {
        15,
-       -1, 1, 760,
-       52, 0, 295,
-       58, 0, 227,
-       59, 0, 1786,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 746,
+       52, 0, 274,
+       58, 0, 213,
+       59, 0, 1744,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1713[] = {
+static int parser_action_row1671[] = {
        2,
-       -1, 3, 1712,
-       98, 0, 1789
+       -1, 3, 1670,
+       98, 0, 1747
 };
-static int parser_action_row1714[] = {
+static int parser_action_row1672[] = {
        22,
-       -1, 1, 461,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       97, 0, 1790
+       -1, 1, 454,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       97, 0, 1748
 };
-static int parser_action_row1715[] = {
+static int parser_action_row1673[] = {
        1,
-       -1, 1, 823
+       -1, 1, 802
 };
-static int parser_action_row1716[] = {
+static int parser_action_row1674[] = {
        23,
-       -1, 1, 463,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       96, 0, 53,
-       97, 0, 1791
+       -1, 1, 456,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       96, 0, 53,
+       97, 0, 1749
 };
-static int parser_action_row1717[] = {
+static int parser_action_row1675[] = {
        1,
-       -1, 1, 690
+       -1, 1, 676
 };
-static int parser_action_row1718[] = {
+static int parser_action_row1676[] = {
        1,
-       -1, 1, 709
+       -1, 1, 695
 };
-static int parser_action_row1719[] = {
+static int parser_action_row1677[] = {
        1,
-       -1, 1, 689
+       -1, 1, 675
 };
-static int parser_action_row1720[] = {
+static int parser_action_row1678[] = {
        1,
-       -1, 1, 708
+       -1, 1, 694
 };
-static int parser_action_row1721[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1679[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1722[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1680[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1723[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1681[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1724[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1682[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1725[] = {
+static int parser_action_row1683[] = {
        13,
-       -1, 1, 771,
-       59, 0, 1797,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 757,
+       59, 0, 1755,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1726[] = {
+static int parser_action_row1684[] = {
        2,
-       -1, 3, 1725,
-       53, 0, 1799
+       -1, 3, 1683,
+       53, 0, 1757
 };
-static int parser_action_row1727[] = {
+static int parser_action_row1685[] = {
        1,
-       -1, 1, 711
+       -1, 1, 697
 };
-static int parser_action_row1728[] = {
+static int parser_action_row1686[] = {
        2,
-       -1, 3, 1727,
-       53, 0, 1800
+       -1, 3, 1685,
+       53, 0, 1758
 };
-static int parser_action_row1729[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1687[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1417,
-       12, 0, 911,
-       15, 0, 912,
+       9, 0, 1375,
+       12, 0, 883,
+       15, 0, 884,
        16, 0, 34,
-       22, 0, 913,
-       25, 0, 915,
-       26, 0, 916,
-       27, 0, 917,
-       33, 0, 918,
-       34, 0, 919,
-       35, 0, 920,
-       36, 0, 921,
-       37, 0, 922,
+       22, 0, 885,
+       25, 0, 887,
+       26, 0, 888,
+       27, 0, 889,
+       33, 0, 890,
+       34, 0, 891,
+       35, 0, 892,
+       36, 0, 893,
+       37, 0, 894,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 923,
-       51, 0, 924,
+       50, 0, 895,
+       51, 0, 896,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 925,
+       97, 0, 897,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1730[] = {
+static int parser_action_row1688[] = {
        2,
        -1, 1, 269,
-       24, 1, 961
+       24, 1, 933
 };
-static int parser_action_row1731[] = {
+static int parser_action_row1689[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1732[] = {
+static int parser_action_row1690[] = {
        2,
        -1, 1, 273,
-       24, 1, 965
+       24, 1, 937
 };
-static int parser_action_row1733[] = {
+static int parser_action_row1691[] = {
        2,
        -1, 1, 195,
-       24, 1, 950
+       24, 1, 922
 };
-static int parser_action_row1734[] = {
+static int parser_action_row1692[] = {
        2,
        -1, 1, 185,
-       24, 1, 940
+       24, 1, 912
 };
-static int parser_action_row1735[] = {
+static int parser_action_row1693[] = {
        1,
        -1, 1, 284
 };
-static int parser_action_row1736[] = {
+static int parser_action_row1694[] = {
        2,
-       -1, 1, 411,
-       94, 0, 216
+       -1, 1, 404,
+       94, 0, 202
 };
-static int parser_action_row1737[] = {
+static int parser_action_row1695[] = {
        1,
-       -1, 1, 397
+       -1, 1, 390
 };
-static int parser_action_row1738[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1696[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1739[] = {
+static int parser_action_row1697[] = {
        3,
-       -1, 1, 604,
-       52, 0, 295,
-       58, 0, 227
+       -1, 1, 597,
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row1740[] = {
+static int parser_action_row1698[] = {
        2,
-       -1, 3, 1739,
-       97, 0, 1806
+       -1, 3, 1697,
+       97, 0, 1764
 };
-static int parser_action_row1741[] = {
+static int parser_action_row1699[] = {
        3,
-       -1, 3, 1740,
+       -1, 3, 1698,
        96, 0, 53,
-       97, 0, 1807
+       97, 0, 1765
 };
-static int parser_action_row1742[] = {
+static int parser_action_row1700[] = {
        2,
-       -1, 1, 576,
-       73, 1, 579
+       -1, 1, 569,
+       73, 1, 572
 };
-static int parser_action_row1743[] = {
+static int parser_action_row1701[] = {
        1,
-       -1, 1, 531
+       -1, 1, 524
 };
-static int parser_action_row1744[] = {
+static int parser_action_row1702[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1745[] = {
+static int parser_action_row1703[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1746[] = {
+static int parser_action_row1704[] = {
        1,
-       -1, 1, 585
+       -1, 1, 578
 };
-static int parser_action_row1747[] = {
+static int parser_action_row1705[] = {
        1,
-       -1, 1, 593
+       -1, 1, 586
 };
-static int parser_action_row1748[] = {
+static int parser_action_row1706[] = {
        2,
-       -1, 1, 591,
-       52, 0, 295
+       -1, 1, 584,
+       52, 0, 274
 };
-static int parser_action_row1749[] = {
+static int parser_action_row1707[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1750[] = {
+static int parser_action_row1708[] = {
        4,
-       -1, 3, 1749,
-       0, 0, 94,
-       1, 0, 95,
-       95, 0, 96
+       -1, 3, 1707,
+       0, 0, 87,
+       1, 0, 88,
+       95, 0, 89
 };
-static int parser_action_row1751[] = {
+static int parser_action_row1709[] = {
        1,
-       -1, 1, 421
+       -1, 1, 414
 };
-static int parser_action_row1752[] = {
+static int parser_action_row1710[] = {
        4,
-       -1, 3, 1751,
-       0, 0, 94,
-       1, 0, 95,
-       95, 0, 96
+       -1, 3, 1709,
+       0, 0, 87,
+       1, 0, 88,
+       95, 0, 89
 };
-static int parser_action_row1753[] = {
+static int parser_action_row1711[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1754[] = {
+static int parser_action_row1712[] = {
        2,
        -1, 1, 135,
-       96, 0, 627
+       96, 0, 599
 };
-static int parser_action_row1755[] = {
+static int parser_action_row1713[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1756[] = {
+static int parser_action_row1714[] = {
        1,
        -1, 1, 133
 };
-static int parser_action_row1757[] = {
+static int parser_action_row1715[] = {
        1,
        -1, 1, 29
 };
-static int parser_action_row1758[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1716[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -20699,57 +18587,50 @@ static int parser_action_row1758[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1759[] = {
+static int parser_action_row1717[] = {
        3,
        -1, 1, 124,
-       4, 0, 1001,
-       15, 0, 1818
+       4, 0, 973,
+       15, 0, 1776
 };
-static int parser_action_row1760[] = {
+static int parser_action_row1718[] = {
        3,
-       -1, 3, 1759,
-       28, 0, 90,
-       115, 0, 91
+       -1, 3, 1717,
+       28, 0, 83,
+       108, 0, 84
 };
-static int parser_action_row1761[] = {
+static int parser_action_row1719[] = {
        1,
        -1, 1, 50
 };
-static int parser_action_row1762[] = {
+static int parser_action_row1720[] = {
        1,
        -1, 1, 69
 };
-static int parser_action_row1763[] = {
+static int parser_action_row1721[] = {
        1,
        -1, 1, 79
 };
-static int parser_action_row1764[] = {
+static int parser_action_row1722[] = {
        4,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1765[] = {
+static int parser_action_row1723[] = {
        2,
-       -1, 1, 475,
-       9, 0, 1356
+       -1, 1, 468,
+       9, 0, 1314
 };
-static int parser_action_row1766[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1724[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -20778,21 +18659,14 @@ static int parser_action_row1766[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1767[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1725[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -20821,34 +18695,27 @@ static int parser_action_row1767[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1768[] = {
+static int parser_action_row1726[] = {
        2,
-       -1, 3, 1767,
-       15, 0, 1825
+       -1, 3, 1725,
+       15, 0, 1783
 };
-static int parser_action_row1769[] = {
+static int parser_action_row1727[] = {
        5,
        -1, 1, 30,
-       0, 0, 94,
-       1, 0, 95,
+       0, 0, 87,
+       1, 0, 88,
        13, 0, 32,
-       95, 0, 96
+       95, 0, 89
 };
-static int parser_action_row1770[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1728[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -20877,41 +18744,34 @@ static int parser_action_row1770[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1771[] = {
+static int parser_action_row1729[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1772[] = {
+static int parser_action_row1730[] = {
        1,
        -1, 1, 59
 };
-static int parser_action_row1773[] = {
+static int parser_action_row1731[] = {
        2,
-       -1, 3, 1772,
-       15, 0, 1830
+       -1, 3, 1730,
+       15, 0, 1788
 };
-static int parser_action_row1774[] = {
+static int parser_action_row1732[] = {
        2,
-       -1, 1, 475,
-       9, 0, 1356
+       -1, 1, 468,
+       9, 0, 1314
 };
-static int parser_action_row1775[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1733[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -20940,31 +18800,24 @@ static int parser_action_row1775[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1776[] = {
+static int parser_action_row1734[] = {
        3,
-       -1, 3, 1775,
-       28, 0, 90,
-       115, 0, 91
+       -1, 3, 1733,
+       28, 0, 83,
+       108, 0, 84
 };
-static int parser_action_row1777[] = {
+static int parser_action_row1735[] = {
        1,
        -1, 1, 70
 };
-static int parser_action_row1778[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1736[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -20993,450 +18846,408 @@ static int parser_action_row1778[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1779[] = {
+static int parser_action_row1737[] = {
        3,
        -1, 1, 124,
-       4, 0, 1001,
-       15, 0, 1835
+       4, 0, 973,
+       15, 0, 1793
 };
-static int parser_action_row1780[] = {
+static int parser_action_row1738[] = {
        3,
-       -1, 3, 1779,
-       28, 0, 90,
-       115, 0, 91
+       -1, 3, 1737,
+       28, 0, 83,
+       108, 0, 84
 };
-static int parser_action_row1781[] = {
+static int parser_action_row1739[] = {
        1,
        -1, 1, 52
 };
-static int parser_action_row1782[] = {
+static int parser_action_row1740[] = {
        1,
        -1, 1, 43
 };
-static int parser_action_row1783[] = {
+static int parser_action_row1741[] = {
        1,
-       -1, 1, 1040
+       -1, 1, 1012
 };
-static int parser_action_row1784[] = {
+static int parser_action_row1742[] = {
        1,
-       -1, 1, 429
+       -1, 1, 422
 };
-static int parser_action_row1785[] = {
+static int parser_action_row1743[] = {
        1,
-       -1, 1, 684
+       -1, 1, 670
 };
-static int parser_action_row1786[] = {
+static int parser_action_row1744[] = {
        1,
-       -1, 1, 703
+       -1, 1, 689
 };
-static int parser_action_row1787[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1745[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1788[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1746[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1789[] = {
+static int parser_action_row1747[] = {
        13,
-       -1, 1, 759,
-       59, 0, 1840,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 745,
+       59, 0, 1798,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1790[] = {
+static int parser_action_row1748[] = {
        13,
-       -1, 1, 757,
-       59, 0, 1842,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 743,
+       59, 0, 1800,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1791[] = {
+static int parser_action_row1749[] = {
        14,
-       -1, 1, 762,
-       52, 0, 295,
-       59, 0, 1844,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 748,
+       52, 0, 274,
+       59, 0, 1802,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1792[] = {
+static int parser_action_row1750[] = {
        15,
-       -1, 1, 766,
-       52, 0, 295,
-       58, 0, 227,
-       59, 0, 1847,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 752,
+       52, 0, 274,
+       58, 0, 213,
+       59, 0, 1805,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1793[] = {
+static int parser_action_row1751[] = {
        22,
-       -1, 1, 462,
-       54, 0, 643,
-       74, 0, 644,
-       75, 0, 645,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 646,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       97, 0, 1850
+       -1, 1, 455,
+       54, 0, 615,
+       74, 0, 616,
+       75, 0, 617,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 618,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       97, 0, 1808
 };
-static int parser_action_row1794[] = {
+static int parser_action_row1752[] = {
        1,
-       -1, 1, 688
+       -1, 1, 674
 };
-static int parser_action_row1795[] = {
+static int parser_action_row1753[] = {
        1,
-       -1, 1, 707
+       -1, 1, 693
 };
-static int parser_action_row1796[] = {
+static int parser_action_row1754[] = {
        1,
-       -1, 1, 687
+       -1, 1, 673
 };
-static int parser_action_row1797[] = {
+static int parser_action_row1755[] = {
        1,
-       -1, 1, 706
+       -1, 1, 692
 };
-static int parser_action_row1798[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1756[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1799[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1757[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1800[] = {
+static int parser_action_row1758[] = {
        1,
        -1, 1, 364
 };
-static int parser_action_row1801[] = {
+static int parser_action_row1759[] = {
        1,
-       -1, 1, 791
+       -1, 1, 777
 };
-static int parser_action_row1802[] = {
+static int parser_action_row1760[] = {
        1,
-       -1, 1, 958
+       -1, 1, 930
 };
-static int parser_action_row1803[] = {
+static int parser_action_row1761[] = {
        2,
-       -1, 3, 1802,
-       15, 0, 1853
+       -1, 3, 1760,
+       15, 0, 1811
 };
-static int parser_action_row1804[] = {
+static int parser_action_row1762[] = {
        1,
-       -1, 1, 417
+       -1, 1, 410
 };
-static int parser_action_row1805[] = {
+static int parser_action_row1763[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1806[] = {
+static int parser_action_row1764[] = {
        1,
-       -1, 1, 603
+       -1, 1, 596
 };
-static int parser_action_row1807[] = {
+static int parser_action_row1765[] = {
        2,
-       -1, 1, 606,
-       52, 0, 295
+       -1, 1, 599,
+       52, 0, 274
 };
-static int parser_action_row1808[] = {
+static int parser_action_row1766[] = {
        3,
-       -1, 1, 610,
-       52, 0, 295,
-       58, 0, 227
+       -1, 1, 603,
+       52, 0, 274,
+       58, 0, 213
 };
-static int parser_action_row1809[] = {
+static int parser_action_row1767[] = {
        2,
-       -1, 3, 1808,
-       97, 0, 1857
+       -1, 3, 1766,
+       97, 0, 1815
 };
-static int parser_action_row1810[] = {
+static int parser_action_row1768[] = {
        2,
-       -1, 3, 1809,
-       45, 0, 1858
+       -1, 3, 1767,
+       45, 0, 1816
 };
-static int parser_action_row1811[] = {
+static int parser_action_row1769[] = {
        4,
-       -1, 3, 1810,
-       31, 0, 1859,
-       47, 0, 420,
-       96, 0, 421
+       -1, 3, 1768,
+       31, 0, 1817,
+       47, 0, 392,
+       96, 0, 393
 };
-static int parser_action_row1812[] = {
+static int parser_action_row1770[] = {
        1,
-       -1, 1, 589
+       -1, 1, 582
 };
-static int parser_action_row1813[] = {
-       60,
-       -1, 1, 464,
-       12, 0, 182,
+static int parser_action_row1771[] = {
+       53,
+       -1, 1, 457,
+       12, 0, 168,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 183,
+       22, 0, 169,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 184,
-       33, 0, 423,
-       34, 0, 424,
-       35, 0, 425,
-       36, 0, 426,
+       31, 0, 170,
+       33, 0, 395,
+       34, 0, 396,
+       35, 0, 397,
+       36, 0, 398,
        37, 0, 43,
-       38, 0, 185,
-       40, 0, 186,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 420,
-       48, 0, 187,
+       47, 0, 392,
+       48, 0, 173,
        50, 0, 49,
-       51, 0, 427,
+       51, 0, 399,
        52, 0, 51,
-       54, 0, 428,
-       74, 0, 429,
-       75, 0, 430,
-       76, 0, 431,
-       77, 0, 432,
-       78, 0, 433,
-       79, 0, 434,
-       80, 0, 435,
-       81, 0, 436,
-       82, 0, 437,
-       83, 0, 438,
-       84, 0, 439,
-       85, 0, 440,
-       86, 0, 441,
-       87, 0, 442,
-       88, 0, 443,
-       89, 0, 444,
-       90, 0, 445,
-       91, 0, 446,
-       92, 0, 447,
-       94, 0, 216,
-       96, 0, 448,
-       97, 0, 449,
+       54, 0, 400,
+       74, 0, 401,
+       75, 0, 402,
+       76, 0, 403,
+       77, 0, 404,
+       78, 0, 405,
+       79, 0, 406,
+       80, 0, 407,
+       81, 0, 408,
+       82, 0, 409,
+       83, 0, 410,
+       84, 0, 411,
+       85, 0, 412,
+       86, 0, 413,
+       87, 0, 414,
+       88, 0, 415,
+       89, 0, 416,
+       90, 0, 417,
+       91, 0, 418,
+       92, 0, 419,
+       94, 0, 202,
+       96, 0, 420,
+       97, 0, 421,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1814[] = {
+static int parser_action_row1772[] = {
        1,
-       -1, 1, 422
+       -1, 1, 415
 };
-static int parser_action_row1815[] = {
+static int parser_action_row1773[] = {
        1,
-       -1, 1, 425
+       -1, 1, 418
 };
-static int parser_action_row1816[] = {
+static int parser_action_row1774[] = {
        2,
-       -1, 3, 1815,
-       47, 0, 1862
+       -1, 3, 1773,
+       47, 0, 1820
 };
-static int parser_action_row1817[] = {
+static int parser_action_row1775[] = {
        4,
-       -1, 3, 1816,
-       31, 0, 1863,
-       47, 0, 1864,
-       96, 0, 421
+       -1, 3, 1774,
+       31, 0, 1821,
+       47, 0, 1822,
+       96, 0, 393
 };
-static int parser_action_row1818[] = {
+static int parser_action_row1776[] = {
        2,
-       -1, 1, 475,
-       9, 0, 1356
+       -1, 1, 468,
+       9, 0, 1314
 };
-static int parser_action_row1819[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1777[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -21465,53 +19276,46 @@ static int parser_action_row1819[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1820[] = {
+static int parser_action_row1778[] = {
        3,
-       -1, 3, 1819,
-       28, 0, 90,
-       115, 0, 91
+       -1, 3, 1777,
+       28, 0, 83,
+       108, 0, 84
 };
-static int parser_action_row1821[] = {
+static int parser_action_row1779[] = {
        1,
        -1, 1, 57
 };
-static int parser_action_row1822[] = {
+static int parser_action_row1780[] = {
        5,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        15, 1, 80,
        95, 0, 3
 };
-static int parser_action_row1823[] = {
+static int parser_action_row1781[] = {
        1,
        -1, 1, 65
 };
-static int parser_action_row1824[] = {
+static int parser_action_row1782[] = {
        2,
-       -1, 1, 475,
-       9, 0, 1356
+       -1, 1, 468,
+       9, 0, 1314
 };
-static int parser_action_row1825[] = {
+static int parser_action_row1783[] = {
        2,
-       -1, 1, 475,
-       9, 0, 1356
+       -1, 1, 468,
+       9, 0, 1314
 };
-static int parser_action_row1826[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1784[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -21540,71 +19344,57 @@ static int parser_action_row1826[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1827[] = {
+static int parser_action_row1785[] = {
        2,
        -1, 1, 76,
        15, 1, 79
 };
-static int parser_action_row1828[] = {
+static int parser_action_row1786[] = {
        4,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1829[] = {
+static int parser_action_row1787[] = {
        2,
        -1, 1, 61,
-       9, 0, 1873
+       9, 0, 1831
 };
-static int parser_action_row1830[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1788[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1831[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1789[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -21633,39 +19423,32 @@ static int parser_action_row1831[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1832[] = {
+static int parser_action_row1790[] = {
        1,
        -1, 1, 53
 };
-static int parser_action_row1833[] = {
+static int parser_action_row1791[] = {
        2,
-       -1, 1, 475,
-       9, 0, 1356
+       -1, 1, 468,
+       9, 0, 1314
 };
-static int parser_action_row1834[] = {
+static int parser_action_row1792[] = {
        1,
        -1, 1, 72
 };
-static int parser_action_row1835[] = {
+static int parser_action_row1793[] = {
        2,
-       -1, 1, 475,
-       9, 0, 1356
+       -1, 1, 468,
+       9, 0, 1314
 };
-static int parser_action_row1836[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1794[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 613,
+       9, 0, 585,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -21694,1042 +19477,909 @@ static int parser_action_row1836[] = {
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1837[] = {
+static int parser_action_row1795[] = {
        3,
-       -1, 3, 1836,
-       28, 0, 90,
-       115, 0, 91
+       -1, 3, 1794,
+       28, 0, 83,
+       108, 0, 84
 };
-static int parser_action_row1838[] = {
+static int parser_action_row1796[] = {
        1,
        -1, 1, 71
 };
-static int parser_action_row1839[] = {
+static int parser_action_row1797[] = {
        1,
-       -1, 1, 675
+       -1, 1, 661
 };
-static int parser_action_row1840[] = {
+static int parser_action_row1798[] = {
        1,
-       -1, 1, 694
+       -1, 1, 680
 };
-static int parser_action_row1841[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1799[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1842[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1800[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1843[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1801[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1844[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1802[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1845[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1803[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1846[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1804[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1847[] = {
+static int parser_action_row1805[] = {
        13,
-       -1, 1, 761,
-       59, 0, 1886,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 747,
+       59, 0, 1844,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1848[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1806[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1849[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1807[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1850[] = {
+static int parser_action_row1808[] = {
        13,
-       -1, 1, 765,
-       59, 0, 1890,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 751,
+       59, 0, 1848,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1851[] = {
+static int parser_action_row1809[] = {
        14,
-       -1, 1, 764,
-       52, 0, 295,
-       59, 0, 1892,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 750,
+       52, 0, 274,
+       59, 0, 1850,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1852[] = {
+static int parser_action_row1810[] = {
        1,
-       -1, 1, 686
+       -1, 1, 672
 };
-static int parser_action_row1853[] = {
+static int parser_action_row1811[] = {
        1,
-       -1, 1, 705
+       -1, 1, 691
 };
-static int parser_action_row1854[] = {
-       40,
-       -1, 1, 464,
+static int parser_action_row1812[] = {
+       33,
+       -1, 1, 457,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1059,
-       12, 0, 911,
-       15, 0, 912,
+       9, 0, 1031,
+       12, 0, 883,
+       15, 0, 884,
        16, 0, 34,
-       22, 0, 913,
-       25, 0, 915,
-       26, 0, 916,
-       27, 0, 917,
-       33, 0, 918,
-       34, 0, 919,
-       35, 0, 920,
-       36, 0, 921,
-       37, 0, 922,
+       22, 0, 885,
+       25, 0, 887,
+       26, 0, 888,
+       27, 0, 889,
+       33, 0, 890,
+       34, 0, 891,
+       35, 0, 892,
+       36, 0, 893,
+       37, 0, 894,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 923,
-       51, 0, 924,
+       50, 0, 895,
+       51, 0, 896,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 925,
+       97, 0, 897,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1855[] = {
+static int parser_action_row1813[] = {
        2,
-       -1, 3, 1854,
-       24, 0, 1897
+       -1, 3, 1812,
+       24, 0, 1855
 };
-static int parser_action_row1856[] = {
+static int parser_action_row1814[] = {
        1,
-       -1, 1, 605
+       -1, 1, 598
 };
-static int parser_action_row1857[] = {
+static int parser_action_row1815[] = {
        1,
-       -1, 1, 609
+       -1, 1, 602
 };
-static int parser_action_row1858[] = {
+static int parser_action_row1816[] = {
        2,
-       -1, 1, 608,
-       52, 0, 295
+       -1, 1, 601,
+       52, 0, 274
 };
-static int parser_action_row1859[] = {
+static int parser_action_row1817[] = {
        1,
-       -1, 1, 613
+       -1, 1, 606
 };
-static int parser_action_row1860[] = {
+static int parser_action_row1818[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1861[] = {
+static int parser_action_row1819[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1862[] = {
+static int parser_action_row1820[] = {
        2,
-       -1, 3, 1861,
-       53, 0, 1901
+       -1, 3, 1819,
+       53, 0, 1859
 };
-static int parser_action_row1863[] = {
+static int parser_action_row1821[] = {
        1,
        -1, 1, 137
 };
-static int parser_action_row1864[] = {
+static int parser_action_row1822[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1865[] = {
+static int parser_action_row1823[] = {
        4,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
-       96, 0, 627
+       96, 0, 599
 };
-static int parser_action_row1866[] = {
+static int parser_action_row1824[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1867[] = {
+static int parser_action_row1825[] = {
        1,
        -1, 1, 48
 };
-static int parser_action_row1868[] = {
+static int parser_action_row1826[] = {
        2,
-       -1, 1, 475,
-       9, 0, 1356
+       -1, 1, 468,
+       9, 0, 1314
 };
-static int parser_action_row1869[] = {
+static int parser_action_row1827[] = {
        1,
        -1, 1, 58
 };
-static int parser_action_row1870[] = {
+static int parser_action_row1828[] = {
        1,
        -1, 1, 67
 };
-static int parser_action_row1871[] = {
+static int parser_action_row1829[] = {
        1,
        -1, 1, 66
 };
-static int parser_action_row1872[] = {
+static int parser_action_row1830[] = {
        2,
-       -1, 1, 475,
-       9, 0, 1356
+       -1, 1, 468,
+       9, 0, 1314
 };
-static int parser_action_row1873[] = {
+static int parser_action_row1831[] = {
        6,
-       -1, 1, 491,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1487,
+       9, 0, 1445,
        15, 1, 80,
        95, 0, 3
 };
-static int parser_action_row1874[] = {
+static int parser_action_row1832[] = {
        1,
        -1, 1, 63
 };
-static int parser_action_row1875[] = {
+static int parser_action_row1833[] = {
        2,
        -1, 1, 78,
-       14, 0, 993
+       14, 0, 965
 };
-static int parser_action_row1876[] = {
+static int parser_action_row1834[] = {
        2,
        -1, 1, 62,
-       9, 0, 1908
+       9, 0, 1866
 };
-static int parser_action_row1877[] = {
+static int parser_action_row1835[] = {
        1,
        -1, 1, 55
 };
-static int parser_action_row1878[] = {
+static int parser_action_row1836[] = {
        1,
        -1, 1, 54
 };
-static int parser_action_row1879[] = {
+static int parser_action_row1837[] = {
        2,
-       -1, 1, 475,
-       9, 0, 1356
+       -1, 1, 468,
+       9, 0, 1314
 };
-static int parser_action_row1880[] = {
+static int parser_action_row1838[] = {
        1,
        -1, 1, 73
 };
-static int parser_action_row1881[] = {
+static int parser_action_row1839[] = {
        1,
-       -1, 1, 674
+       -1, 1, 660
 };
-static int parser_action_row1882[] = {
+static int parser_action_row1840[] = {
        1,
-       -1, 1, 693
+       -1, 1, 679
 };
-static int parser_action_row1883[] = {
+static int parser_action_row1841[] = {
        1,
-       -1, 1, 672
+       -1, 1, 658
 };
-static int parser_action_row1884[] = {
+static int parser_action_row1842[] = {
        1,
-       -1, 1, 691
+       -1, 1, 677
 };
-static int parser_action_row1885[] = {
+static int parser_action_row1843[] = {
        1,
-       -1, 1, 677
+       -1, 1, 663
 };
-static int parser_action_row1886[] = {
+static int parser_action_row1844[] = {
        1,
-       -1, 1, 696
+       -1, 1, 682
 };
-static int parser_action_row1887[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1845[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1888[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1846[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1889[] = {
+static int parser_action_row1847[] = {
        1,
-       -1, 1, 681
+       -1, 1, 667
 };
-static int parser_action_row1890[] = {
+static int parser_action_row1848[] = {
        1,
-       -1, 1, 700
+       -1, 1, 686
 };
-static int parser_action_row1891[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1849[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1892[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1850[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1893[] = {
-       32,
-       -1, 1, 524,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
-       41, 1, 464,
+static int parser_action_row1851[] = {
+       25,
+       -1, 1, 517,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
+       41, 1, 457,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
-       98, 1, 464,
+       97, 0, 177,
+       98, 1, 457,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1894[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1852[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1895[] = {
+static int parser_action_row1853[] = {
        13,
-       -1, 1, 763,
-       59, 0, 1916,
-       60, 0, 229,
-       61, 0, 230,
-       62, 0, 231,
-       63, 0, 232,
-       64, 0, 233,
-       65, 0, 234,
-       66, 0, 235,
-       67, 0, 236,
-       68, 0, 237,
-       69, 0, 238,
-       70, 0, 239
+       -1, 1, 749,
+       59, 0, 1874,
+       60, 0, 215,
+       61, 0, 216,
+       62, 0, 217,
+       63, 0, 218,
+       64, 0, 219,
+       65, 0, 220,
+       66, 0, 221,
+       67, 0, 222,
+       68, 0, 223,
+       69, 0, 224,
+       70, 0, 225
 };
-static int parser_action_row1896[] = {
+static int parser_action_row1854[] = {
        1,
-       -1, 1, 964
+       -1, 1, 936
 };
-static int parser_action_row1897[] = {
+static int parser_action_row1855[] = {
        2,
-       -1, 3, 1896,
-       49, 0, 209
+       -1, 3, 1854,
+       49, 0, 195
 };
-static int parser_action_row1898[] = {
+static int parser_action_row1856[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1899[] = {
+static int parser_action_row1857[] = {
        1,
-       -1, 1, 607
+       -1, 1, 600
 };
-static int parser_action_row1900[] = {
+static int parser_action_row1858[] = {
        2,
-       -1, 3, 1899,
-       45, 0, 1920
+       -1, 3, 1857,
+       45, 0, 1878
 };
-static int parser_action_row1901[] = {
+static int parser_action_row1859[] = {
        2,
-       -1, 3, 1900,
-       53, 0, 1921
+       -1, 3, 1858,
+       53, 0, 1879
 };
-static int parser_action_row1902[] = {
+static int parser_action_row1860[] = {
        5,
-       -1, 3, 1901,
-       0, 0, 94,
-       1, 0, 95,
-       94, 0, 216,
-       95, 0, 96
+       -1, 3, 1859,
+       0, 0, 87,
+       1, 0, 88,
+       94, 0, 202,
+       95, 0, 89
 };
-static int parser_action_row1903[] = {
+static int parser_action_row1861[] = {
        2,
-       -1, 3, 1902,
-       47, 0, 1924
+       -1, 3, 1860,
+       47, 0, 1882
 };
-static int parser_action_row1904[] = {
+static int parser_action_row1862[] = {
        2,
-       -1, 3, 1903,
-       53, 0, 1925
+       -1, 3, 1861,
+       53, 0, 1883
 };
-static int parser_action_row1905[] = {
+static int parser_action_row1863[] = {
        2,
-       -1, 3, 1904,
-       53, 0, 1926
+       -1, 3, 1862,
+       53, 0, 1884
 };
-static int parser_action_row1906[] = {
+static int parser_action_row1864[] = {
        1,
        -1, 1, 49
 };
-static int parser_action_row1907[] = {
+static int parser_action_row1865[] = {
        1,
        -1, 1, 68
 };
-static int parser_action_row1908[] = {
+static int parser_action_row1866[] = {
        1,
        -1, 1, 60
 };
-static int parser_action_row1909[] = {
+static int parser_action_row1867[] = {
        1,
        -1, 1, 64
 };
-static int parser_action_row1910[] = {
+static int parser_action_row1868[] = {
        1,
        -1, 1, 56
 };
-static int parser_action_row1911[] = {
+static int parser_action_row1869[] = {
        1,
-       -1, 1, 676
+       -1, 1, 662
 };
-static int parser_action_row1912[] = {
+static int parser_action_row1870[] = {
        1,
-       -1, 1, 695
+       -1, 1, 681
 };
-static int parser_action_row1913[] = {
+static int parser_action_row1871[] = {
        1,
-       -1, 1, 680
+       -1, 1, 666
 };
-static int parser_action_row1914[] = {
+static int parser_action_row1872[] = {
        1,
-       -1, 1, 699
+       -1, 1, 685
 };
-static int parser_action_row1915[] = {
+static int parser_action_row1873[] = {
        1,
-       -1, 1, 679
+       -1, 1, 665
 };
-static int parser_action_row1916[] = {
+static int parser_action_row1874[] = {
        1,
-       -1, 1, 698
+       -1, 1, 684
 };
-static int parser_action_row1917[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1875[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1918[] = {
-       30,
-       -1, 1, 464,
-       12, 0, 182,
-       22, 0, 183,
-       31, 0, 184,
-       38, 0, 185,
-       40, 0, 186,
+static int parser_action_row1876[] = {
+       23,
+       -1, 1, 457,
+       12, 0, 168,
+       22, 0, 169,
+       31, 0, 170,
+       38, 0, 171,
+       40, 0, 172,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 187,
+       48, 0, 173,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 188,
-       75, 0, 189,
-       83, 0, 190,
+       74, 0, 174,
+       75, 0, 175,
+       83, 0, 176,
        96, 0, 53,
-       97, 0, 191,
+       97, 0, 177,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
-       103, 0, 59,
-       104, 0, 60,
-       105, 0, 61,
-       106, 0, 62,
-       107, 0, 63,
-       108, 0, 64,
-       109, 0, 65,
-       112, 0, 66
+       105, 0, 59
 };
-static int parser_action_row1919[] = {
+static int parser_action_row1877[] = {
        2,
        -1, 1, 271,
-       24, 1, 963
-};
-static int parser_action_row1920[] = {
-       29,
-       -1, 1, 464,
-       12, 0, 1126,
-       22, 0, 1127,
-       31, 0, 1128,
-       38, 0, 1129,
-       40, 0, 1130,
-       42, 0, 1131,
-       43, 0, 1132,
-       44, 0, 1133,
-       45, 0, 1134,
-       48, 0, 1135,
+       24, 1, 935
+};
+static int parser_action_row1878[] = {
+       22,
+       -1, 1, 457,
+       12, 0, 1098,
+       22, 0, 1099,
+       31, 0, 1100,
+       38, 0, 1101,
+       40, 0, 1102,
+       42, 0, 1103,
+       43, 0, 1104,
+       44, 0, 1105,
+       45, 0, 1106,
+       48, 0, 1107,
        52, 0, 51,
-       74, 0, 1136,
-       75, 0, 1137,
-       83, 0, 1138,
-       96, 0, 53,
-       97, 0, 1139,
-       99, 0, 1140,
-       100, 0, 1141,
-       101, 0, 1142,
-       102, 0, 1143,
-       103, 0, 1144,
-       104, 0, 1145,
-       105, 0, 1146,
-       106, 0, 1147,
-       107, 0, 1148,
-       108, 0, 1149,
-       109, 0, 65,
-       112, 0, 1150
-};
-static int parser_action_row1921[] = {
-       3,
-       -1, 1, 493,
+       74, 0, 1108,
+       75, 0, 1109,
+       83, 0, 1110,
+       96, 0, 53,
+       97, 0, 1111,
+       99, 0, 1112,
+       100, 0, 1113,
+       101, 0, 1114,
+       102, 0, 58,
+       105, 0, 1115
+};
+static int parser_action_row1879[] = {
+       3,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1922[] = {
+static int parser_action_row1880[] = {
        1,
-       -1, 1, 611
+       -1, 1, 604
 };
-static int parser_action_row1923[] = {
+static int parser_action_row1881[] = {
        4,
-       -1, 3, 1922,
-       0, 0, 94,
-       1, 0, 95,
-       95, 0, 96
+       -1, 3, 1880,
+       0, 0, 87,
+       1, 0, 88,
+       95, 0, 89
 };
-static int parser_action_row1924[] = {
+static int parser_action_row1882[] = {
        1,
-       -1, 1, 423
+       -1, 1, 416
 };
-static int parser_action_row1925[] = {
+static int parser_action_row1883[] = {
        3,
-       -1, 1, 493,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1926[] = {
+static int parser_action_row1884[] = {
        1,
        -1, 1, 134
 };
-static int parser_action_row1927[] = {
+static int parser_action_row1885[] = {
        1,
        -1, 1, 132
 };
-static int parser_action_row1928[] = {
+static int parser_action_row1886[] = {
        1,
-       -1, 1, 678
+       -1, 1, 664
 };
-static int parser_action_row1929[] = {
+static int parser_action_row1887[] = {
        1,
-       -1, 1, 697
+       -1, 1, 683
 };
-static int parser_action_row1930[] = {
+static int parser_action_row1888[] = {
        1,
-       -1, 1, 533
+       -1, 1, 526
 };
-static int parser_action_row1931[] = {
+static int parser_action_row1889[] = {
        2,
-       -1, 3, 1930,
-       53, 0, 1933
+       -1, 3, 1888,
+       53, 0, 1891
 };
-static int parser_action_row1932[] = {
+static int parser_action_row1890[] = {
        1,
-       -1, 1, 424
+       -1, 1, 417
 };
-static int parser_action_row1933[] = {
+static int parser_action_row1891[] = {
        2,
-       -1, 3, 1932,
-       53, 0, 1934
+       -1, 3, 1890,
+       53, 0, 1892
 };
-static int parser_action_row1934[] = {
+static int parser_action_row1892[] = {
        1,
-       -1, 1, 612
+       -1, 1, 605
 };
-static int parser_action_row1935[] = {
+static int parser_action_row1893[] = {
        1,
        -1, 1, 136
 };
@@ -24627,49 +22277,7 @@ const int* const parser_action_table[] = {
        parser_action_row1890,
        parser_action_row1891,
        parser_action_row1892,
-       parser_action_row1893,
-       parser_action_row1894,
-       parser_action_row1895,
-       parser_action_row1896,
-       parser_action_row1897,
-       parser_action_row1898,
-       parser_action_row1899,
-       parser_action_row1900,
-       parser_action_row1901,
-       parser_action_row1902,
-       parser_action_row1903,
-       parser_action_row1904,
-       parser_action_row1905,
-       parser_action_row1906,
-       parser_action_row1907,
-       parser_action_row1908,
-       parser_action_row1909,
-       parser_action_row1910,
-       parser_action_row1911,
-       parser_action_row1912,
-       parser_action_row1913,
-       parser_action_row1914,
-       parser_action_row1915,
-       parser_action_row1916,
-       parser_action_row1917,
-       parser_action_row1918,
-       parser_action_row1919,
-       parser_action_row1920,
-       parser_action_row1921,
-       parser_action_row1922,
-       parser_action_row1923,
-       parser_action_row1924,
-       parser_action_row1925,
-       parser_action_row1926,
-       parser_action_row1927,
-       parser_action_row1928,
-       parser_action_row1929,
-       parser_action_row1930,
-       parser_action_row1931,
-       parser_action_row1932,
-       parser_action_row1933,
-       parser_action_row1934,
-       parser_action_row1935
+       parser_action_row1893
 };
 
 static int parser_goto_row1[] = {
@@ -24683,39 +22291,39 @@ static int parser_goto_row2[] = {
 static int parser_goto_row3[] = {
        3,
        -1, 6,
-       18, 98,
-       28, 98
+       18, 91,
+       28, 91
 };
 static int parser_goto_row4[] = {
        9,
        -1, 7,
-       20, 106,
-       30, 106,
-       101, 106,
-       105, 106,
-       118, 106,
-       120, 106,
-       283, 106,
-       292, 106
+       20, 99,
+       30, 99,
+       94, 99,
+       98, 99,
+       111, 99,
+       113, 99,
+       262, 99,
+       271, 99
 };
 static int parser_goto_row5[] = {
        16,
        -1, 8,
        5, 26,
-       18, 99,
-       19, 102,
-       20, 107,
-       28, 116,
-       29, 119,
-       30, 121,
-       100, 282,
-       101, 284,
-       105, 286,
-       117, 291,
-       118, 293,
-       120, 294,
-       283, 524,
-       292, 527
+       18, 92,
+       19, 95,
+       20, 100,
+       28, 109,
+       29, 112,
+       30, 114,
+       93, 261,
+       94, 263,
+       98, 265,
+       110, 270,
+       111, 272,
+       113, 273,
+       262, 496,
+       271, 499
 };
 static int parser_goto_row6[] = {
        1,
@@ -24727,143 +22335,143 @@ static int parser_goto_row7[] = {
 };
 static int parser_goto_row8[] = {
        9,
-       -1, 813,
-       13, 67,
-       27, 115,
-       104, 285,
-       216, 415,
-       618, 810,
-       1017, 1195,
-       1199, 1195,
-       1339, 1486
+       -1, 785,
+       13, 60,
+       27, 108,
+       97, 264,
+       202, 387,
+       590, 782,
+       989, 1160,
+       1164, 1160,
+       1297, 1444
 };
 static int parser_goto_row9[] = {
        1,
-       -1, 493
+       -1, 465
 };
 static int parser_goto_row10[] = {
        1,
-       -1, 1361
+       -1, 1319
 };
 static int parser_goto_row11[] = {
        2,
-       -1, 1506,
-       1507, 1617
+       -1, 1464,
+       1465, 1575
 };
 static int parser_goto_row12[] = {
        2,
-       -1, 1362,
-       1616, 1687
+       -1, 1320,
+       1574, 1645
 };
 static int parser_goto_row13[] = {
        2,
-       -1, 1010,
-       1018, 1197
+       -1, 982,
+       990, 1162
 };
 static int parser_goto_row14[] = {
        4,
-       -1, 1011,
-       1014, 1192,
-       1504, 1614,
-       1615, 1686
+       -1, 983,
+       986, 1157,
+       1462, 1572,
+       1573, 1644
 };
 static int parser_goto_row15[] = {
        2,
-       -1, 1012,
-       1018, 1198
+       -1, 984,
+       990, 1163
 };
 static int parser_goto_row16[] = {
        1,
-       -1, 1013
+       -1, 985
 };
 static int parser_goto_row17[] = {
        6,
-       -1, 994,
-       849, 997,
-       1689, 1761,
-       1694, 1771,
-       1700, 1781,
-       1874, 1907
+       -1, 966,
+       821, 969,
+       1647, 1719,
+       1652, 1729,
+       1658, 1739,
+       1832, 1865
 };
 static int parser_goto_row18[] = {
        7,
-       -1, 1004,
-       1620, 1692,
-       1623, 1696,
-       1688, 1758,
-       1693, 1767,
-       1694, 1772,
-       1699, 1778
+       -1, 976,
+       1578, 1650,
+       1581, 1654,
+       1646, 1716,
+       1651, 1725,
+       1652, 1730,
+       1657, 1736
 };
 static int parser_goto_row19[] = {
        8,
-       -1, 258,
-       115, 290,
-       285, 525,
-       415, 623,
-       810, 960,
-       813, 964,
-       1195, 1364,
-       1486, 1604
+       -1, 237,
+       108, 269,
+       264, 497,
+       387, 595,
+       782, 932,
+       785, 936,
+       1160, 1322,
+       1444, 1562
 };
 static int parser_goto_row20[] = {
        4,
-       -1, 685,
-       687, 858,
-       688, 859,
-       860, 1008
+       -1, 657,
+       659, 830,
+       660, 831,
+       832, 980
 };
 static int parser_goto_row21[] = {
        6,
-       -1, 854,
-       1510, 1620,
-       1512, 1623,
-       1618, 1688,
-       1621, 1693,
-       1624, 1699
+       -1, 826,
+       1468, 1578,
+       1470, 1581,
+       1576, 1646,
+       1579, 1651,
+       1582, 1657
 };
 static int parser_goto_row22[] = {
        1,
-       -1, 1179
+       -1, 1144
 };
 static int parser_goto_row23[] = {
        2,
-       -1, 1346,
-       1348, 1494
+       -1, 1304,
+       1306, 1452
 };
 static int parser_goto_row24[] = {
        2,
-       -1, 1180,
-       1493, 1607
+       -1, 1145,
+       1451, 1565
 };
 static int parser_goto_row25[] = {
        8,
-       -1, 1005,
-       1004, 1187,
-       1623, 1697,
-       1688, 1759,
-       1696, 1775,
-       1699, 1779,
-       1758, 1819,
-       1778, 1836
+       -1, 977,
+       976, 1152,
+       1581, 1655,
+       1646, 1717,
+       1654, 1733,
+       1657, 1737,
+       1716, 1777,
+       1736, 1794
 };
 static int parser_goto_row26[] = {
        2,
-       -1, 1497,
-       1498, 1609
+       -1, 1455,
+       1456, 1567
 };
 static int parser_goto_row27[] = {
        2,
-       -1, 1350,
-       1608, 1682
+       -1, 1308,
+       1566, 1640
 };
 static int parser_goto_row28[] = {
        1,
-       -1, 1351
+       -1, 1309
 };
 static int parser_goto_row29[] = {
        1,
-       -1, 1352
+       -1, 1310
 };
 static int parser_goto_row30[] = {
        1,
@@ -24871,21 +22479,21 @@ static int parser_goto_row30[] = {
 };
 static int parser_goto_row31[] = {
        1,
-       -1, 92
+       -1, 85
 };
 static int parser_goto_row32[] = {
        11,
-       -1, 93,
-       863, 1014,
-       1005, 1188,
-       1187, 1359,
-       1504, 1615,
-       1697, 1776,
-       1759, 1820,
-       1775, 1833,
-       1779, 1837,
-       1819, 1868,
-       1836, 1879
+       -1, 86,
+       835, 986,
+       977, 1153,
+       1152, 1317,
+       1462, 1573,
+       1655, 1734,
+       1717, 1778,
+       1733, 1791,
+       1737, 1795,
+       1777, 1826,
+       1794, 1837
 };
 static int parser_goto_row33[] = {
        1,
@@ -24894,1563 +22502,1542 @@ static int parser_goto_row33[] = {
 static int parser_goto_row34[] = {
        5,
        -1, 11,
-       19, 103,
-       29, 103,
-       100, 103,
-       117, 103
+       19, 96,
+       29, 96,
+       93, 96,
+       110, 96
 };
 static int parser_goto_row35[] = {
        24,
-       -1, 450,
-       223, 422,
-       547, 735,
-       571, 763,
-       589, 778,
-       634, 827,
-       808, 957,
-       825, 957,
-       956, 957,
-       975, 957,
-       1000, 1181,
-       1076, 1240,
-       1182, 1353,
-       1196, 1375,
-       1203, 1396,
-       1228, 1412,
-       1258, 1432,
-       1517, 1626,
-       1608, 1353,
-       1625, 1700,
-       1681, 1375,
-       1683, 1755,
-       1810, 1860,
-       1816, 1865
+       -1, 422,
+       209, 394,
+       519, 707,
+       543, 735,
+       561, 750,
+       606, 799,
+       780, 929,
+       797, 929,
+       928, 929,
+       947, 929,
+       972, 1146,
+       1048, 1205,
+       1147, 1311,
+       1161, 1333,
+       1168, 1354,
+       1193, 1370,
+       1223, 1390,
+       1475, 1584,
+       1566, 1311,
+       1583, 1658,
+       1639, 1333,
+       1641, 1713,
+       1768, 1818,
+       1774, 1823
 };
 static int parser_goto_row36[] = {
        4,
-       -1, 958,
-       825, 976,
-       956, 1098,
-       975, 1117
+       -1, 930,
+       797, 948,
+       928, 1070,
+       947, 1089
 };
 static int parser_goto_row37[] = {
        2,
-       -1, 1100,
-       1101, 1259
+       -1, 1072,
+       1073, 1224
 };
 static int parser_goto_row38[] = {
        5,
-       -1, 855,
-       1178, 1341,
-       1342, 1490,
-       1344, 1491,
-       1619, 1689
+       -1, 827,
+       1143, 1299,
+       1300, 1448,
+       1302, 1449,
+       1577, 1647
 };
 static int parser_goto_row39[] = {
        8,
-       -1, 358,
-       359, 573,
-       417, 624,
-       473, 655,
-       625, 821,
-       1360, 1502,
-       1503, 1613,
-       1622, 1694
+       -1, 330,
+       331, 545,
+       389, 596,
+       445, 627,
+       597, 793,
+       1318, 1460,
+       1461, 1571,
+       1580, 1652
 };
 static int parser_goto_row40[] = {
        32,
-       -1, 170,
-       37, 179,
-       410, 614,
-       612, 803,
-       767, 943,
-       822, 973,
-       914, 1065,
-       916, 179,
-       1003, 1185,
-       1082, 1245,
-       1086, 1249,
-       1186, 1358,
-       1238, 614,
-       1246, 1426,
-       1416, 803,
-       1429, 1552,
-       1538, 943,
-       1543, 973,
-       1691, 1764,
-       1695, 1773,
-       1728, 1249,
-       1757, 1817,
-       1765, 1823,
-       1766, 1824,
-       1769, 1828,
-       1774, 1832,
-       1777, 1834,
-       1818, 1867,
-       1825, 1871,
-       1830, 1875,
-       1835, 1878,
-       1853, 1552
+       -1, 156,
+       37, 165,
+       382, 586,
+       584, 775,
+       739, 915,
+       794, 945,
+       886, 1037,
+       888, 165,
+       975, 1150,
+       1054, 1210,
+       1058, 1214,
+       1151, 1316,
+       1203, 586,
+       1211, 1384,
+       1374, 775,
+       1387, 1510,
+       1496, 915,
+       1501, 945,
+       1649, 1722,
+       1653, 1731,
+       1686, 1214,
+       1715, 1775,
+       1723, 1781,
+       1724, 1782,
+       1727, 1786,
+       1732, 1790,
+       1735, 1792,
+       1776, 1825,
+       1783, 1829,
+       1788, 1833,
+       1793, 1836,
+       1811, 1510
 };
 static int parser_goto_row41[] = {
        1,
-       -1, 68
+       -1, 61
 };
 static int parser_goto_row42[] = {
        2,
-       -1, 69,
-       933, 1083
+       -1, 62,
+       905, 1055
 };
 static int parser_goto_row43[] = {
        4,
-       -1, 354,
-       615, 805,
-       1060, 1231,
-       1418, 1542
+       -1, 326,
+       587, 777,
+       1032, 1196,
+       1376, 1500
 };
 static int parser_goto_row44[] = {
        4,
-       -1, 259,
-       261, 495,
-       570, 495,
-       1248, 495
+       -1, 238,
+       240, 467,
+       542, 467,
+       1213, 467
 };
 static int parser_goto_row45[] = {
        15,
-       -1, 171,
-       13, 70,
-       27, 70,
-       104, 70,
-       172, 355,
-       260, 494,
-       496, 494,
-       569, 494,
-       615, 355,
-       762, 494,
-       766, 926,
-       933, 1084,
-       1060, 355,
-       1418, 355,
-       1537, 926
+       -1, 157,
+       13, 63,
+       27, 63,
+       97, 63,
+       158, 327,
+       239, 466,
+       468, 466,
+       541, 466,
+       587, 327,
+       734, 466,
+       738, 898,
+       905, 1056,
+       1032, 327,
+       1376, 327,
+       1495, 898
 };
 static int parser_goto_row46[] = {
        18,
-       -1, 210,
-       41, 211,
-       173, 356,
-       180, 363,
-       424, 632,
-       425, 633,
-       919, 1071,
-       920, 1072,
-       944, 1090,
-       974, 1116,
-       1063, 1232,
-       1068, 1235,
-       1366, 1515,
-       1367, 1516,
-       1553, 1661,
-       1651, 1729,
-       1654, 1731,
-       1896, 1918
+       -1, 196,
+       41, 197,
+       159, 328,
+       166, 335,
+       396, 604,
+       397, 605,
+       891, 1043,
+       892, 1044,
+       916, 1062,
+       946, 1088,
+       1035, 1197,
+       1040, 1200,
+       1324, 1473,
+       1325, 1474,
+       1511, 1619,
+       1609, 1687,
+       1612, 1689,
+       1854, 1876
 };
 static int parser_goto_row47[] = {
        20,
-       -1, 71,
-       224, 451,
-       766, 927,
-       831, 451,
-       912, 927,
-       916, 927,
-       1113, 451,
-       1196, 1376,
-       1238, 927,
-       1416, 927,
-       1436, 451,
-       1518, 451,
-       1537, 927,
-       1538, 927,
-       1543, 927,
-       1558, 451,
-       1681, 1376,
-       1728, 927,
-       1812, 451,
-       1853, 927
+       -1, 64,
+       210, 423,
+       738, 899,
+       803, 423,
+       884, 899,
+       888, 899,
+       1085, 423,
+       1161, 1334,
+       1203, 899,
+       1374, 899,
+       1394, 423,
+       1476, 423,
+       1495, 899,
+       1496, 899,
+       1501, 899,
+       1516, 423,
+       1639, 1334,
+       1686, 899,
+       1770, 423,
+       1811, 899
 };
 static int parser_goto_row48[] = {
        18,
-       -1, 72,
-       224, 452,
-       766, 928,
-       831, 452,
-       912, 928,
-       916, 928,
-       1113, 452,
-       1238, 928,
-       1416, 928,
-       1436, 452,
-       1518, 452,
-       1537, 928,
-       1538, 928,
-       1543, 928,
-       1558, 452,
-       1728, 928,
-       1812, 452,
-       1853, 928
+       -1, 65,
+       210, 424,
+       738, 900,
+       803, 424,
+       884, 900,
+       888, 900,
+       1085, 424,
+       1203, 900,
+       1374, 900,
+       1394, 424,
+       1476, 424,
+       1495, 900,
+       1496, 900,
+       1501, 900,
+       1516, 424,
+       1686, 900,
+       1770, 424,
+       1811, 900
 };
 static int parser_goto_row49[] = {
        52,
-       -1, 240,
-       241, 480,
-       264, 500,
-       273, 509,
-       275, 513,
-       277, 518,
-       514, 709,
-       519, 713,
-       522, 716,
-       647, 513,
-       649, 518,
-       694, 871,
-       717, 890,
-       836, 716,
-       872, 1027,
-       874, 1029,
-       876, 1032,
-       878, 1037,
-       978, 871,
-       1033, 1211,
-       1038, 1215,
-       1041, 1218,
-       1081, 513,
-       1088, 518,
-       1121, 1032,
-       1122, 1037,
-       1219, 1404,
-       1253, 716,
-       1278, 1218,
-       1374, 1520,
-       1423, 871,
-       1521, 1631,
-       1522, 1633,
-       1523, 1635,
-       1525, 1639,
-       1527, 1641,
-       1548, 1032,
-       1550, 1037,
-       1636, 1710,
-       1642, 1721,
-       1643, 1723,
-       1660, 1218,
-       1711, 1787,
-       1724, 1798,
-       1788, 1841,
-       1789, 1843,
-       1790, 1845,
-       1791, 1848,
-       1846, 1887,
-       1849, 1891,
-       1850, 1893,
-       1894, 1917
+       -1, 226,
+       227, 452,
+       243, 472,
+       252, 481,
+       254, 485,
+       256, 490,
+       486, 681,
+       491, 685,
+       494, 688,
+       619, 485,
+       621, 490,
+       666, 843,
+       689, 862,
+       808, 688,
+       844, 999,
+       846, 1001,
+       848, 1004,
+       850, 1009,
+       950, 843,
+       1005, 1176,
+       1010, 1180,
+       1013, 1183,
+       1053, 485,
+       1060, 490,
+       1093, 1004,
+       1094, 1009,
+       1184, 1362,
+       1218, 688,
+       1243, 1183,
+       1332, 1478,
+       1381, 843,
+       1479, 1589,
+       1480, 1591,
+       1481, 1593,
+       1483, 1597,
+       1485, 1599,
+       1506, 1004,
+       1508, 1009,
+       1594, 1668,
+       1600, 1679,
+       1601, 1681,
+       1618, 1183,
+       1669, 1745,
+       1682, 1756,
+       1746, 1799,
+       1747, 1801,
+       1748, 1803,
+       1749, 1806,
+       1804, 1845,
+       1807, 1849,
+       1808, 1851,
+       1852, 1875
 };
 static int parser_goto_row50[] = {
        10,
-       -1, 73,
-       224, 453,
-       831, 453,
-       1113, 453,
-       1196, 1377,
-       1436, 453,
-       1518, 453,
-       1558, 453,
-       1681, 1377,
-       1812, 453
+       -1, 66,
+       210, 425,
+       803, 425,
+       1085, 425,
+       1161, 1335,
+       1394, 425,
+       1476, 425,
+       1516, 425,
+       1639, 1335,
+       1770, 425
 };
 static int parser_goto_row51[] = {
        1,
-       -1, 74
+       -1, 67
 };
 static int parser_goto_row52[] = {
        3,
-       -1, 929,
-       933, 1085,
-       1083, 1247
+       -1, 901,
+       905, 1057,
+       1055, 1212
 };
 static int parser_goto_row53[] = {
        10,
-       -1, 75,
-       224, 454,
-       831, 454,
-       1113, 454,
-       1196, 1378,
-       1436, 454,
-       1518, 454,
-       1558, 454,
-       1681, 1378,
-       1812, 454
+       -1, 68,
+       210, 426,
+       803, 426,
+       1085, 426,
+       1161, 1336,
+       1394, 426,
+       1476, 426,
+       1516, 426,
+       1639, 1336,
+       1770, 426
 };
 static int parser_goto_row54[] = {
        10,
-       -1, 76,
-       224, 455,
-       831, 455,
-       1113, 455,
-       1196, 1379,
-       1436, 455,
-       1518, 455,
-       1558, 455,
-       1681, 1379,
-       1812, 455
+       -1, 69,
+       210, 427,
+       803, 427,
+       1085, 427,
+       1161, 1337,
+       1394, 427,
+       1476, 427,
+       1516, 427,
+       1639, 1337,
+       1770, 427
 };
 static int parser_goto_row55[] = {
        10,
-       -1, 77,
-       224, 456,
-       831, 456,
-       1113, 456,
-       1196, 1380,
-       1436, 456,
-       1518, 456,
-       1558, 456,
-       1681, 1380,
-       1812, 456
+       -1, 70,
+       210, 428,
+       803, 428,
+       1085, 428,
+       1161, 1338,
+       1394, 428,
+       1476, 428,
+       1516, 428,
+       1639, 1338,
+       1770, 428
 };
 static int parser_goto_row56[] = {
        10,
-       -1, 78,
-       224, 457,
-       831, 457,
-       1113, 457,
-       1196, 1381,
-       1436, 457,
-       1518, 457,
-       1558, 457,
-       1681, 1381,
-       1812, 457
+       -1, 71,
+       210, 429,
+       803, 429,
+       1085, 429,
+       1161, 1339,
+       1394, 429,
+       1476, 429,
+       1516, 429,
+       1639, 1339,
+       1770, 429
 };
 static int parser_goto_row57[] = {
        2,
-       -1, 418,
-       1075, 1239
+       -1, 390,
+       1047, 1204
 };
 static int parser_goto_row58[] = {
        10,
-       -1, 79,
-       224, 458,
-       831, 458,
-       1113, 458,
-       1196, 1382,
-       1436, 458,
-       1518, 458,
-       1558, 458,
-       1681, 1382,
-       1812, 458
+       -1, 72,
+       210, 430,
+       803, 430,
+       1085, 430,
+       1161, 1340,
+       1394, 430,
+       1476, 430,
+       1516, 430,
+       1639, 1340,
+       1770, 430
 };
 static int parser_goto_row59[] = {
        2,
-       -1, 213,
-       922, 1073
+       -1, 199,
+       894, 1045
 };
 static int parser_goto_row60[] = {
        131,
-       -1, 459,
-       39, 192,
-       43, 214,
-       175, 360,
-       178, 362,
-       213, 409,
-       222, 419,
-       225, 472,
-       228, 477,
-       240, 478,
-       271, 505,
-       297, 529,
-       308, 538,
-       368, 579,
-       423, 631,
-       479, 659,
-       480, 660,
-       497, 538,
-       499, 698,
-       500, 699,
-       501, 700,
-       508, 703,
-       509, 704,
-       512, 706,
-       513, 707,
-       517, 710,
-       518, 711,
-       528, 538,
-       630, 826,
-       636, 477,
-       652, 838,
-       705, 538,
-       708, 883,
-       709, 884,
-       712, 885,
-       713, 886,
-       715, 887,
-       716, 888,
-       727, 895,
-       764, 908,
-       834, 706,
-       835, 710,
-       842, 990,
-       870, 1024,
-       871, 1025,
-       889, 1043,
-       890, 1044,
-       909, 1057,
-       918, 1070,
-       922, 1074,
-       946, 1092,
-       971, 1114,
-       977, 1119,
-       985, 887,
-       1026, 1204,
-       1027, 1205,
-       1028, 1206,
-       1029, 1207,
-       1031, 1208,
-       1032, 1209,
-       1036, 1212,
-       1037, 1213,
-       1045, 1221,
-       1050, 538,
-       1064, 1233,
-       1066, 1234,
-       1073, 1237,
-       1075, 419,
-       1093, 1255,
-       1115, 1273,
-       1120, 1024,
-       1210, 1397,
-       1211, 1398,
-       1214, 1399,
-       1215, 1400,
-       1217, 1401,
-       1218, 1402,
-       1276, 1208,
-       1277, 1212,
-       1279, 1444,
-       1280, 1446,
-       1282, 1447,
-       1365, 1514,
-       1403, 1531,
-       1404, 1532,
-       1421, 1544,
-       1443, 1401,
-       1519, 1628,
-       1520, 1629,
-       1630, 1703,
-       1631, 1704,
-       1632, 1705,
-       1633, 1706,
-       1634, 1707,
-       1635, 1708,
-       1638, 1716,
-       1639, 1717,
-       1640, 1718,
-       1641, 1719,
-       1652, 1730,
-       1662, 1734,
-       1666, 990,
-       1701, 1782,
-       1709, 1784,
-       1710, 1785,
-       1720, 1793,
-       1721, 1794,
-       1722, 1795,
-       1723, 1796,
-       1737, 1804,
-       1786, 1838,
-       1787, 1839,
-       1797, 1851,
-       1798, 1852,
-       1829, 1874,
-       1840, 1880,
-       1841, 1881,
-       1842, 1882,
-       1843, 1883,
-       1844, 1884,
-       1845, 1885,
-       1847, 1888,
-       1848, 1889,
-       1886, 1910,
-       1887, 1911,
-       1890, 1912,
-       1891, 1913,
-       1892, 1914,
-       1893, 1915,
-       1916, 1927,
-       1917, 1928
+       -1, 431,
+       39, 178,
+       43, 200,
+       161, 332,
+       164, 334,
+       199, 381,
+       208, 391,
+       211, 444,
+       214, 449,
+       226, 450,
+       250, 477,
+       276, 501,
+       287, 510,
+       340, 551,
+       395, 603,
+       451, 631,
+       452, 632,
+       469, 510,
+       471, 670,
+       472, 671,
+       473, 672,
+       480, 675,
+       481, 676,
+       484, 678,
+       485, 679,
+       489, 682,
+       490, 683,
+       500, 510,
+       602, 798,
+       608, 449,
+       624, 810,
+       677, 510,
+       680, 855,
+       681, 856,
+       684, 857,
+       685, 858,
+       687, 859,
+       688, 860,
+       699, 867,
+       736, 880,
+       806, 678,
+       807, 682,
+       814, 962,
+       842, 996,
+       843, 997,
+       861, 1015,
+       862, 1016,
+       881, 1029,
+       890, 1042,
+       894, 1046,
+       918, 1064,
+       943, 1086,
+       949, 1091,
+       957, 859,
+       998, 1169,
+       999, 1170,
+       1000, 1171,
+       1001, 1172,
+       1003, 1173,
+       1004, 1174,
+       1008, 1177,
+       1009, 1178,
+       1017, 1186,
+       1022, 510,
+       1036, 1198,
+       1038, 1199,
+       1045, 1202,
+       1047, 391,
+       1065, 1220,
+       1087, 1238,
+       1092, 996,
+       1175, 1355,
+       1176, 1356,
+       1179, 1357,
+       1180, 1358,
+       1182, 1359,
+       1183, 1360,
+       1241, 1173,
+       1242, 1177,
+       1244, 1402,
+       1245, 1404,
+       1247, 1405,
+       1323, 1472,
+       1361, 1489,
+       1362, 1490,
+       1379, 1502,
+       1401, 1359,
+       1477, 1586,
+       1478, 1587,
+       1588, 1661,
+       1589, 1662,
+       1590, 1663,
+       1591, 1664,
+       1592, 1665,
+       1593, 1666,
+       1596, 1674,
+       1597, 1675,
+       1598, 1676,
+       1599, 1677,
+       1610, 1688,
+       1620, 1692,
+       1624, 962,
+       1659, 1740,
+       1667, 1742,
+       1668, 1743,
+       1678, 1751,
+       1679, 1752,
+       1680, 1753,
+       1681, 1754,
+       1695, 1762,
+       1744, 1796,
+       1745, 1797,
+       1755, 1809,
+       1756, 1810,
+       1787, 1832,
+       1798, 1838,
+       1799, 1839,
+       1800, 1840,
+       1801, 1841,
+       1802, 1842,
+       1803, 1843,
+       1805, 1846,
+       1806, 1847,
+       1844, 1868,
+       1845, 1869,
+       1848, 1870,
+       1849, 1871,
+       1850, 1872,
+       1851, 1873,
+       1874, 1885,
+       1875, 1886
 };
 static int parser_goto_row61[] = {
        1,
-       -1, 193
+       -1, 179
 };
 static int parser_goto_row62[] = {
        6,
-       -1, 194,
-       369, 580,
-       585, 774,
-       587, 776,
-       588, 777,
-       775, 950
+       -1, 180,
+       341, 552,
+       557, 746,
+       559, 748,
+       560, 749,
+       747, 922
 };
 static int parser_goto_row63[] = {
        1,
-       -1, 195
+       -1, 181
 };
 static int parser_goto_row64[] = {
        8,
-       -1, 196,
-       591, 780,
-       592, 781,
-       593, 782,
-       594, 783,
-       595, 784,
-       596, 785,
-       597, 786
+       -1, 182,
+       563, 752,
+       564, 753,
+       565, 754,
+       566, 755,
+       567, 756,
+       568, 757,
+       569, 758
 };
 static int parser_goto_row65[] = {
        2,
-       -1, 197,
-       590, 779
+       -1, 183,
+       562, 751
 };
 static int parser_goto_row66[] = {
        2,
-       -1, 198,
-       598, 787
+       -1, 184,
+       570, 759
 };
 static int parser_goto_row67[] = {
        2,
-       -1, 199,
-       599, 788
+       -1, 185,
+       571, 760
 };
 static int parser_goto_row68[] = {
        3,
-       -1, 200,
-       600, 789,
-       601, 790
+       -1, 186,
+       572, 761,
+       573, 762
 };
 static int parser_goto_row69[] = {
        3,
-       -1, 201,
-       602, 791,
-       603, 792
+       -1, 187,
+       574, 763,
+       575, 764
 };
 static int parser_goto_row70[] = {
        5,
-       -1, 202,
-       604, 793,
-       605, 794,
-       606, 795,
-       607, 796
+       -1, 188,
+       576, 765,
+       577, 766,
+       578, 767,
+       579, 768
 };
 static int parser_goto_row71[] = {
        15,
-       -1, 203,
-       133, 309,
-       134, 310,
-       135, 311,
-       188, 374,
-       189, 375,
-       190, 376,
-       300, 532,
-       371, 582,
-       429, 374,
-       430, 375,
-       438, 376,
-       1371, 309,
-       1372, 310,
-       1373, 311
+       -1, 189,
+       126, 288,
+       127, 289,
+       128, 290,
+       174, 346,
+       175, 347,
+       176, 348,
+       279, 504,
+       343, 554,
+       401, 346,
+       402, 347,
+       410, 348,
+       1329, 288,
+       1330, 289,
+       1331, 290
 };
 static int parser_goto_row72[] = {
        1,
-       -1, 204
+       -1, 190
 };
 static int parser_goto_row73[] = {
        56,
-       -1, 205,
-       13, 80,
-       27, 80,
-       33, 80,
-       37, 80,
-       104, 80,
-       172, 80,
-       187, 372,
-       224, 460,
-       260, 80,
-       410, 80,
-       496, 80,
-       569, 80,
-       612, 80,
-       615, 80,
-       762, 80,
-       766, 930,
-       767, 80,
-       822, 80,
-       831, 460,
-       912, 930,
-       914, 80,
-       916, 930,
-       933, 80,
-       1003, 80,
-       1060, 80,
-       1082, 80,
-       1086, 80,
-       1113, 460,
-       1186, 80,
-       1238, 930,
-       1246, 80,
-       1416, 930,
-       1418, 80,
-       1429, 80,
-       1436, 460,
-       1518, 460,
-       1537, 930,
-       1538, 930,
-       1543, 930,
-       1558, 460,
-       1691, 80,
-       1695, 80,
-       1728, 930,
-       1757, 80,
-       1765, 80,
-       1766, 80,
-       1769, 80,
-       1774, 80,
-       1777, 80,
-       1812, 460,
-       1818, 80,
-       1825, 80,
-       1830, 80,
-       1835, 80,
-       1853, 930
+       -1, 191,
+       13, 73,
+       27, 73,
+       33, 73,
+       37, 73,
+       97, 73,
+       158, 73,
+       173, 344,
+       210, 432,
+       239, 73,
+       382, 73,
+       468, 73,
+       541, 73,
+       584, 73,
+       587, 73,
+       734, 73,
+       738, 902,
+       739, 73,
+       794, 73,
+       803, 432,
+       884, 902,
+       886, 73,
+       888, 902,
+       905, 73,
+       975, 73,
+       1032, 73,
+       1054, 73,
+       1058, 73,
+       1085, 432,
+       1151, 73,
+       1203, 902,
+       1211, 73,
+       1374, 902,
+       1376, 73,
+       1387, 73,
+       1394, 432,
+       1476, 432,
+       1495, 902,
+       1496, 902,
+       1501, 902,
+       1516, 432,
+       1649, 73,
+       1653, 73,
+       1686, 902,
+       1715, 73,
+       1723, 73,
+       1724, 73,
+       1727, 73,
+       1732, 73,
+       1735, 73,
+       1770, 432,
+       1776, 73,
+       1783, 73,
+       1788, 73,
+       1793, 73,
+       1811, 902
 };
 static int parser_goto_row74[] = {
        2,
-       -1, 539,
-       1050, 1226
+       -1, 511,
+       1022, 1191
 };
 static int parser_goto_row75[] = {
        1,
-       -1, 81
+       -1, 74
 };
 static int parser_goto_row76[] = {
        31,
-       -1, 82,
-       988, 1151,
-       1135, 1151,
-       1136, 1151,
-       1137, 1151,
-       1138, 1151,
-       1283, 1151,
-       1285, 1151,
-       1460, 1151,
-       1462, 1151,
-       1463, 1151,
-       1465, 1151,
-       1466, 1151,
-       1467, 1151,
-       1468, 1151,
-       1469, 1151,
-       1470, 1151,
-       1471, 1151,
-       1472, 1151,
-       1473, 1151,
-       1474, 1151,
-       1475, 1151,
-       1476, 1151,
-       1477, 1151,
-       1478, 1151,
-       1479, 1151,
-       1480, 1151,
-       1481, 1151,
-       1482, 1151,
-       1573, 1151,
-       1919, 1151
+       -1, 75,
+       960, 1116,
+       1107, 1116,
+       1108, 1116,
+       1109, 1116,
+       1110, 1116,
+       1248, 1116,
+       1250, 1116,
+       1418, 1116,
+       1420, 1116,
+       1421, 1116,
+       1423, 1116,
+       1424, 1116,
+       1425, 1116,
+       1426, 1116,
+       1427, 1116,
+       1428, 1116,
+       1429, 1116,
+       1430, 1116,
+       1431, 1116,
+       1432, 1116,
+       1433, 1116,
+       1434, 1116,
+       1435, 1116,
+       1436, 1116,
+       1437, 1116,
+       1438, 1116,
+       1439, 1116,
+       1440, 1116,
+       1531, 1116,
+       1877, 1116
 };
 static int parser_goto_row77[] = {
        1,
-       -1, 461
+       -1, 433
 };
 static int parser_goto_row78[] = {
        2,
-       -1, 640,
-       642, 833
+       -1, 612,
+       614, 805
 };
 static int parser_goto_row79[] = {
        1,
-       -1, 473
+       -1, 445
 };
 static int parser_goto_row80[] = {
        2,
-       -1, 657,
-       658, 843
+       -1, 629,
+       630, 815
 };
 static int parser_goto_row81[] = {
        4,
-       -1, 474,
-       842, 991,
-       1279, 1445,
-       1666, 1736
+       -1, 446,
+       814, 963,
+       1244, 1403,
+       1624, 1694
 };
 static int parser_goto_row82[] = {
        93,
-       -1, 83,
-       31, 148,
-       54, 148,
-       131, 148,
-       272, 148,
-       274, 148,
-       275, 148,
-       276, 148,
-       277, 148,
-       298, 148,
-       521, 148,
-       522, 148,
-       543, 148,
-       545, 148,
-       546, 148,
-       548, 148,
-       549, 148,
-       550, 148,
-       551, 148,
-       552, 148,
-       553, 148,
-       554, 148,
-       555, 148,
-       556, 148,
-       557, 148,
-       558, 148,
-       559, 148,
-       560, 148,
-       561, 148,
-       562, 148,
-       563, 148,
-       564, 148,
-       565, 148,
-       692, 148,
-       694, 148,
-       732, 148,
-       875, 148,
-       876, 148,
-       877, 148,
-       878, 148,
-       911, 148,
-       925, 148,
-       988, 1152,
-       1040, 148,
-       1041, 148,
-       1079, 148,
-       1080, 148,
-       1081, 148,
-       1087, 148,
-       1088, 148,
-       1109, 148,
-       1135, 1152,
-       1136, 1152,
-       1137, 1152,
-       1138, 1152,
-       1196, 148,
-       1252, 148,
-       1253, 148,
-       1283, 1152,
-       1285, 1152,
-       1422, 148,
-       1423, 148,
-       1460, 1152,
-       1462, 1152,
-       1463, 1152,
-       1465, 1152,
-       1466, 1152,
-       1467, 1152,
-       1468, 1152,
-       1469, 1152,
-       1470, 1152,
-       1471, 1152,
-       1472, 1152,
-       1473, 1152,
-       1474, 1152,
-       1475, 1152,
-       1476, 1152,
-       1477, 1152,
-       1478, 1152,
-       1479, 1152,
-       1480, 1152,
-       1481, 1152,
-       1482, 1152,
-       1547, 148,
-       1548, 148,
-       1549, 148,
-       1550, 148,
-       1573, 1152,
-       1646, 148,
-       1659, 148,
-       1660, 148,
-       1681, 148,
-       1919, 1152
+       -1, 76,
+       31, 134,
+       54, 134,
+       124, 134,
+       251, 134,
+       253, 134,
+       254, 134,
+       255, 134,
+       256, 134,
+       277, 134,
+       493, 134,
+       494, 134,
+       515, 134,
+       517, 134,
+       518, 134,
+       520, 134,
+       521, 134,
+       522, 134,
+       523, 134,
+       524, 134,
+       525, 134,
+       526, 134,
+       527, 134,
+       528, 134,
+       529, 134,
+       530, 134,
+       531, 134,
+       532, 134,
+       533, 134,
+       534, 134,
+       535, 134,
+       536, 134,
+       537, 134,
+       664, 134,
+       666, 134,
+       704, 134,
+       847, 134,
+       848, 134,
+       849, 134,
+       850, 134,
+       883, 134,
+       897, 134,
+       960, 1117,
+       1012, 134,
+       1013, 134,
+       1051, 134,
+       1052, 134,
+       1053, 134,
+       1059, 134,
+       1060, 134,
+       1081, 134,
+       1107, 1117,
+       1108, 1117,
+       1109, 1117,
+       1110, 1117,
+       1161, 134,
+       1217, 134,
+       1218, 134,
+       1248, 1117,
+       1250, 1117,
+       1380, 134,
+       1381, 134,
+       1418, 1117,
+       1420, 1117,
+       1421, 1117,
+       1423, 1117,
+       1424, 1117,
+       1425, 1117,
+       1426, 1117,
+       1427, 1117,
+       1428, 1117,
+       1429, 1117,
+       1430, 1117,
+       1431, 1117,
+       1432, 1117,
+       1433, 1117,
+       1434, 1117,
+       1435, 1117,
+       1436, 1117,
+       1437, 1117,
+       1438, 1117,
+       1439, 1117,
+       1440, 1117,
+       1505, 134,
+       1506, 134,
+       1507, 134,
+       1508, 134,
+       1531, 1117,
+       1604, 134,
+       1617, 134,
+       1618, 134,
+       1639, 134,
+       1877, 1117
 };
 static int parser_goto_row83[] = {
        1,
-       -1, 84
+       -1, 77
 };
 static int parser_goto_row84[] = {
        1,
-       -1, 85
+       -1, 78
 };
 static int parser_goto_row85[] = {
        2,
-       -1, 267,
-       270, 503
+       -1, 246,
+       249, 475
 };
 static int parser_goto_row86[] = {
        1,
-       -1, 268
+       -1, 247
 };
 static int parser_goto_row87[] = {
        2,
-       -1, 269,
-       270, 504
+       -1, 248,
+       249, 476
 };
 static int parser_goto_row88[] = {
        16,
-       -1, 217,
-       174, 359,
-       224, 462,
-       417, 625,
-       831, 462,
-       1113, 462,
-       1178, 1342,
-       1196, 1383,
-       1360, 1503,
-       1436, 462,
-       1518, 462,
-       1558, 462,
-       1681, 1749,
-       1702, 1783,
-       1812, 462,
-       1901, 1922
+       -1, 203,
+       160, 331,
+       210, 434,
+       389, 597,
+       803, 434,
+       1085, 434,
+       1143, 1300,
+       1161, 1341,
+       1318, 1461,
+       1394, 434,
+       1476, 434,
+       1516, 434,
+       1639, 1707,
+       1660, 1741,
+       1770, 434,
+       1859, 1880
 };
 static int parser_goto_row89[] = {
-       63,
-       -1, 629,
-       45, 218,
-       46, 219,
-       47, 220,
-       48, 221,
-       55, 243,
-       56, 244,
-       57, 245,
-       58, 246,
-       59, 247,
-       60, 248,
-       61, 249,
-       62, 250,
-       63, 251,
-       64, 252,
-       66, 253,
-       127, 301,
-       128, 302,
-       129, 303,
-       130, 304,
-       137, 313,
-       138, 314,
-       139, 315,
-       140, 316,
-       141, 317,
-       142, 318,
-       143, 319,
-       144, 320,
-       145, 321,
-       146, 322,
-       147, 323,
-       269, 502,
-       504, 701,
-       627, 824,
-       819, 970,
-       830, 982,
-       832, 984,
-       841, 989,
-       1109, 1267,
-       1131, 1286,
-       1132, 1287,
-       1133, 1288,
-       1134, 1289,
-       1140, 1297,
-       1141, 1298,
-       1142, 1299,
-       1143, 1300,
-       1144, 1301,
-       1145, 1302,
-       1146, 1303,
-       1147, 1304,
-       1148, 1305,
-       1149, 1306,
-       1150, 1307,
-       1178, 1343,
-       1275, 1442,
-       1441, 1560,
-       1458, 1570,
-       1459, 1571,
-       1557, 1664,
-       1577, 1673,
-       1672, 1742,
-       1735, 1803
+       42,
+       -1, 601,
+       45, 204,
+       46, 205,
+       47, 206,
+       48, 207,
+       55, 229,
+       56, 230,
+       57, 231,
+       59, 232,
+       120, 280,
+       121, 281,
+       122, 282,
+       123, 283,
+       130, 292,
+       131, 293,
+       132, 294,
+       133, 295,
+       248, 474,
+       476, 673,
+       599, 796,
+       791, 942,
+       802, 954,
+       804, 956,
+       813, 961,
+       1081, 1232,
+       1103, 1251,
+       1104, 1252,
+       1105, 1253,
+       1106, 1254,
+       1112, 1262,
+       1113, 1263,
+       1114, 1264,
+       1115, 1265,
+       1143, 1301,
+       1240, 1400,
+       1399, 1518,
+       1416, 1528,
+       1417, 1529,
+       1515, 1622,
+       1535, 1631,
+       1630, 1700,
+       1693, 1761
 };
 static int parser_goto_row90[] = {
        1,
-       -1, 416
+       -1, 388
 };
 static int parser_goto_row91[] = {
        6,
-       -1, 814,
-       959, 1103,
-       993, 1174,
-       1002, 1183,
-       1690, 1762,
-       1768, 1826
+       -1, 786,
+       931, 1075,
+       965, 1139,
+       974, 1148,
+       1648, 1720,
+       1726, 1784
 };
 static int parser_goto_row92[] = {
        2,
-       -1, 815,
-       1111, 1270
+       -1, 787,
+       1083, 1235
 };
 static int parser_goto_row93[] = {
        1,
-       -1, 1268
+       -1, 1233
 };
 static int parser_goto_row94[] = {
        2,
-       -1, 967,
-       968, 1112
+       -1, 939,
+       940, 1084
 };
 static int parser_goto_row95[] = {
        5,
-       -1, 1338,
-       1340, 1488,
-       1355, 1488,
-       1821, 1488,
-       1872, 1488
+       -1, 1296,
+       1298, 1446,
+       1313, 1446,
+       1779, 1446,
+       1830, 1446
 };
 static int parser_goto_row96[] = {
        1,
-       -1, 1015
+       -1, 987
 };
 static int parser_goto_row97[] = {
        4,
-       -1, 1271,
-       1436, 1556,
-       1518, 1627,
-       1812, 1861
+       -1, 1236,
+       1394, 1514,
+       1476, 1585,
+       1770, 1819
 };
 static int parser_goto_row98[] = {
        3,
-       -1, 1439,
-       1440, 1559,
-       1526, 1559
+       -1, 1397,
+       1398, 1517,
+       1484, 1517
 };
 static int parser_goto_row99[] = {
        4,
-       -1, 1272,
-       224, 463,
-       831, 983,
-       1558, 1665
+       -1, 1237,
+       210, 435,
+       803, 955,
+       1516, 1623
 };
 static int parser_goto_row100[] = {
        4,
-       -1, 819,
-       960, 1104,
-       964, 1109,
-       1604, 1681
+       -1, 791,
+       932, 1076,
+       936, 1081,
+       1562, 1639
 };
 static int parser_goto_row101[] = {
        86,
-       -1, 377,
-       31, 149,
-       54, 241,
-       122, 296,
-       136, 312,
-       182, 149,
-       272, 506,
-       275, 514,
-       277, 519,
-       324, 541,
-       326, 542,
-       351, 567,
-       402, 506,
-       404, 609,
-       405, 610,
-       449, 241,
-       522, 717,
-       531, 724,
-       568, 760,
-       581, 772,
-       611, 802,
-       647, 514,
-       649, 519,
-       692, 867,
-       694, 872,
-       754, 900,
-       756, 902,
-       797, 867,
-       798, 951,
-       836, 717,
-       876, 1033,
-       878, 1038,
-       904, 1054,
-       905, 1055,
-       911, 149,
-       925, 241,
-       953, 1095,
-       954, 1096,
-       961, 1105,
-       978, 872,
-       1041, 1219,
-       1046, 1222,
-       1056, 1229,
-       1079, 506,
-       1081, 514,
-       1088, 519,
-       1097, 1256,
-       1106, 1263,
-       1107, 1264,
-       1121, 1033,
-       1122, 1038,
-       1126, 1281,
-       1139, 1296,
-       1223, 1406,
-       1224, 1407,
-       1253, 717,
-       1265, 1435,
-       1278, 1219,
-       1308, 1456,
-       1310, 1457,
-       1335, 1484,
-       1374, 1521,
-       1408, 1534,
-       1422, 867,
-       1423, 872,
-       1451, 1567,
-       1485, 1603,
-       1523, 1636,
-       1527, 1642,
-       1548, 1033,
-       1550, 1038,
-       1597, 1674,
-       1599, 1676,
-       1643, 1724,
-       1660, 1219,
-       1678, 1745,
-       1679, 1746,
-       1711, 1788,
-       1738, 1805,
-       1747, 1811,
-       1790, 1846,
-       1791, 1849,
-       1806, 1855,
-       1807, 1856,
-       1850, 1894,
-       1857, 1898
+       -1, 349,
+       31, 135,
+       54, 227,
+       115, 275,
+       129, 291,
+       168, 135,
+       251, 478,
+       254, 486,
+       256, 491,
+       296, 513,
+       298, 514,
+       323, 539,
+       374, 478,
+       376, 581,
+       377, 582,
+       421, 227,
+       494, 689,
+       503, 696,
+       540, 732,
+       553, 744,
+       583, 774,
+       619, 486,
+       621, 491,
+       664, 839,
+       666, 844,
+       726, 872,
+       728, 874,
+       769, 839,
+       770, 923,
+       808, 689,
+       848, 1005,
+       850, 1010,
+       876, 1026,
+       877, 1027,
+       883, 135,
+       897, 227,
+       925, 1067,
+       926, 1068,
+       933, 1077,
+       950, 844,
+       1013, 1184,
+       1018, 1187,
+       1028, 1194,
+       1051, 478,
+       1053, 486,
+       1060, 491,
+       1069, 1221,
+       1078, 1228,
+       1079, 1229,
+       1093, 1005,
+       1094, 1010,
+       1098, 1246,
+       1111, 1261,
+       1188, 1364,
+       1189, 1365,
+       1218, 689,
+       1230, 1393,
+       1243, 1184,
+       1266, 1414,
+       1268, 1415,
+       1293, 1442,
+       1332, 1479,
+       1366, 1492,
+       1380, 839,
+       1381, 844,
+       1409, 1525,
+       1443, 1561,
+       1481, 1594,
+       1485, 1600,
+       1506, 1005,
+       1508, 1010,
+       1555, 1632,
+       1557, 1634,
+       1601, 1682,
+       1618, 1184,
+       1636, 1703,
+       1637, 1704,
+       1669, 1746,
+       1696, 1763,
+       1705, 1769,
+       1748, 1804,
+       1749, 1807,
+       1764, 1813,
+       1765, 1814,
+       1808, 1852,
+       1815, 1856
 };
 static int parser_goto_row102[] = {
        34,
-       -1, 150,
-       54, 242,
-       272, 507,
-       274, 511,
-       275, 515,
-       276, 516,
-       277, 520,
-       521, 714,
-       522, 718,
-       692, 868,
-       694, 873,
-       875, 1030,
-       876, 1034,
-       877, 1035,
-       878, 1039,
-       911, 1058,
-       925, 1077,
-       1040, 1216,
-       1041, 1220,
-       1079, 1242,
-       1080, 1243,
-       1081, 1244,
-       1087, 1250,
-       1088, 1251,
-       1252, 1427,
-       1253, 1428,
-       1422, 1545,
-       1423, 1546,
-       1547, 1655,
-       1548, 1656,
-       1549, 1657,
-       1550, 1658,
-       1659, 1732,
-       1660, 1733
+       -1, 136,
+       54, 228,
+       251, 479,
+       253, 483,
+       254, 487,
+       255, 488,
+       256, 492,
+       493, 686,
+       494, 690,
+       664, 840,
+       666, 845,
+       847, 1002,
+       848, 1006,
+       849, 1007,
+       850, 1011,
+       883, 1030,
+       897, 1049,
+       1012, 1181,
+       1013, 1185,
+       1051, 1207,
+       1052, 1208,
+       1053, 1209,
+       1059, 1215,
+       1060, 1216,
+       1217, 1385,
+       1218, 1386,
+       1380, 1503,
+       1381, 1504,
+       1505, 1613,
+       1506, 1614,
+       1507, 1615,
+       1508, 1616,
+       1617, 1690,
+       1618, 1691
 };
 static int parser_goto_row103[] = {
        6,
-       -1, 264,
-       166, 350,
-       205, 401,
-       307, 350,
-       372, 401,
-       1389, 1525
+       -1, 243,
+       152, 322,
+       191, 373,
+       286, 322,
+       344, 373,
+       1347, 1483
 };
 static int parser_goto_row104[] = {
        4,
-       -1, 540,
-       497, 691,
-       528, 721,
-       705, 882
+       -1, 512,
+       469, 663,
+       500, 693,
+       677, 854
 };
 static int parser_goto_row105[] = {
        2,
-       -1, 897,
-       898, 1051
+       -1, 869,
+       870, 1023
 };
 static int parser_goto_row106[] = {
        3,
-       -1, 366,
-       653, 839,
-       1069, 1236
+       -1, 338,
+       625, 811,
+       1041, 1201
 };
 static int parser_goto_row107[] = {
        2,
-       -1, 367,
-       576, 768
+       -1, 339,
+       548, 740
 };
 static int parser_goto_row108[] = {
        2,
-       -1, 846,
-       662, 849
+       -1, 818,
+       634, 821
 };
 static int parser_goto_row109[] = {
        157,
-       -1, 206,
-       13, 86,
-       27, 86,
-       31, 151,
-       33, 86,
-       37, 86,
-       54, 151,
-       104, 86,
-       131, 306,
-       172, 86,
-       187, 373,
-       224, 464,
-       260, 86,
-       272, 151,
-       274, 151,
-       275, 151,
-       276, 151,
-       277, 151,
-       298, 151,
-       410, 86,
-       496, 86,
-       498, 695,
-       521, 151,
-       522, 151,
-       543, 151,
-       545, 151,
-       546, 151,
-       548, 151,
-       549, 151,
-       550, 151,
-       551, 151,
-       552, 151,
-       553, 151,
-       554, 151,
-       555, 151,
-       556, 151,
-       557, 151,
-       558, 151,
-       559, 151,
-       560, 151,
-       561, 151,
-       562, 151,
-       563, 151,
-       564, 151,
-       565, 151,
-       566, 757,
-       569, 86,
-       608, 799,
-       612, 86,
-       615, 86,
-       692, 151,
-       694, 151,
-       726, 894,
-       732, 151,
-       762, 86,
-       766, 931,
-       767, 86,
-       773, 949,
-       822, 86,
-       829, 695,
-       831, 464,
-       875, 151,
-       876, 151,
-       877, 151,
-       878, 151,
-       911, 151,
-       912, 931,
-       914, 86,
-       916, 931,
-       925, 151,
-       933, 86,
-       988, 1153,
-       1003, 86,
-       1040, 151,
-       1041, 151,
-       1060, 86,
-       1079, 151,
-       1080, 151,
-       1081, 151,
-       1082, 86,
-       1086, 86,
-       1087, 151,
-       1088, 151,
-       1113, 464,
-       1135, 1291,
-       1136, 1153,
-       1137, 1153,
-       1138, 1153,
-       1186, 86,
-       1196, 1384,
-       1238, 931,
-       1241, 695,
-       1246, 86,
-       1252, 151,
-       1253, 151,
-       1283, 1153,
-       1285, 1153,
-       1416, 931,
-       1418, 86,
-       1422, 151,
-       1423, 151,
-       1429, 86,
-       1436, 464,
-       1460, 1153,
-       1462, 1153,
-       1463, 1153,
-       1465, 1153,
-       1466, 1153,
-       1467, 1153,
-       1468, 1153,
-       1469, 1153,
-       1470, 1153,
-       1471, 1153,
-       1472, 1153,
-       1473, 1153,
-       1474, 1153,
-       1475, 1153,
-       1476, 1153,
-       1477, 1153,
-       1478, 1153,
-       1479, 1153,
-       1480, 1153,
-       1481, 1153,
-       1482, 1153,
-       1483, 1600,
-       1518, 464,
-       1537, 931,
-       1538, 931,
-       1543, 931,
-       1547, 151,
-       1548, 151,
-       1549, 151,
-       1550, 151,
-       1558, 464,
-       1569, 1670,
-       1573, 1153,
-       1637, 1712,
-       1646, 151,
-       1659, 151,
-       1660, 151,
-       1681, 1384,
-       1691, 86,
-       1695, 86,
-       1728, 931,
-       1757, 86,
-       1765, 86,
-       1766, 86,
-       1769, 86,
-       1774, 86,
-       1777, 86,
-       1812, 464,
-       1818, 86,
-       1825, 86,
-       1830, 86,
-       1835, 86,
-       1853, 931,
-       1919, 1153
+       -1, 192,
+       13, 79,
+       27, 79,
+       31, 137,
+       33, 79,
+       37, 79,
+       54, 137,
+       97, 79,
+       124, 285,
+       158, 79,
+       173, 345,
+       210, 436,
+       239, 79,
+       251, 137,
+       253, 137,
+       254, 137,
+       255, 137,
+       256, 137,
+       277, 137,
+       382, 79,
+       468, 79,
+       470, 667,
+       493, 137,
+       494, 137,
+       515, 137,
+       517, 137,
+       518, 137,
+       520, 137,
+       521, 137,
+       522, 137,
+       523, 137,
+       524, 137,
+       525, 137,
+       526, 137,
+       527, 137,
+       528, 137,
+       529, 137,
+       530, 137,
+       531, 137,
+       532, 137,
+       533, 137,
+       534, 137,
+       535, 137,
+       536, 137,
+       537, 137,
+       538, 729,
+       541, 79,
+       580, 771,
+       584, 79,
+       587, 79,
+       664, 137,
+       666, 137,
+       698, 866,
+       704, 137,
+       734, 79,
+       738, 903,
+       739, 79,
+       745, 921,
+       794, 79,
+       801, 667,
+       803, 436,
+       847, 137,
+       848, 137,
+       849, 137,
+       850, 137,
+       883, 137,
+       884, 903,
+       886, 79,
+       888, 903,
+       897, 137,
+       905, 79,
+       960, 1118,
+       975, 79,
+       1012, 137,
+       1013, 137,
+       1032, 79,
+       1051, 137,
+       1052, 137,
+       1053, 137,
+       1054, 79,
+       1058, 79,
+       1059, 137,
+       1060, 137,
+       1085, 436,
+       1107, 1256,
+       1108, 1118,
+       1109, 1118,
+       1110, 1118,
+       1151, 79,
+       1161, 1342,
+       1203, 903,
+       1206, 667,
+       1211, 79,
+       1217, 137,
+       1218, 137,
+       1248, 1118,
+       1250, 1118,
+       1374, 903,
+       1376, 79,
+       1380, 137,
+       1381, 137,
+       1387, 79,
+       1394, 436,
+       1418, 1118,
+       1420, 1118,
+       1421, 1118,
+       1423, 1118,
+       1424, 1118,
+       1425, 1118,
+       1426, 1118,
+       1427, 1118,
+       1428, 1118,
+       1429, 1118,
+       1430, 1118,
+       1431, 1118,
+       1432, 1118,
+       1433, 1118,
+       1434, 1118,
+       1435, 1118,
+       1436, 1118,
+       1437, 1118,
+       1438, 1118,
+       1439, 1118,
+       1440, 1118,
+       1441, 1558,
+       1476, 436,
+       1495, 903,
+       1496, 903,
+       1501, 903,
+       1505, 137,
+       1506, 137,
+       1507, 137,
+       1508, 137,
+       1516, 436,
+       1527, 1628,
+       1531, 1118,
+       1595, 1670,
+       1604, 137,
+       1617, 137,
+       1618, 137,
+       1639, 1342,
+       1649, 79,
+       1653, 79,
+       1686, 903,
+       1715, 79,
+       1723, 79,
+       1724, 79,
+       1727, 79,
+       1732, 79,
+       1735, 79,
+       1770, 436,
+       1776, 79,
+       1783, 79,
+       1788, 79,
+       1793, 79,
+       1811, 903,
+       1877, 1118
 };
 static int parser_goto_row110[] = {
        1,
-       -1, 863
+       -1, 835
 };
 static int parser_goto_row111[] = {
        6,
-       -1, 1354,
-       491, 686,
-       1499, 1611,
-       1508, 1618,
-       1510, 1621,
-       1512, 1624
+       -1, 1312,
+       463, 658,
+       1457, 1569,
+       1466, 1576,
+       1468, 1579,
+       1470, 1582
 };
 static int parser_goto_row112[] = {
        22,
-       -1, 87,
-       89, 278,
-       168, 278,
-       208, 278,
-       469, 278,
-       688, 278,
-       697, 278,
-       759, 278,
-       801, 278,
-       847, 278,
-       865, 278,
-       942, 278,
-       963, 278,
-       981, 278,
-       1048, 278,
-       1170, 278,
-       1173, 278,
-       1393, 278,
-       1425, 278,
-       1602, 278,
-       1715, 278,
-       1740, 278
+       -1, 80,
+       82, 257,
+       154, 257,
+       194, 257,
+       441, 257,
+       660, 257,
+       669, 257,
+       731, 257,
+       773, 257,
+       819, 257,
+       837, 257,
+       914, 257,
+       935, 257,
+       953, 257,
+       1020, 257,
+       1135, 257,
+       1138, 257,
+       1351, 257,
+       1383, 257,
+       1560, 257,
+       1673, 257,
+       1698, 257
 };
 static int parser_goto_row113[] = {
        186,
-       -1, 207,
-       13, 88,
-       27, 88,
-       31, 152,
-       33, 88,
-       37, 88,
-       54, 152,
-       89, 279,
-       104, 88,
-       131, 152,
-       168, 352,
-       172, 88,
-       208, 406,
-       224, 465,
-       260, 88,
-       272, 152,
-       274, 152,
-       275, 152,
-       276, 152,
-       277, 152,
-       298, 152,
-       410, 88,
-       469, 650,
-       491, 687,
-       496, 88,
-       498, 696,
-       521, 152,
-       522, 152,
-       543, 152,
-       545, 152,
-       546, 152,
-       548, 152,
-       549, 152,
-       550, 152,
-       551, 152,
-       552, 152,
-       553, 152,
-       554, 152,
-       555, 152,
-       556, 152,
-       557, 152,
-       558, 152,
-       559, 152,
-       560, 152,
-       561, 152,
-       562, 152,
-       563, 152,
-       564, 152,
-       565, 152,
-       566, 758,
-       569, 88,
-       608, 800,
-       612, 88,
-       615, 88,
-       688, 860,
-       690, 864,
-       692, 152,
-       694, 152,
-       697, 879,
-       726, 758,
-       732, 152,
-       759, 906,
-       762, 88,
-       766, 932,
-       767, 88,
-       773, 800,
-       801, 955,
-       812, 962,
-       822, 88,
-       829, 979,
-       831, 465,
-       865, 1021,
-       875, 152,
-       876, 152,
-       877, 152,
-       878, 152,
-       893, 1047,
-       911, 152,
-       912, 932,
-       914, 88,
-       916, 932,
-       925, 152,
-       933, 88,
-       942, 1089,
-       963, 1108,
-       981, 1123,
-       988, 1154,
-       1003, 88,
-       1040, 152,
-       1041, 152,
-       1048, 1225,
-       1060, 88,
-       1079, 152,
-       1080, 152,
-       1081, 152,
-       1082, 88,
-       1086, 88,
-       1087, 152,
-       1088, 152,
-       1113, 465,
-       1135, 1154,
-       1136, 1154,
-       1137, 1154,
-       1138, 1154,
-       1170, 1336,
-       1182, 687,
-       1186, 88,
-       1196, 1385,
-       1238, 932,
-       1241, 1424,
-       1246, 88,
-       1252, 152,
-       1253, 152,
-       1283, 1154,
-       1285, 1154,
-       1393, 1528,
-       1416, 932,
-       1418, 88,
-       1422, 152,
-       1423, 152,
-       1425, 1551,
-       1429, 88,
-       1436, 465,
-       1460, 1154,
-       1462, 1154,
-       1463, 1154,
-       1465, 1154,
-       1466, 1154,
-       1467, 1154,
-       1468, 1154,
-       1469, 1154,
-       1470, 1154,
-       1471, 1154,
-       1472, 1154,
-       1473, 1154,
-       1474, 1154,
-       1475, 1154,
-       1476, 1154,
-       1477, 1154,
-       1478, 1154,
-       1479, 1154,
-       1480, 1154,
-       1481, 1154,
-       1482, 1154,
-       1483, 1601,
-       1499, 687,
-       1508, 687,
-       1510, 687,
-       1512, 687,
-       1518, 465,
-       1537, 932,
-       1538, 932,
-       1543, 932,
-       1547, 152,
-       1548, 152,
-       1549, 152,
-       1550, 152,
-       1558, 465,
-       1569, 1601,
-       1573, 1154,
-       1602, 1680,
-       1608, 687,
-       1637, 1713,
-       1646, 152,
-       1659, 152,
-       1660, 152,
-       1669, 1739,
-       1681, 1385,
-       1691, 88,
-       1695, 88,
-       1715, 1792,
-       1728, 932,
-       1740, 1808,
-       1757, 88,
-       1765, 88,
-       1766, 88,
-       1769, 88,
-       1774, 88,
-       1777, 88,
-       1812, 465,
-       1818, 88,
-       1825, 88,
-       1830, 88,
-       1835, 88,
-       1853, 932,
-       1919, 1154
+       -1, 193,
+       13, 81,
+       27, 81,
+       31, 138,
+       33, 81,
+       37, 81,
+       54, 138,
+       82, 258,
+       97, 81,
+       124, 138,
+       154, 324,
+       158, 81,
+       194, 378,
+       210, 437,
+       239, 81,
+       251, 138,
+       253, 138,
+       254, 138,
+       255, 138,
+       256, 138,
+       277, 138,
+       382, 81,
+       441, 622,
+       463, 659,
+       468, 81,
+       470, 668,
+       493, 138,
+       494, 138,
+       515, 138,
+       517, 138,
+       518, 138,
+       520, 138,
+       521, 138,
+       522, 138,
+       523, 138,
+       524, 138,
+       525, 138,
+       526, 138,
+       527, 138,
+       528, 138,
+       529, 138,
+       530, 138,
+       531, 138,
+       532, 138,
+       533, 138,
+       534, 138,
+       535, 138,
+       536, 138,
+       537, 138,
+       538, 730,
+       541, 81,
+       580, 772,
+       584, 81,
+       587, 81,
+       660, 832,
+       662, 836,
+       664, 138,
+       666, 138,
+       669, 851,
+       698, 730,
+       704, 138,
+       731, 878,
+       734, 81,
+       738, 904,
+       739, 81,
+       745, 772,
+       773, 927,
+       784, 934,
+       794, 81,
+       801, 951,
+       803, 437,
+       837, 993,
+       847, 138,
+       848, 138,
+       849, 138,
+       850, 138,
+       865, 1019,
+       883, 138,
+       884, 904,
+       886, 81,
+       888, 904,
+       897, 138,
+       905, 81,
+       914, 1061,
+       935, 1080,
+       953, 1095,
+       960, 1119,
+       975, 81,
+       1012, 138,
+       1013, 138,
+       1020, 1190,
+       1032, 81,
+       1051, 138,
+       1052, 138,
+       1053, 138,
+       1054, 81,
+       1058, 81,
+       1059, 138,
+       1060, 138,
+       1085, 437,
+       1107, 1119,
+       1108, 1119,
+       1109, 1119,
+       1110, 1119,
+       1135, 1294,
+       1147, 659,
+       1151, 81,
+       1161, 1343,
+       1203, 904,
+       1206, 1382,
+       1211, 81,
+       1217, 138,
+       1218, 138,
+       1248, 1119,
+       1250, 1119,
+       1351, 1486,
+       1374, 904,
+       1376, 81,
+       1380, 138,
+       1381, 138,
+       1383, 1509,
+       1387, 81,
+       1394, 437,
+       1418, 1119,
+       1420, 1119,
+       1421, 1119,
+       1423, 1119,
+       1424, 1119,
+       1425, 1119,
+       1426, 1119,
+       1427, 1119,
+       1428, 1119,
+       1429, 1119,
+       1430, 1119,
+       1431, 1119,
+       1432, 1119,
+       1433, 1119,
+       1434, 1119,
+       1435, 1119,
+       1436, 1119,
+       1437, 1119,
+       1438, 1119,
+       1439, 1119,
+       1440, 1119,
+       1441, 1559,
+       1457, 659,
+       1466, 659,
+       1468, 659,
+       1470, 659,
+       1476, 437,
+       1495, 904,
+       1496, 904,
+       1501, 904,
+       1505, 138,
+       1506, 138,
+       1507, 138,
+       1508, 138,
+       1516, 437,
+       1527, 1559,
+       1531, 1119,
+       1560, 1638,
+       1566, 659,
+       1595, 1671,
+       1604, 138,
+       1617, 138,
+       1618, 138,
+       1627, 1697,
+       1639, 1343,
+       1649, 81,
+       1653, 81,
+       1673, 1750,
+       1686, 904,
+       1698, 1766,
+       1715, 81,
+       1723, 81,
+       1724, 81,
+       1727, 81,
+       1732, 81,
+       1735, 81,
+       1770, 437,
+       1776, 81,
+       1783, 81,
+       1788, 81,
+       1793, 81,
+       1811, 904,
+       1877, 1119
 };
 static int parser_goto_row114[] = {
        12,
-       -1, 1357,
-       1358, 1501,
-       1764, 1822,
-       1773, 1831,
-       1817, 1866,
-       1823, 1869,
-       1824, 1870,
-       1832, 1876,
-       1834, 1877,
-       1867, 1905,
-       1871, 1906,
-       1878, 1909
+       -1, 1315,
+       1316, 1459,
+       1722, 1780,
+       1731, 1789,
+       1775, 1824,
+       1781, 1827,
+       1782, 1828,
+       1790, 1834,
+       1792, 1835,
+       1825, 1863,
+       1829, 1864,
+       1836, 1867
 };
 static int parser_goto_row115[] = {
        14,
-       -1, 97,
-       848, 996,
-       993, 1175,
-       994, 1176,
-       997, 1177,
-       1002, 1184,
-       1013, 1191,
-       1681, 1750,
-       1690, 1763,
-       1749, 1813,
-       1751, 1814,
-       1768, 1827,
-       1901, 1923,
-       1922, 1931
+       -1, 90,
+       820, 968,
+       965, 1140,
+       966, 1141,
+       969, 1142,
+       974, 1149,
+       985, 1156,
+       1639, 1708,
+       1648, 1721,
+       1707, 1771,
+       1709, 1772,
+       1726, 1785,
+       1859, 1881,
+       1880, 1889
 };
 static int parser_goto_row116[] = {
        55,
-       -1, 615,
+       -1, 587,
        0, 12,
        3, 23,
        5, 12,
@@ -26460,331 +24047,331 @@ static int parser_goto_row116[] = {
        28, 12,
        29, 12,
        30, 12,
-       33, 172,
-       37, 172,
-       70, 260,
-       100, 12,
-       101, 12,
-       105, 12,
-       110, 287,
-       111, 288,
-       117, 12,
-       118, 12,
-       120, 12,
-       261, 496,
-       283, 12,
-       289, 526,
-       292, 12,
-       355, 569,
-       570, 762,
-       766, 933,
-       767, 172,
-       822, 172,
-       863, 1016,
-       912, 1060,
-       916, 1060,
-       1014, 1016,
-       1018, 1016,
-       1084, 260,
-       1175, 1016,
-       1184, 1016,
-       1238, 1418,
-       1248, 496,
-       1340, 1016,
-       1355, 1016,
-       1416, 1418,
-       1429, 172,
-       1504, 1016,
-       1537, 933,
-       1538, 1060,
-       1543, 1060,
-       1615, 1016,
-       1728, 1418,
-       1763, 1016,
-       1821, 1016,
-       1827, 1016,
-       1853, 1060,
-       1872, 1016
+       33, 158,
+       37, 158,
+       63, 239,
+       93, 12,
+       94, 12,
+       98, 12,
+       103, 266,
+       104, 267,
+       110, 12,
+       111, 12,
+       113, 12,
+       240, 468,
+       262, 12,
+       268, 498,
+       271, 12,
+       327, 541,
+       542, 734,
+       738, 905,
+       739, 158,
+       794, 158,
+       835, 988,
+       884, 1032,
+       888, 1032,
+       986, 988,
+       990, 988,
+       1056, 239,
+       1140, 988,
+       1149, 988,
+       1203, 1376,
+       1213, 468,
+       1298, 988,
+       1313, 988,
+       1374, 1376,
+       1387, 158,
+       1462, 988,
+       1495, 905,
+       1496, 1032,
+       1501, 1032,
+       1573, 988,
+       1686, 1376,
+       1721, 988,
+       1779, 988,
+       1785, 988,
+       1811, 1032,
+       1830, 988
 };
 static int parser_goto_row117[] = {
        18,
-       -1, 104,
+       -1, 97,
        0, 13,
        5, 27,
        18, 27,
        28, 27,
-       863, 1017,
-       1014, 1017,
-       1018, 1199,
-       1175, 1339,
-       1184, 1339,
-       1340, 1339,
-       1355, 1339,
-       1504, 1017,
-       1615, 1017,
-       1763, 1339,
-       1821, 1339,
-       1827, 1339,
-       1872, 1339
+       835, 989,
+       986, 989,
+       990, 1164,
+       1140, 1297,
+       1149, 1297,
+       1298, 1297,
+       1313, 1297,
+       1462, 989,
+       1573, 989,
+       1721, 1297,
+       1779, 1297,
+       1785, 1297,
+       1830, 1297
 };
 static int parser_goto_row118[] = {
        249,
        -1, 14,
-       35, 175,
-       36, 178,
-       38, 181,
-       44, 215,
-       49, 222,
-       51, 224,
-       52, 225,
-       85, 271,
-       90, 280,
-       123, 297,
-       124, 298,
-       125, 299,
-       126, 300,
-       132, 308,
-       183, 368,
-       184, 369,
-       185, 370,
-       186, 371,
-       226, 475,
-       227, 476,
-       254, 481,
-       255, 482,
-       256, 483,
-       257, 484,
-       262, 497,
-       263, 498,
-       268, 501,
-       295, 528,
-       305, 533,
-       327, 543,
-       328, 545,
-       329, 546,
-       330, 547,
-       331, 548,
-       332, 549,
-       333, 550,
-       334, 551,
-       335, 552,
-       336, 553,
-       337, 554,
-       338, 555,
-       339, 556,
-       340, 557,
-       341, 558,
-       342, 559,
-       343, 560,
-       344, 561,
-       345, 562,
-       346, 563,
-       347, 564,
-       348, 565,
-       349, 566,
-       357, 571,
-       360, 574,
-       362, 575,
-       364, 576,
-       366, 577,
-       378, 585,
-       379, 587,
-       380, 588,
-       381, 589,
-       382, 590,
-       383, 591,
-       384, 592,
-       385, 593,
+       35, 161,
+       36, 164,
+       38, 167,
+       44, 201,
+       49, 208,
+       51, 210,
+       52, 211,
+       78, 250,
+       83, 259,
+       116, 276,
+       117, 277,
+       118, 278,
+       119, 279,
+       125, 287,
+       169, 340,
+       170, 341,
+       171, 342,
+       172, 343,
+       212, 447,
+       213, 448,
+       233, 453,
+       234, 454,
+       235, 455,
+       236, 456,
+       241, 469,
+       242, 470,
+       247, 473,
+       274, 500,
+       284, 505,
+       299, 515,
+       300, 517,
+       301, 518,
+       302, 519,
+       303, 520,
+       304, 521,
+       305, 522,
+       306, 523,
+       307, 524,
+       308, 525,
+       309, 526,
+       310, 527,
+       311, 528,
+       312, 529,
+       313, 530,
+       314, 531,
+       315, 532,
+       316, 533,
+       317, 534,
+       318, 535,
+       319, 536,
+       320, 537,
+       321, 538,
+       329, 543,
+       332, 546,
+       334, 547,
+       336, 548,
+       338, 549,
+       350, 557,
+       351, 559,
+       352, 560,
+       353, 561,
+       354, 562,
+       355, 563,
+       356, 564,
+       357, 565,
+       358, 566,
+       359, 567,
+       360, 568,
+       361, 569,
+       362, 570,
+       363, 571,
+       364, 572,
+       365, 573,
+       366, 574,
+       367, 575,
+       368, 576,
+       369, 577,
+       370, 578,
+       371, 579,
+       372, 580,
        386, 594,
-       387, 595,
-       388, 596,
-       389, 597,
        390, 598,
-       391, 599,
-       392, 600,
-       393, 601,
-       394, 602,
-       395, 603,
-       396, 604,
-       397, 605,
-       398, 606,
-       399, 607,
-       400, 608,
-       414, 622,
-       418, 626,
-       428, 225,
-       461, 638,
-       463, 641,
-       470, 652,
-       471, 653,
-       472, 654,
-       485, 661,
-       486, 662,
-       493, 690,
-       505, 702,
-       510, 705,
-       523, 719,
-       529, 722,
-       535, 726,
-       539, 729,
-       544, 732,
-       572, 764,
-       578, 770,
-       579, 771,
-       583, 773,
-       586, 775,
-       617, 808,
-       621, 812,
-       628, 825,
-       637, 829,
-       639, 831,
-       656, 842,
-       686, 856,
-       693, 869,
-       700, 880,
-       723, 893,
-       755, 901,
-       765, 909,
-       768, 945,
-       769, 946,
-       806, 956,
-       809, 959,
-       814, 965,
-       820, 971,
-       823, 975,
-       838, 986,
-       839, 987,
-       840, 988,
-       844, 992,
-       852, 999,
-       853, 1000,
-       855, 1007,
-       892, 1045,
-       896, 1050,
-       913, 1064,
-       915, 1066,
-       917, 1069,
-       923, 1075,
-       948, 1093,
-       958, 1102,
-       966, 1111,
-       969, 1113,
-       972, 1115,
-       976, 1118,
-       990, 1171,
-       1001, 1182,
-       1009, 1189,
-       1018, 1200,
-       1022, 1202,
-       1023, 1203,
-       1052, 1227,
-       1053, 1228,
-       1078, 1241,
-       1092, 1254,
-       1098, 1257,
-       1099, 1258,
-       1103, 1261,
-       1117, 1274,
-       1124, 1279,
-       1125, 1280,
-       1127, 1282,
-       1128, 1283,
-       1129, 1284,
-       1130, 1285,
-       1155, 1311,
-       1180, 1347,
-       1221, 1405,
-       1226, 1409,
-       1233, 1413,
-       1234, 1414,
-       1236, 1415,
-       1239, 1420,
-       1255, 1430,
-       1266, 1436,
-       1271, 1437,
-       1290, 1453,
-       1312, 1460,
-       1313, 1462,
-       1314, 1463,
-       1315, 1464,
-       1316, 1465,
-       1317, 1466,
-       1318, 1467,
-       1319, 1468,
-       1320, 1469,
-       1321, 1470,
-       1322, 1471,
-       1323, 1472,
-       1324, 1473,
-       1325, 1474,
-       1326, 1475,
-       1327, 1476,
-       1328, 1477,
-       1329, 1478,
-       1330, 1479,
-       1331, 1480,
-       1332, 1481,
-       1333, 1482,
-       1334, 1483,
-       1344, 1492,
-       1345, 1493,
-       1348, 1495,
-       1370, 1518,
-       1395, 1529,
-       1396, 1530,
-       1411, 1535,
-       1412, 1536,
-       1438, 1558,
-       1444, 1561,
-       1446, 1562,
-       1447, 1563,
-       1455, 1569,
-       1461, 1573,
-       1491, 1606,
-       1496, 1608,
-       1502, 1612,
-       1505, 1616,
-       1510, 856,
-       1512, 856,
-       1513, 1625,
-       1524, 1637,
-       1533, 1646,
-       1539, 1652,
-       1554, 1662,
-       1556, 1663,
-       1566, 1669,
-       1598, 1675,
-       1610, 1683,
-       1613, 1684,
-       1618, 856,
-       1621, 856,
-       1624, 856,
-       1644, 1725,
-       1647, 1727,
-       1667, 1737,
-       1730, 1802,
-       1743, 1809,
-       1744, 1810,
-       1748, 1812,
-       1752, 1815,
-       1754, 1816,
-       1770, 1829,
-       1804, 1854,
-       1859, 1899,
-       1860, 1900,
-       1863, 1902,
-       1864, 1903,
-       1865, 1904,
-       1897, 1919,
-       1920, 1930,
-       1924, 1932
+       400, 211,
+       433, 610,
+       435, 613,
+       442, 624,
+       443, 625,
+       444, 626,
+       457, 633,
+       458, 634,
+       465, 662,
+       477, 674,
+       482, 677,
+       495, 691,
+       501, 694,
+       507, 698,
+       511, 701,
+       516, 704,
+       544, 736,
+       550, 742,
+       551, 743,
+       555, 745,
+       558, 747,
+       589, 780,
+       593, 784,
+       600, 797,
+       609, 801,
+       611, 803,
+       628, 814,
+       658, 828,
+       665, 841,
+       672, 852,
+       695, 865,
+       727, 873,
+       737, 881,
+       740, 917,
+       741, 918,
+       778, 928,
+       781, 931,
+       786, 937,
+       792, 943,
+       795, 947,
+       810, 958,
+       811, 959,
+       812, 960,
+       816, 964,
+       824, 971,
+       825, 972,
+       827, 979,
+       864, 1017,
+       868, 1022,
+       885, 1036,
+       887, 1038,
+       889, 1041,
+       895, 1047,
+       920, 1065,
+       930, 1074,
+       938, 1083,
+       941, 1085,
+       944, 1087,
+       948, 1090,
+       962, 1136,
+       973, 1147,
+       981, 1154,
+       990, 1165,
+       994, 1167,
+       995, 1168,
+       1024, 1192,
+       1025, 1193,
+       1050, 1206,
+       1064, 1219,
+       1070, 1222,
+       1071, 1223,
+       1075, 1226,
+       1089, 1239,
+       1096, 1244,
+       1097, 1245,
+       1099, 1247,
+       1100, 1248,
+       1101, 1249,
+       1102, 1250,
+       1120, 1269,
+       1145, 1305,
+       1186, 1363,
+       1191, 1367,
+       1198, 1371,
+       1199, 1372,
+       1201, 1373,
+       1204, 1378,
+       1220, 1388,
+       1231, 1394,
+       1236, 1395,
+       1255, 1411,
+       1270, 1418,
+       1271, 1420,
+       1272, 1421,
+       1273, 1422,
+       1274, 1423,
+       1275, 1424,
+       1276, 1425,
+       1277, 1426,
+       1278, 1427,
+       1279, 1428,
+       1280, 1429,
+       1281, 1430,
+       1282, 1431,
+       1283, 1432,
+       1284, 1433,
+       1285, 1434,
+       1286, 1435,
+       1287, 1436,
+       1288, 1437,
+       1289, 1438,
+       1290, 1439,
+       1291, 1440,
+       1292, 1441,
+       1302, 1450,
+       1303, 1451,
+       1306, 1453,
+       1328, 1476,
+       1353, 1487,
+       1354, 1488,
+       1369, 1493,
+       1370, 1494,
+       1396, 1516,
+       1402, 1519,
+       1404, 1520,
+       1405, 1521,
+       1413, 1527,
+       1419, 1531,
+       1449, 1564,
+       1454, 1566,
+       1460, 1570,
+       1463, 1574,
+       1468, 828,
+       1470, 828,
+       1471, 1583,
+       1482, 1595,
+       1491, 1604,
+       1497, 1610,
+       1512, 1620,
+       1514, 1621,
+       1524, 1627,
+       1556, 1633,
+       1568, 1641,
+       1571, 1642,
+       1576, 828,
+       1579, 828,
+       1582, 828,
+       1602, 1683,
+       1605, 1685,
+       1625, 1695,
+       1688, 1760,
+       1701, 1767,
+       1702, 1768,
+       1706, 1770,
+       1710, 1773,
+       1712, 1774,
+       1728, 1787,
+       1762, 1812,
+       1817, 1857,
+       1818, 1858,
+       1821, 1860,
+       1822, 1861,
+       1823, 1862,
+       1855, 1877,
+       1878, 1888,
+       1882, 1890
 };
 static int parser_goto_row119[] = {
        4,
        -1, 15,
-       22, 112,
-       25, 112,
-       177, 112
+       22, 105,
+       25, 105,
+       163, 105
 };
 static int parser_goto_row120[] = {
        1,
@@ -26792,123 +24379,123 @@ static int parser_goto_row120[] = {
 };
 static int parser_goto_row121[] = {
        4,
-       -1, 1006,
-       1623, 1698,
-       1688, 1760,
-       1699, 1780
+       -1, 978,
+       1581, 1656,
+       1646, 1718,
+       1657, 1738
 };
 static int parser_goto_row122[] = {
        13,
-       -1, 466,
-       465, 648,
-       469, 651,
-       650, 837,
-       979, 648,
-       981, 651,
-       1123, 837,
-       1385, 648,
-       1393, 651,
-       1528, 837,
-       1713, 648,
-       1715, 651,
-       1792, 837
+       -1, 438,
+       437, 620,
+       441, 623,
+       622, 809,
+       951, 620,
+       953, 623,
+       1095, 809,
+       1343, 620,
+       1351, 623,
+       1486, 809,
+       1671, 620,
+       1673, 623,
+       1750, 809
 };
 static int parser_goto_row123[] = {
        5,
-       -1, 467,
-       829, 980,
-       1196, 1386,
-       1637, 1714,
-       1681, 1386
+       -1, 439,
+       801, 952,
+       1161, 1344,
+       1595, 1672,
+       1639, 1344
 };
 static int parser_goto_row124[] = {
        1,
-       -1, 1578
+       -1, 1536
 };
 static int parser_goto_row125[] = {
        2,
-       -1, 1155,
-       1919, 1929
+       -1, 1120,
+       1877, 1887
 };
 static int parser_goto_row126[] = {
        1,
-       -1, 1156
+       -1, 1121
 };
 static int parser_goto_row127[] = {
        6,
-       -1, 1157,
-       1283, 1448,
-       1460, 1572,
-       1462, 1574,
-       1463, 1575,
-       1573, 1671
+       -1, 1122,
+       1248, 1406,
+       1418, 1530,
+       1420, 1532,
+       1421, 1533,
+       1531, 1629
 };
 static int parser_goto_row128[] = {
        1,
-       -1, 1158
+       -1, 1123
 };
 static int parser_goto_row129[] = {
        8,
-       -1, 1159,
-       1466, 1580,
-       1467, 1581,
-       1468, 1582,
-       1469, 1583,
-       1470, 1584,
-       1471, 1585,
-       1472, 1586
+       -1, 1124,
+       1424, 1538,
+       1425, 1539,
+       1426, 1540,
+       1427, 1541,
+       1428, 1542,
+       1429, 1543,
+       1430, 1544
 };
 static int parser_goto_row130[] = {
        2,
-       -1, 1160,
-       1465, 1579
+       -1, 1125,
+       1423, 1537
 };
 static int parser_goto_row131[] = {
        2,
-       -1, 1161,
-       1473, 1587
+       -1, 1126,
+       1431, 1545
 };
 static int parser_goto_row132[] = {
        2,
-       -1, 1162,
-       1474, 1588
+       -1, 1127,
+       1432, 1546
 };
 static int parser_goto_row133[] = {
        3,
-       -1, 1163,
-       1475, 1589,
-       1476, 1590
+       -1, 1128,
+       1433, 1547,
+       1434, 1548
 };
 static int parser_goto_row134[] = {
        3,
-       -1, 1164,
-       1477, 1591,
-       1478, 1592
+       -1, 1129,
+       1435, 1549,
+       1436, 1550
 };
 static int parser_goto_row135[] = {
        5,
-       -1, 1165,
-       1479, 1593,
-       1480, 1594,
-       1481, 1595,
-       1482, 1596
+       -1, 1130,
+       1437, 1551,
+       1438, 1552,
+       1439, 1553,
+       1440, 1554
 };
 static int parser_goto_row136[] = {
        5,
-       -1, 1166,
-       1136, 1293,
-       1137, 1294,
-       1138, 1295,
-       1285, 1452
+       -1, 1131,
+       1108, 1258,
+       1109, 1259,
+       1110, 1260,
+       1250, 1410
 };
 static int parser_goto_row137[] = {
        1,
-       -1, 1167
+       -1, 1132
 };
 static int parser_goto_row138[] = {
        2,
-       -1, 1168,
-       1135, 1292
+       -1, 1133,
+       1107, 1257
 };
 static int parser_goto_row139[] = {
        1,
@@ -26916,14 +24503,14 @@ static int parser_goto_row139[] = {
 };
 static int parser_goto_row140[] = {
        1,
-       -1, 1169
+       -1, 1134
 };
 static int parser_goto_row141[] = {
        4,
-       -1, 413,
-       299, 531,
-       370, 581,
-       533, 725
+       -1, 385,
+       278, 503,
+       342, 553,
+       505, 697
 };
 static int parser_goto_row142[] = {
        1,
@@ -26931,92 +24518,92 @@ static int parser_goto_row142[] = {
 };
 static int parser_goto_row143[] = {
        1,
-       -1, 1387
+       -1, 1345
 };
 static int parser_goto_row144[] = {
        4,
-       -1, 153,
-       1196, 1388,
-       1646, 1726,
-       1681, 1388
+       -1, 139,
+       1161, 1346,
+       1604, 1684,
+       1639, 1346
 };
 static int parser_goto_row145[] = {
        1,
-       -1, 154
+       -1, 140
 };
 static int parser_goto_row146[] = {
        6,
-       -1, 155,
-       298, 530,
-       543, 731,
-       545, 733,
-       546, 734,
-       732, 899
+       -1, 141,
+       277, 502,
+       515, 703,
+       517, 705,
+       518, 706,
+       704, 871
 };
 static int parser_goto_row147[] = {
        1,
-       -1, 156
+       -1, 142
 };
 static int parser_goto_row148[] = {
        8,
-       -1, 157,
-       549, 737,
-       550, 738,
-       551, 739,
-       552, 740,
-       553, 741,
-       554, 742,
-       555, 743
+       -1, 143,
+       521, 709,
+       522, 710,
+       523, 711,
+       524, 712,
+       525, 713,
+       526, 714,
+       527, 715
 };
 static int parser_goto_row149[] = {
        2,
-       -1, 158,
-       548, 736
+       -1, 144,
+       520, 708
 };
 static int parser_goto_row150[] = {
        2,
-       -1, 159,
-       556, 744
+       -1, 145,
+       528, 716
 };
 static int parser_goto_row151[] = {
        2,
-       -1, 160,
-       557, 745
+       -1, 146,
+       529, 717
 };
 static int parser_goto_row152[] = {
        3,
-       -1, 161,
-       558, 746,
-       559, 747
+       -1, 147,
+       530, 718,
+       531, 719
 };
 static int parser_goto_row153[] = {
        3,
-       -1, 162,
-       560, 748,
-       561, 749
+       -1, 148,
+       532, 720,
+       533, 721
 };
 static int parser_goto_row154[] = {
        5,
-       -1, 163,
-       562, 750,
-       563, 751,
-       564, 752,
-       565, 753
+       -1, 149,
+       534, 722,
+       535, 723,
+       536, 724,
+       537, 725
 };
 static int parser_goto_row155[] = {
        1,
-       -1, 164
+       -1, 150
 };
 static int parser_goto_row156[] = {
        1,
-       -1, 165
+       -1, 151
 };
 static int parser_goto_row157[] = {
        4,
-       -1, 166,
-       131, 307,
-       1196, 1389,
-       1681, 1389
+       -1, 152,
+       124, 286,
+       1161, 1347,
+       1639, 1347
 };
 static int parser_goto_row158[] = {
        1,
@@ -27024,26 +24611,26 @@ static int parser_goto_row158[] = {
 };
 static int parser_goto_row159[] = {
        2,
-       -1, 167,
-       1109, 1269
+       -1, 153,
+       1081, 1234
 };
 static int parser_goto_row160[] = {
        1,
-       -1, 619
+       -1, 591
 };
 static int parser_goto_row161[] = {
        7,
-       -1, 620,
-       616, 807,
-       1104, 1262,
-       1260, 1433,
-       1431, 1555,
-       1450, 1565,
-       1564, 1668
+       -1, 592,
+       588, 779,
+       1076, 1227,
+       1225, 1391,
+       1389, 1513,
+       1408, 1523,
+       1522, 1626
 };
 static int parser_goto_row162[] = {
        1,
-       -1, 811
+       -1, 783
 };
 static int parser_goto_row163[] = {
        1,
@@ -27051,17 +24638,17 @@ static int parser_goto_row163[] = {
 };
 static int parser_goto_row164[] = {
        2,
-       -1, 1390,
-       1681, 1751
+       -1, 1348,
+       1639, 1709
 };
 static int parser_goto_row165[] = {
        1,
-       -1, 1391
+       -1, 1349
 };
 static int parser_goto_row166[] = {
        2,
-       -1, 1451,
-       1453, 1568
+       -1, 1409,
+       1411, 1526
 };
 static int parser_goto_row167[] = {
        1,
@@ -27133,48 +24720,48 @@ static int parser_goto_row183[] = {
 };
 static int parser_goto_row184[] = {
        8,
-       -1, 1061,
-       916, 1067,
-       1238, 1419,
-       1416, 1540,
-       1538, 1650,
-       1543, 1653,
-       1728, 1801,
-       1853, 1895
+       -1, 1033,
+       888, 1039,
+       1203, 1377,
+       1374, 1498,
+       1496, 1608,
+       1501, 1611,
+       1686, 1759,
+       1811, 1853
 };
 static int parser_goto_row185[] = {
        3,
-       -1, 1062,
-       766, 934,
-       1537, 1649
+       -1, 1034,
+       738, 906,
+       1495, 1607
 };
 static int parser_goto_row186[] = {
        1,
-       -1, 935
+       -1, 907
 };
 static int parser_goto_row187[] = {
        1,
-       -1, 936
+       -1, 908
 };
 static int parser_goto_row188[] = {
        1,
-       -1, 937
+       -1, 909
 };
 static int parser_goto_row189[] = {
        1,
-       -1, 938
+       -1, 910
 };
 static int parser_goto_row190[] = {
        1,
-       -1, 939
+       -1, 911
 };
 static int parser_goto_row191[] = {
        1,
-       -1, 940
+       -1, 912
 };
 static int parser_goto_row192[] = {
        1,
-       -1, 941
+       -1, 913
 };
 static int parser_goto_row193[] = {
        1,
@@ -27182,16 +24769,16 @@ static int parser_goto_row193[] = {
 };
 static int parser_goto_row194[] = {
        10,
-       -1, 173,
-       37, 180,
-       767, 944,
-       822, 974,
-       912, 1063,
-       916, 1068,
-       1429, 1553,
-       1538, 1651,
-       1543, 1654,
-       1853, 1896
+       -1, 159,
+       37, 166,
+       739, 916,
+       794, 946,
+       884, 1035,
+       888, 1040,
+       1387, 1511,
+       1496, 1609,
+       1501, 1612,
+       1811, 1854
 };
 static int parser_goto_row195[] = {
        1,
@@ -27199,11 +24786,11 @@ static int parser_goto_row195[] = {
 };
 static int parser_goto_row196[] = {
        1,
-       -1, 468
+       -1, 440
 };
 static int parser_goto_row197[] = {
        1,
-       -1, 1392
+       -1, 1350
 };
 static int parser_goto_row198[] = {
        1,
@@ -27215,7 +24802,7 @@ static int parser_goto_row199[] = {
 };
 static int parser_goto_row200[] = {
        1,
-       -1, 1196
+       -1, 1161
 };
 static int parser_goto_row201[] = {
        1,
@@ -27230,335 +24817,335 @@ static int parser_goto_row203[] = {
        4,
        -1, 19,
        5, 29,
-       18, 100,
-       28, 117
+       18, 93,
+       28, 110
 };
 static int parser_goto_row204[] = {
        8,
        -1, 20,
        5, 30,
-       18, 101,
-       19, 105,
-       28, 118,
-       29, 120,
-       100, 283,
-       117, 292
+       18, 94,
+       19, 98,
+       28, 111,
+       29, 113,
+       93, 262,
+       110, 271
 };
 static int parser_goto_row205[] = {
        1,
-       -1, 1507
+       -1, 1465
 };
 static int parser_goto_row206[] = {
        1,
-       -1, 1018
+       -1, 990
 };
 static int parser_goto_row207[] = {
        4,
-       -1, 1340,
-       1184, 1355,
-       1763, 1821,
-       1827, 1872
+       -1, 1298,
+       1149, 1313,
+       1721, 1779,
+       1785, 1830
 };
 static int parser_goto_row208[] = {
        1,
-       -1, 1348
+       -1, 1306
 };
 static int parser_goto_row209[] = {
        1,
-       -1, 1498
+       -1, 1456
 };
 static int parser_goto_row210[] = {
        1,
-       -1, 1101
+       -1, 1073
 };
 static int parser_goto_row211[] = {
        3,
-       -1, 261,
-       355, 570,
-       1084, 1248
+       -1, 240,
+       327, 542,
+       1056, 1213
 };
 static int parser_goto_row212[] = {
        1,
-       -1, 642
+       -1, 614
 };
 static int parser_goto_row213[] = {
        1,
-       -1, 658
+       -1, 630
 };
 static int parser_goto_row214[] = {
        1,
-       -1, 270
+       -1, 249
 };
 static int parser_goto_row215[] = {
        1,
-       -1, 968
+       -1, 940
 };
 static int parser_goto_row216[] = {
        2,
-       -1, 1440,
-       1391, 1526
+       -1, 1398,
+       1349, 1484
 };
 static int parser_goto_row217[] = {
        1,
-       -1, 898
+       -1, 870
 };
 static int parser_goto_row218[] = {
        170,
-       -1, 208,
-       13, 89,
-       27, 89,
-       31, 168,
-       33, 89,
-       37, 89,
-       54, 168,
-       104, 89,
-       131, 168,
-       172, 89,
-       224, 469,
-       260, 89,
-       272, 168,
-       274, 168,
-       275, 168,
-       276, 168,
-       277, 168,
-       298, 168,
-       410, 89,
-       491, 688,
-       496, 89,
-       498, 697,
-       521, 168,
-       522, 168,
-       543, 168,
-       545, 168,
-       546, 168,
-       548, 168,
-       549, 168,
-       550, 168,
-       551, 168,
-       552, 168,
-       553, 168,
-       554, 168,
-       555, 168,
-       556, 168,
-       557, 168,
-       558, 168,
-       559, 168,
-       560, 168,
-       561, 168,
-       562, 168,
-       563, 168,
-       564, 168,
-       565, 168,
-       566, 759,
-       569, 89,
-       608, 801,
-       612, 89,
-       615, 89,
-       661, 847,
-       662, 847,
-       690, 865,
-       692, 168,
-       694, 168,
-       726, 759,
-       732, 168,
-       762, 89,
-       766, 942,
-       767, 89,
-       773, 801,
-       812, 963,
-       822, 89,
-       829, 981,
-       831, 469,
-       875, 168,
-       876, 168,
-       877, 168,
-       878, 168,
-       893, 1048,
-       911, 168,
-       912, 942,
-       914, 89,
-       916, 942,
-       925, 168,
-       933, 89,
-       988, 1170,
-       992, 1173,
-       1003, 89,
-       1040, 168,
-       1041, 168,
-       1060, 89,
-       1079, 168,
-       1080, 168,
-       1081, 168,
-       1082, 89,
-       1086, 89,
-       1087, 168,
-       1088, 168,
-       1113, 469,
-       1135, 1170,
-       1136, 1170,
-       1137, 1170,
-       1138, 1170,
-       1182, 688,
-       1186, 89,
-       1196, 1393,
-       1238, 942,
-       1241, 1425,
-       1246, 89,
-       1252, 168,
-       1253, 168,
-       1283, 1170,
-       1285, 1170,
-       1416, 942,
-       1418, 89,
-       1422, 168,
-       1423, 168,
-       1429, 89,
-       1436, 469,
-       1460, 1170,
-       1462, 1170,
-       1463, 1170,
-       1465, 1170,
-       1466, 1170,
-       1467, 1170,
-       1468, 1170,
-       1469, 1170,
-       1470, 1170,
-       1471, 1170,
-       1472, 1170,
-       1473, 1170,
-       1474, 1170,
-       1475, 1170,
-       1476, 1170,
-       1477, 1170,
-       1478, 1170,
-       1479, 1170,
-       1480, 1170,
-       1481, 1170,
-       1482, 1170,
-       1483, 1602,
-       1499, 688,
-       1508, 688,
-       1510, 688,
-       1512, 688,
-       1518, 469,
-       1537, 942,
-       1538, 942,
-       1543, 942,
-       1547, 168,
-       1548, 168,
-       1549, 168,
-       1550, 168,
-       1558, 469,
-       1569, 1602,
-       1573, 1170,
-       1608, 688,
-       1637, 1715,
-       1646, 168,
-       1659, 168,
-       1660, 168,
-       1669, 1740,
-       1681, 1393,
-       1691, 89,
-       1695, 89,
-       1728, 942,
-       1757, 89,
-       1765, 89,
-       1766, 89,
-       1769, 89,
-       1774, 89,
-       1777, 89,
-       1812, 469,
-       1818, 89,
-       1825, 89,
-       1830, 89,
-       1835, 89,
-       1853, 942,
-       1919, 1170
+       -1, 194,
+       13, 82,
+       27, 82,
+       31, 154,
+       33, 82,
+       37, 82,
+       54, 154,
+       97, 82,
+       124, 154,
+       158, 82,
+       210, 441,
+       239, 82,
+       251, 154,
+       253, 154,
+       254, 154,
+       255, 154,
+       256, 154,
+       277, 154,
+       382, 82,
+       463, 660,
+       468, 82,
+       470, 669,
+       493, 154,
+       494, 154,
+       515, 154,
+       517, 154,
+       518, 154,
+       520, 154,
+       521, 154,
+       522, 154,
+       523, 154,
+       524, 154,
+       525, 154,
+       526, 154,
+       527, 154,
+       528, 154,
+       529, 154,
+       530, 154,
+       531, 154,
+       532, 154,
+       533, 154,
+       534, 154,
+       535, 154,
+       536, 154,
+       537, 154,
+       538, 731,
+       541, 82,
+       580, 773,
+       584, 82,
+       587, 82,
+       633, 819,
+       634, 819,
+       662, 837,
+       664, 154,
+       666, 154,
+       698, 731,
+       704, 154,
+       734, 82,
+       738, 914,
+       739, 82,
+       745, 773,
+       784, 935,
+       794, 82,
+       801, 953,
+       803, 441,
+       847, 154,
+       848, 154,
+       849, 154,
+       850, 154,
+       865, 1020,
+       883, 154,
+       884, 914,
+       886, 82,
+       888, 914,
+       897, 154,
+       905, 82,
+       960, 1135,
+       964, 1138,
+       975, 82,
+       1012, 154,
+       1013, 154,
+       1032, 82,
+       1051, 154,
+       1052, 154,
+       1053, 154,
+       1054, 82,
+       1058, 82,
+       1059, 154,
+       1060, 154,
+       1085, 441,
+       1107, 1135,
+       1108, 1135,
+       1109, 1135,
+       1110, 1135,
+       1147, 660,
+       1151, 82,
+       1161, 1351,
+       1203, 914,
+       1206, 1383,
+       1211, 82,
+       1217, 154,
+       1218, 154,
+       1248, 1135,
+       1250, 1135,
+       1374, 914,
+       1376, 82,
+       1380, 154,
+       1381, 154,
+       1387, 82,
+       1394, 441,
+       1418, 1135,
+       1420, 1135,
+       1421, 1135,
+       1423, 1135,
+       1424, 1135,
+       1425, 1135,
+       1426, 1135,
+       1427, 1135,
+       1428, 1135,
+       1429, 1135,
+       1430, 1135,
+       1431, 1135,
+       1432, 1135,
+       1433, 1135,
+       1434, 1135,
+       1435, 1135,
+       1436, 1135,
+       1437, 1135,
+       1438, 1135,
+       1439, 1135,
+       1440, 1135,
+       1441, 1560,
+       1457, 660,
+       1466, 660,
+       1468, 660,
+       1470, 660,
+       1476, 441,
+       1495, 914,
+       1496, 914,
+       1501, 914,
+       1505, 154,
+       1506, 154,
+       1507, 154,
+       1508, 154,
+       1516, 441,
+       1527, 1560,
+       1531, 1135,
+       1566, 660,
+       1595, 1673,
+       1604, 154,
+       1617, 154,
+       1618, 154,
+       1627, 1698,
+       1639, 1351,
+       1649, 82,
+       1653, 82,
+       1686, 914,
+       1715, 82,
+       1723, 82,
+       1724, 82,
+       1727, 82,
+       1732, 82,
+       1735, 82,
+       1770, 441,
+       1776, 82,
+       1783, 82,
+       1788, 82,
+       1793, 82,
+       1811, 914,
+       1877, 1135
 };
 static int parser_goto_row219[] = {
        78,
-       -1, 176,
+       -1, 162,
        0, 21,
        3, 24,
        5, 21,
        18, 21,
        19, 21,
        20, 24,
-       22, 113,
-       25, 114,
+       22, 106,
+       25, 107,
        28, 21,
        29, 21,
        30, 24,
        33, 24,
        37, 24,
-       70, 24,
-       100, 21,
-       101, 24,
-       105, 24,
-       110, 24,
+       63, 24,
+       93, 21,
+       94, 24,
+       98, 24,
+       103, 24,
+       104, 24,
+       110, 21,
        111, 24,
-       117, 21,
-       118, 24,
-       120, 24,
-       177, 361,
-       261, 24,
-       283, 24,
-       289, 24,
-       292, 24,
-       355, 24,
-       410, 24,
-       570, 24,
-       612, 24,
-       766, 24,
-       767, 24,
-       822, 24,
-       863, 24,
-       912, 24,
-       914, 24,
-       916, 24,
-       1003, 24,
-       1014, 24,
-       1018, 21,
-       1082, 24,
-       1084, 24,
-       1086, 24,
-       1175, 24,
-       1184, 24,
-       1186, 24,
-       1238, 24,
-       1246, 24,
-       1248, 24,
-       1340, 24,
-       1355, 24,
-       1416, 24,
-       1429, 24,
-       1504, 24,
-       1537, 24,
-       1538, 24,
-       1543, 24,
-       1615, 24,
-       1691, 24,
-       1695, 24,
-       1728, 24,
-       1757, 24,
-       1763, 24,
-       1765, 24,
-       1766, 24,
-       1769, 24,
-       1774, 24,
-       1777, 24,
-       1818, 24,
-       1821, 24,
-       1825, 24,
-       1827, 24,
-       1830, 24,
-       1835, 24,
-       1853, 24,
-       1872, 24
+       113, 24,
+       163, 333,
+       240, 24,
+       262, 24,
+       268, 24,
+       271, 24,
+       327, 24,
+       382, 24,
+       542, 24,
+       584, 24,
+       738, 24,
+       739, 24,
+       794, 24,
+       835, 24,
+       884, 24,
+       886, 24,
+       888, 24,
+       975, 24,
+       986, 24,
+       990, 21,
+       1054, 24,
+       1056, 24,
+       1058, 24,
+       1140, 24,
+       1149, 24,
+       1151, 24,
+       1203, 24,
+       1211, 24,
+       1213, 24,
+       1298, 24,
+       1313, 24,
+       1374, 24,
+       1387, 24,
+       1462, 24,
+       1495, 24,
+       1496, 24,
+       1501, 24,
+       1573, 24,
+       1649, 24,
+       1653, 24,
+       1686, 24,
+       1715, 24,
+       1721, 24,
+       1723, 24,
+       1724, 24,
+       1727, 24,
+       1732, 24,
+       1735, 24,
+       1776, 24,
+       1779, 24,
+       1783, 24,
+       1785, 24,
+       1788, 24,
+       1793, 24,
+       1811, 24,
+       1830, 24
 };
 static int parser_goto_row220[] = {
        75,
-       -1, 177,
+       -1, 163,
        0, 22,
        3, 25,
        5, 22,
@@ -27570,69 +25157,69 @@ static int parser_goto_row220[] = {
        30, 25,
        33, 25,
        37, 25,
-       70, 25,
-       100, 22,
-       101, 25,
-       105, 25,
-       110, 25,
+       63, 25,
+       93, 22,
+       94, 25,
+       98, 25,
+       103, 25,
+       104, 25,
+       110, 22,
        111, 25,
-       117, 22,
-       118, 25,
-       120, 25,
-       261, 25,
-       283, 25,
-       289, 25,
-       292, 25,
-       355, 25,
-       410, 25,
-       570, 25,
-       612, 25,
-       766, 25,
-       767, 25,
-       822, 25,
-       863, 25,
-       912, 25,
-       914, 25,
-       916, 25,
-       1003, 25,
-       1014, 25,
-       1018, 22,
-       1082, 25,
-       1084, 25,
-       1086, 25,
-       1175, 25,
-       1184, 25,
-       1186, 25,
-       1238, 25,
-       1246, 25,
-       1248, 25,
-       1340, 25,
-       1355, 25,
-       1416, 25,
-       1429, 25,
-       1504, 25,
-       1537, 25,
-       1538, 25,
-       1543, 25,
-       1615, 25,
-       1691, 25,
-       1695, 25,
-       1728, 25,
-       1757, 25,
-       1763, 25,
-       1765, 25,
-       1766, 25,
-       1769, 25,
-       1774, 25,
-       1777, 25,
-       1818, 25,
-       1821, 25,
-       1825, 25,
-       1827, 25,
-       1830, 25,
-       1835, 25,
-       1853, 25,
-       1872, 25
+       113, 25,
+       240, 25,
+       262, 25,
+       268, 25,
+       271, 25,
+       327, 25,
+       382, 25,
+       542, 25,
+       584, 25,
+       738, 25,
+       739, 25,
+       794, 25,
+       835, 25,
+       884, 25,
+       886, 25,
+       888, 25,
+       975, 25,
+       986, 25,
+       990, 22,
+       1054, 25,
+       1056, 25,
+       1058, 25,
+       1140, 25,
+       1149, 25,
+       1151, 25,
+       1203, 25,
+       1211, 25,
+       1213, 25,
+       1298, 25,
+       1313, 25,
+       1374, 25,
+       1387, 25,
+       1462, 25,
+       1495, 25,
+       1496, 25,
+       1501, 25,
+       1573, 25,
+       1649, 25,
+       1653, 25,
+       1686, 25,
+       1715, 25,
+       1721, 25,
+       1723, 25,
+       1724, 25,
+       1727, 25,
+       1732, 25,
+       1735, 25,
+       1776, 25,
+       1779, 25,
+       1783, 25,
+       1785, 25,
+       1788, 25,
+       1793, 25,
+       1811, 25,
+       1830, 25
 };
 
 const int* const parser_goto_table[] = {
index a657b3e..f001cd3 100644 (file)
@@ -109,7 +109,7 @@ class AndroidToolchain
 
                # Gather extra C files generated elsewhere than in super
                for f in compiler.extern_bodies do
-                       if f isa ExternCFile then cfiles.add(f.filename.basename(""))
+                       if f isa ExternCFile then cfiles.add(f.filename.basename)
                end
 
                # Is there an icon?
@@ -134,7 +134,7 @@ class AndroidToolchain
                        var extra_java_files = mmodule.extra_java_files
                        if extra_java_files != null then for file in extra_java_files do
                                var path = file.filename
-                               path.file_copy_to(dir/path.basename(""))
+                               path.file_copy_to(dir/path.basename)
                        end
                end
 
@@ -257,16 +257,22 @@ $(call import-module,android/native_app_glue)
                toolcontext.exec_and_check(["ln", "-s", "{share_dir}/libgc/arm/include/gc/",
                        "{compile_dir}/gc"], "Android project error")
 
-               ### Link to assets (for mnit and others)
-               # This will be accessed from `android_project_root`
-               var assets_dir
-               if compiler.mainmodule.location.file != null then
-                       # it is a real file, use "{file}/../assets"
-                       assets_dir = "{compiler.mainmodule.location.file.filename.dirname}/../assets"
-               else
-                       # probably used -m, use "."
-                       assets_dir = "assets"
+               # Copy assets, resources and libs where expected by the SDK
+
+               var project_root = "."
+               var mproject = compiler.mainmodule.first_real_mmodule.mproject
+               if mproject != null then
+                       var root = mproject.root
+                       if root != null then
+                               var filepath = root.filepath
+                               if filepath != null then
+                                       project_root = filepath / ".."
+                               end
+                       end
                end
+
+               # Link to assets (for mnit and others)
+               var assets_dir = project_root / "assets"
                if assets_dir.file_exists then
                        assets_dir = assets_dir.realpath
                        var target_assets_dir = "{android_project_root}/assets"
@@ -275,17 +281,7 @@ $(call import-module,android/native_app_glue)
                        end
                end
 
-               ### Copy resources and libs where expected by the SDK
-               var project_root
-               if compiler.mainmodule.location.file != null then
-                       # it is a real file, use "{file}/../res"
-                       project_root = "{compiler.mainmodule.location.file.filename.dirname}/.."
-               else
-                       # probably used -m, use "."
-                       project_root = "."
-               end
-
-               # Android resources folder
+               # Copy the res folder
                var res_dir = project_root / "res"
                if res_dir.file_exists then
                        # copy the res folder to the compile dir
@@ -301,7 +297,7 @@ $(call import-module,android/native_app_glue)
 </resources>""".write_to_file "{android_project_root}/res/values/strings.xml"
                end
 
-               # Android libs folder
+               # Copy the libs folder
                var libs_dir = project_root / "libs"
                if libs_dir.file_exists then
                        toolcontext.exec_and_check(["cp", "-r", libs_dir, android_project_root], "Android project error")
index 77564f1..9972ea6 100644 (file)
@@ -83,7 +83,7 @@ private class IOSToolchain
                ## Register all source files
                for file in cfiles do pbx.add_file new PbxFile(file)
                for file in compiler.extern_bodies do
-                       pbx.add_file new PbxFile(file.filename.basename(""))
+                       pbx.add_file new PbxFile(file.filename.basename)
                end
 
                ## TODO Register asset files
index 8136187..f994c45 100644 (file)
@@ -56,7 +56,7 @@ class PnaclToolchain
 
                # Gather extra C files generated elsewhere than in super
                for f in compiler.extern_bodies do
-                       if f isa ExternCFile then cfiles.add(f.filename.basename(""))
+                       if f isa ExternCFile then cfiles.add(f.filename.basename)
                end
 
                # Outname
index 05e2332..87e808c 100644 (file)
@@ -535,14 +535,7 @@ redef class AExpr
        end
 end
 
-redef class AIntExpr
-       redef fun accept_rapid_type_visitor(v)
-       do
-               allocate_mtype(v)
-       end
-end
-
-redef class AByteExpr
+redef class AIntegerExpr
        redef fun accept_rapid_type_visitor(v)
        do
                allocate_mtype(v)
index cb4b70a..4a432c7 100644 (file)
@@ -73,13 +73,6 @@ redef class AMethPropdef
                        return
                end
 
-               # Do we inherit for a constructor?
-               var skip = true
-               for cd in mclassdef.in_hierarchy.direct_greaters do
-                       if cd.mclass.kind.need_init then skip = false
-               end
-               if skip then return
-
                # Now we search for the absence of any explicit super-init invocation
                #  * via a "super"
                #  * via a call of an other init
index 86e5bcb..1b53f65 100644 (file)
@@ -20,6 +20,7 @@ module typing
 
 import modelize
 import local_var_init
+import literal
 
 redef class ToolContext
        var typing_phase: Phase = new TypingPhase(self, [flow_phase, modelize_property_phase, local_var_init_phase])
@@ -722,9 +723,6 @@ end
 redef class AMethPropdef
        redef fun do_typing(modelbuilder: ModelBuilder)
        do
-               var nblock = self.n_block
-               if nblock == null then return
-
                var mpropdef = self.mpropdef
                if mpropdef == null then return # skip error
 
@@ -746,6 +744,9 @@ redef class AMethPropdef
                        variable.declared_type = mtype
                end
 
+               var nblock = self.n_block
+               if nblock == null then return
+
                loop
                        v.dirty = false
                        v.visit_stmt(nblock)
@@ -1368,19 +1369,15 @@ redef class AFalseExpr
        end
 end
 
-redef class AIntExpr
-       redef fun accept_typing(v)
-       do
-               var mclass = v.get_mclass(self, "Int")
-               if mclass == null then return # Forward error
-               self.mtype = mclass.mclass_type
-       end
-end
-
-redef class AByteExpr
+redef class AIntegerExpr
        redef fun accept_typing(v)
        do
-               var mclass = v.get_mclass(self, "Byte")
+               var mclass: nullable MClass = null
+               if value isa Byte then
+                       mclass = v.get_mclass(self, "Byte")
+               else if value isa Int then
+                       mclass = v.get_mclass(self, "Int")
+               end
                if mclass == null then return # Forward error
                self.mtype = mclass.mclass_type
        end
index 4468d91..47366b3 100644 (file)
@@ -515,7 +515,7 @@ The Nit language documentation and the source code of its tools and libraries ma
                if opt_set_dummy_tool.value then
                        return "DUMMY_TOOL"
                end
-               return sys.program_name.basename("")
+               return sys.program_name.basename
        end
 
        # The identified root directory of the Nit project
index 6842aa3..36a1be1 100644 (file)
@@ -32,7 +32,7 @@ end
 class D
        super B
        super C
-       #alt3#var b: Int
+       #alt3,5#var b: Int
        #alt4#var b = 11
        init do 'd'.output #alt2#
 end
@@ -48,6 +48,7 @@ class F
        super D
        super E
        init do 'f'.output #alt1,2#
+       #alt5#autoinit c=, e=
 end
 
 class G
@@ -55,6 +56,7 @@ class G
        super E
        var g: Int
        init do 'g'.output #alt2#
+       #alt5#autoinit c=, e=, g=
 end
 
 class H
index 0f81381..7e89814 100644 (file)
@@ -18,7 +18,7 @@ import abstract_collection
 
 fun maybe: Bool do return true
 
-var a = new Container[Int](1)
+var a = new Ref[Int](1)
 1.output
 for i in a do
        2.output
diff --git a/tests/base_module_conditional.nit b/tests/base_module_conditional.nit
new file mode 100644 (file)
index 0000000..38291f8
--- /dev/null
@@ -0,0 +1,20 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import module_0
+import module_1 is conditional(module_2)
+#alt1#import module_1 is conditional
+#alt1#import module_1 is conditional("foo")
+#alt1#import module_1 is conditional(fail)
+#alt1#import fail is conditional(module_2)
diff --git a/tests/base_module_conditional_client.nit b/tests/base_module_conditional_client.nit
new file mode 100644 (file)
index 0000000..c1e62d6
--- /dev/null
@@ -0,0 +1,16 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import module_2 #alt1#
+import base_module_conditional #alt2#
index b21c85e..8a1bb4c 100644 (file)
@@ -16,13 +16,16 @@ import standard::kernel
 
 assert 0b1001 == 0x09
 assert 0o715 == 0x1CD
-assert 461 == 0o715
+assert 46_1 == 0o715
 assert 0b111001101 == 0o715
-assert 256 == 0x100
-assert 0o400 == 256
+assert 2_56 == 0x100
+assert 0o400 == 2_56
 assert 0b1_1100_1101 == 0o715
 assert 0b1_1100_1101 == 0x1_CD
 assert 0b1000_1001 == 0x89
 assert 0b1000_1001u8 == 0x89u8
 assert 0o151u8 == 0b0110_1001u8
 assert 0x69u8 == 0o151u8
+assert 12_125 == 0x2F5D
+assert 0o27_535 == 1212_5
+assert 2_55u8 == 0xFFu8
index c78f448..88b001a 100644 (file)
@@ -23,4 +23,4 @@ while i < n do
        s = "Je dis «{s}» et redis «{s}» et trois fois de plus : «{s}{s}{s}».\n"
        i = i + 1
 end
-print(s.length)
+print s.bytelen
index a59c19e..f76b13a 100644 (file)
@@ -23,4 +23,4 @@ while i < n do
        s = ["Je dis «", s, "» et redis «", s, "» et trois fois de plus : «", s, s, s, "».\n"].plain_to_s
        i = i + 1
 end
-print(s.length)
+print(s.bytelen)
index da0cf31..3bb4205 100644 (file)
@@ -53,13 +53,13 @@ class Tower
                end
        end
 
-       var t: Array[Int] # The stack of discus (only the diameter is stored).
+       var t = new Array[Int] # The stack of discus (only the diameter is stored).
 
        init full(n: Int)
        # Build a new tower with `n' discus.
        do
                assert positive: n >= 0
-               _t = new Array[Int].with_capacity(n)
+               t.enlarge(n)
                for i in [0..n[ do
                        push(n-i)
                end
@@ -68,7 +68,6 @@ class Tower
        init empty
        # Build a empty tower.
        do
-               _t = new Array[Int]
        end
 end
 
index 106e498..1264a67 100644 (file)
@@ -49,4 +49,4 @@ printn("The value of a is: " + a.to_s + ".\n")
 # Fiveth way: Join arrays.
 # Pro: Sometime efficient on complex concatenation.
 # Con: Crazy.
-printn(["The value of a is: ", a.to_s, ".\n"].join(""))
+printn(["The value of a is: ", a.to_s, ".\n"].join)
index 5e06135..aba5aca 100644 (file)
@@ -35,5 +35,6 @@ end
 class Sys
        fun main
        do
+               print(0)
        end
 end
index f614cfe..77f46db 100644 (file)
@@ -68,3 +68,18 @@ class B # class 2
           a123
    end
 end
+
+var a = new A
+a.a1
+a.a12
+a.a13
+a.a123
+
+var b = new B
+b.a1
+b.a12
+b.a13
+b.a123
+
+b.all2
+b.all25
diff --git a/tests/module_2.nit b/tests/module_2.nit
new file mode 100644 (file)
index 0000000..8499bb9
--- /dev/null
@@ -0,0 +1,15 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import module_0
index 0da465e..ad78ced 100644 (file)
@@ -27,3 +27,6 @@ mpi_simple
 blink
 input
 first_letter_last_letter
+fibonacci_word
+shootout_nsieve
+test_ropebuffer
index 3ae7a2a..396ac26 100644 (file)
@@ -1 +1,3 @@
 --no-color -W test_advice_repeated_types.nit
+--no-color base_simple3.nit; echo $?
+--no-color error_mod_unk.nit; echo $?
index 0da465e..ad78ced 100644 (file)
@@ -27,3 +27,6 @@ mpi_simple
 blink
 input
 first_letter_last_letter
+fibonacci_word
+shootout_nsieve
+test_ropebuffer
index da7cd3c..dcf9d45 100644 (file)
@@ -1,5 +1,3 @@
-alt/base_attr3_alt1.nit:22,3--4: Error: method or variable `a1=` unknown in `B`.
-alt/base_attr3_alt1.nit:24,3--4: Error: method or variable `a2=` unknown in `B`.
 alt/base_attr3_alt1.nit:25,3--4: Error: method or variable `a3` unknown in `B`.
 alt/base_attr3_alt1.nit:26,3--4: Error: method or variable `a3=` unknown in `B`.
 alt/base_attr3_alt1.nit:31,3--4: Error: method or variable `a6` unknown in `B`.
index c857bcc..5531be5 100644 (file)
@@ -1,6 +1,6 @@
-alt/base_attr3_alt2.nit:49,5--6: Error: method `a1=` does not exists in `A`.
+alt/base_attr3_alt2.nit:49,5--6: Error: method `a1=` is protected and can only accessed by `self`.
 alt/base_attr3_alt2.nit:50,5--6: Error: method `a2` is protected and can only accessed by `self`.
-alt/base_attr3_alt2.nit:51,5--6: Error: method `a2=` does not exists in `A`.
+alt/base_attr3_alt2.nit:51,5--6: Error: method `a2=` is protected and can only accessed by `self`.
 alt/base_attr3_alt2.nit:52,5--6: Error: method `a3` does not exists in `A`.
 alt/base_attr3_alt2.nit:53,5--6: Error: method `a3=` does not exists in `A`.
 alt/base_attr3_alt2.nit:56,5--6: Error: method `a5` is protected and can only accessed by `self`.
index 58d39b4..1bbd1a2 100644 (file)
@@ -1,6 +1,6 @@
-alt/base_attr3_alt3.nit:80,4--5: Error: method `a1=` does not exists in `A`.
+alt/base_attr3_alt3.nit:80,4--5: Error: method `a1=` is protected and can only accessed by `self`.
 alt/base_attr3_alt3.nit:81,4--5: Error: method `a2` is protected and can only accessed by `self`.
-alt/base_attr3_alt3.nit:82,4--5: Error: method `a2=` does not exists in `A`.
+alt/base_attr3_alt3.nit:82,4--5: Error: method `a2=` is protected and can only accessed by `self`.
 alt/base_attr3_alt3.nit:83,4--5: Error: method `a3` does not exists in `A`.
 alt/base_attr3_alt3.nit:84,4--5: Error: method `a3=` does not exists in `A`.
 alt/base_attr3_alt3.nit:87,4--5: Error: method `a5` is protected and can only accessed by `self`.
index 14de495..707456d 100644 (file)
@@ -1,6 +1,6 @@
-alt/base_attr3_alt4.nit:110,4--5: Error: method `a1=` does not exists in `B`.
+alt/base_attr3_alt4.nit:110,4--5: Error: method `a1=` is protected and can only accessed by `self`.
 alt/base_attr3_alt4.nit:111,4--5: Error: method `a2` is protected and can only accessed by `self`.
-alt/base_attr3_alt4.nit:112,4--5: Error: method `a2=` does not exists in `B`.
+alt/base_attr3_alt4.nit:112,4--5: Error: method `a2=` is protected and can only accessed by `self`.
 alt/base_attr3_alt4.nit:113,4--5: Error: method `a3` does not exists in `B`.
 alt/base_attr3_alt4.nit:114,4--5: Error: method `a3=` does not exists in `B`.
 alt/base_attr3_alt4.nit:117,4--5: Error: method `a5` is protected and can only accessed by `self`.
index a74724b..a376c79 100644 (file)
@@ -1,3 +1,3 @@
-base_error_literal.nit:17,9--11: Error: invalid binary literal
-base_error_literal.nit:18,9--11: Error: invalid hexadecimal literal
-base_error_literal.nit:19,9--11: Error: invalid octal literal
+base_error_literal.nit:17,9--11: Error: invalid literal `0b_`
+base_error_literal.nit:18,9--11: Error: invalid literal `0x_`
+base_error_literal.nit:19,9--11: Error: invalid literal `0o_`
index a7be1ec..90f67d3 100644 (file)
@@ -1,2 +1,2 @@
-alt/base_init_basic_alt3.nit:47,7: Error: conflict for inherited inits base_init_basic_alt3#E#init(c=, e=) and base_init_basic_alt3#D#init(c=, b=)
-alt/base_init_basic_alt3.nit:53,7: Error: conflict for inherited inits base_init_basic_alt3#E#init(c=, e=) and base_init_basic_alt3#D#init(c=, b=)
+alt/base_init_basic_alt3.nit:47,7: Error: cannot generate automatic init for class F. Conflict in the order in inherited initializers base_init_basic_alt3#E#init(c=, e=) and base_init_basic_alt3#D#init(c=, b=). Use `autoinit` to order initializers. eg `autoinit c=, b=, e=`
+alt/base_init_basic_alt3.nit:54,7: Error: cannot generate automatic init for class G. Conflict in the order in inherited initializers base_init_basic_alt3#E#init(c=, e=) and base_init_basic_alt3#D#init(c=, b=). Use `autoinit` to order initializers. eg `autoinit c=, b=, e=, g=`
diff --git a/tests/sav/base_init_basic_alt5.res b/tests/sav/base_init_basic_alt5.res
new file mode 100644 (file)
index 0000000..ae87071
--- /dev/null
@@ -0,0 +1 @@
+alt/base_init_basic_alt5.nit:79,9--11: Error: expected 2 argument(s) for `init(c: Int, b: Int)`; got 1. See introduction at `standard::Object::init`.
index 510c2f5..d210e23 100644 (file)
@@ -1,9 +1,13 @@
 1
 2
+1
 2
 3
+1
 2
+1
 2
 5
+1
 2
 6
index daa73b2..f25a887 100644 (file)
@@ -4,5 +4,5 @@ B1 A B2
 A B3 
 A B4y 
 C1 C2 
-A2z C3z 
-D1 B1 A B2 D2 D3 
+C1 C2 A2z C3z 
+D1 B1 C1 C2 A B2 D2 D3 
index fe7551d..ad0b634 100644 (file)
@@ -4,5 +4,5 @@ B1 A B2
 A B3 
 A B4y 
 C1 C2 
-A2z C3z 
+C1 C2 A2z C3z 
 C1 C2 D1 D2 D3 
index 7eadb94..7777753 100644 (file)
@@ -4,5 +4,5 @@ B1 A B2
 A B3 
 A B4y 
 C1 C2 
-A2z C3z 
-D1 B1 A B2 D2 C1 C2 D3 
+C1 C2 A2z C3z 
+D1 B1 C1 C2 A B2 D2 C1 C2 D3 
index 9bc59e1..4320fe1 100644 (file)
@@ -4,5 +4,5 @@ B1 A B2
 A B3 
 A B4y 
 C1 C2 
-A2z C3z 
-D1 C1 C2 B1 A B2 D2 D3 
+C1 C2 A2z C3z 
+D1 C1 C2 B1 C1 C2 A B2 D2 D3 
index bc59762..2f2b274 100644 (file)
@@ -4,5 +4,5 @@ B1 A B2
 A B3 
 A B4y 
 C1 C2 
-A2z C3z 
-D1 B1 A B2 D2 B1 A B2 D3 
+C1 C2 A2z C3z 
+D1 B1 C1 C2 A B2 D2 B1 C1 C2 A B2 D3 
diff --git a/tests/sav/base_module_conditional.res b/tests/sav/base_module_conditional.res
new file mode 100644 (file)
index 0000000..573541a
--- /dev/null
@@ -0,0 +1 @@
+0
diff --git a/tests/sav/base_module_conditional_alt1.res b/tests/sav/base_module_conditional_alt1.res
new file mode 100644 (file)
index 0000000..abd440c
--- /dev/null
@@ -0,0 +1,4 @@
+alt/base_module_conditional_alt1.nit:17,20--30: Syntax Error: `conditional` expects module identifiers as arguments.
+alt/base_module_conditional_alt1.nit:18,32--36: Syntax Error: `conditional` expects module identifier as arguments.
+alt/base_module_conditional_alt1.nit:19,32--35: Error: cannot find module `fail` from `base_module_conditional_alt1`. Tried: ., ../lib/standard, ../lib/standard/collection, alt, ../lib, ../contrib.
+alt/base_module_conditional_alt1.nit:20,8--11: Error: cannot find module `fail` from `base_module_conditional_alt1`. Tried: ., ../lib/standard, ../lib/standard/collection, alt, ../lib, ../contrib.
diff --git a/tests/sav/base_module_conditional_client.res b/tests/sav/base_module_conditional_client.res
new file mode 100644 (file)
index 0000000..13eabd1
--- /dev/null
@@ -0,0 +1,34 @@
+1
+1
+12
+1
+13
+1
+123
+1
+1
+1
+12
+2
+13
+1
+123
+2
+1
+1
+12
+2
+13
+1
+123
+2
+250
+2
+1
+1
+12
+2
+13
+1
+123
+2
diff --git a/tests/sav/base_module_conditional_client_alt1.res b/tests/sav/base_module_conditional_client_alt1.res
new file mode 100644 (file)
index 0000000..573541a
--- /dev/null
@@ -0,0 +1 @@
+0
diff --git a/tests/sav/base_module_conditional_client_alt2.res b/tests/sav/base_module_conditional_client_alt2.res
new file mode 100644 (file)
index 0000000..573541a
--- /dev/null
@@ -0,0 +1 @@
+0
diff --git a/tests/sav/checker.res b/tests/sav/checker.res
new file mode 100644 (file)
index 0000000..e6fde82
--- /dev/null
@@ -0,0 +1 @@
+Usage: checker xml_file
diff --git a/tests/sav/entropy.res b/tests/sav/entropy.res
new file mode 100644 (file)
index 0000000..29f9066
--- /dev/null
@@ -0,0 +1,2 @@
+1.846
+1.846
diff --git a/tests/sav/entropy_narcissist.res b/tests/sav/entropy_narcissist.res
new file mode 100644 (file)
index 0000000..ba66466
--- /dev/null
@@ -0,0 +1 @@
+0.0
index 3fe9caa..a1946e2 100644 (file)
@@ -1,12 +1,12 @@
-../lib/standard/kernel.nit:29,1--100,3: Error: `kernel#Object` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
-../lib/standard/kernel.nit:102,1--116,3: Error: `kernel#Sys` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
-../lib/standard/kernel.nit:129,1--187,3: Error: `kernel#Comparable` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
-../lib/standard/kernel.nit:189,1--226,3: Error: `kernel#Discrete` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
-../lib/standard/kernel.nit:228,1--245,3: Error: `kernel#Cloneable` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
-../lib/standard/kernel.nit:247,1--302,3: Error: `kernel#Numeric` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
-../lib/standard/kernel.nit:308,1--331,3: Error: `kernel#Bool` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
-../lib/standard/kernel.nit:333,1--415,3: Error: `kernel#Float` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
-../lib/standard/kernel.nit:417,1--519,3: Error: `kernel#Byte` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
-../lib/standard/kernel.nit:521,1--712,3: Error: `kernel#Int` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
-../lib/standard/kernel.nit:714,1--854,3: Error: `kernel#Char` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
-../lib/standard/kernel.nit:856,1--863,3: Error: `kernel#Pointer` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
+../lib/standard/kernel.nit:32,1--225,3: Error: `kernel#Object` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
+../lib/standard/kernel.nit:227,1--300,3: Error: `kernel#Sys` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
+../lib/standard/kernel.nit:313,1--371,3: Error: `kernel#Comparable` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
+../lib/standard/kernel.nit:373,1--410,3: Error: `kernel#Discrete` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
+../lib/standard/kernel.nit:412,1--429,3: Error: `kernel#Cloneable` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
+../lib/standard/kernel.nit:431,1--486,3: Error: `kernel#Numeric` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
+../lib/standard/kernel.nit:492,1--515,3: Error: `kernel#Bool` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
+../lib/standard/kernel.nit:517,1--599,3: Error: `kernel#Float` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
+../lib/standard/kernel.nit:601,1--703,3: Error: `kernel#Byte` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
+../lib/standard/kernel.nit:705,1--896,3: Error: `kernel#Int` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
+../lib/standard/kernel.nit:898,1--1051,3: Error: `kernel#Char` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
+../lib/standard/kernel.nit:1053,1--1060,3: Error: `kernel#Pointer` does not specialize `module_0#Object`. Possible duplication of the root class `Object`?
index b5db745..184874a 100644 (file)
@@ -1 +1,2 @@
 error_ref_attr.nit:20,15--17: Redef Error: expected `B` return type; got `Int`.
+error_ref_attr.nit:20,15--17: Redef Error: expected `B` type for parameter `a'; got `Int`.
index 4154b82..ff5fc65 100644 (file)
@@ -2,31 +2,31 @@ sans nom
 
 Montpellier
 
-*** Entrepôt Lunel ***
-L'entrepôt est vide
+*** Entrep�t Lunel ***
+L'entrep�t est vide
 
 Carotte:15
 Carotte:20
 
-* Rayon : Légumes
+* Rayon : L�gumes
 
-* Rayon : Légumes
+* Rayon : L�gumes
 Carotte:15
 Navet:10
 Chou:3
-* Rayon : Légumes
+* Rayon : L�gumes
 Carotte:15
 Navet:10
 Chou:13
 Courge:1
 
-*** Entrepôt Lunel ***
-* Rayon : Légumes
+*** Entrep�t Lunel ***
+* Rayon : L�gumes
 Carotte:15
 Navet:10
 Chou:13
 Courge:1
-* Rayon Réfrigéré : Surgelés - t° max : -5
+* Rayon R�frig�r� : Surgel�s - t� max : -5
 Pizza:12
-Poisson pané:4
+Poisson pan�:4
 
diff --git a/tests/sav/fibonacci_word.res b/tests/sav/fibonacci_word.res
new file mode 100644 (file)
index 0000000..38a9498
--- /dev/null
@@ -0,0 +1,37 @@
+1      1       0.0000000000000000      1
+2      1       0.0000000000000000      0
+3      2       1.0000000000000000      01
+4      3       0.9182958340544894      010
+5      5       0.9709505944546686      01001
+6      8       0.9544340029249650      01001010
+7      13      0.9612366047228760      0100101001001
+8      21      0.9587118829771316      010010100100101001010
+9      34      0.9596868937742170      0100101001001010010100100101001001
+10     55      0.9593160320543778      ...
+11     89      0.9594579158386696      ...
+12     144     0.9594037542210228      ...
+13     233     0.9594244469559864      ...
+14     377     0.9594165437404406      ...
+15     610     0.9594195626031440      ...
+16     987     0.9594184095152248      ...
+17     1597    0.9594188499578102      ...
+18     2584    0.9594186817240320      ...
+19     4181    0.9594187459836638      ...
+20     6765    0.9594187214386752      ...
+21     10946   0.9594187308140276      ...
+22     17711   0.9594187272329618      ...
+23     28657   0.9594187286008076      ...
+24     46368   0.9594187280783368      ...
+25     75025   0.9594187282779028      ...
+26     121393  0.9594187282016752      ...
+27     196418  0.9594187282307916      ...
+28     317811  0.9594187282196702      ...
+29     514229  0.9594187282239182      ...
+30     832040  0.9594187282222962      ...
+31     1346269 0.9594187282229156      ...
+32     2178309 0.9594187282226794      ...
+33     3524578 0.9594187282227690      ...
+34     5702887 0.9594187282227344      ...
+35     9227465 0.9594187282227478      ...
+36     14930352        0.9594187282227430      ...
+37     24157817        0.9594187282227448      ...
diff --git a/tests/sav/module_0.res b/tests/sav/module_0.res
new file mode 100644 (file)
index 0000000..573541a
--- /dev/null
@@ -0,0 +1 @@
+0
diff --git a/tests/sav/module_1.res b/tests/sav/module_1.res
new file mode 100644 (file)
index 0000000..13eabd1
--- /dev/null
@@ -0,0 +1,34 @@
+1
+1
+12
+1
+13
+1
+123
+1
+1
+1
+12
+2
+13
+1
+123
+2
+1
+1
+12
+2
+13
+1
+123
+2
+250
+2
+1
+1
+12
+2
+13
+1
+123
+2
diff --git a/tests/sav/module_2.res b/tests/sav/module_2.res
new file mode 100644 (file)
index 0000000..573541a
--- /dev/null
@@ -0,0 +1 @@
+0
index d93978e..e462629 100644 (file)
@@ -1,4 +1,4 @@
-Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:542)
+Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:726)
 11
 21
 31
index d93978e..e462629 100644 (file)
@@ -1,4 +1,4 @@
-Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:542)
+Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:726)
 11
 21
 31
index d93978e..e462629 100644 (file)
@@ -1,4 +1,4 @@
-Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:542)
+Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:726)
 11
 21
 31
diff --git a/tests/sav/nitce/test_binary_deserialization_alt1.res b/tests/sav/nitce/test_binary_deserialization_alt1.res
new file mode 100644 (file)
index 0000000..2c6e10c
--- /dev/null
@@ -0,0 +1,36 @@
+# Src:
+<A: true a 0.123 1234 asdf false p4ssw0rd>
+# Dst:
+<A: true a 0.123 1234 asdf false p4ssw0rd>
+
+# Src:
+<B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>
+# Dst:
+<B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>
+
+# Src:
+<C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>>
+# Dst:
+<C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>>
+
+# Src:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false p4ssw0rd> 1111        f"\r\/> true>
+# Dst:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false p4ssw0rd> 1111        f"\r\/> true>
+
+Deserialization Error: Doesn't know how to deserialize class "Array", Deserialization Error: Wrong type on `E::a` expected `PlaceHolderTypeWhichShouldNotExist`, got `null`, Deserialization Error: Doesn't know how to deserialize class "Array", Deserialization Error: Wrong type on `E::b` expected `PlaceHolderTypeWhichShouldNotExist`, got `null`
+# Src:
+<E: a: hello, 1234, 123.4; b: hella, 2345, 234.5>
+# Dst:
+<E: a: hello, 1234, 123.4; b: hella, 2345, 234.5>
+
+Deserialization Error: Doesn't know how to deserialize class "F"
+Deserialization Error: Doesn't know how to deserialize class "F"
+Deserialization Error: Doesn't know how to deserialize class "HashSet", Deserialization Error: Wrong type on `G::hs` expected `PlaceHolderTypeWhichShouldNotExist`, got `null`, Deserialization Error: Doesn't know how to deserialize class "ArraySet", Deserialization Error: Wrong type on `G::s` expected `Set[String]`, got `null`, Deserialization Error: Doesn't know how to deserialize class "HashMap", Deserialization Error: Wrong type on `G::hm` expected `PlaceHolderTypeWhichShouldNotExist`, got `null`, Deserialization Error: Doesn't know how to deserialize class "ArrayMap", Deserialization Error: Wrong type on `G::am` expected `PlaceHolderTypeWhichShouldNotExist`, got `null`
+# Src:
+<G: hs: -1, 0; s: one, two; hm: one. 1, two. 2; am: three. 3, four. 4>
+# Dst:
+<G: hs: -1, 0; s: one, two; hm: one. 1, two. 2; am: three. 3, four. 4>
+
index c53bde5..d3738c4 100644 (file)
@@ -1,4 +1,3 @@
-Runtime error: Aborted (../lib/serialization/serialization.nit:120)
 # Nit:
 <A: true a 0.123 1234 asdf false p4ssw0rd>
 
@@ -37,4 +36,39 @@ Runtime error: Aborted (../lib/serialization/serialization.nit:120)
 <D: <B: <A: false b 123.123 2345 new line ->
 <- false p4ssw0rd> 1111        f"\r\/> true>
 
-Error: doesn't know how to deserialize class "Array"
+# Nit:
+<E: a: hello, 1234, 123.4; b: hella, 2345, 234.5>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "E", "a": {"__kind": "obj", "__id": 1, "__class": "Array", "__items": ["hello", 1234, 123.4]}, "b": {"__kind": "obj", "__id": 2, "__class": "Array", "__items": ["hella", 2345, 234.5]}}
+
+# Back in Nit:
+<E: a: hello, 1234, 123.4; b: hella, 2345, 234.5>
+
+# Nit:
+<E: 2222>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "F", "n": 2222}
+
+# Back in Nit:
+null
+
+# Nit:
+<E: 33.33>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "F", "n": 33.33}
+
+# Back in Nit:
+null
+
+# Nit:
+<G: hs: -1, 0; s: one, two; hm: one. 1, two. 2; am: three. 3, four. 4>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "G", "hs": {"__kind": "obj", "__id": 1, "__class": "HashSet", "__items": [-1, 0]}, "s": {"__kind": "obj", "__id": 2, "__class": "ArraySet", "__items": ["one", "two"]}, "hm": {"__kind": "obj", "__id": 3, "__class": "HashMap", "__length": 2, "__keys": ["one", "two"], "__values": [1, 2]}, "am": {"__kind": "obj", "__id": 4, "__class": "ArrayMap", "__length": 2, "__keys": ["three", "four"], "__values": ["3", "4"]}}
+
+# Back in Nit:
+<G: hs: -1, 0; s: one, two; hm: one. 1, two. 2; am: three. 3, four. 4>
+
index 1e781d9..5fea655 100644 (file)
@@ -1,3 +1,6 @@
+Empty README for group `module_1` (readme-warning)
+Empty README for group `module_0` (readme-warning)
+Errors: 0. Warnings: 2.
 class_module_95d0-__Int.html
 class_module_95d0-__Object.html
 class_module_95d0-__Sys.html
@@ -5,33 +8,12 @@ class_module_95d1-__A.html
 class_module_95d1-__B.html
 css/
 dep_class_module_95d0-__Int.dot
-dep_class_module_95d0-__Int.map
-dep_class_module_95d0-__Int.png
-dep_class_module_95d0-__Int.s.dot
 dep_class_module_95d0-__Object.dot
-dep_class_module_95d0-__Object.map
-dep_class_module_95d0-__Object.png
-dep_class_module_95d0-__Object.s.dot
 dep_class_module_95d0-__Sys.dot
-dep_class_module_95d0-__Sys.map
-dep_class_module_95d0-__Sys.png
-dep_class_module_95d0-__Sys.s.dot
 dep_class_module_95d1-__A.dot
-dep_class_module_95d1-__A.map
-dep_class_module_95d1-__A.png
-dep_class_module_95d1-__A.s.dot
 dep_class_module_95d1-__B.dot
-dep_class_module_95d1-__B.map
-dep_class_module_95d1-__B.png
-dep_class_module_95d1-__B.s.dot
 dep_module_module_95d0-.dot
-dep_module_module_95d0-.map
-dep_module_module_95d0-.png
-dep_module_module_95d0-.s.dot
 dep_module_module_95d1-.dot
-dep_module_module_95d1-.map
-dep_module_module_95d1-.png
-dep_module_module_95d1-.s.dot
 group_module_95d0.html
 group_module_95d1.html
 index.html
index 7906750..fd347db 100644 (file)
@@ -1,3 +1,5 @@
+Empty README for group `base_attr_nullable` (readme-warning)
+Errors: 0. Warnings: 1.
 class_base_attr_nullable-__Bar.html
 class_base_attr_nullable-__Bool.html
 class_base_attr_nullable-__Foo.html
@@ -7,45 +9,24 @@ class_base_attr_nullable-__Object.html
 class_base_attr_nullable-__Sys.html
 css/
 dep_class_base_attr_nullable-__Bar.dot
-dep_class_base_attr_nullable-__Bar.map
-dep_class_base_attr_nullable-__Bar.png
-dep_class_base_attr_nullable-__Bar.s.dot
 dep_class_base_attr_nullable-__Bool.dot
-dep_class_base_attr_nullable-__Bool.map
-dep_class_base_attr_nullable-__Bool.png
-dep_class_base_attr_nullable-__Bool.s.dot
 dep_class_base_attr_nullable-__Foo.dot
-dep_class_base_attr_nullable-__Foo.map
-dep_class_base_attr_nullable-__Foo.png
-dep_class_base_attr_nullable-__Foo.s.dot
 dep_class_base_attr_nullable-__Int.dot
-dep_class_base_attr_nullable-__Int.map
-dep_class_base_attr_nullable-__Int.png
-dep_class_base_attr_nullable-__Int.s.dot
 dep_class_base_attr_nullable-__Integer.dot
-dep_class_base_attr_nullable-__Integer.map
-dep_class_base_attr_nullable-__Integer.png
-dep_class_base_attr_nullable-__Integer.s.dot
 dep_class_base_attr_nullable-__Object.dot
-dep_class_base_attr_nullable-__Object.map
-dep_class_base_attr_nullable-__Object.png
-dep_class_base_attr_nullable-__Object.s.dot
 dep_class_base_attr_nullable-__Sys.dot
-dep_class_base_attr_nullable-__Sys.map
-dep_class_base_attr_nullable-__Sys.png
-dep_class_base_attr_nullable-__Sys.s.dot
 dep_module_base_attr_nullable-.dot
-dep_module_base_attr_nullable-.map
-dep_module_base_attr_nullable-.png
-dep_module_base_attr_nullable-.s.dot
 group_base_attr_nullable.html
 index.html
 js/
 less/
 module_base_attr_nullable-.html
 property_base_attr_nullable-__Bar__a3.html
+property_base_attr_nullable-__Bar__a3_61d.html
 property_base_attr_nullable-__Foo__a1.html
+property_base_attr_nullable-__Foo__a1_61d.html
 property_base_attr_nullable-__Foo__a2.html
+property_base_attr_nullable-__Foo__a2_61d.html
 property_base_attr_nullable-__Foo__nop.html
 property_base_attr_nullable-__Foo__run.html
 property_base_attr_nullable-__Foo__run_other.html
@@ -54,6 +35,7 @@ property_base_attr_nullable-__Int__output.html
 property_base_attr_nullable-__Integer__init.html
 property_base_attr_nullable-__Integer__output.html
 property_base_attr_nullable-__Integer__val.html
+property_base_attr_nullable-__Integer__val_61d.html
 property_base_attr_nullable-__Object__init.html
 property_base_attr_nullable-__Sys__main.html
 quicksearch-list.js
index 5b34671..4d76b95 100644 (file)
@@ -1,3 +1,5 @@
+Empty README for group `base_attr_nullable` (readme-warning)
+Errors: 0. Warnings: 1.
 class_base_attr_nullable-__Bar.html
 class_base_attr_nullable-__Bool.html
 class_base_attr_nullable-__Foo.html
@@ -7,37 +9,13 @@ class_base_attr_nullable-__Object.html
 class_base_attr_nullable-__Sys.html
 css/
 dep_class_base_attr_nullable-__Bar.dot
-dep_class_base_attr_nullable-__Bar.map
-dep_class_base_attr_nullable-__Bar.png
-dep_class_base_attr_nullable-__Bar.s.dot
 dep_class_base_attr_nullable-__Bool.dot
-dep_class_base_attr_nullable-__Bool.map
-dep_class_base_attr_nullable-__Bool.png
-dep_class_base_attr_nullable-__Bool.s.dot
 dep_class_base_attr_nullable-__Foo.dot
-dep_class_base_attr_nullable-__Foo.map
-dep_class_base_attr_nullable-__Foo.png
-dep_class_base_attr_nullable-__Foo.s.dot
 dep_class_base_attr_nullable-__Int.dot
-dep_class_base_attr_nullable-__Int.map
-dep_class_base_attr_nullable-__Int.png
-dep_class_base_attr_nullable-__Int.s.dot
 dep_class_base_attr_nullable-__Integer.dot
-dep_class_base_attr_nullable-__Integer.map
-dep_class_base_attr_nullable-__Integer.png
-dep_class_base_attr_nullable-__Integer.s.dot
 dep_class_base_attr_nullable-__Object.dot
-dep_class_base_attr_nullable-__Object.map
-dep_class_base_attr_nullable-__Object.png
-dep_class_base_attr_nullable-__Object.s.dot
 dep_class_base_attr_nullable-__Sys.dot
-dep_class_base_attr_nullable-__Sys.map
-dep_class_base_attr_nullable-__Sys.png
-dep_class_base_attr_nullable-__Sys.s.dot
 dep_module_base_attr_nullable-.dot
-dep_module_base_attr_nullable-.map
-dep_module_base_attr_nullable-.png
-dep_module_base_attr_nullable-.s.dot
 group_base_attr_nullable.html
 index.html
 js/
index 1f773c6..03c32db 100644 (file)
@@ -3,6 +3,18 @@ OverviewPage Overview
                ## projects.section
                        ### test_prog.definition
 
+ReadmePage test_prog
+       # mdarticle-0
+
+ReadmePage game
+       # mdarticle-0
+
+ReadmePage platform
+       # mdarticle-0
+
+ReadmePage rpg
+       # mdarticle-0
+
 SearchPage Index
        # index.article
 
@@ -524,21 +536,36 @@ MClassPage Career
                ## test_prog__rpg.concern
                ## test_prog__rpg__careers.concern
                        ### test_prog__rpg__careers__Career__endurance_bonus.definition
+                       ### test_prog__rpg__careers__Career__endurance_bonus_61d.definition
                        ### test_prog__rpg__careers__Career__intelligence_bonus.definition
+                       ### test_prog__rpg__careers__Career__intelligence_bonus_61d.definition
                        ### test_prog__rpg__careers__Career__strength_bonus.definition
+                       ### test_prog__rpg__careers__Career__strength_bonus_61d.definition
 
 MPropertyPage endurance_bonus
        # endurance_bonus.section
                ## test_prog__rpg__careers__Career__endurance_bonus.intro
 
+MPropertyPage endurance_bonus=
+       # endurance_bonus=.section
+               ## test_prog__rpg__careers__Career__endurance_bonus_61d.intro
+
 MPropertyPage intelligence_bonus
        # intelligence_bonus.section
                ## test_prog__rpg__careers__Career__intelligence_bonus.intro
 
+MPropertyPage intelligence_bonus=
+       # intelligence_bonus=.section
+               ## test_prog__rpg__careers__Career__intelligence_bonus_61d.intro
+
 MPropertyPage strength_bonus
        # strength_bonus.section
                ## test_prog__rpg__careers__Career__strength_bonus.intro
 
+MPropertyPage strength_bonus=
+       # strength_bonus=.section
+               ## test_prog__rpg__careers__Career__strength_bonus_61d.intro
+
 MClassPage Magician
        # Magician.section
                ## test_prog__rpg__careers__Magician.intro
@@ -616,14 +643,19 @@ MClassPage Character
                ## test_prog__rpg.concern
                ## test_prog__rpg__character.concern
                        ### test_prog__rpg__character__Character__age.definition
+                       ### test_prog__rpg__character__Character__age_61d.definition
                        ### test_prog__rpg__character__Character__career.definition
                        ### test_prog__rpg__character__Character__career_61d.definition
                        ### test_prog__rpg__character__Character__health.definition
+                       ### test_prog__rpg__character__Character__health_61d.definition
                        ### test_prog__rpg__character__Character__max_health.definition
                        ### test_prog__rpg__character__Character__name.definition
+                       ### test_prog__rpg__character__Character__name_61d.definition
                        ### test_prog__rpg__character__Character__quit.definition
                        ### test_prog__rpg__character__Character__race.definition
+                       ### test_prog__rpg__character__Character__race_61d.definition
                        ### test_prog__rpg__character__Character__sex.definition
+                       ### test_prog__rpg__character__Character__sex_61d.definition
                        ### test_prog__rpg__character__Character__total_endurance.definition
                        ### test_prog__rpg__character__Character__total_intelligence.definition
                        ### test_prog__rpg__character__Character__total_strengh.definition
@@ -635,6 +667,10 @@ MPropertyPage age
        # age.section
                ## test_prog__rpg__character__Character__age.intro
 
+MPropertyPage age=
+       # age=.section
+               ## test_prog__rpg__character__Character__age_61d.intro
+
 MPropertyPage career
        # career.section
                ## test_prog__rpg__character__Character__career.intro
@@ -647,6 +683,10 @@ MPropertyPage health
        # health.section
                ## test_prog__rpg__character__Character__health.intro
 
+MPropertyPage health=
+       # health=.section
+               ## test_prog__rpg__character__Character__health_61d.intro
+
 MPropertyPage max_health
        # max_health.section
                ## test_prog__rpg__character__Character__max_health.intro
@@ -655,6 +695,10 @@ MPropertyPage name
        # name.section
                ## test_prog__rpg__character__Character__name.intro
 
+MPropertyPage name=
+       # name=.section
+               ## test_prog__rpg__character__Character__name_61d.intro
+
 MPropertyPage quit
        # quit.section
                ## test_prog__rpg__character__Character__quit.intro
@@ -663,10 +707,18 @@ MPropertyPage race
        # race.section
                ## test_prog__rpg__character__Character__race.intro
 
+MPropertyPage race=
+       # race=.section
+               ## test_prog__rpg__character__Character__race_61d.intro
+
 MPropertyPage sex
        # sex.section
                ## test_prog__rpg__character__Character__sex.intro
 
+MPropertyPage sex=
+       # sex=.section
+               ## test_prog__rpg__character__Character__sex_61d.intro
+
 MPropertyPage total_endurance
        # total_endurance.section
                ## test_prog__rpg__character__Character__total_endurance.intro
@@ -916,21 +968,36 @@ MClassPage Race
                ## test_prog__rpg.concern
                ## test_prog__rpg__races.concern
                        ### test_prog__rpg__races__Race__base_endurance.definition
+                       ### test_prog__rpg__races__Race__base_endurance_61d.definition
                        ### test_prog__rpg__races__Race__base_intelligence.definition
+                       ### test_prog__rpg__races__Race__base_intelligence_61d.definition
                        ### test_prog__rpg__races__Race__base_strength.definition
+                       ### test_prog__rpg__races__Race__base_strength_61d.definition
 
 MPropertyPage base_endurance
        # base_endurance.section
                ## test_prog__rpg__races__Race__base_endurance.intro
 
+MPropertyPage base_endurance=
+       # base_endurance=.section
+               ## test_prog__rpg__races__Race__base_endurance_61d.intro
+
 MPropertyPage base_intelligence
        # base_intelligence.section
                ## test_prog__rpg__races__Race__base_intelligence.intro
 
+MPropertyPage base_intelligence=
+       # base_intelligence=.section
+               ## test_prog__rpg__races__Race__base_intelligence_61d.intro
+
 MPropertyPage base_strength
        # base_strength.section
                ## test_prog__rpg__races__Race__base_strength.intro
 
+MPropertyPage base_strength=
+       # base_strength=.section
+               ## test_prog__rpg__races__Race__base_strength_61d.intro
+
 MModulePage rpg
        # rpg.section
                ## test_prog__rpg__rpg.intro
@@ -940,23 +1007,24 @@ MModulePage rpg
                                #### test_prog__rpg__rpg.imports
                                #### test_prog__rpg__rpg.clients
 
-Generated 81 pages
+Generated 96 pages
  list:
-  MPropertyPage: 47 (58.02%)
-  MClassPage: 20 (24.69%)
-  MModulePage: 8 (9.87%)
-  MGroupPage: 4 (4.93%)
-  SearchPage: 1 (1.23%)
-  OverviewPage: 1 (1.23%)
-Found 160 mentities
+  MPropertyPage: 58 (60.41%)
+  MClassPage: 20 (20.83%)
+  MModulePage: 8 (8.33%)
+  MGroupPage: 4 (4.16%)
+  ReadmePage: 4 (4.16%)
+  SearchPage: 1 (1.04%)
+  OverviewPage: 1 (1.04%)
+Found 182 mentities
  list:
-  MMethodDef: 57 (35.62%)
-  MMethod: 46 (28.75%)
-  MClassDef: 22 (13.75%)
-  MClass: 20 (12.50%)
-  MModule: 8 (5.00%)
-  MGroup: 4 (2.50%)
-  MVirtualTypeDef: 1 (0.62%)
-  MVirtualTypeProp: 1 (0.62%)
-  MProject: 1 (0.62%)
+  MMethodDef: 68 (37.36%)
+  MMethod: 57 (31.31%)
+  MClassDef: 22 (12.08%)
+  MClass: 20 (10.98%)
+  MModule: 8 (4.39%)
+  MGroup: 4 (2.19%)
+  MVirtualTypeDef: 1 (0.54%)
+  MVirtualTypeProp: 1 (0.54%)
+  MProject: 1 (0.54%)
 quicksearch-list.js
diff --git a/tests/sav/niti/fixme/neo_doxygen_dump_args2.res b/tests/sav/niti/fixme/neo_doxygen_dump_args2.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/neo_doxygen_dump_args3.res b/tests/sav/niti/fixme/neo_doxygen_dump_args3.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/neo_doxygen_dump_args4.res b/tests/sav/niti/fixme/neo_doxygen_dump_args4.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/neo_doxygen_dump_args5.res b/tests/sav/niti/fixme/neo_doxygen_dump_args5.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/neo_doxygen_dump_args6.res b/tests/sav/niti/fixme/neo_doxygen_dump_args6.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/neo_doxygen_dump_args7.res b/tests/sav/niti/fixme/neo_doxygen_dump_args7.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/neo_doxygen_dump_args8.res b/tests/sav/niti/fixme/neo_doxygen_dump_args8.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/neo_doxygen_dump_args9.res b/tests/sav/niti/fixme/neo_doxygen_dump_args9.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/nitdoc_args4.res b/tests/sav/niti/fixme/nitdoc_args4.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/nitiwiki_args1.res b/tests/sav/niti/fixme/nitiwiki_args1.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/test_binary.res b/tests/sav/niti/fixme/test_binary.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/test_binary_alt1.res b/tests/sav/niti/fixme/test_binary_alt1.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/test_binary_alt2.res b/tests/sav/niti/fixme/test_binary_alt2.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/test_binary_alt3.res b/tests/sav/niti/fixme/test_binary_alt3.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/test_exec.res b/tests/sav/niti/fixme/test_exec.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
diff --git a/tests/sav/niti/fixme/test_fdstream.res b/tests/sav/niti/fixme/test_fdstream.res
deleted file mode 100644 (file)
index 4ad3dc3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UNDEFINED
index 3ed880e..ceb231d 100644 (file)
@@ -1,7 +1,6 @@
 nitiWiki
 name: wiki2
 config: ../contrib/nitiwiki/tests/wiki1/config2.ini
-url: http://localhost/
 
 There is modified files:
  + pages
index adf25a7..1b690b0 100644 (file)
@@ -1 +1,3 @@
-Render section out
+Render section pages -> out
+Render article index -> ../contrib/nitiwiki/tests/wiki1/out/index.html
+Render article sitemap -> ../contrib/nitiwiki/tests/wiki1/out/sitemap.html
diff --git a/tests/sav/nitj.res b/tests/sav/nitj.res
new file mode 100644 (file)
index 0000000..e50ad70
--- /dev/null
@@ -0,0 +1,2 @@
+Usage: [OPTION]... [ARG]...
+Use --help for help
diff --git a/tests/sav/nitj/base_autocast_alt1.res b/tests/sav/nitj/base_autocast_alt1.res
new file mode 100644 (file)
index 0000000..099b7d9
--- /dev/null
@@ -0,0 +1,4 @@
+1
+2
+1
+2
diff --git a/tests/sav/nitj/base_autocast_array_alt2.res b/tests/sav/nitj/base_autocast_array_alt2.res
new file mode 100644 (file)
index 0000000..91b441c
--- /dev/null
@@ -0,0 +1,3 @@
+Runtime error: Cast failed (alt/base_autocast_array_alt2.nit:45)
+10
+10
diff --git a/tests/sav/nitj/base_class_name.res b/tests/sav/nitj/base_class_name.res
new file mode 100644 (file)
index 0000000..a0915cd
--- /dev/null
@@ -0,0 +1,6 @@
+FlatString
+Int
+Test
+Test
+MyArray
+TotoToto
diff --git a/tests/sav/nitj/base_dead_code_alt1.res b/tests/sav/nitj/base_dead_code_alt1.res
new file mode 100644 (file)
index 0000000..4248087
--- /dev/null
@@ -0,0 +1,6 @@
+alt/base_dead_code_alt1.nit:23,3: Warning: expression is not null, since it is a `Array[Int]`.
+alt/base_dead_code_alt1.nit:34,10--21: Warning: expression is already a `String`.
+Runtime error: Cast failed. Expected `String`, got `Array` (alt/base_dead_code_alt1.nit:22)
+0
+1
+1
diff --git a/tests/sav/nitj/base_gen_variance2_alt1.res b/tests/sav/nitj/base_gen_variance2_alt1.res
new file mode 100644 (file)
index 0000000..a208171
--- /dev/null
@@ -0,0 +1,5 @@
+3
+2
+!3
+!2
+!100
diff --git a/tests/sav/nitj/base_gen_variance2_alt2.res b/tests/sav/nitj/base_gen_variance2_alt2.res
new file mode 100644 (file)
index 0000000..8e5730c
--- /dev/null
@@ -0,0 +1,5 @@
+3
+100
+!3
+!2
+!100
diff --git a/tests/sav/nitj/base_gen_variance_alt3.res b/tests/sav/nitj/base_gen_variance_alt3.res
new file mode 100644 (file)
index 0000000..721e38f
--- /dev/null
@@ -0,0 +1,6 @@
+Runtime error: Cast failed (alt/base_gen_variance_alt3.nit:66)
+2
+20
+2
+20
+20
diff --git a/tests/sav/nitj/base_gen_variance_alt5.res b/tests/sav/nitj/base_gen_variance_alt5.res
new file mode 100644 (file)
index 0000000..3b93637
--- /dev/null
@@ -0,0 +1,9 @@
+Runtime error: Cast failed (alt/base_gen_variance_alt5.nit:99)
+2
+20
+2
+20
+2
+20
+2
+20
diff --git a/tests/sav/nitj/base_gen_variance_alt6.res b/tests/sav/nitj/base_gen_variance_alt6.res
new file mode 100644 (file)
index 0000000..43e5f2b
--- /dev/null
@@ -0,0 +1,9 @@
+Runtime error: Cast failed (alt/base_gen_variance_alt6.nit:105)
+2
+20
+2
+20
+2
+20
+2
+20
diff --git a/tests/sav/nitj/base_gen_variance_alt7.res b/tests/sav/nitj/base_gen_variance_alt7.res
new file mode 100644 (file)
index 0000000..7dcbcf0
--- /dev/null
@@ -0,0 +1,10 @@
+2
+20
+2
+20
+2
+20
+2
+20
+2
+20
diff --git a/tests/sav/nitj/base_gen_variance_alt8.res b/tests/sav/nitj/base_gen_variance_alt8.res
new file mode 100644 (file)
index 0000000..7dcbcf0
--- /dev/null
@@ -0,0 +1,10 @@
+2
+20
+2
+20
+2
+20
+2
+20
+2
+20
diff --git a/tests/sav/nitj/base_isa_gen1.res b/tests/sav/nitj/base_isa_gen1.res
new file mode 100644 (file)
index 0000000..4000211
--- /dev/null
@@ -0,0 +1,4 @@
+base_isa_gen1.nit:62,8--14: Warning: expression is already a `A` since it is a `F`.
+base_isa_gen1.nit:65,8--30: Warning: expression is already a `D[Object, Object]` since it is a `G[Object]`.
+base_isa_gen1.nit:66,8--30: Warning: expression is already a `D[Object, Object]` since it is a `E[F]`.
+Runtime error: Assert failed (base_isa_gen1.nit:68)
diff --git a/tests/sav/nitj/base_isa_gen4.res b/tests/sav/nitj/base_isa_gen4.res
new file mode 100644 (file)
index 0000000..203c263
--- /dev/null
@@ -0,0 +1,5 @@
+base_isa_gen4.nit:34,8--15: Warning: expression is already a `A` since it is a `B[Canard]`.
+base_isa_gen4.nit:36,8--23: Warning: expression is already a `B[Animal]` since it is a `B[Canard]`.
+base_isa_gen4.nit:40,8--26: Warning: expression is already a `B[B[Canard]]`.
+base_isa_gen4.nit:42,8--26: Warning: expression is already a `B[B[Animal]]` since it is a `B[B[Canard]]`.
+Runtime error: Assert failed (base_isa_gen4.nit:37)
diff --git a/tests/sav/nitj/base_isa_gen5.res b/tests/sav/nitj/base_isa_gen5.res
new file mode 100644 (file)
index 0000000..26754cf
--- /dev/null
@@ -0,0 +1,5 @@
+base_isa_gen5.nit:39,8--15: Warning: expression is already a `A` since it is a `B[Canard]`.
+base_isa_gen5.nit:41,8--23: Warning: expression is already a `B[Animal]` since it is a `B[Canard]`.
+base_isa_gen5.nit:46,8--26: Warning: expression is already a `B[B[Canard]]`.
+base_isa_gen5.nit:48,8--26: Warning: expression is already a `B[B[Animal]]` since it is a `B[B[Canard]]`.
+Runtime error: Assert failed (base_isa_gen5.nit:42)
diff --git a/tests/sav/nitj/base_isa_gen7.res b/tests/sav/nitj/base_isa_gen7.res
new file mode 100644 (file)
index 0000000..dc14d35
--- /dev/null
@@ -0,0 +1 @@
+Runtime error: Assert failed (base_isa_gen7.nit:49)
diff --git a/tests/sav/nitj/base_isa_nullable1.res b/tests/sav/nitj/base_isa_nullable1.res
new file mode 100644 (file)
index 0000000..ff43ba5
--- /dev/null
@@ -0,0 +1,6 @@
+base_isa_nullable1.nit:39,8--15: Warning: expression is already a `A` since it is a `B[Integer]`.
+base_isa_nullable1.nit:41,8--25: Warning: expression is already a `B[Discrete]` since it is a `B[Integer]`.
+base_isa_nullable1.nit:46,8--27: Warning: expression is already a `B[B[Integer]]`.
+base_isa_nullable1.nit:48,8--28: Warning: expression is already a `B[B[Discrete]]` since it is a `B[B[Integer]]`.
+base_isa_nullable1.nit:50,8--34: Warning: expression is already a `B[nullable Discrete]` since it is a `B[Discrete]`.
+Runtime error: Assert failed (base_isa_nullable1.nit:42)
diff --git a/tests/sav/nitj/base_isa_nullable2.res b/tests/sav/nitj/base_isa_nullable2.res
new file mode 100644 (file)
index 0000000..84216d5
--- /dev/null
@@ -0,0 +1,5 @@
+base_isa_nullable2.nit:27,8--23: Warning: expression is already a `nullable A` since it is a `A`.
+base_isa_nullable2.nit:29,8--31: Warning: expression is already a `nullable B[Object]` since it is a `B[Object]`.
+base_isa_nullable2.nit:30,8--40: Warning: expression is already a `nullable B[nullable Object]` since it is a `nullable B[Object]`.
+base_isa_nullable2.nit:33,8--31: Warning: expression is already a `C[nullable Object]`.
+Runtime error: Assert failed (base_isa_nullable2.nit:32)
diff --git a/tests/sav/nitj/base_isa_vt3.res b/tests/sav/nitj/base_isa_vt3.res
new file mode 100644 (file)
index 0000000..54e76c5
--- /dev/null
@@ -0,0 +1 @@
+Runtime error: Assert failed (base_isa_vt3.nit:42)
diff --git a/tests/sav/nitj/base_isa_vt_ft.res b/tests/sav/nitj/base_isa_vt_ft.res
new file mode 100644 (file)
index 0000000..03110b0
--- /dev/null
@@ -0,0 +1 @@
+Runtime error: Assert failed (base_isa_vt_ft.nit:55)
diff --git a/tests/sav/nitj/base_notnull_lit.res b/tests/sav/nitj/base_notnull_lit.res
new file mode 100644 (file)
index 0000000..aa58772
--- /dev/null
@@ -0,0 +1,4 @@
+Array
+[1,5,6]
+Range
+[1,2,3,4,5]
diff --git a/tests/sav/nitj/base_output_class_name.res b/tests/sav/nitj/base_output_class_name.res
new file mode 100644 (file)
index 0000000..c394072
--- /dev/null
@@ -0,0 +1,6 @@
+Char
+Int
+Test
+Test
+MyArray
+0
diff --git a/tests/sav/nitj/base_self_type.res b/tests/sav/nitj/base_self_type.res
new file mode 100644 (file)
index 0000000..3c20b42
--- /dev/null
@@ -0,0 +1,11 @@
+X
+X
+X
+Y
+Y
+Y
+Y
+A
+G
+B
+G
diff --git a/tests/sav/nitj/base_self_type_alt2.res b/tests/sav/nitj/base_self_type_alt2.res
new file mode 100644 (file)
index 0000000..3c20b42
--- /dev/null
@@ -0,0 +1,11 @@
+X
+X
+X
+Y
+Y
+Y
+Y
+A
+G
+B
+G
diff --git a/tests/sav/nitj/fixme/base_attr_gen_alt1.res b/tests/sav/nitj/fixme/base_attr_gen_alt1.res
new file mode 100644 (file)
index 0000000..3b45242
--- /dev/null
@@ -0,0 +1 @@
+Runtime error: Cast failed (alt/base_attr_gen_alt1.nit:26)
diff --git a/tests/sav/nitj/fixme/base_covar_gen_1alt1_alt1.res b/tests/sav/nitj/fixme/base_covar_gen_1alt1_alt1.res
new file mode 100644 (file)
index 0000000..912346a
--- /dev/null
@@ -0,0 +1 @@
+G0
diff --git a/tests/sav/nitj/fixme/base_covar_gen_1alt1_alt2.res b/tests/sav/nitj/fixme/base_covar_gen_1alt1_alt2.res
new file mode 100644 (file)
index 0000000..912346a
--- /dev/null
@@ -0,0 +1 @@
+G0
diff --git a/tests/sav/nitj/fixme/base_covar_gen_alt3.res b/tests/sav/nitj/fixme/base_covar_gen_alt3.res
new file mode 100644 (file)
index 0000000..332b60c
--- /dev/null
@@ -0,0 +1 @@
+GG0
diff --git a/tests/sav/nitj/fixme/base_covar_gen_alt4.res b/tests/sav/nitj/fixme/base_covar_gen_alt4.res
new file mode 100644 (file)
index 0000000..332b60c
--- /dev/null
@@ -0,0 +1 @@
+GG0
diff --git a/tests/sav/nitj/fixme/base_covar_int2_alt1.res b/tests/sav/nitj/fixme/base_covar_int2_alt1.res
new file mode 100644 (file)
index 0000000..9c5d958
--- /dev/null
@@ -0,0 +1,4 @@
+1
+1
+a1
+a
diff --git a/tests/sav/nitj/fixme/base_covar_int_alt1.res b/tests/sav/nitj/fixme/base_covar_int_alt1.res
new file mode 100644 (file)
index 0000000..f98f9e1
--- /dev/null
@@ -0,0 +1,5 @@
+true
+true
+false
+true
+true
diff --git a/tests/sav/nitj/fixme/base_covar_int_alt5.res b/tests/sav/nitj/fixme/base_covar_int_alt5.res
new file mode 100644 (file)
index 0000000..36c7afa
--- /dev/null
@@ -0,0 +1,5 @@
+true
+true
+true
+true
+true
diff --git a/tests/sav/nitj/fixme/base_formal_isa.res b/tests/sav/nitj/fixme/base_formal_isa.res
new file mode 100644 (file)
index 0000000..7912ac6
--- /dev/null
@@ -0,0 +1,23 @@
+A
+true
+true
+false
+
+G
+true
+true
+false
+true
+false
+
+G
+A
+false
+true
+true
+false
+false
+false
+false
+true
+false
diff --git a/tests/sav/nitj/fixme/base_gen_reassign_alt1.res b/tests/sav/nitj/fixme/base_gen_reassign_alt1.res
new file mode 100644 (file)
index 0000000..bd6deed
--- /dev/null
@@ -0,0 +1,7 @@
+Runtime error: Cast failed (alt/base_gen_reassign_alt1.nit:42)
+11
+21
+31
+12
+22
+32
diff --git a/tests/sav/nitj/fixme/base_gen_reassign_alt2.res b/tests/sav/nitj/fixme/base_gen_reassign_alt2.res
new file mode 100644 (file)
index 0000000..776a9d8
--- /dev/null
@@ -0,0 +1,7 @@
+Runtime error: Cast failed (alt/base_gen_reassign_alt2.nit:45)
+11
+21
+31
+12
+22
+32
diff --git a/tests/sav/nitj/fixme/base_gen_reassign_alt4.res b/tests/sav/nitj/fixme/base_gen_reassign_alt4.res
new file mode 100644 (file)
index 0000000..d93978e
--- /dev/null
@@ -0,0 +1,10 @@
+Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:542)
+11
+21
+31
+12
+22
+32
+12
+22
+32
diff --git a/tests/sav/nitj/fixme/base_gen_reassign_alt5.res b/tests/sav/nitj/fixme/base_gen_reassign_alt5.res
new file mode 100644 (file)
index 0000000..d93978e
--- /dev/null
@@ -0,0 +1,10 @@
+Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:542)
+11
+21
+31
+12
+22
+32
+12
+22
+32
diff --git a/tests/sav/nitj/fixme/base_gen_reassign_alt6.res b/tests/sav/nitj/fixme/base_gen_reassign_alt6.res
new file mode 100644 (file)
index 0000000..d93978e
--- /dev/null
@@ -0,0 +1,10 @@
+Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:542)
+11
+21
+31
+12
+22
+32
+12
+22
+32
diff --git a/tests/sav/nitj/fixme/base_gen_variance3_alt1.res b/tests/sav/nitj/fixme/base_gen_variance3_alt1.res
new file mode 100644 (file)
index 0000000..458bcc5
--- /dev/null
@@ -0,0 +1,4 @@
+2
+100
+!2
+!100
diff --git a/tests/sav/nitj/fixme/base_gen_variance_int_alt1.res b/tests/sav/nitj/fixme/base_gen_variance_int_alt1.res
new file mode 100644 (file)
index 0000000..0096ae2
--- /dev/null
@@ -0,0 +1,4 @@
+2
+2
+!2
+!100
diff --git a/tests/sav/nitj/fixme/base_isa_formal_type.res b/tests/sav/nitj/fixme/base_isa_formal_type.res
new file mode 100644 (file)
index 0000000..bba20e9
--- /dev/null
@@ -0,0 +1,63 @@
+true
+true
+true
+true
+true
+true
+true
+true
+
+true
+true
+true
+true
+true
+true
+true
+true
+
+true
+true
+false
+true
+true
+true
+true
+true
+
+true
+true
+true
+true
+true
+true
+true
+true
+
+true
+true
+true
+true
+true
+true
+true
+true
+
+true
+true
+true
+true
+true
+true
+true
+true
+
+true
+true
+true
+true
+true
+true
+true
+true
+
diff --git a/tests/sav/nitj/fixme/base_isa_gen.res b/tests/sav/nitj/fixme/base_isa_gen.res
new file mode 100644 (file)
index 0000000..93d2c6f
--- /dev/null
@@ -0,0 +1,49 @@
+true
+true
+true
+true
+true
+true
+
+false
+true
+true
+true
+true
+true
+
+false
+true
+true
+true
+true
+true
+
+false
+true
+true
+true
+true
+true
+
+false
+true
+true
+true
+true
+true
+
+false
+true
+true
+true
+true
+true
+
+false
+false
+false
+false
+false
+false
+
diff --git a/tests/sav/nitj/fixme/base_vararg2.res b/tests/sav/nitj/fixme/base_vararg2.res
new file mode 100644 (file)
index 0000000..c9a9806
--- /dev/null
@@ -0,0 +1,36 @@
+Array
+ Int
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Bool
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
diff --git a/tests/sav/nitj/fixme/base_vararg2_alt1.res b/tests/sav/nitj/fixme/base_vararg2_alt1.res
new file mode 100644 (file)
index 0000000..8c97a29
--- /dev/null
@@ -0,0 +1,39 @@
+Array
+ Int
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Bool
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
diff --git a/tests/sav/nitj/fixme/base_vararg2_alt2.res b/tests/sav/nitj/fixme/base_vararg2_alt2.res
new file mode 100644 (file)
index 0000000..2a90b4b
--- /dev/null
@@ -0,0 +1,39 @@
+Array
+ Int
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Bool
+ Bool
+Array
+ Bool
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
diff --git a/tests/sav/nitj/fixme/base_vararg2_alt3.res b/tests/sav/nitj/fixme/base_vararg2_alt3.res
new file mode 100644 (file)
index 0000000..2a90b4b
--- /dev/null
@@ -0,0 +1,39 @@
+Array
+ Int
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Bool
+ Bool
+Array
+ Bool
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
diff --git a/tests/sav/nitj/fixme/base_vararg2_alt4.res b/tests/sav/nitj/fixme/base_vararg2_alt4.res
new file mode 100644 (file)
index 0000000..c919e2b
--- /dev/null
@@ -0,0 +1,39 @@
+Array
+ Int
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Bool
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
diff --git a/tests/sav/nitj/fixme/base_vararg2_alt5.res b/tests/sav/nitj/fixme/base_vararg2_alt5.res
new file mode 100644 (file)
index 0000000..2731703
--- /dev/null
@@ -0,0 +1,39 @@
+Array
+ Int
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Bool
+ Bool
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Int
+ Int
+Array
+ Bool
+ Bool
+Array
+ Int
+ Int
diff --git a/tests/sav/nitj/fixme/base_virtual_int2_alt2.res b/tests/sav/nitj/fixme/base_virtual_int2_alt2.res
new file mode 100644 (file)
index 0000000..2e435a2
--- /dev/null
@@ -0,0 +1,3 @@
+4
+4
+4
diff --git a/tests/sav/nitj/fixme/base_virtual_type_variance_int_alt1.res b/tests/sav/nitj/fixme/base_virtual_type_variance_int_alt1.res
new file mode 100644 (file)
index 0000000..0096ae2
--- /dev/null
@@ -0,0 +1,4 @@
+2
+2
+!2
+!100
diff --git a/tests/sav/nitj/test_array_formal.res b/tests/sav/nitj/test_array_formal.res
new file mode 100644 (file)
index 0000000..b313f9a
--- /dev/null
@@ -0,0 +1,51 @@
+true
+true
+true
+
+true
+true
+true
+
+true
+true
+true
+
+true
+true
+true
+
+
+true
+true
+true
+
+true
+true
+true
+
+true
+true
+true
+
+true
+true
+true
+
+
+true
+true
+true
+
+true
+true
+true
+
+true
+true
+true
+
+true
+true
+true
+
+
diff --git a/tests/sav/nitj/test_json_deserialization_alt1.res b/tests/sav/nitj/test_json_deserialization_alt1.res
new file mode 100644 (file)
index 0000000..f4b4a49
--- /dev/null
@@ -0,0 +1,40 @@
+Runtime error: Aborted (../lib/serialization/serialization.nit:111)
+# Nit:
+<A: true a 0.123 1234 asdf false p4ssw0rd>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null}
+
+# Back in Nit:
+<A: true a 0.123 1234 asdf false p4ssw0rd>
+
+# Nit:
+<B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "ii": 1111, "ss": "qwer"}
+
+# Back in Nit:
+<B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>
+
+# Nit:
+<C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "C", "a": {"__kind": "obj", "__id": 1, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null}, "b": {"__kind": "obj", "__id": 2, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "ii": 1111, "ss": "qwer"}, "aa": {"__kind": "ref", "__id": 1}}
+
+# Back in Nit:
+<C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>>
+
+# Nit:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false p4ssw0rd> 1111        f"\r\/> true>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "D", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "new line ->\n<-", "n": null, "ii": 1111, "ss": "\tf\"\r\\\/", "d": {"__kind": "ref", "__id": 0}}
+
+# Back in Nit:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false p4ssw0rd> 1111        f"\r\/> true>
+
+Error: doesn't know how to deserialize class "Array"
diff --git a/tests/sav/nitj/test_meta.res b/tests/sav/nitj/test_meta.res
new file mode 100644 (file)
index 0000000..ad6cdbf
--- /dev/null
@@ -0,0 +1,14 @@
+FlatString
+FlatString
+Class
+Class
+
+XObject
+XObject
+XClass
+Class
+
+YObject
+YObject
+YClass
+YClass
diff --git a/tests/sav/nitj/test_new_native.res b/tests/sav/nitj/test_new_native.res
new file mode 100644 (file)
index 0000000..44b504c
--- /dev/null
@@ -0,0 +1,9 @@
+NativeString
+N
+Nit
+NativeArray
+3
+1
+1,10,100
+1
+1
diff --git a/tests/sav/nitj/test_new_native_alt1.res b/tests/sav/nitj/test_new_native_alt1.res
new file mode 100644 (file)
index 0000000..cf6635c
--- /dev/null
@@ -0,0 +1,9 @@
+NativeString
+N
+Nit
+NativeArray
+3
+1
+1,true,100
+1
+1
diff --git a/tests/sav/nitj/test_serialization.res b/tests/sav/nitj/test_serialization.res
new file mode 100644 (file)
index 0000000..4217115
--- /dev/null
@@ -0,0 +1,25 @@
+# Nit:
+<A: true a 0.123 1234 asdf false>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}
+
+# Nit:
+<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "qwer"}
+
+# Nit:
+<C: <A: true a 0.123 1234 asdf false> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "C", "a": {"__kind": "obj", "__id": 1, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 2, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}, "b": {"__kind": "obj", "__id": 3, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 4, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "qwer"}, "aa": {"__kind": "ref", "__id": 1}}
+
+# Nit:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false> 1111         f"\r\/> true>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "D", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "new line ->\n<-", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "\tf\"\r\\\/", "d": {"__kind": "ref", "__id": 0}}
+
diff --git a/tests/sav/nitj/test_serialization_alt2.res b/tests/sav/nitj/test_serialization_alt2.res
new file mode 100644 (file)
index 0000000..34da2d6
--- /dev/null
@@ -0,0 +1,28 @@
+alt/test_serialization_alt2.nit:22,1--47,3: Warning: superfluous use of `serialize`.
+alt/test_serialization_alt2.nit:70,1--86,3: Warning: superfluous use of `auto_serializable`.
+alt/test_serialization_alt2.nit:88,1--96,3: Warning: superfluous use of `auto_serializable`.
+# Nit:
+<A: true a 0.123 1234 asdf false>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "A", "b": true, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}
+
+# Nit:
+<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "B", "b": false, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}
+
+# Nit:
+<C: <A: true a 0.123 1234 asdf false> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "C", "a": {"__kind": "obj", "__id": 1, "__class": "A", "b": true, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 2, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}, "b": {"__kind": "obj", "__id": 3, "__class": "B", "b": false, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 4, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}, "aa": {"__kind": "ref", "__id": 1}}
+
+# Nit:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false> 1111         f"\r\/> true>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "D", "b": false, "f": 123.123, "i": 2345, "s": "new line ->\n<-", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "d": {"__kind": "ref", "__id": 0}}
+
diff --git a/tests/sav/nitj/test_serialization_alt3.res b/tests/sav/nitj/test_serialization_alt3.res
new file mode 100644 (file)
index 0000000..afd0ee8
--- /dev/null
@@ -0,0 +1,26 @@
+alt/test_serialization_alt3.nit:49,1--68,3: Warning: superfluous use of `noserialize`.
+# Nit:
+<A: true a 0.123 1234 asdf false>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}
+
+# Nit:
+<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}
+
+# Nit:
+<C: <A: true a 0.123 1234 asdf false> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "C", "a": {"__kind": "obj", "__id": 1, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 2, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}, "b": {"__kind": "obj", "__id": 3, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 4, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}, "aa": {"__kind": "ref", "__id": 1}}
+
+# Nit:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false> 1111         f"\r\/> true>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "D", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "new line ->\n<-", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "d": {"__kind": "ref", "__id": 0}}
+
diff --git a/tests/sav/nitj/test_serialization_alt4.res b/tests/sav/nitj/test_serialization_alt4.res
new file mode 100644 (file)
index 0000000..e843c62
--- /dev/null
@@ -0,0 +1,26 @@
+alt/test_serialization_alt4.nit:29,2--31,26: Warning: superfluous use of `serialize`.
+# Nit:
+<A: true a 0.123 1234 asdf false>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}
+
+# Nit:
+<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "qwer"}
+
+# Nit:
+<C: <A: true a 0.123 1234 asdf false> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "C", "a": {"__kind": "obj", "__id": 1, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 2, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}, "b": {"__kind": "obj", "__id": 3, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 4, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "qwer"}, "aa": {"__kind": "ref", "__id": 1}}
+
+# Nit:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false> 1111         f"\r\/> true>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "D", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "new line ->\n<-", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "\tf\"\r\\\/", "d": {"__kind": "ref", "__id": 0}}
+
diff --git a/tests/sav/nitj/test_serialization_alt5.res b/tests/sav/nitj/test_serialization_alt5.res
new file mode 100644 (file)
index 0000000..d4ba4e1
--- /dev/null
@@ -0,0 +1,26 @@
+alt/test_serialization_alt5.nit:22,1--47,3: Warning: duplicated annotation `serialize`.
+# Nit:
+<A: true a 0.123 1234 asdf false>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}
+
+# Nit:
+<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "qwer"}
+
+# Nit:
+<C: <A: true a 0.123 1234 asdf false> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "C", "a": {"__kind": "obj", "__id": 1, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 2, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}, "b": {"__kind": "obj", "__id": 3, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 4, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "qwer"}, "aa": {"__kind": "ref", "__id": 1}}
+
+# Nit:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false> 1111         f"\r\/> true>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "D", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "new line ->\n<-", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "\tf\"\r\\\/", "d": {"__kind": "ref", "__id": 0}}
+
diff --git a/tests/sav/nitj/test_serialization_redef.res b/tests/sav/nitj/test_serialization_redef.res
new file mode 100644 (file)
index 0000000..4217115
--- /dev/null
@@ -0,0 +1,25 @@
+# Nit:
+<A: true a 0.123 1234 asdf false>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}
+
+# Nit:
+<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "qwer"}
+
+# Nit:
+<C: <A: true a 0.123 1234 asdf false> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "C", "a": {"__kind": "obj", "__id": 1, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 2, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}, "b": {"__kind": "obj", "__id": 3, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 4, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "qwer"}, "aa": {"__kind": "ref", "__id": 1}}
+
+# Nit:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false> 1111         f"\r\/> true>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "D", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "new line ->\n<-", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "\tf\"\r\\\/", "d": {"__kind": "ref", "__id": 0}}
+
diff --git a/tests/sav/nitj/test_serialization_redef_alt0.res b/tests/sav/nitj/test_serialization_redef_alt0.res
new file mode 100644 (file)
index 0000000..53a12e3
--- /dev/null
@@ -0,0 +1,25 @@
+# Nit:
+<A: true a 0.123 1234 asdf false>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "iii": 6789, "sss": "redef"}
+
+# Nit:
+<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "iii": 6789, "sss": "redef", "ii": 1111, "ss": "qwer"}
+
+# Nit:
+<C: <A: true a 0.123 1234 asdf false> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "C", "a": {"__kind": "obj", "__id": 1, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 2, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "iii": 6789, "sss": "redef"}, "b": {"__kind": "obj", "__id": 3, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 4, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "iii": 6789, "sss": "redef", "ii": 1111, "ss": "qwer"}, "aa": {"__kind": "ref", "__id": 1}}
+
+# Nit:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false> 1111         f"\r\/> true>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "D", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "new line ->\n<-", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "iii": 6789, "sss": "redef", "ii": 1111, "ss": "\tf\"\r\\\/", "d": {"__kind": "ref", "__id": 0}}
+
diff --git a/tests/sav/nitj/test_serialization_redef_alt1.res b/tests/sav/nitj/test_serialization_redef_alt1.res
new file mode 100644 (file)
index 0000000..60bf2d1
--- /dev/null
@@ -0,0 +1,25 @@
+# Nit:
+<A: true a 0.123 1234 asdf false>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}
+
+# Nit:
+<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "qwer", "ffff": 6.789, "bbbb": false}
+
+# Nit:
+<C: <A: true a 0.123 1234 asdf false> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "C", "a": {"__kind": "obj", "__id": 1, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 2, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}}, "b": {"__kind": "obj", "__id": 3, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 4, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "qwer", "ffff": 6.789, "bbbb": false}, "aa": {"__kind": "ref", "__id": 1}}
+
+# Nit:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false> 1111         f"\r\/> true>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "D", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "new line ->\n<-", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "\tf\"\r\\\/", "ffff": 6.789, "bbbb": false, "d": {"__kind": "ref", "__id": 0}}
+
diff --git a/tests/sav/nitj/test_serialization_redef_alt2.res b/tests/sav/nitj/test_serialization_redef_alt2.res
new file mode 100644 (file)
index 0000000..32f461f
--- /dev/null
@@ -0,0 +1,25 @@
+# Nit:
+<A: true a 0.123 1234 asdf false>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "iii": 6789, "sss": "redef"}
+
+# Nit:
+<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "iii": 6789, "sss": "redef", "ii": 1111, "ss": "qwer", "ffff": 6.789, "bbbb": false}
+
+# Nit:
+<C: <A: true a 0.123 1234 asdf false> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "C", "a": {"__kind": "obj", "__id": 1, "__class": "A", "b": true, "c": {"__kind": "char", "__val": "a"}, "f": 0.123, "i": 1234, "s": "asdf", "n": null, "array": {"__kind": "obj", "__id": 2, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "iii": 6789, "sss": "redef"}, "b": {"__kind": "obj", "__id": 3, "__class": "B", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "array": {"__kind": "obj", "__id": 4, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "iii": 6789, "sss": "redef", "ii": 1111, "ss": "qwer", "ffff": 6.789, "bbbb": false}, "aa": {"__kind": "ref", "__id": 1}}
+
+# Nit:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false> 1111         f"\r\/> true>
+
+# Json:
+{"__kind": "obj", "__id": 0, "__class": "D", "b": false, "c": {"__kind": "char", "__val": "b"}, "f": 123.123, "i": 2345, "s": "new line ->\n<-", "n": null, "array": {"__kind": "obj", "__id": 1, "__class": "Array", "__length": 3, "__items": [88, "hello", null]}, "iii": 6789, "sss": "redef", "ii": 1111, "ss": "\tf\"\r\\\/", "ffff": 6.789, "bbbb": false, "d": {"__kind": "ref", "__id": 0}}
+
index 1813e55..50a8863 100644 (file)
@@ -294,8 +294,8 @@ Distribution of direct smallers
   AListExprs: 19 (7.03%)
   ACallExpr: 18 (6.66%)
   TClassid: 15 (5.55%)
-  TNumber: 10 (3.70%)
-  ADecIntExpr: 10 (3.70%)
+  TInteger: 10 (3.70%)
+  AIntegerExpr: 10 (3.70%)
   AType: 9 (3.33%)
   TKwend: 8 (2.96%)
   ASignature: 8 (2.96%)
@@ -695,12 +695,13 @@ Statistics of type usage:
   A: 1 (11.11%)
 
 # Mendel metrics
-       large mclasses (threshold: 3.354)
+       large mclasses (threshold: 3.915)
+          C: 5
+          B: 4
           Sys: 4
-       budding mclasses (threshold: 4.177)
-          Sys: 5.0
-       blooming mclasses (threshold: 14.626)
-          Sys: 20.0
+       budding mclasses (threshold: 5.033)
+       blooming mclasses (threshold: 21.874)
+          C: 25.0
 --- Detection of the usage of covariance static type conformance ---
 -- Total --
 - Kinds of the subtype -
@@ -857,49 +858,49 @@ Number of buggy sends (cannot determine the type of the receiver): 0 (0.00%)
          sum: 0
 
  ## Callsites
-* 22 live callsites
+* 23 live callsites
 MMethodDef locally designated (by number of CallSites)
- population: 13
+ population: 14
  minimum value: 1
  maximum value: 10
- total value: 22
- average value: 1.69
+ total value: 23
+ average value: 1.64
  distribution:
-  <=1: sub-population=12 (92.30%); cumulated value=12 (54.54%)
-  <=16: sub-population=1 (7.69%); cumulated value=10 (45.45%)
+  <=1: sub-population=13 (92.85%); cumulated value=13 (56.52%)
+  <=16: sub-population=1 (7.14%); cumulated value=10 (43.47%)
  list:
-  base_simple3#Int#output: 10 (45.45%)
-  base_simple3#B#val: 1 (4.54%)
-  base_simple3#B#val=: 1 (4.54%)
-  base_simple3#C#val2: 1 (4.54%)
-  base_simple3#C#val1: 1 (4.54%)
+  base_simple3#Int#output: 10 (43.47%)
+  base_simple3#B#val: 1 (4.34%)
+  base_simple3#B#val=: 1 (4.34%)
+  base_simple3#Object#init: 1 (4.34%)
+  base_simple3#C#val2: 1 (4.34%)
   ...
-  base_simple3#A#init: 1 (4.54%)
-  base_simple3#Sys#baz: 1 (4.54%)
-  base_simple3#Sys#bar: 1 (4.54%)
-  base_simple3#Sys#foo: 1 (4.54%)
-  base_simple3#C#init: 1 (4.54%)
+  base_simple3#A#init: 1 (4.34%)
+  base_simple3#Sys#baz: 1 (4.34%)
+  base_simple3#Sys#bar: 1 (4.34%)
+  base_simple3#Sys#foo: 1 (4.34%)
+  base_simple3#C#init: 1 (4.34%)
 MMethodDef possibly invoked at runtime (by number of CallSites)
- population: 13
+ population: 14
  minimum value: 1
  maximum value: 10
- total value: 22
- average value: 1.69
+ total value: 23
+ average value: 1.64
  distribution:
-  <=1: sub-population=12 (92.30%); cumulated value=12 (54.54%)
-  <=16: sub-population=1 (7.69%); cumulated value=10 (45.45%)
+  <=1: sub-population=13 (92.85%); cumulated value=13 (56.52%)
+  <=16: sub-population=1 (7.14%); cumulated value=10 (43.47%)
  list:
-  base_simple3#Int#output: 10 (45.45%)
-  base_simple3#B#val: 1 (4.54%)
-  base_simple3#B#val=: 1 (4.54%)
-  base_simple3#C#val2: 1 (4.54%)
-  base_simple3#C#val1: 1 (4.54%)
+  base_simple3#Int#output: 10 (43.47%)
+  base_simple3#B#val: 1 (4.34%)
+  base_simple3#B#val=: 1 (4.34%)
+  base_simple3#Object#init: 1 (4.34%)
+  base_simple3#C#val2: 1 (4.34%)
   ...
-  base_simple3#A#init: 1 (4.54%)
-  base_simple3#Sys#baz: 1 (4.54%)
-  base_simple3#Sys#bar: 1 (4.54%)
-  base_simple3#Sys#foo: 1 (4.54%)
-  base_simple3#C#init: 1 (4.54%)
+  base_simple3#A#init: 1 (4.34%)
+  base_simple3#Sys#baz: 1 (4.34%)
+  base_simple3#Sys#bar: 1 (4.34%)
+  base_simple3#Sys#foo: 1 (4.34%)
+  base_simple3#C#init: 1 (4.34%)
 class_hierarchy.dot
 classdef_hierarchy.dot
 inheritance/
index b79b2fc..f9e2cbb 100644 (file)
@@ -1,7 +1,4 @@
-../lib/standard/bytes.nit:51,7--19: Documentation warning: Undocumented property `with_capacity`
-../lib/standard/bytes.nit:164,6--13: Documentation warning: Undocumented property `to_bytes`
-../lib/standard/stream.nit:425,6--17: Documentation warning: Undocumented property `buffer_reset`
-../lib/standard/file.nit:455,6--19: Documentation warning: Undocumented property `read_all_bytes`
+../lib/standard/stream.nit:451,6--17: Documentation warning: Undocumented property `buffer_reset`
 test_advice_repeated_types.nit:36,15--20: Warning: useless type repetition on redefined attribute `_a`
 test_advice_repeated_types.nit:37,18--20: Warning: useless type repetition on parameter `b1` for redefined method `b`
 test_advice_repeated_types.nit:38,18--20: Warning: useless type repetition on parameter `c1` for redefined method `c`
diff --git a/tests/sav/nitpick_args2.res b/tests/sav/nitpick_args2.res
new file mode 100644 (file)
index 0000000..573541a
--- /dev/null
@@ -0,0 +1 @@
+0
diff --git a/tests/sav/nitpick_args3.res b/tests/sav/nitpick_args3.res
new file mode 100644 (file)
index 0000000..ecc2f7d
--- /dev/null
@@ -0,0 +1,2 @@
+error_mod_unk.nit:17,8--11: Error: cannot find module `dfgd` from `error_mod_unk`. Tried: ../lib, ../contrib, ..
+1
index ac5aebd..8971f9e 100644 (file)
@@ -1,5 +1,5 @@
-test_nitunit3/README.md: Error: there is a block of invalid Nit code, thus not considered a nitunit. To suppress this warning, enclose the block with a fence tagged `nitish` or `raw` (see `man nitdoc`). At 1,2--4: Syntax Error: unexpected malformed character '\]..
-test_nitunit3/README.md: ERROR: nitunit.test_nitunit3.<group> (in .nitunit/test_nitunit3-0.nit): Runtime error: Assert failed (.nitunit/test_nitunit3-0.nit:7)
+test_nitunit3/README.md:1,0--13,0: Error: there is a block of invalid Nit code, thus not considered a nitunit. To suppress this warning, enclose the block with a fence tagged `nitish` or `raw` (see `man nitdoc`). At 1,2--4: Syntax Error: unexpected malformed character '\]..
+test_nitunit3/README.md:1,0--13,0: ERROR: nitunit.test_nitunit3.<group> (in .nitunit/test_nitunit3-0.nit): Runtime error: Assert failed (.nitunit/test_nitunit3-0.nit:7)
 
 DocUnits:
 Entities: 2; Documented ones: 2; With nitunits: 3; Failures: 2
@@ -7,7 +7,7 @@ Entities: 2; Documented ones: 2; With nitunits: 3; Failures: 2
 TestSuites:
 No test cases found
 Class suites: 0; Test Cases: 0; Failures: 0
-<testsuites><testsuite package="test_nitunit3"><testcase classname="nitunit.test_nitunit3" name="&lt;group&gt;"><failure message="test_nitunit3&#47;README.md: Invalid block of code. At 1,2--4: Syntax Error: unexpected malformed character &#39;\].."></failure><system-err></system-err><system-out>assert false
+<testsuites><testsuite package="test_nitunit3"><testcase classname="nitunit.test_nitunit3" name="&lt;group&gt;"><failure message="test_nitunit3&#47;README.md:1,0--13,0: Invalid block of code. At 1,2--4: Syntax Error: unexpected malformed character &#39;\].."></failure><system-err></system-err><system-out>assert false
 assert true
 </system-out><error message="Runtime error: Assert failed (.nitunit&#47;test_nitunit3-0.nit:7)
 "></error></testcase></testsuite><testsuite package="test_nitunit3"><testcase classname="nitunit.test_nitunit3.&lt;module&gt;" name="&lt;module&gt;"><system-err></system-err><system-out>assert true
index ea6bab2..fc20a76 100644 (file)
@@ -1,4 +1,4 @@
-test_nitunit_md.md: ERROR: nitunit.<file>.test_nitunit_md.md (in .nitunit/file-0.nit): Runtime error: Assert failed (.nitunit/file-0.nit:8)
+test_nitunit_md.md:1,0--15,0: ERROR: nitunit.<file>.test_nitunit_md.md:1,0--15,0 (in .nitunit/file-0.nit): Runtime error: Assert failed (.nitunit/file-0.nit:8)
 
 DocUnits:
 Entities: 1; Documented ones: 1; With nitunits: 1; Failures: 1
@@ -6,7 +6,7 @@ Entities: 1; Documented ones: 1; With nitunits: 1; Failures: 1
 TestSuites:
 No test cases found
 Class suites: 0; Test Cases: 0; Failures: 0
-<testsuites><testsuite package="test_nitunit_md.md"><testcase classname="nitunit.&lt;file&gt;" name="test_nitunit_md.md"><system-err></system-err><system-out>var a = 1
+<testsuites><testsuite package="test_nitunit_md.md:1,0--15,0"><testcase classname="nitunit.&lt;file&gt;" name="test_nitunit_md.md:1,0--15,0"><system-err></system-err><system-out>var a = 1
 assert 1 == 1
 assert false
 </system-out><error message="Runtime error: Assert failed (.nitunit&#47;file-0.nit:8)
diff --git a/tests/sav/s_exp.res b/tests/sav/s_exp.res
new file mode 100644 (file)
index 0000000..1ce7f52
--- /dev/null
@@ -0,0 +1,20 @@
+((data "quoted data" 123.00 4.50) (data (!@# (4.50) "(more" "data)")))
+(
+       (
+               data
+               "quoted data"
+               123.00
+               4.50
+       )
+       (
+               data
+               (
+                       !@#
+                       (
+                               4.50
+                       )
+                       "(more"
+                       "data)"
+               )
+       )
+)
diff --git a/tests/sav/shootout_nsieve_bytes_alt.res b/tests/sav/shootout_nsieve_bytes_alt.res
new file mode 100644 (file)
index 0000000..d9e91fa
--- /dev/null
@@ -0,0 +1,3 @@
+Primes up to 40000 4203
+Primes up to 20000 2262
+Primes up to 10000 1229
diff --git a/tests/sav/test_autoinit_optional.res b/tests/sav/test_autoinit_optional.res
new file mode 100644 (file)
index 0000000..4e88d43
--- /dev/null
@@ -0,0 +1,26 @@
+Mine
+Default
+Other
+Default
+
+Mine
+Default
+Other
+Default
+Yet Another
+
+Mine
+Default
+Other
+Default
+
+Mine
+Default
+Other
+Default
+
+Mine
+Default
+Other
+Other
+Yet Another
index f071d47..887631f 100644 (file)
@@ -1,6 +1,6 @@
 no error
 hello
-77
+0x4d
 1.235
 1.235
 123456789
index eb0468f..832041b 100644 (file)
@@ -1,6 +1,6 @@
 no error
 hello
-77
+0x4d
 144545136640.0
 0.0
 1571011930645069824
index eb0468f..832041b 100644 (file)
@@ -1,6 +1,6 @@
 no error
 hello
-77
+0x4d
 144545136640.0
 0.0
 1571011930645069824
index f071d47..887631f 100644 (file)
@@ -1,6 +1,6 @@
 no error
 hello
-77
+0x4d
 1.235
 1.235
 123456789
diff --git a/tests/sav/test_binary_deserialization.res b/tests/sav/test_binary_deserialization.res
new file mode 100644 (file)
index 0000000..61991a0
--- /dev/null
@@ -0,0 +1,22 @@
+# Src:
+<A: true a 0.123 1234 asdf false p4ssw0rd>
+# Dst:
+<A: true a 0.123 1234 asdf false p4ssw0rd>
+
+# Src:
+<B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>
+# Dst:
+<B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>
+
+# Src:
+<C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>>
+# Dst:
+<C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>>
+
+# Src:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false p4ssw0rd> 1111        f"\r\/> true>
+# Dst:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false p4ssw0rd> 1111        f"\r\/> true>
+
diff --git a/tests/sav/test_binary_deserialization_alt1.res b/tests/sav/test_binary_deserialization_alt1.res
new file mode 100644 (file)
index 0000000..9683ba6
--- /dev/null
@@ -0,0 +1,42 @@
+# Src:
+<A: true a 0.123 1234 asdf false p4ssw0rd>
+# Dst:
+<A: true a 0.123 1234 asdf false p4ssw0rd>
+
+# Src:
+<B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>
+# Dst:
+<B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>
+
+# Src:
+<C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>>
+# Dst:
+<C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>>
+
+# Src:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false p4ssw0rd> 1111        f"\r\/> true>
+# Dst:
+<D: <B: <A: false b 123.123 2345 new line ->
+<- false p4ssw0rd> 1111        f"\r\/> true>
+
+# Src:
+<E: a: hello, 1234, 123.4; b: hella, 2345, 234.5>
+# Dst:
+<E: a: hello, 1234, 123.4; b: hella, 2345, 234.5>
+
+# Src:
+<E: 2222>
+# Dst:
+<E: 2222>
+
+# Src:
+<E: 33.33>
+# Dst:
+<E: 33.33>
+
+# Src:
+<G: hs: -1, 0; s: one, two; hm: one. 1, two. 2; am: three. 3, four. 4>
+# Dst:
+<G: hs: -1, 0; s: one, two; hm: one. 1, two. 2; am: three. 3, four. 4>
+
diff --git a/tests/sav/test_binary_deserialization_alt2.res b/tests/sav/test_binary_deserialization_alt2.res
new file mode 100644 (file)
index 0000000..474fef8
--- /dev/null
@@ -0,0 +1 @@
+Deserialization Error: Doesn't know how to deserialize class "NoSerializeClass"
diff --git a/tests/sav/test_buffer_unicode.res b/tests/sav/test_buffer_unicode.res
new file mode 100644 (file)
index 0000000..08fb25a
--- /dev/null
@@ -0,0 +1,266 @@
+Char 0 = 𐏓
+Char 1 = A
+Char 2 = A
+Char 3 = A
+Char 4 = A
+Char 5 = A
+Char 6 = A
+Char 7 = A
+Char 8 = A
+Char 9 = A
+Char 10 = A
+Char 11 = A
+Char 12 = A
+Char 13 = A
+Char 14 = A
+Char 15 = A
+Char 16 = A
+Char 17 = A
+Char 18 = A
+Char 19 = A
+Char 20 = A
+Char 21 = A
+Char 22 = A
+Char 23 = A
+Char 24 = A
+Char 25 = A
+Char 26 = A
+Char 27 = A
+Char 28 = A
+Char 29 = A
+Char 30 = A
+Char 31 = A
+Char 32 = Z
+Char 33 = A
+Char 34 = A
+Char 35 = A
+Char 36 = A
+Char 37 = A
+Char 38 = A
+Char 39 = A
+Char 40 = A
+Char 41 = A
+Char 42 = A
+Char 43 = A
+Char 44 = A
+Char 45 = A
+Char 46 = A
+Char 47 = A
+Char 48 = A
+Char 49 = A
+Char 50 = A
+Char 51 = A
+Char 52 = A
+Char 53 = A
+Char 54 = A
+Char 55 = A
+Char 56 = A
+Char 57 = A
+Char 58 = A
+Char 59 = A
+Char 60 = A
+Char 61 = A
+Char 62 = A
+Char 63 = あ
+Byte 0 = 0xf0
+Byte 1 = 0x90
+Byte 2 = 0x8f
+Byte 3 = 0x93
+Byte 4 = 0x41
+Byte 5 = 0x41
+Byte 6 = 0x41
+Byte 7 = 0x41
+Byte 8 = 0x41
+Byte 9 = 0x41
+Byte 10 = 0x41
+Byte 11 = 0x41
+Byte 12 = 0x41
+Byte 13 = 0x41
+Byte 14 = 0x41
+Byte 15 = 0x41
+Byte 16 = 0x41
+Byte 17 = 0x41
+Byte 18 = 0x41
+Byte 19 = 0x41
+Byte 20 = 0x41
+Byte 21 = 0x41
+Byte 22 = 0x41
+Byte 23 = 0x41
+Byte 24 = 0x41
+Byte 25 = 0x41
+Byte 26 = 0x41
+Byte 27 = 0x41
+Byte 28 = 0x41
+Byte 29 = 0x41
+Byte 30 = 0x41
+Byte 31 = 0x41
+Byte 32 = 0x41
+Byte 33 = 0x41
+Byte 34 = 0x41
+Byte 35 = 0x5a
+Byte 36 = 0x41
+Byte 37 = 0x41
+Byte 38 = 0x41
+Byte 39 = 0x41
+Byte 40 = 0x41
+Byte 41 = 0x41
+Byte 42 = 0x41
+Byte 43 = 0x41
+Byte 44 = 0x41
+Byte 45 = 0x41
+Byte 46 = 0x41
+Byte 47 = 0x41
+Byte 48 = 0x41
+Byte 49 = 0x41
+Byte 50 = 0x41
+Byte 51 = 0x41
+Byte 52 = 0x41
+Byte 53 = 0x41
+Byte 54 = 0x41
+Byte 55 = 0x41
+Byte 56 = 0x41
+Byte 57 = 0x41
+Byte 58 = 0x41
+Byte 59 = 0x41
+Byte 60 = 0x41
+Byte 61 = 0x41
+Byte 62 = 0x41
+Byte 63 = 0x41
+Byte 64 = 0x41
+Byte 65 = 0x41
+Byte 66 = 0xe3
+Byte 67 = 0x81
+Byte 68 = 0x82
+Char 63 = あ
+Char 62 = A
+Char 61 = A
+Char 60 = A
+Char 59 = A
+Char 58 = A
+Char 57 = A
+Char 56 = A
+Char 55 = A
+Char 54 = A
+Char 53 = A
+Char 52 = A
+Char 51 = A
+Char 50 = A
+Char 49 = A
+Char 48 = A
+Char 47 = A
+Char 46 = A
+Char 45 = A
+Char 44 = A
+Char 43 = A
+Char 42 = A
+Char 41 = A
+Char 40 = A
+Char 39 = A
+Char 38 = A
+Char 37 = A
+Char 36 = A
+Char 35 = A
+Char 34 = A
+Char 33 = A
+Char 32 = Z
+Char 31 = A
+Char 30 = A
+Char 29 = A
+Char 28 = A
+Char 27 = A
+Char 26 = A
+Char 25 = A
+Char 24 = A
+Char 23 = A
+Char 22 = A
+Char 21 = A
+Char 20 = A
+Char 19 = A
+Char 18 = A
+Char 17 = A
+Char 16 = A
+Char 15 = A
+Char 14 = A
+Char 13 = A
+Char 12 = A
+Char 11 = A
+Char 10 = A
+Char 9 = A
+Char 8 = A
+Char 7 = A
+Char 6 = A
+Char 5 = A
+Char 4 = A
+Char 3 = A
+Char 2 = A
+Char 1 = A
+Char 0 = 𐏓
+Byte 68 = 0x82
+Byte 67 = 0x81
+Byte 66 = 0xe3
+Byte 65 = 0x41
+Byte 64 = 0x41
+Byte 63 = 0x41
+Byte 62 = 0x41
+Byte 61 = 0x41
+Byte 60 = 0x41
+Byte 59 = 0x41
+Byte 58 = 0x41
+Byte 57 = 0x41
+Byte 56 = 0x41
+Byte 55 = 0x41
+Byte 54 = 0x41
+Byte 53 = 0x41
+Byte 52 = 0x41
+Byte 51 = 0x41
+Byte 50 = 0x41
+Byte 49 = 0x41
+Byte 48 = 0x41
+Byte 47 = 0x41
+Byte 46 = 0x41
+Byte 45 = 0x41
+Byte 44 = 0x41
+Byte 43 = 0x41
+Byte 42 = 0x41
+Byte 41 = 0x41
+Byte 40 = 0x41
+Byte 39 = 0x41
+Byte 38 = 0x41
+Byte 37 = 0x41
+Byte 36 = 0x41
+Byte 35 = 0x5a
+Byte 34 = 0x41
+Byte 33 = 0x41
+Byte 32 = 0x41
+Byte 31 = 0x41
+Byte 30 = 0x41
+Byte 29 = 0x41
+Byte 28 = 0x41
+Byte 27 = 0x41
+Byte 26 = 0x41
+Byte 25 = 0x41
+Byte 24 = 0x41
+Byte 23 = 0x41
+Byte 22 = 0x41
+Byte 21 = 0x41
+Byte 20 = 0x41
+Byte 19 = 0x41
+Byte 18 = 0x41
+Byte 17 = 0x41
+Byte 16 = 0x41
+Byte 15 = 0x41
+Byte 14 = 0x41
+Byte 13 = 0x41
+Byte 12 = 0x41
+Byte 11 = 0x41
+Byte 10 = 0x41
+Byte 9 = 0x41
+Byte 8 = 0x41
+Byte 7 = 0x41
+Byte 6 = 0x41
+Byte 5 = 0x41
+Byte 4 = 0x41
+Byte 3 = 0x93
+Byte 2 = 0x8f
+Byte 1 = 0x90
+Byte 0 = 0xf0
diff --git a/tests/sav/test_buffer_unicode_alt1.res b/tests/sav/test_buffer_unicode_alt1.res
new file mode 100644 (file)
index 0000000..08fb25a
--- /dev/null
@@ -0,0 +1,266 @@
+Char 0 = 𐏓
+Char 1 = A
+Char 2 = A
+Char 3 = A
+Char 4 = A
+Char 5 = A
+Char 6 = A
+Char 7 = A
+Char 8 = A
+Char 9 = A
+Char 10 = A
+Char 11 = A
+Char 12 = A
+Char 13 = A
+Char 14 = A
+Char 15 = A
+Char 16 = A
+Char 17 = A
+Char 18 = A
+Char 19 = A
+Char 20 = A
+Char 21 = A
+Char 22 = A
+Char 23 = A
+Char 24 = A
+Char 25 = A
+Char 26 = A
+Char 27 = A
+Char 28 = A
+Char 29 = A
+Char 30 = A
+Char 31 = A
+Char 32 = Z
+Char 33 = A
+Char 34 = A
+Char 35 = A
+Char 36 = A
+Char 37 = A
+Char 38 = A
+Char 39 = A
+Char 40 = A
+Char 41 = A
+Char 42 = A
+Char 43 = A
+Char 44 = A
+Char 45 = A
+Char 46 = A
+Char 47 = A
+Char 48 = A
+Char 49 = A
+Char 50 = A
+Char 51 = A
+Char 52 = A
+Char 53 = A
+Char 54 = A
+Char 55 = A
+Char 56 = A
+Char 57 = A
+Char 58 = A
+Char 59 = A
+Char 60 = A
+Char 61 = A
+Char 62 = A
+Char 63 = あ
+Byte 0 = 0xf0
+Byte 1 = 0x90
+Byte 2 = 0x8f
+Byte 3 = 0x93
+Byte 4 = 0x41
+Byte 5 = 0x41
+Byte 6 = 0x41
+Byte 7 = 0x41
+Byte 8 = 0x41
+Byte 9 = 0x41
+Byte 10 = 0x41
+Byte 11 = 0x41
+Byte 12 = 0x41
+Byte 13 = 0x41
+Byte 14 = 0x41
+Byte 15 = 0x41
+Byte 16 = 0x41
+Byte 17 = 0x41
+Byte 18 = 0x41
+Byte 19 = 0x41
+Byte 20 = 0x41
+Byte 21 = 0x41
+Byte 22 = 0x41
+Byte 23 = 0x41
+Byte 24 = 0x41
+Byte 25 = 0x41
+Byte 26 = 0x41
+Byte 27 = 0x41
+Byte 28 = 0x41
+Byte 29 = 0x41
+Byte 30 = 0x41
+Byte 31 = 0x41
+Byte 32 = 0x41
+Byte 33 = 0x41
+Byte 34 = 0x41
+Byte 35 = 0x5a
+Byte 36 = 0x41
+Byte 37 = 0x41
+Byte 38 = 0x41
+Byte 39 = 0x41
+Byte 40 = 0x41
+Byte 41 = 0x41
+Byte 42 = 0x41
+Byte 43 = 0x41
+Byte 44 = 0x41
+Byte 45 = 0x41
+Byte 46 = 0x41
+Byte 47 = 0x41
+Byte 48 = 0x41
+Byte 49 = 0x41
+Byte 50 = 0x41
+Byte 51 = 0x41
+Byte 52 = 0x41
+Byte 53 = 0x41
+Byte 54 = 0x41
+Byte 55 = 0x41
+Byte 56 = 0x41
+Byte 57 = 0x41
+Byte 58 = 0x41
+Byte 59 = 0x41
+Byte 60 = 0x41
+Byte 61 = 0x41
+Byte 62 = 0x41
+Byte 63 = 0x41
+Byte 64 = 0x41
+Byte 65 = 0x41
+Byte 66 = 0xe3
+Byte 67 = 0x81
+Byte 68 = 0x82
+Char 63 = あ
+Char 62 = A
+Char 61 = A
+Char 60 = A
+Char 59 = A
+Char 58 = A
+Char 57 = A
+Char 56 = A
+Char 55 = A
+Char 54 = A
+Char 53 = A
+Char 52 = A
+Char 51 = A
+Char 50 = A
+Char 49 = A
+Char 48 = A
+Char 47 = A
+Char 46 = A
+Char 45 = A
+Char 44 = A
+Char 43 = A
+Char 42 = A
+Char 41 = A
+Char 40 = A
+Char 39 = A
+Char 38 = A
+Char 37 = A
+Char 36 = A
+Char 35 = A
+Char 34 = A
+Char 33 = A
+Char 32 = Z
+Char 31 = A
+Char 30 = A
+Char 29 = A
+Char 28 = A
+Char 27 = A
+Char 26 = A
+Char 25 = A
+Char 24 = A
+Char 23 = A
+Char 22 = A
+Char 21 = A
+Char 20 = A
+Char 19 = A
+Char 18 = A
+Char 17 = A
+Char 16 = A
+Char 15 = A
+Char 14 = A
+Char 13 = A
+Char 12 = A
+Char 11 = A
+Char 10 = A
+Char 9 = A
+Char 8 = A
+Char 7 = A
+Char 6 = A
+Char 5 = A
+Char 4 = A
+Char 3 = A
+Char 2 = A
+Char 1 = A
+Char 0 = 𐏓
+Byte 68 = 0x82
+Byte 67 = 0x81
+Byte 66 = 0xe3
+Byte 65 = 0x41
+Byte 64 = 0x41
+Byte 63 = 0x41
+Byte 62 = 0x41
+Byte 61 = 0x41
+Byte 60 = 0x41
+Byte 59 = 0x41
+Byte 58 = 0x41
+Byte 57 = 0x41
+Byte 56 = 0x41
+Byte 55 = 0x41
+Byte 54 = 0x41
+Byte 53 = 0x41
+Byte 52 = 0x41
+Byte 51 = 0x41
+Byte 50 = 0x41
+Byte 49 = 0x41
+Byte 48 = 0x41
+Byte 47 = 0x41
+Byte 46 = 0x41
+Byte 45 = 0x41
+Byte 44 = 0x41
+Byte 43 = 0x41
+Byte 42 = 0x41
+Byte 41 = 0x41
+Byte 40 = 0x41
+Byte 39 = 0x41
+Byte 38 = 0x41
+Byte 37 = 0x41
+Byte 36 = 0x41
+Byte 35 = 0x5a
+Byte 34 = 0x41
+Byte 33 = 0x41
+Byte 32 = 0x41
+Byte 31 = 0x41
+Byte 30 = 0x41
+Byte 29 = 0x41
+Byte 28 = 0x41
+Byte 27 = 0x41
+Byte 26 = 0x41
+Byte 25 = 0x41
+Byte 24 = 0x41
+Byte 23 = 0x41
+Byte 22 = 0x41
+Byte 21 = 0x41
+Byte 20 = 0x41
+Byte 19 = 0x41
+Byte 18 = 0x41
+Byte 17 = 0x41
+Byte 16 = 0x41
+Byte 15 = 0x41
+Byte 14 = 0x41
+Byte 13 = 0x41
+Byte 12 = 0x41
+Byte 11 = 0x41
+Byte 10 = 0x41
+Byte 9 = 0x41
+Byte 8 = 0x41
+Byte 7 = 0x41
+Byte 6 = 0x41
+Byte 5 = 0x41
+Byte 4 = 0x41
+Byte 3 = 0x93
+Byte 2 = 0x8f
+Byte 1 = 0x90
+Byte 0 = 0xf0
index 3c68ca8..a66aa39 100644 (file)
@@ -23,7 +23,7 @@ Read 4 chars: 3 Al
 Read 4 chars: exis
 Read 4 chars:  Laf
 Read 4 chars: erri
-Read 4 chars: ère
+Read 3 chars: ère
 Read 4 chars:  <al
 Read 4 chars: exis
 Read 4 chars: .laf
index 613542b..4c6969f 100644 (file)
@@ -1,2 +1,2 @@
-Error: Opening file at 'donotcreate.bing' failed with 'No such file or directory'
-Error: Opening file at 'donotcreate.bing' failed with 'No such file or directory'
+Cannot open `donotcreate.bing`: No such file or directory
+Cannot open `donotcreate.bing`: No such file or directory
index 060a759..3bc3c92 100644 (file)
@@ -1,5 +1,5 @@
 NativeString
-N
+0x4e
 Nit
 NativeArray[Int]
 3
index 209563a..fcde192 100644 (file)
@@ -1,4 +1,4 @@
-Runtime error: Cast failed. Expected `E`, got `Bool` (../lib/standard/collection/array.nit:957)
+Runtime error: Cast failed. Expected `E`, got `Bool` (../lib/standard/collection/array.nit:960)
 NativeString
-N
+0x4e
 Nit
index 9172e4f..7c9370a 100644 (file)
@@ -42,8 +42,8 @@ Start ../src/test_parser.nit:17,1--156,1
         AType ../src/test_parser.nit:27,20--22
           TClassid "Int" ../src/test_parser.nit:27,20--22
         TAssign "=" ../src/test_parser.nit:27,24
-        ADecIntExpr ../src/test_parser.nit:27,26
-          TNumber "0" ../src/test_parser.nit:27,26
+        AIntegerExpr ../src/test_parser.nit:27,26
+          TInteger "0" ../src/test_parser.nit:27,26
       AMethPropdef ../src/test_parser.nit:28,2--38,4
         TKwredef "redef" ../src/test_parser.nit:28,2--6
         APublicVisibility ../src/test_parser.nit:28,8
@@ -159,8 +159,8 @@ Start ../src/test_parser.nit:17,1--156,1
                 TId "rank" ../src/test_parser.nit:35,10--13
                 AListExprs ../src/test_parser.nit:35,13
               TPlus "+" ../src/test_parser.nit:35,15
-              ADecIntExpr ../src/test_parser.nit:35,17
-                TNumber "1" ../src/test_parser.nit:35,17
+              AIntegerExpr ../src/test_parser.nit:35,17
+                TInteger "1" ../src/test_parser.nit:35,17
           ACallExpr ../src/test_parser.nit:36,3--19
             ACallExpr ../src/test_parser.nit:36,3
               AImplicitSelfExpr ../src/test_parser.nit:36,3
@@ -183,8 +183,8 @@ Start ../src/test_parser.nit:17,1--156,1
                 TId "rank" ../src/test_parser.nit:37,10--13
                 AListExprs ../src/test_parser.nit:37,13
               TMinus "-" ../src/test_parser.nit:37,15
-              ADecIntExpr ../src/test_parser.nit:37,17
-                TNumber "1" ../src/test_parser.nit:37,17
+              AIntegerExpr ../src/test_parser.nit:37,17
+                TInteger "1" ../src/test_parser.nit:37,17
           TKwend "end" ../src/test_parser.nit:38,2--4
       TKwend "end" ../src/test_parser.nit:39,1--3
     AMainClassdef ../src/test_parser.nit:41,1--155,3
@@ -459,8 +459,8 @@ Start ../src/test_parser.nit:17,1--156,1
                                 TId "exit" ../src/test_parser.nit:65,3--6
                                 AParExprs ../src/test_parser.nit:65,7--9
                                   TOpar "(" ../src/test_parser.nit:65,7
-                                  ADecIntExpr ../src/test_parser.nit:65,8
-                                    TNumber "0" ../src/test_parser.nit:65,8
+                                  AIntegerExpr ../src/test_parser.nit:65,8
+                                    TInteger "0" ../src/test_parser.nit:65,8
                                   TCpar ")" ../src/test_parser.nit:65,9
                               TKwend "end" ../src/test_parser.nit:66,2--4
               ACallExpr ../src/test_parser.nit:67,2--11
@@ -622,8 +622,8 @@ Start ../src/test_parser.nit:17,1--156,1
                       AImplicitSelfExpr ../src/test_parser.nit:86,3
                       TId "exit" ../src/test_parser.nit:86,3--6
                       AListExprs ../src/test_parser.nit:86,8
-                        ADecIntExpr ../src/test_parser.nit:86,8
-                          TNumber "1" ../src/test_parser.nit:86,8
+                        AIntegerExpr ../src/test_parser.nit:86,8
+                          TInteger "1" ../src/test_parser.nit:86,8
                   TKwelse "else" ../src/test_parser.nit:87,2--5
                   AIfExpr ../src/test_parser.nit:87,7--93,4
                     TKwif "if" ../src/test_parser.nit:87,7--8
@@ -643,8 +643,8 @@ Start ../src/test_parser.nit:17,1--156,1
                         AImplicitSelfExpr ../src/test_parser.nit:89,3
                         TId "exit" ../src/test_parser.nit:89,3--6
                         AListExprs ../src/test_parser.nit:89,8
-                          ADecIntExpr ../src/test_parser.nit:89,8
-                            TNumber "1" ../src/test_parser.nit:89,8
+                          AIntegerExpr ../src/test_parser.nit:89,8
+                            TInteger "1" ../src/test_parser.nit:89,8
                     TKwelse "else" ../src/test_parser.nit:90,2--5
                     AIfExpr ../src/test_parser.nit:90,7--93,4
                       TKwif "if" ../src/test_parser.nit:90,7--8
@@ -669,8 +669,8 @@ Start ../src/test_parser.nit:17,1--156,1
                           AImplicitSelfExpr ../src/test_parser.nit:92,3
                           TId "exit" ../src/test_parser.nit:92,3--6
                           AListExprs ../src/test_parser.nit:92,8
-                            ADecIntExpr ../src/test_parser.nit:92,8
-                              TNumber "1" ../src/test_parser.nit:92,8
+                            AIntegerExpr ../src/test_parser.nit:92,8
+                              TInteger "1" ../src/test_parser.nit:92,8
                       ABlockExpr ../src/test_parser.nit:93,2--4
                         TKwend "end" ../src/test_parser.nit:93,2--4
                 AVardeclExpr ../src/test_parser.nit:95,2--25
index 36683fa..1fa723d 100644 (file)
@@ -1,5 +1,5 @@
---> ADecIntExpr 1,1
-  TNumber "1" 1,1
+--> AIntegerExpr 1,1
+  TInteger "1" 1,1
 --> ABlockExpr 1,1--11
   ACallExpr 1,1--11
     AImplicitSelfExpr 1,1
diff --git a/tests/sav/test_path.res b/tests/sav/test_path.res
new file mode 100644 (file)
index 0000000..a258212
--- /dev/null
@@ -0,0 +1 @@
+require the name of the output directory
diff --git a/tests/sav/test_path_args1.res b/tests/sav/test_path_args1.res
new file mode 100644 (file)
index 0000000..a013db5
--- /dev/null
@@ -0,0 +1,82 @@
+* out/test_path_args1.write
+simplified: out/test_path_args1.write
+filename: test_path_args1.write
+dir: out
+exists: true
+  error? nope
+stat: is_dir=true is_reg=false
+  error? nope
+open: out/test_path_args1.write
+  error? nope
+first_line: 
+  error? Cannot read `out/test_path_args1.write`: Is a directory
+content: 0 chars
+  error? Cannot read `out/test_path_args1.write`: Is a directory
+content: 0 bytes
+  error? Cannot read `out/test_path_args1.write`: Is a directory
+content: 0 lines
+  error? Cannot read `out/test_path_args1.write`: Is a directory
+content: 0 files
+  error? nope
+* out/test_path_args1.write/file.txt
+simplified: out/test_path_args1.write/file.txt
+filename: file.txt
+dir: out/test_path_args1.write
+exists: false
+  error? Cannot open `out/test_path_args1.write/file.txt`: No such file or directory
+stat: nope
+  error? Cannot open `out/test_path_args1.write/file.txt`: No such file or directory
+open: out/test_path_args1.write/file.txt
+  error? Cannot open `out/test_path_args1.write/file.txt`: No such file or directory
+first_line: 
+  error? Cannot open `out/test_path_args1.write/file.txt`: No such file or directory
+content: 0 chars
+  error? Cannot open `out/test_path_args1.write/file.txt`: No such file or directory
+content: 0 bytes
+  error? Cannot open `out/test_path_args1.write/file.txt`: No such file or directory
+content: 0 lines
+  error? Cannot open `out/test_path_args1.write/file.txt`: No such file or directory
+content: 0 files
+  error? Cannot list directory `out/test_path_args1.write/file.txt`: No such file or directory
+* out/test_path_args1.write/file.txt
+simplified: out/test_path_args1.write/file.txt
+filename: file.txt
+dir: out/test_path_args1.write
+exists: true
+  error? nope
+stat: is_dir=false is_reg=true
+  error? nope
+open: out/test_path_args1.write/file.txt
+  error? nope
+first_line: hello world!
+  error? nope
+content: 12 chars
+  error? nope
+content: 12 bytes
+  error? nope
+content: 1 lines
+  error? nope
+content: 0 files
+  error? Cannot list directory `out/test_path_args1.write/file.txt`: Not a directory
+* out/test_path_args1.write/dir
+simplified: out/test_path_args1.write/dir
+filename: dir
+dir: out/test_path_args1.write
+exists: true
+  error? nope
+stat: is_dir=true is_reg=false
+  error? nope
+open: out/test_path_args1.write/dir
+  error? nope
+first_line: 
+  error? Cannot read `out/test_path_args1.write/dir`: Is a directory
+content: 0 chars
+  error? Cannot read `out/test_path_args1.write/dir`: Is a directory
+content: 0 bytes
+  error? Cannot read `out/test_path_args1.write/dir`: Is a directory
+content: 0 lines
+  error? Cannot read `out/test_path_args1.write/dir`: Is a directory
+content: 1 files
+  error? nope
+dir/
+file.txt
diff --git a/tests/sav/test_string_bytes.res b/tests/sav/test_string_bytes.res
new file mode 100644 (file)
index 0000000..8d98756
--- /dev/null
@@ -0,0 +1,12 @@
+[0x54,0x68,0x69,0x73,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x63,0x6f,0x6f,0x6c]
+[0x54,0x68,0x69,0x73,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x63,0x6f,0x6f,0x6c,0x54,0x68,0x69,0x73,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x63,0x6f,0x6f,0x6c,0x54,0x68,0x69,0x73,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x63,0x6f,0x6f,0x6c,0x54,0x68,0x69,0x73,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x63,0x6f,0x6f,0x6c]
+[0x54,0x68,0x69,0x73,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x63,0x6f,0x6f,0x6c,0x54,0x68,0x69,0x73,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x63,0x6f,0x6f,0x6c,0x54,0x68,0x69,0x73,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x63,0x6f,0x6f,0x6c,0x54,0x68,0x69,0x73,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x63,0x6f,0x6f,0x6c]
+[0x6c,0x6f,0x6f,0x63,0x20,0x73,0x69,0x20,0x67,0x6e,0x69,0x72,0x74,0x73,0x20,0x73,0x69,0x68,0x54]
+[0x6c,0x6f,0x6f,0x63,0x20,0x73,0x69,0x20,0x67,0x6e,0x69,0x72,0x74,0x73,0x20,0x73,0x69,0x68,0x54,0x6c,0x6f,0x6f,0x63,0x20,0x73,0x69,0x20,0x67,0x6e,0x69,0x72,0x74,0x73,0x20,0x73,0x69,0x68,0x54,0x6c,0x6f,0x6f,0x63,0x20,0x73,0x69,0x20,0x67,0x6e,0x69,0x72,0x74,0x73,0x20,0x73,0x69,0x68,0x54,0x6c,0x6f,0x6f,0x63,0x20,0x73,0x69,0x20,0x67,0x6e,0x69,0x72,0x74,0x73,0x20,0x73,0x69,0x68,0x54]
+[0x6c,0x6f,0x6f,0x63,0x20,0x73,0x69,0x20,0x67,0x6e,0x69,0x72,0x74,0x73,0x20,0x73,0x69,0x68,0x54,0x6c,0x6f,0x6f,0x63,0x20,0x73,0x69,0x20,0x67,0x6e,0x69,0x72,0x74,0x73,0x20,0x73,0x69,0x68,0x54,0x6c,0x6f,0x6f,0x63,0x20,0x73,0x69,0x20,0x67,0x6e,0x69,0x72,0x74,0x73,0x20,0x73,0x69,0x68,0x54,0x6c,0x6f,0x6f,0x63,0x20,0x73,0x69,0x20,0x67,0x6e,0x69,0x72,0x74,0x73,0x20,0x73,0x69,0x68,0x54]
+This string is cool
+This string is coolA
+Ahis string is coolA
+This string is cool
+This string is coolA
+Ahis string is coolA
index 11e90bd..4cfc270 100644 (file)
@@ -1,5 +1,3 @@
-4
-0 is Ã (195)
-1 is © (169)
-2 is Ã (195)
-3 is ¨ (168)
+2
+0 is é (233)
+1 is è (232)
diff --git a/tests/sav/test_unicode_4bytes.res b/tests/sav/test_unicode_4bytes.res
new file mode 100644 (file)
index 0000000..614d068
--- /dev/null
@@ -0,0 +1,2 @@
+103d3
+10ffff
index f52371e..ec6436d 100644 (file)
@@ -1 +1 @@
-XML Error: Malformatted attribute at line 7, position 7
+XML Error: Malformed attribute at line 7, position 7
index a5850f1..6bbc66d 100644 (file)
@@ -1 +1 @@
-XML Error: Malformatted attribute at line 1, position 7
+XML Error: Malformed attribute at line 1, position 7
index a5850f1..6bbc66d 100644 (file)
@@ -1 +1 @@
-XML Error: Malformatted attribute at line 1, position 7
+XML Error: Malformed attribute at line 1, position 7
index 6e2f56c..b7051a8 100644 (file)
@@ -1 +1 @@
-XML Error: Malformatted Processing Instruction tag at line 2, position 1
+XML Error: Malformed Processing Instruction tag at line 2, position 1
index f8482b2..f51a3d8 100644 (file)
@@ -32,7 +32,7 @@ end
 var w = args.first.to_i
 var h = w
 
-var byte_acc = 0
+var byte_acc = 0u8
 var bit_num = 0
 
 print("P4\n{w} {h}")
@@ -56,19 +56,19 @@ for y in [0..h[ do
        if zr*zr+zi*zi > limit*limit then
            byte_acc = (byte_acc.lshift(1))
        else
-           byte_acc = (byte_acc.lshift(1)) + 1
+           byte_acc = (byte_acc.lshift(1)) + 1u8
        end
 
        bit_num = bit_num + 1
 
        if bit_num == 8 then
-           printn(byte_acc.ascii)
-           byte_acc = 0
+           stdout.write_byte(byte_acc)
+           byte_acc = 0u8
            bit_num = 0     
        else if x == w - 1 then
            byte_acc = byte_acc.lshift(8-w%8)
-           printn(byte_acc.ascii)
-           byte_acc = 0
+           stdout.write_byte(byte_acc)
+           byte_acc = 0u8
            bit_num = 0     
        end
     end
index 2137a3a..109b70f 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import c
+
+class Bitarray
+
+       var narr: CByteArray
+
+       init do
+               for x in [0 .. narr.length[ do narr[x] = 0xFFu8
+       end
+
+       fun [](pos: Int): Bool do
+               pos -= 2
+               return (narr[pos / 8] & (1u8 << (7 - pos % 8))) != 0u8
+       end
+
+       fun []=(pos: Int, val: Bool) do
+               pos -= 2
+               if val then
+                       narr[pos / 8] |= 1u8 << (7 - pos % 8)
+               else
+                       narr[pos / 8] &= 0xFFu8 - (1u8 << (7 - pos % 8))
+               end
+       end
+end
+
 fun nsieve(n: Int): Int
 do
        var count = 0
-       var array: Buffer = new FlatBuffer.with_capacity(n)
-       for i in [0..n[ do
-               array.chars[i] = 'o'
-       end
-       for i in [2..n[ do
-               if array.chars[i] == 'o' then
-                       var j = i * 2
-                       while j < n do
-                               array.chars[j] = 'x'
-                               j = j + i
-                       end
-                       count = count + 1
+       var b_arrsz = ((n - 1).to_f / 8.0).ceil.to_i
+       var bitarr = new Bitarray(new CByteArray(b_arrsz))
+       for i in [2 .. n[ do
+               # If self is already false, then no need to check for multiples
+               if not bitarr[i] then continue
+               count += 1
+               var j = i * i
+               while j < n do
+                       bitarr[j] = false
+                       j += i
                end
        end
        return count
diff --git a/tests/shootout_nsieve_bytes_alt.nit b/tests/shootout_nsieve_bytes_alt.nit
new file mode 100644 (file)
index 0000000..ab5c703
--- /dev/null
@@ -0,0 +1,73 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class Bitarray
+
+       var narr: Bytes
+
+       init do
+               for x in [0 .. narr.length[ do narr[x] = 0xFFu8
+       end
+
+       fun [](pos: Int): Bool do
+               pos -= 2
+               return (narr[pos / 8] & (1u8 << (7 - pos % 8))) != 0u8
+       end
+
+       fun []=(pos: Int, val: Bool) do
+               pos -= 2
+               if val then
+                       narr[pos / 8] |= 1u8 << (7 - pos % 8)
+               else
+                       narr[pos / 8] &= 0xFFu8 - (1u8 << (7 - pos % 8))
+               end
+       end
+end
+
+fun nsieve(n: Int): Int
+do
+       var count = 0
+       var b_arrsz = ((n - 1).to_f / 8.0).ceil.to_i
+       var bitarr = new Bitarray(new Bytes(new NativeString(b_arrsz), b_arrsz, b_arrsz))
+       for i in [2 .. n[ do
+               # If self is already false, then no need to check for multiples
+               if not bitarr[i] then continue
+               count += 1
+               var j = i * i
+               while j < n do
+                       bitarr[j] = false
+                       j += i
+               end
+       end
+       return count
+end
+
+fun test(n: Int)
+do
+       var m = 10000.lshift(n)
+       print("Primes up to {m} {nsieve(m)}")
+end
+
+var n = 2
+if args.length == 1 then
+       n = args.first.to_i
+end
+
+test(n)
+if n >= 1 then
+       test(n-1)
+end
+if n >= 2 then
+       test(n-2)
+end
diff --git a/tests/test_autoinit_optional.nit b/tests/test_autoinit_optional.nit
new file mode 100644 (file)
index 0000000..9be0277
--- /dev/null
@@ -0,0 +1,126 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This test provides variations on having an attribute with a default value but optionally settable with the constructor
+# The main points of variation here is what are the basic exposed services and behavior
+
+# The attribute is stored as not nullable but manual setter with a nullable signature is exposed
+# Setting with `null` invoke the real setter with the default value.
+# The manual setter is used as an initializer thus collected in the autoinit.
+#
+# Best option if one wants to allow the user to reset the default (with null) once the object is created
+class A
+       var s: String is noautoinit, private writable(real_s=)
+       fun s=(v: nullable String) is autoinit do self.real_s = v or else "Default"
+end
+
+# The attribute is stored as not nullable with standard automatic getter/setter
+# The initializer is a manual method that accepts the nullable value and assigns the default value if null is given.
+#
+# Best option if the default can only be set a construction time
+class B
+       var s: String is noautoinit
+       protected fun s_opt=(v: nullable String) is autoinit do self.s = v or else "Default"
+end
+
+# The attribute is stored as nullable.
+# A manual getter is used to return a default value if the attribute is null.
+#
+# Shortest solution without annotation.
+# Con: the default is determined by the getter and never stored (this could be an issue if the default is complex)
+class C
+       protected var s_opt: nullable String
+       fun s: String do return s_opt or else "Default"
+end
+
+# The attribute is stored as nullable.
+# A manual getter is used to return a default value if the attribute is null.
+#
+# Longer solution without annotation but the getter lazily computes and stores the default once
+class D
+       protected var s_opt: nullable String
+       fun s: String do
+               var res = s_opt
+               if res != null then return res
+               res = "Default"
+               s_opt = res
+               return res
+       end
+end
+
+# The attribute is stored as not nullable with standard automatic getter/setter
+# The initializer is manual method that accepts the nullable value and does nothing if null is given.
+#
+# This one has a tricky behavior if one accesses to `s` before `s_opt=` is executed
+class E
+       var s = "Default" is lazy
+       protected fun s_opt=(v: nullable String) is autoinit do if v != null then s = v
+end
+
+var a2 = new A("Mine")
+print a2.s
+var a1 = new A
+print a1.s
+a1.s = "Other"
+print a1.s
+a1.s = null
+print a1.s
+
+print ""
+
+var b2 = new B("Mine")
+print b2.s
+var b1 = new B
+print b1.s
+b1.s = "Other"
+print b1.s
+b1.s_opt = null
+print b1.s
+b1.s_opt = "Yet Another"
+print b1.s
+
+print ""
+
+var c2 = new C("Mine")
+print c2.s
+var c1 = new C
+print c1.s
+c1.s_opt = "Other"
+print c1.s
+c1.s_opt = null
+print c1.s
+
+print ""
+
+var d2 = new D("Mine")
+print d2.s
+var d1 = new D
+print d1.s
+d1.s_opt = "Other"
+print d1.s
+d1.s_opt = null
+print d1.s
+
+print ""
+
+var e2 = new E("Mine")
+print e2.s
+var e1 = new E
+print e1.s
+e1.s = "Other"
+print e1.s
+e1.s_opt = null
+print e1.s
+e1.s_opt = "Yet Another"
+print e1.s
index a38619b..3af2fd6 100644 (file)
@@ -19,7 +19,7 @@ var writer = new FileWriter.open(path)
 #alt1# writer.big_endian = false
 #alt3# writer.big_endian = false
 writer.write "hello"
-writer.write_byte 77
+writer.write_byte 77u8
 writer.write_float 1.23456789
 writer.write_double 1.23456789
 writer.write_int64 123456789
diff --git a/tests/test_binary_deserialization.nit b/tests/test_binary_deserialization.nit
new file mode 100644 (file)
index 0000000..c6bcd0a
--- /dev/null
@@ -0,0 +1,61 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import test_deserialization
+import binary::serialization
+#alt1# import test_deserialization_serial
+
+class NoSerializeClass
+       super Serializable
+
+       var some_attribute: String
+end
+
+var entities = new TestEntities
+
+var tests = entities.without_generics#alt1##alt2#
+#alt1#var tests = entities.with_generics
+#alt2#var tests = [new NoSerializeClass("will not deserialize")]
+
+var dir = "out/test_binary_deserialization"
+if not dir.file_exists then dir.mkdir
+
+var path = dir / "alt0"#alt1##alt2#
+#alt1#var path = dir / "alt1"
+#alt2#var path = dir / "alt2"
+
+var writer = new FileWriter.open(path)
+var serializer = new BinarySerializer(writer)
+for o in tests do
+       serializer.serialize o
+end
+writer.close
+
+var reader = new FileReader.open(path)
+var deserializer = new BinaryDeserializer(reader)
+for o in tests do
+       var dst = deserializer.deserialize
+
+       if deserializer.errors.not_empty then
+               print deserializer.errors.join(", ")
+       end
+
+       if dst != null then
+               assert o.is_same_type(dst)
+
+               print "# Src:\n{o}"
+               print "# Dst:\n{dst}\n"
+       end
+end
+reader.close
diff --git a/tests/test_buffer_unicode.nit b/tests/test_buffer_unicode.nit
new file mode 100644 (file)
index 0000000..f76ac5f
--- /dev/null
@@ -0,0 +1,54 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+var fb: Buffer = new RopeBuffer
+#alt1 fb = new FlatBuffer
+
+for i in [0 .. 64[ do fb.add 'A'
+
+fb[63] = 'あ'
+
+fb[32] = 'き'
+
+fb[0] = '𐏓'
+
+fb[32] = 'Z'
+
+var l = 0
+
+for i in fb.chars do
+       print "Char {l} = {i}"
+       l += 1
+end
+
+l = 0
+
+for i in fb.bytes do
+       print "Byte {l} = {i}"
+       l += 1
+end
+
+l = fb.length - 1
+
+for i in fb.chars.reverse_iterator do
+       print "Char {l} = {i}"
+       l -= 1
+end
+
+l = fb.bytelen - 1
+
+for i in fb.bytes.reverse_iterator do
+       print "Byte {l} = {i}"
+       l -= 1
+end
index c1ecc49..28facde 100644 (file)
 # limitations under the License.
 
 var s = new NativeString(4)
-s[0] = 'N'
-s[2] = 't'
-s[1] = 'i'
-s[3] = '\0'
+s[0] = 0x4Eu8
+s[2] = 0x74u8
+s[1] = 0x69u8
+s[3] = 0u8
 print s.class_name
 print s[0]
 print s.to_s
diff --git a/tests/test_path.args b/tests/test_path.args
new file mode 100644 (file)
index 0000000..a62688b
--- /dev/null
@@ -0,0 +1 @@
+$WRITE
diff --git a/tests/test_path.nit b/tests/test_path.nit
new file mode 100644 (file)
index 0000000..2230579
--- /dev/null
@@ -0,0 +1,71 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+fun test_path(p: Path)
+do
+       print "* {p}"
+       print "simplified: {p.simplified}"
+       print "filename: {p.filename}"
+       print "dir: {p.dir}"
+       var e = p.exists
+       print "exists: {e}"
+       print "  error? {p.last_error or else "nope"}"
+       var s = p.stat
+       if s == null then
+               print "stat: nope"
+       else
+               print "stat: is_dir={s.is_dir} is_reg={s.is_reg}"
+       end
+       print "  error? {p.last_error or else "nope"}"
+       var stream = p.open_ro
+       print "open: {stream.path or else "-"}"
+       print "  error? {p.last_error or else "nope"}"
+       print "first_line: {stream.read_line}"
+       stream.close
+       print "  error? {stream.last_error or else "nope"}"
+       var txt = p.read_all
+       print "content: {txt.length} chars"
+       print "  error? {p.last_error or else "nope"}"
+       var bin = p.read_all_bytes
+       print "content: {bin.length} bytes"
+       print "  error? {p.last_error or else "nope"}"
+       var lines = p.read_lines
+       print "content: {lines.length} lines"
+       print "  error? {p.last_error or else "nope"}"
+
+       var files = p.files
+       print "content: {files.length} files"
+       print "  error? {p.last_error or else "nope"}"
+end
+
+if args.length != 1 then
+       print "require the name of the output directory"
+       return
+end
+
+var base = args.first
+base.mkdir
+test_path(base.to_path)
+
+var f = (base/"file.txt").to_path
+test_path(f)
+
+"hello world!".write_to_file(f.to_s)
+test_path(f)
+
+var dn = base / "dir"
+var d = dn.to_path
+dn.mkdir
+"goodby world!".write_to_file(dn/"file.txt")
+test_path(d)
diff --git a/tests/test_ropebuffer.nit b/tests/test_ropebuffer.nit
new file mode 100644 (file)
index 0000000..aa21a5e
--- /dev/null
@@ -0,0 +1,20 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+var rb = new RopeBuffer
+
+for i in [0 .. 1000000[ do
+       rb.add 'S'
+       var s = rb.to_s
+end
diff --git a/tests/test_string_bytes.nit b/tests/test_string_bytes.nit
new file mode 100644 (file)
index 0000000..875f5dc
--- /dev/null
@@ -0,0 +1,51 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+var x = "This string is cool"
+
+var y = x + x + x + x
+
+var z = x * 4
+
+print x.bytes.iterator.to_a
+print y.bytes.iterator.to_a
+print z.bytes.iterator.to_a
+
+print x.bytes.reverse_iterator.to_a
+print y.bytes.reverse_iterator.to_a
+print z.bytes.reverse_iterator.to_a
+
+var b = new FlatBuffer.from(x)
+
+print b
+
+b.bytes.add 0x41u8
+
+print b
+
+b.bytes[0] = 0x41u8
+
+print b
+
+var c = new RopeBuffer.from(x)
+
+print c
+
+c.bytes.add 0x41u8
+
+print c
+
+c.bytes[0] = 0x41u8
+
+print c
diff --git a/tests/test_unicode_4bytes.nit b/tests/test_unicode_4bytes.nit
new file mode 100644 (file)
index 0000000..d069253
--- /dev/null
@@ -0,0 +1,20 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+intrude import standard::text::flat
+import standard
+
+var s = "𐏓􏿿".as(FlatString)
+print s.items.char_at(0).ascii.to_hex
+print s.items.char_at(4).ascii.to_hex
index 25f7c53..6330517 100755 (executable)
@@ -486,6 +486,12 @@ case $engine in
                OPT="--vm $OPT"
                savdirs="sav/niti/"
                ;;
+       nitj)
+               engine=nitj;
+               OPT="--compile-dir $compdir --ant"
+               enginebinname=nitj;
+               savdirs="sav/nitc-common/"
+               ;;
        emscripten)
                enginebinname=nitc
                OPT="-m emscripten_nodejs.nit --semi-global $OPT --compile-dir $compdir"