Merge: More keep going
authorJean Privat <jean@pryen.org>
Mon, 8 Jun 2015 10:05:14 +0000 (06:05 -0400)
committerJean Privat <jean@pryen.org>
Mon, 8 Jun 2015 10:05:14 +0000 (06:05 -0400)
This improve the robustness of tools when given --keep-going.
Tools like nitpick, that have --keep-going by default, are more robust and collect more errors.

Moreover, the compiler can now compile simple programs with instructions that fail during the typing phase (most errors like unknown method or bad type).

These instructions are compiled with a run time error instead so the program is still expected to behave in an reliable way.

~~~nit
print 1
fail now
print 2
~~~

~~~sh
$ nitc kg.nit --keep-going
kg.nit:2,1--4: Error: method or variable `fail` unknown in `Sys`.
$ ./kg
1
Runtime error: FATAL: bad statement executed. (kg.nit:1)
~~~

One usage would be to force `c_src` to compile things even if it lags behind.

Pull-Request: #1440
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

351 files changed:
.gitignore
Makefile
README.md [moved from README with 99% similarity]
VERSION
benchmarks/bench_engines.sh
benchmarks/polygons/Makefile [new file with mode: 0644]
benchmarks/polygons/java/Makefile [new file with mode: 0644]
benchmarks/polygons/java/bench_polygon.sh [new file with mode: 0755]
benchmarks/polygons/java/code/AntiClockSort.java [new file with mode: 0644]
benchmarks/polygons/java/code/BenchPolygon.java [new file with mode: 0644]
benchmarks/polygons/java/code/ClockSort.java [new file with mode: 0644]
benchmarks/polygons/java/code/ConvexPolygon.java [new file with mode: 0644]
benchmarks/polygons/java/code/PointDouble.java [new file with mode: 0644]
benchmarks/polygons/java/code/PointXCompare.java [new file with mode: 0644]
benchmarks/polygons/java/code/PolygonSorter.java [new file with mode: 0644]
benchmarks/polygons/java/code/Projection.java [new file with mode: 0644]
benchmarks/polygons/nit/Makefile [new file with mode: 0644]
benchmarks/polygons/nit/bench_polygon.nit [new file with mode: 0644]
benchmarks/polygons/nit/bench_polygon.sh [new file with mode: 0755]
clib/README.md [moved from clib/README with 100% similarity]
contrib/jwrapper/Makefile
contrib/jwrapper/src/code_generator.nit
contrib/nitcc/examples/minilang.nit
contrib/nitcc/src/Makefile
contrib/nitiwiki/Makefile
contrib/nitiwiki/src/wiki_base.nit
contrib/nitiwiki/src/wiki_html.nit
contrib/nitiwiki/tests/res/wiki3_nitiwiki_render.res [new file with mode: 0644]
contrib/nitiwiki/tests/res/wiki3_nitiwiki_status.res [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/config.ini [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/pages/contact.mdwn [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/pages/index.mdwn [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/pages/other_page.mdwn [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/templates/footer.html [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/templates/header.html [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/templates/menu.html [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/templates/template.html [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3_nitiwiki_render.args [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3_nitiwiki_status.args [new file with mode: 0644]
contrib/objcwrapper/header_static/makefile [new file with mode: 0644]
contrib/objcwrapper/header_static/src/header_static.nit [new file with mode: 0644]
contrib/online_ide/Makefile
contrib/online_ide/README.md [moved from contrib/online_ide/README with 100% similarity]
contrib/online_ide/sources/nit/pnacl_nit.nit
contrib/opportunity/src/templates/meetup.nit
contrib/pep8analysis/.gitignore
contrib/pep8analysis/src/parser/README.md [moved from contrib/pep8analysis/src/parser/README with 99% similarity]
contrib/refund/Makefile
contrib/sort_downloads/src/sort_downloads.nit
contrib/wiringPi/lib/wiringPi.nit
examples/README.md [moved from examples/README with 100% similarity]
examples/calculator/src/calculator.nit
examples/calculator/src/calculator_logic.nit
examples/callback_chimpanze.nit
examples/callback_monkey.nit
examples/draw_operation.nit
examples/extern_methods.nit
examples/mnit_simple/src/simple_android.nit
examples/mpi/README.md [moved from examples/mpi/README with 100% similarity]
examples/pnacl/converter/README.md [moved from examples/pnacl/converter/README with 89% similarity]
lib/a_star.nit
lib/android/activities.nit
lib/android/assets_and_resources.nit
lib/android/audio.nit
lib/android/bundle/bundle.nit
lib/android/cardboard.nit
lib/android/dalvik.nit
lib/android/input_events.nit
lib/android/intent/intent_api10.nit
lib/android/intent/intent_api15.nit
lib/android/intent/intent_api16.nit
lib/android/native_app_glue.nit
lib/android/nit_activity.nit
lib/android/notification/native_notification.nit
lib/android/sensors.nit
lib/android/shared_preferences/shared_preferences_api10.nit
lib/android/shared_preferences/shared_preferences_api11.nit
lib/android/toast.nit
lib/android/ui/native_ui.nit
lib/android/vibration.nit
lib/bcm2835/bcm2835.nit
lib/binary/binary.nit
lib/bitmap/bitmap.nit
lib/bucketed_game.nit
lib/c.nit
lib/cocoa/app_kit.nit
lib/cocoa/foundation.nit
lib/cpp.nit
lib/curl/curl.nit
lib/curl/curl_c.nit
lib/curl/examples/curl_http.nit
lib/curses/curses.nit
lib/egl.nit
lib/geometry/boxes.nit
lib/geometry/points_and_lines.nit
lib/geometry/polygon.nit [new file with mode: 0644]
lib/geometry/quadtree.nit
lib/gettext.nit
lib/glesv2/examples/opengles2_hello_triangle.nit
lib/glesv2/glesv2.nit
lib/gtk/v3_4/gtk_assistant.nit
lib/gtk/v3_4/gtk_core.nit
lib/gtk/v3_4/gtk_dialogs.nit
lib/gtk/v3_4/gtk_widgets_ext.nit
lib/gtk/v3_6.nit
lib/gtk/v3_8.nit
lib/ios/app.nit
lib/ios/examples/hello_ios.nit
lib/java/collections.nit
lib/java/io.nit
lib/java/java.nit
lib/json/dynamic.nit
lib/json/serialization.nit
lib/jvm.nit
lib/libevent.nit
lib/markdown/README.md [moved from lib/markdown/README with 100% similarity]
lib/markdown/decorators.nit
lib/markdown/markdown.nit
lib/markdown/test_markdown.nit
lib/markdown/wikilinks.nit
lib/md5.nit
lib/mnit/opengles1.nit
lib/mnit_android/android_assets.nit
lib/mnit_android/android_opengles1.nit
lib/mongodb/native_mongodb.nit
lib/more_collections.nit
lib/mpi.nit
lib/neo4j/graph/graph.nit
lib/neo4j/graph/json_graph_store.nit
lib/neo4j/graph/sequential_id.nit
lib/nitcorn/http_response.nit
lib/pnacl.nit
lib/posix_ext.nit
lib/pthreads/extra.nit
lib/pthreads/pthreads.nit
lib/realtime.nit
lib/sax/helpers/attributes_impl.nit
lib/sax/helpers/sax_locator_impl.nit
lib/sax/helpers/xml_filter_impl.nit
lib/saxophonit/saxophonit.nit
lib/saxophonit/testing.nit
lib/sdl.nit
lib/sdl2/events.nit
lib/sdl2/image.nit
lib/sdl2/sdl2_base.nit
lib/sdl2/syswm.nit
lib/serialization/README.md
lib/serialization/caching.nit [new file with mode: 0644]
lib/serialization/engine_tools.nit
lib/serialization/serialization.nit
lib/sha1.nit
lib/signals.nit
lib/socket/socket.nit
lib/socket/socket_c.nit
lib/sqlite3/native_sqlite3.nit
lib/sqlite3/sqlite3.nit
lib/standard/bitset.nit
lib/standard/bytes.nit
lib/standard/collection/abstract_collection.nit
lib/standard/collection/array.nit
lib/standard/collection/list.nit
lib/standard/collection/range.nit
lib/standard/collection/union_find.nit
lib/standard/file.nit
lib/standard/kernel.nit
lib/standard/math.nit
lib/standard/posix.nit
lib/standard/re.nit
lib/standard/ropes.nit
lib/standard/stream.nit
lib/standard/string.nit
lib/standard/string_nit.c
lib/standard/string_nit.h
lib/standard/time.nit
lib/string_experimentations/README.md [moved from lib/string_experimentations/README with 100% similarity]
lib/string_experimentations/utf8.nit
lib/string_experimentations/utf8_noindex.nit
lib/template/template.nit
lib/websocket/websocket.nit
lib/xdg_basedir/xdg_basedir.nit
misc/jenkins/README.md [moved from misc/jenkins/README with 100% similarity]
share/README.md [moved from share/README with 100% similarity]
share/man/nitc.md
share/man/nitx.md
share/nitdoc/css/nitdoc.css
src/Makefile
src/astprinter.nit
src/compiler/abstract_compiler.nit
src/compiler/compiler_ffi/compiler_ffi.nit
src/compiler/compiler_ffi/light.nit
src/compiler/global_compiler.nit
src/compiler/separate_compiler.nit
src/doc/console_templates/console_model.nit
src/doc/console_templates/console_templates.nit
src/doc/doc_base.nit
src/doc/doc_phases/doc_concerns.nit
src/doc/doc_phases/doc_console.nit
src/doc/doc_phases/doc_extract.nit
src/doc/doc_phases/doc_graphs.nit
src/doc/doc_phases/doc_hierarchies.nit
src/doc/doc_phases/doc_html.nit
src/doc/doc_phases/doc_indexing.nit
src/doc/doc_phases/doc_intros_redefs.nit
src/doc/doc_phases/doc_lin.nit
src/doc/doc_phases/doc_pages.nit
src/doc/doc_phases/doc_poset.nit
src/doc/doc_phases/doc_structure.nit
src/doc/html_templates/html_model.nit
src/doc/html_templates/html_templates.nit
src/doc/vim_autocomplete.nit
src/ffi/cpp.nit
src/ffi/java.nit
src/ffi/light_ffi_base.nit
src/frontend/check_annotation.nit
src/frontend/div_by_zero.nit
src/frontend/serialization_phase.nit
src/frontend/simple_misc_analysis.nit
src/interpreter/debugger.nit
src/interpreter/naive_interpreter.nit
src/literal.nit
src/loader.nit
src/metrics/mclasses_metrics.nit
src/metrics/mendel_metrics.nit
src/metrics/metrics_base.nit
src/metrics/nullables_metrics.nit
src/mkcsrc
src/model/model.nit
src/model/model_base.nit
src/model/model_collect.nit [new file with mode: 0644]
src/model_utils.nit [deleted file]
src/modelize/modelize_property.nit
src/nitni/nitni_base.nit
src/nitni/nitni_utilities.nit
src/nitpick.nit
src/nitserial.nit
src/nitx.nit
src/parser/lexer.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/rapid_type_analysis.nit
src/semantize/scope.nit
src/semantize/typing.nit
src/test_neo.nit
src/testing/README.md [moved from src/testing/README with 100% similarity]
src/uml/uml_base.nit
src/uml/uml_class.nit
src/vm/virtual_machine.nit
src/vm/vm_optimizations.nit
tests/Makefile
tests/base_do_block.nit [new file with mode: 0644]
tests/base_error_literal.nit [new file with mode: 0644]
tests/base_init_autoinit2.nit
tests/base_init_autoinit3.nit
tests/base_native_array.nit [new file with mode: 0644]
tests/base_scope.nit [new file with mode: 0644]
tests/base_test_bases.nit [new file with mode: 0644]
tests/nitpick.args [new file with mode: 0644]
tests/nitx.args
tests/sav/README.md [moved from tests/sav/README with 100% similarity]
tests/sav/base_adaptive_loop3_alt3.res
tests/sav/base_do_block.res [new file with mode: 0644]
tests/sav/base_error_literal.res [new file with mode: 0644]
tests/sav/base_import_alt3.res
tests/sav/base_init_autoinit2_alt2.res
tests/sav/base_init_autoinit3_alt9.res [new file with mode: 0644]
tests/sav/base_native_array.res [new file with mode: 0644]
tests/sav/base_scope.res [new file with mode: 0644]
tests/sav/base_scope_alt1.res [new file with mode: 0644]
tests/sav/base_test_bases.res [new file with mode: 0644]
tests/sav/base_var_null_alt12.res
tests/sav/base_var_null_alt4.res
tests/sav/base_var_null_alt8.res
tests/sav/error_expr_not_ok_alt6.res
tests/sav/error_mod_unk.res
tests/sav/neo_doxygen_dump_args4.res
tests/sav/neo_doxygen_dump_args5.res
tests/sav/nitg-e/fixme/base_gen_reassign_alt4.res
tests/sav/nitg-e/fixme/base_gen_reassign_alt5.res
tests/sav/nitg-e/fixme/base_gen_reassign_alt6.res
tests/sav/nitg-e/test_json_deserialization_alt1.res
tests/sav/nitg-e/test_serialization_alt2.res [new file with mode: 0644]
tests/sav/nitg-e/test_serialization_alt3.res [new file with mode: 0644]
tests/sav/nitg-e/test_serialization_alt4.res [new file with mode: 0644]
tests/sav/nitg-e/test_serialization_alt5.res [new file with mode: 0644]
tests/sav/nitmetrics_args1.res
tests/sav/nitpick_args1.res [new file with mode: 0644]
tests/sav/nitpretty_args21.res
tests/sav/nitpretty_args52.res
tests/sav/nitserial_args1.res
tests/sav/nituml_args3.res
tests/sav/nituml_args4.res
tests/sav/nitx.res
tests/sav/nitx_args1.res
tests/sav/nitx_args2.res
tests/sav/nitx_args3.res
tests/sav/test_byte.res [new file with mode: 0644]
tests/sav/test_float.res
tests/sav/test_json_deserialization.res
tests/sav/test_json_deserialization_alt1.res
tests/sav/test_json_deserialization_alt2.res
tests/sav/test_new_native_alt1.res
tests/sav/test_serialization_alt2.res [new file with mode: 0644]
tests/sav/test_serialization_alt3.res [new file with mode: 0644]
tests/sav/test_serialization_alt4.res [new file with mode: 0644]
tests/sav/test_serialization_alt5.res [new file with mode: 0644]
tests/sav/utf_noindex_test.res [deleted file]
tests/sav/xymus_net.res
tests/string_ffi_ref_test.nit
tests/test_advice_repeated_types.nit [new file with mode: 0644]
tests/test_byte.nit [new file with mode: 0644]
tests/test_curl.nit
tests/test_deserialization.nit
tests/test_ffi_c_accessor.nit
tests/test_ffi_c_callback_extern_receiver.nit
tests/test_ffi_c_callbacks.nit
tests/test_ffi_c_fibonacci.nit
tests/test_ffi_c_lots_of_refs.nit
tests/test_ffi_c_more.nit
tests/test_ffi_c_more_callbacks.nit
tests/test_ffi_c_new.nit
tests/test_ffi_c_new_extern.nit
tests/test_ffi_c_operators.nit
tests/test_ffi_c_super.nit
tests/test_ffi_c_types.nit
tests/test_ffi_cpp_callbacks.nit
tests/test_ffi_cpp_duplicated_callback_a.nit
tests/test_ffi_cpp_duplicated_callback_b.nit
tests/test_ffi_cpp_strings.nit
tests/test_ffi_cpp_types.nit
tests/test_ffi_java_callbacks.nit
tests/test_ffi_java_generics.nit
tests/test_ffi_java_string.nit
tests/test_ffi_java_types.nit
tests/test_ffi_objc_types_and_callbacks.nit
tests/test_float.nit
tests/test_pretty/test_extern1.nit
tests/test_prog/README.md [moved from tests/test_prog/README with 99% similarity]
tests/test_prog/game/README.md [moved from tests/test_prog/game/README with 92% similarity]
tests/test_prog/platform/README.md [moved from tests/test_prog/platform/README with 96% similarity]
tests/test_prog/rpg/README.md [moved from tests/test_prog/rpg/README with 96% similarity]
tests/test_serialization.nit
tests/test_unrolled_list.nit [new file with mode: 0644]
tests/tests.sh
tests/utf_noindex_test.nit [deleted file]

index 2156619..9ecc2d3 100644 (file)
@@ -4,7 +4,6 @@
 .project
 EIFGENs
 
-.nit_compile*
 .nitunit
 .nitpretty
 *.orig
index 326d49b..c217c35 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -70,7 +70,6 @@ man:
        $(MAKE) -C share/man
 
 clean:
-       rm -rf -- .nit_compile 2> /dev/null || true
        rm -rf -- doc/stdlib doc/nitc || true
        cd c_src; make clean
        cd src; make clean
@@ -78,5 +77,4 @@ clean:
        cd share/man; make clean
        for m in $(PROGS); do \
                $(MAKE) clean -C "$$m"; \
-               test -d $$m/.nit_compile && rm -r $$m/.nit_compile; \
                done || true
similarity index 99%
rename from README
rename to README.md
index 3ee0c42..6b575a8 100644 (file)
--- a/README
+++ b/README.md
@@ -66,4 +66,3 @@ Using bash completion with Nit tools:
 More information:
 
        http://www.nitlanguage.org
-
diff --git a/VERSION b/VERSION
index 520c9c2..aed5a7d 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-v0.7.4
+v0.7.5
index ae91703..b2534e7 100755 (executable)
@@ -81,7 +81,7 @@ function run_compiler()
                bench_command "nitmd" "markdown" "./nitmd.$title.bin" markdown/benches/out/mixed.md 80
        fi
 
-       rm -r *.bin .nit_compile out 2> /dev/null
+       rm -r *.bin out 2> /dev/null
 }
 
 ## HANDLE OPTIONS ##
diff --git a/benchmarks/polygons/Makefile b/benchmarks/polygons/Makefile
new file mode 100644 (file)
index 0000000..e6bd303
--- /dev/null
@@ -0,0 +1,3 @@
+all:
+       $(MAKE) all -C nit
+       $(MAKE) all -C java
diff --git a/benchmarks/polygons/java/Makefile b/benchmarks/polygons/java/Makefile
new file mode 100644 (file)
index 0000000..e327368
--- /dev/null
@@ -0,0 +1,19 @@
+all: add_vertex_b sort_vertices_b intersection_b convex_hull_b convexity_b contain_b
+
+add_vertex_b:
+       ./bench_polygon.sh add_vertex
+
+sort_vertices_b:
+       ./bench_polygon.sh sort_vertices
+
+intersection_b:
+       ./bench_polygon.sh intersection
+
+convex_hull_b:
+       ./bench_polygon.sh convex_hull
+
+convexity_b:
+       ./bench_polygon.sh convexity
+
+contain_b:
+       ./bench_polygon.sh contain
diff --git a/benchmarks/polygons/java/bench_polygon.sh b/benchmarks/polygons/java/bench_polygon.sh
new file mode 100755 (executable)
index 0000000..46c2019
--- /dev/null
@@ -0,0 +1,173 @@
+#!/bin/bash
+# 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.
+
+source ../../bench_common.sh
+source ../../bench_plot.sh
+
+# Default number of times a command must be run with bench_command
+# Can be overrided with 'the option -n'
+count=5
+points=100000
+
+function usage()
+{
+       echo "run_bench: [options]* bench_name args"
+       echo "  -n count: number of execution for each bar (default: $count)"
+       echo "  -p points: number of points used for the polygons (default: $points)"
+       echo "  -h: this help"
+       echo ""
+       echo "Benches : "
+       echo "  add_vertex: bench adding vertex in a polygon"
+       echo "    - usage : add_vertex nbpts"
+       echo "  sort_vertices: sort the vertices of the polygon"
+       echo "    - usage : sort_vertices nbpts"
+       echo "  intersection: bench the intersection between two polygons"
+       echo "    - usage : intersection nbpts"
+       echo "  convex_hull: bench creating the convex hull of a set of points"
+       echo "    - usage : convex_hull nbpts"
+       echo " convexity : bench the verification of the convexity of a polygon"
+       echo "    - usage : convexity nbpts"
+       echo " contain : bench the point in polygon check"
+       echo "    - usage : contain nbpts"
+}
+
+
+function bench_add_vertex()
+{
+       if [ -d add_vertex ]; then
+               rm add_vertex/*
+       else
+               mkdir add_vertex
+       fi
+
+       cd add_vertex
+
+       javac ../code/*.java -d .
+
+       prepare_res add_vertex.out add_vertex add_vertex
+
+       bench_command add_vertex add_vertex java BenchPolygon add_vertex $((points / 2))
+}
+
+function bench_sorting()
+{
+       if [ -d sort_vertices ]; then
+               rm sort_vertices/*
+       else
+               mkdir sort_vertices
+       fi
+       cd sort_vertices
+
+       javac ../code/*.java -d .
+
+       prepare_res sort_vertices.out sort_vertex sort_vertices
+
+       bench_command sort_vertices sort_vertices java BenchPolygon sort_vertices $((points * 20))
+
+}
+
+function bench_intersection()
+{
+       if [ -d intersection ]; then
+               rm intersection/*
+       else
+               mkdir intersection
+       fi
+       cd intersection
+
+       javac ../code/*.java -d .
+
+       prepare_res intersection.out intersection intersection
+
+       bench_command intersection intersection java BenchPolygon intersection $((points / 10))
+}
+
+function bench_convex_hull()
+{
+       echo Bench way too long, skipping it
+
+       return
+
+       if [ -d convex_hull ]; then
+               rm convex_hull/*
+       else
+               mkdir convex_hull
+       fi
+       cd convex_hull
+
+       javac ../code/*.java -d .
+
+       prepare_res convex_hull.out convex_hull convex_hull
+
+       bench_command convex_hull convex_hull java BenchPolygon convex_hull $((points * 30))
+}
+
+function bench_convexity()
+{
+       if [ -d convexity ]; then
+               rm convexity/*
+       else
+               mkdir convexity
+       fi
+       cd convexity
+
+       javac ../code/*.java -d .
+
+       prepare_res convexity.out convexity convexity
+
+       bench_command convexity convexity java BenchPolygon convexity $((points * 40))
+}
+
+
+function bench_contain()
+{
+       if [ -d contain ]; then
+               rm contain/*
+       else
+               mkdir contain
+       fi
+       cd contain
+
+       javac ../code/*.java -d .
+
+       prepare_res contain.out contain contain
+
+       bench_command contain contain java BenchPolygon contain $((points * 50))
+}
+
+stop=false
+while [ "$stop" = false ]; do
+       case "$1" in
+               -h) usage; exit;;
+               -n) count="$2"; shift; shift;;
+               -p) points="$2"; shift;shift;;
+               *) stop=true
+       esac
+done
+
+if test $# -lt 1; then
+       usage
+       exit
+fi
+
+case "$1" in
+       add_vertex) shift; bench_add_vertex $@ ;;
+       sort_vertices) shift; bench_sorting $@ ;;
+       intersection) shift; bench_intersection $@ ;;
+       convex_hull) shift; bench_convex_hull $@ ;;
+       convexity) shift; bench_convexity $@;;
+       contain) shift; bench_contain $@;;
+       *) usage; exit;;
+esac
diff --git a/benchmarks/polygons/java/code/AntiClockSort.java b/benchmarks/polygons/java/code/AntiClockSort.java
new file mode 100644 (file)
index 0000000..e698d62
--- /dev/null
@@ -0,0 +1,53 @@
+
+/**
+ *
+ * @author Johan
+ * @source
+ * http://stackoverflow.com/questions/6989100/sort-points-in-clockwise-order
+ */
+public class AntiClockSort extends PolygonSorter {
+
+    public AntiClockSort(double[][] points) {
+        super(points);
+    }
+
+    /**
+     * Compare polygon vertices in counter-clock wise order starting at six
+     * hour. If two points share the same rad, then the farest to the center is
+     * chosen.
+     *
+     * @param a: a point to compare
+     * @param b: a second point to compare
+     * @return
+     */
+    @Override
+    public int compare(PointDouble a, PointDouble b) {
+        if (a.x - center.x >= 0 && b.x - center.x < 0) {
+            return -1;
+        }
+        if (a.x - center.x < 0 && b.x - center.x >= 0) {
+            return +1;
+        }
+        if (a.x - center.x == 0 && b.x - center.x == 0) {
+            if (a.y - center.y >= 0 || b.y - center.y >= 0) {
+                return (a.y > b.y) ? -1 : +1;
+            }
+            return (b.y > a.y) ? -1 : +1;
+        }
+
+        // compute the cross product of vectors (center -> a) x (center -> b)
+        double det = (a.x - center.x) * (b.y - center.y) - (b.x - center.x) * (a.y - center.y);
+        if (det < 0) {
+            return -1;
+        }
+        if (det > 0) {
+            return +1;
+        }
+
+        // points a and b are on the same line from the center
+        // check which point is closer to the center
+        double d1 = (a.x - center.x) * (a.x - center.x) + (a.y - center.y) * (a.y - center.y);
+        double d2 = (b.x - center.x) * (b.x - center.x) + (b.y - center.y) * (b.y - center.y);
+        return (d1 > d2) ? -1 : +1;
+    }
+}
diff --git a/benchmarks/polygons/java/code/BenchPolygon.java b/benchmarks/polygons/java/code/BenchPolygon.java
new file mode 100644 (file)
index 0000000..bb7721f
--- /dev/null
@@ -0,0 +1,147 @@
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.Random;
+
+/**
+ *
+ * @author Johan Kayser, Romain Chanoir
+ */
+/**
+ * Runs the benchmarks for the most important operations and generates a file
+ * with time execution results
+ */
+public class BenchPolygon {
+
+    public static void main(String[] args) throws IOException {
+           int  n = 0;
+           if(args[1] != null){
+               n = Integer.parseInt(args[1]);
+           }else {
+               n = 100000;
+           }
+       switch (args[0]){
+               case "add_vertex":
+                       testAddVertex(n);
+                       break;
+               case "sort_vertices":
+                       testSortVertices(n);
+                       break;
+               case "intersection":
+                       testIntersects(n);
+                       break;
+               case "convex_hull":
+                       testConvexHull(n);
+                       break;
+               case "convexity":
+                       testIsConvex(n);
+                       break;
+               case "contain":
+                       testContain(n);
+                       break;
+               default:
+                       break;
+       }
+    }
+
+    /**
+     * addVertex bench: adds a vertex to a polygon with the given number of
+     * vertices
+     */
+    public static void testAddVertex(int nb) throws IOException {
+        ArrayList<PointDouble> points = new ArrayList<>();
+        ArrayList<PointDouble> randomPoints = new ArrayList<>();
+        randomPoints = generatePoints(nb + 1);
+
+        for (int i = 0; i < nb; ++i) {
+            points.add(randomPoints.remove(0));
+        }
+        ConvexPolygon test = new ConvexPolygon(points);
+        test.sortVertices(new AntiClockSort(test.getVertices()));
+
+        test.addVertex(randomPoints.remove(0));
+    }
+
+    /**
+     * sortVertices bench: sorts the given number of vertices in the ArrayList
+     * of a polygon
+     */
+    public static void testSortVertices(int nb) throws IOException {
+        ArrayList<PointDouble> randomPoints = new ArrayList<>();
+        randomPoints = generatePoints(nb);
+        Collections.shuffle(randomPoints);
+
+        ConvexPolygon test = new ConvexPolygon(randomPoints);
+        test.sortVertices(new AntiClockSort(test.getVertices()));
+
+    }
+
+    /**
+     * intersects bench: tests the intersection between two polygons with the
+     * given number of vertices
+     */
+    public static void testIntersects(int nb) throws IOException {
+        ArrayList<PointDouble> points1 = new ArrayList<>();
+        ArrayList<PointDouble> points2 = new ArrayList<>();
+        points1 = generatePoints(nb);
+        points2 = generatePoints(nb);
+        ConvexPolygon test1 = new ConvexPolygon(points1);
+        ConvexPolygon test2 = new ConvexPolygon(points2);
+        test1.sortVertices(new AntiClockSort(test1.getVertices()));
+        test2.sortVertices(new AntiClockSort(test2.getVertices()));
+
+        Boolean rez = test1.intersects(test2);
+    }
+
+    /**
+     * convexHull bench: gets the convex hull of the given number of points
+     */
+    public static void testConvexHull(int nb) throws IOException {
+        ArrayList<PointDouble> randomPoints = new ArrayList<>();
+        randomPoints = generatePoints(nb);
+        Collections.shuffle(randomPoints);
+        ConvexPolygon test = new ConvexPolygon(randomPoints);
+
+        ConvexPolygon rez = test.convexHull(randomPoints);
+    }
+
+    /**
+     * isConvex bench: checks if the polygon with the given number of vertices
+     * is convex (we test the worst case -> polygon vertices are ordered)
+     */
+    public static void testIsConvex(int nb) throws IOException {
+        ArrayList<PointDouble> randomPoints = new ArrayList<>();
+        randomPoints = generatePoints(nb);
+        ConvexPolygon test = new ConvexPolygon(randomPoints);
+        test.sortVertices(new AntiClockSort(test.getVertices()));
+
+        Boolean rez = test.isConvex();
+    }
+
+    /**
+     * contain bench: checks if the polygon with the given number of vertices
+     * contains a randomly generated point
+     */
+    public static void testContain(int nb) throws IOException {
+        ArrayList<PointDouble> randomPoints = new ArrayList<>();
+        randomPoints = generatePoints(nb);
+        ConvexPolygon test = new ConvexPolygon(randomPoints);
+        test.sortVertices(new AntiClockSort(test.getVertices()));
+
+        Boolean rez = test.contain(new PointDouble(0.0, 0.0));
+    }
+
+    /**
+     * generates some points making it easier to use convex polygons
+     */
+    public static ArrayList<PointDouble> generatePoints(int nb) {
+        ArrayList<PointDouble> pts = new ArrayList<>();
+        pts = PointDouble.getNPointsOnCircle(100.0, nb);
+        return pts;
+    }
+}
diff --git a/benchmarks/polygons/java/code/ClockSort.java b/benchmarks/polygons/java/code/ClockSort.java
new file mode 100644 (file)
index 0000000..617b194
--- /dev/null
@@ -0,0 +1,50 @@
+
+/**
+ *
+ * @author Johan
+ */
+public class ClockSort extends PolygonSorter {
+
+    public ClockSort(double[][] points) {
+        super(points);
+    }
+
+    /**
+     * Compare polygon vertices in clock wise order starting at six hour. If two
+     * points share the same rad, then the farest to the center is chosen.
+     *
+     * @param a: a point to compare
+     * @param b: a second point to compare
+     * @return
+     */
+    @Override
+    public int compare(PointDouble a, PointDouble b) {
+        if (a.x - center.x >= 0 && b.x - center.x < 0) {
+            return +1;
+        }
+        if (a.x - center.x < 0 && b.x - center.x >= 0) {
+            return -1;
+        }
+        if (a.x - center.x == 0 && b.x - center.x == 0) {
+            if (a.y - center.y >= 0 || b.y - center.y >= 0) {
+                return (a.y > b.y) ? +1 : -1;
+            }
+            return (b.y > a.y) ? +1 : -1;
+        }
+
+        // compute the cross product of vectors (center -> a) x (center -> b)
+        double det = (a.x - center.x) * (b.y - center.y) - (b.x - center.x) * (a.y - center.y);
+        if (det < 0.0d) {
+            return +1;
+        }
+        if (det > 0.0d) {
+            return -1;
+        }
+
+        // points a and b are on the same line from the center
+        // check which point is closer to the center
+        double d1 = (a.x - center.x) * (a.x - center.x) + (a.y - center.y) * (a.y - center.y);
+        double d2 = (b.x - center.x) * (b.x - center.x) + (b.y - center.y) * (b.y - center.y);
+        return (d1 > d2) ? +1 : -1;
+    }
+}
diff --git a/benchmarks/polygons/java/code/ConvexPolygon.java b/benchmarks/polygons/java/code/ConvexPolygon.java
new file mode 100644 (file)
index 0000000..e02bc57
--- /dev/null
@@ -0,0 +1,280 @@
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+
+/**
+ *
+ * @author romis_000, Johan
+ */
+public class ConvexPolygon {
+
+    private ArrayList<PointDouble> points = new ArrayList<PointDouble>();
+
+    public ConvexPolygon(ArrayList<PointDouble> points) {
+        this.points = points;
+    }
+
+    public ArrayList<PointDouble> getPointDoubles() {
+        return points;
+    }
+
+    public double[] GetXPointDoubles() {
+        double xpoints[] = new double[this.points.size()];
+        int c = 0;
+        for (PointDouble p : this.points) {
+            xpoints[c] = p.x;
+            ++c;
+        }
+        return xpoints;
+    }
+
+    public double[] GetYPointDoubles() {
+        double ypoints[] = new double[this.points.size()];
+        int c = 0;
+        for (PointDouble p : this.points) {
+            ypoints[c] = p.y;
+            ++c;
+        }
+        return ypoints;
+    }
+
+    public double[][] getVertices() {
+        double[][] vertices = new double[points.size()][2];
+        for (int i = 0; i < points.size(); ++i) {
+            vertices[i][0] = points.get(i).x;
+            vertices[i][1] = points.get(i).y;
+        }
+        return vertices;
+    }
+
+    /**
+     * Returns the axis corresponding to the edges of the polygon, used to check
+     * for detection collision
+     */
+    public PointDouble[] Getaxes() {
+        PointDouble[] axes = new PointDouble[this.points.size()];
+        for (int i = 0; i < this.points.size(); i++) {
+            // get the current vertex
+            PointDouble v1 = new PointDouble(this.points.get(i).getX(), this.points.get(i).getY());
+            // get the next vertex
+            PointDouble v2 = new PointDouble(this.points.get(i + 1 == this.points.size() ? 0 : i + 1).getX(), this.points.get(i + 1 == this.points.size() ? 0 : i + 1).getY());
+            // subtract the two to get the edge vector
+            PointDouble edge = new PointDouble((v1.x + (-v2.x)), (v1.y + (-v2.y)));
+            // get either perpendicular vector
+            PointDouble normal = new PointDouble((-edge.y), edge.x);
+            // the perp method is just (x, y) => (-y, x) or (y, -x)
+            axes[i] = normal;
+        }
+        return axes;
+    }
+
+    /**
+     * Checks if the polygon is convex
+     */
+    public boolean isConvex() {
+        PointDouble prev = points.get(points.size() - 2);
+        PointDouble curr = points.get(points.size() - 1);
+        PointDouble next = points.get(0);
+        // Are the first two selected edges making a turnleft ?
+        boolean isCCW = turnLeft(prev, curr, next);
+        // Verify if all the edges are making the same type of angle as the first two
+        for (int i = 1; i < points.size(); i++) {
+            prev = curr;
+            curr = next;
+            next = points.get(i);
+            if (turnLeft(prev, curr, next) != isCCW) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Checks if a given point is within the polygon
+     */
+    public boolean contain(PointDouble p) {
+        PointDouble prev = points.get(points.size() - 1);
+        PointDouble curr = p;
+        PointDouble next = points.get(0);
+        // Is the point left or right of the selected edge ?
+        boolean isCCW = turnLeft(prev, curr, next);
+        // Is the point the same side of every other edges of the polygon ?
+        for (int i = 1; i < points.size(); i++) {
+            prev = next;
+            next = points.get(i);
+            if (turnLeft(prev, curr, next) != isCCW) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Check the sign of the angle between vectors [p1, p2] and [p2, p3]
+     * with the cross product
+     */
+    public boolean turnLeft(PointDouble p1, PointDouble p2, PointDouble p3) {
+        return ((p2.getX() - p1.getX()) * (p3.getY()
+                - p2.getY()) - (p3.getX() - p2.getX()) * (p2.getY() - p1.getY())) > 0;
+    }
+
+    /**
+     * Checks if the vertices of the polygon are in counter-clock wise order
+     * The vertices of the polygon need to be sorted for this test
+     */
+    public boolean isCCW() {
+        double min = points.get(0).getY();
+        int minIndex = 0;
+        for (int i = 1; i < points.size() - 1; i++) {
+            if (points.get(i).getY() < min) {
+                min = points.get(i).getY();
+                minIndex = i;
+            }
+        }
+        PointDouble prev = points.get((minIndex - 1 + points.size()) % points.size());
+        PointDouble next = points.get((minIndex + 1) % points.size());
+        return turnLeft(prev, points.get(minIndex), next);
+    }
+
+    /**
+     * Calculates the convex hull of list of points
+     * Using the monotone chain algorithm
+     */
+    public ConvexPolygon convexHull(ArrayList<PointDouble> points) {
+        Collections.sort(points, new PointXCompare());
+        int n = points.size();
+
+        ArrayList<PointDouble> pl1 = new ArrayList<PointDouble>();
+        ArrayList<PointDouble> pl2 = new ArrayList<PointDouble>();
+        for (int i = 0; i < n; i++) {
+            while (pl2.size() >= 2 && !(turnLeft(pl2.get(pl2.size() - 2), pl2.get(pl2.size() - 1), points.get(i)))) {
+                pl2.remove(pl2.get(pl2.size() - 1));
+            }
+            pl2.add(points.get(i));
+        }
+        for (int i = n - 1; i >= 0; i--) {
+            while (pl1.size() >= 2 && !(turnLeft(pl1.get(pl1.size() - 2), pl1.get(pl1.size() - 1), points.get(i)))) {
+                pl1.remove(pl1.get(pl1.size() - 1));
+            }
+            pl1.add(points.get(i));
+        }
+        pl1.remove(pl1.size() - 1);
+        pl2.remove(pl2.size() - 1);
+        pl2.addAll(pl1);
+        return new ConvexPolygon(pl2);
+    }
+
+    /**
+     * Translates the polygon from the given numbers
+     */
+    public void translate(double x, double y) {
+        for (PointDouble p : this.points) {
+            p.x += x;
+            p.y += y;
+        }
+    }
+
+    /**
+     * Checks for an intersection between the polygon and the second given
+     * polygon
+     */
+    public Boolean intersects(ConvexPolygon pol2) {
+        PointDouble[] axes1 = this.Getaxes();
+        PointDouble[] axes2 = pol2.Getaxes();
+        for (int i = 0; i < axes1.length; i++) {
+            PointDouble axis = axes1[i];
+            // project both shapes onto the axis
+            Projection p1 = this.project(axis);
+            Projection p2 = pol2.project(axis);
+            // do the projections overlap?
+            if (!p1.overlap(p2)) {
+                // then we can guarantee that the shapes do not overlap
+                return false;
+            }
+        }
+        for (int i = 0; i < axes2.length; i++) {
+            PointDouble axis = axes2[i];
+            Projection p1 = this.project(axis);
+            Projection p2 = pol2.project(axis);
+            if (!p1.overlap(p2)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Generates a projection of an edge of the polygon on a given axis
+     */
+    public Projection project(PointDouble axis) {
+        double min = ((axis.x * this.points.get(0).x) + (axis.y * this.points.get(0).y));
+        double max = min;
+        for (int i = 1; i < this.points.size(); i++) {
+            double p = ((axis.x * this.points.get(i).x) + (axis.y * this.points.get(i).y));
+            if (p < min) {
+                min = p;
+            } else if (p > max) {
+                max = p;
+            }
+        }
+        Projection proj = new Projection(min, max);
+        return proj;
+    }
+
+    public Boolean hasVertex(PointDouble pt) {
+        for (int i = 0; i < this.points.size(); i++) {
+            //for (int i = 0; i < this.points.size() - 1; i++) {
+            if (this.points.get(i).equals(pt)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public Boolean deleteVertex(PointDouble pt) {
+        if (this.points.size() > 3) {
+            for (int i = 0; i < this.points.size(); i++) {
+                if (this.points.get(i).equals(pt)) {
+                    this.points.remove(i);
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Sorts the vertices of the polygon in an order specified by the sorter
+     * used
+     */
+    public void sortVertices(PolygonSorter sorter) {
+        PointDouble[] arrPointDoubles = points.toArray(new PointDouble[points.size()]);
+        Arrays.sort(arrPointDoubles, sorter);
+        this.points.clear();
+        points.addAll(Arrays.asList(arrPointDoubles));
+    }
+
+    /*
+    * Add a vertex to the polygon
+    * Return true if the vertex is added to the polygon
+    * Return false otherwise, which means that the addition
+    * of the vertex would have made it concave.
+    */
+    public Boolean addVertex(PointDouble pt) {
+        // Make a temporary list to check some properties of the new polygon
+        ArrayList<PointDouble> tempList = new ArrayList<>(Arrays.asList(this.points.toArray(new PointDouble[this.points.size()])));
+        tempList.add(pt);
+        // Create a temporary polygon
+        ConvexPolygon tempPolygon = new ConvexPolygon(tempList);
+        // Sort it
+        tempPolygon.sortVertices(new AntiClockSort(tempPolygon.getVertices()));
+        // We need the new polygon to be convex, or we can't accept to add the new vertex.
+        if (tempPolygon.isConvex()) {
+            this.points = tempPolygon.points;
+            return true;
+        } else {
+            return false;
+        }
+    }
+}
diff --git a/benchmarks/polygons/java/code/PointDouble.java b/benchmarks/polygons/java/code/PointDouble.java
new file mode 100644 (file)
index 0000000..8e1b0a4
--- /dev/null
@@ -0,0 +1,60 @@
+
+import java.util.ArrayList;
+import java.util.Random;
+
+/**
+ * Represents a 2d point with double coordinates
+ *
+ * @author Johan
+ */
+public class PointDouble {
+
+    double x;
+    double y;
+
+    public PointDouble() {
+        this(0.0d, 0.0d);
+    }
+
+    public PointDouble(double x, double y) {
+        this.x = x;
+        this.y = y;
+    }
+
+    public double getX() {
+        return this.x;
+    }
+
+    public double getY() {
+        return this.y;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == null || getClass() != obj.getClass()) {
+            return false;
+        }
+        final PointDouble other = (PointDouble) obj;
+        if (Double.doubleToLongBits(this.x) != Double.doubleToLongBits(other.x)) {
+            return false;
+        }
+        if (Double.doubleToLongBits(this.y) != Double.doubleToLongBits(other.y)) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * returns a array of n points on a circle
+     */
+    public static ArrayList<PointDouble> getNPointsOnCircle(double radius, int n) {
+        ArrayList<PointDouble> points = new ArrayList<>();
+       Random generator = new Random(0);
+        for(int i = 0; i < n; i++){
+       double angle = generator.nextFloat() * Math.PI * 2;
+               PointDouble p = new PointDouble(Math.cos(angle) * radius, Math.sin(angle) * radius);
+       points.add(p);
+       }
+        return points;
+    }
+}
diff --git a/benchmarks/polygons/java/code/PointXCompare.java b/benchmarks/polygons/java/code/PointXCompare.java
new file mode 100644 (file)
index 0000000..34f4520
--- /dev/null
@@ -0,0 +1,21 @@
+
+import java.util.Comparator;
+
+/**
+ *
+ * @author romis_000
+ */
+class PointXCompare
+        implements Comparator<PointDouble> {
+
+    @Override
+    public int compare(final PointDouble a, final PointDouble b) {
+        if (a.x == b.x) {
+            //return (int) (a.y - b.y);
+            return (a.y > b.y) ? -1 : +1;
+        } else {
+            //return (int)(a.x - b.x);
+            return (a.x > b.x) ? -1 : +1;
+        }
+    }
+}
diff --git a/benchmarks/polygons/java/code/PolygonSorter.java b/benchmarks/polygons/java/code/PolygonSorter.java
new file mode 100644 (file)
index 0000000..e05b984
--- /dev/null
@@ -0,0 +1,33 @@
+
+import java.util.Comparator;
+
+/**
+ * An utility class to sort the polygon vertices, is extended by AntiClockSort
+ * and ClockSort
+ *
+ * @author Johan
+ */
+public abstract class PolygonSorter implements Comparator<PointDouble> {
+
+    PointDouble center;
+
+    public PolygonSorter(double[][] podoubles) {
+        this.center = calcCenter(podoubles);
+    }
+
+    /**
+     * returns the point representing the center of a polygon
+     */
+    final PointDouble calcCenter(double[][] podoubles) {
+        double sumx = 0;
+        double sumy = 0;
+        for (double[] podouble : podoubles) {
+            sumx += podouble[0];
+            sumy += podouble[1];
+        }
+        return new PointDouble(sumx / podoubles.length, sumy / podoubles.length);
+    }
+
+    @Override
+    public abstract int compare(PointDouble a, PointDouble b);
+}
diff --git a/benchmarks/polygons/java/code/Projection.java b/benchmarks/polygons/java/code/Projection.java
new file mode 100644 (file)
index 0000000..e18688e
--- /dev/null
@@ -0,0 +1,21 @@
+
+/**
+ * An utility class to store a projection of an edge on an axis, used by the
+ * intersects operation
+ *
+ * @author Johan
+ */
+public class Projection {
+
+    private double min;
+    private double max;
+
+    public Projection(double min, double max) {
+        this.min = min;
+        this.max = max;
+    }
+
+    public Boolean overlap(Projection p2) {
+        return !(this.min > p2.max || p2.min > this.max);
+    }
+}
diff --git a/benchmarks/polygons/nit/Makefile b/benchmarks/polygons/nit/Makefile
new file mode 100644 (file)
index 0000000..e327368
--- /dev/null
@@ -0,0 +1,19 @@
+all: add_vertex_b sort_vertices_b intersection_b convex_hull_b convexity_b contain_b
+
+add_vertex_b:
+       ./bench_polygon.sh add_vertex
+
+sort_vertices_b:
+       ./bench_polygon.sh sort_vertices
+
+intersection_b:
+       ./bench_polygon.sh intersection
+
+convex_hull_b:
+       ./bench_polygon.sh convex_hull
+
+convexity_b:
+       ./bench_polygon.sh convexity
+
+contain_b:
+       ./bench_polygon.sh contain
diff --git a/benchmarks/polygons/nit/bench_polygon.nit b/benchmarks/polygons/nit/bench_polygon.nit
new file mode 100644 (file)
index 0000000..695f4aa
--- /dev/null
@@ -0,0 +1,135 @@
+#This file is part of NIT (http://www.nitlanguage.org).
+#
+# Copyright 2015 Romain Chanoir <romain.chanoir@viacesi.fr>
+#
+# 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 bench for the polygons
+module bench_polygon
+
+intrude import geometry::polygon
+import opts
+
+# Bench adding random vertices
+fun bench_add_vertices(n: Int) do
+       var randompoints = generate_points(n + 1)
+       var points = randompoints.clone
+       points.remove_at(points.length -1)
+       var poly = new ConvexPolygon.with_vertices(randompoints)
+       poly.sort_ccw
+       poly.add_vertex(randompoints.last)
+end
+
+# Bench the convex hull algorithm
+fun bench_convex_hull(n: Int) do
+       srand_from(50)
+       var randompoints = new Array[Point[Float]]
+       for i in [0..n] do
+               var point = new Point[Float](300.0.rand, 300.0.rand)
+               randompoints.add(point)
+       end
+       convex_hull(randompoints)
+end
+
+
+# Bench the convexity verificatioon
+fun bench_convexity(n : Int) do
+       var randompoints = generate_points(n)
+       var poly = new ConvexPolygon.with_vertices(randompoints)
+       poly.sort_ccw
+       poly.is_convex
+end
+
+# Bench the point in polygon algorithm
+fun bench_contain(n : Int) do
+       srand_from(50)
+       var randompoints = generate_points(n)
+       var poly = new ConvexPolygon.with_vertices(randompoints)
+       poly.sort_ccw
+       var point = new Point[Float](0.0, 0.0)
+       poly.contain(point)
+end
+
+# Bench the sorting of the vertices
+fun bench_sorting(n : Int) do
+       var randompoints = generate_points(n)
+       randompoints.shuffle
+       var poly = new ConvexPolygon.with_vertices(randompoints)
+       poly.sort_ccw
+
+end
+
+# Bench the intersection test between two polygons
+fun bench_intersection(n : Int) do
+       var r1 = generate_points(n)
+       var r2 = generate_points(n)
+       var poly1 = new ConvexPolygon.with_vertices(r1)
+       var poly2 = new ConvexPolygon.with_vertices(r2)
+       poly1.sort_ccw
+       poly2.sort_ccw
+       poly1.intersects(poly2)
+end
+
+# Get `n` points from a circle
+fun get_points_on_circle(radius: Float, n: Int): Array[Point[Float]] do
+       srand_from(50)
+       var points = new Array[Point[Float]]
+       for i in n.times do
+               var angle =  1000.0.rand * pi * 2.0
+               var point = new Point[Float](angle.cos * radius, angle.sin * radius)
+               points.add(point)
+       end
+       return points
+end
+
+# Helper for `get_points_on_circle`
+fun generate_points(n: Int): Array[Point[Float]] do
+       return get_points_on_circle(100.0, n)
+end
+
+var opts = new OptionContext
+var mode = new OptionEnum(["add_vertex","sort_vertices","intersection","convex_hull","is_convex","contain"], "Mode", -1, "-m")
+var nb_points = new OptionInt("number of points generated for the bench", -1, "--nbpts")
+opts.add_option(mode, nb_points)
+
+opts.parse(args)
+
+if nb_points.value == -1 then
+       opts.usage
+       exit(-1)
+end
+
+var modval = mode.value
+var n = nb_points.value
+if modval == 0 then
+       print "bench_add_vertices"
+       bench_add_vertices(n)
+else if modval == 1 then
+       print "bench_sorting"
+       bench_sorting(n)
+else if modval == 2 then
+       print "bench_intersection"
+       bench_intersection(n)
+else if modval == 3 then
+       print "bench_convex_hull"
+       bench_convex_hull(n)
+else if modval == 4 then
+       print "bench_convexity"
+       bench_convexity(n)
+else if modval == 5 then
+       print "bench_contain"
+       bench_contain(n)
+else
+       opts.usage
+       exit(-1)
+end
diff --git a/benchmarks/polygons/nit/bench_polygon.sh b/benchmarks/polygons/nit/bench_polygon.sh
new file mode 100755 (executable)
index 0000000..52895e9
--- /dev/null
@@ -0,0 +1,168 @@
+#!/bin/bash
+# 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.
+
+source ../../bench_common.sh
+source ../../bench_plot.sh
+
+# Default number of times a command must be run with bench_command
+# Can be overrided with 'the option -n'
+count=5
+points=100000
+
+function usage()
+{
+       echo "run_bench: [options]* bench_name args"
+       echo "  -n count: number of execution for each bar (default: $count)"
+       echo "  -p points: number of points used for the polygons (default: $points)"
+       echo "  -h: this help"
+       echo ""
+       echo "Benches : "
+       echo "  add_vertex: bench adding vertex in a polygon"
+       echo "    - usage : add_vertex p"
+       echo "  sort_vertices: sort the vertices of the polygon"
+       echo "    - usage : sort_vertices p"
+       echo "  intersection: bench the intersection between two polygons"
+       echo "    - usage : intersection p"
+       echo "  convex_hull: bench creating the convex hull of a set of points"
+       echo "    - usage : convex_hull p"
+       echo " convexity : bench the verification of the convexity of a polygon"
+       echo "    - usage : convexity p"
+       echo " contain : bench the point in polygon check"
+       echo "    - usage : contain p"
+}
+
+
+function bench_add_vertex()
+{
+       if [ -d add_vertex ]; then
+               rm add_vertex/*
+       else
+               mkdir add_vertex
+       fi
+       cd add_vertex
+
+       ../../../../bin/nitc --global ../bench_polygon.nit
+
+       prepare_res add_vertex.out add_vertex add_vertex
+
+       bench_command add_vertex add_vertex ./bench_polygon -m  add_vertex --nbpts $((points / 2))
+}
+
+function bench_sorting()
+{
+       if [ -d sort_vertices ]; then
+               rm sort_vertices/*
+       else
+               mkdir sort_vertices
+       fi
+       cd sort_vertices
+
+       ../../../../bin/nitc --global ../bench_polygon.nit
+
+       prepare_res sort_vertices.out sort_vertex sort_vertices
+
+       bench_command sort_vertices sort_vertices ./bench_polygon -m sort_vertices  --nbpts $((points * 20))
+}
+
+function bench_intersection()
+{
+       if [ -d intersection ]; then
+               rm intersection/*
+       else
+               mkdir intersection
+       fi
+       cd intersection
+
+       ../../../../bin/nitc --global ../bench_polygon.nit
+
+       prepare_res intersection.out intersection intersection
+
+       bench_command intersection intersection ./bench_polygon -m  intersection --nbpts $((points / 10))
+}
+
+function bench_convex_hull()
+{
+       if [ -d convex_hull ]; then
+               rm convex_hull/*
+       else
+               mkdir convex_hull
+       fi
+       cd convex_hull
+
+       ../../../../bin/nitc --global ../bench_polygon.nit
+
+       prepare_res convex_hull.out convex_hull convex_hull
+
+       bench_command convex_hull convex_hull ./bench_polygon -m convex_hull  --nbpts $((points * 30))
+}
+
+function bench_convexity()
+{
+       if [ -d convexity ]; then
+               rm convexity/*
+       else
+               mkdir convexity
+       fi
+       cd convexity
+
+       ../../../../bin/nitc --global ../bench_polygon.nit
+
+       prepare_res convexity.out convexity convexity
+
+       bench_command convexity convexity ./bench_polygon -m is_convex  --nbpts $((points * 40))
+}
+
+
+function bench_contain()
+{
+       if [ -d contain ]; then
+               rm contain/*
+       else
+               mkdir contain
+       fi
+       cd contain
+
+       ../../../../bin/nitc --global ../bench_polygon.nit
+
+       prepare_res contain.out contain contain
+
+       bench_command contain contain ./bench_polygon -m contain  --nbpts $((points * 50))
+
+}
+
+stop=false
+while [ "$stop" = false ]; do
+       case "$1" in
+               -h) usage; exit;;
+               -n) count="$2"; shift; shift;;
+               -p) points="$2"; shift;shift;;
+               *) stop=true
+       esac
+done
+
+if test $# -lt 1; then
+       usage
+       exit
+fi
+
+case "$1" in
+       add_vertex) shift; bench_add_vertex $@ ;;
+       sort_vertices) shift; bench_sorting $@ ;;
+       intersection) shift; bench_intersection $@ ;;
+       convex_hull) shift; bench_convex_hull $@ ;;
+       convexity) shift; bench_convexity $@;;
+       contain) shift; bench_contain $@;;
+       *) usage; exit;;
+esac
similarity index 100%
rename from clib/README
rename to clib/README.md
index 0932498..c3c6991 100644 (file)
@@ -16,7 +16,6 @@ bin/jwrapper:
 clean:
        rm -f bin/javap_test_parser bin/jwrapper
        rm -f gen/*
-       rm -rf .nit_compile/
        rm src/javap_lexer.nit src/javap_parser.nit src/javap_test_parser.nit
 
 .PHONY: grammar bin/jwrapper
index f0be48c..ee0942f 100644 (file)
@@ -223,16 +223,16 @@ class CodeGenerator
 
                # 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\trecv.{jmethod_id}({java_params});\n{comment}\t`\}\n")
+                       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}recv.{jmethod_id}({java_params});\n{comment}\t`\}\n")
+                       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\trecv.{jmethod_id}({java_params});\n{comment}\t`\}\n")
+                       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\trecv.{jmethod_id}({java_params});\n{comment}\t`\}\n")
+                       temp.add(" in \"Java\" `\{\n{comment}\t\tself.{jmethod_id}({java_params});\n{comment}\t`\}\n")
                end
 
                return temp.join("")
index e316369..29ea62e 100644 (file)
@@ -13,45 +13,45 @@ class Interpretor
        # The current values assigned to each variable
        var vars = new HashMap[String, Int]
 
-       redef fun visit(n) do n.accept_calculator(self)
+       redef fun visit(n) do n.accept_minilang(self)
 end
 
 redef class Node
        # Execution of the node by the interpreter `v`
-       fun accept_calculator(v: Interpretor) do visit_children(v)
+       fun accept_minilang(v: Interpretor) do visit_children(v)
 end
 
 redef class Nint
-       redef fun accept_calculator(v) do v.stack.push(text.to_i)
+       redef fun accept_minilang(v) do v.stack.push(text.to_i)
 end
 
 redef class Ns_assign
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                v.vars[n_id.text] = v.stack.pop
        end
 end
 
 redef class Ns_print
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                printn v.stack.pop
        end
 end
 redef class Ns_print_str
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                var text = n_str.text
                text = text.substring(1, text.length-2)
                printn text
        end
 end
 redef class Ns_println
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                print ""
        end
 end
 redef class Ns_if
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                v.enter_visit(n_c)
                if v.bstack.pop then
                        v.enter_visit(n_then)
@@ -62,7 +62,7 @@ redef class Ns_if
        end
 end
 redef class Ns_while
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                loop
                        v.enter_visit(n_c)
                        if not v.bstack.pop then break
@@ -73,7 +73,7 @@ end
 
 
 redef class Nc_and
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                var b1 = v.bstack.pop
                var b2 = v.bstack.pop
@@ -82,7 +82,7 @@ redef class Nc_and
 end
 
 redef class Nc_or
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                var b1 = v.bstack.pop
                var b2 = v.bstack.pop
@@ -91,93 +91,93 @@ redef class Nc_or
 end
 
 redef class Nc_not
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                v.bstack.push(not v.bstack.pop)
        end
 end
 
 redef class Nc_eq
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                v.bstack.push(v.stack.pop == v.stack.pop)
        end
 end
 
 redef class Nc_ne
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                v.bstack.push(v.stack.pop != v.stack.pop)
        end
 end
 
 redef class Nc_lt
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                v.bstack.push(v.stack.pop > v.stack.pop)
        end
 end
 
 redef class Nc_le
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                v.bstack.push(v.stack.pop >= v.stack.pop)
        end
 end
 
 redef class Nc_gt
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                v.bstack.push(v.stack.pop < v.stack.pop)
        end
 end
 
 redef class Nc_ge
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                v.bstack.push(v.stack.pop <= v.stack.pop)
        end
 end
 
 redef class Ne_add
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                v.stack.push(v.stack.pop+v.stack.pop)
        end
 end
 redef class Ne_sub
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                var n1 = v.stack.pop
                v.stack.push(v.stack.pop-n1)
        end
 end
 redef class Ne_neg
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                v.stack.push(-v.stack.pop)
        end
 end
 redef class Ne_mul
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                v.stack.push(v.stack.pop*v.stack.pop)
        end
 end
 redef class Ne_div
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                super
                var n1 = v.stack.pop
                v.stack.push(v.stack.pop/n1)
        end
 end
 redef class Ne_var
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                v.stack.push v.vars[n_id.text]
        end
 end
 redef class Ne_read
-       redef fun accept_calculator(v) do
+       redef fun accept_minilang(v) do
                var t = gets
                v.stack.push(t.to_i)
        end
index 030cd5d..52356e6 100644 (file)
@@ -38,7 +38,7 @@ tests:
        cd ../tests && ./run
 
 clean:
-       rm -r .nit_compile \
+       rm -r \
                *.dot *.out \
                nitcc_lexer.nit nitcc_parser.nit nitcc_test_parser.nit nitcc_parser_gen \
                nitcc0 nitcc1 \
index b2b3fed..57d2cda 100644 (file)
@@ -12,4 +12,3 @@ doc:
 
 clean:
        rm -rf bin
-       rm -rf -- .nit_compile 2> /dev/null || true
index 56cbbcb..b250071 100644 (file)
@@ -115,11 +115,11 @@ class Nitiwiki
        # List markdown source files from a directory.
        fun list_md_files(dir: String): Array[String] do
                var files = new Array[String]
-               var pipe = new ProcessReader("find", dir, "-name", "*.md")
+               var pipe = new ProcessReader("find", dir, "-name", "*.{config.md_ext}")
                while not pipe.eof do
                        var file = pipe.read_line
                        if file == "" then break # last line
-                       var name = file.basename(".md")
+                       var name = file.basename(".{config.md_ext}")
                        if name == "header" or name == "footer" or name == "menu" then continue
                        files.add file
                end
@@ -188,7 +188,10 @@ class Nitiwiki
        #
        # REQUIRE: `has_template`
        fun load_template(name: String): TemplateString do
-               assert has_template(name)
+               if not has_template(name) then
+                       message("Error: can't load template `{name}`", 0)
+                       exit 1
+               end
                var file = expand_path(config.root_dir, config.templates_dir, name)
                var tpl = new TemplateString.from_file(file)
                if tpl.has_macro("ROOT_URL") then
@@ -520,7 +523,7 @@ class WikiArticle
        # Create a new article using a markdown source file.
        init from_source(wiki: Nitiwiki, md_file: String) do
                src_full_path = md_file
-               init(wiki, md_file.basename(".md"))
+               init(wiki, md_file.basename(".{wiki.config.md_ext}"))
                content = md
        end
 
@@ -599,6 +602,14 @@ class WikiConfig
        # * 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.
+       # Files with other markdown extensions will be treated as resources.
+       #
+       # * key: `wiki.md_ext`
+       # * default: `md`
+       var md_ext: String is lazy do return value_or_default("wiki.md_ext", "md")
 
        # Root directory of the wiki.
        #
index 461e9e5..46518aa 100644 (file)
@@ -16,6 +16,7 @@
 module wiki_html
 
 import wiki_links
+import markdown::decorators
 
 redef class Nitiwiki
 
@@ -45,6 +46,18 @@ redef class Nitiwiki
                sitemap.is_dirty = true
                return sitemap
        end
+
+       # Markdown processor used for inline element such as titles in TOC.
+       private var inline_processor: MarkdownProcessor is lazy do
+               var proc = new MarkdownProcessor
+               proc.emitter.decorator = new InlineDecorator
+               return proc
+       end
+
+       # Inline markdown (remove h1, p, ... elements).
+       private fun inline_md(md: Writable): Writable do
+               return inline_processor.process(md.write_to_string)
+       end
 end
 
 redef class WikiEntry
@@ -218,8 +231,7 @@ redef class WikiArticle
                while iter.is_ok do
                        var hl = iter.item
                        # parse title as markdown
-                       var title = hl.title.md_to_html.to_s
-                       title = title.substring(3, title.length - 8)
+                       var title = wiki.inline_md(hl.title)
                        tpl.add "<li><a href=\"#{hl.id}\">{title}</a>"
                        iter.next
                        if iter.is_ok then
diff --git a/contrib/nitiwiki/tests/res/wiki3_nitiwiki_render.res b/contrib/nitiwiki/tests/res/wiki3_nitiwiki_render.res
new file mode 100644 (file)
index 0000000..adf25a7
--- /dev/null
@@ -0,0 +1 @@
+Render section out
diff --git a/contrib/nitiwiki/tests/res/wiki3_nitiwiki_status.res b/contrib/nitiwiki/tests/res/wiki3_nitiwiki_status.res
new file mode 100644 (file)
index 0000000..2451916
--- /dev/null
@@ -0,0 +1,12 @@
+nitiWiki
+name: wiki3
+config: wiki3/config.ini
+url: http://localhost/
+
+There is modified files:
+ + pages
+ + /pages/contact.mdwn
+ + /pages/index.mdwn
+ + /pages/other_page.mdwn
+
+Use nitiwiki --render to render modified files
diff --git a/contrib/nitiwiki/tests/wiki3/config.ini b/contrib/nitiwiki/tests/wiki3/config.ini
new file mode 100644 (file)
index 0000000..111f22b
--- /dev/null
@@ -0,0 +1,3 @@
+wiki.name=wiki3
+wiki.root_dir=wiki3
+wiki.md_ext=mdwn
diff --git a/contrib/nitiwiki/tests/wiki3/pages/contact.mdwn b/contrib/nitiwiki/tests/wiki3/pages/contact.mdwn
new file mode 100644 (file)
index 0000000..09f7129
--- /dev/null
@@ -0,0 +1 @@
+# Contact
diff --git a/contrib/nitiwiki/tests/wiki3/pages/index.mdwn b/contrib/nitiwiki/tests/wiki3/pages/index.mdwn
new file mode 100644 (file)
index 0000000..8b013d6
--- /dev/null
@@ -0,0 +1 @@
+# Index
diff --git a/contrib/nitiwiki/tests/wiki3/pages/other_page.mdwn b/contrib/nitiwiki/tests/wiki3/pages/other_page.mdwn
new file mode 100644 (file)
index 0000000..a1ca7d9
--- /dev/null
@@ -0,0 +1 @@
+# Other Page
diff --git a/contrib/nitiwiki/tests/wiki3/templates/footer.html b/contrib/nitiwiki/tests/wiki3/templates/footer.html
new file mode 100644 (file)
index 0000000..7506b39
--- /dev/null
@@ -0,0 +1,10 @@
+<div class="row footer">
+       <div class="container-fluid">
+               <div class="well well-sm">
+                       <p><strong>%TITLE% &copy; %YEAR%</strong></p>
+                       <p class="text-muted"><em>last modification %GEN_TIME%</em></p>
+                       <p class="text-muted">Proudly powered by
+                               <a href="http://nitlanguage.org">nit</a>!</p>
+               </div>
+       </div>
+</div>
diff --git a/contrib/nitiwiki/tests/wiki3/templates/header.html b/contrib/nitiwiki/tests/wiki3/templates/header.html
new file mode 100644 (file)
index 0000000..1cb06bf
--- /dev/null
@@ -0,0 +1,9 @@
+<div class="container-fluid header">
+       <div class="container">
+               <div class="header">
+                       <a href="http://uqam.ca"><img src="%ROOT_URL%/%LOGO%" alt="logo" /></a>
+                       <h2>%SUBTITLE%</h2>
+                       <h1>%TITLE%</h1>
+               </div>
+       </div>
+</div>
diff --git a/contrib/nitiwiki/tests/wiki3/templates/menu.html b/contrib/nitiwiki/tests/wiki3/templates/menu.html
new file mode 100644 (file)
index 0000000..1ff832e
--- /dev/null
@@ -0,0 +1,20 @@
+<nav class="menu" role="navigation">
+       <div class="container">
+               <!-- Brand and toggle get grouped for better mobile display -->
+               <div class="navbar-header">
+                       <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+                               <span class="sr-only">Toggle navigation</span>
+                               <span class="icon-bar"></span>
+                               <span class="icon-bar"></span>
+                               <span class="icon-bar"></span>
+                       </button>
+                       <a class="navbar-brand" href="%ROOT_URL%index.html">%TITLE%</a>
+               </div>
+               <!-- Collect the nav links, forms, and other content for toggling -->
+               <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+                       <ul class="nav navbar-nav">
+                       %MENUS%
+                       </ul>
+               </div><!-- /.navbar-collapse -->
+       </div>
+</nav>
diff --git a/contrib/nitiwiki/tests/wiki3/templates/template.html b/contrib/nitiwiki/tests/wiki3/templates/template.html
new file mode 100644 (file)
index 0000000..6b3b126
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+       <head>
+               <meta charset="utf-8">
+               <meta http-equiv="X-UA-Compatible" content="IE=edge">
+               <meta name="viewport" content="width=device-width, initial-scale=1">
+               <title>%TITLE%</title>
+
+               <link href="%ROOT_URL%/assets/vendors/bootstrap/bootstrap-3.2.0-dist/css/bootstrap.min.css" rel="stylesheet">
+               <link href="%ROOT_URL%/assets/css/main.css" rel="stylesheet">
+
+               <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
+               <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+               <!--[if lt IE 9]>
+               <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
+               <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+               <![endif]-->
+       </head>
+       <body>
+               %HEADER%
+               %TOP_MENU%
+               <div class="container">
+                       <div class="row">
+                               %BODY%
+                       </div>
+                       %FOOTER%
+               </div>
+
+               <script src="%ROOT_URL%/vendors/jquery/jquery-1.11.1.min.js"></script>
+               <script src="%ROOT_URL%/vendors/bootstrap/bootstrap-3.2.0-dist/js/bootstrap.min.js"></script>
+       </body>
+</html>
diff --git a/contrib/nitiwiki/tests/wiki3_nitiwiki_render.args b/contrib/nitiwiki/tests/wiki3_nitiwiki_render.args
new file mode 100644 (file)
index 0000000..75ceb1c
--- /dev/null
@@ -0,0 +1 @@
+../bin/nitiwiki --config wiki3/config.ini --clean --render -v
diff --git a/contrib/nitiwiki/tests/wiki3_nitiwiki_status.args b/contrib/nitiwiki/tests/wiki3_nitiwiki_status.args
new file mode 100644 (file)
index 0000000..c148644
--- /dev/null
@@ -0,0 +1 @@
+../bin/nitiwiki --config wiki3/config.ini --clean --status
diff --git a/contrib/objcwrapper/header_static/makefile b/contrib/objcwrapper/header_static/makefile
new file mode 100644 (file)
index 0000000..e4d3e19
--- /dev/null
@@ -0,0 +1,7 @@
+bin/header_static:
+       mkdir -p bin
+       ../../../bin/nitc --dir bin src/header_static.nit
+
+tests: bin/header_static
+       cat CGGeometry.h | bin/header_static > static_CGGeometry.h
+       cat NSObject.h | bin/header_static > static_NSObject.h
diff --git a/contrib/objcwrapper/header_static/src/header_static.nit b/contrib/objcwrapper/header_static/src/header_static.nit
new file mode 100644 (file)
index 0000000..c43fe2a
--- /dev/null
@@ -0,0 +1,96 @@
+# 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.
+
+# Filters preprocessed C-like header files to remove static code and keep their signatures.
+#
+# This tool is used in the process of parsing header files to extract
+# information on the declared services (the functions and structures).
+# This information is then used to generate bindings for Nit code
+# to access these services.
+#
+# The C header sometimes contains static code. It deletes static code of
+# headers, but keep their signatures. This tool is an extension of
+# header_keeper. It searches the keyword static to identify
+# the static code, and ignores the code into their brackets. The result is
+# printed to sdtout.
+#
+# ~~~sh
+# cat Pre-Processed/CGGeometry.h | header_static > Pre-Processed/static_header.h
+# ~~~
+#
+# This module can also be used as a library.
+# The main service is the method `header_static`
+module header_static
+
+redef class Char
+       private fun is_endline: Bool do return "\};".has(self)
+end
+
+# Filters the preprocessed `input` to keep signatures for static code and write to the `output`
+fun header_static(input: Reader, output: Writer) do
+       var static_target = false
+       var static_attribute_target = false
+       var bracket_counter = 0
+       var previous_letter = ""
+       var instruction = ""
+       var double_underscore = 0
+       var position = 0
+
+       while not input.eof do
+               var line = input.read_line
+               if line.to_s.has("static") then static_target = true
+
+               if static_target then
+                       if line.to_s.has("__attribute__") then static_attribute_target = true
+                       for letter in line do
+                               if letter == '{' then bracket_counter += 1
+                               if letter == '}' then bracket_counter -= 1
+
+                               if letter == '_' and previous_letter == "_" and bracket_counter == 0 then
+                                       double_underscore += 1
+                               end
+
+                               # Sometimes we lost space between return type and signature name,
+                               # because he has a return line between both.
+                               # We add a space before signature name for safety.
+                               if bracket_counter == 0 and letter == '_' and double_underscore >= 1 and not static_attribute_target then
+                                       instruction = instruction.insert_at(" ", position - 2)
+                               end
+                               if bracket_counter == 0 and not letter.is_endline then instruction += letter.to_s
+                               if bracket_counter == 0 and letter.is_endline then
+                                       instruction += ";"
+                                       static_target = false
+                                       static_attribute_target = false
+                               end
+
+                               if bracket_counter == 0 and (letter == '}' and double_underscore >= 1 or letter == ';') then
+                                       output.write instruction + "\n"
+                               end
+
+                               if letter.is_endline and bracket_counter == 0 then
+                                       double_underscore = 0
+                                       position = 0
+                                       instruction = ""
+                               end
+
+                               previous_letter = letter.to_s
+                               position += 1
+                       end
+               else
+                       output.write line + "\n"
+               end
+       end
+end
+
+header_static(sys.stdin, sys.stdout)
index e8ed742..6c06cf5 100644 (file)
@@ -5,7 +5,6 @@ default:
        ../../bin/nitc --semi-global sources/nit/pnacl_nit.nit -I ../../src/
        cp pnacl_nit/pnacl_nit.pexe www/pnacl/ -f
        rm -rf pnacl_nit/
-       rm -rf .nit_compile
 
 build-www:
        rm -rf www/src
index 74c7be0..2017a0b 100644 (file)
@@ -72,7 +72,7 @@ redef class FileReader
                self.path = path
                var file = sys.files[path]
                prepare_buffer(file.length)
-               _buffer.append(file)
+               path.copy_to_native(_buffer, file.length, 0, 0)
        end
 
        redef fun close
@@ -82,7 +82,7 @@ redef class FileReader
 
        redef fun fill_buffer
        do
-               _buffer.clear
+               buffer_reset
                end_reached = true
        end
 
index 6eca566..07a5f66 100644 (file)
@@ -356,7 +356,7 @@ redef class Meetup
                end
                t.add """
 <tr id="total">
-       <th>Total</th>
+       <th>Total ({{{participants(db).length}}})</th>
                """
                for i in answers(db) do
                        t.add """<th id="total{{{i.id}}}"><center>{{{i.count(db)}}}"""
similarity index 99%
rename from contrib/pep8analysis/src/parser/README
rename to contrib/pep8analysis/src/parser/README.md
index 227bcfc..e309594 100644 (file)
@@ -27,4 +27,3 @@ Other temp files produced by the Makefile:
        .nit.sablecc3: Sablecc3 grammar after processing
        .nit.sablecc3.dump: Dump of the grammar to improve sablecc3 multiple runs
        .parser-nofact.nit: The parser generated by SableCC3 before factorization by fact_parser.pl
-
index e3b2579..def014e 100644 (file)
@@ -25,5 +25,4 @@ check: refund
 
 clean:
        rm -rf bin
-       rm -rf -- .nit_compile 2> /dev/null || true
        cd tests; make clean
index 6b849c9..4cfc3a1 100755 (executable)
@@ -65,7 +65,7 @@ redef class String
        # Returns null on success
        fun file_rename_to(dest: String): nullable String import String.to_cstring,
        NativeString.to_s, String.as nullable `{
-               int res = rename(String_to_cstring(recv), String_to_cstring(dest));
+               int res = rename(String_to_cstring(self), String_to_cstring(dest));
                if (res == 0) return null_String();
                return String_as_nullable(NativeString_to_s(strerror(errno)));
        `}
index 2852256..ac91fdb 100644 (file)
@@ -53,28 +53,28 @@ extern class RPiPin `{ CRPiPin *`}
        `}
 
        # The pin `id` depends on wiringPi setup used
-       fun id: Int `{ return recv->id; `}
+       fun id: Int `{ return self->id; `}
 
        # Sets the mode of the pin
-       fun mode(mode: RPiPinMode) `{ pinMode(recv->id, mode); `}
+       fun mode(mode: RPiPinMode) `{ pinMode(self->id, mode); `}
 
        # This sets the pull-up or pull-down resistor mode on the given pin,
        # which should be set as an input.
-       fun pullup_dncontrol(pud: PUDControl) `{ pullUpDnControl(recv->id, pud); `}
+       fun pullup_dncontrol(pud: PUDControl) `{ pullUpDnControl(self->id, pud); `}
 
        # Writes the value HIGH or LOW (true or false) to the given pin which must
        # have been previously set as an output.
-       fun write(high: Bool) `{ digitalWrite(recv->id, high? HIGH: LOW); `}
+       fun write(high: Bool) `{ digitalWrite(self->id, high? HIGH: LOW); `}
 
        # Writes the value to the PWM register for the given pin.
        # The Raspberry Pi has one on-board PWM pin, pin 1 (BMC_GPIO 18, Phys 12)
        # and the range is 0-1024.
        # Other PWM devices may have other PWM ranges.
-       fun pwm_write(value: Int) `{ pwmWrite(recv->id, value); `}
+       fun pwm_write(value: Int) `{ pwmWrite(self->id, value); `}
 
        # This function returns the value read at the given pin.
        # It will be HIGH or LOW (true or false) depending on the logic level at the pin.
-       fun read: Bool `{ return digitalRead(recv->id) == HIGH? true: false; `}
+       fun read: Bool `{ return digitalRead(self->id) == HIGH? true: false; `}
 end
 
 # RPI Pin modes
similarity index 100%
rename from examples/README
rename to examples/README.md
index 2e2f437..6ed8be7 100644 (file)
@@ -96,7 +96,7 @@ class CalculatorWindow
 
        redef fun on_save_state
        do
-               app.data_store["context"] = context.to_json
+               app.data_store["context"] = context
                super
        end
 
@@ -104,11 +104,10 @@ class CalculatorWindow
        do
                super
 
-               var save = app.data_store["context"]
-               if save == null then return
-               assert save isa String
+               var context = app.data_store["context"]
+               if not context isa CalculatorContext then return
 
-               self.context = new CalculatorContext.from_json(save)
+               self.context = context
                display.text = context.display_text
        end
 end
index be55201..ea45a99 100644 (file)
 # Business logic of a calculator
 module calculator_logic
 
-import json::dynamic
+import serialization
 
 # Hold the state of the calculator and its services
 class CalculatorContext
+       auto_serializable
+
        # Result of the last operation
        var result: nullable Numeric = null
 
@@ -120,52 +122,6 @@ class CalculatorContext
                self.result = result
                self.current = null
        end
-
-       # Serialize calculator state to Json
-       fun to_json: String
-       do
-               # Do not save NaN nor inf
-               var result = self.result
-               if result != null and (result.to_f.is_nan or result.to_f.is_inf != 0) then result = null
-
-               var self_last_op = self.last_op
-               var last_op
-               if self_last_op == null then
-                       last_op = "null"
-               else last_op = "\"{self_last_op}\""
-
-               var self_current = self.current
-               var current
-               if self_current == null then
-                       current = "null"
-               else current = "\"{self_current}\""
-
-               return """
-{
-       "result": {{{result or else "null"}}},
-       "last_op": {{{last_op}}},
-       "current": {{{current}}}
-}"""
-       end
-
-       # Load calculator state from Json
-       init from_json(json_string: String)
-       do
-               var json = json_string.to_json_value
-               if json.is_error then
-                       print "Loading state failed: {json.to_error}"
-                       return
-               end
-
-               var result = json["result"]
-               if result.is_numeric then self.result = result.to_numeric
-
-               var last_op = json["last_op"]
-               if last_op.is_string then self.last_op = last_op.to_s.chars.first
-
-               var current = json["current"]
-               if current.is_string then self.current = new FlatBuffer.from(current.to_s)
-       end
 end
 
 redef universal Float
index 2ca8dc3..caf3f2e 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# This sample has been implemented to show you how simple is it to play 
-# with native callbacks (C) through an high level with NIT program.
-
+# This sample has been implemented to show you how simple is it to relay
+# native callbacks from C to a Nit program.
 module callback_chimpanze
+
 import callback_monkey
 
 class Chimpanze
@@ -27,15 +27,16 @@ class Chimpanze
        do
                var monkey = new Monkey
                print "Hum, I'm sleeping ..."
-               # Invoking method which will take some time to compute, and 
-               # will be back in wokeUp method with information.
+
+               # Invoking method which will take some time to compute, and
+               # will be back in woke_up method with information.
                # - Callback method defined in MonkeyActionCallable Interface
-               monkey.wokeUpAction(self, "Hey, I'm awake.")
+               monkey.woke_up_action(self, "Hey, I'm awake.")
        end
 
        # Inherit callback method, defined by MonkeyActionCallable interface
-       # - Back of wokeUpAction method 
-       redef fun wokeUp( sender:Monkey, message:Object )
+       # - Back of woke_up_action method
+       redef fun woke_up(sender:Monkey, message:Object)
        do
                print message
        end
index 6e1ed26..434edd1 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# This sample has been implemented to show you how simple is it to play 
-# with native callbacks (C) through an high level with NIT program.
-
+# This sample has been implemented to show you how simple is it to relay
+# native callbacks from C to a Nit program.
 module callback_monkey
 
 in "C header" `{
        #include <stdio.h>
        #include <stdlib.h>
 
-       typedef struct { 
+       typedef struct {
                int id;
                int age;
        } CMonkey;
@@ -40,53 +39,53 @@ in "C body" `{
        void cbMonkey(CMonkey *mkey, void callbackFunc(CMonkey*, MonkeyAction*), MonkeyAction *data)
        {
                sleep(2);
-               callbackFunc( mkey, data );
+               callbackFunc(mkey, data);
        }
 
        // Back of background treatment, will be redirected to callback function
-       void nit_monkey_callback_func( CMonkey *mkey, MonkeyAction *data )
+       void nit_monkey_callback_func(CMonkey *mkey, MonkeyAction *data)
        {
-               // To call a your method, the signature must be written like this :
+               // To call a your method, the signature must be written like this:
                // <Interface Name>_<Method>...
-               MonkeyActionCallable_wokeUp( data->toCall, mkey, data->message );
+               MonkeyActionCallable_woke_up(data->toCall, mkey, data->message);
        }
 `}
 
 # Implementable interface to get callback in defined methods
 interface MonkeyActionCallable
-       fun wokeUp( sender:Monkey, message: Object) is abstract
+       fun woke_up(sender:Monkey, message: Object) is abstract
 end
 
 # Defining my object type Monkey, which is, in a low level, a pointer to a C struct (CMonkey)
 extern class Monkey `{ CMonkey * `}
-       
+
        new `{
-               CMonkey *monkey = malloc( sizeof(CMonkey) );
+               CMonkey *monkey = malloc(sizeof(CMonkey));
                monkey->age = 10;
                monkey->id = 1;
                return monkey;
        `}
-       
-       # Object method which will get a callback in wokeUp method, defined in MonkeyActionCallable interface
+
+       # Object method which will get a callback in woke_up method, defined in MonkeyActionCallable interface
        # Must be defined as Nit/C method because of C call inside
-       fun wokeUpAction( toCall: MonkeyActionCallable, message: Object ) is extern import MonkeyActionCallable.wokeUp `{
+       fun woke_up_action(toCall: MonkeyActionCallable, message: Object) is extern import MonkeyActionCallable.woke_up `{
 
-               // Allocating memory to keep reference of received parameters :
+               // Allocating memory to keep reference of received parameters:
                // - Object receiver
-               // - Message 
-               MonkeyAction *data = malloc( sizeof(MonkeyAction) );
+               // - Message
+               MonkeyAction *data = malloc(sizeof(MonkeyAction));
 
                // Incrementing reference counter to prevent from releasing
-               MonkeyActionCallable_incr_ref( toCall );
-               Object_incr_ref( message );
-               
+               MonkeyActionCallable_incr_ref(toCall);
+               Object_incr_ref(message);
+
                data->toCall = toCall;
                data->message = message;
-               
-               // Calling method which reproduce a callback by passing :
+
+               // Calling method which reproduce a callback by passing:
                // - Receiver
                // - Function pointer to object return method
                // - Datas
-               cbMonkey( recv, &nit_monkey_callback_func, data );
+               cbMonkey(self, &nit_monkey_callback_func, data);
        `}
 end
index cada831..2db1595 100644 (file)
@@ -20,11 +20,11 @@ module draw_operation
 redef enum Int
        fun n_chars: Int `{
                int c;
-               if ( abs(recv) >= 10 )
-                       c = 1+(int)log10f( (float)abs(recv) );
+               if ( abs(self) >= 10 )
+                       c = 1+(int)log10f( (float)abs(self) );
                else
                        c = 1;
-               if ( recv < 0 ) c ++;
+               if ( self < 0 ) c ++;
                return c;
        `}
 end
index 00c6b68..333540b 100644 (file)
@@ -21,21 +21,21 @@ module extern_methods
 redef enum Int
        # Returns self'th fibonnaci number
        # implemented here in C for optimization purposes
-       fun fib : Int import fib `{
-               if ( recv < 2 )
-                       return recv;
+       fun fib: Int import fib `{
+               if (self < 2)
+                       return self;
                else
-                       return Int_fib( recv-1 ) + Int_fib( recv-2 );
+                       return Int_fib(self-1) + Int_fib(self-2);
        `}
 
        # System call to sleep for "self" seconds
        fun sleep `{
-               sleep( recv );
+               sleep(self);
        `}
 
-       # Return atan2l( self, x ) from libmath
-       fun atan_with( x : Int ) : Float `{
-               return atan2( recv, x );
+       # Return atan2l(self, x) from libmath
+       fun atan_with(x: Int): Float `{
+               return atan2(self, x);
        `}
 
        # This method callback to Nit methods from C code
@@ -45,13 +45,13 @@ redef enum Int
        # * to_s, a method of all objects
        # * String.to_cstring, a method of String to return an equivalent char*
        fun foo import fib, +, to_s, String.to_cstring `{
-               long recv_fib = Int_fib( recv );
-               long recv_plus_fib = Int__plus( recv, recv_fib );
+               long self_fib = Int_fib(self);
+               long self_plus_fib = Int__plus(self, self_fib);
 
-               String nit_string = Int_to_s( recv_plus_fib );
-               char *c_string = String_to_cstring( nit_string );
+               String nit_string = Int_to_s(self_plus_fib);
+               char *c_string = String_to_cstring(nit_string);
 
-               printf( "from C: self + fib(self) = %s\n", c_string );
+               printf("from C: self + fib(self) = %s\n", c_string);
        `}
 
        # Equivalent to foo but written in pure Nit
@@ -63,7 +63,7 @@ print 12.fib
 print "sleeping 1 second..."
 1.sleep
 
-print 100.atan_with( 200 )
+print 100.atan_with(200)
 8.foo
 8.bar
 
index 8d5a296..a451597 100644 (file)
@@ -43,7 +43,7 @@ redef class App
                android.util.Log.d("mnit_simple", "Java within NIT!!!");
 
                // - Context needed from now on
-               final android.app.Activity context = App_native_activity(recv);
+               final android.app.Activity context = App_native_activity(self);
 
                // Vibration
                android.os.Vibrator v = (android.os.Vibrator)
similarity index 100%
rename from examples/mpi/README
rename to examples/mpi/README.md
similarity index 89%
rename from examples/pnacl/converter/README
rename to examples/pnacl/converter/README.md
index f487f9f..bc2a555 100644 (file)
@@ -13,8 +13,8 @@ You must use the '--semi-global' (or `--global`) option. Some features in the st
 
 5. Set up the Chrome browser :
  - PNaCl is enabled by default in Chrome version 31 and later.
- - For a better development experience, it’s also recommended to disable the Chrome cache : 
-       - Open Chrome’s developer tools by clicking the menu icon menu-icon and choosing Tools > Developer tools.
+ - For a better development experience, it’s also recommended to disable the Chrome cache :
+       - Open Chrome’s developer tools by clicking the menu icon menu-icon and choosing Tools > Developer tools.
        - Click the gear icon gear-icon in the bottom right corner of the Chrome window.
        - Under the “General” settings, check the box next to “Disable cache (while DevTools is open)”.
        - Keep the Developer Tools pane open while developing Native Client applications.
index 9735d90..9780e12 100644 (file)
 # ~~~
 module a_star
 
+import serialization
+
 # General graph node
 class Node
+       super Serializable
+
        # Type of the others nodes in the `graph`
        type N: Node
 
@@ -183,10 +187,32 @@ class Node
                        end
                end
        end
+
+       # We customize the serialization process to avoid problems with recursive
+       # serialization engines. These engines, such as `JsonSerializer`,
+       # are at danger to serialize the graph as a very deep tree.
+       # With a large graph it can cause a stack overflow.
+       #
+       # Instead, we serialize the nodes first and then the links.
+       redef fun core_serialize_to(serializer: Serializer)
+       do
+               serializer.serialize_attribute("graph", graph)
+       end
+
+       redef init from_deserializer(deserializer)
+       do
+               deserializer.notify_of_creation self
+
+               var graph = deserializer.deserialize_attribute("graph")
+               assert graph isa Graph[N, Link]
+               self.graph = graph
+       end
 end
 
 # Link between two nodes and associated to a graph
 class Link
+       serialize
+
        # Type of the nodes in `graph`
        type N: Node
 
@@ -210,6 +236,8 @@ end
 
 # General graph
 class Graph[N: Node, L: Link]
+       super Serializable
+
        # Nodes in this graph
        var nodes: Set[N] = new HashSet[N]
 
@@ -236,15 +264,35 @@ class Graph[N: Node, L: Link]
 
        # Used to check if nodes have been searched in one pathfinding
        private var pathfinding_current_evocation: Int = 0
+
+       redef fun core_serialize_to(serializer: Serializer)
+       do
+               serializer.serialize_attribute("nodes", nodes)
+               serializer.serialize_attribute("links", links)
+       end
+
+       redef init from_deserializer(deserializer)
+       do
+               deserializer.notify_of_creation self
+
+               var nodes = deserializer.deserialize_attribute("nodes")
+               assert nodes isa HashSet[N]
+               self.nodes = nodes
+
+               var links = deserializer.deserialize_attribute("links")
+               assert links isa HashSet[L]
+               for link in links do add_link link
+       end
 end
 
 # Result from path finding and a walkable path
 class AStarPath[N]
+       serialize
 
-       # The total cost of this path
+       # Total cost of this path
        var total_cost: Int
 
-       # The list of nodes composing this path
+       # Nodes composing this path
        var nodes = new List[N]
 
        private var at: Int = 0
@@ -269,6 +317,8 @@ end
 
 # Context related to an evocation of pathfinding
 class PathContext
+       serialize
+
        # Type of the nodes in `graph`
        type N: Node
 
@@ -302,6 +352,7 @@ end
 # Warning: A* is not optimize for such a case
 class ConstantPathContext
        super PathContext
+       serialize
 
        redef fun worst_cost do return 1
        redef fun cost(l) do return 1
@@ -313,6 +364,7 @@ end
 # A `PathContext` for graphs with `WeightedLink`
 class WeightedPathContext
        super PathContext
+       serialize
 
        redef type L: WeightedLink
 
@@ -341,6 +393,7 @@ end
 # A `Link` with a `weight`
 class WeightedLink
        super Link
+       serialize
 
        # The `weight`, or cost, of this link
        var weight: Int
@@ -348,6 +401,8 @@ end
 
 # Advanced path conditions with customizable accept states
 class TargetCondition[N: Node]
+       serialize
+
        # Should the pathfinding accept `node` as a goal?
        fun accept(node: N): Bool is abstract
 
index e3e0e65..c037d7b 100644 (file)
@@ -33,8 +33,8 @@ extern class NativeActivity in "Java" `{ android.app.Activity `}
 
        # HACK for bug #845
        redef fun new_global_ref: SELF import sys, Sys.jni_env `{
-               Sys sys = NativeActivity_sys(recv);
+               Sys sys = NativeActivity_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 end
index f70b26f..871c13c 100644 (file)
@@ -47,11 +47,11 @@ in "Java" `{
 extern class NativeAssetManager in "Java" `{ android.content.res.AssetManager `}
        super JavaObject
 
-       fun close in "Java" `{ recv.close(); `}
+       fun close in "Java" `{ self.close(); `}
 
        fun get_locales: Array[JavaString] import Array[JavaString], Array[JavaString].add in "Java" `{
                int arr = new_Array_of_JavaString();
-               for (String s : recv.getLocales()) {
+               for (String s : self.getLocales()) {
                        Array_of_JavaString_add(arr, s);
                }
                return arr;
@@ -60,7 +60,7 @@ extern class NativeAssetManager in "Java" `{ android.content.res.AssetManager `}
        fun list(path: JavaString): Array[JavaString] import Array[JavaString], Array[JavaString].add  in "Java" `{
                int arr = new_Array_of_JavaString();
                try {
-                       for (String s : recv.list(path)) {
+                       for (String s : self.list(path)) {
                                Array_of_JavaString_add(arr, s);
                        }
                }catch (IOException e) {
@@ -73,7 +73,7 @@ extern class NativeAssetManager in "Java" `{ android.content.res.AssetManager `}
        fun open(file_name: JavaString): NativeInputStream in "Java" `{
                InputStream stream = null;
                try {
-                       stream = recv.open(file_name);
+                       stream = self.open(file_name);
                }catch (IOException e) {
                        Log.e("Error while opening " + file_name, e.getMessage());
                        e.printStackTrace();
@@ -84,7 +84,7 @@ extern class NativeAssetManager in "Java" `{ android.content.res.AssetManager `}
        fun open_fd(file_name: JavaString): NativeAssetFileDescriptor in "Java" `{
                AssetFileDescriptor afd = null;
                try {
-                       afd = recv.openFd(file_name);
+                       afd = self.openFd(file_name);
                }catch(IOException e){
                        Log.e("Error while opening " + file_name, e.getMessage());
                        e.printStackTrace();
@@ -95,7 +95,7 @@ extern class NativeAssetManager in "Java" `{ android.content.res.AssetManager `}
        fun open_non_asset_fd(file_name: JavaString): NativeAssetFileDescriptor in "Java" `{
                AssetFileDescriptor afd = null;
                try {
-                       afd =  recv.openNonAssetFd(file_name);
+                       afd =  self.openNonAssetFd(file_name);
                }catch(IOException e){
                        Log.e("Error while opening " + file_name, e.getMessage());
                        e.printStackTrace();
@@ -105,9 +105,9 @@ extern class NativeAssetManager in "Java" `{ android.content.res.AssetManager `}
 
        # HACK for bug #845
        redef fun new_global_ref import sys, Sys.jni_env `{
-               Sys sys = NativeResources_sys(recv);
+               Sys sys = NativeResources_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 end
 
@@ -183,24 +183,24 @@ end
 extern class NativeResources in "Java" `{ android.content.res.Resources `}
        super JavaObject
 
-       fun get_assets:NativeAssetManager in "Java" `{ return recv.getAssets(); `}
-       fun get_color(id: Int): Int in "Java" `{ return recv.getColor((int)id); `}
-       fun get_boolean(id: Int): Bool in "Java" `{ return recv.getBoolean((int)id); `}
-       fun get_dimension(id: Int): Int in "Java" `{ return (int)recv.getDimension((int)id); `}
-       fun get_drawable(id: Int): NativeDrawable in "Java" `{ return recv.getDrawable((int)id); `}
-       fun get_identifier(name, def_type, def_package: JavaString): Int in "Java" `{ return recv.getIdentifier(name, def_type, def_package); `}
-       fun get_integer(id: Int): Int in "Java" `{ return recv.getInteger((int)id); `}
-       fun get_string(id: Int): JavaString in "Java" `{ return recv.getString((int)id); `}
-       fun get_resource_entry_name(resid: Int): JavaString in "Java" `{ return recv.getResourceEntryName((int)resid); `}
-       fun get_resource_name(resid: Int): JavaString in "Java" `{ return recv.getResourceName((int)resid); `}
-       fun get_resource_pakage_name(resid: Int): JavaString in "Java" `{ return recv.getResourcePackageName((int)resid); `}
-       fun get_resource_type_name(resid: Int): JavaString in "Java" `{ return recv.getResourceTypeName((int)resid); `}
+       fun get_assets:NativeAssetManager in "Java" `{ return self.getAssets(); `}
+       fun get_color(id: Int): Int in "Java" `{ return self.getColor((int)id); `}
+       fun get_boolean(id: Int): Bool in "Java" `{ return self.getBoolean((int)id); `}
+       fun get_dimension(id: Int): Int in "Java" `{ return (int)self.getDimension((int)id); `}
+       fun get_drawable(id: Int): NativeDrawable in "Java" `{ return self.getDrawable((int)id); `}
+       fun get_identifier(name, def_type, def_package: JavaString): Int in "Java" `{ return self.getIdentifier(name, def_type, def_package); `}
+       fun get_integer(id: Int): Int in "Java" `{ return self.getInteger((int)id); `}
+       fun get_string(id: Int): JavaString in "Java" `{ return self.getString((int)id); `}
+       fun get_resource_entry_name(resid: Int): JavaString in "Java" `{ return self.getResourceEntryName((int)resid); `}
+       fun get_resource_name(resid: Int): JavaString in "Java" `{ return self.getResourceName((int)resid); `}
+       fun get_resource_pakage_name(resid: Int): JavaString in "Java" `{ return self.getResourcePackageName((int)resid); `}
+       fun get_resource_type_name(resid: Int): JavaString in "Java" `{ return self.getResourceTypeName((int)resid); `}
 
        # HACK for bug #845
        redef fun new_global_ref import sys, Sys.jni_env `{
-               Sys sys = NativeResources_sys(recv);
+               Sys sys = NativeResources_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 end
 
@@ -300,14 +300,14 @@ extern class NativeBitmap in "Java" `{ android.graphics.Bitmap `}
        # Create a NativeBitmap using a resource ID and the NativeResources
        # Called by the ResourceManager
        new from_resources(res: NativeResources, id: Int) in "Java" `{ return BitmapFactory.decodeResource(res, (int)id); `}
-       fun width: Int in "Java" `{ return recv.getWidth(); `}
-       fun height: Int in "Java" `{ return recv.getHeight(); `}
+       fun width: Int in "Java" `{ return self.getWidth(); `}
+       fun height: Int in "Java" `{ return self.getHeight(); `}
 
        # HACK for bug #845
        redef fun new_global_ref import sys, Sys.jni_env `{
-               Sys sys = NativeResources_sys(recv);
+               Sys sys = NativeResources_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 
 end
@@ -318,14 +318,14 @@ extern class NativeAssetFileDescriptor in "Java" `{ android.content.res.AssetFil
 
        fun close in "Java" `{
                try {
-                       recv.close();
+                       self.close();
                }catch(IOException e){
                        e.printStackTrace();
                }
        `}
        fun create_input_stream: NativeFileInputStream in "Java" `{
                try {
-                       return recv.createInputStream();
+                       return self.createInputStream();
                }catch(IOException e){
                        Log.e("Error creating input_stream", e.getMessage());
                        e.printStackTrace();
@@ -334,34 +334,34 @@ extern class NativeAssetFileDescriptor in "Java" `{ android.content.res.AssetFil
        `}
        fun create_output_stream: NativeFileOutputStream in "Java" `{
                try {
-                       return recv.createOutputStream();
+                       return self.createOutputStream();
                }catch(IOException e){
                        Log.e("Error creating output stream", e.getMessage());
                        e.printStackTrace();
                        return null;
                }
        `}
-       fun describe_contents: Int in "Java" `{ return (int)recv.describeContents(); `}
-       fun declared_length: Int in "Java" `{ return (int)recv.getDeclaredLength(); `}
-       # fun extras: Bundle in "Java" `{ return recv.getExtras(); `}
+       fun describe_contents: Int in "Java" `{ return (int)self.describeContents(); `}
+       fun declared_length: Int in "Java" `{ return (int)self.getDeclaredLength(); `}
+       # fun extras: Bundle in "Java" `{ return self.getExtras(); `}
 
        fun  file_descriptor: NativeFileDescriptor in "Java" `{
-               FileDescriptor fd =  recv.getFileDescriptor();
+               FileDescriptor fd =  self.getFileDescriptor();
                if (fd == null) {
                        Log.e("AssetFileDesciptorError", "Can't retrieve the FileDescriptor of this AssetFileDescriptor");
                }
                return fd;
        `}
 
-       fun length: Int in "Java" `{ return (int)recv.getLength(); `}
-       fun start_offset: Int in "Java" `{ return (int)recv.getStartOffset(); `}
-       redef fun to_s: String import JavaString.to_s in "Java" `{ return JavaString_to_s(recv.toString()); `}
+       fun length: Int in "Java" `{ return (int)self.getLength(); `}
+       fun start_offset: Int in "Java" `{ return (int)self.getStartOffset(); `}
+       redef fun to_s: String import JavaString.to_s in "Java" `{ return JavaString_to_s(self.toString()); `}
 
        # HACK for bug #845
        redef fun new_global_ref import sys, Sys.jni_env `{
-               Sys sys = NativeResources_sys(recv);
+               Sys sys = NativeResources_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 end
 
@@ -378,11 +378,11 @@ redef class App
        var asset_manager: AssetManager is lazy do return new AssetManager(self)
 
        # Get the native AssetsManager of the application, used to initialize the nit's AssetManager
-       private fun assets: NativeAssetManager import native_activity in "Java" `{ return App_native_activity(recv).getAssets(); `}
+       private fun assets: NativeAssetManager import native_activity in "Java" `{ return App_native_activity(self).getAssets(); `}
 
        # Get the package name of the application
-       private fun package_name: JavaString import native_activity in "Java" `{ return App_native_activity(recv).getPackageName(); `}
+       private fun package_name: JavaString import native_activity in "Java" `{ return App_native_activity(self).getPackageName(); `}
 
        # Get the native ResourceManager of the application, used to initialize the nit's ResourceManager
-       private fun resources: NativeResources import native_activity in "Java" `{ return App_native_activity(recv).getResources(); `}
+       private fun resources: NativeResources import native_activity in "Java" `{ return App_native_activity(self).getResources(); `}
 end
index 464b2f8..9374ac7 100644 (file)
@@ -72,19 +72,19 @@ extern class NativeAudioManager in "Java" `{ android.media.AudioManager `}
 
        # Current audio mode.
        # ( MODE_NORMAL = 0, MODE_RINGTONE = 1, MODE_IN_CALL = 2 or MODE_IN_COMMUNICATION = 3 )
-       fun mode: Int in "Java" `{ return recv.getMode(); `}
+       fun mode: Int in "Java" `{ return self.getMode(); `}
 
        # Sets the audio mode.
        # ( MODE_NORMAL = 0, MODE_RINGTONE = 1, MODE_IN_CALL = 2 or MODE_IN_COMMUNICATION = 3 )
-       fun mode=(i: Int) in "Java" `{ recv.setMode((int)i); `}
+       fun mode=(i: Int) in "Java" `{ self.setMode((int)i); `}
 
        # Sends a request to obtain audio focus
        fun request_audio_focus: Int in "Java" `{
-               return recv.requestAudioFocus(afChangeListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
+               return self.requestAudioFocus(afChangeListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
        `}
 
        # Gives up audio focus
-       fun abandon_audio_focus: Int in "Java" `{ return recv.abandonAudioFocus(afChangeListener); `}
+       fun abandon_audio_focus: Int in "Java" `{ return self.abandonAudioFocus(afChangeListener); `}
 end
 
 # Media Player from Java, used to play long sounds or musics, not simultaneously
@@ -97,30 +97,30 @@ private extern class NativeMediaPlayer in "Java" `{ android.media.MediaPlayer `}
                mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
                return mp;
        `}
-       fun start in "Java" `{ recv.start(); `}
+       fun start in "Java" `{ self.start(); `}
        fun prepare in "Java" `{
                try {
-                       recv.prepare();
+                       self.prepare();
                }catch(IOException e) {
                        Log.e("Error preparing the Media Player", e.getMessage());
                        e.printStackTrace();
                }
        `}
 
-       fun create(context: NativeActivity, id: Int): NativeMediaPlayer in "Java" `{ return recv.create(context, (int)id); `}
-       fun pause in "Java" `{ recv.pause(); `}
-       fun stop in "Java" `{ recv.stop(); `}
-       fun playing: Bool in "Java" `{ return recv.isPlaying(); `}
-       fun release in "Java" `{ recv.release(); `}
-       fun duration: Int in "Java" `{ return recv.getDuration(); `}
-       fun looping: Bool in "Java" `{ return recv.isLooping(); `}
-       fun looping=(b: Bool) in "Java" `{ recv.setLooping(b); `}
-       fun volume=(vol: Float) in "Java" `{ recv.setVolume((float)vol, (float)vol); `}
-       fun both_volume(left_volume, right_volume: Float) in "Java" `{ recv.setVolume((float)left_volume, (float)right_volume); `}
-       fun stream_type=(stream_type: Int) in "Java" `{ recv.setAudioStreamType((int)stream_type); `}
+       fun create(context: NativeActivity, id: Int): NativeMediaPlayer in "Java" `{ return self.create(context, (int)id); `}
+       fun pause in "Java" `{ self.pause(); `}
+       fun stop in "Java" `{ self.stop(); `}
+       fun playing: Bool in "Java" `{ return self.isPlaying(); `}
+       fun release in "Java" `{ self.release(); `}
+       fun duration: Int in "Java" `{ return self.getDuration(); `}
+       fun looping: Bool in "Java" `{ return self.isLooping(); `}
+       fun looping=(b: Bool) in "Java" `{ self.setLooping(b); `}
+       fun volume=(vol: Float) in "Java" `{ self.setVolume((float)vol, (float)vol); `}
+       fun both_volume(left_volume, right_volume: Float) in "Java" `{ self.setVolume((float)left_volume, (float)right_volume); `}
+       fun stream_type=(stream_type: Int) in "Java" `{ self.setAudioStreamType((int)stream_type); `}
        fun data_source_fd(fd: NativeFileDescriptor, start_offset, length: Int) in "Java"  `{
                try {
-                       recv.setDataSource(fd, start_offset, length);
+                       self.setDataSource(fd, start_offset, length);
                }catch(IOException e) {
                        Log.e("Error loading the Media Player with a file descriptor", e.getMessage());
                        e.printStackTrace();
@@ -128,13 +128,13 @@ private extern class NativeMediaPlayer in "Java" `{ android.media.MediaPlayer `}
        `}
        fun data_source_path(path: JavaString) in "Java" `{
                try {
-                       recv.setDataSource(path);
+                       self.setDataSource(path);
                }catch(IOException e) {
                        Log.e("Error loading the Media Player", e.getMessage());
                        e.printStackTrace();
                }
        `}
-       fun reset in "Java" `{ recv.reset(); `}
+       fun reset in "Java" `{ self.reset(); `}
 end
 
 # Sound Pool from Java, used to play sounds simultaneously
@@ -145,23 +145,23 @@ private extern class NativeSoundPool in "Java" `{ android.media.SoundPool `}
        new(max_streams, stream_type, src_quality: Int) in "Java" `{
                return new SoundPool((int)max_streams, (int)stream_type, (int)src_quality);
        `}
-       fun load_asset_fd(afd: NativeAssetFileDescriptor, priority: Int): Int in "Java" `{ return recv.load(afd, (int)priority); `}
-       fun load_id(context: NativeActivity, resid, priority: Int): Int in "Java" `{ return recv.load(context, (int)resid, (int)priority); `}
-       fun load_path(path: JavaString, priority: Int): Int in "Java" `{ return recv.load(path, (int)priority); `}
+       fun load_asset_fd(afd: NativeAssetFileDescriptor, priority: Int): Int in "Java" `{ return self.load(afd, (int)priority); `}
+       fun load_id(context: NativeActivity, resid, priority: Int): Int in "Java" `{ return self.load(context, (int)resid, (int)priority); `}
+       fun load_path(path: JavaString, priority: Int): Int in "Java" `{ return self.load(path, (int)priority); `}
        fun play(sound_id: Int, left_volume, right_volume: Float, priority, l: Int, rate: Float): Int in "Java" `{
-               return recv.play((int)sound_id, (float)left_volume, (float)right_volume, (int)priority, (int)l, (float)rate);
+               return self.play((int)sound_id, (float)left_volume, (float)right_volume, (int)priority, (int)l, (float)rate);
        `}
-       fun pause(stream_id: Int) in "Java" `{ recv.pause((int)stream_id); `}
-       fun auto_pause in "Java" `{ recv.autoPause(); `}
-       fun auto_resume in "Java" `{ recv.autoResume(); `}
-       fun resume(stream_id: Int) in "Java" `{ recv.resume((int)stream_id); `}
-       fun set_loop(stream_id, l: Int) in "Java" `{ recv.setLoop((int)stream_id, (int)l); `}
-       fun set_priority(stream_id, priority: Int) in "Java" `{ recv.setPriority((int)stream_id, (int)priority); `}
-       fun set_rate(stream_id: Int, rate: Float) in "Java" `{ recv.setRate((int)stream_id, (float)rate); `}
-       fun set_volume(stream_id: Int, left_volume, right_volume: Float) in "Java" `{ recv.setVolume((int)stream_id, (float)left_volume, (float)right_volume); `}
-       fun stop(stream_id: Int) in "Java" `{ recv.stop((int)stream_id); `}
-       fun unload(sound_id: Int): Bool in "Java" `{ return recv.unload((int)sound_id); `}
-       fun release in "Java" `{ recv.release(); `}
+       fun pause(stream_id: Int) in "Java" `{ self.pause((int)stream_id); `}
+       fun auto_pause in "Java" `{ self.autoPause(); `}
+       fun auto_resume in "Java" `{ self.autoResume(); `}
+       fun resume(stream_id: Int) in "Java" `{ self.resume((int)stream_id); `}
+       fun set_loop(stream_id, l: Int) in "Java" `{ self.setLoop((int)stream_id, (int)l); `}
+       fun set_priority(stream_id, priority: Int) in "Java" `{ self.setPriority((int)stream_id, (int)priority); `}
+       fun set_rate(stream_id: Int, rate: Float) in "Java" `{ self.setRate((int)stream_id, (float)rate); `}
+       fun set_volume(stream_id: Int, left_volume, right_volume: Float) in "Java" `{ self.setVolume((int)stream_id, (float)left_volume, (float)right_volume); `}
+       fun stop(stream_id: Int) in "Java" `{ self.stop((int)stream_id); `}
+       fun unload(sound_id: Int): Bool in "Java" `{ return self.unload((int)sound_id); `}
+       fun release in "Java" `{ self.release(); `}
 end
 
 
@@ -425,13 +425,13 @@ redef class App
 
        # Get the native audio manager
        fun audio_manager: NativeAudioManager import native_activity in "Java" `{
-               return (AudioManager)App_native_activity(recv).getSystemService(Context.AUDIO_SERVICE);
+               return (AudioManager)App_native_activity(self).getSystemService(Context.AUDIO_SERVICE);
        `}
 
        # Sets the stream of the app to STREAM_MUSIC.
        # STREAM_MUSIC is the default stream used by android apps.
        private fun manage_audio_stream import native_activity, native_app_glue in "Java" `{
-               App_native_activity(recv).setVolumeControlStream(AudioManager.STREAM_MUSIC);
+               App_native_activity(self).setVolumeControlStream(AudioManager.STREAM_MUSIC);
        `}
 
        # Retrieves a sound with a soundpool in the `assets` folder using its name.
index 19b2f8e..76babb4 100644 (file)
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# A mapping class of `String` to various value types used by the 
+# A mapping class of `String` to various value types used by the
 # Android API for various data exchange purposes
 module bundle
 
@@ -36,17 +36,17 @@ extern class NativeBundle in "Java" `{ android.os.Bundle `}
 
        new in "Java" `{ return new Bundle(); `}
 
-       fun clone: JavaObject in "Java" `{ return recv.clone(); `}
-       fun size: Int in "Java" `{ return recv.size(); `}
-       fun is_empty: Bool in "Java" `{ return recv.isEmpty(); `}
-       fun clear in "Java" `{ recv.clear(); `}
-       fun contains_key(key: JavaString): Bool in "Java" `{ return recv.containsKey(key); `}
-       fun get(key: JavaString): JavaObject in "Java" `{ return recv.get(key); `}
-       fun remove(key: JavaString) in "Java" `{ recv.remove(key); `}
-       fun put_all(bundle: NativeBundle) in "Java" `{ recv.putAll(bundle); `}
+       fun clone: JavaObject in "Java" `{ return self.clone(); `}
+       fun size: Int in "Java" `{ return self.size(); `}
+       fun is_empty: Bool in "Java" `{ return self.isEmpty(); `}
+       fun clear in "Java" `{ self.clear(); `}
+       fun contains_key(key: JavaString): Bool in "Java" `{ return self.containsKey(key); `}
+       fun get(key: JavaString): JavaObject in "Java" `{ return self.get(key); `}
+       fun remove(key: JavaString) in "Java" `{ self.remove(key); `}
+       fun put_all(bundle: NativeBundle) in "Java" `{ self.putAll(bundle); `}
        fun key_set: HashSet[JavaString] import HashSet[JavaString], 
          HashSet[JavaString].add in "Java" `{ 
-               Set<String> java_set = recv.keySet(); 
+               Set<String> java_set = self.keySet();
                int nit_hashset = new_HashSet_of_JavaString();
 
                for (String element: java_set)
@@ -54,209 +54,209 @@ extern class NativeBundle in "Java" `{ android.os.Bundle `}
 
                return nit_hashset;
        `}
-       fun has_file_descriptors: Bool in "Java" `{ return recv.hasFileDescriptors(); `}
-       fun put_boolean(key: JavaString, value: Bool) in "Java" `{ 
-               recv.putBoolean(key, value); 
+       fun has_file_descriptors: Bool in "Java" `{ return self.hasFileDescriptors(); `}
+       fun put_boolean(key: JavaString, value: Bool) in "Java" `{
+               self.putBoolean(key, value);
        `}
-       fun put_byte(key: JavaString, value: Int) in "Java" `{ 
-               recv.putByte(key, (byte) value); 
+       fun put_byte(key: JavaString, value: Int) in "Java" `{
+               self.putByte(key, (byte) value);
        `}
        # FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
-       fun put_char(key: JavaString, value: Char) in "Java" `{ 
-               recv.putChar(key, value); 
+       fun put_char(key: JavaString, value: Char) in "Java" `{
+               self.putChar(key, (char)value);
        `}
-       fun put_short(key: JavaString, value: Int) in "Java" `{ 
-               recv.putShort(key, (short) value); 
+       fun put_short(key: JavaString, value: Int) in "Java" `{
+               self.putShort(key, (short) value);
        `}
-       fun put_int(key: JavaString, value: Int) in "Java" `{ 
-               recv.putInt(key, (int) value); 
+       fun put_int(key: JavaString, value: Int) in "Java" `{
+               self.putInt(key, (int) value);
        `}
-       fun put_long(key: JavaString, value: Int) in "Java" `{ 
-               recv.putLong(key, value); 
+       fun put_long(key: JavaString, value: Int) in "Java" `{
+               self.putLong(key, value);
        `}
-       fun put_float(key: JavaString, value: Float) in "Java" `{ 
-               recv.putFloat(key, (float) value); 
+       fun put_float(key: JavaString, value: Float) in "Java" `{
+               self.putFloat(key, (float) value);
        `}
-       fun put_double(key: JavaString, value: Float) in "Java" `{ 
-               recv.putDouble(key, value); 
+       fun put_double(key: JavaString, value: Float) in "Java" `{
+               self.putDouble(key, value);
        `}
-       fun put_string(key: JavaString, value: JavaString) in "Java" `{ 
-               recv.putString(key, value); 
+       fun put_string(key: JavaString, value: JavaString) in "Java" `{
+               self.putString(key, value);
        `}
-       fun put_char_sequence(key: JavaString, value: JavaString) in "Java" `{ 
-               recv.putCharSequence(key, value); 
+       fun put_char_sequence(key: JavaString, value: JavaString) in "Java" `{
+               self.putCharSequence(key, value);
        `}
-       fun put_integer_array_list(key: JavaString, value: Array[Int]) 
+       fun put_integer_array_list(key: JavaString, value: Array[Int])
          import Array[Int].length, Array[Int].[] in "Java" `{
-               ArrayList<Integer> java_array = 
+               ArrayList<Integer> java_array =
                        new ArrayList<Integer>((int) Array_of_Int_length(value));
-               
+
                for(int i=0; i < java_array.size(); ++i)
                        java_array.add((int) Array_of_Int__index(value, i));
 
-               recv.putIntegerArrayList(key, java_array); 
+               self.putIntegerArrayList(key, java_array);
        `}
        fun put_string_array_list(key: JavaString, value: Array[JavaString])
          import Array[JavaString].length, Array[JavaString].[] in "Java" `{
                ArrayList<String> java_array = new ArrayList<String>((int)Array_of_JavaString_length(value));
-               
+
                for(int i=0; i < java_array.size(); ++i)
                        java_array.add(Array_of_JavaString__index(value, i));
 
-               recv.putStringArrayList(key, java_array); 
+               self.putStringArrayList(key, java_array);
        `}
        fun put_char_sequence_array_list(key: JavaString, value: Array[JavaString])
          import Array[JavaString].length, Array[JavaString].[] in "Java" `{
-               ArrayList<CharSequence> java_array = 
+               ArrayList<CharSequence> java_array =
                  new ArrayList<CharSequence>((int)Array_of_JavaString_length(value));
-               
+
                for(int i=0; i < java_array.size(); ++i)
                        java_array.add(Array_of_JavaString__index(value, i));
 
-               recv.putCharSequenceArrayList(key, java_array); 
+               self.putCharSequenceArrayList(key, java_array);
        `}
        fun put_boolean_array(key: JavaString, value: Array[Bool])
          import Array[Bool].length, Array[Bool].[] in "Java" `{
                boolean[] java_array = new boolean[(int)Array_of_Bool_length(value)];
-               
+
                for(int i=0; i < java_array.length; ++i)
                        java_array[i] = Array_of_Bool__index(value, i);
 
-               recv.putBooleanArray(key, java_array); 
+               self.putBooleanArray(key, java_array);
        `}
        fun put_byte_array(key: JavaString, value: Array[Int])
          import Array[Int].length, Array[Int].[] in "Java" `{
                byte[] java_array = new byte[(int)Array_of_Int_length(value)];
-               
+
                for(int i=0; i < java_array.length; ++i)
                        java_array[i] = (byte) Array_of_Int__index(value, i);
 
-               recv.putByteArray(key, java_array); 
+               self.putByteArray(key, java_array);
        `}
        fun put_short_array(key: JavaString, value: Array[Int])
          import Array[Int].length, Array[Int].[] in "Java" `{
                short[] java_array = new short[(int)Array_of_Int_length(value)];
-               
+
                for(int i=0; i < java_array.length; ++i)
                        java_array[i] = (short) Array_of_Int__index(value, i);
 
-               recv.putShortArray(key, java_array); 
+               self.putShortArray(key, java_array);
        `}
        # FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
        fun put_char_array(key: JavaString, value: Array[Char])
          import Array[Char].length, Array[Char].[] in "Java" `{
                char[] java_array = new char[(int)Array_of_Char_length(value)];
-               
+
                for(int i=0; i < java_array.length; ++i)
-                       java_array[i] = Array_of_Char__index(value, i);
+                       java_array[i] = (char)Array_of_Char__index(value, i);
 
-               recv.putCharArray(key, java_array); 
+               self.putCharArray(key, java_array);
        `}
        fun put_int_array(key: JavaString, value: Array[Int])
          import Array[Int].length, Array[Int].[] in "Java" `{
                int[] java_array = new int[(int)Array_of_Int_length(value)];
-               
+
                for(int i=0; i < java_array.length; ++i)
                        java_array[i] = (int) Array_of_Int__index(value, i);
 
-               recv.putIntArray(key, java_array); 
+               self.putIntArray(key, java_array);
        `}
        fun put_long_array(key: JavaString, value: Array[Int])
          import Array[Int].length, Array[Int].[] in "Java" `{
                long[] java_array = new long[(int)Array_of_Int_length(value)];
-               
+
                for(int i=0; i < java_array.length; ++i)
                        java_array[i] = Array_of_Int__index(value, i);
 
-               recv.putLongArray(key, java_array); 
+               self.putLongArray(key, java_array);
        `}
        fun put_float_array(key: JavaString, value: Array[Float])
          import Array[Float].length, Array[Float].[] in "Java" `{
                float[] java_array = new float[(int)Array_of_Float_length(value)];
-               
+
                for(int i=0; i < java_array.length; ++i)
                        java_array[i] = (float) Array_of_Float__index(value, i);
 
-               recv.putFloatArray(key, java_array); 
+               self.putFloatArray(key, java_array);
        `}
        fun put_double_array(key: JavaString, value: Array[Float])
          import Array[Float].length, Array[Float].[] in "Java" `{
                double[] java_array = new double[(int)Array_of_Float_length(value)];
-               
+
                for(int i=0; i < java_array.length; ++i)
                        java_array[i] = Array_of_Float__index(value, i);
 
-               recv.putDoubleArray(key, java_array); 
+               self.putDoubleArray(key, java_array);
        `}
        fun put_string_array(key: JavaString, value: Array[JavaString])
          import Array[JavaString].length, Array[JavaString].[] in "Java" `{
                String[] java_array = new String[(int)Array_of_JavaString_length(value)];
-               
+
                for(int i=0; i < java_array.length; ++i)
                        java_array[i] = Array_of_JavaString__index(value, i);
 
-               recv.putStringArray(key, java_array); 
+               self.putStringArray(key, java_array);
        `}
        fun put_char_sequence_array(key: JavaString, value: Array[JavaString])
          import Array[JavaString].length, Array[JavaString].[] in "Java" `{
                CharSequence[] java_array = new CharSequence[(int)Array_of_JavaString_length(value)];
-               
+
                for(int i=0; i < java_array.length; ++i)
                        java_array[i] = Array_of_JavaString__index(value, i);
 
-               recv.putCharSequenceArray(key, java_array); 
+               self.putCharSequenceArray(key, java_array);
        `}
-       fun put_bundle(key: JavaString, value: NativeBundle) in "Java" `{ 
-               recv.putBundle(key, value); 
+       fun put_bundle(key: JavaString, value: NativeBundle) in "Java" `{
+               self.putBundle(key, value);
        `}
-       fun get_boolean(key: JavaString): Bool in "Java" `{ return recv.getBoolean(key); `}
+       fun get_boolean(key: JavaString): Bool in "Java" `{ return self.getBoolean(key); `}
        fun get_boolean_with_def_value(key: JavaString, def_value: Bool): Bool in "Java" `{
-               return recv.getBoolean(key, def_value); 
+               return self.getBoolean(key, def_value);
        `}
-       fun get_byte(key: JavaString): Int in "Java" `{ return recv.getByte(key); `}
-       fun get_byte_with_def_value(key: JavaString, def_value: Int): Int in "Java" `{ 
-               return recv.getByte(key, (byte) def_value); 
+       fun get_byte(key: JavaString): Int in "Java" `{ return self.getByte(key); `}
+       fun get_byte_with_def_value(key: JavaString, def_value: Int): Int in "Java" `{
+               return self.getByte(key, (byte) def_value);
        `}
        # FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
-       fun get_char(key: JavaString): Char in "Java" `{ return recv.getChar(key); `}
+       fun get_char(key: JavaString): Char in "Java" `{ return (int)self.getChar(key); `}
        # FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
        fun get_char_with_def_value(key: JavaString, def_value: Char): Char in "Java" `{
-               return recv.getChar(key, def_value); 
+               return (int)self.getChar(key, (char)def_value);
        `}
-       fun get_short(key: JavaString): Int in "Java" `{ return (short) recv.getShort(key); `}
+       fun get_short(key: JavaString): Int in "Java" `{ return (short) self.getShort(key); `}
        fun get_short_with_def_value(key: JavaString, def_value: Int): Int in "Java" `{
-               return (short) recv.getShort(key, (short) def_value); 
+               return (short) self.getShort(key, (short) def_value);
        `}
-       fun get_int(key: JavaString): Int in "Java" `{ return recv.getInt(key); `}
+       fun get_int(key: JavaString): Int in "Java" `{ return self.getInt(key); `}
        fun get_int_with_def_value(key: JavaString, def_value: Int): Int in "Java" `{
-               return recv.getInt(key, (int) def_value);
+               return self.getInt(key, (int) def_value);
        `}
-       fun get_long(key: JavaString): Int in "Java" `{ return recv.getLong(key); `}
+       fun get_long(key: JavaString): Int in "Java" `{ return self.getLong(key); `}
        fun get_long_with_def_value(key: JavaString, def_value: Int): Int in "Java" `{
-               return recv.getLong(key); 
+               return self.getLong(key);
        `}
        fun get_float(key: JavaString): Float in "Java" `{
-               return (float) recv.getFloat(key); 
+               return (float) self.getFloat(key);
        `}
        fun get_float_with_def_value(key: JavaString, def_value: Float): Float in "Java" `{
-               return (float) recv.getFloat(key, (float) def_value);
+               return (float) self.getFloat(key, (float) def_value);
        `}
-       fun get_double(key: JavaString): Float in "Java" `{ return recv.getDouble(key); `}
-       fun get_double_with_def_value(key: JavaString, def_value: Float): Float in "Java" `{ 
-               return recv.getDouble(key, def_value); 
+       fun get_double(key: JavaString): Float in "Java" `{ return self.getDouble(key); `}
+       fun get_double_with_def_value(key: JavaString, def_value: Float): Float in "Java" `{
+               return self.getDouble(key, def_value);
        `}
        fun get_string(key: JavaString): JavaString in "Java" `{
-               return recv.getString(key);
+               return self.getString(key);
        `}
        fun get_char_sequence(key: JavaString): JavaString in "Java" `{
-               return (String) recv.getCharSequence(key); 
+               return (String) self.getCharSequence(key);
        `}
        fun get_bundle(key: JavaString): NativeBundle in "Java" `{
-               return recv.getBundle(key); 
+               return self.getBundle(key);
        `}
        fun get_integer_array_list(key: JavaString): Array[Int]
                import Array[Int], Array[Int].add in "Java" `{
-               ArrayList<Integer> java_array = recv.getIntegerArrayList(key); 
+               ArrayList<Integer> java_array = self.getIntegerArrayList(key);
                int nit_array = new_Array_of_Int();
 
                if (java_array == null) return nit_array;
@@ -268,7 +268,7 @@ extern class NativeBundle in "Java" `{ android.os.Bundle `}
        `}
        fun get_string_array_list(key: JavaString): Array[String]
                import StringCopyArray, StringCopyArray.add, StringCopyArray.collection in "Java" `{
-               ArrayList<String> java_array = recv.getStringArrayList(key); 
+               ArrayList<String> java_array = self.getStringArrayList(key);
                int nit_array = new_StringCopyArray();
 
                if (java_array == null) return nit_array;
@@ -280,7 +280,7 @@ extern class NativeBundle in "Java" `{ android.os.Bundle `}
        `}
        fun get_char_sequence_array_list(key: JavaString): Array[String]
                import StringCopyArray, StringCopyArray.add, StringCopyArray.collection in "Java" `{
-               ArrayList<CharSequence> java_array = recv.getCharSequenceArrayList(key); 
+               ArrayList<CharSequence> java_array = self.getCharSequenceArrayList(key);
                int nit_array = new_StringCopyArray();
 
                if (java_array == null) return nit_array;
@@ -291,8 +291,8 @@ extern class NativeBundle in "Java" `{ android.os.Bundle `}
                return StringCopyArray_collection(nit_array);
        `}
        fun get_boolean_array(key: JavaString): Array[Bool]
-               import Array[Bool], Array[Bool].add in "Java" `{ 
-               boolean[] java_array = recv.getBooleanArray(key); 
+               import Array[Bool], Array[Bool].add in "Java" `{
+               boolean[] java_array = self.getBooleanArray(key);
                int nit_array = new_Array_of_Bool();
 
                if (java_array == null) return nit_array;
@@ -303,123 +303,123 @@ extern class NativeBundle in "Java" `{ android.os.Bundle `}
                return nit_array;
        `}
        fun get_byte_array(key: JavaString): Array[Int]
-               import Array[Int], Array[Int].add in "Java" `{ 
-               byte[] java_array = recv.getByteArray(key); 
+               import Array[Int], Array[Int].add in "Java" `{
+               byte[] java_array = self.getByteArray(key);
                int nit_array = new_Array_of_Int();
-               
+
                if (java_array == null) return nit_array;
 
                for(int i=0; i < java_array.length; ++i)
                        Array_of_Int_add(nit_array, java_array[i]);
-                       
+
                return nit_array;
        `}
        fun get_short_array(key: JavaString): Array[Int]
-               import Array[Int], Array[Int].add in "Java" `{ 
-               short[] java_array = recv.getShortArray(key); 
+               import Array[Int], Array[Int].add in "Java" `{
+               short[] java_array = self.getShortArray(key);
                int nit_array = new_Array_of_Int();
-               
+
                if (java_array == null) return nit_array;
 
                for(int i=0; i < java_array.length; ++i)
                        Array_of_Int_add(nit_array, java_array[i]);
-                       
+
                return nit_array;
        `}
        # FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
        fun get_char_array(key: JavaString): Array[Char]
-               import Array[Char], Array[Char].add in "Java" `{ 
-               char[] java_array = recv.getCharArray(key); 
+               import Array[Char], Array[Char].add in "Java" `{
+               char[] java_array = self.getCharArray(key);
                int nit_array = new_Array_of_Char();
-               
+
                if (java_array == null) return nit_array;
 
                for(int i=0; i < java_array.length; ++i)
-                       Array_of_Char_add(nit_array, java_array[i]);
-                       
+                       Array_of_Char_add(nit_array, (int)java_array[i]);
+
                return nit_array;
        `}
        fun get_int_array(key: JavaString): Array[Int]
-               import Array[Int], Array[Int].add in "Java" `{ 
-               int[] java_array = recv.getIntArray(key); 
+               import Array[Int], Array[Int].add in "Java" `{
+               int[] java_array = self.getIntArray(key);
                int nit_array = new_Array_of_Int();
-               
+
                if (java_array == null) return nit_array;
 
                for(int i=0; i < java_array.length; ++i)
                        Array_of_Int_add(nit_array, java_array[i]);
-                       
+
                return nit_array;
        `}
        # FIXME: Get rid of the int cast as soon as the ffi is fixed
        fun get_long_array(key: JavaString): Array[Int]
-               import Array[Int], Array[Int].add in "Java" `{ 
-               long[] java_array = recv.getLongArray(key); 
+               import Array[Int], Array[Int].add in "Java" `{
+               long[] java_array = self.getLongArray(key);
                int nit_array = new_Array_of_Int();
-               
+
                if (java_array == null) return nit_array;
 
                for(int i=0; i < java_array.length; ++i)
                        Array_of_Int_add(nit_array, java_array[i]);
-                       
+
                return nit_array;
        `}
        fun get_float_array(key: JavaString): Array[Float]
-               import Array[Float], Array[Float].add in "Java" `{ 
-               float[] java_array = recv.getFloatArray(key); 
+               import Array[Float], Array[Float].add in "Java" `{
+               float[] java_array = self.getFloatArray(key);
                int nit_array = new_Array_of_Float();
-               
+
                if (java_array == null) return nit_array;
 
                for(int i=0; i < java_array.length; ++i)
                Array_of_Float_add(nit_array, (double) java_array[i]);
-                       
+
                return nit_array;
        `}
        fun get_double_array(key: JavaString): Array[Float]
-               import Array[Float], Array[Float].add in "Java" `{ 
-               double[] java_array = recv.getDoubleArray(key); 
+               import Array[Float], Array[Float].add in "Java" `{
+               double[] java_array = self.getDoubleArray(key);
                int nit_array = new_Array_of_Float();
-               
+
                if (java_array == null) return nit_array;
 
                for(int i=0; i < java_array.length; ++i)
                        Array_of_Float_add(nit_array, java_array[i]);
-                       
+
                return nit_array;
        `}
        fun get_string_array(key: JavaString): Array[String]
                import StringCopyArray, StringCopyArray.add, StringCopyArray.collection in "Java" `{
-               String[] java_array = recv.getStringArray(key); 
+               String[] java_array = self.getStringArray(key);
                int nit_array = new_StringCopyArray();
-               
+
                if (java_array == null) return nit_array;
 
                for(int i=0; i < java_array.length; ++i)
                        StringCopyArray_add(nit_array, java_array[i]);
-                       
+
                return StringCopyArray_collection(nit_array);
        `}
        fun get_char_sequence_array(key: JavaString): Array[String]
                import StringCopyArray, StringCopyArray.add, StringCopyArray.collection in "Java" `{
-               CharSequence[] java_array = recv.getCharSequenceArray(key); 
+               CharSequence[] java_array = self.getCharSequenceArray(key);
                int nit_array = new_StringCopyArray();
-               
+
                if (java_array == null) return nit_array;
 
                for(int i=0; i < java_array.length; ++i)
                        StringCopyArray_add(nit_array, (String)java_array[i]);
-                       
+
                return StringCopyArray_collection(nit_array);
        `}
-       fun describe_contents: Int in "Java" `{ return recv.describeContents(); `}
-       fun to_string: JavaString in "Java" `{ return recv.toString(); `}
+       fun describe_contents: Int in "Java" `{ return self.describeContents(); `}
+       fun to_string: JavaString in "Java" `{ return self.toString(); `}
 
        # HACK for bug #845
        redef fun new_global_ref import sys, Sys.jni_env `{
-               Sys sys = NativeBundle_sys(recv);
+               Sys sys = NativeBundle_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 end
 
@@ -438,7 +438,7 @@ class Bundle
                sys.jni_env.pop_local_frame
                return return_value
        end
-               
+
        # Returns the number of entries in the current `Bundle`
        fun size: Int do return native_bundle.size
 
@@ -470,27 +470,27 @@ class Bundle
                return string_set
        end
 
-       # Add key-value information by dynamically choosing the appropriate 
+       # Add key-value information by dynamically choosing the appropriate
        # java method according to value type
-       # If there's already a value associated with this key, the new value 
+       # If there's already a value associated with this key, the new value
        # overwrites it
        #
        # To retrieve entries, you'll have to call the type corresponding method
-       # conforming to these rules :
+       # conforming to these rules:
        #
        # | Nit type              | corresponding getter            |
        # |:----------------------|:--------------------------------|
-       # ! `Int`                 | `long`                          |
+       # | `Int`                 | `long`                          |
        # | `Float`               | `double`                        |
        # | `Bool`                | `bool`                          |
        # | `Char`                | `char`                          |
-       # ! `String`              | `string`                        |
-       # ! `Serializable`        | `deserialize`                   |
-       # ! `Array[Int]`          | `array_of_long`                 |
-       # ! `Array[Float]`        | `array_of_double`               |
-       # ! `Array[Bool]`         | `array_of_bool`                 |
-       # ! `Array[Char]`         | `array_of_char`                 |
-       # ! `Array[String]`       | `array_of_string`               |
+       # | `String`              | `string`                        |
+       # | `Serializable`        | `deserialize`                   |
+       # | `Array[Int]`          | `array_of_long`                 |
+       # | `Array[Float]`        | `array_of_double`               |
+       # | `Array[Bool]`         | `array_of_bool`                 |
+       # | `Array[Char]`         | `array_of_char`                 |
+       # | `Array[String]`       | `array_of_string`               |
        # | `Array[Serializable]` | `deserialize_array`             |
        fun []=(key: String, value: Serializable): Bundle
        do
@@ -503,7 +503,7 @@ class Bundle
        # Retrieve an `Object` serialized via `[]=` function
        # Returns `null` if there's no serialized object corresponding to the given key
        # or if it's the wrong value type
-       # Make sure that the serialized object is `auto_serializable` or that it 
+       # Make sure that the serialized object is `serialize` or that it
        # redefines the appropriate methods. Refer to `Serializable` documentation
        # for further details
        fun deserialize(key: String): nullable Object
@@ -520,7 +520,7 @@ class Bundle
        # Retrieve an `Array` of `Object` serialized via `[]=` function
        # Returns `null` if there's no serialized `Array` corresponding to the given key
        # or if it's the wrong value type
-       # Make sure that the serialized objects are `auto_serializable` or that they 
+       # Make sure that the serialized objects are `serialize` or that they
        # redefine the appropriate methods. Refer to `Serializable` documentation
        # for further details
        fun deserialize_array(key: String): nullable Array[nullable Object]
@@ -557,7 +557,7 @@ class Bundle
        fun bool(key: String, def_value: Bool): Bool
        do
                sys.jni_env.push_local_frame(1)
-               var return_value = 
+               var return_value =
                        native_bundle.get_boolean_with_def_value(key.to_java_string, def_value)
                sys.jni_env.pop_local_frame
                return return_value
@@ -569,7 +569,7 @@ class Bundle
        fun char(key: String, def_value: Char): Char
        do
                sys.jni_env.push_local_frame(1)
-               var return_value = 
+               var return_value =
                        native_bundle.get_char_with_def_value(key.to_java_string, def_value)
                sys.jni_env.pop_local_frame
                return return_value
@@ -580,18 +580,18 @@ class Bundle
        fun int(key: String, def_value: Int): Int
        do
                sys.jni_env.push_local_frame(1)
-               var return_value = 
+               var return_value =
                        native_bundle.get_long_with_def_value(key.to_java_string, def_value)
                sys.jni_env.pop_local_frame
                return return_value
        end
-       
+
        # Retrieves the `Float` value corresponding to the given key
        # Returns the `def_value` if none or if it's the wrong value type
        fun float(key: String, def_value: Float): Float
        do
                sys.jni_env.push_local_frame(1)
-               var return_value = 
+               var return_value =
                        native_bundle.get_double_with_def_value(key.to_java_string, def_value)
                sys.jni_env.pop_local_frame
                return return_value
@@ -657,7 +657,7 @@ class Bundle
 
                var return_value = native_bundle.get_string_array(key.to_java_string)
                sys.jni_env.pop_local_frame
-               
+
                if return_value.is_empty then return null
 
                return return_value
@@ -728,7 +728,7 @@ redef class Array[E]
                        bundle.put_char_array(key, self)
                else if self isa Array[String] then
                        sys.jni_env.push_local_frame(self.length)
-                       var java_string_array = new Array[JavaString] 
+                       var java_string_array = new Array[JavaString]
 
                        for element in self do
                                java_string_array.push(element.to_s.to_java_string)
index 30ec5eb..b599a37 100644 (file)
@@ -46,25 +46,25 @@ extern class NativeHeadTracker in "Java" `{ com.google.vrtoolkit.cardboard.senso
        `}
 
        # Start tracking head movement
-       fun start_tracking in "Java" `{ recv.startTracking(); `}
+       fun start_tracking in "Java" `{ self.startTracking(); `}
 
        # Stop tracking head movement
-       fun stop_tracking in "Java" `{ recv.stopTracking(); `}
+       fun stop_tracking in "Java" `{ self.stopTracking(); `}
 
        # Apply correction to the gyroscope values
        fun gyro_bias=(matrix: JavaFloatArray) in "Java" `{
-               recv.setGyroBias(matrix);
+               self.setGyroBias(matrix);
        `}
 
        # Enable finer analysis using the neck as center of movement
        fun neck_model_enabled=(value: Bool) in "Java" `{
-               recv.setNeckModelEnabled(value);
+               self.setNeckModelEnabled(value);
        `}
 
        # Fill `matrix` with the last rotation matrix calculated from head movements
        #
        # Require: matrix.length >= offset + 16
        fun last_head_view(matrix: JavaFloatArray, offset: Int) in "Java" `{
-               recv.getLastHeadView(matrix, (int)offset);
+               self.getLastHeadView(matrix, (int)offset);
        `}
 end
index 48603dc..dc335dc 100644 (file)
@@ -55,7 +55,7 @@ redef class Sys
        end
 
        private fun find_class_loader(native_activity: NativeActivity) import jni_env, class_loader=, JavaObject.as nullable, class_loader_method=, JMethodID.as nullable `{
-               JNIEnv *env = Sys_jni_env(recv);
+               JNIEnv *env = Sys_jni_env(self);
 
                // Retrieve main activity
                jclass class_activity = (*env)->GetObjectClass(env, native_activity);
@@ -96,8 +96,8 @@ redef class Sys
                }
 
                // Return the values to Nit
-               Sys_class_loader__assign(recv, JavaObject_as_nullable((*env)->NewGlobalRef(env, instance_class_loader)));
-               Sys_class_loader_method__assign(recv, JMethodID_as_nullable(class_class_loader_findClass));
+               Sys_class_loader__assign(self, JavaObject_as_nullable((*env)->NewGlobalRef(env, instance_class_loader)));
+               Sys_class_loader_method__assign(self, JMethodID_as_nullable(class_class_loader_findClass));
 
                // Clean up
                (*env)->DeleteLocalRef(env, class_activity);
@@ -106,7 +106,7 @@ redef class Sys
        `}
 
        private fun load_jclass_intern(instance_class_loader: JavaObject, class_loader_findClass: JMethodID, name: NativeString): JClass import jni_env `{
-               JNIEnv *env = Sys_jni_env(recv);
+               JNIEnv *env = Sys_jni_env(self);
                jobject class_name = (*env)->NewStringUTF(env, name);
 
                jclass java_class = (*env)->CallObjectMethod(env, instance_class_loader, class_loader_findClass, class_name);
index 55f21a5..351040e 100644 (file)
@@ -54,31 +54,31 @@ in "C" `{
 private extern class NativeAndroidMotionEvent `{AInputEvent *`}
 
        fun pointers_count: Int `{
-               return AMotionEvent_getPointerCount(recv);
+               return AMotionEvent_getPointerCount(self);
        `}
 
        # Did this motion event just started?
        fun just_went_down: Bool `{
-               return (AMotionEvent_getAction(recv) & AMOTION_EVENT_ACTION_MASK) == AMOTION_EVENT_ACTION_DOWN;
+               return (AMotionEvent_getAction(self) & AMOTION_EVENT_ACTION_MASK) == AMOTION_EVENT_ACTION_DOWN;
        `}
 
        fun edge: Int `{
-               return AMotionEvent_getEdgeFlags(recv);
+               return AMotionEvent_getEdgeFlags(self);
        `}
 
        # Get the non-primary pointer id that just went down (returns -1 or > 0)
        fun index_down_pointer: Int `{
-               int a = AMotionEvent_getAction(recv);
+               int a = AMotionEvent_getAction(self);
                if ((a & AMOTION_EVENT_ACTION_MASK) == AMOTION_EVENT_ACTION_POINTER_DOWN)
                        return (a & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
                else return -1;
        `}
 
-       fun action: AMotionEventAction `{ return AMotionEvent_getAction(recv); `}
+       fun action: AMotionEventAction `{ return AMotionEvent_getAction(self); `}
 end
 
 private extern class AMotionEventAction `{ int32_t `}
-       fun action: Int `{ return recv & AMOTION_EVENT_ACTION_MASK; `}
+       fun action: Int `{ return self & AMOTION_EVENT_ACTION_MASK; `}
 
        fun is_down: Bool do return action == 0
        fun is_up: Bool do return action == 1
@@ -199,16 +199,16 @@ extern class AndroidKeyEvent `{AInputEvent *`}
        super KeyEvent
        super AndroidInputEvent
 
-       private fun action: Int `{ return AKeyEvent_getAction(recv); `}
+       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
 
        # Hardware code of the key raising this event
-       fun key_code: Int `{ return AKeyEvent_getKeyCode(recv); `}
+       fun key_code: Int `{ return AKeyEvent_getKeyCode(self); `}
 
        redef fun to_c `{
-               int code = AKeyEvent_getKeyCode(recv);
+               int code = AKeyEvent_getKeyCode(self);
                if (code >= AKEYCODE_0 && code <= AKEYCODE_9)
                        return '0'+code-AKEYCODE_0;
                if (code >= AKEYCODE_A && code <= AKEYCODE_Z)
index 5312c15..8c6a928 100644 (file)
@@ -36,15 +36,15 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
 
        new in "Java" `{ return new Intent(); `}
 
-       fun add_category(category: JavaString) in "Java" `{ recv.addCategory(category); `}
-       fun add_flags(flags: Int) in "Java" `{ recv.addFlags((int)flags); `}
+       fun add_category(category: JavaString) in "Java" `{ self.addCategory(category); `}
+       fun add_flags(flags: Int) in "Java" `{ self.addFlags((int)flags); `}
        fun filter_equals(other: NativeIntent): Bool in "Java" `{
-               return recv.filterEquals(other);
+               return self.filterEquals(other);
        `}
-       fun action: JavaString in "Java" `{ return recv.getAction(); `}
+       fun action: JavaString in "Java" `{ return self.getAction(); `}
        fun boolean_array_extra(name: JavaString): Array[Bool] import Array[Bool],
          Array[Bool].push in "Java" `{
-               boolean[] java_array = recv.getBooleanArrayExtra(name);
+               boolean[] java_array = self.getBooleanArrayExtra(name);
                int nit_array = new_Array_of_Bool();
 
                for(int i=0; i < java_array.length; ++i)
@@ -53,11 +53,11 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                return nit_array;
        `}
        fun boolean_extra(name: JavaString, def_value: Bool): Bool in "Java" `{
-               return recv.getBooleanExtra(name, def_value);
+               return self.getBooleanExtra(name, def_value);
        `}
        fun byte_array_extra(name: JavaString): Array[Int] import Array[Int],
          Array[Int].add in "Java" `{
-               byte[] java_array = recv.getByteArrayExtra(name);
+               byte[] java_array = self.getByteArrayExtra(name);
                int nit_array = new_Array_of_Int();
 
                for (int i=0; i < java_array.length; ++i)
@@ -66,12 +66,12 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                return nit_array;
        `}
        fun byte_extra(name: JavaString, def_value: Int): Int in "Java" `{
-               return (int) recv.getByteExtra(name, (byte) def_value);
+               return (int) self.getByteExtra(name, (byte) def_value);
        `}
        # FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
        fun char_array_extra(name: JavaString): Array[Char] import Array[Char],
          Array[Char].add in "Java" `{
-               char[] java_array = recv.getCharArrayExtra(name);
+               char[] java_array = self.getCharArrayExtra(name);
                int nit_array = new_Array_of_Char();
 
                for (int i = 0; i < java_array.length; ++i)
@@ -81,11 +81,11 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
        `}
        # FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
        fun char_extra(name: JavaString, def_value: Char): Char in "Java" `{
-               return recv.getCharExtra(name, def_value);
+               return (int)self.getCharExtra(name, (char)def_value);
        `}
        fun char_sequence_array_extra(name: JavaString): Array[String]
          import StringCopyArray, StringCopyArray.add, StringCopyArray.collection in "Java" `{
-               CharSequence[] java_array = recv.getCharSequenceArrayExtra(name);
+               CharSequence[] java_array = self.getCharSequenceArrayExtra(name);
                int nit_array = new_StringCopyArray();
 
                for (int i = 0; i < java_array.length; ++i)
@@ -95,7 +95,7 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
        `}
        fun char_sequence_array_list_extra(name: JavaString): Array[String]
          import StringCopyArray, StringCopyArray.add, StringCopyArray.collection in "Java" `{
-               ArrayList<CharSequence> java_array = recv.getCharSequenceArrayListExtra(name);
+               ArrayList<CharSequence> java_array = self.getCharSequenceArrayListExtra(name);
                int nit_array = new_StringCopyArray();
 
                if (java_array == null) return nit_array;
@@ -106,11 +106,11 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                return StringCopyArray_collection(nit_array);
        `}
        fun char_sequence_extra(name: JavaString): JavaString in "Java" `{
-               return (String) recv.getCharSequenceExtra(name);
+               return (String) self.getCharSequenceExtra(name);
        `}
        fun categories: HashSet[String] import StringCopyHashSet,
          StringCopyHashSet.add, StringCopyHashSet.collection  in "Java" `{
-               Set<String> java_set = recv.getCategories();
+               Set<String> java_set = self.getCategories();
                int nit_hashset = new_StringCopyHashSet();
 
                if (java_set == null) return nit_hashset;
@@ -121,10 +121,10 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                return StringCopyHashSet_collection(nit_hashset);
        `}
        # Returns the Uri as an encoded String
-       fun data: JavaString in "Java" `{ return recv.getDataString(); `}
+       fun data: JavaString in "Java" `{ return self.getDataString(); `}
        fun double_array_extra(name: JavaString): Array[Float] import Array[Float],
          Array[Float].push in "Java" `{
-               double[] java_array = recv.getDoubleArrayExtra(name);
+               double[] java_array = self.getDoubleArrayExtra(name);
                int nit_array = new_Array_of_Float();
 
                for(int i=0; i < java_array.length; ++i)
@@ -133,12 +133,12 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                return nit_array;
        `}
        fun double_extra(name: JavaString, def_value: Float): Float in "Java" `{
-               return recv.getDoubleExtra(name, def_value);
+               return self.getDoubleExtra(name, def_value);
        `}
-       fun flags: Int in "Java" `{ return recv.getFlags(); `}
+       fun flags: Int in "Java" `{ return self.getFlags(); `}
        fun float_array_extra(name: JavaString): Array[Float] import Array[Float],
          Array[Float].push in "Java" `{
-               float[] java_array = recv.getFloatArrayExtra(name);
+               float[] java_array = self.getFloatArrayExtra(name);
                int nit_array = new_Array_of_Float();
 
                for(int i=0; i < java_array.length; ++i)
@@ -147,11 +147,11 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                return nit_array;
        `}
        fun float_extra(name: JavaString, def_value: Float): Float in "Java" `{
-               return recv.getFloatExtra(name, (float) def_value);
+               return self.getFloatExtra(name, (float) def_value);
        `}
        fun int_array_extra(name: JavaString): Array[Int] import Array[Int],
          Array[Int].push in "Java" `{
-               int[] java_array = recv.getIntArrayExtra(name);
+               int[] java_array = self.getIntArrayExtra(name);
                int nit_array = new_Array_of_Int();
 
                for(int i=0; i < java_array.length; ++i)
@@ -160,11 +160,11 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                return nit_array;
        `}
        fun int_extra(name: JavaString, def_value: Int): Int in "Java" `{
-               return recv.getIntExtra(name, (int)def_value);
+               return self.getIntExtra(name, (int)def_value);
        `}
        fun long_array_extra(name: JavaString): Array[Int] import Array[Int],
          Array[Int].push in "Java" `{
-               long[] java_array = recv.getLongArrayExtra(name);
+               long[] java_array = self.getLongArrayExtra(name);
                int nit_array = new_Array_of_Int();
 
                for(int i=0; i < java_array.length; ++i)
@@ -173,13 +173,13 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                return nit_array;
        `}
        fun long_extra(name: JavaString, def_value: Int): Int in "Java" `{
-               return (int) recv.getLongExtra(name, def_value);
+               return (int) self.getLongExtra(name, def_value);
        `}
-       fun get_package: JavaString in "Java" `{ return recv.getPackage(); `}
-       fun scheme: JavaString in "Java" `{ return recv.getScheme(); `}
+       fun get_package: JavaString in "Java" `{ return self.getPackage(); `}
+       fun scheme: JavaString in "Java" `{ return self.getScheme(); `}
        fun short_array_extra(name: JavaString): Array[Int] import Array[Int],
          Array[Int].push in "Java" `{
-               short[] java_array = recv.getShortArrayExtra(name);
+               short[] java_array = self.getShortArrayExtra(name);
                int nit_array = new_Array_of_Int();
 
                for(int i=0; i < java_array.length; ++i)
@@ -188,11 +188,11 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                return nit_array;
        `}
        fun short_extra(name: JavaString, def_value: Int): Int in "Java" `{
-               return recv.getShortExtra(name, (short) def_value);
+               return self.getShortExtra(name, (short) def_value);
        `}
        fun string_array_extra(name: JavaString): Array[String]
          import StringCopyArray, StringCopyArray.add, StringCopyArray.collection in "Java" `{
-               String[] java_array = recv.getStringArrayExtra(name);
+               String[] java_array = self.getStringArrayExtra(name);
                int nit_array = new_StringCopyArray();
 
                for(int i=0; i < java_array.length; ++i)
@@ -202,7 +202,7 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
        `}
        fun string_array_list_extra(name: JavaString): Array[String]
          import StringCopyArray, StringCopyArray.add, StringCopyArray.collection in "Java" `{
-               ArrayList<String> java_array = recv.getStringArrayListExtra(name);
+               ArrayList<String> java_array = self.getStringArrayListExtra(name);
                int nit_array = new_StringCopyArray();
 
                for (String element: java_array)
@@ -211,19 +211,19 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                return StringCopyArray_collection(nit_array);
        `}
        fun string_extra(name: JavaString): JavaString in "Java" `{
-               String return_value = recv.getStringExtra(name);
+               String return_value = self.getStringExtra(name);
                if (return_value == null) return "";
 
                return return_value;
        `}
-       fun get_type: JavaString in "Java" `{ return recv.getType(); `}
+       fun get_type: JavaString in "Java" `{ return self.getType(); `}
        fun has_category(category: JavaString): Bool in "Java" `{
-               return recv.hasCategory(category);
+               return self.hasCategory(category);
        `}
-       fun has_extra(extra: JavaString): Bool in "Java" `{ return recv.hasExtra(extra); `}
-       fun has_file_descriptors: Bool in "Java" `{ return recv.hasFileDescriptors(); `}
+       fun has_extra(extra: JavaString): Bool in "Java" `{ return self.hasExtra(extra); `}
+       fun has_file_descriptors: Bool in "Java" `{ return self.hasFileDescriptors(); `}
        fun add_extra_double(name: JavaString, value: Float): NativeIntent in "Java" `{
-               return recv.putExtra(name, value);
+               return self.putExtra(name, value);
        `}
        fun add_extra_array_of_double(name: JavaString, value: Array[Float]): NativeIntent
          import Array[Float].length, Array[Float].[] in "Java" `{
@@ -232,11 +232,11 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                for (int i=0; i < java_array.length; ++i)
                        java_array[i] = Array_of_Float__index(value, i);
 
-               return recv.putExtra(name, java_array);
+               return self.putExtra(name, java_array);
        `}
        # FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
        fun add_extra_char(name: JavaString, value: Char): NativeIntent in "Java" `{
-               return recv.putExtra(name, value);
+               return self.putExtra(name, value);
        `}
        # FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
        fun add_extra_array_of_char(name: JavaString, value: Array[Char]): NativeIntent
@@ -244,13 +244,13 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                char[] java_array = new char[(int)Array_of_Char_length(value)];
 
                for (int i=0; i < java_array.length; ++i)
-                       java_array[i] = Array_of_Char__index(value, i);
+                       java_array[i] = (char)Array_of_Char__index(value, i);
 
-               return recv.putExtra(name, java_array);
+               return self.putExtra(name, java_array);
        `}
        fun add_extra_char_sequence(name: JavaString, value: JavaString): NativeIntent
          in "Java" `{
-               return recv.putExtra(name, value);
+               return self.putExtra(name, value);
        `}
        fun add_extra_array_of_char_sequence(name: JavaString, value: Array[JavaString]):
          NativeIntent import Array[JavaString].length, Array[JavaString].[] in "Java" `{
@@ -259,14 +259,14 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                for (int i=0; i < java_array.length; ++i)
                        java_array[i] = Array_of_JavaString__index(value, i);
 
-               return recv.putExtra(name, java_array);
+               return self.putExtra(name, java_array);
        `}
        fun add_extra_bundle(name: JavaString, value: NativeBundle): NativeIntent
          in "Java" `{
-               return recv.putExtra(name, value);
+               return self.putExtra(name, value);
        `}
        fun add_extra_int(name: JavaString, value: Int): NativeIntent in "Java" `{
-               return recv.putExtra(name, value);
+               return self.putExtra(name, value);
        `}
        fun add_extra_array_of_int(name: JavaString, value: Array[Int]): NativeIntent
          import Array[Int].length, Array[Int].[] in "Java" `{
@@ -275,7 +275,7 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                for (int i=0; i < java_array.length; ++i)
                        java_array[i] = (int)Array_of_Int__index(value, i);
 
-               return recv.putExtra(name, java_array);
+               return self.putExtra(name, java_array);
        `}
        fun add_extra_array_list_of_int(name: JavaString, value: Array[Int]): NativeIntent
          import Array[Int].length, Array[Int].[] in "Java" `{
@@ -285,16 +285,16 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                for (int i=0; i < length; ++i)
                        java_array.add((int)Array_of_Int__index(value, i));
 
-               return recv.putExtra(name, java_array);
+               return self.putExtra(name, java_array);
        `}
        fun add_extra_byte(name: JavaString, value: Int): NativeIntent in "Java" `{
-               return recv.putExtra(name, (byte) value);
+               return self.putExtra(name, (byte) value);
        `}
        fun add_extra_array_of_byte(name: JavaString, value: Int): NativeIntent in "Java" `{
-               return recv.putExtra(name, (byte) value);
+               return self.putExtra(name, (byte) value);
        `}
        fun add_extra_long(name: JavaString, value: Int): NativeIntent in "Java" `{
-               return recv.putExtra(name, value);
+               return self.putExtra(name, value);
        `}
        fun add_extra_array_of_long(name: JavaString, value: Array[Int]): NativeIntent
          import Array[Int].length, Array[Int].[] in "Java" `{
@@ -303,10 +303,10 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                for (int i=0; i < java_array.length; ++i)
                        java_array[i] = Array_of_Int__index(value, i);
 
-               return recv.putExtra(name, java_array);
+               return self.putExtra(name, java_array);
        `}
        fun add_extra_float(name: JavaString, value: Float): NativeIntent in "Java" `{
-               return recv.putExtra(name, value);
+               return self.putExtra(name, value);
        `}
        fun add_extra_array_of_float(name: JavaString, value: Array[Float]): NativeIntent
          import Array[Float].length, Array[Float].[] in "Java" `{
@@ -315,10 +315,10 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                for (int i=0; i < java_array.length; ++i)
                        java_array[i] = (float) Array_of_Float__index(value, i);
 
-               return recv.putExtra(name, java_array);
+               return self.putExtra(name, java_array);
        `}
        fun add_extra_string(name: JavaString, value: JavaString): NativeIntent in "Java" `{
-               return recv.putExtra(name, value);
+               return self.putExtra(name, value);
        `}
        fun add_extra_array_of_string(name: JavaString, value: Array[JavaString]): NativeIntent
          import Array[JavaString].length, Array[JavaString].[] in "Java" `{
@@ -327,7 +327,7 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                for (int i=0; i < java_array.length; ++i)
                        java_array[i] = Array_of_JavaString__index(value, i);
 
-               return recv.putExtra(name, java_array);
+               return self.putExtra(name, java_array);
        `}
        fun add_extra_array_list_of_string(name: JavaString, value: Array[JavaString]): NativeIntent
          import Array[JavaString].length, Array[JavaString].[] in "Java" `{
@@ -338,10 +338,10 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                        java_array.add(Array_of_JavaString__index(value, i));
                }
 
-               return recv.putExtra(name, java_array);
+               return self.putExtra(name, java_array);
        `}
        fun add_extra_bool(name: JavaString, value: Bool): NativeIntent in "Java" `{
-               return recv.putExtra(name, value);
+               return self.putExtra(name, value);
        `}
        fun add_extra_array_of_bool(name: JavaString, value: Array[Bool]): NativeIntent
          import Array[Bool].length, Array[Bool].[] in "Java" `{
@@ -350,10 +350,10 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                for (int i=0; i < java_array.length; ++i)
                        java_array[i] = Array_of_Bool__index(value, i);
 
-               return recv.putExtra(name, java_array);
+               return self.putExtra(name, java_array);
        `}
        fun add_extra_short(name: JavaString, value: Int): NativeIntent in "Java" `{
-               return recv.putExtra(name, value);
+               return self.putExtra(name, value);
        `}
        fun add_extra_array_of_short(name: JavaString, value: Array[Int]): NativeIntent
          import Array[Int].length, Array[Int].[] in "Java" `{
@@ -362,22 +362,22 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                for (int i=0; i < java_array.length; ++i)
                        java_array[i] = (short) Array_of_Int__index(value, i);
 
-               return recv.putExtra(name, java_array);
+               return self.putExtra(name, java_array);
        `}
-       fun copy_extras(src: NativeIntent): NativeIntent in "Java" `{ return recv.putExtras(src); `}
-       fun add_extras(src: NativeBundle): NativeIntent in "Java" `{ return recv.putExtras(src); `}
-       fun remove_category(category: JavaString) in "Java" `{ recv.removeCategory(category); `}
-       fun remove_extra(name: JavaString) in "Java" `{ recv.removeExtra(name); `}
+       fun copy_extras(src: NativeIntent): NativeIntent in "Java" `{ return self.putExtras(src); `}
+       fun add_extras(src: NativeBundle): NativeIntent in "Java" `{ return self.putExtras(src); `}
+       fun remove_category(category: JavaString) in "Java" `{ self.removeCategory(category); `}
+       fun remove_extra(name: JavaString) in "Java" `{ self.removeExtra(name); `}
        fun replace_extras(src: NativeIntent): NativeIntent in "Java" `{
-               return recv.replaceExtras(src);
+               return self.replaceExtras(src);
        `}
        fun resolve_activity(pm: NativePackageManager): NativeComponentName in "Java" `{
-               return recv.resolveActivity(pm);
+               return self.resolveActivity(pm);
        `}
        fun resolve_type(context: NativeActivity): JavaString in "Java" `{
-               return recv.resolveType(context);
+               return self.resolveType(context);
        `}
-       fun action=(action: JavaString): NativeIntent in "Java" `{ return recv.setAction(action); `}
+       fun action=(action: JavaString): NativeIntent in "Java" `{ return self.setAction(action); `}
        fun class_=(package_context: NativeActivity, class_name: JavaString): NativeIntent
          in "Java" `{
                Class<?> java_class = null;
@@ -386,40 +386,40 @@ extern class NativeIntent in "Java" `{ android.content.Intent `}
                } catch (Exception e) {
                        e.getStackTrace();
                }
-               return recv.setClass(package_context, java_class);
+               return self.setClass(package_context, java_class);
        `}
        fun class_name=(package_context: NativeActivity, class_name: JavaString): NativeIntent
          in "Java" `{
-               return recv.setClassName(package_context, class_name);
+               return self.setClassName(package_context, class_name);
        `}
        fun set_class_name(package_name: JavaString, class_name: JavaString): NativeIntent
          in "Java" `{
-               return recv.setClassName(package_name, class_name);
+               return self.setClassName(package_name, class_name);
        `}
        fun data=(data_uri: JavaString): NativeIntent in "Java" `{
-               return recv.setData(Uri.parse(data_uri));
+               return self.setData(Uri.parse(data_uri));
        `}
        fun data_and_type=(data_uri: JavaString, type_: JavaString): NativeIntent in "Java" `{
-               return recv.setDataAndType(Uri.parse(data_uri), type_);
+               return self.setDataAndType(Uri.parse(data_uri), type_);
        `}
-       fun flags=(flags: Int): NativeIntent in "Java" `{ return recv.setFlags((int)flags); `}
+       fun flags=(flags: Int): NativeIntent in "Java" `{ return self.setFlags((int)flags); `}
        fun package_name=(package_name: JavaString): NativeIntent in "Java" `{
-               return recv.setPackage(package_name);
+               return self.setPackage(package_name);
        `}
        fun source_bounds=(left, top, right, bottom: Int) in "Java" `{
-               recv.setSourceBounds(new Rect((int)left, (int)top, (int)right, (int)bottom));
+               self.setSourceBounds(new Rect((int)left, (int)top, (int)right, (int)bottom));
        `}
        fun mime_type=(mime_type: JavaString): NativeIntent in "Java" `{
-               return recv.setType(mime_type);
+               return self.setType(mime_type);
        `}
-       fun to_native_s: JavaString in "Java" `{ return recv.toString(); `}
-       fun to_uri(flags: Int): JavaString in "Java" `{ return recv.toUri((int)flags); `}
+       fun to_native_s: JavaString in "Java" `{ return self.toString(); `}
+       fun to_uri(flags: Int): JavaString in "Java" `{ return self.toUri((int)flags); `}
 
        # HACK for bug #845
        redef fun new_global_ref import sys, Sys.jni_env `{
-               Sys sys = NativeIntent_sys(recv);
+               Sys sys = NativeIntent_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 end
 
@@ -1306,9 +1306,9 @@ class Intent
 end
 
 redef extern class NativeActivity
-       private fun start_activity(intent: NativeIntent) in "Java" `{ recv.startActivity(intent); `}
-       private fun start_service(intent: NativeIntent) in "Java" `{ recv.startService(intent); `}
-       private fun stop_service(intent: NativeIntent) in "Java" `{ recv.stopService(intent); `}
+       private fun start_activity(intent: NativeIntent) in "Java" `{ self.startActivity(intent); `}
+       private fun start_service(intent: NativeIntent) in "Java" `{ self.startService(intent); `}
+       private fun stop_service(intent: NativeIntent) in "Java" `{ self.stopService(intent); `}
 end
 
 # Allows user to get values with enum-like syntax : `intent_action.main`
index cab60aa..f948e3d 100644 (file)
@@ -24,7 +24,7 @@ in "Java" `{
 `}
 
 redef extern class NativeIntent
-       fun selector=(selector: NativeIntent) in "Java" `{ recv.setSelector(selector); `}
+       fun selector=(selector: NativeIntent) in "Java" `{ self.setSelector(selector); `}
 end
 
 redef class Category
index 1513ab8..f63359c 100644 (file)
@@ -25,9 +25,9 @@ in "Java" `{
 `}
 
 redef extern class NativeIntent
-       fun set_data_and_normalize(data_uri: JavaString): NativeIntent in "Java" `{ return recv.setDataAndNormalize(Uri.parse(data_uri)); `}
-       fun set_data_and_type_and_normalize(data_uri: JavaString, type_: JavaString): NativeIntent in "Java" `{ return recv.setDataAndTypeAndNormalize(Uri.parse(data_uri), type_); `}
-       fun set_mime_type_and_normalize(mime_type: JavaString): NativeIntent in "Java" `{ return recv.setTypeAndNormalize(mime_type); `}
+       fun set_data_and_normalize(data_uri: JavaString): NativeIntent in "Java" `{ return self.setDataAndNormalize(Uri.parse(data_uri)); `}
+       fun set_data_and_type_and_normalize(data_uri: JavaString, type_: JavaString): NativeIntent in "Java" `{ return self.setDataAndTypeAndNormalize(Uri.parse(data_uri), type_); `}
+       fun set_mime_type_and_normalize(mime_type: JavaString): NativeIntent in "Java" `{ return self.setTypeAndNormalize(mime_type); `}
 end
 
 redef class Extra
index 826eef2..2202827 100644 (file)
@@ -221,7 +221,7 @@ redef class App
                int event;
                void* source;
                while ((ident=ALooper_pollAll(timeout_ms, NULL, &event, &source)) >= 0) {
-                       App_handle_looper_event(recv, ident, event, source);
+                       App_handle_looper_event(self, ident, event, source);
                }
        `}
 
@@ -231,7 +231,7 @@ redef class App
                destroy, start, resume, low_memory, config_changed, input_changed,
                window_resized, window_redraw_needed, content_rect_changed `{
 
-               struct android_app *app_glue = App_native_app_glue(recv);
+               struct android_app *app_glue = App_native_app_glue(self);
                struct android_poll_source* source = (struct android_poll_source*)data;
 
                // Process this event.
@@ -251,33 +251,33 @@ extern class NdkNativeActivity `{ ANativeActivity * `}
        #fun set_callbacks_handler(handler: App) or callbacks= ...
 
        # Java VM associated to `self`
-       fun vm: JavaVM `{ return recv->vm; `}
+       fun vm: JavaVM `{ return self->vm; `}
 
        # JNI environmnet associated to `self`
-       fun env: JniEnv `{ return recv->env; `}
+       fun env: JniEnv `{ return self->env; `}
 
        # The `NativeActivity`, as in the Java object, associated to `self`
-       fun java_native_activity: NativeActivity `{ return recv->clazz; `}
+       fun java_native_activity: NativeActivity `{ return self->clazz; `}
 
        # Path to this application's internal data directory.
-       fun internal_data_path: NativeString `{ return (char*)recv->internalDataPath; `}
+       fun internal_data_path: NativeString `{ return (char*)self->internalDataPath; `}
 
        # Path to this application's external (removable/mountable) data directory.
-       fun external_data_path: NativeString `{ return (char*)recv->externalDataPath; `}
+       fun external_data_path: NativeString `{ return (char*)self->externalDataPath; `}
 
        # The platform's SDK version code.
-       fun sdk_version: Int `{ return recv->sdkVersion; `}
+       fun sdk_version: Int `{ return self->sdkVersion; `}
 
        # This is the native instance of the application.  It is not used by
        # the framework, but can be set by the application to its own instance
        # state.
-       fun instance: Pointer `{ return recv->instance; `}
+       fun instance: Pointer `{ return self->instance; `}
 
        # Pointer to the Asset Manager instance for the application.  The application
        # uses this to access binary assets bundled inside its own .apk file.
        #
        # TODO activate in a future `asset_manager` module if it cannot be done in Java
-       #fun asset_manager: AssetManager `{ return recv->assetManager; `}
+       #fun asset_manager: AssetManager `{ return self->assetManager; `}
 
        # Available starting with Honeycomb: path to the directory containing
        # the application's OBB files (if any).  If the app doesn't have any
@@ -285,7 +285,7 @@ extern class NdkNativeActivity `{ ANativeActivity * `}
        # api?
        #
        # TODO activate in a future module at API 11
-       #fun obb_path: NativeString `{ return (char*)recv->obbPath; `}
+       #fun obb_path: NativeString `{ return (char*)self->obbPath; `}
 end
 
 # This is the interface for the standard glue code of a threaded
@@ -297,10 +297,10 @@ end
 extern class NativeAppGlue `{ struct android_app* `}
        # We use the `userData` field of the C structure to store an handle to
        # the associated App
-       private fun user_data: App `{ return recv->userData; `}
+       private fun user_data: App `{ return self->userData; `}
        private fun user_data=(val: App) `{
                App_incr_ref(val);
-               recv->userData = val;
+               self->userData = val;
        `}
 
        # Fill this in with the function to process input events.  At this point
@@ -311,10 +311,10 @@ extern class NativeAppGlue `{ struct android_app* `}
        #fun set_input_event_handler(handler: App) `{  `}
 
        # The ANativeActivity object instance that this app is running in.
-       fun ndk_native_activity: NdkNativeActivity `{ return recv->activity; `}
+       fun ndk_native_activity: NdkNativeActivity `{ return self->activity; `}
 
        # The current configuration the app is running in.
-       fun config: AConfiguration `{ return recv->config; `}
+       fun config: AConfiguration `{ return self->config; `}
 
        # This is the last instance's saved state, as provided at creation time.
        # It is NULL if there was no state.  You can use this as you need; the
@@ -324,32 +324,32 @@ extern class NativeAppGlue `{ struct android_app* `}
        # at which point they will be initialized to NULL and you can malloc your
        # state and place the information here.  In that case the memory will be
        # freed for you later.
-       fun saved_state: Pointer `{ return recv->savedState; `}
-       fun saved_state_size: Int `{ return recv->savedStateSize; `}
+       fun saved_state: Pointer `{ return self->savedState; `}
+       fun saved_state_size: Int `{ return self->savedStateSize; `}
 
        # The ALooper associated with the app's thread.
-       fun looper: ALooper `{ return recv->looper; `}
+       fun looper: ALooper `{ return self->looper; `}
 
        # When non-NULL, this is the input queue from which the app will
        # receive user input events.
-       fun input_queue: AInputQueue `{ return recv->inputQueue; `}
+       fun input_queue: AInputQueue `{ return self->inputQueue; `}
 
        # When non-NULL, this is the window surface that the app can draw in.
-       fun window: ANativeWindow `{ return recv->window; `}
+       fun window: ANativeWindow `{ return self->window; `}
 
        # Current content rectangle of the window; this is the area where the
        # window's content should be placed to be seen by the user.
        #
        # TODO activate when we know what to return (returns a struct not a pointer)
-       #fun content_recv: ARect `{ return recv->contentRect; `}
+       #fun content_self: ARect `{ return self->contentRect; `}
 
        # Current state of the app's activity.  May be either APP_CMD_START,
        # APP_CMD_RESUME, APP_CMD_PAUSE, or APP_CMD_STOP; see below.
-       fun activity_state: Int `{ return recv->activityState; `}
+       fun activity_state: Int `{ return self->activityState; `}
 
        # This is non-zero when the application's NativeActivity is being
        # destroyed and waiting for the app thread to complete.
-       fun detroy_request: Bool `{ return recv->destroyRequested; `}
+       fun detroy_request: Bool `{ return self->destroyRequested; `}
 end
 
 # Android NDK's struture holding configurations of the native app
index d41e04c..87d9d22 100644 (file)
@@ -159,8 +159,8 @@ redef class App
        Activity.on_start, Activity.on_restart, Activity.on_stop,
        Activity.on_pause, Activity.on_resume,
        Activity.on_save_instance_state, Activity.on_restore_instance_state `{
-               App_incr_ref(recv);
-               global_app = recv;
+               App_incr_ref(self);
+               global_app = self;
        `}
 
        # Create the Nit side to this new `native` Java activity, and return it to Java
index 82c873f..8de56eb 100644 (file)
@@ -27,19 +27,19 @@ in "Java" `{
 
 redef class NativeActivity
        fun notification_manager: NativeNotificationManager in "Java" `{
-               return (NotificationManager)recv.getSystemService(Context.NOTIFICATION_SERVICE);
+               return (NotificationManager)self.getSystemService(Context.NOTIFICATION_SERVICE);
        `}
 end
 
 extern class NativeNotificationManager in "Java" `{ android.app.NotificationManager `}
 
        fun notify(tag: JavaString, id: Int, notif: NativeNotification) in "Java" `{
-               recv.notify(tag, (int)id, notif);
+               self.notify(tag, (int)id, notif);
        `}
 
-       fun cancel(tag: JavaString, id: Int) in "Java" `{ recv.cancel(tag, (int)id); `}
+       fun cancel(tag: JavaString, id: Int) in "Java" `{ self.cancel(tag, (int)id); `}
 
-       fun cancel_all in "Java" `{ recv.cancelAll(); `}
+       fun cancel_all in "Java" `{ self.cancelAll(); `}
 end
 
 extern class NativeNotification in "Java" `{ android.app.Notification `}
@@ -52,20 +52,20 @@ extern class NativeNotificationBuilder in "Java" `{ android.app.Notification$Bui
        fun create: NativeNotification in "Java" `{
                // Deprecated since API 16, which introduces `build`,
                // refinement and global compilation should prevent warnings.
-               return recv.getNotification();
+               return self.getNotification();
        `}
 
-       fun title=(value: JavaString) in "Java" `{ recv.setContentTitle(value); `}
+       fun title=(value: JavaString) in "Java" `{ self.setContentTitle(value); `}
 
-       fun text=(value: JavaString) in "Java" `{ recv.setContentText(value); `}
+       fun text=(value: JavaString) in "Java" `{ self.setContentText(value); `}
 
-       fun ticker=(value: JavaString) in "Java" `{ recv.setTicker(value); `}
+       fun ticker=(value: JavaString) in "Java" `{ self.setTicker(value); `}
 
-       fun small_icon=(value: Int) in "Java" `{ recv.setSmallIcon((int)value); `}
+       fun small_icon=(value: Int) in "Java" `{ self.setSmallIcon((int)value); `}
 
-       fun auto_cancel=(value: Bool) in "Java" `{ recv.setAutoCancel(value); `}
+       fun auto_cancel=(value: Bool) in "Java" `{ self.setAutoCancel(value); `}
 
-       fun number=(value: Int) in "Java" `{ recv.setNumber((int)value); `}
+       fun number=(value: Int) in "Java" `{ self.setNumber((int)value); `}
 
-       fun ongoing=(value: Bool) in "Java" `{ recv.setOngoing(value); `}
+       fun ongoing=(value: Bool) in "Java" `{ self.setOngoing(value); `}
 end
index a38dd60..3ee9765 100644 (file)
@@ -45,15 +45,15 @@ in "C header" `{
 
 extern class ASensorType `{int`}
        new accelerometer: ASensorType `{return ASENSOR_TYPE_ACCELEROMETER;`}
-       fun is_accelerometer: Bool `{return recv == ASENSOR_TYPE_ACCELEROMETER;`}
+       fun is_accelerometer: Bool `{return self == ASENSOR_TYPE_ACCELEROMETER;`}
        new magnetic_field: ASensorType `{return ASENSOR_TYPE_MAGNETIC_FIELD;`}
-       fun is_magnetic_field: Bool `{return recv == ASENSOR_TYPE_MAGNETIC_FIELD;`}
+       fun is_magnetic_field: Bool `{return self == ASENSOR_TYPE_MAGNETIC_FIELD;`}
        new gyroscope:ASensorType `{return ASENSOR_TYPE_GYROSCOPE;`}
-       fun is_gyroscope: Bool `{ return recv == ASENSOR_TYPE_GYROSCOPE;`}
+       fun is_gyroscope: Bool `{ return self == ASENSOR_TYPE_GYROSCOPE;`}
        new light: ASensorType `{return ASENSOR_TYPE_LIGHT;`}
-       fun is_light: Bool `{return recv == ASENSOR_TYPE_LIGHT;`}
+       fun is_light: Bool `{return self == ASENSOR_TYPE_LIGHT;`}
        new proximity: ASensorType `{return ASENSOR_TYPE_PROXIMITY;`}
-       fun is_proximity:Bool `{return recv == ASENSOR_TYPE_PROXIMITY;`}
+       fun is_proximity:Bool `{return self == ASENSOR_TYPE_PROXIMITY;`}
 end
 
 # Manages the sensors
@@ -64,23 +64,23 @@ extern class ASensorManager `{ASensorManager*`}
        # Returns the list of available sensors
        fun get_sensor_list: Pointer `{
                ASensorList *list;
-               ASensorManager_getSensorList(recv, list);
+               ASensorManager_getSensorList(self, list);
                return list;
        `}
 
        # Create a new sensor event queue and associate it with a looper
        fun create_event_queue(app: NativeAppGlue): ASensorEventQueue `{
-               return ASensorManager_createEventQueue(recv, app->looper, LOOPER_ID_USER, NULL, NULL);
+               return ASensorManager_createEventQueue(self, app->looper, LOOPER_ID_USER, NULL, NULL);
        `}
 
        # Returns the default sensor of the given type
        fun get_default_sensor(sensortype: ASensorType): ASensor `{
-               return ASensorManager_getDefaultSensor(recv, sensortype);
+               return ASensorManager_getDefaultSensor(self, sensortype);
        `}
 
        # Destroys the event queue and free all resources associated to it
        fun destroy_event_queue(queue: ASensorEventQueue) `{
-               ASensorManager_destroyEventQueue(recv, queue);
+               ASensorManager_destroyEventQueue(self, queue);
        `}
 end
 
@@ -89,29 +89,29 @@ extern class ASensorEventQueue `{ASensorEventQueue*`}
 
        # Enable the selected sensor, returns a negative value on error
        fun enable_sensor(sensor: ASensor): Int `{
-               return ASensorEventQueue_enableSensor(recv, sensor);
+               return ASensorEventQueue_enableSensor(self, sensor);
        `}
 
        # Disable the selected sensor, returns a negative value on error
        fun disable_sensor(sensor: ASensor): Int `{
-               return ASensorEventQueue_disableSensor(recv, sensor);
+               return ASensorEventQueue_disableSensor(self, sensor);
        `}
 
        # Set the delivery rate of events in microseconds for the given sensor
        fun set_event_rate(sensor: ASensor, usec: Int): Int `{
-               return ASensorEventQueue_setEventRate(recv, sensor, usec);
+               return ASensorEventQueue_setEventRate(self, sensor, usec);
        `}
        # Returns 1 if the queue has events, 0 if it does not have events,
        # and a negative value if there is an error
        fun has_events: Int `{
-               return ASensorEventQueue_hasEvents(recv);
+               return ASensorEventQueue_hasEvents(self);
        `}
 
        # Returns the next available events from the queue.
        # Returns a negative value if no events are available or an error has occured
        # otherwise the number of events returned
        fun get_events(events: ASensorEvents, count: Int): Int `{
-               return ASensorEventQueue_getEvents(recv, events, (size_t)count);
+               return ASensorEventQueue_getEvents(self, events, (size_t)count);
        `}
 end
 
@@ -119,11 +119,11 @@ end
 extern class ASensor `{ASensorRef`}
 
        new  `{return malloc(sizeof(ASensorRef));`}
-       fun name: NativeString `{return (char*)ASensor_getName(recv);`}
-       fun vendor: NativeString `{return (char*)ASensor_getVendor(recv);`}
-       fun sensor_type: ASensorType `{return ASensor_getType(recv);`}
-       fun resolution: Float `{return ASensor_getResolution(recv);`}
-       fun min_delay: Int `{return ASensor_getMinDelay(recv);`}
+       fun name: NativeString `{return (char*)ASensor_getName(self);`}
+       fun vendor: NativeString `{return (char*)ASensor_getVendor(self);`}
+       fun sensor_type: ASensorType `{return ASensor_getType(self);`}
+       fun resolution: Float `{return ASensor_getResolution(self);`}
+       fun min_delay: Int `{return ASensor_getMinDelay(self);`}
 end
 
 # NIT representation of an Android Sensor used in android_app to initialize sensors
@@ -144,77 +144,77 @@ end
 extern class ASensorEvent `{ASensorEvent*`}
                super SensorEvent
 
-       fun version: Int `{return recv->version;`}
-       fun sensor: ASensor `{return (ASensorRef)recv->sensor;`}
-       fun sensor_type: ASensorType `{return recv->type;`}
-       fun timestamp: Int `{return recv->timestamp;`}
+       fun version: Int `{return self->version;`}
+       fun sensor: ASensor `{return (ASensorRef)self->sensor;`}
+       fun sensor_type: ASensorType `{return self->type;`}
+       fun timestamp: Int `{return self->timestamp;`}
 end
 
 extern class FullSensor `{ASensorEvent*`}
                super ASensorLight
                super ASensorProximity
 
-       fun temperature: Float `{return recv->temperature;`}
-       fun pressure: Float `{return recv->pressure;`}
-       fun data: Pointer `{return recv->data;`}
-       fun vector: ASensorVector `{return &(recv->vector);`}
-       fun acceleration: ASensorVector `{return &(recv->acceleration);`}
-       fun magnetic: ASensorVector `{return &(recv->magnetic);`}
+       fun temperature: Float `{return self->temperature;`}
+       fun pressure: Float `{return self->pressure;`}
+       fun data: Pointer `{return self->data;`}
+       fun vector: ASensorVector `{return &(self->vector);`}
+       fun acceleration: ASensorVector `{return &(self->acceleration);`}
+       fun magnetic: ASensorVector `{return &(self->magnetic);`}
 end
 
 # Extern class referencing a ASensorVector, attribute of ASensorRef
 extern class ASensorVector `{ASensorVector*`}
 
-       fun v: Pointer `{return recv->v;`}
-       fun x: Float `{ return recv->x;`}
-       fun y: Float `{return recv->y;`}
-       fun z: Float `{return recv->z;`}
-       fun azimuth: Float `{return recv->azimuth;`}
-       fun pitch: Float `{return recv->pitch;`}
-       fun roll: Float `{return recv->roll;`}
-       fun status: Int `{return recv->status;`}
-       fun reserved: Pointer `{return recv->reserved;`}
+       fun v: Pointer `{return self->v;`}
+       fun x: Float `{ return self->x;`}
+       fun y: Float `{return self->y;`}
+       fun z: Float `{return self->z;`}
+       fun azimuth: Float `{return self->azimuth;`}
+       fun pitch: Float `{return self->pitch;`}
+       fun roll: Float `{return self->roll;`}
+       fun status: Int `{return self->status;`}
+       fun reserved: Pointer `{return self->reserved;`}
 end
 
 # Sensor event returned by the Accelerometer sensor
 extern class ASensorAccelerometer `{ASensorEvent*`}
        super ASensorEvent
 
-       fun x: Float `{return recv->acceleration.x;`}
-       fun y: Float `{return recv->acceleration.y;`}
-       fun z: Float `{return recv->acceleration.z;`}
+       fun x: Float `{return self->acceleration.x;`}
+       fun y: Float `{return self->acceleration.y;`}
+       fun z: Float `{return self->acceleration.z;`}
 end
 
 # Sensor event returned by the Magnetic Field sensor
 extern class ASensorMagneticField `{ASensorEvent*`}
        super ASensorEvent
 
-       fun x: Float `{return recv->magnetic.x;`}
-       fun y: Float `{return recv->magnetic.y;`}
-       fun z: Float `{ return recv->magnetic.z;`}
+       fun x: Float `{return self->magnetic.x;`}
+       fun y: Float `{return self->magnetic.y;`}
+       fun z: Float `{ return self->magnetic.z;`}
 end
 
 # Sensor event returned by the gyroscope sensor
 extern class ASensorGyroscope `{ASensorEvent*`}
        super ASensorEvent
 
-       fun x: Float `{return recv->vector.x;`}
-       fun y: Float `{return recv->vector.y;`}
-       fun z: Float `{return recv->vector.y;`}
+       fun x: Float `{return self->vector.x;`}
+       fun y: Float `{return self->vector.y;`}
+       fun z: Float `{return self->vector.y;`}
 end
 
 # Sensor event returned by the Light sensor
 extern class ASensorLight `{ASensorEvent*`}
        super ASensorEvent
 
-       fun light: Float `{return recv->light;`}
+       fun light: Float `{return self->light;`}
 end
 
 # sensor event returned by the Proximity Sensor
 extern class ASensorProximity `{ASensorEvent*`}
        super ASensorEvent
 
-       fun distance: Float `{return recv->distance;`}
+       fun distance: Float `{return self->distance;`}
 end
 
 # Array of SensorEvents
@@ -223,7 +223,7 @@ extern class ASensorEvents `{ASensorEvent*`}
        new (length: Int) `{return malloc(sizeof(ASensorEvent)*length);`}
 
        fun [](index: Int): ASensorEvent `{
-               return recv+index;
+               return self+index;
        `}
 end
 
@@ -341,26 +341,26 @@ redef class App
                        //maybe add a boolean to the app to know if we want to use Sensor API or ASensorEvent directly ...
                        ASensorEvent* events = malloc(sizeof(ASensorEvent)*10);
                        int nbevents;
-                       ASensorEventQueue* queue = App_eventqueue(recv);
+                       ASensorEventQueue* queue = App_eventqueue(self);
                        while((nbevents = ASensorEventQueue_getEvents(queue, events, 10)) > 0) {
                                int i;
                                for(i = 0; i < nbevents; i++){
                                        ASensorEvent event = events[i];
                                        switch (event.type) {
                                                case ASENSOR_TYPE_ACCELEROMETER:
-                                                       App_extern_input_sensor_accelerometer(recv, &event);
+                                                       App_extern_input_sensor_accelerometer(self, &event);
                                                        break;
                                                case ASENSOR_TYPE_MAGNETIC_FIELD:
-                                                       App_extern_input_sensor_magnetic_field(recv, &event);
+                                                       App_extern_input_sensor_magnetic_field(self, &event);
                                                        break;
                                                case ASENSOR_TYPE_GYROSCOPE:
-                                                       App_extern_input_sensor_gyroscope(recv, &event);
+                                                       App_extern_input_sensor_gyroscope(self, &event);
                                                        break;
                                                case ASENSOR_TYPE_LIGHT:
-                                                       App_extern_input_sensor_light(recv, &event);
+                                                       App_extern_input_sensor_light(self, &event);
                                                        break;
                                                case ASENSOR_TYPE_PROXIMITY:
-                                                       App_extern_input_sensor_proximity(recv, &event);
+                                                       App_extern_input_sensor_proximity(self, &event);
                                                        break;
                                        }
                                }
index 84d213d..ca3a2b9 100644 (file)
@@ -33,38 +33,38 @@ in "Java" `{
 
 extern class NativeSharedPreferences in "Java" `{ android.content.SharedPreferences `}
        super JavaObject
-       
-       fun contains(key: JavaString): Bool in "Java" `{ return recv.contains(key); `}
+
+       fun contains(key: JavaString): Bool in "Java" `{ return self.contains(key); `}
        fun get_all: HashMap[JavaString, JavaObject] import HashMap[JavaString, JavaObject],
-               HashMap[JavaString, JavaObject].[]= in "Java" `{ 
+               HashMap[JavaString, JavaObject].[]= in "Java" `{
                Map<String, ?> java_map = null;
                int nit_hashmap = new_HashMap_of_JavaString_JavaObject();
                try {
-                       java_map = recv.getAll();
+                       java_map = self.getAll();
                } catch (NullPointerException e) {
                        return nit_hashmap;
                }
 
                for (Map.Entry<String, ?> entry: java_map.entrySet())
-                       HashMap_of_JavaString_JavaObject__index_assign(nit_hashmap, 
+                       HashMap_of_JavaString_JavaObject__index_assign(nit_hashmap,
                                entry.getKey(), entry.getValue());
 
                return nit_hashmap;
        `}
-       fun get_boolean(key: JavaString, def_value: Bool): Bool in "Java" `{ 
+       fun get_boolean(key: JavaString, def_value: Bool): Bool in "Java" `{
                boolean return_value;
                try {
-                       return_value = recv.getBoolean(key, def_value); 
+                       return_value = self.getBoolean(key, def_value);
                } catch (ClassCastException e) {
                        return def_value;
                }
 
                return return_value;
        `}
-       fun get_float(key: JavaString, def_value: Float): Float in "Java" `{ 
+       fun get_float(key: JavaString, def_value: Float): Float in "Java" `{
                float return_value;
                try {
-                       return_value = recv.getFloat(key, (float) def_value); 
+                       return_value = self.getFloat(key, (float) def_value);
                } catch (ClassCastException e) {
                        return def_value;
                }
@@ -74,7 +74,7 @@ extern class NativeSharedPreferences in "Java" `{ android.content.SharedPreferen
        fun get_int(key: JavaString, def_value: Int): Int in "Java" `{
                int return_value;
                try {
-                       return_value = recv.getInt(key, (int)def_value); 
+                       return_value = self.getInt(key, (int)def_value);
                } catch (ClassCastException e) {
                        return def_value;
                }
@@ -84,7 +84,7 @@ extern class NativeSharedPreferences in "Java" `{ android.content.SharedPreferen
        fun get_long(key: JavaString, def_value: Int): Int in "Java" `{
                long return_value;
                try {
-                       return_value = recv.getLong(key, def_value); 
+                       return_value = self.getLong(key, def_value);
                } catch (ClassCastException e) {
                        return def_value;
                }
@@ -94,7 +94,7 @@ extern class NativeSharedPreferences in "Java" `{ android.content.SharedPreferen
        fun get_string(key: JavaString, def_value: JavaString): JavaString in "Java" `{
                String return_value = null;
                try {
-                       return_value = recv.getString(key, def_value); 
+                       return_value = self.getString(key, def_value);
                } catch (ClassCastException e) {
                        return def_value;
                }
@@ -104,41 +104,41 @@ extern class NativeSharedPreferences in "Java" `{ android.content.SharedPreferen
 
        # HACK for bug #845
        redef fun new_global_ref import sys, Sys.jni_env `{
-               Sys sys = NativeSharedPreferences_sys(recv);
+               Sys sys = NativeSharedPreferences_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 end
 
 extern class NativeSharedPreferencesEditor in "Java" `{ android.content.SharedPreferences$Editor `}
        super JavaObject
 
-       fun clear: NativeSharedPreferencesEditor in "Java" `{ return recv.clear(); `}
-       fun commit: Bool in "Java" `{ return recv.commit(); `}
-       fun put_boolean(key: JavaString, value: Bool ): NativeSharedPreferencesEditor in "Java" `{ 
-               return recv.putBoolean (key, value); 
+       fun clear: NativeSharedPreferencesEditor in "Java" `{ return self.clear(); `}
+       fun commit: Bool in "Java" `{ return self.commit(); `}
+       fun put_boolean(key: JavaString, value: Bool): NativeSharedPreferencesEditor in "Java" `{
+               return self.putBoolean (key, value);
        `}
        fun put_float(key: JavaString, value: Float): NativeSharedPreferencesEditor in "Java" `{
-               return recv.putFloat(key, (float) value); 
+               return self.putFloat(key, (float) value);
        `}
        fun put_int(key: JavaString, value: Int): NativeSharedPreferencesEditor in "Java" `{
-               return recv.putInt(key, (int)value); 
+               return self.putInt(key, (int)value);
        `}
        fun put_long(key: JavaString, value: Int): NativeSharedPreferencesEditor in "Java" `{
-               return recv.putLong(key, value); 
+               return self.putLong(key, value);
        `}
        fun put_string(key: JavaString, value: JavaString): NativeSharedPreferencesEditor in "Java" `{
-               return recv.putString(key, value); 
+               return self.putString(key, value);
        `}
-       fun remove(key: JavaString): NativeSharedPreferencesEditor in "Java" `{ 
-               return recv.remove(key); 
+       fun remove(key: JavaString): NativeSharedPreferencesEditor in "Java" `{
+               return self.remove(key);
        `}
 
        # HACK for bug #845
        redef fun new_global_ref import sys, Sys.jni_env `{
-               Sys sys = NativeSharedPreferencesEditor_sys(recv);
+               Sys sys = NativeSharedPreferencesEditor_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 end
 
@@ -150,8 +150,8 @@ class SharedPreferences
 
        # Automatically commits every saving/removing instructions (`true` by default)
        var auto_commit = true
-       
-       protected init(app: App, file_name: String, mode: Int) 
+
+       protected init(app: App, file_name: String, mode: Int)
        do
                self.context = app.native_activity
                sys.jni_env.push_local_frame(1)
@@ -160,7 +160,7 @@ class SharedPreferences
        end
 
        # Restricts file access to the current application
-       init privately(app: App, file_name: String) 
+       init privately(app: App, file_name: String)
        do
                self.init(app, file_name, private_mode)
        end
@@ -175,28 +175,28 @@ class SharedPreferences
        end
 
        private fun setup(file_name: JavaString, mode: Int) import context, set_vars in "Java" `{
-               Activity context = (Activity) SharedPreferences_context(recv);
+               Activity context = (Activity) SharedPreferences_context(self);
                SharedPreferences sp;
 
                // Uses default SharedPreferences if file_name is an empty String
                if (file_name.equals("")) {
                        sp = context.getPreferences((int)mode);
-               } else { 
+               } else {
                        sp = context.getSharedPreferences(file_name, (int)mode);
                }
 
                SharedPreferences.Editor editor = sp.edit();
-               
-               SharedPreferences_set_vars(recv, sp, editor);
+
+               SharedPreferences_set_vars(self, sp, editor);
        `}
 
        private fun commit_if_auto do if auto_commit then self.commit
 
        # Returns true if there's an entry corresponding the given key
-       fun has(key: String): Bool 
+       fun has(key: String): Bool
        do
                sys.jni_env.push_local_frame(2)
-               var return_value = shared_preferences.contains(key.to_java_string) 
+               var return_value = shared_preferences.contains(key.to_java_string)
                sys.jni_env.pop_local_frame
                return return_value
        end
@@ -209,13 +209,13 @@ class SharedPreferences
        # var foo = new HashMap[JavaString, JavaObject]
        # # ...
        # for key, value in foo do
-       #      key.delete_local_ref
-       #      value.delete_local_ref
+       #         key.delete_local_ref
+       #         value.delete_local_ref
        # end
        # ~~~
-       # *You should use Nit getters instead and get each value one by one* 
+       # *You should use Nit getters instead and get each value one by one*
        fun all: nullable HashMap[JavaString, JavaObject]
-       do 
+       do
                var hashmap = shared_preferences.get_all
                if hashmap.is_empty then return null
                return hashmap
@@ -223,8 +223,8 @@ class SharedPreferences
 
        # Returns the `Bool` value corresponding the given key or `def_value` if none
        # or if the value isn't of correct type
-       fun bool(key: String, def_value: Bool): Bool 
-       do 
+       fun bool(key: String, def_value: Bool): Bool
+       do
                sys.jni_env.push_local_frame(2)
                var return_value = shared_preferences.get_boolean(key.to_java_string, def_value)
                sys.jni_env.pop_local_frame
@@ -233,8 +233,8 @@ class SharedPreferences
 
        # Returns the `Float` value corresponding the given key or `def_value` if none
        # or if the value isn't of correct type
-       fun float(key: String, def_value: Float): Float 
-       do 
+       fun float(key: String, def_value: Float): Float
+       do
                sys.jni_env.push_local_frame(2)
                var return_value = shared_preferences.get_float(key.to_java_string, def_value)
                sys.jni_env.pop_local_frame
@@ -243,10 +243,10 @@ class SharedPreferences
 
        # Returns the `Int` value corresponding the given key or `def_value` if none
        # or if the value isn't of correct type
-       # Be aware of possible `def_value` integer overflow as the Nit `Int` corresponds 
+       # Be aware of possible `def_value` integer overflow as the Nit `Int` corresponds
        # to Java `long`
-       fun int(key: String, def_value: Int): Int 
-       do 
+       fun int(key: String, def_value: Int): Int
+       do
                sys.jni_env.push_local_frame(2)
                var return_value = shared_preferences.get_int(key.to_java_string, def_value)
                sys.jni_env.pop_local_frame
@@ -257,8 +257,8 @@ class SharedPreferences
        # or if the value isn't of correct type
        # Calls `getLong(key, value)` java method
        # Nit `Int` is equivalent to Java `long` so that no integer overflow will occur
-       fun long(key: String, def_value: Int): Int 
-       do 
+       fun long(key: String, def_value: Int): Int
+       do
                sys.jni_env.push_local_frame(2)
                var return_value = shared_preferences.get_long(key.to_java_string, def_value)
                sys.jni_env.pop_local_frame
@@ -267,29 +267,29 @@ class SharedPreferences
 
        # Returns the `String` value corresponding the given key or `def_value` if none
        # or if the value isn't of correct type
-       fun string(key: String, def_value: String): String 
-       do 
+       fun string(key: String, def_value: String): String
+       do
                sys.jni_env.push_local_frame(3)
-               var java_return_value = shared_preferences.get_string(key.to_java_string, 
+               var java_return_value = shared_preferences.get_string(key.to_java_string,
                        def_value.to_java_string)
                var nit_return_value = java_return_value.to_s
                sys.jni_env.pop_local_frame
                return nit_return_value
        end
 
-       # Clears all the dictionnary entries in the specified file or the default file 
+       # Clears all the dictionnary entries in the specified file or the default file
        # if none specified at instanciation
        # Returns `self` allowing fluent programming
-       fun clear: SharedPreferences 
-       do 
+       fun clear: SharedPreferences
+       do
                editor.clear
                commit_if_auto
                return self
        end
-       
+
        # If auto_commit is `false`, has to be called to save the data to persistant memory
-       fun commit: Bool 
-       do 
+       fun commit: Bool
+       do
                sys.jni_env.push_local_frame(1)
                var return_value = editor.commit
                sys.jni_env.pop_local_frame
@@ -298,8 +298,8 @@ class SharedPreferences
 
        # Set a key-value pair using a `Bool` value
        # Returns `self` allowing fluent programming
-       fun add_bool(key: String, value: Bool ): SharedPreferences 
-       do 
+       fun add_bool(key: String, value: Bool): SharedPreferences
+       do
                sys.jni_env.push_local_frame(1)
                editor.put_boolean(key.to_java_string, value)
                sys.jni_env.pop_local_frame
@@ -312,8 +312,8 @@ class SharedPreferences
        #
        # Be aware of possible loss of precision as Nit `Float` corresponds to Java `double`
        # and the methods stores a Java `float`
-       fun add_float(key: String, value: Float): SharedPreferences 
-       do 
+       fun add_float(key: String, value: Float): SharedPreferences
+       do
                sys.jni_env.push_local_frame(1)
                editor.put_float(key.to_java_string, value)
                sys.jni_env.pop_local_frame
@@ -327,8 +327,8 @@ class SharedPreferences
        # Be aware of possible integer overflow as the Nit `Int` corresponds to Java `long`
        # and the methods stores a Java `int`
        # *You might want to use add_long instead*
-       fun add_int(key: String, value: Int): SharedPreferences 
-       do 
+       fun add_int(key: String, value: Int): SharedPreferences
+       do
                sys.jni_env.push_local_frame(1)
                editor.put_int(key.to_java_string, value)
                sys.jni_env.pop_local_frame
@@ -338,8 +338,8 @@ class SharedPreferences
 
        # Set a key-value pair using a `Int` type value
        # Returns `self` allowing fluent programming
-       fun add_long(key: String, value: Int): SharedPreferences 
-       do 
+       fun add_long(key: String, value: Int): SharedPreferences
+       do
                sys.jni_env.push_local_frame(1)
                editor.put_long(key.to_java_string, value)
                sys.jni_env.pop_local_frame
@@ -349,8 +349,8 @@ class SharedPreferences
 
        # Set a key-value pair using a `String` type value
        # Returns `self` allowing fluent programming
-       fun add_string(key: String, value: String): SharedPreferences 
-       do 
+       fun add_string(key: String, value: String): SharedPreferences
+       do
                sys.jni_env.push_local_frame(2)
                editor.put_string(key.to_java_string, value.to_java_string)
                sys.jni_env.pop_local_frame
@@ -360,8 +360,8 @@ class SharedPreferences
 
        # Removes the corresponding entry in the file
        # Returns `self` allowing fluent programming
-       fun remove(key: String): SharedPreferences 
-       do 
+       fun remove(key: String): SharedPreferences
+       do
                sys.jni_env.push_local_frame(1)
                editor.remove(key.to_java_string)
                sys.jni_env.pop_local_frame
@@ -370,7 +370,7 @@ class SharedPreferences
        end
 
        # Deallocate global references allocated by the SharedPreferences instance
-       fun destroy 
+       fun destroy
        do
                self.shared_preferences.delete_global_ref
                self.editor.delete_global_ref
@@ -390,7 +390,7 @@ class SharedPreferences
        # Retrieve an `Object` stored via `[]=` function
        #
        # Returns `null` if there's no serialized object corresponding to the given key
-       # Make sure that the serialized object is `auto_serializable` or that it redefines
+       # Make sure that the serialized object is `serialize` or that it redefines
        # the appropriate methods. Refer to `Serializable` documentation for further details
        fun [](key: String): nullable Object
        do
index 48d600a..85623d8 100644 (file)
@@ -19,19 +19,19 @@ module shared_preferences_api11 is android_api_min 11
 
 import shared_preferences
 
-in "Java" `{ 
+in "Java" `{
        import java.util.HashSet;
-       import java.util.Set;
-       import android.content.Context; 
+       import java.util.Set;
+       import android.content.Context;
 `}
 
 redef extern class NativeSharedPreferences
-       
+
        # Default value to null instead of Set<String>
-       fun get_string_set(key: JavaString): HashSet[JavaString] import HashSet[JavaString], 
-               HashSet[JavaString].add in "Java" `{ 
+       fun get_string_set(key: JavaString): HashSet[JavaString] import HashSet[JavaString],
+               HashSet[JavaString].add in "Java" `{
                Set<String> def_value = new HashSet<String>();
-               Set<String> java_set = recv.getStringSet(key, def_value);
+               Set<String> java_set = self.getStringSet(key, def_value);
                int nit_hashset = new_HashSet_of_JavaString();
 
                for (String element: java_set)
@@ -41,23 +41,23 @@ redef extern class NativeSharedPreferences
        `}
 end
 
-redef extern class NativeSharedPreferencesEditor 
-       
-       fun put_string_set(key: JavaString, value: HashSet[JavaString]): NativeSharedPreferencesEditor 
-               import HashSet[JavaString], HashSet[JavaString].iterator, Iterator[JavaString].is_ok, 
-               Iterator[JavaString].item, Iterator[JavaString].next in "Java" `{ 
+redef extern class NativeSharedPreferencesEditor
+
+       fun put_string_set(key: JavaString, value: HashSet[JavaString]): NativeSharedPreferencesEditor
+               import HashSet[JavaString], HashSet[JavaString].iterator, Iterator[JavaString].is_ok,
+               Iterator[JavaString].item, Iterator[JavaString].next in "Java" `{
                Set<String> java_set = new HashSet<String>();
                int itr = HashSet_of_JavaString_iterator(value);
-               
+
                while (Iterator_of_JavaString_is_ok(itr)) {
                        java_set.add(Iterator_of_JavaString_item(itr));
                        Iterator_of_JavaString_next(itr);
                }
 
-               return recv.putStringSet(key, java_set); 
+               return self.putStringSet(key, java_set);
        `}
 end
-       
+
 redef class SharedPreferences
 
        # Allows multiple processes to write into the same `SharedPreferences` file
@@ -78,8 +78,8 @@ redef class SharedPreferences
        # # ...
        # for element in a_hash_set do element.delete_local_ref
        # ~~~
-       fun string_set(key: String): HashSet[JavaString] 
-       do 
+       fun string_set(key: String): HashSet[JavaString]
+       do
                sys.jni_env.push_local_frame(3)
                var return_value = shared_preferences.get_string_set(key.to_java_string)
                sys.jni_env.pop_local_frame
@@ -97,7 +97,7 @@ redef class SharedPreferences
        # for element in foo do element.delete_local_ref
        # ~~~
        fun add_string_set(key: String, value: HashSet[JavaString]): SharedPreferences
-       do 
+       do
                editor.put_string_set(key.to_java_string, value)
                return self
        end
index 954a380..21c2cf9 100644 (file)
@@ -34,7 +34,7 @@ redef class App
 
        private fun native_toast(message: JavaString, is_long: Bool)
        import native_activity in "Java" `{
-               final android.app.Activity context = App_native_activity(recv);
+               final android.app.Activity context = App_native_activity(self);
                final CharSequence final_message = message;
                final int duration = is_long? Toast.LENGTH_LONG: Toast.LENGTH_SHORT;
 
index 79b75a5..9450ab2 100644 (file)
@@ -42,12 +42,12 @@ redef extern class NativeActivity
        # Set the main layout of this activity
        fun content_view=(layout: NativeViewGroup) in "Java" `{
                final ViewGroup final_layout = layout;
-               final Activity final_recv = recv;
+               final Activity final_self = self;
 
-               recv.runOnUiThread(new Runnable() {
+               self.runOnUiThread(new Runnable() {
                        @Override
                        public void run()  {
-                               final_recv.setContentView(final_layout);
+                               final_self.setContentView(final_layout);
 
                                final_layout.requestFocus();
                        }
@@ -59,18 +59,18 @@ end
 extern class NativeView in "Java" `{ android.view.View `}
        super JavaObject
 
-       fun minimum_width=(val: Int) in "Java" `{ recv.setMinimumWidth((int)val); `}
-       fun minimum_height=(val: Int) in "Java" `{ recv.setMinimumHeight((int)val); `}
+       fun minimum_width=(val: Int) in "Java" `{ self.setMinimumWidth((int)val); `}
+       fun minimum_height=(val: Int) in "Java" `{ self.setMinimumHeight((int)val); `}
 
-       fun enabled: Bool in "Java" `{ return recv.isEnabled(); `}
+       fun enabled: Bool in "Java" `{ return self.isEnabled(); `}
        fun enabled=(value: Bool) in "Java" `{
-               final View final_recv = recv;
+               final View final_self = self;
                final boolean final_value = value;
 
-               ((Activity)recv.getContext()).runOnUiThread(new Runnable() {
+               ((Activity)self.getContext()).runOnUiThread(new Runnable() {
                        @Override
                        public void run()  {
-                               final_recv.setEnabled(final_value);
+                               final_self.setEnabled(final_value);
                        }
                });
        `}
@@ -80,11 +80,11 @@ end
 extern class NativeViewGroup in "Java" `{ android.view.ViewGroup `}
        super NativeView
 
-       fun add_view(view: NativeView) in "Java" `{ recv.addView(view); `}
+       fun add_view(view: NativeView) in "Java" `{ self.addView(view); `}
 
        fun add_view_with_weight(view: NativeView, weight: Float)
        in "Java" `{
-               recv.addView(view, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT, (float)weight));
+               self.addView(view, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT, (float)weight));
        `}
 end
 
@@ -94,15 +94,15 @@ extern class NativeLinearLayout in "Java" `{ android.widget.LinearLayout `}
 
        new(context: NativeActivity) in "Java" `{ return new LinearLayout(context); `}
 
-       fun set_vertical in "Java" `{ recv.setOrientation(LinearLayout.VERTICAL); `}
-       fun set_horizontal in "Java" `{ recv.setOrientation(LinearLayout.HORIZONTAL); `}
+       fun set_vertical in "Java" `{ self.setOrientation(LinearLayout.VERTICAL); `}
+       fun set_horizontal in "Java" `{ self.setOrientation(LinearLayout.HORIZONTAL); `}
 
        redef fun add_view(view) in "Java"
        `{
                MarginLayoutParams params = new MarginLayoutParams(
                        LinearLayout.LayoutParams.MATCH_PARENT,
                        LinearLayout.LayoutParams.WRAP_CONTENT);
-               recv.addView(view, params);
+               self.addView(view, params);
        `}
 end
 
@@ -112,25 +112,25 @@ extern class NativeGridLayout in "Java" `{ android.widget.GridLayout `}
 
        new(context: NativeActivity) in "Java" `{ return new android.widget.GridLayout(context); `}
 
-       fun row_count=(val: Int) in "Java" `{ recv.setRowCount((int)val); `}
+       fun row_count=(val: Int) in "Java" `{ self.setRowCount((int)val); `}
 
-       fun column_count=(val: Int) in "Java" `{ recv.setColumnCount((int)val); `}
+       fun column_count=(val: Int) in "Java" `{ self.setColumnCount((int)val); `}
 
-       redef fun add_view(view) in "Java" `{ recv.addView(view); `}
+       redef fun add_view(view) in "Java" `{ self.addView(view); `}
 end
 
 extern class NativePopupWindow in "Java" `{ android.widget.PopupWindow `}
        super NativeView
 
        new (context: NativeActivity) in "Java" `{
-               PopupWindow recv = new PopupWindow(context);
-               recv.setWindowLayoutMode(LinearLayout.LayoutParams.MATCH_PARENT,
+               PopupWindow self = new PopupWindow(context);
+               self.setWindowLayoutMode(LinearLayout.LayoutParams.MATCH_PARENT,
                        LinearLayout.LayoutParams.MATCH_PARENT);
-               recv.setClippingEnabled(false);
-               return recv;
+               self.setClippingEnabled(false);
+               return self;
        `}
 
-       fun content_view=(layout: NativeViewGroup) in "Java" `{ recv.setContentView(layout); `}
+       fun content_view=(layout: NativeViewGroup) in "Java" `{ self.setContentView(layout); `}
 end
 
 extern class NativeTextView in "Java" `{ android.widget.TextView `}
@@ -138,30 +138,30 @@ extern class NativeTextView in "Java" `{ android.widget.TextView `}
 
        new (context: NativeActivity) in "Java" `{ return new TextView(context); `}
 
-       fun text: JavaString in "Java" `{ return recv.getText().toString(); `}
+       fun text: JavaString in "Java" `{ return self.getText().toString(); `}
 
        fun text=(value: JavaString) in "Java" `{
 
-               final TextView final_recv = recv;
+               final TextView final_self = self;
                final String final_value = value;
 
-               ((Activity)recv.getContext()).runOnUiThread(new Runnable() {
+               ((Activity)self.getContext()).runOnUiThread(new Runnable() {
                        @Override
                        public void run()  {
-                               final_recv.setText(final_value);
+                               final_self.setText(final_value);
                        }
                });
        `}
 
        fun gravity_center in "Java" `{
-               recv.setGravity(Gravity.CENTER);
+               self.setGravity(Gravity.CENTER);
        `}
 
        fun text_size: Float in "Java" `{
-               return recv.getTextSize();
+               return self.getTextSize();
        `}
        fun text_size=(dpi: Float) in "Java" `{
-               recv.setTextSize(android.util.TypedValue.COMPLEX_UNIT_DIP, (float)dpi);
+               self.setTextSize(android.util.TypedValue.COMPLEX_UNIT_DIP, (float)dpi);
        `}
 end
 
@@ -172,14 +172,14 @@ extern class NativeEditText in "Java" `{ android.widget.EditText `}
 
        new (context: NativeActivity) in "Java" `{ return new android.widget.EditText(context); `}
 
-       fun width=(val: Int) in "Java" `{ recv.setWidth((int)val); `}
+       fun width=(val: Int) in "Java" `{ self.setWidth((int)val); `}
 
-       fun input_type_text in "Java" `{ recv.setInputType(android.text.InputType.TYPE_CLASS_TEXT); `}
+       fun input_type_text in "Java" `{ self.setInputType(android.text.InputType.TYPE_CLASS_TEXT); `}
 
        redef fun new_global_ref: SELF import sys, Sys.jni_env `{
-               Sys sys = NativeEditText_sys(recv);
+               Sys sys = NativeEditText_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 end
 
@@ -189,8 +189,8 @@ extern class NativeButton in "Java" `{ android.widget.Button `}
        redef type SELF: NativeButton
 
        redef fun new_global_ref: SELF import sys, Sys.jni_env `{
-               Sys sys = NativeButton_sys(recv);
+               Sys sys = NativeButton_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 end
index 430e047..99ff7ad 100644 (file)
@@ -28,21 +28,21 @@ extern class Vibrator in "Java" `{ android.os.Vibrator `}
        super JavaObject
 
        # Vibrate for `n` miliseconds
-       fun vibrate(n: Int) in "Java" `{ recv.vibrate(n); `}
+       fun vibrate(n: Int) in "Java" `{ self.vibrate(n); `}
 
        # Does this devices has a vibrator
        #
        # TODO activate in API 11
-       #fun exists: Bool in "Java" `{ return recv.hasVibrator(); `}
+       #fun exists: Bool in "Java" `{ return self.hasVibrator(); `}
 
        # Turn off the vibration
-       fun cancel in "Java" `{ recv.cancel(); `}
+       fun cancel in "Java" `{ self.cancel(); `}
 
        # HACK for bug #845
        redef fun new_global_ref import sys, Sys.jni_env `{
-               Sys sys = Vibrator_sys(recv);
+               Sys sys = Vibrator_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 end
 
index aac7352..99fd4a4 100644 (file)
@@ -57,39 +57,39 @@ extern class RPiPin `{ RPiGPIOPin `}
        new p1_26 `{ return RPI_GPIO_P1_26; `}
 
        # Select mode: input, output or alts
-       fun fsel=(mode: FunctionSelect) `{ bcm2835_gpio_fsel(recv, mode); `}
+       fun fsel=(mode: FunctionSelect) `{ bcm2835_gpio_fsel(self, mode); `}
 
        # Set output
-       redef fun write(high) `{ bcm2835_gpio_write(recv, high? HIGH: LOW); `}
+       redef fun write(high) `{ bcm2835_gpio_write(self, high? HIGH: LOW); `}
 
        # Set pull up mode
-       fun pud=(pud: PUDControl) `{ bcm2835_gpio_set_pud(recv, pud); `}
+       fun pud=(pud: PUDControl) `{ bcm2835_gpio_set_pud(self, pud); `}
 
        # Falling edge detect
        # Do not use on raspbian, it is bugged!
-       fun fen `{ bcm2835_gpio_fen(recv); `}
-       fun clr_fen `{ bcm2835_gpio_clr_fen(recv); `}
+       fun fen `{ bcm2835_gpio_fen(self); `}
+       fun clr_fen `{ bcm2835_gpio_clr_fen(self); `}
 
        # Raising edge detect
        # Do not use on raspbian, it is bugged!
-       fun ren `{ bcm2835_gpio_ren(recv); `}
-       fun clr_ren `{ bcm2835_gpio_clr_ren(recv); `}
+       fun ren `{ bcm2835_gpio_ren(self); `}
+       fun clr_ren `{ bcm2835_gpio_clr_ren(self); `}
 
        # High edge detect
        # Do not use on raspbian, it is bugged!
-       fun hen `{ bcm2835_gpio_hen(recv); `}
-       fun clr_hen `{ bcm2835_gpio_clr_hen(recv); `}
+       fun hen `{ bcm2835_gpio_hen(self); `}
+       fun clr_hen `{ bcm2835_gpio_clr_hen(self); `}
 
        # Low edge detect
        # Do not use on raspbian, it is bugged!
-       fun len `{ bcm2835_gpio_len(recv); `}
-       fun clr_len `{ bcm2835_gpio_clr_len(recv); `}
+       fun len `{ bcm2835_gpio_len(self); `}
+       fun clr_len `{ bcm2835_gpio_clr_len(self); `}
 
-       fun set_eds `{ bcm2835_gpio_set_eds(recv); `}
-       fun eds: Bool `{ return bcm2835_gpio_eds(recv); `}
+       fun set_eds `{ bcm2835_gpio_set_eds(self); `}
+       fun eds: Bool `{ return bcm2835_gpio_eds(self); `}
 
        # Return input on pin, true for high and false for low
-       fun lev: Bool `{ return bcm2835_gpio_lev(recv); `}
+       fun lev: Bool `{ return bcm2835_gpio_lev(self); `}
 end
 
 extern class FunctionSelect `{ bcm2835FunctionSelect `}
@@ -115,8 +115,8 @@ extern class PUDControl `{ bcm2835PUDControl `}
 end
 
 redef universal Int
-       fun bcm2835_delay `{ bcm2835_delay(recv); `}
-       fun bcm2835_delay_micros `{ bcm2835_delayMicroseconds(recv); `}
+       fun bcm2835_delay `{ bcm2835_delay(self); `}
+       fun bcm2835_delay_micros `{ bcm2835_delayMicroseconds(self); `}
 end
 
 class RotaryEncoder
index 0084227..f4be1eb 100644 (file)
@@ -45,10 +45,13 @@ in "C" `{
        #include <endian.h>
 
        // Android compatibility
+       #ifndef be32toh
+               #define be32toh(val) betoh32(val)
+               #define le32toh(val) letoh32(val)
+       #endif
+
        #ifndef be64toh
                #define be64toh(val) betoh64(val)
-       #endif
-       #ifndef le64toh
                #define le64toh(val) letoh64(val)
        #endif
 `}
@@ -86,6 +89,28 @@ redef abstract class Writer
                write_byte int
        end
 
+       # Write `text` as a null terminated string
+       #
+       # To be used with `Reader::read_string`.
+       #
+       # Require: `text` has no null bytes.
+       fun write_string(text: Text)
+       do
+               write text
+               write_byte 0x00
+       end
+
+       # Write the length as a 64 bits integer, then the content of `text`
+       #
+       # To be used with `Reader::read_block`.
+       #
+       # Compared to `write_string`, this method supports null bytes in `text`.
+       fun write_block(text: Text)
+       do
+               write_int64 text.length
+               write text
+       end
+
        # Write a floating point `value` on 32 bits
        #
        # Using this format may result in a loss of precision as it uses less bits
@@ -126,11 +151,15 @@ redef abstract class Reader
        super BinaryStream
 
        # 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
 
        # Get an `Array` of 8 `Bool` by reading a single byte
        #
        # To be used with `BinaryWriter::write_bits`.
+       #
+       # Returns an array of `false` when an error is pending (`last_error != null`).
        fun read_bits: Array[Bool]
        do
                var int = read_byte
@@ -138,10 +167,39 @@ redef abstract class Reader
                return [for b in 8.times do int.bin_and(2**b) > 0]
        end
 
+       # Read a null terminated string
+       #
+       # To be used with `Writer::write_string`.
+       #
+       # Returns a truncated string when an error is pending (`last_error != null`).
+       fun read_string: String
+       do
+               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
+               end
+       end
+
+       # Read the length as a 64 bits integer, then the content of the block
+       #
+       # To be used with `Writer::write_block`.
+       #
+       # Returns a truncated string when an error is pending (`last_error != null`).
+       fun read_block: String
+       do
+               var length = read_int64
+               if length == 0 then return ""
+               return read(length)
+       end
+
        # Read a floating point on 32 bits and return it as a `Float`
        #
        # Using this format may result in a loss of precision as it uses less bits
        # than Nit `Float`.
+       #
+       # Returns `0.0` when an error is pending (`last_error != null`).
        fun read_float: Float
        do
                if last_error != null then return 0.0
@@ -178,6 +236,8 @@ redef abstract class Reader
        `}
 
        # Read a floating point on 64 bits and return it as a `Float`
+       #
+       # Returns `0.0` when an error is pending (`last_error != null`).
        fun read_double: Float
        do
                if last_error != null then return 0.0
@@ -226,6 +286,8 @@ redef abstract class Reader
        #
        # Using this format may result in a loss of precision as the length of a
        # Nit `Int` may be less than 64 bits on some platforms.
+       #
+       # Returns `0` when an error is pending (`last_error != null`).
        fun read_int64: Int
        do
                if last_error != null then return 0
@@ -280,7 +342,7 @@ redef class Int
                        uint64_t conv;
                } u;
 
-               u.val = recv;
+               u.val = self;
 
                if (big_endian)
                        u.conv = htobe64(u.conv);
@@ -299,7 +361,7 @@ redef class Float
                        uint32_t conv;
                } u;
 
-               u.val = recv;
+               u.val = self;
 
                if (big_endian)
                        u.conv = htobe32(u.conv);
@@ -316,7 +378,7 @@ redef class Float
                        uint64_t conv;
                } u;
 
-               u.val = recv;
+               u.val = self;
 
                if (big_endian)
                        u.conv = htobe64(u.conv);
index 0343b8e..9be1bc2 100644 (file)
@@ -123,14 +123,20 @@ class Bitmap
 
                # =============== Bitmap header ================
                for x in [0..13] do
-                       bitmap_header[x] = fileReader.read(1)[0].ascii
+                       var b = fileReader.read_byte
+                       if b == null then
+                               return
+                       end
+                       bitmap_header[x] = b
                end
                self.file_size = get_value(bitmap_header.subarray(2, 4))
                self.data_offset = get_value(bitmap_header.subarray(10, 4))
 
                # =============== DIB header ================
                for x in [0..39] do
-                       dib_header[x] = fileReader.read(1)[0].ascii
+                       var b = fileReader.read_byte
+                       if b == null then return
+                       dib_header[x] = b
                end
                var dib_size = get_value(dib_header.subarray(0, 4))
                # only support BITMAPINFOHEADER
@@ -159,9 +165,11 @@ class Bitmap
                                var row = new Array[Int].with_capacity(self.width)
                                for y in [0..self.width[
                                do
-                                       var red = fileReader.read(1)[0].ascii * 256 * 256
-                                       var green = fileReader.read(1)[0].ascii * 256
-                                       var blue = fileReader.read(1)[0].ascii
+                                       var bts = fileReader.read_bytes(3)
+                                       if bts.length != 3 then return
+                                       var red = bts[0] << 16
+                                       var green = bts[1] << 8
+                                       var blue = bts[2]
                                        row.add(red + green + blue)
                                end
                                self.data.add(row)
@@ -170,18 +178,6 @@ class Bitmap
                fileReader.close
        end #end of load_from_file method
 
-       # Reads in a series of bytes from the FileReader when loading a Bitmap from a file
-       # FileReader.read(1) is used due to https://github.com/privat/nit/issues/1264
-       private fun read_chars(fr: FileReader, howMany: Int): String
-       do
-               var s = ""
-               for x in [1..howMany]
-               do
-                       s += fr.read(1)
-               end
-               return s
-       end
-
        # Converts the value contained in two or four bytes into an Int. Since Nit
        # does not have a byte type, Int is used
        private fun get_value(array: Array[Int]): Int
index a621c54..ad79e6c 100644 (file)
 #
 # Allows for fast support of a large number of entities with rare actions,
 # such as a forest with many individual trees.
-module bucketed_game
+module bucketed_game is serialize
 
 import serialization
 
 # Something acting on the game
 class Turnable[G: Game]
-       auto_serializable
 
        # Execute `turn` for this instance.
        fun do_turn(turn: GameTurn[G]) is abstract
@@ -35,7 +34,6 @@ end
 # Something acting on the game from time to time
 class Bucketable[G: Game]
        super Turnable[G]
-       auto_serializable
 
        private var act_at: nullable Int = null
 
@@ -49,7 +47,6 @@ end
 # Optimized organization of `Bucketable` instances
 class Buckets[G: Game]
        super Turnable[G]
-       auto_serializable
 
        # Bucket type used in this implementation.
        type BUCKET: HashSet[Bucketable[G]]
@@ -118,12 +115,10 @@ end
 # Event raised at the first turn
 class FirstTurnEvent
        super GameEvent
-       auto_serializable
 end
 
 # Game logic on the client
 class ThinGame
-       auto_serializable
 
        # Game tick when `self` should act.
        #
@@ -133,7 +128,6 @@ end
 
 # Game turn on the client
 class ThinGameTurn[G: ThinGame]
-       auto_serializable
 
        # Game tick when `self` should act.
        var tick: Int is protected writable
@@ -145,7 +139,6 @@ end
 # Game turn on the full logic
 class GameTurn[G: Game]
        super ThinGameTurn[G]
-       auto_serializable
 
        # Game that `self` belongs to.
        var game: G
@@ -173,7 +166,6 @@ end
 # Full game logic
 class Game
        super ThinGame
-       auto_serializable
 
        # Game type used in this implementation.
        type G: Game
index 32bd967..a8e0c2f 100644 (file)
--- a/lib/c.nit
+++ b/lib/c.nit
@@ -111,10 +111,10 @@ extern class NativeCIntArray `{ int* `}
        # Initialize a new NativeCIntArray of `size` elements.
        new(size: Int) `{ return calloc(size, sizeof(int)); `}
 
-       redef fun [](index) `{ return recv[index]; `}
-       redef fun []=(index, val) `{ recv[index] = val; `}
+       redef fun [](index) `{ return self[index]; `}
+       redef fun []=(index, val) `{ self[index] = val; `}
 
-       redef fun +(offset) `{ return recv + offset; `}
+       redef fun +(offset) `{ return self + offset; `}
 end
 
 # Wrapper around an array of `unsigned char` in C (`unsigned char*`) with length and destroy state
@@ -147,10 +147,10 @@ extern class NativeCByteArray `{ unsigned char* `}
        # Allocate a new array of `size`
        new(size: Int) `{ return calloc(size, sizeof(unsigned char)); `}
 
-       redef fun [](index) `{ return recv[index]; `}
-       redef fun []=(index, val) `{ recv[index] = val; `}
+       redef fun [](index) `{ return self[index]; `}
+       redef fun []=(index, val) `{ self[index] = val; `}
 
-       redef fun +(offset) `{ return recv + offset; `}
+       redef fun +(offset) `{ return self + offset; `}
 end
 
 # Wrapper around an array of `NativeString` in C (`char**`) with length and destroy state.
@@ -185,14 +185,14 @@ extern class NativeCStringArray `{ char** `}
        # Initialize a new NativeCStringArray of `size` elements.
        new(size: Int) `{ return calloc(size, sizeof(char*)); `}
 
-       redef fun [](index) `{ return recv[index]; `}
-       redef fun []=(index, val) `{ recv[index] = val; `}
-       redef fun +(offset) `{ return recv + offset; `}
+       redef fun [](index) `{ return self[index]; `}
+       redef fun []=(index, val) `{ self[index] = val; `}
+       redef fun +(offset) `{ return self + offset; `}
 end
 
 redef class NativeString
        super NativeCArray
        redef type E: Char
 
-       redef fun +(offset) `{ return recv + offset; `}
+       redef fun +(offset) `{ return self + offset; `}
 end
index 5fe0af2..91632db 100644 (file)
@@ -31,8 +31,8 @@ extern class NSAlert in "ObjC" `{ NSAlert * `}
        new in "ObjC" `{ return [[NSAlert alloc] init]; `}
 
        # Set the content of this message box
-       fun message_text=(text: NSString) in "ObjC" `{ [recv setMessageText:text]; `}
+       fun message_text=(text: NSString) in "ObjC" `{ [self setMessageText:text]; `}
 
        # Show this message box
-       fun run_modal in "ObjC" `{ [recv runModal]; `}
+       fun run_modal in "ObjC" `{ [self runModal]; `}
 end
index cbe8f08..06c8ffd 100644 (file)
@@ -35,7 +35,7 @@ end
 redef class NativeString
        # Get a `NSString` from `self` with the specified `length`
        fun to_nsstring(length: Int): NSString in "ObjC" `{
-               return [[NSString alloc] initWithBytes:recv
+               return [[NSString alloc] initWithBytes:self
                        length:length
                        encoding:NSASCIIStringEncoding];
        `}
index 78bb96c..c64ae33 100644 (file)
@@ -31,6 +31,6 @@ end
 redef class NativeString
        # Get `self` as a `CppString`
        fun to_cpp_string(length: Int): CppString in "C++" `{
-               return new std::string(recv, length);
+               return new std::string(reinterpret_cast<char*>(self), length);
        `}
 end
index c087642..dbfc157 100644 (file)
@@ -377,8 +377,7 @@ class CurlResponseSuccess
        var status_code = 0
 
        # Receive body from request due to body callback registering
-       redef fun body_callback(line: String)
-       do
+       redef fun body_callback(line) do
                self.body_str = "{self.body_str}{line}"
        end
 end
index 287dbce..fe0a446 100644 (file)
@@ -78,11 +78,11 @@ extern class CCurl `{ CURL * `}
        # Constructor, CURL low level initializer
        new easy_init `{ return curl_easy_init(); `}
        # Check for correct initialization
-       fun is_init:Bool `{ return (recv != NULL); `}
+       fun is_init:Bool `{ return (self != NULL); `}
        # Easy Clean / Release CURL instance
-       fun easy_clean `{ curl_easy_cleanup( recv ); `}
+       fun easy_clean `{ curl_easy_cleanup( self ); `}
        # Perform the transfer described by setted options
-       fun easy_perform:CURLCode `{ return curl_easy_perform( recv ); `}
+       fun easy_perform:CURLCode `{ return curl_easy_perform( self ); `}
        # Set options to tell CURL how to behave. Obj parameter type can be Int, Bool, String, OFile, CURLSList.
        fun easy_setopt(opt: CURLOption, obj: Object):CURLCode
        do
@@ -95,15 +95,15 @@ extern class CCurl `{ CURL * `}
                return once new CURLCode.unknown_option
        end
        # Internal method to set options to CURL using OFile parameter.
-       private fun i_setopt_file(opt: CURLOption, fl: OFile):CURLCode `{ return curl_easy_setopt( recv, opt, fl); `}
+       private fun i_setopt_file(opt: CURLOption, fl: OFile):CURLCode `{ return curl_easy_setopt( self, opt, fl); `}
        # Internal method to set options to CURL using Int parameter.
-       private fun i_setopt_int(opt: CURLOption, num: Int):CURLCode `{ return curl_easy_setopt( recv, opt, num); `}
+       private fun i_setopt_int(opt: CURLOption, num: Int):CURLCode `{ return curl_easy_setopt( self, opt, num); `}
        # Internal method to set options to CURL using CURLSList parameter.
-       private fun i_setopt_slist(opt: CURLOption, list: CURLSList):CURLCode `{ return curl_easy_setopt( recv, opt, list); `}
+       private fun i_setopt_slist(opt: CURLOption, list: CURLSList):CURLCode `{ return curl_easy_setopt( self, opt, list); `}
        # Internal method to set options to CURL using String parameter.
        private fun i_setopt_string(opt: CURLOption, str: String):CURLCode import String.to_cstring `{
                char *rStr = String_to_cstring(str);
-               return curl_easy_setopt( recv, opt, rStr);
+               return curl_easy_setopt( self, opt, rStr);
        `}
        # Request Chars internal information from the CURL session
        fun easy_getinfo_chars(opt: CURLInfoChars):nullable CURLInfoResponseString
@@ -115,7 +115,7 @@ extern class CCurl `{ CURL * `}
        # Internal method used to get String object information initially knowns as C Chars type
        private fun i_getinfo_chars(opt: CURLInfoChars, res: CURLInfoResponseString):CURLCode import CURLInfoResponseString.response=, NativeString.to_s_with_copy `{
                char *r = NULL;
-               CURLcode c = curl_easy_getinfo( recv, opt, &r);
+               CURLcode c = curl_easy_getinfo( self, opt, &r);
                if((c == CURLE_OK) && r != NULL){
                        String ro = NativeString_to_s_with_copy(r);
                        CURLInfoResponseString_response__assign( res, ro);
@@ -133,7 +133,7 @@ extern class CCurl `{ CURL * `}
        private fun i_getinfo_long(opt: CURLInfoLong, res: CURLInfoResponseLong):CURLCode import CURLInfoResponseLong.response= `{
                long *r = NULL;
                r = malloc(sizeof(long));
-               CURLcode c = curl_easy_getinfo( recv, opt, r);
+               CURLcode c = curl_easy_getinfo( self, opt, r);
                if((c == CURLE_OK) && r != NULL) CURLInfoResponseLong_response__assign( res, *r);
                free(r);
                return c;
@@ -149,7 +149,7 @@ extern class CCurl `{ CURL * `}
        private fun i_getinfo_double(opt: CURLInfoDouble, res: CURLInfoResponseDouble):CURLCode import CURLInfoResponseDouble.response= `{
                double *r = NULL;
                r = malloc(sizeof(double));
-               CURLcode c = curl_easy_getinfo( recv, opt, r);
+               CURLcode c = curl_easy_getinfo( self, opt, r);
                if((c == CURLE_OK) && r != NULL) CURLInfoResponseDouble_response__assign( res, *r);
                free(r);
                return c;
@@ -166,7 +166,7 @@ extern class CCurl `{ CURL * `}
        # Internal method used to get Array[String] object information initially knowns as C SList type
        private fun i_getinfo_slist(opt: CURLInfoSList, res: CURLInfoResponseArray):CURLCode import CURLInfoResponseArray.prim_response=`{
                struct curl_slist* csl = NULL;
-               CURLcode ce = curl_easy_getinfo( recv, opt, &csl);
+               CURLcode ce = curl_easy_getinfo( self, opt, &csl);
                CURLInfoResponseArray_prim_response__assign(res, csl);
                return ce;
        `}
@@ -191,7 +191,7 @@ extern class CCurl `{ CURL * `}
                d->data = (char*)String_to_cstring(datas);
                d->len = size;
                d->pos = 0;
-               return curl_easy_setopt( recv, CURLOPT_READDATA, d);
+               return curl_easy_setopt( self, CURLOPT_READDATA, d);
        `}
        # Internal method used to configure callbacks in terms of given type
        private fun i_register_callback(delegate: CCurlCallbacks, cbtype: CURLCallbackType):CURLCode is extern import CCurlCallbacks.header_callback, CCurlCallbacks.body_callback, CCurlCallbacks.stream_callback, NativeString.to_s_with_copy, NativeString.to_s `{
@@ -202,18 +202,18 @@ extern class CCurl `{ CURL * `}
                CURLcode e;
                switch(cbtype){
                        case CURLcallbackTypeHeader:
-                               e = curl_easy_setopt( recv, CURLOPT_HEADERFUNCTION, (curl_write_callback)&nit_curl_callback_func);
+                               e = curl_easy_setopt( self, CURLOPT_HEADERFUNCTION, (curl_write_callback)&nit_curl_callback_func);
                                if(e != CURLE_OK) return e;
-                               e = curl_easy_setopt( recv, CURLOPT_WRITEHEADER, d);
+                               e = curl_easy_setopt( self, CURLOPT_WRITEHEADER, d);
                        break;
                        case CURLcallbackTypeBody:
                        case CURLcallbackTypeStream:
-                               e = curl_easy_setopt( recv, CURLOPT_WRITEFUNCTION, (curl_write_callback)&nit_curl_callback_func);
+                               e = curl_easy_setopt( self, CURLOPT_WRITEFUNCTION, (curl_write_callback)&nit_curl_callback_func);
                                if(e != CURLE_OK) return e;
-                               e = curl_easy_setopt( recv, CURLOPT_WRITEDATA, d);
+                               e = curl_easy_setopt( self, CURLOPT_WRITEDATA, d);
                        break;
                        case CURLcallbackTypeRead:
-                               e = curl_easy_setopt( recv, CURLOPT_READFUNCTION, (curl_write_callback)&nit_curl_callback_read_func);
+                               e = curl_easy_setopt( self, CURLOPT_READFUNCTION, (curl_write_callback)&nit_curl_callback_read_func);
                        default:
                        break;
                }
@@ -223,7 +223,7 @@ extern class CCurl `{ CURL * `}
        fun escape(url: String):String import String.to_cstring, NativeString.to_s_with_copy `{
                char *orig_url, *encoded_url = NULL;
                orig_url = String_to_cstring(url);
-               encoded_url = curl_easy_escape( recv, orig_url, strlen(orig_url));
+               encoded_url = curl_easy_escape( self, orig_url, strlen(orig_url));
                String b_url = NativeString_to_s_with_copy(encoded_url);
                curl_free(encoded_url);
                return b_url;
@@ -235,9 +235,9 @@ extern class OFile `{ FILE* `}
        # Open / Create a file from given name
        new open(str: NativeString) `{ return fopen(str, "wb"); `}
        # Check for File validity
-       fun is_valid:Bool `{ return recv != NULL; `}
+       fun is_valid:Bool `{ return self != NULL; `}
        # Internal method to write to the current file
-       private fun n_write(buffer: NativeString, size: Int, count: Int):Int `{ return fwrite(buffer, size, count, recv); `}
+       private fun n_write(buffer: NativeString, size: Int, count: Int):Int `{ return fwrite(buffer, size, count, self); `}
        # Write datas to the current file
        fun write(buffer: String, size: Int, count: Int):Int
        do
@@ -245,7 +245,7 @@ extern class OFile `{ FILE* `}
                return 0
        end
        # Internal method to close the current file
-       private fun n_close:Int `{ return fclose(recv); `}
+       private fun n_close:Int `{ return fclose(self); `}
        # Close the current file
        fun close:Bool
        do
@@ -267,7 +267,7 @@ extern class CURLCallbackType `{ CURLcallbackType `}
        new body `{ return CURLcallbackTypeBody; `}
        new stream `{ return CURLcallbackTypeStream; `}
        new read `{ return CURLcallbackTypeRead; `}
-       fun to_i:Int `{ return recv; `}
+       fun to_i:Int `{ return self; `}
 end
 
 # CURL Code binding and helpers
@@ -276,13 +276,13 @@ extern class CURLCode `{ CURLcode `}
        new unsupported_protocol `{ return CURLE_UNSUPPORTED_PROTOCOL; `}
        new ok `{ return CURLE_OK; `}
        new failed_init `{ return CURLE_FAILED_INIT; `}
-       fun code:Int `{ return recv; `}
-       fun is_ok:Bool `{ return recv == CURLE_OK; `}
-       fun is_valid_protocol:Bool `{ return recv == CURLE_UNSUPPORTED_PROTOCOL; `}
-       fun is_valid_init:Bool `{ return recv == CURLE_FAILED_INIT; `}
+       fun code:Int `{ return self; `}
+       fun is_ok:Bool `{ return self == CURLE_OK; `}
+       fun is_valid_protocol:Bool `{ return self == CURLE_UNSUPPORTED_PROTOCOL; `}
+       fun is_valid_init:Bool `{ return self == CURLE_FAILED_INIT; `}
        fun to_i:Int do return code end
        redef fun to_s import NativeString.to_s_with_copy `{
-               char *c = (char*)curl_easy_strerror(recv);
+               char *c = (char*)curl_easy_strerror(self);
                return NativeString_to_s_with_copy(c);
        `}
 end
@@ -298,11 +298,11 @@ extern class CURLSList `{ struct curl_slist * `}
                return l;
        `}
        # Check for initialization
-       fun is_init:Bool `{ return (recv != NULL); `}
+       fun is_init:Bool `{ return (self != NULL); `}
        # Append an element in the linked list
        fun append(key: String) import String.to_cstring `{
                 char *k = String_to_cstring(key);
-                curl_slist_append(recv, (char*)k);
+                curl_slist_append(self, (char*)k);
        `}
        # Internal method to check for reachability of current data
        private fun i_data_reachable(c: CURLSList):Bool `{ return (c != NULL && c->data != NULL); `}
@@ -325,7 +325,7 @@ extern class CURLSList `{ struct curl_slist * `}
                return r
        end
        # Release allocated memory
-       fun destroy `{ curl_slist_free_all(recv); `}
+       fun destroy `{ curl_slist_free_all(self); `}
 end
 
 redef class Collection[E]
@@ -391,7 +391,7 @@ extern class CURLInfoLong `{ CURLINFO `}
        new condition_unmet `{ return CURLINFO_CONDITION_UNMET; `}
        new rtsp_client_cseq `{ return CURLINFO_RTSP_CLIENT_CSEQ; `}
        new rtsp_server_cseq `{ return CURLINFO_RTSP_SERVER_CSEQ; `}
-       new rtsp_cseq_recv `{ return CURLINFO_RTSP_CSEQ_RECV; `}
+       new rtsp_cseq_self `{ return CURLINFO_RTSP_CSEQ_RECV; `}
 end
 
 # Reproduce Enum of available CURL Double information, used for CCurl.easy_getinfo
@@ -462,7 +462,7 @@ extern class CURLStatusCode `{ int `}
        new service_unavailable `{ return 503; `}
        new gateway_timeout `{ return 504; `}
        new http_version_not_supported `{ return 505; `}
-       fun to_i:Int `{ return recv; `}
+       fun to_i:Int `{ return self; `}
 end
 
 # Reproduce Enum of CURL Options usable, used for CCurl.easy_setopt
index 079f12c..948ba38 100644 (file)
@@ -32,16 +32,16 @@ class MyHttpFetcher
        fun destroy do self.curl.destroy
 
        # Header callback
-       redef fun header_callback(line: String) do
+       redef fun header_callback(line) do
                # We keep this callback silent for testing purposes
                #if not line.has_prefix("Date:") then print "Header_callback : {line}"
        end
 
        # Body callback
-       redef fun body_callback(line: String) do self.our_body = "{self.our_body}{line}"
+       redef fun body_callback(line) do self.our_body = "{self.our_body}{line}"
 
        # Stream callback - Cf : No one is registered
-       redef fun stream_callback(buffer: String, size: Int, count: Int) do print "Stream_callback : {buffer} - {size} - {count}"
+       redef fun stream_callback(buffer, size, count) do print "Stream_callback : {buffer} - {size} - {count}"
 end
 
 
index 084b68a..688493e 100644 (file)
@@ -49,12 +49,12 @@ extern class Window `{WINDOW *`}
 
        # Clear the entire window so it can be repainted from scratch with a refresh
        fun wclear `{
-               wclear(recv);
+               wclear(self);
        `}
 
        # Delete the window
        fun delwin `{
-               delwin(recv);
+               delwin(self);
        `}
 
        # Suspend the curses session and restore the previous terminal
index d062cfc..781c2a4 100644 (file)
@@ -40,10 +40,10 @@ extern class EGLDisplay `{ EGLDisplay `}
        new current `{ return eglGetCurrentDisplay(); `}
        new(handle: Pointer) `{ return eglGetDisplay(handle); `}
 
-       fun is_valid: Bool `{ return recv != EGL_NO_DISPLAY; `}
+       fun is_valid: Bool `{ return self != EGL_NO_DISPLAY; `}
 
        fun initialize: Bool `{
-               EGLBoolean r = eglInitialize(recv, NULL, NULL);
+               EGLBoolean r = eglInitialize(self, NULL, NULL);
                if (r == EGL_FALSE) {
                        fprintf(stderr, "Unable to eglInitialize");
                        return 0;
@@ -53,12 +53,12 @@ extern class EGLDisplay `{ EGLDisplay `}
 
        fun major_version: Int `{
                EGLint val;
-               eglInitialize(recv, &val, NULL);
+               eglInitialize(self, &val, NULL);
                return val;
        `}
        fun minor_version: Int `{
                EGLint val;
-               eglInitialize(recv, NULL, &val);
+               eglInitialize(self, NULL, &val);
                return val;
        `}
 
@@ -78,22 +78,22 @@ extern class EGLDisplay `{ EGLDisplay `}
                }
 
                // get number of configs
-               EGLBoolean r = eglChooseConfig(recv, c_attribs, NULL, 0, &n_configs);
+               EGLBoolean r = eglChooseConfig(self, c_attribs, NULL, 0, &n_configs);
 
                if (r == EGL_FALSE) {
-                       EGLDisplay_report_egl_error(recv, "failed to get number of available configs.");
+                       EGLDisplay_report_egl_error(self, "failed to get number of available configs.");
                        return null_Array_of_EGLConfig();
                } else if (n_configs == 0) {
-                       EGLDisplay_report_egl_error(recv, "no config available.");
+                       EGLDisplay_report_egl_error(self, "no config available.");
                        return null_Array_of_EGLConfig();
                }
 
                configs = (EGLConfig*)malloc(sizeof(EGLConfig)*n_configs);
  
-               r = eglChooseConfig(recv, c_attribs, configs, n_configs, &n_configs);
+               r = eglChooseConfig(self, c_attribs, configs, n_configs, &n_configs);
 
                if (r == EGL_FALSE) {
-                       EGLDisplay_report_egl_error(recv, "failed to load config.");
+                       EGLDisplay_report_egl_error(self, "failed to load config.");
                        return null_Array_of_EGLConfig();
                } else {
                        Array_of_EGLConfig array = new_Array_of_EGLConfig();
@@ -107,7 +107,7 @@ extern class EGLDisplay `{ EGLDisplay `}
        # Can be used directly, but it is preferable to use a `EGLConfigAttribs`
        fun config_attrib(config: EGLConfig, attribute: Int): Int `{
                EGLint val;
-               EGLBoolean r = eglGetConfigAttrib(recv, config, attribute, &val);
+               EGLBoolean r = eglGetConfigAttrib(self, config, attribute, &val);
                if (r == EGL_FALSE)
                        return -1;
                else
@@ -115,23 +115,23 @@ extern class EGLDisplay `{ EGLDisplay `}
        `}
 
        fun terminate: Bool `{
-               return eglTerminate(recv) == EGL_TRUE;
+               return eglTerminate(self) == EGL_TRUE;
        `}
 
        fun create_window_surface(config: EGLConfig, native_window: Pointer, attribs: Array[Int]): EGLSurface `{
-               EGLSurface surface = eglCreateWindowSurface(recv, config, (EGLNativeWindowType)native_window, NULL);
+               EGLSurface surface = eglCreateWindowSurface(self, config, (EGLNativeWindowType)native_window, NULL);
                return surface;
        `}
 
        # TODO add share_context
        fun create_context(config: EGLConfig): EGLContext `{
                EGLint context_attribs[] = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE, EGL_NONE}; // TODO move out!
-               EGLContext context = eglCreateContext(recv, config, EGL_NO_CONTEXT, context_attribs);
+               EGLContext context = eglCreateContext(self, config, EGL_NO_CONTEXT, context_attribs);
                return context;
        `}
 
        fun make_current(draw, read: EGLSurface, context: EGLContext): Bool `{
-               if (eglMakeCurrent(recv, draw, read, context) == EGL_FALSE) {
+               if (eglMakeCurrent(self, draw, read, context) == EGL_FALSE) {
                        fprintf(stderr, "Unable to eglMakeCurrent");
                        return 0;
                }
@@ -141,7 +141,7 @@ extern class EGLDisplay `{ EGLDisplay `}
        # Can be used directly, but it is preferable to use a `EGLSurfaceAttribs`
        fun query_surface(surface: EGLSurface, attribute: Int): Int `{
                int val;
-               EGLBoolean r = eglQuerySurface(recv, surface, attribute, &val);
+               EGLBoolean r = eglQuerySurface(self, surface, attribute, &val);
                if (r == EGL_FALSE)
                        return -1;
                else
@@ -149,11 +149,11 @@ extern class EGLDisplay `{ EGLDisplay `}
        `}
 
        fun destroy_context(context: EGLContext): Bool `{
-               return eglDestroyContext(recv, context);
+               return eglDestroyContext(self, context);
        `}
 
        fun destroy_surface(surface: EGLSurface): Bool `{
-               return eglDestroySurface(recv, surface);
+               return eglDestroySurface(self, surface);
        `}
 
        fun error: EGLError `{ return eglGetError(); `}
@@ -169,7 +169,7 @@ extern class EGLDisplay `{ EGLDisplay `}
        end
 
        private fun query_string(name: Int): String import NativeString.to_s `{
-               return NativeString_to_s((char *)eglQueryString(recv, name));
+               return NativeString_to_s((char *)eglQueryString(self, name));
        `}
 
        fun vendor: String do return query_string(0x3053)
@@ -180,7 +180,7 @@ extern class EGLDisplay `{ EGLDisplay `}
 
        fun client_apis: Array[String] do return query_string(0x308D).split_with(" ")
 
-       fun swap_buffers(surface: EGLSurface) `{ eglSwapBuffers(recv, surface); `}
+       fun swap_buffers(surface: EGLSurface) `{ eglSwapBuffers(self, surface); `}
 end
 
 extern class EGLConfig `{ EGLConfig `}
@@ -194,7 +194,7 @@ extern class EGLSurface `{ EGLSurface `}
        new current_read `{ return eglGetCurrentSurface(EGL_READ); `}
        new none `{ return EGL_NO_SURFACE; `}
 
-       fun is_ok: Bool `{ return recv != EGL_NO_SURFACE; `}
+       fun is_ok: Bool `{ return self != EGL_NO_SURFACE; `}
 
        fun attribs(display: EGLDisplay): EGLSurfaceAttribs do
                return new EGLSurfaceAttribs(display, self)
@@ -205,7 +205,7 @@ extern class EGLContext `{ EGLContext `}
        new current `{ return eglGetCurrentContext(); `}
        new none `{ return EGL_NO_CONTEXT; `}
 
-       fun is_ok: Bool `{ return recv != EGL_NO_CONTEXT; `}
+       fun is_ok: Bool `{ return self != EGL_NO_CONTEXT; `}
 end
 
 # Attributes of a config for a given EGL display
@@ -235,20 +235,20 @@ end
 
 extern class EGLConfigCaveat `{ EGLint `}
        new from_i(val: Int) `{ return (EGLint)val; `}
-       fun to_i: Int `{ return recv; `}
+       fun to_i: Int `{ return self; `}
 
        new none `{ return EGL_NONE; `}
-       fun is_none: Bool `{ return recv == EGL_NONE; `}
+       fun is_none: Bool `{ return self == EGL_NONE; `}
 
        new dont_care `{ return EGL_DONT_CARE; `}
-       fun is_dont_care: Bool `{ return recv == EGL_DONT_CARE; `}
+       fun is_dont_care: Bool `{ return self == EGL_DONT_CARE; `}
 
        new slow `{ return EGL_SLOW_CONFIG; `}
-       fun is_slow: Bool `{ return recv == EGL_SLOW_CONFIG; `}
+       fun is_slow: Bool `{ return self == EGL_SLOW_CONFIG; `}
 
        # Obselete since EGL 1.3, use EGL_CONFORMANT instead
        new non_conformant `{ return EGL_NON_CONFORMANT_CONFIG; `}
-       fun is_non_conformant: Bool `{ return recv == EGL_NON_CONFORMANT_CONFIG; `}
+       fun is_non_conformant: Bool `{ return self == EGL_NON_CONFORMANT_CONFIG; `}
 
        redef fun to_s
        do
@@ -263,19 +263,19 @@ end
 extern class EGLConformant `{ EGLint `}
        new `{ return (EGLint)0; `}
        new from_i(val: Int) `{ return (EGLint)val; `}
-       fun to_i: Int `{ return recv; `}
+       fun to_i: Int `{ return self; `}
 
-       fun opengl: Bool `{ return recv & EGL_OPENGL_BIT; `}
-       fun with_opengl: EGLConformant `{ return recv | EGL_OPENGL_BIT; `}
+       fun opengl: Bool `{ return self & EGL_OPENGL_BIT; `}
+       fun with_opengl: EGLConformant `{ return self | EGL_OPENGL_BIT; `}
 
-       fun opengl_es: Bool `{ return recv & EGL_OPENGL_ES_BIT; `}
-       fun with_opengl_es: EGLConformant `{ return recv | EGL_OPENGL_ES_BIT; `}
+       fun opengl_es: Bool `{ return self & EGL_OPENGL_ES_BIT; `}
+       fun with_opengl_es: EGLConformant `{ return self | EGL_OPENGL_ES_BIT; `}
 
-       fun opengl_es2: Bool `{ return recv & EGL_OPENGL_ES2_BIT; `}
-       fun with_opengl_es2: EGLConformant `{ return recv | EGL_OPENGL_ES2_BIT; `}
+       fun opengl_es2: Bool `{ return self & EGL_OPENGL_ES2_BIT; `}
+       fun with_opengl_es2: EGLConformant `{ return self | EGL_OPENGL_ES2_BIT; `}
 
-       fun openvg: Bool `{ return recv & EGL_OPENVG_BIT; `}
-       fun with_openvg: EGLConformant `{ return recv | EGL_OPENVG_BIT; `}
+       fun openvg: Bool `{ return self & EGL_OPENVG_BIT; `}
+       fun with_openvg: EGLConformant `{ return self | EGL_OPENVG_BIT; `}
 
        fun to_a: Array[String]
        do
@@ -313,22 +313,22 @@ class EGLSurfaceAttribs
 end
 
 extern class EGLError `{ EGLint `}
-       fun is_success: Bool `{ return recv == EGL_SUCCESS; `}
-
-       fun is_not_initialized: Bool `{ return recv == EGL_NOT_INITIALIZED; `}
-       fun is_bad_access: Bool `{ return recv == EGL_BAD_ACCESS; `}
-       fun is_bad_alloc: Bool `{ return recv == EGL_BAD_ALLOC; `}
-       fun is_bad_attribute: Bool `{ return recv == EGL_BAD_ATTRIBUTE; `}
-       fun is_bad_config: Bool `{ return recv == EGL_BAD_CONFIG; `}
-       fun is_bad_context: Bool `{ return recv == EGL_BAD_CONTEXT; `}
-       fun is_bad_current_surface: Bool `{ return recv == EGL_BAD_CURRENT_SURFACE; `}
-       fun is_bad_display: Bool `{ return recv == EGL_BAD_DISPLAY; `}
-       fun is_bad_match: Bool `{ return recv == EGL_BAD_MATCH; `}
-       fun is_bad_native_pixmap: Bool `{ return recv == EGL_BAD_NATIVE_PIXMAP; `}
-       fun is_bad_native_window: Bool `{ return recv == EGL_BAD_NATIVE_WINDOW; `}
-       fun is_bad_parameter: Bool `{ return recv == EGL_BAD_PARAMETER; `}
-       fun is_bad_surface: Bool `{ return recv == EGL_BAD_SURFACE; `}
-       fun is_context_lost: Bool `{ return recv == EGL_CONTEXT_LOST; `}
+       fun is_success: Bool `{ return self == EGL_SUCCESS; `}
+
+       fun is_not_initialized: Bool `{ return self == EGL_NOT_INITIALIZED; `}
+       fun is_bad_access: Bool `{ return self == EGL_BAD_ACCESS; `}
+       fun is_bad_alloc: Bool `{ return self == EGL_BAD_ALLOC; `}
+       fun is_bad_attribute: Bool `{ return self == EGL_BAD_ATTRIBUTE; `}
+       fun is_bad_config: Bool `{ return self == EGL_BAD_CONFIG; `}
+       fun is_bad_context: Bool `{ return self == EGL_BAD_CONTEXT; `}
+       fun is_bad_current_surface: Bool `{ return self == EGL_BAD_CURRENT_SURFACE; `}
+       fun is_bad_display: Bool `{ return self == EGL_BAD_DISPLAY; `}
+       fun is_bad_match: Bool `{ return self == EGL_BAD_MATCH; `}
+       fun is_bad_native_pixmap: Bool `{ return self == EGL_BAD_NATIVE_PIXMAP; `}
+       fun is_bad_native_window: Bool `{ return self == EGL_BAD_NATIVE_WINDOW; `}
+       fun is_bad_parameter: Bool `{ return self == EGL_BAD_PARAMETER; `}
+       fun is_bad_surface: Bool `{ return self == EGL_BAD_SURFACE; `}
+       fun is_context_lost: Bool `{ return self == EGL_CONTEXT_LOST; `}
 
        redef fun to_s
        do
index b8c9798..5ec269d 100644 (file)
@@ -211,7 +211,7 @@ interface Boxed3d[N: Numeric]
                        (self.back <= other.front and other.back <= self.front))
        end
 
-       redef fun padded(dist: N): Box3d[N] do return new Box3d[N].lrtbfb(left - dist, right + dist, top + dist, bottom - dist, front + dist, back - dist)
+       redef fun padded(dist): Box3d[N] do return new Box3d[N].lrtbfb(left - dist, right + dist, top + dist, bottom - dist, front + dist, back - dist)
 end
 
 # A 3d bounded object and an implementation of Boxed
@@ -344,8 +344,8 @@ class BoxedArray[E: Boxed[Numeric]]
 
        private var data: Array[E] = new Array[E]
 
-       redef fun add(item: E) do data.add(item)
-       redef fun items_overlapping(item: Boxed[Numeric]): SimpleCollection[E]
+       redef fun add(item) do data.add(item)
+       redef fun items_overlapping(item): SimpleCollection[E]
        do
                var arr = new Array[E]
                for i in data do
index 303aae1..6c7fda6 100644 (file)
@@ -71,8 +71,8 @@ end
 class Line[N: Numeric]
        super ILine[N]
 
-       redef var point_left: P
-       redef var point_right: P
+       redef var point_left
+       redef var point_right
 
        init
        do
diff --git a/lib/geometry/polygon.nit b/lib/geometry/polygon.nit
new file mode 100644 (file)
index 0000000..8fc1969
--- /dev/null
@@ -0,0 +1,426 @@
+# This file is part of NIT (http://www.nitlanguage.org).
+#
+# Copyright 2015 Romain Chanoir <romain.chanoir@viacesi.fr>
+#
+# 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.
+
+# Convex Polygons manipulations
+module polygon
+
+import points_and_lines
+
+# Convex Polygon class
+class ConvexPolygon
+
+       # Vertices of this polygon
+       var points = new Array[Point[Float]]
+
+       # Init this polygon with a list of `points`
+       # REQUIRE `pts.length == 3`
+       init with_vertices(pts: Array[Point[Float]]) do
+               assert pts.length >= 3
+               points.add_all(pts)
+       end
+
+       # Get an array of the x coordinates of the vertices
+       private fun x_coordinates: Array[Float] do
+               return [for p in points do p.x]
+       end
+
+       # Get an array of the y coordinates of the vertices
+       private fun y_coordinates: Array[Float] do
+               return [for p in points do p.y]
+       end
+
+       # Get a matrice containing the coordinates of the vertices
+       private fun vertices: Array[Array[Float]] do
+               var vertices = new Array[Array[Float]]
+               for i in [0..points.length[ do
+                       var temp = new Array[Float]
+                       temp.add(points[i].x)
+                       temp.add(points[i].y)
+                       vertices.add(temp)
+               end
+               return vertices
+       end
+
+       # Returns the axes corresponding to the edges of the polygon, used for collision detection
+       private fun axes: Array[Point[Float]] do
+               var axes = new Array[Point[Float]]
+               for i in [0..points.length[ do
+                       var p1 = new Point[Float](points[i].x, points[i].y)
+                       var p2 = new Point[Float](points[(i+1) % points.length].x, points[(i+1) % points.length].y)
+                       var edge = new Point[Float](p1.x - p2.x, p1.y - p2.y)
+                       var normal = new Point[Float](-edge.y, edge.x)
+                       axes[i] = normal
+               end
+               return axes
+       end
+
+       # Sort the vertices in counter clockwise order
+       #
+       # ~~~
+       # var p1 = new Point[Float](0.0, 0.0)
+       # var p2 = new Point[Float](5.0, 0.0)
+       # var p3 = new Point[Float](0.0, 5.0)
+       # var p4 = new Point[Float](5.0, 5.0)
+       # var arr = new Array[Point[Float]].with_items(p1, p2, p3, p4)
+       # var poly = new ConvexPolygon.with_vertices(arr)
+       # poly.sort_ccw
+       # assert poly.points == [p4, p2, p1, p3]
+       # ~~~
+       fun sort_ccw do
+               var sorter = new CounterClockWiseSort.with_center(vertices)
+               sorter.sort(points)
+       end
+
+       # Sort the vertices in clockwise order
+       #
+       # ~~~
+       # var p1 = new Point[Float](0.0, 0.0)
+       # var p2 = new Point[Float](5.0, 0.0)
+       # var p3 = new Point[Float](0.0, 5.0)
+       # var p4 = new Point[Float](5.0, 5.0)
+       # var arr = new Array[Point[Float]].with_items(p1, p2, p3, p4)
+       # var poly = new ConvexPolygon.with_vertices(arr)
+       # poly.sort_cw
+       # assert poly.points == [p3, p1, p2, p4]
+       # ~~~
+       fun sort_cw do
+               var sorter = new ClockWiseSort.with_center(vertices)
+               sorter.sort(points)
+       end
+
+       # Does this polygon intersects `other` ?
+       #
+       # ~~~
+       # var p1 = new Point[Float](0.0, 0.0)
+       # var p2 = new Point[Float](5.0, 0.0)
+       # var p3 = new Point[Float](0.0, 5.0)
+       # var p4 = new Point[Float](5.0, 5.0)
+       # var arr = new Array[Point[Float]].with_items(p1, p2, p3, p4)
+       # var poly = new ConvexPolygon.with_vertices(arr)
+       # poly.sort_ccw
+       # p1 = new Point[Float](2.5, 2.5)
+       # p2 = new Point[Float](7.5, 2.5)
+       # p3 = new Point[Float](2.5, 7.5)
+       # p4 = new Point[Float](7.5, 7.5)
+       # arr = new Array[Point[Float]].with_items(p1, p2, p3, p4)
+       # var poly2 = new ConvexPolygon.with_vertices(arr)
+       # poly2.sort_ccw
+       # assert poly.intersects(poly2)
+       # ~~~
+       fun intersects(other: ConvexPolygon): Bool do
+               assert is_convex
+
+               var axes1 = axes
+               var axes2 = other.axes
+               for axis in axes1 do
+                       var project1 = project(axis)
+                       var project2 = other.project(axis)
+                       if not project1.overlap(project2) then return false
+               end
+               for axis in axes2 do
+                       var project1 = project(axis)
+                       var project2 = other.project(axis)
+                       if not project1.overlap(project2) then return false
+               end
+               return true
+       end
+
+       # Generate a projection of an edge of the polygon on a given axis
+       private fun project(axis: Point[Float]): Projection do
+               var min = axis.x * points[0].x + axis.y * points[0].y
+               var max = min
+               for i in [0..points.length[ do
+                       var p = axis.x * points[i].x + axis.y * points[i].y
+                       if p < min then min = p
+                       if p > max then max = p
+               end
+               var projection = new Projection(min, max)
+               return projection
+       end
+
+       # Is this polygon convex ?
+       #
+       # ~~~
+       # var p1 = new Point[Float](0.0, 0.0)
+       # var p2 = new Point[Float](5.0, 0.0)
+       # var p3 = new Point[Float](0.0, 5.0)
+       # var p4 = new Point[Float](5.0, 5.0)
+       # var arr = new Array[Point[Float]].with_items(p1, p2, p3, p4)
+       # var poly = new ConvexPolygon.with_vertices(arr)
+       # poly.sort_ccw
+       # assert poly.is_convex
+       # ~~~
+       fun is_convex: Bool do
+               var prev = points[points.length - 2]
+               var curr = points[points.length - 1]
+               var next = points[0]
+               var is_ccw = turn_left(prev, curr, next)
+               for i in [1..points.length[ do
+                       prev = curr
+                       curr= next
+                       next = points[i]
+                       if turn_left(prev ,curr, next) != is_ccw then return false
+               end
+               return true
+       end
+
+       # Check if `p` is in the polygon
+       #
+       # ~~~
+       # var p1 = new Point[Float](0.0, 0.0)
+       # var p2 = new Point[Float](5.0, 0.0)
+       # var p3 = new Point[Float](0.0, 5.0)
+       # var p4 = new Point[Float](5.0, 5.0)
+       # var p5 = new Point[Float](2.5, 2.5)
+       # var arr = new Array[Point[Float]].with_items(p1, p2, p3, p4)
+       # var poly = new ConvexPolygon.with_vertices(arr)
+       # poly.sort_ccw
+       # assert poly.contain(p5)
+       # ~~~
+       fun contain(p : Point[Float]): Bool do
+               var prev = points[points.length - 1]
+               var curr = p
+               var next = points[0]
+               var is_ccw = turn_left(prev, curr, next)
+               for i in [1..points.length[ do
+                       prev = next
+                       next = points[i]
+                       if turn_left(prev, curr, next) != is_ccw then return false
+               end
+               return true
+       end
+
+       # Check if the order of the points in the polygon is counter-clockwise
+       # The vertices in the polygon need to be sorted
+       #
+       # ~~~
+       # var p1 = new Point[Float](0.0, 0.0)
+       # var p2 = new Point[Float](5.0, 0.0)
+       # var p3 = new Point[Float](0.0, 5.0)
+       # var p4 = new Point[Float](5.0, 5.0)
+       # var arr = new Array[Point[Float]].with_items(p1, p2, p3, p4)
+       # var poly = new ConvexPolygon.with_vertices(arr)
+       # poly.sort_ccw
+       # assert poly.is_ccw
+       # ~~~
+       fun is_ccw: Bool do
+               var min = points[0].y
+               var min_index = 0
+               for i in [1..points.length - 1[ do
+                       if points[i].y < min then
+                               min = points[i].y
+                               min_index = i
+                       end
+               end
+               var prev = points[(min_index - 1 + points.length) % points.length]
+               var next = points[(min_index + 1) % points.length]
+               return not turn_left(prev, points[min_index], next)
+       end
+
+       # Remove  `p` from the vertices, keeping at least 3 vertices
+       fun delete_vertex(p: Point[Float]) do
+               if points.length > 3 then
+                       points.remove(p)
+               end
+       end
+
+       # Add a vertex to the polygon
+       #
+       # ~~~
+       # var p1 = new Point[Float](0.0, 0.0)
+       # var p2 = new Point[Float](5.0, 0.0)
+       # var p3 = new Point[Float](0.0, 5.0)
+       # var p4 = new Point[Float](5.0, 5.0)
+       # var arr = new Array[Point[Float]].with_items(p1, p2, p3, p4)
+       # var poly = new ConvexPolygon.with_vertices(arr)
+       # var p5 = new Point[Float](2.5, 7.5)
+       # assert poly.add_vertex(p5)
+       # ~~~
+       fun add_vertex(p: Point[Float]): Bool do
+               assert points.length >= 3
+               var temp_list = points.clone
+               temp_list.add(p)
+               var temp_polygon = new ConvexPolygon.with_vertices(temp_list)
+               temp_polygon.sort_ccw
+               if temp_polygon.is_convex then
+                       points = temp_polygon.points
+                       return true
+               else
+                       return false
+               end
+       end
+end
+
+# Projection of an edge of a `ConvexPolygon` used for intersection test
+private class Projection
+       var min: Float is writable
+       var max: Float is writable
+
+       fun overlap(other: Projection): Bool do
+               return not (min > other.max or other.min > max)
+       end
+end
+
+private class PointXCompare
+       super Comparator
+
+       redef type COMPARED: Point[Float]
+
+       redef fun compare(a,b : COMPARED): Int do
+               if a.x == b.x then
+                       if a.y == b.y then return 0
+                       if a.y > b.y then return - 1
+                       return 1
+               else
+                       if a.x > b.x then return -1
+                       return 1
+               end
+       end
+end
+
+# Sorter for polygon vertices
+private abstract class PolygonSorter
+       super Comparator
+
+       redef type COMPARED: Point[Float]
+
+       # Center of the polygon's points
+       var center: COMPARED
+
+       # init calculating the center
+       init with_center(pts : Array[Array[Float]]) do
+               center = calc_center(pts)
+       end
+
+       # Calculate the center
+       fun calc_center(pts : Array[Array[Float]]): COMPARED do
+               var sumx = 0.0
+               var sumy = 0.0
+               for ap in pts do
+                       sumx += ap[0]
+                       sumy += ap[1]
+               end
+               return new Point[Float](sumx / pts.length.to_f, sumy / pts.length.to_f)
+       end
+end
+
+# Sort the vertices of a polygon in counter clockwise order
+private class CounterClockWiseSort
+       super PolygonSorter
+
+       redef fun compare(a,b: COMPARED): Int do
+               if a.x == b.x and a.y == b.y then return 0
+               if a.x - center.x >= 0.0 and b.x - center.x < 0.0 then return -1
+               if a.x - center.x < 0.0 and b.x - center.x >= 0.0 then return 1
+               if a.x - center.x == 0.0 and b.x - center.x == 0 then
+                       if a.y - center.y >= 0.0 or b.y - center.y >= 0.0 then
+                               if a.y > b.y then return -1
+                               return 1
+                       end
+                       if b.y > a.y then return -1
+                       return 1
+               end
+
+               var det = (a.x - center.x) * (b.y - center.y) - (b.x - center.x) * (a.y - center.y)
+               if det > 0.0 then return 1
+               if det < 0.0 then return -1
+
+               var d1 = (a.x - center.x) * (a.x - center.x) + (a.y - center.y) * (a.y - center.y)
+               var d2 = (b.x - center.x) * (b.x - center.x) + (b.y - center.y) * (b.y - center.y)
+               if d1 > d2 then return -1
+               return 1
+       end
+end
+
+# Sort the vertices of a polygon in clockwise order
+private class ClockWiseSort
+       super PolygonSorter
+
+       redef fun compare(a,b: COMPARED): Int do
+               if a.x == b.x and a.y == b.y then return 0
+               if a.x - center.x >= 0.0 and b.x - center.x < 0.0 then return 1
+               if a.x - center.x < 0.0 and b.x - center.x >= 0.0 then return -1
+               if a.x - center.x == 0.0 and b.x - center.x == 0 then
+                       if a.y - center.y >= 0.0 or b.y - center.y >= 0.0 then
+                               if a.y > b.y then return 1
+                               return -1
+                       end
+                       if b.y > a.y then return 1
+                       return -1
+               end
+
+               var det = (a.x - center.x) * (b.y - center.y) - (b.x - center.x) * (a.y - center.y)
+               if det > 0.0 then return -1
+               if det < 0.0 then return 1
+
+               var d1 = (a.x - center.x) * (a.x - center.x) + (a.y - center.y) * (a.y - center.y)
+               var d2 = (b.x - center.x) * (b.x - center.x) + (b.y - center.y) * (b.y - center.y)
+               if d1 > d2 then return 1
+               return -1
+       end
+end
+
+
+# Get the convex hull of the set of `points`
+#
+# ~~~
+# var p1 = new Point[Float](0.0, 0.0)
+# var p2 = new Point[Float](5.0, 0.0)
+# var p3 = new Point[Float](0.0, 5.0)
+# var p4 = new Point[Float](5.0, 5.0)
+# var p5 = new Point[Float](2.5, 2.5)
+# var arr = new Array[Point[Float]].with_items(p1, p2, p3, p4, p5)
+# var poly = convex_hull(arr)
+# assert poly.points == [p4, p3, p1, p2]
+# ~~~
+fun convex_hull(points: Array[Point[Float]]): ConvexPolygon do
+       var sorter = new PointXCompare
+       sorter.sort(points)
+       var l = points.length
+
+       var pl1 = new Array[Point[Float]]
+       var pl2 = new Array[Point[Float]]
+       for i in [0..l[ do
+               while pl2.length >= 2 and not turn_left(pl2[pl2.length - 2], pl2[pl2.length - 1], points[i]) do
+                       pl2.remove(pl2.last)
+               end
+               pl2.add(points[i])
+       end
+       var i = l - 1
+       while i >= 0 do
+               while pl1.length >= 2 and not turn_left(pl1[pl1.length - 2], pl1[pl1.length - 1], points[i]) do
+                       pl1.remove(pl1.last)
+               end
+               pl1.add(points[i])
+               i-= 1
+       end
+       pl1.remove_at(pl1.length - 1)
+       pl2.remove_at(pl2.length -1)
+       pl2.add_all(pl1)
+       return new ConvexPolygon.with_vertices(pl2)
+end
+
+# Is the angle between [p1,p2] and [p2,p3] going left (counter clockwise) or right (clockwise) ?
+#
+# ~~~
+# var p1 = new Point[Float](0.0, 0.0)
+# var p2 = new Point[Float](5.0, 0.0)
+# var p3 = new Point[Float](0.0, 5.0)
+# assert turn_left(p1, p2, p3)
+# ~~~
+fun turn_left(p1, p2, p3: Point[Float]): Bool do
+       return ((p2.x - p1.x) * (p3.y - p2.y) - (p3.x - p2.x) * (p2.y - p1.y)) > 0.0
+end
index 089b6ee..0218406 100644 (file)
@@ -55,14 +55,14 @@ abstract class QuadTree[E: Boxed[Numeric]]
                self.parent_node = parent
        end
 
-       redef fun items_overlapping(region :Boxed[Numeric]): SimpleCollection[E] do
+       redef fun items_overlapping(region): SimpleCollection[E] do
                var res = new Array[E]
                items_overlapping_in(region,res)
                return res
        end
 
        # add the item to the tree, create children if the limit is reached
-       redef fun add(item: E) do if self.is_leaf then self.data.add(item) else add_to_children(item)
+       redef fun add(item) do if self.is_leaf then self.data.add(item) else add_to_children(item)
 
        private fun add_to_children(item: Boxed[Numeric])
        do
@@ -93,7 +93,7 @@ abstract class QuadTree[E: Boxed[Numeric]]
                end
        end
 
-       redef fun is_empty: Bool do return data.is_empty and (self.is_leaf or (child0.is_empty and child1.is_empty and child2.is_empty and child3.is_empty))
+       redef fun is_empty do return data.is_empty and (self.is_leaf or (child0.is_empty and child1.is_empty and child2.is_empty and child3.is_empty))
 
        # Return whether or not the Node is a leaf of the tree
        fun is_leaf: Bool do return child0 == null
index 946a87c..35b13d1 100644 (file)
@@ -38,7 +38,7 @@ redef class NativeString
        #
        # For more info, SEE setlocale manual
        fun set_locale `{
-               setlocale(LC_ALL, recv);
+               setlocale(LC_ALL, self);
        `}
 end
 
@@ -55,13 +55,13 @@ redef class String
        # Gettext `gettext`, SEE gettext manual for further info
        fun gettext: String
        import String.to_cstring, NativeString.to_s `{
-               return NativeString_to_s(gettext(String_to_cstring(recv)));
+               return NativeString_to_s(gettext(String_to_cstring(self)));
        `}
 
        # Gettext `dgettext`, SEE gettext manual for further info
        fun dgettext(domain: String): String
        import String.to_cstring, NativeString.to_s `{
-               return NativeString_to_s(dgettext(String_to_cstring(domain), String_to_cstring(recv)));
+               return NativeString_to_s(dgettext(String_to_cstring(domain), String_to_cstring(self)));
        `}
 end
 
index cbf851f..6389e09 100644 (file)
@@ -84,7 +84,7 @@ end
 var config = configs.first
 
 # TODO android part
-# Opengles1Display_midway_init(recv, format);
+# Opengles1Display_midway_init(self, format);
 
 var surface = egl_display.create_window_surface(config, x11_window_handle, [0])
 assert surface.is_ok else print egl_display.error
index 5b05f8b..4e71e1f 100644 (file)
@@ -50,15 +50,15 @@ extern class GLProgram `{GLuint`}
        new `{ return glCreateProgram(); `}
 
        # Is this a valid program?
-       fun is_ok: Bool `{ return glIsProgram(recv); `}
+       fun is_ok: Bool `{ return glIsProgram(self); `}
 
        # Attach a `shader` to this program
-       fun attach_shader(shader: GLShader) `{ glAttachShader(recv, shader); `}
+       fun attach_shader(shader: GLShader) `{ glAttachShader(self, shader); `}
 
        # Set the location for the attribute by `name`
        fun bind_attrib_location(index: Int, name: String) import String.to_cstring `{
                GLchar *c_name = String_to_cstring(name);
-               glBindAttribLocation(recv, index, c_name);
+               glBindAttribLocation(self, index, c_name);
        `}
 
        # Get the location of the attribute by `name`
@@ -66,7 +66,7 @@ extern class GLProgram `{GLuint`}
        # Returns `-1` if there is no active attribute named `name`.
        fun attrib_location(name: String): Int import String.to_cstring `{
                GLchar *c_name = String_to_cstring(name);
-               return glGetAttribLocation(recv, c_name);
+               return glGetAttribLocation(self, c_name);
        `}
 
        # Get the location of the uniform by `name`
@@ -74,29 +74,29 @@ extern class GLProgram `{GLuint`}
        # Returns `-1` if there is no active uniform named `name`.
        fun uniform_location(name: String): Int import String.to_cstring `{
                GLchar *c_name = String_to_cstring(name);
-               return glGetUniformLocation(recv, c_name);
+               return glGetUniformLocation(self, c_name);
        `}
 
        # Query information on this program
        fun query(pname: Int): Int `{
                int val;
-               glGetProgramiv(recv, pname, &val);
+               glGetProgramiv(self, pname, &val);
                return val;
        `}
 
        # Try to link this program
        #
        # Check result using `in_linked` and `info_log`.
-       fun link `{ glLinkProgram(recv); `}
+       fun link `{ glLinkProgram(self); `}
 
        # Is this program linked?
        fun is_linked: Bool do return query(0x8B82) != 0
 
        # Use this program for the following operations
-       fun use `{ glUseProgram(recv); `}
+       fun use `{ glUseProgram(self); `}
 
        # Delete this program
-       fun delete `{ glDeleteProgram(recv); `}
+       fun delete `{ glDeleteProgram(self); `}
 
        # Has this program been deleted?
        fun is_deleted: Bool do return query(0x8B80) != 0
@@ -104,7 +104,7 @@ extern class GLProgram `{GLuint`}
        # Validate whether this program can be executed in the current OpenGL state
        #
        # Check results using `is_validated` and `info_log`.
-       fun validate `{ glValidateProgram(recv); `}
+       fun validate `{ glValidateProgram(self); `}
 
        # Boolean result of `validate`, must be called after `validate`
        fun is_validated: Bool do return query(0x8B83) != 0
@@ -114,9 +114,9 @@ extern class GLProgram `{GLuint`}
        # Useful with `link` and `validate`
        fun info_log: String import NativeString.to_s `{
                int size;
-               glGetProgramiv(recv, GL_INFO_LOG_LENGTH, &size);
+               glGetProgramiv(self, GL_INFO_LOG_LENGTH, &size);
                GLchar *msg = malloc(size);
-               glGetProgramInfoLog(recv, size, NULL, msg);
+               glGetProgramInfoLog(self, size, NULL, msg);
                return NativeString_to_s(msg);
        `}
 
@@ -154,7 +154,7 @@ extern class GLProgram `{GLuint`}
                char *name = malloc(max_size);
                int size;
                GLenum type;
-               glGetActiveAttrib(recv, index, max_size, NULL, &size, &type, name);
+               glGetActiveAttrib(self, index, max_size, NULL, &size, &type, name);
                return name;
        `}
 
@@ -162,7 +162,7 @@ extern class GLProgram `{GLuint`}
        fun active_attrib_size(index: Int): Int `{
                int size;
                GLenum type;
-               glGetActiveAttrib(recv, index, 0, NULL, &size, &type, NULL);
+               glGetActiveAttrib(self, index, 0, NULL, &size, &type, NULL);
                return size;
        `}
 
@@ -172,7 +172,7 @@ extern class GLProgram `{GLuint`}
        fun active_attrib_type(index: Int): GLFloatDataType `{
                int size;
                GLenum type;
-               glGetActiveAttrib(recv, index, 0, NULL, &size, &type, NULL);
+               glGetActiveAttrib(self, index, 0, NULL, &size, &type, NULL);
                return type;
        `}
 
@@ -186,7 +186,7 @@ extern class GLProgram `{GLuint`}
                char *name = malloc(max_size);
                int size;
                GLenum type;
-               glGetActiveUniform(recv, index, max_size, NULL, &size, &type, name);
+               glGetActiveUniform(self, index, max_size, NULL, &size, &type, name);
                return name;
        `}
 
@@ -194,7 +194,7 @@ extern class GLProgram `{GLuint`}
        fun active_uniform_size(index: Int): Int `{
                int size;
                GLenum type;
-               glGetActiveUniform(recv, index, 0, NULL, &size, &type, NULL);
+               glGetActiveUniform(self, index, 0, NULL, &size, &type, NULL);
                return size;
        `}
 
@@ -204,7 +204,7 @@ extern class GLProgram `{GLuint`}
        fun active_uniform_type(index: Int): GLDataType `{
                int size;
                GLenum type = 0;
-               glGetActiveUniform(recv, index, 0, NULL, &size, &type, NULL);
+               glGetActiveUniform(self, index, 0, NULL, &size, &type, NULL);
                return type;
        `}
 end
@@ -213,7 +213,7 @@ end
 extern class GLShader `{GLuint`}
        # Set the source of the shader
        fun source=(code: NativeString) `{
-               glShaderSource(recv, 1, (GLchar const **)&code, NULL);
+               glShaderSource(self, 1, (GLchar const **)&code, NULL);
        `}
 
        # Source of the shader, if available
@@ -229,42 +229,42 @@ extern class GLShader `{GLuint`}
 
        private fun source_native(size: Int): NativeString `{
                GLchar *code = malloc(size);
-               glGetShaderSource(recv, size, NULL, code);
+               glGetShaderSource(self, size, NULL, code);
                return code;
        `}
 
        # Query information on this shader
        protected fun query(pname: Int): Int `{
                int val;
-               glGetShaderiv(recv, pname, &val);
+               glGetShaderiv(self, pname, &val);
                return val;
        `}
 
        # Try to compile `source` into a binary GPU program
        #
        # Check the result using `is_compiled` and `info_log`
-       fun compile `{ glCompileShader(recv); `}
+       fun compile `{ glCompileShader(self); `}
 
        # Has this shader been compiled?
        fun is_compiled: Bool do return query(0x8B81) != 0
 
        # Delete this shader
-       fun delete `{ glDeleteShader(recv); `}
+       fun delete `{ glDeleteShader(self); `}
 
        # Has this shader been deleted?
        fun is_deleted: Bool do return query(0x8B80) != 0
 
        # Is this a valid shader?
-       fun is_ok: Bool `{ return glIsShader(recv); `}
+       fun is_ok: Bool `{ return glIsShader(self); `}
 
        # Retrieve the information log of this shader
        #
        # Useful with `link` and `validate`
        fun info_log: String import NativeString.to_s `{
                int size;
-               glGetShaderiv(recv, GL_INFO_LOG_LENGTH, &size);
+               glGetShaderiv(self, GL_INFO_LOG_LENGTH, &size);
                GLchar *msg = malloc(size);
-               glGetShaderInfoLog(recv, size, NULL, msg);
+               glGetShaderInfoLog(self, size, NULL, msg);
                return NativeString_to_s(msg);
        `}
 end
@@ -333,7 +333,7 @@ end
 # General type for OpenGL enumerations
 extern class GLEnum `{ GLenum `}
 
-       redef fun hash `{ return recv; `}
+       redef fun hash `{ return self; `}
 
        redef fun ==(o) do return o != null and is_same_type(o) and o.hash == self.hash
 end
@@ -346,13 +346,13 @@ extern class GLError
        fun is_ok: Bool do return is_no_error
 
        # Is this not an error?
-       fun is_no_error: Bool `{ return recv == GL_NO_ERROR; `}
+       fun is_no_error: Bool `{ return self == GL_NO_ERROR; `}
 
-       fun is_invalid_enum: Bool `{ return recv == GL_INVALID_ENUM; `}
-       fun is_invalid_value: Bool `{ return recv == GL_INVALID_VALUE; `}
-       fun is_invalid_operation: Bool `{ return recv == GL_INVALID_OPERATION; `}
-       fun is_invalid_framebuffer_operation: Bool `{ return recv == GL_INVALID_FRAMEBUFFER_OPERATION; `}
-       fun is_out_of_memory: Bool `{ return recv == GL_OUT_OF_MEMORY; `}
+       fun is_invalid_enum: Bool `{ return self == GL_INVALID_ENUM; `}
+       fun is_invalid_value: Bool `{ return self == GL_INVALID_VALUE; `}
+       fun is_invalid_operation: Bool `{ return self == GL_INVALID_OPERATION; `}
+       fun is_invalid_framebuffer_operation: Bool `{ return self == GL_INVALID_FRAMEBUFFER_OPERATION; `}
+       fun is_out_of_memory: Bool `{ return self == GL_OUT_OF_MEMORY; `}
 
        redef fun to_s
        do
@@ -742,13 +742,13 @@ end
 extern class GLFloatDataType
        super GLEnum
 
-       fun is_float: Bool `{ return recv == GL_FLOAT; `}
-       fun is_float_vec2: Bool `{ return recv == GL_FLOAT_VEC2; `}
-       fun is_float_vec3: Bool `{ return recv == GL_FLOAT_VEC3; `}
-       fun is_float_vec4: Bool `{ return recv == GL_FLOAT_VEC4; `}
-       fun is_float_mat2: Bool `{ return recv == GL_FLOAT_MAT2; `}
-       fun is_float_mat3: Bool `{ return recv == GL_FLOAT_MAT3; `}
-       fun is_float_mat4: Bool `{ return recv == GL_FLOAT_MAT4; `}
+       fun is_float: Bool `{ return self == GL_FLOAT; `}
+       fun is_float_vec2: Bool `{ return self == GL_FLOAT_VEC2; `}
+       fun is_float_vec3: Bool `{ return self == GL_FLOAT_VEC3; `}
+       fun is_float_vec4: Bool `{ return self == GL_FLOAT_VEC4; `}
+       fun is_float_mat2: Bool `{ return self == GL_FLOAT_MAT2; `}
+       fun is_float_mat3: Bool `{ return self == GL_FLOAT_MAT3; `}
+       fun is_float_mat4: Bool `{ return self == GL_FLOAT_MAT4; `}
 
        # Instances of `GLFloatDataType` can be equal to instances of `GLDataType`
        redef fun ==(o)
@@ -764,16 +764,16 @@ end
 extern class GLDataType
        super GLFloatDataType
 
-       fun is_int: Bool `{ return recv == GL_INT; `}
-       fun is_int_vec2: Bool `{ return recv == GL_INT_VEC2; `}
-       fun is_int_vec3: Bool `{ return recv == GL_INT_VEC3; `}
-       fun is_int_vec4: Bool `{ return recv == GL_INT_VEC4; `}
-       fun is_bool: Bool `{ return recv == GL_BOOL; `}
-       fun is_bool_vec2: Bool `{ return recv == GL_BOOL_VEC2; `}
-       fun is_bool_vec3: Bool `{ return recv == GL_BOOL_VEC3; `}
-       fun is_bool_vec4: Bool `{ return recv == GL_BOOL_VEC4; `}
-       fun is_sampler_2d: Bool `{ return recv == GL_SAMPLER_2D; `}
-       fun is_sampler_cube: Bool `{ return recv == GL_SAMPLER_CUBE; `}
+       fun is_int: Bool `{ return self == GL_INT; `}
+       fun is_int_vec2: Bool `{ return self == GL_INT_VEC2; `}
+       fun is_int_vec3: Bool `{ return self == GL_INT_VEC3; `}
+       fun is_int_vec4: Bool `{ return self == GL_INT_VEC4; `}
+       fun is_bool: Bool `{ return self == GL_BOOL; `}
+       fun is_bool_vec2: Bool `{ return self == GL_BOOL_VEC2; `}
+       fun is_bool_vec3: Bool `{ return self == GL_BOOL_VEC3; `}
+       fun is_bool_vec4: Bool `{ return self == GL_BOOL_VEC4; `}
+       fun is_sampler_2d: Bool `{ return self == GL_SAMPLER_2D; `}
+       fun is_sampler_cube: Bool `{ return self == GL_SAMPLER_CUBE; `}
 end
 
 # Kind of primitives to render with `GLES::draw_arrays`
@@ -864,11 +864,11 @@ extern class GLBuffer `{ GLbitfield `}
        new `{ return 0; `}
 
        # Add the color buffer to the returned buffer set
-       fun color: GLBuffer `{ return recv | GL_COLOR_BUFFER_BIT; `}
+       fun color: GLBuffer `{ return self | GL_COLOR_BUFFER_BIT; `}
 
        # Add the depth buffer to the returned buffer set
-       fun depth: GLBuffer `{ return recv | GL_DEPTH_BUFFER_BIT; `}
+       fun depth: GLBuffer `{ return self | GL_DEPTH_BUFFER_BIT; `}
 
        # Add the stencil buffer to the returned buffer set
-       fun stencil: GLBuffer `{ return recv | GL_STENCIL_BUFFER_BIT; `}
+       fun stencil: GLBuffer `{ return self | GL_STENCIL_BUFFER_BIT; `}
 end
index 2ceb2f4..34319dc 100644 (file)
@@ -33,83 +33,83 @@ extern class GtkAssistant `{GtkAssistant *`}
        `}
 
        fun current_page: Int `{
-               return gtk_assistant_get_current_page (recv);
+               return gtk_assistant_get_current_page (self);
        `}
 
        fun current_page=(page_num: Int) `{
-               gtk_assistant_set_current_page(recv, page_num);
+               gtk_assistant_set_current_page(self, page_num);
        `}
 
        fun number_pages: Int `{
-               return gtk_assistant_get_n_pages(recv);
+               return gtk_assistant_get_n_pages(self);
        `}
 
        fun get_page(page_num: Int): GtkWidget `{
-               return gtk_assistant_get_nth_page(recv, page_num);
+               return gtk_assistant_get_nth_page(self, page_num);
        `}
 
        fun prepend(page: GtkWidget): Int `{
-               return gtk_assistant_prepend_page(recv, page);
+               return gtk_assistant_prepend_page(self, page);
        `}
 
        fun append(page: GtkWidget): Int `{
-               return gtk_assistant_append_page(recv, page);
+               return gtk_assistant_append_page(self, page);
        `}
 
        fun insert(page: GtkWidget, position: Int): Int `{
-               return gtk_assistant_insert_page(recv, page, position);
+               return gtk_assistant_insert_page(self, page, position);
        `}
 
        fun remove(page_num: Int) `{
-               gtk_assistant_remove_page(recv, page_num);
+               gtk_assistant_remove_page(self, page_num);
        `}
 
        fun get_page_type(page: GtkWidget): GtkAssistantPageType `{
-               return gtk_assistant_get_page_type(recv, page);
+               return gtk_assistant_get_page_type(self, page);
        `}
 
        fun set_page_type(page: GtkWidget, t: GtkAssistantPageType) `{
-               gtk_assistant_set_page_type(recv, page, t);
+               gtk_assistant_set_page_type(self, page, t);
        `}
 
        fun get_page_title(page: GtkWidget): String import NativeString.to_s `{
-               return NativeString_to_s((char *)gtk_assistant_get_page_title(recv, page));
+               return NativeString_to_s((char *)gtk_assistant_get_page_title(self, page));
        `}
 
        fun set_page_title(page: GtkWidget, title: String) import String.to_cstring `{
-               gtk_assistant_set_page_title(recv, page, String_to_cstring(title));
+               gtk_assistant_set_page_title(self, page, String_to_cstring(title));
        `}
 
        fun set_page_complete(page: GtkWidget, is_complete: Bool) `{
-               gtk_assistant_set_page_complete(recv, page, is_complete);
+               gtk_assistant_set_page_complete(self, page, is_complete);
        `}
 
        fun get_page_complete(page: GtkWidget): Bool `{
-               return gtk_assistant_get_page_complete(recv, page);
+               return gtk_assistant_get_page_complete(self, page);
        `}
 
        fun remove_action_widget(child: GtkWidget) `{
-               gtk_assistant_remove_action_widget(recv, child);
+               gtk_assistant_remove_action_widget(self, child);
        `}
 
        fun add_action_widget(child: GtkWidget) `{
-               gtk_assistant_add_action_widget(recv, child);
+               gtk_assistant_add_action_widget(self, child);
        `}
 
        fun update_buttons_state `{
-               gtk_assistant_update_buttons_state(recv);
+               gtk_assistant_update_buttons_state(self);
        `}
 
        fun commit `{
-               gtk_assistant_commit(recv);
+               gtk_assistant_commit(self);
        `}
 
        fun next_page `{
-               gtk_assistant_next_page(recv);
+               gtk_assistant_next_page(self);
        `}
 
        fun previous_page `{
-               gtk_assistant_previous_page(recv);
+               gtk_assistant_previous_page(self);
        `}
 end
 
index 88e373a..b9929f5 100644 (file)
@@ -62,7 +62,7 @@ end
 # Base class for all widgets
 # See: https://developer.gnome.org/gtk3/stable/GtkWidget.html
 extern class GtkWidget `{GtkWidget *`}
-       fun show_all `{ gtk_widget_show_all(recv); `}
+       fun show_all `{ gtk_widget_show_all(self); `}
 
        fun signal_connect(signal_name: String, to_call: GtkCallable, user_data: nullable Object) import String.to_cstring, GtkCallable.signal, Object.as not nullable `{
                NitGtkSignal *data = malloc(sizeof(NitGtkSignal));
@@ -74,7 +74,7 @@ extern class GtkWidget `{GtkWidget *`}
                data->user_data = user_data;
 
                /*Use G_CALLBACK() to cast the callback function to a GCallback*/
-               g_signal_connect(recv,
+               g_signal_connect(self,
                                 String_to_cstring(signal_name),
                                 G_CALLBACK(nit_gtk_callback_func),
                                 data);
@@ -83,54 +83,54 @@ extern class GtkWidget `{GtkWidget *`}
        redef fun ==(o) do return o isa GtkWidget and equal_to_gtk_widget(o)
 
        private fun equal_to_gtk_widget(o: GtkWidget): Bool `{
-               return recv == o;
+               return self == o;
        `}
 
        fun request_size(width, height: Int) `{
-               gtk_widget_set_size_request(recv, width, height);
+               gtk_widget_set_size_request(self, width, height);
        `}
 
        fun bg_color=(state: GtkStateType, color: GdkRGBA) `{
-               gtk_widget_override_background_color(recv, state, color);
+               gtk_widget_override_background_color(self, state, color);
        `}
 
        # with gtk it's possible to set fg_color to all widget: is it correct? is fg color inherited?
        # GdkColor color;
        fun fg_color=(state: GtkStateType, color: GdkRGBA) `{
-               gtk_widget_override_color(recv, state, color);
+               gtk_widget_override_color(self, state, color);
        `}
 
        # Sets the sensitivity of a widget. sensitive -> the user can interact with it.
        # Insensitive -> widget "grayed out" and the user can"t interact with them
        fun sensitive=(sensitive: Bool) `{
-               gtk_widget_set_sensitive(recv, sensitive);
+               gtk_widget_set_sensitive(self, sensitive);
        `}
 
        # return the sensitivity of the widget
        fun sensitive: Bool `{
-               return gtk_widget_get_sensitive(recv);
+               return gtk_widget_get_sensitive(self);
        `}
 
        # Set the visibility of the widget
        fun visible=(visible: Bool) `{
-               gtk_widget_set_visible(recv, visible);
+               gtk_widget_set_visible(self, visible);
        `}
 
        # Get the visibility of the widget only
        fun visible_self: Bool `{
-               return gtk_widget_get_visible(recv);
+               return gtk_widget_get_visible(self);
        `}
 
        # Destroy the widget
-       fun destroy `{ gtk_widget_destroy(recv); `}
+       fun destroy `{ gtk_widget_destroy(self); `}
 
        # Show the widget on screen
        #
        # See: `show_all` to recursively show this widget and contained widgets.
-       fun show `{ gtk_widget_show(recv); `}
+       fun show `{ gtk_widget_show(self); `}
 
        # Hide the widget (reverse the effects of `show`)
-       fun hide `{ gtk_widget_hide(recv); `}
+       fun hide `{ gtk_widget_hide(self); `}
 end
 
 # Base class for widgets which contain other widgets
@@ -140,21 +140,21 @@ extern class GtkContainer `{GtkContainer *`}
 
        # Add a widget to the container
        fun add(widget: GtkWidget) `{
-               gtk_container_add(recv, widget);
+               gtk_container_add(self, widget);
        `}
        # Remove the widget from the container
        fun remove_widget(widget: GtkWidget) `{
-               gtk_container_remove(recv, widget);
+               gtk_container_remove(self, widget);
        `}
 
        # Get the resize mode of the container
        fun resize_mode: GtkResizeMode `{
-               return gtk_container_get_resize_mode(recv);
+               return gtk_container_get_resize_mode(self);
        `}
 
        # Set the resize mode of the container
        fun resize_mode=(resize_mode: GtkResizeMode) `{
-               gtk_container_set_resize_mode(recv, resize_mode);
+               gtk_container_set_resize_mode(self, resize_mode);
        `}
 
 end
@@ -165,7 +165,7 @@ extern class GtkBin `{GtkBin *`}
        super GtkContainer
 
        fun child: GtkWidget `{
-               return gtk_bin_get_child(recv);
+               return gtk_bin_get_child(self);
        `}
 end
 
@@ -180,11 +180,11 @@ extern class GtkWindow `{GtkWindow *`}
 
        # Connect the "destroy" signal to `quit_gtk`
        fun connect_destroy_signal_to_quit `{
-               g_signal_connect(recv, "destroy", G_CALLBACK(gtk_main_quit), NULL);
+               g_signal_connect(self, "destroy", G_CALLBACK(gtk_main_quit), NULL);
        `}
 
        fun title=(title: String) import String.to_cstring `{
-               gtk_window_set_title(recv, String_to_cstring(title));
+               gtk_window_set_title(self, String_to_cstring(title));
        `}
 
        # The "destroy" signal is emitted when a widget is destroyed, either by explicitly calling gtk_widget_destroy() or when the widget is unparented. Top-level GtkWindows are also destroyed when the Close window control button is clicked.
@@ -194,22 +194,22 @@ extern class GtkWindow `{GtkWindow *`}
        end
 
        fun resizable: Bool `{
-               return gtk_window_get_resizable(recv);
+               return gtk_window_get_resizable(self);
        `}
 
        fun resizable=(is_resizable: Bool) `{
-               return gtk_window_set_resizable(recv, is_resizable);
+               return gtk_window_set_resizable(self, is_resizable);
        `}
 
        # Activates the current focused widget within the window.
        # returns TRUE if a widget got activated.
        fun activate_focus: Bool `{
-               return gtk_window_activate_focus(recv);
+               return gtk_window_activate_focus(self);
        `}
 
        # Sets a window modal or non-modal. Modal windows prevent interaction with other windows in the same application.
        fun modal=(is_modal: Bool) `{
-               gtk_window_set_modal(recv, is_modal);
+               gtk_window_set_modal(self, is_modal);
        `}
 
        # Windows can't actually be 0x0 in size, they must be at least 1x1
@@ -217,78 +217,78 @@ extern class GtkWindow `{GtkWindow *`}
        # params width in pixels, or -1 to unset the default width
        # params height in pixels, or -1 to unset the default height
        fun default_size(width: Int, height: Int) `{
-               gtk_window_set_default_size(recv, width, height);
+               gtk_window_set_default_size(self, width, height);
        `}
 
        # Activates the default widget for the window
        # unless the current focused widget has been configured to receive the default action (see gtk_widget_set_receives_default()), in which case the focused widget is activated.
        fun activate_default: Bool `{
-               return gtk_window_activate_default(recv);
+               return gtk_window_activate_default(self);
        `}
 
        fun gravity: GdkGravity `{
-               return gtk_window_get_gravity(recv);
+               return gtk_window_get_gravity(self);
        `}
 
        fun gravity=(window_grav: GdkGravity) `{
-               gtk_window_set_gravity(recv, window_grav);
+               gtk_window_set_gravity(self, window_grav);
        `}
 
 #      fun position: GtkWindowPosition `{
-#              return gtk_window_get_position(recv);
+#              return gtk_window_get_position(self);
 #      `}
 #
 #      fun position=(window_pos: GtkWindowPosition) `{
-#              gtk_window_set_position(recv, window_pos);
+#              gtk_window_set_position(self, window_pos);
 #      `}
 
        fun active: Bool `{
-               return gtk_window_is_active(recv);
+               return gtk_window_is_active(self);
        `}
 
        # Returns whether the input focus is within this GtkWindow. For real toplevel windows, this is identical to gtk_window_is_active(), but for embedded windows, like GtkPlug, the results will differ.
        fun has_toplevel_focus: Bool `{
-               return gtk_window_has_toplevel_focus(recv);
+               return gtk_window_has_toplevel_focus(self);
        `}
 
        fun get_focus: GtkWidget `{
-               return gtk_window_get_focus(recv);
+               return gtk_window_get_focus(self);
        `}
 
        fun set_focus(widget: GtkWidget) `{
-               return gtk_window_set_focus(recv, widget);
+               return gtk_window_set_focus(self, widget);
        `}
 
        fun get_default_widget: GtkWidget `{
-               return gtk_window_get_default_widget(recv);
+               return gtk_window_get_default_widget(self);
        `}
 
        fun set_default_widget(widget: GtkWidget) `{
-               return gtk_window_set_default(recv, widget);
+               return gtk_window_set_default(self, widget);
        `}
 
        fun maximize `{
-               return gtk_window_maximize(recv);
+               return gtk_window_maximize(self);
        `}
 
        fun unmaximize `{
-               return gtk_window_unmaximize(recv);
+               return gtk_window_unmaximize(self);
        `}
 
        fun fullscreen `{
-               return gtk_window_fullscreen(recv);
+               return gtk_window_fullscreen(self);
        `}
 
        fun unfullscreen `{
-               return gtk_window_unfullscreen(recv);
+               return gtk_window_unfullscreen(self);
        `}
 
        fun keep_above=(setting: Bool) `{
-               gtk_window_set_keep_above(recv, setting);
+               gtk_window_set_keep_above(self, setting);
        `}
 
        fun keep_below=(setting: Bool) `{
-               gtk_window_set_keep_below(recv, setting);
+               gtk_window_set_keep_below(self, setting);
        `}
 end
 
@@ -302,31 +302,31 @@ extern class GtkFrame `{GtkFrame *`}
        `}
 
        fun frame_label: String `{
-               return NativeString_to_s((char *)gtk_frame_get_label(recv));
+               return NativeString_to_s((char *)gtk_frame_get_label(self));
        `}
 
        fun frame_label=(lbl: String) import String.to_cstring `{
-               gtk_frame_set_label(recv, String_to_cstring(lbl));
+               gtk_frame_set_label(self, String_to_cstring(lbl));
        `}
 
        fun label_widget: GtkWidget `{
-               return gtk_frame_get_label_widget(recv);
+               return gtk_frame_get_label_widget(self);
        `}
 
        fun label_widget=(widget: GtkWidget) `{
-               gtk_frame_set_label_widget(recv, widget);
+               gtk_frame_set_label_widget(self, widget);
        `}
 
        fun shadow_type: GtkShadowType `{
-               return gtk_frame_get_shadow_type(recv);
+               return gtk_frame_get_shadow_type(self);
        `}
 
        fun shadow_type=(stype: GtkShadowType) `{
-               gtk_frame_set_shadow_type(recv, stype);
+               gtk_frame_set_shadow_type(self, stype);
        `}
 
        fun label_align=(xalign: Float, yalign: Float) `{
-               gtk_frame_set_label_align(recv, xalign, yalign);
+               gtk_frame_set_label_align(self, xalign, yalign);
        `}
 end
 
@@ -342,22 +342,22 @@ extern class GtkGrid `{GtkGrid *`}
 
        # Set a widget child inside the grid at a given position
        fun attach(child: GtkWidget, left, top, width, height: Int) `{
-               gtk_grid_attach(recv, child, left, top, width, height);
+               gtk_grid_attach(self, child, left, top, width, height);
        `}
 
        # Get the child of the Grid at the given position
        fun get_child_at(left: Int, top: Int): GtkWidget `{
-               return gtk_grid_get_child_at(recv, left, top);
+               return gtk_grid_get_child_at(self, left, top);
        `}
 
        # Insert a row at the specified position
        fun insert_row(position:Int) `{
-               gtk_grid_insert_row(recv, position);
+               gtk_grid_insert_row(self, position);
        `}
 
        # Insert a column at the specified position
        fun insert_column(position: Int) `{
-               gtk_grid_insert_column(recv, position);
+               gtk_grid_insert_column(self, position);
        `}
 end
 
@@ -367,12 +367,12 @@ extern class GtkOrientable `{GtkOrientable *`}
 
        # Get the orientation of this widget
        fun orientation: GtkOrientation `{
-               return gtk_orientable_get_orientation(recv);
+               return gtk_orientable_get_orientation(self);
        `}
 
        # Set the orientation of this widget
        fun orientation=(orientation: GtkOrientation) `{
-               gtk_orientable_set_orientation(recv, orientation);
+               gtk_orientable_set_orientation(self, orientation);
        `}
 end
 
@@ -389,26 +389,26 @@ extern class GtkBox `{ GtkBox * `}
        `}
 
        # Give the children of `self` equal space in the box?
-       fun homogeneous: Bool `{ return gtk_box_get_homogeneous(recv); `}
+       fun homogeneous: Bool `{ return gtk_box_get_homogeneous(self); `}
 
        # Give the children of `self` equal space in the box?
        fun homogeneous=(homogeneous: Bool) `{
-               gtk_box_set_homogeneous(recv, homogeneous);
+               gtk_box_set_homogeneous(self, homogeneous);
        `}
 
        # Add `child` and pack it at the start of the box
        fun pack_start(child: GtkWidget, expand, fill: Bool, padding: Int) `{
-               gtk_box_pack_start(recv, child, expand, fill, padding);
+               gtk_box_pack_start(self, child, expand, fill, padding);
        `}
 
        # Add `child` and pack it at the end of the box
        fun pack_end(child: GtkWidget, expand, fill: Bool, padding: Int) `{
-               gtk_box_pack_end(recv, child, expand, fill, padding);
+               gtk_box_pack_end(self, child, expand, fill, padding);
        `}
 
        # Set the way `child` is packed in `self`
        fun set_child_packing(child: GtkWidget, expand, fill: Bool, padding: Int, packing: GtkPackType) `{
-               gtk_box_set_child_packing(recv, child, expand, fill, padding, packing);
+               gtk_box_set_child_packing(self, child, expand, fill, padding, packing);
        `}
 end
 
@@ -430,13 +430,13 @@ extern class GtkMisc `{GtkMisc *`}
        fun alignment: GtkAlignment is abstract
 
        fun alignment=(x: Float, y: Float) `{
-               gtk_misc_set_alignment(recv, x, y);
+               gtk_misc_set_alignment(self, x, y);
        `}
 
        fun padding: GtkAlignment is abstract
 
        fun padding=(x: Float, y: Float) `{
-               gtk_misc_set_padding(recv, x, y);
+               gtk_misc_set_padding(self, x, y);
        `}
 
 end
@@ -451,30 +451,30 @@ extern class GtkEntry `{GtkEntry *`}
        `}
 
        fun text: String import NativeString.to_s_with_copy `{
-               return NativeString_to_s_with_copy((char *)gtk_entry_get_text(recv));
+               return NativeString_to_s_with_copy((char *)gtk_entry_get_text(self));
        `}
 
        fun text=(value: String) import String.to_cstring `{
-               gtk_entry_set_text(recv, String_to_cstring(value));
+               gtk_entry_set_text(self, String_to_cstring(value));
        `}
 
        # Is the text visible or is it the invisible char (such as '*')?
        fun visiblility: Bool `{
-               return gtk_entry_get_visibility(recv);
+               return gtk_entry_get_visibility(self);
        `}
 
        # Set the text visiblility
        # If false, will use the invisible char (such as '*')
        fun visibility=(is_visible: Bool) `{
-               gtk_entry_set_visibility(recv, is_visible);
+               gtk_entry_set_visibility(self, is_visible);
        `}
 
        fun max_length: Int `{
-               return gtk_entry_get_max_length(recv);
+               return gtk_entry_get_max_length(self);
        `}
 
        fun max_length=(max: Int) `{
-               gtk_entry_set_max_length(recv, max);
+               gtk_entry_set_max_length(self, max);
        `}
 end
 
@@ -485,93 +485,93 @@ extern class GtkRange `{GtkRange *`}
 
        # Gets the current position of the fill level indicator.
        fun fill_level: Float `{
-               return gtk_range_get_fill_level(recv);
+               return gtk_range_get_fill_level(self);
        `}
 
        fun fill_level=(level: Float) `{
-               gtk_range_set_fill_level(recv, level);
+               gtk_range_set_fill_level(self, level);
        `}
 
        # Gets whether the range is restricted to the fill level.
        fun restricted_to_fill_level: Bool `{
-               return gtk_range_get_restrict_to_fill_level(recv);
+               return gtk_range_get_restrict_to_fill_level(self);
        `}
 
        fun restricted_to_fill_level=(restricted: Bool) `{
-               gtk_range_set_restrict_to_fill_level(recv, restricted);
+               gtk_range_set_restrict_to_fill_level(self, restricted);
        `}
 
        # Gets whether the range displays the fill level graphically.
        fun show_fill_level: Bool `{
-               return gtk_range_get_show_fill_level(recv);
+               return gtk_range_get_show_fill_level(self);
        `}
 
        fun show_fill_level=(is_displayed: Bool) `{
-               gtk_range_set_show_fill_level(recv, is_displayed);
+               gtk_range_set_show_fill_level(self, is_displayed);
        `}
 
        fun adjustment: GtkAdjustment `{
-               return gtk_range_get_adjustment(recv);
+               return gtk_range_get_adjustment(self);
        `}
 
        fun adjustment=(value: GtkAdjustment) `{
-               gtk_range_set_adjustment(recv, value);
+               gtk_range_set_adjustment(self, value);
        `}
 
        fun inverted: Bool `{
-               return gtk_range_get_inverted(recv);
+               return gtk_range_get_inverted(self);
        `}
 
        fun inverted=(setting: Bool) `{
-               gtk_range_set_inverted(recv, setting);
+               gtk_range_set_inverted(self, setting);
        `}
 
        fun value: Float `{
-               return gtk_range_get_value(recv);
+               return gtk_range_get_value(self);
        `}
 
        fun value=(val: Float) `{
-               gtk_range_set_value(recv, val);
+               gtk_range_set_value(self, val);
        `}
 
        fun set_increments(step: Float, page: Float) `{
-               gtk_range_set_increments(recv, step, page);
+               gtk_range_set_increments(self, step, page);
        `}
 
        fun set_range(min: Float, max: Float) `{
-               gtk_range_set_range(recv, min, max);
+               gtk_range_set_range(self, min, max);
        `}
 
        fun round_digits: Int `{
-               return gtk_range_get_round_digits(recv);
+               return gtk_range_get_round_digits(self);
        `}
 
        fun round_digits=(nb: Int) `{
-               gtk_range_set_round_digits(recv, nb);
+               gtk_range_set_round_digits(self, nb);
        `}
 
        fun size_fixed: Bool `{
-               return gtk_range_get_slider_size_fixed(recv);
+               return gtk_range_get_slider_size_fixed(self);
        `}
 
        fun size_fixed=(is_fixed: Bool) `{
-               return gtk_range_set_slider_size_fixed(recv, is_fixed);
+               return gtk_range_set_slider_size_fixed(self, is_fixed);
        `}
 
        fun flippable: Bool `{
-               return gtk_range_get_flippable(recv);
+               return gtk_range_get_flippable(self);
        `}
 
        fun min_size=(is_flippable: Bool) `{
-               return gtk_range_set_flippable(recv, is_flippable);
+               return gtk_range_set_flippable(self, is_flippable);
        `}
 
        fun min_slider_size: Int `{
-               return gtk_range_get_min_slider_size(recv);
+               return gtk_range_get_min_slider_size(self);
        `}
 
        fun min_slider_size=(size: Int) `{
-               return gtk_range_set_min_slider_size(recv, size);
+               return gtk_range_set_min_slider_size(self, size);
        `}
 end
 
@@ -589,45 +589,45 @@ extern class GtkScale `{GtkScale *`}
        `}
 
        fun digits: Int `{
-               return gtk_scale_get_digits(recv);
+               return gtk_scale_get_digits(self);
        `}
 
        fun digits=(nb_digits: Int) `{
-               gtk_scale_set_digits(recv, nb_digits);
+               gtk_scale_set_digits(self, nb_digits);
        `}
 
        fun draw_value: Bool `{
-               return gtk_scale_get_draw_value(recv);
+               return gtk_scale_get_draw_value(self);
        `}
 
        fun draw_value=(is_displayed: Bool) `{
-               gtk_scale_set_draw_value(recv, is_displayed);
+               gtk_scale_set_draw_value(self, is_displayed);
        `}
 
        fun value_position: GtkPositionType `{
-               return gtk_scale_get_value_pos(recv);
+               return gtk_scale_get_value_pos(self);
        `}
 
        fun value_position=(pos: GtkPositionType) `{
-               gtk_scale_set_value_pos(recv, pos);
+               gtk_scale_set_value_pos(self, pos);
        `}
 
        fun has_origin: Bool `{
-               return gtk_scale_get_has_origin(recv);
+               return gtk_scale_get_has_origin(self);
        `}
 
        fun has_origin=(orig: Bool) `{
-               gtk_scale_set_has_origin(recv, orig);
+               gtk_scale_set_has_origin(self, orig);
        `}
 
        fun add_mark(value: Float, position: GtkPositionType, markup: String)
        import String.to_cstring `{
-               gtk_scale_add_mark(recv, value, position, String_to_cstring(markup));
+               gtk_scale_add_mark(self, value, position, String_to_cstring(markup));
        `}
 
        # Removes any marks that have been added with gtk_scale_add_mark().
        fun clear_marks `{
-               gtk_scale_clear_marks(recv);
+               gtk_scale_clear_marks(self);
        `}
 end
 
@@ -653,23 +653,23 @@ extern class GtkLabel `{GtkLabel *`}
 
        # Set the text of the label
        fun text=(text: String) import String.to_cstring `{
-               gtk_label_set_text(recv, String_to_cstring(text));
+               gtk_label_set_text(self, String_to_cstring(text));
        `}
 
        # Returns the text of the label
        fun text: String import NativeString.to_s `{
-               return NativeString_to_s((char*)gtk_label_get_text(recv));
+               return NativeString_to_s((char*)gtk_label_get_text(self));
        `}
 
        # Sets the angle of rotation for the label.
        # An angle of 90 reads from from bottom to top, an angle of 270, from top to bottom.
        fun angle=(degre: Float) `{
-               gtk_label_set_angle(recv, degre);
+               gtk_label_set_angle(self, degre);
        `}
 
        # Returns the angle of rotation for the label.
        fun angle: Float `{
-               return gtk_label_get_angle(recv);
+               return gtk_label_get_angle(self);
        `}
 
 end
@@ -690,15 +690,15 @@ extern class GtkImage `{GtkImage *`}
        `}
 
        fun pixel_size: Int `{
-               return gtk_image_get_pixel_size(recv);
+               return gtk_image_get_pixel_size(self);
        `}
 
        fun pixel_size=(size: Int) `{
-               gtk_image_set_pixel_size(recv, size);
+               gtk_image_set_pixel_size(self, size);
        `}
 
        fun clear `{
-               gtk_image_clear(recv);
+               gtk_image_clear(self);
        `}
 end
 
@@ -738,7 +738,7 @@ extern class GtkArrow `{GtkArrow *`}
        `}
 
        fun set(arrow_type: GtkArrowType, shadow_type: GtkShadowType) `{
-               gtk_arrow_set(recv, arrow_type, shadow_type);
+               gtk_arrow_set(self, arrow_type, shadow_type);
        `}
 end
 
@@ -761,11 +761,11 @@ extern class GtkButton `{GtkButton *`}
        `}
 
        fun text: String `{
-               return NativeString_to_s((char *)gtk_button_get_label(recv));
+               return NativeString_to_s((char *)gtk_button_get_label(self));
        `}
 
        fun text=(value: String) import String.to_cstring `{
-               gtk_button_set_label(recv, String_to_cstring(value));
+               gtk_button_set_label(self, String_to_cstring(value));
        `}
 
        fun on_click(to_call: GtkCallable, user_data: nullable Object) do
@@ -809,67 +809,67 @@ extern class GtkExpander `{GtkExpander *`}
        `}
 
        fun expanded: Bool `{
-               return gtk_expander_get_expanded(recv);
+               return gtk_expander_get_expanded(self);
        `}
 
        fun expanded=(is_expanded: Bool) `{
-               gtk_expander_set_expanded(recv, is_expanded);
+               gtk_expander_set_expanded(self, is_expanded);
        `}
 
        fun spacing: Int `{
-               return gtk_expander_get_spacing(recv);
+               return gtk_expander_get_spacing(self);
        `}
 
        fun spacing=(pixels: Int) `{
-               gtk_expander_set_spacing(recv, pixels);
+               gtk_expander_set_spacing(self, pixels);
        `}
 
        fun label_text: String `{
-               return NativeString_to_s((char *)gtk_expander_get_label(recv));
+               return NativeString_to_s((char *)gtk_expander_get_label(self));
        `}
 
        fun label_text=(lbl: String) import String.to_cstring `{
-               gtk_expander_set_label(recv, String_to_cstring(lbl));
+               gtk_expander_set_label(self, String_to_cstring(lbl));
        `}
 
        fun use_underline: Bool `{
-               return gtk_expander_get_use_underline(recv);
+               return gtk_expander_get_use_underline(self);
        `}
 
        fun use_underline=(used: Bool) `{
-               gtk_expander_set_use_underline(recv, used);
+               gtk_expander_set_use_underline(self, used);
        `}
 
        fun use_markup: Bool `{
-               return gtk_expander_get_use_markup(recv);
+               return gtk_expander_get_use_markup(self);
        `}
 
        fun use_markup=(used: Bool) `{
-                gtk_expander_set_use_markup(recv, used);
+                gtk_expander_set_use_markup(self, used);
        `}
 
        fun label_widget: GtkWidget `{
-               return gtk_expander_get_label_widget(recv);
+               return gtk_expander_get_label_widget(self);
        `}
 
        fun label_widget=(widget: GtkWidget) `{
-               gtk_expander_set_label_widget(recv, widget);
+               gtk_expander_set_label_widget(self, widget);
        `}
 
        fun label_fill: Bool `{
-               return gtk_expander_get_label_fill(recv);
+               return gtk_expander_get_label_fill(self);
        `}
 
        fun label_fill=(fill: Bool) `{
-               gtk_expander_set_label_fill(recv, fill);
+               gtk_expander_set_label_fill(self, fill);
        `}
 
        fun resize_toplevel: Bool `{
-               return gtk_expander_get_resize_toplevel(recv);
+               return gtk_expander_get_resize_toplevel(self);
        `}
 
        fun resize_toplevel=(resize: Bool) `{
-               gtk_expander_set_resize_toplevel(recv, resize);
+               gtk_expander_set_resize_toplevel(self, resize);
        `}
 
 end
@@ -904,87 +904,87 @@ extern class GtkComboBox `{GtkComboBox *`}
        `}
 
        fun wrap_width: Int `{
-               return gtk_combo_box_get_wrap_width(recv);
+               return gtk_combo_box_get_wrap_width(self);
        `}
 
        fun wrap_width=(width: Int) `{
-               gtk_combo_box_set_wrap_width(recv, width);
+               gtk_combo_box_set_wrap_width(self, width);
        `}
 
        fun row_span_col: Int `{
-               return gtk_combo_box_get_row_span_column(recv);
+               return gtk_combo_box_get_row_span_column(self);
        `}
 
        fun row_span_col=(row_span: Int) `{
-               gtk_combo_box_set_row_span_column(recv, row_span);
+               gtk_combo_box_set_row_span_column(self, row_span);
        `}
 
        fun col_span_col: Int `{
-               return gtk_combo_box_get_column_span_column(recv);
+               return gtk_combo_box_get_column_span_column(self);
        `}
 
        fun col_span_col=(col_span: Int) `{
-               gtk_combo_box_set_column_span_column(recv, col_span);
+               gtk_combo_box_set_column_span_column(self, col_span);
        `}
 
        fun active_item: Int `{
-               return gtk_combo_box_get_active(recv);
+               return gtk_combo_box_get_active(self);
        `}
 
        fun active_item=(active: Int) `{
-               gtk_combo_box_set_active(recv, active);
+               gtk_combo_box_set_active(self, active);
        `}
 
        fun column_id: Int `{
-               return gtk_combo_box_get_id_column(recv);
+               return gtk_combo_box_get_id_column(self);
        `}
 
        fun column_id=(id_column: Int) `{
-               gtk_combo_box_set_id_column(recv, id_column);
+               gtk_combo_box_set_id_column(self, id_column);
        `}
 
        fun active_id: String `{
-               return NativeString_to_s((char *)gtk_combo_box_get_active_id(recv));
+               return NativeString_to_s((char *)gtk_combo_box_get_active_id(self));
        `}
 
        fun active_id=(id_active: String) import String.to_cstring `{
-               gtk_combo_box_set_active_id(recv, String_to_cstring(id_active));
+               gtk_combo_box_set_active_id(self, String_to_cstring(id_active));
        `}
 
        fun model: GtkTreeModel `{
-               return gtk_combo_box_get_model(recv);
+               return gtk_combo_box_get_model(self);
        `}
 
        fun model=(model: GtkTreeModel) `{
-               gtk_combo_box_set_model(recv, model);
+               gtk_combo_box_set_model(self, model);
        `}
 
        fun popup `{
-               gtk_combo_box_popup(recv);
+               gtk_combo_box_popup(self);
        `}
 
        fun popdown `{
-               gtk_combo_box_popdown(recv);
+               gtk_combo_box_popdown(self);
        `}
 
        fun title: String `{
-               return NativeString_to_s((char *)gtk_combo_box_get_title(recv));
+               return NativeString_to_s((char *)gtk_combo_box_get_title(self));
        `}
 
        fun title=(t: String) import String.to_cstring `{
-               gtk_combo_box_set_title(recv, String_to_cstring(t));
+               gtk_combo_box_set_title(self, String_to_cstring(t));
        `}
 
        fun has_entry: Bool `{
-               return gtk_combo_box_get_has_entry(recv);
+               return gtk_combo_box_get_has_entry(self);
        `}
 
        fun with_fixed: Bool `{
-               return gtk_combo_box_get_popup_fixed_width(recv);
+               return gtk_combo_box_get_popup_fixed_width(self);
        `}
 
        fun with_fixed=(fixed: Bool) `{
-               gtk_combo_box_set_popup_fixed_width(recv, fixed);
+               gtk_combo_box_set_popup_fixed_width(self, fixed);
        `}
 end
 
@@ -998,11 +998,11 @@ extern class GtkSpinner `{GtkSpinner *`}
        `}
 
        fun start `{
-               return gtk_spinner_start(recv);
+               return gtk_spinner_start(self);
        `}
 
        fun stop `{
-               return gtk_spinner_stop(recv);
+               return gtk_spinner_stop(self);
        `}
 end
 
@@ -1016,11 +1016,11 @@ extern class GtkSwitch `{GtkSwitch *`}
        `}
 
        fun active: Bool `{
-               return gtk_switch_get_active(recv);
+               return gtk_switch_get_active(self);
        `}
 
        fun active=(is_active: Bool) `{
-               return gtk_switch_set_active(recv, is_active);
+               return gtk_switch_set_active(self, is_active);
        `}
 end
 
@@ -1034,7 +1034,7 @@ extern class GtkAlignment `{GtkAlignment *`}
        `}
 
        fun set (xalign: Float, yalign: Float, xscale: Float, yscale: Float) `{
-               gtk_alignment_set(recv, xalign, yalign, xscale, yscale);
+               gtk_alignment_set(self, xalign, yalign, xscale, yscale);
        `}
 
 end
index f97ce3a..d4ff95f 100644 (file)
@@ -39,7 +39,7 @@ extern class GtkDialog `{GtkDialog *`}
        `}
 
        fun run `{
-               gtk_dialog_run(recv);
+               gtk_dialog_run(self);
        `}
 end
 
@@ -53,71 +53,71 @@ extern class GtkAboutDialog `{GtkAboutDialog *`}
        `}
 
        fun program_name: String import NativeString.to_s `{
-               return NativeString_to_s((char *)gtk_about_dialog_get_program_name(recv));
+               return NativeString_to_s((char *)gtk_about_dialog_get_program_name(self));
        `}
 
        fun program_name=(name: String) import String.to_cstring `{
-               gtk_about_dialog_set_program_name(recv, String_to_cstring(name));
+               gtk_about_dialog_set_program_name(self, String_to_cstring(name));
        `}
 
        fun version: String import NativeString.to_s `{
-               return NativeString_to_s((char *)gtk_about_dialog_get_version(recv));
+               return NativeString_to_s((char *)gtk_about_dialog_get_version(self));
        `}
 
        fun version=(v: String) import String.to_cstring `{
-               gtk_about_dialog_set_version(recv, String_to_cstring(v));
+               gtk_about_dialog_set_version(self, String_to_cstring(v));
        `}
 
        fun copyright: String import NativeString.to_s `{
-               return NativeString_to_s((char *)gtk_about_dialog_get_copyright(recv));
+               return NativeString_to_s((char *)gtk_about_dialog_get_copyright(self));
        `}
 
        fun copyright=(c: String) import String.to_cstring `{
-               gtk_about_dialog_set_copyright(recv, String_to_cstring(c));
+               gtk_about_dialog_set_copyright(self, String_to_cstring(c));
        `}
 
        fun comments: String import NativeString.to_s `{
-               return NativeString_to_s((char *)gtk_about_dialog_get_comments(recv));
+               return NativeString_to_s((char *)gtk_about_dialog_get_comments(self));
        `}
 
        fun comments=(com: String) import String.to_cstring `{
-               gtk_about_dialog_set_comments(recv, String_to_cstring(com));
+               gtk_about_dialog_set_comments(self, String_to_cstring(com));
        `}
 
        fun license: String import NativeString.to_s `{
-               return NativeString_to_s((char *)gtk_about_dialog_get_license(recv));
+               return NativeString_to_s((char *)gtk_about_dialog_get_license(self));
        `}
 
        fun license=(li: String) import String.to_cstring `{
-               gtk_about_dialog_set_license(recv, String_to_cstring(li));
+               gtk_about_dialog_set_license(self, String_to_cstring(li));
        `}
 
        # license_type
 
        fun website: String import NativeString.to_s `{
-               return NativeString_to_s((char *)gtk_about_dialog_get_website(recv));
+               return NativeString_to_s((char *)gtk_about_dialog_get_website(self));
        `}
 
        fun website=(link: String) import String.to_cstring `{
-               gtk_about_dialog_set_website(recv, String_to_cstring(link));
+               gtk_about_dialog_set_website(self, String_to_cstring(link));
        `}
 
        fun website_label: String import NativeString.to_s `{
-               return NativeString_to_s((char *) gtk_about_dialog_get_website_label(recv));
+               return NativeString_to_s((char *) gtk_about_dialog_get_website_label(self));
        `}
 
        fun website_label=(link_label: String) import String.to_cstring `{
-               gtk_about_dialog_set_website_label(recv, String_to_cstring(link_label));
+               gtk_about_dialog_set_website_label(self, String_to_cstring(link_label));
        `}
 
        # TODO
        # fun authors: String`{
-       #               return NativeString_to_s(gtk_about_dialog_get_authors(recv));
+       #               return NativeString_to_s(gtk_about_dialog_get_authors(self));
        # `}
 
        # TODO
        # fun authors=(authors_list: String) import String.to_cstring`{
-       #       gtk_about_dialog_set_authors(recv, String_to_cstring(authors_list));
+       #       gtk_about_dialog_set_authors(self, String_to_cstring(authors_list));
        # `}
 
        fun show_about_dialog(parent: GtkWindow, params: String)
@@ -142,14 +142,14 @@ extern class GtkAppChooserDialog `{GtkAppChooserDialog *`}
                        parent, flags, String_to_cstring(content_type));
        `}
 
-       fun widget: GtkWidget `{ return gtk_app_chooser_dialog_get_widget(recv); `}
+       fun widget: GtkWidget `{ return gtk_app_chooser_dialog_get_widget(self); `}
 
        fun heading: String import NativeString.to_s `{
-               return NativeString_to_s((char *)gtk_app_chooser_dialog_get_heading(recv));
+               return NativeString_to_s((char *)gtk_app_chooser_dialog_get_heading(self));
        `}
 
        fun heading=(text: String) import String.to_cstring `{
-               gtk_app_chooser_dialog_set_heading(recv, String_to_cstring(text));
+               gtk_app_chooser_dialog_set_heading(self, String_to_cstring(text));
        `}
 
 end
index 2a98464..e114d9d 100644 (file)
@@ -29,36 +29,36 @@ extern class GtkCalendar `{GtkCalendar *`}
        `}
 
        fun month=(month: Int, year: Int) `{
-               gtk_calendar_select_month(recv, month, year);
+               gtk_calendar_select_month(self, month, year);
        `}
 
        fun day=(day: Int) `{
-               gtk_calendar_select_day(recv, day);
+               gtk_calendar_select_day(self, day);
        `}
 
        fun mark_day(day: Int) `{
-               gtk_calendar_mark_day(recv, day);
+               gtk_calendar_mark_day(self, day);
        `}
 
        fun unmark_day(day: Int) `{
-               gtk_calendar_unmark_day(recv, day);
+               gtk_calendar_unmark_day(self, day);
        `}
 
        fun is_marked(day: Int): Bool `{
-               return gtk_calendar_get_day_is_marked(recv, day);
+               return gtk_calendar_get_day_is_marked(self, day);
        `}
 
    fun clear_marks `{
-               gtk_calendar_clear_marks(recv);
+               gtk_calendar_clear_marks(self);
        `}
 
        fun display_options: GtkCalendarDisplayOptions `{
-               return gtk_calendar_get_display_options(recv);
+               return gtk_calendar_get_display_options(self);
        `}
 
 
        fun display_options=(options: GtkCalendarDisplayOptions) `{
-               gtk_calendar_set_display_options(recv, options);
+               gtk_calendar_set_display_options(self, options);
        `}
 
        # date en nit...
@@ -96,47 +96,47 @@ extern class GtkProgressBar `{GtkProgressBar *`}
        `}
 
        fun pulse `{
-               gtk_progress_bar_pulse(recv);
+               gtk_progress_bar_pulse(self);
        `}
 
        fun pulse_step: Float `{
-               return gtk_progress_bar_get_pulse_step(recv);
+               return gtk_progress_bar_get_pulse_step(self);
        `}
 
        fun pulse_step=(step: Float) `{
-               gtk_progress_bar_set_pulse_step(recv, step);
+               gtk_progress_bar_set_pulse_step(self, step);
        `}
 
        fun fraction: Float `{
-               return gtk_progress_bar_get_fraction(recv);
+               return gtk_progress_bar_get_fraction(self);
        `}
 
        fun fraction=(fraction: Float) `{
-               gtk_progress_bar_set_fraction(recv, fraction);
+               gtk_progress_bar_set_fraction(self, fraction);
        `}
 
        fun inverted: Bool `{
-               return gtk_progress_bar_get_inverted(recv);
+               return gtk_progress_bar_get_inverted(self);
        `}
 
        fun inverted=(is_inverted: Bool) `{
-               gtk_progress_bar_set_inverted(recv, is_inverted);
+               gtk_progress_bar_set_inverted(self, is_inverted);
        `}
 
        fun show_text: Bool `{
-               return gtk_progress_bar_get_show_text(recv);
+               return gtk_progress_bar_get_show_text(self);
        `}
 
        fun show_text=(show: Bool) `{
-               gtk_progress_bar_set_show_text(recv, show);
+               gtk_progress_bar_set_show_text(self, show);
        `}
 
        fun text: String import NativeString.to_s `{
-               return NativeString_to_s((char *)gtk_progress_bar_get_text(recv));
+               return NativeString_to_s((char *)gtk_progress_bar_get_text(self));
        `}
 
        fun text=(value: String) import String.to_cstring `{
-               gtk_progress_bar_set_text(recv, String_to_cstring(value));
+               gtk_progress_bar_set_text(self, String_to_cstring(value));
        `}
 
        fun ellipsize is abstract
@@ -150,11 +150,11 @@ extern class GtkColorSelectionDialog
        `}
 
        # fun color_selection:  `{
-       #       return gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(recv));
+       #       return gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(self));
        # `}
 
        # fun color: Float `{
-       #       return gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(recv));
+       #       return gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(self));
        # `}
 end
 
@@ -172,35 +172,35 @@ extern class GtkSpinButton `{GtkSpinButton *`}
        `}
 
        fun configure (adjustment: GtkAdjustment, climb_rate: Float, digits: Int) `{
-               gtk_spin_button_configure(recv, adjustment, climb_rate, digits);
+               gtk_spin_button_configure(self, adjustment, climb_rate, digits);
        `}
 
        fun adjustment: GtkAdjustment `{
-               return gtk_spin_button_get_adjustment(recv);
+               return gtk_spin_button_get_adjustment(self);
        `}
 
        fun adjustment=(value: GtkAdjustment) `{
-               gtk_spin_button_set_adjustment(recv, value);
+               gtk_spin_button_set_adjustment(self, value);
        `}
 
        fun digits: Int `{
-               return gtk_spin_button_get_digits(recv);
+               return gtk_spin_button_get_digits(self);
        `}
 
        fun digits=(nb_digits: Int) `{
-               gtk_spin_button_set_digits(recv, nb_digits);
+               gtk_spin_button_set_digits(self, nb_digits);
        `}
 
        fun value: Float `{
-               return gtk_spin_button_get_value(recv);
+               return gtk_spin_button_get_value(self);
        `}
 
        fun val=(val: Float) `{
-               gtk_spin_button_set_value(recv, val);
+               gtk_spin_button_set_value(self, val);
        `}
 
        fun spin(direction: GtkSpinType, increment: Float)`{
-               gtk_spin_button_spin(recv, direction, increment);
+               gtk_spin_button_spin(self, direction, increment);
        `}
 end
 
index ec2de93..be3cd50 100644 (file)
@@ -35,14 +35,14 @@ redef extern class GtkEntry
        #
        # Can be used by on-screen keyboards and other input methods to adjust their behaviour.
        fun input_purpose: GtkInputPurpose `{
-               return gtk_entry_get_input_purpose(recv);
+               return gtk_entry_get_input_purpose(self);
        `}
 
        # Input purpose, tweaks the behavior of this widget
        #
        # Can be used by on-screen keyboards and other input methods to adjust their behaviour.
        fun input_purpose=(purpose: GtkInputPurpose) `{
-               gtk_entry_set_input_purpose(recv, purpose);
+               gtk_entry_set_input_purpose(self, purpose);
        `}
 end
 
index 16b4167..71d481f 100644 (file)
@@ -22,6 +22,6 @@ import v3_6
 redef class GtkWidget
        # Get the visibility of the widget, check if it's parents are visible too
        fun visible: Bool `{
-               return gtk_widget_is_visible(recv);
+               return gtk_widget_is_visible(self);
        `}
 end
index 0e337bc..c90c05b 100644 (file)
@@ -115,8 +115,8 @@ redef class App
 
        # Register `self` globally in C so it can be retrieved from iOS callbacks
        private fun register_globally in "ObjC" `{
-               App_incr_ref(recv);
-               app_nit_ios_app = recv;
+               App_incr_ref(self);
+               app_nit_ios_app = self;
        `}
 
        # Entry point to the iOS framework
index 3269906..5a50230 100644 (file)
@@ -37,17 +37,17 @@ redef class AppDelegate
                NSLog(@"Hello World!");
 
                // Display "Hello world!" on the screen
-               recv.window = [[UIWindow alloc] initWithFrame:
+               self.window = [[UIWindow alloc] initWithFrame:
                [[UIScreen mainScreen] bounds]];
-               recv.window.backgroundColor = [UIColor whiteColor];
+               self.window.backgroundColor = [UIColor whiteColor];
 
                UILabel *label = [[UILabel alloc] init];
                label.text = @"Hello World!";
                label.center = CGPointMake(100, 100);
                [label sizeToFit];
 
-               [recv.window addSubview: label];
-               [recv.window makeKeyAndVisible];
+               [self.window addSubview: label];
+               [self.window makeKeyAndVisible];
 
                return YES;
        `}
index 4da0250..37f822e 100644 (file)
@@ -56,11 +56,11 @@ extern class JavaFloatArray in "Java" `{ float[] `}
        # Get a new array of the given `size`
        new(size: Int) in "Java" `{ return new float[(int)size]; `}
 
-       redef fun [](i) in "Java" `{ return (double)recv[(int)i]; `}
+       redef fun [](i) in "Java" `{ return (double)self[(int)i]; `}
 
-       redef fun []=(i, e) in "Java" `{ recv[(int)i] = (float)e; `}
+       redef fun []=(i, e) in "Java" `{ self[(int)i] = (float)e; `}
 
-       redef fun length in "Java" `{ return recv.length; `}
+       redef fun length in "Java" `{ return self.length; `}
 end
 
 # Java primitive array `double[]`
@@ -70,11 +70,11 @@ extern class JavaDoubleArray in "Java" `{ double[] `}
        # Get a new array of the given `size`
        new(size: Int) in "Java" `{ return new double[(int)size]; `}
 
-       redef fun [](i) in "Java" `{ return recv[(int)i]; `}
+       redef fun [](i) in "Java" `{ return self[(int)i]; `}
 
-       redef fun []=(i, e) in "Java" `{ recv[(int)i] = (float)e; `}
+       redef fun []=(i, e) in "Java" `{ self[(int)i] = (float)e; `}
 
-       redef fun length in "Java" `{ return recv.length; `}
+       redef fun length in "Java" `{ return self.length; `}
 end
 
 # Java primitive array `Object[]`
@@ -84,11 +84,11 @@ extern class JavaArray in "Java" `{ java.lang.Object[] `}
        # Get a new array of the given `size`
        new(size: Int) in "Java" `{ return new Object[(int)size]; `}
 
-       redef fun [](i) in "Java" `{ return recv[(int)i]; `}
+       redef fun [](i) in "Java" `{ return self[(int)i]; `}
 
-       redef fun []=(i, e) in "Java" `{ recv[(int)i] = e; `}
+       redef fun []=(i, e) in "Java" `{ self[(int)i] = e; `}
 
-       redef fun length in "Java" `{ return recv.length; `}
+       redef fun length in "Java" `{ return self.length; `}
 end
 
 # TODO other primitive arrays:
index 4ab4eab..6731c85 100644 (file)
@@ -33,45 +33,45 @@ in "Java" `{
 extern class NativeFile in "Java" `{ java.io.File `}
        super JavaObject
 
-       fun can_execute: Bool in "Java" `{ return recv.canExecute(); `}
-       fun can_read: Bool in "Java" `{ return recv.canRead(); `}
-       fun can_write: Bool in "Java" `{ return recv.canWrite(); `}
+       fun can_execute: Bool in "Java" `{ return self.canExecute(); `}
+       fun can_read: Bool in "Java" `{ return self.canRead(); `}
+       fun can_write: Bool in "Java" `{ return self.canWrite(); `}
        fun create_file: Bool in "Java" `{
                try {
-                       return recv.createNewFile();
+                       return self.createNewFile();
                }catch(IOException e){
                        e.printStackTrace();
                        return false;
                }
        `}
-       fun delete: Bool in "Java" `{ return recv.delete(); `}
-       fun delete_on_exit in "Java" `{ recv.deleteOnExit(); `}
-       fun exists: Bool in "Java" `{ return recv.exists(); `}
-       fun absolute_file: NativeFile in "Java" `{ return recv.getAbsoluteFile(); `}
-       fun absolute_path: JavaString in "Java" `{ return recv.getAbsolutePath(); `}
+       fun delete: Bool in "Java" `{ return self.delete(); `}
+       fun delete_on_exit in "Java" `{ self.deleteOnExit(); `}
+       fun exists: Bool in "Java" `{ return self.exists(); `}
+       fun absolute_file: NativeFile in "Java" `{ return self.getAbsoluteFile(); `}
+       fun absolute_path: JavaString in "Java" `{ return self.getAbsolutePath(); `}
        fun canonical_file: NativeFile in "Java" `{
                try {
-                       return recv.getCanonicalFile();
+                       return self.getCanonicalFile();
                }catch(IOException e){
                        e.printStackTrace();
                        return null;
                }
        `}
-       fun free_space: Int in "Java" `{ return (int)recv.getFreeSpace(); `}
-       fun name: JavaString in "Java" `{ return recv.getName(); `}
-       fun parent: JavaString in "Java" `{ return recv.getParent(); `}
-       fun parent_file: NativeFile in "Java" `{ return recv.getParentFile(); `}
-       fun path: JavaString in "Java" `{ return recv.getPath(); `}
-       fun total_space: Int in "Java" `{ return (int)recv.getTotalSpace(); `}
-       fun usable_space: Int in "Java" `{ return (int)recv.getUsableSpace(); `}
-       fun absolute: Bool in "Java" `{ return recv.isAbsolute(); `}
-       fun is_directory: Bool in "Java" `{ return recv.isDirectory(); `}
-       fun is_file: Bool in "Java" `{ return recv.isFile(); `}
-       fun is_hidden: Bool in "Java" `{ return recv.isHidden(); `}
-       fun last_modified: Int in "Java" `{ return (int)recv.lastModified(); `}
-       fun length: Int in "Java" `{ return (int)recv.length(); `}
-       fun set_readable(r: Bool, owner_only: Bool): Bool in "Java" `{ return recv.setReadable(r, owner_only); `}
-       fun set_writable(w: Bool, owner_only: Bool): Bool in "Java" `{ return recv.setWritable(w, owner_only); `}
+       fun free_space: Int in "Java" `{ return (int)self.getFreeSpace(); `}
+       fun name: JavaString in "Java" `{ return self.getName(); `}
+       fun parent: JavaString in "Java" `{ return self.getParent(); `}
+       fun parent_file: NativeFile in "Java" `{ return self.getParentFile(); `}
+       fun path: JavaString in "Java" `{ return self.getPath(); `}
+       fun total_space: Int in "Java" `{ return (int)self.getTotalSpace(); `}
+       fun usable_space: Int in "Java" `{ return (int)self.getUsableSpace(); `}
+       fun absolute: Bool in "Java" `{ return self.isAbsolute(); `}
+       fun is_directory: Bool in "Java" `{ return self.isDirectory(); `}
+       fun is_file: Bool in "Java" `{ return self.isFile(); `}
+       fun is_hidden: Bool in "Java" `{ return self.isHidden(); `}
+       fun last_modified: Int in "Java" `{ return (int)self.lastModified(); `}
+       fun length: Int in "Java" `{ return (int)self.length(); `}
+       fun set_readable(r: Bool, owner_only: Bool): Bool in "Java" `{ return self.setReadable(r, owner_only); `}
+       fun set_writable(w: Bool, owner_only: Bool): Bool in "Java" `{ return self.setWritable(w, owner_only); `}
 end
 
 extern class NativeFileInputStream in "Java" `{ java.io.FileInputStream `}
@@ -79,7 +79,7 @@ extern class NativeFileInputStream in "Java" `{ java.io.FileInputStream `}
 
        fun available: Int in "Java" `{
                try {
-                       return recv.available();
+                       return self.available();
                }catch(IOException e){
                        e.printStackTrace();
                        return -1;
@@ -87,14 +87,14 @@ extern class NativeFileInputStream in "Java" `{ java.io.FileInputStream `}
        `}
        fun close in "Java" `{
                try {
-                       recv.close();
+                       self.close();
                }catch(IOException e){
                        e.printStackTrace();
                }
        `}
        fun read: Int in "Java" `{
                try {
-                       return recv.read();
+                       return self.read();
                }catch(IOException e){
                        e.printStackTrace();
                        return -1;
@@ -102,7 +102,7 @@ extern class NativeFileInputStream in "Java" `{ java.io.FileInputStream `}
        `}
        fun skip(byte_count: Int): Int in "Java" `{
                try {
-                       return (int)recv.skip(byte_count);
+                       return (int)self.skip(byte_count);
                }catch(IOException e){
                        e.printStackTrace();
                        return -1;
@@ -115,21 +115,21 @@ extern class NativeFileOutputStream in "Java" `{ java.io.FileOutputStream `}
 
        fun close in "Java" `{
                try {
-                       recv.close();
+                       self.close();
                }catch(IOException e){
                        e.printStackTrace();
                }
        `}
        fun write(one_byte: Int) in "Java" `{
                try {
-                       recv.write((byte)one_byte);
+                       self.write((byte)one_byte);
                }catch(IOException e){
                        e.printStackTrace();
                }
        `}
        fun flush in "Java" `{
                try {
-                       recv.flush();
+                       self.flush();
                }catch(IOException e){
                        e.printStackTrace();
                }
@@ -141,12 +141,12 @@ extern class NativeFileDescriptor in "Java" `{ java.io.FileDescriptor `}
 
        fun sync in "Java" `{
                try{
-                       recv.sync();
+                       self.sync();
                }catch(SyncFailedException e){
                        e.printStackTrace();
                }
        `}
-       fun valid: Bool in "Java" `{ return recv.valid(); `}
+       fun valid: Bool in "Java" `{ return self.valid(); `}
 end
 
 extern class NativeInputStream in "Java" `{ java.io.InputStream `}
@@ -154,7 +154,7 @@ extern class NativeInputStream in "Java" `{ java.io.InputStream `}
 
        fun available: Int in "Java" `{
                try {
-                       return recv.available();
+                       return self.available();
                }catch(IOException e){
                        e.printStackTrace();
                        return -1;
@@ -163,7 +163,7 @@ extern class NativeInputStream in "Java" `{ java.io.InputStream `}
 
        fun close in "Java" `{
                try {
-                       recv.close();
+                       self.close();
                }catch(IOException e){
                        e.printStackTrace();
                }
index 6358430..cef7b22 100644 (file)
@@ -77,7 +77,7 @@ redef class Sys
 
        # 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(recv);
+               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);
@@ -100,12 +100,12 @@ extern class JavaString in "Java" `{ java.lang.String `}
 
        # Get the string from Java and copy it to Nit memory
        fun to_cstring: NativeString import sys, Sys.jni_env `{
-               Sys sys = JavaString_sys(recv);
+               Sys sys = JavaString_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
 
                // Get the data from Java
-               const jbyte *java_cstr = (char*)(*env)->GetStringUTFChars(env, recv, NULL);
-               jsize len = (*env)->GetStringUTFLength(env, recv);
+               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);
@@ -113,7 +113,7 @@ extern class JavaString in "Java" `{ java.lang.String `}
                nit_cstr[len] = '\0';
 
                // Free JNI ref and return
-               (*env)->ReleaseStringUTFChars(env, recv, java_cstr);
+               (*env)->ReleaseStringUTFChars(env, self, java_cstr);
                return nit_cstr;
        `}
 
@@ -126,9 +126,9 @@ redef class NativeString
        # 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(recv);
+               Sys sys = JavaString_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewStringUTF(env, recv);
+               return (*env)->NewStringUTF(env, self);
        `}
 end
 
@@ -144,23 +144,23 @@ redef extern class JavaObject
        # 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(recv);
+               Sys sys = JavaObject_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               return (*env)->NewGlobalRef(env, recv);
+               return (*env)->NewGlobalRef(env, self);
        `}
 
        # Delete this global reference
        fun delete_global_ref import sys, Sys.jni_env `{
-               Sys sys = JavaObject_sys(recv);
+               Sys sys = JavaObject_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               (*env)->DeleteGlobalRef(env, recv);
+               (*env)->DeleteGlobalRef(env, self);
        `}
 
        # Delete this local reference
        fun delete_local_ref import sys, Sys.jni_env `{
-               Sys sys = JavaObject_sys(recv);
+               Sys sys = JavaObject_sys(self);
                JNIEnv *env = Sys_jni_env(sys);
-               (*env)->DeleteLocalRef(env, recv);
+               (*env)->DeleteLocalRef(env, self);
        `}
 
        # Pops the current local reference frame and return a valid reference to self
@@ -173,7 +173,7 @@ redef extern class JavaObject
        end
 
        private fun pop_from_local_frame_with_env(jni_env: JniEnv): SELF `{
-               return (*jni_env)->PopLocalFrame(jni_env, recv);
+               return (*jni_env)->PopLocalFrame(jni_env, self);
        `}
 
        # Is `self` null in Java?
@@ -186,10 +186,10 @@ redef extern class JavaObject
        # 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 recv == 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 recv.toString(); `}
+       fun to_java_string: JavaString in "Java" `{ return self.toString(); `}
 
        # Use Java's `toString` for any `JavaObject`
        redef fun to_s
index d0559e0..594aac6 100644 (file)
@@ -131,8 +131,7 @@ class JsonValue
        #     assert "123".to_json_value.to_s == "123"
        #     assert "true".to_json_value.to_s == "true"
        #     assert "[1, 2, 3]".to_json_value.to_s == "123"
-       redef fun to_s: String
-       do
+       redef fun to_s do
                if value == null then return "null"
                return value.to_s
        end
index 61c6f61..359acf5 100644 (file)
@@ -39,7 +39,7 @@
 # import json::serialization
 #
 # class Person
-#     auto_serializable
+#     serialize
 #
 #     var name: String
 #     var year_of_birth: Int
 # ~~~
 module serialization
 
-import ::serialization
+import ::serialization::caching
 private import ::serialization::engine_tools
 private import static
 
 # Serializer of Nit objects to Json string.
 class JsonSerializer
-       super Serializer
+       super CachingSerializer
 
        # Target writing stream
        var stream: Writer
@@ -143,9 +143,9 @@ class JsonSerializer
 
        redef fun serialize_reference(object)
        do
-               if not plain_json and refs_map.has_key(object) then
+               if not plain_json and cache.has_object(object) then
                        # if already serialized, add local reference
-                       var id = ref_id_for(object)
+                       var id = cache.id_for(object)
                        stream.write "\{\"__kind\": \"ref\", \"__id\": "
                        stream.write id.to_s
                        stream.write "\}"
@@ -154,26 +154,11 @@ class JsonSerializer
                        serialize object
                end
        end
-
-       # Map of references to already serialized objects.
-       private var refs_map = new StrictHashMap[Serializable,Int]
-
-       # Get the internal serialized reference for this `object`.
-       private fun ref_id_for(object: Serializable): Int
-       do
-               if refs_map.has_key(object) then
-                       return refs_map[object]
-               else
-                       var id = refs_map.length
-                       refs_map[object] = id
-                       return id
-               end
-       end
 end
 
 # Deserializer from a Json string.
 class JsonDeserializer
-       super Deserializer
+       super CachingDeserializer
 
        # Json text to deserialize from.
        private var text: Text
@@ -184,9 +169,6 @@ class JsonDeserializer
        # Depth-first path in the serialized object tree.
        private var path = new Array[JsonObject]
 
-       # Map of references to already deserialized objects.
-       private var id_to_object = new StrictHashMap[Int, Object]
-
        # Last encountered object reference id.
        #
        # See `id_to_object`.
@@ -215,7 +197,7 @@ class JsonDeserializer
        do
                var id = just_opened_id
                if id == null then return # Register `new_object` only once
-               id_to_object[id] = new_object
+               cache[id] = new_object
        end
 
        # Convert from simple Json object to Nit object
@@ -231,8 +213,8 @@ class JsonDeserializer
                                var id = object["__id"]
                                assert id isa Int
 
-                               assert id_to_object.has_key(id)
-                               return id_to_object[id]
+                               assert cache.has_id(id)
+                               return cache.object_for(id)
                        end
 
                        # obj?
@@ -245,7 +227,7 @@ class JsonDeserializer
                                var class_name = object["__class"]
                                assert class_name isa String
 
-                               assert not id_to_object.has_key(id) else print "Error: Object with id '{id}' of {class_name} is deserialized twice."
+                               assert not cache.has_id(id) else print "Error: Object with id '{id}' of {class_name} is deserialized twice."
 
                                # advance on path
                                path.push object
@@ -291,7 +273,7 @@ end
 redef class Serializable
        private fun serialize_to_json(v: JsonSerializer)
        do
-               var id = v.ref_id_for(self)
+               var id = v.cache.new_id_for(self)
                v.stream.write "\{"
                if not v.plain_json then
                        v.stream.write "\"__kind\": \"obj\", \"__id\": "
@@ -376,7 +358,7 @@ redef class SimpleCollection[E]
        do
                # Register as pseudo object
                if not v.plain_json then
-                       var id = v.ref_id_for(self)
+                       var id = v.cache.new_id_for(self)
                        v.stream.write """{"__kind": "obj", "__id": """
                        v.stream.write id.to_s
                        v.stream.write """, "__class": """"
@@ -395,6 +377,7 @@ redef class SimpleCollection[E]
 
        redef init from_deserializer(v: Deserializer)
        do
+               super
                if v isa JsonDeserializer then
                        v.notify_of_creation self
                        init
@@ -425,7 +408,7 @@ redef class Map[K, V]
        redef fun serialize_to_json(v)
        do
                # Register as pseudo object
-               var id = v.ref_id_for(self)
+               var id = v.cache.new_id_for(self)
 
                if v.plain_json then
                        v.stream.write "\{"
@@ -466,10 +449,11 @@ redef class Map[K, V]
        # Instantiate a new `Array` from its serialized representation.
        redef init from_deserializer(v: Deserializer)
        do
-               init
+               super
 
                if v isa JsonDeserializer then
                        v.notify_of_creation self
+                       init
 
                        var length = v.deserialize_attribute("__length").as(Int)
                        var keys = v.path.last["__keys"].as(SequenceRead[nullable Object])
index 4482a93..a9e8920 100644 (file)
@@ -84,40 +84,40 @@ private extern class JavaVMInitArgs `{ JavaVMInitArgs* `}
        # Unavailable on Android, where you cannot instanciate a new JVM.
        fun set_default `{
        #ifndef ANDROID
-               JNI_GetDefaultJavaVMInitArgs(recv);
+               JNI_GetDefaultJavaVMInitArgs(self);
        #endif
        `}
 
-       fun version: Int `{ return recv->version; `}
-       fun version=(v: Int) `{ recv->version = v; `}
+       fun version: Int `{ return self->version; `}
+       fun version=(v: Int) `{ self->version = v; `}
 
-       fun options: JavaVMOptionArray `{ return recv->options; `}
-       fun options=(v: JavaVMOptionArray) `{ recv->options = v; `}
+       fun options: JavaVMOptionArray `{ return self->options; `}
+       fun options=(v: JavaVMOptionArray) `{ self->options = v; `}
 
-       fun n_options: Int `{ return recv->nOptions; `}
-       fun n_options=(v: Int) `{ recv->nOptions = v; `}
+       fun n_options: Int `{ return self->nOptions; `}
+       fun n_options=(v: Int) `{ self->nOptions = v; `}
 end
 
 private extern class JavaVMOption `{ JavaVMOption* `}
        fun string: String import NativeString.to_s `{
-               return NativeString_to_s((char*)recv->optionString);
+               return NativeString_to_s((char*)self->optionString);
        `}
        fun string=(v: String) import String.to_cstring `{
-               recv->optionString = String_to_cstring(v);
+               self->optionString = String_to_cstring(v);
        `}
 
        fun extra_info: String import NativeString.to_s `{
-               return NativeString_to_s((char*)recv->extraInfo);
+               return NativeString_to_s((char*)self->extraInfo);
        `}
        fun extra_info=(v: String) import String.to_cstring `{
-               recv->extraInfo = String_to_cstring(v);
+               self->extraInfo = String_to_cstring(v);
        `}
 end
 
 private extern class JavaVMOptionArray `{ JavaVMOption* `}
        new(size: Int) `{ return (JavaVMOption*)malloc(sizeof(JavaVMOption)*size); `}
 
-       fun [](i: Int): JavaVMOption `{ return recv+i; `}
+       fun [](i: Int): JavaVMOption `{ return self+i; `}
 end
 
 # Represents a jni JavaVM
@@ -156,12 +156,12 @@ extern class JavaVM `{JavaVM *`}
        end
 
        fun destroy `{
-               (*recv)->DestroyJavaVM(recv);
+               (*self)->DestroyJavaVM(self);
        `}
 
        fun env: JniEnv import jni_error `{
                JNIEnv *env;
-               int res = (*recv)->GetEnv(recv, (void **)&env, JNI_VERSION_1_6);
+               int res = (*self)->GetEnv(self, (void **)&env, JNI_VERSION_1_6);
                if (res != JNI_OK) {
                        JavaVM_jni_error(NULL, "Could not get JNIEnv from Java VM", res);
                        return NULL;
@@ -173,9 +173,9 @@ extern class JavaVM `{JavaVM *`}
                JNIEnv *env;
        #ifdef ANDROID
                // the signature is different (better actually) on Android
-               int res = (*recv)->AttachCurrentThread(recv, &env, NULL);
+               int res = (*self)->AttachCurrentThread(self, &env, NULL);
        #else
-               int res = (*recv)->AttachCurrentThread(recv, (void**)&env, NULL);
+               int res = (*self)->AttachCurrentThread(self, (void**)&env, NULL);
        #endif
                if (res != JNI_OK) {
                        JavaVM_jni_error(NULL, "Could not attach current thread to Java VM", res);
@@ -190,84 +190,84 @@ extern class JniEnv `{JNIEnv *`}
 
        # Get a class object from its fully-qualified name or null if the class cannot be found
        fun find_class(class_name : String): JClass import String.to_cstring `{
-               return (*recv)->FindClass(recv,String_to_cstring(class_name));
+               return (*self)->FindClass(self,String_to_cstring(class_name));
        `}
 
        # Return the method id for an instance of a class or interface
        # The method is determined by its name and signature
        # To obtain the method ID of a constructor, supply "<init>" as the method name and "void(V)" as the return type
        fun get_method_id(clazz : JClass, name : String, signature : String): JMethodID import String.to_cstring `{
-               return (*recv)->GetMethodID(recv, clazz, String_to_cstring(name), String_to_cstring(signature));
+               return (*self)->GetMethodID(self, clazz, String_to_cstring(name), String_to_cstring(signature));
        `}
 
        # Construct a new Java object from the `clazz`, using the constructor ̀ method_id`
        fun new_object(clazz: JClass, method_id: JMethodID): JavaObject `{
-               return (*recv)->NewObject(recv, clazz, method_id);
+               return (*self)->NewObject(self, clazz, method_id);
        `}
 
        # Return the JClass of `obj`
        fun get_object_class(obj: JavaObject): JClass `{
-               return (*recv)->GetObjectClass(recv, obj);
+               return (*self)->GetObjectClass(self, obj);
        `}
 
        # Registers native methods with the class specified by the `clazz` argument
        fun register_natives(clazz: JClass, method: JNINativeMethod, n_method : Int): Int `{
-               return (*recv)->RegisterNatives(recv, clazz, method, n_method);
+               return (*self)->RegisterNatives(self, clazz, method, n_method);
        `}
 
        # Call a method on `obj` designed by `method_id` with an array `args` of arguments
        fun call_void_method(obj: JavaObject, method_id: JMethodID, args: nullable Array[nullable Object]) import convert_args_to_jni `{
-               jvalue * args_tab = JniEnv_convert_args_to_jni(recv, args);
-               (*recv)->CallVoidMethodA(recv, obj, method_id, args_tab);
+               jvalue * args_tab = JniEnv_convert_args_to_jni(self, args);
+               (*self)->CallVoidMethodA(self, obj, method_id, args_tab);
                free(args_tab);
        `}
 
        # Call a method on `obj` designed by `method_id` with an array `args` of argument returning a JavaObject
        fun call_object_method(obj: JavaObject, method_id: JMethodID, args: nullable Array[nullable Object]): JavaObject import convert_args_to_jni `{
-               jvalue * args_tab = JniEnv_convert_args_to_jni(recv, args);
-               jobject res = (*recv)->CallObjectMethod(recv, obj, method_id, args_tab);
+               jvalue * args_tab = JniEnv_convert_args_to_jni(self, args);
+               jobject res = (*self)->CallObjectMethod(self, obj, method_id, args_tab);
                free(args_tab);
                return res;
        `}
 
        # Call a method on `obj` designed by `method_id` with an array `args` of arguments returning a Bool
        fun call_boolean_method(obj: JavaObject, method_id: JMethodID, args: nullable Array[nullable Object]): Bool import convert_args_to_jni `{
-               jvalue * args_tab = JniEnv_convert_args_to_jni(recv, args);
-               jboolean res = (*recv)->CallBooleanMethod(recv, obj, method_id, args_tab);
+               jvalue * args_tab = JniEnv_convert_args_to_jni(self, args);
+               jboolean res = (*self)->CallBooleanMethod(self, obj, method_id, args_tab);
                free(args_tab);
                return res;
        `}
 
        # Call a method on `obj` designed by `method_id` with an array `args` of arguments returning a Char
        fun call_char_method(obj: JavaObject, method_id: JMethodID, args: nullable Array[nullable Object]): Char import convert_args_to_jni `{
-               jvalue * args_tab = JniEnv_convert_args_to_jni(recv, args);
-               jchar res = (*recv)->CallCharMethod(recv, obj, method_id, args_tab);
+               jvalue * args_tab = JniEnv_convert_args_to_jni(self, args);
+               jchar res = (*self)->CallCharMethod(self, obj, method_id, args_tab);
                free(args_tab);
                return res;
        `}
 
        # Call a method on `obj` designed by `method_id` with an array `args` of arguments returning an Int
        fun call_int_method(obj: JavaObject, method_id: JMethodID, args: nullable Array[nullable Object]): Int import convert_args_to_jni `{
-               jvalue * args_tab = JniEnv_convert_args_to_jni(recv, args);
-               jint res = (*recv)->CallIntMethod(recv, obj, method_id, args_tab);
+               jvalue * args_tab = JniEnv_convert_args_to_jni(self, args);
+               jint res = (*self)->CallIntMethod(self, obj, method_id, args_tab);
                free(args_tab);
                return res;
        `}
 
        # Call a method on `obj` designed by `method_id` with an array `args` of arguments returning a Float
        fun call_float_method(obj: JavaObject, method_id: JMethodID, args: nullable Array[nullable Object]): Float import convert_args_to_jni `{
-               jvalue * args_tab = JniEnv_convert_args_to_jni(recv, args);
-               jfloat res = (*recv)->CallFloatMethod(recv, obj, method_id, args_tab);
+               jvalue * args_tab = JniEnv_convert_args_to_jni(self, args);
+               jfloat res = (*self)->CallFloatMethod(self, obj, method_id, args_tab);
                free(args_tab);
                return res;
        `}
 
        # Call a method on `obj` designed by `method_id` with an array `args` of arguments returning a NativeString
        fun call_string_method(obj: JavaObject, method_id: JMethodID, args: nullable Array[nullable Object]): NativeString import convert_args_to_jni `{
-               jvalue * args_tab = JniEnv_convert_args_to_jni(recv, args);
-               jobject jobj = (*recv)->CallObjectMethod(recv, obj, method_id, args_tab);
+               jvalue * args_tab = JniEnv_convert_args_to_jni(self, args);
+               jobject jobj = (*self)->CallObjectMethod(self, obj, method_id, args_tab);
                free(args_tab);
-               return (char*)(*recv)->GetStringUTFChars(recv, (jstring)jobj, NULL);
+               return (char*)(*self)->GetStringUTFChars(self, (jstring)jobj, NULL);
        `}
 
        private fun convert_args_to_jni(args: nullable Array[nullable Object]): Pointer import Array[nullable Object].as not nullable, Array[nullable Object].[], Array[nullable Object].length, nullable Object.as(Int), nullable Object.as(Char), nullable Object.as(Bool), nullable Object.as(Float), nullable Object.as(JavaObject), nullable Object.as(String), String.to_cstring, String.length `{
@@ -298,7 +298,7 @@ extern class JniEnv `{JNIEnv *`}
                        } else if(nullable_Object_is_a_String(nullable_obj)){
                                String val = nullable_Object_as_String(nullable_obj);
                                char* c = String_to_cstring(val);
-                               jstring js = (*recv)->NewStringUTF(recv, c);
+                               jstring js = (*self)->NewStringUTF(self, c);
                                c_array[i].l = js;
                        } else {
                                fprintf(stderr, "NOT YET SUPPORTED: nit objects are not supported\n");
@@ -310,95 +310,95 @@ extern class JniEnv `{JNIEnv *`}
 
        # Returns the field ID for an instance field of a class. The field is specified by its name and signature
        fun get_field_id(clazz: JClass, name: String, sign: String): JFieldID import String.to_cstring `{
-               return (*recv)->GetFieldID(recv, clazz, String_to_cstring(name), String_to_cstring(sign));
+               return (*self)->GetFieldID(self, clazz, String_to_cstring(name), String_to_cstring(sign));
        `}
 
        # returns the value of an instance (nonstatic) field of an object. The field to access is specified by a field ID obtained by calling get_field_id()
        fun get_object_field(obj: JavaObject, fieldID: JFieldID): JavaObject `{
-               return (*recv)->GetObjectField(recv, obj, fieldID);
+               return (*self)->GetObjectField(self, obj, fieldID);
        `}
 
        fun get_boolean_field(obj: JavaObject, fieldID: JFieldID): Bool `{
-               return (*recv)->GetBooleanField(recv, obj, fieldID);
+               return (*self)->GetBooleanField(self, obj, fieldID);
        `}
 
        fun get_char_field(obj: JavaObject, fieldID: JFieldID): Char `{
-               return (*recv)->GetCharField(recv, obj, fieldID);
+               return (*self)->GetCharField(self, obj, fieldID);
        `}
 
        fun get_int_field(obj: JavaObject, fieldID: JFieldID): Int `{
-               return (*recv)->GetIntField(recv, obj, fieldID);
+               return (*self)->GetIntField(self, obj, fieldID);
        `}
 
        fun get_float_field(obj: JavaObject, fieldID: JFieldID): Float `{
-               return (*recv)->GetFloatField(recv, obj, fieldID);
+               return (*self)->GetFloatField(self, obj, fieldID);
        `}
 
        fun set_object_field(obj: JavaObject, fieldID: JFieldID, value: JavaObject) `{
-               (*recv)->SetObjectField(recv, obj, fieldID, value);
+               (*self)->SetObjectField(self, obj, fieldID, value);
        `}
 
        fun set_boolean_field(obj: JavaObject, fieldID: JFieldID, value: Bool) `{
-               (*recv)->SetBooleanField(recv, obj, fieldID, value);
+               (*self)->SetBooleanField(self, obj, fieldID, value);
        `}
 
        fun set_char_field(obj: JavaObject, fieldID: JFieldID, value: Char) `{
-               (*recv)->SetCharField(recv, obj, fieldID, value);
+               (*self)->SetCharField(self, obj, fieldID, value);
        `}
 
        fun set_int_field(obj: JavaObject, fieldID: JFieldID, value: Int) `{
-               (*recv)->SetIntField(recv, obj, fieldID, value);
+               (*self)->SetIntField(self, obj, fieldID, value);
        `}
 
        fun set_float_field(obj: JavaObject, fieldID: JFieldID, value: Float) `{
-               (*recv)->SetFloatField(recv, obj, fieldID, value);
+               (*self)->SetFloatField(self, obj, fieldID, value);
        `}
 
        # Check for pending exception without creating a local reference to the exception object
        fun exception_check: Bool `{
-               return (*recv)->ExceptionCheck(recv);
+               return (*self)->ExceptionCheck(self);
        `}
 
        # Construct an exception object from the specified class with the message specified by `message` and causes that exception to be thrown
        fun throw_new(clazz: JClass, message: String): Int import String.to_cstring `{
-               return (*recv)->ThrowNew(recv, clazz, String_to_cstring(message));
+               return (*self)->ThrowNew(self, clazz, String_to_cstring(message));
        `}
 
        # return the exception if there is one in the process of being thrown, or NULL if no exception is currently being thrown
        fun exception_occurred: JavaObject `{
-               return (*recv)->ExceptionOccurred(recv);
+               return (*self)->ExceptionOccurred(self);
        `}
 
        # prints an exception and backtrace to error channel
        fun exception_describe `{
-               return (*recv)->ExceptionDescribe(recv);
+               return (*self)->ExceptionDescribe(self);
        `}
 
        # clears any exception currently being thrown, has no effect if there is no exception
        fun exception_clear `{
-               return (*recv)->ExceptionClear(recv);
+               return (*self)->ExceptionClear(self);
        `}
 
        # Raise a fatal error
        fun fatal_error(msg: String) import String.to_cstring `{
-               (*recv)->FatalError(recv, String_to_cstring(msg));
+               (*self)->FatalError(self, String_to_cstring(msg));
        `}
 
        # Transform a NIT String into a JavaObject
        fun string_to_jobject(string: String): JavaObject `{
-               return (*recv)->NewStringUTF(recv, String_to_cstring(string));
+               return (*self)->NewStringUTF(self, String_to_cstring(string));
        `}
 
        # Pushes a local reference frame on the JNI stack
        fun push_local_frame(capacity: Int): Bool `{
-               return (*recv)->PushLocalFrame(recv, capacity);
+               return (*self)->PushLocalFrame(self, capacity);
        `}
 
        # Pops the current local reference frame on the JNI stack
        #
        # Similiar to `JavaObject::pop_from_local_frame` which returns a value.
        fun pop_local_frame `{
-               (*recv)->PopLocalFrame(recv, NULL);
+               (*self)->PopLocalFrame(self, NULL);
        `}
 end
 
@@ -422,19 +422,19 @@ end
 # Represents a jni JNINNativeMethod
 extern class JNINativeMethod `{ JNINativeMethod* `}
        fun name: String import NativeString.to_s `{
-               return NativeString_to_s((void*)recv->name);
+               return NativeString_to_s((void*)self->name);
        `}
 
        fun name=(name: String) import String.to_cstring `{
-               recv->name = String_to_cstring(name);
+               self->name = String_to_cstring(name);
        `}
 
        fun signature: String import NativeString.to_s `{
-               return NativeString_to_s((void*)recv->signature);
+               return NativeString_to_s((void*)self->signature);
        `}
 
        fun signature=(signature: String) import String.to_cstring `{
-               recv->signature = String_to_cstring(signature);
+               self->signature = String_to_cstring(signature);
        `}
 end
 
@@ -446,50 +446,50 @@ end
 extern class JValue `{jvalue`}
 
        fun set_boolean(b: Bool) `{
-               recv.z = b;
+               self.z = b;
        `}
 
        fun get_boolean:Bool `{
-               return recv.z;
+               return self.z;
        `}
 
        fun set_char(c: Char)`{
-               recv.c = c;
+               self.c = c;
        `}
 
        fun get_char: Char `{
-               return recv.c;
+               return self.c;
        `}
 
        fun set_int(i: Int) `{
-               recv.i = i;
+               self.i = i;
        `}
 
        fun get_int: Int `{
-               return recv.i;
+               return self.i;
        `}
 
        fun set_float(f: Float) `{
-               recv.f = f;
+               self.f = f;
        `}
 
        fun get_float: Float `{
-               return recv.f;
+               return self.f;
        `}
 
        fun set_jobject(obj: JavaObject) `{
-               recv.l = obj;
+               self.l = obj;
        `}
 
        fun get_jobject: JavaObject `{
-               return recv.l;
+               return self.l;
        `}
 end
 
 redef class Int
        redef fun to_jvalue(env): JValue `{
                jvalue value;
-               value.i = recv;
+               value.i = self;
                return value;
        `}
 end
@@ -497,7 +497,7 @@ end
 redef class Float
        redef fun to_jvalue(env): JValue `{
                jvalue value;
-               value.f = recv;
+               value.f = self;
                return value;
        `}
 end
@@ -505,7 +505,7 @@ end
 redef class Bool
        redef fun to_jvalue(env): JValue `{
                jvalue value;
-               value.z = recv;
+               value.z = self;
                return value;
        `}
 end
@@ -513,7 +513,7 @@ end
 redef class NativeString
        redef fun to_jvalue(env)`{
                jvalue value;
-               value.l = (*env)->NewStringUTF(env, recv);
+               value.l = (*env)->NewStringUTF(env, self);
                return value;
        `}
 end
index ff9a9f5..7ba6763 100644 (file)
@@ -100,21 +100,23 @@ extern class NativeEventBase `{ struct event_base * `}
        #
        # This loop will run the event base until either there are no more added
        # events, or until something calls `exit_loop`.
-       fun dispatch `{ event_base_dispatch(recv); `}
+       fun dispatch `{ event_base_dispatch(self); `}
 
        # Exit the event loop
        #
        # TODO support timer
-       fun exit_loop `{ event_base_loopexit(recv, NULL); `}
+       fun exit_loop `{ event_base_loopexit(self, NULL); `}
 
        # Destroy this instance
-       fun destroy `{ event_base_free(recv); `}
+       fun destroy `{ event_base_free(self); `}
 end
 
 # Spawned to manage a specific connection
 #
 # TODO, use polls
 class Connection
+       super Writer
+
        # Closing this connection has been requested, but may not yet be `closed`
        var close_requested = false
 
@@ -125,7 +127,7 @@ class Connection
        var native_buffer_event: NativeBufferEvent
 
        # Close this connection if possible, otherwise mark it to be closed later
-       fun close
+       redef fun close
        do
                var success = native_buffer_event.destroy
                close_requested = true
@@ -153,11 +155,13 @@ class Connection
        fun event_callback(events: Int) do end
 
        # Write a string to the connection
-       fun write(str: String)
+       redef fun write(str)
        do
                native_buffer_event.write(str.to_cstring, str.length)
        end
 
+       redef fun write_byte(byte) do native_buffer_event.write_byte(byte)
+
        # Write a file to the connection
        #
        # require: `path.file_exists`
@@ -178,33 +182,39 @@ end
 extern class NativeBufferEvent `{ struct bufferevent * `}
        # Write `length` bytes of `line`
        fun write(line: NativeString, length: Int): Int `{
-               return bufferevent_write(recv, line, length);
+               return bufferevent_write(self, line, length);
+       `}
+
+       # Write the byte `value`
+       fun write_byte(value: Int): Int `{
+               unsigned char byt = (unsigned char)value;
+               return bufferevent_write(self, &byt, 1);
        `}
 
        # Check if we have anything left in our buffers. If so, we set our connection to be closed
        # on a callback. Otherwise we close it and free it right away.
        fun destroy: Bool `{
-               struct evbuffer* out = bufferevent_get_output(recv);
-               struct evbuffer* in = bufferevent_get_input(recv);
+               struct evbuffer* out = bufferevent_get_output(self);
+               struct evbuffer* in = bufferevent_get_input(self);
                if(evbuffer_get_length(in) > 0 || evbuffer_get_length(out) > 0) {
                        return 0;
                } else {
-                       bufferevent_free(recv);
+                       bufferevent_free(self);
                        return 1;
                }
        `}
 
        # The output buffer associated to `self`
-       fun output_buffer: OutputNativeEvBuffer `{ return bufferevent_get_output(recv); `}
+       fun output_buffer: OutputNativeEvBuffer `{ return bufferevent_get_output(self); `}
 
        # The input buffer associated to `self`
-       fun input_buffer: InputNativeEvBuffer `{ return bufferevent_get_input(recv); `}
+       fun input_buffer: InputNativeEvBuffer `{ return bufferevent_get_input(self); `}
 end
 
 # A single buffer
 extern class NativeEvBuffer `{ struct evbuffer * `}
        # Length of data in this buffer
-       fun length: Int `{ return evbuffer_get_length(recv); `}
+       fun length: Int `{ return evbuffer_get_length(self); `}
 end
 
 # An input buffer
@@ -212,7 +222,7 @@ extern class InputNativeEvBuffer
        super NativeEvBuffer
 
        # Empty/clear `length` data from buffer
-       fun drain(length: Int) `{ evbuffer_drain(recv, length); `}
+       fun drain(length: Int) `{ evbuffer_drain(self, length); `}
 end
 
 # An output buffer
@@ -221,7 +231,7 @@ extern class OutputNativeEvBuffer
 
        # Add file to buffer
        fun add_file(fd, offset, length: Int): Bool `{
-               return evbuffer_add_file(recv, fd, offset, length);
+               return evbuffer_add_file(self, fd, offset, length);
        `}
 end
 
@@ -256,7 +266,7 @@ extern class ConnectionListener `{ struct evconnlistener * `}
        `}
 
        # Get the `NativeEventBase` associated to `self`
-       fun base: NativeEventBase `{ return evconnlistener_get_base(recv); `}
+       fun base: NativeEventBase `{ return evconnlistener_get_base(self); `}
 
        # Callback method on listening error
        fun error_callback do
similarity index 100%
rename from lib/markdown/README
rename to lib/markdown/README.md
index 1a83394..f33302f 100644 (file)
@@ -1,4 +1,5 @@
 # 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
@@ -184,3 +185,19 @@ class MdDecorator
 
        private var allowed_id_chars: Array[Char] = ['-', '_', ':', '.']
 end
+
+# Decorator for span elements.
+#
+# InlineDecorator does not decorate things like paragraphs or headers.
+class InlineDecorator
+       super HTMLDecorator
+
+       redef fun add_paragraph(v, block) do v.emit_in block
+       redef fun add_headline(v, block) do v.emit_in block
+
+       redef fun add_code(v, block) do
+               v.add "<code>"
+               v.emit_in block
+               v.add "</code>"
+       end
+end
index 7c65426..0d264cb 100644 (file)
@@ -134,17 +134,21 @@ class MarkdownProcessor
 
        # Split `input` string into `MDLines` and create a parent `MDBlock` with it.
        private fun read_lines(input: String): MDBlock do
-               var block = new MDBlock
+               var block = new MDBlock(new MDLocation(1, 1, 1, 1))
                var value = new FlatBuffer
                var i = 0
+
+               var line_pos = 0
+               var col_pos = 0
+
                while i < input.length do
                        value.clear
                        var pos = 0
                        var eol = false
                        while not eol and i < input.length do
+                               col_pos += 1
                                var c = input[i]
                                if c == '\n' then
-                                       i += 1
                                        eol = true
                                else if c == '\t' then
                                        var np = pos + (4 - (pos.bin_and(3)))
@@ -152,18 +156,20 @@ class MarkdownProcessor
                                                value.add ' '
                                                pos += 1
                                        end
-                                       i += 1
                                else
                                        pos += 1
                                        value.add c
-                                       i += 1
                                end
+                               i += 1
                        end
+                       line_pos += 1
 
-                       var line = new MDLine(value.write_to_string)
+                       var loc = new MDLocation(line_pos, 1, line_pos, col_pos)
+                       var line = new MDLine(loc, value.write_to_string)
                        var is_link_ref = check_link_ref(line)
                        # Skip link refs
                        if not is_link_ref then block.add_line line
+                       col_pos = 0
                end
                return block
        end
@@ -370,70 +376,72 @@ class MarkdownProcessor
                        c2 = ' '
                end
 
+               var loc = text.pos_to_loc(pos)
+
                if c == '*' then
                        if c1 == '*' then
                                if c0 != ' ' or c2 != ' ' then
-                                       return new TokenStrongStar(pos, c)
+                                       return new TokenStrongStar(loc, pos, c)
                                else
-                                       return new TokenEmStar(pos, c)
+                                       return new TokenEmStar(loc, pos, c)
                                end
                        end
                        if c0 != ' ' or c1 != ' ' then
-                               return new TokenEmStar(pos, c)
+                               return new TokenEmStar(loc, pos, c)
                        else
-                               return new TokenNone(pos, c)
+                               return new TokenNone(loc, pos, c)
                        end
                else if c == '_' then
                        if c1 == '_' then
                                if c0 != ' ' or c2 != ' 'then
-                                       return new TokenStrongUnderscore(pos, c)
+                                       return new TokenStrongUnderscore(loc, pos, c)
                                else
-                                       return new TokenEmUnderscore(pos, c)
+                                       return new TokenEmUnderscore(loc, pos, c)
                                end
                        end
                        if ext_mode then
                                if (c0.is_letter or c0.is_digit) and c0 != '_' and
                                   (c1.is_letter or c1.is_digit) then
-                                       return new TokenNone(pos, c)
+                                       return new TokenNone(loc, pos, c)
                                else
-                                       return new TokenEmUnderscore(pos, c)
+                                       return new TokenEmUnderscore(loc, pos, c)
                                end
                        end
                        if c0 != ' ' or c1 != ' ' then
-                               return new TokenEmUnderscore(pos, c)
+                               return new TokenEmUnderscore(loc, pos, c)
                        else
-                               return new TokenNone(pos, c)
+                               return new TokenNone(loc, pos, c)
                        end
                else if c == '!' then
-                       if c1 == '[' then return new TokenImage(pos, c)
-                       return new TokenNone(pos, c)
+                       if c1 == '[' then return new TokenImage(loc, pos, c)
+                       return new TokenNone(loc, pos, c)
                else if c == '[' then
-                       return new TokenLink(pos, c)
+                       return new TokenLink(loc, pos, c)
                else if c == ']' then
-                       return new TokenNone(pos, c)
+                       return new TokenNone(loc, pos, c)
                else if c == '`' then
                        if c1 == '`' then
-                               return new TokenCodeDouble(pos, c)
+                               return new TokenCodeDouble(loc, pos, c)
                        else
-                               return new TokenCodeSingle(pos, c)
+                               return new TokenCodeSingle(loc, pos, c)
                        end
                else if c == '\\' then
                        if c1 == '\\' or c1 == '[' or c1 == ']' or c1 == '(' or c1 == ')' or c1 == '{' or c1 == '}' or c1 == '#' or c1 == '"' or c1 == '\'' or c1 == '.' or c1 == '<' or c1 == '>' or c1 == '*' or c1 == '+' or c1 == '-' or c1 == '_' or c1 == '!' or c1 == '`' or c1 == '~' or c1 == '^' then
-                               return new TokenEscape(pos, c)
+                               return new TokenEscape(loc, pos, c)
                        else
-                               return new TokenNone(pos, c)
+                               return new TokenNone(loc, pos, c)
                        end
                else if c == '<' then
-                       return new TokenHTML(pos, c)
+                       return new TokenHTML(loc, pos, c)
                else if c == '&' then
-                       return new TokenEntity(pos, c)
+                       return new TokenEntity(loc, pos, c)
                else
                        if ext_mode then
                                if c == '~' and c1 == '~' then
-                                       return new TokenStrike(pos, c)
+                                       return new TokenStrike(loc, pos, c)
                                end
                        end
-                       return new TokenNone(pos, c)
+                       return new TokenNone(loc, pos, c)
                end
        end
 
@@ -856,9 +864,31 @@ class HTMLDecorator
        private var allowed_id_chars: Array[Char] = ['-', '_', ':', '.']
 end
 
+# Location in a Markdown input.
+class MDLocation
+
+       # Starting line number (starting from 1).
+       var line_start: Int
+
+       # Starting column number (starting from 1).
+       var column_start: Int
+
+       # Stopping line number (starting from 1).
+       var line_end: Int
+
+       # Stopping column number (starting from 1).
+       var column_end: Int
+
+       redef fun to_s do return "{line_start},{column_start}--{line_end},{column_end}"
+end
+
 # A block of markdown lines.
 # A `MDBlock` can contains lines and/or sub-blocks.
 class MDBlock
+
+       # Position of `self` in the input.
+       var location: MDLocation
+
        # Kind of block.
        # See `Block`.
        var kind: Block = new BlockNone(self) is writable
@@ -911,7 +941,14 @@ class MDBlock
 
        # Split `self` creating a new sub-block having `line` has `last_line`.
        fun split(line: MDLine): MDBlock do
-               var block = new MDBlock
+               # location for new block
+               var new_loc = new MDLocation(
+                       first_line.location.line_start,
+                       first_line.location.column_start,
+                       line.location.line_end,
+                       line.location.column_end)
+               # create block
+               var block = new MDBlock(new_loc)
                block.first_line = first_line
                block.last_line = line
                first_line = line.next
@@ -920,6 +957,9 @@ class MDBlock
                        last_line = null
                else
                        first_line.prev = null
+                       # update current block loc
+                       location.line_start = first_line.location.line_start
+                       location.column_start = first_line.location.column_start
                end
                if first_block == null then
                        first_block = block
@@ -1292,6 +1332,9 @@ end
 # A markdown line.
 class MDLine
 
+       # Location of `self` in the original input.
+       var location: MDLocation
+
        # Text contained in this line.
        var value: String is writable
 
@@ -1799,7 +1842,10 @@ end
 # Some tokens have a specific markup behaviour that is handled here.
 abstract class Token
 
-       # Position of `self` in markdown input.
+       # Location of `self` in the original input.
+       var location: MDLocation
+
+       # Position of `self` in input independant from lines.
        var pos: Int
 
        # Character found at `pos` in the markdown input.
@@ -2428,6 +2474,24 @@ 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 e552883..e4bd177 100644 (file)
@@ -2366,43 +2366,46 @@ end
 class TestBlock
        super TestSuite
 
+       # A dummy location for testing purposes.
+       var loc = new MDLocation(0, 0, 0, 0)
+
        fun test_has_blocks do
-               var subject = new MDBlock
+               var subject = new MDBlock(loc)
                assert not subject.has_blocks
-               subject.first_block = new MDBlock
+               subject.first_block = new MDBlock(loc)
                assert subject.has_blocks
        end
 
        fun test_count_blocks do
-               var subject = new MDBlock
+               var subject = new MDBlock(loc)
                assert subject.count_blocks == 0
-               subject.first_block = new MDBlock
+               subject.first_block = new MDBlock(loc)
                assert subject.count_blocks == 1
-               subject.first_block.next = new MDBlock
+               subject.first_block.next = new MDBlock(loc)
                assert subject.count_blocks == 2
        end
 
        fun test_has_lines do
-               var subject = new MDBlock
+               var subject = new MDBlock(loc)
                assert not subject.has_lines
-               subject.first_line = new MDLine("")
+               subject.first_line = new MDLine(loc, "")
                assert subject.has_lines
        end
 
        fun test_count_lines do
-               var subject = new MDBlock
+               var subject = new MDBlock(loc)
                assert subject.count_lines == 0
-               subject.first_line = new MDLine("")
+               subject.first_line = new MDLine(loc, "")
                assert subject.count_lines == 1
-               subject.first_line.next = new MDLine("")
+               subject.first_line.next = new MDLine(loc, "")
                assert subject.count_lines == 2
        end
 
        fun test_split do
-               var line1 = new MDLine("line1")
-               var line2 = new MDLine("line2")
-               var line3 = new MDLine("line3")
-               var subject = new MDBlock
+               var line1 = new MDLine(loc, "line1")
+               var line2 = new MDLine(loc, "line2")
+               var line3 = new MDLine(loc, "line3")
+               var subject = new MDBlock(loc)
                subject.add_line line1
                subject.add_line line2
                subject.add_line line3
@@ -2417,19 +2420,19 @@ class TestBlock
        end
 
        fun test_add_line do
-               var subject = new MDBlock
+               var subject = new MDBlock(loc)
                assert subject.count_lines == 0
-               subject.add_line new MDLine("")
+               subject.add_line new MDLine(loc, "")
                assert subject.count_lines == 1
-               subject.add_line new MDLine("")
+               subject.add_line new MDLine(loc, "")
                assert subject.count_lines == 2
        end
 
        fun test_remove_line do
-               var line1 = new MDLine("line1")
-               var line2 = new MDLine("line2")
-               var line3 = new MDLine("line3")
-               var subject = new MDBlock
+               var line1 = new MDLine(loc, "line1")
+               var line2 = new MDLine(loc, "line2")
+               var line3 = new MDLine(loc, "line3")
+               var subject = new MDBlock(loc)
                subject.add_line line1
                subject.add_line line2
                subject.add_line line3
@@ -2442,29 +2445,29 @@ class TestBlock
        end
 
        fun test_transform_headline1 do
-               var subject = new MDBlock
+               var subject = new MDBlock(loc)
                var kind = new BlockHeadline(subject)
-               subject.add_line new MDLine(" #   Title 1   ")
+               subject.add_line new MDLine(loc, " #   Title 1   ")
                kind.transform_headline(subject)
                assert kind.depth == 1
                assert subject.first_line.value == "Title 1"
        end
 
        fun test_transform_headline2 do
-               var subject = new MDBlock
+               var subject = new MDBlock(loc)
                var kind = new BlockHeadline(subject)
-               subject.add_line new MDLine(" #####Title 5   ")
+               subject.add_line new MDLine(loc, " #####Title 5   ")
                kind.transform_headline(subject)
                assert kind.depth == 5
                assert subject.first_line.value == "Title 5"
        end
 
        fun test_remove_quote_prefix do
-               var subject = new MDBlock
+               var subject = new MDBlock(loc)
                var kind = new BlockQuote(subject)
-               subject.add_line new MDLine(" > line 1")
-               subject.add_line new MDLine(" > line 2")
-               subject.add_line new MDLine(" > line 3")
+               subject.add_line new MDLine(loc, " > line 1")
+               subject.add_line new MDLine(loc, " > line 2")
+               subject.add_line new MDLine(loc, " > line 3")
                kind.remove_block_quote_prefix(subject)
                assert subject.first_line.value == "line 1"
                assert subject.first_line.next.value == "line 2"
@@ -2472,51 +2475,51 @@ class TestBlock
        end
 
        fun test_remove_leading_empty_lines_1 do
-               var block = new MDBlock
-               block.add_line new MDLine("")
-               block.add_line new MDLine("")
-               block.add_line new MDLine("")
-               block.add_line new MDLine("")
-               block.add_line new MDLine("   text")
-               block.add_line new MDLine("")
+               var block = new MDBlock(loc)
+               block.add_line new MDLine(loc, "")
+               block.add_line new MDLine(loc, "")
+               block.add_line new MDLine(loc, "")
+               block.add_line new MDLine(loc, "")
+               block.add_line new MDLine(loc, "   text")
+               block.add_line new MDLine(loc, "")
                assert block.remove_leading_empty_lines
                assert block.first_line.value == "   text"
        end
 
        fun test_remove_leading_empty_lines_2 do
-               var block = new MDBlock
-               block.add_line new MDLine("   text")
+               var block = new MDBlock(loc)
+               block.add_line new MDLine(loc, "   text")
                block.remove_leading_empty_lines
                assert block.first_line.value == "   text"
        end
 
        fun test_remove_trailing_empty_lines_1 do
-               var block = new MDBlock
-               block.add_line new MDLine("")
-               block.add_line new MDLine("text")
-               block.add_line new MDLine("")
-               block.add_line new MDLine("")
-               block.add_line new MDLine("")
-               block.add_line new MDLine("")
+               var block = new MDBlock(loc)
+               block.add_line new MDLine(loc, "")
+               block.add_line new MDLine(loc, "text")
+               block.add_line new MDLine(loc, "")
+               block.add_line new MDLine(loc, "")
+               block.add_line new MDLine(loc, "")
+               block.add_line new MDLine(loc, "")
                assert block.remove_trailing_empty_lines
                assert block.last_line.value == "text"
        end
 
        fun test_remove_trailing_empty_lines_2 do
-               var block = new MDBlock
-               block.add_line new MDLine("text  ")
+               var block = new MDBlock(loc)
+               block.add_line new MDLine(loc, "text  ")
                assert not block.remove_trailing_empty_lines
                assert block.last_line.value == "text  "
        end
 
        fun test_remove_surrounding_empty_lines do
-               var block = new MDBlock
-               block.add_line new MDLine("")
-               block.add_line new MDLine("text")
-               block.add_line new MDLine("")
-               block.add_line new MDLine("")
-               block.add_line new MDLine("")
-               block.add_line new MDLine("")
+               var block = new MDBlock(loc)
+               block.add_line new MDLine(loc, "")
+               block.add_line new MDLine(loc, "text")
+               block.add_line new MDLine(loc, "")
+               block.add_line new MDLine(loc, "")
+               block.add_line new MDLine(loc, "")
+               block.add_line new MDLine(loc, "")
                assert block.remove_surrounding_empty_lines
                assert block.first_line.value == "text"
                assert block.last_line.value == "text"
@@ -2526,118 +2529,121 @@ end
 class TestLine
        super TestSuite
 
+       # A dummy location for testing purposes.
+       var loc = new MDLocation(0, 0, 0, 0)
+
        var subject: MDLine
 
        fun test_is_empty do
-               subject = new MDLine("")
+               subject = new MDLine(loc, "")
                assert subject.is_empty
-               subject = new MDLine("    ")
+               subject = new MDLine(loc, "    ")
                assert subject.is_empty
-               subject = new MDLine("test")
+               subject = new MDLine(loc, "test")
                assert not subject.is_empty
-               subject = new MDLine("    test")
+               subject = new MDLine(loc, "    test")
                assert not subject.is_empty
        end
 
        fun test_leading do
-               subject = new MDLine("")
+               subject = new MDLine(loc, "")
                assert subject.leading == 0
-               subject = new MDLine("    ")
+               subject = new MDLine(loc, "    ")
                assert subject.leading == 4
-               subject = new MDLine("test")
+               subject = new MDLine(loc, "test")
                assert subject.leading == 0
-               subject = new MDLine("    test")
+               subject = new MDLine(loc, "    test")
                assert subject.leading == 4
        end
 
        fun test_trailing do
-               subject = new MDLine("")
+               subject = new MDLine(loc, "")
                assert subject.trailing == 0
-               subject = new MDLine("    ")
+               subject = new MDLine(loc, "    ")
                assert subject.trailing == 0
-               subject = new MDLine("test   ")
+               subject = new MDLine(loc, "test   ")
                assert subject.trailing == 3
-               subject = new MDLine("    test ")
+               subject = new MDLine(loc, "    test ")
                assert subject.trailing == 1
        end
 
        fun test_line_type do
                var v = new MarkdownProcessor
-               subject = new MDLine("")
+               subject = new MDLine(loc, "")
                assert v.line_kind(subject) isa LineEmpty
-               subject = new MDLine("    ")
+               subject = new MDLine(loc, "    ")
                assert v.line_kind(subject) isa LineEmpty
-               subject = new MDLine("text   ")
+               subject = new MDLine(loc, "text   ")
                assert v.line_kind(subject) isa LineOther
-               subject = new MDLine("  # Title")
+               subject = new MDLine(loc, "  # Title")
                assert v.line_kind(subject) isa LineHeadline
-               subject = new MDLine("  ### Title")
+               subject = new MDLine(loc, "  ### Title")
                assert v.line_kind(subject) isa LineHeadline
-               subject = new MDLine("    code")
+               subject = new MDLine(loc, "    code")
                assert v.line_kind(subject) isa LineCode
-               subject = new MDLine("   Title  ")
-               subject.next = new MDLine("== ")
+               subject = new MDLine(loc, "   Title  ")
+               subject.next = new MDLine(loc, "== ")
                assert v.line_kind(subject) isa LineHeadline1
-               subject = new MDLine("   Title  ")
-               subject.next = new MDLine("-- ")
+               subject = new MDLine(loc, "   Title  ")
+               subject.next = new MDLine(loc, "-- ")
                assert v.line_kind(subject) isa LineHeadline2
-               subject = new MDLine("  *    *   * ")
+               subject = new MDLine(loc, "  *    *   * ")
                assert v.line_kind(subject) isa LineHR
-               subject = new MDLine("  *** ")
+               subject = new MDLine(loc, "  *** ")
                assert v.line_kind(subject) isa LineHR
-               subject = new MDLine("- -- ")
+               subject = new MDLine(loc, "- -- ")
                assert v.line_kind(subject) isa LineHR
-               subject = new MDLine("--------- ")
+               subject = new MDLine(loc, "--------- ")
                assert v.line_kind(subject) isa LineHR
-               subject = new MDLine(" >")
+               subject = new MDLine(loc, " >")
                assert v.line_kind(subject) isa LineBlockquote
-               subject = new MDLine("<p></p>")
+               subject = new MDLine(loc, "<p></p>")
                assert v.line_kind(subject) isa LineXML
-               subject = new MDLine("<p>")
+               subject = new MDLine(loc, "<p>")
                assert v.line_kind(subject) isa LineOther
-               subject = new MDLine("  * foo")
+               subject = new MDLine(loc, "  * foo")
                assert v.line_kind(subject) isa LineUList
-               subject = new MDLine("- foo")
+               subject = new MDLine(loc, "- foo")
                assert v.line_kind(subject) isa LineUList
-               subject = new MDLine("+ foo")
+               subject = new MDLine(loc, "+ foo")
                assert v.line_kind(subject) isa LineUList
-               subject = new MDLine("1. foo")
+               subject = new MDLine(loc, "1. foo")
                assert v.line_kind(subject) isa LineOList
-               subject = new MDLine("   11111. foo")
+               subject = new MDLine(loc, "   11111. foo")
                assert v.line_kind(subject) isa LineOList
        end
 
        fun test_line_type_ext do
                var v = new MarkdownProcessor
-               subject = new MDLine("  ~~~")
+               subject = new MDLine(loc, "  ~~~")
                assert v.line_kind(subject) isa LineFence
-               subject = new MDLine("  ```")
+               subject = new MDLine(loc, "  ```")
                assert v.line_kind(subject) isa LineFence
        end
 
        fun test_count_chars do
-               subject = new MDLine("")
+               subject = new MDLine(loc, "")
                assert subject.count_chars('*') == 0
-               subject = new MDLine("* ")
+               subject = new MDLine(loc, "* ")
                assert subject.count_chars('*') == 1
-               subject = new MDLine(" * text")
+               subject = new MDLine(loc, " * text")
                assert subject.count_chars('*') == 0
-               subject = new MDLine(" *    *    *")
+               subject = new MDLine(loc, " *    *    *")
                assert subject.count_chars('*') == 3
-               subject = new MDLine("text ** ")
+               subject = new MDLine(loc, "text ** ")
                assert subject.count_chars('*') == 0
        end
 
        fun test_count_chars_start do
-               subject = new MDLine("")
+               subject = new MDLine(loc, "")
                assert subject.count_chars_start('*') == 0
-               subject = new MDLine("* ")
+               subject = new MDLine(loc, "* ")
                assert subject.count_chars_start('*') == 1
-               subject = new MDLine(" * text")
+               subject = new MDLine(loc, " * text")
                assert subject.count_chars_start('*') == 1
-               subject = new MDLine(" *    *    * text")
+               subject = new MDLine(loc, " *    *    * text")
                assert subject.count_chars_start('*') == 3
-               subject = new MDLine("text ** ")
+               subject = new MDLine(loc, "text ** ")
                assert subject.count_chars_start('*') == 0
        end
 end
@@ -2682,3 +2688,130 @@ c:c
                assert res == exp
        end
 end
+
+class TestTokenLocation
+       super TestSuite
+
+       fun test_token_location1 do
+               var string = "**Hello** `World`"
+               var stack =  [
+                       "TokenStrongStar at 1,1--1,1",
+                       "TokenStrongStar at 1,8--1,8",
+                       "TokenCodeSingle at 1,11--1,11",
+                       "TokenCodeSingle at 1,17--1,17"]
+               (new TestTokenProcessor(stack)).process(string)
+       end
+
+       fun test_token_location2 do
+               var string = "**Hello**\n`World`\n*Bonjour*\n[le monde]()"
+               var stack =  [
+                       "TokenStrongStar at 1,1--1,1",
+                       "TokenStrongStar at 1,8--1,8",
+                       "TokenCodeSingle at 2,1--2,1",
+                       "TokenCodeSingle at 2,7--2,7",
+                       "TokenEmStar at 3,1--3,1",
+                       "TokenEmStar at 3,9--3,9",
+                       "TokenLink at 4,1--4,1"]
+               (new TestTokenProcessor(stack)).process(string)
+       end
+
+       fun test_token_location3 do
+               var string = """**Hello**
+               `World`
+               *Bonjour*
+               [le monde]()"""
+               var stack =  [
+                       "TokenStrongStar at 1,1--1,1",
+                       "TokenStrongStar at 1,8--1,8",
+                       "TokenCodeSingle at 2,1--2,1",
+                       "TokenCodeSingle at 2,7--2,7",
+                       "TokenEmStar at 3,1--3,1",
+                       "TokenEmStar at 3,9--3,9",
+                       "TokenLink at 4,1--4,1"]
+               (new TestTokenProcessor(stack)).process(string)
+       end
+end
+
+class TestTokenProcessor
+       super MarkdownProcessor
+
+       var test_stack: Array[String]
+
+       redef fun token_at(input, pos) do
+               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
+               assert exp == res
+               return token
+       end
+end
+
+class TestBlockLocation
+       super TestSuite
+
+       var proc = new MarkdownProcessor
+
+       fun test_block_location1 do
+               var stack = [
+                       "BlockHeadline: 1,1--1,8",
+                       "BlockListItem: 2,1--2,6",
+                       "BlockListItem: 3,1--3,5"
+               ]
+               var string =
+               "# Title\n* li1\n* li2"
+               proc.emitter.decorator = new TestBlockDecorator(stack)
+               proc.process(string)
+       end
+
+       fun test_block_location2 do
+               var stack = [
+                       "BlockHeadline: 1,1--1,11",
+                       "BlockFence: 3,1--5,4",
+                       "BlockListItem: 7,1--7,7",
+                       "BlockListItem: 8,1--8,6"]
+               var string ="""#### Title
+
+~~~fence
+some code
+~~~
+
+1. li1
+1. li2"""
+               proc.emitter.decorator = new TestBlockDecorator(stack)
+               proc.process(string)
+       end
+end
+
+class TestBlockDecorator
+       super HTMLDecorator
+
+       var stack: Array[String]
+
+       redef fun add_headline(v, block) do
+               super
+               check_res(block)
+       end
+
+       redef fun add_listitem(v, block) do
+               super
+               check_res(block)
+       end
+
+       redef fun add_blockquote(v, block) do
+               super
+               check_res(block)
+       end
+
+       redef fun add_code(v, block) do
+               super
+               check_res(block)
+       end
+
+       fun check_res(block: Block) do
+               var res = "{block.class_name}: {block.block.location}"
+               var exp = stack.shift
+               assert res == exp
+       end
+end
index 473bc18..22b67c0 100644 (file)
@@ -32,7 +32,7 @@ redef class MarkdownProcessor
                if not token isa TokenLink then return token
                if pos + 1 < text.length then
                        var c = text[pos + 1]
-                       if c == '[' then return new TokenWikiLink(pos, c)
+                       if c == '[' then return new TokenWikiLink(token.location, pos, c)
                end
                return token
        end
index 85828aa..41de768 100644 (file)
@@ -499,7 +499,7 @@ redef class String
                int di;
                char *in_text;
 
-               in_text = String_to_cstring(recv);
+               in_text = String_to_cstring(self);
 
                md5_init(&state);
                md5_append(&state, (const md5_byte_t *)in_text, strlen(in_text));
index b11d8dd..f95602e 100644 (file)
@@ -185,7 +185,7 @@ class Opengles1Display
                }
 
                /* Used by Android to set buffer geometry */
-               Opengles1Display_midway_init(recv, format);
+               Opengles1Display_midway_init(self, format);
 
                surface = eglCreateWindowSurface(display, config, mnit_window, NULL);
                context = eglCreateContext(display, config, NULL, NULL);
@@ -428,43 +428,43 @@ end
 extern class Opengles1Image in "C" `{struct mnit_opengles_Texture *`}
        super Image
 
-    redef fun destroy is extern `{ free( recv ); `}
+    redef fun destroy is extern `{ free( self ); `}
 
-    redef fun width: Int is extern `{ return recv->width; `}
-    redef fun height: Int is extern `{ return recv->height; `}
+    redef fun width: Int is extern `{ return self->width; `}
+    redef fun height: Int is extern `{ return self->height; `}
 
-       fun center_x: Int `{ return recv->center_x; `}
-       fun center_y: Int `{ return recv->center_y; `}
+       fun center_x: Int `{ return self->center_x; `}
+       fun center_y: Int `{ return self->center_y; `}
 
     redef fun scale=( v: Float ) is extern `{
-               recv->scale = v;
-               recv->center_x = v*recv->width/2;
-               recv->center_y = v*recv->height/2;
+               self->scale = v;
+               self->center_x = v*self->width/2;
+               self->center_y = v*self->height/2;
     `}
-    redef fun scale: Float is extern `{ return recv->scale; `}
+    redef fun scale: Float is extern `{ return self->scale; `}
 
-    redef fun blended=( v: Bool ) is extern `{ recv->blended = v; `}
-    redef fun blended: Bool is extern `{ return recv->blended; `}
+    redef fun blended=( v: Bool ) is extern `{ self->blended = v; `}
+    redef fun blended: Bool is extern `{ return self->blended; `}
 
     # inherits scale and blend from source
     redef fun subimage( x, y, w, h: Int ): Image is extern import Opengles1Image.as( Image ) `{
                struct mnit_opengles_Texture* image =
                        malloc( sizeof( struct mnit_opengles_Texture ) );
 
-               image->texture = recv->texture;
+               image->texture = self->texture;
                image->width = w;
                image->height = h;
-               image->center_x = recv->scale*w/2;
-               image->center_y = recv->scale*h/2;
-               image->scale = recv->scale;
-               image->blended = recv->blended;
-
-               float r_dx = recv->src_xi - recv->src_xo;
-               float r_dy = recv->src_yi - recv->src_yo;
-               image->src_xo = recv->src_xo + ((float)x)/recv->width*r_dx;
-               image->src_yo = recv->src_yo + ((float)y)/recv->height*r_dy;
-               image->src_xi = recv->src_xo + ((float)x+w)/recv->width*r_dx;
-               image->src_yi = recv->src_yo + ((float)y+h)/recv->height*r_dy;
+               image->center_x = self->scale*w/2;
+               image->center_y = self->scale*h/2;
+               image->scale = self->scale;
+               image->blended = self->blended;
+
+               float r_dx = self->src_xi - self->src_xo;
+               float r_dy = self->src_yi - self->src_yo;
+               image->src_xo = self->src_xo + ((float)x)/self->width*r_dx;
+               image->src_yo = self->src_yo + ((float)y)/self->height*r_dy;
+               image->src_xi = self->src_xo + ((float)x+w)/self->width*r_dx;
+               image->src_yi = self->src_yo + ((float)y+h)/self->height*r_dy;
 
                return Opengles1Image_as_Image( image );
     `}
index 1720c57..6531035 100644 (file)
@@ -35,8 +35,8 @@ in "C" `{
        void mnit_android_png_read_data(png_structp png_ptr,
                        png_bytep data, png_size_t length)
        {
-                       struct AAsset *recv = png_get_io_ptr(png_ptr);
-                       int read = AAsset_read(recv, data, length);
+                       struct AAsset *self = png_get_io_ptr(png_ptr);
+                       int read = AAsset_read(self, data, length);
        }
        void mnit_android_png_error_fn(png_structp png_ptr,
                png_const_charp error_msg)
@@ -54,7 +54,7 @@ extern class AndroidAsset in "C" `{struct AAsset*`}
 
        fun read(count: Int): nullable String is extern import String.as nullable, NativeString.to_s `{
                char *buffer = malloc(sizeof(char) * (count+1));
-               int read = AAsset_read(recv, buffer, count);
+               int read = AAsset_read(self, buffer, count);
                if (read != count)
                        return null_String();
                else
@@ -65,18 +65,18 @@ extern class AndroidAsset in "C" `{struct AAsset*`}
        `}
 
        fun length: Int is extern `{
-               return AAsset_getLength(recv);
+               return AAsset_getLength(self);
        `}
 
        fun to_fd: Int is extern `{
                off_t start;
                off_t length;
-               int fd = AAsset_openFileDescriptor(recv, &start, &length);
+               int fd = AAsset_openFileDescriptor(self, &start, &length);
                return fd;
        `}
 
        fun close is extern `{
-               AAsset_close(recv);
+               AAsset_close(self);
        `}
 end
 
@@ -102,7 +102,7 @@ redef class App
        end
 
        protected fun load_asset_from_apk(path: String): nullable AndroidAsset is extern import String.to_cstring, AndroidAsset.as nullable, native_app_glue  `{
-               struct android_app *native_app_glue = App_native_app_glue(recv);
+               struct android_app *native_app_glue = App_native_app_glue(self);
                struct AAsset* a = AAssetManager_open(native_app_glue->activity->assetManager, String_to_cstring(path), AASSET_MODE_BUFFER);
                if (a == NULL)
                {
@@ -119,7 +119,7 @@ end
 redef class Opengles1Image
        # Read a png from a zipped stream
        new from_android_asset(asset: AndroidAsset) import Int.next_pow `{
-               struct mnit_opengles_Texture *recv = NULL;
+               struct mnit_opengles_Texture *self = NULL;
 
                png_structp png_ptr = NULL;
                png_infop info_ptr = NULL;
@@ -198,7 +198,7 @@ redef class Opengles1Image
                for (i = 0; i < height; i++)
                        memcpy(pixels + (row_bytes_pow2*i), row_pointers[i], row_bytes);
 
-               recv = mnit_opengles_load_image((const uint_least32_t *)pixels,
+               self = mnit_opengles_load_image((const uint_least32_t *)pixels,
                        width, height, width_pow2, height_pow2, has_alpha);
 
                // Calculate the size of the client-side memory allocated and freed
@@ -223,7 +223,7 @@ redef class Opengles1Image
                }
 
        close_stream:
-               return recv;
+               return self;
        `}
 end
 
@@ -231,7 +231,7 @@ redef universal Int
        # The first power of `exp` greater or equal to `self`
        private fun next_pow(exp: Int): Int
        do
-               var p = 0
+               var p = 1
                while p < self do p = p*exp
                return p
        end
index 5ff9e7c..71e59aa 100644 (file)
@@ -30,7 +30,7 @@ in "C" `{
 
 redef class Opengles1Display
        redef fun midway_init(format) import app_native_window `{
-               mnit_window = Opengles1Display_app_native_window(recv);
+               mnit_window = Opengles1Display_app_native_window(self);
                if (ANativeWindow_setBuffersGeometry(mnit_window, 0, 0, (EGLint)format) != 0) {
                        LOGW("Unable to ANativeWindow_setBuffersGeometry");
                }
index 6608bc1..0ee217d 100644 (file)
@@ -53,7 +53,7 @@ extern class NativeBSON `{ bson_t * `}
                bson_t *bson;
                bson = bson_new_from_json(data, -1, &error);
                if(!bson) {
-                       NativeBSON_set_mongoc_error(recv, &error);
+                       NativeBSON_set_mongoc_error(bson, &error);
                        return NULL;
                }
                return bson;
@@ -64,7 +64,7 @@ extern class NativeBSON `{ bson_t * `}
        # The `bson_as_json()` function shall encode bson as a JSON encoded UTF-8 string.
        # The caller is responsible for freeing the resulting UTF-8 encoded string
        # by calling `bson_free()` with the result.
-       fun to_native_string: NativeString `{ return bson_as_json(recv, NULL); `}
+       fun to_native_string: NativeString `{ return bson_as_json(self, NULL); `}
 
        # Wrapper for `bson_destroy()`.
        #
@@ -73,7 +73,7 @@ extern class NativeBSON `{ bson_t * `}
        # unless otherwise specified.
        #
        # This instance should not be used beyond this point!
-       fun destroy `{ bson_destroy(recv); `}
+       fun destroy `{ bson_destroy(self); `}
 
        # Utility method to set `Sys.last_mongoc_error`.
        fun set_mongoc_error(err: BSONError) do sys.last_mongoc_error = err
@@ -90,17 +90,17 @@ extern class BSONError `{ bson_error_t * `}
        #
        # The `error.domain` field contains the logical domain within a library that
        # created the error.
-       fun domain: Int `{ return recv->domain; `}
+       fun domain: Int `{ return self->domain; `}
 
        # Wrapper for `error.code`.
        #
        # The `error.code` field contains the domain specific error code.
-       fun code: Int `{ return recv->code; `}
+       fun code: Int `{ return self->code; `}
 
        # Wrapper for `error.message`.
        #
        # The `error.message` field contains a human printable error message.
-       fun message: NativeString `{ return recv->message; `}
+       fun message: NativeString `{ return self->message; `}
 end
 
 redef class Sys
@@ -117,7 +117,7 @@ redef class NativeCStringArray
        # Frees `self`.
        #
        # This instance should not be used beyond this point!
-       fun destroy `{ free(recv); `}
+       fun destroy `{ free(self); `}
 end
 
 # Wrapper for `mongoc_client_t`.
@@ -144,8 +144,8 @@ extern class NativeMongoClient `{ mongoc_client_t * `}
        fun server_status: nullable NativeBSON import set_mongoc_error, NativeBSON.as nullable `{
                bson_error_t error;
                bson_t *reply = bson_new();
-               if(!mongoc_client_get_server_status(recv, NULL, reply, &error)){
-                       NativeMongoClient_set_mongoc_error(recv, &error);
+               if(!mongoc_client_get_server_status(self, NULL, reply, &error)){
+                       NativeMongoClient_set_mongoc_error(self, &error);
                        return null_NativeBSON();
                }
                return NativeBSON_as_nullable(reply);
@@ -159,10 +159,10 @@ extern class NativeMongoClient `{ mongoc_client_t * `}
                import set_mongoc_error, NativeCStringArray, NativeCStringArray.as nullable `{
                bson_error_t error;
                char **strv;
-               if(strv = mongoc_client_get_database_names(recv, &error)) {
+               if(strv = mongoc_client_get_database_names(self, &error)) {
                        return NativeCStringArray_as_nullable(strv);
                }
-               NativeMongoClient_set_mongoc_error(recv, &error);
+               NativeMongoClient_set_mongoc_error(self, &error);
                return null_NativeCStringArray();
        `}
 
@@ -170,7 +170,7 @@ extern class NativeMongoClient `{ mongoc_client_t * `}
        #
        # This instance should not be used beyond this point!
        fun destroy `{
-               mongoc_client_destroy(recv);
+               mongoc_client_destroy(self);
                mongoc_cleanup();
        `}
 
@@ -206,10 +206,10 @@ extern class NativeMongoDb `{ mongoc_database_t * `}
                import set_mongoc_error, NativeCStringArray, NativeCStringArray.as nullable `{
                bson_error_t error;
                char **strv;
-               if(strv = mongoc_database_get_collection_names(recv, &error)) {
+               if(strv = mongoc_database_get_collection_names(self, &error)) {
                        return NativeCStringArray_as_nullable(strv);
                }
-               NativeMongoDb_set_mongoc_error(recv, &error);
+               NativeMongoDb_set_mongoc_error(self, &error);
                return null_NativeCStringArray();
        `}
 
@@ -218,7 +218,7 @@ extern class NativeMongoDb `{ mongoc_database_t * `}
        # Allocates a new `mongoc_collection_t` structure for the collection named
        # `name` in database.
        fun collection(name: NativeString): NativeMongoCollection `{
-               return mongoc_database_get_collection(recv, name);
+               return mongoc_database_get_collection(self, name);
        `}
 
        # Wrapper for `mongoc_database_has_collection()`.
@@ -227,8 +227,8 @@ extern class NativeMongoDb `{ mongoc_database_t * `}
        # within database.
        fun has_collection(name: NativeString): Bool import set_mongoc_error `{
                bson_error_t error;
-               if(!mongoc_database_has_collection(recv, name, &error)) {
-                       NativeMongoDb_set_mongoc_error(recv, &error);
+               if(!mongoc_database_has_collection(self, name, &error)) {
+                       NativeMongoDb_set_mongoc_error(self, &error);
                        return false;
                }
                return true;
@@ -239,8 +239,8 @@ extern class NativeMongoDb `{ mongoc_database_t * `}
        # This function attempts to drop a database on the MongoDB server.
        fun drop: Bool import set_mongoc_error `{
                bson_error_t error;
-               if(!mongoc_database_drop(recv, &error)) {
-                       NativeMongoDb_set_mongoc_error(recv, &error);
+               if(!mongoc_database_drop(self, &error)) {
+                       NativeMongoDb_set_mongoc_error(self, &error);
                        return false;
                }
                return true;
@@ -249,7 +249,7 @@ extern class NativeMongoDb `{ mongoc_database_t * `}
        # Wrapper for `mongoc_database_destroy()`.
        #
        # This instance should not be used beyond this point!
-       fun destroy `{ mongoc_database_destroy(recv); `}
+       fun destroy `{ mongoc_database_destroy(self); `}
 
        # Utility method to set `Sys.last_mongoc_error`.
        fun set_mongoc_error(err: BSONError) do sys.last_mongoc_error = err
@@ -290,8 +290,8 @@ extern class NativeMongoCollection `{ mongoc_collection_t * `}
        # You can retrieve a generated `_id` from `mongoc_collection_get_last_error()`.
        fun insert(doc: NativeBSON): Bool import set_mongoc_error `{
                bson_error_t error;
-               if(!mongoc_collection_insert(recv, MONGOC_INSERT_NONE, doc, NULL, &error)) {
-                       NativeMongoCollection_set_mongoc_error(recv, &error);
+               if(!mongoc_collection_insert(self, MONGOC_INSERT_NONE, doc, NULL, &error)) {
+                       NativeMongoCollection_set_mongoc_error(self, &error);
                        return false;
                }
                return true;
@@ -304,8 +304,8 @@ extern class NativeMongoCollection `{ mongoc_collection_t * `}
        # Otherwise it will be inserted.
        fun save(document: NativeBSON): Bool import set_mongoc_error `{
                bson_error_t error;
-               if(!mongoc_collection_save(recv, document, NULL, &error)) {
-                       NativeMongoCollection_set_mongoc_error(recv, &error);
+               if(!mongoc_collection_save(self, document, NULL, &error)) {
+                       NativeMongoCollection_set_mongoc_error(self, &error);
                        return false;
                }
                return true;
@@ -318,8 +318,8 @@ extern class NativeMongoCollection `{ mongoc_collection_t * `}
        # The bson selector is not validated, simply passed along as appropriate to the server.
        fun remove(selector: NativeBSON): Bool import set_mongoc_error `{
                bson_error_t error;
-               if(!mongoc_collection_remove(recv, MONGOC_REMOVE_SINGLE_REMOVE, selector, NULL, &error)) {
-                       NativeMongoCollection_set_mongoc_error(recv, &error);
+               if(!mongoc_collection_remove(self, MONGOC_REMOVE_SINGLE_REMOVE, selector, NULL, &error)) {
+                       NativeMongoCollection_set_mongoc_error(self, &error);
                        return false;
                }
                return true;
@@ -330,8 +330,8 @@ extern class NativeMongoCollection `{ mongoc_collection_t * `}
        # This function shall remove documents in the collection that match `selector`.
        fun remove_all(selector: NativeBSON): Bool import set_mongoc_error `{
                bson_error_t error;
-               if(!mongoc_collection_remove(recv, MONGOC_REMOVE_NONE, selector, NULL, &error)) {
-                       NativeMongoCollection_set_mongoc_error(recv, &error);
+               if(!mongoc_collection_remove(self, MONGOC_REMOVE_NONE, selector, NULL, &error)) {
+                       NativeMongoCollection_set_mongoc_error(self, &error);
                        return false;
                }
                return true;
@@ -343,8 +343,8 @@ extern class NativeMongoCollection `{ mongoc_collection_t * `}
        # matches `selector`.
        fun update(selector, update: NativeBSON): Bool import set_mongoc_error `{
                bson_error_t error;
-               if(!mongoc_collection_update(recv, MONGOC_UPDATE_NONE, selector, update, NULL, &error)) {
-                       NativeMongoCollection_set_mongoc_error(recv, &error);
+               if(!mongoc_collection_update(self, MONGOC_UPDATE_NONE, selector, update, NULL, &error)) {
+                       NativeMongoCollection_set_mongoc_error(self, &error);
                        return false;
                }
                return true;
@@ -355,8 +355,8 @@ extern class NativeMongoCollection `{ mongoc_collection_t * `}
        # This function shall update documents in the collection that match `selector`.
        fun update_all(selector, update: NativeBSON): Bool import set_mongoc_error `{
                bson_error_t error;
-               if(!mongoc_collection_update(recv, MONGOC_UPDATE_MULTI_UPDATE, selector, update, NULL, &error)) {
-                       NativeMongoCollection_set_mongoc_error(recv, &error);
+               if(!mongoc_collection_update(self, MONGOC_UPDATE_MULTI_UPDATE, selector, update, NULL, &error)) {
+                       NativeMongoCollection_set_mongoc_error(self, &error);
                        return false;
                }
                return true;
@@ -367,9 +367,9 @@ extern class NativeMongoCollection `{ mongoc_collection_t * `}
        # This function shall execute a count `query` on the underlying collection.
        fun count(query: NativeBSON): Int import set_mongoc_error `{
                bson_error_t error;
-               int64_t count = mongoc_collection_count(recv, MONGOC_QUERY_NONE, query, 0, 0, NULL, &error);
+               int64_t count = mongoc_collection_count(self, MONGOC_QUERY_NONE, query, 0, 0, NULL, &error);
                if(count < 0) {
-                       NativeMongoCollection_set_mongoc_error(recv, &error);
+                       NativeMongoCollection_set_mongoc_error(self, &error);
                        return -1;
                }
                return count;
@@ -387,10 +387,10 @@ extern class NativeMongoCollection `{ mongoc_collection_t * `}
                NativeMongoCursor.as nullable, set_mongoc_error `{
                bson_error_t error;
                mongoc_cursor_t *cursor;
-               cursor = mongoc_collection_find(recv, MONGOC_QUERY_NONE, 0, 0, 0, query, NULL, NULL);
+               cursor = mongoc_collection_find(self, MONGOC_QUERY_NONE, 0, 0, 0, query, NULL, NULL);
 
                if (mongoc_cursor_error(cursor, &error)) {
-                       NativeMongoCollection_set_mongoc_error(recv, &error);
+                       NativeMongoCollection_set_mongoc_error(self, &error);
                        return null_NativeMongoCursor();
                }
 
@@ -403,8 +403,8 @@ extern class NativeMongoCollection `{ mongoc_collection_t * `}
        fun stats: nullable NativeBSON import set_mongoc_error, NativeBSON.as nullable `{
                bson_error_t error;
                bson_t *reply = bson_new();
-               if(!mongoc_collection_stats(recv, NULL, reply, &error)){
-                       NativeMongoCollection_set_mongoc_error(recv, &error);
+               if(!mongoc_collection_stats(self, NULL, reply, &error)){
+                       NativeMongoCollection_set_mongoc_error(self, &error);
                        return null_NativeBSON();
                }
                return NativeBSON_as_nullable(reply);
@@ -416,8 +416,8 @@ extern class NativeMongoCollection `{ mongoc_collection_t * `}
        # including all indexes associated with the collection.
        fun drop: Bool import set_mongoc_error `{
                bson_error_t error;
-               if(!mongoc_collection_drop(recv, &error)) {
-                       NativeMongoCollection_set_mongoc_error(recv, &error);
+               if(!mongoc_collection_drop(self, &error)) {
+                       NativeMongoCollection_set_mongoc_error(self, &error);
                        return false;
                }
                return true;
@@ -431,8 +431,8 @@ extern class NativeMongoCollection `{ mongoc_collection_t * `}
        # Additional operations will occur on renamed collection.
        fun rename(new_database, new_name: NativeString): Bool `{
                bson_error_t error;
-               if(!mongoc_collection_rename(recv, new_database, new_name, false, &error)){
-                       NativeMongoCollection_set_mongoc_error(recv, &error);
+               if(!mongoc_collection_rename(self, new_database, new_name, false, &error)){
+                       NativeMongoCollection_set_mongoc_error(self, &error);
                        return false;
                }
                return true;
@@ -441,7 +441,7 @@ extern class NativeMongoCollection `{ mongoc_collection_t * `}
        # Wrapper for `mongoc_collection_destroy()`.
        #
        # This instance should not be used beyond this point!
-       fun destroy `{ mongoc_collection_destroy(recv); `}
+       fun destroy `{ mongoc_collection_destroy(self); `}
 
        # Utility method to set `Sys.last_mongoc_error`.
        fun set_mongoc_error(err: BSONError) do sys.last_mongoc_error = err
@@ -467,7 +467,7 @@ extern class NativeMongoCursor `{ mongoc_cursor_t* `}
        # Wrapper for `mongoc_cursor_current()`.
        #
        # Fetches the cursors current document or NULL if there has been an error.
-       fun current: NativeBSON `{ return (bson_t*) mongoc_cursor_current(recv); `}
+       fun current: NativeBSON `{ return (bson_t*) mongoc_cursor_current(self); `}
 
        # Wrapper for `mongoc_cursor_next()`.
        #
@@ -477,16 +477,16 @@ extern class NativeMongoCursor `{ mongoc_cursor_t* `}
        # This function is a blocking function.
        fun next: Bool `{
                const bson_t *doc;
-               return mongoc_cursor_next(recv, &doc);
+               return mongoc_cursor_next(self, &doc);
        `}
 
        # Wrapper for `mongoc_cursor_more()`.
        #
        # This function shall indicate if there is more data to be read from the cursor.
-       fun more: Bool `{ return mongoc_cursor_more(recv); `}
+       fun more: Bool `{ return mongoc_cursor_more(self); `}
 
        # Wrapper for `mongoc_cursor_destroy()`.
        #
        # This instance should not be used beyond this point!
-       fun destroy `{ mongoc_cursor_destroy(recv); `}
+       fun destroy `{ mongoc_cursor_destroy(self); `}
 end
index f9b55af..019dc67 100644 (file)
@@ -13,7 +13,9 @@
 # limitations under the License.
 
 # Highly specific, but useful, collections-related classes.
-module more_collections
+module more_collections is serialize
+
+import serialization
 
 # Simple way to store an `HashMap[K, Array[V]]`
 #
@@ -61,6 +63,7 @@ end
 # assert hm2[2, "not-two"] == null
 # ~~~~
 class HashMap2[K1, K2, V]
+
        private var level1 = new HashMap[K1, HashMap[K2, V]]
 
        # Return the value associated to the keys `k1` and `k2`.
@@ -108,6 +111,7 @@ end
 # assert hm3[2, "not-two", 22] == null
 # ~~~~
 class HashMap3[K1, K2, K3, V]
+
        private var level1 = new HashMap[K1, HashMap2[K2, K3, V]]
 
        # Return the value associated to the keys `k1`, `k2`, and `k3`.
@@ -193,3 +197,332 @@ class DefaultMap[K, V]
 
        redef fun provide_default_value(key) do return default
 end
+
+# An unrolled linked list
+#
+# A sequence implemented as a linked list of arrays.
+#
+# This data structure is similar to the `List` but it can benefit from
+# better cache performance, lower data overhead for the nodes metadata and
+# it spares the GC to allocate many small nodes.
+class UnrolledList[E]
+       super Sequence[E]
+
+       # Desired capacity for each nodes
+       #
+       # By default at `32`, it can be increased for very large lists.
+       #
+       # It can be modified anytime, but newly created nodes may still be assigned
+       # the same capacity of old nodes when created by `insert`.
+       var nodes_length = 32 is writable
+
+       private var head_node: UnrolledNode[E] = new UnrolledNode[E](nodes_length)
+
+       private var tail_node: UnrolledNode[E] = head_node
+
+       redef var length = 0
+
+       redef fun clear
+       do
+               head_node = new UnrolledNode[E](nodes_length)
+               tail_node = head_node
+               length = 0
+       end
+
+       # Out parameter of `node_at`
+       private var index_within_node = 0
+
+       private fun node_at(index: Int): UnrolledNode[E]
+       do
+               assert index >= 0 and index < length
+
+               var node = head_node
+               while index >= node.length do
+                       index -= node.length
+                       node = node.next.as(not null)
+               end
+
+               index_within_node = index
+               return node
+       end
+
+       private fun insert_node(node: UnrolledNode[E], prev, next: nullable UnrolledNode[E])
+       do
+               if prev != null then
+                       prev.next = node
+               else head_node = node
+
+               if next != null then
+                       next.prev = node
+               else tail_node = node
+
+               node.next = next
+               node.prev = prev
+       end
+
+       redef fun [](index)
+       do
+               var node = node_at(index)
+               index = index_within_node + node.head_index
+               return node.items[index]
+       end
+
+       redef fun []=(index, value)
+       do
+               var node = node_at(index)
+               index = index_within_node + node.head_index
+               node.items[index] = value
+       end
+
+       redef fun push(item)
+       do
+               var node = tail_node
+               if not node.full then
+                       if node.tail_index < node.capacity then
+                               # There's room at the tail
+                               node.tail_index += 1
+                       else
+                               # Move everything over by `d`
+                               assert node.head_index > 0
+                               var d = node.head_index / 2 + 1
+                               node.move_head(node.length, d)
+                               for i in d.times do node.items[node.tail_index - i] = null
+                               node.head_index -= d
+                               node.tail_index += -d+1
+                       end
+                       node.items[node.tail_index-1] = item
+               else
+                       # New node!
+                       node = new UnrolledNode[E](nodes_length)
+                       insert_node(node, tail_node, null)
+                       node.tail_index = 1
+                       node.items[0] = item
+               end
+               length += 1
+       end
+
+       redef fun unshift(item)
+       do
+               var node = head_node
+               if not node.full then
+                       if node.head_index > 0 then
+                               # There's room at the head
+                               node.head_index -= 1
+                       else
+                               # Move everything over by `d`
+                               assert node.tail_index < node.capacity
+                               var d = (node.capacity-node.tail_index) / 2 + 1
+                               node.move_tail(0, d)
+                               for i in d.times do node.items[node.head_index+i] = null
+                               node.head_index += d-1
+                               node.tail_index += d
+                       end
+                       node.items[node.head_index] = item
+               else
+                       # New node!
+                       node = new UnrolledNode[E](nodes_length)
+                       insert_node(node, null, head_node)
+                       node.head_index = node.capacity-1
+                       node.tail_index = node.capacity
+                       node.items[node.capacity-1] = item
+               end
+               length += 1
+       end
+
+       redef fun pop
+       do
+               assert not_empty
+
+               var node = tail_node
+               while node.length == 0 do
+                       # Delete empty node
+                       var nullable_node = node.prev
+                       assert is_not_empty: nullable_node != null
+                       node = nullable_node
+                       node.next = null
+                       self.tail_node = node
+               end
+
+               var item = node.items[node.tail_index-1]
+               node.tail_index -= 1
+               length -= 1
+               return item
+       end
+
+       redef fun shift
+       do
+               assert not_empty
+
+               var node = head_node
+               while node.length == 0 do
+                       # Delete empty node
+                       var nullable_node = node.next
+                       assert is_not_empty: nullable_node != null
+                       node = nullable_node
+                       node.prev = null
+                       self.head_node = node
+               end
+
+               var item = node.items[node.head_index]
+               node.head_index += 1
+               length -= 1
+               return item
+       end
+
+       redef fun insert(item, index)
+       do
+               if index == length then
+                       push item
+                       return
+               end
+
+               var node = node_at(index)
+               index = index_within_node
+               if node.full then
+                       # Move half to a new node
+                       var new_node = new UnrolledNode[E](nodes_length.max(node.capacity))
+
+                       # Plug in the new node
+                       var next_node = node.next
+                       insert_node(new_node, node, next_node)
+
+                       # Move items at and after `index` to the new node
+                       var to_displace = node.length-index
+                       var offset = (new_node.capacity-to_displace)/2
+                       for i in [0..to_displace[ do
+                               new_node.items[offset+i] = node.items[index+i]
+                               node.items[index+i] = null
+                       end
+                       new_node.head_index = offset
+                       new_node.tail_index = offset + to_displace
+                       node.tail_index -= to_displace
+
+                       # Store `item`
+                       if index > node.capacity / 2 then
+                               new_node.items[offset-1] = item
+                               new_node.head_index -= 1
+                       else
+                               node.items[node.head_index+index] = item
+                               node.tail_index += 1
+                       end
+               else
+                       if node.tail_index < node.capacity then
+                               # Move items towards the tail
+                               node.move_tail(index, 1)
+                               node.tail_index += 1
+                               node.items[node.head_index + index] = item
+                       else
+                               # Move items towards the head
+                               node.move_head(index, 1)
+                               node.items[node.head_index + index-1] = item
+                               node.head_index -= 1
+                       end
+               end
+               length += 1
+       end
+
+       redef fun remove_at(index)
+       do
+               var node = node_at(index)
+               index = index_within_node + node.head_index
+
+               # Shift left all the elements after `index`
+               for i in [index+1 .. node.tail_index[ do
+                       node.items[i-1] = node.items[i]
+               end
+               node.tail_index -= 1
+               node.items[node.tail_index] = null
+
+               length -= 1
+
+               var next_node = node.next
+               var prev_node = node.prev
+               if node.is_empty and (next_node != null or prev_node != null) then
+                       # Empty and non-head or tail node, delete
+                       if next_node != null then
+                               next_node.prev = node.prev
+                       else tail_node = prev_node.as(not null)
+
+                       if prev_node != null then
+                               prev_node.next = node.next
+                       else head_node = next_node.as(not null)
+               end
+       end
+
+       redef fun iterator do return new UnrolledIterator[E](self)
+end
+
+# Node composing an `UnrolledList`
+#
+# Stores the elements in the `items` array. The elements in the `items` array
+# begin at `head_index` and end right before `tail_index`. The data is contiguous,
+# but there can be empty cells at the beginning and the end of the array.
+private class UnrolledNode[E]
+
+       var prev: nullable UnrolledNode[E] = null
+
+       var next: nullable UnrolledNode[E] = null
+
+       # Desired length of `items`
+       var capacity: Int
+
+       # `Array` of items in this node, filled with `null`
+       var items = new Array[nullable E].filled_with(null, capacity) is lazy
+
+       # Index of the first element in `items`
+       var head_index = 0
+
+       # Index after the last element in `items`
+       var tail_index = 0
+
+       fun length: Int do return tail_index - head_index
+
+       fun full: Bool do return length == capacity
+
+       fun is_empty: Bool do return tail_index == head_index
+
+       # Move towards the head all elements before `index` of `displace` cells
+       fun move_tail(index, displace: Int)
+       do
+               for i in [tail_index-1..head_index+index].step(-1) do
+                       items[i+displace] = items[i]
+               end
+       end
+
+       # Move towards the tail all elements at and after `index` of `displace` cells
+       fun move_head(index, displace: Int)
+       do
+               for i in [head_index..head_index+index[ do
+                       items[i-displace] = items[i]
+               end
+       end
+end
+
+private class UnrolledIterator[E]
+       super IndexedIterator[E]
+
+       var list: UnrolledList[E]
+
+       var node: nullable UnrolledNode[E] = list.head_node is lazy
+
+       # Index of the current `item`
+       redef var index = 0
+
+       # Index within the current `node`
+       var index_in_node: Int = node.head_index is lazy
+
+       redef fun item do return node.items[index_in_node]
+
+       redef fun is_ok do return index < list.length
+
+       redef fun next
+       do
+               index += 1
+               index_in_node += 1
+
+               if index_in_node >= node.tail_index then
+                       node = node.next
+                       if node != null then index_in_node = node.head_index
+               end
+       end
+end
index 69d0d9f..d7b5784 100644 (file)
@@ -177,14 +177,14 @@ extern class Comm `{ MPI_Comm `}
        # Number of processors in this communicator
        fun size: Int `{
                int size;
-               MPI_Comm_size(recv, &size);
+               MPI_Comm_size(self, &size);
                return size;
        `}
 
        # Rank on this processor in this communicator
        fun rank: Rank `{
                int rank;
-               MPI_Comm_rank(recv, &rank);
+               MPI_Comm_rank(self, &rank);
                return rank;
        `}
 end
@@ -243,19 +243,19 @@ extern class Status `{ MPI_Status* `}
        new `{ return malloc(sizeof(MPI_Status)); `}
 
        # Source of this communication
-       fun source: Rank `{ return recv->MPI_SOURCE; `}
+       fun source: Rank `{ return self->MPI_SOURCE; `}
 
        # Tag of this communication
-       fun tag: Tag `{ return recv->MPI_TAG; `}
+       fun tag: Tag `{ return self->MPI_TAG; `}
 
        # Success or error on this communication
-       fun error: SuccessOrError `{ return recv->MPI_ERROR; `}
+       fun error: SuccessOrError `{ return self->MPI_ERROR; `}
 
        # Count of the given `data_type` in this communication
        fun count(data_type: DataType): Int
        `{
                int count;
-               MPI_Get_count(recv, data_type, &count);
+               MPI_Get_count(self, data_type, &count);
                return count;
        `}
 end
@@ -322,7 +322,7 @@ end
 # An MPI return code to report success or errors
 extern class SuccessOrError `{ int `}
        # Is this a success?
-       fun is_success: Bool `{ return recv == MPI_SUCCESS; `}
+       fun is_success: Bool `{ return self == MPI_SUCCESS; `}
 
        # Is this an error?
        fun is_error: Bool do return not is_success
@@ -333,14 +333,14 @@ extern class SuccessOrError `{ int `}
        fun error_class: ErrorClass
        `{
                int class;
-               MPI_Error_class(recv, &class);
+               MPI_Error_class(self, &class);
                return class;
        `}
 
        redef fun to_s do return native_to_s.to_s
        private fun native_to_s: NativeString `{
                char *err = malloc(MPI_MAX_ERROR_STRING);
-               MPI_Error_string(recv, err, NULL);
+               MPI_Error_string(self, err, NULL);
                return err;
        `}
 end
@@ -350,7 +350,7 @@ extern class ErrorClass `{ int `}
        redef fun to_s do return native_to_s.to_s
        private fun native_to_s: NativeString `{
                char *err = malloc(MPI_MAX_ERROR_STRING);
-               MPI_Error_string(recv, err, NULL);
+               MPI_Error_string(self, err, NULL);
                return err;
        `}
 end
@@ -361,7 +361,7 @@ extern class Rank `{ int `}
        new any `{ return MPI_ANY_SOURCE; `}
 
        # This Rank as an `Int`
-       fun to_i: Int `{ return recv; `}
+       fun to_i: Int `{ return self; `}
        redef fun to_s do return to_i.to_s
 end
 
@@ -371,19 +371,19 @@ extern class Tag `{ int `}
        new any `{ return MPI_ANY_TAG; `}
 
        # This tag as an `Int`
-       fun to_i: Int `{ return recv; `}
+       fun to_i: Int `{ return self; `}
        redef fun to_s do return to_i.to_s
 end
 
 redef universal Int
        # `self`th MPI rank
-       fun rank: Rank `{ return recv; `}
+       fun rank: Rank `{ return self; `}
 
        # Tag identified by `self`
-       fun tag: Tag `{ return recv; `}
+       fun tag: Tag `{ return self; `}
 
        # Is this value undefined according to MPI? (may be returned by `Status::count`)
-       fun is_undefined: Bool `{ return recv == MPI_UNDEFINED; `}
+       fun is_undefined: Bool `{ return self == MPI_UNDEFINED; `}
 end
 
 # Something sendable directly and efficiently over MPI
index 2ffa800..12a2b9f 100644 (file)
@@ -105,7 +105,7 @@ abstract class NeoNodeCollection
        #
        # SEE: `create_node`
        # SEE: `register`
-       redef fun add(node: NeoNode) is abstract
+       redef fun add(node) is abstract
 
        # Add a new node to the graph and return it.
        #
index fb5ffd0..898c059 100644 (file)
@@ -297,7 +297,7 @@ redef class NeoNode
        redef fun to_s do return to_json
 
        # Append the JSON representation of the node to the specified buffer.
-       redef fun append_json_for(graph: NeoGraph, buffer: Buffer) do
+       redef fun append_json_for(graph, buffer) do
                append_json(buffer)
        end
 end
@@ -307,7 +307,7 @@ redef class NeoEdge
        # Append the JSON representation of the relationship to the specified buffer.
        #
        # Use the IDs specfied by `graph.nodes`.
-       redef fun append_json_for(graph: NeoGraph, buffer: Buffer) do
+       redef fun append_json_for(graph, buffer) do
                buffer.append "\{\"type\":"
                rel_type.append_json(buffer)
                buffer.append ",\"properties\":"
index fb6129f..939ed88 100644 (file)
@@ -63,7 +63,7 @@ class SequentialNodeCollection
                return nodes[id]
        end
 
-       redef fun has_id(id: Int): Bool do
+       redef fun has_id(id) do
                return id >= 0 and id < nodes.length and nodes[id] isa NeoNode
        end
 
index 666974b..ef87adb 100644 (file)
@@ -50,7 +50,7 @@ class HttpResponse
        end
 
        # Get this reponse as a string according to HTTP protocol
-       redef fun to_s: String
+       redef fun to_s
        do
                finalize
 
index 516c860..89ff3cf 100644 (file)
@@ -366,9 +366,9 @@ in "C Header" `{
 extern class PepperDictionary `{ struct PP_Var* `}
 
        new `{
-               struct PP_Var* recv = malloc( sizeof( struct PP_Var ) );
-               *recv = g_varDictionaryInterface->Create();
-               return recv;
+               struct PP_Var* self = malloc( sizeof( struct PP_Var ) );
+               *self = g_varDictionaryInterface->Create();
+               return self;
        `}
 
        # Get fonction using PepperVars.
@@ -377,7 +377,7 @@ extern class PepperDictionary `{ struct PP_Var* `}
        # If 'key' is not a String typed PepperVar, or doesn't exist in the Dictionary, an undefined PepperVar is returned.
        fun native_get(key: PepperVar): PepperVar `{
                struct PP_Var* value = malloc( sizeof ( struct PP_Var ) );
-               *value = g_varDictionaryInterface->Get(*recv, *key);
+               *value = g_varDictionaryInterface->Get(*self, *key);
                return value;
        `}
 
@@ -401,7 +401,7 @@ extern class PepperDictionary `{ struct PP_Var* `}
        # Returns a Boolean indicating whether the operation succeeds.
        fun native_set(key: PepperVar, value: PepperVar): Bool `{
                PP_Bool b;
-               b = g_varDictionaryInterface->Set(*recv, *key, *value);
+               b = g_varDictionaryInterface->Set(*self, *key, *value);
                return b;
        `}
 
@@ -422,7 +422,7 @@ extern class PepperDictionary `{ struct PP_Var* `}
        #
        # Takes a String typed PepperVar.
        fun native_delete(key: PepperVar) `{
-               g_varDictionaryInterface->Delete(*recv, *key);
+               g_varDictionaryInterface->Delete(*self, *key);
        `}
        
        # Deletes the specified key and its associated value, if the key exists.
@@ -439,7 +439,7 @@ extern class PepperDictionary `{ struct PP_Var* `}
        # Takes a String typed PepperVar.
        fun native_has_key(key: PepperVar): Bool `{
                PP_Bool b;
-               b = g_varDictionaryInterface->HasKey(*recv, *key);
+               b = g_varDictionaryInterface->HasKey(*self, *key);
                return b;
        `}
 
@@ -457,7 +457,7 @@ extern class PepperDictionary `{ struct PP_Var* `}
        # Returns a PepperArray which contains all the keys of the Dictionary. The elements are string vars.
        fun get_keys: PepperArray `{
                struct PP_Var* array = malloc( sizeof( struct PP_Var ) );
-               *array = g_varDictionaryInterface->GetKeys(*recv);
+               *array = g_varDictionaryInterface->GetKeys(*self);
                return array;
        `}
 
@@ -465,7 +465,7 @@ extern class PepperDictionary `{ struct PP_Var* `}
        fun copy: PepperDictionary `{
                struct PP_Var* varDictionary = malloc( sizeof( struct PP_Var ) );
                *varDictionary = g_varDictionaryInterface->Create();
-               *varDictionary = *recv;
+               *varDictionary = *self;
                return varDictionary;
        `}
 end
@@ -474,9 +474,9 @@ end
 extern class PepperArray `{ struct PP_Var* `}
 
        new `{
-               struct PP_Var* recv = malloc( sizeof( struct PP_Var ) );
-               *recv = g_varArrayInterface->Create();
-               return recv;
+               struct PP_Var* self = malloc( sizeof( struct PP_Var ) );
+               *self = g_varArrayInterface->Create();
+               return self;
        `}
 
        # Returns the element at the specified position as a PepperVar.
@@ -484,7 +484,7 @@ extern class PepperArray `{ struct PP_Var* `}
        # If 'index' is larger than or equal to the array length, an undefined PepperVar is returned.
        fun native_get(index: Int): PepperVar `{
                struct PP_Var* value = malloc( sizeof( struct PP_Var ) );
-               *value = g_varArrayInterface->Get(*recv, index);
+               *value = g_varArrayInterface->Get(*self, index);
                return value;
        `}
 
@@ -499,7 +499,7 @@ extern class PepperArray `{ struct PP_Var* `}
 
        # Returns an int containing the length of the PepperArray.
        fun length: Int `{
-               int length = g_varArrayInterface->GetLength(*recv);
+               int length = g_varArrayInterface->GetLength(*self);
                return length;
        `}
 
@@ -511,7 +511,7 @@ extern class PepperArray `{ struct PP_Var* `}
        # Returns a Boolean indicating whether the operation succeeds.
        fun native_set(index: Int, value: PepperVar): Bool `{
                PP_Bool b;
-               b = g_varArrayInterface->Set(*recv, index, *value);
+               b = g_varArrayInterface->Set(*self, index, *value);
                return b;
        `}
 
@@ -534,7 +534,7 @@ extern class PepperArray `{ struct PP_Var* `}
        # Returns a Boolean indicating whether the operation succeeds.
        fun length=(length: Int): Bool `{
                PP_Bool b;
-               b = g_varArrayInterface->SetLength(*recv, length);
+               b = g_varArrayInterface->SetLength(*self, length);
                return b;
        `}
 end
@@ -561,19 +561,19 @@ extern class PepperVar `{ struct PP_Var* `}
                return null
        end
 
-       private fun isa_null: Bool `{ return recv->type == PP_VARTYPE_NULL; `}
-       private fun isa_bool: Bool `{ return recv->type == PP_VARTYPE_BOOL; `}
-       private fun isa_int: Bool `{ return recv->type == PP_VARTYPE_INT32; `}
-       private fun isa_float: Bool `{ return recv->type == PP_VARTYPE_DOUBLE; `}
-       private fun isa_string: Bool `{ return recv->type == PP_VARTYPE_STRING; `}
-       private fun is_undefined: Bool `{ return recv->type == PP_VARTYPE_UNDEFINED; `}
+       private fun isa_null: Bool `{ return self->type == PP_VARTYPE_NULL; `}
+       private fun isa_bool: Bool `{ return self->type == PP_VARTYPE_BOOL; `}
+       private fun isa_int: Bool `{ return self->type == PP_VARTYPE_INT32; `}
+       private fun isa_float: Bool `{ return self->type == PP_VARTYPE_DOUBLE; `}
+       private fun isa_string: Bool `{ return self->type == PP_VARTYPE_STRING; `}
+       private fun is_undefined: Bool `{ return self->type == PP_VARTYPE_UNDEFINED; `}
 
-       private fun as_bool: Bool `{ return recv->value.as_bool; `}
-       private fun as_int: Int `{ return recv->value.as_int; `}
-       private fun as_float: Float `{ return recv->value.as_double; `}
+       private fun as_bool: Bool `{ return self->value.as_bool; `}
+       private fun as_int: Int `{ return self->value.as_int; `}
+       private fun as_float: Float `{ return self->value.as_double; `}
        private fun as_string: String import NativeString.to_s_with_length `{
                uint32_t len;
-               char* str = (char*)g_varInterface->VarToUtf8(*recv, &len);
+               char* str = (char*)g_varInterface->VarToUtf8(*self, &len);
                return NativeString_to_s_with_length(str, len);
        `}
 end
@@ -589,7 +589,7 @@ redef class Int
        # Converts a Int into a PepperVar with Int type.
        redef fun to_pepper `{
                struct PP_Var* var = malloc( sizeof( struct PP_Var ) );
-               *var = PP_MakeInt32(recv);
+               *var = PP_MakeInt32(self);
                return var;
        `}
 end
@@ -600,7 +600,7 @@ redef class Float
        # Converts a Float into a PepperVar with Float type.
        redef fun to_pepper `{
                struct PP_Var* var = malloc( sizeof( struct PP_Var ) );
-               *var = PP_MakeDouble(recv);
+               *var = PP_MakeDouble(self);
                return var;
        `}
 end
@@ -611,7 +611,7 @@ redef class Bool
        # Converts a Bool into a PepperVar with Bool type.
        redef fun to_pepper `{
                struct PP_Var* var = malloc( sizeof( struct PP_Var ) );
-               *var = PP_MakeBool(recv);
+               *var = PP_MakeBool(self);
                return var;
        `}
 end
@@ -621,9 +621,9 @@ redef class String
 
        # Converts a String into a PepperVar with String type.
        redef fun to_pepper: PepperVar import String.to_cstring, String.length `{
-               char *str = String_to_cstring(recv);
+               char *str = String_to_cstring(self);
                struct PP_Var* var = malloc( sizeof( struct PP_Var ) );
-               *var = g_varInterface->VarFromUtf8(str, String_length(recv));
+               *var = g_varInterface->VarFromUtf8(str, String_length(self));
                return var;
        `}
 end
@@ -653,9 +653,11 @@ class PnaclStream
        # fill_buffer now checks for a message in the message queue which is filled by user inputs.
        redef fun fill_buffer
        do
-               _buffer.clear
                _buffer_pos = 0
-               _buffer.append check_message.to_s
+               var nns = check_message
+               var nslen = nns.cstring_length
+               _buffer_length = nslen
+               nns.copy_to(buffer, nslen, 0, 0)
        end
 end
 
@@ -678,7 +680,7 @@ class PnaclApp
 
        # Sets everything up to work, need to be called at first.
        fun initialize import PnaclApp.handle_message, PnaclApp.handle_dictionary, NativeString.to_s_with_length `{
-               app = recv;
+               app = self;
        `}
 
        # Posts a message to JS.
index 32d1a71..fc624a6 100644 (file)
@@ -19,5 +19,5 @@ module posix_ext
 
 redef extern class Passwd
        # User information
-       fun gecos: String import NativeString.to_s `{ return NativeString_to_s(recv->pw_gecos); `}
+       fun gecos: String import NativeString.to_s `{ return NativeString_to_s(self->pw_gecos); `}
 end
index e408270..3ed81b4 100644 (file)
@@ -32,7 +32,7 @@ in "C" `{
 
 redef extern class NativePthread
        fun cancel: Bool `{
-               return pthread_cancel(*recv);
+               return pthread_cancel(*self);
        `}
 end
 
@@ -56,7 +56,7 @@ private extern class NativePthreadBarrier in "C" `{ pthread_barrier_t * `}
                return barrier;
        `}
 
-       fun destroy `{ pthread_barrier_destroy(recv); `}
+       fun destroy `{ pthread_barrier_destroy(self); `}
 
-       fun wait `{ pthread_barrier_wait(recv); `}
+       fun wait `{ pthread_barrier_wait(self); `}
 end
index afb66d6..900063f 100644 (file)
@@ -112,14 +112,14 @@ private extern class NativePthread in "C" `{ pthread_t * `}
 
        fun join: nullable Object `{
                void *thread_return;
-               pthread_join(*recv, &thread_return);
+               pthread_join(*self, &thread_return);
                if(thread_return == NULL) thread_return = null_Object();
                return (nullable_Object)thread_return;
        `}
 
-       fun equal(other: NativePthread): Bool `{ return pthread_equal(*recv, *other); `}
+       fun equal(other: NativePthread): Bool `{ return pthread_equal(*self, *other); `}
 
-       fun kill(signal: Int) `{ pthread_kill(*recv, signal); `}
+       fun kill(signal: Int) `{ pthread_kill(*self, signal); `}
 end
 
 private extern class NativePthreadAttr in "C" `{ pthread_attr_t * `}
@@ -135,7 +135,7 @@ private extern class NativePthreadAttr in "C" `{ pthread_attr_t * `}
        `}
 
        fun destroy `{
-               pthread_attr_destroy(recv);
+               pthread_attr_destroy(self);
        `}
 
        # Most features of this class are still TODO
@@ -159,11 +159,11 @@ private extern class NativePthreadMutex in "C" `{ pthread_mutex_t * `}
                return mutex;
        `}
 
-       fun destroy `{ pthread_mutex_destroy(recv); `}
+       fun destroy `{ pthread_mutex_destroy(self); `}
 
-       fun lock `{ pthread_mutex_lock(recv); `}
-       fun try_lock: Bool `{ return pthread_mutex_trylock(recv); `}
-       fun unlock `{ pthread_mutex_unlock(recv); `}
+       fun lock `{ pthread_mutex_lock(self); `}
+       fun try_lock: Bool `{ return pthread_mutex_trylock(self); `}
+       fun unlock `{ pthread_mutex_unlock(self); `}
 end
 
 private extern class NativePthreadMutexAttr in "C" `{ pthread_mutexattr_t * `}
@@ -173,11 +173,11 @@ private extern class NativePthreadMutexAttr in "C" `{ pthread_mutexattr_t * `}
                return attr;
        `}
 
-       fun destroy `{ pthread_mutexattr_destroy(recv); `}
+       fun destroy `{ pthread_mutexattr_destroy(self); `}
 
-       fun set_type_normal `{ pthread_mutexattr_settype(recv, PTHREAD_MUTEX_NORMAL); `}
-       fun set_type_recursive `{ pthread_mutexattr_settype(recv, PTHREAD_MUTEX_RECURSIVE); `}
-       fun set_type_errorcheck `{ pthread_mutexattr_settype(recv, PTHREAD_MUTEX_ERRORCHECK); `}
+       fun set_type_normal `{ pthread_mutexattr_settype(self, PTHREAD_MUTEX_NORMAL); `}
+       fun set_type_recursive `{ pthread_mutexattr_settype(self, PTHREAD_MUTEX_RECURSIVE); `}
+       fun set_type_errorcheck `{ pthread_mutexattr_settype(self, PTHREAD_MUTEX_ERRORCHECK); `}
 
        # pthread_mutexattr_setpshared
        # pthread_mutexattr_setprotocol
@@ -193,13 +193,13 @@ private extern class NativePthreadKey in "C" `{ pthread_key_t * `}
        `}
 
        fun get: nullable Object `{
-               void *val = pthread_getspecific(*recv);
+               void *val = pthread_getspecific(*self);
                if (val == NULL) val = null_Object();
                return val;
        `}
 
        fun set(val: nullable Object) `{
-               pthread_setspecific(*recv, val);
+               pthread_setspecific(*self, val);
        `}
 end
 
@@ -215,13 +215,13 @@ private extern class NativePthreadCond in "C" `{ pthread_cond_t * `}
                return NULL;
        `}
 
-       fun destroy `{ pthread_cond_destroy(recv); `}
+       fun destroy `{ pthread_cond_destroy(self); `}
 
-       fun signal `{ pthread_cond_signal(recv); `}
+       fun signal `{ pthread_cond_signal(self); `}
 
-       fun broadcast `{ pthread_cond_broadcast(recv);  `}
+       fun broadcast `{ pthread_cond_broadcast(self);  `}
 
-       fun wait(mutex: NativePthreadMutex) `{ pthread_cond_wait(recv, mutex); `}
+       fun wait(mutex: NativePthreadMutex) `{ pthread_cond_wait(self, mutex); `}
 end
 
 #
index 3a02d86..960a3cb 100644 (file)
@@ -48,7 +48,7 @@ extern class Timespec `{struct timespec*`}
 
        # Update `self` clock.
        fun update `{
-               clock_gettime( CLOCK_MONOTONIC, recv );
+               clock_gettime(CLOCK_MONOTONIC, self);
        `}
 
        # Substract a Timespec from `self`.
@@ -62,14 +62,14 @@ extern class Timespec `{struct timespec*`}
 
        # Number of whole seconds of elapsed time.
        fun sec : Int `{
-               return recv->tv_sec;
+               return self->tv_sec;
        `}
 
        # Rest of the elapsed time (a fraction of a second).
        #
        # Number of nanoseconds.
        fun nanosec : Int `{
-               return recv->tv_nsec;
+               return self->tv_nsec;
        `}
 
        # Seconds in Float
index f54ec0f..64691cd 100644 (file)
@@ -31,9 +31,9 @@ class AttributesImpl
        super Attributes
 
        private var data = new Array[String]
-       redef var length: Int = 0
+       redef var length = 0
 
-       redef fun uri(index: Int): nullable String do
+       redef fun uri(index) do
                if index >= 0 and index < length then
                        return data[index * 5]
                else
@@ -41,7 +41,7 @@ class AttributesImpl
                end
        end
 
-       redef fun local_name(index: Int): nullable String do
+       redef fun local_name(index) do
                if index >= 0 and index < length then
                        return data[index * 5 + 1]
                else
@@ -49,7 +49,7 @@ class AttributesImpl
                end
        end
 
-       redef fun qname(index: Int): nullable String do
+       redef fun qname(index) do
                if index >= 0 and index < length then
                        return data[index * 5 + 2]
                else
@@ -85,7 +85,7 @@ class AttributesImpl
        # are not available.
        #
        # SEE: `length`
-       redef fun type_of(index): nullable String do
+       redef fun type_of(index) do
                if index isa Int then
                        if index >= 0 and index < length then
                                return data[index * 5 + 3]
@@ -124,7 +124,7 @@ class AttributesImpl
        # are not available.
        #
        # SEE: `length`
-       redef fun value_of(index): nullable String do
+       redef fun value_of(index) do
                if index isa Int then
                        if index >= 0 and index < length then
                                return data[index * 5 + 4]
@@ -157,7 +157,7 @@ class AttributesImpl
        #
        # The index of the attribute, or -1 if it does not
        # appear in the list.
-       redef fun index_ns(uri: String, local_name: String): Int do
+       redef fun index_ns(uri, local_name) do
                var i = 0
 
                if "" != local_name then
@@ -184,7 +184,7 @@ class AttributesImpl
        #
        # The index of the attribute, or -1 if it does not
        # appear in the list.
-       redef fun index_of(qname: String): Int do
+       redef fun index_of(qname) do
                var i = 0
 
                if "" != qname then
@@ -218,7 +218,7 @@ class AttributesImpl
        # The attribute type as a string, or `null` if the
        # attribute is not in the list or if Namespace
        # processing is not being performed.
-       redef fun type_ns(uri: String, local_name: String): nullable String do
+       redef fun type_ns(uri, local_name) do
                var i = 0
 
                if "" != local_name then
@@ -252,7 +252,7 @@ class AttributesImpl
        # The attribute value as a string, or `null` if the
        # attribute is not in the list or if Namespace
        # processing is not being performed.
-       redef fun value_ns(uri: String, local_name: String): nullable String do
+       redef fun value_ns(uri, local_name) do
                var i = 0
 
                if "" != local_name then
index 99d0228..185f074 100644 (file)
@@ -19,19 +19,21 @@ import sax::sax_locator
 # can use it to make a persistent snapshot of a locator at any
 # point during a document parse:
 #
-#     import sax::helpers::sax_locator_impl
-#     import sax::content_handler
+# ~~~nitish
+# import sax::helpers::sax_locator_impl
+# import sax::content_handler
 #
-#     class Example super ContentHandler
-#      private var locator: SAXLocator
-#      private var start_loc: nullable SAXLocator = null
+# class Example super ContentHandler
+#     private var locator: SAXLocator
+#     private var start_loc: nullable SAXLocator = null
 #
-#      redef fun start_document do
-#              # save the location of the start of the document
-#              # for future use.
-#              start_loc = new SAXLocatorImpl.from(locator)
-#      end
+#     redef fun start_document do
+#         # save the location of the start of the document
+#         # for future use.
+#         start_loc = new SAXLocatorImpl.from(locator)
 #     end
+# end
+# ~~~
 #
 # Normally, parser writers will not use this class, since it
 # is more efficient to provide location information only when
@@ -40,10 +42,10 @@ import sax::sax_locator
 # Note: The original source code and documentation of this class comes, in part,
 # from [SAX 2.0](http://www.saxproject.org).
 class SAXLocatorImpl super SAXLocator
-       redef var public_id: nullable String = null is writable
-       redef var system_id: nullable String = null is writable
-       redef var line_number: Int = -1 is writable
-       redef var column_number: Int = -1 is writable
+       redef var public_id = null is writable
+       redef var system_id = null is writable
+       redef var line_number = -1 is writable
+       redef var column_number = -1 is writable
 
        # Zero-argument constructor.
        #
index 7bcd021..78efef9 100644 (file)
@@ -42,14 +42,14 @@ class XMLFilterImpl
 
        # XMLFilter
 
-       redef var parent: nullable XMLReader = null is writable
+       redef var parent = null is writable
 
        # XMLReader
 
-       redef var entity_resolver: nullable EntityResolver = null is writable
-       redef var dtd_handler: nullable DTDHandler = null is writable
-       redef var content_handler: nullable ContentHandler = null is writable
-       redef var error_handler: nullable ErrorHandler = null is writable
+       redef var entity_resolver = null is writable
+       redef var dtd_handler = null is writable
+       redef var content_handler = null is writable
+       redef var error_handler = null is writable
 
 
        ############################################################################
@@ -73,7 +73,7 @@ class XMLFilterImpl
                parent = parent_reader
        end
 
-       redef fun feature_recognized(name: String): Bool do
+       redef fun feature_recognized(name) do
                if parent == null then
                        return false
                else
@@ -81,7 +81,7 @@ class XMLFilterImpl
                end
        end
 
-       redef fun feature_readable(name: String): Bool do
+       redef fun feature_readable(name) do
                if parent == null then
                        return false
                else
@@ -89,7 +89,7 @@ class XMLFilterImpl
                end
        end
 
-       redef fun feature_writable(name: String): Bool do
+       redef fun feature_writable(name) do
                if parent == null then
                        return false
                else
@@ -112,7 +112,7 @@ class XMLFilterImpl
        # SEE: `feature_recognized`
        #
        # SEE: `feature_readable`
-       redef fun feature(name: String): Bool do
+       redef fun feature(name) do
                assert sax_recognized: parent != null else
                        sys.stderr.write("Feature: {name}\n")
                end
@@ -136,14 +136,14 @@ class XMLFilterImpl
        # SEE: `feature_recognized`
        #
        # SEE: `feature_writable`
-       redef fun feature=(name: String, value: Bool) do
+       redef fun feature=(name, value) do
                assert sax_recognized: parent != null else
                        sys.stderr.write("Feature: {name}\n")
                end
                parent.feature(name) = value
        end
 
-       redef fun property_recognized(name: String): Bool do
+       redef fun property_recognized(name) do
                if parent == null then
                        return false
                else
@@ -151,7 +151,7 @@ class XMLFilterImpl
                end
        end
 
-       redef fun property_readable(name: String): Bool do
+       redef fun property_readable(name) do
                if parent == null then
                        return false
                else
@@ -159,7 +159,7 @@ class XMLFilterImpl
                end
        end
 
-       redef fun property_writable(name: String): Bool do
+       redef fun property_writable(name) do
                if parent == null then
                        return false
                else
@@ -180,7 +180,7 @@ class XMLFilterImpl
        # SEE: `property_recognized`
        #
        # SEE: `property_readable`
-       redef fun property(name: String): nullable Object do
+       redef fun property(name) do
                assert sax_recognized: parent != null else
                        sys.stderr.write("Property: {name}\n")
                end
@@ -204,19 +204,19 @@ class XMLFilterImpl
        # SEE: `property_recognized`
        #
        # SEE: `property_writable`
-       redef fun property=(name: String, value: nullable Object) do
+       redef fun property=(name, value) do
                assert sax_recognized: parent != null else
                        sys.stderr.write("Property: {name}\n")
                end
                parent.property(name) = value
        end
 
-       redef fun parse(input: InputSource) do
+       redef fun parse(input) do
                setup_parse
                parent.parse(input)
        end
 
-       redef fun parse_file(system_id: String) do
+       redef fun parse_file(system_id) do
                var source = new InputSource
 
                source.system_id = system_id
@@ -227,9 +227,7 @@ class XMLFilterImpl
        ############################################################################
        # EntityResolver
 
-       redef fun resolve_entity(public_id: nullable String,
-                       system_id: nullable String):
-                       nullable InputSource do
+       redef fun resolve_entity(public_id, system_id) do
                if entity_resolver == null then
                        return null
                else
@@ -241,15 +239,13 @@ class XMLFilterImpl
        ############################################################################
        # DTDHandler
 
-       redef fun notation_decl(name: String, public_id: String,
-                       system_id: String) do
+       redef fun notation_decl(name, public_id, system_id) do
                if dtd_handler != null then
                        dtd_handler.notation_decl(name, public_id, system_id)
                end
        end
 
-       redef fun unparsed_entity_decl(name: String, public_id: String,
-                       system_id: String) do
+       redef fun unparsed_entity_decl(name, public_id, system_id) do
                if dtd_handler != null then
                        dtd_handler.unparsed_entity_decl(name, public_id, system_id)
                end
@@ -259,7 +255,7 @@ class XMLFilterImpl
        ############################################################################
        # ContentHandler
 
-       redef fun document_locator=(locator: SAXLocator) do
+       redef fun document_locator=(locator) do
                if content_handler != null then
                        content_handler.document_locator = locator
                end
@@ -277,50 +273,49 @@ class XMLFilterImpl
                end
        end
 
-       redef fun start_prefix_mapping(prefix: String, uri: String) do
+       redef fun start_prefix_mapping(prefix, uri) do
                if content_handler != null then
                        content_handler.start_prefix_mapping(prefix, uri)
                end
        end
 
-       redef fun end_prefix_mapping(prefix: String) do
+       redef fun end_prefix_mapping(prefix) do
                if content_handler != null then
                        content_handler.end_prefix_mapping(prefix)
                end
        end
 
-       redef fun start_element(uri: String, local_name: String, qname: String,
-                       atts: Attributes) do
+       redef fun start_element(uri, local_name, qname, atts) do
                if content_handler != null then
                        content_handler.start_element(uri, local_name, qname, atts)
                end
        end
 
-       redef fun end_element(uri: String, local_name: String, qname: String) do
+       redef fun end_element(uri, local_name, qname) do
                if content_handler != null then
                        content_handler.end_element(uri, local_name, qname)
                end
        end
 
-       redef fun characters(str: String) do
+       redef fun characters(str) do
                if content_handler != null then
                        content_handler.characters(str)
                end
        end
 
-       redef fun ignorable_whitespace(str: String) do
+       redef fun ignorable_whitespace(str) do
                if content_handler != null then
                        content_handler.ignorable_whitespace(str)
                end
        end
 
-       redef fun processing_instruction(target: String, data: nullable String) do
+       redef fun processing_instruction(target, data) do
                if content_handler != null then
                        content_handler.processing_instruction(target, data)
                end
        end
 
-       redef fun skipped_entity(name: String) do
+       redef fun skipped_entity(name) do
                if content_handler != null then
                        content_handler.skipped_entity(name)
                end
@@ -330,19 +325,19 @@ class XMLFilterImpl
        ############################################################################
        # ErrorHandler
 
-       redef fun warning(exception: SAXParseException) do
+       redef fun warning(exception) do
                if error_handler != null then
                        error_handler.warning(exception)
                end
        end
 
-       redef fun error(exception: SAXParseException) do
+       redef fun error(exception) do
                if error_handler != null then
                        error_handler.error(exception)
                end
        end
 
-       redef fun fatal_error(exception: SAXParseException) do
+       redef fun fatal_error(exception) do
                if error_handler != null then
                        error_handler.fatal_error(exception)
                else
index 6b3f616..19dbb69 100644 (file)
@@ -68,63 +68,63 @@ class XophonReader
        private var model = new XophonReaderModel
        private var lexer: XophonLexer is noinit
 
-       redef fun entity_resolver: nullable EntityResolver do return model.entity_resolver
-       redef fun entity_resolver=(entity_resolver: nullable EntityResolver) do
+       redef fun entity_resolver do return model.entity_resolver
+       redef fun entity_resolver=(entity_resolver) do
                model.entity_resolver = entity_resolver
        end
 
-       redef fun dtd_handler: nullable DTDHandler do return model.dtd_handler
-       redef fun dtd_handler=(dtd_handler: nullable DTDHandler) do
+       redef fun dtd_handler do return model.dtd_handler
+       redef fun dtd_handler=(dtd_handler) do
                model.dtd_handler = dtd_handler
        end
 
-       redef fun content_handler: nullable ContentHandler do return model.content_handler
-       redef fun content_handler=(content_handler: nullable ContentHandler) do
+       redef fun content_handler do return model.content_handler
+       redef fun content_handler=(content_handler) do
                model.content_handler = content_handler
        end
 
-       redef fun error_handler: nullable ErrorHandler do return model.error_handler
-       redef fun error_handler=(error_handler: nullable ErrorHandler) do
+       redef fun error_handler do return model.error_handler
+       redef fun error_handler=(error_handler) do
                model.error_handler = error_handler
        end
 
 
-       redef fun feature_recognized(name: String): Bool do
+       redef fun feature_recognized(name) do
                return model.feature_recognized(name)
        end
 
-       redef fun feature_readable(name: String): Bool do
+       redef fun feature_readable(name) do
                return model.feature_readable(name)
        end
 
-       redef fun feature_writable(name: String): Bool do
+       redef fun feature_writable(name) do
                return model.feature_readable(name)
        end
 
-       redef fun feature(name: String): Bool do return model.feature(name)
-       redef fun feature=(name: String, value: Bool) do model.feature(name) = value
+       redef fun feature(name) do return model.feature(name)
+       redef fun feature=(name, value) do model.feature(name) = value
 
-       redef fun property_recognized(name: String): Bool do
+       redef fun property_recognized(name) do
                return model.property_recognized(name)
        end
 
-       redef fun property_readable(name: String): Bool do
+       redef fun property_readable(name) do
                return model.property_readable(name)
        end
 
-       redef fun property_writable(name: String): Bool do
+       redef fun property_writable(name) do
                return model.property_writable(name)
        end
 
-       redef fun property(name: String): nullable Object do
+       redef fun property(name) do
                return model.property(name)
        end
 
-       redef fun property=(name: String, value: nullable Object) do
+       redef fun property=(name, value) do
                model.property(name) = value
        end
 
-       redef fun parse(input: InputSource) do
+       redef fun parse(input) do
                var system_id: nullable MaybeError[String, Error] = null
                model.locator = new SAXLocatorImpl
 
@@ -157,7 +157,7 @@ class XophonReader
                end
        end
 
-       redef fun parse_file(system_id: String) do
+       redef fun parse_file(system_id) do
                parse(new InputSource.with_system_id(system_id))
        end
 
index 70db6a5..cc69c83 100644 (file)
@@ -259,7 +259,7 @@ class SAXEventLogger
        ############################################################################
        # XMLReader
 
-       redef fun property(name: String): nullable Object do
+       redef fun property(name) do
                assert sax_recognized: parent != null else
                        sys.stderr.write("Property: {name}\n")
                end
@@ -278,7 +278,7 @@ class SAXEventLogger
                end
        end
 
-       redef fun property=(name: String, value: nullable Object) do
+       redef fun property=(name, value) do
                assert sax_recognized: parent != null else
                        sys.stderr.write("Property: {name}\n")
                end
@@ -297,7 +297,7 @@ class SAXEventLogger
                end
        end
 
-       redef fun parse(input: InputSource) do
+       redef fun parse(input) do
                assert parent_is_not_null: parent != 0 else
                        sys.stderr.write("No parent for filter.")
                end
@@ -314,9 +314,7 @@ class SAXEventLogger
        ############################################################################
        # EntityResolver
 
-       redef fun resolve_entity(public_id: nullable String,
-                       system_id: nullable String):
-                       nullable InputSource do
+       redef fun resolve_entity(public_id, system_id) do
                log.push(["resolve_entity",
                                public_id or else "^NULL",
                                system_id or else "^NULL"])
@@ -327,14 +325,12 @@ class SAXEventLogger
        ############################################################################
        # DTDHandler
 
-       redef fun notation_decl(name: String, public_id: String,
-                       system_id: String) do
+       redef fun notation_decl(name, public_id, system_id) do
                log.push(["notation_decl", name, public_id, system_id])
                super
        end
 
-       redef fun unparsed_entity_decl(name: String, public_id: String,
-                       system_id: String) do
+       redef fun unparsed_entity_decl(name, public_id, system_id) do
                log.push(["unparsed_entity_decl", name, public_id, system_id])
                super
        end
@@ -343,7 +339,7 @@ class SAXEventLogger
        ############################################################################
        # ContentHandler
 
-       redef fun document_locator=(locator: SAXLocator) do
+       redef fun document_locator=(locator) do
                log.push(["document_locator=",
                                locator.public_id or else "^NULL",
                                locator.system_id or else "^NULL",
@@ -362,18 +358,17 @@ class SAXEventLogger
                super
        end
 
-       redef fun start_prefix_mapping(prefix: String, uri: String) do
+       redef fun start_prefix_mapping(prefix, uri) do
                log.push(["start_prefix_mapping", prefix, uri])
                super
        end
 
-       redef fun end_prefix_mapping(prefix: String) do
+       redef fun end_prefix_mapping(prefix) do
                log.push(["end_prefix_mapping", prefix])
                super
        end
 
-       redef fun start_element(uri: String, local_name: String, qname: String,
-                       atts: Attributes) do
+       redef fun start_element(uri, local_name, qname, atts) do
                var entry = new Array[String]
                var i = 0
                var length = atts.length
@@ -394,27 +389,27 @@ class SAXEventLogger
                super
        end
 
-       redef fun end_element(uri: String, local_name: String, qname: String) do
+       redef fun end_element(uri, local_name, qname) do
                log.push(["end_element", uri, local_name, qname])
                super
        end
 
-       redef fun characters(str: String) do
+       redef fun characters(str) do
                log.push(["characters", str])
                super
        end
 
-       redef fun ignorable_whitespace(str: String) do
+       redef fun ignorable_whitespace(str) do
                log.push(["ignorable_witespace", str])
                super
        end
 
-       redef fun processing_instruction(target: String, data: nullable String) do
+       redef fun processing_instruction(target, data) do
                log.push(["processing_instruction", target, data or else "^NULL"])
                super
        end
 
-       redef fun skipped_entity(name: String) do
+       redef fun skipped_entity(name) do
                log.push(["skipped_entity", name])
                super
        end
@@ -423,17 +418,17 @@ class SAXEventLogger
        ############################################################################
        # ErrorHandler
 
-       redef fun warning(exception: SAXParseException) do
+       redef fun warning(exception) do
                log.push(["warning", exception.full_message])
                super
        end
 
-       redef fun error(exception: SAXParseException) do
+       redef fun error(exception) do
                log.push(["error", exception.full_message])
                super
        end
 
-       redef fun fatal_error(exception: SAXParseException) do
+       redef fun fatal_error(exception) do
                log.push(["fatal_error", exception.full_message])
                if error_handler != null then
                        error_handler.fatal_error(exception)
@@ -444,18 +439,14 @@ class SAXEventLogger
        ############################################################################
        # DeclHandler
 
-       redef fun element_decl(name: String, model: String) do
+       redef fun element_decl(name, model) do
                log.push(["element_decl", name, model])
                if decl_handler != null then
                        decl_handler.element_decl(name, model)
                end
        end
 
-       redef fun attribute_decl(element_name: String,
-                       attribute_name: String,
-                       attribute_type: String,
-                       mode: nullable String,
-                       value: nullable String) do
+       redef fun attribute_decl(element_name, attribute_name, attribute_type, mode, value) do
                log.push(["attribute_decl",
                                element_name,
                                attribute_name,
@@ -468,14 +459,14 @@ class SAXEventLogger
                end
        end
 
-       redef fun internal_entity_decl(name: String, value: String) do
+       redef fun internal_entity_decl(name, value) do
                log.push(["internal_entity_decl", name, value])
                if decl_handler != null then
                        decl_handler.internal_entity_decl(name, value)
                end
        end
 
-       redef fun external_entity_decl(name: String, value: String) do
+       redef fun external_entity_decl(name, value) do
                log.push(["external_entity_decl", name, value])
                if decl_handler != null then
                        decl_handler.external_entity_decl(name, value)
@@ -486,8 +477,7 @@ class SAXEventLogger
        ############################################################################
        # LexicalHandler
 
-       redef fun start_dtd(name: String, public_id: nullable String,
-                       system_id: nullable String) do
+       redef fun start_dtd(name, public_id, system_id) do
                log.push(["start_dtd", name,
                                public_id or else "^NULL",
                                system_id or else "^NULL"])
@@ -503,14 +493,14 @@ class SAXEventLogger
                end
        end
 
-       redef fun start_entity(name: String) do
+       redef fun start_entity(name) do
                log.push(["start_entity", name])
                if lexical_handler != null then
                        lexical_handler.start_entity(name)
                end
        end
 
-       redef fun end_entity(name: String) do
+       redef fun end_entity(name) do
                log.push(["end_entity", name])
                if lexical_handler != null then
                        lexical_handler.end_entity(name)
@@ -531,7 +521,7 @@ class SAXEventLogger
                end
        end
 
-       redef fun comment(str: String) do
+       redef fun comment(str) do
                log.push(["comment", str])
                if lexical_handler != null then
                        lexical_handler.comment(str)
index 6de6d2d..c5e1ec9 100644 (file)
@@ -70,19 +70,19 @@ extern class SDLDisplay `{SDL_Surface *`}
                        TTF_Quit();
        `}
 
-       redef fun finish `{ SDL_Flip(recv); `}
+       redef fun finish `{ SDL_Flip(self); `}
 
        # Clear the entire window with given RGB color (integer values)
        fun clear_int(r, g, b: Int) `{
-               SDL_FillRect(recv, NULL, SDL_MapRGB(recv->format,r,g,b)); 
+               SDL_FillRect(self, NULL, SDL_MapRGB(self->format,r,g,b));
        `}
 
-       redef fun width: Int `{ return recv->w; `}
-       redef fun height: Int `{ return recv->h; `}
+       redef fun width: Int `{ return self->w; `}
+       redef fun height: Int `{ return self->h; `}
 
        # Fill a rectangle with given color
        fun fill_rect(rect: SDLRectangle, r, g, b: Int) `{
-               SDL_FillRect(recv, rect,  SDL_MapRGB(recv->format,r,g,b));
+               SDL_FillRect(self, rect,  SDL_MapRGB(self->format,r,g,b));
        `}
 
        redef fun clear(r, g, b: Float) `{
@@ -90,7 +90,7 @@ extern class SDLDisplay `{SDL_Surface *`}
                ri = (Uint8)r*255;
                gi = (Uint8)g*255;
                bi = (Uint8)b*255;
-               SDL_FillRect(recv, NULL, SDL_MapRGB(recv->format,ri,gi,bi));
+               SDL_FillRect(self, NULL, SDL_MapRGB(self->format,ri,gi,bi));
        `}
 
        # SDL events since the last call to this method
@@ -203,7 +203,7 @@ extern class SDLDrawable `{SDL_Surface*`}
                dst.w = 0;
                dst.h = 0;
 
-               SDL_BlitSurface(img, NULL, recv, &dst);
+               SDL_BlitSurface(img, NULL, self, &dst);
        `}
 
        redef fun blit_centered(img, x, y)
@@ -245,18 +245,18 @@ extern class SDLImage
        fun save_to_file(path: String) import String.to_cstring `{ `}
 
        # Destroy the image and free the memory
-       redef fun destroy `{ SDL_FreeSurface(recv); `}
+       redef fun destroy `{ SDL_FreeSurface(self); `}
 
-       redef fun width: Int `{ return recv->w; `}
-       redef fun height: Int `{ return recv->h; `}
+       redef fun width: Int `{ return self->w; `}
+       redef fun height: Int `{ return self->h; `}
 
        fun is_ok: Bool do return not address_is_null
 
        # Returns a reference to the pixels of the texture
-       fun pixels: NativeCByteArray `{ return recv->pixels; `}
+       fun pixels: NativeCByteArray `{ return self->pixels; `}
 
        # Does this texture has an alpha mask?
-       fun amask: Bool `{ return recv->format->Amask; `}
+       fun amask: Bool `{ return self->format->Amask; `}
 end
 
 # A simple rectangle
@@ -271,17 +271,17 @@ extern class SDLRectangle `{SDL_Rect*`}
                return rect;
        `}
 
-       fun x=(v: Int) `{ recv->x = (Sint16)v; `}
-       fun x: Int `{ return recv->x; `}
+       fun x=(v: Int) `{ self->x = (Sint16)v; `}
+       fun x: Int `{ return self->x; `}
 
-       fun y=(v: Int) `{ recv->y = (Sint16)v; `}
-       fun y: Int `{ return recv->y; `}
+       fun y=(v: Int) `{ self->y = (Sint16)v; `}
+       fun y: Int `{ return self->y; `}
 
-       fun w=(v: Int) `{ recv->w = (Uint16)v; `}
-       fun w: Int `{ return recv->w; `}
+       fun w=(v: Int) `{ self->w = (Uint16)v; `}
+       fun w: Int `{ return self->w; `}
 
-       fun h=(v: Int) `{ recv->h = (Uint16)v; `}
-       fun h: Int `{ return recv->h; `}
+       fun h=(v: Int) `{ self->h = (Uint16)v; `}
+       fun h: Int `{ return self->h; `}
 end
 
 interface SDLInputEvent
@@ -418,7 +418,7 @@ class SDLQuitEvent
 end
 
 redef class Int
-       fun delay `{ SDL_Delay(recv); `}
+       fun delay `{ SDL_Delay(self); `}
 end
 
 # Class to load and use TTF_Font
@@ -436,7 +436,7 @@ extern class SDLFont `{TTF_Font *`}
        return font;
        `}
 
-       fun destroy `{ TTF_CloseFont(recv); `}
+       fun destroy `{ TTF_CloseFont(self); `}
 
        # Create a String with the specified color, return an SDLImage
        fun render(text: String, r, g, b: Int): SDLImage import String.to_cstring `{
@@ -449,7 +449,7 @@ extern class SDLFont `{TTF_Font *`}
                color.b = b;
 
                ctext = String_to_cstring(text);
-               if(!(text_surface=TTF_RenderText_Blended(recv, ctext, color)))
+               if(!(text_surface=TTF_RenderText_Blended(self, ctext, color)))
                {
                        fprintf(stderr, "SDL TFF error: %s\n", TTF_GetError());
                        exit(1);
@@ -467,30 +467,30 @@ extern class SDLFont `{TTF_Font *`}
 
        # Maximum pixel height of all glyphs of this font.
        fun height: Int `{
-               return TTF_FontHeight(recv);
+               return TTF_FontHeight(self);
        `}
 
        fun ascent: Int `{
-               return TTF_FontAscent(recv);
+               return TTF_FontAscent(self);
        `}
 
        fun descent: Int `{
-               return TTF_FontDescent(recv);
+               return TTF_FontDescent(self);
        `}
 
        # Get the recommended pixel height of a rendered line of text of the loaded font. This is usually larger than the Font.height.
        fun line_skip: Int `{
-               return TTF_FontLineSkip(recv);
+               return TTF_FontLineSkip(self);
        `}
 
        # Return true is the font used fixed width for each char
        fun is_fixed_width: Bool `{
-               return TTF_FontFaceIsFixedWidth(recv);
+               return TTF_FontFaceIsFixedWidth(self);
        `}
 
        # Return the family name of the font
        fun family_name: nullable String import String.to_cstring, String.as nullable  `{
-               char *fn = TTF_FontFaceFamilyName(recv);
+               char *fn = TTF_FontFaceFamilyName(self);
 
                if (fn == NULL)
                        return null_String();
@@ -500,7 +500,7 @@ extern class SDLFont `{TTF_Font *`}
 
        # Return the style name of the font
        fun style_name: nullable String import String.to_cstring, String.as nullable  `{
-               char *sn = TTF_FontFaceStyleName(recv);
+               char *sn = TTF_FontFaceStyleName(self);
 
                if (sn == NULL)
                        return null_String();
@@ -512,7 +512,7 @@ extern class SDLFont `{TTF_Font *`}
        fun width_of(text: String): Int import NativeString.to_s `{
                char *ctext = String_to_cstring(text);
                int w;
-               if (TTF_SizeText(recv, ctext, &w, NULL))
+               if (TTF_SizeText(self, ctext, &w, NULL))
                {
                        fprintf(stderr, "SDL TFF error: %s\n", TTF_GetError());
                        exit(1);
@@ -541,6 +541,6 @@ extern class SDLSystemWindowManagerInfo `{SDL_SysWMinfo *`}
 
        # Returns the handle of this window on a X11 window system
        fun x11_window_handle: Pointer `{
-               return (void*)recv->info.x11.window;
+               return (void*)self->info.x11.window;
        `}
 end
index 0ad457d..6da4c24 100644 (file)
@@ -33,7 +33,7 @@ extern class SDLEventBuffer `{SDL_Event *`}
        # Poll and event into `self`
        #
        # Returns `true` if an event was available.
-       fun poll_event: Bool `{ return SDL_PollEvent(recv); `}
+       fun poll_event: Bool `{ return SDL_PollEvent(self); `}
 
        # Get a reference to the data at `self` as a precise `SDLEvent`
        #
@@ -53,28 +53,28 @@ extern class SDLEventBuffer `{SDL_Event *`}
        end
 
        # Is this a quit event?
-       fun is_quit: Bool `{ return recv->type == SDL_QUIT; `}
+       fun is_quit: Bool `{ return self->type == SDL_QUIT; `}
 
        # Get a reference to data at `self` as a `SDLQuitEvent`
-       fun to_quit: SDLQuitEvent `{ return recv; `}
+       fun to_quit: SDLQuitEvent `{ return self; `}
 
        # Is this a mouse motion event?
-       fun is_mouse_motion: Bool `{ return recv->type == SDL_MOUSEMOTION; `}
+       fun is_mouse_motion: Bool `{ return self->type == SDL_MOUSEMOTION; `}
 
        # Get a reference to data at `self` as a `SDLMouseMotionEvent`
-       fun to_mouse_motion: SDLMouseMotionEvent `{ return recv; `}
+       fun to_mouse_motion: SDLMouseMotionEvent `{ return self; `}
 
        # Is this a mouse button down event?
-       fun is_mouse_button_down: Bool `{ return recv->type == SDL_MOUSEBUTTONDOWN; `}
+       fun is_mouse_button_down: Bool `{ return self->type == SDL_MOUSEBUTTONDOWN; `}
 
        # Get a reference to data at `self` as a `SDLMouseButtonDownEvent`
-       fun to_mouse_button_down: SDLMouseButtonDownEvent `{ return recv; `}
+       fun to_mouse_button_down: SDLMouseButtonDownEvent `{ return self; `}
 
        # Is this a mouse button up event?
-       fun is_mouse_button_up: Bool `{ return recv->type == SDL_MOUSEBUTTONUP; `}
+       fun is_mouse_button_up: Bool `{ return self->type == SDL_MOUSEBUTTONUP; `}
 
        # Get a reference to data at `self` as a `SDLMouseButtonUpEvent`
-       fun to_mouse_button_up: SDLMouseButtonUpEvent `{ return recv; `}
+       fun to_mouse_button_up: SDLMouseButtonUpEvent `{ return self; `}
 
        # TODO other SDL events:
        #
@@ -120,7 +120,7 @@ extern class SDLMouseEvent
        # four fields of each events are common to all of them.
 
        # Which mouse, pointer or finger raised this event
-       fun which: Int `{ return recv->motion.which; `}
+       fun which: Int `{ return self->motion.which; `}
 end
 
 # A mouse motion event
@@ -128,16 +128,16 @@ extern class SDLMouseMotionEvent
        super SDLMouseEvent
 
        # X coordinate on screen of this event
-       fun x: Int `{ return recv->motion.x; `}
+       fun x: Int `{ return self->motion.x; `}
 
        # Y coordinate on screen of this event
-       fun y: Int `{ return recv->motion.y; `}
+       fun y: Int `{ return self->motion.y; `}
 
        # Difference on the X axis between this event and the previous one
-       fun xrel: Int `{ return recv->motion.xrel; `}
+       fun xrel: Int `{ return self->motion.xrel; `}
 
        # Difference on the Y axis between this event and the previous one
-       fun yrel: Int `{ return recv->motion.yrel; `}
+       fun yrel: Int `{ return self->motion.yrel; `}
 end
 
 # A mouse button event
@@ -148,10 +148,10 @@ extern class SDLMouseButtonEvent
        super SDLMouseEvent
 
        # X coordinate on screen of this event
-       fun x: Int `{ return recv->button.x; `}
+       fun x: Int `{ return self->button.x; `}
 
        # Y coordinate on screen of this event
-       fun y: Int `{ return recv->button.y; `}
+       fun y: Int `{ return self->button.y; `}
 end
 
 # A mouse button release event
index ce642b8..a1373ec 100644 (file)
@@ -65,14 +65,14 @@ extern class SDLImgInitFlags `{ int `}
        new `{ return 0; `}
 
        # Add the JPG support to this flag set
-       fun jpg: SDLImgInitFlags `{ return recv | IMG_INIT_JPG; `}
+       fun jpg: SDLImgInitFlags `{ return self | IMG_INIT_JPG; `}
 
        # Add the PNG support to this flag set
-       fun png: SDLImgInitFlags `{ return recv | IMG_INIT_PNG; `}
+       fun png: SDLImgInitFlags `{ return self | IMG_INIT_PNG; `}
 
        # Add the TIF support to this flag set
-       fun tif: SDLImgInitFlags `{ return recv | IMG_INIT_TIF; `}
+       fun tif: SDLImgInitFlags `{ return self | IMG_INIT_TIF; `}
 
        # Add the WEBP support to this flag set
-       fun webp: SDLImgInitFlags `{ return recv | IMG_INIT_WEBP; `}
+       fun webp: SDLImgInitFlags `{ return self | IMG_INIT_WEBP; `}
 end
index ee129d7..52b1970 100644 (file)
@@ -84,35 +84,35 @@ extern class SDLInitFlags `{ Uint32 `}
        new `{ return 0; `}
 
        # Add the timer subsystem
-       fun timer: SDLInitFlags `{ return recv | SDL_INIT_TIMER; `}
+       fun timer: SDLInitFlags `{ return self | SDL_INIT_TIMER; `}
 
        # Add the audio subsystem
-       fun audio: SDLInitFlags `{ return recv | SDL_INIT_AUDIO; `}
+       fun audio: SDLInitFlags `{ return self | SDL_INIT_AUDIO; `}
 
        # Add the video subsystem
-       fun video: SDLInitFlags `{ return recv | SDL_INIT_VIDEO; `}
+       fun video: SDLInitFlags `{ return self | SDL_INIT_VIDEO; `}
 
        # Add the joystick subsystem
        #
        # Implied by `gamecontroller`
-       fun joystick: SDLInitFlags `{ return recv | SDL_INIT_JOYSTICK; `}
+       fun joystick: SDLInitFlags `{ return self | SDL_INIT_JOYSTICK; `}
 
        # Add the haptic subsystem
-       fun haptic: SDLInitFlags `{ return recv | SDL_INIT_HAPTIC; `}
+       fun haptic: SDLInitFlags `{ return self | SDL_INIT_HAPTIC; `}
 
        # Add the gamecontroller subsystem
-       fun gamecontroller: SDLInitFlags `{ return recv | SDL_INIT_GAMECONTROLLER; `}
+       fun gamecontroller: SDLInitFlags `{ return self | SDL_INIT_GAMECONTROLLER; `}
 
        # Add the events subsystem
        #
        # Implied by `video` and `joystick`
-       fun events: SDLInitFlags `{ return recv | SDL_INIT_EVENTS; `}
+       fun events: SDLInitFlags `{ return self | SDL_INIT_EVENTS; `}
 
        # Add all subsystems
-       fun everything: SDLInitFlags `{ return recv | SDL_INIT_EVERYTHING; `}
+       fun everything: SDLInitFlags `{ return self | SDL_INIT_EVERYTHING; `}
 
        # Is this flag set empty?
-       fun is_empty: Bool `{ return recv == 0; `}
+       fun is_empty: Bool `{ return self == 0; `}
 
        # TODO add all other is_
 end
@@ -130,20 +130,20 @@ extern class SDLWindow `{ SDL_Window * `}
        fun initialized: Bool do return not address_is_null
 
        # Destroy this window
-       fun destroy `{ SDL_DestroyWindow(recv); `}
+       fun destroy `{ SDL_DestroyWindow(self); `}
 
        # Get the `SDLWindowFlags` describing the status of the window
-       fun flags: SDLWindowFlags `{ return SDL_GetWindowFlags(recv); `}
+       fun flags: SDLWindowFlags `{ return SDL_GetWindowFlags(self); `}
 
        # Show a simple message box
        #
        # Similar to `sys.sdl.show_simple_message_box` but attached to this window
        fun show_simple_message_box(level: SDLMessageBoxFlags, title, content: NativeString) `{
-               SDL_ShowSimpleMessageBox(level, title, content, recv);
+               SDL_ShowSimpleMessageBox(level, title, content, self);
        `}
 
        # Set the icon of this window
-       fun icon=(icon: SDLSurface) `{ SDL_SetWindowIcon(recv, icon); `}
+       fun icon=(icon: SDLSurface) `{ SDL_SetWindowIcon(self, icon); `}
 end
 
 # Flags for `SDLWindow::new` and returned by `SDLWindow::flags`
@@ -152,62 +152,62 @@ extern class SDLWindowFlags `{ Uint32 `}
        new `{ return 0; `}
 
        # Add the flag requesting a fullscreen window
-       fun fullscreen: SDLWindowFlags `{ return recv | SDL_WINDOW_FULLSCREEN; `}
+       fun fullscreen: SDLWindowFlags `{ return self | SDL_WINDOW_FULLSCREEN; `}
 
        # Add the flag requesting a fullscreen window for the current desktop
-       fun fullscreen_desktop: SDLWindowFlags `{ return recv | SDL_WINDOW_FULLSCREEN_DESKTOP; `}
+       fun fullscreen_desktop: SDLWindowFlags `{ return self | SDL_WINDOW_FULLSCREEN_DESKTOP; `}
 
        # Add the flag requesting a window usable with an OpenGL context
-       fun opengl: SDLWindowFlags `{ return recv | SDL_WINDOW_OPENGL; `}
+       fun opengl: SDLWindowFlags `{ return self | SDL_WINDOW_OPENGL; `}
 
        # Add the flag requesting a hidden window
-       fun hidden: SDLWindowFlags `{ return recv | SDL_WINDOW_HIDDEN; `}
+       fun hidden: SDLWindowFlags `{ return self | SDL_WINDOW_HIDDEN; `}
 
        # Add the flag requesting a borderless window
-       fun borderless: SDLWindowFlags `{ return recv | SDL_WINDOW_BORDERLESS; `}
+       fun borderless: SDLWindowFlags `{ return self | SDL_WINDOW_BORDERLESS; `}
 
        # Add the flag requesting a resizable window
-       fun resizable: SDLWindowFlags `{ return recv | SDL_WINDOW_RESIZABLE; `}
+       fun resizable: SDLWindowFlags `{ return self | SDL_WINDOW_RESIZABLE; `}
 
        # Add the flag requesting a minimized window
-       fun minimized: SDLWindowFlags `{ return recv | SDL_WINDOW_MINIMIZED; `}
+       fun minimized: SDLWindowFlags `{ return self | SDL_WINDOW_MINIMIZED; `}
 
        # Add the flag requesting a maximimez window
-       fun maximized: SDLWindowFlags `{ return recv | SDL_WINDOW_MAXIMIZED; `}
+       fun maximized: SDLWindowFlags `{ return self | SDL_WINDOW_MAXIMIZED; `}
 
        # Add the flag to grab the input focus
-       fun input_grabbed: SDLWindowFlags `{ return recv | SDL_WINDOW_INPUT_GRABBED; `}
+       fun input_grabbed: SDLWindowFlags `{ return self | SDL_WINDOW_INPUT_GRABBED; `}
 
        # Add the flag to request a window using the system High-DPI mode
        fun allow_highdpi: SDLWindowFlags `{
                #if SDL_VERSION_ATLEAST(2, 0, 2)
-                       return recv | SDL_WINDOW_ALLOW_HIGHDPI;
+                       return self | SDL_WINDOW_ALLOW_HIGHDPI;
                #else
-                       return recv;
+                       return self;
                #endif
        `}
 
        # Is the window shown?
        #
        # Can only be queried because it is ignored by `SDLWindow::new`
-       fun is_shown: Bool `{ return recv & SDL_WINDOW_SHOWN; `}
+       fun is_shown: Bool `{ return self & SDL_WINDOW_SHOWN; `}
 
        # Does the window has the input focus?
        #
        # Can only be queried because it is ignored by `SDLWindow::new`
-       fun has_input_focus: Bool `{ return recv & SDL_WINDOW_INPUT_FOCUS; `}
+       fun has_input_focus: Bool `{ return self & SDL_WINDOW_INPUT_FOCUS; `}
 
        # Does the window has the mouse focus?
        #
        # Can only be queried because it is ignored by `SDLWindow::new`
-       fun has_mouse_focus: Bool `{ return recv & SDL_WINDOW_MOUSE_FOCUS; `}
+       fun has_mouse_focus: Bool `{ return self & SDL_WINDOW_MOUSE_FOCUS; `}
 
        # TODO add all other `is_` methods, as needed
 end
 
 redef universal Int
-       # Suspend execution for `recv` milliseconds
-       fun delay `{ SDL_Delay(recv); `}
+       # Suspend execution for `self` milliseconds
+       fun delay `{ SDL_Delay(self); `}
 end
 
 # A renderer, maybe software or hardware
@@ -225,10 +225,10 @@ extern class SDLRenderer `{ SDL_Renderer * `}
        `}
 
        # Destroy this renderer
-       fun destroy `{ SDL_DestroyRenderer(recv); `}
+       fun destroy `{ SDL_DestroyRenderer(self); `}
 
        # Clear the rendering target with the current `draw_color`
-       fun clear `{ SDL_RenderClear(recv); `}
+       fun clear `{ SDL_RenderClear(self); `}
 
        # Copy the rectangle at `src` from `texture` to fill the `dst` at the rendering `target`
        #
@@ -245,18 +245,18 @@ extern class SDLRenderer `{ SDL_Renderer * `}
        end
 
        private fun native_copy(texture: SDLTexture, src, dst: SDLRect) `{
-               SDL_RenderCopy(recv, texture, src, dst);
+               SDL_RenderCopy(self, texture, src, dst);
        `}
 
        # Update the screen with all rendering since the previous call
-       fun present `{ SDL_RenderPresent(recv); `}
+       fun present `{ SDL_RenderPresent(self); `}
 
        # Get the `SDLRendererInfo` for this renderer
-       fun info_copy(out: SDLRendererInfo) `{ SDL_GetRendererInfo(recv, out); `}
+       fun info_copy(out: SDLRendererInfo) `{ SDL_GetRendererInfo(self, out); `}
 
        # Set the drawing color
        fun draw_color=(val: SDLColor) `{
-               SDL_SetRenderDrawColor(recv, val->r, val->g, val->b, val->a);
+               SDL_SetRenderDrawColor(self, val->r, val->g, val->b, val->a);
        `}
 
        # Get the drawing color of this renderer
@@ -272,31 +272,31 @@ extern class SDLRenderer `{ SDL_Renderer * `}
 
        # Copy the drawing color of this renderer in `color`
        fun draw_color_copy(color: SDLColor) `{
-               SDL_GetRenderDrawColor(recv, &color->r, &color->g, &color->b, &color->a);
+               SDL_GetRenderDrawColor(self, &color->r, &color->g, &color->b, &color->a);
        `}
 
        # Fill a rectangle with the current `draw_color`
        #
        # If `rect.address_is_null` then fills the entire screen.
-       fun fill_rect(rect: SDLRect) `{ SDL_RenderFillRect(recv, rect); `}
+       fun fill_rect(rect: SDLRect) `{ SDL_RenderFillRect(self, rect); `}
 
        # Draw a rectangle with the current `draw_color`
-       fun draw_rect(rect: SDLRect) `{ SDL_RenderDrawRect(recv, rect); `}
+       fun draw_rect(rect: SDLRect) `{ SDL_RenderDrawRect(self, rect); `}
 
        # Draw a point with the current `draw_color`
-       fun draw_point(x, y: Int) `{ SDL_RenderDrawPoint(recv, x, y); `}
+       fun draw_point(x, y: Int) `{ SDL_RenderDrawPoint(self, x, y); `}
 
        # Draw a line with the current `draw_color`
-       fun draw_line(x1, y1, x2, y2: Int) `{ SDL_RenderDrawLine(recv, x1, y1, x2, y2); `}
+       fun draw_line(x1, y1, x2, y2: Int) `{ SDL_RenderDrawLine(self, x1, y1, x2, y2); `}
 
        # Set the viewport of this renderer
-       fun viewport=(rect: SDLRect) `{ SDL_RenderSetViewport(recv, rect); `}
+       fun viewport=(rect: SDLRect) `{ SDL_RenderSetViewport(self, rect); `}
 
        # Get the rendering target of this renderer
-       fun target: SDLTexture `{ return SDL_GetRenderTarget(recv); `}
+       fun target: SDLTexture `{ return SDL_GetRenderTarget(self); `}
 
        # Set the rendering target of this renderer
-       fun target=(val: SDLTexture) `{ SDL_SetRenderTarget(recv, val); `}
+       fun target=(val: SDLTexture) `{ SDL_SetRenderTarget(self, val); `}
 
        # TODO add other renderer related methods:
        #
@@ -329,28 +329,28 @@ extern class SDLColor `{ SDL_Color *`}
        end
 
        # The red component of this color `[0..255]`
-       fun r: Int `{ return recv->r; `}
+       fun r: Int `{ return self->r; `}
 
        # Set the red component of this color `[0..255]`
-       fun r=(val: Int) `{ recv->r = val; `}
+       fun r=(val: Int) `{ self->r = val; `}
 
        # The green component of this color `[0..255]`
-       fun g: Int `{ return recv->g; `}
+       fun g: Int `{ return self->g; `}
 
        # Set the green component of this color `[0..255]`
-       fun g=(val: Int) `{ recv->g = val; `}
+       fun g=(val: Int) `{ self->g = val; `}
 
        # The blue component of this color `[0..255]`
-       fun b: Int `{ return recv->b; `}
+       fun b: Int `{ return self->b; `}
 
        # Set the blue component of this color `[0..255]`
-       fun b=(val: Int) `{ recv->b = val; `}
+       fun b=(val: Int) `{ self->b = val; `}
 
        # The alpha component of this color `[0..255]`
-       fun a: Int `{ return recv->a; `}
+       fun a: Int `{ return self->a; `}
 
        # Set the ralpha component of this color `[0..255]`
-       fun a=(val: Int) `{ recv->a = val; `}
+       fun a=(val: Int) `{ self->a = val; `}
 
        # TODO implement the related `SDL_Palette` and related methods
 end
@@ -361,18 +361,18 @@ extern class SDLRendererFlags `{ Uint32 `}
        new `{ return 0; `}
 
        # Add the flag to request a software renderer
-       fun software: SDLRendererFlags `{ return recv | SDL_RENDERER_SOFTWARE; `}
+       fun software: SDLRendererFlags `{ return self | SDL_RENDERER_SOFTWARE; `}
 
        # Add the flag to request an accelerated renderer
        #
        # This is the default option.
-       fun accelerated: SDLRendererFlags `{ return recv | SDL_RENDERER_ACCELERATED; `}
+       fun accelerated: SDLRendererFlags `{ return self | SDL_RENDERER_ACCELERATED; `}
 
        # Add the flag to request a renderer where `SDLRenderer::present` is synchronized with the refresh rate
-       fun presentvsync: SDLRendererFlags `{ return recv | SDL_RENDERER_PRESENTVSYNC; `}
+       fun presentvsync: SDLRendererFlags `{ return self | SDL_RENDERER_PRESENTVSYNC; `}
 
        # Add the flag to request a renderer able to render to a texture
-       fun targettexture: SDLRendererFlags `{ return recv | SDL_RENDERER_TARGETTEXTURE; `}
+       fun targettexture: SDLRendererFlags `{ return self | SDL_RENDERER_TARGETTEXTURE; `}
 end
 
 # A bitmap surface
@@ -381,10 +381,10 @@ extern class SDLSurface `{ SDL_Surface * `}
        # Load the BMP file at `path`
        new load_bmp(path: NativeString) `{ return SDL_LoadBMP(path); `}
 
-       redef fun free `{ SDL_FreeSurface(recv); `}
+       redef fun free `{ SDL_FreeSurface(self); `}
 
        # Save this texture to a BMP file
-       fun save_bmp(path: NativeString) `{ SDL_SaveBMP(recv, path); `}
+       fun save_bmp(path: NativeString) `{ SDL_SaveBMP(self, path); `}
 end
 
 # A loaded bitmap texture
@@ -395,19 +395,19 @@ extern class SDLTexture `{ SDL_Texture * `}
        `}
 
        # Destroy this texture
-       fun destroy `{ SDL_DestroyTexture(recv); `}
+       fun destroy `{ SDL_DestroyTexture(self); `}
 
        # Width of this texture
        fun width: Int `{
                int val;
-               SDL_QueryTexture(recv, NULL, NULL, &val, NULL);
+               SDL_QueryTexture(self, NULL, NULL, &val, NULL);
                return val;
        `}
 
        # Height of this texture
        fun height: Int `{
                int val;
-               SDL_QueryTexture(recv, NULL, NULL, NULL, &val);
+               SDL_QueryTexture(self, NULL, NULL, NULL, &val);
                return val;
        `}
 
@@ -442,28 +442,28 @@ extern class SDLRect `{SDL_Rect *`}
        end
 
        # X coordinate of the top left corner
-       fun x: Int `{ return recv->x; `}
+       fun x: Int `{ return self->x; `}
 
        # Set the X coordinate of the top left corner
-       fun x=(val: Int) `{ recv->x = val; `}
+       fun x=(val: Int) `{ self->x = val; `}
 
        # Y coordinate of the top left corner
-       fun y: Int `{ return recv->y; `}
+       fun y: Int `{ return self->y; `}
 
        # Set the Y coordinate of the top left corner
-       fun y=(val: Int) `{ recv->y = val; `}
+       fun y=(val: Int) `{ self->y = val; `}
 
        # Width of this rectangle
-       fun w: Int `{ return recv->w; `}
+       fun w: Int `{ return self->w; `}
 
        # Set the width of this rectangle
-       fun w=(val: Int) `{ recv->w = val; `}
+       fun w=(val: Int) `{ self->w = val; `}
 
        # Height of this rectangle
-       fun h: Int `{ return recv->h; `}
+       fun h: Int `{ return self->h; `}
 
        # Set the height of this rectangle
-       fun h=(val: Int) `{ recv->h = val; `}
+       fun h=(val: Int) `{ self->h = val; `}
 
        # TODO implement other `SDLRect` related methods:
        #
@@ -496,16 +496,16 @@ extern class SDLPoint `{SDL_Point *`}
        end
 
        # X coordinate of this point
-       fun x: Int `{ return recv->x; `}
+       fun x: Int `{ return self->x; `}
 
        # Set the X coordinate of this point
-       fun x=(val: Int) `{ recv->x = val; `}
+       fun x=(val: Int) `{ self->x = val; `}
 
        # Y coordinate of this point
-       fun y: Int `{ return recv->y; `}
+       fun y: Int `{ return self->y; `}
 
        # Set the Y coordinate of this point
-       fun y=(val: Int) `{ recv->y = val; `}
+       fun y=(val: Int) `{ self->y = val; `}
 end
 
 # Flag to set the icon in `sys.sdl.show_simple_message_box` and `SDLWindow::show_simple_message_box`
@@ -526,11 +526,11 @@ extern class SDLRendererInfo `{ SDL_RendererInfo * `}
        new malloc `{ return malloc(sizeof(SDL_RendererInfo)); `}
 
        # Name of the renderer's driver
-       fun name: NativeString `{ return (char*)recv->name; `}
+       fun name: NativeString `{ return (char*)self->name; `}
 
        # Maximum texture width supported by the renderer
-       fun max_texture_width: Int `{ return recv->max_texture_width; `}
+       fun max_texture_width: Int `{ return self->max_texture_width; `}
 
        # Maximum texture height supported by the renderer
-       fun max_texture_height: Int `{ return recv->max_texture_height; `}
+       fun max_texture_height: Int `{ return self->max_texture_height; `}
 end
index 97ec28a..068c634 100644 (file)
@@ -32,7 +32,7 @@ redef extern class SDLWindow
 
                SDL_VERSION(&val->version);
 
-               if(SDL_GetWindowWMInfo(recv, val) <= 0) {
+               if(SDL_GetWindowWMInfo(self, val) <= 0) {
                        free(val);
                        return NULL;
                }
@@ -46,27 +46,27 @@ end
 # Created using `SDLWindow::vm_info`
 extern class SDLSysWMInfo `{ SDL_SysWMinfo * `}
        # Is this an unknown window manager?
-       fun is_unknown: Bool `{ return recv->subsystem == SDL_SYSWM_UNKNOWN; `}
+       fun is_unknown: Bool `{ return self->subsystem == SDL_SYSWM_UNKNOWN; `}
 
        # Is this a Windows system?
-       fun is_windows: Bool `{ return recv->subsystem == SDL_SYSWM_WINDOWS; `}
+       fun is_windows: Bool `{ return self->subsystem == SDL_SYSWM_WINDOWS; `}
 
        # Is this the X11 window manager?
-       fun is_x11: Bool `{ return recv->subsystem == SDL_SYSWM_X11; `}
+       fun is_x11: Bool `{ return self->subsystem == SDL_SYSWM_X11; `}
 
        # Is this a direct DirectFB?
-       fun is_direcfb: Bool `{ return recv->subsystem == SDL_SYSWM_DIRECTFB; `}
+       fun is_direcfb: Bool `{ return self->subsystem == SDL_SYSWM_DIRECTFB; `}
 
        # Is this system an OS X?
-       fun is_cocoa: Bool `{ return recv->subsystem == SDL_SYSWM_COCOA; `}
+       fun is_cocoa: Bool `{ return self->subsystem == SDL_SYSWM_COCOA; `}
 
        # Is this system an iOS?
-       fun is_uikit: Bool `{ return recv->subsystem == SDL_SYSWM_UIKIT; `}
+       fun is_uikit: Bool `{ return self->subsystem == SDL_SYSWM_UIKIT; `}
 
        # It this window manager Wayland?
        fun is_wayland: Bool `{
                #if SDL_VERSION_ATLEAST(2, 0, 2)
-                       return recv->subsystem == SDL_SYSWM_WAYLAND;
+                       return self->subsystem == SDL_SYSWM_WAYLAND;
                #else
                        return 0;
                #endif
@@ -75,7 +75,7 @@ extern class SDLSysWMInfo `{ SDL_SysWMinfo * `}
        # It this window manager Mir?
        fun is_mir: Bool `{
                #if SDL_VERSION_ATLEAST(2, 0, 3)
-                       return recv->subsystem == SDL_SYSWM_MIR;
+                       return self->subsystem == SDL_SYSWM_MIR;
                #else
                        return 0;
                #endif
@@ -84,7 +84,7 @@ extern class SDLSysWMInfo `{ SDL_SysWMinfo * `}
        # Is this system a Windows RT?
        fun is_winrt: Bool `{
                #if SDL_VERSION_ATLEAST(2, 0, 3)
-                       return recv->subsystem == SDL_SYSWM_WINRT;
+                       return self->subsystem == SDL_SYSWM_WINRT;
                #else
                        return 0;
                #endif
@@ -93,7 +93,7 @@ extern class SDLSysWMInfo `{ SDL_SysWMinfo * `}
        # Is this system an Android?
        fun is_android: Bool `{
                #if SDL_VERSION_ATLEAST(2, 0, 4)
-                       return recv->subsystem == SDL_SYSWM_ANDROID;
+                       return self->subsystem == SDL_SYSWM_ANDROID;
                #else
                        return 0;
                #endif
@@ -103,6 +103,6 @@ extern class SDLSysWMInfo `{ SDL_SysWMinfo * `}
        #
        # Require: `is_x11`
        fun x11_window_handle: Pointer `{
-               return (void*)recv->info.x11.window;
+               return (void*)self->info.x11.window;
        `}
 end
index 4cbcf64..ef8c445 100644 (file)
@@ -1,11 +1,11 @@
 # Abstract serialization services
 
-The serialization services are centered around the `auto_serializable` annotation,
+The serialization services are based on the `serialize` and the `noserialize` annotations,
 the `Serializable` interface and the implementations of `Serializer` and `Deserializer`.
 
-## The `auto_serializable` annotation
+## The `serialize` annotation
 
-A class annotated with `auto_serializable` identifies it as a subclass of Serializable and
+A class annotated with `serialize` identifies it as a subclass of Serializable and
 triggers the generation of customized serialization and deserialization services.
 
 ~~~
@@ -13,7 +13,7 @@ import serialization
 
 # Simple serializable class identifying a human
 class Person
-       auto_serializable
+       serialize
 
        # First and last name
        var name: String
@@ -31,19 +31,19 @@ By definition of a serializable class, an instance can be serialized to a stream
 The deserialized instance will not be the same instance, but they should be equal.
 So, in this case, we can compare both instances with `==` to test their equality.
 
-Some conditions applies to the classes that can be annotated as `auto_serializable`.
+Some conditions applies to the classes that can be annotated as `serialize`.
 All attributes of the class must be serializable, runtime errors will be
 raised when trying to serialize non-serializable attributes.
 
 In the class `Person`, all attributes are typed with classes the standards library.
 These common types are defined defined as serializable by this project.
-The attributes could also be typed with user-defined `auto_serializable`
+The attributes could also be typed with user-defined `serialize`
 classes or any other subclass of `Serializable`.
 
 ~~~
-# This `auto_serializable` class is composed of two `auto_serializable` attributes
+# This `serialize` class is composed of two `serialize` attributes
 class Partnership
-       auto_serializable
+       serialize
 
        var partner_a: Person
        var partner_b: Person
@@ -53,14 +53,59 @@ class Partnership
 end
 ~~~
 
-The `auto_serializable` applies only to the class definition,
-only attributes declared locally will be serialized.
-However, each definition of a class (a refinement or specialization)
-can declare `auto_serializable`.
+### Scope of the `serialize` annotation
+
+`serialize` can annotate class definitions, modules and attributes:
+
+* The annotation on a class applies only to the class definition,
+  only attributes declared locally will be serialized.
+  However, each definition of a class (a refinement or specialization) can be annotated with `serialize`.
+
+* A module declaration annotated with `serialize` states that all its class definitions
+  and locally declared attributes are serializable.
+
+  ~~~
+  module shared_between_clients is serialize
+  ~~~
+
+* Attribute annotated with `serialize` states that it is to be serialized, when the rest of the class does not.
+  The class will become subclass to `Serializable` but its attributes are not to be serialized by default.
+  Only the attributes with the `serialize` annotation will be serialized.
+
+  ~~~
+  # Only serialize the `name`
+  class UserCredentials
+      var name: String is serialize
+      var avatar_path: String = "/somepath/"+name is lazy
+  end
+  ~~~
+
+## The `noserialize` annotation
+
+The `noserialize` annotation mark an exception in a `serialize` module or class definition.
+
+* By default a module is `noserialize`. There is no need to declare it as such.
+
+* A class definition annotated with `noserialize` within a `serialize` module will not be made serializable.
+
+* A `noserialize` attribute within a class or module annotated with `serialize` will not serialize this attribute.
+  The class will still be made subclass of `Serializable` and it won't affect the other attributes.
+  The `noserialize` attribute will not be set at deserialization.
+  Usually, it will also be annotated with `lazy` to get its value by another mean after the object has been deserialized.
+
+  ~~~
+  # Once again, only serialize the `name`
+  class UserCredentials
+      serialize
+
+      var name: String
+      var avatar_path: String = "/somepath/"+name is noserialize, lazy
+  end
+  ~~~
 
 ## Custom serializable classes
 
-The annotation `auto_serializable` should be enough for most cases,
+The annotation `serialize` should be enough for most cases,
 but in some cases you need more control over the serialization process.
 
 For more control, create a subclass to `Serializable` and redefine `core_serialize_to`.
@@ -72,7 +117,7 @@ The method should only act on known class names, and call super otherwise.
 
 ### Example: the User class
 
-The following example cannot use the `auto_serializable` annotations
+The following example cannot use the `serialize` annotations
 because some of the arguments to the `User` class need special treatment:
 
 * The `name` attribute is perfectly normal, it can be serialized and deserialized
@@ -160,7 +205,7 @@ information on the services to redefine.
 
 ## Serialization services
 
-The `auto_serializable` annotation and the `Serializable` class are used on
+The `serialize` annotation and the `Serializable` class are used on
 classes specific to the business domain.
 To write (and read) instances of these classes to a persistent format
 you must use implementations of `Serializer` and `Deserializer`.
@@ -198,7 +243,7 @@ The serialization has some limitations:
 * Not enough classes from the standard library are supported.
   This only requires someone to actually code the support.
   It should not be especially hard for most classes, some can
-  simply declare the `auto_serializable` annotation.
+  simply declare the `serialize` annotation.
 
 * A limitation of the Json parser prevents deserializing from files
   with more than one object.
@@ -206,9 +251,9 @@ The serialization has some limitations:
   serialize a single object to each filesand use different instances of
   serializer and deserializer each time.
 
-* The `auto_serializable` annotation does not handle very well
+* The `serialize` annotation does not handle very well
   complex constructors. This could be improved in the compiler.
-  For now, you may prefer to use `auto_serializable` on simple classes,
+  For now, you may prefer to use `serialize` on simple classes,
   of by using custom `Serializable`.
 
 * The serialization uses only the short name of a class, not its qualified name.
diff --git a/lib/serialization/caching.nit b/lib/serialization/caching.nit
new file mode 100644 (file)
index 0000000..186c96c
--- /dev/null
@@ -0,0 +1,118 @@
+# 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 for caching serialization engines
+module caching
+
+import serialization
+private import engine_tools
+
+# A `Serializer` with a `cache`
+abstract class CachingSerializer
+       super Serializer
+
+       # Cache of known objects
+       var cache = new SerializerCache is lazy, writable
+
+       # Link the cache of `self` with `deserializer`
+       #
+       # This allows reference objects by id when they are known by the other side
+       # of the stream.
+       #
+       # Use `cache` if it is a `DuplexCache`, otherwise create a new one.
+       fun link(deserializer: CachingDeserializer)
+       do
+               var mem = self.cache
+               if not mem isa DuplexCache then mem = new DuplexCache
+
+               self.cache = mem
+               deserializer.cache = mem
+       end
+end
+
+# A `Deserializer` with a `cache`
+abstract class CachingDeserializer
+       super Deserializer
+
+       # Cache of known objects
+       var cache = new DeserializerCache is lazy, writable
+end
+
+# Cache of sent objects
+#
+# Used by `Serializer` to avoid duplicating objects, by serializing them once,
+# then using a reference.
+class SerializerCache
+       # Map of already serialized objects to the reference id
+       private var sent: Map[Serializable, Int] = new StrictHashMap[Serializable, Int]
+
+       # Is `object` known?
+       fun has_object(object: Serializable): Bool do return sent.keys.has(object)
+
+       # Get the id for `object`
+       #
+       # Require: `has_object(object)`
+       fun id_for(object: Serializable): Int
+       do
+               assert sent.keys.has(object)
+               return sent[object]
+       end
+
+       # Get a new id for `object` and store it
+       #
+       # Require: `not has_object(object)`
+       fun new_id_for(object: Serializable): Int
+       do
+               var id = sent.length
+               sent[object] = id
+               return id
+       end
+end
+
+# Cache of received objects sorted by there reference id
+#
+# Used by `Deserializer` to find already deserialized objects by their reference.
+class DeserializerCache
+       # Map of references to already deserialized objects.
+       private var received: Map[Int, Object] = new StrictHashMap[Int, Object]
+
+       # Is there an object associated to `id`?
+       fun has_id(id: Int): Bool do return received.keys.has(id)
+
+       # Get the object associated to `id`
+       fun object_for(id: Int): nullable Object do return received[id]
+
+       # Associate `object` to `id`
+       fun []=(id: Int, object: Object) do received[id] = object
+end
+
+# A shared cache for serialization and deserialization
+class DuplexCache
+       super SerializerCache
+       super DeserializerCache
+
+       redef fun new_id_for(object)
+       do
+               var id = super
+               received[id] = object
+               return id
+       end
+
+       redef fun []=(id, object)
+       do
+               super
+               assert object isa Serializable
+               sent[object] = id
+       end
+end
index 1e0ee0b..33d36b4 100644 (file)
 module engine_tools
 
 import serialization
+intrude import standard::collection::hash_collection
 
-# Maps instances to a value, uses `is_same_instance`
-#
-# Warning: This class does not implement all the services from `Map`.
+# Maps instances to a value, uses `is_same_serialized` and `serialization_hash`.
 class StrictHashMap[K, V]
-       super Map[K, V]
-
-       # private
-       var map = new HashMap[K, Array[Couple[K, V]]]
-
-       redef var length = 0
-
-       redef fun is_empty do return length == 0
+       super HashMap[K, V]
 
-       # private
-       fun node_at(key: K): nullable Couple[K, V]
+       redef fun index_at(k)
        do
-               if not map.keys.has(key) then return null
-
-               var arr = map[key]
-               for couple in arr do
-                       if couple.first.is_same_serialized(key) then
-                               return couple
-                       end
-               end
+               if k == null then return 0
 
-               return null
+               var i = k.serialization_hash % _capacity
+               if i < 0 then i = - i
+               return i
        end
 
-       redef fun [](key)
+       redef fun node_at_idx(i, k)
        do
-               var node = node_at(key)
-               assert node != null
-               return node.second
-       end
-
-       redef fun []=(key, value)
-       do
-               var node = node_at(key)
-               if node != null then
-                       node.second = value
-                       return
+               var c = _array[i]
+               while c != null do
+                       var ck = c._key
+                       if ck.is_same_serialized(k) then
+                               break
+                       end
+                       c = c._next_in_bucklet
                end
-
-               var arr
-               if not map.keys.has(key) then
-                       arr = new Array[Couple[K, V]]
-                       map[key] = arr
-               else arr = map[key]
-
-               arr.add new Couple[K, V](key, value)
-               self.length += 1
+               return c
        end
-
-       redef fun has_key(key) do return node_at(key) != null
 end
index 6e5ce12..ca60d7a 100644 (file)
@@ -16,7 +16,7 @@
 
 # Abstract services to serialize Nit objects to different formats
 #
-# This module declares the `auto_serializable` annotation to mark Nit classes as serializable.
+# This module declares the `serialize` annotation to mark Nit classes as serializable.
 # For an introduction to this service, refer to the documentation of the `serialization` group.
 # This documentation provides more technical information on interesting entitie of this module.
 #
@@ -44,6 +44,8 @@
 #   `notify_of_creation` must be redefined.
 module serialization is
        new_annotation auto_serializable
+       new_annotation serialize
+       new_annotation noserialize
 end
 
 # Abstract serialization service to be sub-classed by specialized services.
@@ -146,6 +148,12 @@ redef interface Object
        #
        # Used to determine if an object has already been serialized.
        fun is_same_serialized(other: nullable Object): Bool do return is_same_instance(other)
+
+       # Hash value use for serialization
+       #
+       # Used in combination with `is_same_serialized`. If two objects are the same
+       # in a serialization context, they must have the same `serialization_hash`.
+       fun serialization_hash: Int do return object_id
 end
 
 # Instances of this class are not delayed and instead serialized immediately
@@ -164,3 +172,37 @@ redef class NativeString super DirectSerializable end
 redef class String super DirectSerializable end
 redef class SimpleCollection[E] super Serializable end
 redef class Map[K, V] super Serializable end
+
+redef class Couple[F, S]
+       super Serializable
+
+       redef init from_deserializer(v)
+       do
+               v.notify_of_creation self
+               var first = v.deserialize_attribute("first")
+               var second = v.deserialize_attribute("second")
+               init(first, second)
+       end
+
+       redef fun core_serialize_to(v)
+       do
+               v.serialize_attribute("first", first)
+               v.serialize_attribute("second", second)
+       end
+end
+
+redef class Container[E]
+       super Serializable
+
+       redef init from_deserializer(v)
+       do
+               v.notify_of_creation self
+               var item = v.deserialize_attribute("item")
+               init item
+       end
+
+       redef fun core_serialize_to(v)
+       do
+               v.serialize_attribute("item", first)
+       end
+end
index 033bd83..eea4c03 100644 (file)
@@ -235,7 +235,7 @@ redef class String
                sha1nfo s;
 
                sha1_init(&s);
-               sha1_write(&s, String_to_cstring(recv), String_length(recv));
+               sha1_write(&s, String_to_cstring(self), String_length(self));
                uint8_t* digest = sha1_result(&s);
 
                char* digested = malloc(21);
@@ -258,7 +258,7 @@ redef class String
                sha1nfo s;
 
                sha1_init(&s);
-               sha1_write(&s, String_to_cstring(recv), String_length(recv));
+               sha1_write(&s, String_to_cstring(self), String_length(self));
                uint8_t* digest = sha1_result(&s);
 
                char* ret_str = malloc(41);
index 58482a8..daf3e29 100644 (file)
@@ -168,8 +168,8 @@ interface SignalHandler
                        if (last_handler != NULL)
                                SignalHandler_decr_ref(last_handler);
 
-                       nit_signals_list[signal].handler = recv;
-                       SignalHandler_incr_ref(recv);
+                       nit_signals_list[signal].handler = self;
+                       SignalHandler_incr_ref(self);
 
                        nit_signals_list[signal].safely = safely;
                }
index b3cb2f9..a40cc5d 100644 (file)
@@ -57,7 +57,7 @@ class TCPStream
        # Creates a socket connection to host `host` on port `port`
        init connect(host: String, port: Int)
        do
-               _buffer = new FlatBuffer
+               _buffer = new NativeString(1024)
                _buffer_pos = 0
                socket = new NativeSocket.socket(new NativeSocketAddressFamilies.af_inet,
                        new NativeSocketTypes.sock_stream, new NativeSocketProtocolFamilies.pf_null)
@@ -71,20 +71,35 @@ class TCPStream
                        closed = true
                        return
                end
-               var hostname = socket.gethostbyname(host)
-               addrin = new NativeSocketAddrIn.with_hostent(hostname, port)
 
+               var hostname = sys.gethostbyname(host.to_cstring)
+               if hostname.address_is_null then
+                       # Error in name lookup
+                       var err = sys.h_errno
+                       last_error = new IOError(err.to_s)
+
+                       closed = true
+                       end_reached = true
+
+                       return
+               end
+
+               addrin = new NativeSocketAddrIn.with_hostent(hostname, port)
                address = addrin.address
                init(addrin.port, hostname.h_name)
 
                closed = not internal_connect
                end_reached = closed
+               if closed then
+                       # Connection failed
+                       last_error = new IOError(errno.strerror)
+               end
        end
 
        # Creates a client socket, this is meant to be used by accept only
        private init server_side(h: SocketAcceptResult)
        do
-               _buffer = new FlatBuffer
+               _buffer = new NativeString(1024)
                _buffer_pos = 0
                socket = h.socket
                addrin = h.addr_in
@@ -110,7 +125,7 @@ class TCPStream
        # timeout : Time in milliseconds before stopping to wait for events
        fun ready_to_read(timeout: Int): Bool
        do
-               if _buffer_pos < _buffer.length then return true
+               if _buffer_pos < _buffer_length then return true
                if end_reached then return false
                var events = [new NativeSocketPollValues.pollin]
                return pollin(events, timeout).length != 0
@@ -141,7 +156,7 @@ class TCPStream
        end
 
        # If socket.end_reached, nothing will happen
-       redef fun write(msg: Text)
+       redef fun write(msg)
        do
                if closed then return
                socket.write(msg.to_s)
@@ -153,6 +168,11 @@ class TCPStream
                socket.write_byte value
        end
 
+       redef fun write_bytes(s) do
+               if closed then return
+               socket.write(s.to_s)
+       end
+
        fun write_ln(msg: Text)
        do
                if end_reached then return
@@ -162,7 +182,7 @@ class TCPStream
 
        redef fun fill_buffer
        do
-               _buffer.clear
+               _buffer_length = 0
                _buffer_pos = 0
                if not connected then return
                var read = socket.read
@@ -170,7 +190,17 @@ class TCPStream
                        close
                        end_reached = true
                end
-               _buffer.append(read)
+               enlarge(_buffer_length + read.length)
+               read.copy_to_native(_buffer, read.length, 0, 0)
+               _buffer_length = read.length
+       end
+
+       fun enlarge(len: Int) do
+               if _buffer_capacity >= len then return
+               while _buffer_capacity < len do _buffer_capacity = _buffer_capacity * 2 + 2
+               var ns = new NativeString(_buffer_capacity)
+               _buffer.copy_to(ns, _buffer_length - _buffer_pos, _buffer_pos, 0)
+               _buffer = ns
        end
 
        redef fun close
index a574485..94eecd7 100644 (file)
@@ -87,13 +87,13 @@ end
 private extern class NativeSocketPollFD `{ struct pollfd * `}
 
        # File descriptor
-       fun fd: Int `{ return recv->fd; `}
+       fun fd: Int `{ return self->fd; `}
 
        # List of events to be watched
-       fun events: Int `{ return recv->events; `}
+       fun events: Int `{ return self->events; `}
 
        # List of events received by the last poll function
-       fun revents: Int `{  return recv->revents; `}
+       fun revents: Int `{  return self->revents; `}
 
        new (pid: Int, events: NativeSocketPollValues) `{
                struct pollfd *poll = malloc(sizeof(struct pollfd));
@@ -115,54 +115,51 @@ extern class NativeSocket `{ int* `}
                return d;
        `}
 
-       fun destroy `{ free(recv); `}
+       fun destroy `{ free(self); `}
 
-       fun close: Int `{ return close(*recv); `}
+       fun close: Int `{ return close(*self); `}
 
-       fun descriptor: Int `{ return *recv; `}
-
-       fun gethostbyname(n: String): NativeSocketHostent import String.to_cstring `{ return gethostbyname(String_to_cstring(n)); `}
+       fun descriptor: Int `{ return *self; `}
 
        fun connect(addrIn: NativeSocketAddrIn): Int `{
-               return connect(*recv, (struct sockaddr*)addrIn, sizeof(*addrIn));
+               return connect(*self, (struct sockaddr*)addrIn, sizeof(*addrIn));
        `}
 
        fun write(buffer: String): Int
        import String.to_cstring, String.length `{
-               return write(*recv, (char*)String_to_cstring(buffer), String_length(buffer));
+               return write(*self, (char*)String_to_cstring(buffer), String_length(buffer));
        `}
 
        # Write `value` as a single byte
        fun write_byte(value: Int): Int `{
-               return write(*recv, &value, 1);
+               unsigned char byt = (unsigned char)value;
+               return write(*self, &byt, 1);
        `}
 
-       fun read: String import NativeString.to_s_with_length `{
-               static char c[1024];
-               int n = read(*recv, c, 1024);
+       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);
                }
-               char* ret = malloc(n + 1);
-               memcpy(ret, c, n);
-               ret[n] = '\0';
-               return NativeString_to_s_with_length(ret, n);
+               c[n] = 0;
+               return NativeString_to_s_with_length(c, n);
        `}
 
        # Sets an option for the socket
        #
        # Returns `true` on success.
        fun setsockopt(level: NativeSocketOptLevels, option_name: NativeSocketOptNames, option_value: Int): Bool `{
-               int err = setsockopt(*recv, level, option_name, &option_value, sizeof(int));
+               int err = setsockopt(*self, level, option_name, &option_value, sizeof(int));
                if(err != 0){
                        return 0;
                }
                return 1;
        `}
 
-       fun bind(addrIn: NativeSocketAddrIn): Int `{ return bind(*recv, (struct sockaddr*)addrIn, sizeof(*addrIn)); `}
+       fun bind(addrIn: NativeSocketAddrIn): Int `{ return bind(*self, (struct sockaddr*)addrIn, sizeof(*addrIn)); `}
 
-       fun listen(size: Int): Int `{ return listen(*recv, size); `}
+       fun listen(size: Int): Int `{ return listen(*self, size); `}
 
        # Checks if the buffer is ready for any event specified when creating the pollfd structure
        fun socket_poll(filedesc: PollFD, timeout: Int): Array[NativeSocketPollValues]
@@ -194,7 +191,7 @@ extern class NativeSocket `{ int* `}
 
        private fun native_accept(addr_in: NativeSocketAddrIn): NativeSocket `{
                socklen_t s = sizeof(struct sockaddr);
-               int socket = accept(*recv, (struct sockaddr*)addr_in, &s);
+               int socket = accept(*self, (struct sockaddr*)addr_in, &s);
                if (socket == -1) return NULL;
 
                int *ptr = malloc(sizeof(int));
@@ -212,7 +209,7 @@ extern class NativeSocket `{ int* `}
 
        # Set wether this socket is non blocking
        fun non_blocking=(value: Bool) `{
-               int flags = fcntl(*recv, F_GETFL, 0);
+               int flags = fcntl(*self, F_GETFL, 0);
                if (flags == -1) flags = 0;
 
                if (value) {
@@ -222,7 +219,7 @@ extern class NativeSocket `{ int* `}
                } else {
                        return;
                }
-               fcntl(*recv, F_SETFL, flags);
+               fcntl(*self, F_SETFL, flags);
        `}
 end
 
@@ -261,19 +258,19 @@ extern class NativeSocketAddrIn `{ struct sockaddr_in* `}
                return sai;
        `}
 
-       fun address: String import NativeString.to_s `{ return NativeString_to_s((char*)inet_ntoa(recv->sin_addr)); `}
+       fun address: String import NativeString.to_s `{ return NativeString_to_s((char*)inet_ntoa(self->sin_addr)); `}
 
-       fun family: NativeSocketAddressFamilies `{ return recv->sin_family; `}
+       fun family: NativeSocketAddressFamilies `{ return self->sin_family; `}
 
-       fun port: Int `{ return ntohs(recv->sin_port); `}
+       fun port: Int `{ return ntohs(self->sin_port); `}
 
-       fun destroy `{ free(recv); `}
+       fun destroy `{ free(self); `}
 end
 
 extern class NativeSocketHostent `{ struct hostent* `}
-       private fun native_h_aliases(i: Int): String import NativeString.to_s `{ return NativeString_to_s(recv->h_aliases[i]); `}
+       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 (recv->h_aliases[i] != NULL); `}
+       private fun native_h_aliases_reachable(i: Int): Bool `{ return (self->h_aliases[i] != NULL); `}
 
        fun h_aliases: Array[String]
        do
@@ -287,13 +284,13 @@ extern class NativeSocketHostent `{ struct hostent* `}
                return d
        end
 
-       fun h_addr: String import NativeString.to_s `{ return NativeString_to_s((char*)inet_ntoa(*(struct in_addr*)recv->h_addr)); `}
+       fun h_addr: String import NativeString.to_s `{ return NativeString_to_s((char*)inet_ntoa(*(struct in_addr*)self->h_addr)); `}
 
-       fun h_addrtype: Int `{ return recv->h_addrtype; `}
+       fun h_addrtype: Int `{ return self->h_addrtype; `}
 
-       fun h_length: Int `{ return recv->h_length; `}
+       fun h_length: Int `{ return self->h_length; `}
 
-       fun h_name: String import NativeString.to_s `{ return NativeString_to_s(recv->h_name); `}
+       fun h_name: String import NativeString.to_s `{ return NativeString_to_s(self->h_name); `}
 end
 
 extern class NativeTimeval `{ struct timeval* `}
@@ -305,11 +302,11 @@ extern class NativeTimeval `{ struct timeval* `}
                return tv;
        `}
 
-       fun seconds: Int `{ return recv->tv_sec; `}
+       fun seconds: Int `{ return self->tv_sec; `}
 
-       fun microseconds: Int `{ return recv->tv_usec; `}
+       fun microseconds: Int `{ return self->tv_usec; `}
 
-       fun destroy `{ free(recv); `}
+       fun destroy `{ free(self); `}
 end
 
 extern class NativeSocketSet `{ fd_set* `}
@@ -319,15 +316,15 @@ extern class NativeSocketSet `{ fd_set* `}
                return f;
        `}
 
-       fun set(s: NativeSocket) `{ FD_SET(*s, recv); `}
+       fun set(s: NativeSocket) `{ FD_SET(*s, self); `}
 
-       fun is_set(s: NativeSocket): Bool `{ return FD_ISSET(*s, recv); `}
+       fun is_set(s: NativeSocket): Bool `{ return FD_ISSET(*s, self); `}
 
-       fun zero `{ FD_ZERO(recv); `}
+       fun zero `{ FD_ZERO(self); `}
 
-       fun clear(s: NativeSocket) `{ FD_CLR(*s, recv); `}
+       fun clear(s: NativeSocket) `{ FD_CLR(*s, self); `}
 
-       fun destroy `{ free(recv); `}
+       fun destroy `{ free(self); `}
 end
 
 class NativeSocketObserver
@@ -480,6 +477,55 @@ extern class NativeSocketPollValues `{ int `}
 
        # Combines two NativeSocketPollValues
        private fun +(other: NativeSocketPollValues): NativeSocketPollValues `{
-               return recv | other;
+               return self | other;
        `}
 end
+
+redef class Sys
+       # Get network host entry
+       fun gethostbyname(name: NativeString): NativeSocketHostent `{
+               return gethostbyname(name);
+       `}
+
+       # Last error raised by `gethostbyname`
+       fun h_errno: HErrno `{ return h_errno; `}
+end
+
+# Error code of `Sys::h_errno`
+extern class HErrno `{ int `}
+       # The specified host is unknown
+       fun host_not_found: Bool `{ return self == HOST_NOT_FOUND; `}
+
+       # The requested name is valid but does not have an IP address
+       #
+       # Same as `no_data`.
+       fun no_address: Bool `{ return self == NO_ADDRESS; `}
+
+       # The requested name is valid byt does not have an IP address
+       #
+       # Same as `no_address`.
+       fun no_data: Bool `{ return self == NO_DATA; `}
+
+       # A nonrecoverable name server error occurred
+       fun no_recovery: Bool `{ return self == NO_RECOVERY; `}
+
+       # A temporary error occurred on an authoritative name server, try again later
+       fun try_again: Bool `{ return self == TRY_AGAIN; `}
+
+       redef fun to_s
+       do
+               if host_not_found then
+                       return "The specified host is unknown"
+               else if no_address then
+                       return "The requested name is valid but does not have an IP address"
+               else if no_recovery then
+                       return "A nonrecoverable name server error occurred"
+               else if try_again then
+                       return "A temporary error occurred on an authoritative name server, try again later"
+               else
+                       # This may happen if another call was made to `gethostbyname`
+                       # before we fetch the error code.
+                       return "Unknown error on `gethostbyname`"
+               end
+       end
+end
index 6419ea8..dd45211 100644 (file)
@@ -29,7 +29,7 @@ end
 
 extern class Sqlite3Code `{int`}
        new ok `{ return SQLITE_OK; `} #         0   /* Successful result */
-       fun is_ok: Bool `{ return recv == SQLITE_OK; `}
+       fun is_ok: Bool `{ return self == SQLITE_OK; `}
 
        # new  `{ return SQLITE_ERROR; `} #      1   /* SQL error or missing database */
        # new  `{ return SQLITE_INTERNAL; `} #    2   /* Internal logic error in SQLite */
@@ -61,14 +61,14 @@ extern class Sqlite3Code `{int`}
        # new  `{ return SQLITE_WARNING; `} #    28   /* Warnings from sqlite3_log() */
 
        new row `{ return SQLITE_ROW; `} #        100  /* sqlite3_step() has another row ready */
-       fun is_row: Bool `{ return recv == SQLITE_ROW; `}
+       fun is_row: Bool `{ return self == SQLITE_ROW; `}
 
        new done `{ return SQLITE_DONE; `} #       101  /* sqlite3_step() has finished executing */
-       fun is_done: Bool `{ return recv == SQLITE_DONE; `}
+       fun is_done: Bool `{ return self == SQLITE_DONE; `}
 
-       redef fun to_s: String import NativeString.to_s `{
+       redef fun to_s import NativeString.to_s `{
 #if SQLITE_VERSION_NUMBER >= 3007015
-               char *err = (char *)sqlite3_errstr(recv);
+               char *err = (char *)sqlite3_errstr(self);
 #else
                char *err = "sqlite3_errstr supported only by version >= 3.7.15";
 #endif
@@ -82,11 +82,11 @@ extern class NativeStatement `{sqlite3_stmt*`}
 
        # Evaluate the statement
        fun step: Sqlite3Code `{
-               return sqlite3_step(recv);
+               return sqlite3_step(self);
        `}
 
        fun column_name(i: Int) : String import NativeString.to_s `{
-               const char * name = (sqlite3_column_name(recv, i));
+               const char * name = (sqlite3_column_name(self, i));
                if(name == NULL){
                        name = "";
                }
@@ -96,37 +96,37 @@ extern class NativeStatement `{sqlite3_stmt*`}
 
        # Number of bytes in the blob or string at row `i`
        fun column_bytes(i: Int) : Int `{
-               return sqlite3_column_bytes(recv, i);
+               return sqlite3_column_bytes(self, i);
        `}
 
        fun column_double(i: Int) : Float `{
-               return sqlite3_column_double(recv, i);
+               return sqlite3_column_double(self, i);
        `}
 
        fun column_int(i: Int) : Int `{
-               return sqlite3_column_int(recv, i);
+               return sqlite3_column_int(self, i);
        `}
 
        fun column_text(i: Int): NativeString `{
-               return (char *)sqlite3_column_text(recv, i);
+               return (char *)sqlite3_column_text(self, i);
        `}
 
        # Type of the entry at row `i`
        fun column_type(i: Int): DataType `{
-               return sqlite3_column_type(recv, i);
+               return sqlite3_column_type(self, i);
        `}
 
-       fun column_blob(i: Int): Pointer `{ return (void*)sqlite3_column_blob(recv, i); `}
+       fun column_blob(i: Int): Pointer `{ return (void*)sqlite3_column_blob(self, i); `}
 
        fun column_count: Int `{
-               return sqlite3_column_count(recv);
+               return sqlite3_column_count(self);
        `}
 
        # Reset this statement to its original state, to be reexecuted
-       fun reset: Sqlite3Code `{ return sqlite3_reset(recv); `}
+       fun reset: Sqlite3Code `{ return sqlite3_reset(self); `}
 
        # Delete this statement
-       fun finalize: Sqlite3Code `{ return sqlite3_finalize(recv); `}
+       fun finalize: Sqlite3Code `{ return sqlite3_finalize(self); `}
 end
 
 # A database connection
@@ -155,24 +155,24 @@ extern class NativeSqlite3 `{sqlite3 *`}
        # Close this connection
        fun close `{
 #if SQLITE_VERSION_NUMBER >= 3007014
-               sqlite3_close_v2(recv);
+               sqlite3_close_v2(self);
 #else
                // A program using the older version should not rely on the garbage-collector
                // to close its connections. They must be closed manually after the associated
                // prepare statements have been finalized.
-               sqlite3_close(recv);
+               sqlite3_close(self);
 #endif
        `}
 
        # Execute a SQL statement
        fun exec(sql: String): Sqlite3Code import String.to_cstring `{
-               return sqlite3_exec(recv, String_to_cstring(sql), 0, 0, 0);
+               return sqlite3_exec(self, String_to_cstring(sql), 0, 0, 0);
        `}
 
        # Prepare a SQL statement
        fun prepare(sql: String): nullable NativeStatement import String.to_cstring, NativeStatement.as nullable `{
                sqlite3_stmt *stmt;
-               int res = sqlite3_prepare_v2(recv, String_to_cstring(sql), -1, &stmt, 0);
+               int res = sqlite3_prepare_v2(self, String_to_cstring(sql), -1, &stmt, 0);
                if (res == SQLITE_OK)
                        return NativeStatement_as_nullable(stmt);
                else
@@ -180,21 +180,21 @@ extern class NativeSqlite3 `{sqlite3 *`}
        `}
 
        fun last_insert_rowid: Int `{
-               return sqlite3_last_insert_rowid(recv);
+               return sqlite3_last_insert_rowid(self);
        `}
 
        fun error: Sqlite3Code `{
-               return sqlite3_errcode(recv);
+               return sqlite3_errcode(self);
        `}
 end
 
 # Sqlite data types
 extern class DataType `{ int `}
-       fun is_integer: Bool `{ return recv == SQLITE_INTEGER; `}
-       fun is_float: Bool `{ return recv == SQLITE_FLOAT; `}
-       fun is_blob: Bool `{ return recv == SQLITE_BLOB; `}
-       fun is_null: Bool `{ return recv == SQLITE_NULL; `}
-       fun is_text: Bool `{ return recv == SQLITE_TEXT; `}
+       fun is_integer: Bool `{ return self == SQLITE_INTEGER; `}
+       fun is_float: Bool `{ return self == SQLITE_FLOAT; `}
+       fun is_blob: Bool `{ return self == SQLITE_BLOB; `}
+       fun is_null: Bool `{ return self == SQLITE_NULL; `}
+       fun is_text: Bool `{ return self == SQLITE_TEXT; `}
 
-       fun to_i: Int `{ return recv; `}
+       fun to_i: Int `{ return self; `}
 end
index 0fe8050..5f90801 100644 (file)
@@ -257,7 +257,7 @@ class StatementIterator
 
        redef var item: StatementRow is noinit
 
-       redef var is_ok: Bool is noinit
+       redef var is_ok is noinit
 
        # require: `self.statement.is_open`
        redef fun next
index ecef9e5..c5ed9df 100644 (file)
@@ -1,4 +1,4 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
+# This file is part of NIT (http://www.nitlanguage.org).
 #
 # Copyright 2014 Julien Pagès <julien.pages@lirmm.fr>
 #
@@ -6,7 +6,7 @@
 # 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
+#       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,
@@ -24,43 +24,43 @@ in "C header" `{
        #include <assert.h>
 `}
 
-# Add support of binary operations related 
-# to binary level of Integer
-# For compatibility reasons, xor, and, or methods 
-# are still in the math.nit module
+# Add support of binary operations related to binary level of Integer
+# For compatibility reasons, xor, and, or methods are still in the `math` module.
 redef class Int
 
-       # Sets the i-bit of self to the given value
-       #     assert 11.setbit(0, 0) == 10
-       #     assert 10.setbit(0, 1) == 11 
+       # Sets the i-bit of self to the given `value`
+       #
+       #        assert 11.setbit(0, 0) == 10
+       #        assert 10.setbit(0, 1) == 11
        fun setbit(index: Int, value: Int): Int `{
                assert(index >= 0 && index < 32);
 
                if(value == 1)
-                       return recv | (1 << index);
+                       return self | (1 << index);
                else
-                       return recv & ~(1 << index);
+                       return self & ~(1 << index);
        `}
 
-       # Returns the i-bit value of self Integer
-       #     assert 10.getbit(0) == 0
-       #     assert 10.getbit(3) == 1
+       # Returns the i-bit value of `self`
+       #
+       #        assert 10.getbit(0) == 0
+       #        assert 10.getbit(3) == 1
        fun getbit(index: Int): Int `{
                assert(index >= 0 && index < 32);
 
                int op = 1 << index;
-               
-               if((recv & op) == 0)
+
+               if((self & op) == 0)
                        return 0;
                else
                        return 1;
        `}
 
        # Give a binary representation of self Integer
-       fun bits : Array[Int]
+       fun bits: Array[Int]
        do
-               var bits = new Array[Int].with_capacity(32) 
-               
+               var bits = new Array[Int].with_capacity(32)
+
                for i in [0..32[
                do
                        bits[i] = getbit(i)
@@ -69,10 +69,10 @@ redef class Int
                return bits
        end
 
-       # Returns the number of bits of specified value (0 or 1)
-       # in self 
-       #     assert 10.number_bits(1) == 2
-       #     assert 10.number_bits(0) == 30
+       # Returns the number of bits of specified value (0 or 1) in `self`
+       #
+       #        assert 10.number_bits(1) == 2
+       #        assert 10.number_bits(0) == 30
        fun number_bits(value: Int): Int `{
                assert(value == 0 || value == 1);
 
@@ -84,7 +84,7 @@ redef class Int
                {
                        for(i=bound; i>0; i/=2)
                        {
-                               if(recv & i)
+                               if(self & i)
                                        count++;
                        }
                }
@@ -92,27 +92,29 @@ redef class Int
                {
                        for(i=bound; i>0; i/=2)
                        {
-                               if(!(recv & i))
+                               if(!(self & i))
                                        count++;
                        }
                }
                return count;
        `}
 
-       # Returns the position of the highest bit
-       # set to 1 in self (the rightest bit is at position 0)
-       #     assert 10.highest_bit == 3
-       #     assert 1.highest_bit == 0
-       fun highest_bit: Int `{ 
+       # Returns the position of the highest bit set to 1 in `self`
+       #
+       # The rightmost bit is at position 0.
+       #
+       #        assert 10.highest_bit == 3
+       #        assert 1.highest_bit == 0
+       fun highest_bit: Int `{
                long int msb = 1L << 31;
                int pos = 31;
-               
-               while(msb > 0 && !(recv & msb))
+
+               while(msb > 0 && !(self & msb))
                {
                        msb /= 2;
                        pos--;
                }
-               
+
                return pos;
        `}
 end
index b300298..b9b39fd 100644 (file)
@@ -31,7 +31,7 @@ class Bytes
        private var items: NativeString
 
        # Number of bytes in the array
-       redef var length: Int
+       redef var length
 
        # Capacity of the array
        private var capacity: Int
@@ -58,7 +58,7 @@ class Bytes
        #     var b = new Bytes.empty
        #     b.add 101
        #     assert b[0] == 101
-       redef fun [](i: Int): Int do
+       redef fun [](i) do
                assert i >= 0
                assert i < length
                return items[i].ascii
@@ -67,7 +67,7 @@ class Bytes
        #     var b = new Bytes.with_capacity(1)
        #     b[0] = 101
        #     assert b.to_s == "e"
-       redef fun []=(i: Int, v: Int) do
+       redef fun []=(i, v) do
                if persisted then regen
                assert i >= 0
                assert i <= length
@@ -78,7 +78,7 @@ class Bytes
        #     var b = new Bytes.empty
        #     b.add 101
        #     assert b.to_s == "e"
-       redef fun add(c: Int) do
+       redef fun add(c) do
                if persisted then regen
                if length >= capacity then
                        enlarge(length)
@@ -90,7 +90,7 @@ class Bytes
        #     var b = new Bytes.empty
        #     b.append([104, 101, 108, 108, 111])
        #     assert b.to_s == "hello"
-       redef fun append(arr: Collection[Int]) do
+       redef fun append(arr) do
                if arr isa Bytes then
                        append_ns(arr.items, arr.length)
                else
@@ -147,7 +147,7 @@ private class BytesIterator
 
        var tgt: NativeString
 
-       redef var index: Int
+       redef var index
 
        var max: Int
 
index 8b01780..16e4b1e 100644 (file)
@@ -317,7 +317,7 @@ private class ContainerIterator[E]
 
        redef fun next do is_ok = false
 
-       redef var is_ok: Bool = true
+       redef var is_ok = true
 
        var container: Container[E]
 end
@@ -1100,7 +1100,7 @@ end
 private class CoupleMapIterator[K, V]
        super MapIterator[K, V]
        redef fun item do return _iter.item.second
-       
+
        #redef fun item=(e) do _iter.item.second = e
 
        redef fun key do return _iter.item.first
index b3ec382..de66e21 100644 (file)
@@ -5,7 +5,7 @@
 #
 # 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 
+# 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
@@ -65,8 +65,7 @@ abstract class AbstractArrayRead[E]
 
        redef fun last_index_of(item) do return last_index_of_from(item, length-1)
 
-       redef fun index_of_from(item, pos)
-       do
+       redef fun index_of_from(item, pos) do
                var i = pos
                var len = length
                while i < len do
@@ -78,8 +77,7 @@ abstract class AbstractArrayRead[E]
                return -1
        end
 
-       redef fun last_index_of_from(item, pos)
-       do
+       redef fun last_index_of_from(item, pos) do
                var i = pos
                while i >= 0 do
                        if self[i] == item then
@@ -242,8 +240,7 @@ abstract class AbstractArray[E]
                self[0] = item
        end
 
-       redef fun insert(item: E, pos: Int)
-       do
+       redef fun insert(item, pos) do
                enlarge(length + 1)
                copy_to(pos, length-pos, self, pos + 1)
                self[pos] = item
index 66ef4af..2cdc431 100644 (file)
@@ -126,16 +126,7 @@ class List[E]
                        push(e)
                        return
                end
-               var nnode = new ListNode[E](e)
-               var next = node.next
-               if next == null then
-                       _tail = nnode
-               else
-                       next.prev = nnode
-               end
-               nnode.prev = node
-               nnode.next = next
-               node.next = nnode
+               insert_before(e, node)
        end
 
        # Append `l` to `self` but clear `l`.
index 216b676..29fa17e 100644 (file)
@@ -4,7 +4,7 @@
 #
 # 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 
+# 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
@@ -19,7 +19,7 @@ import abstract_collection
 class Range[E: Discrete]
        super Collection[E]
 
-       redef var first: E
+       redef var first
 
        # Get the last element.
        var last: E
@@ -238,14 +238,16 @@ private class DowntoIteratorRange[E: Discrete]
 end
 
 redef class Int
-       # Returns the range from 0 to `self-1`, is used to do:
+       # Returns the range from 0 to `self-1`.
        #
-       #     var s = new Array[String]
-       #     for i in 3.times do s.add "cool"
-       #     assert s.join(" ") == "cool cool cool"
+       #     assert 3.times == [0..3[
+       #     assert 10.times == [0..10[
+       #     assert ((-1).times).is_empty
        #
-       #     s.clear
-       #     for i in 10.times do s.add(i.to_s)
-       #     assert s.to_s == "0123456789"
+       # This can be usefull for loops:
+       #
+       #    var s = new Array[String]
+       #    for i in 3.times do s.add "cool"
+       #    assert s.join(" ") == "cool cool cool"
        fun times: Range[Int] do return [0 .. self[
 end
index f4c6baa..b44b7f9 100644 (file)
@@ -115,8 +115,7 @@ class DisjointSet[E]
        #     s.add(1)
        #     assert s.has(1)
        #     assert not s.has(2)
-       redef fun has(e)
-       do
+       redef fun has(e) do
                return nodes.has_key(e)
        end
 
@@ -126,8 +125,7 @@ class DisjointSet[E]
        # Initially it is in its own disjoint subset
        #
        # ENSURE: `has(e)`
-       redef fun add(e:E)
-       do
+       redef fun add(e) do
                if nodes.has_key(e) then return
                var ne = new DisjointSetNode
                nodes[e] = ne
index 1490ee7..46c52ec 100644 (file)
@@ -113,30 +113,29 @@ class FileReader
                        return
                end
                end_reached = false
-               _buffer_pos = 0
-               _buffer.clear
+               buffer_reset
        end
 
        redef fun close
        do
                super
-               _buffer.clear
+               buffer_reset
                end_reached = true
        end
 
        redef fun fill_buffer
        do
-               var nb = _file.io_read(_buffer.items, _buffer.capacity)
+               var nb = _file.io_read(_buffer, _buffer_capacity)
                if nb <= 0 then
                        end_reached = true
                        nb = 0
                end
-               _buffer.length = nb
+               _buffer_length = nb
                _buffer_pos = 0
        end
 
        # End of file?
-       redef var end_reached: Bool = false
+       redef var end_reached = false
 
        # Open the file at `path` for reading.
        #
@@ -179,18 +178,23 @@ class FileWriter
        super FileStream
        super Writer
 
+       redef fun write_bytes(s) do
+               if last_error != null then return
+               if not _is_writable then
+                       last_error = new IOError("cannot write to non-writable stream")
+                       return
+               end
+               write_native(s.items, s.length)
+       end
+
        redef fun write(s)
        do
                if last_error != null then return
                if not _is_writable then
-                       last_error = new IOError("Cannot write to non-writable stream")
+                       last_error = new IOError("cannot write to non-writable stream")
                        return
                end
-               if s isa FlatText then
-                       write_native(s.to_cstring, s.length)
-               else
-                       for i in s.substrings do write_native(i.to_cstring, i.length)
-               end
+               for i in s.substrings do write_native(i.to_cstring, i.length)
        end
 
        redef fun write_byte(value)
@@ -295,7 +299,7 @@ class Stdin
                prepare_buffer(1)
        end
 
-       redef fun poll_in: Bool is extern "file_stdin_poll_in"
+       redef fun poll_in is extern "file_stdin_poll_in"
 end
 
 # Standard output stream.
@@ -435,10 +439,12 @@ class Path
        # ~~~
        #
        # See `Reader::read_all` for details.
-       fun read_all: String
+       fun read_all: String do return read_all_bytes.to_s
+
+       fun read_all_bytes: Bytes
        do
                var s = open_ro
-               var res = s.read_all
+               var res = s.read_all_bytes
                s.close
                return res
        end
@@ -1050,12 +1056,12 @@ redef class NativeString
                struct stat* stat_element;
                int res;
                stat_element = malloc(sizeof(struct stat));
-               res = lstat(recv, stat_element);
+               res = lstat(self, stat_element);
                if (res == -1) return NULL;
                return stat_element;
        `}
        private fun file_mkdir: Bool is extern "string_NativeString_NativeString_file_mkdir_0"
-       private fun rmdir: Bool `{ return !rmdir(recv); `}
+       private fun rmdir: Bool `{ return !rmdir(self); `}
        private fun file_delete: Bool is extern "string_NativeString_NativeString_file_delete_0"
        private fun file_chdir: Bool is extern "string_NativeString_NativeString_file_chdir_0"
        private fun file_realpath: NativeString is extern "file_NativeString_realpath"
@@ -1075,19 +1081,19 @@ private extern class NativeFileStat `{ struct stat * `}
        fun size: Int is extern "file_FileStat_FileStat_size_0"
 
        # Returns true if it is a regular file (not a device file, pipe, sockect, ...)
-       fun is_reg: Bool `{ return S_ISREG(recv->st_mode); `}
+       fun is_reg: Bool `{ return S_ISREG(self->st_mode); `}
        # Returns true if it is a directory
-       fun is_dir: Bool `{ return S_ISDIR(recv->st_mode); `}
+       fun is_dir: Bool `{ return S_ISDIR(self->st_mode); `}
        # Returns true if it is a character device
-       fun is_chr: Bool `{ return S_ISCHR(recv->st_mode); `}
+       fun is_chr: Bool `{ return S_ISCHR(self->st_mode); `}
        # Returns true if it is a block device
-       fun is_blk: Bool `{ return S_ISBLK(recv->st_mode); `}
+       fun is_blk: Bool `{ return S_ISBLK(self->st_mode); `}
        # Returns true if the type is fifo
-       fun is_fifo: Bool `{ return S_ISFIFO(recv->st_mode); `}
+       fun is_fifo: Bool `{ return S_ISFIFO(self->st_mode); `}
        # Returns true if the type is a link
-       fun is_lnk: Bool `{ return S_ISLNK(recv->st_mode); `}
+       fun is_lnk: Bool `{ return S_ISLNK(self->st_mode); `}
        # Returns true if the type is a socket
-       fun is_sock: Bool `{ return S_ISSOCK(recv->st_mode); `}
+       fun is_sock: Bool `{ return S_ISSOCK(self->st_mode); `}
 end
 
 # Instance of this class are standard FILE * pointers
@@ -1096,11 +1102,11 @@ private extern class NativeFile `{ FILE* `}
        fun io_write(buf: NativeString, len: Int): Int is extern "file_NativeFile_NativeFile_io_write_2"
        fun write_byte(value: Int): Int `{
                unsigned char b = (unsigned char)value;
-               return fwrite(&b, 1, 1, recv);
+               return fwrite(&b, 1, 1, self);
        `}
        fun io_close: Int is extern "file_NativeFile_NativeFile_io_close_0"
        fun file_stat: NativeFileStat is extern "file_NativeFile_NativeFile_file_stat_0"
-       fun fileno: Int `{ return fileno(recv); `}
+       fun fileno: Int `{ return fileno(self); `}
        # Flushes the buffer, forcing the write operation
        fun flush: Int is extern "fflush"
        # Used to specify how the buffering will be handled for the current stream.
@@ -1120,12 +1126,12 @@ private extern class NativeDir `{ DIR* `}
        new opendir(path: NativeString) `{ return opendir(path); `}
 
        # Close a directory
-       fun closedir `{ closedir(recv); `}
+       fun closedir `{ closedir(self); `}
 
        # Read the next directory entry
        fun readdir: NativeString `{
                struct dirent *de;
-               de = readdir(recv);
+               de = readdir(self);
                if (!de) return NULL;
                return de->d_name;
        `}
@@ -1230,7 +1236,7 @@ end
 # Print `objects` on the standard output (`stdout`).
 fun printn(objects: Object...)
 do
-       sys.stdout.write(objects.to_s)
+       sys.stdout.write(objects.plain_to_s)
 end
 
 # Print an `object` on the standard output (`stdout`) and add a newline.
index 85386b4..c596bb3 100644 (file)
@@ -5,7 +5,7 @@
 #
 # 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 
+# 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
@@ -128,7 +128,7 @@ interface Comparable
        type OTHER: Comparable
 
        # Is `self` lesser than `other`?
-       fun <(other: OTHER): Bool is abstract 
+       fun <(other: OTHER): Bool is abstract
 
        # not `other` < `self`
        # Note, the implementation must ensure that: `(x<=y) == (x<y or x==y)`
@@ -275,6 +275,12 @@ interface Numeric
        #     assert 5.to_f         != 5 # Float and Int are not equals
        fun to_f: Float is abstract
 
+       # The byte equivalent of `self`
+       #
+       #     assert (-1).to_b == 0xFF.to_b
+       #     assert (1.9).to_b == 1.to_b
+       fun to_b: Byte is abstract
+
        # Is this the value of zero in its domain?
        fun is_zero: Bool do return self == zero
 
@@ -331,10 +337,10 @@ universal Float
        redef fun !=(i) is intern
        redef fun output is intern
 
-       redef fun <=(i): Bool is intern
-       redef fun <(i): Bool is intern
-       redef fun >=(i): Bool is intern
-       redef fun >(i): Bool is intern
+       redef fun <=(i) is intern
+       redef fun <(i) is intern
+       redef fun >=(i) is intern
+       redef fun >(i) is intern
 
        redef fun +(i) is intern
        redef fun - is intern
@@ -344,6 +350,7 @@ universal Float
 
        redef fun to_i is intern
        redef fun to_f do return self
+       redef fun to_b is intern
 
        redef fun zero do return 0.0
        redef fun value_of(val) do return val.to_f
@@ -402,6 +409,110 @@ universal Float
        end
 end
 
+# Native bytes.
+# Same as a C `unsigned char`
+universal Byte
+       super Discrete
+       super Numeric
+
+       redef type OTHER: Byte
+
+       redef fun successor(i) do return self + i.to_b
+       redef fun predecessor(i) do return self - i.to_b
+
+       redef fun object_id is intern
+       redef fun hash do return self.to_i
+       redef fun ==(i) is intern
+       redef fun !=(i) is intern
+       redef fun output is intern
+
+       redef fun <=(i) is intern
+       redef fun <(i) is intern
+       redef fun >=(i) is intern
+       redef fun >(i) is intern
+       redef fun +(i) is intern
+
+       # On an Byte, unary minus will return `(256 - self) % 256`
+       #
+       #     assert -(1.to_b) == 0xFF.to_b
+       #     assert -(0.to_b) == 0x00.to_b
+       redef fun - is intern
+       redef fun -(i) is intern
+       redef fun *(i) is intern
+       redef fun /(i) is intern
+
+       # Modulo of `self` with `i`.
+       #
+       # Finds the remainder of division of `self` by `i`.
+       #
+       #     assert 5.to_b % 2.to_b            == 1.to_b
+       #     assert 10.to_b % 2.to_b           == 0.to_b
+       fun %(i: Byte): Byte is intern
+
+       redef fun zero do return 0.to_b
+       redef fun value_of(val) do return val.to_b
+
+       # `i` bits shift fo the left (aka <<)
+       #
+       #     assert 5.to_b.lshift(1)    == 10.to_b
+       fun lshift(i: Int): Byte is intern
+
+       # alias of `lshift`
+       fun <<(i: Int): Byte do return lshift(i)
+
+       # `i` bits shift fo the right (aka >>)
+       #
+       #     assert 5.to_b.rshift(1)    == 2.to_b
+       fun rshift(i: Int): Byte is intern
+
+       # alias of `rshift`
+       fun >>(i: Int): Byte do return rshift(i)
+
+       redef fun to_i is intern
+       redef fun to_f is intern
+       redef fun to_b do return self
+
+       redef fun distance(i) do return (self - i).to_i
+
+       redef fun <=>(other)
+       do
+               if self < other then
+                       return -1
+               else if other < self then
+                       return 1
+               else
+                       return 0
+               end
+       end
+
+       redef fun is_between(c, d)
+       do
+               if self < c or d < self then
+                       return false
+               else
+                       return true
+               end
+       end
+
+       redef fun max(other)
+       do
+               if self < other then
+                       return other
+               else
+                       return self
+               end
+       end
+
+       redef fun min(c)
+       do
+               if c < self then
+                       return c
+               else
+                       return self
+               end
+       end
+end
+
 # Native integer numbers.
 # Correspond to C int.
 universal Int
@@ -459,6 +570,7 @@ universal Int
 
        redef fun to_i do return self
        redef fun to_f is intern
+       redef fun to_b is intern
 
        redef fun distance(i)
        do
@@ -483,9 +595,9 @@ universal Int
 
        redef fun is_between(c, d)
        do
-               if self < c or d < self then 
+               if self < c or d < self then
                        return false
-               else 
+               else
                        return true
                end
        end
@@ -536,7 +648,7 @@ universal Int
                # count digits
                while n > 0 do
                        d += 1
-                       n = n / b       # euclidian division /
+                       n = n / b       # euclidian division /
                end
                return d
        end
index 9e1744f..8b5fecb 100644 (file)
@@ -47,7 +47,7 @@ redef class Int
        # Returns the square root of `self`
        #
        #     assert 16.sqrt == 4
-       fun sqrt: Int `{ return sqrt(recv); `}
+       fun sqrt: Int `{ return sqrt(self); `}
 
        # Returns the greatest common divisor of `self` and `o`
        #
@@ -158,7 +158,7 @@ redef class Float
        #     assert 12.0.abs == 12.0
        #     assert (-34.56).abs == 34.56
        #     assert -34.56.abs == -34.56
-       fun abs: Float `{ return fabs(recv); `}
+       fun abs: Float `{ return fabs(self); `}
 
        # Returns `self` raised at `e` power.
        #
@@ -186,13 +186,13 @@ redef class Float
        #     assert 1.9.ceil == 2.0
        #     assert 2.0.ceil == 2.0
        #     assert (-1.5).ceil == -1.0
-       fun ceil: Float `{ return ceil(recv); `}
+       fun ceil: Float `{ return ceil(self); `}
 
        #     assert 1.1.floor == 1.0
        #     assert 1.9.floor == 1.0
        #     assert 2.0.floor == 2.0
        #     assert (-1.5).floor == -2.0
-       fun floor: Float `{ return floor(recv); `}
+       fun floor: Float `{ return floor(self); `}
 
        # Rounds the value of a float to its nearest integer value
        #
index 1fe850d..7f4b24b 100644 (file)
@@ -61,22 +61,22 @@ extern class Passwd `{struct passwd*`}
        new from_name(name: String) import String.to_cstring `{ return getpwnam( String_to_cstring(name) ); `}
 
        # Username
-       fun name: String import NativeString.to_s `{ return NativeString_to_s(recv->pw_name); `}
+       fun name: String import NativeString.to_s `{ return NativeString_to_s(self->pw_name); `}
 
        # User password
-       fun passwd: String import NativeString.to_s `{ return NativeString_to_s(recv->pw_passwd); `}
+       fun passwd: String import NativeString.to_s `{ return NativeString_to_s(self->pw_passwd); `}
 
        # User ID
-       fun uid: Int `{ return recv->pw_uid; `}
+       fun uid: Int `{ return self->pw_uid; `}
 
        # Group ID
-       fun gid: Int `{ return recv->pw_gid; `}
+       fun gid: Int `{ return self->pw_gid; `}
 
        # Home directory
-       fun dir: String import NativeString.to_s `{ return NativeString_to_s(recv->pw_dir); `}
+       fun dir: String import NativeString.to_s `{ return NativeString_to_s(self->pw_dir); `}
 
        # Shell program
-       fun shell: String import NativeString.to_s `{ return NativeString_to_s(recv->pw_shell); `}
+       fun shell: String import NativeString.to_s `{ return NativeString_to_s(self->pw_shell); `}
 end
 
 # Information on a user group
@@ -88,13 +88,13 @@ extern class Group `{struct group*`}
        new from_name(name: String) import String.to_cstring `{ return getgrnam( String_to_cstring(name) ); `}
 
        # Name of this ground
-       fun name: String import NativeString.to_s `{ return NativeString_to_s(recv->gr_name); `}
+       fun name: String import NativeString.to_s `{ return NativeString_to_s(self->gr_name); `}
 
        # Encrypted password of this group
-       fun passwd: String import NativeString.to_s `{ return NativeString_to_s(recv->gr_passwd); `}
+       fun passwd: String import NativeString.to_s `{ return NativeString_to_s(self->gr_passwd); `}
 
        # Id of this group
-       fun gid: Int `{ return recv->gr_gid; `}
+       fun gid: Int `{ return self->gr_gid; `}
 
        # List of the members of the group
        fun mem: Array[String] import Array[String], Array[String].add, NativeString.to_s `{
@@ -102,7 +102,7 @@ extern class Group `{struct group*`}
                int m;
                Array_of_String ret;
 
-               mem = recv->gr_mem;
+               mem = self->gr_mem;
                ret = new_Array_of_String();
 
                for (m = 0; mem[m] != NULL; m++)
index a58aba0..24637cb 100644 (file)
@@ -42,7 +42,7 @@ private extern class NativeRegex `{ regex_t* `}
 
        # Compile the regular expression `regex` into a form that is suitable for subsequent `regexec` searches
        fun regcomp(regex: NativeString, cflags: Int): Int `{
-               return regcomp(recv, regex, cflags);
+               return regcomp(self, regex, cflags);
        `}
 
        # Match `string` against the precompiled pattern buffer of `self`, locating matches
@@ -50,32 +50,32 @@ private extern class NativeRegex `{ regex_t* `}
        # `nmatch` and `pmatch` are used to provide information regarding the location of any matches.
        # `eflags` may be the bitwise-or of one or both of `flag_notbol` and `flag_noteol`.
        fun regexec(string: NativeString, nmatch: Int, pmatch: NativeMatchArray, eflags: Int): Int `{
-               return regexec(recv, string, nmatch, pmatch, eflags);
+               return regexec(self, string, nmatch, pmatch, eflags);
        `}
 
        # Match `string` against the precompiled pattern buffer of `self`, do not locate matches
        #
        # `eflags` may be the bitwise-or of one or both of `flag_notbol` and `flag_noteol`.
        fun regexec_match_only(string: NativeString, eflags: Int): Int `{
-               return regexec(recv, string, 0, NULL, eflags);
+               return regexec(self, string, 0, NULL, eflags);
        `}
 
        # Free the memory allocated to the pattern buffer by the compiling process
        #
        # Does not free the memory holding `self`, use `free` for this purpose.
-       fun regfree `{ regfree(recv); `}
+       fun regfree `{ regfree(self); `}
 
        # Turn the error codes that can be returned by both `regcomp` and `regexec` into error message strings
        fun regerror(errcode: Int): NativeString `{
-               size_t len = regerror(errcode, recv, NULL, 0);
+               size_t len = regerror(errcode, self, NULL, 0);
                char *message = malloc(len);
-               regerror(errcode, recv, message, len);
+               regerror(errcode, self, message, len);
 
                return message;
        `}
 
        # Number of parenthetical subexpressions in this compiled regular expression
-       fun re_nsub: Int `{ return recv->re_nsub; `}
+       fun re_nsub: Int `{ return self->re_nsub; `}
 end
 
 # Flags for `NativeRegex::regcomp`
@@ -96,7 +96,7 @@ private fun error_nomatch: Int `{ return REG_NOMATCH; `}
 private fun error_espace: Int `{ return REG_ESPACE; `}
 
 redef universal Int
-       private fun is_nomatch: Bool `{ return recv == REG_NOMATCH; `}
+       private fun is_nomatch: Bool `{ return self == REG_NOMATCH; `}
 end
 
 # An array of `regmatch_t` or a pointer to one
@@ -105,17 +105,17 @@ private extern class NativeMatchArray `{ regmatch_t* `}
        new malloc(length: Int) `{ return malloc(length * sizeof(regmatch_t)); `}
 
        # The offset in string of the beginning of a substring
-       fun rm_so: Int `{ return recv->rm_so; `}
+       fun rm_so: Int `{ return self->rm_so; `}
 
        # The offset in string of the end of the substring
-       fun rm_eo: Int `{ return recv->rm_eo; `}
+       fun rm_eo: Int `{ return self->rm_eo; `}
 
        # Get a pointer to the element at `index`, can also be used as a subarray
-       fun [](index: Int): NativeMatchArray `{ return recv + index; `}
+       fun [](index: Int): NativeMatchArray `{ return self + index; `}
 end
 
 redef extern class NativeString
-       private fun substring_from(index: Int): NativeString `{ return recv + index; `}
+       private fun substring_from(index: Int): NativeString `{ return self + index; `}
 end
 
 redef class Text
index 5ac6ee2..902649a 100644 (file)
@@ -74,7 +74,7 @@ end
 private class Concat
        super RopeString
 
-       redef var length: Int is noinit
+       redef var length is noinit
 
        redef fun substrings do return new RopeSubstrings(self)
 
@@ -159,7 +159,6 @@ private class Concat
        end
 
        redef fun copy_to_native(dest, n, src_offset, dest_offset) do
-               var remlen = n
                var subs = new RopeSubstrings.from(self, src_offset)
                var st = src_offset - subs.pos
                var off = dest_offset
@@ -827,7 +826,7 @@ class RopeBufferIter
        # Maximum position iterable.
        var maxpos: Int
 
-       redef var index: Int
+       redef var index
 
        # Init the iterator from a RopeBuffer.
        init(t: RopeBuffer) is old_style_init do
@@ -877,7 +876,7 @@ class RopeBufferReviter
        # Current position in `ns`.
        var pns: Int
 
-       redef var index: Int
+       redef var index
 
        # Init the iterator from a RopeBuffer.
        init(tgt: RopeBuffer) is old_style_init do
index 7c4e606..b901596 100644 (file)
@@ -13,6 +13,7 @@ module stream
 
 intrude import ropes
 import error
+intrude import bytes
 
 in "C" `{
        #include <unistd.h>
@@ -48,19 +49,23 @@ abstract class Reader
        # Reads a byte. Returns `null` on EOF or timeout
        fun read_byte: nullable Int is abstract
 
+       # Reads a String of at most `i` length
+       fun read(i: Int): String do return read_bytes(i).to_s
+
        # Read at most i bytes
-       fun read(i: Int): String
+       fun read_bytes(i: Int): Bytes
        do
-               if last_error != null then return ""
-               var s = new FlatBuffer.with_capacity(i)
+               if last_error != null then return new Bytes.empty
+               var s = new NativeString(i)
+               var buf = new Bytes(s, 0, 0)
                while i > 0 and not eof do
-                       var c = read_char
+                       var c = read_byte
                        if c != null then
-                               s.add(c)
+                               buf.add c
                                i -= 1
                        end
                end
-               return s.to_s
+               return buf
        end
 
        # Read a string until the end of the line.
@@ -154,22 +159,27 @@ abstract class Reader
 
        # Read all the stream until the eof.
        #
-       # The content of the file is returned verbatim.
+       # The content of the file is returned as a String.
        #
        # ~~~
        # var txt = "Hello\n\nWorld\n"
        # var i = new StringReader(txt)
        # assert i.read_all == txt
        # ~~~
-       fun read_all: String
+       fun read_all: String do return read_all_bytes.to_s
+
+       # Read all the stream until the eof.
+       #
+       # The content of the file is returned verbatim.
+       fun read_all_bytes: Bytes
        do
-               if last_error != null then return ""
-               var s = new FlatBuffer
+               if last_error != null then return new Bytes.empty
+               var s = new Bytes.empty
                while not eof do
-                       var c = read_char
+                       var c = read_byte
                        if c != null then s.add(c)
                end
-               return s.to_s
+               return s
        end
 
        # Read a string until the end of the line and append it to `s`.
@@ -342,6 +352,10 @@ end
 # A `Stream` that can be written to
 abstract class Writer
        super Stream
+
+       # Writes bytes from `s`
+       fun write_bytes(s: Bytes) is abstract
+
        # write a string
        fun write(s: Text) is abstract
 
@@ -365,7 +379,7 @@ interface Writable
 
        # Like `write_to` but return a new String (may be quite large)
        #
-       # This funtionnality is anectodical, since the point
+       # This funtionality is anectodical, since the point
        # of streamable object to to be efficienlty written to a
        # stream without having to allocate and concatenate strings
        fun write_to_string: String
@@ -408,66 +422,87 @@ abstract class BufferedReader
                return c
        end
 
-       # Peeks up to `n` bytes in the buffer, returns an empty string on EOF
+       fun buffer_reset do
+               _buffer_length = 0
+               _buffer_pos = 0
+       end
+
+       # Peeks up to `n` bytes in the buffer
        #
        # The operation does not consume the buffer
        #
        # ~~~nitish
-       #       var x = new FileReader("File.txt")
-       #       assert x.peek(5) == x.read(5)
+       # var x = new FileReader.open("File.txt")
+       # assert x.peek(5) == x.read(5)
        # ~~~
-       fun peek(i: Int): String do
-               if eof then return ""
-               var b = new FlatBuffer.with_capacity(i)
-               while i > 0 and not eof do
-                       b.add _buffer[_buffer_pos]
-                       _buffer_pos += 1
-                       i -= 1
+       fun peek(i: Int): Bytes do
+               if eof then return new Bytes.empty
+               var remsp = _buffer_length - _buffer_pos
+               if i <= remsp then
+                       var bf = new Bytes.with_capacity(i)
+                       bf.append_ns_from(_buffer, i, _buffer_pos)
+                       return bf
                end
-               var nbuflen = b.length + (_buffer.length - _buffer_pos)
-               var nbuf = new FlatBuffer.with_capacity(nbuflen)
-               nbuf.append(b)
-               while _buffer_pos < _buffer.length do
-                       nbuf.add(_buffer[_buffer_pos])
-                       _buffer_pos += 1
+               var bf = new Bytes.with_capacity(i)
+               bf.append_ns_from(_buffer, remsp, _buffer_pos)
+               _buffer_pos = _buffer_length
+               read_intern(i - bf.length, bf)
+               remsp = _buffer_length - _buffer_pos
+               var full_len = bf.length + remsp
+               if full_len > _buffer_capacity then
+                       var c = _buffer_capacity
+                       while c < full_len do c = c * 2 + 2
+                       _buffer_capacity = c
                end
+               var nns = new NativeString(_buffer_capacity)
+               bf.items.copy_to(nns, bf.length, 0, 0)
+               _buffer.copy_to(nns, remsp, _buffer_pos, bf.length)
+               _buffer = nns
                _buffer_pos = 0
-               _buffer = nbuf
-               return b.to_s
+               _buffer_length = full_len
+               return bf
        end
 
-       redef fun read(i)
+       redef fun read_bytes(i)
        do
-               if last_error != null then return ""
-               if eof then return ""
+               if last_error != null then return new Bytes.empty
+               var buf = new Bytes.with_capacity(i)
+               read_intern(i, buf)
+               return buf
+       end
+
+       # Fills `buf` with at most `i` bytes read from `self`
+       private fun read_intern(i: Int, buf: Bytes): Int do
+               if eof then return 0
                var p = _buffer_pos
-               var bufsp = _buffer.length - p
+               var bufsp = _buffer_length - p
                if bufsp >= i then
                        _buffer_pos += i
-                       return _buffer.substring(p, i).to_s
+                       buf.append_ns_from(_buffer, i, p)
+                       return i
                end
-               _buffer_pos = _buffer.length
-               var readln = _buffer.length - p
-               var s = _buffer.substring(p, readln).to_s
-               fill_buffer
-               return s + read(i - readln)
+               _buffer_pos = _buffer_length
+               var readln = _buffer_length - p
+               buf.append_ns_from(_buffer, readln, p)
+               var rd = read_intern(i - readln, buf)
+               return rd + readln
        end
 
-       redef fun read_all
+       redef fun read_all_bytes
        do
-               if last_error != null then return ""
-               var s = new FlatBuffer
+               if last_error != null then return new Bytes.empty
+               var s = new Bytes.with_capacity(10)
                while not eof do
                        var j = _buffer_pos
-                       var k = _buffer.length
+                       var k = _buffer_length
                        while j < k do
-                               s.add(_buffer[j])
+                               s.add(_buffer[j].ascii)
                                j += 1
                        end
                        _buffer_pos = j
                        fill_buffer
                end
-               return s.to_s
+               return s
        end
 
        redef fun append_line_to(s)
@@ -475,10 +510,12 @@ abstract class BufferedReader
                loop
                        # First phase: look for a '\n'
                        var i = _buffer_pos
-                       while i < _buffer.length and _buffer[i] != '\n' do i += 1
+                       while i < _buffer_length and _buffer[i] != '\n' do
+                               i += 1
+                       end
 
                        var eol
-                       if i < _buffer.length then
+                       if i < _buffer_length then
                                assert _buffer[i] == '\n'
                                i += 1
                                eol = true
@@ -516,29 +553,37 @@ abstract class BufferedReader
 
        redef fun eof
        do
-               if _buffer_pos < _buffer.length then return false
+               if _buffer_pos < _buffer_length then return false
                if end_reached then return true
                fill_buffer
-               return _buffer_pos >= _buffer.length and end_reached
+               return _buffer_pos >= _buffer_length and end_reached
        end
 
        # The buffer
-       private var buffer: nullable FlatBuffer = null
+       private var buffer: NativeString = new NativeString(0)
 
        # The current position in the buffer
-       private var buffer_pos: Int = 0
+       private var buffer_pos = 0
+
+       # Length of the current buffer (i.e. nuber of bytes in the buffer)
+       private var buffer_length = 0
+
+       # Capacity of the buffer
+       private var buffer_capacity = 0
 
        # Fill the buffer
        protected fun fill_buffer is abstract
 
-       # Is the last fill_buffer reach the end
+       # Has the last fill_buffer reached the end
        protected fun end_reached: Bool is abstract
 
        # Allocate a `_buffer` for a given `capacity`.
        protected fun prepare_buffer(capacity: Int)
        do
-               _buffer = new FlatBuffer.with_capacity(capacity)
+               _buffer = new NativeString(capacity)
                _buffer_pos = 0 # need to read
+               _buffer_length = 0
+               _buffer_capacity = capacity
        end
 end
 
@@ -557,6 +602,11 @@ class StringWriter
        private var content = new Array[String]
        redef fun to_s do return content.to_s
        redef fun is_writable do return not closed
+
+       redef fun write_bytes(b) do
+               content.add(b.to_s)
+       end
+
        redef fun write(str)
        do
                assert not closed
@@ -607,11 +657,11 @@ class StringReader
                source = ""
        end
 
-       redef fun read_all do
-               var c = cursor
-               cursor = source.length
-               if c == 0 then return source
-               return source.substring_from(c)
+       redef fun read_all_bytes do
+               var nslen = source.length - cursor
+               var nns = new NativeString(nslen)
+               source.copy_to_native(nns, nslen, cursor, 0)
+               return new Bytes(nns, nslen, nslen)
        end
 
        redef fun eof do return cursor >= source.length
index 2344659..95aa984 100644 (file)
@@ -127,7 +127,7 @@ abstract class Text
        end
 
        # Return a null terminated char *
-       fun to_cstring: NativeString do return flatten.to_cstring
+       fun to_cstring: NativeString is abstract
 
        # The index of the last occurrence of an element starting from pos (in reverse order).
        #
@@ -249,6 +249,16 @@ abstract class Text
        #     assert "ff".to_hex == 255
        fun to_hex: Int do return a_to(16)
 
+       # If `self` contains only digits <= '7', return the corresponding integer.
+       #
+       #     assert "714".to_oct == 460
+       fun to_oct: Int do return a_to(8)
+
+       # If `self` contains only '0' et '1', return the corresponding integer.
+       #
+       #     assert "101101".to_bin == 45
+       fun to_bin: Int do return a_to(2)
+
        # If `self` contains only digits and letters, return the corresponding integer in a given base
        #
        #     assert "120".a_to(3)     == 15
@@ -485,7 +495,7 @@ abstract class Text
        fun to_cmangle: String
        do
                if is_empty then return ""
-               var res = new FlatBuffer
+               var res = new Buffer
                var underscore = false
                var start = 0
                var c = chars[0]
@@ -541,7 +551,7 @@ abstract class Text
        # The exceptions are the common `\t` and `\n`.
        fun escape_to_c: String
        do
-               var b = new FlatBuffer
+               var b = new Buffer
                for i in [0..length[ do
                        var c = chars[i]
                        if c == '\n' then
@@ -581,7 +591,7 @@ abstract class Text
        #     assert "ab|\{\}".escape_more_to_c("|\{\}") == "ab\\|\\\{\\\}"
        fun escape_more_to_c(chars: String): String
        do
-               var b = new FlatBuffer
+               var b = new Buffer
                for c in escape_to_c.chars do
                        if chars.chars.has(c) then
                                b.add('\\')
@@ -602,7 +612,7 @@ abstract class Text
        #
        #     assert "\n\"'\\\{\}0".escape_to_sh == "'\n\"'\\''\\\{\}0'"
        fun escape_to_sh: String do
-               var b = new FlatBuffer
+               var b = new Buffer
                b.chars.add '\''
                for i in [0..length[ do
                        var c = chars[i]
@@ -623,7 +633,7 @@ abstract class Text
        # These characters are `;`, `|`, `\`, and the non-printable ones.
        # They will be rendered as `"?{hex}"`.
        fun escape_to_mk: String do
-               var b = new FlatBuffer
+               var b = new Buffer
                for i in [0..length[ do
                        var c = chars[i]
                        if c == '$' then
@@ -649,7 +659,7 @@ abstract class Text
        #     assert u.chars[0].ascii      ==  10 # (the ASCII value of the "new line" character)
        fun unescape_nit: String
        do
-               var res = new FlatBuffer.with_capacity(self.length)
+               var res = new Buffer.with_cap(self.length)
                var was_slash = false
                for i in [0..length[ do
                        var c = chars[i]
@@ -684,7 +694,7 @@ abstract class Text
        #     assert ".com/post?e=asdf&f=123".to_percent_encoding == ".com%2fpost%3fe%3dasdf%26f%3d123"
        fun to_percent_encoding: String
        do
-               var buf = new FlatBuffer
+               var buf = new Buffer
 
                for i in [0..length[ do
                        var c = chars[i]
@@ -713,7 +723,7 @@ abstract class Text
        #     assert "invalid % usage".from_percent_encoding == "invalid ? usage"
        fun from_percent_encoding: String
        do
-               var buf = new FlatBuffer
+               var buf = new Buffer
 
                var i = 0
                while i < length do
@@ -750,7 +760,7 @@ abstract class Text
        # SEE: <https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content>
        fun html_escape: String
        do
-               var buf = new FlatBuffer
+               var buf = new Buffer
 
                for i in [0..length[ do
                        var c = chars[i]
@@ -828,9 +838,6 @@ abstract class Text
                return escape_more_to_c("|\{\}<>")
        end
 
-       # Flat representation of self
-       fun flatten: FlatText is abstract
-
        private var hash_cache: nullable Int = null
 
        redef fun hash
@@ -888,8 +895,8 @@ abstract class Text
        #
        # REQUIRE: `n` must be large enough to contain `len` bytes
        #
-       #       var ns = new NativeString(8)
-       #       "Text is String".copy_to_native(ns, 8, 2, 0)
+       #       var ns = new NativeString(8)
+       #       "Text is String".copy_to_native(ns, 8, 2, 0)
        #       assert ns.to_s_with_length(8) == "xt is St"
        #
        fun copy_to_native(dest: NativeString, n, src_offset, dest_offset: Int) do
@@ -935,7 +942,7 @@ abstract class FlatText
        # copy locally the char* as Nit Strings are immutable.
        private fun fast_cstring: NativeString is abstract
 
-       redef var length: Int = 0
+       redef var length = 0
 
        redef fun output
        do
@@ -946,8 +953,6 @@ abstract class FlatText
                end
        end
 
-       redef fun flatten do return self
-
        redef fun copy_to_native(dest, n, src_offset, dest_offset) do
                items.copy_to(dest, n, src_offset, dest_offset)
        end
@@ -1055,7 +1060,7 @@ abstract class String
        do
                if self.is_lower then return self
 
-               var new_str = new FlatBuffer.with_capacity(self.length)
+               var new_str = new Buffer.with_cap(self.length)
                var prev_is_lower = false
                var prev_is_upper = false
 
@@ -1103,7 +1108,7 @@ abstract class String
        do
                if self.is_upper then return self
 
-               var new_str = new FlatBuffer
+               var new_str = new Buffer
                var is_first_char = true
                var follows_us = false
 
@@ -1138,7 +1143,7 @@ abstract class String
        fun capitalized: SELFTYPE do
                if length == 0 then return self
 
-               var buf = new FlatBuffer.with_capacity(length)
+               var buf = new Buffer.with_cap(length)
 
                var curr = chars[0].to_upper
                var prev = curr
@@ -1184,7 +1189,7 @@ class FlatString
        # Indes in _items of the last item of the string
        private var index_to: Int is noinit
 
-       redef var chars: SequenceRead[Char] = new FlatStringCharView(self) is lazy
+       redef var chars = new FlatStringCharView(self) is lazy
 
        redef fun [](index)
        do
@@ -1309,8 +1314,7 @@ class FlatString
                index_to = to
        end
 
-       redef fun to_cstring: NativeString
-       do
+       redef fun to_cstring do
                if real_items != null then
                        return real_items.as(not null)
                else
@@ -1537,6 +1541,12 @@ end
 abstract class Buffer
        super Text
 
+       # New `Buffer` factory, will return a concrete `Buffer` type with default capacity
+       new do return new FlatBuffer
+
+       # New `Buffer` factory, returns a concrete `Buffer` with a capacity of `i`
+       new with_cap(i: Int) do return new FlatBuffer.with_capacity(i)
+
        redef type SELFTYPE: Buffer is fixed
 
        # Specific implementations MUST set this to `true` in order to invalidate caches
@@ -1562,7 +1572,7 @@ abstract class Buffer
 
        # Clears the buffer
        #
-       #     var b = new FlatBuffer
+       #     var b = new Buffer
        #     b.append "hello"
        #     assert not b.is_empty
        #     b.clear
@@ -1574,7 +1584,7 @@ abstract class Buffer
 
        # Adds the content of text `s` at the end of self
        #
-       #     var b = new FlatBuffer
+       #     var b = new Buffer
        #     b.append "hello"
        #     b.append "world"
        #     assert b == "helloworld"
@@ -1582,7 +1592,7 @@ abstract class Buffer
 
        # `self` is appended in such a way that `self` is repeated `r` times
        #
-       #     var b = new FlatBuffer
+       #     var b = new Buffer
        #     b.append "hello"
        #     b.times 3
        #     assert b == "hellohellohello"
@@ -1590,7 +1600,7 @@ abstract class Buffer
 
        # Reverses itself in-place
        #
-       #     var b = new FlatBuffer
+       #     var b = new Buffer
        #     b.append("hello")
        #     b.reverse
        #     assert b == "olleh"
@@ -1598,7 +1608,7 @@ abstract class Buffer
 
        # Changes each lower-case char in `self` by its upper-case variant
        #
-       #     var b = new FlatBuffer
+       #     var b = new Buffer
        #     b.append("Hello World!")
        #     b.upper
        #     assert b == "HELLO WORLD!"
@@ -1606,7 +1616,7 @@ abstract class Buffer
 
        # Changes each upper-case char in `self` by its lower-case variant
        #
-       #     var b = new FlatBuffer
+       #     var b = new Buffer
        #     b.append("Hello World!")
        #     b.lower
        #     assert b == "hello world!"
@@ -1712,7 +1722,7 @@ class FlatBuffer
                length = 0
        end
 
-       redef fun empty do return new FlatBuffer
+       redef fun empty do return new Buffer
 
        redef fun enlarge(cap)
        do
@@ -1728,8 +1738,7 @@ class FlatBuffer
                capacity = c
        end
 
-       redef fun to_s: String
-       do
+       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)
@@ -1837,7 +1846,7 @@ class FlatBuffer
                        var r = new FlatBuffer.with_infos(r_items, len, len)
                        return r
                else
-                       return new FlatBuffer
+                       return new Buffer
                end
        end
 
@@ -2027,6 +2036,26 @@ redef class Bool
        end
 end
 
+redef class Byte
+       # C function to calculate the length of the `NativeString` to receive `self`
+       private fun byte_to_s_len: Int is extern "native_byte_length_str"
+
+       # C function to convert an nit Int to a NativeString (char*)
+       private fun native_byte_to_s(nstr: NativeString, strlen: Int) is extern "native_byte_to_s"
+
+       # Displayable byte in its hexadecimal form (0x..)
+       #
+       #     assert 1.to_b.to_s       == "0x01"
+       #     assert (-123).to_b.to_s  == "0x85"
+       redef fun to_s do
+               var nslen = byte_to_s_len
+               var ns = new NativeString(nslen + 1)
+               ns[nslen] = '\0'
+               native_byte_to_s(ns, nslen + 1)
+               return ns.to_s_with_length(nslen)
+       end
+end
+
 redef class Int
 
        # Wrapper of strerror C function
@@ -2176,7 +2205,7 @@ redef class Char
        #     assert 'x'.to_s    == "x"
        redef fun to_s
        do
-               var s = new FlatBuffer.with_capacity(1)
+               var s = new Buffer.with_cap(1)
                s.chars[0] = self
                return s.to_s
        end
@@ -2220,7 +2249,13 @@ redef class Collection[E]
        # Concatenate elements.
        redef fun to_s
        do
-               var s = new FlatBuffer
+               return plain_to_s
+       end
+
+       # Concatenate element without separators
+       fun plain_to_s: String
+       do
+               var s = new Buffer
                for e in self do if e != null then s.append(e.to_s)
                return s.to_s
        end
@@ -2233,7 +2268,7 @@ redef class Collection[E]
        do
                if is_empty then return ""
 
-               var s = new FlatBuffer # Result
+               var s = new Buffer # Result
 
                # Concat first item
                var i = iterator
@@ -2255,7 +2290,7 @@ end
 redef class Array[E]
 
        # Fast implementation
-       redef fun to_s
+       redef fun plain_to_s
        do
                var l = length
                if l == 0 then return ""
@@ -2356,7 +2391,7 @@ redef class Map[K,V]
        do
                if is_empty then return ""
 
-               var s = new FlatBuffer # Result
+               var s = new Buffer # Result
 
                # Concat first item
                var i = iterator
@@ -2442,7 +2477,7 @@ extern class NativeString `{ char* `}
 end
 
 redef class Sys
-       private var args_cache: nullable Sequence[String]
+       private var args_cache: nullable Sequence[String] = null
 
        # The arguments of the program as given by the OS
        fun program_args: Sequence[String]
index 686d6be..050ab95 100644 (file)
@@ -20,3 +20,13 @@ long native_int_length_str(long recv){
 void native_int_to_s(long recv, char* str, long buflen){
        snprintf(str, buflen, "%ld", recv);
 }
+
+// Returns the length of `recv` as a `char*` (excluding the null character)
+long native_byte_length_str(unsigned char recv){
+       return snprintf(NULL, 0, "0x%02x", recv);
+}
+
+// Byte to NativeString method
+void native_byte_to_s(unsigned char recv, char* str, long buflen){
+       snprintf(str, buflen, "0x%02x", recv);
+}
index f33580f..c1c7818 100644 (file)
@@ -15,5 +15,7 @@
 
 long native_int_length_str(long recv);
 void native_int_to_s(long recv, char* str, long buflen);
+long native_byte_length_str(unsigned char recv);
+void native_byte_to_s(unsigned char recv, char* str, long buflen);
 
 #endif
index e0b3867..99a9f35 100644 (file)
@@ -41,20 +41,20 @@ extern class TimeT `{time_t`}
        new from_i(i: Int) `{ return i; `}
 
        # Update current time.
-       fun update `{ time(&recv); `}
+       fun update `{ time(&self); `}
 
        # Convert `self` to a human readable String.
        fun ctime: String import NativeString.to_s_with_copy `{
-               return NativeString_to_s_with_copy( ctime(&recv) );
+               return NativeString_to_s_with_copy( ctime(&self) );
        `}
 
        # Difference in secondes from start (self if the end time)
-       fun difftime(start: TimeT): Float `{ return difftime(recv, start); `}
+       fun difftime(start: TimeT): Float `{ return difftime(self, start); `}
 
        redef fun to_s do return ctime.replace("\n", "")
 
        # Convert self to Int (expressed as seconds since epoch).
-       fun to_i: Int `{ return (int)recv; `}
+       fun to_i: Int `{ return (int)self; `}
 end
 
 # Time structure
@@ -91,38 +91,38 @@ extern class Tm `{struct tm *`}
        `}
 
        # Convert `self` as a TimeT.
-       fun to_timet: TimeT `{ return mktime(recv); `}
+       fun to_timet: TimeT `{ return mktime(self); `}
 
        # Seconds after the minute.
-       fun sec: Int `{ return recv->tm_sec; `}
+       fun sec: Int `{ return self->tm_sec; `}
 
        # Minutes after the hour.
-       fun min: Int `{ return recv->tm_min; `}
+       fun min: Int `{ return self->tm_min; `}
 
        # hours since midnight.
-       fun hour: Int `{ return recv->tm_hour; `}
+       fun hour: Int `{ return self->tm_hour; `}
 
        # Day of the month.
-       fun mday: Int `{ return recv->tm_mday; `}
+       fun mday: Int `{ return self->tm_mday; `}
 
        # Months since January.
-       fun mon: Int `{ return recv->tm_mon; `}
+       fun mon: Int `{ return self->tm_mon; `}
 
        # Years since 1900.
-       fun year: Int `{ return recv->tm_year; `}
+       fun year: Int `{ return self->tm_year; `}
 
        # Days since Sunday.
-       fun wday: Int `{ return recv->tm_wday; `}
+       fun wday: Int `{ return self->tm_wday; `}
 
        # Days since January 1st.
-       fun yday: Int `{ return recv->tm_yday; `}
+       fun yday: Int `{ return self->tm_yday; `}
 
        # Is `self` in Daylight Saving Time.
-       fun is_dst: Bool `{ return recv->tm_isdst; `}
+       fun is_dst: Bool `{ return self->tm_isdst; `}
 
        # Convert `self` to a human readable String.
        fun asctime: String import NativeString.to_s_with_copy `{
-               return NativeString_to_s_with_copy( asctime(recv) );
+               return NativeString_to_s_with_copy( asctime(self) );
        `}
 
        # Convert `self` to a human readable String corresponding to `format`.
@@ -134,7 +134,7 @@ extern class Tm `{struct tm *`}
                buf = (char*)malloc(100);
                c_format = String_to_cstring(format);
 
-               res = strftime(buf, 100, c_format, recv);
+               res = strftime(buf, 100, c_format, self);
                String s = NativeString_to_s_with_copy(buf);
                free(buf);
                return s;
index ec66af6..b3a2450 100644 (file)
@@ -57,8 +57,8 @@ extern class UTF8Char `{ UTF8Char* `}
        #  4       | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
        # ~~~
        private fun len: Int `{
-               char* ns = recv->ns;
-               int pos = recv->pos;
+               char* ns = self->ns;
+               int pos = self->pos;
                char nspos = ns[pos];
                if((nspos & 0x80) == 0x00){ return 1;}
                if((nspos & 0xE0) == 0xC0){ return 2;}
@@ -70,34 +70,34 @@ extern class UTF8Char `{ UTF8Char* `}
 
        # Position in containing NativeString
        private fun pos: Int `{
-               return recv->pos;
+               return self->pos;
        `}
 
-       private fun pos=(p: Int) `{recv->pos = p;`}
+       private fun pos=(p: Int) `{self->pos = p;`}
 
        # C char* wrapping the char
        fun ns: NativeString `{
-               return recv->ns;
+               return self->ns;
        `}
 
        # Returns the Unicode code point representing the character
        #
        # Note : A unicode character might not be a visible glyph, but it will be used to determine canonical equivalence
        fun code_point: Int import UTF8Char.len `{
-               switch(UTF8Char_len(recv)){
+               switch(UTF8Char_len(self)){
                        case 1:
-                               return (long)(0x7F & (unsigned char)recv->ns[recv->pos]);
+                               return (long)(0x7F & (unsigned char)self->ns[self->pos]);
                        case 2:
-                               return 0 | ((0x1F & (unsigned char)recv->ns[recv->pos]) << 6) | (0x3F & (unsigned char)recv->ns[recv->pos+1]);
+                               return 0 | ((0x1F & (unsigned char)self->ns[self->pos]) << 6) | (0x3F & (unsigned char)self->ns[self->pos+1]);
                        case 3:
-                               return 0 | ((0x0F & (unsigned char)recv->ns[recv->pos]) << 12) |
-                               ((0x3F & (unsigned char)recv->ns[recv->pos+1]) << 6) |
-                               (0x3F & (unsigned char)recv->ns[recv->pos+2]);
+                               return 0 | ((0x0F & (unsigned char)self->ns[self->pos]) << 12) |
+                               ((0x3F & (unsigned char)self->ns[self->pos+1]) << 6) |
+                               (0x3F & (unsigned char)self->ns[self->pos+2]);
                        case 4:
-                               return 0 | ((0x07 & (unsigned char)recv->ns[recv->pos]) << 18) |
-                               ((0x3F & (unsigned char)recv->ns[recv->pos+1]) << 12) |
-                               ((0x3F & (unsigned char)recv->ns[recv->pos+2]) << 6) |
-                               (0x3F & (unsigned char)recv->ns[recv->pos+3]);
+                               return 0 | ((0x07 & (unsigned char)self->ns[self->pos]) << 18) |
+                               ((0x3F & (unsigned char)self->ns[self->pos+1]) << 12) |
+                               ((0x3F & (unsigned char)self->ns[self->pos+2]) << 6) |
+                               (0x3F & (unsigned char)self->ns[self->pos+3]);
                }
        `}
 
@@ -106,11 +106,11 @@ extern class UTF8Char `{ UTF8Char* `}
        # NOTE : Works only on ASCII chars
        # TODO : Support unicode for to_upper
        fun to_upper: UTF8Char import UTF8Char.code_point `{
-               int cp = UTF8Char_code_point(recv);
-               if(cp < 97 || cp > 122){ return recv; }
+               int cp = UTF8Char_code_point(self);
+               if(cp < 97 || cp > 122){ return self; }
                char* ns = malloc(2);
                ns[1] = '\0';
-               char c = recv->ns[recv->pos];
+               char c = self->ns[self->pos];
                ns[0] = c - 32;
                UTF8Char* ret = malloc(sizeof(UTF8Char));
                ret->ns = ns;
@@ -123,11 +123,11 @@ extern class UTF8Char `{ UTF8Char* `}
        # NOTE : Works only on ASCII chars
        # TODO : Support unicode for to_upper
        fun to_lower: UTF8Char import UTF8Char.code_point `{
-               int cp = UTF8Char_code_point(recv);
-               if(cp < 65 || cp > 90){ return recv; }
+               int cp = UTF8Char_code_point(self);
+               if(cp < 65 || cp > 90){ return self; }
                char* ns = malloc(2);
                ns[1] = '\0';
-               char c = recv->ns[recv->pos];
+               char c = self->ns[self->pos];
                ns[0] = c + 32;
                UTF8Char* ret = malloc(sizeof(UTF8Char));
                ret->ns = ns;
@@ -148,27 +148,27 @@ extern class UTF8Char `{ UTF8Char* `}
        end
 
        redef fun output import UTF8Char.code_point `{
-               switch(UTF8Char_len(recv)){
+               switch(UTF8Char_len(self)){
                        case 1:
-                               printf("%c", recv->ns[recv->pos]);
+                               printf("%c", self->ns[self->pos]);
                                break;
                        case 2:
-                               printf("%c%c", recv->ns[recv->pos], recv->ns[recv->pos + 1]);
+                               printf("%c%c", self->ns[self->pos], self->ns[self->pos + 1]);
                                break;
                        case 3:
-                               printf("%c%c%c", recv->ns[recv->pos], recv->ns[recv->pos + 1], recv->ns[recv->pos + 2]);
+                               printf("%c%c%c", self->ns[self->pos], self->ns[self->pos + 1], self->ns[self->pos + 2]);
                                break;
                        case 4:
-                               printf("%c%c%c%c", recv->ns[recv->pos], recv->ns[recv->pos + 1], recv->ns[recv->pos + 2], recv->ns[recv->pos + 3]);
+                               printf("%c%c%c%c", self->ns[self->pos], self->ns[self->pos + 1], self->ns[self->pos + 2], self->ns[self->pos + 3]);
                                break;
                }
        `}
 
        redef fun to_s import NativeString.to_s_with_length `{
-               int len = utf8___UTF8Char_len___impl(recv);
+               int len = utf8___UTF8Char_len___impl(self);
                char* r = malloc(len + 1);
                r[len] = '\0';
-               char* src = (recv->ns + recv->pos);
+               char* src = (self->ns + self->pos);
                memcpy(r, src, len);
                return NativeString_to_s_with_length(r, len);
        `}
@@ -182,14 +182,14 @@ private extern class StringIndex `{ UTF8Char* `}
        new(size: Int) `{ return malloc(size*sizeof(UTF8Char)); `}
 
        # Sets the character at `index` as `item`
-       fun []=(index: Int, item: UTF8Char) `{ recv[index] = *item; `}
+       fun []=(index: Int, item: UTF8Char) `{ self[index] = *item; `}
 
        # Gets the character at position `id`
-       fun [](id: Int): UTF8Char `{ return &recv[id]; `}
+       fun [](id: Int): UTF8Char `{ return &self[id]; `}
 
        # Copies a part of self starting at index `my_from` of length `length` into `other`, starting at `its_from`
        fun copy_to(other: StringIndex, my_from: Int, its_from: Int, length: Int)`{
-               UTF8Char* myfrom = recv + my_from*(sizeof(UTF8Char));
+               UTF8Char* myfrom = self + my_from*(sizeof(UTF8Char));
                UTF8Char* itsfrom = other + its_from*(sizeof(UTF8Char));
                memcpy(itsfrom, myfrom, length);
        `}
@@ -380,7 +380,7 @@ redef class NativeString
                while(pos < length){
                        UTF8Char* curr = &index[index_pos];
                        curr->pos = pos;
-                       curr->ns = recv;
+                       curr->ns = self;
                        pos += UTF8Char_len(curr);
                        index_pos ++;
                }
@@ -394,7 +394,7 @@ redef class NativeString
                return to_s_with_length(len)
        end
 
-       redef fun to_s_with_length(len: Int): FlatString
+       redef fun to_s_with_length(len)
        do
                var real_len = new Container[Int](0)
                var x = make_index(len, real_len)
index 2875a8b..8756838 100644 (file)
@@ -63,7 +63,7 @@ extern class UnicodeChar `{ uint32_t* `}
        #  4       | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
        # ~~~
        fun len: Int `{
-               uint32_t s = *recv;
+               uint32_t s = *self;
                if(s <= 127) {return 1;}
                if(s >= 49280 && s <= 57279) {return 2;}
                if(s >= 14712960 && s <= 15712191) {return 3;}
@@ -76,11 +76,11 @@ extern class UnicodeChar `{ uint32_t* `}
        #
        # Note : A unicode character might not be a visible glyph, but it will be used to determine canonical equivalence
        fun code_point: Int import UnicodeChar.len `{
-               uint32_t val = *recv;
+               uint32_t val = *self;
                uint32_t ret = 0;
-               switch(UnicodeChar_len(recv)){
+               switch(UnicodeChar_len(self)){
                        case 1:
-                               ret = *recv;
+                               ret = *self;
                                break;
                        case 2:
                                ret = 0 | ((val & 0x00001F00) >> 2) | (val & 0x0000003F);
@@ -106,9 +106,9 @@ extern class UnicodeChar `{ uint32_t* `}
        # NOTE : Works only on ASCII chars
        # TODO : Support unicode for to_upper
        fun to_upper: UnicodeChar import UnicodeChar.code_point `{
-               if(*recv < 97 || *recv > 122){ return recv; }
+               if(*self < 97 || *self > 122){ return self; }
                uint32_t* ret = calloc(1,4);
-               *ret = *recv - 32;
+               *ret = *self - 32;
                return ret;
        `}
 
@@ -117,9 +117,9 @@ extern class UnicodeChar `{ uint32_t* `}
        # NOTE : Works only on ASCII chars
        # TODO : Support unicode for to_upper
        fun to_lower: UnicodeChar import UnicodeChar.code_point `{
-               if(*recv < 65 || *recv > 90){ return recv; }
+               if(*self < 65 || *self > 90){ return self; }
                uint32_t* ret = calloc(1,4);
-               *ret = *recv + 32;
+               *ret = *self + 32;
                return ret;
        `}
 
@@ -131,13 +131,13 @@ extern class UnicodeChar `{ uint32_t* `}
        end
 
        redef fun output import UnicodeChar.len `{
-               uint32_t self = *recv;
+               uint32_t self0 = *self;
                if(!IS_BIG_ENDIAN){
-                       uint32_t tmp = ntohl(self);
-                       memcpy(&self, &tmp, 4);
+                       uint32_t tmp = ntohl(self0);
+                       memcpy(&self0, &tmp, 4);
                }
-               unsigned char* s = (unsigned char*) &self;
-               switch(UnicodeChar_len(recv)){
+               unsigned char* s = (unsigned char*) &self0;
+               switch(UnicodeChar_len(self0)){
                        case 1:
                                printf("%c", s[3]);
                                break;
@@ -154,10 +154,10 @@ extern class UnicodeChar `{ uint32_t* `}
        `}
 
        redef fun to_s: FlatString import FlatString.full, UnicodeChar.len `{
-               int len = UnicodeChar_len(recv);
+               int len = UnicodeChar_len(self);
                char* r = malloc(len + 1);
                r[len] = '\0';
-               uint32_t src = *recv;
+               uint32_t src = *self;
                if(!IS_BIG_ENDIAN){
                        uint32_t tmp = htonl(src);
                        memcpy(&src, &tmp, 4);
@@ -271,7 +271,7 @@ redef class FlatString
        redef type OTHER: FlatString
 
        # Length in bytes of the string (e.g. the length of the C string)
-       redef var bytelen: Int
+       redef var bytelen
 
        # Cache for the last accessed character in the char
        var cache = new CharCache(-1,-1)
@@ -289,9 +289,9 @@ redef class FlatString
 
        # Length implementation
        private fun length_l: Int import FlatString.items, FlatString.index_to, FlatString.index_from `{
-               char* ns = FlatString_items(recv);
-               int i = FlatString_index_from(recv);
-               int max = FlatString_index_to(recv);
+               char* ns = FlatString_items(self);
+               int i = FlatString_index_from(self);
+               int max = FlatString_index_to(self);
                int length = 0;
                while(i <= max){
                        char c = ns[i];
@@ -475,7 +475,7 @@ redef class FlatString
        end
 
        # O(n)
-       redef fun substring(from: Int, count: Int) do
+       redef fun substring(from, count) do
                assert count >= 0
 
                if from < 0 then
@@ -518,7 +518,7 @@ end
 
 redef class FlatBuffer
 
-       redef var bytelen: Int
+       redef var bytelen
 
        redef init from(s) do
                if s isa Concat then
@@ -558,20 +558,20 @@ redef class FlatBuffer
 
        # Shifts the content of the buffer by `len` bytes to the right, starting at byte `from`
        fun rshift_bytes(from: Int, len: Int) import FlatBuffer.bytelen, FlatBuffer.bytelen=, FlatBuffer.items `{
-               long bt = FlatBuffer_bytelen(recv);
-               char* ns = FlatBuffer_items(recv);
+               long bt = FlatBuffer_bytelen(self);
+               char* ns = FlatBuffer_items(self);
                int off = from + len;
                memmove(ns + off, ns + from, bt - from);
-               FlatBuffer_bytelen__assign(recv, bt + len);
+               FlatBuffer_bytelen__assign(self, bt + len);
        `}
 
        # Shifts the content of the buffer by `len` bytes to the left, starting at `from`
        fun lshift_bytes(from: Int, len: Int) import FlatBuffer.bytelen, FlatBuffer.bytelen=, FlatBuffer.items `{
-               long bt = FlatBuffer_bytelen(recv);
-               char* ns = FlatBuffer_items(recv);
+               long bt = FlatBuffer_bytelen(self);
+               char* ns = FlatBuffer_items(self);
                int off = from - len;
                memmove(ns + off, ns + from, bt - from);
-               FlatBuffer_bytelen__assign(recv, bt - len);
+               FlatBuffer_bytelen__assign(self, bt - len);
        `}
 
        # Get the Unicode char stored at `index` in `self`
@@ -717,7 +717,7 @@ redef class NativeString
                return to_s_with_length(len)
        end
 
-       redef fun to_s_with_length(len: Int): FlatString
+       redef fun to_s_with_length(len)
        do
                return new FlatString.with_bytelen(self, 0, len - 1, len)
        end
index b67df17..fc37617 100644 (file)
@@ -200,7 +200,7 @@ class Template
        end
 
        # Do the full rendering and write the final content to a stream
-       redef fun write_to(stream: Writer)
+       redef fun write_to(stream)
        do
                assert not is_writing
                is_writing = true
index a22c5b2..6eac618 100644 (file)
@@ -23,6 +23,7 @@ import sha1
 import base64
 
 intrude import standard::stream
+intrude import standard::bytes
 
 # Websocket compatible listener
 #
@@ -65,8 +66,10 @@ class WebsocketConnection
        super TCPStream
 
        init do
-               _buffer = new FlatBuffer
+               _buffer = new NativeString(1024)
                _buffer_pos = 0
+               _buffer_capacity = 1024
+               _buffer_length = 0
                var headers = parse_handshake
                var resp = handshake_response(headers)
 
@@ -119,22 +122,28 @@ class WebsocketConnection
        end
 
        # Frames a text message to be sent to a client
-       private fun frame_message(msg: String): String
+       private fun frame_message(msg: String): Bytes
        do
-               var ans_buffer = new FlatBuffer
+               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.ascii)
+               ans_buffer.add(129)
                if msg.length < 126 then
-                       ans_buffer.add(msg.length.ascii)
+                       ans_buffer.add(msg.length)
                end
                if msg.length >= 126 and msg.length <= 65535 then
-                       ans_buffer.add(126.ascii)
-                       ans_buffer.add(msg.length.rshift(8).ascii)
-                       ans_buffer.add(msg.length.ascii)
+                       ans_buffer.add(126)
+                       ans_buffer.add(msg.length.rshift(8))
+                       ans_buffer.add(msg.length)
                end
-               ans_buffer.append(msg)
-               return ans_buffer.to_s
+               if msg isa FlatString then
+                       ans_buffer.append_ns_from(msg.items, msg.length, msg.index_from)
+               else
+                       for i in msg.substrings do
+                               ans_buffer.append_ns_from(i.as(FlatString).items, i.length, i.as(FlatString).index_from)
+                       end
+               end
+               return ans_buffer
        end
 
        # Reads an HTTP frame
@@ -149,6 +158,7 @@ class WebsocketConnection
        # Gets the message from the client, unpads it and reconstitutes the message
        private fun unpad_message do
                var fin = false
+               var bf = new Bytes.empty
                while not fin do
                        var fst_byte = client.read_byte
                        var snd_byte = client.read_byte
@@ -174,10 +184,10 @@ class WebsocketConnection
                        if fin_flag != 0 then fin = true
                        var opcode = fst_byte.bin_and(15)
                        if opcode == 9 then
-                               _buffer.add(138.ascii)
-                               _buffer.add('\0')
-                               client.write(_buffer.to_s)
-                               _buffer_pos += 2
+                               bf.add(138)
+                               bf.add(0)
+                               client.write(bf.to_s)
+                               _buffer_pos = _buffer_length
                                return
                        end
                        if opcode == 8 then
@@ -192,76 +202,68 @@ class WebsocketConnection
                        var len = snd_byte.bin_and(127)
                        var payload_ext_len = 0
                        if len == 126 then
-                               var tmp = client.read(2)
+                               var tmp = client.read_bytes(2)
                                if tmp.length != 2 then
                                        last_error = new IOError("Error: received interrupted frame")
                                        client.close
                                        return
                                end
-                               payload_ext_len = tmp[1].ascii + tmp[0].ascii.lshift(8)
+                               payload_ext_len = tmp[1] + tmp[0].lshift(8)
                        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(8)
+                               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].ascii
+                                       var i = tmp[pos]
                                        payload_ext_len += i.lshift(8 * (7 - pos))
                                end
                        end
                        if mask_flag != 0 then
+                               var mask = client.read_bytes(4).items
                                if payload_ext_len != 0 then
-                                       var msg = client.read(payload_ext_len+4)
-                                       var mask = msg.substring(0,4)
-                                       _buffer.append(unmask_message(mask, msg.substring(4, payload_ext_len)))
-                               else
-                                       if len == 0 then
-                                               return
-                                       end
-                                       var msg = client.read(len+4)
-                                       var mask = msg.substring(0,4)
-                                       _buffer.append(unmask_message(mask, msg.substring(4, len)))
+                                       len = payload_ext_len
                                end
+                               var msg = client.read_bytes(len).items
+                               bf.append_ns(unmask_message(mask, msg, len), len)
                        end
                end
+               _buffer = bf.items
+               _buffer_length = bf.length
        end
 
        # Unmasks a message sent by a client
-       private fun unmask_message(key: String, message: String): String
+       private fun unmask_message(key: NativeString, message: NativeString, len: Int): NativeString
        do
-               var return_message = new FlatBuffer.with_capacity(message.length)
-               var msg_iter = message.chars.iterator
+               var return_message = new NativeString(len)
 
-               while msg_iter.is_ok do
-                       return_message.chars[msg_iter.index] = msg_iter.item.ascii.bin_xor(key.chars[msg_iter.index%4].ascii).ascii
-                       msg_iter.next
+               for i in [0 .. len[ do
+                       return_message[i] = message[i].ascii.bin_xor(key[i%4].ascii).ascii
                end
 
-               return return_message.to_s
+               return return_message
        end
 
        # Checks if a connection to a client is available
        redef fun connected do return client.connected
 
-       redef fun write(msg)
-       do
-               client.write(frame_message(msg.to_s))
-       end
+       redef fun write_bytes(s) do client.write_bytes(frame_message(s.to_s))
+
+       redef fun write(msg) do client.write(frame_message(msg.to_s).to_s)
 
        redef fun is_writable do return client.connected
 
        redef fun fill_buffer
        do
-               _buffer.clear
-               _buffer_pos = 0
+               buffer_reset
                unpad_message
        end
 
-       redef fun end_reached do return client._buffer_pos >= client._buffer.length and client.end_reached
+       redef fun end_reached do return client._buffer_pos >= client._buffer_length and client.end_reached
 
        # Is there some data available to be read ?
        fun can_read(timeout: Int): Bool do return client.ready_to_read(timeout)
index 3f6e3ee..6c53124 100644 (file)
@@ -37,7 +37,7 @@ extern class XdgBasedir `{ xdgHandle* `}
        fun is_valid: Bool do return not address_is_null
 
        # Wipe handle of XDG data cache.
-       fun destroy `{ xdgWipeHandle(recv); `}
+       fun destroy `{ xdgWipeHandle(self); `}
 
        # Update the data cache.
        #
@@ -46,21 +46,21 @@ extern class XdgBasedir `{ xdgHandle* `}
        # be used to access XDG data as it was before `update` was called.
        #
        # Returns `true` if the update was successful.
-       fun update: Bool `{ return xdgUpdateData(recv); `}
+       fun update: Bool `{ return xdgUpdateData(self); `}
 
        # Base directory for user specific data files.
        fun data_home: String import NativeString.to_s `{
-               return NativeString_to_s((char*)xdgDataHome(recv));
+               return NativeString_to_s((char*)xdgDataHome(self));
        `}
 
        # Base directory for user specific configuration files.
        fun config_home: String import NativeString.to_s `{
-               return NativeString_to_s((char*)xdgConfigHome(recv));
+               return NativeString_to_s((char*)xdgConfigHome(self));
        `}
 
        # Base directory for user specific non-essential data files.
        fun cache_home: String import NativeString.to_s `{
-               return NativeString_to_s((char*)xdgCacheHome(recv));
+               return NativeString_to_s((char*)xdgCacheHome(self));
        `}
 
        # Preference-ordered set of base directories to search for data files
@@ -68,7 +68,7 @@ extern class XdgBasedir `{ xdgHandle* `}
        fun data_dirs: Array[String] do return native_data_dirs.to_string_array
 
        private fun native_data_dirs: ConstPointer `{
-               return xdgDataDirectories(recv);
+               return xdgDataDirectories(self);
        `}
 
        # Preference-ordered set of base directories to search for data files
@@ -82,7 +82,7 @@ extern class XdgBasedir `{ xdgHandle* `}
        end
 
        private fun native_searchable_data_dirs: ConstPointer `{
-               return xdgSearchableDataDirectories(recv);
+               return xdgSearchableDataDirectories(self);
        `}
 
        # Preference-ordered set of base directories to search for configuration
@@ -90,7 +90,7 @@ extern class XdgBasedir `{ xdgHandle* `}
        fun config_dirs: Array[String] do return native_config_dirs.to_string_array
 
        private fun native_config_dirs: ConstPointer `{
-               return xdgConfigDirectories(recv);
+               return xdgConfigDirectories(self);
        `}
 
        # Preference-ordered set of base directories to search for configuration
@@ -104,7 +104,7 @@ extern class XdgBasedir `{ xdgHandle* `}
        end
 
        private fun native_searchable_config_dirs: ConstPointer `{
-               return xdgSearchableConfigDirectories(recv);
+               return xdgSearchableConfigDirectories(self);
        `}
 end
 
@@ -112,7 +112,7 @@ private extern class ConstPointer `{ const void * `}
        # Convert a C `char **` to a Nit `Array[String]`
        fun to_string_array: Array[String]
        import Array[String], Array[String].add, NativeString.to_s `{
-               char **strings = (char**)recv;
+               char **strings = (char**)self;
 
                Array_of_String aos = new_Array_of_String();
                int p = 0;
similarity index 100%
rename from misc/jenkins/README
rename to misc/jenkins/README.md
similarity index 100%
rename from share/README
rename to share/README.md
index bc21fd3..9e0fbf5 100644 (file)
@@ -20,7 +20,7 @@ By default, the generated executables are produced in the current directory.
 
 Internally, nitc rely on the presence of a C compiler. Usually gcc (but nitc was successfully tested with clang).
 A compilation directory is therefore created and (re-)used.
-By default, the compilation directory is named `.nit_compile`.
+By default, the compilation directory is named `nit_compile` and is removed after the compilation.
 (see `--compile-dir` for details.)
 
 Currently, because Nit is still in heavy development, the compilation directory is not cleaned after the compilation.
@@ -168,7 +168,9 @@ See the documentation of these specific modules for details.
 `--compile-dir`
 :   Directory used to generate temporary files.
 
-    By default, it is named `.nit_compile`.
+    By default, it is named `nit_compile` and created in the current directory and destroyed after the compilation.
+
+    If the option `--compile_dir` or `--no-cc` is used, then the directory is not destroyed and let as is.
 
 `--no-cc`
 :   Do not invoke the C compiler.
@@ -184,6 +186,8 @@ See the documentation of these specific modules for details.
     Only the C files required for the program are generated.
     The final binary will be generated in the same directory.
 
+    Note that, to be useful, the compilation directory is not destroyed when `--no-cc` is used.
+
 `-m`
 :   Additional module to mix-in.
 
@@ -400,8 +404,18 @@ They are useless for a normal user.
 `--no-main`
 :   Do not generate main entry point.
 
-`--stacktrace`
-:   Control the generation of stack traces.
+`--no-stacktrace`
+:   The compiled program will not display stack traces on runtime errors.
+
+    Because stack traces rely on libunwind, this option might be useful in order to generate more portable binaries
+    since libunwind might be non available on the runtime system (or available with an ABI incompatible version).
+
+    The generated C is API-portable and can be reused, distributed and compiled on any supported system.
+    If the option `--no-stacktrace` is not used but the development files of the library `libunwind` are not available, then a warning will be displayed
+    and stack trace will be disabled.
+
+    Note that the `--no-stacktrace` option (or this absence) can be toggled manually in the generated Makefile (search `NO_STACKTRACE` in the Makefile).
+    Moreover, the environment variable `NIT_NO_STACK` (see bellow) can also be used at runtime to disable stack traces.
 
 `--max-c-lines`
 :   Maximum number of lines in generated C files. Use 0 for unlimited.
@@ -477,6 +491,20 @@ This option is used to test the robustness of the tools by allowing phases to pr
     * large: disable the GC and just allocate a large memory area to use for all instantiation.
     * help: show the list of available options.
 
+`NIT_NO_STACK`
+:   Runtime control of stack traces.
+
+    By default, stack traces are printed when a runtime errors occurs during the execution of a compiled program.
+    When setting this environment variable to a non empty value, such stack traces are disabled.
+
+    The environment variable is used when programs are executed, not when they are compiled.
+    Thus, you do not need to recompile programs in order to disable generated stack traces.
+
+    Note that stack traces require that, during the compilation, development files of the library `libunwind` are available.
+    If they are not available, then programs are compiled without any stack trace support.
+
+    To completely disable stack traces, see the option `--no-stacktrace`.
+
 # SEE ALSO
 
 The Nit language documentation and the source code of its tools and libraries may be downloaded from <http://nitlanguage.org>
index c655110..4ba5154 100644 (file)
@@ -10,9 +10,9 @@ nitx [*options*] FILE [COMMAND]
 
 # DESCRIPTION
 
-`nitx` in an interactive tool that display information about programs and libraries.
+`nitx` in an interactive tool that displays informations about programs and libraries.
 
-A command that query some information can be given as and argument.
+A command that query some information can be given as parameter.
 This will immediately displays the information then terminates the programs.
 
 If no command are given, the program starts an interactive session where commands are entered until `:q` is given.
@@ -31,6 +31,15 @@ If no command are given, the program starts an interactive session where command
 `new: Type`
 :   lookup methods creating new instances of 'Type'.
 
+`call: Property`
+:   lookup calls to 'Property'.
+
+`doc: name`
+:   lookup documentation pages about 'name'.
+
+`code: name`
+:   lookup source code related to 'name'.
+
 `:h`
 :   display an help message about the commands.
 
@@ -39,7 +48,8 @@ If no command are given, the program starts an interactive session where command
 
 # OPTIONS
 
-Only common options of the Nit tools are understood.
+`-q`
+:      execute a query, display results in console then quit.
 
 # SEE ALSO
 
index e47f3aa..01da471 100644 (file)
@@ -81,9 +81,6 @@ article.nospace {
        color: #666;
 }
 
-#sidebar .panel-body ul .list-labeled>li {
-}
-
 #sidebar .panel-body ul ul ul>li {
        font-size: 13px;
        color: #999;
index eb02ada..3a11553 100644 (file)
@@ -35,6 +35,7 @@ $(BINS): nitc_0 parser/parser.nit
        @echo '***************************************************************'
        ./git-gen-version.sh
        ./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
@@ -45,6 +46,7 @@ $(OBJS): nitc_0 parser/parser.nit
        @echo '* Compile nitc from C source files                            *'
        @echo '***************************************************************'
        cd ../c_src; make
+       rm ../c_src/*.o || true # to reduce disc used
 
 parser/parser.nit:
        @echo '***************************************************************'
@@ -53,5 +55,5 @@ parser/parser.nit:
        cd parser; make
 
 clean:
-       rm -rf -- .nit_compile* version.nit nitc_0 2> /dev/null || true
+       rm -rf -- version.nit nitc_0 2> /dev/null || true
        cd parser; make clean
index 1a4d804..61a1083 100644 (file)
@@ -97,6 +97,13 @@ redef class AIntExpr
        end
 end
 
+redef class AByteExpr
+       redef fun accept_printer(v)
+       do
+               v.write(value.to_s)
+       end
+end
+
 redef class ANewExpr
        redef fun accept_printer(v)
        do
index b69a049..9d3b0f3 100644 (file)
@@ -63,8 +63,8 @@ redef class ToolContext
        var opt_invocation_metrics = new OptionBool("Enable static and dynamic count of all method invocations", "--invocation-metrics")
        # --isset-checks-metrics
        var opt_isset_checks_metrics = new OptionBool("Enable static and dynamic count of isset checks before attributes access", "--isset-checks-metrics")
-       # --stacktrace
-       var opt_stacktrace = new OptionString("Control the generation of stack traces", "--stacktrace")
+       # --no-stacktrace
+       var opt_no_stacktrace = new OptionBool("Disable the generation of stack traces", "--no-stacktrace")
        # --no-gcc-directives
        var opt_no_gcc_directive = new OptionArray("Disable a advanced gcc directives for optimization", "--no-gcc-directive")
        # --release
@@ -76,7 +76,7 @@ redef class ToolContext
                self.option_context.add_option(self.opt_output, self.opt_dir, self.opt_no_cc, self.opt_no_main, self.opt_make_flags, self.opt_compile_dir, self.opt_hardening)
                self.option_context.add_option(self.opt_no_check_covariance, self.opt_no_check_attr_isset, self.opt_no_check_assert, self.opt_no_check_autocast, self.opt_no_check_null, self.opt_no_check_all)
                self.option_context.add_option(self.opt_typing_test_metrics, self.opt_invocation_metrics, self.opt_isset_checks_metrics)
-               self.option_context.add_option(self.opt_stacktrace)
+               self.option_context.add_option(self.opt_no_stacktrace)
                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)
@@ -88,17 +88,6 @@ redef class ToolContext
        do
                super
 
-               var st = opt_stacktrace.value
-               if st == "none" or st == "libunwind" or st == "nitstack" then
-                       # Fine, do nothing
-               else if st == "auto" or st == null then
-                       # Default is nitstack
-                       opt_stacktrace.value = "nitstack"
-               else
-                       print "Option Error: unknown value `{st}` for --stacktrace. Use `none`, `libunwind`, `nitstack` or `auto`."
-                       exit(1)
-               end
-
                if opt_output.value != null and opt_dir.value != null then
                        print "Option Error: cannot use both --dir and --output"
                        exit(1)
@@ -115,15 +104,12 @@ redef class ToolContext
 end
 
 redef class ModelBuilder
-       # The compilation directory
-       var compile_dir: String
-
        # Simple indirection to `Toolchain::write_and_make`
        protected fun write_and_make(compiler: AbstractCompiler)
        do
                var platform = compiler.target_platform
                var toolchain = platform.toolchain(toolcontext, compiler)
-               compile_dir = toolchain.compile_dir
+               compiler.toolchain = toolchain
                toolchain.write_and_make
        end
 end
@@ -145,14 +131,21 @@ class Toolchain
        # Compiler of the target program
        var compiler: AbstractCompiler
 
-       # Directory where to generate all C files
-       fun compile_dir: String
+       # Directory where to generate all files
+       #
+       # The option `--compile_dir` change this directory.
+       fun root_compile_dir: String
        do
                var compile_dir = toolcontext.opt_compile_dir.value
-               if compile_dir == null then compile_dir = ".nit_compile"
+               if compile_dir == null then compile_dir = "nit_compile"
                return compile_dir
        end
 
+       # Directory where to generate all C files
+       #
+       # By default it is `root_compile_dir` but some platform may require that it is a subdirectory.
+       fun compile_dir: String do return root_compile_dir
+
        # Write all C files and compile them
        fun write_and_make is abstract
 end
@@ -165,12 +158,16 @@ class MakefileToolchain
        do
                var compile_dir = compile_dir
 
+               # Remove the compilation directory unless explicitly set
+               var auto_remove = toolcontext.opt_compile_dir.value == null
+
                # Generate the .h and .c files
                # A single C file regroups many compiled rumtime functions
                # Note that we do not try to be clever an a small change in a Nit source file may change the content of all the generated .c files
                var time0 = get_time
                self.toolcontext.info("*** WRITING C ***", 1)
 
+               root_compile_dir.mkdir
                compile_dir.mkdir
 
                var cfiles = new Array[String]
@@ -192,6 +189,10 @@ class MakefileToolchain
 
                compile_c_code(compile_dir)
 
+               if auto_remove then
+                       sys.system("rm -r -- '{root_compile_dir.escape_to_sh}/'")
+               end
+
                time1 = get_time
                self.toolcontext.info("*** END COMPILING C: {time1-time0} ***", 2)
        end
@@ -200,7 +201,7 @@ class MakefileToolchain
        fun write_files(compile_dir: String, cfiles: Array[String])
        do
                var platform = compiler.target_platform
-               if self.toolcontext.opt_stacktrace.value == "nitstack" and platform.supports_libunwind then compiler.build_c_to_nit_bindings
+               if platform.supports_libunwind then compiler.build_c_to_nit_bindings
                var cc_opt_with_libgc = "-DWITH_LIBGC"
                if not platform.supports_libgc then cc_opt_with_libgc = ""
 
@@ -327,7 +328,7 @@ class MakefileToolchain
                var outpath = real_outpath.escape_to_mk
                if outpath != real_outpath then
                        # If the name is crazy and need escaping, we will do an indirection
-                       # 1. generate the binary in the .nit_compile dir under an escaped name
+                       # 1. generate the binary in the nit_compile dir under an escaped name
                        # 2. copy the binary at the right place in the `all` goal.
                        outpath = mainmodule.c_name
                end
@@ -343,25 +344,50 @@ class MakefileToolchain
 
                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")
 
-               var ost = toolcontext.opt_stacktrace.value
-               if (ost == "libunwind" or ost == "nitstack") and platform.supports_libunwind then makefile.write("NEED_LIBUNWIND := YesPlease\n")
+               makefile.write "\n# SPECIAL CONFIGURATION FLAGS\n"
+               if platform.supports_libunwind then
+                       if toolcontext.opt_no_stacktrace.value then
+                               makefile.write "NO_STACKTRACE=True"
+                       else
+                               makefile.write "NO_STACKTRACE= # Set to `True` to enable"
+                       end
+               end
 
                # Dynamic adaptations
                # While `platform` enable complex toolchains, they are statically applied
                # For a dynamic adaptsation of the compilation, the generated Makefile should check and adapt things itself
+               makefile.write "\n\n"
 
                # Check and adapt the targeted system
                makefile.write("uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')\n")
-               makefile.write("ifeq ($(uname_S),Darwin)\n")
-               # remove -lunwind since it is already included on macosx
-               makefile.write("\tNEED_LIBUNWIND :=\n")
-               makefile.write("endif\n\n")
 
                # Check and adapt for the compiler used
                # clang need an additionnal `-Qunused-arguments`
                makefile.write("clang_check := $(shell sh -c '$(CC) -v 2>&1 | grep -q clang; echo $$?')\nifeq ($(clang_check), 0)\n\tCFLAGS += -Qunused-arguments\nendif\n")
 
-               makefile.write("ifdef NEED_LIBUNWIND\n\tLDLIBS += -lunwind\nendif\n")
+               if platform.supports_libunwind then
+                       makefile.write """
+ifneq ($(NO_STACKTRACE), True)
+  # Check and include lib-unwind in a portable way
+  ifneq ($(uname_S),Darwin)
+    # already included on macosx, but need to get the correct flags in other supported platforms.
+    ifeq ($(shell pkg-config --exists 'libunwind'; echo $$?), 0)
+      LDLIBS += `pkg-config --libs libunwind`
+      CFLAGS += `pkg-config --cflags libunwind`
+    else
+      $(warning "[_] stack-traces disabled. Please install libunwind-dev.")
+      CFLAGS += -D NO_STACKTRACE
+    endif
+  endif
+else
+  # Stacktraces disabled
+  CFLAGS += -D NO_STACKTRACE
+endif
+
+"""
+               else
+                       makefile.write("CFLAGS += -D NO_STACKTRACE\n\n")
+               end
 
                makefile.write("all: {outpath}\n")
                if outpath != real_outpath then
@@ -496,6 +522,11 @@ abstract class AbstractCompiler
        # The modelbuilder used to know the model and the AST
        var modelbuilder: ModelBuilder is protected writable
 
+       # The associated toolchain
+       #
+       # Set by `modelbuilder.write_and_make` and permit sub-routines to access the current toolchain if required.
+       var toolchain: Toolchain is noinit
+
        # Is hardening asked? (see --hardening)
        fun hardening: Bool do return self.modelbuilder.toolcontext.opt_hardening.value
 
@@ -559,7 +590,7 @@ abstract class AbstractCompiler
        # Binds the generated C function names to Nit function names
        fun build_c_to_nit_bindings
        do
-               var compile_dir = modelbuilder.compile_dir
+               var compile_dir = toolchain.compile_dir
 
                var stream = new FileWriter.open("{compile_dir}/c_functions_hash.c")
                stream.write("#include <string.h>\n")
@@ -606,6 +637,7 @@ abstract class AbstractCompiler
                self.header.add_decl("#include <string.h>")
                self.header.add_decl("#include <sys/types.h>\n")
                self.header.add_decl("#include <unistd.h>\n")
+               self.header.add_decl("#include <stdint.h>\n")
                self.header.add_decl("#include \"gc_chooser.h\"")
                self.header.add_decl("#ifdef ANDROID")
                self.header.add_decl("  #include <android/log.h>")
@@ -713,19 +745,16 @@ extern void nitni_global_ref_decr( struct nitni_ref *ref );
        do
                var v = self.new_visitor
                v.add_decl("#include <signal.h>")
-               var ost = modelbuilder.toolcontext.opt_stacktrace.value
                var platform = target_platform
 
-               if not platform.supports_libunwind then ost = "none"
-
                var no_main = platform.no_main or modelbuilder.toolcontext.opt_no_main.value
 
-               if ost == "nitstack" or ost == "libunwind" then
+               if platform.supports_libunwind then
+                       v.add_decl("#ifndef NO_STACKTRACE")
                        v.add_decl("#define UNW_LOCAL_ONLY")
                        v.add_decl("#include <libunwind.h>")
-                       if ost == "nitstack" then
-                               v.add_decl("#include \"c_functions_hash.h\"")
-                       end
+                       v.add_decl("#include \"c_functions_hash.h\"")
+                       v.add_decl("#endif")
                end
                v.add_decl("int glob_argc;")
                v.add_decl("char **glob_argv;")
@@ -759,7 +788,8 @@ extern void nitni_global_ref_decr( struct nitni_ref *ref );
                end
 
                v.add_decl("static void show_backtrace(void) \{")
-               if ost == "nitstack" or ost == "libunwind" then
+               if platform.supports_libunwind then
+                       v.add_decl("#ifndef NO_STACKTRACE")
                        v.add_decl("char* opt = getenv(\"NIT_NO_STACK\");")
                        v.add_decl("unw_cursor_t cursor;")
                        v.add_decl("if(opt==NULL)\{")
@@ -773,20 +803,17 @@ extern void nitni_global_ref_decr( struct nitni_ref *ref );
                        v.add_decl("PRINT_ERROR(\"-------------------------------------------------\\n\");")
                        v.add_decl("while (unw_step(&cursor) > 0) \{")
                        v.add_decl("    unw_get_proc_name(&cursor, procname, 100, &ip);")
-                       if ost == "nitstack" then
                        v.add_decl("    const char* recv = get_nit_name(procname, strlen(procname));")
                        v.add_decl("    if (recv != NULL)\{")
                        v.add_decl("            PRINT_ERROR(\"` %s\\n\", recv);")
                        v.add_decl("    \}else\{")
                        v.add_decl("            PRINT_ERROR(\"` %s\\n\", procname);")
                        v.add_decl("    \}")
-                       else
-                       v.add_decl("    PRINT_ERROR(\"` %s \\n\",procname);")
-                       end
                        v.add_decl("\}")
                        v.add_decl("PRINT_ERROR(\"-------------------------------------------------\\n\");")
                        v.add_decl("free(procname);")
                        v.add_decl("\}")
+                       v.add_decl("#endif /* NO_STACKTRACE */")
                end
                v.add_decl("\}")
 
@@ -1455,6 +1482,14 @@ abstract class AbstractCompilerVisitor
                return res
        end
 
+       # Generate a byte value
+       fun byte_instance(value: Byte): RuntimeVariable
+       do
+               var t = mmodule.byte_type
+               var res = new RuntimeVariable("((unsigned char){value.to_s})", t, t)
+               return res
+       end
+
        # Generate a char value
        fun char_instance(value: Char): RuntimeVariable
        do
@@ -1838,11 +1873,13 @@ redef class MClassType
                else if mclass.name == "Bool" then
                        return "short int"
                else if mclass.name == "Char" then
-                       return "char"
+                       return "uint32_t"
                else if mclass.name == "Float" then
                        return "double"
+               else if mclass.name == "Byte" then
+                       return "unsigned char"
                else if mclass.name == "NativeString" then
-                       return "char*"
+                       return "unsigned char*"
                else if mclass.name == "NativeArray" then
                        return "val*"
                else
@@ -1871,6 +1908,8 @@ redef class MClassType
                        return "c"
                else if mclass.name == "Float" then
                        return "d"
+               else if mclass.name == "Byte" then
+                       return "b"
                else if mclass.name == "NativeString" then
                        return "str"
                else if mclass.name == "NativeArray" then
@@ -2101,13 +2140,16 @@ redef class AMethPropdef
                        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("(unsigned char){arguments[0]}", ret.as(not null)))
+                               return true
                        else if pname == "ascii" then
-                               v.ret(v.new_expr("{arguments[0]}", ret.as(not null)))
+                               v.ret(v.new_expr("(uint32_t){arguments[0]}", ret.as(not null)))
                                return true
                        end
                else if cname == "Char" then
                        if pname == "output" then
-                               v.add("printf(\"%c\", {arguments.first});")
+                               v.add("printf(\"%c\", ((unsigned char){arguments.first}));")
                                return true
                        else if pname == "object_id" then
                                v.ret(v.new_expr("(long){arguments.first}", ret.as(not null)))
@@ -2141,7 +2183,70 @@ redef class AMethPropdef
                                v.ret(v.new_expr("{arguments[0]}-'0'", ret.as(not null)))
                                return true
                        else if pname == "ascii" then
-                               v.ret(v.new_expr("(unsigned char){arguments[0]}", ret.as(not null)))
+                               v.ret(v.new_expr("(long){arguments[0]}", ret.as(not null)))
+                               return true
+                       end
+               else if cname == "Byte" then
+                       if pname == "output" then
+                               v.add("printf(\"%x\\n\", {arguments.first});")
+                               return true
+                       else if pname == "object_id" then
+                               v.ret(v.new_expr("(long){arguments.first}", 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 == "*" 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_i" then
+                               v.ret(v.new_expr("(long){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
@@ -2212,13 +2317,16 @@ redef class AMethPropdef
                        else if pname == "to_i" then
                                v.ret(v.new_expr("(long){arguments[0]}", ret.as(not null)))
                                return true
+                       else if pname == "to_b" then
+                               v.ret(v.new_expr("(unsigned char){arguments[0]}", ret.as(not null)))
+                               return true
                        end
                else if cname == "NativeString" then
                        if pname == "[]" then
-                               v.ret(v.new_expr("{arguments[0]}[{arguments[1]}]", ret.as(not null)))
+                               v.ret(v.new_expr("(uint32_t){arguments[0]}[{arguments[1]}]", ret.as(not null)))
                                return true
                        else if pname == "[]=" then
-                               v.add("{arguments[0]}[{arguments[1]}]={arguments[2]};")
+                               v.add("{arguments[0]}[{arguments[1]}]=(unsigned char){arguments[2]};")
                                return true
                        else if pname == "copy_to" then
                                v.add("memmove({arguments[1]}+{arguments[4]},{arguments[0]}+{arguments[3]},{arguments[2]});")
@@ -2230,7 +2338,7 @@ redef class AMethPropdef
                                v.ret(v.new_expr("{arguments[0]} + {arguments[1]}", ret.as(not null)))
                                return true
                        else if pname == "new" then
-                               v.ret(v.new_expr("(char*)nit_alloc({arguments[1]})", ret.as(not null)))
+                               v.ret(v.new_expr("(unsigned char*)nit_alloc({arguments[1]})", ret.as(not null)))
                                return true
                        end
                else if cname == "NativeArray" then
@@ -2244,7 +2352,7 @@ redef class AMethPropdef
                        v.ret(v.new_expr("glob_sys", ret.as(not null)))
                        return true
                else if pname == "calloc_string" then
-                       v.ret(v.new_expr("(char*)nit_alloc({arguments[1]})", ret.as(not null)))
+                       v.ret(v.new_expr("(unsigned char*)nit_alloc({arguments[1]})", ret.as(not null)))
                        return true
                else if pname == "calloc_array" then
                        v.calloc_array(ret.as(not null), arguments)
@@ -2788,6 +2896,10 @@ 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))
+end
+
 redef class AFloatExpr
        redef fun expr(v) do return v.float_instance("{self.n_float.text}") # FIXME use value, not n_float
 end
index 8b8f9de..edf0a16 100644 (file)
@@ -107,11 +107,11 @@ redef class MExplicitCall
                if mproperty.is_init then
                        var recv_mtype = recv_mtype
                        recv_var = nitni_visitor.init_instance_or_extern(recv_mtype)
-                       nitni_visitor.add("{mtype.ctype} recv /* var self: {mtype} */;")
-                       nitni_visitor.add("recv = {recv_var};")
+                       nitni_visitor.add("{mtype.ctype} self /* var self: {mtype} */;")
+                       nitni_visitor.add("self = {recv_var};")
                else
                        mtype = mtype.anchor_to(v.compiler.mainmodule, recv_mtype)
-                       recv_var = nitni_visitor.var_from_c("recv", mtype)
+                       recv_var = nitni_visitor.var_from_c("self", mtype)
                        recv_var = nitni_visitor.box_extern(recv_var, mtype)
                end
 
@@ -226,7 +226,7 @@ redef class MExplicitSuper
 
                var vars = new Array[RuntimeVariable]
 
-               var recv_var = nitni_visitor.var_from_c("recv", mclass_type)
+               var recv_var = nitni_visitor.var_from_c("self", mclass_type)
                recv_var = nitni_visitor.box_extern(recv_var, mclass_type)
                vars.add(recv_var)
 
index dbe819a..1f59771 100644 (file)
@@ -37,19 +37,20 @@ redef class MModule
                var n = nmodule(v)
                if n == null then return
                n.ensure_compile_ffi_wrapper
-               finalize_ffi_wrapper(v.compiler.modelbuilder.compile_dir, v.compiler.mainmodule)
+               finalize_ffi_wrapper(v.compiler.toolchain.compile_dir, v.compiler.mainmodule)
                for file in ffi_files do v.compiler.extern_bodies.add(file)
 
                ensure_compile_nitni_base(v)
 
                nitni_ccu.header_c_types.add("#include \"{c_name}._ffi.h\"\n")
+               nitni_ccu.header_c_types.add("#include <stdint.h>\n")
                nitni_ccu.header_c_types.add """
 extern void nitni_global_ref_incr(void*);
 extern void nitni_global_ref_decr(void*);
 """
 
                var cflags = self.cflags[""].join(" ")
-               nitni_ccu.write_as_nitni(self, v.compiler.modelbuilder.compile_dir)
+               nitni_ccu.write_as_nitni(self, v.compiler.toolchain.compile_dir)
 
                for file in nitni_ccu.files do
                        var f = new ExternCFile(file, cflags)
index b2cf479..49671f9 100644 (file)
@@ -247,7 +247,7 @@ class GlobalCompiler
                res.is_exact = true
                if is_native_array then
                        var mtype_elt = mtype.arguments.first
-                       v.add("{res} = nit_alloc(sizeof(struct {mtype.c_name}) + length*sizeof({mtype_elt.ctype}));")
+                       v.add("{res} = nit_alloc(sizeof(struct {mtype.c_name}) + length*sizeof(val*));")
                        v.add("((struct {mtype.c_name}*){res})->length = length;")
                else
                        v.add("{res} = nit_alloc(sizeof(struct {mtype.c_name}));")
index dc24b7c..e07f125 100644 (file)
@@ -252,7 +252,7 @@ class SeparateCompiler
        do
                # Collect all bas box class
                # FIXME: this is not completely fine with a separate compilation scheme
-               for classname in ["Int", "Bool", "Char", "Float", "NativeString", "Pointer"] do
+               for classname in ["Int", "Bool", "Byte", "Char", "Float", "NativeString", "Pointer"] do
                        var classes = self.mainmodule.model.get_mclasses_by_name(classname)
                        if classes == null then continue
                        assert classes.length == 1 else print classes.join(", ")
@@ -769,7 +769,8 @@ class SeparateCompiler
                        end
                        v.add_decl("\},")
                else
-                       v.add_decl("0, \{\}, /*DEAD TYPE*/")
+                       # Use -1 to indicate dead type, the info is used by --hardening
+                       v.add_decl("-1, \{\}, /*DEAD TYPE*/")
                end
                v.add_decl("\};")
        end
@@ -1037,7 +1038,7 @@ class SeparateCompiler
                v.add("if({t} == NULL) \{")
                v.add_abort("type null")
                v.add("\}")
-               v.add("if({t}->table_size == 0) \{")
+               v.add("if({t}->table_size < 0) \{")
                v.add("PRINT_ERROR(\"Insantiation of a dead type: %s\\n\", {t}->name);")
                v.add_abort("type dead")
                v.add("\}")
@@ -1193,7 +1194,7 @@ class SeparateCompilerVisitor
                                if mtype.name == "Int" then
                                        return self.new_expr("(long)({value})>>2", mtype)
                                else if mtype.name == "Char" then
-                                       return self.new_expr("(char)((long)({value})>>2)", mtype)
+                                       return self.new_expr("(uint32_t)((long)({value})>>2)", mtype)
                                else if mtype.name == "Bool" then
                                        return self.new_expr("(short int)((long)({value})>>2)", mtype)
                                else
index 8de793c..5d693b1 100644 (file)
@@ -94,7 +94,10 @@ redef class MEntity
                return mdoc.cs_short_comment
        end
 
-       # Returns 1self` as a list element that can be displayed in console.
+       # Returns `self` as a list element that can be displayed in console.
+       #
+       # Displays `cs_icon`, `cs_name`, `cs_short_comment, `cs_namespace`,
+       # `cs_declaration` and `cs_location`.
        fun cs_list_item: String do
                var tpl = new FlatBuffer
                tpl.append " {cs_visibility_color(cs_icon).bold} {cs_name.blue.bold}"
@@ -111,6 +114,18 @@ redef class MEntity
                return tpl.write_to_string
        end
 
+       # Returns `self` as a short list element that can be displayed in console.
+       # Displays `cs_icon`, `cs_name`, and `cs_short_comment.
+       fun cs_short_list_item: String do
+               var tpl = new FlatBuffer
+               tpl.append " {cs_visibility_color(cs_icon).bold} {cs_name.blue.bold}"
+               var comment = cs_short_comment
+               if comment != null then
+                       tpl.append " # {comment}".green
+               end
+               return tpl.write_to_string
+       end
+
        # ASCII icon to be displayed in front of the list item.
        fun cs_icon: String do return "*"
 
@@ -121,6 +136,26 @@ redef class MEntity
        #
        # See module `console`.
        fun cs_visibility_color(string: String): String do return string.green
+
+       # Source code associated to this MEntity.
+       #
+       # Uses `cs_location` to locate the source code.
+       fun cs_source_code: String do
+               # FIXME up location to mentity
+               var loc = new Location.from_string(cs_location)
+               var fr = new FileReader.open(loc.file.filename)
+               var content = new FlatBuffer
+               var i = 0
+               while not fr.eof do
+                       i += 1
+                       var line = fr.read_line
+                       if i < loc.line_start or i > loc.line_end then continue
+                       # FIXME add nitlight for console
+                       content.append "{line}\n"
+               end
+               fr.close
+               return content.write_to_string
+       end
 end
 
 redef class MProject
index 45bc33e..6e8f03e 100644 (file)
@@ -35,7 +35,7 @@ redef class DocComposite
        # Title that can be decorated for console display.
        #
        # Set as `null` if you don't want to display a title.
-       var cs_title: nullable String is noinit, writable
+       var cs_title: nullable String is writable, lazy do return title
 
        # Subtitle that can be decorated for console display.
        #
@@ -81,20 +81,12 @@ redef class ConcernSection
        end
 end
 
-redef class ConstructorsSection
-       redef var cs_title = "Constructors"
-       redef var cs_subtitle = null
-end
-
 redef class MEntityComposite
        redef var cs_title is lazy do return mentity.cs_name
        redef var cs_subtitle is lazy do return mentity.cs_namespace
 end
 
 redef class IntroArticle
-       redef var cs_title = null
-       redef var cs_subtitle = null
-
        redef fun render_body do
                addn "    {mentity.cs_declaration.bold}"
                addn "    {mentity.cs_location.gray.bold}"
@@ -109,9 +101,6 @@ redef class IntroArticle
 end
 
 redef class ConcernsArticle
-       redef var cs_title = "Concerns"
-       redef var cs_subtitle = null
-
        redef fun render_body do
                var w = new StringWriter
                concerns.write_to(w)
@@ -140,3 +129,11 @@ redef class DefinitionArticle
                super
        end
 end
+
+redef class MEntitiesListArticle
+       redef fun render_body do
+               for mentity in mentities do
+                       addn mentity.cs_short_list_item
+               end
+       end
+end
index 6cd6083..4d29cd7 100644 (file)
@@ -16,7 +16,6 @@
 module doc_base
 
 import toolcontext
-import model_utils
 import model_ext
 
 # The model of a Nitdoc documentation.
@@ -27,16 +26,26 @@ import model_ext
 # It is a placeholder to share data between each phase.
 class DocModel
 
-       # `DocPage` composing the documentation.
+       # `DocPage` composing the documentation associated to their ids.
        #
        # This is where `DocPhase` store and access pages to produce documentation.
-       var pages = new Array[DocPage]
+       #
+       # See `add_page`.
+       var pages: Map[String, DocPage] = new HashMap[String, DocPage]
 
        # Nit `Model` from which we extract the documentation.
        var model: Model is writable
 
        # The entry point of the `model`.
        var mainmodule: MModule is writable
+
+       # Add a `page` to this documentation.
+       fun add_page(page: DocPage) do
+               if pages.has_key(page.id) then
+                       print "Warning: multiple page with the same id `{page.id}`"
+               end
+               pages[page.id] = page
+       end
 end
 
 # A documentation page abstraction.
@@ -45,6 +54,17 @@ end
 # the page.
 class DocPage
 
+       # Page uniq id.
+       #
+       # The `id` is used as name for the generated file corresponding to the page
+       # (if any).
+       # Because multiple pages can be generated in the same directory it should be
+       # uniq.
+       #
+       # The `id` can also be used to establish links between pages (HTML links,
+       # HTML anchors, vim links, etc.).
+       var id: String is writable
+
        # Title of this page.
        var title: String is writable
 
@@ -54,6 +74,15 @@ class DocPage
        var root = new DocRoot
 
        redef fun to_s do return title
+
+       # Pretty prints the content of this page.
+       fun pretty_print: Writable do
+               var res = new Template
+               res.addn "page: {title}"
+               res.addn ""
+               root.pretty_print_in(res)
+               return res
+       end
 end
 
 # `DocPage` elements that can be nested in another.
@@ -70,6 +99,19 @@ abstract class DocComposite
        # Parent element.
        var parent: nullable DocComposite = null is writable
 
+       # Element uniq id.
+       #
+       # The `id` is used as name for the generated element (if any).
+       # Because multiple elements can be generated in the same container
+       # it should be uniq.
+       #
+       # The `id` can also be used to establish links between elements
+       # (HTML links, HTML anchors, vim links, etc.).
+       var id: String is writable
+
+       # Item title if any.
+       var title: nullable String
+
        # Does `self` have a `parent`?
        fun is_root: Bool do return parent == null
 
@@ -78,8 +120,18 @@ abstract class DocComposite
        # Children are ordered, this order can be changed by the `DocPhase`.
        var children = new Array[DocComposite]
 
-       # Does `self` have `children`?
-       fun is_empty: Bool do return children.is_empty
+       # Is `self` not displayed in the page.
+       #
+       # By default, empty elements are hidden.
+       fun is_hidden: Bool do return children.is_empty
+
+       # Title used in table of content if any.
+       var toc_title: nullable String is writable, lazy do return title
+
+       # Is `self` hidden in the table of content?
+       var is_toc_hidden: Bool is writable, lazy do
+               return toc_title == null or is_hidden
+       end
 
        # Add a `child` to `self`.
        #
@@ -94,6 +146,20 @@ abstract class DocComposite
                if parent == null then return 0
                return parent.depth + 1
        end
+
+       # Pretty prints this composite recursively.
+       fun pretty_print: Writable do
+               var res = new Template
+               pretty_print_in(res)
+               return res
+       end
+
+       # Appends the Pretty print of this composite in `res`.
+       private fun pretty_print_in(res: Template) do
+               res.add "#" * depth
+               res.addn " {id}"
+               for child in children do child.pretty_print_in(res)
+       end
 end
 
 # The `DocComposite` element that contains all the other.
@@ -101,8 +167,12 @@ end
 # The root uses a specific subclass to provide different a different behavior
 # than other `DocComposite` elements.
 class DocRoot
+       noautoinit
        super DocComposite
 
+       redef var id = "<root>"
+       redef var title = "<root>"
+
        # No op for `RootSection`.
        redef fun parent=(p) do end
 end
@@ -229,10 +299,30 @@ class PropertyGroup[E: MProperty]
 end
 
 redef class MEntity
+       # ID used as a unique ID and in file names.
+       #
+       # **Must** match the following (POSIX ERE) regular expression:
+       #
+       # ~~~POSIX ERE
+       # ^[A-Za-z_][A-Za-z0-9._-]*$
+       # ~~~
+       #
+       # That way, the ID is always a valid URI component and a valid XML name.
+       fun nitdoc_id: String do return full_name.to_cmangle
+
        # Name displayed in console for debug and tests.
        fun nitdoc_name: String do return name.html_escape
 end
 
+redef class MModule
+
+       # Avoid id conflict with group
+       redef fun nitdoc_id do
+               if mgroup == null then return super
+               return "{mgroup.full_name}::{full_name}".to_cmangle
+       end
+end
+
 redef class MClassDef
        redef fun nitdoc_name do return mclass.nitdoc_name
 end
index d1ada76..5c9b2e9 100644 (file)
@@ -16,6 +16,7 @@
 module doc_concerns
 
 import doc_pages
+import model::model_collect
 
 # ConcernsPhase computes the ConcernsTree used for each page layout.
 class ConcernsPhase
@@ -23,7 +24,7 @@ class ConcernsPhase
 
        # Populates the given DocModel.
        redef fun apply do
-               for page in doc.pages do page.build_concerns(doc)
+               for page in doc.pages.values do page.build_concerns(self)
        end
 end
 
@@ -32,7 +33,7 @@ redef class DocPage
        # Build the `concerns` tree for this page.
        #
        # Since only `MEntityPage`, this method is a no-op for everything else.
-       private fun build_concerns(doc: DocModel) do end
+       private fun build_concerns(v: ConcernsPhase) do end
 end
 
 redef class MEntityPage
@@ -53,15 +54,16 @@ redef class MGroupPage
        # Refined classes in `mentity` that should appear in this page.
        var redefs = new HashSet[MClass]
 
-       redef fun build_concerns(doc) do
+       redef fun build_concerns(v) do
+               var doc = v.doc
                var mmodules = new HashSet[MModule]
-               for mmodule in mentity.collect_mmodules do
+               for mmodule in mentity.mmodules do
                        if doc.mmodules.has(mmodule) then mmodules.add mmodule
                        # collect mclasses
                        for mclass in mmodule.intro_mclasses do
                                if doc.mclasses.has(mclass) then intros.add mclass
                        end
-                       for mclass in mmodule.redef_mclasses do
+                       for mclass in mmodule.collect_redef_mclasses(v.ctx.min_visibility) do
                                if doc.mclasses.has(mclass) then redefs.add mclass
                        end
                end
@@ -77,7 +79,8 @@ redef class MModulePage
        # MClassDefs located in `mentity` to display in this page.
        var mclassdefs = new HashSet[MClassDef]
 
-       redef fun build_concerns(doc) do
+       redef fun build_concerns(v) do
+               var doc = v.doc
                # extract mclassdefs in mmodule
                for mclassdef in mentity.mclassdefs do
                        if doc.mclassdefs.has(mclassdef) then mclassdefs.add mclassdef
@@ -105,7 +108,8 @@ redef class MClassPage
        # MPropdefs to display in this page.
        var mpropdefs = new HashSet[MPropDef]
 
-       redef fun build_concerns(doc) do
+       redef fun build_concerns(v) do
+               var doc = v.doc
                # collect mclassdefs
                for mclassdef in mentity.mclassdefs do
                        if doc.mclassdefs.has(mclassdef) then mclassdefs.add mclassdef
@@ -131,7 +135,8 @@ redef class MPropertyPage
        # MPropdefs to display in this page.
        var mpropdefs = new HashSet[MPropDef]
 
-       redef fun build_concerns(doc) do
+       redef fun build_concerns(v) do
+               var doc = v.doc
                # collect mpropdefs
                for mpropdef in mentity.mpropdefs do
                        # FIXME diff hack
index a7ef6b1..b6d08dc 100644 (file)
@@ -19,6 +19,8 @@
 module doc_console
 
 import semantize
+import doc_extract
+import doc_poset
 import doc::console_templates
 
 # Nitx handles console I/O.
@@ -57,10 +59,24 @@ class Nitx
 
        # Displays the list of available commands.
        fun help do
-               print "\nCommands:"
-               print "\tname\t\tlookup module, class and property with the corresponding 'name'"
-               print "\t:h\t\tdisplay this help message"
-               print "\t:q\t\tquit interactive mode"
+               print "\nCommands:\n"
+               print "\tname\t\t\tlookup module, class and property with the corresponding 'name'"
+               print "\tdoc: <name::space>\tdisplay the documentation page of 'namespace'"
+               print "\nType lookup:"
+               print "\tparam: <Type>\t\tlookup methods using the corresponding 'Type' as parameter"
+               print "\treturn: <Type>\t\tlookup methods returning the corresponding 'Type'"
+               print "\tnew: <Type>\t\tlookup methods creating new instances of 'Type'"
+               print "\tcall: <name>\t\tlookup methods calling 'name'"
+               print "\nHierarchy lookup:"
+               print "\tparents: <Class>\tlist direct parents of 'Class'"
+               print "\tancestors: <Class>\tlist all ancestors of 'Class'"
+               print "\tchildren: <Class>\tlist direct children of 'Class'"
+               print "\tdescendants: <Class>\tlist all descendants of 'Class'"
+               print "\nCode lookup:"
+               print "\tcode: <name>\t\tdisplay the source code associated to the 'name' entity"
+               print "\n"
+               print "\t:h\t\t\tdisplay this help message"
+               print "\t:q\t\t\tquit interactive mode"
                print ""
        end
 
@@ -73,19 +89,14 @@ class Nitx
 
        # Processes the query string and performs it.
        fun do_query(str: String) do
-               var query = parse_query(str)
-               var res = query.perform(self, doc)
-               var page = query.make_results(self, res)
-               print page.write_to_string
-       end
-
-       # Returns an `NitxQuery` from a raw query string.
-       fun parse_query(str: String): NitxQuery do
                var query = new NitxQuery(str)
                if query isa NitxCommand then
                        query.execute(self)
+                       return
                end
-               return query
+               var res = query.perform(self, doc)
+               var page = query.make_results(self, res)
+               print page.write_to_string
        end
 end
 
@@ -110,6 +121,26 @@ interface NitxQuery
                        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}")
        end
@@ -119,8 +150,8 @@ interface NitxQuery
 
        # Pretty prints the results for the console.
        fun make_results(nitx: Nitx, results: Array[NitxMatch]): DocPage do
-               var page = new DocPage("Results")
-               page.root.add_child(new QueryResultArticle(self, results))
+               var page = new DocPage("results", "Results")
+               page.root.add_child(new QueryResultArticle("results.article", "Results", self, results))
                return page
        end
 
@@ -184,7 +215,7 @@ class CommentQuery
        redef fun perform(nitx, doc) do
                var name = args.first
                var res = new Array[NitxMatch]
-               for mentity in doc.search_mentities(name) do
+               for mentity in doc.mentities_by_name(name) do
                        res.add new MEntityMatch(self, mentity)
                end
                return res
@@ -195,8 +226,8 @@ class CommentQuery
                if len == 1 then
                        var res = results.first.as(MEntityMatch)
                        var mentity = res.mentity
-                       var page = new DocPage("Results")
-                       var article = new DefinitionArticle(mentity)
+                       var page = new DocPage("results", "Results")
+                       var article = new DefinitionArticle("results.article", "Results", mentity)
                        article.cs_title = mentity.name
                        article.cs_subtitle = mentity.cs_declaration
                        page.root.add_child article
@@ -207,6 +238,258 @@ class CommentQuery
        end
 end
 
+# A query to search signatures using a specific `MType` as parameter.
+class ParamQuery
+       super MetaQuery
+
+       redef fun perform(nitx, doc) do
+               var res = new Array[NitxMatch]
+               var mtype_name = args.first
+               for mproperty in doc.mproperties do
+                       if not mproperty isa MMethod then continue
+                       var msignature = mproperty.intro.msignature
+                       if msignature != null then
+                               for mparam in msignature.mparameters do
+                                       if mparam.mtype.name == mtype_name then
+                                               res.add new MEntityMatch(self, mproperty)
+                                       end
+                               end
+                       end
+               end
+               return res
+       end
+end
+
+# A query to search signatures using a specific `MType` as return.
+class ReturnQuery
+       super MetaQuery
+
+       redef fun perform(nitx, doc) do
+               var res = new Array[NitxMatch]
+               var mtype_name = args.first
+               for mproperty in doc.mproperties do
+                       if not mproperty isa MMethod then continue
+                       var msignature = mproperty.intro.msignature
+                       if msignature != null then
+                               var mreturn = msignature.return_mtype
+                               if mreturn != null and mreturn.name == mtype_name then
+                                       res.add new MEntityMatch(self, mproperty)
+                               end
+                       end
+               end
+               return res
+       end
+end
+
+# A query to search methods creating new instances of a specific `MType`.
+class NewQuery
+       super MetaQuery
+
+       redef fun perform(nitx, doc) do
+               var res = new Array[NitxMatch]
+               var mtype_name = args.first
+               for mpropdef in doc.mpropdefs do
+                       var visitor = new TypeInitVisitor(mtype_name)
+                       var npropdef = nitx.ctx.modelbuilder.mpropdef2node(mpropdef)
+                       if npropdef == null then continue
+                       visitor.enter_visit(npropdef)
+                       for i in visitor.inits do
+                               res.add new MEntityMatch(self, mpropdef)
+                       end
+               end
+               return res
+       end
+end
+
+# A query to search methods calling a specific `MProperty`.
+class CallQuery
+       super MetaQuery
+
+       redef fun perform(nitx, doc) do
+               var res = new Array[NitxMatch]
+               var mprop_name = args.first
+               for mpropdef in doc.mpropdefs do
+                       var visitor = new MPropertyCallVisitor
+                       var npropdef = nitx.ctx.modelbuilder.mpropdef2node(mpropdef)
+                       if npropdef == null then continue
+                       visitor.enter_visit(npropdef)
+                       for mprop in visitor.calls do
+                               if mprop.name != mprop_name then continue
+                               res.add new MEntityMatch(self, mpropdef)
+                       end
+               end
+               return res
+       end
+end
+
+# A query to search a Nitdoc documentation page by its name.
+class DocQuery
+       super MetaQuery
+
+       redef fun perform(nitx, doc) do
+               var res = new Array[NitxMatch]
+               var name = args.first
+               for page in doc.pages.values do
+                       if name == "*" then # FIXME dev only
+                               res.add new PageMatch(self, page)
+                       else if page.title == name then
+                               res.add new PageMatch(self, page)
+                       else if page isa MEntityPage and page.mentity.cs_namespace == name then
+                               res.add new PageMatch(self, page)
+                       end
+               end
+               return res
+       end
+
+       redef fun make_results(nitx, results) do
+               var len = results.length
+               # FIXME how to render the pager for one worded namespaces like "standard"?
+               if len == 1 then
+                       var page = results.first.as(PageMatch).page
+                       var pager = new Pager
+                       pager.add page.write_to_string
+                       pager.render
+                       return page
+               else
+                       return super
+               end
+       end
+end
+
+# A match between a `DocPage` and a `MEntity`.
+class PageMatch
+       super NitxMatch
+
+       # `DocPage` matched.
+       var page: DocPage
+
+       redef fun make_list_item do
+               var page = self.page
+               if page isa MEntityPage then
+                       return page.mentity.cs_list_item
+               end
+               return " * {page.title}"
+       end
+end
+
+# Search in class or module hierarchy of a `MEntity`.
+#
+# It actually searches for pages about the mentity and extracts the
+# pre-calculated hierarchies by the `doc_post` phase.
+abstract class HierarchiesQuery
+       super DocQuery
+
+       redef fun make_results(nitx, results) do
+               var page = new DocPage("hierarchy", "Hierarchy")
+               for result in results do
+                       if not result isa PageMatch then continue
+                       var rpage = result.page
+                       if not rpage isa MClassPage then continue
+                       page.root.add_child build_article(rpage)
+               end
+               return page
+       end
+
+       # Build an article containing the hierarchy list depending on subclasses.
+       private fun build_article(page: MClassPage): DocArticle is abstract
+end
+
+# List all parents of a `MClass`.
+class AncestorsQuery
+       super HierarchiesQuery
+
+       redef fun build_article(page) do
+               return new MEntitiesListArticle(
+                       "ancerstors",
+                       "Ancestors for {page.mentity.name}",
+                       page.ancestors.to_a)
+       end
+end
+
+# List direct parents of a `MClass`.
+class ParentsQuery
+       super HierarchiesQuery
+
+       redef fun build_article(page) do
+               return new MEntitiesListArticle(
+                       "parents",
+                       "Parents for {page.mentity.name}",
+                       page.parents.to_a)
+       end
+end
+
+# List direct children of a `MClass`.
+class ChildrenQuery
+       super HierarchiesQuery
+
+       redef fun build_article(page) do
+               return new MEntitiesListArticle(
+                       "children",
+                       "Children for {page.mentity.name}",
+                       page.children.to_a)
+       end
+end
+
+# List all descendants of a `MClass`.
+class DescendantsQuery
+       super HierarchiesQuery
+
+       redef fun build_article(page) do
+               return new MEntitiesListArticle(
+                       "descendants",
+                       "Descendants for {page.mentity.name}",
+                       page.children.to_a)
+       end
+end
+
+# A query to search source code from a file name.
+class CodeQuery
+       super MetaQuery
+
+       # FIXME refactor this!
+       redef fun perform(nitx, doc) do
+               var res = new Array[NitxMatch]
+               var name = args.first
+               # if name is an existing sourcefile, opens it
+               if name.file_exists then
+                       var fr = new FileReader.open(name)
+                       var content = fr.read_all
+                       fr.close
+                       res.add new CodeMatch(self, name, content)
+                       return res
+               end
+               # else, lookup the model by name
+               for mentity in doc.mentities_by_name(name) do
+                       if mentity isa MClass then continue
+                       if mentity isa MProperty then continue
+                       res.add new CodeMatch(self, mentity.cs_location, mentity.cs_source_code)
+               end
+               return res
+       end
+
+       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))
+               end
+               return page
+       end
+end
+
+# A match between a piece of code and a string.
+class CodeMatch
+       super NitxMatch
+
+       # Location of the code match.
+       var location: String
+
+       # Piece of code matched.
+       var content: String
+
+       redef fun make_list_item do return "* {location}"
+end
+
+
 # A query that contains a nitx command.
 #
 # These commands are prefixed with `:` and are used to control the execution of
@@ -234,29 +517,38 @@ end
 
 ## exploration
 
-redef class DocModel
-
-       # Lists all MEntities in the model.
-       private var mentities: Collection[MEntity] is lazy do
-               var res = new HashSet[MEntity]
-               res.add_all mprojects
-               res.add_all mgroups
-               res.add_all mmodules
-               res.add_all mclasses
-               res.add_all mclassdefs
-               res.add_all mproperties
-               res.add_all mpropdefs
-               return res
+# Visitor looking for initialized `MType` (new T).
+#
+# See `NewQuery`.
+private class TypeInitVisitor
+       super Visitor
+
+       # `MType` name to look for.
+       var mtype_name: String
+
+       var inits = new HashSet[MType]
+       redef fun visit(node)
+       do
+               node.visit_all(self)
+               # look for init
+               if not node isa ANewExpr then return
+               var mtype = node.n_type.mtype
+               if mtype != null and mtype.name == mtype_name then inits.add(mtype)
        end
+end
 
-       # Search MEntities that match `name` by their name or namespace.
-       private fun search_mentities(name: String): Array[MEntity] do
-               var res = new Array[MEntity]
-               for mentity in mentities do
-                       if mentity.name != name and mentity.cs_namespace != name then continue
-                       res.add mentity
-               end
-               return res
+# Visitor looking for calls to a `MProperty` (new T).
+#
+# See `CallQuery`.
+private class MPropertyCallVisitor
+       super Visitor
+
+       var calls = new HashSet[MProperty]
+       redef fun visit(node)
+       do
+               node.visit_all(self)
+               if not node isa ASendExpr then return
+               calls.add node.callsite.mproperty
        end
 end
 
@@ -290,6 +582,24 @@ private class QueryResultArticle
        end
 end
 
+# An article that displays a piece of code.
+private class CodeQueryArticle
+       super DocArticle
+
+       # The query linked to the result to display.
+       var query: NitxQuery
+
+       # The result to display.
+       var result: CodeMatch
+
+       redef fun render_body do
+               addn ""
+               addn "in {result.location}".gray.bold
+               addn ""
+               add result.content
+       end
+end
+
 # A Pager is used to display data into a unix `less` container.
 private class Pager
 
index 53adeac..456d545 100644 (file)
@@ -146,4 +146,78 @@ redef class DocModel
                        end
                end
        end
+
+       # Lists all MEntities in the model.
+       #
+       # FIXME invalidate cache if `self` is modified.
+       var mentities: Collection[MEntity] is lazy do
+               var res = new HashSet[MEntity]
+               res.add_all mprojects
+               res.add_all mgroups
+               res.add_all mmodules
+               res.add_all mclasses
+               res.add_all mclassdefs
+               res.add_all mproperties
+               res.add_all mpropdefs
+               return res
+       end
+
+       # Searches MEntities that match `name`.
+       fun mentities_by_name(name: String): Array[MEntity] do
+               var res = new Array[MEntity]
+               for mentity in mentities do
+                       if mentity.name != name then continue
+                       res.add mentity
+               end
+               return res
+       end
+
+       # Looks up a MEntity by its `namespace`.
+       #
+       # Usefull when `mentities_by_name` by return conflicts.
+       #
+       # Path can be the shortest possible to disambiguise like `Class::property`.
+       # In case of larger conflicts, a more complex namespace can be given like
+       # `project::module::Class::prop`.
+       fun mentities_by_namespace(namespace: String): Array[MEntity] do
+               var res = new Array[MEntity]
+               for mentity in mentities do
+                       mentity.mentities_by_namespace(namespace, res)
+               end
+               return res
+       end
+end
+
+redef class MEntity
+       # Looks up a MEntity by its `namespace` from `self`.
+       private fun mentities_by_namespace(namespace: String, res: Array[MEntity]) do end
+
+       private fun lookup_in(mentities: Collection[MEntity], namespace: String, res: Array[MEntity]) do
+               var parts = namespace.split_once_on("::")
+               var name = parts.shift
+               for mentity in mentities do
+                       if mentity.name != name then continue
+                       if parts.is_empty then
+                               res.add mentity
+                       else
+                               mentity.mentities_by_namespace(parts.first, res)
+                       end
+               end
+       end
+end
+
+redef class MProject
+       redef fun mentities_by_namespace(namespace, res) do lookup_in(mgroups, namespace, res)
+end
+
+redef class MGroup
+       redef fun mentities_by_namespace(namespace, res) do lookup_in(mmodules, namespace, res)
+end
+
+redef class MModule
+       redef fun mentities_by_namespace(namespace, res) do lookup_in(mclassdefs, namespace, res)
+end
+
+redef class MClassDef
+       redef fun mentities_by_namespace(namespace, res) do lookup_in(mpropdefs, namespace, res)
 end
index 07b7c99..50a2aab 100644 (file)
@@ -36,7 +36,7 @@ class GraphPhase
 
        redef fun apply do
                if ctx.opt_nodot.value then return
-               for page in doc.pages do
+               for page in doc.pages.values do
                        var article = page.build_graph(self, doc)
                        if article == null then continue
                        # FIXME avoid diff
@@ -73,7 +73,7 @@ redef class MModulePage
                        end
                end
                op.append("\}\n")
-               return new GraphArticle(mentity, name, "Importation Graph", op)
+               return new GraphArticle("{mentity.nitdoc_id}.graph", "Importation Graph", name, op)
        end
 end
 
@@ -107,7 +107,7 @@ redef class MClassPage
                        end
                end
                op.append("\}\n")
-               return new GraphArticle(mentity, name, "Inheritance Graph", op)
+               return new GraphArticle("{mentity.nitdoc_id}.graph", "Inheritance Graph", name, op)
        end
 end
 
@@ -116,16 +116,14 @@ end
 # The graph is stored in dot format.
 # The final output is delayed untill rendering.
 class GraphArticle
-       super MEntityComposite
+       super DocArticle
 
        # Graph ID (used for outputing file with names).
-       var id: String
-
-       # Graph title to display.
-       var graph_title: String
+       var graph_id: String
 
        # Dot script of the graph.
        var dot: Text
 
-       redef var is_empty = false
+       redef var is_hidden = false
+       redef var is_toc_hidden = true
 end
index 5bfbfb1..fa9de2d 100644 (file)
@@ -26,7 +26,7 @@ class InheritanceListsPhase
        var name_sorter = new MEntityNameSorter
 
        redef fun apply do
-               for page in doc.pages do
+               for page in doc.pages.values do
                        if page isa MEntityPage then page.build_inh_list(self, doc)
                end
        end
@@ -40,14 +40,15 @@ end
 
 redef class MModulePage
        redef fun build_inh_list(v, doc) do
-               var section = new ImportationListSection(mentity)
-               var group = new PanelGroup("List")
+               var id = mentity.nitdoc_id
+               var section = new TabbedGroup("{id}.importation", "Dependencies")
+               var group = new PanelGroup("list.group", "List")
                var imports = self.imports.to_a
                v.name_sorter.sort(imports)
-               group.add_child new HierarchyListArticle(mentity, "Imports", imports)
+               group.add_child new MEntitiesListArticle("{id}.imports", "Imports", imports)
                var clients = self.clients.to_a
                v.name_sorter.sort(clients)
-               group.add_child new HierarchyListArticle(mentity, "Clients", clients)
+               group.add_child new MEntitiesListArticle("{id}.clients", "Clients", clients)
                section.add_child group
                section.parent = root.children.first
                root.children.first.children.insert(section, 1)
@@ -56,45 +57,23 @@ end
 
 redef class MClassPage
        redef fun build_inh_list(v, doc) do
-               var section = new InheritanceListSection(mentity)
-               var group = new PanelGroup("List")
+               var id = mentity.nitdoc_id
+               var section = new TabbedGroup("{id}.inheritance", "Inheritance")
+               var group = new PanelGroup("list.group", "List")
                var parents = self.parents.to_a
                v.name_sorter.sort(parents)
-               group.add_child new HierarchyListArticle(mentity, "Parents", parents)
+               group.add_child new MEntitiesListArticle("{id}.parents", "Parents", parents)
                var ancestors = self.ancestors.to_a
                v.name_sorter.sort(ancestors)
-               group.add_child new HierarchyListArticle(mentity, "Ancestors", ancestors)
+               group.add_child new MEntitiesListArticle("{id}.ancestors", "Ancestors", ancestors)
                var children = self.children.to_a
                v.name_sorter.sort(children)
-               group.add_child new HierarchyListArticle(mentity, "Children", children)
+               group.add_child new MEntitiesListArticle("{id}.children", "Children", children)
                var descendants = self.descendants.to_a
                v.name_sorter.sort(descendants)
-               group.add_child new HierarchyListArticle(mentity, "Descendants", descendants)
+               group.add_child new MEntitiesListArticle("{id}.descendants", "Descendants", descendants)
                section.add_child group
                section.parent = root.children.first
                root.children.first.children.insert(section, 1)
        end
 end
-
-# FIXME diff hack
-class ImportationListSection
-       super TabbedGroup
-       super MEntityComposite
-end
-
-# FIXME diff hack
-class InheritanceListSection
-       super TabbedGroup
-       super MEntityComposite
-end
-
-# Dislay a hierarchical list of mentities.
-class HierarchyListArticle
-       super MEntityArticle
-
-       # Title displayed in the top of this list.
-       var list_title: String
-
-       # MEntities to display in this list.
-       var mentities: Array[MEntity]
-end
index 156a650..6532a1d 100644 (file)
@@ -104,7 +104,7 @@ class RenderHTMLPhase
 
        redef fun apply do
                init_output_dir
-               for page in doc.pages do
+               for page in doc.pages.values do
                        page.render(self, doc).write_to_file("{ctx.output_dir.to_s}/{page.html_url}")
                end
        end
@@ -187,7 +187,7 @@ redef class DocPage
        # all properties below are roughly copied from `doc_pages`
 
        # Build page title string
-       fun init_title(v: RenderHTMLPhase, doc: DocModel) is abstract
+       fun init_title(v: RenderHTMLPhase, doc: DocModel) do end
 
        # Build top menu template if any.
        fun init_topmenu(v: RenderHTMLPhase, doc: DocModel) do
@@ -302,8 +302,8 @@ redef class MModulePage
                # TODO filter here?
                super
                var mclasses = new HashSet[MClass]
-               mclasses.add_all mentity.filter_intro_mclasses(v.ctx.min_visibility)
-               mclasses.add_all mentity.filter_redef_mclasses(v.ctx.min_visibility)
+               mclasses.add_all mentity.collect_intro_mclasses(v.ctx.min_visibility)
+               mclasses.add_all mentity.collect_redef_mclasses(v.ctx.min_visibility)
                if mclasses.is_empty then return
                var list = new UnorderedList
                list.css_classes.add "list-unstyled list-labeled"
@@ -372,7 +372,7 @@ redef class MClassPage
                if not mprop_is_local(mprop) then
                        classes.add "inherit"
                        var cls_url = mprop.intro.mclassdef.mclass.nitdoc_url
-                       var def_url = "{cls_url}#article:{mprop.nitdoc_id}.definition"
+                       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
@@ -388,7 +388,7 @@ redef class MClassPage
                end
                var def = select_mpropdef(mprop)
                var anc = def.html_link_to_anchor
-               anc.href = "#article:{def.nitdoc_id}.definition"
+               anc.href = "#{def.nitdoc_id}.definition"
                var lnk = new Template
                lnk.add new DocHTMLLabel.with_classes(classes)
                lnk.add anc
@@ -410,8 +410,8 @@ redef class MClassPage
 
        private fun mclass_inherited_mprops(v: RenderHTMLPhase, doc: DocModel): Set[MProperty] do
                var res = new HashSet[MProperty]
-               var local = mentity.local_mproperties(v.ctx.min_visibility)
-               for mprop in mentity.inherited_mproperties(doc.mainmodule, v.ctx.min_visibility) do
+               var local = mentity.collect_local_mproperties(v.ctx.min_visibility)
+               for mprop in mentity.collect_inherited_mproperties(v.ctx.min_visibility) do
                        if local.has(mprop) then continue
                        #if mprop isa MMethod and mprop.is_init then continue
                        if mprop.intro.mclassdef.mclass.name == "Object" and
@@ -471,7 +471,7 @@ redef class MEntitySection
                        title.add mentity.html_signature
                        html_title = title
                        html_subtitle = mentity.html_namespace
-                       toc_title = mentity.html_name
+                       html_toc_title = mentity.html_name
                end
                super
        end
@@ -484,16 +484,16 @@ redef class ConcernSection
                var mentity = self.mentity
                if page isa MGroupPage then
                        html_title = null
-                       toc_title = mentity.html_name
+                       html_toc_title = mentity.html_name
                        is_toc_hidden = false
                else if page.mentity isa MModule and mentity isa MModule then
                        var title = new Template
                        if mentity == page.mentity then
                                title.add "in "
-                               toc_title = "in {mentity.html_name}"
+                               html_toc_title = "in {mentity.html_name}"
                        else
                                title.add "from "
-                               toc_title = "from {mentity.html_name}"
+                               html_toc_title = "from {mentity.html_name}"
                        end
                        title.add mentity.html_namespace
                        html_title = title
@@ -503,7 +503,7 @@ redef class ConcernSection
                        title.add "in "
                        title.add mentity.html_namespace
                        html_title = title
-                       toc_title = "in {mentity.html_name}"
+                       html_toc_title = "in {mentity.html_name}"
                end
                super
        end
@@ -532,7 +532,7 @@ redef class DefinitionArticle
                        title.add mentity.html_icon
                        title.add mentity.html_namespace
                        html_title = title
-                       toc_title = mentity.html_name
+                       html_toc_title = mentity.html_name
                        if mentity isa MModule then
                                html_source_link = v.html_source_link(mentity.location)
                        end
@@ -542,7 +542,7 @@ redef class DefinitionArticle
                        title.add mentity.mmodule.html_namespace
                        html_title = mentity.html_declaration
                        html_subtitle = title
-                       toc_title = "in {mentity.html_name}"
+                       html_toc_title = "in {mentity.html_name}"
                        html_source_link = v.html_source_link(mentity.location)
                        if page isa MEntityPage and mentity.is_intro and mentity.mmodule != page.mentity then
                                is_short_comment = true
@@ -555,13 +555,13 @@ redef class DefinitionArticle
                                title.add mentity.html_declaration
                                html_title = title
                                html_subtitle = mentity.html_namespace
-                               toc_title = mentity.html_name
+                               html_toc_title = mentity.html_name
                        else
                                var title = new Template
                                title.add "in "
                                title.add mentity.mclassdef.html_link
                                html_title = title
-                               toc_title = "in {mentity.mclassdef.html_name}"
+                               html_toc_title = "in {mentity.mclassdef.html_name}"
                        end
                        html_source_link = v.html_source_link(mentity.location)
                end
@@ -576,7 +576,7 @@ redef class HomeArticle
        redef fun init_html_render(v, doc, page) do
                if v.ctx.opt_custom_title.value != null then
                        self.html_title = v.ctx.opt_custom_title.value.to_s
-                       self.toc_title = v.ctx.opt_custom_title.value.to_s
+                       self.html_toc_title = v.ctx.opt_custom_title.value.to_s
                end
                self.content = v.ctx.opt_custom_intro.value
                super
@@ -586,7 +586,7 @@ end
 redef class GraphArticle
        redef fun init_html_render(v, doc, page) do
                var output_dir = v.ctx.output_dir
-               var path = output_dir / id
+               var path = output_dir / graph_id
                var path_sh = path.escape_to_sh
                var file = new FileWriter.open("{path}.dot")
                file.write(dot)
index 72df73c..1e74138 100644 (file)
@@ -43,7 +43,7 @@ class IndexingPhase
                                if not doc.mpropdefs.has(mpropdef) then continue
                                var full_name = mpropdef.mclassdef.mclass.full_name
                                var cls_url = mpropdef.mclassdef.mclass.nitdoc_url
-                               var def_url = "{cls_url}#article:{mpropdef.nitdoc_id}.definition"
+                               var def_url = "{cls_url}#{mpropdef.nitdoc_id}.definition"
                                add_result_for(mproperty.name, full_name, def_url)
                        end
                end
index 54f7c18..abc4f1d 100644 (file)
 module doc_intros_redefs
 
 import doc_structure
+import model::model_collect
 
 # Computes intro / redef mentity list for each DefinitionArticle.
 class IntroRedefListPhase
        super DocPhase
 
        redef fun apply do
-               for page in doc.pages do
+               for page in doc.pages.values do
                        if not page isa MEntityPage then continue
                        page.root.build_intro_redef_list(self, doc, page)
                end
@@ -54,52 +55,33 @@ redef class DefinitionArticle
 
        # TODO this should move to MEntity?
        private fun build_mmodule_list(v: IntroRedefListPhase, doc: DocModel, mmodule: MModule) do
-               var section = new IntrosRedefsSection(mentity)
-               var group = new PanelGroup("List")
-               var intros = mmodule.intro_mclassdefs(v.ctx.min_visibility).to_a
+               var section = new TabbedGroup("{mentity.nitdoc_id}.intros_redefs")
+               section.toc_title = "Intros / Redefs"
+               var group = new PanelGroup("list.group", "List")
+               var intros = mmodule.collect_intro_mclassdefs(v.ctx.min_visibility).to_a
                doc.mainmodule.linearize_mclassdefs(intros)
-               group.add_child new IntrosRedefsListArticle(mentity, "Introduces", intros)
-               var redefs = mmodule.redef_mclassdefs(v.ctx.min_visibility).to_a
+               group.add_child new MEntitiesListArticle("{mentity.nitdoc_id}.intros", "Introduces", intros)
+               var redefs = mmodule.collect_redef_mclassdefs(v.ctx.min_visibility).to_a
                doc.mainmodule.linearize_mclassdefs(redefs)
-               group.add_child new IntrosRedefsListArticle(mentity, "Redefines", redefs)
+               group.add_child new MEntitiesListArticle("{mentity.nitdoc_id}.redefs", "Redefines", redefs)
                section.add_child group
                add_child(section)
        end
 
        # TODO this should move to MEntity?
        private fun build_mclassdef_list(v: IntroRedefListPhase, doc: DocModel, mclassdef: MClassDef) do
-               var section = new IntrosRedefsSection(mentity)
-               var group = new PanelGroup("List")
+               var section = new TabbedGroup("{mentity.nitdoc_id}.intros_redefs")
+               section.toc_title = "Intros / Redefs"
+               var group = new PanelGroup("list.group", "List")
                var intros = mclassdef.collect_intro_mpropdefs(v.ctx.min_visibility).to_a
                # FIXME avoid diff changes
                # v.ctx.mainmodule.linearize_mpropdefs(intros)
-               group.add_child new IntrosRedefsListArticle(mentity, "Introduces", intros)
+               group.add_child new MEntitiesListArticle("{mentity.nitdoc_id}.intros", "Introduces", intros)
                var redefs = mclassdef.collect_redef_mpropdefs(v.ctx.min_visibility).to_a
                # FIXME avoid diff changes
                # v.ctx.mainmodule.linearize_mpropdefs(redefs)
-               group.add_child new IntrosRedefsListArticle(mentity, "Redefines", redefs)
+               group.add_child new MEntitiesListArticle("{mentity.nitdoc_id}.redefs", "Redefines", redefs)
                section.add_child group
                add_child(section)
        end
-
-end
-
-# Section that contains the intros and redefs lists.
-class IntrosRedefsSection
-       super TabbedGroup
-       super MEntitySection
-end
-
-# An article that displays a list of introduced / refined mentities.
-#
-# FIXME diff hack
-# This can merged with InheritanceListArticle in a more generic class.
-class IntrosRedefsListArticle
-       super MEntityArticle
-
-       # Title displayed as header of the list.
-       var list_title: String
-
-       # Intro mentities to list.
-       var mentities: Array[MEntity]
 end
index eda76ba..7864b27 100644 (file)
@@ -25,7 +25,7 @@ class LinListPhase
        private var lin_sorter = new MEntityNameSorter
 
        redef fun apply do
-               for page in doc.pages do page.apply_linearization(self, doc)
+               for page in doc.pages.values do page.apply_linearization(self, doc)
        end
 end
 
@@ -73,7 +73,7 @@ redef class DefinitionArticle
                var lin = all_defs.to_a
                doc.mainmodule.linearize_mpropdefs(lin)
                if lin.length > 1 then
-                       add_child new DefinitionLinArticle(mentity, lin)
+                       add_child new DefinitionLinArticle("{mentity.nitdoc_id}.lin", "Linearization", lin)
                end
        end
 
@@ -93,8 +93,11 @@ end
 
 # Display a linearized list of definitions.
 class DefinitionLinArticle
-       super MEntityArticle
+       super DocArticle
 
        # The linearized list to display.
        var mentities: Array[MEntity]
+
+       redef fun is_hidden do return mentities.is_empty
+       redef var is_toc_hidden = true
 end
index e468cb6..3f83001 100644 (file)
@@ -23,19 +23,19 @@ class MakePagePhase
 
        # Instanciates documentation pages for the given DocModel.
        redef fun apply do
-               doc.pages.add new OverviewPage("Overview")
-               doc.pages.add new SearchPage("Index")
+               doc.add_page new OverviewPage("overview", "Overview")
+               doc.add_page new SearchPage("search", "Index")
                for mgroup in doc.mgroups do
-                       doc.pages.add new MGroupPage(mgroup.nitdoc_name, mgroup)
+                       doc.add_page new MGroupPage(mgroup)
                end
                for mmodule in doc.mmodules do
-                       doc.pages.add new MModulePage(mmodule.nitdoc_name, mmodule)
+                       doc.add_page new MModulePage(mmodule)
                end
                for mclass in doc.mclasses do
-                       doc.pages.add new MClassPage(mclass.nitdoc_name, mclass)
+                       doc.add_page new MClassPage(mclass)
                end
                for mproperty in doc.mproperties do
-                       doc.pages.add new MPropertyPage(mproperty.nitdoc_name, mproperty)
+                       doc.add_page new MPropertyPage(mproperty)
                end
        end
 end
@@ -52,6 +52,7 @@ end
 
 # A DocPage documenting a MEntity.
 class MEntityPage
+       autoinit mentity
        super DocPage
 
        # Type of MEntity documented by this page.
@@ -59,6 +60,9 @@ class MEntityPage
 
        # MEntity documented by this page.
        var mentity: MENTITY
+
+       redef var id is lazy do return mentity.nitdoc_id
+       redef var title is lazy do return mentity.nitdoc_name
 end
 
 # A documentation page about a MGroup.
index fd38e0f..316438e 100644 (file)
@@ -16,6 +16,7 @@
 module doc_poset
 
 import doc_pages
+import model::model_collect
 
 # This phase computes importation and inheritance POSet for pages.
 class POSetPhase
@@ -23,7 +24,7 @@ class POSetPhase
 
        # Populates the given DocModel.
        redef fun apply do
-               for page in doc.pages do
+               for page in doc.pages.values do
                        if page isa MEntityPage then page.build_poset(self, doc)
                end
        end
@@ -46,7 +47,7 @@ redef class MModulePage
        # Imported modules that should appear in the documentation.
        var imports = new HashSet[MModule]
 
-       # Clients modules that shjould appear in the documentation.
+       # Clients modules that should appear in the documentation.
        var clients = new HashSet[MModule]
 
        redef fun build_poset(v, doc) do
@@ -82,7 +83,10 @@ redef class MModulePage
                end
                # make poset
                var mmodules = new HashSet[MModule]
-               mmodules.add_all mentity.nested_mmodules
+               var mgroup = mentity.mgroup
+               if mgroup != null and mgroup.default_mmodule == mentity then
+                       mmodules.add_all mgroup.mmodules
+               end
                mmodules.add_all imports
                if clients.length < 10 then mmodules.add_all clients
                mmodules.add mentity
index 507a0a4..96bc219 100644 (file)
@@ -33,7 +33,7 @@ class StructurePhase
 
        # Populates the given DocModel.
        redef fun apply do
-               for page in doc.pages do page.apply_structure(self, doc)
+               for page in doc.pages.values do page.apply_structure(self, doc)
        end
 end
 
@@ -47,15 +47,15 @@ end
 
 redef class OverviewPage
        redef fun apply_structure(v, doc) do
-               var article = new HomeArticle
+               var article = new HomeArticle("home.article", "Home")
                root.add_child article
                # Projects list
                var mprojects = doc.model.mprojects.to_a
                var sorter = new MConcernRankSorter
                sorter.sort mprojects
-               var section = new ProjectsSection
+               var section = new DocSection("projects.section", "Projects")
                for mproject in mprojects do
-                       section.add_child new DefinitionArticle(mproject)
+                       section.add_child new DefinitionArticle("{mproject.nitdoc_id}.definition", mproject)
                end
                article.add_child section
        end
@@ -69,18 +69,18 @@ redef class SearchPage
                v.name_sorter.sort(mclasses)
                var mprops = doc.mproperties.to_a
                v.name_sorter.sort(mprops)
-               root.add_child new IndexArticle(mmodules, mclasses, mprops)
+               root.add_child new IndexArticle("index.article", mmodules, mclasses, mprops)
        end
 end
 
 redef class MGroupPage
        redef fun apply_structure(v, doc) do
-               var section = new MEntitySection(mentity)
+               var section = new MEntitySection("{mentity.nitdoc_name}.section", mentity)
                root.add_child section
                if mentity.is_root then
-                       section.add_child new IntroArticle(mentity.mproject)
+                       section.add_child new IntroArticle("{mentity.mproject.nitdoc_id}.intro", mentity.mproject)
                else
-                       section.add_child new IntroArticle(mentity)
+                       section.add_child new IntroArticle("{mentity.nitdoc_id}.intro", mentity)
                end
                var concerns = self.concerns
                if concerns == null or concerns.is_empty then return
@@ -90,11 +90,11 @@ redef class MGroupPage
                concerns.sort_with(v.concerns_sorter)
                mentity.mproject.booster_rank = 0
                mentity.booster_rank = 0
-               section.add_child new ConcernsArticle(mentity, concerns)
+               section.add_child new ConcernsArticle("{mentity.nitdoc_id}.concerns", mentity, concerns)
                for mentity in concerns do
-                       var ssection = new ConcernSection(mentity)
+                       var ssection = new ConcernSection("{mentity.nitdoc_id}.concern", mentity)
                        if mentity isa MModule then
-                               ssection.add_child new DefinitionArticle(mentity)
+                               ssection.add_child new DefinitionArticle("{mentity.nitdoc_id}.definition", mentity)
                        end
                        section.add_child ssection
                end
@@ -103,9 +103,9 @@ end
 
 redef class MModulePage
        redef fun apply_structure(v, doc) do
-               var section = new MEntitySection(mentity)
+               var section = new MEntitySection("{mentity.nitdoc_name}.section", mentity)
                root.add_child section
-               section.add_child new IntroArticle(mentity)
+               section.add_child new IntroArticle("{mentity.nitdoc_id}.intro", mentity)
                var concerns = self.concerns
                if concerns == null or concerns.is_empty then return
                # FIXME avoid diff
@@ -116,22 +116,25 @@ redef class MModulePage
                mentity.mgroup.mproject.booster_rank = 0
                mentity.mgroup.booster_rank = 0
                mentity.booster_rank = 0
-               section.add_child new ConcernsArticle(mentity, concerns)
+               section.add_child new ConcernsArticle("{mentity.nitdoc_id}.concerns", mentity, concerns)
                # reference list
                for mentity in concerns do
-                       var ssection = new ConcernSection(mentity)
+                       var ssection = new ConcernSection("{mentity.nitdoc_id}.concern", mentity)
                        if mentity isa MModule then
                                var mclasses = mclasses_for_mmodule(mentity).to_a
                                v.name_sorter.sort(mclasses)
                                for mclass in mclasses do
-                                       var article = new DefinitionListArticle(mclass)
+                                       var article = new DefinitionListArticle(
+                                               "{mclass.intro.nitdoc_id}.definition-list", mclass)
                                        var mclassdefs = mclassdefs_for(mclass).to_a
                                        if not mclassdefs.has(mclass.intro) then
-                                               article.add_child(new DefinitionArticle(mclass.intro))
+                                               article.add_child(new DefinitionArticle(
+                                                       "{mclass.intro.nitdoc_id}.definition", mclass.intro))
                                        end
                                        doc.mainmodule.linearize_mclassdefs(mclassdefs)
                                        for mclassdef in mclassdefs do
-                                               article.add_child(new DefinitionArticle(mclassdef))
+                                               article.add_child(new DefinitionArticle(
+                                                       "{mclassdef.nitdoc_id}.definition", mclassdef))
                                        end
                                        ssection.add_child article
                                end
@@ -165,9 +168,9 @@ end
 
 redef class MClassPage
        redef fun apply_structure(v, doc) do
-               var section = new MEntitySection(mentity)
+               var section = new MEntitySection("{mentity.nitdoc_name}.section", mentity)
                root.add_child section
-               section.add_child new IntroArticle(mentity)
+               section.add_child new IntroArticle("{mentity.nitdoc_id}.intro", mentity)
                var concerns = self.concerns
                if concerns == null or concerns.is_empty then return
                # FIXME diff hack
@@ -178,15 +181,15 @@ redef class MClassPage
                mentity.intro_mmodule.mgroup.mproject.booster_rank = 0
                mentity.intro_mmodule.mgroup.booster_rank = 0
                mentity.intro_mmodule.booster_rank = 0
-               var constructors = new ConstructorsSection(mentity)
+               var constructors = new DocSection("{mentity.nitdoc_id}.constructors", "Constructors")
                var minit = mentity.root_init
                if minit != null then
-                       constructors.add_child new DefinitionArticle(minit)
+                       constructors.add_child new DefinitionArticle("{minit.nitdoc_id}.definition", minit)
                end
                section.add_child constructors
-               section.add_child new ConcernsArticle(mentity, concerns)
+               section.add_child new ConcernsArticle("{mentity.nitdoc_id}.concerns", mentity, concerns)
                for mentity in concerns do
-                       var ssection = new ConcernSection(mentity)
+                       var ssection = new ConcernSection("{mentity.nitdoc_id}.concern", mentity)
                        if mentity isa MModule then
                                var mprops = mproperties_for(mentity)
                                var by_kind = new PropertiesByKind.with_elements(mprops)
@@ -196,9 +199,11 @@ redef class MClassPage
                                                for mpropdef in mpropdefs_for(mprop, mentity) do
                                                        if mpropdef isa MMethodDef and mpropdef.mproperty.is_init then
                                                                if mpropdef == minit then continue
-                                                               constructors.add_child new DefinitionArticle(mpropdef)
+                                                               constructors.add_child new DefinitionArticle(
+                                                                       "{mpropdef.nitdoc_id}.definition", mpropdef)
                                                        else
-                                                               ssection.add_child new DefinitionArticle(mpropdef)
+                                                               ssection.add_child new DefinitionArticle(
+                                                                       "{mpropdef.nitdoc_id}.definition", mpropdef)
                                                        end
                                                end
                                        end
@@ -238,9 +243,9 @@ end
 
 redef class MPropertyPage
        redef fun apply_structure(v, doc) do
-               var section = new MEntitySection(mentity)
+               var section = new MEntitySection("{mentity.nitdoc_name}.section", mentity)
                root.add_child section
-               section.add_child new IntroArticle(mentity)
+               section.add_child new IntroArticle("{mentity.nitdoc_id}.intro", mentity)
                var concerns = self.concerns
                if concerns == null or concerns.is_empty then return
                # FIXME diff hack
@@ -251,15 +256,16 @@ redef class MPropertyPage
                mentity.intro.mclassdef.mmodule.mgroup.mproject.booster_rank = 0
                mentity.intro.mclassdef.mmodule.mgroup.booster_rank = 0
                mentity.intro.mclassdef.mmodule.booster_rank = 0
-               section.add_child new ConcernsArticle(mentity, concerns)
+               section.add_child new ConcernsArticle("{mentity.nitdoc_id}.concerns", mentity, concerns)
                for mentity in concerns do
-                       var ssection = new ConcernSection(mentity)
+                       var ssection = new ConcernSection("{mentity.nitdoc_id}.concern", mentity)
                        if mentity isa MModule then
                                # Add mproperties
                                var mpropdefs = mpropdefs_for(mentity).to_a
                                v.name_sorter.sort(mpropdefs)
                                for mpropdef in mpropdefs do
-                                       ssection.add_child new DefinitionArticle(mpropdef)
+                                       ssection.add_child new DefinitionArticle(
+                                               "{mpropdef.nitdoc_id}.definition", mpropdef)
                                end
                        end
                        section.add_child ssection
@@ -288,30 +294,26 @@ end
 # A group of sections that can be displayed together in a tab panel.
 class PanelGroup
        super DocSection
-
-       # The title of this group.
-       var group_title: String
 end
 
 # A DocComposite element about a MEntity.
 class MEntityComposite
        super DocComposite
 
+       redef fun title do return mentity.nitdoc_name
+
        # MEntity documented by this page element.
        var mentity: MEntity
 end
 
-# A list of constructors.
-class ConstructorsSection
-       super MEntitySection
-end
-
 # A Section about a Concern.
 #
 # Those sections are used to build the page summary.
 class ConcernSection
        super MEntityComposite
        super DocSection
+
+       redef fun is_toc_hidden do return is_hidden
 end
 
 # An article about a Mentity.
@@ -322,6 +324,17 @@ abstract class MEntityArticle
        super DocArticle
 end
 
+# An article that displays a list of mentities.
+class MEntitiesListArticle
+       super DocArticle
+
+       # MEntities to display.
+       var mentities: Array[MEntity]
+
+       redef fun is_hidden do return mentities.is_empty
+end
+
+
 # A section about a Mentity.
 #
 # Used to regroup content about a MEntity.
@@ -336,6 +349,9 @@ end
 class IntroArticle
        super MEntityComposite
        super DocArticle
+
+       redef var is_hidden = false
+       redef var is_toc_hidden = true
 end
 
 # An article that display a ConcernsTreee as a list.
@@ -344,9 +360,11 @@ class ConcernsArticle
 
        # Concerns to list in this article.
        var concerns: ConcernsTree
+
+       redef fun is_hidden do return concerns.is_empty
 end
 
-# An article that displaus a list of definition belonging to a MEntity.
+# An article that displays a list of definition belonging to a MEntity.
 class DefinitionListArticle
        super TabbedGroup
        super MEntityArticle
@@ -355,6 +373,8 @@ end
 # An article that display the definition text of a MEntity.
 class DefinitionArticle
        super MEntityArticle
+
+       redef var is_hidden = false
 end
 
 # The main project article.
@@ -362,11 +382,6 @@ class HomeArticle
        super DocArticle
 end
 
-# The project list.
-class ProjectsSection
-       super DocArticle
-end
-
 # An article that display an index of mmodules, mclasses and mproperties.
 class IndexArticle
        super DocArticle
@@ -379,4 +394,80 @@ class IndexArticle
 
        # List of mproperties to display.
        var mprops: Array[MProperty]
+
+       redef fun is_hidden do
+               return mmodules.is_empty and mclasses.is_empty and mprops.is_empty
+       end
+end
+
+# Concerns ranking
+
+# Sort MConcerns based on the module importation hierarchy ranking
+# see also: `MConcern::concern_rank` and `MConcern::booster_rank`
+#
+# Comparison is made with the formula:
+#
+# ~~~nitish
+# a.concern_rank + a.booster_rank <=> b.concern_rank + b.booster_ran
+# ~~~
+#
+# If both `a` and `b` have the same ranking,
+# ordering is based on lexicographic comparison of `a.name` and `b.name`
+class MConcernRankSorter
+       super Comparator
+       redef type COMPARED: MConcern
+
+       redef fun compare(a, b) do
+               if a.concern_rank == b.concern_rank then
+                       return a.name <=> b.name
+               end
+               return a.concern_rank + a.booster_rank <=> b.concern_rank + b.booster_rank
+       end
+end
+
+redef class MConcern
+
+       # Boost a MConcern rank
+       # see: `MConcernRankSorter`
+       # Use a positive booster to push down a result in the list
+       # A negative booster can be used to push up the result
+       var booster_rank: Int = 0 is writable
+
+       # Concern ranking used for ordering
+       # see: `MConcernRankSorter`
+       # Rank can be positive or negative
+       fun concern_rank: Int is abstract
+end
+
+redef class MProject
+       redef var concern_rank is lazy do
+               var max = 0
+               for mgroup in mgroups do
+                       var mmax = mgroup.concern_rank
+                       if mmax > max then max = mmax
+               end
+               return max + 1
+       end
+end
+
+redef class MGroup
+       redef var concern_rank is lazy do
+               var max = 0
+               for mmodule in mmodules do
+                       var mmax = mmodule.concern_rank
+                       if mmax > max then max = mmax
+               end
+               return max + 1
+       end
+end
+
+redef class MModule
+       redef var concern_rank is lazy do
+               var max = 0
+               for p in in_importation.direct_greaters do
+                       var pmax = p.concern_rank
+                       if pmax > max then max = pmax
+               end
+               return max + 1
+       end
 end
index cd6974c..b5ccd96 100644 (file)
@@ -20,19 +20,9 @@ import doc_down
 import html_components
 import html::bootstrap
 import ordered_tree
+import model::model_collect
 
 redef class MEntity
-       # ID used as a HTML unique ID and in file names.
-       #
-       # **Must** match the following (POSIX ERE) regular expression:
-       #
-       # ~~~POSIX ERE
-       # ^[A-Za-z_][A-Za-z0-9._-]*$
-       # ~~~
-       #
-       # That way, the ID is always a valid URI component and a valid XML name.
-       fun nitdoc_id: String is abstract
-
        # URL of this entity’s Nitdoc page.
        fun nitdoc_url: String is abstract
 
@@ -341,8 +331,8 @@ redef class MClassDef
        redef fun css_classes do
                var set = new HashSet[String]
                if is_intro then set.add "intro"
-               for m in mclass.intro.modifiers do set.add m.to_cmangle
-               for m in modifiers do set.add m.to_cmangle
+               for m in mclass.intro.collect_modifiers do set.add m.to_cmangle
+               for m in collect_modifiers do set.add m.to_cmangle
                return set.to_a
        end
 end
@@ -432,8 +422,8 @@ redef class MPropDef
        redef fun css_classes do
                var set = new HashSet[String]
                if is_intro then set.add "intro"
-               for m in mproperty.intro.modifiers do set.add m.to_cmangle
-               for m in modifiers do set.add m.to_cmangle
+               for m in mproperty.intro.collect_modifiers do set.add m.to_cmangle
+               for m in collect_modifiers do set.add m.to_cmangle
                return set.to_a
        end
 end
@@ -697,7 +687,7 @@ redef class MConcern
        private fun html_concern_item: ListItem do
                var lnk = html_link
                var tpl = new Template
-               tpl.add new Link.with_title("#concern:{nitdoc_id}", lnk.text, lnk.title)
+               tpl.add new Link.with_title("#{nitdoc_id}.concern", lnk.text, lnk.title)
                var comment = html_short_comment
                if comment != null then
                        tpl.add ": "
index ed680f0..8849fb3 100644 (file)
@@ -247,12 +247,12 @@ redef class DocComposite
        super Template
 
        # HTML anchor id
-       var html_id: String is noinit, writable
+       var html_id: String is writable, lazy do return id
 
        # Title to display if any.
        #
        # This title can be decorated with HTML.
-       var html_title: nullable Writable is noinit, writable
+       var html_title: nullable Writable is writable, lazy do return title
 
        # Subtitle to display if any.
        var html_subtitle: nullable Writable is noinit, writable
@@ -286,26 +286,20 @@ redef class DocComposite
        # Level <hX> for HTML heading.
        private fun hlvl: Int do return depth
 
-       # Is `self` not displayed in the page.
-       #
-       # By default, empty elements are hidden.
-       fun is_hidden: Bool do return is_empty
-
        # A short, undecorated title that goes in the table of contents.
        #
        # By default, returns `html_title.to_s`, subclasses should redefine it.
-       var toc_title: String is lazy, writable do return html_title.to_s
-
-       # Is `self` hidden in the table of content?
-       var is_toc_hidden = false is writable
+       var html_toc_title: nullable String is lazy, writable do
+               if html_title == null then return toc_title
+               return html_title.write_to_string
+       end
 
        # Render this element in a table of contents.
        private fun render_toc_item(lst: UnorderedList) do
-               if is_toc_hidden then return
+               if is_toc_hidden or html_toc_title == null then return
 
                var content = new Template
-               content.add new Link("#{html_id}", toc_title)
-
+               content.add new Link("#{html_id}", html_toc_title.to_s)
                if not children.is_empty then
                        var sublst = new UnorderedList
                        sublst.css_classes.add "nav"
@@ -327,6 +321,12 @@ redef class DocComposite
        end
 end
 
+redef class DocRoot
+       redef fun rendering do
+               for child in children do addn child.write_to_string
+       end
+end
+
 redef class DocSection
        super BSComponent
 
@@ -359,21 +359,20 @@ redef class TabbedGroup
                var tabs = new DocTabs("{html_id}.tabs", "")
                for child in children do
                        if child.is_hidden then continue
-                       tabs.add_panel new DocTabPanel(child.html_tab_id, child.toc_title, child)
+                       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
 
 redef class PanelGroup
-       redef var html_id is lazy do return "group:{group_title.to_lower.to_snake_case}"
        redef var html_title = null
-       redef var toc_title is lazy do return group_title
+       redef var toc_title is lazy do return title or else ""
        redef var is_toc_hidden = true
 end
 
 redef class HomeArticle
-       redef var html_id = "article:home"
        redef var html_title = "Overview"
 
        # HTML content to display on the home page.
@@ -389,11 +388,7 @@ redef class HomeArticle
 end
 
 redef class IndexArticle
-       redef var html_id = "article:index"
        redef var html_title = "Index"
-       redef fun is_empty do
-               return mmodules.is_empty and mclasses.is_empty and mprops.is_empty
-       end
 
        redef fun render_body do
                addn "<div class='container-fluid'>"
@@ -428,50 +423,21 @@ redef class IndexArticle
        end
 end
 
-redef class ProjectsSection
-       redef var html_id = "section:projects"
-       redef var html_title = "Projects"
-end
-
 redef class MEntityComposite
-       redef var html_id is lazy do return mentity.nitdoc_id
        redef var html_title is lazy do return mentity.nitdoc_name
 end
 
 redef class MEntitySection
-       redef var html_id is lazy do return "section:{mentity.nitdoc_name}"
        redef var html_title is lazy do return mentity.html_name
        redef var html_subtitle is lazy do return mentity.html_declaration
 end
 
-redef class ConstructorsSection
-       redef var html_id is lazy do return "article:{mentity.nitdoc_id}.constructors"
-       redef var html_title = "Constructors"
-       redef var html_subtitle = null
-       redef fun is_toc_hidden do return is_empty
-end
-
 redef class ConcernSection
-       redef var html_id is lazy do return "concern:{mentity.nitdoc_id}"
        redef var html_title is lazy do return "in {mentity.nitdoc_name}"
-       redef fun is_toc_hidden do return is_empty
-end
-
-redef class ImportationListSection
-       redef var html_id is lazy do return "section:{mentity.nitdoc_id}.importation"
-       redef var html_title is lazy do return "Dependencies"
-end
-
-redef class InheritanceListSection
-       redef var html_id is lazy do return "section:{mentity.nitdoc_id}.inheritance"
-       redef var html_title is lazy do return "Inheritance"
 end
 
 redef class IntroArticle
-       redef var html_id is lazy do return "article:{mentity.nitdoc_id}.intro"
        redef var html_title = null
-       redef var is_hidden = false
-       redef var is_toc_hidden = true
 
        # Link to source to display if any.
        var html_source_link: nullable Writable is noinit, writable
@@ -484,7 +450,8 @@ redef class IntroArticle
                end
                for child in children do
                        if child.is_hidden then continue
-                       tabs.add_panel new DocTabPanel(child.html_tab_id, child.toc_title, child)
+                       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
                var lnk = html_source_link
                if lnk != null then
@@ -495,15 +462,11 @@ redef class IntroArticle
 end
 
 redef class ConcernsArticle
-       redef var html_id is lazy do return "article:{mentity.nitdoc_id}.concerns"
        redef var html_title = "Concerns"
-       redef fun is_hidden do return concerns.is_empty
        redef fun render_body do add concerns.html_list
 end
 
 redef class DefinitionListArticle
-       redef var html_id is lazy do return "article:{mentity.nitdoc_id}.definition-list"
-
        redef var html_title is lazy do
                var title = new Template
                title.add mentity.html_icon
@@ -512,14 +475,12 @@ redef class DefinitionListArticle
        end
 
        redef var html_subtitle is lazy do return mentity.html_namespace
-       redef var toc_title is lazy do return mentity.html_name
+       redef var html_toc_title is lazy do return mentity.html_name
 end
 
 redef class DefinitionArticle
-       redef var html_id is lazy do return "article:{mentity.nitdoc_id}.definition"
        redef var html_title is lazy do return mentity.html_name
        redef var html_subtitle is lazy do return mentity.html_declaration
-       redef var is_hidden = false
 
        # Does `self` display only it's title and no body?
        #
@@ -549,7 +510,8 @@ redef class DefinitionArticle
                end
                for child in children do
                        if child.is_hidden then continue
-                       tabs.add_panel new DocTabPanel(child.html_tab_id, child.toc_title, child)
+                       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
                var lnk = html_source_link
                if lnk != null then
@@ -559,52 +521,18 @@ redef class DefinitionArticle
        end
 end
 
-redef class HierarchyListArticle
-       redef var html_id is lazy do return "article:{list_title}_{mentity.nitdoc_id}.hierarchy"
-       redef var html_title is lazy do return list_title
-       redef fun is_empty do return mentities.is_empty
-       redef var is_toc_hidden = true
-
+redef class MEntitiesListArticle
        redef fun render_body do
                var lst = new UnorderedList
                lst.css_classes.add "list-unstyled list-definition"
                for mentity in mentities do
                        lst.add_li mentity.html_list_item
                end
-               addn lst
-       end
-end
-
-redef class IntrosRedefsSection
-       redef var html_id is lazy do return "article:{mentity.nitdoc_id}.intros_redefs"
-       redef var toc_title do return "Intros / Redefs"
-       redef var html_title = null
-       redef var html_subtitle = null
-       redef var is_toc_hidden = true
-end
-
-redef class IntrosRedefsListArticle
-       redef var html_id is lazy do return "article:{list_title}_{mentity.nitdoc_id}.intros_redefs"
-       redef var html_title is lazy do return list_title
-       redef fun is_hidden do return mentities.is_empty
-       redef var is_toc_hidden = true
-
-       redef fun render_body do
-               var lst = new UnorderedList
-               lst.css_classes.add "list-unstyled list-labeled"
-               for mentity in mentities do
-                       lst.add_li mentity.html_list_item
-               end
                add lst
        end
 end
 
 redef class DefinitionLinArticle
-       redef var html_id is lazy do return "article:{mentity.nitdoc_id}.lin"
-       redef var html_title is lazy do return "Linearization"
-       redef fun is_hidden do return mentities.is_empty
-       redef var is_toc_hidden = true
-
        redef fun render_body do
                var lst = new UnorderedList
                lst.css_classes.add "list-unstyled list-labeled"
@@ -626,11 +554,7 @@ redef class DefinitionLinArticle
 end
 
 redef class GraphArticle
-       redef var html_id is lazy do return "article:{mentity.nitdoc_id}.graph"
        redef var html_title = null
-       redef var toc_title do return "Graph"
-       redef var is_hidden = false
-       redef var is_toc_hidden = true
 
        # HTML map used to display link.
        #
@@ -639,8 +563,8 @@ redef class GraphArticle
 
        redef fun render_body do
                addn "<div class=\"text-center\">"
-               addn " <img src='{id}.png' usemap='#{id}' style='margin:auto'"
-               addn "  alt='{graph_title}'/>"
+               addn " <img src='{graph_id}.png' usemap='#{graph_id}' style='margin:auto'"
+               addn "  alt='{title or else ""}'/>"
                add map
                addn "</div>"
        end
index 7781fe8..290ed9d 100644 (file)
@@ -31,7 +31,7 @@ module vim_autocomplete
 import modelbuilder
 import phase
 import modelize::modelize_class
-import model_utils
+import model::model_collect
 
 redef class ToolContext
        # Phase generating the files for the Vim plugin
@@ -197,7 +197,7 @@ redef class MClassType
                stream.write line_separator*2
                stream.write "## Properties"
                stream.write line_separator
-               var props = mclass.all_mproperties(mainmodule, protected_visibility).to_a
+               var props = mclass.collect_accessible_mproperties(protected_visibility).to_a
                alpha_comparator.sort props
                for prop in props do
                        if mclass.name == "Object" or prop.intro.mclassdef.mclass.name != "Object" then
@@ -263,7 +263,7 @@ private class AutocompletePhase
                        # Can it be instantiated?
                        if mclass.kind != interface_kind and mclass.kind != abstract_kind then
 
-                               for prop in mclass.all_mproperties(mainmodule, public_visibility) do
+                               for prop in mclass.collect_accessible_mproperties(public_visibility) do
                                        if prop isa MMethod and prop.is_init then
                                                mclass_intro.target_constructor = prop.intro
                                                mclass_intro.write_doc(mainmodule, constructors_stream)
index ba6c2e0..7a5dec0 100644 (file)
@@ -85,7 +85,7 @@ class CPPLanguage
                # Will convert C arguments to C++ and call the C++ implementation function.
                fc = new CFunction(indirection_sig)
                if not mproperty.is_init then
-                       var param_name = "recv"
+                       var param_name = "self"
                        var type_name = to_cpp_call_context.name_mtype(mclass_type)
                        if mclass_type.mclass.ftype isa ForeignCppType then
                                fc.exprs.add("{type_name} {param_name}_for_cpp = static_cast<{type_name}>({param_name});\n")
index ae37d9d..d5852f6 100644 (file)
@@ -105,7 +105,7 @@ class JavaLanguage
                        jni_signature_alt = mclass_type.jni_signature_alt
                        return_type = mclass_type
                else
-                       params.add "recv"
+                       params.add "self"
                        if signature.return_mtype != null then
                                var ret_mtype = signature.return_mtype
                                ret_mtype = ret_mtype.resolve_for(mclass_type, mclass_type, mmodule, true)
@@ -480,9 +480,10 @@ redef class MClassType
                if ftype isa ForeignJavaType then return ftype.java_type.
                        replace('/', ".").replace('$', ".").replace(' ', "").replace('\n',"")
                if mclass.name == "Bool" then return "boolean"
-               if mclass.name == "Char" then return "char"
+               if mclass.name == "Char" then return "int"
                if mclass.name == "Int" then return "long"
                if mclass.name == "Float" then return "double"
+               if mclass.name == "Byte" then return "byte"
                return super
        end
 
@@ -491,9 +492,10 @@ redef class MClassType
                var ftype = mclass.ftype
                if ftype isa ForeignJavaType then return "jobject"
                if mclass.name == "Bool" then return "jboolean"
-               if mclass.name == "Char" then return "jchar"
+               if mclass.name == "Char" then return "jint"
                if mclass.name == "Int" then return "jlong"
                if mclass.name == "Float" then return "jdouble"
+               if mclass.name == "Byte" then return "jbyte"
                return super
        end
 
@@ -550,9 +552,10 @@ redef class MClassType
                        return "L{jni_type};"
                end
                if mclass.name == "Bool" then return "Z"
-               if mclass.name == "Char" then return "C"
+               if mclass.name == "Char" then return "I"
                if mclass.name == "Int" then return "J"
                if mclass.name == "Float" then return "D"
+               if mclass.name == "Byte" then return "B"
                return super
        end
 
@@ -562,9 +565,10 @@ redef class MClassType
 
                if ftype isa ForeignJavaType then return "Object"
                if mclass.name == "Bool" then return "Boolean"
-               if mclass.name == "Char" then return "Char"
+               if mclass.name == "Char" then return "Int"
                if mclass.name == "Int" then return "Long"
                if mclass.name == "Float" then return "Double"
+               if mclass.name == "Byte" then return "Byte"
                return super
        end
 end
@@ -637,7 +641,7 @@ redef class MMethod
                cparams.add "jclass clazz"
 
                if not self.is_init then
-                       cparams.add "{call_context.name_mtype(recv_mtype)} recv"
+                       cparams.add "{call_context.name_mtype(recv_mtype)} self"
                end
                for p in signature.mparameters do
                        var param_mtype = p.mtype.resolve_for(recv_mtype, recv_mtype, from_mmodule, true)
index 6791e5c..3385301 100644 (file)
@@ -161,10 +161,10 @@ redef class CCompilationUnit
 
                var h_file = "{base_name}.h"
                var guard = "{mmodule.c_name.to_upper}_NIT_H"
-               write_header_to_file(mmodule, "{compdir}/{h_file}", new Array[String], guard)
+               write_header_to_file(mmodule, "{compdir}/{h_file}", ["<stdint.h>"], guard)
 
                var c_file = "{base_name}.c"
-               write_body_to_file(mmodule, "{compdir}/{c_file}", ["<stdlib.h>", "<stdio.h>", "\"{h_file}\""])
+               write_body_to_file(mmodule, "{compdir}/{c_file}", ["<stdlib.h>", "<stdio.h>", "<stdint.h>", "\"{h_file}\""])
 
                files.add( "{compdir}/{c_file}" )
        end
index 6d9bb60..eb05a14 100644 (file)
@@ -84,6 +84,7 @@ readonly
 writable
 autoinit
 noautoinit
+lateinit
 nosuper
 old_style_init
 abstract
index 1e187e2..b7426e1 100644 (file)
@@ -66,7 +66,7 @@ private class DivByZeroVisitor
                # 1. We need a `/` operation
                if not node isa ASlashExpr then return
 
-               # 2. The second operand must be a integer literal
+               # 2. The second operand must be an integer literal
                var op2 = node.n_expr2
                if not op2 isa AIntExpr then return
 
index 90924f2..8d576ba 100644 (file)
@@ -34,27 +34,118 @@ redef class ToolContext
        private fun place_holder_type_name: String do return "PlaceHolderTypeWhichShouldNotExist"
 end
 
+redef class ANode
+       # Is this node annotated to be made serializable?
+       private fun is_serialize: Bool do return false
+
+       # Is this node annotated to not be made serializable?
+       private fun is_noserialize: Bool do return false
+
+       private fun accept_precise_type_visitor(v: PreciseTypeVisitor) do visit_all(v)
+end
+
+redef class ADefinition
+
+       redef fun is_serialize do
+               return get_annotations("serialize").not_empty or
+                       get_annotations("auto_serializable").not_empty
+       end
+
+       redef fun is_noserialize do
+               return get_annotations("noserialize").not_empty
+       end
+end
+
 # TODO add annotations on attributes (volatile, sensitive or do_not_serialize?)
 private class SerializationPhasePreModel
        super Phase
 
-       redef fun process_annotated_node(nclassdef, nat)
+       redef fun process_annotated_node(node, nat)
        do
                # Skip if we are not interested
-               if nat.n_atid.n_id.text != "auto_serializable" then return
-               if not nclassdef isa AStdClassdef then
-                       toolcontext.error(nclassdef.location, "Syntax Error: only a concrete class can be automatically serialized.")
+               var text = nat.n_atid.n_id.text
+               var serialize = text == "auto_serializable" or text == "serialize"
+               var noserialize = text == "noserialize"
+               if not (serialize or noserialize) then return
+
+               # Check legality of annotation
+               if node isa AModuledecl then
+                       if noserialize then toolcontext.error(node.location, "Syntax Error: superfluous use of `{text}`, by default a module is `{text}`")
+                       return
+               else if not (node isa AStdClassdef or node isa AAttrPropdef) then
+                       toolcontext.error(node.location,
+                               "Syntax Error: only a class, a module or an attribute can be annotated with `{text}`.")
                        return
+               else if serialize and node.is_noserialize then
+                       toolcontext.error(node.location,
+                               "Syntax Error: an entity cannot be both `{text}` and `noserialize`.")
+                       return
+               else if node.as(Prod).get_annotations(text).length > 1 then
+                       toolcontext.warning(node.location, "useless-{text}",
+                               "Warning: duplicated annotation `{text}`.")
                end
 
-               # Add `super Serializable`
-               var sc = toolcontext.parse_superclass("Serializable")
-               sc.location = nat.location
-               nclassdef.n_propdefs.add sc
+               # Check the `serialize` state of the parent
+               if not node isa AModuledecl then
+                       var up_serialize = false
+                       var up: nullable ANode = node
+                       loop
+                               up = up.parent
+                               if up == null then
+                                       break
+                               else if up.is_serialize then
+                                       up_serialize = true
+                                       break
+                               else if up.is_noserialize then
+                                       break
+                               end
+                       end
 
-               generate_serialization_method(nclassdef)
+                       # Check for useless double declarations
+                       if serialize and up_serialize then
+                               toolcontext.warning(node.location, "useless-serialize",
+                                       "Warning: superfluous use of `{text}`.")
+                       else if noserialize and not up_serialize then
+                               toolcontext.warning(node.location, "useless-noserialize",
+                                       "Warning: superfluous use of `{text}`.")
+                       end
+               end
+       end
 
-               generate_deserialization_init(nclassdef)
+       redef fun process_nclassdef(nclassdef)
+       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 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 then
+                       # Add `super Serializable`
+                       var sc = toolcontext.parse_superclass("Serializable")
+                       sc.location = nclassdef.location
+                       nclassdef.n_propdefs.add sc
+
+                       # Add services
+                       generate_serialization_method(nclassdef, per_attribute)
+                       generate_deserialization_init(nclassdef, per_attribute)
+               end
        end
 
        redef fun process_nmodule(nmodule)
@@ -65,8 +156,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
-                          not nclassdef.get_annotations("auto_serializable").is_empty then
+                       if nclassdef isa AStdClassdef and nclassdef.is_serialize then
                                auto_serializable_nclassdefs.add nclassdef
                        end
                end
@@ -76,7 +166,7 @@ private class SerializationPhasePreModel
                end
        end
 
-       fun generate_serialization_method(nclassdef: AClassdef)
+       fun generate_serialization_method(nclassdef: AClassdef, per_attribute: Bool)
        do
                var npropdefs = nclassdef.n_propdefs
 
@@ -86,6 +176,11 @@ private class SerializationPhasePreModel
                code.add "      super"
 
                for attribute in npropdefs do if attribute isa AAttrPropdef then
+
+                       # Is `attribute` to be skipped?
+                       if (per_attribute and not attribute.is_serialize) or
+                               attribute.is_noserialize then continue
+
                        var name = attribute.name
                        code.add "      v.serialize_attribute(\"{name}\", {name})"
                end
@@ -97,7 +192,7 @@ private class SerializationPhasePreModel
        end
 
        # Add a constructor to the automated nclassdef
-       fun generate_deserialization_init(nclassdef: AStdClassdef)
+       fun generate_deserialization_init(nclassdef: AClassdef, per_attribute: Bool)
        do
                var npropdefs = nclassdef.n_propdefs
 
@@ -108,6 +203,11 @@ private class SerializationPhasePreModel
                code.add "      v.notify_of_creation self"
 
                for attribute in npropdefs do if attribute isa AAttrPropdef then
+
+                       # Is `attribute` to be skipped?
+                       if (per_attribute and not attribute.is_serialize) or
+                               attribute.is_noserialize then continue
+
                        var n_type = attribute.n_type
                        var type_name
                        if n_type == null then
@@ -201,10 +301,6 @@ private class PreciseTypeVisitor
        redef fun visit(n) do n.accept_precise_type_visitor(self)
 end
 
-redef class ANode
-       private fun accept_precise_type_visitor(v: PreciseTypeVisitor) do visit_all(v)
-end
-
 redef class AIsaExpr
        redef fun accept_precise_type_visitor(v)
        do
@@ -257,6 +353,8 @@ redef class AModule
        end
 
        private var inits_to_retype = new Array[AMethPropdef]
+
+       redef fun is_serialize do return n_moduledecl != null and n_moduledecl.is_serialize
 end
 
 redef class AStdClassdef
index 885d794..f61b10a 100644 (file)
@@ -65,6 +65,14 @@ private class SimpleMiscVisitor
        do
                toolcontext.warning(node.hot_location, tag, msg)
        end
+
+       # Issue a warning if `sub` is a standalone `do` block.
+       fun check_do_expr(sub: nullable AExpr)
+       do
+               if sub isa ADoExpr then
+                       warning(sub, "useless-do", "Warning: superfluous `do` block.")
+               end
+       end
 end
 
 
@@ -143,6 +151,21 @@ redef class AWhileExpr
                else
                        n_expr.warn_parentheses(v)
                end
+               v.check_do_expr(n_block)
+       end
+end
+
+redef class ADoExpr
+       redef fun after_simple_misc(v)
+       do
+               v.check_do_expr(n_block)
+       end
+end
+
+redef class ALoopExpr
+       redef fun after_simple_misc(v)
+       do
+               v.check_do_expr(n_block)
        end
 end
 
@@ -150,6 +173,14 @@ redef class AForExpr
        redef fun after_simple_misc(v)
        do
                n_expr.warn_parentheses(v)
+               v.check_do_expr(n_block)
+       end
+end
+
+redef class AWithExpr
+       redef fun after_simple_misc(v)
+       do
+               v.check_do_expr(n_block)
        end
 end
 
index 1765d9e..cf4e815 100644 (file)
@@ -18,7 +18,6 @@
 module debugger
 
 intrude import naive_interpreter
-import nitx
 intrude import semantize::local_var_init
 intrude import semantize::scope
 intrude import toolcontext
@@ -470,10 +469,6 @@ class Debugger
                else if command == "help" then
                        help
                        return true
-               # Opens a new NitIndex prompt on current model
-               else if command == "nitx" then
-                       new NitIndex.with_infos(modelbuilder, self.mainmodule).prompt
-                       return true
                else if command == "bt" or command == "backtrack" then
                        print stack_trace
                        return true
index b444dd8..16e0b48 100644 (file)
@@ -207,6 +207,15 @@ class NaiveInterpreter
                return instance
        end
 
+       # Return the byte instance associated with `val`.
+       fun byte_instance(val: Byte): Instance
+       do
+               var t = mainmodule.byte_type
+               var instance = new PrimitiveInstance[Byte](t, val)
+               init_instance_primitive(instance)
+               return instance
+       end
+
        # Return the char instance associated with `val`.
        fun char_instance(val: Char): Instance
        do
@@ -632,6 +641,10 @@ abstract class Instance
        # else aborts
        fun to_f: Float do abort
 
+       # Return the integer value if the instance is a byte.
+       # else aborts
+       fun to_b: Byte do abort
+
        # The real value encapsulated if the instance is primitive.
        # Else aborts.
        fun val: nullable Object do abort
@@ -677,6 +690,8 @@ class PrimitiveInstance[E]
        redef fun to_i do return val.as(Int)
 
        redef fun to_f do return val.as(Float)
+
+       redef fun to_b do return val.as(Byte)
 end
 
 # Information about local variables in a running method
@@ -867,6 +882,8 @@ redef class AMethPropdef
                                return v.char_instance(args[0].to_i.ascii)
                        else if pname == "to_f" then
                                return v.float_instance(args[0].to_i.to_f)
+                       else if pname == "to_b" then
+                               return v.byte_instance(args[0].to_i.to_b)
                        else if pname == "lshift" then
                                return v.int_instance(args[0].to_i.lshift(args[1].to_i))
                        else if pname == "rshift" then
@@ -894,6 +911,50 @@ redef class AMethPropdef
                        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
+                       if pname == "unary -" then
+                               return v.byte_instance(-args[0].to_b)
+                       else if pname == "unary +" then
+                               return args[0]
+                       else if pname == "+" then
+                               return v.byte_instance(args[0].to_b + args[1].to_b)
+                       else if pname == "-" then
+                               return v.byte_instance(args[0].to_b - args[1].to_b)
+                       else if pname == "*" then
+                               return v.byte_instance(args[0].to_b * args[1].to_b)
+                       else if pname == "%" then
+                               return v.byte_instance(args[0].to_b % args[1].to_b)
+                       else if pname == "/" then
+                               return v.byte_instance(args[0].to_b / args[1].to_b)
+                       else if pname == "<" then
+                               return v.bool_instance(args[0].to_b < args[1].to_b)
+                       else if pname == ">" then
+                               return v.bool_instance(args[0].to_b > args[1].to_b)
+                       else if pname == "<=" then
+                               return v.bool_instance(args[0].to_b <= args[1].to_b)
+                       else if pname == ">=" then
+                               return v.bool_instance(args[0].to_b >= args[1].to_b)
+                       else if pname == "<=>" then
+                               return v.int_instance(args[0].to_b <=> args[1].to_b)
+                       else if pname == "to_f" then
+                               return v.float_instance(args[0].to_b.to_f)
+                       else if pname == "to_i" then
+                               return v.int_instance(args[0].to_b.to_i)
+                       else if pname == "lshift" then
+                               return v.byte_instance(args[0].to_b.lshift(args[1].to_i))
+                       else if pname == "rshift" then
+                               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)
                        if pname == "ascii" then
@@ -937,6 +998,8 @@ redef class AMethPropdef
                                return v.bool_instance(recv >= args[1].to_f)
                        else if pname == "to_i" then
                                return v.int_instance(recv.to_i)
+                       else if pname == "to_b" then
+                               return v.byte_instance(recv.to_b)
                        else if pname == "cos" then
                                return v.float_instance(args[0].to_f.cos)
                        else if pname == "sin" then
@@ -1575,6 +1638,13 @@ redef class AIntExpr
        end
 end
 
+redef class AByteExpr
+       redef fun expr(v)
+       do
+               return v.byte_instance(self.value.as(not null))
+       end
+end
+
 redef class AFloatExpr
        redef fun expr(v)
        do
@@ -1629,7 +1699,7 @@ redef class ASuperstringExpr
                        array.add(i)
                end
                var i = v.array_instance(array, v.mainmodule.object_type)
-               var res = v.send(v.force_get_primitive_method("to_s", i.mtype), [i])
+               var res = v.send(v.force_get_primitive_method("plain_to_s", i.mtype), [i])
                assert res != null
                return res
        end
index d6cb84e..f9b8b5f 100644 (file)
@@ -87,6 +87,16 @@ redef class AExpr
        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
+       end
+end
 
 redef class AIntExpr
        # The value of the literal int once computed.
@@ -96,14 +106,95 @@ end
 redef class ADecIntExpr
        redef fun accept_literal(v)
        do
-               self.value = self.n_number.text.to_i
+               value = self.n_number.text.to_i
        end
 end
 
 redef class AHexIntExpr
        redef fun accept_literal(v)
        do
-               self.value = self.n_hex_number.text.substring_from(2).to_hex
+               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
+               end
+               value = s.to_oct.to_b
        end
 end
 
index 0e6878b..d78ac71 100644 (file)
@@ -50,7 +50,9 @@ redef class ModelBuilder
                end
 
                var nit_dir = toolcontext.nit_dir
-               var libname = "{nit_dir}/lib"
+               var libname = nit_dir/"lib"
+               if libname.file_exists then paths.add(libname)
+               libname = nit_dir/"contrib"
                if libname.file_exists then paths.add(libname)
        end
 
@@ -222,6 +224,14 @@ redef class ModelBuilder
                                return res
                        end
 
+                       # Fourth, try if the requested module is itself a group with a src
+                       try_file = dirname + "/" + name + "/src/" + name + ".nit"
+                       if try_file.file_exists then
+                               var res = self.identify_file(try_file.simplify_path)
+                               assert res != null
+                               return res
+                       end
+
                        c = c.parent
                end
 
@@ -301,6 +311,19 @@ redef class ModelBuilder
                                        end
                                end
                        end
+                       try_file = (dirname + "/" + name + "/src/" + name + ".nit").simplify_path
+                       if try_file.file_exists then
+                               if candidate == null then
+                                       candidate = try_file
+                               else if candidate != try_file then
+                                       # try to disambiguate conflicting modules
+                                       var abs_candidate = module_absolute_path(candidate)
+                                       var abs_try_file = module_absolute_path(try_file)
+                                       if abs_candidate != abs_try_file then
+                                               toolcontext.error(location, "Error: conflicting module file for `{name}`: `{candidate}` `{try_file}`")
+                                       end
+                               end
+                       end
                end
                if candidate == null then return null
                return identify_file(candidate)
index fabd573..ed41a9f 100644 (file)
@@ -18,6 +18,7 @@
 module mclasses_metrics
 
 import metrics_base
+import model::model_collect
 
 redef class ToolContext
        var mclasses_metrics_phase: Phase = new MClassesMetricsPhase(self, null)
@@ -192,7 +193,7 @@ class CNBP
 
        redef fun collect(mclasses) do
                for mclass in mclasses do
-                       values[mclass] = mclass.all_mproperties(mainmodule, min_visibility).length
+                       values[mclass] = mclass.collect_accessible_mproperties(min_visibility).length
                end
        end
 end
@@ -214,7 +215,7 @@ class CNBA
 
        redef fun collect(mclasses) do
                for mclass in mclasses do
-                       values[mclass] = mclass.all_mattributes(mainmodule, min_visibility).length
+                       values[mclass] = mclass.collect_accessible_mattributes(min_visibility).length
                end
        end
 end
@@ -236,7 +237,7 @@ class CNBIP
 
        redef fun collect(mclasses) do
                for mclass in mclasses do
-                       values[mclass] = mclass.intro_mproperties(min_visibility).length
+                       values[mclass] = mclass.collect_intro_mproperties(min_visibility).length
                end
        end
 end
@@ -258,7 +259,7 @@ class CNBRP
 
        redef fun collect(mclasses) do
                for mclass in mclasses do
-                       values[mclass] = mclass.redef_mproperties(min_visibility).length
+                       values[mclass] = mclass.collect_redef_mproperties(min_visibility).length
                end
        end
 end
@@ -280,7 +281,7 @@ class CNBHP
 
        redef fun collect(mclasses) do
                for mclass in mclasses do
-                       values[mclass] = mclass.inherited_mproperties(mainmodule, min_visibility).length
+                       values[mclass] = mclass.collect_inherited_mproperties(min_visibility).length
                end
        end
 end
@@ -302,7 +303,7 @@ class CNBLP
 
        redef fun collect(mclasses) do
                for mclass in mclasses do
-                       values[mclass] = mclass.local_mproperties(min_visibility).length
+                       values[mclass] = mclass.collect_local_mproperties(min_visibility).length
                end
        end
 end
index 3209720..23daf06 100644 (file)
@@ -142,7 +142,7 @@ class CBMS
 
        redef fun collect(mclasses) do
                for mclass in mclasses do
-                       var totc = mclass.all_mproperties(mainmodule, protected_visibility).length
+                       var totc = mclass.collect_accessible_mproperties(protected_visibility).length
                        var ditc = mclass.in_hierarchy(mainmodule).depth
                        values[mclass] = totc.to_f / (ditc + 1).to_f
                end
@@ -169,7 +169,7 @@ class CNVI
                                cbms.clear
                                cbms.collect(new HashSet[MClass].from(parents))
                                # compute class novelty index
-                               var locc = mclass.local_mproperties(protected_visibility).length
+                               var locc = mclass.collect_accessible_mproperties(protected_visibility).length
                                values[mclass] = locc.to_f / cbms.avg
                        else
                                values[mclass] = 0.0
@@ -193,7 +193,7 @@ class CNVS
                var cnvi = new CNVI(mainmodule)
                cnvi.collect(mclasses)
                for mclass in mclasses do
-                       var locc = mclass.local_mproperties(protected_visibility).length
+                       var locc = mclass.collect_local_mproperties(protected_visibility).length
                        values[mclass] = cnvi.values[mclass] * locc.to_f
                end
        end
@@ -228,34 +228,34 @@ redef class MClass
 
        # pure overriders contain only redefinitions
        private fun is_pure_overrider(min_visibility: MVisibility): Bool do
-               var news = intro_mproperties(min_visibility).length
-               var locs = local_mproperties(min_visibility).length
+               var news = collect_intro_mproperties(min_visibility).length
+               var locs = collect_local_mproperties(min_visibility).length
                if news == 0 and locs > 0 then return true
                return false
        end
 
        # overriders contain more definitions than introductions
        private fun is_overrider(min_visibility: MVisibility): Bool do
-               var rdfs = redef_mproperties(min_visibility).length
-               var news = intro_mproperties(min_visibility).length
-               var locs = local_mproperties(min_visibility).length
+               var rdfs = collect_redef_mproperties(min_visibility).length
+               var news = collect_intro_mproperties(min_visibility).length
+               var locs = collect_local_mproperties(min_visibility).length
                if rdfs >= news and locs > 0 then return true
                return false
        end
 
        # pure extenders contain only introductions
        private fun is_pure_extender(min_visibility: MVisibility): Bool do
-               var rdfs = redef_mproperties(min_visibility).length
-               var locs = local_mproperties(min_visibility).length
+               var rdfs = collect_redef_mproperties(min_visibility).length
+               var locs = collect_local_mproperties(min_visibility).length
                if rdfs == 0 and locs > 0 then return true
                return false
        end
 
        # extenders contain more introduction than redefinitions
        private fun is_extender(min_visibility: MVisibility): Bool do
-               var rdfs = redef_mproperties(min_visibility).length
-               var news = intro_mproperties(min_visibility).length
-               var locs = local_mproperties(min_visibility).length
+               var rdfs = collect_redef_mproperties(min_visibility).length
+               var news = collect_intro_mproperties(min_visibility).length
+               var locs = collect_local_mproperties(min_visibility).length
                if news > rdfs and locs > 0 then return true
                return false
        end
@@ -263,7 +263,7 @@ redef class MClass
        # pure specializers always call to super in its redefinitions
        private fun is_pure_specializer(min_visibility: MVisibility): Bool do
                var ovrs = overriden_mproperties(min_visibility).length
-               var rdfs = redef_mproperties(min_visibility).length
+               var rdfs = collect_redef_mproperties(min_visibility).length
                if ovrs == 0 and rdfs > 0 then return true
                return false
        end
@@ -272,7 +272,7 @@ redef class MClass
        private fun is_specializer(min_visibility: MVisibility): Bool do
                var spcs = extended_mproperties(min_visibility).length
                var ovrs = overriden_mproperties(min_visibility).length
-               var rdfs = redef_mproperties(min_visibility).length
+               var rdfs = collect_redef_mproperties(min_visibility).length
                if spcs > ovrs and rdfs > 0 then return true
                return false
        end
@@ -280,7 +280,7 @@ redef class MClass
        # pure replacers never call to super in its redefinitions
        private fun is_pure_replacer(min_visibility: MVisibility): Bool do
                var spcs = extended_mproperties(min_visibility).length
-               var rdfs = redef_mproperties(min_visibility).length
+               var rdfs = collect_redef_mproperties(min_visibility).length
                if spcs == 0 and rdfs > 0 then return true
                return false
        end
@@ -289,7 +289,7 @@ redef class MClass
        private fun is_replacer(min_visibility: MVisibility): Bool do
                var spcs = extended_mproperties(min_visibility).length
                var ovrs = overriden_mproperties(min_visibility).length
-               var rdfs = redef_mproperties(min_visibility).length
+               var rdfs = collect_redef_mproperties(min_visibility).length
                if ovrs > spcs and rdfs > 0 then return true
                return false
        end
@@ -298,7 +298,7 @@ redef class MClass
        private fun is_equal(min_visibility: MVisibility): Bool do
                var spcs = extended_mproperties(min_visibility).length
                var ovrs = overriden_mproperties(min_visibility).length
-               var rdfs = redef_mproperties(min_visibility).length
+               var rdfs = collect_redef_mproperties(min_visibility).length
                if spcs == ovrs and rdfs > 0 then return true
                return false
        end
index a7ded94..d49f96b 100644 (file)
@@ -18,7 +18,6 @@
 # Helpers for various statistics tools.
 module metrics_base
 
-import model_utils
 import modelbuilder
 import csv
 import counter
index 2c96462..62c8f71 100644 (file)
@@ -93,7 +93,7 @@ class CNBNA
 
        redef fun collect(mclasses) do
                for mclass in mclasses do
-                       var all = mclass.all_mattributes(mainmodule, min_visibility)
+                       var all = mclass.collect_accessible_mattributes(min_visibility)
                        for mattr in all do
                                if mattr.is_nullable then values.inc(mclass)
                        end
@@ -101,6 +101,15 @@ class CNBNA
        end
 end
 
+redef class MAttribute
+       # Is this attribute nullable for sure?
+       #
+       # This mean that its introduction is declarred with a nullable static type
+       # since attributes are invariant this will work on most cases
+       # attributes with static type anchored with a virtual type are not "nullable for-sure"
+       # because this type can be redefined in subclasses
+       private fun is_nullable: Bool do return intro.static_mtype isa MNullableType
+end
 
 private class NullableSends
        super Visitor
@@ -131,8 +140,8 @@ private class NullableSends
                        end
                        t = t.anchor_to(self.nclassdef.mclassdef.mmodule, self.nclassdef.mclassdef.bound_mtype)
                        if t isa MNullableType then
-                               var name = n.callsite.mproperty.name
-                               if name == "==" or name == "!=" or name == "is_same_instance" then
+                               var p = n.callsite.mproperty
+                               if p.is_null_safe then
                                        self.nullable_eq_sends += 1
                                else
                                        self.nullable_sends += 1
index e1f43cc..de71f37 100755 (executable)
@@ -3,7 +3,7 @@
 # Regeneration of c_src from the current nitc
 
 rm -r ../c_src
-./nitc nith.nit --stacktrace none --semi-global --compile-dir ../c_src --output ../c_src/nitg --no-cc
+./nitc nith.nit --semi-global --compile-dir ../c_src --output ../c_src/nitg --no-cc
 
 # Remove old compilation flags
 sed -i -e 's/OLDNITCOPT=.*/OLDNITCOPT=/' Makefile
index 94f11f2..f0bfe8b 100644 (file)
@@ -206,6 +206,9 @@ redef class MModule
        # The primitive type `Int`
        var int_type: MClassType = self.get_primitive_class("Int").mclass_type is lazy
 
+       # The primitive type `Byte`
+       var byte_type: MClassType = self.get_primitive_class("Byte").mclass_type is lazy
+
        # The primitive type `Char`
        var char_type: MClassType = self.get_primitive_class("Char").mclass_type is lazy
 
@@ -514,6 +517,18 @@ class MClass
 
        # Is there a `new` factory to allow the pseudo instantiation?
        var has_new_factory = false is writable
+
+       # Is `self` a standard or abstract class kind?
+       var is_class: Bool is lazy do return kind == concrete_kind or kind == abstract_kind
+
+       # Is `self` an interface kind?
+       var is_interface: Bool is lazy do return kind == interface_kind
+
+       # Is `self` an enum kind?
+       var is_enum: Bool is lazy do return kind == enum_kind
+
+       # Is `self` and abstract class?
+       var is_abstract: Bool is lazy do return kind == abstract_kind
 end
 
 
@@ -2153,6 +2168,10 @@ class MMethod
        do
                return self.is_init
        end
+
+       # A specific method that is safe to call on null.
+       # Currently, only `==`, `!=` and `is_same_instance` are safe
+       fun is_null_safe: Bool do return name == "==" or name == "!=" or name == "is_same_instance"
 end
 
 # A global attribute
index fd2e1d1..396d5e1 100644 (file)
@@ -102,6 +102,16 @@ class MVisibility
        end
 end
 
+# A `Comparator` to sort mentities by their names.
+class MEntityNameSorter
+       super Comparator
+
+       redef type COMPARED: MEntity
+
+       # Returns `a.name <=> b.name`.
+       redef fun compare(a, b) do return a.name <=> b.name
+end
+
 # The visibility level `intrude`
 fun intrude_visibility: MVisibility do return once new MVisibility("intrude", 5)
 # The visibility level `public`
diff --git a/src/model/model_collect.nit b/src/model/model_collect.nit
new file mode 100644 (file)
index 0000000..2a64345
--- /dev/null
@@ -0,0 +1,334 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2008 Jean Privat <jean@pryen.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.
+
+# Collect things from a `Model`.
+#
+# **Warning**
+#
+# `model_collect` offers a flattened view of the model without considering any
+# main module.
+# For this reason, `model_collect` lists all the definitions reachable from all
+# modules
+#
+# This is usefull for tools that need a global view of a model like `nitdoc`,
+# `nitx` or `nituml`.
+# It shoul not be used for compiling stuffs like computing VFT, where the listed
+# entities could not be reachable depending on the modules really imported.
+module model_collect
+
+import model
+
+redef class MModule
+
+       # Collect mclassdefs introduced in `self` with `visibility >= to min_visibility`.
+       fun collect_intro_mclassdefs(min_visibility: MVisibility): Set[MClassDef] do
+               var res = new HashSet[MClassDef]
+               for mclassdef in mclassdefs do
+                       if not mclassdef.is_intro then continue
+                       if mclassdef.mclass.visibility < min_visibility then continue
+                       res.add mclassdef
+               end
+               return res
+       end
+
+       # Collect mclassdefs redefined in `self` with `visibility >= to min_visibility`.
+       fun collect_redef_mclassdefs(min_visibility: MVisibility): Set[MClassDef] do
+               var res = new HashSet[MClassDef]
+               for mclassdef in mclassdefs do
+                       if mclassdef.is_intro then continue
+                       if mclassdef.mclass.visibility < min_visibility then continue
+                       res.add mclassdef
+               end
+               return res
+       end
+
+       # Collect mclasses introduced in `self` with `visibility >= to min_visibility`.
+       fun collect_intro_mclasses(min_visibility: MVisibility): Set[MClass] do
+               var res = new HashSet[MClass]
+               for mclass in intro_mclasses do
+                       if mclass.visibility < min_visibility then continue
+                       res.add mclass
+               end
+               return res
+       end
+
+       # Collect mclasses redefined in `self` with `visibility >= to min_visibility`.
+       fun collect_redef_mclasses(min_visibility: MVisibility): Set[MClass] do
+               var mclasses = new HashSet[MClass]
+               for c in mclassdefs do
+                       if c.mclass.visibility < min_visibility then continue
+                       if not c.is_intro then mclasses.add(c.mclass)
+               end
+               return mclasses
+       end
+end
+
+redef class MClass
+
+       # Collect direct parents of `self` with `visibility >= to min_visibility`.
+       fun collect_parents(min_visibility: MVisibility): Set[MClass] do
+               var res = new HashSet[MClass]
+               for mclassdef in mclassdefs do
+                       for mclasstype in mclassdef.supertypes do
+                               var mclass = mclasstype.mclass
+                               if mclass.visibility < min_visibility then continue
+                               res.add(mclass)
+                       end
+               end
+               return res
+       end
+
+       # Collect all ancestors of `self` with `visibility >= to min_visibility`.
+       fun collect_ancestors(min_visibility: MVisibility): Set[MClass] do
+               var res = new HashSet[MClass]
+               for mclassdef in self.mclassdefs do
+                       for super_mclassdef in mclassdef.in_hierarchy.greaters do
+                               if super_mclassdef == mclassdef then continue  # skip self
+                               var mclass = super_mclassdef.mclass
+                               if mclass.visibility < min_visibility then continue
+                               res.add(mclass)
+                       end
+               end
+               return res
+       end
+
+       # Collect direct children of `self` with `visibility >= to min_visibility`.
+       fun collect_children(min_visibility: MVisibility): Set[MClass] do
+               var res = new HashSet[MClass]
+               for mclassdef in self.mclassdefs do
+                       for sub_mclassdef in mclassdef.in_hierarchy.direct_smallers do
+                               if sub_mclassdef == mclassdef then continue  # skip self
+                               var mclass = sub_mclassdef.mclass
+                               if mclass.visibility < min_visibility then continue
+                               res.add(mclass)
+                       end
+               end
+               return res
+       end
+
+       # Collect all descendants of `self` with `visibility >= to min_visibility`.
+       fun descendants(min_visibility: MVisibility): Set[MClass] do
+               var res = new HashSet[MClass]
+               for mclassdef in self.mclassdefs do
+                       for sub_mclassdef in mclassdef.in_hierarchy.smallers do
+                               if sub_mclassdef == mclassdef then continue  # skip self
+                               var mclass = sub_mclassdef.mclass
+                               if mclass.visibility < min_visibility then continue
+                               res.add(mclass)
+                       end
+               end
+               return res
+       end
+
+       # Collect all mproperties introduced in 'self' with `visibility >= min_visibility`.
+       fun collect_intro_mproperties(min_visibility: MVisibility): Set[MProperty] do
+               var set = new HashSet[MProperty]
+               for mclassdef in mclassdefs do
+                       for mprop in mclassdef.intro_mproperties do
+                               if mprop.visibility < min_visibility then continue
+                               set.add(mprop)
+                       end
+               end
+               return set
+       end
+
+       # Collect all mproperties redefined in 'self' with `visibility >= min_visibility`.
+       fun collect_redef_mproperties(min_visibility: MVisibility): Set[MProperty] do
+               var set = new HashSet[MProperty]
+               for mclassdef in mclassdefs do
+                       for mpropdef in mclassdef.mpropdefs do
+                               if mpropdef.mproperty.visibility < min_visibility then continue
+                               if mpropdef.mproperty.intro_mclassdef.mclass != self then set.add(mpropdef.mproperty)
+                       end
+               end
+               return set
+       end
+
+       # Collect mproperties introduced and redefined in 'self' with `visibility >= min_visibility`.
+       fun collect_local_mproperties(min_visibility: MVisibility): Set[MProperty] do
+               var set = new HashSet[MProperty]
+               set.add_all collect_intro_mproperties(min_visibility)
+               set.add_all collect_redef_mproperties(min_visibility)
+               return set
+       end
+
+       # Collect all mproperties inehrited by 'self' with `visibility >= min_visibility`.
+       fun collect_inherited_mproperties(min_visibility: MVisibility): Set[MProperty] do
+               var set = new HashSet[MProperty]
+               for parent in collect_parents(min_visibility) do
+                       set.add_all(parent.collect_intro_mproperties(min_visibility))
+                       set.add_all(parent.collect_inherited_mproperties(min_visibility))
+               end
+               return set
+       end
+
+       # Collect all mproperties accessible by 'self' with `visibility >= min_visibility`.
+       #
+       # This include introduced, redefined, inherited mproperties.
+       fun collect_accessible_mproperties(min_visibility: MVisibility): Set[MProperty] do
+               var set = new HashSet[MProperty]
+               set.add_all(collect_intro_mproperties(min_visibility))
+               set.add_all(collect_redef_mproperties(min_visibility))
+               set.add_all(collect_inherited_mproperties(min_visibility))
+               return set
+       end
+
+       # Collect mmethods introduced in 'self' with `visibility >= min_visibility`.
+       fun collect_intro_mmethods(min_visibility: MVisibility): Set[MMethod] do
+               var res = new HashSet[MMethod]
+               for mproperty in collect_intro_mproperties(min_visibility) do
+                       if mproperty isa MMethod then res.add(mproperty)
+               end
+               return res
+       end
+
+       # Collect mmethods redefined in 'self' with `visibility >= min_visibility`.
+       fun collect_redef_mmethods(min_visibility: MVisibility): Set[MMethod] do
+               var res = new HashSet[MMethod]
+               for mproperty in collect_redef_mproperties(min_visibility) do
+                       if mproperty isa MMethod then res.add(mproperty)
+               end
+               return res
+       end
+
+       # Collect mmethods introduced and redefined in 'self' with `visibility >= min_visibility`.
+       fun collect_local_mmethods(min_visibility: MVisibility): Set[MMethod] do
+               var set = new HashSet[MMethod]
+               set.add_all collect_intro_mmethods(min_visibility)
+               set.add_all collect_redef_mmethods(min_visibility)
+               return set
+       end
+
+       # Collect mattributes introduced in 'self' with `visibility >= min_visibility`.
+       fun collect_intro_mattributes(min_visibility: MVisibility): Set[MAttribute] do
+               var res = new HashSet[MAttribute]
+               for mproperty in collect_intro_mproperties(min_visibility) do
+                       if mproperty isa MAttribute then res.add(mproperty)
+               end
+               return res
+       end
+
+       # Collect mattributes redefined in 'self' with `visibility >= min_visibility`.
+       fun collect_redef_mattributes(min_visibility: MVisibility): Set[MAttribute] do
+               var res = new HashSet[MAttribute]
+               for mproperty in collect_redef_mproperties(min_visibility) do
+                       if mproperty isa MAttribute then res.add(mproperty)
+               end
+               return res
+       end
+
+       # Collect mattributes introduced and redefined in 'self' with `visibility >= min_visibility`.
+       fun collect_local_mattributes(min_visibility: MVisibility): Set[MAttribute] do
+               var set = new HashSet[MAttribute]
+               set.add_all collect_intro_mattributes(min_visibility)
+               set.add_all collect_redef_mattributes(min_visibility)
+               return set
+       end
+
+       # Collect mattributes inherited by 'self' with `visibility >= min_visibility`.
+       fun collect_inherited_mattributes(min_visibility: MVisibility): Set[MAttribute] do
+               var res = new HashSet[MAttribute]
+               for mproperty in collect_inherited_mproperties(min_visibility) do
+                       if mproperty isa MAttribute then res.add(mproperty)
+               end
+               return res
+       end
+
+       # Collect all mattributes accessible by 'self' with `visibility >= min_visibility`.
+       #
+       # This include introduced, redefined, inherited mattributes.
+       fun collect_accessible_mattributes(min_visibility: MVisibility): Set[MAttribute] do
+               var set = new HashSet[MAttribute]
+               set.add_all(collect_intro_mattributes(min_visibility))
+               set.add_all(collect_redef_mattributes(min_visibility))
+               set.add_all(collect_inherited_mattributes(min_visibility))
+               return set
+       end
+end
+
+redef class MClassDef
+       # Collect mpropdefs in 'self' with `visibility >= min_visibility`.
+       fun collect_mpropdefs(min_visibility: MVisibility): Set[MPropDef] do
+               var res = new HashSet[MPropDef]
+               for mpropdef in mpropdefs do
+                       if mpropdef.mproperty.visibility < min_visibility then continue
+                       res.add mpropdef
+               end
+               return res
+       end
+
+       # Collect mpropdefs introduced in 'self' with `visibility >= min_visibility`.
+       fun collect_intro_mpropdefs(min_visibility: MVisibility): Set[MPropDef] do
+               var res = new HashSet[MPropDef]
+               for mpropdef in mpropdefs do
+                       if not mpropdef.is_intro then continue
+                       if mpropdef.mproperty.visibility < min_visibility then continue
+                       res.add mpropdef
+               end
+               return res
+       end
+
+       # Collect mpropdefs redefined in 'self' with `visibility >= min_visibility`.
+       fun collect_redef_mpropdefs(min_visibility: MVisibility): Set[MPropDef] do
+               var res = new HashSet[MPropDef]
+               for mpropdef in mpropdefs do
+                       if mpropdef.is_intro then continue
+                       if mpropdef.mproperty.visibility < min_visibility then continue
+                       res.add mpropdef
+               end
+               return res
+       end
+
+       # Collect modifiers like redef, private etc.
+       fun collect_modifiers: Array[String] do
+               var res = new Array[String]
+               if not is_intro then
+                       res.add "redef"
+               else
+                       res.add mclass.visibility.to_s
+               end
+               res.add mclass.kind.to_s
+               return res
+       end
+end
+
+redef class MPropDef
+       # Collect modifiers like redef, private, abstract, intern, fun etc.
+       fun collect_modifiers: Array[String] do
+               var res = new Array[String]
+               if not is_intro then
+                       res.add "redef"
+               else
+                       res.add mproperty.visibility.to_s
+               end
+               var mprop = self
+               if mprop isa MVirtualTypeDef then
+                       res.add "type"
+               else if mprop isa MMethodDef then
+                       if mprop.is_abstract then
+                               res.add "abstract"
+                       else if mprop.is_intern then
+                               res.add "intern"
+                       end
+                       if mprop.mproperty.is_init then
+                               res.add "init"
+                       else
+                               res.add "fun"
+                       end
+               end
+               return res
+       end
+end
diff --git a/src/model_utils.nit b/src/model_utils.nit
deleted file mode 100644 (file)
index 24105e6..0000000
+++ /dev/null
@@ -1,533 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2008 Jean Privat <jean@pryen.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.
-
-# Model exploration and traversing facilities
-module model_utils
-
-import model
-
-redef class MConcern
-
-       # Boost a MConcern rank
-       # see: `MConcernRankSorter`
-       # Use a positive booster to push down a result in the list
-       # A negative booster can be used to push up the result
-       var booster_rank: Int = 0 is writable
-
-       # Concern ranking used for ordering
-       # see: `MConcernRankSorter`
-       # Rank can be positive or negative
-       fun concern_rank: Int is abstract
-end
-
-redef class MProject
-       redef var concern_rank is lazy do
-               var max = 0
-               for mgroup in mgroups do
-                       var mmax = mgroup.concern_rank
-                       if mmax > max then max = mmax
-               end
-               return max + 1
-       end
-end
-
-redef class MGroup
-       fun in_nesting_intro_mclasses(min_visibility: MVisibility): Set[MClass] do
-               var res = new HashSet[MClass]
-               var lst = in_nesting.direct_smallers
-               for mmodule in mmodules do res.add_all mmodule.filter_intro_mclasses(min_visibility)
-               for mgrp in lst do res.add_all mgrp.in_nesting_intro_mclasses(min_visibility)
-               return res
-       end
-
-       fun in_nesting_redef_mclasses(min_visibility: MVisibility): Set[MClass] do
-               var res = new HashSet[MClass]
-               var lst = in_nesting.direct_smallers
-               for mmodule in mmodules do res.add_all mmodule.filter_redef_mclasses(min_visibility)
-               for mgrp in lst do res.add_all mgrp.in_nesting_redef_mclasses(min_visibility)
-               return res
-       end
-
-       fun in_nesting_intro_mclassdefs(min_visibility: MVisibility): Set[MClassDef] do
-               var res = new HashSet[MClassDef]
-               var lst = in_nesting.direct_smallers
-               for mmodule in mmodules do res.add_all mmodule.intro_mclassdefs(min_visibility)
-               for mgrp in lst do res.add_all mgrp.in_nesting_intro_mclassdefs(min_visibility)
-               return res
-       end
-
-       fun in_nesting_redef_mclassdefs(min_visibility: MVisibility): Set[MClassDef] do
-               var res = new HashSet[MClassDef]
-               var lst = in_nesting.direct_smallers
-               for mmodule in mmodules do res.add_all mmodule.redef_mclassdefs(min_visibility)
-               for mgrp in lst do res.add_all mgrp.in_nesting_redef_mclassdefs(min_visibility)
-               return res
-       end
-
-       # Collect nested modules
-       fun collect_mmodules: Set[MModule] do
-               var res = new HashSet[MModule]
-               res.add_all mmodules
-               for mgroup in in_nesting.direct_smallers do
-                       res.add_all mgroup.collect_mmodules
-               end
-               return res
-       end
-
-       redef var concern_rank is lazy do
-               var max = 0
-               for mmodule in collect_mmodules do
-                       var mmax = mmodule.concern_rank
-                       if mmax > max then max = mmax
-               end
-               return max + 1
-       end
-end
-
-redef class MModule
-
-       # The list of intro mclassdef in the module.
-       # with visibility >= to min_visibility
-       fun intro_mclassdefs(min_visibility: MVisibility): Set[MClassDef] do
-               var res = new HashSet[MClassDef]
-               for mclassdef in mclassdefs do
-                       if not mclassdef.is_intro then continue
-                       if mclassdef.mclass.visibility < min_visibility then continue
-                       res.add mclassdef
-               end
-               return res
-       end
-
-       # The list of redef mclassdef in the module.
-       # with visibility >= to min_visibility
-       fun redef_mclassdefs(min_visibility: MVisibility): Set[MClassDef] do
-               var res = new HashSet[MClassDef]
-               for mclassdef in mclassdefs do
-                       if mclassdef.is_intro then continue
-                       if mclassdef.mclass.visibility < min_visibility then continue
-                       res.add mclassdef
-               end
-               return res
-       end
-
-       # The list of intro mclass in the module.
-       # with visibility >= to min_visibility
-       fun filter_intro_mclasses(min_visibility: MVisibility): Set[MClass] do
-               var res = new HashSet[MClass]
-               for mclass in intro_mclasses do
-                       if mclass.visibility < min_visibility then continue
-                       res.add mclass
-               end
-               return res
-       end
-
-       # Get the list of mclasses refined in 'self'.
-       fun redef_mclasses: Set[MClass] do
-               var mclasses = new HashSet[MClass]
-               for c in mclassdefs do
-                       if not c.is_intro then mclasses.add(c.mclass)
-               end
-               return mclasses
-       end
-
-       # Get the list of mclasses refined in 'self'.
-       fun filter_redef_mclasses(min_visibility: MVisibility): Set[MClass] do
-               var mclasses = new HashSet[MClass]
-               for c in mclassdefs do
-                       if c.mclass.visibility < min_visibility then continue
-                       if not c.is_intro then mclasses.add(c.mclass)
-               end
-               return mclasses
-       end
-
-       # Get the list of all mclasses imported by 'self'.
-       fun imported_mclasses: Set[MClass] do
-               var mclasses = new HashSet[MClass]
-               for m in in_importation.greaters do
-                       if m == self then continue
-                       for c in m.mclassdefs do mclasses.add(c.mclass)
-               end
-               return mclasses
-       end
-
-       redef var concern_rank is lazy do
-               var max = 0
-               for p in in_importation.direct_greaters do
-                       var pmax = p.concern_rank
-                       if pmax > max then max = pmax
-               end
-               return max + 1
-       end
-
-       # Find all mmodules nested in `self` if `self` is the default module of a `MGroup`.
-       fun nested_mmodules: Array[MModule] do
-               var res = new Array[MModule]
-               var mgroup = mgroup
-               if mgroup == null or self != mgroup.default_mmodule then return res
-               for mmodule in mgroup.mmodules do
-                       if mmodule == self then continue
-                       res.add mmodule
-               end
-               for nested in mgroup.in_nesting.direct_smallers do
-                       var default = nested.default_mmodule
-                       if default == null then continue
-                       res.add default
-               end
-               return res
-       end
-end
-
-redef class MClass
-
-       # Get direct parents of 'self'.
-       fun parents: Set[MClass] do
-               var ret = new HashSet[MClass]
-               for mclassdef in mclassdefs do
-                       for mclasstype in mclassdef.supertypes do
-                               ret.add(mclasstype.mclass)
-                       end
-               end
-               return ret
-       end
-
-       # Get all ancestors of 'self'.
-       fun ancestors: Set[MClass] do
-               var lst = new HashSet[MClass]
-               for mclassdef in self.mclassdefs do
-                       for super_mclassdef in mclassdef.in_hierarchy.greaters do
-                               if super_mclassdef == mclassdef then continue  # skip self
-                               lst.add(super_mclassdef.mclass)
-                       end
-               end
-               return lst
-       end
-
-       # Get direct children of 'self'.
-       fun children: Set[MClass] do
-               var lst = new HashSet[MClass]
-               for mclassdef in self.mclassdefs do
-                       for sub_mclassdef in mclassdef.in_hierarchy.direct_smallers do
-                               if sub_mclassdef == mclassdef then continue  # skip self
-                               lst.add(sub_mclassdef.mclass)
-                       end
-               end
-               return lst
-       end
-
-       # Get all children of 'self'.
-       fun descendants: Set[MClass] do
-               var lst = new HashSet[MClass]
-               for mclassdef in self.mclassdefs do
-                       for sub_mclassdef in mclassdef.in_hierarchy.smallers do
-                               if sub_mclassdef == mclassdef then continue  # skip self
-                               lst.add(sub_mclassdef.mclass)
-                       end
-               end
-               return lst
-       end
-
-       # Get the list of constructors available for 'self'.
-       fun constructors: Set[MMethod] do
-               var res = new HashSet[MMethod]
-               for mclassdef in mclassdefs do
-                       for mpropdef in mclassdef.mpropdefs do
-                               if mpropdef isa MMethodDef then
-                                       if mpropdef.mproperty.is_init then res.add(mpropdef.mproperty)
-                               end
-                       end
-               end
-               return res
-       end
-
-       # Get the list of methods introduced in 'self'.
-       fun intro_methods: Set[MMethod] do
-               var res = new HashSet[MMethod]
-               for mclassdef in mclassdefs do
-                       for mpropdef in mclassdef.mpropdefs do
-                               if mpropdef isa MMethodDef then
-                                       if mpropdef.is_intro and not mpropdef.mproperty.is_init then res.add(mpropdef.mproperty)
-                               end
-                       end
-               end
-               return res
-       end
-
-       # the set of properties introduced in 'self'.
-       fun intro_mproperties(min_visibility: MVisibility): Set[MProperty] do
-               var set = new HashSet[MProperty]
-               for mclassdef in mclassdefs do
-                       for mprop in mclassdef.intro_mproperties do
-                               if mprop.visibility < min_visibility then continue
-                               set.add(mprop)
-                       end
-               end
-               return set
-       end
-
-       fun intro_mpropdefs(min_visibility: MVisibility): Set[MPropDef] do
-               var set = new HashSet[MPropDef]
-               for mclassdef in mclassdefs do
-                       for mpropdef in mclassdef.mpropdefs do
-                               if not mpropdef.is_intro then continue
-                               if mpropdef.mproperty.visibility < min_visibility then continue
-                               set.add(mpropdef)
-                       end
-               end
-               return set
-       end
-
-       # the set of locally refined properties in 'self'.
-       fun redef_mproperties(min_visibility: MVisibility): Set[MProperty] do
-               var set = new HashSet[MProperty]
-               for mclassdef in mclassdefs do
-                       for mpropdef in mclassdef.mpropdefs do
-                               if mpropdef.mproperty.visibility < min_visibility then continue
-                               if mpropdef.mproperty.intro_mclassdef.mclass != self then set.add(mpropdef.mproperty)
-                       end
-               end
-               return set
-       end
-
-       fun redef_mpropdefs(min_visibility: MVisibility): Set[MPropDef] do
-               var set = new HashSet[MPropDef]
-               for mclassdef in mclassdefs do
-                       for mpropdef in mclassdef.mpropdefs do
-                               if mpropdef.is_intro then continue
-                               if mpropdef.mproperty.visibility < min_visibility then continue
-                               set.add(mpropdef)
-                       end
-               end
-               return set
-       end
-
-       # the set of methods inherited by 'self'.
-       fun inherited_mproperties(mainmodule: MModule, min_visibility: MVisibility): Set[MProperty] do
-               var set = new HashSet[MProperty]
-               for parent in in_hierarchy(mainmodule).direct_greaters do
-                       set.add_all(parent.intro_mproperties(min_visibility))
-                       set.add_all(parent.inherited_mproperties(mainmodule, min_visibility))
-               end
-               return set
-       end
-
-       # the set of introduced and redefined mproperties
-       fun local_mproperties(min_visibility: MVisibility): Set[MProperty] do
-               var set = new HashSet[MProperty]
-               set.add_all(intro_mproperties(min_visibility))
-               set.add_all(redef_mproperties(min_visibility))
-               return set
-       end
-
-       # the set of all accessible mproperties for this class
-       fun all_mproperties(mainmodule: MModule, min_visibility: MVisibility): Set[MProperty] do
-               var set = new HashSet[MProperty]
-               set.add_all(local_mproperties(min_visibility))
-               set.add_all(inherited_mproperties(mainmodule, min_visibility))
-               return set
-       end
-
-       # the set of all accessible mattributes for this class
-       fun all_mattributes(mainmodule: MModule, min_visibility: MVisibility): Set[MAttribute] do
-               var set = new HashSet[MAttribute]
-               for mprop in all_mproperties(mainmodule, min_visibility) do
-                       if mprop isa MAttribute then set.add(mprop)
-               end
-               return set
-       end
-
-       # Get the list of locally refined methods in 'self'.
-       fun redef_methods: Set[MMethod] do
-               var res = new HashSet[MMethod]
-               for mclassdef in mclassdefs do
-                       for mpropdef in mclassdef.mpropdefs do
-                               if mpropdef isa MMethodDef then
-                                       if not mpropdef.is_intro and not mpropdef.mproperty.is_init then res.add(mpropdef.mproperty)
-                               end
-                       end
-               end
-               return res
-       end
-
-       fun inherited_methods: Set[MMethod] do
-               var res = new HashSet[MMethod]
-               for s in ancestors do
-                       for m in s.intro_methods do
-                               if not self.intro_methods.has(m) and not self.redef_methods.has(m) then res.add(m)
-                       end
-               end
-               return res
-       end
-
-       # Get the list of all virtual types available in 'self'.
-       fun virtual_types: Set[MVirtualTypeProp] do
-               var res = new HashSet[MVirtualTypeProp]
-               for mclassdef in mclassdefs do
-                       for mpropdef in mclassdef.mpropdefs do
-                               if mpropdef isa MVirtualTypeDef then
-                                       res.add(mpropdef.mproperty)
-                               end
-                       end
-               end
-               for ancestor in ancestors do
-                       for mclassdef in ancestor.mclassdefs do
-                               for mpropdef in mclassdef.mpropdefs do
-                                       if mpropdef isa MVirtualTypeDef then
-                                               res.add(mpropdef.mproperty)
-                                       end
-                               end
-                       end
-               end
-               return res
-       end
-
-       # Get the list of all parameter types in 'self'.
-       fun parameter_types: Map[String, MType] do
-               var res = new HashMap[String, MType]
-               for p in mparameters do
-                       res[p.name] = p
-               end
-               return res
-       end
-
-       fun is_class: Bool do
-               return self.kind == concrete_kind or self.kind == abstract_kind
-       end
-
-       fun is_interface: Bool do
-               return self.kind == interface_kind
-       end
-
-       fun is_enum: Bool do
-               return self.kind == enum_kind
-       end
-
-       fun is_abstract: Bool do
-               return self.kind == abstract_kind
-       end
-end
-
-redef class MAttribute
-       # Is this attribute nullable for sure?
-       #
-       # This mean that its introduction is declarred with a nullable static type
-       # since attributes are invariant this will work on most cases
-       # attributes with static type anchored with a virtual type are not "nullable for-sure"
-       # because this type can be redefined in subclasses
-       fun is_nullable: Bool do return intro.static_mtype isa MNullableType
-end
-
-redef class MClassDef
-       # modifiers are keywords like redef, private etc.
-       fun modifiers: Array[String] do
-               var res = new Array[String]
-               if not is_intro then
-                       res.add "redef"
-               else
-                       res.add mclass.visibility.to_s
-               end
-               res.add mclass.kind.to_s
-               return res
-       end
-
-       fun collect_mpropdefs(min_visibility: MVisibility): Set[MPropDef] do
-               var res = new HashSet[MPropDef]
-               for mpropdef in mpropdefs do
-                       if mpropdef.mproperty.visibility < min_visibility then continue
-                       res.add mpropdef
-               end
-               return res
-       end
-
-       fun collect_intro_mpropdefs(min_visibility: MVisibility): Set[MPropDef] do
-               var res = new HashSet[MPropDef]
-               for mpropdef in mpropdefs do
-                       if not mpropdef.is_intro then continue
-                       if mpropdef.mproperty.visibility < min_visibility then continue
-                       res.add mpropdef
-               end
-               return res
-       end
-
-       fun collect_redef_mpropdefs(min_visibility: MVisibility): Set[MPropDef] do
-               var res = new HashSet[MPropDef]
-               for mpropdef in mpropdefs do
-                       if mpropdef.is_intro then continue
-                       if mpropdef.mproperty.visibility < min_visibility then continue
-                       res.add mpropdef
-               end
-               return res
-       end
-end
-
-redef class MPropDef
-       # modifiers are keywords like redef, private etc.
-       fun modifiers: Array[String] do
-               var res = new Array[String]
-               if not is_intro then
-                       res.add "redef"
-               else
-                       res.add mproperty.visibility.to_s
-               end
-               var mprop = self
-               if mprop isa MVirtualTypeDef then
-                       res.add "type"
-               else if mprop isa MMethodDef then
-                       if mprop.is_abstract then
-                               res.add "abstract"
-                       else if mprop.is_intern then
-                               res.add "intern"
-                       end
-                       if mprop.mproperty.is_init then
-                               res.add "init"
-                       else
-                               res.add "fun"
-                       end
-               end
-               return res
-       end
-end
-
-# Sorters
-
-# Sort mentities by their name
-class MEntityNameSorter
-       super Comparator
-       redef type COMPARED: MEntity
-       redef fun compare(a, b) do return a.name <=> b.name
-end
-
-# Sort MConcerns based on the module importation hierarchy ranking
-# see also: `MConcern::concern_rank` and `MConcern::booster_rank`
-#
-# Comparison is made with the formula:
-#
-# ~~~nitish
-# a.concern_rank + a.booster_rank <=> b.concern_rank + b.booster_ran
-# ~~~
-#
-# If both `a` and `b` have the same ranking,
-# ordering is based on lexicographic comparison of `a.name` and `b.name`
-class MConcernRankSorter
-       super Comparator
-       redef type COMPARED: MConcern
-
-       redef fun compare(a, b) do
-               if a.concern_rank == b.concern_rank then
-                       return a.name <=> b.name
-               end
-               return a.concern_rank + a.booster_rank <=> b.concern_rank + b.booster_rank
-       end
-end
index 66d5e9f..91c552f 100644 (file)
@@ -206,9 +206,9 @@ redef class ModelBuilder
                                var mreadpropdef = npropdef.mreadpropdef
                                if mreadpropdef == null or mreadpropdef.msignature == null then return # Skip broken attribute
                                if npropdef.noinit then continue # Skip noinit attribute
-                               var atautoinit = npropdef.get_single_annotation("autoinit", self)
-                               if atautoinit != null then
-                                       # For autoinit attributes, call the reader to force
+                               var atlateinit = npropdef.get_single_annotation("lateinit", self)
+                               if atlateinit != null then
+                                       # For lateinit attributes, call the reader to force
                                        # the lazy initialization of the attribute.
                                        initializers.add(mreadpropdef.mproperty)
                                        mreadpropdef.mproperty.is_autoinit = true
@@ -299,25 +299,19 @@ redef class ModelBuilder
                                        abort
                                end
                        end
-               else if noautoinit != null then
-                       if initializers.is_empty then
-                               warning(noautoinit, "useless-noautoinit", "Warning: the list of autoinit is already empty.")
-                       end
-                       # Just clear initializers
-                       mparameters.clear
-                       initializers.clear
                else
                        # Search the longest-one and checks for conflict
                        var longest = spropdefs.first
                        if spropdefs.length > 1 then
-                               # Check for conflict in the order of initializers
-                               # Each initializer list must me a prefix of the longest list
                                # part 1. find the longest list
                                for spd in spropdefs do
                                        if spd.initializers.length > longest.initializers.length then longest = spd
                                end
                                # part 2. compare
-                               for spd in spropdefs do
+                               # Check for conflict in the order of initializers
+                               # Each initializer list must me a prefix of the longest list
+                               # If `noautoinit` is set, just ignore conflicts
+                               if noautoinit == null then for spd in spropdefs do
                                        var i = 0
                                        for p in spd.initializers do
                                                if p != longest.initializers[i] then
@@ -330,17 +324,27 @@ redef class ModelBuilder
                                end
                        end
 
-                       # Can we just inherit?
-                       if spropdefs.length == 1 and mparameters.is_empty and defined_init == null then
-                               self.toolcontext.info("{mclassdef} inherits the basic constructor {longest}", 3)
-                               mclassdef.mclass.root_init = longest
-                               return
-                       end
+                       if noautoinit != null then
+                               # If there is local or inherited initializers, then complain.
+                               if initializers.is_empty and longest.initializers.is_empty then
+                                       warning(noautoinit, "useless-noautoinit", "Warning: the list of autoinit is already empty.")
+                               end
+                               # Just clear initializers
+                               mparameters.clear
+                               initializers.clear
+                       else
+                               # Can we just inherit?
+                               if spropdefs.length == 1 and mparameters.is_empty and defined_init == null then
+                                       self.toolcontext.info("{mclassdef} inherits the basic constructor {longest}", 3)
+                                       mclassdef.mclass.root_init = longest
+                                       return
+                               end
 
-                       # Combine the inherited list to what is collected
-                       if longest.initializers.length > 0 then
-                               mparameters.prepend longest.new_msignature.mparameters
-                               initializers.prepend longest.initializers
+                               # Combine the inherited list to what is collected
+                               if longest.initializers.length > 0 then
+                                       mparameters.prepend longest.new_msignature.mparameters
+                                       initializers.prepend longest.initializers
+                               end
                        end
                end
 
@@ -656,6 +660,8 @@ redef class APropdef
                return true
        end
 
+       # Checks for useless type in redef signatures.
+       private fun check_repeated_types(modelbuilder: ModelBuilder) do end
 end
 
 redef class ASignature
@@ -1051,6 +1057,28 @@ redef class AMethPropdef
                        var nt = nsig.n_type
                        if nt != null then modelbuilder.check_visibility(nt, nt.mtype.as(not null), mpropdef)
                end
+               check_repeated_types(modelbuilder)
+       end
+
+       # For parameters, type is always useless in a redef.
+       # For return type, type is useless if not covariant with introduction.
+       redef fun check_repeated_types(modelbuilder) do
+               if mpropdef.is_intro or n_signature == null then return
+               # check params
+               for param in n_signature.n_params do
+                       if param.n_type != null then
+                               modelbuilder.advice(param.n_type, "useless-signature", "Warning: useless type repetition on parameter `{param.n_id.text}` for redefined method `{mpropdef.name}`")
+                       end
+               end
+               # get intro
+               var intro = mpropdef.mproperty.intro
+               var n_intro = modelbuilder.mpropdef2npropdef.get_or_null(intro)
+               if n_intro == null or not n_intro isa AMethPropdef then return
+               # check return type
+               var ret_type = n_signature.ret_type
+               if ret_type != null and ret_type == n_intro.n_signature.ret_type then
+                       modelbuilder.advice(n_signature.n_type, "useless-signature", "Warning: useless return type repetition for redefined method `{mpropdef.name}`")
+               end
        end
 end
 
@@ -1187,17 +1215,17 @@ redef class AAttrPropdef
                end
 
                var atlazy = self.get_single_annotation("lazy", modelbuilder)
-               var atautoinit = self.get_single_annotation("autoinit", modelbuilder)
-               if atlazy != null or atautoinit != null then
-                       if atlazy != null and atautoinit != null then
-                               modelbuilder.error(atlazy, "Error: `lazy` incompatible with `autoinit`.")
+               var atlateinit = self.get_single_annotation("lateinit", modelbuilder)
+               if atlazy != null or atlateinit != null then
+                       if atlazy != null and atlateinit != null then
+                               modelbuilder.error(atlazy, "Error: `lazy` incompatible with `lateinit`.")
                                return
                        end
                        if not has_value then
                                if atlazy != null then
                                        modelbuilder.error(atlazy, "Error: `lazy` attributes need a value.")
-                               else if atautoinit != null then
-                                       modelbuilder.error(atautoinit, "Error: `autoinit` attributes need a value.")
+                               else if atlateinit != null then
+                                       modelbuilder.error(atlateinit, "Error: `lateinit` attributes need a value.")
                                end
                                has_value = true
                                return
@@ -1217,6 +1245,10 @@ redef class AAttrPropdef
                        return
                end
 
+               if not mclassdef.is_intro and not has_value and not noinit then
+                       modelbuilder.advice(self, "attr-in-refinement", "Warning: attributes in refinement need a value or `noautoinit`.")
+               end
+
                var writename = name + "="
                var atwritable = self.get_single_annotation("writable", modelbuilder)
                if atwritable != null then
@@ -1289,6 +1321,9 @@ redef class AAttrPropdef
                                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")
+                                       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")
                                        if cla != null then mtype = cla.mclass_type
@@ -1346,6 +1381,7 @@ redef class AAttrPropdef
                if mlazypropdef != null then
                        mlazypropdef.static_mtype = modelbuilder.model.get_mclasses_by_name("Bool").first.mclass_type
                end
+               check_repeated_types(modelbuilder)
        end
 
        redef fun check_signature(modelbuilder)
@@ -1450,6 +1486,25 @@ redef class AAttrPropdef
                        end
                end
        end
+
+       # Type is useless if the attribute type is the same thant the intro.
+       redef fun check_repeated_types(modelbuilder) do
+               if mreadpropdef.is_intro or n_type == null then return
+               # get intro
+               var intro = mreadpropdef.mproperty.intro
+               var n_intro = modelbuilder.mpropdef2npropdef.get_or_null(intro)
+               if n_intro == null then return
+               # get intro type
+               var ntype = null
+               if n_intro isa AMethPropdef then
+                       ntype = n_intro.n_signature.ret_type
+               else if n_intro isa AAttrPropdef and n_intro.n_type != null then
+                       ntype = n_intro.n_type.mtype
+               end
+               # check
+               if ntype ==null or ntype != n_type.mtype then return
+               modelbuilder.advice(n_type, "useless-signature", "Warning: useless type repetition on redefined attribute `{mpropdef.name}`")
+       end
 end
 
 redef class ATypePropdef
index a1f49a7..cc30171 100644 (file)
@@ -89,10 +89,11 @@ redef class MClassType
        do
                var name = mclass.name
                if name == "Bool" then return "int"
-               if name == "Char" then return "char"
+               if name == "Char" then return "uint32_t"
                if name == "Float" then return "double"
                if name == "Int" then return "long"
-               if name == "NativeString" then return "char*"
+               if name == "Byte" then return "unsigned char"
+               if name == "NativeString" then return "unsigned char*"
                if mclass.kind == extern_kind then
                        var ctype = mclass.ctype
                        assert ctype != null
@@ -104,10 +105,11 @@ redef class MClassType
        redef fun cname_blind do
                var name = mclass.name
                if name == "Bool" then return "int"
-               if name == "Char" then return "char"
+               if name == "Char" then return "uint32_t"
                if name == "Float" then return "double"
                if name == "Int" then return "long"
-               if name == "NativeString" then return "char*"
+               if name == "Byte" then return "unsigned char"
+               if name == "NativeString" then return "unsigned char*"
                if mclass.kind == extern_kind then return "void*"
                return "struct nitni_instance *"
        end
index 631421a..7de8053 100644 (file)
@@ -72,7 +72,7 @@ redef class MMethod
 
                var cparams = new List[String]
                if not self.is_init then
-                       cparams.add( "{call_context.name_mtype(recv_mtype)} recv" )
+                       cparams.add( "{call_context.name_mtype(recv_mtype)} self" )
                end
                for p in signature.mparameters do
                        var param_mtype = p.mtype.resolve_for(recv_mtype, recv_mtype, from_mmodule, true)
@@ -110,7 +110,7 @@ redef class MMethod
 
                var cparams = new List[String]
                if not self.is_init then
-                       cparams.add(call_context.cast_to(recv_mtype, "recv{param_suffix}"))
+                       cparams.add(call_context.cast_to(recv_mtype, "self{param_suffix}"))
                end
 
                for p in signature.mparameters do
index 44cab72..4d00945 100644 (file)
@@ -49,7 +49,7 @@ var model = new Model
 # A model builder to parse files
 var modelbuilder = new ModelBuilder(model, toolcontext)
 
-# Here we load an process all modules passed on the command line
+# Here we load and process all modules passed on the command line
 var mmodules = modelbuilder.parse_full(arguments)
 toolcontext.mmodules_to_check.add_all mmodules
 
index 0b60a1b..83c4c6c 100644 (file)
@@ -27,7 +27,6 @@ module nitserial
 
 import frontend
 import rapid_type_analysis
-import model_utils
 import template
 
 # A Nit module
@@ -94,7 +93,7 @@ end
 
 redef class MClassType
        redef fun is_visible_from(mmodule) do
-               return mmodule.is_visible(mclass.intro_mmodule, public_visibility)
+               return mmodule.is_visible(mclass.intro_mmodule, mclass.visibility)
        end
 end
 
index 69b34e7..cf5ab95 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# nit index, is a command tool used to display documentation
+# `nitx`, is a command tool that displays useful informations about the code.
+#
+# Features:
+#
+# * Display comment from name/namespace
+# * Display documentation page from Nitdoc in console
+# * Find type usage in parameters, returns and news.
+# * Find usage of a specific property.
+# * Find source code related to class/property by its name.
 module nitx
 
-import model_utils
-import modelize
-
-# Main class of the nit index tool
-# NitIndex build the model using the toolcontext argument
-# then wait for query on std in to display documentation
-class NitIndex
-       private var toolcontext: ToolContext
-       private var model: Model is noinit
-       private var mbuilder: ModelBuilder is noinit
-       private var mainmodule: MModule is noinit
-       private var arguments: Array[String] is noinit
-       private var renderer: PagerMatchesRenderer is noinit
-
-       # New constructor to use the pre-calculated model when interpreting a module
-       init with_infos(mbuilder: ModelBuilder, mmodule: MModule) do
-
-               self.model = mbuilder.model
-               self.mbuilder = mbuilder
-
-               self.mainmodule = mmodule
-               self.toolcontext = mbuilder.toolcontext
-               self.arguments = toolcontext.option_context.rest
-
-               renderer = new PagerMatchesRenderer(self)
-       end
-
-       init do
-               # We need a model to collect stufs
-               self.arguments = toolcontext.option_context.rest
-
-               if arguments.length > 2 then
-                       print toolcontext.tooldescription
-                       exit(1)
-               end
-
-               model = new Model
-               mbuilder = new ModelBuilder(model, toolcontext)
-
-               var mmodules = mbuilder.parse([arguments.first])
-               if mmodules.is_empty then return
-               mbuilder.run_phases
-               assert mmodules.length == 1
-               self.mainmodule = mmodules.first
-
-               renderer = new PagerMatchesRenderer(self)
-       end
-
-       fun start do
-               if arguments.length == 1 then
-                       welcome
-                       prompt
-               else
-                       search(arguments[1])
-               end
-       end
-
-       fun welcome do
-               print "Welcome in the Nit Index."
-               print ""
-               print "Loaded modules:"
-               var mmodules = new Array[MModule]
-               mmodules.add_all(model.mmodules)
-               var sorter = new MEntityNameSorter
-               sorter.sort(mmodules)
-               for m in mmodules do
-                       print "\t{m.name}"
-               end
-               print ""
-               help
-       end
-
-       fun help do
-               print "\nCommands:"
-               print "\tname\t\tlookup module, class and property with the corresponding 'name'"
-               print "\tparam: Type\tlookup methods using the corresponding 'Type' as parameter"
-               print "\treturn: Type\tlookup methods returning the corresponding 'Type'"
-               print "\tnew: Type\tlookup methods creating new instances of 'Type'"
-               print "\t:h\t\tdisplay this help message"
-               print "\t:q\t\texit"
-               print ""
-       end
-
-       fun prompt do
-               printn ">> "
-               search(sys.stdin.read_line)
-       end
-
-       fun search(entry: String) do
-               if entry.is_empty then
-                       prompt
-                       return
-               end
-               if entry == ":h" then
-                       help
-                       prompt
-                       return
-               end
-               if entry == ":q" then return
-
-               # Parse query string
-               var query = parse_query(entry)
-
-               # search in index
-               var matches = new HashSet[IndexMatch]
-               if query isa IndexQueryPair then
-                       if query.category == "return" then
-                               # seek return types
-                               matches.add_all(search_returns(query))
-                       else if query.category == "param" then
-                               # seek param types
-                               matches.add_all(search_params(query))
-                       else if query.category == "new" then
-                               # seek type inits
-                               matches.add_all(search_inits(query))
-                       end
-               else
-                       matches.add_all(search_modules(query))
-                       matches.add_all(search_classes(query))
-                       matches.add_all(search_properties(query))
-               end
-               # no matches
-               if matches.is_empty then
-                       print "Nothing known about '{query.string}', type ':h' for help"
-               else
-                       renderer.render_matches(query, matches)
-               end
-               if arguments.length == 1 then prompt
-       end
-
-       private fun parse_query(str: String): IndexQuery do
-               var parts = str.split_with(":")
-               if parts.length == 1 then
-                       return new IndexQuery(str, parts[0])
-               else
-                       var category = parts[0]
-                       var keyword = parts[1]
-                       if keyword.chars.first == ' ' then keyword = keyword.substring_from(1)
-                       return new IndexQueryPair(str, keyword, category)
-               end
-       end
-
-       # search for modules
-       private fun search_modules(query: IndexQuery): Set[MModule] do
-               var matches = new HashSet[MModule]
-               for mmodule in model.mmodules do
-                       if mmodule.name == query.keyword then matches.add(mmodule)
-               end
-               return matches
-       end
-
-       # search for classes
-       private fun search_classes(query: IndexQuery): Set[MClass] do
-               var matches = new HashSet[MClass]
-               for mclass in model.mclasses do
-                       if mclass.name == query.keyword then matches.add(mclass)
-               end
-               return matches
-       end
-
-       # search for properties
-       private fun search_properties(query: IndexQuery): Set[MProperty] do
-               var matches = new HashSet[MProperty]
-               for mproperty in model.mproperties do
-                       if mproperty.name == query.keyword then matches.add(mproperty)
-               end
-               return matches
-       end
-
-       # search for mpropdef returning keyword
-       private fun search_returns(query: IndexQuery): Set[MProperty] do
-               var matches = new HashSet[MProperty]
-               for mproperty in model.mproperties do
-                       var intro = mproperty.intro
-                       if intro isa MMethodDef then
-                               if intro.msignature.return_mtype != null and intro.msignature.return_mtype.to_console.has_prefix(query.keyword) then matches.add(mproperty)
-                       else if intro isa MAttributeDef then
-                               if intro.static_mtype.to_console.has_prefix(query.keyword) then matches.add(mproperty)
-                       end
-               end
-               return matches
-       end
+import modelbuilder
+import doc::doc_phases::doc_console
 
-       # search for mpropdef taking keyword as parameter
-       private fun search_params(query: IndexQuery): Set[MProperty] do
-               var matches = new HashSet[MProperty]
-               for mproperty in model.mproperties do
-                       var intro = mproperty.intro
-                       if intro isa MMethodDef then
-                               var mparameters = intro.msignature.mparameters
-                               for mparameter in mparameters do
-                                       if mparameter.mtype.to_console.has_prefix(query.keyword) then matches.add(mproperty)
-                               end
-                       else if intro isa MAttributeDef then
-                               if intro.static_mtype.to_console.has_prefix(query.keyword) then matches.add(mproperty)
-                       end
-               end
-               return matches
-       end
-
-       # search for mpropdef creating new instance of keyword
-       private fun search_inits(query: IndexQuery): Set[MPropDef] do
-               var mtype2mpropdefs = toolcontext.nitx_phase.mtype2mpropdefs
-               var matches = new HashSet[MPropDef]
-               for mtype in mtype2mpropdefs.keys do
-                       if mtype.to_console.has_prefix(query.keyword) then
-                               for mpropdef in mtype2mpropdefs[mtype] do
-                                       matches.add(mpropdef)
-                               end
-                       end
-               end
-               return matches
-       end
-end
-
-private class IndexQuery
-       var string: String
-       var keyword: String
-end
-
-private class IndexQueryPair
-       super IndexQuery
-       var category: String
-end
+redef class ToolContext
 
-# A match to a query in the nit index
-private interface IndexMatch
-       # Short preview of the result for result list display
-       fun preview(index: NitIndex, output: Pager) is abstract
-       fun content(index: NitIndex, output: Pager) is abstract
-end
+       # Nittx generation phase.
+       var docx: Phase = new NitxPhase(self, null)
 
-# Code Analysis
+       # Used to shortcut the prompt and display directly the result in console.
+       var opt_query = new OptionString("Nitx query to perform", "-q", "--query")
 
-redef class ToolContext
-       private var nitx_phase: NitxPhase = new NitxPhase(self, [modelize_property_phase])
+       init do option_context.add_option opt_query
 end
 
-# Compiler phase for nitx
+# Nitx phase explores the model and prepares the console rendering.
 private class NitxPhase
        super Phase
-
-       var mtype2mpropdefs = new HashMap[MType, Set[MPropDef]]
-       redef fun process_npropdef(npropdef) do
-               var visitor = new TypeInitVisitor
-               visitor.enter_visit(npropdef)
-               for mtype in visitor.inits do
-                       if not mtype2mpropdefs.has_key(mtype) then
-                               mtype2mpropdefs[mtype] = new HashSet[MPropDef]
-                       end
-                       mtype2mpropdefs[mtype].add(npropdef.mpropdef.as(not null))
-               end
-       end
-end
-
-# Visitor looking for initialized mtype (new T)
-private class TypeInitVisitor
-       super Visitor
-
-       var inits = new HashSet[MType]
-       redef fun visit(node)
-       do
-               node.visit_all(self)
-               # look for init
-               if not node isa ANewExpr then return
-               var mtype = node.n_type.mtype
-               if mtype != null then inits.add(mtype)
-       end
-end
-
-# Pager output for console
-
-private class PagerMatchesRenderer
-       var index: NitIndex
-
-       fun render_matches(query: IndexQuery, matches: Collection[IndexMatch]) do
-               var pager = new Pager
-               if matches.length == 1 then
-                       pager.add("= result for '{query.string}'".bold)
-                       pager.add("")
-                       pager.indent = pager.indent + 1
-                       matches.first.content(index, pager)
-                       pager.indent = pager.indent - 1
-               else
-                       pager.add("= multiple results for '{query.string}'".bold)
-                       pager.indent = pager.indent + 1
-                       for match in matches do
-                               pager.add("")
-                               match.preview(index, pager)
-                       end
-                       pager.indent = pager.indent - 1
-               end
-               pager.render
-       end
-
-       fun props_fulldoc(pager: Pager, raw_mprops: List[MProperty]) do
-               # group by module
-               var cats = new HashMap[MModule, Array[MProperty]]
-               for mprop in raw_mprops do
-                       if mprop isa MAttribute then continue
-                       var key = mprop.intro.mclassdef.mmodule
-                       if not cats.has_key(key) then cats[key] = new Array[MProperty]
-                       cats[key].add(mprop)
-               end
-               #sort groups
-               var sorter = new MEntityNameSorter
-               var sorted = new Array[MModule]
-               sorted.add_all(cats.keys)
-               sorter.sort(sorted)
-               # display
-               for mmodule in sorted do
-                       var mprops = cats[mmodule]
-                       pager.add("# matches in module {mmodule.namespace.bold}")
-                       sorter.sort(mprops)
-                       for mprop in mprops do
-
-                       end
-                       pager.add_rule
-               end
-       end
-end
-
-private class Pager
-       var content = new FlatBuffer
-       var indent = 0
-       fun add(text: String) do
-               add_indent
-               addn("{text}\n")
-       end
-       fun add_indent do addn("  " * indent)
-       fun addn(text: String) do content.append(text.escape)
-       fun add_rule do add("\n---\n")
-       fun render do sys.system("echo \"{content}\" | less -r")
-end
-
-redef class MModule
-       super IndexMatch
-       # prototype of the module
-       #       module name
-       private fun prototype: String do return "module {name.bold}"
-
-       # namespace of the module
-       #       project::name
-       private fun namespace: String do
-               if mgroup == null or mgroup.mproject.name == self.name then
-                       return self.name
-               else
-                       return "{mgroup.mproject}::{self.name}"
-               end
-       end
-
-       redef fun preview(index, pager) do
-               var mdoc = self.mdoc
-               if mdoc != null then
-                       pager.add(mdoc.short_comment.green)
-               end
-               pager.add(prototype)
-               pager.add("{namespace}".bold.gray + " (lines {location.lines})".gray)
-       end
-
-       redef fun content(index, pager) do
-               var mdoc = self.mdoc
-               if mdoc != null then
-                       for comment in mdoc.content do pager.add(comment.green)
-               end
-               pager.add(prototype)
-               pager.add("{namespace}".bold.gray + " (lines {location.lines})".gray)
-               pager.indent = pager.indent + 1
-               var sorter = new MEntityNameSorter
-               # imported modules
-               var imports = new Array[MModule]
-               for mmodule in in_importation.direct_greaters.to_a do
-                       imports.add(mmodule)
-               end
-               if not imports.is_empty then
-                       sorter.sort(imports)
-                       pager.add("")
-                       pager.add("== imported modules".bold)
-                       pager.indent = pager.indent + 1
-                       for mmodule in imports do
-                               pager.add("")
-                               mmodule.preview(index, pager)
-                       end
-                       pager.indent = pager.indent - 1
-               end
-               # mclassdefs
-               var intros = new Array[MClassDef]
-               var redefs = new Array[MClassDef]
-               for mclassdef in mclassdefs do
-                       if mclassdef.is_intro then
-                               intros.add(mclassdef)
-                       else
-                               redefs.add(mclassdef)
-                       end
-               end
-               # introductions
-               if not intros.is_empty then
-                       sorter.sort(intros)
-                       pager.add("")
-                       pager.add("== introduced classes".bold)
-                       pager.indent = pager.indent + 1
-                       for mclass in intros do
-                               pager.add("")
-                               mclass.preview(index, pager)
-                       end
-                       pager.indent = pager.indent - 1
-               end
-               # refinements
-               if not redefs.is_empty then
-                       sorter.sort(redefs)
-                       pager.add("")
-                       pager.add("== refined classes".bold)
-                       pager.indent = pager.indent + 1
-                       for mclass in redefs do
-                               pager.add("")
-                               mclass.preview(index, pager)
-                       end
-                       pager.indent = pager.indent - 1
-               end
-               pager.indent = pager.indent - 1
-       end
-end
-
-redef class MClass
-       super IndexMatch
-       # return the generic signature of the class
-       #       [E, F]
-       private fun signature: String do
-               var res = new FlatBuffer
-               if arity > 0 then
-                       res.append("[")
-                       for i in [0..mparameters.length[ do
-                               res.append(mparameters[i].name)
-                               if i < mparameters.length - 1 then res.append(", ")
-                       end
-                       res.append("]")
-               end
-               return res.to_s
-       end
-
-       # return the prototype of the class
-       # class name is displayed with colors depending on visibility
-       #       abstract interface Foo[E]
-       private fun prototype: String do
-               var res = new FlatBuffer
-               res.append("{kind} ")
-               if visibility.to_s == "public" then res.append("{name}{signature}".bold.green)
-               if visibility.to_s == "private" then res.append("{name}{signature}".bold.red)
-               if visibility.to_s == "protected" then res.append("{name}{signature}".bold.yellow)
-               return res.to_s
-       end
-
-       private fun namespace: String do
-               return "{intro_mmodule.namespace}::{name}"
-       end
-
-       redef fun preview(index, pager) do
-               intro.preview(index, pager)
-       end
-
-       redef fun content(index, pager) do
-               # intro comment
-               var sorter = new MEntityNameSorter
-               var mdoc = intro.mdoc
-               if mdoc != null then
-                       for comment in mdoc.content do pager.add(comment.green)
-               end
-               pager.add(intro.to_console)
-               pager.add("{intro.namespace}".bold.gray + " (lines {intro.location.lines})".gray)
-               pager.indent = pager.indent + 1
-               # parents
-               var supers = self.in_hierarchy(index.mainmodule).direct_greaters.to_a
-               if not supers.is_empty then
-                       sorter.sort(supers)
-                       pager.add("")
-                       pager.add("== supers".bold)
-                       pager.indent = pager.indent + 1
-                       for mclass in supers do
-                               pager.add("")
-                               mclass.preview(index, pager)
-                       end
-                       pager.indent = pager.indent - 1
-               end
-               # formal types
-               if not self.parameter_types.is_empty then
-                       pager.add("")
-                       pager.add("== formal types".bold)
-                       pager.indent = pager.indent + 1
-                       for ft, bound in self.parameter_types do
-                               pager.add("")
-                               pager.add("{ft.to_s.bold.green}: {bound.to_console}")
-                       end
-                       pager.indent = pager.indent - 1
-               end
-               # intro mproperties
-               var mpropdefs = intro.mpropdefs
-               index.mainmodule.linearize_mpropdefs(mpropdefs)
-               for cat in intro.cats2mpropdefs.keys do
-                       var defs = intro.cats2mpropdefs[cat].to_a
-                       if defs.is_empty then continue
-                       sorter.sort(defs)
-                       pager.add("")
-                       pager.add("== {cat}".bold)
-                       pager.indent = pager.indent + 1
-                       for mpropdef in defs do
-                               pager.add("")
-                               mpropdef.preview(index, pager)
-                       end
-                       pager.indent = pager.indent - 1
-               end
-               # refinements
-               if not self.mclassdefs.is_empty then
-                       pager.add("")
-                       pager.add("== refinements".bold)
-                       var mclassdefs = self.mclassdefs
-                       index.mainmodule.linearize_mclassdefs(mclassdefs)
-                       pager.indent = pager.indent + 1
-                       for mclassdef in mclassdefs do
-                               if not mclassdef.is_intro then
-                                       pager.add("")
-                                       mclassdef.content(index, pager)
-                               end
-                       end
-                       pager.indent = pager.indent - 1
-               end
-               pager.indent = pager.indent - 1
-       end
-end
-
-redef class MClassDef
-       super IndexMatch
-
-       private fun namespace: String do
-               return "{mmodule.full_name}::{mclass.name}"
-       end
-
-       fun to_console: String do
-               var res = new FlatBuffer
-               if not is_intro then res.append("redef ")
-               res.append(mclass.prototype)
-               return res.to_s
-       end
-
-       redef fun preview(index, pager) do
-               var mdoc = self.mdoc
-               if mdoc != null then
-                       pager.add(mdoc.short_comment.green)
-               end
-               pager.add(to_console)
-               pager.add("{namespace}".bold.gray + " (lines {location.lines})".gray)
-       end
-
-       redef fun content(index, pager) do
-               var mdoc = self.mdoc
-               if mdoc != null then
-                       for comment in mdoc.content do pager.add(comment.green)
-               end
-               pager.add(to_console)
-               pager.add("{namespace}".bold.gray + " (lines {location.lines})".gray)
-               pager.indent = pager.indent + 1
-               var mpropdefs = self.mpropdefs
-               var sorter = new MEntityNameSorter
-               index.mainmodule.linearize_mpropdefs(mpropdefs)
-               for cat in cats2mpropdefs.keys do
-                       var defs = cats2mpropdefs[cat].to_a
-                       sorter.sort(defs)
-                       if defs.is_empty then continue
-                       pager.add("")
-                       pager.add("== {cat}".bold)
-                       pager.indent = pager.indent + 1
-                       for mpropdef in defs do
-                               pager.add("")
-                               mpropdef.preview(index, pager)
-                       end
-                       pager.indent = pager.indent - 1
-               end
-               pager.indent = pager.indent - 1
-       end
-
-       # get mpropdefs grouped by categories (vt, init, methods)
-       fun cats2mpropdefs: Map[String, Set[MPropDef]] do
-               var cats = new ArrayMap[String, Set[MPropDef]]
-               cats["virtual types"] = new HashSet[MPropDef]
-               cats["constructors"] = new HashSet[MPropDef]
-               cats["methods"] = new HashSet[MPropDef]
-
-               for mpropdef in mpropdefs do
-                       if mpropdef isa MAttributeDef then continue
-                       if mpropdef isa MVirtualTypeDef then cats["virtual types"].add(mpropdef)
-                       if mpropdef isa MMethodDef then
-                               if mpropdef.mproperty.is_init then
-                                       cats["constructors"].add(mpropdef)
-                               else
-                                       cats["methods"].add(mpropdef)
-                               end
-                       end
-               end
-               return cats
-       end
-end
-
-redef class MProperty
-       super IndexMatch
-
-       fun to_console: String do
-               if visibility.to_s == "public" then return name.green
-               if visibility.to_s == "private" then return name.red
-               if visibility.to_s == "protected" then return name.yellow
-               return name.bold
-       end
-
-       redef fun preview(index, pager) do
-               intro.preview(index, pager)
-       end
-
-       redef fun content(index, pager) do
-               intro.content(index, pager)
-               pager.indent = pager.indent + 1
-               var mpropdefs = self.mpropdefs
-               index.mainmodule.linearize_mpropdefs(mpropdefs)
-               for mpropdef in mpropdefs do
-                       if mpropdef isa MAttributeDef then continue
-                       if not mpropdef.is_intro then
-                               pager.add("")
-                               mpropdef.preview(index, pager)
-                       end
-               end
-               pager.indent = pager.indent - 1
-       end
-end
-
-redef class MPropDef
-       super IndexMatch
-
-       fun to_console: String is abstract
-
-       private fun namespace: String do
-               return "{mclassdef.namespace}::{mproperty.name}"
-       end
-
-       redef fun preview(index, pager) do
-               var mdoc = self.mdoc
-               if mdoc != null then
-                       pager.add(mdoc.short_comment.green)
-               end
-               pager.add(to_console)
-               pager.add("{namespace}".bold.gray + " (lines {location.lines})".gray)
-       end
-
-       redef fun content(index, pager) do
-               var mdoc = self.mdoc
-               if mdoc != null then
-                       for comment in mdoc.content do pager.add(comment.green)
-               end
-               pager.add(to_console)
-               pager.add("{namespace}".bold.gray + " (lines {location.lines})".gray)
-       end
-end
-
-redef class MMethodDef
-       redef fun to_console do
-               var res = new FlatBuffer
-               if not is_intro then res.append("redef ")
-               if not mproperty.is_init then res.append("fun ")
-               res.append(mproperty.to_console.bold)
-               if msignature != null then res.append(msignature.to_console)
-               if is_abstract then res.append " is abstract"
-               if is_intern then res.append " is intern"
-               if is_extern then res.append " is extern"
-               return res.to_s
-       end
-end
-
-redef class MVirtualTypeDef
-       redef fun to_console do
-               var res = new FlatBuffer
-               res.append("type ")
-               res.append(mproperty.to_console.bold)
-               res.append(": {bound.to_console}")
-               return res.to_s
-       end
-end
-
-redef class MAttributeDef
-       redef fun to_console do
-               var res = new FlatBuffer
-               res.append("var ")
-               res.append(mproperty.to_console.bold)
-               res.append(": {static_mtype.to_console}")
-               return res.to_s
-       end
-end
-
-redef class MSignature
-       redef fun to_console do
-               var res = new FlatBuffer
-               if not mparameters.is_empty then
-                       res.append("(")
-                       for i in [0..mparameters.length[ do
-                               res.append(mparameters[i].to_console)
-                               if i < mparameters.length - 1 then res.append(", ")
-                       end
-                       res.append(")")
-               end
-               if return_mtype != null then
-                       res.append(": {return_mtype.to_console}")
-               end
-               return res.to_s
-       end
-end
-
-redef class MParameter
-       fun to_console: String do
-               var res = new FlatBuffer
-               res.append("{name}: {mtype.to_console}")
-               if is_vararg then res.append("...")
-               return res.to_s
-       end
-end
-
-redef class MType
-       fun to_console: String do return self.to_s
-end
-
-redef class MNullableType
-       redef fun to_console do return "nullable {mtype.to_console}"
-end
-
-redef class MGenericType
-       redef fun to_console do
-               var res = new FlatBuffer
-               res.append("{mclass.name}[")
-               for i in [0..arguments.length[ do
-                       res.append(arguments[i].to_console)
-                       if i < arguments.length - 1 then res.append(", ")
-               end
-               res.append("]")
-               return res.to_s
-       end
-end
-
-redef class MParameterType
-       redef fun to_console do return name
-end
-
-redef class MVirtualType
-       redef fun to_console do return mproperty.name
-end
-
-redef class MDoc
-       private fun short_comment: String do
-               return content.first
-       end
-end
-
-# Redef String class to add a function to color the string
-redef class String
-
-       private fun add_escape_char(escapechar: String): String do
-               return "{escapechar}{self}\\033[0m"
-       end
-
-       private fun esc: Char do return 27.ascii
-       private fun gray: String do return add_escape_char("{esc}[30m")
-       private fun red: String do return add_escape_char("{esc}[31m")
-       private fun green: String do return add_escape_char("{esc}[32m")
-       private fun yellow: String do return add_escape_char("{esc}[33m")
-       private fun blue: String do return add_escape_char("{esc}[34m")
-       private fun purple: String do return add_escape_char("{esc}[35m")
-       private fun cyan: String do return add_escape_char("{esc}[36m")
-       private fun light_gray: String do return add_escape_char("{esc}[37m")
-       private fun bold: String do return add_escape_char("{esc}[1m")
-       private fun underline: String do return add_escape_char("{esc}[4m")
-
-       private fun escape: String
+       redef fun process_mainmodule(mainmodule, mmodules)
        do
-               var b = new FlatBuffer
-               for c in self.chars do
-                       if c == '\n' then
-                               b.append("\\n")
-                       else if c == '\0' then
-                               b.append("\\0")
-                       else if c == '"' then
-                               b.append("\\\"")
-                       else if c == '\\' then
-                               b.append("\\\\")
-                       else if c == '`' then
-                               b.append("'")
-                       else if c.ascii < 32 then
-                               b.append("\\{c.ascii.to_base(8, false)}")
-                       else
-                               b.add(c)
-                       end
+               var doc = new DocModel(mainmodule.model, mainmodule)
+
+               var phases = [
+                       new ExtractionPhase(toolcontext, doc),
+                       new MakePagePhase(toolcontext, doc),
+                       new ConcernsPhase(toolcontext, doc),
+                       new StructurePhase(toolcontext, doc),
+                       new POSetPhase(toolcontext, doc): DocPhase]
+
+               for phase in phases do
+                       toolcontext.info("# {phase.class_name}", 1)
+                       phase.apply
+               end
+
+               # start nitx
+               var nitx = new Nitx(toolcontext, doc)
+               var q = toolcontext.opt_query.value
+               if q != null then # shortcut prompt
+                       print ""
+                       nitx.do_query(q)
+                       return
                end
-               return b.to_s
-       end
-end
-
-redef class Location
-       fun lines: String do
-               return "{line_start}-{line_end}"
+               nitx.start
        end
 end
 
-# Create a tool context to handle options and paths
+# build toolcontext
 var toolcontext = new ToolContext
-toolcontext.tooldescription = "Usage: nitx [OPTION]... <file.nit> [query]\nDisplays specific pieces of API information from Nit source files."
+var tpl = new Template
+tpl.add "Usage: nitx [OPTION]... <file.nit>... [query]\n"
+tpl.add "Displays specific pieces of API information from Nit source files."
+toolcontext.tooldescription = tpl.write_to_string
+
+# process options
 toolcontext.process_options(args)
+var arguments = toolcontext.option_context.rest
 
-# Here we launch the nit index
-var ni = new NitIndex(toolcontext)
-ni.start
+# build model
+var model = new Model
+var mbuilder = new ModelBuilder(model, toolcontext)
+var mmodules = mbuilder.parse_full(arguments)
 
-# TODO seek subclasses and super classes <.<class> >.<class>
-# TODO seek subclasses and super types <:<type> >:<type>
-# TODO seek with regexp
-# TODO standardize namespaces with private option
+# process
+if mmodules.is_empty then return
+mbuilder.run_phases
+toolcontext.run_global_phases(mmodules)
index 43a1600..9a3372c 100644 (file)
@@ -1218,7 +1218,7 @@ redef class THexNumber
     end
 end
 
-redef class TFloat
+redef class TBinNumber
     redef fun parser_index: Int
     do
        return 101
@@ -1230,7 +1230,7 @@ redef class TFloat
     end
 end
 
-redef class TString
+redef class TOctNumber
     redef fun parser_index: Int
     do
        return 102
@@ -1242,7 +1242,7 @@ redef class TString
     end
 end
 
-redef class TStartString
+redef class TBytenum
     redef fun parser_index: Int
     do
        return 103
@@ -1254,7 +1254,7 @@ redef class TStartString
     end
 end
 
-redef class TMidString
+redef class THexBytenum
     redef fun parser_index: Int
     do
        return 104
@@ -1266,7 +1266,7 @@ redef class TMidString
     end
 end
 
-redef class TEndString
+redef class TBinBytenum
     redef fun parser_index: Int
     do
        return 105
@@ -1278,7 +1278,7 @@ redef class TEndString
     end
 end
 
-redef class TChar
+redef class TOctBytenum
     redef fun parser_index: Int
     do
        return 106
@@ -1290,7 +1290,7 @@ redef class TChar
     end
 end
 
-redef class TBadString
+redef class TFloat
     redef fun parser_index: Int
     do
        return 107
@@ -1302,7 +1302,7 @@ redef class TBadString
     end
 end
 
-redef class TBadChar
+redef class TString
     redef fun parser_index: Int
     do
        return 108
@@ -1314,7 +1314,7 @@ redef class TBadChar
     end
 end
 
-redef class TExternCodeSegment
+redef class TStartString
     redef fun parser_index: Int
     do
        return 109
@@ -1326,11 +1326,83 @@ redef class TExternCodeSegment
     end
 end
 
+redef class TMidString
+    redef fun parser_index: Int
+    do
+       return 110
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TEndString
+    redef fun parser_index: Int
+    do
+       return 111
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TChar
+    redef fun parser_index: Int
+    do
+       return 112
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TBadString
+    redef fun parser_index: Int
+    do
+       return 113
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TBadChar
+    redef fun parser_index: Int
+    do
+       return 114
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
+redef class TExternCodeSegment
+    redef fun parser_index: Int
+    do
+       return 115
+    end
+
+    init init_tk(loc: Location)
+    do
+               _location = loc
+    end
+end
+
 
 redef class EOF
     redef fun parser_index: Int
     do
-       return 110
+       return 116
     end
 end
 
@@ -1641,30 +1713,48 @@ redef class Lexer
                        return new THexNumber.init_tk(location)
                end
                if accept_token == 102 then
-                       return new TFloat.init_tk(location)
+                       return new TBinNumber.init_tk(location)
                end
                if accept_token == 103 then
-                       return new TString.init_tk(location)
+                       return new TOctNumber.init_tk(location)
                end
                if accept_token == 104 then
-                       return new TStartString.init_tk(location)
+                       return new TBytenum.init_tk(location)
                end
                if accept_token == 105 then
-                       return new TMidString.init_tk(location)
+                       return new THexBytenum.init_tk(location)
                end
                if accept_token == 106 then
-                       return new TEndString.init_tk(location)
+                       return new TBinBytenum.init_tk(location)
                end
                if accept_token == 107 then
-                       return new TChar.init_tk(location)
+                       return new TOctBytenum.init_tk(location)
                end
                if accept_token == 108 then
-                       return new TBadString.init_tk(location)
+                       return new TFloat.init_tk(location)
                end
                if accept_token == 109 then
-                       return new TBadChar.init_tk(location)
+                       return new TString.init_tk(location)
                end
                if accept_token == 110 then
+                       return new TStartString.init_tk(location)
+               end
+               if accept_token == 111 then
+                       return new TMidString.init_tk(location)
+               end
+               if accept_token == 112 then
+                       return new TEndString.init_tk(location)
+               end
+               if accept_token == 113 then
+                       return new TChar.init_tk(location)
+               end
+               if accept_token == 114 then
+                       return new TBadString.init_tk(location)
+               end
+               if accept_token == 115 then
+                       return new TBadChar.init_tk(location)
+               end
+               if accept_token == 116 then
                        return new TExternCodeSegment.init_tk(location)
                end
                abort # unknown token index `accept_token`
index eb80d5f..592cc42 100644 (file)
@@ -27,7 +27,9 @@ all = [0 .. 0xFF];
 lowercase = ['a' .. 'z'];
 uppercase = ['A' .. 'Z'];
 digit = ['0' .. '9'];
-hexdigit = ['0'..'9'] | ['a'..'f'] | ['A'..'F'];
+hexdigit = ['0'..'9'] | ['a'..'f'] | ['A'..'F'] | '_';
+bindigit = '0' | '1' | '_';
+octdigit = ['0' .. '7'] | '_';
 letter = lowercase | uppercase | digit | '_';
 
 tab = 9;
@@ -199,7 +201,13 @@ attrid = '_' lowercase letter*;
 
 number = digit+;
 hex_number = ('0x' | '0X') hexdigit+;
-float = digit* '.' digit+;
+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';
+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;
 mid_string = '}' str_body '{' | '}' '}' '}' long_str_body lsend2;
@@ -634,6 +642,12 @@ expr_single~nopar~nobra {-> expr}
        | {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)}
        | {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)}
@@ -999,6 +1013,12 @@ expr      = {block} expr* kwend?
        | {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?
        | {float} float annotations?
        | {char} char annotations?
        | {string} string annotations?
index a815804..18ed636 100644 (file)
@@ -388,119 +388,125 @@ redef class Parser
                        new ReduceAction375(74),
                        new ReduceAction376(74),
                        new ReduceAction377(74),
-                       new ReduceAction159(74),
-                       new ReduceAction159(74),
+                       new ReduceAction378(74),
+                       new ReduceAction379(74),
                        new ReduceAction380(74),
                        new ReduceAction381(74),
                        new ReduceAction382(74),
-                       new ReduceAction383(75),
-                       new ReduceAction383(75),
-                       new ReduceAction385(76),
-                       new ReduceAction386(77),
-                       new ReduceAction387(78),
-                       new ReduceAction388(78),
-                       new ReduceAction386(79),
-                       new ReduceAction390(80),
+                       new ReduceAction383(74),
+                       new ReduceAction159(74),
+                       new ReduceAction159(74),
+                       new ReduceAction386(74),
+                       new ReduceAction387(74),
+                       new ReduceAction388(74),
+                       new ReduceAction389(75),
+                       new ReduceAction389(75),
+                       new ReduceAction391(76),
+                       new ReduceAction392(77),
+                       new ReduceAction393(78),
+                       new ReduceAction394(78),
+                       new ReduceAction392(79),
+                       new ReduceAction396(80),
                        new ReduceAction272(80),
-                       new ReduceAction392(80),
-                       new ReduceAction393(81),
-                       new ReduceAction394(81),
-                       new ReduceAction395(82),
-                       new ReduceAction396(82),
-                       new ReduceAction397(83),
-                       new ReduceAction395(84),
-                       new ReduceAction396(84),
-                       new ReduceAction400(85),
-                       new ReduceAction401(86),
-                       new ReduceAction402(87),
-                       new ReduceAction403(87),
-                       new ReduceAction404(88),
+                       new ReduceAction398(80),
+                       new ReduceAction399(81),
+                       new ReduceAction400(81),
+                       new ReduceAction401(82),
+                       new ReduceAction402(82),
+                       new ReduceAction403(83),
+                       new ReduceAction401(84),
+                       new ReduceAction402(84),
+                       new ReduceAction406(85),
+                       new ReduceAction407(86),
+                       new ReduceAction408(87),
+                       new ReduceAction409(87),
+                       new ReduceAction410(88),
                        new ReduceAction22(88),
-                       new ReduceAction406(89),
-                       new ReduceAction407(89),
-                       new ReduceAction408(90),
-                       new ReduceAction409(90),
-                       new ReduceAction406(91),
-                       new ReduceAction407(91),
+                       new ReduceAction412(89),
+                       new ReduceAction413(89),
+                       new ReduceAction414(90),
+                       new ReduceAction415(90),
                        new ReduceAction412(91),
+                       new ReduceAction413(91),
+                       new ReduceAction418(91),
                        new ReduceAction159(92),
-                       new ReduceAction414(93),
-                       new ReduceAction415(94),
-                       new ReduceAction416(94),
-                       new ReduceAction417(94),
-                       new ReduceAction418(94),
-                       new ReduceAction419(94),
-                       new ReduceAction420(95),
-                       new ReduceAction421(95),
-                       new ReduceAction422(95),
-                       new ReduceAction423(95),
-                       new ReduceAction424(95),
-                       new ReduceAction387(96),
-                       new ReduceAction388(96),
-                       new ReduceAction386(97),
-                       new ReduceAction428(98),
+                       new ReduceAction420(93),
+                       new ReduceAction421(94),
+                       new ReduceAction422(94),
+                       new ReduceAction423(94),
+                       new ReduceAction424(94),
+                       new ReduceAction425(94),
+                       new ReduceAction426(95),
+                       new ReduceAction427(95),
+                       new ReduceAction428(95),
+                       new ReduceAction429(95),
+                       new ReduceAction430(95),
+                       new ReduceAction393(96),
+                       new ReduceAction394(96),
+                       new ReduceAction392(97),
+                       new ReduceAction434(98),
                        new ReduceAction159(98),
                        new ReduceAction159(98),
-                       new ReduceAction431(98),
-                       new ReduceAction432(98),
-                       new ReduceAction433(98),
-                       new ReduceAction434(99),
-                       new ReduceAction435(99),
-                       new ReduceAction436(99),
-                       new ReduceAction437(100),
-                       new ReduceAction438(100),
-                       new ReduceAction437(101),
-                       new ReduceAction440(101),
-                       new ReduceAction438(101),
-                       new ReduceAction442(101),
-                       new ReduceAction443(102),
-                       new ReduceAction396(103),
-                       new ReduceAction445(103),
-                       new ReduceAction446(104),
-                       new ReduceAction447(105),
-                       new ReduceAction448(105),
-                       new ReduceAction449(106),
-                       new ReduceAction450(106),
-                       new ReduceAction451(107),
-                       new ReduceAction452(107),
-                       new ReduceAction453(107),
-                       new ReduceAction454(107),
-                       new ReduceAction455(108),
-                       new ReduceAction456(108),
-                       new ReduceAction457(108),
+                       new ReduceAction437(98),
+                       new ReduceAction438(98),
+                       new ReduceAction439(98),
+                       new ReduceAction440(99),
+                       new ReduceAction441(99),
+                       new ReduceAction442(99),
+                       new ReduceAction443(100),
+                       new ReduceAction444(100),
+                       new ReduceAction443(101),
+                       new ReduceAction446(101),
+                       new ReduceAction444(101),
+                       new ReduceAction448(101),
+                       new ReduceAction449(102),
+                       new ReduceAction402(103),
+                       new ReduceAction451(103),
+                       new ReduceAction452(104),
+                       new ReduceAction453(105),
+                       new ReduceAction454(105),
+                       new ReduceAction455(106),
+                       new ReduceAction456(106),
+                       new ReduceAction457(107),
+                       new ReduceAction458(107),
+                       new ReduceAction459(107),
+                       new ReduceAction460(107),
+                       new ReduceAction461(108),
+                       new ReduceAction462(108),
+                       new ReduceAction463(108),
                        new ReduceAction22(108),
-                       new ReduceAction459(109),
-                       new ReduceAction460(109),
-                       new ReduceAction461(109),
-                       new ReduceAction460(109),
-                       new ReduceAction463(110),
-                       new ReduceAction464(110),
-                       new ReduceAction465(110),
-                       new ReduceAction464(110),
-                       new ReduceAction467(111),
-                       new ReduceAction468(112),
+                       new ReduceAction465(109),
+                       new ReduceAction466(109),
+                       new ReduceAction467(109),
+                       new ReduceAction466(109),
+                       new ReduceAction469(110),
+                       new ReduceAction470(110),
+                       new ReduceAction471(110),
+                       new ReduceAction470(110),
+                       new ReduceAction473(111),
+                       new ReduceAction474(112),
                        new ReduceAction22(113),
-                       new ReduceAction470(113),
-                       new ReduceAction471(114),
-                       new ReduceAction471(114),
-                       new ReduceAction471(114),
-                       new ReduceAction474(115),
-                       new ReduceAction475(115),
-                       new ReduceAction23(115),
-                       new ReduceAction23(115),
-                       new ReduceAction478(115),
-                       new ReduceAction478(115),
+                       new ReduceAction476(113),
+                       new ReduceAction477(114),
+                       new ReduceAction477(114),
+                       new ReduceAction477(114),
                        new ReduceAction480(115),
                        new ReduceAction481(115),
-                       new ReduceAction482(115),
-                       new ReduceAction482(115),
+                       new ReduceAction23(115),
+                       new ReduceAction23(115),
+                       new ReduceAction484(115),
                        new ReduceAction484(115),
+                       new ReduceAction486(115),
+                       new ReduceAction487(115),
+                       new ReduceAction488(115),
+                       new ReduceAction488(115),
+                       new ReduceAction490(115),
                        new ReduceAction22(116),
-                       new ReduceAction486(116),
-                       new ReduceAction487(117),
-                       new ReduceAction471(117),
-                       new ReduceAction471(118),
-                       new ReduceAction490(118),
+                       new ReduceAction492(116),
+                       new ReduceAction493(117),
+                       new ReduceAction477(117),
+                       new ReduceAction477(118),
+                       new ReduceAction496(118),
                        new ReduceAction48(119),
                        new ReduceAction49(119),
                        new ReduceAction50(119),
@@ -530,10 +536,10 @@ redef class Parser
                        new ReduceAction105(121),
                        new ReduceAction106(121),
                        new ReduceAction107(121),
-                       new ReduceAction463(122),
-                       new ReduceAction464(122),
-                       new ReduceAction465(122),
-                       new ReduceAction464(122),
+                       new ReduceAction469(122),
+                       new ReduceAction470(122),
+                       new ReduceAction471(122),
+                       new ReduceAction470(122),
                        new ReduceAction146(123),
                        new ReduceAction147(123),
                        new ReduceAction159(124),
@@ -630,6 +636,12 @@ redef class Parser
                        new ReduceAction375(139),
                        new ReduceAction376(139),
                        new ReduceAction377(139),
+                       new ReduceAction378(139),
+                       new ReduceAction379(139),
+                       new ReduceAction380(139),
+                       new ReduceAction381(139),
+                       new ReduceAction382(139),
+                       new ReduceAction383(139),
                        new ReduceAction159(139),
                        new ReduceAction159(139),
                        new ReduceAction146(140),
@@ -803,20 +815,26 @@ redef class Parser
                        new ReduceAction375(158),
                        new ReduceAction376(158),
                        new ReduceAction377(158),
+                       new ReduceAction378(158),
+                       new ReduceAction379(158),
+                       new ReduceAction380(158),
+                       new ReduceAction381(158),
+                       new ReduceAction382(158),
+                       new ReduceAction383(158),
                        new ReduceAction159(158),
-                       new ReduceAction402(159),
-                       new ReduceAction403(159),
-                       new ReduceAction404(160),
+                       new ReduceAction408(159),
+                       new ReduceAction409(159),
+                       new ReduceAction410(160),
                        new ReduceAction22(160),
-                       new ReduceAction406(161),
-                       new ReduceAction406(162),
-                       new ReduceAction387(163),
-                       new ReduceAction388(163),
-                       new ReduceAction428(164),
+                       new ReduceAction412(161),
+                       new ReduceAction412(162),
+                       new ReduceAction393(163),
+                       new ReduceAction394(163),
+                       new ReduceAction434(164),
                        new ReduceAction159(164),
                        new ReduceAction159(164),
-                       new ReduceAction431(164),
-                       new ReduceAction432(164),
+                       new ReduceAction437(164),
+                       new ReduceAction438(164),
                        new ReduceAction146(165),
                        new ReduceAction147(165),
                        new ReduceAction159(166),
@@ -863,21 +881,21 @@ redef class Parser
                        new ReduceAction159(178),
                        new ReduceAction325(178),
                        new ReduceAction326(178),
-                       new ReduceAction853(178),
+                       new ReduceAction871(178),
                        new ReduceAction159(179),
-                       new ReduceAction855(179),
-                       new ReduceAction856(179),
-                       new ReduceAction857(179),
-                       new ReduceAction858(179),
-                       new ReduceAction859(179),
+                       new ReduceAction873(179),
+                       new ReduceAction874(179),
+                       new ReduceAction875(179),
+                       new ReduceAction876(179),
+                       new ReduceAction877(179),
                        new ReduceAction183(179),
                        new ReduceAction333(179),
-                       new ReduceAction858(179),
-                       new ReduceAction859(179),
+                       new ReduceAction876(179),
+                       new ReduceAction877(179),
                        new ReduceAction191(179),
                        new ReduceAction349(179),
-                       new ReduceAction866(179),
-                       new ReduceAction867(179),
+                       new ReduceAction884(179),
+                       new ReduceAction885(179),
                        new ReduceAction355(179),
                        new ReduceAction356(179),
                        new ReduceAction357(179),
@@ -901,9 +919,15 @@ redef class Parser
                        new ReduceAction375(181),
                        new ReduceAction376(181),
                        new ReduceAction377(181),
+                       new ReduceAction378(181),
+                       new ReduceAction379(181),
+                       new ReduceAction380(181),
+                       new ReduceAction381(181),
+                       new ReduceAction382(181),
+                       new ReduceAction383(181),
                        new ReduceAction159(181),
-                       new ReduceAction892(182),
-                       new ReduceAction893(182),
+                       new ReduceAction916(182),
+                       new ReduceAction917(182),
                        new ReduceAction156(183),
                        new ReduceAction157(183),
                        new ReduceAction158(183),
@@ -1059,49 +1083,49 @@ redef class Parser
                        new ReduceAction159(198),
                        new ReduceAction159(198),
                        new ReduceAction200(198),
-                       new ReduceAction434(199),
-                       new ReduceAction436(199),
-                       new ReduceAction474(200),
-                       new ReduceAction475(200),
+                       new ReduceAction440(199),
+                       new ReduceAction442(199),
+                       new ReduceAction480(200),
+                       new ReduceAction481(200),
                        new ReduceAction23(200),
-                       new ReduceAction1054(201),
-                       new ReduceAction1055(201),
-                       new ReduceAction1056(202),
-                       new ReduceAction1057(202),
-                       new ReduceAction1058(203),
-                       new ReduceAction1059(203),
+                       new ReduceAction1078(201),
+                       new ReduceAction1079(201),
+                       new ReduceAction1080(202),
+                       new ReduceAction1081(202),
+                       new ReduceAction1082(203),
+                       new ReduceAction1083(203),
                        new ReduceAction37(204),
-                       new ReduceAction1061(204),
+                       new ReduceAction1085(204),
                        new ReduceAction45(205),
-                       new ReduceAction1063(205),
-                       new ReduceAction408(206),
-                       new ReduceAction1065(206),
-                       new ReduceAction1066(207),
-                       new ReduceAction1067(207),
-                       new ReduceAction1068(208),
-                       new ReduceAction1069(208),
+                       new ReduceAction1087(205),
+                       new ReduceAction414(206),
+                       new ReduceAction1089(206),
+                       new ReduceAction1090(207),
+                       new ReduceAction1091(207),
+                       new ReduceAction1092(208),
+                       new ReduceAction1093(208),
                        new ReduceAction150(209),
-                       new ReduceAction1071(209),
-                       new ReduceAction387(210),
-                       new ReduceAction1073(210),
-                       new ReduceAction387(211),
-                       new ReduceAction1073(211),
-                       new ReduceAction387(212),
-                       new ReduceAction1073(212),
-                       new ReduceAction448(213),
-                       new ReduceAction1079(213),
-                       new ReduceAction408(214),
-                       new ReduceAction1065(214),
-                       new ReduceAction387(215),
-                       new ReduceAction1073(215),
-                       new ReduceAction387(216),
-                       new ReduceAction1073(216),
-                       new ReduceAction449(217),
-                       new ReduceAction1087(217),
-                       new ReduceAction1088(218),
-                       new ReduceAction1089(218),
-                       new ReduceAction471(219),
-                       new ReduceAction490(219)
+                       new ReduceAction1095(209),
+                       new ReduceAction393(210),
+                       new ReduceAction1097(210),
+                       new ReduceAction393(211),
+                       new ReduceAction1097(211),
+                       new ReduceAction393(212),
+                       new ReduceAction1097(212),
+                       new ReduceAction454(213),
+                       new ReduceAction1103(213),
+                       new ReduceAction414(214),
+                       new ReduceAction1089(214),
+                       new ReduceAction393(215),
+                       new ReduceAction1097(215),
+                       new ReduceAction393(216),
+                       new ReduceAction1097(216),
+                       new ReduceAction455(217),
+                       new ReduceAction1111(217),
+                       new ReduceAction1112(218),
+                       new ReduceAction1113(218),
+                       new ReduceAction477(219),
+                       new ReduceAction496(219)
                )
        end
 end
@@ -9173,6 +9197,120 @@ private class ReduceAction375
                                        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
@@ -9185,7 +9323,7 @@ private class ReduceAction375
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction376
+private class ReduceAction382
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9204,7 +9342,7 @@ private class ReduceAction376
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction377
+private class ReduceAction383
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9223,7 +9361,7 @@ private class ReduceAction377
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction380
+private class ReduceAction386
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9262,7 +9400,7 @@ private class ReduceAction380
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction381
+private class ReduceAction387
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9301,7 +9439,7 @@ private class ReduceAction381
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction382
+private class ReduceAction388
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9335,7 +9473,7 @@ private class ReduceAction382
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction383
+private class ReduceAction389
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9364,7 +9502,7 @@ private class ReduceAction383
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction385
+private class ReduceAction391
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9387,7 +9525,7 @@ private class ReduceAction385
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction386
+private class ReduceAction392
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9400,7 +9538,7 @@ private class ReduceAction386
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction387
+private class ReduceAction393
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9415,7 +9553,7 @@ private class ReduceAction387
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction388
+private class ReduceAction394
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9434,7 +9572,7 @@ private class ReduceAction388
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction390
+private class ReduceAction396
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9446,7 +9584,7 @@ private class ReduceAction390
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction392
+private class ReduceAction398
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9478,7 +9616,7 @@ private class ReduceAction392
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction393
+private class ReduceAction399
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9505,7 +9643,7 @@ private class ReduceAction393
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction394
+private class ReduceAction400
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9536,7 +9674,7 @@ private class ReduceAction394
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction395
+private class ReduceAction401
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9558,7 +9696,7 @@ private class ReduceAction395
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction396
+private class ReduceAction402
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9574,7 +9712,7 @@ private class ReduceAction396
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction397
+private class ReduceAction403
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9589,7 +9727,7 @@ private class ReduceAction397
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction400
+private class ReduceAction406
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9604,7 +9742,7 @@ private class ReduceAction400
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction401
+private class ReduceAction407
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9619,7 +9757,7 @@ private class ReduceAction401
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction402
+private class ReduceAction408
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9646,7 +9784,7 @@ private class ReduceAction402
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction403
+private class ReduceAction409
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9679,7 +9817,7 @@ private class ReduceAction403
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction404
+private class ReduceAction410
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9690,7 +9828,7 @@ private class ReduceAction404
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction406
+private class ReduceAction412
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9722,7 +9860,7 @@ private class ReduceAction406
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction407
+private class ReduceAction413
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9766,7 +9904,7 @@ private class ReduceAction407
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction408
+private class ReduceAction414
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9781,7 +9919,7 @@ private class ReduceAction408
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction409
+private class ReduceAction415
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9800,7 +9938,7 @@ private class ReduceAction409
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction412
+private class ReduceAction418
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9835,7 +9973,7 @@ private class ReduceAction412
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction414
+private class ReduceAction420
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9848,7 +9986,7 @@ private class ReduceAction414
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction415
+private class ReduceAction421
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9881,7 +10019,7 @@ private class ReduceAction415
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction416
+private class ReduceAction422
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9917,7 +10055,7 @@ private class ReduceAction416
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction417
+private class ReduceAction423
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9961,7 +10099,7 @@ private class ReduceAction417
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction418
+private class ReduceAction424
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10008,7 +10146,7 @@ private class ReduceAction418
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction419
+private class ReduceAction425
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10045,7 +10183,7 @@ private class ReduceAction419
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction420
+private class ReduceAction426
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10071,7 +10209,7 @@ private class ReduceAction420
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction421
+private class ReduceAction427
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10100,7 +10238,7 @@ private class ReduceAction421
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction422
+private class ReduceAction428
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10137,7 +10275,7 @@ private class ReduceAction422
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction423
+private class ReduceAction429
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10177,7 +10315,7 @@ private class ReduceAction423
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction424
+private class ReduceAction430
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10207,7 +10345,7 @@ private class ReduceAction424
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction428
+private class ReduceAction434
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10222,7 +10360,7 @@ private class ReduceAction428
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction431
+private class ReduceAction437
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10243,7 +10381,7 @@ private class ReduceAction431
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction432
+private class ReduceAction438
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10260,7 +10398,7 @@ private class ReduceAction432
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction433
+private class ReduceAction439
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10275,7 +10413,7 @@ private class ReduceAction433
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction434
+private class ReduceAction440
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10290,7 +10428,7 @@ private class ReduceAction434
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction435
+private class ReduceAction441
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10305,7 +10443,7 @@ private class ReduceAction435
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction436
+private class ReduceAction442
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10320,7 +10458,7 @@ private class ReduceAction436
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction437
+private class ReduceAction443
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10346,7 +10484,7 @@ private class ReduceAction437
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction438
+private class ReduceAction444
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10368,7 +10506,7 @@ private class ReduceAction438
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction440
+private class ReduceAction446
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10387,7 +10525,7 @@ private class ReduceAction440
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction442
+private class ReduceAction448
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10400,7 +10538,7 @@ private class ReduceAction442
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction443
+private class ReduceAction449
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10426,7 +10564,7 @@ private class ReduceAction443
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction445
+private class ReduceAction451
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10446,7 +10584,7 @@ private class ReduceAction445
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction446
+private class ReduceAction452
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10460,7 +10598,7 @@ private class ReduceAction446
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction447
+private class ReduceAction453
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10478,7 +10616,7 @@ private class ReduceAction447
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction448
+private class ReduceAction454
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10492,7 +10630,7 @@ private class ReduceAction448
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction449
+private class ReduceAction455
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10507,7 +10645,7 @@ private class ReduceAction449
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction450
+private class ReduceAction456
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10528,7 +10666,7 @@ private class ReduceAction450
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction451
+private class ReduceAction457
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10546,7 +10684,7 @@ private class ReduceAction451
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction452
+private class ReduceAction458
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10568,7 +10706,7 @@ private class ReduceAction452
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction453
+private class ReduceAction459
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10590,7 +10728,7 @@ private class ReduceAction453
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction454
+private class ReduceAction460
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10616,7 +10754,7 @@ private class ReduceAction454
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction455
+private class ReduceAction461
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10633,7 +10771,7 @@ private class ReduceAction455
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction456
+private class ReduceAction462
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10654,7 +10792,7 @@ private class ReduceAction456
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction457
+private class ReduceAction463
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10672,7 +10810,7 @@ private class ReduceAction457
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction459
+private class ReduceAction465
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10683,7 +10821,7 @@ private class ReduceAction459
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction460
+private class ReduceAction466
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10695,7 +10833,7 @@ private class ReduceAction460
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction461
+private class ReduceAction467
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10708,7 +10846,7 @@ private class ReduceAction461
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction463
+private class ReduceAction469
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10719,7 +10857,7 @@ private class ReduceAction463
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction464
+private class ReduceAction470
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10731,7 +10869,7 @@ private class ReduceAction464
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction465
+private class ReduceAction471
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10744,7 +10882,7 @@ private class ReduceAction465
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction467
+private class ReduceAction473
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10757,7 +10895,7 @@ private class ReduceAction467
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction468
+private class ReduceAction474
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10770,7 +10908,7 @@ private class ReduceAction468
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction470
+private class ReduceAction476
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10781,7 +10919,7 @@ private class ReduceAction470
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction471
+private class ReduceAction477
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10790,7 +10928,7 @@ private class ReduceAction471
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction474
+private class ReduceAction480
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10807,7 +10945,7 @@ private class ReduceAction474
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction475
+private class ReduceAction481
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10825,7 +10963,7 @@ private class ReduceAction475
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction478
+private class ReduceAction484
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10836,7 +10974,7 @@ private class ReduceAction478
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction480
+private class ReduceAction486
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10848,7 +10986,7 @@ private class ReduceAction480
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction481
+private class ReduceAction487
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10860,7 +10998,7 @@ private class ReduceAction481
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction482
+private class ReduceAction488
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10873,7 +11011,7 @@ private class ReduceAction482
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction484
+private class ReduceAction490
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10887,7 +11025,7 @@ private class ReduceAction484
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction486
+private class ReduceAction492
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10898,7 +11036,7 @@ private class ReduceAction486
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction487
+private class ReduceAction493
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10906,7 +11044,7 @@ private class ReduceAction487
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction490
+private class ReduceAction496
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10916,7 +11054,7 @@ private class ReduceAction490
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction853
+private class ReduceAction871
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10940,7 +11078,7 @@ private class ReduceAction853
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction855
+private class ReduceAction873
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10960,7 +11098,7 @@ private class ReduceAction855
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction856
+private class ReduceAction874
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -10983,7 +11121,7 @@ private class ReduceAction856
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction857
+private class ReduceAction875
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11007,7 +11145,7 @@ private class ReduceAction857
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction858
+private class ReduceAction876
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11031,7 +11169,7 @@ private class ReduceAction858
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction859
+private class ReduceAction877
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11056,7 +11194,7 @@ private class ReduceAction859
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction866
+private class ReduceAction884
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11079,7 +11217,7 @@ private class ReduceAction866
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction867
+private class ReduceAction885
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11103,7 +11241,7 @@ private class ReduceAction867
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction892
+private class ReduceAction916
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11116,7 +11254,7 @@ private class ReduceAction892
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction893
+private class ReduceAction917
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11126,7 +11264,7 @@ private class ReduceAction893
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1054
+private class ReduceAction1078
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11141,7 +11279,7 @@ private class ReduceAction1054
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1055
+private class ReduceAction1079
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11160,7 +11298,7 @@ private class ReduceAction1055
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1056
+private class ReduceAction1080
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11175,7 +11313,7 @@ private class ReduceAction1056
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1057
+private class ReduceAction1081
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11194,7 +11332,7 @@ private class ReduceAction1057
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1058
+private class ReduceAction1082
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11209,7 +11347,7 @@ private class ReduceAction1058
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1059
+private class ReduceAction1083
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11228,7 +11366,7 @@ private class ReduceAction1059
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1061
+private class ReduceAction1085
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11247,7 +11385,7 @@ private class ReduceAction1061
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1063
+private class ReduceAction1087
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11266,7 +11404,7 @@ private class ReduceAction1063
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1065
+private class ReduceAction1089
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11285,7 +11423,7 @@ private class ReduceAction1065
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1066
+private class ReduceAction1090
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11300,7 +11438,7 @@ private class ReduceAction1066
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1067
+private class ReduceAction1091
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11319,7 +11457,7 @@ private class ReduceAction1067
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1068
+private class ReduceAction1092
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11334,7 +11472,7 @@ private class ReduceAction1068
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1069
+private class ReduceAction1093
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11353,7 +11491,7 @@ private class ReduceAction1069
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1071
+private class ReduceAction1095
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11372,7 +11510,7 @@ private class ReduceAction1071
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1073
+private class ReduceAction1097
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11391,7 +11529,7 @@ private class ReduceAction1073
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1079
+private class ReduceAction1103
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11409,7 +11547,7 @@ private class ReduceAction1079
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1087
+private class ReduceAction1111
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11428,7 +11566,7 @@ private class ReduceAction1087
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1088
+private class ReduceAction1112
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -11443,7 +11581,7 @@ private class ReduceAction1088
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction1089
+private class ReduceAction1113
        super ReduceAction
        redef fun action(p: Parser)
        do
index b26e0f9..e2763e5 100644 (file)
@@ -307,6 +307,24 @@ 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
+       super Token
+end
 class TFloat
        super Token
 end
@@ -1090,6 +1108,36 @@ class AHexIntExpr
        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
+       super AExpr
+       var n_oct_bytenum: TOctBytenum is writable, noinit
+       var n_annotations: nullable AAnnotations = null is writable
+end
 class AFloatExpr
        super AExpr
        var n_float: TFloat is writable, noinit
index fe79ef1..9131c3e 100644 (file)
@@ -311,6 +311,35 @@ abstract class Token
        # May have disappeared in the AST
        var next_token: nullable Token = null
 
+       # Is `self` a token discarded from the AST?
+       #
+       # Loose tokens are not present in the AST.
+       # It means they were identified by the lexer but were discarded by the parser.
+       # It also means that they are not visited or manipulated by AST-related functions.
+       #
+       # Each loose token is attached to the non-loose token that precedes or follows it.
+       # The rules are the following:
+       #
+       # * tokens that follow a non-loose token on a same line are attached to it.
+       #   See `next_looses`.
+       # * other tokens, thus that precede a non-loose token on the same line or the next one,
+       # are attached to this one. See `prev_looses`.
+       #
+       # Loose tokens are mostly end of lines (`TEol`) and comments (`TComment`).
+       # Whitespace are ignored by the lexer, so they are not even considered as loose tokens.
+       # See `blank_before` to get the whitespace that separate tokens.
+       var is_loose = false
+
+       # Loose tokens that precede `self`.
+       #
+       # These tokens start the line or belong to a line with only loose tokens.
+       var prev_looses = new Array[Token] is lazy
+
+       # Loose tokens that follow `self`
+       #
+       # These tokens are on the same line than `self`.
+       var next_looses = new Array[Token] is lazy
+
        # The verbatim blank text between `prev_token` and `self`
        fun blank_before: String
        do
@@ -946,6 +975,36 @@ 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
+       super TokenLiteral
+end
+
 # A literal floating point number
 class TFloat
        super TokenLiteral
@@ -2462,6 +2521,59 @@ class AHexIntExpr
        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
+end
+
 # A float literal
 class AFloatExpr
        super AExpr
index 8743717..f3826dc 100644 (file)
@@ -6436,6 +6436,258 @@ redef class AHexIntExpr
                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_annotations)
+       end
+end
 redef class AFloatExpr
        init init_afloatexpr (
                n_float: nullable TFloat,
index c2eff11..a344fc7 100644 (file)
@@ -141,7 +141,8 @@ class Parser
                                var node1 = pop
                                assert node1 isa AModule
                                var node = new Start(node1, node2)
-                               (new ComputeProdLocationVisitor).enter_visit(node)
+                               node2.parent = node
+                               (new ComputeProdLocationVisitor(lexer.file.first_token)).enter_visit(node)
                                return node
                        else if action_type == 3 then # ERROR
                                # skip injected tokens
@@ -176,21 +177,55 @@ end
 # Uses existing token locations to infer location of productions.
 private class ComputeProdLocationVisitor
        super Visitor
+
+       # The current (or starting) cursor on the token sequence used to collect loose tokens
+       var token: nullable Token
+
        # Currently visited productions that need a first token
        var need_first_prods = new Array[Prod]
 
        # Already visited epsilon productions that waits something after them
        var need_after_epsilons = new Array[Prod]
 
-       # Location of the last visited token in the current production
-       var last_location: nullable Location = null
+       # The last visited token in the current production
+       var last_token: nullable Token = null
 
        redef fun visit(n: ANode)
        do
                if n isa Token then
+                       # Skip injected tokens
                        if not isset n._location then return
+
+                       # Collect loose tokens (not in the AST) and attach them to token in the AST
+                       var cursor = token
+                       if n != cursor then
+                               var lt = last_token
+                               # In order, we have the tokens:
+                               # * `lt` the previous visited token in the AST (if any)
+                               # * then `cursor` the loose tokens to attach
+                               # * then `n` the current visited token in the AST
+
+                               # In the following, we advance `cursor` to add them to `lt.next_looses` or to `n.prev_looses`.
+                               if lt != null then
+                                       var ltl = lt.location.line_end
+                                       # floating tokens on the same line of a AST-token follows it
+                                       while cursor != null and cursor != n and ltl == cursor.location.line_start do
+                                               cursor.is_loose = true
+                                               lt.next_looses.add cursor
+                                               cursor = cursor.next_token
+                                       end
+                               end
+                               # other loose tokens precede the next AST-token
+                               while cursor != null and cursor != n do
+                                       cursor.is_loose = true
+                                       n.prev_looses.add cursor
+                                       cursor = cursor.next_token
+                               end
+                       end
+                       token = n.next_token
+
                        var loc = n._location
-                       _last_location = loc
+                       _last_token = n
 
                        # Add a first token to productions that need one
                        if not _need_first_prods.is_empty then
@@ -217,8 +252,7 @@ private class ComputeProdLocationVisitor
                        var startl = n._first_location
                        if startl != null then
                                # Non-epsilon production
-                               var endl = _last_location
-                               assert endl != null
+                               var endl = _last_token.location
 
                                if startl == endl then
                                        n.location = startl
index eb77663..4fd03ae 100644 (file)
@@ -140,248 +140,258 @@ static const int lexer_goto_row19[] = {
        61, 61, 75
 };
 static const int lexer_goto_row20[] = {
-       4,
+       11,
        46, 46, 76,
        48, 57, 20,
-       88, 88, 77,
-       120, 120, 78
+       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
 };
 static const int lexer_goto_row21[] = {
-       1,
-       46, 57, -21
+       4,
+       46, 57, -21,
+       69, 69, 78,
+       101, 101, 82,
+       117, 117, 84
 };
 static const int lexer_goto_row22[] = {
        1,
-       58, 58, 79
+       58, 58, 86
 };
 static const int lexer_goto_row24[] = {
        2,
-       60, 60, 80,
-       61, 61, 81
+       60, 60, 87,
+       61, 61, 88
 };
 static const int lexer_goto_row25[] = {
        1,
-       61, 61, 82
+       61, 61, 89
 };
 static const int lexer_goto_row26[] = {
        2,
-       61, 61, 83,
-       62, 62, 84
+       61, 61, 90,
+       62, 62, 91
 };
 static const int lexer_goto_row28[] = {
        4,
-       48, 57, 85,
-       65, 90, 86,
-       95, 95, 87,
-       97, 122, 88
+       48, 57, 92,
+       65, 90, 93,
+       95, 95, 94,
+       97, 122, 95
 };
 static const int lexer_goto_row31[] = {
        1,
-       61, 61, 89
+       61, 61, 96
 };
 static const int lexer_goto_row32[] = {
        2,
-       95, 95, 90,
-       97, 122, 91
+       95, 95, 97,
+       97, 122, 98
 };
 static const int lexer_goto_row33[] = {
        1,
-       123, 123, 92
+       123, 123, 99
 };
 static const int lexer_goto_row34[] = {
        10,
-       48, 57, 93,
-       65, 90, 94,
-       95, 95, 95,
-       97, 97, 96,
-       98, 98, 97,
-       99, 109, 96,
-       110, 110, 98,
-       111, 114, 96,
-       115, 115, 99,
-       116, 122, 96
+       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
 };
 static const int lexer_goto_row35[] = {
        4,
        48, 95, -35,
-       97, 113, 96,
-       114, 114, 100,
-       115, 122, 96
+       97, 113, 103,
+       114, 114, 107,
+       115, 122, 103
 };
 static const int lexer_goto_row36[] = {
        6,
        48, 95, -35,
-       97, 107, 96,
-       108, 108, 101,
-       109, 110, 96,
-       111, 111, 102,
-       112, 122, 96
+       97, 107, 103,
+       108, 108, 108,
+       109, 110, 103,
+       111, 111, 109,
+       112, 122, 103
 };
 static const int lexer_goto_row37[] = {
        4,
        48, 95, -35,
-       97, 110, 96,
-       111, 111, 103,
-       112, 122, 96
+       97, 110, 103,
+       111, 111, 110,
+       112, 122, 103
 };
 static const int lexer_goto_row38[] = {
        7,
        48, 107, -37,
-       108, 108, 104,
-       109, 109, 96,
-       110, 110, 105,
-       111, 119, 96,
-       120, 120, 106,
-       121, 122, 96
+       108, 108, 111,
+       109, 109, 103,
+       110, 110, 112,
+       111, 119, 103,
+       120, 120, 113,
+       121, 122, 103
 };
 static const int lexer_goto_row39[] = {
        7,
        48, 95, -35,
-       97, 97, 107,
-       98, 110, 96,
-       111, 111, 108,
-       112, 116, 96,
-       117, 117, 109,
-       118, 122, 96
+       97, 97, 114,
+       98, 110, 103,
+       111, 111, 115,
+       112, 116, 103,
+       117, 117, 116,
+       118, 122, 103
 };
 static const int lexer_goto_row40[] = {
        2,
        48, 95, -35,
-       97, 122, 96
+       97, 122, 103
 };
 static const int lexer_goto_row41[] = {
        9,
        48, 95, -35,
-       97, 101, 96,
-       102, 102, 110,
-       103, 108, 96,
-       109, 109, 111,
-       110, 110, 112,
-       111, 114, 96,
-       115, 115, 113,
-       116, 122, 96
+       97, 101, 103,
+       102, 102, 117,
+       103, 108, 103,
+       109, 109, 118,
+       110, 110, 119,
+       111, 114, 103,
+       115, 115, 120,
+       116, 122, 103
 };
 static const int lexer_goto_row42[] = {
        5,
        48, 95, -35,
-       97, 97, 114,
-       98, 110, 96,
-       111, 111, 115,
-       112, 122, 96
+       97, 97, 121,
+       98, 110, 103,
+       111, 111, 122,
+       112, 122, 103
 };
 static const int lexer_goto_row43[] = {
        3,
        48, 110, -38,
-       111, 111, 116,
-       112, 122, 96
+       111, 111, 123,
+       112, 122, 103
 };
 static const int lexer_goto_row44[] = {
        8,
        48, 95, -35,
-       97, 100, 96,
-       101, 101, 117,
-       102, 110, 96,
-       111, 111, 118,
-       112, 116, 96,
-       117, 117, 119,
-       118, 122, 96
+       97, 100, 103,
+       101, 101, 124,
+       102, 110, 103,
+       111, 111, 125,
+       112, 116, 103,
+       117, 117, 126,
+       118, 122, 103
 };
 static const int lexer_goto_row45[] = {
        6,
        48, 95, -35,
-       97, 109, 96,
-       110, 110, 120,
-       111, 113, 96,
-       114, 114, 121,
-       115, 122, 96
+       97, 109, 103,
+       110, 110, 127,
+       111, 113, 103,
+       114, 114, 128,
+       115, 122, 103
 };
 static const int lexer_goto_row46[] = {
        7,
        48, 95, -35,
-       97, 97, 122,
-       98, 113, 96,
-       114, 114, 123,
-       115, 116, 96,
-       117, 117, 124,
-       118, 122, 96
+       97, 97, 129,
+       98, 113, 103,
+       114, 114, 130,
+       115, 116, 103,
+       117, 117, 131,
+       118, 122, 103
 };
 static const int lexer_goto_row47[] = {
        3,
        48, 100, -45,
-       101, 101, 125,
-       102, 122, 96
+       101, 101, 132,
+       102, 122, 103
 };
 static const int lexer_goto_row48[] = {
        5,
        48, 100, -45,
-       101, 101, 126,
-       102, 116, 96,
-       117, 117, 127,
-       118, 122, 96
+       101, 101, 133,
+       102, 116, 103,
+       117, 117, 134,
+       118, 122, 103
 };
 static const int lexer_goto_row49[] = {
        8,
        48, 95, -35,
-       97, 103, 96,
-       104, 104, 128,
-       105, 113, 96,
-       114, 114, 129,
-       115, 120, 96,
-       121, 121, 130,
-       122, 122, 96
+       97, 103, 103,
+       104, 104, 135,
+       105, 113, 103,
+       114, 114, 136,
+       115, 120, 103,
+       121, 121, 137,
+       122, 122, 103
 };
 static const int lexer_goto_row50[] = {
        3,
        48, 109, -46,
-       110, 110, 131,
-       111, 122, 96
+       110, 110, 138,
+       111, 122, 103
 };
 static const int lexer_goto_row51[] = {
        3,
        48, 95, -35,
-       97, 97, 132,
-       98, 122, 96
+       97, 97, 139,
+       98, 122, 103
 };
 static const int lexer_goto_row52[] = {
        4,
        48, 103, -50,
-       104, 104, 133,
-       105, 105, 134,
-       106, 122, 96
+       104, 104, 140,
+       105, 105, 141,
+       106, 122, 103
 };
 static const int lexer_goto_row53[] = {
        1,
-       61, 61, 135
+       61, 61, 142
 };
 static const int lexer_goto_row54[] = {
        11,
-       0, 9, 136,
-       11, 12, 136,
-       14, 33, 136,
-       34, 34, 137,
-       35, 91, 136,
-       92, 92, 138,
-       93, 122, 136,
-       123, 123, 139,
-       124, 124, 136,
-       125, 125, 140,
-       126, 255, 136
+       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
 };
 static const int lexer_goto_row58[] = {
        3,
        0, 33, -8,
-       34, 34, 141,
+       34, 34, 148,
        35, 255, -8
 };
 static const int lexer_goto_row59[] = {
        1,
-       34, 34, 142
+       34, 34, 149
 };
 static const int lexer_goto_row60[] = {
        3,
-       0, 9, 143,
-       11, 12, 143,
-       14, 255, 143
+       0, 9, 150,
+       11, 12, 150,
+       14, 255, 150
 };
 static const int lexer_goto_row62[] = {
        1,
@@ -389,33 +399,34 @@ static const int lexer_goto_row62[] = {
 };
 static const int lexer_goto_row64[] = {
        1,
-       10, 10, 144
+       10, 10, 151
 };
 static const int lexer_goto_row67[] = {
        1,
-       39, 39, 145
+       39, 39, 152
 };
 static const int lexer_goto_row68[] = {
        1,
-       39, 39, 146
+       39, 39, 153
 };
 static const int lexer_goto_row69[] = {
        3,
-       0, 9, 147,
-       11, 12, 147,
-       14, 255, 147
+       0, 9, 154,
+       11, 12, 154,
+       14, 255, 154
 };
 static const int lexer_goto_row70[] = {
        1,
-       61, 61, 148
+       61, 61, 155
 };
 static const int lexer_goto_row74[] = {
        1,
-       46, 46, 149
+       46, 46, 156
 };
 static const int lexer_goto_row75[] = {
-       1,
-       48, 57, 74
+       2,
+       48, 57, 74,
+       69, 101, -22
 };
 static const int lexer_goto_row77[] = {
        1,
@@ -423,898 +434,871 @@ static const int lexer_goto_row77[] = {
 };
 static const int lexer_goto_row78[] = {
        3,
-       48, 57, 150,
-       65, 70, 151,
-       97, 102, 152
+       48, 48, 157,
+       49, 49, 158,
+       95, 95, 159
 };
 static const int lexer_goto_row79[] = {
-       1,
-       48, 102, -79
+       3,
+       43, 43, 160,
+       45, 45, 161,
+       48, 57, 162
+};
+static const int lexer_goto_row80[] = {
+       2,
+       48, 55, 163,
+       95, 95, 164
 };
 static const int lexer_goto_row81[] = {
-       1,
-       61, 61, 153
+       4,
+       48, 57, 165,
+       65, 70, 166,
+       95, 95, 167,
+       97, 102, 168
 };
 static const int lexer_goto_row82[] = {
        1,
-       62, 62, 154
+       48, 95, -79
+};
+static const int lexer_goto_row83[] = {
+       1,
+       43, 57, -80
+};
+static const int lexer_goto_row84[] = {
+       1,
+       48, 95, -81
 };
 static const int lexer_goto_row85[] = {
        1,
-       61, 61, 155
+       56, 56, 169
 };
 static const int lexer_goto_row86[] = {
        1,
+       48, 102, -82
+};
+static const int lexer_goto_row88[] = {
+       1,
+       61, 61, 170
+};
+static const int lexer_goto_row89[] = {
+       1,
+       62, 62, 171
+};
+static const int lexer_goto_row92[] = {
+       1,
+       61, 61, 172
+};
+static const int lexer_goto_row93[] = {
+       1,
        48, 122, -29
 };
-static const int lexer_goto_row87[] = {
+static const int lexer_goto_row94[] = {
        1,
        48, 122, -29
 };
-static const int lexer_goto_row88[] = {
+static const int lexer_goto_row95[] = {
        1,
        48, 122, -29
 };
-static const int lexer_goto_row89[] = {
+static const int lexer_goto_row96[] = {
        1,
        48, 122, -29
 };
-static const int lexer_goto_row91[] = {
+static const int lexer_goto_row98[] = {
        1,
-       100, 100, 156
+       100, 100, 173
 };
-static const int lexer_goto_row92[] = {
+static const int lexer_goto_row99[] = {
        4,
-       48, 57, 157,
-       65, 90, 158,
-       95, 95, 159,
-       97, 122, 160
+       48, 57, 174,
+       65, 90, 175,
+       95, 95, 176,
+       97, 122, 177
 };
-static const int lexer_goto_row93[] = {
+static const int lexer_goto_row100[] = {
        5,
-       0, 91, 161,
-       92, 92, 162,
-       93, 95, 161,
-       96, 96, 163,
-       97, 255, 161
+       0, 91, 178,
+       92, 92, 179,
+       93, 95, 178,
+       96, 96, 180,
+       97, 255, 178
 };
-static const int lexer_goto_row94[] = {
+static const int lexer_goto_row101[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row95[] = {
+static const int lexer_goto_row102[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row96[] = {
+static const int lexer_goto_row103[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row97[] = {
+static const int lexer_goto_row104[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row98[] = {
+static const int lexer_goto_row105[] = {
        5,
        48, 110, -38,
-       111, 111, 164,
-       112, 114, 96,
-       115, 115, 165,
-       116, 122, 96
+       111, 111, 181,
+       112, 114, 103,
+       115, 115, 182,
+       116, 122, 103
 };
-static const int lexer_goto_row99[] = {
+static const int lexer_goto_row106[] = {
        4,
        48, 95, -35,
-       97, 99, 96,
-       100, 100, 166,
-       101, 122, 96
+       97, 99, 103,
+       100, 100, 183,
+       101, 122, 103
 };
-static const int lexer_goto_row100[] = {
+static const int lexer_goto_row107[] = {
        4,
        48, 95, -35,
-       97, 114, 96,
-       115, 115, 167,
-       116, 122, 96
+       97, 114, 103,
+       115, 115, 184,
+       116, 122, 103
 };
-static const int lexer_goto_row101[] = {
+static const int lexer_goto_row108[] = {
        3,
        48, 100, -45,
-       101, 101, 168,
-       102, 122, 96
+       101, 101, 185,
+       102, 122, 103
 };
-static const int lexer_goto_row102[] = {
+static const int lexer_goto_row109[] = {
        3,
        48, 95, -35,
-       97, 97, 169,
-       98, 122, 96
+       97, 97, 186,
+       98, 122, 103
 };
-static const int lexer_goto_row103[] = {
+static const int lexer_goto_row110[] = {
        3,
        48, 109, -46,
-       110, 110, 170,
-       111, 122, 96
+       110, 110, 187,
+       111, 122, 103
 };
-static const int lexer_goto_row104[] = {
+static const int lexer_goto_row111[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row105[] = {
+static const int lexer_goto_row112[] = {
        3,
-       48, 114, -101,
-       115, 115, 171,
-       116, 122, 96
+       48, 114, -108,
+       115, 115, 188,
+       116, 122, 103
 };
-static const int lexer_goto_row106[] = {
+static const int lexer_goto_row113[] = {
        5,
-       48, 99, -100,
-       100, 100, 172,
-       101, 116, 96,
-       117, 117, 173,
-       118, 122, 96
+       48, 99, -107,
+       100, 100, 189,
+       101, 116, 103,
+       117, 117, 190,
+       118, 122, 103
 };
-static const int lexer_goto_row107[] = {
+static const int lexer_goto_row114[] = {
        4,
        48, 95, -35,
-       97, 115, 96,
-       116, 116, 174,
-       117, 122, 96
+       97, 115, 103,
+       116, 116, 191,
+       117, 122, 103
 };
-static const int lexer_goto_row108[] = {
+static const int lexer_goto_row115[] = {
        3,
        48, 107, -37,
-       108, 108, 175,
-       109, 122, 96
+       108, 108, 192,
+       109, 122, 103
 };
-static const int lexer_goto_row109[] = {
+static const int lexer_goto_row116[] = {
        3,
        48, 113, -36,
-       114, 114, 176,
-       115, 122, 96
+       114, 114, 193,
+       115, 122, 103
 };
-static const int lexer_goto_row110[] = {
+static const int lexer_goto_row117[] = {
        3,
        48, 109, -46,
-       110, 110, 177,
-       111, 122, 96
+       110, 110, 194,
+       111, 122, 103
 };
-static const int lexer_goto_row111[] = {
+static const int lexer_goto_row118[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row112[] = {
+static const int lexer_goto_row119[] = {
        4,
        48, 95, -35,
-       97, 111, 96,
-       112, 112, 178,
-       113, 122, 96
+       97, 111, 103,
+       112, 112, 195,
+       113, 122, 103
 };
-static const int lexer_goto_row113[] = {
+static const int lexer_goto_row120[] = {
        6,
        48, 95, -35,
-       97, 104, 96,
-       105, 105, 179,
-       106, 115, 96,
-       116, 116, 180,
-       117, 122, 96
+       97, 104, 103,
+       105, 105, 196,
+       106, 115, 103,
+       116, 116, 197,
+       117, 122, 103
 };
-static const int lexer_goto_row114[] = {
+static const int lexer_goto_row121[] = {
        5,
        48, 95, -35,
-       97, 97, 181,
-       98, 114, 96,
-       115, 115, 182,
-       116, 122, 96
+       97, 97, 198,
+       98, 114, 103,
+       115, 115, 199,
+       116, 122, 103
 };
-static const int lexer_goto_row115[] = {
+static const int lexer_goto_row122[] = {
        3,
        48, 97, -35,
-       98, 98, 183,
-       99, 122, 96
+       98, 98, 200,
+       99, 122, 103
 };
-static const int lexer_goto_row116[] = {
+static const int lexer_goto_row123[] = {
        3,
        48, 110, -38,
-       111, 111, 184,
-       112, 122, 96
+       111, 111, 201,
+       112, 122, 103
 };
-static const int lexer_goto_row117[] = {
+static const int lexer_goto_row124[] = {
        3,
-       48, 99, -100,
-       100, 100, 185,
-       101, 122, 96
+       48, 99, -107,
+       100, 100, 202,
+       101, 122, 103
 };
-static const int lexer_goto_row118[] = {
+static const int lexer_goto_row125[] = {
        4,
        48, 95, -35,
-       97, 118, 96,
-       119, 119, 186,
-       120, 122, 96
+       97, 118, 103,
+       119, 119, 203,
+       120, 122, 103
 };
-static const int lexer_goto_row119[] = {
+static const int lexer_goto_row126[] = {
        3,
-       48, 115, -108,
-       116, 116, 187,
-       117, 122, 96
+       48, 115, -115,
+       116, 116, 204,
+       117, 122, 103
 };
-static const int lexer_goto_row120[] = {
+static const int lexer_goto_row127[] = {
        3,
        48, 107, -37,
-       108, 108, 188,
-       109, 122, 96
+       108, 108, 205,
+       109, 122, 103
 };
-static const int lexer_goto_row121[] = {
+static const int lexer_goto_row128[] = {
        4,
        48, 95, -35,
-       97, 98, 96,
-       99, 99, 189,
-       100, 122, 96
+       97, 98, 103,
+       99, 99, 206,
+       100, 122, 103
 };
-static const int lexer_goto_row122[] = {
+static const int lexer_goto_row129[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row123[] = {
+static const int lexer_goto_row130[] = {
        3,
-       48, 98, -122,
-       99, 99, 190,
-       100, 122, 96
+       48, 98, -129,
+       99, 99, 207,
+       100, 122, 103
 };
-static const int lexer_goto_row124[] = {
+static const int lexer_goto_row131[] = {
        5,
-       48, 104, -114,
-       105, 105, 191,
-       106, 110, 96,
-       111, 111, 192,
-       112, 122, 96
+       48, 104, -121,
+       105, 105, 208,
+       106, 110, 103,
+       111, 111, 209,
+       112, 122, 103
 };
-static const int lexer_goto_row125[] = {
+static const int lexer_goto_row132[] = {
        3,
        48, 97, -35,
-       98, 98, 193,
-       99, 122, 96
+       98, 98, 210,
+       99, 122, 103
 };
-static const int lexer_goto_row126[] = {
+static const int lexer_goto_row133[] = {
        5,
-       48, 99, -100,
-       100, 100, 194,
-       101, 115, 96,
-       116, 116, 195,
-       117, 122, 96
+       48, 99, -107,
+       100, 100, 211,
+       101, 115, 103,
+       116, 116, 212,
+       117, 122, 103
 };
-static const int lexer_goto_row127[] = {
+static const int lexer_goto_row134[] = {
        3,
        48, 107, -37,
-       108, 108, 196,
-       109, 122, 96
+       108, 108, 213,
+       109, 122, 103
 };
-static const int lexer_goto_row128[] = {
+static const int lexer_goto_row135[] = {
        3,
-       48, 111, -113,
-       112, 112, 197,
-       113, 122, 96
+       48, 111, -120,
+       112, 112, 214,
+       113, 122, 103
 };
-static const int lexer_goto_row129[] = {
+static const int lexer_goto_row136[] = {
        3,
        48, 100, -45,
-       101, 101, 198,
-       102, 122, 96
+       101, 101, 215,
+       102, 122, 103
 };
-static const int lexer_goto_row130[] = {
+static const int lexer_goto_row137[] = {
        4,
        48, 95, -35,
-       97, 116, 96,
-       117, 117, 199,
-       118, 122, 96
+       97, 116, 103,
+       117, 117, 216,
+       118, 122, 103
 };
-static const int lexer_goto_row131[] = {
+static const int lexer_goto_row138[] = {
        3,
-       48, 111, -113,
-       112, 112, 200,
-       113, 122, 96
+       48, 111, -120,
+       112, 112, 217,
+       113, 122, 103
 };
-static const int lexer_goto_row132[] = {
+static const int lexer_goto_row139[] = {
        3,
-       48, 104, -114,
-       105, 105, 201,
-       106, 122, 96
+       48, 104, -121,
+       105, 105, 218,
+       106, 122, 103
 };
-static const int lexer_goto_row133[] = {
+static const int lexer_goto_row140[] = {
        3,
        48, 113, -36,
-       114, 114, 202,
-       115, 122, 96
+       114, 114, 219,
+       115, 122, 103
 };
-static const int lexer_goto_row134[] = {
+static const int lexer_goto_row141[] = {
        3,
-       48, 104, -114,
-       105, 105, 203,
-       106, 122, 96
+       48, 104, -121,
+       105, 105, 220,
+       106, 122, 103
 };
-static const int lexer_goto_row135[] = {
+static const int lexer_goto_row142[] = {
        3,
-       48, 115, -108,
-       116, 116, 204,
-       117, 122, 96
+       48, 115, -115,
+       116, 116, 221,
+       117, 122, 103
 };
-static const int lexer_goto_row137[] = {
+static const int lexer_goto_row144[] = {
        2,
        0, 123, -55,
-       124, 255, 136
+       124, 255, 143
 };
-static const int lexer_goto_row139[] = {
+static const int lexer_goto_row146[] = {
        3,
-       0, 9, 205,
-       11, 12, 205,
-       14, 255, 205
+       0, 9, 222,
+       11, 12, 222,
+       14, 255, 222
 };
-static const int lexer_goto_row141[] = {
+static const int lexer_goto_row148[] = {
        3,
        0, 124, -55,
-       125, 125, 206,
-       126, 255, 136
+       125, 125, 223,
+       126, 255, 143
 };
-static const int lexer_goto_row143[] = {
+static const int lexer_goto_row150[] = {
        11,
-       0, 9, 207,
-       10, 10, 208,
-       11, 12, 207,
-       13, 13, 209,
-       14, 33, 207,
-       34, 34, 210,
-       35, 91, 207,
-       92, 92, 211,
-       93, 122, 207,
-       123, 123, 212,
-       124, 255, 207
+       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
 };
-static const int lexer_goto_row144[] = {
+static const int lexer_goto_row151[] = {
        1,
        0, 255, -59
 };
-static const int lexer_goto_row147[] = {
+static const int lexer_goto_row154[] = {
        9,
-       0, 9, 213,
-       10, 10, 214,
-       11, 12, 213,
-       13, 13, 215,
-       14, 38, 213,
-       39, 39, 216,
-       40, 91, 213,
-       92, 92, 217,
-       93, 255, 213
-};
-static const int lexer_goto_row148[] = {
-       1,
-       39, 39, 218
-};
-static const int lexer_goto_row151[] = {
-       1,
-       48, 102, -79
-};
-static const int lexer_goto_row152[] = {
-       1,
-       48, 102, -79
-};
-static const int lexer_goto_row153[] = {
-       1,
-       48, 102, -79
+       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_row157[] = {
+static const int lexer_goto_row155[] = {
        1,
-       101, 101, 219
+       39, 39, 235
 };
 static const int lexer_goto_row158[] = {
-       1,
-       48, 122, -93
+       2,
+       48, 95, -79,
+       117, 117, 236
 };
 static const int lexer_goto_row159[] = {
        1,
-       48, 122, -93
+       48, 117, -159
 };
 static const int lexer_goto_row160[] = {
        1,
-       48, 122, -93
+       48, 117, -159
 };
 static const int lexer_goto_row161[] = {
        1,
-       48, 122, -93
+       48, 57, 162
 };
 static const int lexer_goto_row162[] = {
        1,
-       0, 255, -94
+       48, 57, 162
 };
 static const int lexer_goto_row163[] = {
        1,
-       0, 255, 220
+       48, 57, 162
 };
 static const int lexer_goto_row164[] = {
-       3,
-       0, 124, 221,
-       125, 125, 222,
-       126, 255, 221
+       2,
+       48, 95, -81,
+       117, 117, 237
 };
 static const int lexer_goto_row165[] = {
-       3,
-       48, 113, -36,
-       114, 114, 223,
-       115, 122, 96
+       1,
+       48, 117, -165
 };
 static const int lexer_goto_row166[] = {
-       3,
-       48, 115, -108,
-       116, 116, 224,
-       117, 122, 96
+       2,
+       48, 102, -82,
+       117, 117, 238
 };
 static const int lexer_goto_row167[] = {
        1,
-       48, 122, -41
+       48, 117, -167
 };
 static const int lexer_goto_row168[] = {
-       3,
-       48, 100, -45,
-       101, 101, 225,
-       102, 122, 96
+       1,
+       48, 117, -167
 };
 static const int lexer_goto_row169[] = {
-       3,
-       48, 95, -35,
-       97, 97, 226,
-       98, 122, 96
-};
-static const int lexer_goto_row170[] = {
-       3,
-       48, 114, -101,
-       115, 115, 227,
-       116, 122, 96
-};
-static const int lexer_goto_row171[] = {
-       3,
-       48, 115, -108,
-       116, 116, 228,
-       117, 122, 96
-};
-static const int lexer_goto_row172[] = {
-       3,
-       48, 100, -45,
-       101, 101, 229,
-       102, 122, 96
-};
-static const int lexer_goto_row173[] = {
        1,
-       48, 122, -41
+       48, 117, -167
 };
 static const int lexer_goto_row174[] = {
-       4,
-       48, 95, -35,
-       97, 108, 96,
-       109, 109, 230,
-       110, 122, 96
+       1,
+       101, 101, 239
 };
 static const int lexer_goto_row175[] = {
-       3,
-       48, 100, -45,
-       101, 101, 231,
-       102, 122, 96
+       1,
+       48, 122, -100
 };
 static const int lexer_goto_row176[] = {
-       3,
-       48, 114, -101,
-       115, 115, 232,
-       116, 122, 96
+       1,
+       48, 122, -100
 };
 static const int lexer_goto_row177[] = {
        1,
-       48, 122, -41
+       48, 122, -100
 };
 static const int lexer_goto_row178[] = {
        1,
-       48, 122, -41
+       48, 122, -100
 };
 static const int lexer_goto_row179[] = {
-       5,
-       48, 107, -37,
-       108, 108, 233,
-       109, 110, 96,
-       111, 111, 234,
-       112, 122, 96
+       1,
+       0, 255, -101
 };
 static const int lexer_goto_row180[] = {
-       3,
-       48, 115, -108,
-       116, 116, 235,
-       117, 122, 96
+       1,
+       0, 255, 240
 };
 static const int lexer_goto_row181[] = {
-       5,
-       48, 100, -45,
-       101, 101, 236,
-       102, 113, 96,
-       114, 114, 237,
-       115, 122, 96
+       3,
+       0, 124, 241,
+       125, 125, 242,
+       126, 255, 241
 };
 static const int lexer_goto_row182[] = {
-       1,
-       48, 122, -41
+       3,
+       48, 113, -36,
+       114, 114, 243,
+       115, 122, 103
 };
 static const int lexer_goto_row183[] = {
        3,
-       48, 100, -45,
-       101, 101, 238,
-       102, 122, 96
+       48, 115, -115,
+       116, 116, 244,
+       117, 122, 103
 };
 static const int lexer_goto_row184[] = {
-       3,
-       48, 100, -45,
-       101, 101, 239,
-       102, 122, 96
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row185[] = {
        3,
-       48, 111, -113,
-       112, 112, 240,
-       113, 122, 96
+       48, 100, -45,
+       101, 101, 245,
+       102, 122, 103
 };
 static const int lexer_goto_row186[] = {
        3,
-       48, 116, -131,
-       117, 117, 241,
-       118, 122, 96
+       48, 95, -35,
+       97, 97, 246,
+       98, 122, 103
 };
 static const int lexer_goto_row187[] = {
-       1,
-       48, 122, -41
+       3,
+       48, 114, -108,
+       115, 115, 247,
+       116, 122, 103
 };
 static const int lexer_goto_row188[] = {
-       1,
-       48, 122, -41
+       3,
+       48, 115, -115,
+       116, 116, 248,
+       117, 122, 103
 };
 static const int lexer_goto_row189[] = {
        3,
-       48, 107, -37,
-       108, 108, 242,
-       109, 122, 96
+       48, 100, -45,
+       101, 101, 249,
+       102, 122, 103
 };
 static const int lexer_goto_row190[] = {
-       3,
-       48, 100, -45,
-       101, 101, 243,
-       102, 122, 96
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row191[] = {
        4,
        48, 95, -35,
-       97, 106, 96,
-       107, 107, 244,
-       108, 122, 96
+       97, 108, 103,
+       109, 109, 250,
+       110, 122, 103
 };
 static const int lexer_goto_row192[] = {
-       4,
-       48, 95, -35,
-       97, 117, 96,
-       118, 118, 245,
-       119, 122, 96
+       3,
+       48, 100, -45,
+       101, 101, 251,
+       102, 122, 103
 };
 static const int lexer_goto_row193[] = {
        3,
-       48, 115, -108,
-       116, 116, 246,
-       117, 122, 96
+       48, 114, -108,
+       115, 115, 252,
+       116, 122, 103
 };
 static const int lexer_goto_row194[] = {
-       3,
-       48, 107, -37,
-       108, 108, 247,
-       109, 122, 96
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row195[] = {
-       3,
-       48, 100, -45,
-       101, 101, 248,
-       102, 122, 96
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row196[] = {
-       3,
-       48, 116, -131,
-       117, 117, 249,
-       118, 122, 96
+       5,
+       48, 107, -37,
+       108, 108, 253,
+       109, 110, 103,
+       111, 111, 254,
+       112, 122, 103
 };
 static const int lexer_goto_row197[] = {
        3,
-       48, 101, -42,
-       102, 102, 250,
-       103, 122, 96
+       48, 115, -115,
+       116, 116, 255,
+       117, 122, 103
 };
 static const int lexer_goto_row198[] = {
-       3,
+       5,
        48, 100, -45,
-       101, 101, 251,
-       102, 122, 96
+       101, 101, 256,
+       102, 113, 103,
+       114, 114, 257,
+       115, 122, 103
 };
 static const int lexer_goto_row199[] = {
-       3,
-       48, 109, -46,
-       110, 110, 252,
-       111, 122, 96
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row200[] = {
        3,
        48, 100, -45,
-       101, 101, 253,
-       102, 122, 96
+       101, 101, 258,
+       102, 122, 103
 };
 static const int lexer_goto_row201[] = {
        3,
        48, 100, -45,
-       101, 101, 254,
-       102, 122, 96
+       101, 101, 259,
+       102, 122, 103
 };
 static const int lexer_goto_row202[] = {
        3,
-       48, 117, -193,
-       118, 118, 255,
-       119, 122, 96
+       48, 111, -120,
+       112, 112, 260,
+       113, 122, 103
 };
 static const int lexer_goto_row203[] = {
+       3,
+       48, 116, -138,
+       117, 117, 261,
+       118, 122, 103
+};
+static const int lexer_goto_row204[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row204[] = {
+static const int lexer_goto_row205[] = {
+       1,
+       48, 122, -41
+};
+static const int lexer_goto_row206[] = {
        3,
        48, 107, -37,
-       108, 108, 256,
-       109, 122, 96
+       108, 108, 262,
+       109, 122, 103
 };
-static const int lexer_goto_row205[] = {
+static const int lexer_goto_row207[] = {
        3,
-       48, 103, -50,
-       104, 104, 257,
-       105, 122, 96
-};
-static const int lexer_goto_row206[] = {
-       1,
-       0, 255, -138
-};
-static const int lexer_goto_row207[] = {
-       11,
-       0, 9, 258,
-       10, 10, 259,
-       11, 12, 258,
-       13, 13, 260,
-       14, 33, 258,
-       34, 34, 261,
-       35, 91, 258,
-       92, 92, 262,
-       93, 122, 258,
-       123, 123, 263,
-       124, 255, 258
+       48, 100, -45,
+       101, 101, 263,
+       102, 122, 103
 };
 static const int lexer_goto_row208[] = {
-       1,
-       0, 255, -144
+       4,
+       48, 95, -35,
+       97, 106, 103,
+       107, 107, 264,
+       108, 122, 103
 };
 static const int lexer_goto_row209[] = {
-       1,
-       0, 255, -144
+       4,
+       48, 95, -35,
+       97, 117, 103,
+       118, 118, 265,
+       119, 122, 103
 };
 static const int lexer_goto_row210[] = {
-       1,
-       0, 255, -144
+       3,
+       48, 115, -115,
+       116, 116, 266,
+       117, 122, 103
 };
 static const int lexer_goto_row211[] = {
-       5,
-       0, 33, -144,
-       34, 34, 264,
-       35, 122, -144,
-       123, 123, 265,
-       124, 255, 207
+       3,
+       48, 107, -37,
+       108, 108, 267,
+       109, 122, 103
 };
 static const int lexer_goto_row212[] = {
        3,
-       0, 9, 266,
-       11, 12, 266,
-       14, 255, 266
+       48, 100, -45,
+       101, 101, 268,
+       102, 122, 103
 };
 static const int lexer_goto_row213[] = {
-       5,
-       0, 33, -144,
-       34, 34, 267,
-       35, 122, -144,
-       123, 123, 268,
-       124, 255, 207
+       3,
+       48, 116, -138,
+       117, 117, 269,
+       118, 122, 103
 };
 static const int lexer_goto_row214[] = {
-       1,
-       0, 255, -148
+       3,
+       48, 101, -42,
+       102, 102, 270,
+       103, 122, 103
 };
 static const int lexer_goto_row215[] = {
-       1,
-       0, 255, -148
+       3,
+       48, 100, -45,
+       101, 101, 271,
+       102, 122, 103
 };
 static const int lexer_goto_row216[] = {
-       1,
-       0, 255, -148
+       3,
+       48, 109, -46,
+       110, 110, 272,
+       111, 122, 103
 };
 static const int lexer_goto_row217[] = {
-       9,
-       0, 9, 269,
-       10, 10, 270,
-       11, 12, 269,
-       13, 13, 271,
-       14, 38, 269,
-       39, 39, 272,
-       40, 91, 269,
-       92, 92, 273,
-       93, 255, 269
+       3,
+       48, 100, -45,
+       101, 101, 273,
+       102, 122, 103
 };
 static const int lexer_goto_row218[] = {
        3,
-       0, 9, 274,
-       11, 12, 274,
-       14, 255, 274
+       48, 100, -45,
+       101, 101, 274,
+       102, 122, 103
+};
+static const int lexer_goto_row219[] = {
+       3,
+       48, 117, -210,
+       118, 118, 275,
+       119, 122, 103
 };
 static const int lexer_goto_row220[] = {
        1,
-       98, 98, 275
+       48, 122, -41
 };
 static const int lexer_goto_row221[] = {
-       1,
-       0, 255, -94
+       3,
+       48, 107, -37,
+       108, 108, 276,
+       109, 122, 103
 };
 static const int lexer_goto_row222[] = {
+       3,
+       48, 103, -50,
+       104, 104, 277,
+       105, 122, 103
+};
+static const int lexer_goto_row223[] = {
        1,
-       0, 255, -94
+       0, 255, -145
 };
 static const int lexer_goto_row224[] = {
-       3,
-       48, 115, -108,
-       116, 116, 276,
-       117, 122, 96
+       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
 };
 static const int lexer_goto_row225[] = {
-       3,
-       48, 113, -36,
-       114, 114, 277,
-       115, 122, 96
+       1,
+       0, 255, -151
 };
 static const int lexer_goto_row226[] = {
-       3,
-       48, 113, -36,
-       114, 114, 278,
-       115, 122, 96
+       1,
+       0, 255, -151
 };
 static const int lexer_goto_row227[] = {
-       3,
-       48, 106, -192,
-       107, 107, 279,
-       108, 122, 96
+       1,
+       0, 255, -151
 };
 static const int lexer_goto_row228[] = {
-       3,
-       48, 114, -101,
-       115, 115, 280,
-       116, 122, 96
+       5,
+       0, 33, -151,
+       34, 34, 284,
+       35, 122, -151,
+       123, 123, 285,
+       124, 255, 224
 };
 static const int lexer_goto_row229[] = {
        3,
-       48, 104, -114,
-       105, 105, 281,
-       106, 122, 96
+       0, 9, 286,
+       11, 12, 286,
+       14, 255, 286
 };
 static const int lexer_goto_row230[] = {
-       1,
-       48, 122, -41
+       5,
+       0, 33, -151,
+       34, 34, 287,
+       35, 122, -151,
+       123, 123, 288,
+       124, 255, 224
 };
 static const int lexer_goto_row231[] = {
        1,
-       48, 122, -41
+       0, 255, -155
 };
 static const int lexer_goto_row232[] = {
-       3,
-       48, 113, -36,
-       114, 114, 282,
-       115, 122, 96
+       1,
+       0, 255, -155
 };
 static const int lexer_goto_row233[] = {
-       3,
-       48, 100, -45,
-       101, 101, 283,
-       102, 122, 96
+       1,
+       0, 255, -155
 };
 static const int lexer_goto_row234[] = {
-       3,
-       48, 104, -114,
-       105, 105, 284,
-       106, 122, 96
+       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
 };
 static const int lexer_goto_row235[] = {
        3,
-       48, 113, -36,
-       114, 114, 285,
-       115, 122, 96
-};
-static const int lexer_goto_row236[] = {
-       1,
-       48, 122, -41
+       0, 9, 294,
+       11, 12, 294,
+       14, 255, 294
 };
 static const int lexer_goto_row237[] = {
-       3,
-       48, 113, -36,
-       114, 114, 286,
-       115, 122, 96
+       1,
+       56, 56, 295
 };
 static const int lexer_goto_row238[] = {
-       3,
-       48, 116, -131,
-       117, 117, 287,
-       118, 122, 96
+       1,
+       56, 56, 296
 };
 static const int lexer_goto_row239[] = {
-       3,
-       48, 115, -108,
-       116, 116, 288,
-       117, 122, 96
+       1,
+       56, 56, 297
 };
 static const int lexer_goto_row240[] = {
-       3,
-       48, 107, -37,
-       108, 108, 289,
-       109, 122, 96
+       1,
+       98, 98, 298
 };
 static const int lexer_goto_row241[] = {
        1,
-       48, 122, -41
+       0, 255, -101
 };
 static const int lexer_goto_row242[] = {
-       3,
-       48, 107, -37,
-       108, 108, 290,
-       109, 122, 96
-};
-static const int lexer_goto_row243[] = {
-       3,
-       48, 95, -35,
-       97, 97, 291,
-       98, 122, 96
+       1,
+       0, 255, -101
 };
 static const int lexer_goto_row244[] = {
-       1,
-       48, 122, -41
+       3,
+       48, 115, -115,
+       116, 116, 299,
+       117, 122, 103
 };
 static const int lexer_goto_row245[] = {
        3,
-       48, 95, -35,
-       97, 97, 292,
-       98, 122, 96
+       48, 113, -36,
+       114, 114, 300,
+       115, 122, 103
 };
 static const int lexer_goto_row246[] = {
        3,
-       48, 95, -35,
-       97, 97, 293,
-       98, 122, 96
+       48, 113, -36,
+       114, 114, 301,
+       115, 122, 103
 };
 static const int lexer_goto_row247[] = {
        3,
-       48, 100, -45,
-       101, 101, 294,
-       102, 122, 96
+       48, 106, -209,
+       107, 107, 302,
+       108, 122, 103
 };
 static const int lexer_goto_row248[] = {
        3,
-       48, 104, -114,
-       105, 105, 295,
-       106, 122, 96
+       48, 114, -108,
+       115, 115, 303,
+       116, 122, 103
 };
 static const int lexer_goto_row249[] = {
        3,
-       48, 101, -42,
-       102, 102, 296,
-       103, 122, 96
+       48, 104, -121,
+       105, 105, 304,
+       106, 122, 103
 };
 static const int lexer_goto_row250[] = {
-       3,
-       48, 113, -36,
-       114, 114, 297,
-       115, 122, 96
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row251[] = {
        1,
@@ -1323,591 +1307,703 @@ static const int lexer_goto_row251[] = {
 static const int lexer_goto_row252[] = {
        3,
        48, 113, -36,
-       114, 114, 298,
-       115, 122, 96
+       114, 114, 305,
+       115, 122, 103
 };
 static const int lexer_goto_row253[] = {
-       1,
-       48, 122, -41
+       3,
+       48, 100, -45,
+       101, 101, 306,
+       102, 122, 103
 };
 static const int lexer_goto_row254[] = {
-       1,
-       48, 122, -41
+       3,
+       48, 104, -121,
+       105, 105, 307,
+       106, 122, 103
 };
 static const int lexer_goto_row255[] = {
-       1,
-       48, 122, -41
+       3,
+       48, 113, -36,
+       114, 114, 308,
+       115, 122, 103
 };
 static const int lexer_goto_row256[] = {
-       3,
-       48, 100, -45,
-       101, 101, 299,
-       102, 122, 96
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row257[] = {
        3,
-       48, 100, -45,
-       101, 101, 300,
-       102, 122, 96
+       48, 113, -36,
+       114, 114, 309,
+       115, 122, 103
 };
 static const int lexer_goto_row258[] = {
-       1,
-       48, 122, -41
+       3,
+       48, 116, -138,
+       117, 117, 310,
+       118, 122, 103
 };
 static const int lexer_goto_row259[] = {
-       1,
-       0, 255, -208
+       3,
+       48, 115, -115,
+       116, 116, 311,
+       117, 122, 103
 };
 static const int lexer_goto_row260[] = {
-       11,
-       0, 9, 301,
-       10, 10, 259,
-       11, 12, 301,
-       13, 13, 260,
-       14, 33, 301,
-       34, 34, 302,
-       35, 91, 301,
-       92, 92, 303,
-       93, 122, 301,
-       123, 123, 304,
-       124, 255, 301
+       3,
+       48, 107, -37,
+       108, 108, 312,
+       109, 122, 103
 };
 static const int lexer_goto_row261[] = {
        1,
-       0, 255, -261
+       48, 122, -41
 };
 static const int lexer_goto_row262[] = {
-       5,
-       0, 33, -261,
-       34, 34, 305,
-       35, 122, -261,
-       123, 123, 306,
-       124, 255, 301
+       3,
+       48, 107, -37,
+       108, 108, 313,
+       109, 122, 103
 };
 static const int lexer_goto_row263[] = {
        3,
-       0, 9, 307,
-       11, 12, 307,
-       14, 255, 307
+       48, 95, -35,
+       97, 97, 314,
+       98, 122, 103
 };
 static const int lexer_goto_row264[] = {
-       5,
-       0, 33, -261,
-       34, 34, 308,
-       35, 122, -261,
-       123, 123, 309,
-       124, 255, 301
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row265[] = {
        3,
-       0, 33, -144,
-       34, 34, 310,
-       35, 255, -212
+       48, 95, -35,
+       97, 97, 315,
+       98, 122, 103
 };
 static const int lexer_goto_row266[] = {
        3,
-       0, 122, -214,
-       123, 123, 311,
-       124, 255, 207
+       48, 95, -35,
+       97, 97, 316,
+       98, 122, 103
 };
 static const int lexer_goto_row267[] = {
-       1,
-       0, 255, -144
+       3,
+       48, 100, -45,
+       101, 101, 317,
+       102, 122, 103
 };
 static const int lexer_goto_row268[] = {
        3,
-       0, 33, -144,
-       34, 34, 312,
-       35, 255, -212
+       48, 104, -121,
+       105, 105, 318,
+       106, 122, 103
 };
 static const int lexer_goto_row269[] = {
        3,
-       0, 122, -214,
-       123, 123, 313,
-       124, 255, 207
+       48, 101, -42,
+       102, 102, 319,
+       103, 122, 103
 };
 static const int lexer_goto_row270[] = {
-       1,
-       0, 255, -148
+       3,
+       48, 113, -36,
+       114, 114, 320,
+       115, 122, 103
 };
 static const int lexer_goto_row271[] = {
        1,
-       0, 255, -148
+       48, 122, -41
 };
 static const int lexer_goto_row272[] = {
-       1,
-       0, 255, -148
+       3,
+       48, 113, -36,
+       114, 114, 321,
+       115, 122, 103
 };
 static const int lexer_goto_row273[] = {
-       9,
-       0, 9, 314,
-       10, 10, 315,
-       11, 12, 314,
-       13, 13, 316,
-       14, 38, 314,
-       39, 39, 317,
-       40, 91, 314,
-       92, 92, 318,
-       93, 255, 314
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row274[] = {
-       3,
-       0, 9, 319,
-       11, 12, 319,
-       14, 255, 319
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row275[] = {
        1,
-       0, 255, -148
+       48, 122, -41
 };
 static const int lexer_goto_row276[] = {
-       1,
-       117, 117, 320
+       3,
+       48, 100, -45,
+       101, 101, 322,
+       102, 122, 103
 };
 static const int lexer_goto_row277[] = {
-       1,
-       48, 122, -41
+       3,
+       48, 100, -45,
+       101, 101, 323,
+       102, 122, 103
 };
 static const int lexer_goto_row278[] = {
-       3,
-       48, 95, -35,
-       97, 97, 321,
-       98, 122, 96
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row279[] = {
-       3,
-       48, 115, -108,
-       116, 116, 322,
-       117, 122, 96
+       1,
+       0, 255, -225
 };
 static const int lexer_goto_row280[] = {
-       1,
-       48, 122, -41
+       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
 };
 static const int lexer_goto_row281[] = {
        1,
-       48, 122, -41
+       0, 255, -281
 };
 static const int lexer_goto_row282[] = {
-       3,
-       48, 109, -46,
-       110, 110, 323,
-       111, 122, 96
+       5,
+       0, 33, -281,
+       34, 34, 328,
+       35, 122, -281,
+       123, 123, 329,
+       124, 255, 324
 };
 static const int lexer_goto_row283[] = {
        3,
-       48, 109, -46,
-       110, 110, 324,
-       111, 122, 96
+       0, 9, 330,
+       11, 12, 330,
+       14, 255, 330
 };
 static const int lexer_goto_row284[] = {
-       1,
-       48, 122, -41
+       5,
+       0, 33, -281,
+       34, 34, 331,
+       35, 122, -281,
+       123, 123, 332,
+       124, 255, 324
 };
 static const int lexer_goto_row285[] = {
        3,
-       48, 100, -45,
-       101, 101, 325,
-       102, 122, 96
+       0, 33, -151,
+       34, 34, 333,
+       35, 255, -229
 };
 static const int lexer_goto_row286[] = {
        3,
-       48, 115, -108,
-       116, 116, 326,
-       117, 122, 96
+       0, 122, -231,
+       123, 123, 334,
+       124, 255, 224
 };
 static const int lexer_goto_row287[] = {
-       3,
-       48, 101, -42,
-       102, 102, 327,
-       103, 122, 96
+       1,
+       0, 255, -151
 };
 static const int lexer_goto_row288[] = {
        3,
-       48, 99, -100,
-       100, 100, 328,
-       101, 122, 96
+       0, 33, -151,
+       34, 34, 335,
+       35, 255, -229
 };
 static const int lexer_goto_row289[] = {
-       1,
-       48, 122, -41
+       3,
+       0, 122, -231,
+       123, 123, 336,
+       124, 255, 224
 };
 static const int lexer_goto_row290[] = {
        1,
-       48, 122, -41
+       0, 255, -155
 };
 static const int lexer_goto_row291[] = {
-       3,
-       48, 100, -45,
-       101, 101, 329,
-       102, 122, 96
+       1,
+       0, 255, -155
 };
 static const int lexer_goto_row292[] = {
-       3,
-       48, 97, -35,
-       98, 98, 330,
-       99, 122, 96
+       1,
+       0, 255, -155
 };
 static const int lexer_goto_row293[] = {
-       4,
-       48, 95, -35,
-       97, 102, 96,
-       103, 103, 331,
-       104, 122, 96
+       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
 };
 static const int lexer_goto_row294[] = {
        3,
-       48, 115, -108,
-       116, 116, 332,
-       117, 122, 96
+       0, 9, 342,
+       11, 12, 342,
+       14, 255, 342
 };
 static const int lexer_goto_row295[] = {
-       3,
-       48, 98, -122,
-       99, 99, 333,
-       100, 122, 96
-};
-static const int lexer_goto_row296[] = {
-       3,
-       48, 98, -122,
-       99, 99, 334,
-       100, 122, 96
-};
-static const int lexer_goto_row297[] = {
        1,
-       48, 122, -41
-};
-static const int lexer_goto_row298[] = {
-       3,
-       48, 109, -46,
-       110, 110, 335,
-       111, 122, 96
+       0, 255, -155
 };
 static const int lexer_goto_row299[] = {
        1,
-       48, 122, -41
+       117, 117, 343
 };
 static const int lexer_goto_row300[] = {
-       3,
-       48, 113, -36,
-       114, 114, 336,
-       115, 122, 96
-};
-static const int lexer_goto_row301[] = {
        1,
        48, 122, -41
 };
+static const int lexer_goto_row301[] = {
+       3,
+       48, 95, -35,
+       97, 97, 344,
+       98, 122, 103
+};
 static const int lexer_goto_row302[] = {
-       1,
-       0, 255, -261
+       3,
+       48, 115, -115,
+       116, 116, 345,
+       117, 122, 103
 };
 static const int lexer_goto_row303[] = {
        1,
-       0, 255, -263
+       48, 122, -41
 };
 static const int lexer_goto_row304[] = {
-       3,
-       0, 9, 337,
-       11, 12, 337,
-       14, 255, 337
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row305[] = {
-       1,
-       0, 255, -265
+       3,
+       48, 109, -46,
+       110, 110, 346,
+       111, 122, 103
 };
 static const int lexer_goto_row306[] = {
        3,
-       0, 33, -261,
-       34, 34, 338,
-       35, 255, -263
+       48, 109, -46,
+       110, 110, 347,
+       111, 122, 103
 };
 static const int lexer_goto_row307[] = {
-       3,
-       0, 122, -265,
-       123, 123, 339,
-       124, 255, 301
+       1,
+       48, 122, -41
 };
 static const int lexer_goto_row308[] = {
-       1,
-       0, 255, -208
+       3,
+       48, 100, -45,
+       101, 101, 348,
+       102, 122, 103
 };
 static const int lexer_goto_row309[] = {
        3,
-       0, 33, -261,
-       34, 34, 340,
-       35, 255, -263
+       48, 115, -115,
+       116, 116, 349,
+       117, 122, 103
 };
 static const int lexer_goto_row310[] = {
        3,
-       0, 122, -265,
-       123, 123, 341,
-       124, 255, 301
+       48, 101, -42,
+       102, 102, 350,
+       103, 122, 103
 };
 static const int lexer_goto_row311[] = {
-       1,
-       34, 34, 342
+       3,
+       48, 99, -107,
+       100, 100, 351,
+       101, 122, 103
 };
 static const int lexer_goto_row312[] = {
        1,
-       0, 255, -270
+       48, 122, -41
 };
 static const int lexer_goto_row313[] = {
        1,
-       0, 255, -266
+       48, 122, -41
 };
 static const int lexer_goto_row314[] = {
-       1,
-       123, 123, 343
+       3,
+       48, 100, -45,
+       101, 101, 352,
+       102, 122, 103
 };
 static const int lexer_goto_row315[] = {
-       1,
-       0, 255, -148
+       3,
+       48, 97, -35,
+       98, 98, 353,
+       99, 122, 103
 };
 static const int lexer_goto_row316[] = {
-       1,
-       0, 255, -148
+       4,
+       48, 95, -35,
+       97, 102, 103,
+       103, 103, 354,
+       104, 122, 103
 };
 static const int lexer_goto_row317[] = {
-       1,
-       0, 255, -148
+       3,
+       48, 115, -115,
+       116, 116, 355,
+       117, 122, 103
+};
+static const int lexer_goto_row318[] = {
+       3,
+       48, 98, -129,
+       99, 99, 356,
+       100, 122, 103
 };
 static const int lexer_goto_row319[] = {
        3,
-       0, 9, 344,
-       11, 12, 344,
-       14, 255, 344
+       48, 98, -129,
+       99, 99, 357,
+       100, 122, 103
 };
 static const int lexer_goto_row320[] = {
        1,
-       0, 255, -148
+       48, 122, -41
 };
 static const int lexer_goto_row321[] = {
-       1,
-       103, 103, 345
-};
-static const int lexer_goto_row322[] = {
        3,
-       48, 98, -122,
-       99, 99, 346,
-       100, 122, 96
+       48, 109, -46,
+       110, 110, 358,
+       111, 122, 103
 };
-static const int lexer_goto_row323[] = {
+static const int lexer_goto_row322[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row324[] = {
+static const int lexer_goto_row323[] = {
        3,
-       48, 116, -131,
-       117, 117, 347,
-       118, 122, 96
+       48, 113, -36,
+       114, 114, 359,
+       115, 122, 103
 };
-static const int lexer_goto_row325[] = {
+static const int lexer_goto_row324[] = {
        1,
        48, 122, -41
 };
+static const int lexer_goto_row325[] = {
+       1,
+       0, 255, -281
+};
 static const int lexer_goto_row326[] = {
-       3,
-       48, 114, -101,
-       115, 115, 348,
-       116, 122, 96
+       1,
+       0, 255, -283
 };
 static const int lexer_goto_row327[] = {
-       1,
-       48, 122, -41
+       3,
+       0, 9, 360,
+       11, 12, 360,
+       14, 255, 360
 };
 static const int lexer_goto_row328[] = {
-       3,
-       48, 95, -35,
-       97, 97, 349,
-       98, 122, 96
+       1,
+       0, 255, -285
 };
 static const int lexer_goto_row329[] = {
        3,
-       48, 100, -45,
-       101, 101, 350,
-       102, 122, 96
+       0, 33, -281,
+       34, 34, 361,
+       35, 255, -283
 };
 static const int lexer_goto_row330[] = {
-       1,
-       48, 122, -41
+       3,
+       0, 122, -285,
+       123, 123, 362,
+       124, 255, 324
 };
 static const int lexer_goto_row331[] = {
-       3,
-       48, 107, -37,
-       108, 108, 351,
-       109, 122, 96
+       1,
+       0, 255, -225
 };
 static const int lexer_goto_row332[] = {
        3,
-       48, 100, -45,
-       101, 101, 352,
-       102, 122, 96
+       0, 33, -281,
+       34, 34, 363,
+       35, 255, -283
 };
 static const int lexer_goto_row333[] = {
        3,
-       48, 100, -45,
-       101, 101, 353,
-       102, 122, 96
+       0, 122, -285,
+       123, 123, 364,
+       124, 255, 324
 };
 static const int lexer_goto_row334[] = {
-       3,
-       48, 115, -108,
-       116, 116, 354,
-       117, 122, 96
+       1,
+       34, 34, 365
 };
 static const int lexer_goto_row335[] = {
        1,
-       48, 122, -41
+       0, 255, -290
 };
 static const int lexer_goto_row336[] = {
        1,
-       48, 122, -41
+       0, 255, -286
 };
 static const int lexer_goto_row337[] = {
-       3,
-       48, 114, -101,
-       115, 115, 355,
-       116, 122, 96
+       1,
+       123, 123, 366
 };
 static const int lexer_goto_row338[] = {
        1,
-       0, 255, -261
+       0, 255, -155
 };
 static const int lexer_goto_row339[] = {
        1,
-       34, 34, 356
+       0, 255, -155
 };
 static const int lexer_goto_row340[] = {
        1,
-       0, 255, -311
-};
-static const int lexer_goto_row341[] = {
-       1,
-       0, 255, -307
+       0, 255, -155
 };
 static const int lexer_goto_row342[] = {
-       1,
-       123, 123, 357
+       3,
+       0, 9, 367,
+       11, 12, 367,
+       14, 255, 367
 };
 static const int lexer_goto_row343[] = {
        1,
-       34, 34, 342
+       0, 255, -155
 };
 static const int lexer_goto_row344[] = {
        1,
-       123, 123, 343
+       103, 103, 368
 };
 static const int lexer_goto_row345[] = {
-       1,
-       0, 255, -148
+       3,
+       48, 98, -129,
+       99, 99, 369,
+       100, 122, 103
 };
 static const int lexer_goto_row346[] = {
        1,
-       95, 95, 358
+       48, 122, -41
 };
 static const int lexer_goto_row347[] = {
        3,
-       48, 115, -108,
-       116, 116, 359,
-       117, 122, 96
+       48, 116, -138,
+       117, 117, 370,
+       118, 122, 103
 };
 static const int lexer_goto_row348[] = {
-       3,
-       48, 100, -45,
-       101, 101, 360,
-       102, 122, 96
-};
-static const int lexer_goto_row349[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row350[] = {
+static const int lexer_goto_row349[] = {
        3,
-       48, 98, -122,
-       99, 99, 361,
-       100, 122, 96
+       48, 114, -108,
+       115, 115, 371,
+       116, 122, 103
 };
-static const int lexer_goto_row351[] = {
+static const int lexer_goto_row350[] = {
        1,
        48, 122, -41
 };
+static const int lexer_goto_row351[] = {
+       3,
+       48, 95, -35,
+       97, 97, 372,
+       98, 122, 103
+};
 static const int lexer_goto_row352[] = {
        3,
        48, 100, -45,
-       101, 101, 362,
-       102, 122, 96
+       101, 101, 373,
+       102, 122, 103
 };
 static const int lexer_goto_row353[] = {
        1,
        48, 122, -41
 };
 static const int lexer_goto_row354[] = {
-       1,
-       48, 122, -41
+       3,
+       48, 107, -37,
+       108, 108, 374,
+       109, 122, 103
 };
 static const int lexer_goto_row355[] = {
        3,
        48, 100, -45,
-       101, 101, 363,
-       102, 122, 96
+       101, 101, 375,
+       102, 122, 103
 };
 static const int lexer_goto_row356[] = {
        3,
-       48, 95, -35,
-       97, 97, 364,
-       98, 122, 96
+       48, 100, -45,
+       101, 101, 376,
+       102, 122, 103
 };
 static const int lexer_goto_row357[] = {
-       1,
-       34, 34, 356
+       3,
+       48, 115, -115,
+       116, 116, 377,
+       117, 122, 103
 };
 static const int lexer_goto_row358[] = {
        1,
-       123, 123, 357
+       48, 122, -41
 };
 static const int lexer_goto_row359[] = {
        1,
-       95, 95, 365
+       48, 122, -41
 };
 static const int lexer_goto_row360[] = {
+       3,
+       48, 114, -108,
+       115, 115, 378,
+       116, 122, 103
+};
+static const int lexer_goto_row361[] = {
+       1,
+       0, 255, -281
+};
+static const int lexer_goto_row362[] = {
+       1,
+       34, 34, 379
+};
+static const int lexer_goto_row363[] = {
+       1,
+       0, 255, -334
+};
+static const int lexer_goto_row364[] = {
+       1,
+       0, 255, -330
+};
+static const int lexer_goto_row365[] = {
+       1,
+       123, 123, 380
+};
+static const int lexer_goto_row366[] = {
+       1,
+       34, 34, 365
+};
+static const int lexer_goto_row367[] = {
+       1,
+       123, 123, 366
+};
+static const int lexer_goto_row368[] = {
+       1,
+       0, 255, -155
+};
+static const int lexer_goto_row369[] = {
+       1,
+       95, 95, 381
+};
+static const int lexer_goto_row370[] = {
+       3,
+       48, 115, -115,
+       116, 116, 382,
+       117, 122, 103
+};
+static const int lexer_goto_row371[] = {
+       3,
+       48, 100, -45,
+       101, 101, 383,
+       102, 122, 103
+};
+static const int lexer_goto_row372[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row361[] = {
+static const int lexer_goto_row373[] = {
+       3,
+       48, 98, -129,
+       99, 99, 384,
+       100, 122, 103
+};
+static const int lexer_goto_row374[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row362[] = {
+static const int lexer_goto_row375[] = {
        3,
        48, 100, -45,
-       101, 101, 366,
-       102, 122, 96
+       101, 101, 385,
+       102, 122, 103
 };
-static const int lexer_goto_row363[] = {
+static const int lexer_goto_row376[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row364[] = {
+static const int lexer_goto_row377[] = {
+       1,
+       48, 122, -41
+};
+static const int lexer_goto_row378[] = {
        3,
-       48, 99, -100,
-       100, 100, 367,
-       101, 122, 96
+       48, 100, -45,
+       101, 101, 386,
+       102, 122, 103
 };
-static const int lexer_goto_row365[] = {
+static const int lexer_goto_row379[] = {
+       3,
+       48, 95, -35,
+       97, 97, 387,
+       98, 122, 103
+};
+static const int lexer_goto_row380[] = {
+       1,
+       34, 34, 379
+};
+static const int lexer_goto_row381[] = {
+       1,
+       123, 123, 380
+};
+static const int lexer_goto_row382[] = {
+       1,
+       95, 95, 388
+};
+static const int lexer_goto_row383[] = {
+       1,
+       48, 122, -41
+};
+static const int lexer_goto_row384[] = {
+       1,
+       48, 122, -41
+};
+static const int lexer_goto_row385[] = {
+       3,
+       48, 100, -45,
+       101, 101, 389,
+       102, 122, 103
+};
+static const int lexer_goto_row386[] = {
+       1,
+       48, 122, -41
+};
+static const int lexer_goto_row387[] = {
+       3,
+       48, 99, -107,
+       100, 100, 390,
+       101, 122, 103
+};
+static const int lexer_goto_row388[] = {
        3,
        48, 107, -37,
-       108, 108, 368,
-       109, 122, 96
+       108, 108, 391,
+       109, 122, 103
 };
-static const int lexer_goto_row367[] = {
+static const int lexer_goto_row390[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row368[] = {
+static const int lexer_goto_row391[] = {
        1,
        48, 122, -41
 };
-static const int lexer_goto_row369[] = {
+static const int lexer_goto_row392[] = {
        1,
        48, 122, -41
 };
@@ -1992,24 +2088,24 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row77,
        lexer_goto_row78,
        lexer_goto_row79,
-       lexer_goto_row_null,
+       lexer_goto_row80,
        lexer_goto_row81,
        lexer_goto_row82,
-       lexer_goto_row_null,
-       lexer_goto_row_null,
+       lexer_goto_row83,
+       lexer_goto_row84,
        lexer_goto_row85,
        lexer_goto_row86,
-       lexer_goto_row87,
+       lexer_goto_row_null,
        lexer_goto_row88,
        lexer_goto_row89,
        lexer_goto_row_null,
-       lexer_goto_row91,
+       lexer_goto_row_null,
        lexer_goto_row92,
        lexer_goto_row93,
        lexer_goto_row94,
        lexer_goto_row95,
        lexer_goto_row96,
-       lexer_goto_row97,
+       lexer_goto_row_null,
        lexer_goto_row98,
        lexer_goto_row99,
        lexer_goto_row100,
@@ -2048,28 +2144,28 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row133,
        lexer_goto_row134,
        lexer_goto_row135,
-       lexer_goto_row_null,
+       lexer_goto_row136,
        lexer_goto_row137,
-       lexer_goto_row_null,
+       lexer_goto_row138,
        lexer_goto_row139,
-       lexer_goto_row_null,
+       lexer_goto_row140,
        lexer_goto_row141,
+       lexer_goto_row142,
        lexer_goto_row_null,
-       lexer_goto_row143,
        lexer_goto_row144,
        lexer_goto_row_null,
+       lexer_goto_row146,
        lexer_goto_row_null,
-       lexer_goto_row147,
        lexer_goto_row148,
        lexer_goto_row_null,
-       lexer_goto_row_null,
+       lexer_goto_row150,
        lexer_goto_row151,
-       lexer_goto_row152,
-       lexer_goto_row153,
        lexer_goto_row_null,
        lexer_goto_row_null,
+       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,
@@ -2082,10 +2178,10 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row167,
        lexer_goto_row168,
        lexer_goto_row169,
-       lexer_goto_row170,
-       lexer_goto_row171,
-       lexer_goto_row172,
-       lexer_goto_row173,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
        lexer_goto_row174,
        lexer_goto_row175,
        lexer_goto_row176,
@@ -2131,11 +2227,11 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row216,
        lexer_goto_row217,
        lexer_goto_row218,
-       lexer_goto_row_null,
+       lexer_goto_row219,
        lexer_goto_row220,
        lexer_goto_row221,
        lexer_goto_row222,
-       lexer_goto_row_null,
+       lexer_goto_row223,
        lexer_goto_row224,
        lexer_goto_row225,
        lexer_goto_row226,
@@ -2148,14 +2244,14 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row233,
        lexer_goto_row234,
        lexer_goto_row235,
-       lexer_goto_row236,
+       lexer_goto_row_null,
        lexer_goto_row237,
        lexer_goto_row238,
        lexer_goto_row239,
        lexer_goto_row240,
        lexer_goto_row241,
        lexer_goto_row242,
-       lexer_goto_row243,
+       lexer_goto_row_null,
        lexer_goto_row244,
        lexer_goto_row245,
        lexer_goto_row246,
@@ -2208,9 +2304,9 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row293,
        lexer_goto_row294,
        lexer_goto_row295,
-       lexer_goto_row296,
-       lexer_goto_row297,
-       lexer_goto_row298,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
+       lexer_goto_row_null,
        lexer_goto_row299,
        lexer_goto_row300,
        lexer_goto_row301,
@@ -2230,7 +2326,7 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row315,
        lexer_goto_row316,
        lexer_goto_row317,
-       lexer_goto_row_null,
+       lexer_goto_row318,
        lexer_goto_row319,
        lexer_goto_row320,
        lexer_goto_row321,
@@ -2253,7 +2349,7 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row338,
        lexer_goto_row339,
        lexer_goto_row340,
-       lexer_goto_row341,
+       lexer_goto_row_null,
        lexer_goto_row342,
        lexer_goto_row343,
        lexer_goto_row344,
@@ -2278,37 +2374,60 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row363,
        lexer_goto_row364,
        lexer_goto_row365,
-       lexer_goto_row_null,
+       lexer_goto_row366,
        lexer_goto_row367,
        lexer_goto_row368,
-       lexer_goto_row369
+       lexer_goto_row369,
+       lexer_goto_row370,
+       lexer_goto_row371,
+       lexer_goto_row372,
+       lexer_goto_row373,
+       lexer_goto_row374,
+       lexer_goto_row375,
+       lexer_goto_row376,
+       lexer_goto_row377,
+       lexer_goto_row378,
+       lexer_goto_row379,
+       lexer_goto_row380,
+       lexer_goto_row381,
+       lexer_goto_row382,
+       lexer_goto_row383,
+       lexer_goto_row384,
+       lexer_goto_row385,
+       lexer_goto_row386,
+       lexer_goto_row387,
+       lexer_goto_row388,
+       lexer_goto_row_null,
+       lexer_goto_row390,
+       lexer_goto_row391,
+       lexer_goto_row392
 };
 
 const int lexer_accept_table[] = {
-       -1,0,1,1,0,94,108,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,108,84,1,86,108,103,-1,104,2,2,2,65,69,109,109,109,78,63,61,62,73,102,64,-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,108,106,-1,105,108,103,108,108,2,107,108,109,66,72,101,101,101,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,108,108,108,108,108,-1,-1,-1,108,108,108,-1,-1,107,-1,-1,-1,110,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,108,-1,-1,106,-1,105,-1,-1,108,-1,-1,108,108,108,-1,-1,108,-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,108,-1,-1,103,-1,-1,104,108,108,108,103,-1,108,-1,98,38,98,18,98,5,98,98,4,98,98,98,98,19,34,98,-1,106,-1,-1,105,103,104,108,-1,98,98,33,98,22,98,3,21,98,98,106,105,-1,7,35,98,48,98,98,52,8,20,9
+       -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
 };
 
 static int parser_action_row1[] = {
        7,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 487,
+       28, 1, 493,
        95, 0, 3,
-       109, 1, 487,
-       110, 1, 22
+       115, 1, 493,
+       116, 1, 22
 };
 static int parser_action_row2[] = {
        1,
-       -1, 1, 489
+       -1, 1, 495
 };
 static int parser_action_row3[] = {
        1,
-       -1, 1, 1088
+       -1, 1, 1112
 };
 static int parser_action_row4[] = {
        4,
-       -1, 1, 477,
+       -1, 1, 483,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
@@ -2316,25 +2435,25 @@ static int parser_action_row4[] = {
 static int parser_action_row5[] = {
        2,
        -1, 3, 4,
-       110, 2, -1
+       116, 2, -1
 };
 static int parser_action_row6[] = {
        7,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 487,
+       28, 1, 493,
        95, 0, 3,
-       109, 1, 487,
-       110, 1, 22
+       115, 1, 493,
+       116, 1, 22
 };
 static int parser_action_row7[] = {
        1,
-       -1, 1, 1054
+       -1, 1, 1078
 };
 static int parser_action_row8[] = {
        1,
-       -1, 1, 1058
+       -1, 1, 1082
 };
 static int parser_action_row9[] = {
        1,
@@ -2350,15 +2469,15 @@ static int parser_action_row11[] = {
 };
 static int parser_action_row12[] = {
        1,
-       -1, 1, 1056
+       -1, 1, 1080
 };
 static int parser_action_row13[] = {
        2,
-       -1, 1, 486,
-       110, 1, 23
+       -1, 1, 492,
+       116, 1, 23
 };
 static int parser_action_row14[] = {
-       33,
+       39,
        -1, 1, 30,
        12, 0, 31,
        13, 0, 32,
@@ -2374,7 +2493,7 @@ static int parser_action_row14[] = {
        36, 0, 42,
        37, 0, 43,
        38, 0, 44,
-       41, 1, 458,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
@@ -2385,107 +2504,113 @@ static int parser_action_row14[] = {
        54, 0, 52,
        96, 0, 53,
        97, 0, 54,
-       98, 1, 458,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row15[] = {
        3,
        -1, 3, 14,
-       28, 0, 84,
-       109, 0, 85
+       28, 0, 90,
+       115, 0, 91
 };
 static int parser_action_row16[] = {
        1,
-       -1, 1, 1090
+       -1, 1, 1114
 };
 static int parser_action_row17[] = {
        4,
        -1, 3, 16,
-       0, 0, 88,
-       1, 0, 89,
-       95, 0, 90
+       0, 0, 94,
+       1, 0, 95,
+       95, 0, 96
 };
 static int parser_action_row18[] = {
        1,
-       -1, 1, 488
+       -1, 1, 494
 };
 static int parser_action_row19[] = {
        7,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 487,
+       28, 1, 493,
        95, 0, 3,
-       109, 1, 487,
-       110, 1, 22
+       115, 1, 493,
+       116, 1, 22
 };
 static int parser_action_row20[] = {
        7,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 487,
+       28, 1, 493,
        95, 0, 3,
-       109, 1, 487,
-       110, 1, 22
+       115, 1, 493,
+       116, 1, 22
 };
 static int parser_action_row21[] = {
        5,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       110, 1, 22
+       116, 1, 22
 };
 static int parser_action_row22[] = {
        7,
-       -1, 1, 474,
-       0, 0, 102,
-       1, 0, 103,
-       9, 1, 1051,
-       28, 1, 1051,
-       95, 0, 104,
-       109, 1, 1051
+       -1, 1, 480,
+       0, 0, 108,
+       1, 0, 109,
+       9, 1, 1075,
+       28, 1, 1075,
+       95, 0, 110,
+       115, 1, 1075
 };
 static int parser_action_row23[] = {
        7,
-       -1, 1, 476,
+       -1, 1, 482,
        0, 0, 1,
        1, 0, 2,
-       9, 1, 1053,
-       28, 1, 1053,
-       95, 0, 105,
-       109, 1, 1053
+       9, 1, 1077,
+       28, 1, 1077,
+       95, 0, 111,
+       115, 1, 1077
 };
 static int parser_action_row24[] = {
        1,
-       -1, 1, 481
+       -1, 1, 487
 };
 static int parser_action_row25[] = {
        4,
-       -1, 1, 474,
-       0, 0, 102,
-       1, 0, 103,
-       95, 0, 104
+       -1, 1, 480,
+       0, 0, 108,
+       1, 0, 109,
+       95, 0, 110
 };
 static int parser_action_row26[] = {
        4,
-       -1, 1, 476,
+       -1, 1, 482,
        0, 0, 1,
        1, 0, 2,
-       95, 0, 105
+       95, 0, 111
 };
 static int parser_action_row27[] = {
        1,
        -1, 1, 1
 };
 static int parser_action_row28[] = {
-       33,
+       39,
        -1, 1, 30,
        12, 0, 31,
        13, 0, 32,
@@ -2501,7 +2626,7 @@ static int parser_action_row28[] = {
        36, 0, 42,
        37, 0, 43,
        38, 0, 44,
-       41, 1, 458,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
@@ -2512,82 +2637,94 @@ static int parser_action_row28[] = {
        54, 0, 52,
        96, 0, 53,
        97, 0, 54,
-       98, 1, 458,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row29[] = {
        7,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 487,
+       28, 1, 493,
        95, 0, 3,
-       109, 1, 487,
-       110, 1, 22
+       115, 1, 493,
+       116, 1, 22
 };
 static int parser_action_row30[] = {
        7,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 487,
+       28, 1, 493,
        95, 0, 3,
-       109, 1, 487,
-       110, 1, 22
+       115, 1, 493,
+       116, 1, 22
 };
 static int parser_action_row31[] = {
        5,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       110, 1, 22
+       116, 1, 22
 };
 static int parser_action_row32[] = {
-       27,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+       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,
        54, 1, 353,
        73, 1, 353,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row33[] = {
        1,
        -1, 1, 31
 };
 static int parser_action_row34[] = {
-       34,
-       -1, 1, 458,
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 157,
+       9, 0, 169,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -2617,31 +2754,37 @@ static int parser_action_row34[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row35[] = {
        2,
        -1, 3, 34,
-       97, 0, 162
+       97, 0, 174
 };
 static int parser_action_row36[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row37[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row38[] = {
-       34,
-       -1, 1, 458,
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 157,
+       9, 0, 169,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -2671,393 +2814,447 @@ static int parser_action_row38[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row39[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row40[] = {
-       26,
+       32,
        -1, 1, 169,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row41[] = {
        2,
        -1, 1, 174,
-       49, 0, 197
+       49, 0, 209
 };
 static int parser_action_row42[] = {
        2,
        -1, 1, 171,
-       49, 0, 197
+       49, 0, 209
 };
 static int parser_action_row43[] = {
        1,
        -1, 1, 173
 };
 static int parser_action_row44[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 200,
+       97, 0, 212,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row45[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row46[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
 static int parser_action_row47[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
 static int parser_action_row48[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
 static int parser_action_row49[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
 static int parser_action_row50[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row51[] = {
        2,
        -1, 3, 50,
-       11, 0, 211
+       11, 0, 223
 };
 static int parser_action_row52[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row53[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row54[] = {
        2,
        -1, 3, 53,
-       58, 0, 214
+       58, 0, 226
 };
 static int parser_action_row55[] = {
-       40,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+       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, 341,
-       58, 0, 215,
-       59, 0, 216,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 341,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row56[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
 static int parser_action_row57[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
 static int parser_action_row58[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
 static int parser_action_row59[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
 static int parser_action_row60[] = {
-       1,
-       -1, 1, 397
+       2,
+       -1, 1, 411,
+       94, 0, 216
 };
 static int parser_action_row61[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -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, 236,
-       19, 0, 237,
-       20, 0, 238,
-       21, 0, 239
+       18, 0, 254,
+       19, 0, 255,
+       20, 0, 256,
+       21, 0, 257
 };
-static int parser_action_row63[] = {
+static int parser_action_row69[] = {
        1,
        -1, 1, 24
 };
-static int parser_action_row64[] = {
+static int parser_action_row70[] = {
        1,
        -1, 1, 25
 };
-static int parser_action_row65[] = {
+static int parser_action_row71[] = {
        4,
        -1, 1, 160,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row66[] = {
+static int parser_action_row72[] = {
        1,
        -1, 1, 167
 };
-static int parser_action_row67[] = {
+static int parser_action_row73[] = {
        1,
        -1, 1, 168
 };
-static int parser_action_row68[] = {
+static int parser_action_row74[] = {
        1,
        -1, 1, 176
 };
-static int parser_action_row69[] = {
+static int parser_action_row75[] = {
        1,
        -1, 1, 177
 };
-static int parser_action_row70[] = {
+static int parser_action_row76[] = {
        1,
        -1, 1, 179
 };
-static int parser_action_row71[] = {
+static int parser_action_row77[] = {
        1,
        -1, 1, 178
 };
-static int parser_action_row72[] = {
+static int parser_action_row78[] = {
        1,
        -1, 1, 180
 };
-static int parser_action_row73[] = {
+static int parser_action_row79[] = {
        1,
        -1, 1, 181
 };
-static int parser_action_row74[] = {
+static int parser_action_row80[] = {
        1,
        -1, 1, 182
 };
-static int parser_action_row75[] = {
+static int parser_action_row81[] = {
        3,
-       -1, 3, 74,
-       54, 0, 244,
-       73, 0, 245
+       -1, 3, 80,
+       54, 0, 262,
+       73, 0, 263
 };
-static int parser_action_row76[] = {
+static int parser_action_row82[] = {
        1,
        -1, 1, 329
 };
-static int parser_action_row77[] = {
+static int parser_action_row83[] = {
        1,
-       -1, 1, 379
+       -1, 1, 385
 };
-static int parser_action_row78[] = {
+static int parser_action_row84[] = {
        1,
-       -1, 1, 378
+       -1, 1, 384
 };
-static int parser_action_row79[] = {
+static int parser_action_row85[] = {
        3,
-       -1, 3, 78,
-       104, 0, 247,
-       105, 0, 248
+       -1, 3, 84,
+       110, 0, 265,
+       111, 0, 266
 };
-static int parser_action_row80[] = {
+static int parser_action_row86[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row81[] = {
+static int parser_action_row87[] = {
        3,
-       -1, 3, 80,
-       41, 0, 254,
-       98, 0, 255
+       -1, 3, 86,
+       41, 0, 272,
+       98, 0, 273
 };
-static int parser_action_row82[] = {
+static int parser_action_row88[] = {
        1,
-       -1, 1, 1086
+       -1, 1, 1110
 };
-static int parser_action_row83[] = {
+static int parser_action_row89[] = {
        3,
-       -1, 1, 455,
-       12, 0, 256,
-       97, 0, 257
+       -1, 1, 461,
+       12, 0, 274,
+       97, 0, 275
 };
-static int parser_action_row84[] = {
+static int parser_action_row90[] = {
        4,
-       -1, 1, 457,
-       12, 0, 258,
+       -1, 1, 463,
+       12, 0, 276,
        96, 0, 53,
-       97, 0, 259
+       97, 0, 277
 };
-static int parser_action_row85[] = {
+static int parser_action_row91[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row86[] = {
+static int parser_action_row92[] = {
        1,
        -1, 1, 141
 };
-static int parser_action_row87[] = {
+static int parser_action_row93[] = {
        2,
-       -1, 3, 86,
-       109, 0, 263
+       -1, 3, 92,
+       115, 0, 281
 };
-static int parser_action_row88[] = {
+static int parser_action_row94[] = {
        1,
        -1, 1, 145
 };
-static int parser_action_row89[] = {
+static int parser_action_row95[] = {
        1,
-       -1, 1, 472
+       -1, 1, 478
 };
-static int parser_action_row90[] = {
+static int parser_action_row96[] = {
        1,
-       -1, 1, 471
+       -1, 1, 477
 };
-static int parser_action_row91[] = {
+static int parser_action_row97[] = {
        1,
-       -1, 1, 473
+       -1, 1, 479
 };
-static int parser_action_row92[] = {
+static int parser_action_row98[] = {
        1,
        -1, 1, 20
 };
-static int parser_action_row93[] = {
+static int parser_action_row99[] = {
        1,
-       -1, 1, 1055
+       -1, 1, 1079
 };
-static int parser_action_row94[] = {
+static int parser_action_row100[] = {
        1,
        -1, 1, 2
 };
-static int parser_action_row95[] = {
+static int parser_action_row101[] = {
        7,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 487,
+       28, 1, 493,
        95, 0, 3,
-       109, 1, 487,
-       110, 1, 22
+       115, 1, 493,
+       116, 1, 22
 };
-static int parser_action_row96[] = {
+static int parser_action_row102[] = {
        5,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       110, 1, 22
+       116, 1, 22
 };
-static int parser_action_row97[] = {
+static int parser_action_row103[] = {
        1,
        -1, 1, 4
 };
-static int parser_action_row98[] = {
+static int parser_action_row104[] = {
        1,
-       -1, 1, 1057
+       -1, 1, 1081
 };
-static int parser_action_row99[] = {
-       33,
+static int parser_action_row105[] = {
+       39,
        -1, 1, 30,
        12, 0, 31,
        13, 0, 32,
@@ -3073,7 +3270,7 @@ static int parser_action_row99[] = {
        36, 0, 42,
        37, 0, 43,
        38, 0, 44,
-       41, 1, 458,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
@@ -3084,428 +3281,488 @@ static int parser_action_row99[] = {
        54, 0, 52,
        96, 0, 53,
        97, 0, 54,
-       98, 1, 458,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row100[] = {
+static int parser_action_row106[] = {
        5,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       110, 1, 22
+       116, 1, 22
 };
-static int parser_action_row101[] = {
+static int parser_action_row107[] = {
        1,
-       -1, 1, 1059
+       -1, 1, 1083
 };
-static int parser_action_row102[] = {
+static int parser_action_row108[] = {
        1,
        -1, 1, 8
 };
-static int parser_action_row103[] = {
+static int parser_action_row109[] = {
        1,
-       -1, 1, 490
+       -1, 1, 496
 };
-static int parser_action_row104[] = {
+static int parser_action_row110[] = {
        1,
-       -1, 1, 1089
+       -1, 1, 1113
 };
-static int parser_action_row105[] = {
+static int parser_action_row111[] = {
        4,
-       -1, 1, 479,
+       -1, 1, 485,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row106[] = {
+static int parser_action_row112[] = {
        4,
-       -1, 1, 478,
+       -1, 1, 484,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row107[] = {
+static int parser_action_row113[] = {
        1,
-       -1, 1, 1091
+       -1, 1, 1115
 };
-static int parser_action_row108[] = {
+static int parser_action_row114[] = {
        7,
-       -1, 1, 475,
-       0, 0, 102,
-       1, 0, 103,
-       9, 1, 1052,
-       28, 1, 1052,
-       95, 0, 271,
-       109, 1, 1052
+       -1, 1, 481,
+       0, 0, 108,
+       1, 0, 109,
+       9, 1, 1076,
+       28, 1, 1076,
+       95, 0, 289,
+       115, 1, 1076
 };
-static int parser_action_row109[] = {
+static int parser_action_row115[] = {
        4,
-       -1, 1, 475,
-       0, 0, 102,
-       1, 0, 103,
-       95, 0, 271
+       -1, 1, 481,
+       0, 0, 108,
+       1, 0, 109,
+       95, 0, 289
 };
-static int parser_action_row110[] = {
+static int parser_action_row116[] = {
        5,
        -1, 1, 81,
-       18, 0, 236,
-       19, 0, 237,
-       20, 0, 238,
-       21, 0, 239
+       18, 0, 254,
+       19, 0, 255,
+       20, 0, 256,
+       21, 0, 257
 };
-static int parser_action_row111[] = {
+static int parser_action_row117[] = {
        1,
        -1, 1, 3
 };
-static int parser_action_row112[] = {
+static int parser_action_row118[] = {
        7,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       28, 1, 487,
+       28, 1, 493,
        95, 0, 3,
-       109, 1, 487,
-       110, 1, 22
+       115, 1, 493,
+       116, 1, 22
 };
-static int parser_action_row113[] = {
+static int parser_action_row119[] = {
        5,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       110, 1, 22
+       116, 1, 22
 };
-static int parser_action_row114[] = {
+static int parser_action_row120[] = {
        1,
        -1, 1, 5
 };
-static int parser_action_row115[] = {
+static int parser_action_row121[] = {
        5,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       110, 1, 22
+       116, 1, 22
 };
-static int parser_action_row116[] = {
+static int parser_action_row122[] = {
        1,
        -1, 1, 9
 };
-static int parser_action_row117[] = {
+static int parser_action_row123[] = {
        2,
-       -1, 1, 768,
-       52, 0, 277
+       -1, 1, 780,
+       52, 0, 295
 };
-static int parser_action_row118[] = {
+static int parser_action_row124[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row119[] = {
+static int parser_action_row125[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row120[] = {
+static int parser_action_row126[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row121[] = {
+static int parser_action_row127[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row122[] = {
+static int parser_action_row128[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row123[] = {
+static int parser_action_row129[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row124[] = {
+static int parser_action_row130[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row125[] = {
+static int parser_action_row131[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row126[] = {
-       15,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 287,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row127[] = {
+static int parser_action_row133[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row128[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row134[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row129[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row135[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row130[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row136[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row131[] = {
+static int parser_action_row137[] = {
        3,
-       -1, 1, 756,
-       52, 0, 277,
-       58, 0, 215
+       -1, 1, 768,
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row132[] = {
+static int parser_action_row138[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row133[] = {
+static int parser_action_row139[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row134[] = {
+static int parser_action_row140[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row135[] = {
+static int parser_action_row141[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row136[] = {
+static int parser_action_row142[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row137[] = {
+static int parser_action_row143[] = {
+       2,
+       -1, 1, 411,
+       94, 0, 216
+};
+static int parser_action_row144[] = {
+       2,
+       -1, 1, 411,
+       94, 0, 216
+};
+static int parser_action_row145[] = {
+       2,
+       -1, 1, 411,
+       94, 0, 216
+};
+static int parser_action_row146[] = {
+       2,
+       -1, 1, 411,
+       94, 0, 216
+};
+static int parser_action_row147[] = {
+       2,
+       -1, 1, 411,
+       94, 0, 216
+};
+static int parser_action_row148[] = {
+       2,
+       -1, 1, 411,
+       94, 0, 216
+};
+static int parser_action_row149[] = {
        1,
-       -1, 1, 793
+       -1, 1, 811
 };
-static int parser_action_row138[] = {
+static int parser_action_row150[] = {
        1,
        -1, 1, 352
 };
-static int parser_action_row139[] = {
+static int parser_action_row151[] = {
        1,
        -1, 1, 193
 };
-static int parser_action_row140[] = {
+static int parser_action_row152[] = {
        3,
-       -1, 3, 139,
-       41, 0, 300,
-       98, 0, 301
+       -1, 3, 151,
+       41, 0, 324,
+       98, 0, 325
 };
-static int parser_action_row141[] = {
+static int parser_action_row153[] = {
        2,
-       -1, 1, 455,
-       97, 0, 302
+       -1, 1, 461,
+       97, 0, 326
 };
-static int parser_action_row142[] = {
+static int parser_action_row154[] = {
        1,
-       -1, 1, 440
+       -1, 1, 446
 };
-static int parser_action_row143[] = {
+static int parser_action_row155[] = {
        4,
-       -1, 1, 698,
-       29, 0, 303,
-       30, 0, 304,
-       32, 0, 305
+       -1, 1, 710,
+       29, 0, 327,
+       30, 0, 328,
+       32, 0, 329
 };
-static int parser_action_row144[] = {
+static int parser_action_row156[] = {
        1,
-       -1, 1, 700
+       -1, 1, 712
 };
-static int parser_action_row145[] = {
+static int parser_action_row157[] = {
        1,
-       -1, 1, 705
+       -1, 1, 717
 };
-static int parser_action_row146[] = {
+static int parser_action_row158[] = {
        10,
-       -1, 1, 707,
-       39, 0, 306,
-       80, 0, 307,
-       84, 0, 308,
-       85, 0, 309,
-       86, 0, 310,
-       87, 0, 311,
-       89, 0, 312,
-       90, 0, 313,
-       92, 0, 314
+       -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
 };
-static int parser_action_row147[] = {
+static int parser_action_row159[] = {
        2,
-       -1, 1, 716,
-       81, 0, 315
+       -1, 1, 728,
+       81, 0, 339
 };
-static int parser_action_row148[] = {
+static int parser_action_row160[] = {
        2,
-       -1, 1, 718,
-       82, 0, 316
+       -1, 1, 730,
+       82, 0, 340
 };
-static int parser_action_row149[] = {
+static int parser_action_row161[] = {
        3,
-       -1, 1, 720,
-       88, 0, 317,
-       91, 0, 318
+       -1, 1, 732,
+       88, 0, 341,
+       91, 0, 342
 };
-static int parser_action_row150[] = {
+static int parser_action_row162[] = {
        3,
-       -1, 1, 722,
-       74, 0, 319,
-       75, 0, 320
+       -1, 1, 734,
+       74, 0, 343,
+       75, 0, 344
 };
-static int parser_action_row151[] = {
+static int parser_action_row163[] = {
        4,
-       -1, 1, 725,
-       76, 0, 321,
-       78, 0, 322,
-       79, 0, 323
+       -1, 1, 737,
+       76, 0, 345,
+       78, 0, 346,
+       79, 0, 347
 };
-static int parser_action_row152[] = {
+static int parser_action_row164[] = {
        1,
-       -1, 1, 728
+       -1, 1, 740
 };
-static int parser_action_row153[] = {
+static int parser_action_row165[] = {
        2,
-       -1, 1, 732,
-       77, 0, 324
+       -1, 1, 744,
+       77, 0, 348
 };
-static int parser_action_row154[] = {
+static int parser_action_row166[] = {
        1,
-       -1, 1, 734
+       -1, 1, 746
 };
-static int parser_action_row155[] = {
+static int parser_action_row167[] = {
        3,
-       -1, 1, 739,
-       54, 0, 244,
-       73, 0, 325
+       -1, 1, 751,
+       54, 0, 262,
+       73, 0, 349
 };
-static int parser_action_row156[] = {
+static int parser_action_row168[] = {
        1,
-       -1, 1, 744
+       -1, 1, 756
 };
-static int parser_action_row157[] = {
+static int parser_action_row169[] = {
        3,
-       -1, 1, 457,
+       -1, 1, 463,
        96, 0, 53,
-       97, 0, 327
+       97, 0, 351
 };
-static int parser_action_row158[] = {
+static int parser_action_row170[] = {
        2,
        -1, 1, 158,
-       49, 1, 981
+       49, 1, 1005
 };
-static int parser_action_row159[] = {
+static int parser_action_row171[] = {
        1,
        -1, 1, 257
 };
-static int parser_action_row160[] = {
+static int parser_action_row172[] = {
        1,
        -1, 1, 159
 };
-static int parser_action_row161[] = {
-       31,
-       -1, 1, 458,
-       9, 0, 329,
+static int parser_action_row173[] = {
+       37,
+       -1, 1, 464,
+       9, 0, 353,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -3534,133 +3791,151 @@ static int parser_action_row161[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row162[] = {
+static int parser_action_row174[] = {
        2,
-       -1, 3, 161,
-       49, 0, 197
+       -1, 3, 173,
+       49, 0, 209
 };
-static int parser_action_row163[] = {
+static int parser_action_row175[] = {
        3,
        -1, 1, 155,
-       57, 0, 333,
-       94, 0, 204
+       57, 0, 357,
+       94, 0, 216
 };
-static int parser_action_row164[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row176[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row165[] = {
+static int parser_action_row177[] = {
        3,
-       -1, 1, 1051,
-       0, 0, 102,
-       1, 0, 103
+       -1, 1, 1075,
+       0, 0, 108,
+       1, 0, 109
 };
-static int parser_action_row166[] = {
+static int parser_action_row178[] = {
        3,
-       -1, 1, 1053,
+       -1, 1, 1077,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row167[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row179[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row168[] = {
+static int parser_action_row180[] = {
        1,
        -1, 1, 268
 };
-static int parser_action_row169[] = {
+static int parser_action_row181[] = {
        2,
-       -1, 3, 168,
-       49, 0, 197
+       -1, 3, 180,
+       49, 0, 209
 };
-static int parser_action_row170[] = {
+static int parser_action_row182[] = {
        3,
-       -1, 3, 169,
-       52, 0, 340,
-       97, 0, 341
+       -1, 3, 181,
+       52, 0, 364,
+       97, 0, 365
 };
-static int parser_action_row171[] = {
+static int parser_action_row183[] = {
        2,
        -1, 1, 353,
-       52, 0, 277
+       52, 0, 295
 };
-static int parser_action_row172[] = {
+static int parser_action_row184[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row173[] = {
+static int parser_action_row185[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row174[] = {
+static int parser_action_row186[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row175[] = {
+static int parser_action_row187[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row176[] = {
-       17,
-       -1, 1, 458,
-       12, 0, 170,
+static int parser_action_row188[] = {
+       23,
+       -1, 1, 464,
+       12, 0, 182,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
@@ -3669,586 +3944,670 @@ static int parser_action_row176[] = {
        52, 0, 51,
        54, 0, 52,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row177[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row189[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row178[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row190[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row179[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row191[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row180[] = {
+static int parser_action_row192[] = {
        3,
        -1, 1, 341,
-       52, 0, 277,
-       58, 0, 215
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row181[] = {
+static int parser_action_row193[] = {
        1,
        -1, 1, 170
 };
-static int parser_action_row182[] = {
+static int parser_action_row194[] = {
        4,
        -1, 1, 283,
-       29, 0, 354,
-       30, 0, 355,
-       32, 0, 356
+       29, 0, 378,
+       30, 0, 379,
+       32, 0, 380
 };
-static int parser_action_row183[] = {
+static int parser_action_row195[] = {
        1,
        -1, 1, 285
 };
-static int parser_action_row184[] = {
+static int parser_action_row196[] = {
        1,
        -1, 1, 290
 };
-static int parser_action_row185[] = {
+static int parser_action_row197[] = {
        10,
        -1, 1, 292,
-       39, 0, 357,
-       80, 0, 358,
-       84, 0, 359,
-       85, 0, 360,
-       86, 0, 361,
-       87, 0, 362,
-       89, 0, 363,
-       90, 0, 364,
-       92, 0, 365
+       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
 };
-static int parser_action_row186[] = {
+static int parser_action_row198[] = {
        2,
        -1, 1, 301,
-       81, 0, 366
+       81, 0, 390
 };
-static int parser_action_row187[] = {
+static int parser_action_row199[] = {
        2,
        -1, 1, 303,
-       82, 0, 367
+       82, 0, 391
 };
-static int parser_action_row188[] = {
+static int parser_action_row200[] = {
        3,
        -1, 1, 305,
-       88, 0, 368,
-       91, 0, 369
+       88, 0, 392,
+       91, 0, 393
 };
-static int parser_action_row189[] = {
+static int parser_action_row201[] = {
        3,
        -1, 1, 307,
-       74, 0, 370,
-       75, 0, 371
+       74, 0, 394,
+       75, 0, 395
 };
-static int parser_action_row190[] = {
+static int parser_action_row202[] = {
        4,
        -1, 1, 310,
-       76, 0, 372,
-       78, 0, 373,
-       79, 0, 374
+       76, 0, 396,
+       78, 0, 397,
+       79, 0, 398
 };
-static int parser_action_row191[] = {
+static int parser_action_row203[] = {
        1,
        -1, 1, 313
 };
-static int parser_action_row192[] = {
+static int parser_action_row204[] = {
        2,
        -1, 1, 317,
-       77, 0, 375
+       77, 0, 399
 };
-static int parser_action_row193[] = {
+static int parser_action_row205[] = {
        1,
        -1, 1, 319
 };
-static int parser_action_row194[] = {
+static int parser_action_row206[] = {
        3,
        -1, 1, 324,
-       54, 0, 244,
-       73, 0, 376
+       54, 0, 262,
+       73, 0, 400
 };
-static int parser_action_row195[] = {
+static int parser_action_row207[] = {
        3,
-       -1, 3, 194,
-       41, 0, 378,
-       98, 0, 379
+       -1, 3, 206,
+       41, 0, 402,
+       98, 0, 403
 };
-static int parser_action_row196[] = {
+static int parser_action_row208[] = {
        2,
-       -1, 1, 455,
-       97, 0, 380
+       -1, 1, 461,
+       97, 0, 404
 };
-static int parser_action_row197[] = {
+static int parser_action_row209[] = {
        3,
-       -1, 1, 457,
+       -1, 1, 463,
        96, 0, 53,
-       97, 0, 381
+       97, 0, 405
 };
-static int parser_action_row198[] = {
+static int parser_action_row210[] = {
        2,
        -1, 1, 201,
-       97, 0, 383
+       97, 0, 407
 };
-static int parser_action_row199[] = {
+static int parser_action_row211[] = {
        1,
        -1, 1, 175
 };
-static int parser_action_row200[] = {
+static int parser_action_row212[] = {
        1,
        -1, 1, 172
 };
-static int parser_action_row201[] = {
+static int parser_action_row213[] = {
        4,
        -1, 1, 341,
-       52, 0, 277,
-       57, 0, 384,
-       58, 0, 215
+       52, 0, 295,
+       57, 0, 408,
+       58, 0, 227
 };
-static int parser_action_row202[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row214[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row203[] = {
+static int parser_action_row215[] = {
        2,
        -1, 1, 280,
-       24, 0, 386
+       24, 0, 410
 };
-static int parser_action_row204[] = {
+static int parser_action_row216[] = {
        3,
-       -1, 3, 203,
-       47, 0, 387,
-       96, 0, 388
+       -1, 3, 215,
+       47, 0, 411,
+       96, 0, 412
 };
-static int parser_action_row205[] = {
+static int parser_action_row217[] = {
        3,
        -1, 1, 30,
        13, 0, 32,
-       52, 0, 390
+       52, 0, 414
 };
-static int parser_action_row206[] = {
+static int parser_action_row218[] = {
        1,
-       -1, 1, 404
+       -1, 1, 410
 };
-static int parser_action_row207[] = {
+static int parser_action_row219[] = {
        1,
        -1, 1, 369
 };
-static int parser_action_row208[] = {
+static int parser_action_row220[] = {
        1,
        -1, 1, 370
 };
-static int parser_action_row209[] = {
+static int parser_action_row221[] = {
        1,
        -1, 1, 371
 };
-static int parser_action_row210[] = {
+static int parser_action_row222[] = {
        1,
        -1, 1, 372
 };
-static int parser_action_row211[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row223[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 393,
+       97, 0, 417,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row212[] = {
+static int parser_action_row224[] = {
        3,
-       -1, 3, 211,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 223,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row213[] = {
-       54,
-       -1, 1, 458,
-       12, 0, 170,
+static int parser_action_row225[] = {
+       60,
+       -1, 1, 464,
+       12, 0, 182,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 171,
+       22, 0, 183,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 172,
-       33, 0, 399,
-       34, 0, 400,
-       35, 0, 401,
-       36, 0, 402,
+       31, 0, 184,
+       33, 0, 423,
+       34, 0, 424,
+       35, 0, 425,
+       36, 0, 426,
        37, 0, 43,
-       38, 0, 173,
-       40, 0, 174,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 396,
-       48, 0, 175,
+       47, 0, 420,
+       48, 0, 187,
        50, 0, 49,
-       51, 0, 403,
+       51, 0, 427,
        52, 0, 51,
-       54, 0, 404,
-       74, 0, 405,
-       75, 0, 406,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 414,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       94, 0, 204,
-       96, 0, 424,
-       97, 0, 425,
+       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,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row214[] = {
-       25,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 446,
-       27, 0, 447,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row215[] = {
+static int parser_action_row227[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row216[] = {
+static int parser_action_row228[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row217[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row229[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row218[] = {
+static int parser_action_row230[] = {
        1,
        -1, 1, 245
 };
-static int parser_action_row219[] = {
+static int parser_action_row231[] = {
        1,
        -1, 1, 246
 };
-static int parser_action_row220[] = {
+static int parser_action_row232[] = {
        1,
        -1, 1, 247
 };
-static int parser_action_row221[] = {
+static int parser_action_row233[] = {
        1,
        -1, 1, 248
 };
-static int parser_action_row222[] = {
+static int parser_action_row234[] = {
        1,
        -1, 1, 249
 };
-static int parser_action_row223[] = {
+static int parser_action_row235[] = {
        1,
        -1, 1, 250
 };
-static int parser_action_row224[] = {
+static int parser_action_row236[] = {
        1,
        -1, 1, 251
 };
-static int parser_action_row225[] = {
+static int parser_action_row237[] = {
        1,
        -1, 1, 252
 };
-static int parser_action_row226[] = {
+static int parser_action_row238[] = {
        1,
        -1, 1, 253
 };
-static int parser_action_row227[] = {
+static int parser_action_row239[] = {
        1,
        -1, 1, 254
 };
-static int parser_action_row228[] = {
+static int parser_action_row240[] = {
        1,
        -1, 1, 255
 };
-static int parser_action_row229[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row241[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row230[] = {
+static int parser_action_row242[] = {
        13,
        -1, 1, 340,
-       59, 0, 455,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row231[] = {
+static int parser_action_row243[] = {
        1,
        -1, 1, 187
 };
-static int parser_action_row232[] = {
+static int parser_action_row244[] = {
        1,
        -1, 1, 373
 };
-static int parser_action_row233[] = {
+static int parser_action_row245[] = {
        1,
        -1, 1, 374
 };
-static int parser_action_row234[] = {
+static int parser_action_row246[] = {
        1,
        -1, 1, 375
 };
-static int parser_action_row235[] = {
+static int parser_action_row247[] = {
+       1,
+       -1, 1, 376
+};
+static int parser_action_row248[] = {
        1,
        -1, 1, 377
 };
-static int parser_action_row236[] = {
+static int parser_action_row249[] = {
        1,
-       -1, 1, 376
+       -1, 1, 378
 };
-static int parser_action_row237[] = {
+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[] = {
+       1,
+       -1, 1, 382
+};
+static int parser_action_row255[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row238[] = {
+static int parser_action_row256[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row239[] = {
+static int parser_action_row257[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row240[] = {
+static int parser_action_row258[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row241[] = {
+static int parser_action_row259[] = {
        9,
-       -1, 3, 240,
-       3, 0, 461,
-       4, 0, 462,
-       5, 0, 463,
-       6, 0, 464,
-       7, 0, 465,
-       8, 0, 466,
-       10, 0, 467,
-       17, 0, 468
+       -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
 };
-static int parser_action_row242[] = {
+static int parser_action_row260[] = {
        1,
-       -1, 1, 1072
+       -1, 1, 1096
 };
-static int parser_action_row243[] = {
-       32,
+static int parser_action_row261[] = {
+       38,
        -1, 1, 162,
        12, 0, 31,
        15, 0, 33,
@@ -4263,7 +4622,7 @@ static int parser_action_row243[] = {
        36, 0, 42,
        37, 0, 43,
        38, 0, 44,
-       41, 1, 458,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
@@ -4274,1124 +4633,1232 @@ static int parser_action_row243[] = {
        54, 0, 52,
        96, 0, 53,
        97, 0, 54,
-       98, 1, 458,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row244[] = {
+static int parser_action_row262[] = {
        4,
        -1, 1, 161,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row245[] = {
+static int parser_action_row263[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row246[] = {
+static int parser_action_row264[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row247[] = {
+static int parser_action_row265[] = {
        13,
        -1, 1, 354,
-       59, 0, 475,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row248[] = {
+static int parser_action_row266[] = {
        1,
-       -1, 1, 400
+       -1, 1, 406
 };
-static int parser_action_row249[] = {
+static int parser_action_row267[] = {
        1,
-       -1, 1, 401
+       -1, 1, 407
 };
-static int parser_action_row250[] = {
+static int parser_action_row268[] = {
        1,
-       -1, 1, 1078
+       -1, 1, 1102
 };
-static int parser_action_row251[] = {
+static int parser_action_row269[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row252[] = {
+static int parser_action_row270[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row253[] = {
+static int parser_action_row271[] = {
        3,
-       -1, 3, 252,
-       104, 0, 247,
-       105, 0, 248
+       -1, 3, 270,
+       110, 0, 265,
+       111, 0, 266
 };
-static int parser_action_row254[] = {
-       26,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row272[] = {
+       32,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       104, 1, 396,
-       105, 1, 396,
-       106, 0, 60
+       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
 };
-static int parser_action_row255[] = {
-       27,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 349,
        73, 1, 349,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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[] = {
+static int parser_action_row274[] = {
        13,
        -1, 1, 331,
-       59, 0, 484,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row257[] = {
-       25,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 486,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row258[] = {
-       39,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 343,
-       59, 0, 488,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 343,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row259[] = {
-       25,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 486,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row260[] = {
-       40,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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, 215,
-       59, 0, 493,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 347,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row261[] = {
+static int parser_action_row279[] = {
        1,
-       -1, 1, 1087
+       -1, 1, 1111
 };
-static int parser_action_row262[] = {
+static int parser_action_row280[] = {
        3,
-       -1, 1, 456,
-       12, 0, 497,
-       97, 0, 498
+       -1, 1, 462,
+       12, 0, 521,
+       97, 0, 522
 };
-static int parser_action_row263[] = {
+static int parser_action_row281[] = {
        2,
-       -1, 3, 262,
-       102, 0, 499
+       -1, 3, 280,
+       108, 0, 523
 };
-static int parser_action_row264[] = {
+static int parser_action_row282[] = {
        1,
        -1, 1, 142
 };
-static int parser_action_row265[] = {
+static int parser_action_row283[] = {
        1,
        -1, 1, 6
 };
-static int parser_action_row266[] = {
+static int parser_action_row284[] = {
        5,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       110, 1, 22
+       116, 1, 22
 };
-static int parser_action_row267[] = {
+static int parser_action_row285[] = {
        1,
        -1, 1, 10
 };
-static int parser_action_row268[] = {
+static int parser_action_row286[] = {
        5,
        -1, 1, 81,
-       18, 0, 236,
-       19, 0, 237,
-       20, 0, 238,
-       21, 0, 239
+       18, 0, 254,
+       19, 0, 255,
+       20, 0, 256,
+       21, 0, 257
 };
-static int parser_action_row269[] = {
+static int parser_action_row287[] = {
        1,
        -1, 1, 12
 };
-static int parser_action_row270[] = {
+static int parser_action_row288[] = {
        1,
-       -1, 1, 483
+       -1, 1, 489
 };
-static int parser_action_row271[] = {
+static int parser_action_row289[] = {
        1,
-       -1, 1, 482
+       -1, 1, 488
 };
-static int parser_action_row272[] = {
+static int parser_action_row290[] = {
        4,
-       -1, 1, 480,
+       -1, 1, 486,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row273[] = {
+static int parser_action_row291[] = {
        8,
-       -1, 3, 272,
-       4, 0, 462,
-       5, 0, 463,
-       6, 0, 464,
-       7, 0, 465,
-       8, 0, 466,
-       10, 0, 467,
-       17, 0, 468
+       -1, 3, 290,
+       4, 0, 486,
+       5, 0, 487,
+       6, 0, 488,
+       7, 0, 489,
+       8, 0, 490,
+       10, 0, 491,
+       17, 0, 492
 };
-static int parser_action_row274[] = {
+static int parser_action_row292[] = {
        1,
        -1, 1, 7
 };
-static int parser_action_row275[] = {
+static int parser_action_row293[] = {
        5,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3,
-       110, 1, 22
+       116, 1, 22
 };
-static int parser_action_row276[] = {
+static int parser_action_row294[] = {
        1,
        -1, 1, 11
 };
-static int parser_action_row277[] = {
+static int parser_action_row295[] = {
        1,
        -1, 1, 13
 };
-static int parser_action_row278[] = {
+static int parser_action_row296[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row279[] = {
+static int parser_action_row297[] = {
        1,
-       -1, 1, 767
+       -1, 1, 779
 };
-static int parser_action_row280[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row298[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row281[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 116,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row282[] = {
+static int parser_action_row300[] = {
        3,
-       -1, 3, 281,
-       47, 0, 387,
-       96, 0, 388
+       -1, 3, 299,
+       47, 0, 411,
+       96, 0, 412
 };
-static int parser_action_row283[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row301[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row284[] = {
+static int parser_action_row302[] = {
        1,
-       -1, 1, 784
+       -1, 1, 796
 };
-static int parser_action_row285[] = {
+static int parser_action_row303[] = {
        1,
-       -1, 1, 785
+       -1, 1, 797
 };
-static int parser_action_row286[] = {
+static int parser_action_row304[] = {
        1,
-       -1, 1, 786
+       -1, 1, 798
 };
-static int parser_action_row287[] = {
+static int parser_action_row305[] = {
        1,
-       -1, 1, 787
+       -1, 1, 799
 };
-static int parser_action_row288[] = {
+static int parser_action_row306[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row289[] = {
+static int parser_action_row307[] = {
        3,
-       -1, 3, 288,
-       41, 0, 300,
-       98, 0, 510
+       -1, 3, 306,
+       41, 0, 324,
+       98, 0, 534
 };
-static int parser_action_row290[] = {
+static int parser_action_row308[] = {
        3,
-       -1, 3, 289,
-       54, 0, 244,
-       73, 0, 511
+       -1, 3, 307,
+       54, 0, 262,
+       73, 0, 535
 };
-static int parser_action_row291[] = {
-       25,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row309[] = {
+       31,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
-       53, 0, 512,
+       53, 0, 536,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 513,
+       97, 0, 537,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row292[] = {
+static int parser_action_row310[] = {
        1,
-       -1, 1, 736
+       -1, 1, 748
 };
-static int parser_action_row293[] = {
+static int parser_action_row311[] = {
        1,
-       -1, 1, 735
+       -1, 1, 747
 };
-static int parser_action_row294[] = {
+static int parser_action_row312[] = {
        1,
-       -1, 1, 737
+       -1, 1, 749
 };
-static int parser_action_row295[] = {
+static int parser_action_row313[] = {
        1,
-       -1, 1, 755
+       -1, 1, 767
 };
-static int parser_action_row296[] = {
+static int parser_action_row314[] = {
        1,
-       -1, 1, 788
+       -1, 1, 800
 };
-static int parser_action_row297[] = {
+static int parser_action_row315[] = {
        1,
-       -1, 1, 789
+       -1, 1, 801
 };
-static int parser_action_row298[] = {
+static int parser_action_row316[] = {
        1,
-       -1, 1, 790
+       -1, 1, 802
 };
-static int parser_action_row299[] = {
+static int parser_action_row317[] = {
        1,
-       -1, 1, 792
+       -1, 1, 803
 };
-static int parser_action_row300[] = {
+static int parser_action_row318[] = {
        1,
-       -1, 1, 791
+       -1, 1, 804
 };
-static int parser_action_row301[] = {
+static int parser_action_row319[] = {
+       1,
+       -1, 1, 805
+};
+static int parser_action_row320[] = {
+       1,
+       -1, 1, 806
+};
+static int parser_action_row321[] = {
+       1,
+       -1, 1, 807
+};
+static int parser_action_row322[] = {
+       1,
+       -1, 1, 808
+};
+static int parser_action_row323[] = {
+       1,
+       -1, 1, 810
+};
+static int parser_action_row324[] = {
+       1,
+       -1, 1, 809
+};
+static int parser_action_row325[] = {
        2,
-       -1, 1, 764,
-       52, 0, 277
+       -1, 1, 776,
+       52, 0, 295
 };
-static int parser_action_row302[] = {
+static int parser_action_row326[] = {
        1,
-       -1, 1, 746
+       -1, 1, 758
 };
-static int parser_action_row303[] = {
+static int parser_action_row327[] = {
        2,
-       -1, 1, 758,
-       52, 0, 277
+       -1, 1, 770,
+       52, 0, 295
 };
-static int parser_action_row304[] = {
+static int parser_action_row328[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row305[] = {
+static int parser_action_row329[] = {
        4,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       24, 0, 520
+       24, 0, 544
 };
-static int parser_action_row306[] = {
+static int parser_action_row330[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row307[] = {
+static int parser_action_row331[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row308[] = {
+static int parser_action_row332[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row309[] = {
+static int parser_action_row333[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row310[] = {
+static int parser_action_row334[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row311[] = {
+static int parser_action_row335[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row312[] = {
+static int parser_action_row336[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row313[] = {
+static int parser_action_row337[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row314[] = {
+static int parser_action_row338[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row315[] = {
+static int parser_action_row339[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row316[] = {
+static int parser_action_row340[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row317[] = {
+static int parser_action_row341[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row318[] = {
+static int parser_action_row342[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row319[] = {
+static int parser_action_row343[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row320[] = {
+static int parser_action_row344[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row321[] = {
+static int parser_action_row345[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row322[] = {
+static int parser_action_row346[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row323[] = {
+static int parser_action_row347[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row324[] = {
+static int parser_action_row348[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row325[] = {
+static int parser_action_row349[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row326[] = {
+static int parser_action_row350[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row327[] = {
+static int parser_action_row351[] = {
        1,
-       -1, 1, 769
+       -1, 1, 781
 };
-static int parser_action_row328[] = {
+static int parser_action_row352[] = {
        3,
-       -1, 1, 762,
-       52, 0, 277,
-       58, 0, 215
+       -1, 1, 774,
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row329[] = {
+static int parser_action_row353[] = {
        2,
-       -1, 1, 456,
-       97, 0, 544
+       -1, 1, 462,
+       97, 0, 568
 };
-static int parser_action_row330[] = {
+static int parser_action_row354[] = {
        2,
        -1, 1, 157,
-       49, 1, 980
+       49, 1, 1004
 };
-static int parser_action_row331[] = {
+static int parser_action_row355[] = {
        2,
        -1, 1, 156,
-       49, 1, 979
+       49, 1, 1003
 };
-static int parser_action_row332[] = {
+static int parser_action_row356[] = {
        4,
-       -1, 3, 331,
+       -1, 3, 355,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row333[] = {
+static int parser_action_row357[] = {
        1,
        -1, 1, 256
 };
-static int parser_action_row334[] = {
+static int parser_action_row358[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row335[] = {
+static int parser_action_row359[] = {
        2,
        -1, 1, 203,
-       59, 0, 548
+       59, 0, 572
 };
-static int parser_action_row336[] = {
+static int parser_action_row360[] = {
        2,
        -1, 1, 155,
-       57, 0, 333
+       57, 0, 357
 };
-static int parser_action_row337[] = {
+static int parser_action_row361[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row338[] = {
+static int parser_action_row362[] = {
        3,
-       -1, 1, 1052,
-       0, 0, 102,
-       1, 0, 103
+       -1, 1, 1076,
+       0, 0, 108,
+       1, 0, 109
 };
-static int parser_action_row339[] = {
+static int parser_action_row363[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row340[] = {
+static int parser_action_row364[] = {
        1,
        -1, 1, 267
 };
-static int parser_action_row341[] = {
+static int parser_action_row365[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row342[] = {
+static int parser_action_row366[] = {
        1,
-       -1, 1, 449
+       -1, 1, 455
 };
-static int parser_action_row343[] = {
+static int parser_action_row367[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row344[] = {
+static int parser_action_row368[] = {
        2,
-       -1, 1, 448,
-       56, 0, 554
+       -1, 1, 454,
+       56, 0, 578
 };
-static int parser_action_row345[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row369[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row346[] = {
-       23,
-       -1, 1, 458,
-       12, 0, 170,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row370[] = {
+       29,
+       -1, 1, 464,
+       12, 0, 182,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row347[] = {
+static int parser_action_row371[] = {
        3,
-       -1, 3, 346,
-       47, 0, 387,
-       96, 0, 388
+       -1, 3, 370,
+       47, 0, 411,
+       96, 0, 412
 };
-static int parser_action_row348[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row372[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row349[] = {
+static int parser_action_row373[] = {
        3,
-       -1, 3, 348,
-       54, 0, 244,
-       73, 0, 559
+       -1, 3, 372,
+       54, 0, 262,
+       73, 0, 583
 };
-static int parser_action_row350[] = {
+static int parser_action_row374[] = {
        3,
-       -1, 3, 349,
-       41, 0, 378,
-       98, 0, 560
+       -1, 3, 373,
+       41, 0, 402,
+       98, 0, 584
 };
-static int parser_action_row351[] = {
+static int parser_action_row375[] = {
        1,
        -1, 1, 321
 };
-static int parser_action_row352[] = {
+static int parser_action_row376[] = {
        1,
        -1, 1, 320
 };
-static int parser_action_row353[] = {
+static int parser_action_row377[] = {
        1,
        -1, 1, 322
 };
-static int parser_action_row354[] = {
+static int parser_action_row378[] = {
        1,
        -1, 1, 340
 };
-static int parser_action_row355[] = {
+static int parser_action_row379[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row356[] = {
+static int parser_action_row380[] = {
        4,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       24, 0, 562
+       24, 0, 586
 };
-static int parser_action_row357[] = {
+static int parser_action_row381[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row358[] = {
+static int parser_action_row382[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row359[] = {
+static int parser_action_row383[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row360[] = {
+static int parser_action_row384[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row361[] = {
+static int parser_action_row385[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row362[] = {
+static int parser_action_row386[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row363[] = {
+static int parser_action_row387[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row364[] = {
+static int parser_action_row388[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row365[] = {
+static int parser_action_row389[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row366[] = {
+static int parser_action_row390[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row367[] = {
+static int parser_action_row391[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row368[] = {
+static int parser_action_row392[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row369[] = {
+static int parser_action_row393[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row370[] = {
+static int parser_action_row394[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row371[] = {
+static int parser_action_row395[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row372[] = {
+static int parser_action_row396[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row373[] = {
+static int parser_action_row397[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row374[] = {
+static int parser_action_row398[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row375[] = {
+static int parser_action_row399[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row376[] = {
+static int parser_action_row400[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row377[] = {
+static int parser_action_row401[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row378[] = {
+static int parser_action_row402[] = {
        1,
        -1, 1, 354
 };
-static int parser_action_row379[] = {
+static int parser_action_row403[] = {
        2,
        -1, 1, 349,
-       52, 0, 277
+       52, 0, 295
 };
-static int parser_action_row380[] = {
+static int parser_action_row404[] = {
        1,
        -1, 1, 331
 };
-static int parser_action_row381[] = {
+static int parser_action_row405[] = {
        2,
        -1, 1, 343,
-       52, 0, 277
+       52, 0, 295
 };
-static int parser_action_row382[] = {
+static int parser_action_row406[] = {
        3,
        -1, 1, 347,
-       52, 0, 277,
-       58, 0, 215
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row383[] = {
+static int parser_action_row407[] = {
        2,
-       -1, 1, 456,
-       97, 0, 587
+       -1, 1, 462,
+       97, 0, 611
 };
-static int parser_action_row384[] = {
+static int parser_action_row408[] = {
        1,
        -1, 1, 202
 };
-static int parser_action_row385[] = {
+static int parser_action_row409[] = {
        1,
        -1, 1, 282
 };
-static int parser_action_row386[] = {
+static int parser_action_row410[] = {
        2,
        -1, 1, 281,
-       24, 0, 588
+       24, 0, 612
 };
-static int parser_action_row387[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row411[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -5421,624 +5888,666 @@ static int parser_action_row387[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row388[] = {
+static int parser_action_row412[] = {
        2,
-       -1, 3, 387,
-       96, 0, 592
+       -1, 3, 411,
+       96, 0, 616
 };
-static int parser_action_row389[] = {
+static int parser_action_row413[] = {
        3,
-       -1, 1, 797,
-       54, 0, 593,
-       94, 0, 594
+       -1, 1, 815,
+       54, 0, 617,
+       94, 0, 618
 };
-static int parser_action_row390[] = {
+static int parser_action_row414[] = {
        2,
-       -1, 3, 389,
-       73, 0, 597
+       -1, 3, 413,
+       73, 0, 621
 };
-static int parser_action_row391[] = {
+static int parser_action_row415[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row392[] = {
+static int parser_action_row416[] = {
        5,
        -1, 1, 81,
-       18, 0, 236,
-       19, 0, 237,
-       20, 0, 238,
-       21, 0, 239
+       18, 0, 254,
+       19, 0, 255,
+       20, 0, 256,
+       21, 0, 257
 };
-static int parser_action_row393[] = {
+static int parser_action_row417[] = {
        1,
-       -1, 1, 402
+       -1, 1, 408
 };
-static int parser_action_row394[] = {
+static int parser_action_row418[] = {
        6,
        -1, 1, 341,
-       52, 0, 277,
-       57, 0, 333,
-       58, 0, 215,
+       52, 0, 295,
+       57, 0, 357,
+       58, 0, 227,
        59, 1, 155,
-       94, 0, 204
+       94, 0, 216
 };
-static int parser_action_row395[] = {
+static int parser_action_row419[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row396[] = {
+static int parser_action_row420[] = {
        1,
        -1, 1, 277
 };
-static int parser_action_row397[] = {
+static int parser_action_row421[] = {
        2,
-       -1, 3, 396,
-       96, 0, 603
+       -1, 3, 420,
+       96, 0, 627
 };
-static int parser_action_row398[] = {
+static int parser_action_row422[] = {
        3,
-       -1, 1, 405,
-       54, 0, 604,
-       94, 0, 204
+       -1, 1, 411,
+       54, 0, 628,
+       94, 0, 216
 };
-static int parser_action_row399[] = {
+static int parser_action_row423[] = {
        2,
-       -1, 3, 398,
-       57, 0, 606
+       -1, 3, 422,
+       57, 0, 630
 };
-static int parser_action_row400[] = {
-       26,
-       -1, 1, 987,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row401[] = {
+static int parser_action_row425[] = {
        2,
-       -1, 1, 992,
-       49, 0, 197
+       -1, 1, 1016,
+       49, 0, 209
 };
-static int parser_action_row402[] = {
+static int parser_action_row426[] = {
        2,
-       -1, 1, 989,
-       49, 0, 197
+       -1, 1, 1013,
+       49, 0, 209
 };
-static int parser_action_row403[] = {
+static int parser_action_row427[] = {
        1,
-       -1, 1, 991
+       -1, 1, 1015
 };
-static int parser_action_row404[] = {
+static int parser_action_row428[] = {
        2,
-       -1, 3, 403,
-       11, 0, 610
+       -1, 3, 427,
+       11, 0, 634
 };
-static int parser_action_row405[] = {
+static int parser_action_row429[] = {
        4,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       55, 0, 611
+       55, 0, 635
 };
-static int parser_action_row406[] = {
-       24,
-       -1, 1, 498,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+static int parser_action_row430[] = {
+       30,
+       -1, 1, 504,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row407[] = {
-       24,
-       -1, 1, 499,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+static int parser_action_row431[] = {
+       30,
+       -1, 1, 505,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row408[] = {
+static int parser_action_row432[] = {
        1,
-       -1, 1, 500
+       -1, 1, 506
 };
-static int parser_action_row409[] = {
+static int parser_action_row433[] = {
        1,
-       -1, 1, 501
+       -1, 1, 507
 };
-static int parser_action_row410[] = {
+static int parser_action_row434[] = {
        1,
-       -1, 1, 502
+       -1, 1, 508
 };
-static int parser_action_row411[] = {
+static int parser_action_row435[] = {
        1,
-       -1, 1, 503
+       -1, 1, 509
 };
-static int parser_action_row412[] = {
+static int parser_action_row436[] = {
        1,
-       -1, 1, 504
+       -1, 1, 510
 };
-static int parser_action_row413[] = {
+static int parser_action_row437[] = {
        1,
-       -1, 1, 505
+       -1, 1, 511
 };
-static int parser_action_row414[] = {
+static int parser_action_row438[] = {
        1,
-       -1, 1, 506
+       -1, 1, 512
 };
-static int parser_action_row415[] = {
-       24,
-       -1, 1, 507,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+static int parser_action_row439[] = {
+       30,
+       -1, 1, 513,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row416[] = {
+static int parser_action_row440[] = {
        1,
-       -1, 1, 508
+       -1, 1, 514
 };
-static int parser_action_row417[] = {
+static int parser_action_row441[] = {
        1,
-       -1, 1, 509
+       -1, 1, 515
 };
-static int parser_action_row418[] = {
+static int parser_action_row442[] = {
        1,
-       -1, 1, 512
+       -1, 1, 518
 };
-static int parser_action_row419[] = {
+static int parser_action_row443[] = {
        1,
-       -1, 1, 510
+       -1, 1, 516
 };
-static int parser_action_row420[] = {
+static int parser_action_row444[] = {
        1,
-       -1, 1, 514
+       -1, 1, 520
 };
-static int parser_action_row421[] = {
+static int parser_action_row445[] = {
        1,
-       -1, 1, 513
+       -1, 1, 519
 };
-static int parser_action_row422[] = {
+static int parser_action_row446[] = {
        1,
-       -1, 1, 511
+       -1, 1, 517
 };
-static int parser_action_row423[] = {
+static int parser_action_row447[] = {
        1,
-       -1, 1, 515
+       -1, 1, 521
 };
-static int parser_action_row424[] = {
+static int parser_action_row448[] = {
        1,
-       -1, 1, 517
+       -1, 1, 523
 };
-static int parser_action_row425[] = {
+static int parser_action_row449[] = {
        4,
-       -1, 1, 405,
-       54, 0, 604,
-       58, 0, 214,
-       94, 0, 204
+       -1, 1, 411,
+       54, 0, 628,
+       58, 0, 226,
+       94, 0, 216
 };
-static int parser_action_row426[] = {
+static int parser_action_row450[] = {
        15,
        -1, 1, 341,
-       52, 0, 277,
-       58, 0, 215,
-       59, 0, 612,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row427[] = {
+static int parser_action_row451[] = {
        1,
-       -1, 1, 428
+       -1, 1, 434
 };
-static int parser_action_row428[] = {
+static int parser_action_row452[] = {
        1,
-       -1, 1, 985
+       -1, 1, 1009
 };
-static int parser_action_row429[] = {
+static int parser_action_row453[] = {
        1,
-       -1, 1, 986
+       -1, 1, 1010
 };
-static int parser_action_row430[] = {
+static int parser_action_row454[] = {
        1,
-       -1, 1, 994
+       -1, 1, 1018
 };
-static int parser_action_row431[] = {
+static int parser_action_row455[] = {
        1,
-       -1, 1, 996
+       -1, 1, 1020
 };
-static int parser_action_row432[] = {
+static int parser_action_row456[] = {
        1,
-       -1, 1, 995
+       -1, 1, 1019
 };
-static int parser_action_row433[] = {
+static int parser_action_row457[] = {
        1,
-       -1, 1, 997
+       -1, 1, 1021
 };
-static int parser_action_row434[] = {
+static int parser_action_row458[] = {
        1,
-       -1, 1, 998
+       -1, 1, 1022
 };
-static int parser_action_row435[] = {
+static int parser_action_row459[] = {
        1,
-       -1, 1, 999
+       -1, 1, 1023
 };
-static int parser_action_row436[] = {
+static int parser_action_row460[] = {
        1,
-       -1, 1, 429
+       -1, 1, 435
 };
-static int parser_action_row437[] = {
+static int parser_action_row461[] = {
        3,
        -1, 1, 324,
-       54, 0, 244,
-       73, 0, 613
+       54, 0, 262,
+       73, 0, 637
 };
-static int parser_action_row438[] = {
+static int parser_action_row462[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row439[] = {
+static int parser_action_row463[] = {
        1,
-       -1, 1, 433
+       -1, 1, 439
 };
-static int parser_action_row440[] = {
+static int parser_action_row464[] = {
        4,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       56, 0, 615
+       56, 0, 639
 };
-static int parser_action_row441[] = {
+static int parser_action_row465[] = {
        3,
-       -1, 3, 440,
-       41, 0, 378,
-       98, 0, 255
+       -1, 3, 464,
+       41, 0, 402,
+       98, 0, 273
 };
-static int parser_action_row442[] = {
+static int parser_action_row466[] = {
        22,
-       -1, 1, 455,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       97, 0, 623
+       -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
 };
-static int parser_action_row443[] = {
+static int parser_action_row467[] = {
        1,
-       -1, 1, 520
+       -1, 1, 526
 };
-static int parser_action_row444[] = {
+static int parser_action_row468[] = {
        1,
-       -1, 1, 432
+       -1, 1, 438
 };
-static int parser_action_row445[] = {
+static int parser_action_row469[] = {
        1,
-       -1, 1, 430
+       -1, 1, 436
 };
-static int parser_action_row446[] = {
+static int parser_action_row470[] = {
        23,
-       -1, 1, 457,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       96, 0, 53,
-       97, 0, 625
+       -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
 };
-static int parser_action_row447[] = {
+static int parser_action_row471[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row448[] = {
+static int parser_action_row472[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row449[] = {
+static int parser_action_row473[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row450[] = {
+static int parser_action_row474[] = {
        2,
        -1, 1, 155,
-       57, 0, 333
+       57, 0, 357
 };
-static int parser_action_row451[] = {
+static int parser_action_row475[] = {
        2,
-       -1, 1, 387,
-       56, 0, 632
+       -1, 1, 393,
+       56, 0, 656
 };
-static int parser_action_row452[] = {
+static int parser_action_row476[] = {
        1,
-       -1, 1, 468
+       -1, 1, 474
 };
-static int parser_action_row453[] = {
+static int parser_action_row477[] = {
        1,
-       -1, 1, 467
+       -1, 1, 473
 };
-static int parser_action_row454[] = {
+static int parser_action_row478[] = {
        1,
        -1, 1, 218
 };
-static int parser_action_row455[] = {
+static int parser_action_row479[] = {
        1,
        -1, 1, 237
 };
-static int parser_action_row456[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row480[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row457[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row481[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row458[] = {
+static int parser_action_row482[] = {
        1,
        -1, 1, 82
 };
-static int parser_action_row459[] = {
+static int parser_action_row483[] = {
        1,
        -1, 1, 84
 };
-static int parser_action_row460[] = {
+static int parser_action_row484[] = {
        1,
        -1, 1, 83
 };
-static int parser_action_row461[] = {
+static int parser_action_row485[] = {
        1,
        -1, 1, 85
 };
-static int parser_action_row462[] = {
+static int parser_action_row486[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row463[] = {
+static int parser_action_row487[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row464[] = {
+static int parser_action_row488[] = {
        1,
        -1, 1, 32
 };
-static int parser_action_row465[] = {
+static int parser_action_row489[] = {
        2,
-       -1, 3, 464,
-       5, 0, 639
+       -1, 3, 488,
+       5, 0, 663
 };
-static int parser_action_row466[] = {
+static int parser_action_row490[] = {
        1,
        -1, 1, 34
 };
-static int parser_action_row467[] = {
+static int parser_action_row491[] = {
        1,
        -1, 1, 35
 };
-static int parser_action_row468[] = {
+static int parser_action_row492[] = {
        23,
-       -1, 3, 467,
-       54, 0, 640,
-       74, 0, 641,
-       75, 0, 642,
-       76, 0, 643,
-       77, 0, 644,
-       78, 0, 645,
-       79, 0, 646,
-       80, 0, 647,
-       81, 0, 648,
-       82, 0, 649,
-       83, 0, 650,
-       84, 0, 651,
-       85, 0, 652,
-       86, 0, 653,
-       87, 0, 654,
-       88, 0, 655,
-       89, 0, 656,
-       90, 0, 657,
-       91, 0, 658,
-       92, 0, 659,
-       96, 0, 53,
-       97, 0, 660
+       -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
 };
-static int parser_action_row469[] = {
+static int parser_action_row493[] = {
        2,
-       -1, 3, 468,
-       5, 0, 665
+       -1, 3, 492,
+       5, 0, 689
 };
-static int parser_action_row470[] = {
+static int parser_action_row494[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row471[] = {
+static int parser_action_row495[] = {
        1,
        -1, 1, 166
 };
-static int parser_action_row472[] = {
+static int parser_action_row496[] = {
        1,
-       -1, 1, 1073
+       -1, 1, 1097
 };
-static int parser_action_row473[] = {
-       32,
+static int parser_action_row497[] = {
+       38,
        -1, 1, 163,
        12, 0, 31,
        15, 0, 33,
@@ -6053,7 +6562,7 @@ static int parser_action_row473[] = {
        36, 0, 42,
        37, 0, 43,
        38, 0, 44,
-       41, 1, 458,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
@@ -6064,1101 +6573,1311 @@ static int parser_action_row473[] = {
        54, 0, 52,
        96, 0, 53,
        97, 0, 54,
-       98, 1, 458,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row474[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row498[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 513,
+       97, 0, 537,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row475[] = {
+static int parser_action_row499[] = {
        5,
-       -1, 1, 458,
-       12, 0, 668,
-       46, 0, 669,
+       -1, 1, 464,
+       12, 0, 692,
+       46, 0, 693,
        96, 0, 53,
-       97, 0, 670
+       97, 0, 694
 };
-static int parser_action_row476[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row500[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row477[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row501[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row478[] = {
-       26,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row502[] = {
+       32,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       104, 1, 399,
-       105, 1, 399,
-       106, 0, 60
+       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
 };
-static int parser_action_row479[] = {
+static int parser_action_row503[] = {
        1,
-       -1, 1, 393
+       -1, 1, 399
 };
-static int parser_action_row480[] = {
+static int parser_action_row504[] = {
        1,
-       -1, 1, 1079
+       -1, 1, 1103
 };
-static int parser_action_row481[] = {
+static int parser_action_row505[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row482[] = {
+static int parser_action_row506[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row483[] = {
+static int parser_action_row507[] = {
        1,
        -1, 1, 348
 };
-static int parser_action_row484[] = {
+static int parser_action_row508[] = {
        1,
        -1, 1, 191
 };
-static int parser_action_row485[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row509[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row486[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row510[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row487[] = {
+static int parser_action_row511[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row488[] = {
+static int parser_action_row512[] = {
        1,
        -1, 1, 197
 };
-static int parser_action_row489[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row513[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row490[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row514[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row491[] = {
+static int parser_action_row515[] = {
        13,
        -1, 1, 342,
-       59, 0, 684,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row492[] = {
+static int parser_action_row516[] = {
        1,
        -1, 1, 188
 };
-static int parser_action_row493[] = {
+static int parser_action_row517[] = {
        1,
        -1, 1, 199
 };
-static int parser_action_row494[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row518[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row495[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row519[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row496[] = {
+static int parser_action_row520[] = {
        13,
        -1, 1, 346,
-       59, 0, 688,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row497[] = {
+static int parser_action_row521[] = {
        1,
        -1, 1, 190
 };
-static int parser_action_row498[] = {
-       25,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 486,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row499[] = {
-       39,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 345,
-       59, 0, 691,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 345,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row500[] = {
+static int parser_action_row524[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row501[] = {
+static int parser_action_row525[] = {
        1,
        -1, 1, 14
 };
-static int parser_action_row502[] = {
+static int parser_action_row526[] = {
        7,
-       -1, 3, 501,
-       5, 0, 463,
-       6, 0, 464,
-       7, 0, 465,
-       8, 0, 466,
-       10, 0, 467,
-       17, 0, 468
+       -1, 3, 525,
+       5, 0, 487,
+       6, 0, 488,
+       7, 0, 489,
+       8, 0, 490,
+       10, 0, 491,
+       17, 0, 492
 };
-static int parser_action_row503[] = {
+static int parser_action_row527[] = {
        1,
-       -1, 1, 484
+       -1, 1, 490
 };
-static int parser_action_row504[] = {
+static int parser_action_row528[] = {
        1,
        -1, 1, 15
 };
-static int parser_action_row505[] = {
-       25,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row529[] = {
+       31,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
-       53, 0, 696,
+       53, 0, 720,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 513,
+       97, 0, 537,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row506[] = {
+static int parser_action_row530[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row507[] = {
+static int parser_action_row531[] = {
        1,
-       -1, 1, 706
+       -1, 1, 718
 };
-static int parser_action_row508[] = {
+static int parser_action_row532[] = {
        3,
-       -1, 1, 741,
-       52, 0, 277,
-       73, 0, 699
+       -1, 1, 753,
+       52, 0, 295,
+       73, 0, 723
 };
-static int parser_action_row509[] = {
+static int parser_action_row533[] = {
        1,
-       -1, 1, 738
+       -1, 1, 750
 };
-static int parser_action_row510[] = {
+static int parser_action_row534[] = {
        3,
-       -1, 3, 509,
-       47, 0, 387,
-       96, 0, 388
+       -1, 3, 533,
+       47, 0, 411,
+       96, 0, 412
 };
-static int parser_action_row511[] = {
+static int parser_action_row535[] = {
        3,
-       -1, 1, 743,
-       54, 1, 746,
-       73, 1, 746
+       -1, 1, 755,
+       54, 1, 758,
+       73, 1, 758
 };
-static int parser_action_row512[] = {
+static int parser_action_row536[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row513[] = {
+static int parser_action_row537[] = {
        9,
-       -1, 1, 438,
-       0, 1, 441,
-       1, 1, 441,
-       9, 1, 441,
-       24, 1, 441,
-       53, 1, 441,
-       56, 1, 441,
-       95, 1, 441,
-       110, 1, 441
+       -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
 };
-static int parser_action_row514[] = {
+static int parser_action_row538[] = {
        4,
        -1, 1, 341,
-       52, 0, 277,
-       58, 0, 215,
-       59, 0, 703
+       52, 0, 295,
+       58, 0, 227,
+       59, 0, 727
 };
-static int parser_action_row515[] = {
+static int parser_action_row539[] = {
        2,
        -1, 1, 366,
-       71, 0, 704
+       71, 0, 728
 };
-static int parser_action_row516[] = {
+static int parser_action_row540[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row517[] = {
+static int parser_action_row541[] = {
        2,
-       -1, 3, 516,
-       53, 0, 706
+       -1, 3, 540,
+       53, 0, 730
 };
-static int parser_action_row518[] = {
+static int parser_action_row542[] = {
        1,
-       -1, 1, 763
+       -1, 1, 775
 };
-static int parser_action_row519[] = {
+static int parser_action_row543[] = {
        1,
-       -1, 1, 757
+       -1, 1, 769
 };
-static int parser_action_row520[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 116,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row521[] = {
+static int parser_action_row545[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row522[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 116,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row523[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 116,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row524[] = {
+static int parser_action_row548[] = {
        3,
-       -1, 3, 523,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 547,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row525[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row526[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row527[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row528[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row529[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row530[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row531[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row532[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row533[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row534[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row535[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row536[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row537[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row538[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row539[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row540[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row541[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row542[] = {
-       20,
-       -1, 1, 458,
-       12, 0, 116,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row543[] = {
+static int parser_action_row567[] = {
        5,
-       -1, 1, 458,
-       12, 0, 730,
-       46, 0, 731,
+       -1, 1, 464,
+       12, 0, 754,
+       46, 0, 755,
        96, 0, 53,
-       97, 0, 732
+       97, 0, 756
 };
-static int parser_action_row544[] = {
+static int parser_action_row568[] = {
        1,
-       -1, 1, 761
+       -1, 1, 773
 };
-static int parser_action_row545[] = {
+static int parser_action_row569[] = {
        2,
-       -1, 1, 760,
-       52, 0, 277
+       -1, 1, 772,
+       52, 0, 295
 };
-static int parser_action_row546[] = {
-       31,
-       -1, 1, 458,
-       9, 0, 737,
+static int parser_action_row570[] = {
+       37,
+       -1, 1, 464,
+       9, 0, 761,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -7187,657 +7906,789 @@ static int parser_action_row546[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row547[] = {
+static int parser_action_row571[] = {
        4,
-       -1, 3, 546,
+       -1, 3, 570,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row548[] = {
+static int parser_action_row572[] = {
        3,
-       -1, 3, 547,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 571,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row549[] = {
+static int parser_action_row573[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row550[] = {
+static int parser_action_row574[] = {
        2,
        -1, 1, 204,
-       59, 0, 741
+       59, 0, 765
 };
-static int parser_action_row551[] = {
+static int parser_action_row575[] = {
        2,
-       -1, 3, 550,
-       23, 0, 742
+       -1, 3, 574,
+       23, 0, 766
 };
-static int parser_action_row552[] = {
+static int parser_action_row576[] = {
        2,
-       -1, 3, 551,
-       15, 0, 743
+       -1, 3, 575,
+       15, 0, 767
 };
-static int parser_action_row553[] = {
+static int parser_action_row577[] = {
        2,
-       -1, 3, 552,
-       97, 0, 341
+       -1, 3, 576,
+       97, 0, 365
 };
-static int parser_action_row554[] = {
+static int parser_action_row578[] = {
        2,
-       -1, 3, 553,
-       28, 0, 745
+       -1, 3, 577,
+       28, 0, 769
 };
-static int parser_action_row555[] = {
+static int parser_action_row579[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row556[] = {
+static int parser_action_row580[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row557[] = {
+static int parser_action_row581[] = {
        1,
        -1, 1, 291
 };
-static int parser_action_row558[] = {
+static int parser_action_row582[] = {
        3,
        -1, 1, 326,
-       52, 0, 277,
-       73, 0, 597
+       52, 0, 295,
+       73, 0, 621
 };
-static int parser_action_row559[] = {
+static int parser_action_row583[] = {
        1,
        -1, 1, 323
 };
-static int parser_action_row560[] = {
+static int parser_action_row584[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row561[] = {
+static int parser_action_row585[] = {
        3,
        -1, 1, 328,
        54, 1, 331,
        73, 1, 331
 };
-static int parser_action_row562[] = {
-       23,
-       -1, 1, 458,
-       12, 0, 170,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row586[] = {
+       29,
+       -1, 1, 464,
+       12, 0, 182,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row563[] = {
+static int parser_action_row587[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row564[] = {
-       23,
-       -1, 1, 458,
-       12, 0, 170,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row588[] = {
+       29,
+       -1, 1, 464,
+       12, 0, 182,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row565[] = {
-       23,
-       -1, 1, 458,
-       12, 0, 170,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row589[] = {
+       29,
+       -1, 1, 464,
+       12, 0, 182,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row566[] = {
+static int parser_action_row590[] = {
        3,
-       -1, 3, 565,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 589,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row567[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row591[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row568[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row592[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row569[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row593[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row570[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row594[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row571[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row595[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row572[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row596[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row573[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row597[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row574[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row598[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row575[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row599[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row576[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row600[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row577[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row601[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row578[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row602[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row579[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row603[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row580[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row604[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row581[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row605[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row582[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row606[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row583[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row607[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row584[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row608[] = {
+       28,
+       -1, 1, 464,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row585[] = {
+static int parser_action_row609[] = {
        5,
-       -1, 1, 458,
-       12, 0, 773,
-       46, 0, 669,
+       -1, 1, 464,
+       12, 0, 797,
+       46, 0, 693,
        96, 0, 53,
-       97, 0, 774
+       97, 0, 798
 };
-static int parser_action_row586[] = {
+static int parser_action_row610[] = {
        1,
        -1, 1, 342
 };
-static int parser_action_row587[] = {
+static int parser_action_row611[] = {
        1,
        -1, 1, 346
 };
-static int parser_action_row588[] = {
+static int parser_action_row612[] = {
        2,
        -1, 1, 345,
-       52, 0, 277
+       52, 0, 295
 };
-static int parser_action_row589[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row613[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -7867,20 +8718,26 @@ static int parser_action_row589[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row590[] = {
+static int parser_action_row614[] = {
        1,
        -1, 1, 158
 };
-static int parser_action_row591[] = {
+static int parser_action_row615[] = {
        1,
        -1, 1, 278
 };
-static int parser_action_row592[] = {
-       31,
-       -1, 1, 458,
-       9, 0, 780,
+static int parser_action_row616[] = {
+       37,
+       -1, 1, 464,
+       9, 0, 804,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -7909,1150 +8766,1240 @@ static int parser_action_row592[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row593[] = {
+static int parser_action_row617[] = {
        3,
-       -1, 1, 797,
-       54, 0, 782,
-       94, 0, 594
+       -1, 1, 815,
+       54, 0, 806,
+       94, 0, 618
 };
-static int parser_action_row594[] = {
+static int parser_action_row618[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row595[] = {
+static int parser_action_row619[] = {
        3,
        -1, 1, 30,
        13, 0, 32,
-       52, 0, 785
+       52, 0, 809
 };
-static int parser_action_row596[] = {
+static int parser_action_row620[] = {
        1,
-       -1, 1, 796
+       -1, 1, 814
 };
-static int parser_action_row597[] = {
+static int parser_action_row621[] = {
        1,
-       -1, 1, 622
+       -1, 1, 634
 };
-static int parser_action_row598[] = {
+static int parser_action_row622[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row599[] = {
+static int parser_action_row623[] = {
        2,
        -1, 1, 30,
        13, 0, 32
 };
-static int parser_action_row600[] = {
+static int parser_action_row624[] = {
        4,
-       -1, 3, 599,
-       6, 0, 792,
-       17, 0, 793,
-       97, 0, 794
+       -1, 3, 623,
+       6, 0, 816,
+       17, 0, 817,
+       97, 0, 818
 };
-static int parser_action_row601[] = {
+static int parser_action_row625[] = {
        2,
-       -1, 3, 600,
-       59, 0, 796
+       -1, 3, 624,
+       59, 0, 820
 };
-static int parser_action_row602[] = {
+static int parser_action_row626[] = {
        2,
        -1, 1, 155,
-       57, 0, 333
+       57, 0, 357
 };
-static int parser_action_row603[] = {
+static int parser_action_row627[] = {
        2,
-       -1, 3, 602,
-       15, 0, 798
+       -1, 3, 626,
+       15, 0, 822
 };
-static int parser_action_row604[] = {
+static int parser_action_row628[] = {
        3,
-       -1, 1, 405,
-       54, 0, 799,
-       94, 0, 204
+       -1, 1, 411,
+       54, 0, 823,
+       94, 0, 216
 };
-static int parser_action_row605[] = {
+static int parser_action_row629[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row606[] = {
+static int parser_action_row630[] = {
        1,
        -1, 1, 146
 };
-static int parser_action_row607[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row631[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row608[] = {
+static int parser_action_row632[] = {
        1,
-       -1, 1, 988
+       -1, 1, 1012
 };
-static int parser_action_row609[] = {
+static int parser_action_row633[] = {
        1,
-       -1, 1, 993
+       -1, 1, 1017
 };
-static int parser_action_row610[] = {
+static int parser_action_row634[] = {
        1,
-       -1, 1, 990
+       -1, 1, 1014
 };
-static int parser_action_row611[] = {
+static int parser_action_row635[] = {
        3,
-       -1, 3, 610,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 634,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row612[] = {
+static int parser_action_row636[] = {
        2,
-       -1, 1, 516,
-       59, 0, 804
+       -1, 1, 522,
+       59, 0, 828
 };
-static int parser_action_row613[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row614[] = {
+static int parser_action_row638[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row615[] = {
+static int parser_action_row639[] = {
        2,
-       -1, 3, 614,
-       53, 0, 806
+       -1, 3, 638,
+       53, 0, 830
 };
-static int parser_action_row616[] = {
+static int parser_action_row640[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row617[] = {
+static int parser_action_row641[] = {
        1,
-       -1, 1, 1074
+       -1, 1, 1098
 };
-static int parser_action_row618[] = {
+static int parser_action_row642[] = {
        2,
-       -1, 3, 617,
-       53, 0, 808
+       -1, 3, 641,
+       53, 0, 832
 };
-static int parser_action_row619[] = {
+static int parser_action_row643[] = {
        2,
-       -1, 1, 385,
-       56, 0, 615
+       -1, 1, 391,
+       56, 0, 639
 };
-static int parser_action_row620[] = {
+static int parser_action_row644[] = {
        2,
-       -1, 3, 619,
-       55, 0, 611
+       -1, 3, 643,
+       55, 0, 635
 };
-static int parser_action_row621[] = {
+static int parser_action_row645[] = {
        1,
-       -1, 1, 498
+       -1, 1, 504
 };
-static int parser_action_row622[] = {
+static int parser_action_row646[] = {
        1,
-       -1, 1, 499
+       -1, 1, 505
 };
-static int parser_action_row623[] = {
+static int parser_action_row647[] = {
        1,
-       -1, 1, 507
+       -1, 1, 513
 };
-static int parser_action_row624[] = {
+static int parser_action_row648[] = {
        14,
        -1, 1, 343,
-       52, 0, 277,
-       59, 0, 810,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row625[] = {
+static int parser_action_row649[] = {
        1,
-       -1, 1, 521
+       -1, 1, 527
 };
-static int parser_action_row626[] = {
+static int parser_action_row650[] = {
        15,
        -1, 1, 347,
-       52, 0, 277,
-       58, 0, 215,
-       59, 0, 811,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row627[] = {
+static int parser_action_row651[] = {
        22,
-       -1, 1, 456,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       97, 0, 812
+       -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
 };
-static int parser_action_row628[] = {
+static int parser_action_row652[] = {
        1,
-       -1, 1, 523
+       -1, 1, 529
 };
-static int parser_action_row629[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row653[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row630[] = {
+static int parser_action_row654[] = {
        3,
-       -1, 3, 629,
-       52, 0, 340,
-       97, 0, 341
+       -1, 3, 653,
+       52, 0, 364,
+       97, 0, 365
 };
-static int parser_action_row631[] = {
+static int parser_action_row655[] = {
        2,
-       -1, 1, 390,
-       72, 0, 816
+       -1, 1, 396,
+       72, 0, 840
 };
-static int parser_action_row632[] = {
+static int parser_action_row656[] = {
        2,
-       -1, 3, 631,
-       55, 0, 817
+       -1, 3, 655,
+       55, 0, 841
 };
-static int parser_action_row633[] = {
+static int parser_action_row657[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row634[] = {
+static int parser_action_row658[] = {
        1,
-       -1, 1, 1076
+       -1, 1, 1100
 };
-static int parser_action_row635[] = {
+static int parser_action_row659[] = {
        2,
-       -1, 1, 388,
-       56, 0, 632
+       -1, 1, 394,
+       56, 0, 656
 };
-static int parser_action_row636[] = {
+static int parser_action_row660[] = {
        1,
        -1, 1, 217
 };
-static int parser_action_row637[] = {
+static int parser_action_row661[] = {
        1,
        -1, 1, 236
 };
-static int parser_action_row638[] = {
+static int parser_action_row662[] = {
        3,
-       -1, 3, 637,
-       58, 0, 820,
-       97, 0, 821
+       -1, 3, 661,
+       58, 0, 844,
+       97, 0, 845
 };
-static int parser_action_row639[] = {
+static int parser_action_row663[] = {
        4,
-       -1, 3, 638,
-       9, 0, 824,
-       58, 0, 820,
-       97, 0, 821
+       -1, 3, 662,
+       9, 0, 848,
+       58, 0, 844,
+       97, 0, 845
 };
-static int parser_action_row640[] = {
+static int parser_action_row664[] = {
        1,
        -1, 1, 33
 };
-static int parser_action_row641[] = {
+static int parser_action_row665[] = {
        2,
-       -1, 3, 640,
-       55, 0, 826
+       -1, 3, 664,
+       55, 0, 850
 };
-static int parser_action_row642[] = {
+static int parser_action_row666[] = {
        1,
        -1, 1, 86
 };
-static int parser_action_row643[] = {
+static int parser_action_row667[] = {
        1,
        -1, 1, 87
 };
-static int parser_action_row644[] = {
+static int parser_action_row668[] = {
        1,
        -1, 1, 88
 };
-static int parser_action_row645[] = {
+static int parser_action_row669[] = {
        1,
        -1, 1, 89
 };
-static int parser_action_row646[] = {
+static int parser_action_row670[] = {
        1,
        -1, 1, 90
 };
-static int parser_action_row647[] = {
+static int parser_action_row671[] = {
        1,
        -1, 1, 91
 };
-static int parser_action_row648[] = {
+static int parser_action_row672[] = {
        1,
        -1, 1, 92
 };
-static int parser_action_row649[] = {
+static int parser_action_row673[] = {
        1,
        -1, 1, 93
 };
-static int parser_action_row650[] = {
+static int parser_action_row674[] = {
        1,
        -1, 1, 94
 };
-static int parser_action_row651[] = {
+static int parser_action_row675[] = {
        1,
        -1, 1, 95
 };
-static int parser_action_row652[] = {
+static int parser_action_row676[] = {
        1,
        -1, 1, 96
 };
-static int parser_action_row653[] = {
+static int parser_action_row677[] = {
        1,
        -1, 1, 97
 };
-static int parser_action_row654[] = {
+static int parser_action_row678[] = {
        1,
        -1, 1, 100
 };
-static int parser_action_row655[] = {
+static int parser_action_row679[] = {
        1,
        -1, 1, 98
 };
-static int parser_action_row656[] = {
+static int parser_action_row680[] = {
        1,
        -1, 1, 102
 };
-static int parser_action_row657[] = {
+static int parser_action_row681[] = {
        1,
        -1, 1, 101
 };
-static int parser_action_row658[] = {
+static int parser_action_row682[] = {
        1,
        -1, 1, 99
 };
-static int parser_action_row659[] = {
+static int parser_action_row683[] = {
        1,
        -1, 1, 103
 };
-static int parser_action_row660[] = {
+static int parser_action_row684[] = {
        1,
        -1, 1, 105
 };
-static int parser_action_row661[] = {
+static int parser_action_row685[] = {
        3,
        -1, 1, 108,
-       58, 0, 215,
-       59, 0, 827
+       58, 0, 227,
+       59, 0, 851
 };
-static int parser_action_row662[] = {
+static int parser_action_row686[] = {
        1,
-       -1, 1, 463
+       -1, 1, 469
 };
-static int parser_action_row663[] = {
+static int parser_action_row687[] = {
        5,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       52, 0, 828,
-       57, 0, 829
+       52, 0, 852,
+       57, 0, 853
 };
-static int parser_action_row664[] = {
+static int parser_action_row688[] = {
        22,
-       -1, 3, 663,
-       54, 0, 640,
-       74, 0, 641,
-       75, 0, 642,
-       76, 0, 643,
-       77, 0, 644,
-       78, 0, 645,
-       79, 0, 646,
-       80, 0, 647,
-       81, 0, 648,
-       82, 0, 649,
-       83, 0, 650,
-       84, 0, 651,
-       85, 0, 652,
-       86, 0, 653,
-       87, 0, 654,
-       88, 0, 655,
-       89, 0, 656,
-       90, 0, 657,
-       91, 0, 658,
-       92, 0, 659,
-       97, 0, 833
+       -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
 };
-static int parser_action_row665[] = {
+static int parser_action_row689[] = {
        23,
-       -1, 3, 664,
-       54, 0, 640,
-       74, 0, 641,
-       75, 0, 642,
-       76, 0, 643,
-       77, 0, 644,
-       78, 0, 645,
-       79, 0, 646,
-       80, 0, 647,
-       81, 0, 648,
-       82, 0, 649,
-       83, 0, 650,
-       84, 0, 651,
-       85, 0, 652,
-       86, 0, 653,
-       87, 0, 654,
-       88, 0, 655,
-       89, 0, 656,
-       90, 0, 657,
-       91, 0, 658,
-       92, 0, 659,
-       96, 0, 53,
-       97, 0, 660
+       -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
 };
-static int parser_action_row666[] = {
+static int parser_action_row690[] = {
        1,
        -1, 1, 36
 };
-static int parser_action_row667[] = {
+static int parser_action_row691[] = {
        3,
-       -1, 3, 666,
-       96, 0, 837,
-       97, 0, 838
+       -1, 3, 690,
+       96, 0, 861,
+       97, 0, 862
 };
-static int parser_action_row668[] = {
+static int parser_action_row692[] = {
        2,
-       -1, 3, 667,
-       55, 0, 842
+       -1, 3, 691,
+       55, 0, 866
 };
-static int parser_action_row669[] = {
-       27,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 351,
        73, 1, 351,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row670[] = {
+static int parser_action_row694[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row671[] = {
-       40,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 333,
-       58, 0, 215,
-       59, 0, 846,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 333,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row672[] = {
+static int parser_action_row696[] = {
        2,
-       -1, 3, 671,
-       98, 0, 850
+       -1, 3, 695,
+       98, 0, 874
 };
-static int parser_action_row673[] = {
+static int parser_action_row697[] = {
        3,
-       -1, 1, 455,
-       12, 0, 851,
-       97, 0, 852
+       -1, 1, 461,
+       12, 0, 875,
+       97, 0, 876
 };
-static int parser_action_row674[] = {
+static int parser_action_row698[] = {
        4,
-       -1, 1, 457,
-       12, 0, 853,
+       -1, 1, 463,
+       12, 0, 877,
        96, 0, 53,
-       97, 0, 854
+       97, 0, 878
 };
-static int parser_action_row675[] = {
+static int parser_action_row699[] = {
        1,
        -1, 1, 225
 };
-static int parser_action_row676[] = {
+static int parser_action_row700[] = {
        1,
        -1, 1, 244
 };
-static int parser_action_row677[] = {
+static int parser_action_row701[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row678[] = {
+static int parser_action_row702[] = {
        1,
-       -1, 1, 394
+       -1, 1, 400
 };
-static int parser_action_row679[] = {
+static int parser_action_row703[] = {
        1,
-       -1, 1, 395
+       -1, 1, 401
 };
-static int parser_action_row680[] = {
+static int parser_action_row704[] = {
        1,
        -1, 1, 208
 };
-static int parser_action_row681[] = {
+static int parser_action_row705[] = {
        1,
        -1, 1, 227
 };
-static int parser_action_row682[] = {
-       25,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row706[] = {
+       31,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
-       53, 0, 857,
+       53, 0, 881,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 513,
+       97, 0, 537,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row683[] = {
+static int parser_action_row707[] = {
        1,
        -1, 1, 220
 };
-static int parser_action_row684[] = {
+static int parser_action_row708[] = {
        1,
        -1, 1, 239
 };
-static int parser_action_row685[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row709[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row686[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row710[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row687[] = {
+static int parser_action_row711[] = {
        1,
        -1, 1, 224
 };
-static int parser_action_row688[] = {
+static int parser_action_row712[] = {
        1,
        -1, 1, 243
 };
-static int parser_action_row689[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row713[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row690[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row714[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row691[] = {
+static int parser_action_row715[] = {
        1,
        -1, 1, 198
 };
-static int parser_action_row692[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row716[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row693[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row717[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row694[] = {
+static int parser_action_row718[] = {
        13,
        -1, 1, 344,
-       59, 0, 865,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row695[] = {
+static int parser_action_row719[] = {
        1,
        -1, 1, 189
 };
-static int parser_action_row696[] = {
+static int parser_action_row720[] = {
        1,
        -1, 1, 140
 };
-static int parser_action_row697[] = {
+static int parser_action_row721[] = {
        1,
-       -1, 1, 438
+       -1, 1, 444
 };
-static int parser_action_row698[] = {
+static int parser_action_row722[] = {
        2,
-       -1, 3, 697,
-       53, 0, 867
+       -1, 3, 721,
+       53, 0, 891
 };
-static int parser_action_row699[] = {
+static int parser_action_row723[] = {
        2,
-       -1, 3, 698,
-       23, 0, 868
+       -1, 3, 722,
+       23, 0, 892
 };
-static int parser_action_row700[] = {
+static int parser_action_row724[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row701[] = {
+static int parser_action_row725[] = {
        1,
-       -1, 1, 740
+       -1, 1, 752
 };
-static int parser_action_row702[] = {
+static int parser_action_row726[] = {
        2,
-       -1, 3, 701,
-       73, 0, 699
+       -1, 3, 725,
+       73, 0, 723
 };
-static int parser_action_row703[] = {
+static int parser_action_row727[] = {
        5,
-       -1, 1, 458,
-       12, 0, 730,
-       46, 0, 731,
+       -1, 1, 464,
+       12, 0, 754,
+       46, 0, 755,
        96, 0, 53,
-       97, 0, 732
+       97, 0, 756
 };
-static int parser_action_row704[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row728[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row705[] = {
+static int parser_action_row729[] = {
        1,
        -1, 1, 367
 };
-static int parser_action_row706[] = {
+static int parser_action_row730[] = {
        2,
-       -1, 1, 444,
-       56, 0, 872
+       -1, 1, 450,
+       56, 0, 896
 };
-static int parser_action_row707[] = {
+static int parser_action_row731[] = {
        9,
-       -1, 1, 437,
-       0, 1, 439,
-       1, 1, 439,
-       9, 1, 439,
-       24, 1, 439,
-       53, 1, 439,
-       56, 1, 439,
-       95, 1, 439,
-       110, 1, 439
+       -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
 };
-static int parser_action_row708[] = {
+static int parser_action_row732[] = {
        1,
-       -1, 1, 702
+       -1, 1, 714
 };
-static int parser_action_row709[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 116,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row710[] = {
+static int parser_action_row734[] = {
        1,
-       -1, 1, 701
+       -1, 1, 713
 };
-static int parser_action_row711[] = {
+static int parser_action_row735[] = {
        1,
-       -1, 1, 704
+       -1, 1, 716
 };
-static int parser_action_row712[] = {
+static int parser_action_row736[] = {
        1,
-       -1, 1, 715
+       -1, 1, 727
 };
-static int parser_action_row713[] = {
+static int parser_action_row737[] = {
        2,
-       -1, 1, 717,
-       81, 0, 315
+       -1, 1, 729,
+       81, 0, 339
 };
-static int parser_action_row714[] = {
+static int parser_action_row738[] = {
        2,
-       -1, 1, 708,
-       80, 0, 307
+       -1, 1, 720,
+       80, 0, 331
 };
-static int parser_action_row715[] = {
+static int parser_action_row739[] = {
        2,
-       -1, 1, 709,
-       80, 0, 307
+       -1, 1, 721,
+       80, 0, 331
 };
-static int parser_action_row716[] = {
+static int parser_action_row740[] = {
        2,
-       -1, 1, 710,
-       80, 0, 307
+       -1, 1, 722,
+       80, 0, 331
 };
-static int parser_action_row717[] = {
+static int parser_action_row741[] = {
        2,
-       -1, 1, 711,
-       80, 0, 307
+       -1, 1, 723,
+       80, 0, 331
 };
-static int parser_action_row718[] = {
+static int parser_action_row742[] = {
        2,
-       -1, 1, 712,
-       80, 0, 307
+       -1, 1, 724,
+       80, 0, 331
 };
-static int parser_action_row719[] = {
+static int parser_action_row743[] = {
        2,
-       -1, 1, 713,
-       80, 0, 307
+       -1, 1, 725,
+       80, 0, 331
 };
-static int parser_action_row720[] = {
+static int parser_action_row744[] = {
        2,
-       -1, 1, 714,
-       80, 0, 307
+       -1, 1, 726,
+       80, 0, 331
 };
-static int parser_action_row721[] = {
+static int parser_action_row745[] = {
        2,
-       -1, 1, 719,
-       82, 0, 316
+       -1, 1, 731,
+       82, 0, 340
 };
-static int parser_action_row722[] = {
+static int parser_action_row746[] = {
        3,
-       -1, 1, 721,
-       88, 0, 317,
-       91, 0, 318
+       -1, 1, 733,
+       88, 0, 341,
+       91, 0, 342
 };
-static int parser_action_row723[] = {
+static int parser_action_row747[] = {
        3,
-       -1, 1, 723,
-       74, 0, 319,
-       75, 0, 320
+       -1, 1, 735,
+       74, 0, 343,
+       75, 0, 344
 };
-static int parser_action_row724[] = {
+static int parser_action_row748[] = {
        3,
-       -1, 1, 724,
-       74, 0, 319,
-       75, 0, 320
+       -1, 1, 736,
+       74, 0, 343,
+       75, 0, 344
 };
-static int parser_action_row725[] = {
+static int parser_action_row749[] = {
        4,
-       -1, 1, 726,
-       76, 0, 321,
-       78, 0, 322,
-       79, 0, 323
+       -1, 1, 738,
+       76, 0, 345,
+       78, 0, 346,
+       79, 0, 347
 };
-static int parser_action_row726[] = {
+static int parser_action_row750[] = {
        4,
-       -1, 1, 727,
-       76, 0, 321,
-       78, 0, 322,
-       79, 0, 323
+       -1, 1, 739,
+       76, 0, 345,
+       78, 0, 346,
+       79, 0, 347
 };
-static int parser_action_row727[] = {
+static int parser_action_row751[] = {
        1,
-       -1, 1, 729
+       -1, 1, 741
 };
-static int parser_action_row728[] = {
+static int parser_action_row752[] = {
        1,
-       -1, 1, 730
+       -1, 1, 742
 };
-static int parser_action_row729[] = {
+static int parser_action_row753[] = {
        1,
-       -1, 1, 731
+       -1, 1, 743
 };
-static int parser_action_row730[] = {
+static int parser_action_row754[] = {
        1,
-       -1, 1, 733
+       -1, 1, 745
 };
-static int parser_action_row731[] = {
+static int parser_action_row755[] = {
        2,
-       -1, 1, 766,
-       52, 0, 277
+       -1, 1, 778,
+       52, 0, 295
 };
-static int parser_action_row732[] = {
+static int parser_action_row756[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row733[] = {
+static int parser_action_row757[] = {
        3,
-       -1, 1, 748,
-       52, 0, 277,
-       58, 0, 215
+       -1, 1, 760,
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row734[] = {
+static int parser_action_row758[] = {
        2,
-       -1, 3, 733,
-       98, 0, 879
+       -1, 3, 757,
+       98, 0, 903
 };
-static int parser_action_row735[] = {
+static int parser_action_row759[] = {
        2,
-       -1, 1, 455,
-       97, 0, 880
+       -1, 1, 461,
+       97, 0, 904
 };
-static int parser_action_row736[] = {
+static int parser_action_row760[] = {
        3,
-       -1, 1, 457,
+       -1, 1, 463,
        96, 0, 53,
-       97, 0, 881
+       97, 0, 905
 };
-static int parser_action_row737[] = {
+static int parser_action_row761[] = {
        1,
-       -1, 1, 759
+       -1, 1, 771
 };
-static int parser_action_row738[] = {
+static int parser_action_row762[] = {
        1,
        -1, 1, 164
 };
-static int parser_action_row739[] = {
-       31,
-       -1, 1, 458,
-       9, 0, 883,
+static int parser_action_row763[] = {
+       37,
+       -1, 1, 464,
+       9, 0, 907,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -9081,89 +10028,107 @@ static int parser_action_row739[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row740[] = {
+static int parser_action_row764[] = {
        1,
        -1, 1, 154
 };
-static int parser_action_row741[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row765[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row742[] = {
+static int parser_action_row766[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row743[] = {
-       35,
-       -1, 1, 458,
+static int parser_action_row767[] = {
+       41,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 886,
-       12, 0, 887,
-       15, 0, 888,
+       9, 0, 910,
+       12, 0, 911,
+       15, 0, 912,
        16, 0, 34,
-       22, 0, 889,
-       24, 0, 890,
-       25, 0, 891,
-       26, 0, 892,
-       27, 0, 893,
-       33, 0, 894,
-       34, 0, 895,
-       35, 0, 896,
-       36, 0, 897,
-       37, 0, 898,
+       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,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 899,
-       51, 0, 900,
+       50, 0, 923,
+       51, 0, 924,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 901,
+       97, 0, 925,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row744[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row768[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 157,
+       9, 0, 169,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -9193,315 +10158,327 @@ static int parser_action_row744[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row745[] = {
+static int parser_action_row769[] = {
        4,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       56, 0, 554
+       56, 0, 578
 };
-static int parser_action_row746[] = {
+static int parser_action_row770[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row747[] = {
+static int parser_action_row771[] = {
        2,
-       -1, 3, 746,
-       97, 0, 923
+       -1, 3, 770,
+       97, 0, 947
 };
-static int parser_action_row748[] = {
+static int parser_action_row772[] = {
        2,
-       -1, 3, 747,
-       23, 0, 924
+       -1, 3, 771,
+       23, 0, 948
 };
-static int parser_action_row749[] = {
+static int parser_action_row773[] = {
        1,
        -1, 1, 325
 };
-static int parser_action_row750[] = {
+static int parser_action_row774[] = {
        5,
-       -1, 1, 458,
-       12, 0, 773,
-       46, 0, 669,
+       -1, 1, 464,
+       12, 0, 797,
+       46, 0, 693,
        96, 0, 53,
-       97, 0, 774
+       97, 0, 798
 };
-static int parser_action_row751[] = {
+static int parser_action_row775[] = {
        1,
        -1, 1, 287
 };
-static int parser_action_row752[] = {
-       23,
-       -1, 1, 458,
-       12, 0, 170,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row776[] = {
+       29,
+       -1, 1, 464,
+       12, 0, 182,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row753[] = {
+static int parser_action_row777[] = {
        1,
        -1, 1, 286
 };
-static int parser_action_row754[] = {
+static int parser_action_row778[] = {
        1,
        -1, 1, 289
 };
-static int parser_action_row755[] = {
+static int parser_action_row779[] = {
        1,
        -1, 1, 300
 };
-static int parser_action_row756[] = {
+static int parser_action_row780[] = {
        2,
        -1, 1, 302,
-       81, 0, 366
+       81, 0, 390
 };
-static int parser_action_row757[] = {
+static int parser_action_row781[] = {
        2,
        -1, 1, 293,
-       80, 0, 358
+       80, 0, 382
 };
-static int parser_action_row758[] = {
+static int parser_action_row782[] = {
        2,
        -1, 1, 294,
-       80, 0, 358
+       80, 0, 382
 };
-static int parser_action_row759[] = {
+static int parser_action_row783[] = {
        2,
        -1, 1, 295,
-       80, 0, 358
+       80, 0, 382
 };
-static int parser_action_row760[] = {
+static int parser_action_row784[] = {
        2,
        -1, 1, 296,
-       80, 0, 358
+       80, 0, 382
 };
-static int parser_action_row761[] = {
+static int parser_action_row785[] = {
        2,
        -1, 1, 297,
-       80, 0, 358
+       80, 0, 382
 };
-static int parser_action_row762[] = {
+static int parser_action_row786[] = {
        2,
        -1, 1, 298,
-       80, 0, 358
+       80, 0, 382
 };
-static int parser_action_row763[] = {
+static int parser_action_row787[] = {
        2,
        -1, 1, 299,
-       80, 0, 358
+       80, 0, 382
 };
-static int parser_action_row764[] = {
+static int parser_action_row788[] = {
        2,
        -1, 1, 304,
-       82, 0, 367
+       82, 0, 391
 };
-static int parser_action_row765[] = {
+static int parser_action_row789[] = {
        3,
        -1, 1, 306,
-       88, 0, 368,
-       91, 0, 369
+       88, 0, 392,
+       91, 0, 393
 };
-static int parser_action_row766[] = {
+static int parser_action_row790[] = {
        3,
        -1, 1, 308,
-       74, 0, 370,
-       75, 0, 371
+       74, 0, 394,
+       75, 0, 395
 };
-static int parser_action_row767[] = {
+static int parser_action_row791[] = {
        3,
        -1, 1, 309,
-       74, 0, 370,
-       75, 0, 371
+       74, 0, 394,
+       75, 0, 395
 };
-static int parser_action_row768[] = {
+static int parser_action_row792[] = {
        4,
        -1, 1, 311,
-       76, 0, 372,
-       78, 0, 373,
-       79, 0, 374
+       76, 0, 396,
+       78, 0, 397,
+       79, 0, 398
 };
-static int parser_action_row769[] = {
+static int parser_action_row793[] = {
        4,
        -1, 1, 312,
-       76, 0, 372,
-       78, 0, 373,
-       79, 0, 374
+       76, 0, 396,
+       78, 0, 397,
+       79, 0, 398
 };
-static int parser_action_row770[] = {
+static int parser_action_row794[] = {
        1,
        -1, 1, 314
 };
-static int parser_action_row771[] = {
+static int parser_action_row795[] = {
        1,
        -1, 1, 315
 };
-static int parser_action_row772[] = {
+static int parser_action_row796[] = {
        1,
        -1, 1, 316
 };
-static int parser_action_row773[] = {
+static int parser_action_row797[] = {
        1,
        -1, 1, 318
 };
-static int parser_action_row774[] = {
+static int parser_action_row798[] = {
        2,
        -1, 1, 351,
-       52, 0, 277
+       52, 0, 295
 };
-static int parser_action_row775[] = {
+static int parser_action_row799[] = {
        3,
        -1, 1, 333,
-       52, 0, 277,
-       58, 0, 215
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row776[] = {
+static int parser_action_row800[] = {
        2,
-       -1, 3, 775,
-       98, 0, 928
+       -1, 3, 799,
+       98, 0, 952
 };
-static int parser_action_row777[] = {
+static int parser_action_row801[] = {
        2,
-       -1, 1, 455,
-       97, 0, 929
+       -1, 1, 461,
+       97, 0, 953
 };
-static int parser_action_row778[] = {
+static int parser_action_row802[] = {
        3,
-       -1, 1, 457,
+       -1, 1, 463,
        96, 0, 53,
-       97, 0, 930
+       97, 0, 954
 };
-static int parser_action_row779[] = {
+static int parser_action_row803[] = {
        1,
        -1, 1, 344
 };
-static int parser_action_row780[] = {
+static int parser_action_row804[] = {
        1,
        -1, 1, 279
 };
-static int parser_action_row781[] = {
+static int parser_action_row805[] = {
        1,
        -1, 1, 157
 };
-static int parser_action_row782[] = {
+static int parser_action_row806[] = {
        1,
        -1, 1, 156
 };
-static int parser_action_row783[] = {
+static int parser_action_row807[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row784[] = {
+static int parser_action_row808[] = {
        1,
-       -1, 1, 623
+       -1, 1, 635
 };
-static int parser_action_row785[] = {
+static int parser_action_row809[] = {
        3,
-       -1, 3, 784,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 808,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row786[] = {
+static int parser_action_row810[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row787[] = {
+static int parser_action_row811[] = {
        5,
        -1, 1, 81,
-       18, 0, 236,
-       19, 0, 237,
-       20, 0, 238,
-       21, 0, 239
+       18, 0, 254,
+       19, 0, 255,
+       20, 0, 256,
+       21, 0, 257
 };
-static int parser_action_row788[] = {
+static int parser_action_row812[] = {
        1,
-       -1, 1, 794
+       -1, 1, 812
 };
-static int parser_action_row789[] = {
+static int parser_action_row813[] = {
        3,
-       -1, 3, 788,
+       -1, 3, 812,
        96, 0, 53,
-       97, 0, 937
+       97, 0, 961
 };
-static int parser_action_row790[] = {
+static int parser_action_row814[] = {
        5,
        -1, 1, 81,
-       18, 0, 236,
-       19, 0, 237,
-       20, 0, 238,
-       21, 0, 239
+       18, 0, 254,
+       19, 0, 255,
+       20, 0, 256,
+       21, 0, 257
 };
-static int parser_action_row791[] = {
+static int parser_action_row815[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row792[] = {
+static int parser_action_row816[] = {
        2,
-       -1, 1, 408,
-       56, 0, 942
+       -1, 1, 414,
+       56, 0, 966
 };
-static int parser_action_row793[] = {
+static int parser_action_row817[] = {
        1,
-       -1, 1, 436
+       -1, 1, 442
 };
-static int parser_action_row794[] = {
+static int parser_action_row818[] = {
        1,
-       -1, 1, 435
+       -1, 1, 441
 };
-static int parser_action_row795[] = {
+static int parser_action_row819[] = {
        1,
-       -1, 1, 434
+       -1, 1, 440
 };
-static int parser_action_row796[] = {
+static int parser_action_row820[] = {
        3,
-       -1, 1, 405,
-       52, 0, 945,
-       94, 0, 204
+       -1, 1, 411,
+       52, 0, 969,
+       94, 0, 216
 };
-static int parser_action_row797[] = {
+static int parser_action_row821[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row798[] = {
+static int parser_action_row822[] = {
        2,
-       -1, 3, 797,
-       59, 0, 948
+       -1, 3, 821,
+       59, 0, 972
 };
-static int parser_action_row799[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row823[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 157,
+       9, 0, 169,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -9531,952 +10508,1048 @@ static int parser_action_row799[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row800[] = {
+static int parser_action_row824[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row801[] = {
+static int parser_action_row825[] = {
        1,
        -1, 1, 147
 };
-static int parser_action_row802[] = {
+static int parser_action_row826[] = {
        3,
-       -1, 3, 801,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 825,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row803[] = {
+static int parser_action_row827[] = {
        1,
        -1, 1, 200
 };
-static int parser_action_row804[] = {
+static int parser_action_row828[] = {
        2,
-       -1, 3, 803,
-       57, 0, 953
+       -1, 3, 827,
+       57, 0, 977
 };
-static int parser_action_row805[] = {
+static int parser_action_row829[] = {
        1,
-       -1, 1, 519
+       -1, 1, 525
 };
-static int parser_action_row806[] = {
+static int parser_action_row830[] = {
        25,
-       -1, 1, 458,
-       12, 0, 773,
-       46, 0, 669,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       96, 0, 53,
-       97, 0, 954
+       -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
 };
-static int parser_action_row807[] = {
+static int parser_action_row831[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row808[] = {
-       54,
-       -1, 1, 458,
-       12, 0, 170,
+static int parser_action_row832[] = {
+       60,
+       -1, 1, 464,
+       12, 0, 182,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 171,
+       22, 0, 183,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 172,
-       33, 0, 399,
-       34, 0, 400,
-       35, 0, 401,
-       36, 0, 402,
+       31, 0, 184,
+       33, 0, 423,
+       34, 0, 424,
+       35, 0, 425,
+       36, 0, 426,
        37, 0, 43,
-       38, 0, 173,
-       40, 0, 174,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 396,
-       48, 0, 175,
+       47, 0, 420,
+       48, 0, 187,
        50, 0, 49,
-       51, 0, 403,
+       51, 0, 427,
        52, 0, 51,
-       54, 0, 404,
-       74, 0, 405,
-       75, 0, 406,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 414,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       94, 0, 204,
-       96, 0, 424,
-       97, 0, 425,
+       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,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row809[] = {
+static int parser_action_row833[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row810[] = {
+static int parser_action_row834[] = {
        1,
-       -1, 1, 1075
+       -1, 1, 1099
 };
-static int parser_action_row811[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row812[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row813[] = {
+static int parser_action_row837[] = {
        14,
        -1, 1, 345,
-       52, 0, 277,
-       59, 0, 961,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row814[] = {
+static int parser_action_row838[] = {
        1,
-       -1, 1, 522
+       -1, 1, 528
 };
-static int parser_action_row815[] = {
+static int parser_action_row839[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row816[] = {
+static int parser_action_row840[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row817[] = {
+static int parser_action_row841[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row818[] = {
+static int parser_action_row842[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row819[] = {
-       25,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 446,
-       27, 0, 447,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row820[] = {
+static int parser_action_row844[] = {
        1,
-       -1, 1, 1077
+       -1, 1, 1101
 };
-static int parser_action_row821[] = {
+static int parser_action_row845[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row822[] = {
+static int parser_action_row846[] = {
        2,
-       -1, 1, 451,
-       58, 0, 215
+       -1, 1, 457,
+       58, 0, 227
 };
-static int parser_action_row823[] = {
+static int parser_action_row847[] = {
        2,
        -1, 1, 78,
-       14, 0, 969
+       14, 0, 993
 };
-static int parser_action_row824[] = {
+static int parser_action_row848[] = {
        2,
-       -1, 3, 823,
-       97, 0, 971
+       -1, 3, 847,
+       97, 0, 995
 };
-static int parser_action_row825[] = {
+static int parser_action_row849[] = {
        4,
-       -1, 3, 824,
-       0, 0, 88,
-       1, 0, 89,
-       95, 0, 90
+       -1, 3, 848,
+       0, 0, 94,
+       1, 0, 95,
+       95, 0, 96
 };
-static int parser_action_row826[] = {
+static int parser_action_row850[] = {
        2,
        -1, 1, 78,
-       14, 0, 969
+       14, 0, 993
 };
-static int parser_action_row827[] = {
+static int parser_action_row851[] = {
        2,
        -1, 1, 104,
-       59, 0, 974
+       59, 0, 998
 };
-static int parser_action_row828[] = {
+static int parser_action_row852[] = {
        1,
        -1, 1, 106
 };
-static int parser_action_row829[] = {
+static int parser_action_row853[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row830[] = {
+static int parser_action_row854[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row831[] = {
+static int parser_action_row855[] = {
        4,
        -1, 1, 124,
-       4, 0, 977,
-       14, 0, 978,
-       15, 0, 979
+       4, 0, 1001,
+       14, 0, 1002,
+       15, 0, 1003
 };
-static int parser_action_row832[] = {
+static int parser_action_row856[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row833[] = {
+static int parser_action_row857[] = {
        1,
        -1, 1, 112
 };
-static int parser_action_row834[] = {
+static int parser_action_row858[] = {
        2,
        -1, 1, 108,
-       59, 0, 827
+       59, 0, 851
 };
-static int parser_action_row835[] = {
+static int parser_action_row859[] = {
        1,
-       -1, 1, 464
+       -1, 1, 470
 };
-static int parser_action_row836[] = {
+static int parser_action_row860[] = {
        1,
-       -1, 1, 466
+       -1, 1, 472
 };
-static int parser_action_row837[] = {
+static int parser_action_row861[] = {
        22,
-       -1, 3, 836,
-       54, 0, 640,
-       74, 0, 641,
-       75, 0, 642,
-       76, 0, 643,
-       77, 0, 644,
-       78, 0, 645,
-       79, 0, 646,
-       80, 0, 647,
-       81, 0, 648,
-       82, 0, 649,
-       83, 0, 650,
-       84, 0, 651,
-       85, 0, 652,
-       86, 0, 653,
-       87, 0, 654,
-       88, 0, 655,
-       89, 0, 656,
-       90, 0, 657,
-       91, 0, 658,
-       92, 0, 659,
-       97, 0, 833
+       -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
 };
-static int parser_action_row838[] = {
+static int parser_action_row862[] = {
        2,
-       -1, 1, 459,
-       58, 0, 214
+       -1, 1, 465,
+       58, 0, 226
 };
-static int parser_action_row839[] = {
+static int parser_action_row863[] = {
        2,
-       -1, 3, 838,
-       58, 0, 215
+       -1, 3, 862,
+       58, 0, 227
 };
-static int parser_action_row840[] = {
+static int parser_action_row864[] = {
        7,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       28, 0, 84,
-       54, 0, 985,
+       28, 0, 90,
+       54, 0, 1009,
        95, 0, 3,
-       109, 0, 85
+       115, 0, 91
 };
-static int parser_action_row841[] = {
+static int parser_action_row865[] = {
        2,
-       -1, 3, 840,
-       96, 0, 995
+       -1, 3, 864,
+       96, 0, 1019
 };
-static int parser_action_row842[] = {
+static int parser_action_row866[] = {
        3,
-       -1, 3, 841,
-       96, 0, 996,
-       97, 0, 838
+       -1, 3, 865,
+       96, 0, 1020,
+       97, 0, 862
 };
-static int parser_action_row843[] = {
+static int parser_action_row867[] = {
        1,
-       -1, 1, 443
+       -1, 1, 449
 };
-static int parser_action_row844[] = {
+static int parser_action_row868[] = {
        1,
        -1, 1, 350
 };
-static int parser_action_row845[] = {
+static int parser_action_row869[] = {
        1,
        -1, 1, 192
 };
-static int parser_action_row846[] = {
+static int parser_action_row870[] = {
        3,
-       -1, 3, 845,
-       31, 0, 998,
-       52, 0, 999
+       -1, 3, 869,
+       31, 0, 1022,
+       52, 0, 1023
 };
-static int parser_action_row847[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row871[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row848[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row872[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row849[] = {
+static int parser_action_row873[] = {
        13,
        -1, 1, 332,
-       59, 0, 1002,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row850[] = {
+static int parser_action_row874[] = {
        1,
        -1, 1, 183
 };
-static int parser_action_row851[] = {
+static int parser_action_row875[] = {
        13,
        -1, 1, 330,
-       59, 0, 1004,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row852[] = {
-       25,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 486,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row853[] = {
-       39,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 335,
-       59, 0, 1007,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 335,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row854[] = {
-       25,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 486,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row855[] = {
-       40,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 339,
-       58, 0, 215,
-       59, 0, 1012,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 339,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row856[] = {
+static int parser_action_row880[] = {
        3,
-       -1, 1, 456,
-       12, 0, 1016,
-       97, 0, 1017
+       -1, 1, 462,
+       12, 0, 1040,
+       97, 0, 1041
 };
-static int parser_action_row857[] = {
+static int parser_action_row881[] = {
        1,
-       -1, 1, 398
+       -1, 1, 404
 };
-static int parser_action_row858[] = {
+static int parser_action_row882[] = {
        1,
-       -1, 1, 441
+       -1, 1, 447
 };
-static int parser_action_row859[] = {
+static int parser_action_row883[] = {
        2,
-       -1, 3, 858,
-       53, 0, 1018
+       -1, 3, 882,
+       53, 0, 1042
 };
-static int parser_action_row860[] = {
+static int parser_action_row884[] = {
        1,
        -1, 1, 219
 };
-static int parser_action_row861[] = {
+static int parser_action_row885[] = {
        1,
        -1, 1, 238
 };
-static int parser_action_row862[] = {
+static int parser_action_row886[] = {
        1,
        -1, 1, 223
 };
-static int parser_action_row863[] = {
+static int parser_action_row887[] = {
        1,
        -1, 1, 242
 };
-static int parser_action_row864[] = {
+static int parser_action_row888[] = {
        1,
        -1, 1, 222
 };
-static int parser_action_row865[] = {
+static int parser_action_row889[] = {
        1,
        -1, 1, 241
 };
-static int parser_action_row866[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row890[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row867[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row891[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row868[] = {
+static int parser_action_row892[] = {
        1,
-       -1, 1, 437
+       -1, 1, 443
 };
-static int parser_action_row869[] = {
+static int parser_action_row893[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row870[] = {
+static int parser_action_row894[] = {
        3,
-       -1, 3, 869,
+       -1, 3, 893,
        96, 0, 53,
-       97, 0, 1022
+       97, 0, 1046
 };
-static int parser_action_row871[] = {
+static int parser_action_row895[] = {
        2,
-       -1, 3, 870,
-       98, 0, 1025
+       -1, 3, 894,
+       98, 0, 1049
 };
-static int parser_action_row872[] = {
+static int parser_action_row896[] = {
        1,
        -1, 1, 368
 };
-static int parser_action_row873[] = {
+static int parser_action_row897[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row874[] = {
+static int parser_action_row898[] = {
        1,
-       -1, 1, 1084
+       -1, 1, 1108
 };
-static int parser_action_row875[] = {
+static int parser_action_row899[] = {
        2,
-       -1, 1, 445,
-       56, 0, 872
+       -1, 1, 451,
+       56, 0, 896
 };
-static int parser_action_row876[] = {
+static int parser_action_row900[] = {
        1,
-       -1, 1, 703
+       -1, 1, 715
 };
-static int parser_action_row877[] = {
+static int parser_action_row901[] = {
        1,
-       -1, 1, 765
+       -1, 1, 777
 };
-static int parser_action_row878[] = {
+static int parser_action_row902[] = {
        3,
-       -1, 3, 877,
-       31, 0, 1028,
-       52, 0, 1029
+       -1, 3, 901,
+       31, 0, 1052,
+       52, 0, 1053
 };
-static int parser_action_row879[] = {
+static int parser_action_row903[] = {
        1,
-       -1, 1, 747
+       -1, 1, 759
 };
-static int parser_action_row880[] = {
+static int parser_action_row904[] = {
        1,
-       -1, 1, 745
+       -1, 1, 757
 };
-static int parser_action_row881[] = {
+static int parser_action_row905[] = {
        2,
-       -1, 1, 750,
-       52, 0, 277
+       -1, 1, 762,
+       52, 0, 295
 };
-static int parser_action_row882[] = {
+static int parser_action_row906[] = {
        3,
-       -1, 1, 754,
-       52, 0, 277,
-       58, 0, 215
+       -1, 1, 766,
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row883[] = {
+static int parser_action_row907[] = {
        2,
-       -1, 1, 456,
-       97, 0, 1032
+       -1, 1, 462,
+       97, 0, 1056
 };
-static int parser_action_row884[] = {
+static int parser_action_row908[] = {
        1,
        -1, 1, 165
 };
-static int parser_action_row885[] = {
+static int parser_action_row909[] = {
        1,
        -1, 1, 205
 };
-static int parser_action_row886[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row910[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row887[] = {
+static int parser_action_row911[] = {
        1,
        -1, 1, 266
 };
-static int parser_action_row888[] = {
-       27,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 353,
        73, 1, 353,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row889[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row913[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1035,
-       12, 0, 887,
-       15, 0, 888,
+       9, 0, 1059,
+       12, 0, 911,
+       15, 0, 912,
        16, 0, 34,
-       22, 0, 889,
-       25, 0, 891,
-       26, 0, 892,
-       27, 0, 893,
-       33, 0, 894,
-       34, 0, 895,
-       35, 0, 896,
-       36, 0, 897,
-       37, 0, 898,
+       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,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 899,
-       51, 0, 900,
+       50, 0, 923,
+       51, 0, 924,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 901,
+       97, 0, 925,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row890[] = {
+static int parser_action_row914[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row891[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row915[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -10506,230 +11579,260 @@ static int parser_action_row891[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row892[] = {
+static int parser_action_row916[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row893[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row917[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1035,
-       12, 0, 887,
-       15, 0, 888,
+       9, 0, 1059,
+       12, 0, 911,
+       15, 0, 912,
        16, 0, 34,
-       22, 0, 889,
-       25, 0, 891,
-       26, 0, 892,
-       27, 0, 893,
-       33, 0, 894,
-       34, 0, 895,
-       35, 0, 896,
-       36, 0, 897,
-       37, 0, 898,
+       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,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 899,
-       51, 0, 900,
+       50, 0, 923,
+       51, 0, 924,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 901,
+       97, 0, 925,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row894[] = {
+static int parser_action_row918[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row895[] = {
-       27,
+static int parser_action_row919[] = {
+       33,
        -1, 1, 169,
-       12, 0, 170,
-       22, 0, 171,
-       24, 1, 900,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+       12, 0, 182,
+       22, 0, 183,
+       24, 1, 924,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row896[] = {
+static int parser_action_row920[] = {
        3,
        -1, 1, 174,
-       24, 1, 905,
-       49, 0, 197
+       24, 1, 929,
+       49, 0, 209
 };
-static int parser_action_row897[] = {
+static int parser_action_row921[] = {
        3,
        -1, 1, 171,
-       24, 1, 902,
-       49, 0, 197
+       24, 1, 926,
+       49, 0, 209
 };
-static int parser_action_row898[] = {
+static int parser_action_row922[] = {
        2,
        -1, 1, 173,
-       24, 1, 904
+       24, 1, 928
 };
-static int parser_action_row899[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row923[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 200,
+       97, 0, 212,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row900[] = {
+static int parser_action_row924[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row901[] = {
+static int parser_action_row925[] = {
        2,
-       -1, 3, 900,
-       11, 0, 1052
+       -1, 3, 924,
+       11, 0, 1076
 };
-static int parser_action_row902[] = {
-       40,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 341,
-       58, 0, 215,
-       59, 0, 216,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 341,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row903[] = {
+static int parser_action_row927[] = {
        1,
        -1, 1, 259
 };
-static int parser_action_row904[] = {
+static int parser_action_row928[] = {
        2,
        -1, 1, 167,
-       24, 1, 898
+       24, 1, 922
 };
-static int parser_action_row905[] = {
+static int parser_action_row929[] = {
        2,
        -1, 1, 168,
-       24, 1, 899
+       24, 1, 923
 };
-static int parser_action_row906[] = {
+static int parser_action_row930[] = {
        1,
        -1, 1, 264
 };
-static int parser_action_row907[] = {
+static int parser_action_row931[] = {
        3,
-       -1, 3, 906,
-       54, 0, 244,
-       73, 0, 1054
+       -1, 3, 930,
+       54, 0, 262,
+       73, 0, 1078
 };
-static int parser_action_row908[] = {
+static int parser_action_row932[] = {
        3,
-       -1, 3, 907,
-       41, 0, 1055,
-       98, 0, 255
+       -1, 3, 931,
+       41, 0, 1079,
+       98, 0, 273
 };
-static int parser_action_row909[] = {
+static int parser_action_row933[] = {
        3,
-       -1, 1, 455,
-       12, 0, 1056,
-       97, 0, 1057
+       -1, 1, 461,
+       12, 0, 1080,
+       97, 0, 1081
 };
-static int parser_action_row910[] = {
-       32,
-       -1, 1, 458,
-       9, 0, 886,
+static int parser_action_row934[] = {
+       38,
+       -1, 1, 464,
+       9, 0, 910,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
        22, 0, 35,
-       24, 0, 1058,
+       24, 0, 1082,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
@@ -10754,531 +11857,567 @@ static int parser_action_row910[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row911[] = {
+static int parser_action_row935[] = {
        2,
-       -1, 3, 910,
-       24, 0, 1062
+       -1, 3, 934,
+       24, 0, 1086
 };
-static int parser_action_row912[] = {
+static int parser_action_row936[] = {
        1,
-       -1, 1, 907
+       -1, 1, 931
 };
-static int parser_action_row913[] = {
+static int parser_action_row937[] = {
        1,
-       -1, 1, 908
+       -1, 1, 932
 };
-static int parser_action_row914[] = {
+static int parser_action_row938[] = {
        1,
-       -1, 1, 910
+       -1, 1, 934
 };
-static int parser_action_row915[] = {
+static int parser_action_row939[] = {
        1,
-       -1, 1, 909
+       -1, 1, 933
 };
-static int parser_action_row916[] = {
+static int parser_action_row940[] = {
        1,
-       -1, 1, 911
+       -1, 1, 935
 };
-static int parser_action_row917[] = {
+static int parser_action_row941[] = {
        1,
-       -1, 1, 912
+       -1, 1, 936
 };
-static int parser_action_row918[] = {
+static int parser_action_row942[] = {
        1,
-       -1, 1, 913
+       -1, 1, 937
 };
-static int parser_action_row919[] = {
+static int parser_action_row943[] = {
        4,
-       -1, 1, 457,
-       12, 0, 1063,
+       -1, 1, 463,
+       12, 0, 1087,
        96, 0, 53,
-       97, 0, 1064
+       97, 0, 1088
 };
-static int parser_action_row920[] = {
+static int parser_action_row944[] = {
        1,
        -1, 1, 270
 };
-static int parser_action_row921[] = {
+static int parser_action_row945[] = {
        2,
-       -1, 3, 920,
-       49, 0, 197
+       -1, 3, 944,
+       49, 0, 209
 };
-static int parser_action_row922[] = {
+static int parser_action_row946[] = {
        2,
-       -1, 3, 921,
-       53, 0, 1067
+       -1, 3, 945,
+       53, 0, 1091
 };
-static int parser_action_row923[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row947[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row924[] = {
+static int parser_action_row948[] = {
        1,
-       -1, 1, 450
+       -1, 1, 456
 };
-static int parser_action_row925[] = {
+static int parser_action_row949[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row926[] = {
+static int parser_action_row950[] = {
        2,
-       -1, 3, 925,
-       98, 0, 1070
+       -1, 3, 949,
+       98, 0, 1094
 };
-static int parser_action_row927[] = {
+static int parser_action_row951[] = {
        1,
        -1, 1, 288
 };
-static int parser_action_row928[] = {
+static int parser_action_row952[] = {
        1,
        -1, 1, 332
 };
-static int parser_action_row929[] = {
+static int parser_action_row953[] = {
        1,
        -1, 1, 330
 };
-static int parser_action_row930[] = {
+static int parser_action_row954[] = {
        2,
        -1, 1, 335,
-       52, 0, 277
+       52, 0, 295
 };
-static int parser_action_row931[] = {
+static int parser_action_row955[] = {
        3,
        -1, 1, 339,
-       52, 0, 277,
-       58, 0, 215
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row932[] = {
+static int parser_action_row956[] = {
        2,
-       -1, 1, 456,
-       97, 0, 1073
+       -1, 1, 462,
+       97, 0, 1097
 };
-static int parser_action_row933[] = {
+static int parser_action_row957[] = {
        3,
-       -1, 3, 932,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 956,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row934[] = {
+static int parser_action_row958[] = {
        2,
        -1, 1, 150,
-       56, 0, 1075
+       56, 0, 1099
 };
-static int parser_action_row935[] = {
+static int parser_action_row959[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row936[] = {
+static int parser_action_row960[] = {
        2,
        -1, 1, 30,
        13, 0, 32
 };
-static int parser_action_row937[] = {
+static int parser_action_row961[] = {
        4,
-       -1, 3, 936,
-       6, 0, 792,
-       17, 0, 793,
-       97, 0, 794
+       -1, 3, 960,
+       6, 0, 816,
+       17, 0, 817,
+       97, 0, 818
 };
-static int parser_action_row938[] = {
+static int parser_action_row962[] = {
        3,
        -1, 1, 356,
-       52, 0, 277,
-       58, 0, 215
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row939[] = {
+static int parser_action_row963[] = {
        2,
-       -1, 3, 938,
-       97, 0, 1082
+       -1, 3, 962,
+       97, 0, 1106
 };
-static int parser_action_row940[] = {
+static int parser_action_row964[] = {
        3,
-       -1, 3, 939,
+       -1, 3, 963,
        96, 0, 53,
-       97, 0, 1083
+       97, 0, 1107
 };
-static int parser_action_row941[] = {
+static int parser_action_row965[] = {
        4,
-       -1, 3, 940,
-       6, 0, 792,
-       17, 0, 793,
-       97, 0, 794
+       -1, 3, 964,
+       6, 0, 816,
+       17, 0, 817,
+       97, 0, 818
 };
-static int parser_action_row942[] = {
+static int parser_action_row966[] = {
        2,
-       -1, 3, 941,
-       53, 0, 1086
+       -1, 3, 965,
+       53, 0, 1110
 };
-static int parser_action_row943[] = {
+static int parser_action_row967[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row944[] = {
+static int parser_action_row968[] = {
        1,
-       -1, 1, 1080
+       -1, 1, 1104
 };
-static int parser_action_row945[] = {
+static int parser_action_row969[] = {
        2,
-       -1, 1, 409,
-       56, 0, 942
+       -1, 1, 415,
+       56, 0, 966
 };
-static int parser_action_row946[] = {
+static int parser_action_row970[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row947[] = {
+static int parser_action_row971[] = {
        1,
-       -1, 1, 406
+       -1, 1, 412
 };
-static int parser_action_row948[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row972[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row949[] = {
+static int parser_action_row973[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row950[] = {
+static int parser_action_row974[] = {
        1,
        -1, 1, 274
 };
-static int parser_action_row951[] = {
+static int parser_action_row975[] = {
        2,
-       -1, 3, 950,
-       49, 0, 197
+       -1, 3, 974,
+       49, 0, 209
 };
-static int parser_action_row952[] = {
+static int parser_action_row976[] = {
        3,
-       -1, 3, 951,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 975,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row953[] = {
+static int parser_action_row977[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row954[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row978[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row955[] = {
+static int parser_action_row979[] = {
        15,
        -1, 1, 333,
-       52, 0, 277,
-       58, 0, 215,
-       59, 0, 1096,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row956[] = {
+static int parser_action_row980[] = {
        22,
-       -1, 1, 455,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       97, 0, 1097
+       -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
 };
-static int parser_action_row957[] = {
+static int parser_action_row981[] = {
        1,
-       -1, 1, 431
+       -1, 1, 437
 };
-static int parser_action_row958[] = {
+static int parser_action_row982[] = {
        23,
-       -1, 1, 457,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       96, 0, 53,
-       97, 0, 1098
+       -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
 };
-static int parser_action_row959[] = {
+static int parser_action_row983[] = {
        1,
-       -1, 1, 384
+       -1, 1, 390
 };
-static int parser_action_row960[] = {
+static int parser_action_row984[] = {
        1,
-       -1, 1, 386
+       -1, 1, 392
 };
-static int parser_action_row961[] = {
+static int parser_action_row985[] = {
        1,
-       -1, 1, 383
+       -1, 1, 389
 };
-static int parser_action_row962[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row963[] = {
+static int parser_action_row987[] = {
        2,
-       -1, 3, 962,
-       23, 0, 1100
+       -1, 3, 986,
+       23, 0, 1124
 };
-static int parser_action_row964[] = {
+static int parser_action_row988[] = {
        2,
-       -1, 3, 963,
-       28, 0, 1101
+       -1, 3, 987,
+       28, 0, 1125
 };
-static int parser_action_row965[] = {
-       23,
-       -1, 1, 458,
-       12, 0, 1102,
-       22, 0, 1103,
-       31, 0, 1104,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row966[] = {
+static int parser_action_row990[] = {
        1,
-       -1, 1, 382
+       -1, 1, 388
 };
-static int parser_action_row967[] = {
+static int parser_action_row991[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row968[] = {
+static int parser_action_row992[] = {
        1,
-       -1, 1, 389
+       -1, 1, 395
 };
-static int parser_action_row969[] = {
+static int parser_action_row993[] = {
        2,
-       -1, 3, 968,
-       97, 0, 1142
+       -1, 3, 992,
+       97, 0, 1172
 };
-static int parser_action_row970[] = {
+static int parser_action_row994[] = {
        5,
        -1, 1, 30,
-       0, 0, 88,
-       1, 0, 89,
+       0, 0, 94,
+       1, 0, 95,
        13, 0, 32,
-       95, 0, 90
+       95, 0, 96
 };
-static int parser_action_row971[] = {
+static int parser_action_row995[] = {
        4,
-       -1, 3, 970,
-       0, 0, 88,
-       1, 0, 89,
-       95, 0, 90
+       -1, 3, 994,
+       0, 0, 94,
+       1, 0, 95,
+       95, 0, 96
 };
-static int parser_action_row972[] = {
+static int parser_action_row996[] = {
        2,
-       -1, 1, 452,
-       58, 0, 215
+       -1, 1, 458,
+       58, 0, 227
 };
-static int parser_action_row973[] = {
+static int parser_action_row997[] = {
        1,
        -1, 1, 18
 };
-static int parser_action_row974[] = {
+static int parser_action_row998[] = {
        4,
-       -1, 3, 973,
-       0, 0, 88,
-       1, 0, 89,
-       95, 0, 90
+       -1, 3, 997,
+       0, 0, 94,
+       1, 0, 95,
+       95, 0, 96
 };
-static int parser_action_row975[] = {
+static int parser_action_row999[] = {
        1,
        -1, 1, 107
 };
-static int parser_action_row976[] = {
+static int parser_action_row1000[] = {
        2,
        -1, 1, 115,
-       97, 0, 1148
+       97, 0, 1178
 };
-static int parser_action_row977[] = {
+static int parser_action_row1001[] = {
        3,
-       -1, 3, 976,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 1000,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row978[] = {
+static int parser_action_row1002[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row979[] = {
+static int parser_action_row1003[] = {
        5,
        -1, 1, 30,
-       0, 0, 88,
-       1, 0, 89,
+       0, 0, 94,
+       1, 0, 95,
        13, 0, 32,
-       95, 0, 90
+       95, 0, 96
 };
-static int parser_action_row980[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1004[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -11308,595 +12447,673 @@ static int parser_action_row980[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row981[] = {
+static int parser_action_row1005[] = {
        3,
        -1, 1, 124,
-       4, 0, 977,
-       15, 0, 1156
+       4, 0, 1001,
+       15, 0, 1186
 };
-static int parser_action_row982[] = {
+static int parser_action_row1006[] = {
        3,
-       -1, 3, 981,
-       28, 0, 84,
-       109, 0, 85
+       -1, 3, 1005,
+       28, 0, 90,
+       115, 0, 91
 };
-static int parser_action_row983[] = {
+static int parser_action_row1007[] = {
        1,
-       -1, 1, 493
+       -1, 1, 499
 };
-static int parser_action_row984[] = {
+static int parser_action_row1008[] = {
        1,
        -1, 1, 111
 };
-static int parser_action_row985[] = {
+static int parser_action_row1009[] = {
        1,
-       -1, 1, 465
+       -1, 1, 471
 };
-static int parser_action_row986[] = {
+static int parser_action_row1010[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row987[] = {
+static int parser_action_row1011[] = {
        2,
        -1, 1, 75,
        9, 1, 45
 };
-static int parser_action_row988[] = {
+static int parser_action_row1012[] = {
        2,
-       -1, 3, 987,
-       9, 0, 1160
+       -1, 3, 1011,
+       9, 0, 1190
 };
-static int parser_action_row989[] = {
+static int parser_action_row1013[] = {
        1,
-       -1, 1, 1062
+       -1, 1, 1086
 };
-static int parser_action_row990[] = {
+static int parser_action_row1014[] = {
        4,
-       -1, 3, 989,
-       0, 0, 88,
-       1, 0, 89,
-       95, 0, 90
+       -1, 3, 1013,
+       0, 0, 94,
+       1, 0, 95,
+       95, 0, 96
 };
-static int parser_action_row991[] = {
+static int parser_action_row1015[] = {
        4,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row992[] = {
+static int parser_action_row1016[] = {
        1,
        -1, 1, 74
 };
-static int parser_action_row993[] = {
+static int parser_action_row1017[] = {
        1,
-       -1, 1, 486
+       -1, 1, 492
 };
-static int parser_action_row994[] = {
+static int parser_action_row1018[] = {
        5,
        -1, 1, 30,
-       6, 0, 1163,
+       6, 0, 1193,
        9, 1, 46,
        13, 0, 32,
-       97, 0, 1164
+       97, 0, 1194
 };
-static int parser_action_row995[] = {
+static int parser_action_row1019[] = {
        5,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       9, 1, 487,
+       9, 1, 493,
        95, 0, 3
 };
-static int parser_action_row996[] = {
+static int parser_action_row1020[] = {
        1,
-       -1, 1, 460
+       -1, 1, 466
 };
-static int parser_action_row997[] = {
+static int parser_action_row1021[] = {
        2,
-       -1, 1, 462,
-       58, 0, 214
+       -1, 1, 468,
+       58, 0, 226
 };
-static int parser_action_row998[] = {
+static int parser_action_row1022[] = {
        2,
-       -1, 3, 997,
-       96, 0, 1171
+       -1, 3, 1021,
+       96, 0, 1201
 };
-static int parser_action_row999[] = {
+static int parser_action_row1023[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1000[] = {
+static int parser_action_row1024[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1001[] = {
+static int parser_action_row1025[] = {
        1,
        -1, 1, 210
 };
-static int parser_action_row1002[] = {
+static int parser_action_row1026[] = {
        1,
        -1, 1, 229
 };
-static int parser_action_row1003[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1027[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1004[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1028[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1005[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1029[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1006[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1030[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1007[] = {
+static int parser_action_row1031[] = {
        1,
        -1, 1, 194
 };
-static int parser_action_row1008[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1032[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1009[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1033[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1010[] = {
+static int parser_action_row1034[] = {
        13,
        -1, 1, 334,
-       59, 0, 1180,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row1011[] = {
+static int parser_action_row1035[] = {
        1,
        -1, 1, 184
 };
-static int parser_action_row1012[] = {
+static int parser_action_row1036[] = {
        1,
        -1, 1, 196
 };
-static int parser_action_row1013[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1037[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1014[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1038[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1015[] = {
+static int parser_action_row1039[] = {
        13,
        -1, 1, 338,
-       59, 0, 1184,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row1016[] = {
+static int parser_action_row1040[] = {
        1,
        -1, 1, 186
 };
-static int parser_action_row1017[] = {
-       25,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 486,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row1018[] = {
-       39,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 337,
-       59, 0, 1187,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 337,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row1019[] = {
+static int parser_action_row1043[] = {
        1,
-       -1, 1, 439
+       -1, 1, 445
 };
-static int parser_action_row1020[] = {
+static int parser_action_row1044[] = {
        1,
        -1, 1, 221
 };
-static int parser_action_row1021[] = {
+static int parser_action_row1045[] = {
        1,
        -1, 1, 240
 };
-static int parser_action_row1022[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1046[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1023[] = {
+static int parser_action_row1047[] = {
        3,
-       -1, 1, 771,
-       52, 0, 277,
-       58, 0, 215
+       -1, 1, 783,
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row1024[] = {
+static int parser_action_row1048[] = {
        2,
-       -1, 3, 1023,
-       97, 0, 1193
+       -1, 3, 1047,
+       97, 0, 1223
 };
-static int parser_action_row1025[] = {
+static int parser_action_row1049[] = {
        3,
-       -1, 3, 1024,
+       -1, 3, 1048,
        96, 0, 53,
-       97, 0, 1194
+       97, 0, 1224
 };
-static int parser_action_row1026[] = {
+static int parser_action_row1050[] = {
        3,
-       -1, 1, 742,
-       54, 1, 745,
-       73, 1, 745
+       -1, 1, 754,
+       54, 1, 757,
+       73, 1, 757
 };
-static int parser_action_row1027[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1051[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 513,
+       97, 0, 537,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1028[] = {
+static int parser_action_row1052[] = {
        1,
-       -1, 1, 1085
+       -1, 1, 1109
 };
-static int parser_action_row1029[] = {
+static int parser_action_row1053[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1030[] = {
+static int parser_action_row1054[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1031[] = {
+static int parser_action_row1055[] = {
        1,
-       -1, 1, 749
+       -1, 1, 761
 };
-static int parser_action_row1032[] = {
+static int parser_action_row1056[] = {
        1,
-       -1, 1, 753
+       -1, 1, 765
 };
-static int parser_action_row1033[] = {
+static int parser_action_row1057[] = {
        2,
-       -1, 1, 752,
-       52, 0, 277
+       -1, 1, 764,
+       52, 0, 295
 };
-static int parser_action_row1034[] = {
+static int parser_action_row1058[] = {
        1,
        -1, 1, 206
 };
-static int parser_action_row1035[] = {
+static int parser_action_row1059[] = {
        2,
        -1, 1, 193,
-       24, 1, 924
+       24, 1, 948
 };
-static int parser_action_row1036[] = {
+static int parser_action_row1060[] = {
        3,
        -1, 1, 158,
-       24, 1, 896,
-       49, 1, 981
+       24, 1, 920,
+       49, 1, 1005
 };
-static int parser_action_row1037[] = {
-       31,
-       -1, 1, 458,
-       9, 0, 1200,
+static int parser_action_row1061[] = {
+       37,
+       -1, 1, 464,
+       9, 0, 1230,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -11925,291 +13142,339 @@ static int parser_action_row1037[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1038[] = {
+static int parser_action_row1062[] = {
        1,
-       -1, 1, 933
+       -1, 1, 957
 };
-static int parser_action_row1039[] = {
+static int parser_action_row1063[] = {
        1,
-       -1, 1, 897
+       -1, 1, 921
 };
-static int parser_action_row1040[] = {
+static int parser_action_row1064[] = {
        2,
-       -1, 3, 1039,
-       49, 0, 197
+       -1, 3, 1063,
+       49, 0, 209
 };
-static int parser_action_row1041[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1065[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1042[] = {
+static int parser_action_row1066[] = {
        1,
        -1, 1, 261
 };
-static int parser_action_row1043[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1067[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1044[] = {
+static int parser_action_row1068[] = {
        1,
-       -1, 1, 936
+       -1, 1, 960
 };
-static int parser_action_row1045[] = {
+static int parser_action_row1069[] = {
        2,
-       -1, 3, 1044,
-       49, 0, 197
+       -1, 3, 1068,
+       49, 0, 209
 };
-static int parser_action_row1046[] = {
+static int parser_action_row1070[] = {
        3,
-       -1, 3, 1045,
-       52, 0, 340,
-       97, 0, 341
+       -1, 3, 1069,
+       52, 0, 364,
+       97, 0, 365
 };
-static int parser_action_row1047[] = {
+static int parser_action_row1071[] = {
        2,
        -1, 1, 170,
-       24, 1, 901
+       24, 1, 925
 };
-static int parser_action_row1048[] = {
+static int parser_action_row1072[] = {
        2,
        -1, 1, 175,
-       24, 1, 906
+       24, 1, 930
 };
-static int parser_action_row1049[] = {
+static int parser_action_row1073[] = {
        2,
        -1, 1, 172,
-       24, 1, 903
+       24, 1, 927
 };
-static int parser_action_row1050[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1074[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1051[] = {
+static int parser_action_row1075[] = {
        2,
        -1, 1, 280,
-       24, 0, 1208
+       24, 0, 1238
 };
-static int parser_action_row1052[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1076[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 393,
+       97, 0, 417,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1053[] = {
+static int parser_action_row1077[] = {
        3,
-       -1, 3, 1052,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 1076,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row1054[] = {
+static int parser_action_row1078[] = {
        2,
        -1, 1, 187,
-       24, 1, 918
+       24, 1, 942
 };
-static int parser_action_row1055[] = {
+static int parser_action_row1079[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1056[] = {
-       27,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 349,
        73, 1, 349,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row1057[] = {
-       25,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 486,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row1058[] = {
-       39,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 343,
-       59, 0, 488,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 343,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row1059[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1083[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -12239,31 +13504,37 @@ static int parser_action_row1059[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1060[] = {
+static int parser_action_row1084[] = {
        3,
-       -1, 3, 1059,
-       9, 0, 886,
-       24, 0, 1216
+       -1, 3, 1083,
+       9, 0, 910,
+       24, 0, 1246
 };
-static int parser_action_row1061[] = {
+static int parser_action_row1085[] = {
        4,
-       -1, 3, 1060,
+       -1, 3, 1084,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1062[] = {
+static int parser_action_row1086[] = {
        1,
        -1, 1, 265
 };
-static int parser_action_row1063[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1087[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -12293,828 +13564,930 @@ static int parser_action_row1063[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1064[] = {
-       25,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 486,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row1065[] = {
-       40,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 347,
-       58, 0, 215,
-       59, 0, 493,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 347,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row1066[] = {
+static int parser_action_row1090[] = {
        3,
-       -1, 1, 456,
-       12, 0, 1222,
-       97, 0, 1223
+       -1, 1, 462,
+       12, 0, 1252,
+       97, 0, 1253
 };
-static int parser_action_row1067[] = {
+static int parser_action_row1091[] = {
        1,
        -1, 1, 269
 };
-static int parser_action_row1068[] = {
+static int parser_action_row1092[] = {
        1,
-       -1, 1, 447
+       -1, 1, 453
 };
-static int parser_action_row1069[] = {
+static int parser_action_row1093[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1070[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1094[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1071[] = {
+static int parser_action_row1095[] = {
        3,
        -1, 1, 327,
        54, 1, 330,
        73, 1, 330
 };
-static int parser_action_row1072[] = {
+static int parser_action_row1096[] = {
        1,
        -1, 1, 334
 };
-static int parser_action_row1073[] = {
+static int parser_action_row1097[] = {
        1,
        -1, 1, 338
 };
-static int parser_action_row1074[] = {
+static int parser_action_row1098[] = {
        2,
        -1, 1, 337,
-       52, 0, 277
+       52, 0, 295
 };
-static int parser_action_row1075[] = {
+static int parser_action_row1099[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1076[] = {
+static int parser_action_row1100[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1077[] = {
+static int parser_action_row1101[] = {
        1,
-       -1, 1, 1070
+       -1, 1, 1094
 };
-static int parser_action_row1078[] = {
+static int parser_action_row1102[] = {
        2,
        -1, 1, 151,
-       56, 0, 1075
+       56, 0, 1099
 };
-static int parser_action_row1079[] = {
+static int parser_action_row1103[] = {
        2,
-       -1, 3, 1078,
-       55, 0, 1230
+       -1, 3, 1102,
+       55, 0, 1260
 };
-static int parser_action_row1080[] = {
+static int parser_action_row1104[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1081[] = {
+static int parser_action_row1105[] = {
        2,
-       -1, 1, 797,
-       94, 0, 594
+       -1, 1, 815,
+       94, 0, 618
 };
-static int parser_action_row1082[] = {
+static int parser_action_row1106[] = {
        1,
        -1, 1, 355
 };
-static int parser_action_row1083[] = {
+static int parser_action_row1107[] = {
        2,
        -1, 1, 358,
-       52, 0, 277
+       52, 0, 295
 };
-static int parser_action_row1084[] = {
+static int parser_action_row1108[] = {
        3,
        -1, 1, 362,
-       52, 0, 277,
-       58, 0, 215
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row1085[] = {
+static int parser_action_row1109[] = {
        2,
-       -1, 3, 1084,
-       97, 0, 1235
+       -1, 3, 1108,
+       97, 0, 1265
 };
-static int parser_action_row1086[] = {
-       13,
-       -1, 1, 405,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       52, 0, 1236,
-       94, 0, 204,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row1087[] = {
+static int parser_action_row1111[] = {
        1,
-       -1, 1, 403
+       -1, 1, 409
 };
-static int parser_action_row1088[] = {
+static int parser_action_row1112[] = {
        2,
        -1, 1, 30,
        13, 0, 32
 };
-static int parser_action_row1089[] = {
+static int parser_action_row1113[] = {
        1,
-       -1, 1, 1081
+       -1, 1, 1105
 };
-static int parser_action_row1090[] = {
-       54,
-       -1, 1, 458,
-       12, 0, 170,
+static int parser_action_row1114[] = {
+       60,
+       -1, 1, 464,
+       12, 0, 182,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 171,
+       22, 0, 183,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 172,
-       33, 0, 399,
-       34, 0, 400,
-       35, 0, 401,
-       36, 0, 402,
+       31, 0, 184,
+       33, 0, 423,
+       34, 0, 424,
+       35, 0, 425,
+       36, 0, 426,
        37, 0, 43,
-       38, 0, 173,
-       40, 0, 174,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 396,
-       48, 0, 175,
+       47, 0, 420,
+       48, 0, 187,
        50, 0, 49,
-       51, 0, 403,
+       51, 0, 427,
        52, 0, 51,
-       54, 0, 404,
-       74, 0, 405,
-       75, 0, 406,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 414,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       94, 0, 204,
-       96, 0, 424,
-       97, 0, 425,
+       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,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1091[] = {
+static int parser_action_row1115[] = {
        1,
        -1, 1, 275
 };
-static int parser_action_row1092[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1116[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1093[] = {
+static int parser_action_row1117[] = {
        1,
        -1, 1, 273
 };
-static int parser_action_row1094[] = {
+static int parser_action_row1118[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1095[] = {
+static int parser_action_row1119[] = {
        2,
-       -1, 3, 1094,
-       55, 0, 1245
+       -1, 3, 1118,
+       55, 0, 1275
 };
-static int parser_action_row1096[] = {
+static int parser_action_row1120[] = {
        1,
-       -1, 1, 1000
+       -1, 1, 1024
 };
-static int parser_action_row1097[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1098[] = {
+static int parser_action_row1122[] = {
        14,
        -1, 1, 335,
-       52, 0, 277,
-       59, 0, 1246,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row1099[] = {
+static int parser_action_row1123[] = {
        15,
        -1, 1, 339,
-       52, 0, 277,
-       58, 0, 215,
-       59, 0, 1247,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row1100[] = {
+static int parser_action_row1124[] = {
        22,
-       -1, 1, 456,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       97, 0, 1248
+       -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
 };
-static int parser_action_row1101[] = {
+static int parser_action_row1125[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1102[] = {
+static int parser_action_row1126[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1103[] = {
+static int parser_action_row1127[] = {
        2,
-       -1, 1, 596,
-       52, 0, 277
+       -1, 1, 602,
+       52, 0, 295
 };
-static int parser_action_row1104[] = {
+static int parser_action_row1128[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1105[] = {
+static int parser_action_row1129[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1106[] = {
+static int parser_action_row1130[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1107[] = {
+static int parser_action_row1131[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1108[] = {
+static int parser_action_row1132[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1109[] = {
+static int parser_action_row1133[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1110[] = {
+static int parser_action_row1134[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1111[] = {
+static int parser_action_row1135[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1112[] = {
-       16,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1260,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
+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,
        52, 0, 51,
        96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1113[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1114[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1115[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1116[] = {
+static int parser_action_row1140[] = {
        3,
-       -1, 1, 578,
-       52, 0, 277,
-       58, 0, 215
+       -1, 1, 584,
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row1117[] = {
+static int parser_action_row1141[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1118[] = {
+static int parser_action_row1142[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1119[] = {
+static int parser_action_row1143[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1120[] = {
+static int parser_action_row1144[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1121[] = {
+static int parser_action_row1145[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1122[] = {
+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[] = {
        1,
-       -1, 1, 621
+       -1, 1, 633
 };
-static int parser_action_row1123[] = {
+static int parser_action_row1153[] = {
        1,
-       -1, 1, 620
+       -1, 1, 632
 };
-static int parser_action_row1124[] = {
+static int parser_action_row1154[] = {
        3,
-       -1, 3, 1123,
-       41, 0, 1272,
-       98, 0, 1273
+       -1, 3, 1153,
+       41, 0, 1308,
+       98, 0, 1309
 };
-static int parser_action_row1125[] = {
+static int parser_action_row1155[] = {
        2,
-       -1, 1, 455,
-       97, 0, 1274
+       -1, 1, 461,
+       97, 0, 1310
 };
-static int parser_action_row1126[] = {
+static int parser_action_row1156[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1127[] = {
+static int parser_action_row1157[] = {
        4,
-       -1, 1, 526,
-       29, 0, 1276,
-       30, 0, 1277,
-       32, 0, 1278
+       -1, 1, 532,
+       29, 0, 1312,
+       30, 0, 1313,
+       32, 0, 1314
 };
-static int parser_action_row1128[] = {
+static int parser_action_row1158[] = {
        1,
-       -1, 1, 528
+       -1, 1, 534
 };
-static int parser_action_row1129[] = {
+static int parser_action_row1159[] = {
        1,
-       -1, 1, 533
+       -1, 1, 539
 };
-static int parser_action_row1130[] = {
+static int parser_action_row1160[] = {
        10,
-       -1, 1, 535,
-       39, 0, 1279,
-       80, 0, 1280,
-       84, 0, 1281,
-       85, 0, 1282,
-       86, 0, 1283,
-       87, 0, 1284,
-       89, 0, 1285,
-       90, 0, 1286,
-       92, 0, 1287
+       -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
 };
-static int parser_action_row1131[] = {
+static int parser_action_row1161[] = {
        2,
-       -1, 1, 544,
-       81, 0, 1288
+       -1, 1, 550,
+       81, 0, 1324
 };
-static int parser_action_row1132[] = {
+static int parser_action_row1162[] = {
        2,
-       -1, 1, 546,
-       82, 0, 1289
+       -1, 1, 552,
+       82, 0, 1325
 };
-static int parser_action_row1133[] = {
+static int parser_action_row1163[] = {
        3,
-       -1, 1, 548,
-       88, 0, 1290,
-       91, 0, 1291
+       -1, 1, 554,
+       88, 0, 1326,
+       91, 0, 1327
 };
-static int parser_action_row1134[] = {
+static int parser_action_row1164[] = {
        3,
-       -1, 1, 550,
-       74, 0, 1292,
-       75, 0, 1293
+       -1, 1, 556,
+       74, 0, 1328,
+       75, 0, 1329
 };
-static int parser_action_row1135[] = {
+static int parser_action_row1165[] = {
        4,
-       -1, 1, 553,
-       76, 0, 1294,
-       78, 0, 1295,
-       79, 0, 1296
+       -1, 1, 559,
+       76, 0, 1330,
+       78, 0, 1331,
+       79, 0, 1332
 };
-static int parser_action_row1136[] = {
+static int parser_action_row1166[] = {
        1,
-       -1, 1, 556
+       -1, 1, 562
 };
-static int parser_action_row1137[] = {
+static int parser_action_row1167[] = {
        2,
-       -1, 1, 560,
-       77, 0, 1297
+       -1, 1, 566,
+       77, 0, 1333
 };
-static int parser_action_row1138[] = {
+static int parser_action_row1168[] = {
        1,
-       -1, 1, 562
+       -1, 1, 568
 };
-static int parser_action_row1139[] = {
+static int parser_action_row1169[] = {
        2,
-       -1, 1, 567,
-       73, 0, 1298
+       -1, 1, 573,
+       73, 0, 1334
 };
-static int parser_action_row1140[] = {
+static int parser_action_row1170[] = {
        1,
-       -1, 1, 572
+       -1, 1, 578
 };
-static int parser_action_row1141[] = {
+static int parser_action_row1171[] = {
        3,
-       -1, 1, 457,
+       -1, 1, 463,
        96, 0, 53,
-       97, 0, 1299
+       97, 0, 1335
 };
-static int parser_action_row1142[] = {
+static int parser_action_row1172[] = {
        1,
-       -1, 1, 390
+       -1, 1, 396
 };
-static int parser_action_row1143[] = {
+static int parser_action_row1173[] = {
        2,
-       -1, 1, 453,
-       58, 0, 215
+       -1, 1, 459,
+       58, 0, 227
 };
-static int parser_action_row1144[] = {
+static int parser_action_row1174[] = {
        2,
-       -1, 3, 1143,
-       97, 0, 1301
+       -1, 3, 1173,
+       97, 0, 1337
 };
-static int parser_action_row1145[] = {
+static int parser_action_row1175[] = {
        1,
        -1, 1, 76
 };
-static int parser_action_row1146[] = {
+static int parser_action_row1176[] = {
        4,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1147[] = {
+static int parser_action_row1177[] = {
        1,
        -1, 1, 16
 };
-static int parser_action_row1148[] = {
+static int parser_action_row1178[] = {
        1,
        -1, 1, 17
 };
-static int parser_action_row1149[] = {
+static int parser_action_row1179[] = {
        3,
-       -1, 1, 405,
-       57, 0, 829,
-       94, 0, 204
+       -1, 1, 411,
+       57, 0, 853,
+       94, 0, 216
 };
-static int parser_action_row1150[] = {
+static int parser_action_row1180[] = {
        2,
-       -1, 3, 1149,
-       53, 0, 1308
+       -1, 3, 1179,
+       53, 0, 1344
 };
-static int parser_action_row1151[] = {
+static int parser_action_row1181[] = {
        4,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       56, 0, 1309
+       56, 0, 1345
 };
-static int parser_action_row1152[] = {
+static int parser_action_row1182[] = {
        1,
        -1, 1, 153
 };
-static int parser_action_row1153[] = {
+static int parser_action_row1183[] = {
        25,
-       -1, 3, 1152,
-       41, 0, 1313,
-       47, 0, 396,
-       54, 0, 640,
-       74, 0, 641,
-       75, 0, 642,
-       76, 0, 643,
-       77, 0, 644,
-       78, 0, 645,
-       79, 0, 646,
-       80, 0, 647,
-       81, 0, 648,
-       82, 0, 649,
-       83, 0, 650,
-       84, 0, 651,
-       85, 0, 652,
-       86, 0, 653,
-       87, 0, 654,
-       88, 0, 655,
-       89, 0, 656,
-       90, 0, 657,
-       91, 0, 658,
-       92, 0, 659,
-       96, 0, 424,
-       97, 0, 660
+       -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
 };
-static int parser_action_row1154[] = {
+static int parser_action_row1184[] = {
        4,
        -1, 1, 79,
-       0, 1, 496,
-       1, 1, 496,
-       95, 1, 496
+       0, 1, 502,
+       1, 1, 502,
+       95, 1, 502
 };
-static int parser_action_row1155[] = {
+static int parser_action_row1185[] = {
        4,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1156[] = {
+static int parser_action_row1186[] = {
        2,
-       -1, 1, 469,
-       9, 0, 1320
+       -1, 1, 475,
+       9, 0, 1356
 };
-static int parser_action_row1157[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1187[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -13144,538 +14517,592 @@ static int parser_action_row1157[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1158[] = {
+static int parser_action_row1188[] = {
        3,
-       -1, 3, 1157,
-       28, 0, 84,
-       109, 0, 85
+       -1, 3, 1187,
+       28, 0, 90,
+       115, 0, 91
 };
-static int parser_action_row1159[] = {
+static int parser_action_row1189[] = {
        1,
-       -1, 1, 494
+       -1, 1, 500
 };
-static int parser_action_row1160[] = {
+static int parser_action_row1190[] = {
        2,
        -1, 1, 39,
-       96, 0, 1324
+       96, 0, 1360
 };
-static int parser_action_row1161[] = {
+static int parser_action_row1191[] = {
        1,
        -1, 1, 26
 };
-static int parser_action_row1162[] = {
+static int parser_action_row1192[] = {
        1,
        -1, 1, 47
 };
-static int parser_action_row1163[] = {
+static int parser_action_row1193[] = {
        2,
-       -1, 3, 1162,
-       9, 0, 1327
+       -1, 3, 1192,
+       9, 0, 1363
 };
-static int parser_action_row1164[] = {
+static int parser_action_row1194[] = {
        1,
-       -1, 1, 1050
+       -1, 1, 1074
 };
-static int parser_action_row1165[] = {
+static int parser_action_row1195[] = {
        1,
-       -1, 1, 1049
+       -1, 1, 1073
 };
-static int parser_action_row1166[] = {
+static int parser_action_row1196[] = {
        5,
        -1, 1, 81,
-       18, 0, 236,
-       19, 0, 237,
-       20, 0, 238,
-       21, 0, 239
+       18, 0, 254,
+       19, 0, 255,
+       20, 0, 256,
+       21, 0, 257
 };
-static int parser_action_row1167[] = {
-       56,
-       -1, 1, 420,
-       12, 0, 116,
+static int parser_action_row1197[] = {
+       62,
+       -1, 1, 426,
+       12, 0, 122,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 117,
+       22, 0, 123,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 118,
-       33, 0, 1329,
-       34, 0, 1330,
-       35, 0, 1331,
-       36, 0, 1332,
+       31, 0, 124,
+       33, 0, 1365,
+       34, 0, 1366,
+       35, 0, 1367,
+       36, 0, 1368,
        37, 0, 43,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       47, 0, 396,
-       48, 0, 125,
+       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,
        50, 0, 49,
-       51, 0, 1333,
-       52, 0, 1334,
-       54, 0, 619,
-       74, 0, 1335,
-       75, 0, 1336,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 1337,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       94, 0, 204,
-       96, 0, 424,
-       97, 0, 1338,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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
 };
-static int parser_action_row1168[] = {
+static int parser_action_row1198[] = {
        1,
        -1, 1, 75
 };
-static int parser_action_row1169[] = {
+static int parser_action_row1199[] = {
        1,
-       -1, 1, 1063
+       -1, 1, 1087
 };
-static int parser_action_row1170[] = {
+static int parser_action_row1200[] = {
        4,
        -1, 1, 30,
-       6, 0, 1163,
+       6, 0, 1193,
        13, 0, 32,
-       97, 0, 1164
+       97, 0, 1194
 };
-static int parser_action_row1171[] = {
+static int parser_action_row1201[] = {
        1,
        -1, 1, 44
 };
-static int parser_action_row1172[] = {
+static int parser_action_row1202[] = {
        1,
-       -1, 1, 461
+       -1, 1, 467
 };
-static int parser_action_row1173[] = {
+static int parser_action_row1203[] = {
        2,
-       -1, 3, 1172,
-       45, 0, 1358
+       -1, 3, 1202,
+       45, 0, 1394
 };
-static int parser_action_row1174[] = {
+static int parser_action_row1204[] = {
        4,
-       -1, 3, 1173,
-       31, 0, 1359,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 1203,
+       31, 0, 1395,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row1175[] = {
+static int parser_action_row1205[] = {
        1,
        -1, 1, 209
 };
-static int parser_action_row1176[] = {
+static int parser_action_row1206[] = {
        1,
        -1, 1, 228
 };
-static int parser_action_row1177[] = {
+static int parser_action_row1207[] = {
        1,
        -1, 1, 207
 };
-static int parser_action_row1178[] = {
+static int parser_action_row1208[] = {
        1,
        -1, 1, 226
 };
-static int parser_action_row1179[] = {
+static int parser_action_row1209[] = {
        1,
        -1, 1, 212
 };
-static int parser_action_row1180[] = {
+static int parser_action_row1210[] = {
        1,
        -1, 1, 231
 };
-static int parser_action_row1181[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1211[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1182[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1212[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1183[] = {
+static int parser_action_row1213[] = {
        1,
        -1, 1, 216
 };
-static int parser_action_row1184[] = {
+static int parser_action_row1214[] = {
        1,
        -1, 1, 235
 };
-static int parser_action_row1185[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1215[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1186[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1216[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1187[] = {
+static int parser_action_row1217[] = {
        1,
        -1, 1, 195
 };
-static int parser_action_row1188[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1218[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1189[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1219[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1190[] = {
+static int parser_action_row1220[] = {
        13,
        -1, 1, 336,
-       59, 0, 1367,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row1191[] = {
+static int parser_action_row1221[] = {
        1,
        -1, 1, 185
 };
-static int parser_action_row1192[] = {
+static int parser_action_row1222[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1193[] = {
+static int parser_action_row1223[] = {
        1,
-       -1, 1, 770
+       -1, 1, 782
 };
-static int parser_action_row1194[] = {
+static int parser_action_row1224[] = {
        2,
-       -1, 1, 773,
-       52, 0, 277
+       -1, 1, 785,
+       52, 0, 295
 };
-static int parser_action_row1195[] = {
+static int parser_action_row1225[] = {
        3,
-       -1, 1, 777,
-       52, 0, 277,
-       58, 0, 215
+       -1, 1, 789,
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row1196[] = {
+static int parser_action_row1226[] = {
        2,
-       -1, 3, 1195,
-       97, 0, 1372
+       -1, 3, 1225,
+       97, 0, 1408
 };
-static int parser_action_row1197[] = {
+static int parser_action_row1227[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1198[] = {
+static int parser_action_row1228[] = {
        2,
-       -1, 3, 1197,
-       45, 0, 1374
+       -1, 3, 1227,
+       45, 0, 1410
 };
-static int parser_action_row1199[] = {
+static int parser_action_row1229[] = {
        4,
-       -1, 3, 1198,
-       31, 0, 1375,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 1228,
+       31, 0, 1411,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row1200[] = {
+static int parser_action_row1230[] = {
        1,
-       -1, 1, 751
+       -1, 1, 763
 };
-static int parser_action_row1201[] = {
+static int parser_action_row1231[] = {
        3,
        -1, 1, 157,
-       24, 1, 895,
-       49, 1, 980
+       24, 1, 919,
+       49, 1, 1004
 };
-static int parser_action_row1202[] = {
+static int parser_action_row1232[] = {
        3,
        -1, 1, 156,
-       24, 1, 894,
-       49, 1, 979
+       24, 1, 918,
+       49, 1, 1003
 };
-static int parser_action_row1203[] = {
+static int parser_action_row1233[] = {
        2,
        -1, 1, 256,
-       24, 1, 932
+       24, 1, 956
 };
-static int parser_action_row1204[] = {
+static int parser_action_row1234[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1205[] = {
+static int parser_action_row1235[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1206[] = {
+static int parser_action_row1236[] = {
        2,
        -1, 1, 267,
-       24, 1, 935
+       24, 1, 959
 };
-static int parser_action_row1207[] = {
+static int parser_action_row1237[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1208[] = {
+static int parser_action_row1238[] = {
        2,
        -1, 1, 281,
-       24, 0, 1380
+       24, 0, 1416
 };
-static int parser_action_row1209[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1239[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1381,
-       12, 0, 887,
-       15, 0, 888,
+       9, 0, 1417,
+       12, 0, 911,
+       15, 0, 912,
        16, 0, 34,
-       22, 0, 889,
-       25, 0, 891,
-       26, 0, 892,
-       27, 0, 893,
-       33, 0, 894,
-       34, 0, 895,
-       35, 0, 896,
-       36, 0, 897,
-       37, 0, 898,
+       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,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 899,
-       51, 0, 900,
+       50, 0, 923,
+       51, 0, 924,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 901,
+       97, 0, 925,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1210[] = {
+static int parser_action_row1240[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1211[] = {
+static int parser_action_row1241[] = {
        2,
-       -1, 3, 1210,
-       57, 0, 1385
+       -1, 3, 1240,
+       57, 0, 1421
 };
-static int parser_action_row1212[] = {
+static int parser_action_row1242[] = {
        5,
-       -1, 1, 458,
-       12, 0, 1386,
-       46, 0, 669,
+       -1, 1, 464,
+       12, 0, 1422,
+       46, 0, 693,
        96, 0, 53,
-       97, 0, 1387
+       97, 0, 1423
 };
-static int parser_action_row1213[] = {
+static int parser_action_row1243[] = {
        2,
        -1, 1, 191,
-       24, 1, 922
+       24, 1, 946
 };
-static int parser_action_row1214[] = {
+static int parser_action_row1244[] = {
        2,
        -1, 1, 197,
-       24, 1, 928
+       24, 1, 952
 };
-static int parser_action_row1215[] = {
+static int parser_action_row1245[] = {
        2,
        -1, 1, 188,
-       24, 1, 919
+       24, 1, 943
 };
-static int parser_action_row1216[] = {
+static int parser_action_row1246[] = {
        1,
        -1, 1, 262
 };
-static int parser_action_row1217[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1247[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -13705,1281 +15132,1407 @@ static int parser_action_row1217[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1218[] = {
+static int parser_action_row1248[] = {
        1,
        -1, 1, 263
 };
-static int parser_action_row1219[] = {
+static int parser_action_row1249[] = {
        4,
-       -1, 3, 1218,
+       -1, 3, 1248,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1220[] = {
+static int parser_action_row1250[] = {
        1,
        -1, 1, 258
 };
-static int parser_action_row1221[] = {
+static int parser_action_row1251[] = {
        2,
        -1, 1, 199,
-       24, 1, 930
+       24, 1, 954
 };
-static int parser_action_row1222[] = {
+static int parser_action_row1252[] = {
        2,
        -1, 1, 190,
-       24, 1, 921
+       24, 1, 945
 };
-static int parser_action_row1223[] = {
-       25,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 486,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row1224[] = {
-       39,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 345,
-       59, 0, 691,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 345,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row1225[] = {
+static int parser_action_row1255[] = {
        2,
-       -1, 3, 1224,
-       15, 0, 1393
+       -1, 3, 1254,
+       15, 0, 1429
 };
-static int parser_action_row1226[] = {
+static int parser_action_row1256[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1227[] = {
+static int parser_action_row1257[] = {
        1,
        -1, 1, 336
 };
-static int parser_action_row1228[] = {
+static int parser_action_row1258[] = {
        2,
-       -1, 3, 1227,
-       55, 0, 1395
+       -1, 3, 1257,
+       55, 0, 1431
 };
-static int parser_action_row1229[] = {
+static int parser_action_row1259[] = {
        3,
-       -1, 3, 1228,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 1258,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row1230[] = {
+static int parser_action_row1260[] = {
        1,
-       -1, 1, 1071
+       -1, 1, 1095
 };
-static int parser_action_row1231[] = {
+static int parser_action_row1261[] = {
        2,
-       -1, 1, 797,
-       94, 0, 594
+       -1, 1, 815,
+       94, 0, 618
 };
-static int parser_action_row1232[] = {
+static int parser_action_row1262[] = {
        2,
-       -1, 3, 1231,
-       53, 0, 1398
+       -1, 3, 1261,
+       53, 0, 1434
 };
-static int parser_action_row1233[] = {
+static int parser_action_row1263[] = {
        1,
-       -1, 1, 798
+       -1, 1, 816
 };
-static int parser_action_row1234[] = {
+static int parser_action_row1264[] = {
        1,
        -1, 1, 357
 };
-static int parser_action_row1235[] = {
+static int parser_action_row1265[] = {
        1,
        -1, 1, 361
 };
-static int parser_action_row1236[] = {
+static int parser_action_row1266[] = {
        2,
        -1, 1, 360,
-       52, 0, 277
+       52, 0, 295
 };
-static int parser_action_row1237[] = {
+static int parser_action_row1267[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1238[] = {
+static int parser_action_row1268[] = {
        1,
-       -1, 1, 410
+       -1, 1, 416
 };
-static int parser_action_row1239[] = {
+static int parser_action_row1269[] = {
        1,
-       -1, 1, 412
+       -1, 1, 418
 };
-static int parser_action_row1240[] = {
+static int parser_action_row1270[] = {
        1,
-       -1, 1, 413
+       -1, 1, 419
 };
-static int parser_action_row1241[] = {
+static int parser_action_row1271[] = {
        1,
-       -1, 1, 414
+       -1, 1, 420
 };
-static int parser_action_row1242[] = {
+static int parser_action_row1272[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1243[] = {
+static int parser_action_row1273[] = {
        2,
-       -1, 1, 425,
-       56, 0, 1402
+       -1, 1, 431,
+       56, 0, 1438
 };
-static int parser_action_row1244[] = {
+static int parser_action_row1274[] = {
        1,
        -1, 1, 276
 };
-static int parser_action_row1245[] = {
+static int parser_action_row1275[] = {
        2,
-       -1, 3, 1244,
-       55, 0, 1405
+       -1, 3, 1274,
+       55, 0, 1441
 };
-static int parser_action_row1246[] = {
+static int parser_action_row1276[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1247[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1248[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1249[] = {
+static int parser_action_row1279[] = {
        14,
        -1, 1, 337,
-       52, 0, 277,
-       59, 0, 1407,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       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
 };
-static int parser_action_row1250[] = {
-       25,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 446,
-       27, 0, 447,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1251[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1281[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1252[] = {
+static int parser_action_row1282[] = {
        1,
-       -1, 1, 594
+       -1, 1, 600
 };
-static int parser_action_row1253[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1283[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1254[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 1102,
-       31, 0, 1104,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1255[] = {
+static int parser_action_row1285[] = {
        3,
-       -1, 3, 1254,
-       47, 0, 1413,
-       96, 0, 1414
+       -1, 3, 1284,
+       47, 0, 1449,
+       96, 0, 1450
 };
-static int parser_action_row1256[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1257[] = {
+static int parser_action_row1287[] = {
        1,
-       -1, 1, 611
+       -1, 1, 617
 };
-static int parser_action_row1258[] = {
+static int parser_action_row1288[] = {
        1,
-       -1, 1, 612
+       -1, 1, 618
 };
-static int parser_action_row1259[] = {
+static int parser_action_row1289[] = {
        1,
-       -1, 1, 613
+       -1, 1, 619
 };
-static int parser_action_row1260[] = {
+static int parser_action_row1290[] = {
        1,
-       -1, 1, 614
+       -1, 1, 620
 };
-static int parser_action_row1261[] = {
+static int parser_action_row1291[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1262[] = {
+static int parser_action_row1292[] = {
        3,
-       -1, 3, 1261,
-       41, 0, 1272,
-       98, 0, 1418
+       -1, 3, 1291,
+       41, 0, 1308,
+       98, 0, 1454
 };
-static int parser_action_row1263[] = {
+static int parser_action_row1293[] = {
        2,
-       -1, 3, 1262,
-       73, 0, 1419
+       -1, 3, 1292,
+       73, 0, 1455
 };
-static int parser_action_row1264[] = {
+static int parser_action_row1294[] = {
        1,
-       -1, 1, 564
+       -1, 1, 570
 };
-static int parser_action_row1265[] = {
+static int parser_action_row1295[] = {
        1,
-       -1, 1, 563
+       -1, 1, 569
 };
-static int parser_action_row1266[] = {
+static int parser_action_row1296[] = {
        1,
-       -1, 1, 565
+       -1, 1, 571
 };
-static int parser_action_row1267[] = {
+static int parser_action_row1297[] = {
        1,
-       -1, 1, 576
+       -1, 1, 582
 };
-static int parser_action_row1268[] = {
+static int parser_action_row1298[] = {
        1,
-       -1, 1, 615
+       -1, 1, 621
 };
-static int parser_action_row1269[] = {
+static int parser_action_row1299[] = {
        1,
-       -1, 1, 616
+       -1, 1, 622
 };
-static int parser_action_row1270[] = {
+static int parser_action_row1300[] = {
        1,
-       -1, 1, 617
+       -1, 1, 623
 };
-static int parser_action_row1271[] = {
+static int parser_action_row1301[] = {
        1,
-       -1, 1, 619
+       -1, 1, 624
 };
-static int parser_action_row1272[] = {
+static int parser_action_row1302[] = {
        1,
-       -1, 1, 618
+       -1, 1, 625
 };
-static int parser_action_row1273[] = {
+static int parser_action_row1303[] = {
+       1,
+       -1, 1, 626
+};
+static int parser_action_row1304[] = {
+       1,
+       -1, 1, 627
+};
+static int parser_action_row1305[] = {
+       1,
+       -1, 1, 628
+};
+static int parser_action_row1306[] = {
+       1,
+       -1, 1, 629
+};
+static int parser_action_row1307[] = {
+       1,
+       -1, 1, 631
+};
+static int parser_action_row1308[] = {
+       1,
+       -1, 1, 630
+};
+static int parser_action_row1309[] = {
        2,
-       -1, 1, 592,
-       52, 0, 277
+       -1, 1, 598,
+       52, 0, 295
 };
-static int parser_action_row1274[] = {
+static int parser_action_row1310[] = {
        1,
-       -1, 1, 574
+       -1, 1, 580
 };
-static int parser_action_row1275[] = {
+static int parser_action_row1311[] = {
        2,
-       -1, 1, 582,
-       52, 0, 277
+       -1, 1, 588,
+       52, 0, 295
 };
-static int parser_action_row1276[] = {
+static int parser_action_row1312[] = {
        3,
-       -1, 3, 1275,
-       54, 0, 1422,
-       55, 0, 1423
+       -1, 3, 1311,
+       54, 0, 1458,
+       55, 0, 1459
 };
-static int parser_action_row1277[] = {
+static int parser_action_row1313[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1278[] = {
+static int parser_action_row1314[] = {
        4,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       24, 0, 1425
+       24, 0, 1461
 };
-static int parser_action_row1279[] = {
+static int parser_action_row1315[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1280[] = {
+static int parser_action_row1316[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1281[] = {
+static int parser_action_row1317[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1282[] = {
+static int parser_action_row1318[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1283[] = {
+static int parser_action_row1319[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1284[] = {
+static int parser_action_row1320[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1285[] = {
+static int parser_action_row1321[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1286[] = {
+static int parser_action_row1322[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1287[] = {
+static int parser_action_row1323[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1288[] = {
+static int parser_action_row1324[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1289[] = {
+static int parser_action_row1325[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1290[] = {
+static int parser_action_row1326[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1291[] = {
+static int parser_action_row1327[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1292[] = {
+static int parser_action_row1328[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1293[] = {
+static int parser_action_row1329[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1294[] = {
+static int parser_action_row1330[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1295[] = {
+static int parser_action_row1331[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1296[] = {
+static int parser_action_row1332[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1297[] = {
+static int parser_action_row1333[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1298[] = {
+static int parser_action_row1334[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1299[] = {
+static int parser_action_row1335[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1300[] = {
+static int parser_action_row1336[] = {
        3,
-       -1, 1, 590,
-       52, 0, 277,
-       58, 0, 215
+       -1, 1, 596,
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row1301[] = {
+static int parser_action_row1337[] = {
        2,
-       -1, 1, 456,
-       97, 0, 1449
+       -1, 1, 462,
+       97, 0, 1485
 };
-static int parser_action_row1302[] = {
+static int parser_action_row1338[] = {
        2,
-       -1, 1, 454,
-       58, 0, 215
+       -1, 1, 460,
+       58, 0, 227
 };
-static int parser_action_row1303[] = {
+static int parser_action_row1339[] = {
        1,
-       -1, 1, 1064
+       -1, 1, 1088
 };
-static int parser_action_row1304[] = {
+static int parser_action_row1340[] = {
        2,
        -1, 1, 30,
        13, 0, 32
 };
-static int parser_action_row1305[] = {
+static int parser_action_row1341[] = {
        5,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1451,
+       9, 0, 1487,
        95, 0, 3
 };
-static int parser_action_row1306[] = {
+static int parser_action_row1342[] = {
        2,
        -1, 1, 118,
-       71, 0, 1453
+       71, 0, 1489
 };
-static int parser_action_row1307[] = {
+static int parser_action_row1343[] = {
        2,
-       -1, 1, 404,
-       57, 0, 829
+       -1, 1, 410,
+       57, 0, 853
 };
-static int parser_action_row1308[] = {
+static int parser_action_row1344[] = {
        1,
        -1, 1, 117
 };
-static int parser_action_row1309[] = {
+static int parser_action_row1345[] = {
        4,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       57, 0, 829
+       57, 0, 853
 };
-static int parser_action_row1310[] = {
+static int parser_action_row1346[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1311[] = {
+static int parser_action_row1347[] = {
        1,
-       -1, 1, 1066
+       -1, 1, 1090
 };
-static int parser_action_row1312[] = {
+static int parser_action_row1348[] = {
        1,
        -1, 1, 113
 };
-static int parser_action_row1313[] = {
+static int parser_action_row1349[] = {
        4,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       56, 0, 1309
+       56, 0, 1345
 };
-static int parser_action_row1314[] = {
+static int parser_action_row1350[] = {
        1,
        -1, 1, 128
 };
-static int parser_action_row1315[] = {
+static int parser_action_row1351[] = {
        2,
        -1, 1, 122,
-       56, 0, 1460
+       56, 0, 1496
 };
-static int parser_action_row1316[] = {
+static int parser_action_row1352[] = {
        1,
        -1, 1, 126
 };
-static int parser_action_row1317[] = {
+static int parser_action_row1353[] = {
        1,
        -1, 1, 127
 };
-static int parser_action_row1318[] = {
+static int parser_action_row1354[] = {
        2,
        -1, 1, 131,
-       73, 0, 1463
+       73, 0, 1499
 };
-static int parser_action_row1319[] = {
+static int parser_action_row1355[] = {
        1,
        -1, 1, 129
 };
-static int parser_action_row1320[] = {
+static int parser_action_row1356[] = {
        9,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        4, 1, 80,
-       9, 0, 1464,
+       9, 0, 1500,
        15, 1, 80,
        28, 1, 80,
        95, 0, 3,
-       109, 1, 80
+       115, 1, 80
 };
-static int parser_action_row1321[] = {
+static int parser_action_row1357[] = {
        1,
-       -1, 1, 470
+       -1, 1, 476
 };
-static int parser_action_row1322[] = {
+static int parser_action_row1358[] = {
        1,
-       -1, 1, 491
+       -1, 1, 497
 };
-static int parser_action_row1323[] = {
+static int parser_action_row1359[] = {
        2,
-       -1, 1, 469,
-       9, 0, 1320
+       -1, 1, 475,
+       9, 0, 1356
 };
-static int parser_action_row1324[] = {
+static int parser_action_row1360[] = {
        1,
-       -1, 1, 495
+       -1, 1, 501
 };
-static int parser_action_row1325[] = {
+static int parser_action_row1361[] = {
        3,
        -1, 1, 155,
-       57, 0, 333,
-       94, 0, 204
+       57, 0, 357,
+       94, 0, 216
 };
-static int parser_action_row1326[] = {
+static int parser_action_row1362[] = {
        2,
-       -1, 3, 1325,
-       55, 0, 1468
+       -1, 3, 1361,
+       55, 0, 1504
 };
-static int parser_action_row1327[] = {
+static int parser_action_row1363[] = {
        2,
        -1, 1, 37,
-       56, 0, 1469
+       56, 0, 1505
 };
-static int parser_action_row1328[] = {
+static int parser_action_row1364[] = {
        1,
        -1, 1, 27
 };
-static int parser_action_row1329[] = {
+static int parser_action_row1365[] = {
        7,
-       -1, 3, 1328,
-       10, 0, 1472,
-       11, 0, 1473,
-       12, 0, 1474,
-       16, 0, 1475,
-       38, 0, 1476,
-       41, 0, 1477
+       -1, 3, 1364,
+       10, 0, 1508,
+       11, 0, 1509,
+       12, 0, 1510,
+       16, 0, 1511,
+       38, 0, 1512,
+       41, 0, 1513
 };
-static int parser_action_row1330[] = {
-       26,
-       -1, 1, 1003,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1331[] = {
+static int parser_action_row1367[] = {
        2,
-       -1, 1, 1008,
-       49, 0, 197
+       -1, 1, 1032,
+       49, 0, 209
 };
-static int parser_action_row1332[] = {
+static int parser_action_row1368[] = {
        2,
-       -1, 1, 1005,
-       49, 0, 197
+       -1, 1, 1029,
+       49, 0, 209
 };
-static int parser_action_row1333[] = {
+static int parser_action_row1369[] = {
        1,
-       -1, 1, 1007
+       -1, 1, 1031
 };
-static int parser_action_row1334[] = {
+static int parser_action_row1370[] = {
        2,
-       -1, 3, 1333,
-       11, 0, 1481
+       -1, 3, 1369,
+       11, 0, 1517
 };
-static int parser_action_row1335[] = {
+static int parser_action_row1371[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1336[] = {
-       24,
-       -1, 1, 498,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+static int parser_action_row1372[] = {
+       30,
+       -1, 1, 504,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1337[] = {
-       24,
-       -1, 1, 499,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+static int parser_action_row1373[] = {
+       30,
+       -1, 1, 505,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1338[] = {
-       24,
-       -1, 1, 507,
-       12, 0, 170,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+static int parser_action_row1374[] = {
+       30,
+       -1, 1, 513,
+       12, 0, 182,
+       38, 0, 185,
+       40, 0, 186,
+       41, 1, 464,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1339[] = {
+static int parser_action_row1375[] = {
        15,
-       -1, 1, 756,
-       52, 0, 277,
-       58, 0, 215,
-       59, 0, 1483,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1340[] = {
+static int parser_action_row1376[] = {
        1,
-       -1, 1, 802
+       -1, 1, 820
 };
-static int parser_action_row1341[] = {
+static int parser_action_row1377[] = {
        1,
-       -1, 1, 1001
+       -1, 1, 1025
 };
-static int parser_action_row1342[] = {
+static int parser_action_row1378[] = {
        1,
-       -1, 1, 1010
+       -1, 1, 1034
 };
-static int parser_action_row1343[] = {
+static int parser_action_row1379[] = {
        1,
-       -1, 1, 1012
+       -1, 1, 1036
 };
-static int parser_action_row1344[] = {
+static int parser_action_row1380[] = {
        1,
-       -1, 1, 1011
+       -1, 1, 1035
 };
-static int parser_action_row1345[] = {
+static int parser_action_row1381[] = {
        1,
-       -1, 1, 1013
+       -1, 1, 1037
 };
-static int parser_action_row1346[] = {
+static int parser_action_row1382[] = {
        1,
-       -1, 1, 1014
+       -1, 1, 1038
 };
-static int parser_action_row1347[] = {
+static int parser_action_row1383[] = {
        1,
-       -1, 1, 1015
+       -1, 1, 1039
 };
-static int parser_action_row1348[] = {
+static int parser_action_row1384[] = {
        1,
-       -1, 1, 421
+       -1, 1, 427
 };
-static int parser_action_row1349[] = {
+static int parser_action_row1385[] = {
        3,
-       -1, 3, 1348,
-       41, 0, 300,
-       98, 0, 1486
+       -1, 3, 1384,
+       41, 0, 324,
+       98, 0, 1522
 };
-static int parser_action_row1350[] = {
+static int parser_action_row1386[] = {
        22,
-       -1, 1, 455,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       97, 0, 1487
+       -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
 };
-static int parser_action_row1351[] = {
+static int parser_action_row1387[] = {
        1,
-       -1, 1, 806
+       -1, 1, 824
 };
-static int parser_action_row1352[] = {
+static int parser_action_row1388[] = {
        1,
-       -1, 1, 1002
+       -1, 1, 1026
 };
-static int parser_action_row1353[] = {
+static int parser_action_row1389[] = {
        1,
-       -1, 1, 803
+       -1, 1, 821
 };
-static int parser_action_row1354[] = {
+static int parser_action_row1390[] = {
        3,
-       -1, 1, 739,
-       54, 0, 244,
-       73, 0, 1488
+       -1, 1, 751,
+       54, 0, 262,
+       73, 0, 1524
 };
-static int parser_action_row1355[] = {
+static int parser_action_row1391[] = {
        1,
-       -1, 1, 424
+       -1, 1, 430
 };
-static int parser_action_row1356[] = {
+static int parser_action_row1392[] = {
        2,
-       -1, 1, 800,
-       56, 0, 1402
+       -1, 1, 818,
+       56, 0, 1438
 };
-static int parser_action_row1357[] = {
+static int parser_action_row1393[] = {
        1,
-       -1, 1, 804
+       -1, 1, 822
 };
-static int parser_action_row1358[] = {
+static int parser_action_row1394[] = {
        23,
-       -1, 1, 457,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       96, 0, 53,
-       97, 0, 1491
+       -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
 };
-static int parser_action_row1359[] = {
+static int parser_action_row1395[] = {
        1,
        -1, 1, 365
 };
-static int parser_action_row1360[] = {
+static int parser_action_row1396[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1361[] = {
+static int parser_action_row1397[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1362[] = {
+static int parser_action_row1398[] = {
        1,
        -1, 1, 211
 };
-static int parser_action_row1363[] = {
+static int parser_action_row1399[] = {
        1,
        -1, 1, 230
 };
-static int parser_action_row1364[] = {
+static int parser_action_row1400[] = {
        1,
        -1, 1, 215
 };
-static int parser_action_row1365[] = {
+static int parser_action_row1401[] = {
        1,
        -1, 1, 234
 };
-static int parser_action_row1366[] = {
+static int parser_action_row1402[] = {
        1,
        -1, 1, 214
 };
-static int parser_action_row1367[] = {
+static int parser_action_row1403[] = {
        1,
        -1, 1, 233
 };
-static int parser_action_row1368[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1404[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1369[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1405[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1370[] = {
+static int parser_action_row1406[] = {
        2,
-       -1, 3, 1369,
-       24, 0, 1497
+       -1, 3, 1405,
+       24, 0, 1533
 };
-static int parser_action_row1371[] = {
+static int parser_action_row1407[] = {
        1,
-       -1, 1, 772
+       -1, 1, 784
 };
-static int parser_action_row1372[] = {
+static int parser_action_row1408[] = {
        1,
-       -1, 1, 776
+       -1, 1, 788
 };
-static int parser_action_row1373[] = {
+static int parser_action_row1409[] = {
        2,
-       -1, 1, 775,
-       52, 0, 277
+       -1, 1, 787,
+       52, 0, 295
 };
-static int parser_action_row1374[] = {
+static int parser_action_row1410[] = {
        1,
-       -1, 1, 446
+       -1, 1, 452
 };
-static int parser_action_row1375[] = {
+static int parser_action_row1411[] = {
        1,
-       -1, 1, 780
+       -1, 1, 792
 };
-static int parser_action_row1376[] = {
+static int parser_action_row1412[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1377[] = {
+static int parser_action_row1413[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1378[] = {
+static int parser_action_row1414[] = {
        2,
-       -1, 3, 1377,
-       23, 0, 1501
+       -1, 3, 1413,
+       23, 0, 1537
 };
-static int parser_action_row1379[] = {
+static int parser_action_row1415[] = {
        2,
-       -1, 3, 1378,
-       15, 0, 1502
+       -1, 3, 1414,
+       15, 0, 1538
 };
-static int parser_action_row1380[] = {
+static int parser_action_row1416[] = {
        2,
-       -1, 3, 1379,
-       28, 0, 1503
+       -1, 3, 1415,
+       28, 0, 1539
 };
-static int parser_action_row1381[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1417[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1381,
-       12, 0, 887,
-       15, 0, 888,
+       9, 0, 1417,
+       12, 0, 911,
+       15, 0, 912,
        16, 0, 34,
-       22, 0, 889,
-       25, 0, 891,
-       26, 0, 892,
-       27, 0, 893,
-       33, 0, 894,
-       34, 0, 895,
-       35, 0, 896,
-       36, 0, 897,
-       37, 0, 898,
+       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,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 899,
-       51, 0, 900,
+       50, 0, 923,
+       51, 0, 924,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 901,
+       97, 0, 925,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1382[] = {
+static int parser_action_row1418[] = {
        2,
        -1, 1, 158,
-       24, 1, 896
+       24, 1, 920
 };
-static int parser_action_row1383[] = {
-       31,
-       -1, 1, 458,
-       9, 0, 1505,
+static int parser_action_row1419[] = {
+       37,
+       -1, 1, 464,
+       9, 0, 1541,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -15008,150 +16561,174 @@ static int parser_action_row1383[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1384[] = {
+static int parser_action_row1420[] = {
        1,
-       -1, 1, 943
+       -1, 1, 967
 };
-static int parser_action_row1385[] = {
+static int parser_action_row1421[] = {
        2,
-       -1, 3, 1384,
-       15, 0, 1507
+       -1, 3, 1420,
+       15, 0, 1543
 };
-static int parser_action_row1386[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1422[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1387[] = {
-       27,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 351,
        73, 1, 351,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row1388[] = {
-       40,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 333,
-       58, 0, 215,
-       59, 0, 846,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 333,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row1389[] = {
+static int parser_action_row1425[] = {
        3,
-       -1, 1, 455,
-       12, 0, 1511,
-       97, 0, 1512
+       -1, 1, 461,
+       12, 0, 1547,
+       97, 0, 1548
 };
-static int parser_action_row1390[] = {
+static int parser_action_row1426[] = {
        4,
-       -1, 1, 457,
-       12, 0, 1513,
+       -1, 1, 463,
+       12, 0, 1549,
        96, 0, 53,
-       97, 0, 1514
+       97, 0, 1550
 };
-static int parser_action_row1391[] = {
+static int parser_action_row1427[] = {
        1,
        -1, 1, 260
 };
-static int parser_action_row1392[] = {
+static int parser_action_row1428[] = {
        2,
        -1, 1, 198,
-       24, 1, 929
+       24, 1, 953
 };
-static int parser_action_row1393[] = {
+static int parser_action_row1429[] = {
        2,
        -1, 1, 189,
-       24, 1, 920
+       24, 1, 944
 };
-static int parser_action_row1394[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1430[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 157,
+       9, 0, 169,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -15181,2868 +16758,3186 @@ static int parser_action_row1394[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1395[] = {
+static int parser_action_row1431[] = {
        2,
-       -1, 3, 1394,
-       24, 0, 1518
+       -1, 3, 1430,
+       24, 0, 1554
 };
-static int parser_action_row1396[] = {
+static int parser_action_row1432[] = {
        2,
-       -1, 1, 797,
-       94, 0, 594
+       -1, 1, 815,
+       94, 0, 618
 };
-static int parser_action_row1397[] = {
+static int parser_action_row1433[] = {
        1,
        -1, 1, 152
 };
-static int parser_action_row1398[] = {
+static int parser_action_row1434[] = {
        1,
-       -1, 1, 624
+       -1, 1, 636
 };
-static int parser_action_row1399[] = {
+static int parser_action_row1435[] = {
        1,
-       -1, 1, 795
+       -1, 1, 813
 };
-static int parser_action_row1400[] = {
+static int parser_action_row1436[] = {
        1,
        -1, 1, 359
 };
-static int parser_action_row1401[] = {
-       54,
-       -1, 1, 458,
-       12, 0, 170,
+static int parser_action_row1437[] = {
+       60,
+       -1, 1, 464,
+       12, 0, 182,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 171,
+       22, 0, 183,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 172,
-       33, 0, 399,
-       34, 0, 400,
-       35, 0, 401,
-       36, 0, 402,
+       31, 0, 184,
+       33, 0, 423,
+       34, 0, 424,
+       35, 0, 425,
+       36, 0, 426,
        37, 0, 43,
-       38, 0, 173,
-       40, 0, 174,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 396,
-       48, 0, 175,
+       47, 0, 420,
+       48, 0, 187,
        50, 0, 49,
-       51, 0, 403,
+       51, 0, 427,
        52, 0, 51,
-       54, 0, 404,
-       74, 0, 405,
-       75, 0, 406,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 414,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       94, 0, 204,
-       96, 0, 424,
-       97, 0, 425,
+       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,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1402[] = {
+static int parser_action_row1438[] = {
        2,
-       -1, 3, 1401,
-       53, 0, 1521
+       -1, 3, 1437,
+       53, 0, 1557
 };
-static int parser_action_row1403[] = {
+static int parser_action_row1439[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1404[] = {
+static int parser_action_row1440[] = {
        1,
-       -1, 1, 1082
+       -1, 1, 1106
 };
-static int parser_action_row1405[] = {
+static int parser_action_row1441[] = {
        2,
-       -1, 1, 426,
-       56, 0, 1402
+       -1, 1, 432,
+       56, 0, 1438
 };
-static int parser_action_row1406[] = {
+static int parser_action_row1442[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1407[] = {
+static int parser_action_row1443[] = {
        1,
        -1, 1, 148
 };
-static int parser_action_row1408[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1409[] = {
+static int parser_action_row1445[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1410[] = {
+static int parser_action_row1446[] = {
        1,
-       -1, 1, 392
+       -1, 1, 398
 };
-static int parser_action_row1411[] = {
+static int parser_action_row1447[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1412[] = {
+static int parser_action_row1448[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1413[] = {
+static int parser_action_row1449[] = {
        1,
-       -1, 1, 534
+       -1, 1, 540
 };
-static int parser_action_row1414[] = {
+static int parser_action_row1450[] = {
        2,
-       -1, 3, 1413,
-       96, 0, 1528
+       -1, 3, 1449,
+       96, 0, 1564
 };
-static int parser_action_row1415[] = {
+static int parser_action_row1451[] = {
        2,
-       -1, 1, 797,
-       94, 0, 594
+       -1, 1, 815,
+       94, 0, 618
 };
-static int parser_action_row1416[] = {
+static int parser_action_row1452[] = {
        3,
-       -1, 1, 569,
-       52, 0, 277,
-       73, 0, 1530
+       -1, 1, 575,
+       52, 0, 295,
+       73, 0, 1566
 };
-static int parser_action_row1417[] = {
+static int parser_action_row1453[] = {
        1,
-       -1, 1, 566
+       -1, 1, 572
 };
-static int parser_action_row1418[] = {
+static int parser_action_row1454[] = {
        3,
-       -1, 3, 1417,
-       47, 0, 1413,
-       96, 0, 1414
+       -1, 3, 1453,
+       47, 0, 1449,
+       96, 0, 1450
 };
-static int parser_action_row1419[] = {
+static int parser_action_row1455[] = {
        2,
-       -1, 1, 571,
-       73, 1, 574
+       -1, 1, 577,
+       73, 1, 580
 };
-static int parser_action_row1420[] = {
+static int parser_action_row1456[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1421[] = {
+static int parser_action_row1457[] = {
        1,
-       -1, 1, 591
+       -1, 1, 597
 };
-static int parser_action_row1422[] = {
+static int parser_action_row1458[] = {
        1,
-       -1, 1, 580
+       -1, 1, 586
 };
-static int parser_action_row1423[] = {
+static int parser_action_row1459[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1424[] = {
+static int parser_action_row1460[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1425[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 1102,
-       31, 0, 1104,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1426[] = {
+static int parser_action_row1462[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1427[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 1102,
-       31, 0, 1104,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1428[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 1102,
-       31, 0, 1104,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1429[] = {
+static int parser_action_row1465[] = {
        3,
-       -1, 3, 1428,
-       47, 0, 1540,
-       96, 0, 1541
+       -1, 3, 1464,
+       47, 0, 1576,
+       96, 0, 1577
 };
-static int parser_action_row1430[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1431[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1432[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1433[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1434[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1435[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1436[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1437[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1438[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1439[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1440[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1441[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1442[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1443[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1444[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1445[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1446[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1447[] = {
-       21,
-       -1, 1, 458,
-       12, 0, 1102,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1448[] = {
+static int parser_action_row1484[] = {
        5,
-       -1, 1, 458,
-       12, 0, 1561,
-       46, 0, 1562,
+       -1, 1, 464,
+       12, 0, 1597,
+       46, 0, 1598,
        96, 0, 53,
-       97, 0, 1563
+       97, 0, 1599
 };
-static int parser_action_row1449[] = {
+static int parser_action_row1485[] = {
        1,
-       -1, 1, 588
+       -1, 1, 594
 };
-static int parser_action_row1450[] = {
+static int parser_action_row1486[] = {
        2,
-       -1, 1, 586,
-       52, 0, 277
+       -1, 1, 592,
+       52, 0, 295
 };
-static int parser_action_row1451[] = {
+static int parser_action_row1487[] = {
        5,
        -1, 1, 81,
-       18, 0, 236,
-       19, 0, 237,
-       20, 0, 238,
-       21, 0, 239
+       18, 0, 254,
+       19, 0, 255,
+       20, 0, 256,
+       21, 0, 257
 };
-static int parser_action_row1452[] = {
+static int parser_action_row1488[] = {
        1,
        -1, 1, 77
 };
-static int parser_action_row1453[] = {
+static int parser_action_row1489[] = {
        1,
-       -1, 1, 1065
+       -1, 1, 1089
 };
-static int parser_action_row1454[] = {
+static int parser_action_row1490[] = {
        1,
        -1, 1, 120
 };
-static int parser_action_row1455[] = {
+static int parser_action_row1491[] = {
        2,
        -1, 1, 119,
-       71, 0, 1569
+       71, 0, 1605
 };
-static int parser_action_row1456[] = {
+static int parser_action_row1492[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1457[] = {
+static int parser_action_row1493[] = {
        1,
        -1, 1, 110
 };
-static int parser_action_row1458[] = {
+static int parser_action_row1494[] = {
        2,
-       -1, 3, 1457,
-       97, 0, 1148
+       -1, 3, 1493,
+       97, 0, 1178
 };
-static int parser_action_row1459[] = {
+static int parser_action_row1495[] = {
        1,
-       -1, 1, 1067
+       -1, 1, 1091
 };
-static int parser_action_row1460[] = {
+static int parser_action_row1496[] = {
        1,
        -1, 1, 114
 };
-static int parser_action_row1461[] = {
+static int parser_action_row1497[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1462[] = {
+static int parser_action_row1498[] = {
        1,
-       -1, 1, 1068
+       -1, 1, 1092
 };
-static int parser_action_row1463[] = {
+static int parser_action_row1499[] = {
        2,
        -1, 1, 123,
-       56, 0, 1460
+       56, 0, 1496
 };
-static int parser_action_row1464[] = {
+static int parser_action_row1500[] = {
        24,
-       -1, 3, 1463,
-       46, 0, 1574,
-       54, 0, 640,
-       74, 0, 641,
-       75, 0, 642,
-       76, 0, 643,
-       77, 0, 644,
-       78, 0, 645,
-       79, 0, 646,
-       80, 0, 647,
-       81, 0, 648,
-       82, 0, 649,
-       83, 0, 650,
-       84, 0, 651,
-       85, 0, 652,
-       86, 0, 653,
-       87, 0, 654,
-       88, 0, 655,
-       89, 0, 656,
-       90, 0, 657,
-       91, 0, 658,
-       92, 0, 659,
-       96, 0, 53,
-       97, 0, 660
+       -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
 };
-static int parser_action_row1465[] = {
+static int parser_action_row1501[] = {
        1,
-       -1, 1, 497
+       -1, 1, 503
 };
-static int parser_action_row1466[] = {
+static int parser_action_row1502[] = {
        1,
-       -1, 1, 492
+       -1, 1, 498
 };
-static int parser_action_row1467[] = {
+static int parser_action_row1503[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1468[] = {
+static int parser_action_row1504[] = {
        2,
        -1, 1, 155,
-       57, 0, 333
+       57, 0, 357
 };
-static int parser_action_row1469[] = {
+static int parser_action_row1505[] = {
        6,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       28, 0, 84,
+       28, 0, 90,
        95, 0, 3,
-       109, 0, 85
+       115, 0, 91
 };
-static int parser_action_row1470[] = {
+static int parser_action_row1506[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1471[] = {
+static int parser_action_row1507[] = {
        1,
-       -1, 1, 1060
+       -1, 1, 1084
 };
-static int parser_action_row1472[] = {
+static int parser_action_row1508[] = {
        2,
        -1, 1, 38,
-       56, 0, 1469
+       56, 0, 1505
 };
-static int parser_action_row1473[] = {
+static int parser_action_row1509[] = {
        23,
-       -1, 3, 1472,
-       54, 0, 640,
-       74, 0, 641,
-       75, 0, 642,
-       76, 0, 643,
-       77, 0, 644,
-       78, 0, 645,
-       79, 0, 646,
-       80, 0, 647,
-       81, 0, 648,
-       82, 0, 649,
-       83, 0, 650,
-       84, 0, 651,
-       85, 0, 652,
-       86, 0, 653,
-       87, 0, 654,
-       88, 0, 655,
-       89, 0, 656,
-       90, 0, 657,
-       91, 0, 658,
-       92, 0, 659,
-       96, 0, 53,
-       97, 0, 660
+       -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
 };
-static int parser_action_row1474[] = {
+static int parser_action_row1510[] = {
        2,
-       -1, 3, 1473,
-       96, 0, 1583
+       -1, 3, 1509,
+       96, 0, 1619
 };
-static int parser_action_row1475[] = {
+static int parser_action_row1511[] = {
        27,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       52, 0, 828,
-       54, 0, 640,
-       57, 0, 829,
-       74, 0, 641,
-       75, 0, 642,
-       76, 0, 643,
-       77, 0, 644,
-       78, 0, 645,
-       79, 0, 646,
-       80, 0, 647,
-       81, 0, 648,
-       82, 0, 649,
-       83, 0, 650,
-       84, 0, 651,
-       85, 0, 652,
-       86, 0, 653,
-       87, 0, 654,
-       88, 0, 655,
-       89, 0, 656,
-       90, 0, 657,
-       91, 0, 658,
-       92, 0, 659,
-       96, 0, 53,
-       97, 0, 660
+       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
 };
-static int parser_action_row1476[] = {
+static int parser_action_row1512[] = {
        2,
-       -1, 3, 1475,
-       97, 0, 1586
+       -1, 3, 1511,
+       97, 0, 1622
 };
-static int parser_action_row1477[] = {
+static int parser_action_row1513[] = {
        27,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       52, 0, 828,
-       54, 0, 640,
-       57, 0, 829,
-       74, 0, 641,
-       75, 0, 642,
-       76, 0, 643,
-       77, 0, 644,
-       78, 0, 645,
-       79, 0, 646,
-       80, 0, 647,
-       81, 0, 648,
-       82, 0, 649,
-       83, 0, 650,
-       84, 0, 651,
-       85, 0, 652,
-       86, 0, 653,
-       87, 0, 654,
-       88, 0, 655,
-       89, 0, 656,
-       90, 0, 657,
-       91, 0, 658,
-       92, 0, 659,
-       96, 0, 53,
-       97, 0, 660
+       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
 };
-static int parser_action_row1478[] = {
+static int parser_action_row1514[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1479[] = {
+static int parser_action_row1515[] = {
        1,
-       -1, 1, 1004
+       -1, 1, 1028
 };
-static int parser_action_row1480[] = {
+static int parser_action_row1516[] = {
        1,
-       -1, 1, 1009
+       -1, 1, 1033
 };
-static int parser_action_row1481[] = {
+static int parser_action_row1517[] = {
        1,
-       -1, 1, 1006
+       -1, 1, 1030
 };
-static int parser_action_row1482[] = {
+static int parser_action_row1518[] = {
        3,
-       -1, 3, 1481,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 1517,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row1483[] = {
-       54,
-       -1, 1, 458,
-       12, 0, 170,
+static int parser_action_row1519[] = {
+       60,
+       -1, 1, 464,
+       12, 0, 182,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 171,
+       22, 0, 183,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 172,
-       33, 0, 399,
-       34, 0, 400,
-       35, 0, 401,
-       36, 0, 402,
+       31, 0, 184,
+       33, 0, 423,
+       34, 0, 424,
+       35, 0, 425,
+       36, 0, 426,
        37, 0, 43,
-       38, 0, 173,
-       40, 0, 174,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 396,
-       48, 0, 175,
+       47, 0, 420,
+       48, 0, 187,
        50, 0, 49,
-       51, 0, 403,
+       51, 0, 427,
        52, 0, 51,
-       54, 0, 404,
-       74, 0, 405,
-       75, 0, 406,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 414,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       94, 0, 204,
-       96, 0, 424,
-       97, 0, 425,
+       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,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1484[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1485[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1521[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1486[] = {
+static int parser_action_row1522[] = {
        13,
-       -1, 1, 755,
-       59, 0, 1594,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1487[] = {
+static int parser_action_row1523[] = {
        13,
-       -1, 1, 746,
-       59, 0, 1596,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1488[] = {
+static int parser_action_row1524[] = {
        14,
-       -1, 1, 758,
-       52, 0, 277,
-       59, 0, 1598,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1489[] = {
+static int parser_action_row1525[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1490[] = {
+static int parser_action_row1526[] = {
        13,
-       -1, 1, 769,
-       59, 0, 1602,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1491[] = {
+static int parser_action_row1527[] = {
        2,
-       -1, 1, 801,
-       56, 0, 1402
+       -1, 1, 819,
+       56, 0, 1438
 };
-static int parser_action_row1492[] = {
+static int parser_action_row1528[] = {
        15,
-       -1, 1, 762,
-       52, 0, 277,
-       58, 0, 215,
-       59, 0, 1604,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1493[] = {
+static int parser_action_row1529[] = {
        22,
-       -1, 1, 456,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       97, 0, 1607
+       -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
 };
-static int parser_action_row1494[] = {
+static int parser_action_row1530[] = {
        2,
-       -1, 3, 1493,
-       45, 0, 1608
+       -1, 3, 1529,
+       45, 0, 1644
 };
-static int parser_action_row1495[] = {
+static int parser_action_row1531[] = {
        2,
-       -1, 3, 1494,
-       53, 0, 1609
+       -1, 3, 1530,
+       53, 0, 1645
 };
-static int parser_action_row1496[] = {
+static int parser_action_row1532[] = {
        1,
        -1, 1, 213
 };
-static int parser_action_row1497[] = {
+static int parser_action_row1533[] = {
        1,
        -1, 1, 232
 };
-static int parser_action_row1498[] = {
+static int parser_action_row1534[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1499[] = {
+static int parser_action_row1535[] = {
        1,
-       -1, 1, 774
+       -1, 1, 786
 };
-static int parser_action_row1500[] = {
+static int parser_action_row1536[] = {
        2,
-       -1, 3, 1499,
-       45, 0, 1611
+       -1, 3, 1535,
+       45, 0, 1647
 };
-static int parser_action_row1501[] = {
+static int parser_action_row1537[] = {
        2,
-       -1, 3, 1500,
-       53, 0, 1612
+       -1, 3, 1536,
+       53, 0, 1648
 };
-static int parser_action_row1502[] = {
-       35,
-       -1, 1, 458,
+static int parser_action_row1538[] = {
+       41,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 886,
-       12, 0, 887,
-       15, 0, 888,
+       9, 0, 910,
+       12, 0, 911,
+       15, 0, 912,
        16, 0, 34,
-       22, 0, 889,
-       24, 0, 890,
-       25, 0, 891,
-       26, 0, 892,
-       27, 0, 893,
-       33, 0, 894,
-       34, 0, 895,
-       35, 0, 896,
-       36, 0, 897,
-       37, 0, 898,
+       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,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 899,
-       51, 0, 900,
+       50, 0, 923,
+       51, 0, 924,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 901,
+       97, 0, 925,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1503[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1539[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1035,
-       12, 0, 887,
-       15, 0, 888,
+       9, 0, 1059,
+       12, 0, 911,
+       15, 0, 912,
        16, 0, 34,
-       22, 0, 889,
-       25, 0, 891,
-       26, 0, 892,
-       27, 0, 893,
-       33, 0, 894,
-       34, 0, 895,
-       35, 0, 896,
-       36, 0, 897,
-       37, 0, 898,
+       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,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 899,
-       51, 0, 900,
+       50, 0, 923,
+       51, 0, 924,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 901,
+       97, 0, 925,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1504[] = {
+static int parser_action_row1540[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1505[] = {
+static int parser_action_row1541[] = {
        1,
-       -1, 1, 944
+       -1, 1, 968
 };
-static int parser_action_row1506[] = {
+static int parser_action_row1542[] = {
        2,
        -1, 1, 157,
-       24, 1, 895
+       24, 1, 919
 };
-static int parser_action_row1507[] = {
+static int parser_action_row1543[] = {
        2,
        -1, 1, 156,
-       24, 1, 894
+       24, 1, 918
 };
-static int parser_action_row1508[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1544[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1035,
-       12, 0, 887,
-       15, 0, 888,
+       9, 0, 1059,
+       12, 0, 911,
+       15, 0, 912,
        16, 0, 34,
-       22, 0, 889,
-       25, 0, 891,
-       26, 0, 892,
-       27, 0, 893,
-       33, 0, 894,
-       34, 0, 895,
-       35, 0, 896,
-       36, 0, 897,
-       37, 0, 898,
+       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,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 899,
-       51, 0, 900,
+       50, 0, 923,
+       51, 0, 924,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 901,
+       97, 0, 925,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1509[] = {
+static int parser_action_row1545[] = {
        2,
        -1, 1, 200,
-       24, 1, 931
+       24, 1, 955
 };
-static int parser_action_row1510[] = {
+static int parser_action_row1546[] = {
        2,
        -1, 1, 192,
-       24, 1, 923
+       24, 1, 947
 };
-static int parser_action_row1511[] = {
+static int parser_action_row1547[] = {
        2,
        -1, 1, 183,
-       24, 1, 914
+       24, 1, 938
 };
-static int parser_action_row1512[] = {
-       25,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 486,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row1513[] = {
-       39,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 335,
-       59, 0, 1007,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 335,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row1514[] = {
-       25,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 486,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row1515[] = {
-       40,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 339,
-       58, 0, 215,
-       59, 0, 1012,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 339,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row1516[] = {
+static int parser_action_row1552[] = {
        3,
-       -1, 1, 456,
-       12, 0, 1623,
-       97, 0, 1624
+       -1, 1, 462,
+       12, 0, 1659,
+       97, 0, 1660
 };
-static int parser_action_row1517[] = {
+static int parser_action_row1553[] = {
        1,
        -1, 1, 272
 };
-static int parser_action_row1518[] = {
+static int parser_action_row1554[] = {
        2,
-       -1, 3, 1517,
-       49, 0, 197
+       -1, 3, 1553,
+       49, 0, 209
 };
-static int parser_action_row1519[] = {
+static int parser_action_row1555[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1520[] = {
+static int parser_action_row1556[] = {
        1,
-       -1, 1, 625
+       -1, 1, 637
 };
-static int parser_action_row1521[] = {
+static int parser_action_row1557[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1522[] = {
+static int parser_action_row1558[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1523[] = {
-       54,
-       -1, 1, 458,
-       12, 0, 170,
+static int parser_action_row1559[] = {
+       60,
+       -1, 1, 464,
+       12, 0, 182,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 171,
+       22, 0, 183,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 172,
-       33, 0, 399,
-       34, 0, 400,
-       35, 0, 401,
-       36, 0, 402,
+       31, 0, 184,
+       33, 0, 423,
+       34, 0, 424,
+       35, 0, 425,
+       36, 0, 426,
        37, 0, 43,
-       38, 0, 173,
-       40, 0, 174,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 396,
-       48, 0, 175,
+       47, 0, 420,
+       48, 0, 187,
        50, 0, 49,
-       51, 0, 403,
+       51, 0, 427,
        52, 0, 51,
-       54, 0, 404,
-       74, 0, 405,
-       75, 0, 406,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 414,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       94, 0, 204,
-       96, 0, 424,
-       97, 0, 425,
+       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,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1524[] = {
+static int parser_action_row1560[] = {
        1,
-       -1, 1, 1083
+       -1, 1, 1107
 };
-static int parser_action_row1525[] = {
+static int parser_action_row1561[] = {
        1,
        -1, 1, 149
 };
-static int parser_action_row1526[] = {
+static int parser_action_row1562[] = {
        2,
-       -1, 1, 390,
-       24, 0, 1518
+       -1, 1, 396,
+       24, 0, 1554
 };
-static int parser_action_row1527[] = {
+static int parser_action_row1563[] = {
        2,
-       -1, 3, 1526,
-       15, 0, 1630
+       -1, 3, 1562,
+       15, 0, 1666
 };
-static int parser_action_row1528[] = {
+static int parser_action_row1564[] = {
        2,
-       -1, 3, 1527,
-       23, 0, 1631
+       -1, 3, 1563,
+       23, 0, 1667
 };
-static int parser_action_row1529[] = {
+static int parser_action_row1565[] = {
        2,
-       -1, 1, 797,
-       94, 0, 594
+       -1, 1, 815,
+       94, 0, 618
 };
-static int parser_action_row1530[] = {
+static int parser_action_row1566[] = {
        1,
-       -1, 1, 807
+       -1, 1, 825
 };
-static int parser_action_row1531[] = {
+static int parser_action_row1567[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1532[] = {
+static int parser_action_row1568[] = {
        1,
-       -1, 1, 568
+       -1, 1, 574
 };
-static int parser_action_row1533[] = {
+static int parser_action_row1569[] = {
        2,
-       -1, 3, 1532,
-       73, 0, 1530
+       -1, 3, 1568,
+       73, 0, 1566
 };
-static int parser_action_row1534[] = {
+static int parser_action_row1570[] = {
        5,
-       -1, 1, 458,
-       12, 0, 1561,
-       46, 0, 1562,
+       -1, 1, 464,
+       12, 0, 1597,
+       46, 0, 1598,
        96, 0, 53,
-       97, 0, 1563
+       97, 0, 1599
 };
-static int parser_action_row1535[] = {
+static int parser_action_row1571[] = {
        1,
-       -1, 1, 381
+       -1, 1, 387
 };
-static int parser_action_row1536[] = {
+static int parser_action_row1572[] = {
        1,
-       -1, 1, 380
+       -1, 1, 386
 };
-static int parser_action_row1537[] = {
+static int parser_action_row1573[] = {
        1,
-       -1, 1, 530
+       -1, 1, 536
 };
-static int parser_action_row1538[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 1102,
-       31, 0, 1104,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
+       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_row1539[] = {
+static int parser_action_row1575[] = {
        1,
-       -1, 1, 529
+       -1, 1, 535
 };
-static int parser_action_row1540[] = {
+static int parser_action_row1576[] = {
        1,
-       -1, 1, 532
+       -1, 1, 538
 };
-static int parser_action_row1541[] = {
+static int parser_action_row1577[] = {
        2,
-       -1, 3, 1540,
-       96, 0, 1636
+       -1, 3, 1576,
+       96, 0, 1672
 };
-static int parser_action_row1542[] = {
+static int parser_action_row1578[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1543[] = {
+static int parser_action_row1579[] = {
        1,
-       -1, 1, 543
+       -1, 1, 549
 };
-static int parser_action_row1544[] = {
+static int parser_action_row1580[] = {
        2,
-       -1, 1, 545,
-       81, 0, 1288
+       -1, 1, 551,
+       81, 0, 1324
 };
-static int parser_action_row1545[] = {
+static int parser_action_row1581[] = {
        2,
-       -1, 1, 536,
-       80, 0, 1280
+       -1, 1, 542,
+       80, 0, 1316
 };
-static int parser_action_row1546[] = {
+static int parser_action_row1582[] = {
        2,
-       -1, 1, 537,
-       80, 0, 1280
+       -1, 1, 543,
+       80, 0, 1316
 };
-static int parser_action_row1547[] = {
+static int parser_action_row1583[] = {
        2,
-       -1, 1, 538,
-       80, 0, 1280
+       -1, 1, 544,
+       80, 0, 1316
 };
-static int parser_action_row1548[] = {
+static int parser_action_row1584[] = {
        2,
-       -1, 1, 539,
-       80, 0, 1280
+       -1, 1, 545,
+       80, 0, 1316
 };
-static int parser_action_row1549[] = {
+static int parser_action_row1585[] = {
        2,
-       -1, 1, 540,
-       80, 0, 1280
+       -1, 1, 546,
+       80, 0, 1316
 };
-static int parser_action_row1550[] = {
+static int parser_action_row1586[] = {
        2,
-       -1, 1, 541,
-       80, 0, 1280
+       -1, 1, 547,
+       80, 0, 1316
 };
-static int parser_action_row1551[] = {
+static int parser_action_row1587[] = {
        2,
-       -1, 1, 542,
-       80, 0, 1280
+       -1, 1, 548,
+       80, 0, 1316
 };
-static int parser_action_row1552[] = {
+static int parser_action_row1588[] = {
        2,
-       -1, 1, 547,
-       82, 0, 1289
+       -1, 1, 553,
+       82, 0, 1325
 };
-static int parser_action_row1553[] = {
+static int parser_action_row1589[] = {
        3,
-       -1, 1, 549,
-       88, 0, 1290,
-       91, 0, 1291
+       -1, 1, 555,
+       88, 0, 1326,
+       91, 0, 1327
 };
-static int parser_action_row1554[] = {
+static int parser_action_row1590[] = {
        3,
-       -1, 1, 551,
-       74, 0, 1292,
-       75, 0, 1293
+       -1, 1, 557,
+       74, 0, 1328,
+       75, 0, 1329
 };
-static int parser_action_row1555[] = {
+static int parser_action_row1591[] = {
        3,
-       -1, 1, 552,
-       74, 0, 1292,
-       75, 0, 1293
+       -1, 1, 558,
+       74, 0, 1328,
+       75, 0, 1329
 };
-static int parser_action_row1556[] = {
+static int parser_action_row1592[] = {
        4,
-       -1, 1, 554,
-       76, 0, 1294,
-       78, 0, 1295,
-       79, 0, 1296
+       -1, 1, 560,
+       76, 0, 1330,
+       78, 0, 1331,
+       79, 0, 1332
 };
-static int parser_action_row1557[] = {
+static int parser_action_row1593[] = {
        4,
-       -1, 1, 555,
-       76, 0, 1294,
-       78, 0, 1295,
-       79, 0, 1296
+       -1, 1, 561,
+       76, 0, 1330,
+       78, 0, 1331,
+       79, 0, 1332
 };
-static int parser_action_row1558[] = {
+static int parser_action_row1594[] = {
        1,
-       -1, 1, 557
+       -1, 1, 563
 };
-static int parser_action_row1559[] = {
+static int parser_action_row1595[] = {
        1,
-       -1, 1, 558
+       -1, 1, 564
 };
-static int parser_action_row1560[] = {
+static int parser_action_row1596[] = {
        1,
-       -1, 1, 559
+       -1, 1, 565
 };
-static int parser_action_row1561[] = {
+static int parser_action_row1597[] = {
        1,
-       -1, 1, 561
+       -1, 1, 567
 };
-static int parser_action_row1562[] = {
+static int parser_action_row1598[] = {
        2,
-       -1, 1, 595,
-       52, 0, 277
+       -1, 1, 601,
+       52, 0, 295
 };
-static int parser_action_row1563[] = {
+static int parser_action_row1599[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1564[] = {
+static int parser_action_row1600[] = {
        3,
-       -1, 1, 577,
-       52, 0, 277,
-       58, 0, 215
+       -1, 1, 583,
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row1565[] = {
+static int parser_action_row1601[] = {
        2,
-       -1, 3, 1564,
-       98, 0, 1641
+       -1, 3, 1600,
+       98, 0, 1677
 };
-static int parser_action_row1566[] = {
+static int parser_action_row1602[] = {
        2,
-       -1, 1, 455,
-       97, 0, 1642
+       -1, 1, 461,
+       97, 0, 1678
 };
-static int parser_action_row1567[] = {
+static int parser_action_row1603[] = {
        3,
-       -1, 1, 457,
+       -1, 1, 463,
        96, 0, 53,
-       97, 0, 1643
+       97, 0, 1679
 };
-static int parser_action_row1568[] = {
+static int parser_action_row1604[] = {
        1,
-       -1, 1, 584
+       -1, 1, 590
 };
-static int parser_action_row1569[] = {
+static int parser_action_row1605[] = {
        4,
-       -1, 3, 1568,
-       6, 0, 792,
-       17, 0, 793,
-       97, 0, 794
+       -1, 3, 1604,
+       6, 0, 816,
+       17, 0, 817,
+       97, 0, 818
 };
-static int parser_action_row1570[] = {
+static int parser_action_row1606[] = {
        1,
        -1, 1, 121
 };
-static int parser_action_row1571[] = {
+static int parser_action_row1607[] = {
        1,
        -1, 1, 109
 };
-static int parser_action_row1572[] = {
+static int parser_action_row1608[] = {
        1,
        -1, 1, 116
 };
-static int parser_action_row1573[] = {
+static int parser_action_row1609[] = {
        25,
-       -1, 3, 1572,
-       41, 0, 1313,
-       47, 0, 396,
-       54, 0, 640,
-       74, 0, 641,
-       75, 0, 642,
-       76, 0, 643,
-       77, 0, 644,
-       78, 0, 645,
-       79, 0, 646,
-       80, 0, 647,
-       81, 0, 648,
-       82, 0, 649,
-       83, 0, 650,
-       84, 0, 651,
-       85, 0, 652,
-       86, 0, 653,
-       87, 0, 654,
-       88, 0, 655,
-       89, 0, 656,
-       90, 0, 657,
-       91, 0, 658,
-       92, 0, 659,
-       96, 0, 424,
-       97, 0, 660
+       -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
 };
-static int parser_action_row1574[] = {
+static int parser_action_row1610[] = {
        1,
-       -1, 1, 1069
+       -1, 1, 1093
 };
-static int parser_action_row1575[] = {
+static int parser_action_row1611[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1576[] = {
+static int parser_action_row1612[] = {
        1,
        -1, 1, 130
 };
-static int parser_action_row1577[] = {
+static int parser_action_row1613[] = {
        1,
        -1, 1, 41
 };
-static int parser_action_row1578[] = {
+static int parser_action_row1614[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1579[] = {
+static int parser_action_row1615[] = {
        2,
-       -1, 3, 1578,
-       9, 0, 1649
+       -1, 3, 1614,
+       9, 0, 1685
 };
-static int parser_action_row1580[] = {
+static int parser_action_row1616[] = {
        4,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1581[] = {
+static int parser_action_row1617[] = {
        2,
-       -1, 3, 1580,
-       96, 0, 1324
+       -1, 3, 1616,
+       96, 0, 1360
 };
-static int parser_action_row1582[] = {
+static int parser_action_row1618[] = {
        1,
-       -1, 1, 1061
+       -1, 1, 1085
 };
-static int parser_action_row1583[] = {
+static int parser_action_row1619[] = {
        5,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       52, 0, 828,
-       57, 0, 829
+       52, 0, 852,
+       57, 0, 853
 };
-static int parser_action_row1584[] = {
+static int parser_action_row1620[] = {
        2,
-       -1, 3, 1583,
-       57, 0, 829
+       -1, 3, 1619,
+       57, 0, 853
 };
-static int parser_action_row1585[] = {
+static int parser_action_row1621[] = {
        3,
-       -1, 3, 1584,
-       14, 0, 1654,
-       15, 0, 1655
+       -1, 3, 1620,
+       14, 0, 1690,
+       15, 0, 1691
 };
-static int parser_action_row1586[] = {
+static int parser_action_row1622[] = {
        5,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       52, 0, 828,
-       57, 0, 829
+       52, 0, 852,
+       57, 0, 853
 };
-static int parser_action_row1587[] = {
+static int parser_action_row1623[] = {
        2,
        -1, 1, 155,
-       57, 0, 333
+       57, 0, 357
 };
-static int parser_action_row1588[] = {
+static int parser_action_row1624[] = {
        4,
        -1, 1, 124,
-       4, 0, 977,
-       14, 0, 978,
-       15, 0, 1659
+       4, 0, 1001,
+       14, 0, 1002,
+       15, 0, 1695
 };
-static int parser_action_row1589[] = {
+static int parser_action_row1625[] = {
        5,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       52, 0, 828,
-       57, 0, 829
+       52, 0, 852,
+       57, 0, 853
 };
-static int parser_action_row1590[] = {
+static int parser_action_row1626[] = {
        3,
-       -1, 3, 1589,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 1625,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row1591[] = {
+static int parser_action_row1627[] = {
        2,
-       -1, 3, 1590,
-       57, 0, 1665
+       -1, 3, 1626,
+       57, 0, 1701
 };
-static int parser_action_row1592[] = {
+static int parser_action_row1628[] = {
        2,
-       -1, 3, 1591,
-       53, 0, 1666
+       -1, 3, 1627,
+       53, 0, 1702
 };
-static int parser_action_row1593[] = {
+static int parser_action_row1629[] = {
        1,
-       -1, 1, 671
+       -1, 1, 683
 };
-static int parser_action_row1594[] = {
+static int parser_action_row1630[] = {
        1,
-       -1, 1, 690
+       -1, 1, 702
 };
-static int parser_action_row1595[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1631[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1596[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1632[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1597[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1633[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1598[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1634[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1599[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1600[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1636[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1601[] = {
+static int parser_action_row1637[] = {
        13,
-       -1, 1, 757,
-       59, 0, 1673,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1602[] = {
+static int parser_action_row1638[] = {
        25,
-       -1, 1, 458,
-       12, 0, 730,
-       46, 0, 731,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       96, 0, 53,
-       97, 0, 1675
+       -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
 };
-static int parser_action_row1603[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1639[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1604[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1640[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1605[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1606[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1642[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1607[] = {
+static int parser_action_row1643[] = {
        13,
-       -1, 1, 761,
-       59, 0, 1684,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1608[] = {
+static int parser_action_row1644[] = {
        14,
-       -1, 1, 760,
-       52, 0, 277,
-       59, 0, 1686,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1609[] = {
+static int parser_action_row1645[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1610[] = {
+static int parser_action_row1646[] = {
        1,
        -1, 1, 363
 };
-static int parser_action_row1611[] = {
-       22,
-       -1, 1, 458,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row1612[] = {
+static int parser_action_row1648[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1613[] = {
+static int parser_action_row1649[] = {
        1,
-       -1, 1, 778
+       -1, 1, 790
 };
-static int parser_action_row1614[] = {
+static int parser_action_row1650[] = {
        2,
-       -1, 3, 1613,
-       24, 0, 1692
+       -1, 3, 1649,
+       24, 0, 1728
 };
-static int parser_action_row1615[] = {
+static int parser_action_row1651[] = {
        1,
-       -1, 1, 938
+       -1, 1, 962
 };
-static int parser_action_row1616[] = {
+static int parser_action_row1652[] = {
        2,
-       -1, 3, 1615,
-       49, 0, 197
+       -1, 3, 1651,
+       49, 0, 209
 };
-static int parser_action_row1617[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1653[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1618[] = {
+static int parser_action_row1654[] = {
        1,
-       -1, 1, 942
+       -1, 1, 966
 };
-static int parser_action_row1619[] = {
+static int parser_action_row1655[] = {
        2,
-       -1, 3, 1618,
-       49, 0, 197
+       -1, 3, 1654,
+       49, 0, 209
 };
-static int parser_action_row1620[] = {
+static int parser_action_row1656[] = {
        2,
        -1, 1, 194,
-       24, 1, 925
+       24, 1, 949
 };
-static int parser_action_row1621[] = {
+static int parser_action_row1657[] = {
        2,
        -1, 1, 184,
-       24, 1, 915
+       24, 1, 939
 };
-static int parser_action_row1622[] = {
+static int parser_action_row1658[] = {
        2,
        -1, 1, 196,
-       24, 1, 927
+       24, 1, 951
 };
-static int parser_action_row1623[] = {
+static int parser_action_row1659[] = {
        2,
        -1, 1, 186,
-       24, 1, 917
+       24, 1, 941
 };
-static int parser_action_row1624[] = {
-       25,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 486,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+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_row1625[] = {
-       39,
-       -1, 1, 442,
-       12, 0, 116,
-       22, 0, 117,
-       31, 0, 118,
-       38, 0, 119,
-       40, 0, 120,
-       41, 1, 458,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       48, 0, 125,
-       52, 0, 126,
+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,
        54, 1, 337,
-       59, 0, 1187,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227,
+       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,
        73, 1, 337,
-       74, 0, 127,
-       75, 0, 128,
-       83, 0, 129,
-       96, 0, 53,
-       97, 0, 130,
-       98, 1, 458,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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_row1626[] = {
+static int parser_action_row1662[] = {
        1,
        -1, 1, 271
 };
-static int parser_action_row1627[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1663[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1628[] = {
+static int parser_action_row1664[] = {
        2,
-       -1, 3, 1627,
-       53, 0, 1699
+       -1, 3, 1663,
+       53, 0, 1735
 };
-static int parser_action_row1629[] = {
+static int parser_action_row1665[] = {
        1,
-       -1, 1, 407
+       -1, 1, 413
 };
-static int parser_action_row1630[] = {
+static int parser_action_row1666[] = {
        1,
-       -1, 1, 427
+       -1, 1, 433
 };
-static int parser_action_row1631[] = {
-       25,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 446,
-       27, 0, 447,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1632[] = {
+static int parser_action_row1668[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1633[] = {
+static int parser_action_row1669[] = {
        1,
-       -1, 1, 808
+       -1, 1, 826
 };
-static int parser_action_row1634[] = {
+static int parser_action_row1670[] = {
        3,
-       -1, 3, 1633,
+       -1, 3, 1669,
        96, 0, 53,
-       97, 0, 1702
+       97, 0, 1738
 };
-static int parser_action_row1635[] = {
+static int parser_action_row1671[] = {
        2,
-       -1, 3, 1634,
-       98, 0, 1705
+       -1, 3, 1670,
+       98, 0, 1741
 };
-static int parser_action_row1636[] = {
+static int parser_action_row1672[] = {
        1,
-       -1, 1, 531
+       -1, 1, 537
 };
-static int parser_action_row1637[] = {
+static int parser_action_row1673[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1638[] = {
+static int parser_action_row1674[] = {
        1,
-       -1, 1, 524
+       -1, 1, 530
 };
-static int parser_action_row1639[] = {
+static int parser_action_row1675[] = {
        1,
-       -1, 1, 593
+       -1, 1, 599
 };
-static int parser_action_row1640[] = {
+static int parser_action_row1676[] = {
        3,
-       -1, 3, 1639,
-       31, 0, 1707,
-       52, 0, 1708
+       -1, 3, 1675,
+       31, 0, 1743,
+       52, 0, 1744
 };
-static int parser_action_row1641[] = {
+static int parser_action_row1677[] = {
        1,
-       -1, 1, 575
+       -1, 1, 581
 };
-static int parser_action_row1642[] = {
+static int parser_action_row1678[] = {
        1,
-       -1, 1, 573
+       -1, 1, 579
 };
-static int parser_action_row1643[] = {
+static int parser_action_row1679[] = {
        2,
-       -1, 1, 581,
-       52, 0, 277
+       -1, 1, 587,
+       52, 0, 295
 };
-static int parser_action_row1644[] = {
+static int parser_action_row1680[] = {
        3,
-       -1, 1, 589,
-       52, 0, 277,
-       58, 0, 215
+       -1, 1, 595,
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row1645[] = {
+static int parser_action_row1681[] = {
        2,
-       -1, 1, 456,
-       97, 0, 1711
+       -1, 1, 462,
+       97, 0, 1747
 };
-static int parser_action_row1646[] = {
-       57,
-       -1, 1, 458,
-       0, 0, 88,
-       1, 0, 89,
-       12, 0, 116,
+static int parser_action_row1682[] = {
+       63,
+       -1, 1, 464,
+       0, 0, 94,
+       1, 0, 95,
+       12, 0, 122,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 117,
+       22, 0, 123,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 118,
-       33, 0, 1329,
-       34, 0, 1330,
-       35, 0, 1331,
-       36, 0, 1332,
+       31, 0, 124,
+       33, 0, 1365,
+       34, 0, 1366,
+       35, 0, 1367,
+       36, 0, 1368,
        37, 0, 43,
-       38, 0, 119,
-       40, 0, 120,
-       42, 0, 121,
-       43, 0, 122,
-       44, 0, 123,
-       45, 0, 124,
-       47, 0, 396,
-       48, 0, 125,
+       38, 0, 125,
+       40, 0, 126,
+       42, 0, 127,
+       43, 0, 128,
+       44, 0, 129,
+       45, 0, 130,
+       47, 0, 420,
+       48, 0, 131,
        50, 0, 49,
-       51, 0, 1333,
-       52, 0, 1712,
-       54, 0, 619,
-       74, 0, 1335,
-       75, 0, 1336,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 1337,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       94, 0, 204,
-       95, 0, 90,
-       96, 0, 424,
-       97, 0, 1338,
-       99, 0, 131,
-       100, 0, 132,
-       101, 0, 133,
-       102, 0, 134,
-       103, 0, 59,
-       106, 0, 135
+       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
 };
-static int parser_action_row1647[] = {
+static int parser_action_row1683[] = {
        1,
        -1, 1, 125
 };
-static int parser_action_row1648[] = {
+static int parser_action_row1684[] = {
        5,
-       -1, 3, 1647,
-       31, 0, 1716,
-       47, 0, 1717,
-       52, 0, 1718,
-       96, 0, 397
+       -1, 3, 1683,
+       31, 0, 1752,
+       47, 0, 1753,
+       52, 0, 1754,
+       96, 0, 421
 };
-static int parser_action_row1649[] = {
+static int parser_action_row1685[] = {
        1,
        -1, 1, 42
 };
-static int parser_action_row1650[] = {
+static int parser_action_row1686[] = {
        1,
        -1, 1, 28
 };
-static int parser_action_row1651[] = {
+static int parser_action_row1687[] = {
        2,
-       -1, 3, 1650,
-       9, 0, 1720
+       -1, 3, 1686,
+       9, 0, 1756
 };
-static int parser_action_row1652[] = {
+static int parser_action_row1688[] = {
        1,
        -1, 1, 40
 };
-static int parser_action_row1653[] = {
+static int parser_action_row1689[] = {
        4,
        -1, 1, 124,
-       4, 0, 977,
-       14, 0, 978,
-       15, 0, 1721
+       4, 0, 1001,
+       14, 0, 1002,
+       15, 0, 1757
 };
-static int parser_action_row1654[] = {
+static int parser_action_row1690[] = {
        2,
        -1, 1, 78,
-       14, 0, 969
+       14, 0, 993
 };
-static int parser_action_row1655[] = {
+static int parser_action_row1691[] = {
        5,
        -1, 1, 30,
-       0, 0, 88,
-       1, 0, 89,
+       0, 0, 94,
+       1, 0, 95,
        13, 0, 32,
-       95, 0, 90
+       95, 0, 96
 };
-static int parser_action_row1656[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1692[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -18072,32 +19967,38 @@ static int parser_action_row1656[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1657[] = {
+static int parser_action_row1693[] = {
        2,
-       -1, 3, 1656,
-       15, 0, 1729
+       -1, 3, 1692,
+       15, 0, 1765
 };
-static int parser_action_row1658[] = {
+static int parser_action_row1694[] = {
        3,
-       -1, 3, 1657,
-       14, 0, 1654,
-       15, 0, 1730
+       -1, 3, 1693,
+       14, 0, 1690,
+       15, 0, 1766
 };
-static int parser_action_row1659[] = {
+static int parser_action_row1695[] = {
        4,
        -1, 1, 78,
-       14, 0, 1732,
-       15, 0, 1733,
-       59, 0, 1734
-};
-static int parser_action_row1660[] = {
-       34,
-       -1, 1, 458,
+       14, 0, 1768,
+       15, 0, 1769,
+       59, 0, 1770
+};
+static int parser_action_row1696[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -18127,589 +20028,649 @@ static int parser_action_row1660[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1661[] = {
+static int parser_action_row1697[] = {
        3,
        -1, 1, 124,
-       4, 0, 977,
-       15, 0, 1738
+       4, 0, 1001,
+       15, 0, 1774
 };
-static int parser_action_row1662[] = {
+static int parser_action_row1698[] = {
        3,
-       -1, 3, 1661,
-       28, 0, 84,
-       109, 0, 85
+       -1, 3, 1697,
+       28, 0, 90,
+       115, 0, 91
 };
-static int parser_action_row1663[] = {
+static int parser_action_row1699[] = {
        1,
        -1, 1, 51
 };
-static int parser_action_row1664[] = {
+static int parser_action_row1700[] = {
        4,
        -1, 1, 124,
-       4, 0, 977,
-       14, 0, 978,
-       15, 0, 1741
+       4, 0, 1001,
+       14, 0, 1002,
+       15, 0, 1777
 };
-static int parser_action_row1665[] = {
+static int parser_action_row1701[] = {
        2,
        -1, 1, 78,
-       14, 0, 969
+       14, 0, 993
 };
-static int parser_action_row1666[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1702[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1667[] = {
+static int parser_action_row1703[] = {
        2,
-       -1, 1, 422,
-       94, 0, 204
+       -1, 1, 428,
+       94, 0, 216
 };
-static int parser_action_row1668[] = {
+static int parser_action_row1704[] = {
        1,
-       -1, 1, 670
+       -1, 1, 682
 };
-static int parser_action_row1669[] = {
+static int parser_action_row1705[] = {
        1,
-       -1, 1, 689
+       -1, 1, 701
 };
-static int parser_action_row1670[] = {
+static int parser_action_row1706[] = {
        1,
-       -1, 1, 661
+       -1, 1, 673
 };
-static int parser_action_row1671[] = {
+static int parser_action_row1707[] = {
        1,
-       -1, 1, 680
+       -1, 1, 692
 };
-static int parser_action_row1672[] = {
+static int parser_action_row1708[] = {
        1,
-       -1, 1, 673
+       -1, 1, 685
 };
-static int parser_action_row1673[] = {
+static int parser_action_row1709[] = {
        1,
-       -1, 1, 692
+       -1, 1, 704
 };
-static int parser_action_row1674[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1710[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1675[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1711[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1676[] = {
+static int parser_action_row1712[] = {
        15,
-       -1, 1, 748,
-       52, 0, 277,
-       58, 0, 215,
-       59, 0, 1750,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1677[] = {
+static int parser_action_row1713[] = {
        2,
-       -1, 3, 1676,
-       98, 0, 1753
+       -1, 3, 1712,
+       98, 0, 1789
 };
-static int parser_action_row1678[] = {
+static int parser_action_row1714[] = {
        22,
-       -1, 1, 455,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       97, 0, 1754
+       -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
 };
-static int parser_action_row1679[] = {
+static int parser_action_row1715[] = {
        1,
-       -1, 1, 805
+       -1, 1, 823
 };
-static int parser_action_row1680[] = {
+static int parser_action_row1716[] = {
        23,
-       -1, 1, 457,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       96, 0, 53,
-       97, 0, 1755
+       -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
 };
-static int parser_action_row1681[] = {
+static int parser_action_row1717[] = {
        1,
-       -1, 1, 678
+       -1, 1, 690
 };
-static int parser_action_row1682[] = {
+static int parser_action_row1718[] = {
        1,
-       -1, 1, 697
+       -1, 1, 709
 };
-static int parser_action_row1683[] = {
+static int parser_action_row1719[] = {
        1,
-       -1, 1, 677
+       -1, 1, 689
 };
-static int parser_action_row1684[] = {
+static int parser_action_row1720[] = {
        1,
-       -1, 1, 696
+       -1, 1, 708
 };
-static int parser_action_row1685[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1721[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1686[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1722[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1687[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1688[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1724[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1689[] = {
+static int parser_action_row1725[] = {
        13,
-       -1, 1, 759,
-       59, 0, 1761,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1690[] = {
+static int parser_action_row1726[] = {
        2,
-       -1, 3, 1689,
-       53, 0, 1763
+       -1, 3, 1725,
+       53, 0, 1799
 };
-static int parser_action_row1691[] = {
+static int parser_action_row1727[] = {
        1,
-       -1, 1, 699
+       -1, 1, 711
 };
-static int parser_action_row1692[] = {
+static int parser_action_row1728[] = {
        2,
-       -1, 3, 1691,
-       53, 0, 1764
+       -1, 3, 1727,
+       53, 0, 1800
 };
-static int parser_action_row1693[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1729[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1381,
-       12, 0, 887,
-       15, 0, 888,
+       9, 0, 1417,
+       12, 0, 911,
+       15, 0, 912,
        16, 0, 34,
-       22, 0, 889,
-       25, 0, 891,
-       26, 0, 892,
-       27, 0, 893,
-       33, 0, 894,
-       34, 0, 895,
-       35, 0, 896,
-       36, 0, 897,
-       37, 0, 898,
+       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,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 899,
-       51, 0, 900,
+       50, 0, 923,
+       51, 0, 924,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 901,
+       97, 0, 925,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1694[] = {
+static int parser_action_row1730[] = {
        2,
        -1, 1, 269,
-       24, 1, 937
+       24, 1, 961
 };
-static int parser_action_row1695[] = {
+static int parser_action_row1731[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1696[] = {
+static int parser_action_row1732[] = {
        2,
        -1, 1, 273,
-       24, 1, 941
+       24, 1, 965
 };
-static int parser_action_row1697[] = {
+static int parser_action_row1733[] = {
        2,
        -1, 1, 195,
-       24, 1, 926
+       24, 1, 950
 };
-static int parser_action_row1698[] = {
+static int parser_action_row1734[] = {
        2,
        -1, 1, 185,
-       24, 1, 916
+       24, 1, 940
 };
-static int parser_action_row1699[] = {
+static int parser_action_row1735[] = {
        1,
        -1, 1, 284
 };
-static int parser_action_row1700[] = {
+static int parser_action_row1736[] = {
        2,
-       -1, 1, 405,
-       94, 0, 204
+       -1, 1, 411,
+       94, 0, 216
 };
-static int parser_action_row1701[] = {
+static int parser_action_row1737[] = {
        1,
-       -1, 1, 391
+       -1, 1, 397
 };
-static int parser_action_row1702[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1738[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1703[] = {
+static int parser_action_row1739[] = {
        3,
-       -1, 1, 598,
-       52, 0, 277,
-       58, 0, 215
+       -1, 1, 604,
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row1704[] = {
+static int parser_action_row1740[] = {
        2,
-       -1, 3, 1703,
-       97, 0, 1770
+       -1, 3, 1739,
+       97, 0, 1806
 };
-static int parser_action_row1705[] = {
+static int parser_action_row1741[] = {
        3,
-       -1, 3, 1704,
+       -1, 3, 1740,
        96, 0, 53,
-       97, 0, 1771
+       97, 0, 1807
 };
-static int parser_action_row1706[] = {
+static int parser_action_row1742[] = {
        2,
-       -1, 1, 570,
-       73, 1, 573
+       -1, 1, 576,
+       73, 1, 579
 };
-static int parser_action_row1707[] = {
+static int parser_action_row1743[] = {
        1,
-       -1, 1, 525
+       -1, 1, 531
 };
-static int parser_action_row1708[] = {
+static int parser_action_row1744[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1709[] = {
+static int parser_action_row1745[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1710[] = {
+static int parser_action_row1746[] = {
        1,
-       -1, 1, 579
+       -1, 1, 585
 };
-static int parser_action_row1711[] = {
+static int parser_action_row1747[] = {
        1,
-       -1, 1, 587
+       -1, 1, 593
 };
-static int parser_action_row1712[] = {
+static int parser_action_row1748[] = {
        2,
-       -1, 1, 585,
-       52, 0, 277
+       -1, 1, 591,
+       52, 0, 295
 };
-static int parser_action_row1713[] = {
+static int parser_action_row1749[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1714[] = {
+static int parser_action_row1750[] = {
        4,
-       -1, 3, 1713,
-       0, 0, 88,
-       1, 0, 89,
-       95, 0, 90
+       -1, 3, 1749,
+       0, 0, 94,
+       1, 0, 95,
+       95, 0, 96
 };
-static int parser_action_row1715[] = {
+static int parser_action_row1751[] = {
        1,
-       -1, 1, 415
+       -1, 1, 421
 };
-static int parser_action_row1716[] = {
+static int parser_action_row1752[] = {
        4,
-       -1, 3, 1715,
-       0, 0, 88,
-       1, 0, 89,
-       95, 0, 90
+       -1, 3, 1751,
+       0, 0, 94,
+       1, 0, 95,
+       95, 0, 96
 };
-static int parser_action_row1717[] = {
+static int parser_action_row1753[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1718[] = {
+static int parser_action_row1754[] = {
        2,
        -1, 1, 135,
-       96, 0, 603
+       96, 0, 627
 };
-static int parser_action_row1719[] = {
+static int parser_action_row1755[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1720[] = {
+static int parser_action_row1756[] = {
        1,
        -1, 1, 133
 };
-static int parser_action_row1721[] = {
+static int parser_action_row1757[] = {
        1,
        -1, 1, 29
 };
-static int parser_action_row1722[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1758[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -18739,50 +20700,56 @@ static int parser_action_row1722[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1723[] = {
+static int parser_action_row1759[] = {
        3,
        -1, 1, 124,
-       4, 0, 977,
-       15, 0, 1782
+       4, 0, 1001,
+       15, 0, 1818
 };
-static int parser_action_row1724[] = {
+static int parser_action_row1760[] = {
        3,
-       -1, 3, 1723,
-       28, 0, 84,
-       109, 0, 85
+       -1, 3, 1759,
+       28, 0, 90,
+       115, 0, 91
 };
-static int parser_action_row1725[] = {
+static int parser_action_row1761[] = {
        1,
        -1, 1, 50
 };
-static int parser_action_row1726[] = {
+static int parser_action_row1762[] = {
        1,
        -1, 1, 69
 };
-static int parser_action_row1727[] = {
+static int parser_action_row1763[] = {
        1,
        -1, 1, 79
 };
-static int parser_action_row1728[] = {
+static int parser_action_row1764[] = {
        4,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1729[] = {
+static int parser_action_row1765[] = {
        2,
-       -1, 1, 469,
-       9, 0, 1320
+       -1, 1, 475,
+       9, 0, 1356
 };
-static int parser_action_row1730[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1766[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -18812,14 +20779,20 @@ static int parser_action_row1730[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1731[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1767[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -18849,27 +20822,33 @@ static int parser_action_row1731[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1732[] = {
+static int parser_action_row1768[] = {
        2,
-       -1, 3, 1731,
-       15, 0, 1789
+       -1, 3, 1767,
+       15, 0, 1825
 };
-static int parser_action_row1733[] = {
+static int parser_action_row1769[] = {
        5,
        -1, 1, 30,
-       0, 0, 88,
-       1, 0, 89,
+       0, 0, 94,
+       1, 0, 95,
        13, 0, 32,
-       95, 0, 90
+       95, 0, 96
 };
-static int parser_action_row1734[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1770[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -18899,34 +20878,40 @@ static int parser_action_row1734[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1735[] = {
+static int parser_action_row1771[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1736[] = {
+static int parser_action_row1772[] = {
        1,
        -1, 1, 59
 };
-static int parser_action_row1737[] = {
+static int parser_action_row1773[] = {
        2,
-       -1, 3, 1736,
-       15, 0, 1794
+       -1, 3, 1772,
+       15, 0, 1830
 };
-static int parser_action_row1738[] = {
+static int parser_action_row1774[] = {
        2,
-       -1, 1, 469,
-       9, 0, 1320
+       -1, 1, 475,
+       9, 0, 1356
 };
-static int parser_action_row1739[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1775[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -18956,24 +20941,30 @@ static int parser_action_row1739[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1740[] = {
+static int parser_action_row1776[] = {
        3,
-       -1, 3, 1739,
-       28, 0, 84,
-       109, 0, 85
+       -1, 3, 1775,
+       28, 0, 90,
+       115, 0, 91
 };
-static int parser_action_row1741[] = {
+static int parser_action_row1777[] = {
        1,
        -1, 1, 70
 };
-static int parser_action_row1742[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1778[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -19003,413 +20994,449 @@ static int parser_action_row1742[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1743[] = {
+static int parser_action_row1779[] = {
        3,
        -1, 1, 124,
-       4, 0, 977,
-       15, 0, 1799
+       4, 0, 1001,
+       15, 0, 1835
 };
-static int parser_action_row1744[] = {
+static int parser_action_row1780[] = {
        3,
-       -1, 3, 1743,
-       28, 0, 84,
-       109, 0, 85
+       -1, 3, 1779,
+       28, 0, 90,
+       115, 0, 91
 };
-static int parser_action_row1745[] = {
+static int parser_action_row1781[] = {
        1,
        -1, 1, 52
 };
-static int parser_action_row1746[] = {
+static int parser_action_row1782[] = {
        1,
        -1, 1, 43
 };
-static int parser_action_row1747[] = {
+static int parser_action_row1783[] = {
        1,
-       -1, 1, 1016
+       -1, 1, 1040
 };
-static int parser_action_row1748[] = {
+static int parser_action_row1784[] = {
        1,
-       -1, 1, 423
+       -1, 1, 429
 };
-static int parser_action_row1749[] = {
+static int parser_action_row1785[] = {
        1,
-       -1, 1, 672
+       -1, 1, 684
 };
-static int parser_action_row1750[] = {
+static int parser_action_row1786[] = {
        1,
-       -1, 1, 691
+       -1, 1, 703
 };
-static int parser_action_row1751[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1752[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1788[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1753[] = {
+static int parser_action_row1789[] = {
        13,
-       -1, 1, 747,
-       59, 0, 1804,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1754[] = {
+static int parser_action_row1790[] = {
        13,
-       -1, 1, 745,
-       59, 0, 1806,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1755[] = {
+static int parser_action_row1791[] = {
        14,
-       -1, 1, 750,
-       52, 0, 277,
-       59, 0, 1808,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1756[] = {
+static int parser_action_row1792[] = {
        15,
-       -1, 1, 754,
-       52, 0, 277,
-       58, 0, 215,
-       59, 0, 1811,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1757[] = {
+static int parser_action_row1793[] = {
        22,
-       -1, 1, 456,
-       54, 0, 619,
-       74, 0, 620,
-       75, 0, 621,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 622,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       97, 0, 1814
+       -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
 };
-static int parser_action_row1758[] = {
+static int parser_action_row1794[] = {
        1,
-       -1, 1, 676
+       -1, 1, 688
 };
-static int parser_action_row1759[] = {
+static int parser_action_row1795[] = {
        1,
-       -1, 1, 695
+       -1, 1, 707
 };
-static int parser_action_row1760[] = {
+static int parser_action_row1796[] = {
        1,
-       -1, 1, 675
+       -1, 1, 687
 };
-static int parser_action_row1761[] = {
+static int parser_action_row1797[] = {
        1,
-       -1, 1, 694
+       -1, 1, 706
 };
-static int parser_action_row1762[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1798[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1763[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1799[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1764[] = {
+static int parser_action_row1800[] = {
        1,
        -1, 1, 364
 };
-static int parser_action_row1765[] = {
+static int parser_action_row1801[] = {
        1,
-       -1, 1, 779
+       -1, 1, 791
 };
-static int parser_action_row1766[] = {
+static int parser_action_row1802[] = {
        1,
-       -1, 1, 934
+       -1, 1, 958
 };
-static int parser_action_row1767[] = {
+static int parser_action_row1803[] = {
        2,
-       -1, 3, 1766,
-       15, 0, 1817
+       -1, 3, 1802,
+       15, 0, 1853
 };
-static int parser_action_row1768[] = {
+static int parser_action_row1804[] = {
        1,
-       -1, 1, 411
+       -1, 1, 417
 };
-static int parser_action_row1769[] = {
+static int parser_action_row1805[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1770[] = {
+static int parser_action_row1806[] = {
        1,
-       -1, 1, 597
+       -1, 1, 603
 };
-static int parser_action_row1771[] = {
+static int parser_action_row1807[] = {
        2,
-       -1, 1, 600,
-       52, 0, 277
+       -1, 1, 606,
+       52, 0, 295
 };
-static int parser_action_row1772[] = {
+static int parser_action_row1808[] = {
        3,
-       -1, 1, 604,
-       52, 0, 277,
-       58, 0, 215
+       -1, 1, 610,
+       52, 0, 295,
+       58, 0, 227
 };
-static int parser_action_row1773[] = {
+static int parser_action_row1809[] = {
        2,
-       -1, 3, 1772,
-       97, 0, 1821
+       -1, 3, 1808,
+       97, 0, 1857
 };
-static int parser_action_row1774[] = {
+static int parser_action_row1810[] = {
        2,
-       -1, 3, 1773,
-       45, 0, 1822
+       -1, 3, 1809,
+       45, 0, 1858
 };
-static int parser_action_row1775[] = {
+static int parser_action_row1811[] = {
        4,
-       -1, 3, 1774,
-       31, 0, 1823,
-       47, 0, 396,
-       96, 0, 397
+       -1, 3, 1810,
+       31, 0, 1859,
+       47, 0, 420,
+       96, 0, 421
 };
-static int parser_action_row1776[] = {
+static int parser_action_row1812[] = {
        1,
-       -1, 1, 583
+       -1, 1, 589
 };
-static int parser_action_row1777[] = {
-       54,
-       -1, 1, 458,
-       12, 0, 170,
+static int parser_action_row1813[] = {
+       60,
+       -1, 1, 464,
+       12, 0, 182,
        15, 0, 33,
        16, 0, 34,
-       22, 0, 171,
+       22, 0, 183,
        25, 0, 36,
        26, 0, 37,
        27, 0, 38,
-       31, 0, 172,
-       33, 0, 399,
-       34, 0, 400,
-       35, 0, 401,
-       36, 0, 402,
+       31, 0, 184,
+       33, 0, 423,
+       34, 0, 424,
+       35, 0, 425,
+       36, 0, 426,
        37, 0, 43,
-       38, 0, 173,
-       40, 0, 174,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       47, 0, 396,
-       48, 0, 175,
+       47, 0, 420,
+       48, 0, 187,
        50, 0, 49,
-       51, 0, 403,
+       51, 0, 427,
        52, 0, 51,
-       54, 0, 404,
-       74, 0, 405,
-       75, 0, 406,
-       76, 0, 407,
-       77, 0, 408,
-       78, 0, 409,
-       79, 0, 410,
-       80, 0, 411,
-       81, 0, 412,
-       82, 0, 413,
-       83, 0, 414,
-       84, 0, 415,
-       85, 0, 416,
-       86, 0, 417,
-       87, 0, 418,
-       88, 0, 419,
-       89, 0, 420,
-       90, 0, 421,
-       91, 0, 422,
-       92, 0, 423,
-       94, 0, 204,
-       96, 0, 424,
-       97, 0, 425,
+       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,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1778[] = {
+static int parser_action_row1814[] = {
        1,
-       -1, 1, 416
+       -1, 1, 422
 };
-static int parser_action_row1779[] = {
+static int parser_action_row1815[] = {
        1,
-       -1, 1, 419
+       -1, 1, 425
 };
-static int parser_action_row1780[] = {
+static int parser_action_row1816[] = {
        2,
-       -1, 3, 1779,
-       47, 0, 1826
+       -1, 3, 1815,
+       47, 0, 1862
 };
-static int parser_action_row1781[] = {
+static int parser_action_row1817[] = {
        4,
-       -1, 3, 1780,
-       31, 0, 1827,
-       47, 0, 1828,
-       96, 0, 397
+       -1, 3, 1816,
+       31, 0, 1863,
+       47, 0, 1864,
+       96, 0, 421
 };
-static int parser_action_row1782[] = {
+static int parser_action_row1818[] = {
        2,
-       -1, 1, 469,
-       9, 0, 1320
+       -1, 1, 475,
+       9, 0, 1356
 };
-static int parser_action_row1783[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1819[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -19439,46 +21466,52 @@ static int parser_action_row1783[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1784[] = {
+static int parser_action_row1820[] = {
        3,
-       -1, 3, 1783,
-       28, 0, 84,
-       109, 0, 85
+       -1, 3, 1819,
+       28, 0, 90,
+       115, 0, 91
 };
-static int parser_action_row1785[] = {
+static int parser_action_row1821[] = {
        1,
        -1, 1, 57
 };
-static int parser_action_row1786[] = {
+static int parser_action_row1822[] = {
        5,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        15, 1, 80,
        95, 0, 3
 };
-static int parser_action_row1787[] = {
+static int parser_action_row1823[] = {
        1,
        -1, 1, 65
 };
-static int parser_action_row1788[] = {
+static int parser_action_row1824[] = {
        2,
-       -1, 1, 469,
-       9, 0, 1320
+       -1, 1, 475,
+       9, 0, 1356
 };
-static int parser_action_row1789[] = {
+static int parser_action_row1825[] = {
        2,
-       -1, 1, 469,
-       9, 0, 1320
+       -1, 1, 475,
+       9, 0, 1356
 };
-static int parser_action_row1790[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1826[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -19508,58 +21541,70 @@ static int parser_action_row1790[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1791[] = {
+static int parser_action_row1827[] = {
        2,
        -1, 1, 76,
        15, 1, 79
 };
-static int parser_action_row1792[] = {
+static int parser_action_row1828[] = {
        4,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
        95, 0, 3
 };
-static int parser_action_row1793[] = {
+static int parser_action_row1829[] = {
        2,
        -1, 1, 61,
-       9, 0, 1837
+       9, 0, 1873
 };
-static int parser_action_row1794[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1830[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1795[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1831[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -19589,32 +21634,38 @@ static int parser_action_row1795[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1796[] = {
+static int parser_action_row1832[] = {
        1,
        -1, 1, 53
 };
-static int parser_action_row1797[] = {
+static int parser_action_row1833[] = {
        2,
-       -1, 1, 469,
-       9, 0, 1320
+       -1, 1, 475,
+       9, 0, 1356
 };
-static int parser_action_row1798[] = {
+static int parser_action_row1834[] = {
        1,
        -1, 1, 72
 };
-static int parser_action_row1799[] = {
+static int parser_action_row1835[] = {
        2,
-       -1, 1, 469,
-       9, 0, 1320
+       -1, 1, 475,
+       9, 0, 1356
 };
-static int parser_action_row1800[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1836[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 589,
+       9, 0, 613,
        12, 0, 31,
        15, 0, 33,
        16, 0, 34,
@@ -19644,927 +21695,1041 @@ static int parser_action_row1800[] = {
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1801[] = {
+static int parser_action_row1837[] = {
        3,
-       -1, 3, 1800,
-       28, 0, 84,
-       109, 0, 85
+       -1, 3, 1836,
+       28, 0, 90,
+       115, 0, 91
 };
-static int parser_action_row1802[] = {
+static int parser_action_row1838[] = {
        1,
        -1, 1, 71
 };
-static int parser_action_row1803[] = {
+static int parser_action_row1839[] = {
        1,
-       -1, 1, 663
+       -1, 1, 675
 };
-static int parser_action_row1804[] = {
+static int parser_action_row1840[] = {
        1,
-       -1, 1, 682
+       -1, 1, 694
 };
-static int parser_action_row1805[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1841[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1806[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1842[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1807[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1843[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1808[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1844[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1809[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1810[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1846[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1811[] = {
+static int parser_action_row1847[] = {
        13,
-       -1, 1, 749,
-       59, 0, 1850,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1812[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1813[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1849[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1814[] = {
+static int parser_action_row1850[] = {
        13,
-       -1, 1, 753,
-       59, 0, 1854,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1815[] = {
+static int parser_action_row1851[] = {
        14,
-       -1, 1, 752,
-       52, 0, 277,
-       59, 0, 1856,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1816[] = {
+static int parser_action_row1852[] = {
        1,
-       -1, 1, 674
+       -1, 1, 686
 };
-static int parser_action_row1817[] = {
+static int parser_action_row1853[] = {
        1,
-       -1, 1, 693
+       -1, 1, 705
 };
-static int parser_action_row1818[] = {
-       34,
-       -1, 1, 458,
+static int parser_action_row1854[] = {
+       40,
+       -1, 1, 464,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1035,
-       12, 0, 887,
-       15, 0, 888,
+       9, 0, 1059,
+       12, 0, 911,
+       15, 0, 912,
        16, 0, 34,
-       22, 0, 889,
-       25, 0, 891,
-       26, 0, 892,
-       27, 0, 893,
-       33, 0, 894,
-       34, 0, 895,
-       35, 0, 896,
-       36, 0, 897,
-       37, 0, 898,
+       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,
        38, 0, 44,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       50, 0, 899,
-       51, 0, 900,
+       50, 0, 923,
+       51, 0, 924,
        52, 0, 51,
        54, 0, 52,
        95, 0, 3,
        96, 0, 53,
-       97, 0, 901,
+       97, 0, 925,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1819[] = {
+static int parser_action_row1855[] = {
        2,
-       -1, 3, 1818,
-       24, 0, 1861
+       -1, 3, 1854,
+       24, 0, 1897
 };
-static int parser_action_row1820[] = {
+static int parser_action_row1856[] = {
        1,
-       -1, 1, 599
+       -1, 1, 605
 };
-static int parser_action_row1821[] = {
+static int parser_action_row1857[] = {
        1,
-       -1, 1, 603
+       -1, 1, 609
 };
-static int parser_action_row1822[] = {
+static int parser_action_row1858[] = {
        2,
-       -1, 1, 602,
-       52, 0, 277
+       -1, 1, 608,
+       52, 0, 295
 };
-static int parser_action_row1823[] = {
+static int parser_action_row1859[] = {
        1,
-       -1, 1, 607
+       -1, 1, 613
 };
-static int parser_action_row1824[] = {
+static int parser_action_row1860[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1825[] = {
+static int parser_action_row1861[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1826[] = {
+static int parser_action_row1862[] = {
        2,
-       -1, 3, 1825,
-       53, 0, 1865
+       -1, 3, 1861,
+       53, 0, 1901
 };
-static int parser_action_row1827[] = {
+static int parser_action_row1863[] = {
        1,
        -1, 1, 137
 };
-static int parser_action_row1828[] = {
+static int parser_action_row1864[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1829[] = {
+static int parser_action_row1865[] = {
        4,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2,
-       96, 0, 603
+       96, 0, 627
 };
-static int parser_action_row1830[] = {
+static int parser_action_row1866[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1831[] = {
+static int parser_action_row1867[] = {
        1,
        -1, 1, 48
 };
-static int parser_action_row1832[] = {
+static int parser_action_row1868[] = {
        2,
-       -1, 1, 469,
-       9, 0, 1320
+       -1, 1, 475,
+       9, 0, 1356
 };
-static int parser_action_row1833[] = {
+static int parser_action_row1869[] = {
        1,
        -1, 1, 58
 };
-static int parser_action_row1834[] = {
+static int parser_action_row1870[] = {
        1,
        -1, 1, 67
 };
-static int parser_action_row1835[] = {
+static int parser_action_row1871[] = {
        1,
        -1, 1, 66
 };
-static int parser_action_row1836[] = {
+static int parser_action_row1872[] = {
        2,
-       -1, 1, 469,
-       9, 0, 1320
+       -1, 1, 475,
+       9, 0, 1356
 };
-static int parser_action_row1837[] = {
+static int parser_action_row1873[] = {
        6,
-       -1, 1, 485,
+       -1, 1, 491,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 1451,
+       9, 0, 1487,
        15, 1, 80,
        95, 0, 3
 };
-static int parser_action_row1838[] = {
+static int parser_action_row1874[] = {
        1,
        -1, 1, 63
 };
-static int parser_action_row1839[] = {
+static int parser_action_row1875[] = {
        2,
        -1, 1, 78,
-       14, 0, 969
+       14, 0, 993
 };
-static int parser_action_row1840[] = {
+static int parser_action_row1876[] = {
        2,
        -1, 1, 62,
-       9, 0, 1872
+       9, 0, 1908
 };
-static int parser_action_row1841[] = {
+static int parser_action_row1877[] = {
        1,
        -1, 1, 55
 };
-static int parser_action_row1842[] = {
+static int parser_action_row1878[] = {
        1,
        -1, 1, 54
 };
-static int parser_action_row1843[] = {
+static int parser_action_row1879[] = {
        2,
-       -1, 1, 469,
-       9, 0, 1320
+       -1, 1, 475,
+       9, 0, 1356
 };
-static int parser_action_row1844[] = {
+static int parser_action_row1880[] = {
        1,
        -1, 1, 73
 };
-static int parser_action_row1845[] = {
+static int parser_action_row1881[] = {
        1,
-       -1, 1, 662
+       -1, 1, 674
 };
-static int parser_action_row1846[] = {
+static int parser_action_row1882[] = {
        1,
-       -1, 1, 681
+       -1, 1, 693
 };
-static int parser_action_row1847[] = {
+static int parser_action_row1883[] = {
        1,
-       -1, 1, 660
+       -1, 1, 672
 };
-static int parser_action_row1848[] = {
+static int parser_action_row1884[] = {
        1,
-       -1, 1, 679
+       -1, 1, 691
 };
-static int parser_action_row1849[] = {
+static int parser_action_row1885[] = {
        1,
-       -1, 1, 665
+       -1, 1, 677
 };
-static int parser_action_row1850[] = {
+static int parser_action_row1886[] = {
        1,
-       -1, 1, 684
+       -1, 1, 696
 };
-static int parser_action_row1851[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1887[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1852[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1888[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1853[] = {
+static int parser_action_row1889[] = {
        1,
-       -1, 1, 669
+       -1, 1, 681
 };
-static int parser_action_row1854[] = {
+static int parser_action_row1890[] = {
        1,
-       -1, 1, 688
+       -1, 1, 700
 };
-static int parser_action_row1855[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1891[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1856[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1892[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1857[] = {
-       26,
-       -1, 1, 518,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
-       41, 1, 458,
+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,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
-       98, 1, 458,
+       97, 0, 191,
+       98, 1, 464,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1858[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1894[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1859[] = {
+static int parser_action_row1895[] = {
        13,
-       -1, 1, 751,
-       59, 0, 1880,
-       60, 0, 217,
-       61, 0, 218,
-       62, 0, 219,
-       63, 0, 220,
-       64, 0, 221,
-       65, 0, 222,
-       66, 0, 223,
-       67, 0, 224,
-       68, 0, 225,
-       69, 0, 226,
-       70, 0, 227
+       -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
 };
-static int parser_action_row1860[] = {
+static int parser_action_row1896[] = {
        1,
-       -1, 1, 940
+       -1, 1, 964
 };
-static int parser_action_row1861[] = {
+static int parser_action_row1897[] = {
        2,
-       -1, 3, 1860,
-       49, 0, 197
+       -1, 3, 1896,
+       49, 0, 209
 };
-static int parser_action_row1862[] = {
+static int parser_action_row1898[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1863[] = {
+static int parser_action_row1899[] = {
        1,
-       -1, 1, 601
+       -1, 1, 607
 };
-static int parser_action_row1864[] = {
+static int parser_action_row1900[] = {
        2,
-       -1, 3, 1863,
-       45, 0, 1884
+       -1, 3, 1899,
+       45, 0, 1920
 };
-static int parser_action_row1865[] = {
+static int parser_action_row1901[] = {
        2,
-       -1, 3, 1864,
-       53, 0, 1885
+       -1, 3, 1900,
+       53, 0, 1921
 };
-static int parser_action_row1866[] = {
+static int parser_action_row1902[] = {
        5,
-       -1, 3, 1865,
-       0, 0, 88,
-       1, 0, 89,
-       94, 0, 204,
-       95, 0, 90
+       -1, 3, 1901,
+       0, 0, 94,
+       1, 0, 95,
+       94, 0, 216,
+       95, 0, 96
 };
-static int parser_action_row1867[] = {
+static int parser_action_row1903[] = {
        2,
-       -1, 3, 1866,
-       47, 0, 1888
+       -1, 3, 1902,
+       47, 0, 1924
 };
-static int parser_action_row1868[] = {
+static int parser_action_row1904[] = {
        2,
-       -1, 3, 1867,
-       53, 0, 1889
+       -1, 3, 1903,
+       53, 0, 1925
 };
-static int parser_action_row1869[] = {
+static int parser_action_row1905[] = {
        2,
-       -1, 3, 1868,
-       53, 0, 1890
+       -1, 3, 1904,
+       53, 0, 1926
 };
-static int parser_action_row1870[] = {
+static int parser_action_row1906[] = {
        1,
        -1, 1, 49
 };
-static int parser_action_row1871[] = {
+static int parser_action_row1907[] = {
        1,
        -1, 1, 68
 };
-static int parser_action_row1872[] = {
+static int parser_action_row1908[] = {
        1,
        -1, 1, 60
 };
-static int parser_action_row1873[] = {
+static int parser_action_row1909[] = {
        1,
        -1, 1, 64
 };
-static int parser_action_row1874[] = {
+static int parser_action_row1910[] = {
        1,
        -1, 1, 56
 };
-static int parser_action_row1875[] = {
+static int parser_action_row1911[] = {
        1,
-       -1, 1, 664
+       -1, 1, 676
 };
-static int parser_action_row1876[] = {
+static int parser_action_row1912[] = {
        1,
-       -1, 1, 683
+       -1, 1, 695
 };
-static int parser_action_row1877[] = {
+static int parser_action_row1913[] = {
        1,
-       -1, 1, 668
+       -1, 1, 680
 };
-static int parser_action_row1878[] = {
+static int parser_action_row1914[] = {
        1,
-       -1, 1, 687
+       -1, 1, 699
 };
-static int parser_action_row1879[] = {
+static int parser_action_row1915[] = {
        1,
-       -1, 1, 667
+       -1, 1, 679
 };
-static int parser_action_row1880[] = {
+static int parser_action_row1916[] = {
        1,
-       -1, 1, 686
+       -1, 1, 698
 };
-static int parser_action_row1881[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+static int parser_action_row1917[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
-};
-static int parser_action_row1882[] = {
-       24,
-       -1, 1, 458,
-       12, 0, 170,
-       22, 0, 171,
-       31, 0, 172,
-       38, 0, 173,
-       40, 0, 174,
+       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_row1918[] = {
+       30,
+       -1, 1, 464,
+       12, 0, 182,
+       22, 0, 183,
+       31, 0, 184,
+       38, 0, 185,
+       40, 0, 186,
        42, 0, 45,
        43, 0, 46,
        44, 0, 47,
        45, 0, 48,
-       48, 0, 175,
+       48, 0, 187,
        52, 0, 51,
        54, 0, 52,
-       74, 0, 176,
-       75, 0, 177,
-       83, 0, 178,
+       74, 0, 188,
+       75, 0, 189,
+       83, 0, 190,
        96, 0, 53,
-       97, 0, 179,
+       97, 0, 191,
        99, 0, 55,
        100, 0, 56,
        101, 0, 57,
        102, 0, 58,
        103, 0, 59,
-       106, 0, 60
+       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_row1883[] = {
+static int parser_action_row1919[] = {
        2,
        -1, 1, 271,
-       24, 1, 939
-};
-static int parser_action_row1884[] = {
-       23,
-       -1, 1, 458,
-       12, 0, 1102,
-       22, 0, 1103,
-       31, 0, 1104,
-       38, 0, 1105,
-       40, 0, 1106,
-       42, 0, 1107,
-       43, 0, 1108,
-       44, 0, 1109,
-       45, 0, 1110,
-       48, 0, 1111,
+       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,
        52, 0, 51,
-       74, 0, 1112,
-       75, 0, 1113,
-       83, 0, 1114,
-       96, 0, 53,
-       97, 0, 1115,
-       99, 0, 1116,
-       100, 0, 1117,
-       101, 0, 1118,
-       102, 0, 1119,
-       103, 0, 59,
-       106, 0, 1120
-};
-static int parser_action_row1885[] = {
-       3,
-       -1, 1, 487,
+       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,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1886[] = {
+static int parser_action_row1922[] = {
        1,
-       -1, 1, 605
+       -1, 1, 611
 };
-static int parser_action_row1887[] = {
+static int parser_action_row1923[] = {
        4,
-       -1, 3, 1886,
-       0, 0, 88,
-       1, 0, 89,
-       95, 0, 90
+       -1, 3, 1922,
+       0, 0, 94,
+       1, 0, 95,
+       95, 0, 96
 };
-static int parser_action_row1888[] = {
+static int parser_action_row1924[] = {
        1,
-       -1, 1, 417
+       -1, 1, 423
 };
-static int parser_action_row1889[] = {
+static int parser_action_row1925[] = {
        3,
-       -1, 1, 487,
+       -1, 1, 493,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1890[] = {
+static int parser_action_row1926[] = {
        1,
        -1, 1, 134
 };
-static int parser_action_row1891[] = {
+static int parser_action_row1927[] = {
        1,
        -1, 1, 132
 };
-static int parser_action_row1892[] = {
+static int parser_action_row1928[] = {
        1,
-       -1, 1, 666
+       -1, 1, 678
 };
-static int parser_action_row1893[] = {
+static int parser_action_row1929[] = {
        1,
-       -1, 1, 685
+       -1, 1, 697
 };
-static int parser_action_row1894[] = {
+static int parser_action_row1930[] = {
        1,
-       -1, 1, 527
+       -1, 1, 533
 };
-static int parser_action_row1895[] = {
+static int parser_action_row1931[] = {
        2,
-       -1, 3, 1894,
-       53, 0, 1897
+       -1, 3, 1930,
+       53, 0, 1933
 };
-static int parser_action_row1896[] = {
+static int parser_action_row1932[] = {
        1,
-       -1, 1, 418
+       -1, 1, 424
 };
-static int parser_action_row1897[] = {
+static int parser_action_row1933[] = {
        2,
-       -1, 3, 1896,
-       53, 0, 1898
+       -1, 3, 1932,
+       53, 0, 1934
 };
-static int parser_action_row1898[] = {
+static int parser_action_row1934[] = {
        1,
-       -1, 1, 606
+       -1, 1, 612
 };
-static int parser_action_row1899[] = {
+static int parser_action_row1935[] = {
        1,
        -1, 1, 136
 };
@@ -22468,7 +24633,43 @@ const int* const parser_action_table[] = {
        parser_action_row1896,
        parser_action_row1897,
        parser_action_row1898,
-       parser_action_row1899
+       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
 };
 
 static int parser_goto_row1[] = {
@@ -22482,39 +24683,39 @@ static int parser_goto_row2[] = {
 static int parser_goto_row3[] = {
        3,
        -1, 6,
-       18, 92,
-       28, 92
+       18, 98,
+       28, 98
 };
 static int parser_goto_row4[] = {
        9,
        -1, 7,
-       20, 100,
-       30, 100,
-       95, 100,
-       99, 100,
-       112, 100,
-       114, 100,
-       265, 100,
-       274, 100
+       20, 106,
+       30, 106,
+       101, 106,
+       105, 106,
+       118, 106,
+       120, 106,
+       283, 106,
+       292, 106
 };
 static int parser_goto_row5[] = {
        16,
        -1, 8,
        5, 26,
-       18, 93,
-       19, 96,
-       20, 101,
-       28, 110,
-       29, 113,
-       30, 115,
-       94, 264,
-       95, 266,
-       99, 268,
-       111, 273,
-       112, 275,
-       114, 276,
-       265, 500,
-       274, 503
+       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
 };
 static int parser_goto_row6[] = {
        1,
@@ -22526,143 +24727,143 @@ static int parser_goto_row7[] = {
 };
 static int parser_goto_row8[] = {
        9,
-       -1, 789,
-       13, 61,
-       27, 109,
-       98, 267,
-       204, 391,
-       594, 786,
-       993, 1165,
-       1169, 1165,
-       1303, 1450
+       -1, 813,
+       13, 67,
+       27, 115,
+       104, 285,
+       216, 415,
+       618, 810,
+       1017, 1195,
+       1199, 1195,
+       1339, 1486
 };
 static int parser_goto_row9[] = {
        1,
-       -1, 469
+       -1, 493
 };
 static int parser_goto_row10[] = {
        1,
-       -1, 1325
+       -1, 1361
 };
 static int parser_goto_row11[] = {
        2,
-       -1, 1470,
-       1471, 1581
+       -1, 1506,
+       1507, 1617
 };
 static int parser_goto_row12[] = {
        2,
-       -1, 1326,
-       1580, 1651
+       -1, 1362,
+       1616, 1687
 };
 static int parser_goto_row13[] = {
        2,
-       -1, 986,
-       994, 1167
+       -1, 1010,
+       1018, 1197
 };
 static int parser_goto_row14[] = {
        4,
-       -1, 987,
-       990, 1162,
-       1468, 1578,
-       1579, 1650
+       -1, 1011,
+       1014, 1192,
+       1504, 1614,
+       1615, 1686
 };
 static int parser_goto_row15[] = {
        2,
-       -1, 988,
-       994, 1168
+       -1, 1012,
+       1018, 1198
 };
 static int parser_goto_row16[] = {
        1,
-       -1, 989
+       -1, 1013
 };
 static int parser_goto_row17[] = {
        6,
-       -1, 970,
-       825, 973,
-       1653, 1725,
-       1658, 1735,
-       1664, 1745,
-       1838, 1871
+       -1, 994,
+       849, 997,
+       1689, 1761,
+       1694, 1771,
+       1700, 1781,
+       1874, 1907
 };
 static int parser_goto_row18[] = {
        7,
-       -1, 980,
-       1584, 1656,
-       1587, 1660,
-       1652, 1722,
-       1657, 1731,
-       1658, 1736,
-       1663, 1742
+       -1, 1004,
+       1620, 1692,
+       1623, 1696,
+       1688, 1758,
+       1693, 1767,
+       1694, 1772,
+       1699, 1778
 };
 static int parser_goto_row19[] = {
        8,
-       -1, 240,
-       109, 272,
-       267, 501,
-       391, 599,
-       786, 936,
-       789, 940,
-       1165, 1328,
-       1450, 1568
+       -1, 258,
+       115, 290,
+       285, 525,
+       415, 623,
+       810, 960,
+       813, 964,
+       1195, 1364,
+       1486, 1604
 };
 static int parser_goto_row20[] = {
        4,
-       -1, 661,
-       663, 834,
-       664, 835,
-       836, 984
+       -1, 685,
+       687, 858,
+       688, 859,
+       860, 1008
 };
 static int parser_goto_row21[] = {
        6,
-       -1, 830,
-       1474, 1584,
-       1476, 1587,
-       1582, 1652,
-       1585, 1657,
-       1588, 1663
+       -1, 854,
+       1510, 1620,
+       1512, 1623,
+       1618, 1688,
+       1621, 1693,
+       1624, 1699
 };
 static int parser_goto_row22[] = {
        1,
-       -1, 1149
+       -1, 1179
 };
 static int parser_goto_row23[] = {
        2,
-       -1, 1310,
-       1312, 1458
+       -1, 1346,
+       1348, 1494
 };
 static int parser_goto_row24[] = {
        2,
-       -1, 1150,
-       1457, 1571
+       -1, 1180,
+       1493, 1607
 };
 static int parser_goto_row25[] = {
        8,
-       -1, 981,
-       980, 1157,
-       1587, 1661,
-       1652, 1723,
-       1660, 1739,
-       1663, 1743,
-       1722, 1783,
-       1742, 1800
+       -1, 1005,
+       1004, 1187,
+       1623, 1697,
+       1688, 1759,
+       1696, 1775,
+       1699, 1779,
+       1758, 1819,
+       1778, 1836
 };
 static int parser_goto_row26[] = {
        2,
-       -1, 1461,
-       1462, 1573
+       -1, 1497,
+       1498, 1609
 };
 static int parser_goto_row27[] = {
        2,
-       -1, 1314,
-       1572, 1646
+       -1, 1350,
+       1608, 1682
 };
 static int parser_goto_row28[] = {
        1,
-       -1, 1315
+       -1, 1351
 };
 static int parser_goto_row29[] = {
        1,
-       -1, 1316
+       -1, 1352
 };
 static int parser_goto_row30[] = {
        1,
@@ -22670,21 +24871,21 @@ static int parser_goto_row30[] = {
 };
 static int parser_goto_row31[] = {
        1,
-       -1, 86
+       -1, 92
 };
 static int parser_goto_row32[] = {
        11,
-       -1, 87,
-       839, 990,
-       981, 1158,
-       1157, 1323,
-       1468, 1579,
-       1661, 1740,
-       1723, 1784,
-       1739, 1797,
-       1743, 1801,
-       1783, 1832,
-       1800, 1843
+       -1, 93,
+       863, 1014,
+       1005, 1188,
+       1187, 1359,
+       1504, 1615,
+       1697, 1776,
+       1759, 1820,
+       1775, 1833,
+       1779, 1837,
+       1819, 1868,
+       1836, 1879
 };
 static int parser_goto_row33[] = {
        1,
@@ -22693,1545 +24894,1563 @@ static int parser_goto_row33[] = {
 static int parser_goto_row34[] = {
        5,
        -1, 11,
-       19, 97,
-       29, 97,
-       94, 97,
-       111, 97
+       19, 103,
+       29, 103,
+       100, 103,
+       117, 103
 };
 static int parser_goto_row35[] = {
        24,
-       -1, 426,
-       211, 398,
-       523, 711,
-       547, 739,
-       565, 754,
-       610, 803,
-       784, 933,
-       801, 933,
-       932, 933,
-       951, 933,
-       976, 1151,
-       1052, 1210,
-       1152, 1317,
-       1166, 1339,
-       1173, 1360,
-       1198, 1376,
-       1228, 1396,
-       1481, 1590,
-       1572, 1317,
-       1589, 1664,
-       1645, 1339,
-       1647, 1719,
-       1774, 1824,
-       1780, 1829
+       -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
 };
 static int parser_goto_row36[] = {
        4,
-       -1, 934,
-       801, 952,
-       932, 1074,
-       951, 1093
+       -1, 958,
+       825, 976,
+       956, 1098,
+       975, 1117
 };
 static int parser_goto_row37[] = {
        2,
-       -1, 1076,
-       1077, 1229
+       -1, 1100,
+       1101, 1259
 };
 static int parser_goto_row38[] = {
        5,
-       -1, 831,
-       1148, 1305,
-       1306, 1454,
-       1308, 1455,
-       1583, 1653
+       -1, 855,
+       1178, 1341,
+       1342, 1490,
+       1344, 1491,
+       1619, 1689
 };
 static int parser_goto_row39[] = {
        8,
-       -1, 334,
-       335, 549,
-       393, 600,
-       449, 631,
-       601, 797,
-       1324, 1466,
-       1467, 1577,
-       1586, 1658
+       -1, 358,
+       359, 573,
+       417, 624,
+       473, 655,
+       625, 821,
+       1360, 1502,
+       1503, 1613,
+       1622, 1694
 };
 static int parser_goto_row40[] = {
        32,
-       -1, 158,
-       37, 167,
-       386, 590,
-       588, 779,
-       743, 919,
-       798, 949,
-       890, 1041,
-       892, 167,
-       979, 1155,
-       1058, 1215,
-       1062, 1219,
-       1156, 1322,
-       1208, 590,
-       1216, 1390,
-       1380, 779,
-       1393, 1516,
-       1502, 919,
-       1507, 949,
-       1655, 1728,
-       1659, 1737,
-       1692, 1219,
-       1721, 1781,
-       1729, 1787,
-       1730, 1788,
-       1733, 1792,
-       1738, 1796,
-       1741, 1798,
-       1782, 1831,
-       1789, 1835,
-       1794, 1839,
-       1799, 1842,
-       1817, 1516
+       -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
 };
 static int parser_goto_row41[] = {
        1,
-       -1, 62
+       -1, 68
 };
 static int parser_goto_row42[] = {
        2,
-       -1, 63,
-       909, 1059
+       -1, 69,
+       933, 1083
 };
 static int parser_goto_row43[] = {
        4,
-       -1, 330,
-       591, 781,
-       1036, 1201,
-       1382, 1506
+       -1, 354,
+       615, 805,
+       1060, 1231,
+       1418, 1542
 };
 static int parser_goto_row44[] = {
        4,
-       -1, 241,
-       243, 471,
-       546, 471,
-       1218, 471
+       -1, 259,
+       261, 495,
+       570, 495,
+       1248, 495
 };
 static int parser_goto_row45[] = {
        15,
-       -1, 159,
-       13, 64,
-       27, 64,
-       98, 64,
-       160, 331,
-       242, 470,
-       472, 470,
-       545, 470,
-       591, 331,
-       738, 470,
-       742, 902,
-       909, 1060,
-       1036, 331,
-       1382, 331,
-       1501, 902
+       -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
 };
 static int parser_goto_row46[] = {
        18,
-       -1, 198,
-       41, 199,
-       161, 332,
-       168, 339,
-       400, 608,
-       401, 609,
-       895, 1047,
-       896, 1048,
-       920, 1066,
-       950, 1092,
-       1039, 1202,
-       1044, 1205,
-       1330, 1479,
-       1331, 1480,
-       1517, 1625,
-       1615, 1693,
-       1618, 1695,
-       1860, 1882
+       -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
 };
 static int parser_goto_row47[] = {
        20,
-       -1, 65,
-       212, 427,
-       742, 903,
-       807, 427,
-       888, 903,
-       892, 903,
-       1089, 427,
-       1166, 1340,
-       1208, 903,
-       1380, 903,
-       1400, 427,
-       1482, 427,
-       1501, 903,
-       1502, 903,
-       1507, 903,
-       1522, 427,
-       1645, 1340,
-       1692, 903,
-       1776, 427,
-       1817, 903
+       -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
 };
 static int parser_goto_row48[] = {
        18,
-       -1, 66,
-       212, 428,
-       742, 904,
-       807, 428,
-       888, 904,
-       892, 904,
-       1089, 428,
-       1208, 904,
-       1380, 904,
-       1400, 428,
-       1482, 428,
-       1501, 904,
-       1502, 904,
-       1507, 904,
-       1522, 428,
-       1692, 904,
-       1776, 428,
-       1817, 904
+       -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
 };
 static int parser_goto_row49[] = {
        52,
-       -1, 228,
-       229, 456,
-       246, 476,
-       255, 485,
-       257, 489,
-       259, 494,
-       490, 685,
-       495, 689,
-       498, 692,
-       623, 489,
-       625, 494,
-       670, 847,
-       693, 866,
-       812, 692,
-       848, 1003,
-       850, 1005,
-       852, 1008,
-       854, 1013,
-       954, 847,
-       1009, 1181,
-       1014, 1185,
-       1017, 1188,
-       1057, 489,
-       1064, 494,
-       1097, 1008,
-       1098, 1013,
-       1189, 1368,
-       1223, 692,
-       1248, 1188,
-       1338, 1484,
-       1387, 847,
-       1485, 1595,
-       1486, 1597,
-       1487, 1599,
-       1489, 1603,
-       1491, 1605,
-       1512, 1008,
-       1514, 1013,
-       1600, 1674,
-       1606, 1685,
-       1607, 1687,
-       1624, 1188,
-       1675, 1751,
-       1688, 1762,
-       1752, 1805,
-       1753, 1807,
-       1754, 1809,
-       1755, 1812,
-       1810, 1851,
-       1813, 1855,
-       1814, 1857,
-       1858, 1881
+       -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
 };
 static int parser_goto_row50[] = {
        10,
-       -1, 67,
-       212, 429,
-       807, 429,
-       1089, 429,
-       1166, 1341,
-       1400, 429,
-       1482, 429,
-       1522, 429,
-       1645, 1341,
-       1776, 429
+       -1, 73,
+       224, 453,
+       831, 453,
+       1113, 453,
+       1196, 1377,
+       1436, 453,
+       1518, 453,
+       1558, 453,
+       1681, 1377,
+       1812, 453
 };
 static int parser_goto_row51[] = {
        1,
-       -1, 68
+       -1, 74
 };
 static int parser_goto_row52[] = {
        3,
-       -1, 905,
-       909, 1061,
-       1059, 1217
+       -1, 929,
+       933, 1085,
+       1083, 1247
 };
 static int parser_goto_row53[] = {
        10,
-       -1, 69,
-       212, 430,
-       807, 430,
-       1089, 430,
-       1166, 1342,
-       1400, 430,
-       1482, 430,
-       1522, 430,
-       1645, 1342,
-       1776, 430
+       -1, 75,
+       224, 454,
+       831, 454,
+       1113, 454,
+       1196, 1378,
+       1436, 454,
+       1518, 454,
+       1558, 454,
+       1681, 1378,
+       1812, 454
 };
 static int parser_goto_row54[] = {
        10,
-       -1, 70,
-       212, 431,
-       807, 431,
-       1089, 431,
-       1166, 1343,
-       1400, 431,
-       1482, 431,
-       1522, 431,
-       1645, 1343,
-       1776, 431
+       -1, 76,
+       224, 455,
+       831, 455,
+       1113, 455,
+       1196, 1379,
+       1436, 455,
+       1518, 455,
+       1558, 455,
+       1681, 1379,
+       1812, 455
 };
 static int parser_goto_row55[] = {
        10,
-       -1, 71,
-       212, 432,
-       807, 432,
-       1089, 432,
-       1166, 1344,
-       1400, 432,
-       1482, 432,
-       1522, 432,
-       1645, 1344,
-       1776, 432
+       -1, 77,
+       224, 456,
+       831, 456,
+       1113, 456,
+       1196, 1380,
+       1436, 456,
+       1518, 456,
+       1558, 456,
+       1681, 1380,
+       1812, 456
 };
 static int parser_goto_row56[] = {
        10,
-       -1, 72,
-       212, 433,
-       807, 433,
-       1089, 433,
-       1166, 1345,
-       1400, 433,
-       1482, 433,
-       1522, 433,
-       1645, 1345,
-       1776, 433
+       -1, 78,
+       224, 457,
+       831, 457,
+       1113, 457,
+       1196, 1381,
+       1436, 457,
+       1518, 457,
+       1558, 457,
+       1681, 1381,
+       1812, 457
 };
 static int parser_goto_row57[] = {
        2,
-       -1, 394,
-       1051, 1209
+       -1, 418,
+       1075, 1239
 };
 static int parser_goto_row58[] = {
        10,
-       -1, 73,
-       212, 434,
-       807, 434,
-       1089, 434,
-       1166, 1346,
-       1400, 434,
-       1482, 434,
-       1522, 434,
-       1645, 1346,
-       1776, 434
+       -1, 79,
+       224, 458,
+       831, 458,
+       1113, 458,
+       1196, 1382,
+       1436, 458,
+       1518, 458,
+       1558, 458,
+       1681, 1382,
+       1812, 458
 };
 static int parser_goto_row59[] = {
        2,
-       -1, 201,
-       898, 1049
+       -1, 213,
+       922, 1073
 };
 static int parser_goto_row60[] = {
        131,
-       -1, 435,
-       39, 180,
-       43, 202,
-       163, 336,
-       166, 338,
-       201, 385,
-       210, 395,
-       213, 448,
-       216, 453,
-       228, 454,
-       253, 481,
-       279, 505,
-       290, 514,
-       344, 555,
-       399, 607,
-       455, 635,
-       456, 636,
-       473, 514,
-       475, 674,
-       476, 675,
-       477, 676,
-       484, 679,
-       485, 680,
-       488, 682,
-       489, 683,
-       493, 686,
-       494, 687,
-       504, 514,
-       606, 802,
-       612, 453,
-       628, 814,
-       681, 514,
-       684, 859,
-       685, 860,
-       688, 861,
-       689, 862,
-       691, 863,
-       692, 864,
-       703, 871,
-       740, 884,
-       810, 682,
-       811, 686,
-       818, 966,
-       846, 1000,
-       847, 1001,
-       865, 1019,
-       866, 1020,
-       885, 1033,
-       894, 1046,
-       898, 1050,
-       922, 1068,
-       947, 1090,
-       953, 1095,
-       961, 863,
-       1002, 1174,
-       1003, 1175,
-       1004, 1176,
-       1005, 1177,
-       1007, 1178,
-       1008, 1179,
-       1012, 1182,
-       1013, 1183,
-       1021, 1191,
-       1026, 514,
-       1040, 1203,
-       1042, 1204,
-       1049, 1207,
-       1051, 395,
-       1069, 1225,
-       1091, 1243,
-       1096, 1000,
-       1180, 1361,
-       1181, 1362,
-       1184, 1363,
-       1185, 1364,
-       1187, 1365,
-       1188, 1366,
-       1246, 1178,
-       1247, 1182,
-       1249, 1408,
-       1250, 1410,
-       1252, 1411,
-       1329, 1478,
-       1367, 1495,
-       1368, 1496,
-       1385, 1508,
-       1407, 1365,
-       1483, 1592,
-       1484, 1593,
-       1594, 1667,
-       1595, 1668,
-       1596, 1669,
-       1597, 1670,
-       1598, 1671,
-       1599, 1672,
-       1602, 1680,
-       1603, 1681,
-       1604, 1682,
-       1605, 1683,
-       1616, 1694,
-       1626, 1698,
-       1630, 966,
-       1665, 1746,
-       1673, 1748,
-       1674, 1749,
-       1684, 1757,
-       1685, 1758,
-       1686, 1759,
-       1687, 1760,
-       1701, 1768,
-       1750, 1802,
-       1751, 1803,
-       1761, 1815,
-       1762, 1816,
-       1793, 1838,
-       1804, 1844,
-       1805, 1845,
-       1806, 1846,
-       1807, 1847,
-       1808, 1848,
-       1809, 1849,
-       1811, 1852,
-       1812, 1853,
-       1850, 1874,
-       1851, 1875,
-       1854, 1876,
-       1855, 1877,
-       1856, 1878,
-       1857, 1879,
-       1880, 1891,
-       1881, 1892
+       -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
 };
 static int parser_goto_row61[] = {
        1,
-       -1, 181
+       -1, 193
 };
 static int parser_goto_row62[] = {
        6,
-       -1, 182,
-       345, 556,
-       561, 750,
-       563, 752,
-       564, 753,
-       751, 926
+       -1, 194,
+       369, 580,
+       585, 774,
+       587, 776,
+       588, 777,
+       775, 950
 };
 static int parser_goto_row63[] = {
        1,
-       -1, 183
+       -1, 195
 };
 static int parser_goto_row64[] = {
        8,
-       -1, 184,
-       567, 756,
-       568, 757,
-       569, 758,
-       570, 759,
-       571, 760,
-       572, 761,
-       573, 762
+       -1, 196,
+       591, 780,
+       592, 781,
+       593, 782,
+       594, 783,
+       595, 784,
+       596, 785,
+       597, 786
 };
 static int parser_goto_row65[] = {
        2,
-       -1, 185,
-       566, 755
+       -1, 197,
+       590, 779
 };
 static int parser_goto_row66[] = {
        2,
-       -1, 186,
-       574, 763
+       -1, 198,
+       598, 787
 };
 static int parser_goto_row67[] = {
        2,
-       -1, 187,
-       575, 764
+       -1, 199,
+       599, 788
 };
 static int parser_goto_row68[] = {
        3,
-       -1, 188,
-       576, 765,
-       577, 766
+       -1, 200,
+       600, 789,
+       601, 790
 };
 static int parser_goto_row69[] = {
        3,
-       -1, 189,
-       578, 767,
-       579, 768
+       -1, 201,
+       602, 791,
+       603, 792
 };
 static int parser_goto_row70[] = {
        5,
-       -1, 190,
-       580, 769,
-       581, 770,
-       582, 771,
-       583, 772
+       -1, 202,
+       604, 793,
+       605, 794,
+       606, 795,
+       607, 796
 };
 static int parser_goto_row71[] = {
        15,
-       -1, 191,
-       127, 291,
-       128, 292,
-       129, 293,
-       176, 350,
-       177, 351,
-       178, 352,
-       282, 508,
-       347, 558,
-       405, 350,
-       406, 351,
-       414, 352,
-       1335, 291,
-       1336, 292,
-       1337, 293
+       -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
 };
 static int parser_goto_row72[] = {
        1,
-       -1, 192
+       -1, 204
 };
 static int parser_goto_row73[] = {
        56,
-       -1, 193,
-       13, 74,
-       27, 74,
-       33, 74,
-       37, 74,
-       98, 74,
-       160, 74,
-       175, 348,
-       212, 436,
-       242, 74,
-       386, 74,
-       472, 74,
-       545, 74,
-       588, 74,
-       591, 74,
-       738, 74,
-       742, 906,
-       743, 74,
-       798, 74,
-       807, 436,
-       888, 906,
-       890, 74,
-       892, 906,
-       909, 74,
-       979, 74,
-       1036, 74,
-       1058, 74,
-       1062, 74,
-       1089, 436,
-       1156, 74,
-       1208, 906,
-       1216, 74,
-       1380, 906,
-       1382, 74,
-       1393, 74,
-       1400, 436,
-       1482, 436,
-       1501, 906,
-       1502, 906,
-       1507, 906,
-       1522, 436,
-       1655, 74,
-       1659, 74,
-       1692, 906,
-       1721, 74,
-       1729, 74,
-       1730, 74,
-       1733, 74,
-       1738, 74,
-       1741, 74,
-       1776, 436,
-       1782, 74,
-       1789, 74,
-       1794, 74,
-       1799, 74,
-       1817, 906
+       -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
 };
 static int parser_goto_row74[] = {
        2,
-       -1, 515,
-       1026, 1196
+       -1, 539,
+       1050, 1226
 };
 static int parser_goto_row75[] = {
        1,
-       -1, 75
+       -1, 81
 };
 static int parser_goto_row76[] = {
        31,
-       -1, 76,
-       964, 1121,
-       1111, 1121,
-       1112, 1121,
-       1113, 1121,
-       1114, 1121,
-       1253, 1121,
-       1255, 1121,
-       1424, 1121,
-       1426, 1121,
-       1427, 1121,
-       1429, 1121,
-       1430, 1121,
-       1431, 1121,
-       1432, 1121,
-       1433, 1121,
-       1434, 1121,
-       1435, 1121,
-       1436, 1121,
-       1437, 1121,
-       1438, 1121,
-       1439, 1121,
-       1440, 1121,
-       1441, 1121,
-       1442, 1121,
-       1443, 1121,
-       1444, 1121,
-       1445, 1121,
-       1446, 1121,
-       1537, 1121,
-       1883, 1121
+       -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
 };
 static int parser_goto_row77[] = {
        1,
-       -1, 437
+       -1, 461
 };
 static int parser_goto_row78[] = {
        2,
-       -1, 616,
-       618, 809
+       -1, 640,
+       642, 833
 };
 static int parser_goto_row79[] = {
        1,
-       -1, 449
+       -1, 473
 };
 static int parser_goto_row80[] = {
        2,
-       -1, 633,
-       634, 819
+       -1, 657,
+       658, 843
 };
 static int parser_goto_row81[] = {
        4,
-       -1, 450,
-       818, 967,
-       1249, 1409,
-       1630, 1700
+       -1, 474,
+       842, 991,
+       1279, 1445,
+       1666, 1736
 };
 static int parser_goto_row82[] = {
        93,
-       -1, 77,
-       31, 136,
-       54, 136,
-       125, 136,
-       254, 136,
-       256, 136,
-       257, 136,
-       258, 136,
-       259, 136,
-       280, 136,
-       497, 136,
-       498, 136,
-       519, 136,
-       521, 136,
-       522, 136,
-       524, 136,
-       525, 136,
-       526, 136,
-       527, 136,
-       528, 136,
-       529, 136,
-       530, 136,
-       531, 136,
-       532, 136,
-       533, 136,
-       534, 136,
-       535, 136,
-       536, 136,
-       537, 136,
-       538, 136,
-       539, 136,
-       540, 136,
-       541, 136,
-       668, 136,
-       670, 136,
-       708, 136,
-       851, 136,
-       852, 136,
-       853, 136,
-       854, 136,
-       887, 136,
-       901, 136,
-       964, 1122,
-       1016, 136,
-       1017, 136,
-       1055, 136,
-       1056, 136,
-       1057, 136,
-       1063, 136,
-       1064, 136,
-       1085, 136,
-       1111, 1122,
-       1112, 1122,
-       1113, 1122,
-       1114, 1122,
-       1166, 136,
-       1222, 136,
-       1223, 136,
-       1253, 1122,
-       1255, 1122,
-       1386, 136,
-       1387, 136,
-       1424, 1122,
-       1426, 1122,
-       1427, 1122,
-       1429, 1122,
-       1430, 1122,
-       1431, 1122,
-       1432, 1122,
-       1433, 1122,
-       1434, 1122,
-       1435, 1122,
-       1436, 1122,
-       1437, 1122,
-       1438, 1122,
-       1439, 1122,
-       1440, 1122,
-       1441, 1122,
-       1442, 1122,
-       1443, 1122,
-       1444, 1122,
-       1445, 1122,
-       1446, 1122,
-       1511, 136,
-       1512, 136,
-       1513, 136,
-       1514, 136,
-       1537, 1122,
-       1610, 136,
-       1623, 136,
-       1624, 136,
-       1645, 136,
-       1883, 1122
+       -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
 };
 static int parser_goto_row83[] = {
        1,
-       -1, 78
+       -1, 84
 };
 static int parser_goto_row84[] = {
        1,
-       -1, 79
+       -1, 85
 };
 static int parser_goto_row85[] = {
        2,
-       -1, 249,
-       252, 479
+       -1, 267,
+       270, 503
 };
 static int parser_goto_row86[] = {
        1,
-       -1, 250
+       -1, 268
 };
 static int parser_goto_row87[] = {
        2,
-       -1, 251,
-       252, 480
+       -1, 269,
+       270, 504
 };
 static int parser_goto_row88[] = {
        16,
-       -1, 205,
-       162, 335,
-       212, 438,
-       393, 601,
-       807, 438,
-       1089, 438,
-       1148, 1306,
-       1166, 1347,
-       1324, 1467,
-       1400, 438,
-       1482, 438,
-       1522, 438,
-       1645, 1713,
-       1666, 1747,
-       1776, 438,
-       1865, 1886
+       -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
 };
 static int parser_goto_row89[] = {
-       45,
-       -1, 605,
-       45, 206,
-       46, 207,
-       47, 208,
-       48, 209,
-       55, 231,
-       56, 232,
-       57, 233,
-       58, 234,
-       60, 235,
-       121, 283,
-       122, 284,
-       123, 285,
-       124, 286,
-       131, 295,
-       132, 296,
-       133, 297,
-       134, 298,
-       135, 299,
-       251, 478,
-       480, 677,
-       603, 800,
-       795, 946,
-       806, 958,
-       808, 960,
-       817, 965,
-       1085, 1237,
-       1107, 1256,
-       1108, 1257,
-       1109, 1258,
-       1110, 1259,
-       1116, 1267,
-       1117, 1268,
-       1118, 1269,
-       1119, 1270,
-       1120, 1271,
-       1148, 1307,
-       1245, 1406,
-       1405, 1524,
-       1422, 1534,
-       1423, 1535,
-       1521, 1628,
-       1541, 1637,
-       1636, 1706,
-       1699, 1767
+       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
 };
 static int parser_goto_row90[] = {
        1,
-       -1, 392
+       -1, 416
 };
 static int parser_goto_row91[] = {
        6,
-       -1, 790,
-       935, 1079,
-       969, 1144,
-       978, 1153,
-       1654, 1726,
-       1732, 1790
+       -1, 814,
+       959, 1103,
+       993, 1174,
+       1002, 1183,
+       1690, 1762,
+       1768, 1826
 };
 static int parser_goto_row92[] = {
        2,
-       -1, 791,
-       1087, 1240
+       -1, 815,
+       1111, 1270
 };
 static int parser_goto_row93[] = {
        1,
-       -1, 1238
+       -1, 1268
 };
 static int parser_goto_row94[] = {
        2,
-       -1, 943,
-       944, 1088
+       -1, 967,
+       968, 1112
 };
 static int parser_goto_row95[] = {
        5,
-       -1, 1302,
-       1304, 1452,
-       1319, 1452,
-       1785, 1452,
-       1836, 1452
+       -1, 1338,
+       1340, 1488,
+       1355, 1488,
+       1821, 1488,
+       1872, 1488
 };
 static int parser_goto_row96[] = {
        1,
-       -1, 991
+       -1, 1015
 };
 static int parser_goto_row97[] = {
        4,
-       -1, 1241,
-       1400, 1520,
-       1482, 1591,
-       1776, 1825
+       -1, 1271,
+       1436, 1556,
+       1518, 1627,
+       1812, 1861
 };
 static int parser_goto_row98[] = {
        3,
-       -1, 1403,
-       1404, 1523,
-       1490, 1523
+       -1, 1439,
+       1440, 1559,
+       1526, 1559
 };
 static int parser_goto_row99[] = {
        4,
-       -1, 1242,
-       212, 439,
-       807, 959,
-       1522, 1629
+       -1, 1272,
+       224, 463,
+       831, 983,
+       1558, 1665
 };
 static int parser_goto_row100[] = {
        4,
-       -1, 795,
-       936, 1080,
-       940, 1085,
-       1568, 1645
+       -1, 819,
+       960, 1104,
+       964, 1109,
+       1604, 1681
 };
 static int parser_goto_row101[] = {
        86,
-       -1, 353,
-       31, 137,
-       54, 229,
-       116, 278,
-       130, 294,
-       170, 137,
-       254, 482,
-       257, 490,
-       259, 495,
-       300, 517,
-       302, 518,
-       327, 543,
-       378, 482,
-       380, 585,
-       381, 586,
-       425, 229,
-       498, 693,
-       507, 700,
-       544, 736,
-       557, 748,
-       587, 778,
-       623, 490,
-       625, 495,
-       668, 843,
-       670, 848,
-       730, 876,
-       732, 878,
-       773, 843,
-       774, 927,
-       812, 693,
-       852, 1009,
-       854, 1014,
-       880, 1030,
-       881, 1031,
-       887, 137,
-       901, 229,
-       929, 1071,
-       930, 1072,
-       937, 1081,
-       954, 848,
-       1017, 1189,
-       1022, 1192,
-       1032, 1199,
-       1055, 482,
-       1057, 490,
-       1064, 495,
-       1073, 1226,
-       1082, 1233,
-       1083, 1234,
-       1097, 1009,
-       1098, 1014,
-       1102, 1251,
-       1115, 1266,
-       1193, 1370,
-       1194, 1371,
-       1223, 693,
-       1235, 1399,
-       1248, 1189,
-       1272, 1420,
-       1274, 1421,
-       1299, 1448,
-       1338, 1485,
-       1372, 1498,
-       1386, 843,
-       1387, 848,
-       1415, 1531,
-       1449, 1567,
-       1487, 1600,
-       1491, 1606,
-       1512, 1009,
-       1514, 1014,
-       1561, 1638,
-       1563, 1640,
-       1607, 1688,
-       1624, 1189,
-       1642, 1709,
-       1643, 1710,
-       1675, 1752,
-       1702, 1769,
-       1711, 1775,
-       1754, 1810,
-       1755, 1813,
-       1770, 1819,
-       1771, 1820,
-       1814, 1858,
-       1821, 1862
+       -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
 };
 static int parser_goto_row102[] = {
        34,
-       -1, 138,
-       54, 230,
-       254, 483,
-       256, 487,
-       257, 491,
-       258, 492,
-       259, 496,
-       497, 690,
-       498, 694,
-       668, 844,
-       670, 849,
-       851, 1006,
-       852, 1010,
-       853, 1011,
-       854, 1015,
-       887, 1034,
-       901, 1053,
-       1016, 1186,
-       1017, 1190,
-       1055, 1212,
-       1056, 1213,
-       1057, 1214,
-       1063, 1220,
-       1064, 1221,
-       1222, 1391,
-       1223, 1392,
-       1386, 1509,
-       1387, 1510,
-       1511, 1619,
-       1512, 1620,
-       1513, 1621,
-       1514, 1622,
-       1623, 1696,
-       1624, 1697
+       -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
 };
 static int parser_goto_row103[] = {
        6,
-       -1, 246,
-       154, 326,
-       193, 377,
-       289, 326,
-       348, 377,
-       1353, 1489
+       -1, 264,
+       166, 350,
+       205, 401,
+       307, 350,
+       372, 401,
+       1389, 1525
 };
 static int parser_goto_row104[] = {
        4,
-       -1, 516,
-       473, 667,
-       504, 697,
-       681, 858
+       -1, 540,
+       497, 691,
+       528, 721,
+       705, 882
 };
 static int parser_goto_row105[] = {
        2,
-       -1, 873,
-       874, 1027
+       -1, 897,
+       898, 1051
 };
 static int parser_goto_row106[] = {
        3,
-       -1, 342,
-       629, 815,
-       1045, 1206
+       -1, 366,
+       653, 839,
+       1069, 1236
 };
 static int parser_goto_row107[] = {
        2,
-       -1, 343,
-       552, 744
+       -1, 367,
+       576, 768
 };
 static int parser_goto_row108[] = {
        2,
-       -1, 822,
-       638, 825
+       -1, 846,
+       662, 849
 };
 static int parser_goto_row109[] = {
        157,
-       -1, 194,
-       13, 80,
-       27, 80,
-       31, 139,
-       33, 80,
-       37, 80,
-       54, 139,
-       98, 80,
-       125, 288,
-       160, 80,
-       175, 349,
-       212, 440,
-       242, 80,
-       254, 139,
-       256, 139,
-       257, 139,
-       258, 139,
-       259, 139,
-       280, 139,
-       386, 80,
-       472, 80,
-       474, 671,
-       497, 139,
-       498, 139,
-       519, 139,
-       521, 139,
-       522, 139,
-       524, 139,
-       525, 139,
-       526, 139,
-       527, 139,
-       528, 139,
-       529, 139,
-       530, 139,
-       531, 139,
-       532, 139,
-       533, 139,
-       534, 139,
-       535, 139,
-       536, 139,
-       537, 139,
-       538, 139,
-       539, 139,
-       540, 139,
-       541, 139,
-       542, 733,
-       545, 80,
-       584, 775,
-       588, 80,
-       591, 80,
-       668, 139,
-       670, 139,
-       702, 870,
-       708, 139,
-       738, 80,
-       742, 907,
-       743, 80,
-       749, 925,
-       798, 80,
-       805, 671,
-       807, 440,
-       851, 139,
-       852, 139,
-       853, 139,
-       854, 139,
-       887, 139,
-       888, 907,
-       890, 80,
-       892, 907,
-       901, 139,
-       909, 80,
-       964, 1123,
-       979, 80,
-       1016, 139,
-       1017, 139,
-       1036, 80,
-       1055, 139,
-       1056, 139,
-       1057, 139,
-       1058, 80,
-       1062, 80,
-       1063, 139,
-       1064, 139,
-       1089, 440,
-       1111, 1261,
-       1112, 1123,
-       1113, 1123,
-       1114, 1123,
-       1156, 80,
-       1166, 1348,
-       1208, 907,
-       1211, 671,
-       1216, 80,
-       1222, 139,
-       1223, 139,
-       1253, 1123,
-       1255, 1123,
-       1380, 907,
-       1382, 80,
-       1386, 139,
-       1387, 139,
-       1393, 80,
-       1400, 440,
-       1424, 1123,
-       1426, 1123,
-       1427, 1123,
-       1429, 1123,
-       1430, 1123,
-       1431, 1123,
-       1432, 1123,
-       1433, 1123,
-       1434, 1123,
-       1435, 1123,
-       1436, 1123,
-       1437, 1123,
-       1438, 1123,
-       1439, 1123,
-       1440, 1123,
-       1441, 1123,
-       1442, 1123,
-       1443, 1123,
-       1444, 1123,
-       1445, 1123,
-       1446, 1123,
-       1447, 1564,
-       1482, 440,
-       1501, 907,
-       1502, 907,
-       1507, 907,
-       1511, 139,
-       1512, 139,
-       1513, 139,
-       1514, 139,
-       1522, 440,
-       1533, 1634,
-       1537, 1123,
-       1601, 1676,
-       1610, 139,
-       1623, 139,
-       1624, 139,
-       1645, 1348,
-       1655, 80,
-       1659, 80,
-       1692, 907,
-       1721, 80,
-       1729, 80,
-       1730, 80,
-       1733, 80,
-       1738, 80,
-       1741, 80,
-       1776, 440,
-       1782, 80,
-       1789, 80,
-       1794, 80,
-       1799, 80,
-       1817, 907,
-       1883, 1123
+       -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
 };
 static int parser_goto_row110[] = {
        1,
-       -1, 839
+       -1, 863
 };
 static int parser_goto_row111[] = {
        6,
-       -1, 1318,
-       467, 662,
-       1463, 1575,
-       1472, 1582,
-       1474, 1585,
-       1476, 1588
+       -1, 1354,
+       491, 686,
+       1499, 1611,
+       1508, 1618,
+       1510, 1621,
+       1512, 1624
 };
 static int parser_goto_row112[] = {
        22,
-       -1, 81,
-       83, 260,
-       156, 260,
-       196, 260,
-       445, 260,
-       664, 260,
-       673, 260,
-       735, 260,
-       777, 260,
-       823, 260,
-       841, 260,
-       918, 260,
-       939, 260,
-       957, 260,
-       1024, 260,
-       1140, 260,
-       1143, 260,
-       1357, 260,
-       1389, 260,
-       1566, 260,
-       1679, 260,
-       1704, 260
+       -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
 };
 static int parser_goto_row113[] = {
        186,
-       -1, 195,
-       13, 82,
-       27, 82,
-       31, 140,
-       33, 82,
-       37, 82,
-       54, 140,
-       83, 261,
-       98, 82,
-       125, 140,
-       156, 328,
-       160, 82,
-       196, 382,
-       212, 441,
-       242, 82,
-       254, 140,
-       256, 140,
-       257, 140,
-       258, 140,
-       259, 140,
-       280, 140,
-       386, 82,
-       445, 626,
-       467, 663,
-       472, 82,
-       474, 672,
-       497, 140,
-       498, 140,
-       519, 140,
-       521, 140,
-       522, 140,
-       524, 140,
-       525, 140,
-       526, 140,
-       527, 140,
-       528, 140,
-       529, 140,
-       530, 140,
-       531, 140,
-       532, 140,
-       533, 140,
-       534, 140,
-       535, 140,
-       536, 140,
-       537, 140,
-       538, 140,
-       539, 140,
-       540, 140,
-       541, 140,
-       542, 734,
-       545, 82,
-       584, 776,
-       588, 82,
-       591, 82,
-       664, 836,
-       666, 840,
-       668, 140,
-       670, 140,
-       673, 855,
-       702, 734,
-       708, 140,
-       735, 882,
-       738, 82,
-       742, 908,
-       743, 82,
-       749, 776,
-       777, 931,
-       788, 938,
-       798, 82,
-       805, 955,
-       807, 441,
-       841, 997,
-       851, 140,
-       852, 140,
-       853, 140,
-       854, 140,
-       869, 1023,
-       887, 140,
-       888, 908,
-       890, 82,
-       892, 908,
-       901, 140,
-       909, 82,
-       918, 1065,
-       939, 1084,
-       957, 1099,
-       964, 1124,
-       979, 82,
-       1016, 140,
-       1017, 140,
-       1024, 1195,
-       1036, 82,
-       1055, 140,
-       1056, 140,
-       1057, 140,
-       1058, 82,
-       1062, 82,
-       1063, 140,
-       1064, 140,
-       1089, 441,
-       1111, 1124,
-       1112, 1124,
-       1113, 1124,
-       1114, 1124,
-       1140, 1300,
-       1152, 663,
-       1156, 82,
-       1166, 1349,
-       1208, 908,
-       1211, 1388,
-       1216, 82,
-       1222, 140,
-       1223, 140,
-       1253, 1124,
-       1255, 1124,
-       1357, 1492,
-       1380, 908,
-       1382, 82,
-       1386, 140,
-       1387, 140,
-       1389, 1515,
-       1393, 82,
-       1400, 441,
-       1424, 1124,
-       1426, 1124,
-       1427, 1124,
-       1429, 1124,
-       1430, 1124,
-       1431, 1124,
-       1432, 1124,
-       1433, 1124,
-       1434, 1124,
-       1435, 1124,
-       1436, 1124,
-       1437, 1124,
-       1438, 1124,
-       1439, 1124,
-       1440, 1124,
-       1441, 1124,
-       1442, 1124,
-       1443, 1124,
-       1444, 1124,
-       1445, 1124,
-       1446, 1124,
-       1447, 1565,
-       1463, 663,
-       1472, 663,
-       1474, 663,
-       1476, 663,
-       1482, 441,
-       1501, 908,
-       1502, 908,
-       1507, 908,
-       1511, 140,
-       1512, 140,
-       1513, 140,
-       1514, 140,
-       1522, 441,
-       1533, 1565,
-       1537, 1124,
-       1566, 1644,
-       1572, 663,
-       1601, 1677,
-       1610, 140,
-       1623, 140,
-       1624, 140,
-       1633, 1703,
-       1645, 1349,
-       1655, 82,
-       1659, 82,
-       1679, 1756,
-       1692, 908,
-       1704, 1772,
-       1721, 82,
-       1729, 82,
-       1730, 82,
-       1733, 82,
-       1738, 82,
-       1741, 82,
-       1776, 441,
-       1782, 82,
-       1789, 82,
-       1794, 82,
-       1799, 82,
-       1817, 908,
-       1883, 1124
+       -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
 };
 static int parser_goto_row114[] = {
        12,
-       -1, 1321,
-       1322, 1465,
-       1728, 1786,
-       1737, 1795,
-       1781, 1830,
-       1787, 1833,
-       1788, 1834,
-       1796, 1840,
-       1798, 1841,
-       1831, 1869,
-       1835, 1870,
-       1842, 1873
+       -1, 1357,
+       1358, 1501,
+       1764, 1822,
+       1773, 1831,
+       1817, 1866,
+       1823, 1869,
+       1824, 1870,
+       1832, 1876,
+       1834, 1877,
+       1867, 1905,
+       1871, 1906,
+       1878, 1909
 };
 static int parser_goto_row115[] = {
        14,
-       -1, 91,
-       824, 972,
-       969, 1145,
-       970, 1146,
-       973, 1147,
-       978, 1154,
-       989, 1161,
-       1645, 1714,
-       1654, 1727,
-       1713, 1777,
-       1715, 1778,
-       1732, 1791,
-       1865, 1887,
-       1886, 1895
+       -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
 };
 static int parser_goto_row116[] = {
        55,
-       -1, 591,
+       -1, 615,
        0, 12,
        3, 23,
        5, 12,
@@ -24241,331 +26460,331 @@ static int parser_goto_row116[] = {
        28, 12,
        29, 12,
        30, 12,
-       33, 160,
-       37, 160,
-       64, 242,
-       94, 12,
-       95, 12,
-       99, 12,
-       104, 269,
-       105, 270,
-       111, 12,
-       112, 12,
-       114, 12,
-       243, 472,
-       265, 12,
-       271, 502,
-       274, 12,
-       331, 545,
-       546, 738,
-       742, 909,
-       743, 160,
-       798, 160,
-       839, 992,
-       888, 1036,
-       892, 1036,
-       990, 992,
-       994, 992,
-       1060, 242,
-       1145, 992,
-       1154, 992,
-       1208, 1382,
-       1218, 472,
-       1304, 992,
-       1319, 992,
-       1380, 1382,
-       1393, 160,
-       1468, 992,
-       1501, 909,
-       1502, 1036,
-       1507, 1036,
-       1579, 992,
-       1692, 1382,
-       1727, 992,
-       1785, 992,
-       1791, 992,
-       1817, 1036,
-       1836, 992
+       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
 };
 static int parser_goto_row117[] = {
        18,
-       -1, 98,
+       -1, 104,
        0, 13,
        5, 27,
        18, 27,
        28, 27,
-       839, 993,
-       990, 993,
-       994, 1169,
-       1145, 1303,
-       1154, 1303,
-       1304, 1303,
-       1319, 1303,
-       1468, 993,
-       1579, 993,
-       1727, 1303,
-       1785, 1303,
-       1791, 1303,
-       1836, 1303
+       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
 };
 static int parser_goto_row118[] = {
        249,
        -1, 14,
-       35, 163,
-       36, 166,
-       38, 169,
-       44, 203,
-       49, 210,
-       51, 212,
-       52, 213,
-       79, 253,
-       84, 262,
-       117, 279,
-       118, 280,
-       119, 281,
-       120, 282,
-       126, 290,
-       171, 344,
-       172, 345,
-       173, 346,
-       174, 347,
-       214, 451,
-       215, 452,
-       236, 457,
-       237, 458,
-       238, 459,
-       239, 460,
-       244, 473,
-       245, 474,
-       250, 477,
-       277, 504,
-       287, 509,
-       303, 519,
-       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,
-       322, 539,
-       323, 540,
-       324, 541,
-       325, 542,
-       333, 547,
-       336, 550,
-       338, 551,
-       340, 552,
-       342, 553,
-       354, 561,
-       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,
-       373, 581,
-       374, 582,
-       375, 583,
-       376, 584,
+       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,
+       386, 594,
+       387, 595,
+       388, 596,
+       389, 597,
        390, 598,
+       391, 599,
+       392, 600,
+       393, 601,
        394, 602,
-       404, 213,
-       437, 614,
-       439, 617,
-       446, 628,
-       447, 629,
-       448, 630,
-       461, 637,
-       462, 638,
-       469, 666,
-       481, 678,
-       486, 681,
-       499, 695,
-       505, 698,
-       511, 702,
-       515, 705,
-       520, 708,
-       548, 740,
-       554, 746,
-       555, 747,
-       559, 749,
-       562, 751,
-       593, 784,
-       597, 788,
-       604, 801,
-       613, 805,
-       615, 807,
-       632, 818,
-       662, 832,
-       669, 845,
-       676, 856,
-       699, 869,
-       731, 877,
-       741, 885,
-       744, 921,
-       745, 922,
-       782, 932,
-       785, 935,
-       790, 941,
-       796, 947,
-       799, 951,
-       814, 962,
-       815, 963,
-       816, 964,
-       820, 968,
-       828, 975,
-       829, 976,
-       831, 983,
-       868, 1021,
-       872, 1026,
-       889, 1040,
-       891, 1042,
-       893, 1045,
-       899, 1051,
-       924, 1069,
-       934, 1078,
-       942, 1087,
-       945, 1089,
-       948, 1091,
-       952, 1094,
-       966, 1141,
-       977, 1152,
-       985, 1159,
-       994, 1170,
-       998, 1172,
-       999, 1173,
-       1028, 1197,
-       1029, 1198,
-       1054, 1211,
-       1068, 1224,
-       1074, 1227,
-       1075, 1228,
-       1079, 1231,
-       1093, 1244,
-       1100, 1249,
-       1101, 1250,
-       1103, 1252,
-       1104, 1253,
-       1105, 1254,
-       1106, 1255,
-       1125, 1275,
-       1150, 1311,
-       1191, 1369,
-       1196, 1373,
-       1203, 1377,
-       1204, 1378,
-       1206, 1379,
-       1209, 1384,
-       1225, 1394,
-       1236, 1400,
-       1241, 1401,
-       1260, 1417,
-       1276, 1424,
-       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,
-       1293, 1442,
-       1294, 1443,
-       1295, 1444,
-       1296, 1445,
-       1297, 1446,
-       1298, 1447,
-       1308, 1456,
-       1309, 1457,
-       1312, 1459,
-       1334, 1482,
-       1359, 1493,
-       1360, 1494,
-       1375, 1499,
-       1376, 1500,
-       1402, 1522,
-       1408, 1525,
-       1410, 1526,
-       1411, 1527,
-       1419, 1533,
-       1425, 1537,
-       1455, 1570,
-       1460, 1572,
-       1466, 1576,
-       1469, 1580,
-       1474, 832,
-       1476, 832,
-       1477, 1589,
-       1488, 1601,
-       1497, 1610,
-       1503, 1616,
-       1518, 1626,
-       1520, 1627,
-       1530, 1633,
-       1562, 1639,
-       1574, 1647,
-       1577, 1648,
-       1582, 832,
-       1585, 832,
-       1588, 832,
-       1608, 1689,
-       1611, 1691,
-       1631, 1701,
-       1694, 1766,
-       1707, 1773,
-       1708, 1774,
-       1712, 1776,
-       1716, 1779,
-       1718, 1780,
-       1734, 1793,
-       1768, 1818,
-       1823, 1863,
-       1824, 1864,
-       1827, 1866,
-       1828, 1867,
-       1829, 1868,
-       1861, 1883,
-       1884, 1894,
-       1888, 1896
+       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
 };
 static int parser_goto_row119[] = {
        4,
        -1, 15,
-       22, 106,
-       25, 106,
-       165, 106
+       22, 112,
+       25, 112,
+       177, 112
 };
 static int parser_goto_row120[] = {
        1,
@@ -24573,123 +26792,123 @@ static int parser_goto_row120[] = {
 };
 static int parser_goto_row121[] = {
        4,
-       -1, 982,
-       1587, 1662,
-       1652, 1724,
-       1663, 1744
+       -1, 1006,
+       1623, 1698,
+       1688, 1760,
+       1699, 1780
 };
 static int parser_goto_row122[] = {
        13,
-       -1, 442,
-       441, 624,
-       445, 627,
-       626, 813,
-       955, 624,
-       957, 627,
-       1099, 813,
-       1349, 624,
-       1357, 627,
-       1492, 813,
-       1677, 624,
-       1679, 627,
-       1756, 813
+       -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
 };
 static int parser_goto_row123[] = {
        5,
-       -1, 443,
-       805, 956,
-       1166, 1350,
-       1601, 1678,
-       1645, 1350
+       -1, 467,
+       829, 980,
+       1196, 1386,
+       1637, 1714,
+       1681, 1386
 };
 static int parser_goto_row124[] = {
        1,
-       -1, 1542
+       -1, 1578
 };
 static int parser_goto_row125[] = {
        2,
-       -1, 1125,
-       1883, 1893
+       -1, 1155,
+       1919, 1929
 };
 static int parser_goto_row126[] = {
        1,
-       -1, 1126
+       -1, 1156
 };
 static int parser_goto_row127[] = {
        6,
-       -1, 1127,
-       1253, 1412,
-       1424, 1536,
-       1426, 1538,
-       1427, 1539,
-       1537, 1635
+       -1, 1157,
+       1283, 1448,
+       1460, 1572,
+       1462, 1574,
+       1463, 1575,
+       1573, 1671
 };
 static int parser_goto_row128[] = {
        1,
-       -1, 1128
+       -1, 1158
 };
 static int parser_goto_row129[] = {
        8,
-       -1, 1129,
-       1430, 1544,
-       1431, 1545,
-       1432, 1546,
-       1433, 1547,
-       1434, 1548,
-       1435, 1549,
-       1436, 1550
+       -1, 1159,
+       1466, 1580,
+       1467, 1581,
+       1468, 1582,
+       1469, 1583,
+       1470, 1584,
+       1471, 1585,
+       1472, 1586
 };
 static int parser_goto_row130[] = {
        2,
-       -1, 1130,
-       1429, 1543
+       -1, 1160,
+       1465, 1579
 };
 static int parser_goto_row131[] = {
        2,
-       -1, 1131,
-       1437, 1551
+       -1, 1161,
+       1473, 1587
 };
 static int parser_goto_row132[] = {
        2,
-       -1, 1132,
-       1438, 1552
+       -1, 1162,
+       1474, 1588
 };
 static int parser_goto_row133[] = {
        3,
-       -1, 1133,
-       1439, 1553,
-       1440, 1554
+       -1, 1163,
+       1475, 1589,
+       1476, 1590
 };
 static int parser_goto_row134[] = {
        3,
-       -1, 1134,
-       1441, 1555,
-       1442, 1556
+       -1, 1164,
+       1477, 1591,
+       1478, 1592
 };
 static int parser_goto_row135[] = {
        5,
-       -1, 1135,
-       1443, 1557,
-       1444, 1558,
-       1445, 1559,
-       1446, 1560
+       -1, 1165,
+       1479, 1593,
+       1480, 1594,
+       1481, 1595,
+       1482, 1596
 };
 static int parser_goto_row136[] = {
        5,
-       -1, 1136,
-       1112, 1263,
-       1113, 1264,
-       1114, 1265,
-       1255, 1416
+       -1, 1166,
+       1136, 1293,
+       1137, 1294,
+       1138, 1295,
+       1285, 1452
 };
 static int parser_goto_row137[] = {
        1,
-       -1, 1137
+       -1, 1167
 };
 static int parser_goto_row138[] = {
        2,
-       -1, 1138,
-       1111, 1262
+       -1, 1168,
+       1135, 1292
 };
 static int parser_goto_row139[] = {
        1,
@@ -24697,14 +26916,14 @@ static int parser_goto_row139[] = {
 };
 static int parser_goto_row140[] = {
        1,
-       -1, 1139
+       -1, 1169
 };
 static int parser_goto_row141[] = {
        4,
-       -1, 389,
-       281, 507,
-       346, 557,
-       509, 701
+       -1, 413,
+       299, 531,
+       370, 581,
+       533, 725
 };
 static int parser_goto_row142[] = {
        1,
@@ -24712,92 +26931,92 @@ static int parser_goto_row142[] = {
 };
 static int parser_goto_row143[] = {
        1,
-       -1, 1351
+       -1, 1387
 };
 static int parser_goto_row144[] = {
        4,
-       -1, 141,
-       1166, 1352,
-       1610, 1690,
-       1645, 1352
+       -1, 153,
+       1196, 1388,
+       1646, 1726,
+       1681, 1388
 };
 static int parser_goto_row145[] = {
        1,
-       -1, 142
+       -1, 154
 };
 static int parser_goto_row146[] = {
        6,
-       -1, 143,
-       280, 506,
-       519, 707,
-       521, 709,
-       522, 710,
-       708, 875
+       -1, 155,
+       298, 530,
+       543, 731,
+       545, 733,
+       546, 734,
+       732, 899
 };
 static int parser_goto_row147[] = {
        1,
-       -1, 144
+       -1, 156
 };
 static int parser_goto_row148[] = {
        8,
-       -1, 145,
-       525, 713,
-       526, 714,
-       527, 715,
-       528, 716,
-       529, 717,
-       530, 718,
-       531, 719
+       -1, 157,
+       549, 737,
+       550, 738,
+       551, 739,
+       552, 740,
+       553, 741,
+       554, 742,
+       555, 743
 };
 static int parser_goto_row149[] = {
        2,
-       -1, 146,
-       524, 712
+       -1, 158,
+       548, 736
 };
 static int parser_goto_row150[] = {
        2,
-       -1, 147,
-       532, 720
+       -1, 159,
+       556, 744
 };
 static int parser_goto_row151[] = {
        2,
-       -1, 148,
-       533, 721
+       -1, 160,
+       557, 745
 };
 static int parser_goto_row152[] = {
        3,
-       -1, 149,
-       534, 722,
-       535, 723
+       -1, 161,
+       558, 746,
+       559, 747
 };
 static int parser_goto_row153[] = {
        3,
-       -1, 150,
-       536, 724,
-       537, 725
+       -1, 162,
+       560, 748,
+       561, 749
 };
 static int parser_goto_row154[] = {
        5,
-       -1, 151,
-       538, 726,
-       539, 727,
-       540, 728,
-       541, 729
+       -1, 163,
+       562, 750,
+       563, 751,
+       564, 752,
+       565, 753
 };
 static int parser_goto_row155[] = {
        1,
-       -1, 152
+       -1, 164
 };
 static int parser_goto_row156[] = {
        1,
-       -1, 153
+       -1, 165
 };
 static int parser_goto_row157[] = {
        4,
-       -1, 154,
-       125, 289,
-       1166, 1353,
-       1645, 1353
+       -1, 166,
+       131, 307,
+       1196, 1389,
+       1681, 1389
 };
 static int parser_goto_row158[] = {
        1,
@@ -24805,26 +27024,26 @@ static int parser_goto_row158[] = {
 };
 static int parser_goto_row159[] = {
        2,
-       -1, 155,
-       1085, 1239
+       -1, 167,
+       1109, 1269
 };
 static int parser_goto_row160[] = {
        1,
-       -1, 595
+       -1, 619
 };
 static int parser_goto_row161[] = {
        7,
-       -1, 596,
-       592, 783,
-       1080, 1232,
-       1230, 1397,
-       1395, 1519,
-       1414, 1529,
-       1528, 1632
+       -1, 620,
+       616, 807,
+       1104, 1262,
+       1260, 1433,
+       1431, 1555,
+       1450, 1565,
+       1564, 1668
 };
 static int parser_goto_row162[] = {
        1,
-       -1, 787
+       -1, 811
 };
 static int parser_goto_row163[] = {
        1,
@@ -24832,17 +27051,17 @@ static int parser_goto_row163[] = {
 };
 static int parser_goto_row164[] = {
        2,
-       -1, 1354,
-       1645, 1715
+       -1, 1390,
+       1681, 1751
 };
 static int parser_goto_row165[] = {
        1,
-       -1, 1355
+       -1, 1391
 };
 static int parser_goto_row166[] = {
        2,
-       -1, 1415,
-       1417, 1532
+       -1, 1451,
+       1453, 1568
 };
 static int parser_goto_row167[] = {
        1,
@@ -24914,48 +27133,48 @@ static int parser_goto_row183[] = {
 };
 static int parser_goto_row184[] = {
        8,
-       -1, 1037,
-       892, 1043,
-       1208, 1383,
-       1380, 1504,
-       1502, 1614,
-       1507, 1617,
-       1692, 1765,
-       1817, 1859
+       -1, 1061,
+       916, 1067,
+       1238, 1419,
+       1416, 1540,
+       1538, 1650,
+       1543, 1653,
+       1728, 1801,
+       1853, 1895
 };
 static int parser_goto_row185[] = {
        3,
-       -1, 1038,
-       742, 910,
-       1501, 1613
+       -1, 1062,
+       766, 934,
+       1537, 1649
 };
 static int parser_goto_row186[] = {
        1,
-       -1, 911
+       -1, 935
 };
 static int parser_goto_row187[] = {
        1,
-       -1, 912
+       -1, 936
 };
 static int parser_goto_row188[] = {
        1,
-       -1, 913
+       -1, 937
 };
 static int parser_goto_row189[] = {
        1,
-       -1, 914
+       -1, 938
 };
 static int parser_goto_row190[] = {
        1,
-       -1, 915
+       -1, 939
 };
 static int parser_goto_row191[] = {
        1,
-       -1, 916
+       -1, 940
 };
 static int parser_goto_row192[] = {
        1,
-       -1, 917
+       -1, 941
 };
 static int parser_goto_row193[] = {
        1,
@@ -24963,16 +27182,16 @@ static int parser_goto_row193[] = {
 };
 static int parser_goto_row194[] = {
        10,
-       -1, 161,
-       37, 168,
-       743, 920,
-       798, 950,
-       888, 1039,
-       892, 1044,
-       1393, 1517,
-       1502, 1615,
-       1507, 1618,
-       1817, 1860
+       -1, 173,
+       37, 180,
+       767, 944,
+       822, 974,
+       912, 1063,
+       916, 1068,
+       1429, 1553,
+       1538, 1651,
+       1543, 1654,
+       1853, 1896
 };
 static int parser_goto_row195[] = {
        1,
@@ -24980,11 +27199,11 @@ static int parser_goto_row195[] = {
 };
 static int parser_goto_row196[] = {
        1,
-       -1, 444
+       -1, 468
 };
 static int parser_goto_row197[] = {
        1,
-       -1, 1356
+       -1, 1392
 };
 static int parser_goto_row198[] = {
        1,
@@ -24996,7 +27215,7 @@ static int parser_goto_row199[] = {
 };
 static int parser_goto_row200[] = {
        1,
-       -1, 1166
+       -1, 1196
 };
 static int parser_goto_row201[] = {
        1,
@@ -25011,335 +27230,335 @@ static int parser_goto_row203[] = {
        4,
        -1, 19,
        5, 29,
-       18, 94,
-       28, 111
+       18, 100,
+       28, 117
 };
 static int parser_goto_row204[] = {
        8,
        -1, 20,
        5, 30,
-       18, 95,
-       19, 99,
-       28, 112,
-       29, 114,
-       94, 265,
-       111, 274
+       18, 101,
+       19, 105,
+       28, 118,
+       29, 120,
+       100, 283,
+       117, 292
 };
 static int parser_goto_row205[] = {
        1,
-       -1, 1471
+       -1, 1507
 };
 static int parser_goto_row206[] = {
        1,
-       -1, 994
+       -1, 1018
 };
 static int parser_goto_row207[] = {
        4,
-       -1, 1304,
-       1154, 1319,
-       1727, 1785,
-       1791, 1836
+       -1, 1340,
+       1184, 1355,
+       1763, 1821,
+       1827, 1872
 };
 static int parser_goto_row208[] = {
        1,
-       -1, 1312
+       -1, 1348
 };
 static int parser_goto_row209[] = {
        1,
-       -1, 1462
+       -1, 1498
 };
 static int parser_goto_row210[] = {
        1,
-       -1, 1077
+       -1, 1101
 };
 static int parser_goto_row211[] = {
        3,
-       -1, 243,
-       331, 546,
-       1060, 1218
+       -1, 261,
+       355, 570,
+       1084, 1248
 };
 static int parser_goto_row212[] = {
        1,
-       -1, 618
+       -1, 642
 };
 static int parser_goto_row213[] = {
        1,
-       -1, 634
+       -1, 658
 };
 static int parser_goto_row214[] = {
        1,
-       -1, 252
+       -1, 270
 };
 static int parser_goto_row215[] = {
        1,
-       -1, 944
+       -1, 968
 };
 static int parser_goto_row216[] = {
        2,
-       -1, 1404,
-       1355, 1490
+       -1, 1440,
+       1391, 1526
 };
 static int parser_goto_row217[] = {
        1,
-       -1, 874
+       -1, 898
 };
 static int parser_goto_row218[] = {
        170,
-       -1, 196,
-       13, 83,
-       27, 83,
-       31, 156,
-       33, 83,
-       37, 83,
-       54, 156,
-       98, 83,
-       125, 156,
-       160, 83,
-       212, 445,
-       242, 83,
-       254, 156,
-       256, 156,
-       257, 156,
-       258, 156,
-       259, 156,
-       280, 156,
-       386, 83,
-       467, 664,
-       472, 83,
-       474, 673,
-       497, 156,
-       498, 156,
-       519, 156,
-       521, 156,
-       522, 156,
-       524, 156,
-       525, 156,
-       526, 156,
-       527, 156,
-       528, 156,
-       529, 156,
-       530, 156,
-       531, 156,
-       532, 156,
-       533, 156,
-       534, 156,
-       535, 156,
-       536, 156,
-       537, 156,
-       538, 156,
-       539, 156,
-       540, 156,
-       541, 156,
-       542, 735,
-       545, 83,
-       584, 777,
-       588, 83,
-       591, 83,
-       637, 823,
-       638, 823,
-       666, 841,
-       668, 156,
-       670, 156,
-       702, 735,
-       708, 156,
-       738, 83,
-       742, 918,
-       743, 83,
-       749, 777,
-       788, 939,
-       798, 83,
-       805, 957,
-       807, 445,
-       851, 156,
-       852, 156,
-       853, 156,
-       854, 156,
-       869, 1024,
-       887, 156,
-       888, 918,
-       890, 83,
-       892, 918,
-       901, 156,
-       909, 83,
-       964, 1140,
-       968, 1143,
-       979, 83,
-       1016, 156,
-       1017, 156,
-       1036, 83,
-       1055, 156,
-       1056, 156,
-       1057, 156,
-       1058, 83,
-       1062, 83,
-       1063, 156,
-       1064, 156,
-       1089, 445,
-       1111, 1140,
-       1112, 1140,
-       1113, 1140,
-       1114, 1140,
-       1152, 664,
-       1156, 83,
-       1166, 1357,
-       1208, 918,
-       1211, 1389,
-       1216, 83,
-       1222, 156,
-       1223, 156,
-       1253, 1140,
-       1255, 1140,
-       1380, 918,
-       1382, 83,
-       1386, 156,
-       1387, 156,
-       1393, 83,
-       1400, 445,
-       1424, 1140,
-       1426, 1140,
-       1427, 1140,
-       1429, 1140,
-       1430, 1140,
-       1431, 1140,
-       1432, 1140,
-       1433, 1140,
-       1434, 1140,
-       1435, 1140,
-       1436, 1140,
-       1437, 1140,
-       1438, 1140,
-       1439, 1140,
-       1440, 1140,
-       1441, 1140,
-       1442, 1140,
-       1443, 1140,
-       1444, 1140,
-       1445, 1140,
-       1446, 1140,
-       1447, 1566,
-       1463, 664,
-       1472, 664,
-       1474, 664,
-       1476, 664,
-       1482, 445,
-       1501, 918,
-       1502, 918,
-       1507, 918,
-       1511, 156,
-       1512, 156,
-       1513, 156,
-       1514, 156,
-       1522, 445,
-       1533, 1566,
-       1537, 1140,
-       1572, 664,
-       1601, 1679,
-       1610, 156,
-       1623, 156,
-       1624, 156,
-       1633, 1704,
-       1645, 1357,
-       1655, 83,
-       1659, 83,
-       1692, 918,
-       1721, 83,
-       1729, 83,
-       1730, 83,
-       1733, 83,
-       1738, 83,
-       1741, 83,
-       1776, 445,
-       1782, 83,
-       1789, 83,
-       1794, 83,
-       1799, 83,
-       1817, 918,
-       1883, 1140
+       -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
 };
 static int parser_goto_row219[] = {
        78,
-       -1, 164,
+       -1, 176,
        0, 21,
        3, 24,
        5, 21,
        18, 21,
        19, 21,
        20, 24,
-       22, 107,
-       25, 108,
+       22, 113,
+       25, 114,
        28, 21,
        29, 21,
        30, 24,
        33, 24,
        37, 24,
-       64, 24,
-       94, 21,
-       95, 24,
-       99, 24,
-       104, 24,
+       70, 24,
+       100, 21,
+       101, 24,
        105, 24,
-       111, 21,
-       112, 24,
-       114, 24,
-       165, 337,
-       243, 24,
-       265, 24,
-       271, 24,
-       274, 24,
-       331, 24,
-       386, 24,
-       546, 24,
-       588, 24,
-       742, 24,
-       743, 24,
-       798, 24,
-       839, 24,
-       888, 24,
-       890, 24,
-       892, 24,
-       979, 24,
-       990, 24,
-       994, 21,
-       1058, 24,
-       1060, 24,
-       1062, 24,
-       1145, 24,
-       1154, 24,
-       1156, 24,
-       1208, 24,
-       1216, 24,
-       1218, 24,
-       1304, 24,
-       1319, 24,
-       1380, 24,
-       1393, 24,
-       1468, 24,
-       1501, 24,
-       1502, 24,
-       1507, 24,
-       1579, 24,
-       1655, 24,
-       1659, 24,
-       1692, 24,
-       1721, 24,
-       1727, 24,
-       1729, 24,
-       1730, 24,
-       1733, 24,
-       1738, 24,
-       1741, 24,
-       1782, 24,
-       1785, 24,
-       1789, 24,
-       1791, 24,
-       1794, 24,
-       1799, 24,
-       1817, 24,
-       1836, 24
+       110, 24,
+       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
 };
 static int parser_goto_row220[] = {
        75,
-       -1, 165,
+       -1, 177,
        0, 22,
        3, 25,
        5, 22,
@@ -25351,69 +27570,69 @@ static int parser_goto_row220[] = {
        30, 25,
        33, 25,
        37, 25,
-       64, 25,
-       94, 22,
-       95, 25,
-       99, 25,
-       104, 25,
+       70, 25,
+       100, 22,
+       101, 25,
        105, 25,
-       111, 22,
-       112, 25,
-       114, 25,
-       243, 25,
-       265, 25,
-       271, 25,
-       274, 25,
-       331, 25,
-       386, 25,
-       546, 25,
-       588, 25,
-       742, 25,
-       743, 25,
-       798, 25,
-       839, 25,
-       888, 25,
-       890, 25,
-       892, 25,
-       979, 25,
-       990, 25,
-       994, 22,
-       1058, 25,
-       1060, 25,
-       1062, 25,
-       1145, 25,
-       1154, 25,
-       1156, 25,
-       1208, 25,
-       1216, 25,
-       1218, 25,
-       1304, 25,
-       1319, 25,
-       1380, 25,
-       1393, 25,
-       1468, 25,
-       1501, 25,
-       1502, 25,
-       1507, 25,
-       1579, 25,
-       1655, 25,
-       1659, 25,
-       1692, 25,
-       1721, 25,
-       1727, 25,
-       1729, 25,
-       1730, 25,
-       1733, 25,
-       1738, 25,
-       1741, 25,
-       1782, 25,
-       1785, 25,
-       1789, 25,
-       1791, 25,
-       1794, 25,
-       1799, 25,
-       1817, 25,
-       1836, 25
+       110, 25,
+       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
 };
 
 const int* const parser_goto_table[] = {
index a543672..a657b3e 100644 (file)
@@ -52,7 +52,7 @@ class AndroidToolchain
 
        redef fun compile_dir
        do
-               var android_project_root = "{super}/android/"
+               var android_project_root = "{root_compile_dir}/android/"
                self.android_project_root = android_project_root
                return "{android_project_root}/jni/nit_compile/"
        end
@@ -255,7 +255,7 @@ $(call import-module,android/native_app_glue)
                end
 
                toolcontext.exec_and_check(["ln", "-s", "{share_dir}/libgc/arm/include/gc/",
-                       "{android_project_root}/jni/nit_compile/gc"], "Android project error")
+                       "{compile_dir}/gc"], "Android project error")
 
                ### Link to assets (for mnit and others)
                # This will be accessed from `android_project_root`
@@ -288,7 +288,7 @@ $(call import-module,android/native_app_glue)
                # Android resources folder
                var res_dir = project_root / "res"
                if res_dir.file_exists then
-                       # copy the res folder to .nit_compile
+                       # copy the res folder to the compile dir
                        res_dir = res_dir.realpath
                        toolcontext.exec_and_check(["cp", "-R", res_dir, android_project_root], "Android project error")
                end
index 27c05c6..77564f1 100644 (file)
@@ -45,7 +45,7 @@ end
 private class IOSToolchain
        super MakefileToolchain
 
-       # Root of the iOS project, usually `.nit_compile/ios/`
+       # Root of the iOS project, usually `nit_compile/ios/`
        var ios_project_root: String is noinit
 
        # `app.nit` project for the current compilation target
@@ -56,7 +56,7 @@ private class IOSToolchain
        # Compile C files in `ios_project_root/app_project.name`
        redef fun compile_dir
        do
-               ios_project_root = super/"ios"
+               ios_project_root = root_compile_dir/"ios"
                return ios_project_root/app_project.short_name
        end
 
index 734a76a..d81d1c7 100644 (file)
@@ -213,6 +213,7 @@ class RapidTypeAnalysis
                force_alive("Float")
                force_alive("Char")
                force_alive("Pointer")
+               force_alive("Byte")
 
                while not todo.is_empty do
                        var mmethoddef = todo.shift
@@ -525,6 +526,13 @@ redef class AIntExpr
        end
 end
 
+redef class AByteExpr
+       redef fun accept_rapid_type_visitor(v)
+       do
+               v.add_type(self.mtype.as(MClassType))
+       end
+end
+
 redef class AFloatExpr
        redef fun accept_rapid_type_visitor(v)
        do
@@ -568,7 +576,7 @@ redef class ASuperstringExpr
        redef fun accept_rapid_type_visitor(v)
        do
                var mmodule = v.analysis.mainmodule
-               var object_type = mmodule.object_type
+               var object_type = mmodule.string_type
                var arraytype = mmodule.array_type(object_type)
                v.add_type(arraytype)
                var nattype = mmodule.native_array_type(object_type)
index 4ea5f27..a69c57a 100644 (file)
@@ -429,6 +429,14 @@ redef class AWithExpr
        end
 end
 
+redef class AAssertExpr
+       redef fun accept_scope_visitor(v)
+       do
+               v.enter_visit(n_expr)
+               v.enter_visit_block(n_else, null)
+       end
+end
+
 redef class AVarFormExpr
        # The associated variable
        var variable: nullable Variable
index 020ce3b..4aad2d2 100644 (file)
@@ -301,15 +301,9 @@ private class TypeVisitor
 
                #debug("recv: {recvtype} (aka {unsafe_type})")
                if recvtype isa MNullType then
-                       # `null` only accepts some methods of object.
-                       if name == "==" or name == "!=" or name == "is_same_instance" then
-                               var objclass = get_mclass(node, "Object")
-                               if objclass == null then return null # Forward error
-                               unsafe_type = objclass.mclass_type
-                       else
-                               self.error(node, "Error: method `{name}` called on `null`.")
-                               return null
-                       end
+                       var objclass = get_mclass(node, "Object")
+                       if objclass == null then return null # Forward error
+                       unsafe_type = objclass.mclass_type
                end
 
                var mproperty = self.try_get_mproperty_by_name2(node, unsafe_type, name)
@@ -331,6 +325,14 @@ private class TypeVisitor
 
                assert mproperty isa MMethod
 
+               # `null` only accepts some methods of object.
+               if recvtype isa MNullType and not mproperty.is_null_safe then
+                       self.error(node, "Error: method `{name}` called on `null`.")
+                       return null
+               else if unsafe_type isa MNullableType and not mproperty.is_null_safe then
+                       modelbuilder.advice(node, "call-on-nullable", "Warning: method call on a nullable receiver `{recvtype}`.")
+               end
+
                if is_toplevel_context and recv_is_self and not mproperty.is_toplevel then
                        error(node, "Error: `{name}` is not a top-level method, thus need a receiver.")
                end
@@ -1344,6 +1346,15 @@ redef class AIntExpr
        end
 end
 
+redef class AByteExpr
+       redef fun accept_typing(v)
+       do
+               var mclass = v.get_mclass(self, "Byte")
+               if mclass == null then return # Forward error
+               self.mtype = mclass.mclass_type
+       end
+end
+
 redef class AFloatExpr
        redef fun accept_typing(v)
        do
index 45015a7..4366aac 100644 (file)
@@ -16,7 +16,7 @@
 module test_neo
 
 import neo
-import model_utils
+import model
 import frontend
 
 var test_name = "test_{get_time.to_s}"
similarity index 100%
rename from src/testing/README
rename to src/testing/README.md
index e54ccef..3cb5e92 100644 (file)
@@ -16,7 +16,7 @@
 module uml_base
 
 import toolcontext
-import model_utils
+import model
 
 redef class ToolContext
        # -p
index c985a04..92317a4 100644 (file)
@@ -16,6 +16,7 @@
 module uml_class
 
 import uml_base
+import model::model_collect
 
 redef class UMLModel
        # Generates a UML class diagram from a `Model`
@@ -62,7 +63,7 @@ end
 
 redef class MClass
 
-       redef fun tpl_class(ctx, main): Writable do
+       redef fun tpl_class(ctx, main) do
                var t = new Template
                t.add "{name} [\n label = \"\{"
                if kind == abstract_kind then
@@ -84,9 +85,9 @@ redef class MClass
                t.add "|"
                var props: Collection[MProperty]
                if ctx.private_gen then
-                       props = intro_mproperties(none_visibility)
+                       props = collect_intro_mproperties(none_visibility)
                else
-                       props = intro_mproperties(public_visibility)
+                       props = collect_intro_mproperties(public_visibility)
                end
                for i in props do
                        if i isa MAttribute then
@@ -95,8 +96,13 @@ redef class MClass
                        end
                end
                t.add "|"
-               for i in intro_methods do
-                       if not ctx.private_gen and i.visibility != public_visibility then continue
+               var meths
+               if ctx.private_gen then
+                       meths = collect_intro_mmethods(none_visibility)
+               else
+                       meths = collect_intro_mmethods(public_visibility)
+               end
+               for i in meths do
                        t.add i.tpl_class(ctx, main)
                        t.add "\\l"
                end
index 9c3d516..7de400a 100644 (file)
@@ -105,9 +105,11 @@ class VirtualMachine super NaiveInterpreter
 
                assert sup isa MClassType
 
-               # `sub` and `sup` can be discovered inside a Generic type during the subtyping test
-               if not sup.mclass.loaded then create_class(sup.mclass)
-               if not sub.mclass.loaded then create_class(sub.mclass)
+               # and `sup` can be discovered inside a Generic type during the subtyping test
+               if not sub.mclass.loaded then load_class(sub.mclass)
+
+               # If the target of the test is not-loaded yet, the subtyping-test will be false
+               if not sup.mclass.abstract_loaded then return false
 
                # For now, always use perfect hashing for subtyping test
                var super_id = sup.mclass.vtable.id
@@ -159,7 +161,7 @@ class VirtualMachine super NaiveInterpreter
        # Redef init_instance to simulate the loading of a class
        redef fun init_instance(recv: Instance)
        do
-               if not recv.mtype.as(MClassType).mclass.loaded then create_class(recv.mtype.as(MClassType).mclass)
+               if not recv.mtype.as(MClassType).mclass.loaded then load_class(recv.mtype.as(MClassType).mclass)
 
                recv.vtable = recv.mtype.as(MClassType).mclass.vtable
 
@@ -172,7 +174,7 @@ class VirtualMachine super NaiveInterpreter
        # Associate a `PrimitiveInstance` to its `VTable`
        redef fun init_instance_primitive(recv: Instance)
        do
-               if not recv.mtype.as(MClassType).mclass.loaded then create_class(recv.mtype.as(MClassType).mclass)
+               if not recv.mtype.as(MClassType).mclass.loaded then load_class(recv.mtype.as(MClassType).mclass)
 
                recv.vtable = recv.mtype.as(MClassType).mclass.vtable
        end
@@ -192,8 +194,33 @@ class VirtualMachine super NaiveInterpreter
                return attributes;
        `}
 
-       # Creates the runtime structures for this class
-       fun create_class(mclass: MClass) do     mclass.make_vt(self)
+       # Load the class and create its runtime structures, this loading is explicit
+       fun load_class(mclass: MClass)
+       do
+               if mclass.loaded then return
+
+               # Recursively load superclasses
+               for parent in mclass.in_hierarchy(mainmodule).direct_greaters do load_class_indirect(parent)
+
+               if mclass.abstract_loaded then
+                       mclass.allocate_vtable(self)
+               else
+                       mclass.make_vt(self, true)
+               end
+       end
+
+       # This method is called to handle an implicitly loaded class,
+       # i.e. a superclass of an explicitly loaded class
+       # A class loaded implicitly will not be fully allocated
+       fun load_class_indirect(mclass: MClass)
+       do
+               # It the class was already implicitly loaded
+               if mclass.abstract_loaded then return
+
+               for parent in mclass.in_hierarchy(mainmodule).direct_greaters do load_class_indirect(parent)
+
+               mclass.make_vt(self, false)
+       end
 
        # Execute `mproperty` for a `args` (where `args[0]` is the receiver).
        redef fun send(mproperty: MMethod, args: Array[Instance]): nullable Instance
@@ -212,8 +239,9 @@ class VirtualMachine super NaiveInterpreter
        # returns the most specific local method in the class corresponding to `vtable`
        private fun method_dispatch(mproperty: MMethod, vtable: VTable, recv: Instance): MMethodDef
        do
-               if mproperty.intro_mclassdef.mclass.positions_methods[recv.mtype.as(MClassType).mclass] != -1 then
-                       return method_dispatch_sst(vtable.internal_vtable, mproperty.absolute_offset)
+               var position = recv.mtype.as(MClassType).mclass.get_position_methods(mproperty.intro_mclassdef.mclass)
+               if position > 0 then
+                       return method_dispatch_sst(vtable.internal_vtable, mproperty.offset + position)
                else
                        return method_dispatch_ph(vtable.internal_vtable, vtable.mask,
                                mproperty.intro_mclassdef.mclass.vtable.id, mproperty.offset)
@@ -254,10 +282,10 @@ class VirtualMachine super NaiveInterpreter
                assert recv isa MutableInstance
 
                var i: Instance
-
-               if mproperty.intro_mclassdef.mclass.positions_attributes[recv.mtype.as(MClassType).mclass] != -1 then
+               var position = recv.mtype.as(MClassType).mclass.get_position_attributes(mproperty.intro_mclassdef.mclass)
+               if position > 0 then
                        # if this attribute class has an unique position for this receiver, then use direct access
-                       i = read_attribute_sst(recv.internal_attributes, mproperty.absolute_offset)
+                       i = read_attribute_sst(recv.internal_attributes, position + mproperty.offset)
                else
                        # Otherwise, read the attribute value with perfect hashing
                        var id = mproperty.intro_mclassdef.mclass.vtable.id
@@ -312,9 +340,10 @@ class VirtualMachine super NaiveInterpreter
                assert recv isa MutableInstance
 
                # Replace the old value of mproperty in recv
-               if mproperty.intro_mclassdef.mclass.positions_attributes[recv.mtype.as(MClassType).mclass] != -1 then
+               var position = recv.mtype.as(MClassType).mclass.get_position_attributes(mproperty.intro_mclassdef.mclass)
+               if position > -1 then
                        # if this attribute class has an unique position for this receiver, then use direct access
-                       write_attribute_sst(recv.internal_attributes, mproperty.absolute_offset, value)
+                       write_attribute_sst(recv.internal_attributes, position + mproperty.offset, value)
                else
                        # Otherwise, use perfect hashing to replace the old value
                        var id = mproperty.intro_mclassdef.mclass.vtable.id
@@ -376,18 +405,35 @@ redef class MClass
        # True when the class is effectively loaded by the vm, false otherwise
        var loaded: Bool = false
 
+       # Indicate this class was partially loaded (it only has its identifier allocated)
+       var abstract_loaded: Bool = false
+
        # Color for Cohen subtyping test : the absolute position of the id
        # of this class in virtual tables
        var color: Int
 
-       # For each loaded subclass, keep the position of the group of attributes
-       # introduced by self class in the object
+       # For superclasses which have a non-invariant position, keep their position in attribute table
        var positions_attributes: HashMap[MClass, Int] = new HashMap[MClass, Int]
 
-       # For each loaded subclass, keep the position of the group of methods
-       # introduced by self class in the vtable
+       # For superclasses which have a non-invariant position, keep their position in virtual table
        var positions_methods: HashMap[MClass, Int] = new HashMap[MClass, Int]
 
+       # The position of the class' block in virtual table,
+       # the position is set to -1 when the invariant position is no longer satisfied
+       var position_attributes: Int
+
+       # The position of the class' block in attribute table
+       # the position is set to -1 when the invariant position is no longer satisfied
+       var position_methods: Int
+
+       # The chosen prefix for this class.
+       # The prefix is the direct superclass which has the most properties,
+       # this class will stay at its usual position in virtual table and attribute table
+       var prefix: nullable MClass
+
+       # The linear extension of all superclasses with the prefix rule
+       var ordering: Array[MClass]
+
        # The `MAttribute` this class introduced
        var intro_mattributes = new Array[MAttribute]
 
@@ -401,15 +447,14 @@ redef class MClass
        var mmethods = new Array[MMethod]
 
        # Allocates a VTable for this class and gives it an id
-       private fun make_vt(v: VirtualMachine)
+       # * `vm` The currently executed VirtualMachine
+       # * `explicit` Indicate if this class was directly instantiated (i.e. not indirectly loaded)
+       private fun make_vt(vm: VirtualMachine, explicit: Bool)
        do
-               if loaded then return
+               # `ordering` contains the order of superclasses for virtual tables
+               ordering = superclasses_ordering(vm)
+               ordering.remove(self)
 
-               # `superclasses` contains the order of superclasses for virtual tables
-               var superclasses = superclasses_ordering(v)
-               superclasses.remove(self)
-
-               # Make_vt for super-classes
                var ids = new Array[Int]
                var nb_methods = new Array[Int]
                var nb_attributes = new Array[Int]
@@ -422,11 +467,10 @@ redef class MClass
                # and the second and third are respectively class id and delta
                var offset_methods = 3
 
-               # The previous element in `superclasses`
-               var previous_parent: nullable MClass = null
-               if superclasses.length > 0 then previous_parent = superclasses[0]
-               for parent in superclasses do
-                       if not parent.loaded then parent.make_vt(v)
+               var parent
+               var prefix_index = ordering.index_of(prefix.as(not null))
+               for i in [0..ordering.length[ do
+                       parent = ordering[i]
 
                        # Get the number of introduced methods and attributes for this class
                        var methods = parent.intro_mmethods.length
@@ -440,63 +484,80 @@ redef class MClass
                        nb_methods.push(methods)
                        nb_attributes.push(attributes)
 
-                       # Update `positions_attributes` and `positions_methods` in `parent`.
-                       # If the position is invariant for this parent, store this position
-                       # else store a special value (-1)
-                       var pos_attr = -1
-                       var pos_meth = -1
-
-                       if previous_parent.as(not null).positions_attributes[parent] == offset_attributes then pos_attr = offset_attributes
-                       if previous_parent.as(not null).positions_methods[parent] == offset_methods then pos_meth = offset_methods
-
-                       parent.update_positions(pos_attr, pos_meth, self)
+                       # If the class is in the suffix part of the order
+                       if i > prefix_index then
+                               moved_class_attributes(vm, ordering[i], offset_attributes)
+                               moved_class_methods(vm, ordering[i], offset_methods)
+                       end
 
                        offset_attributes += attributes
                        offset_methods += methods
                        offset_methods += 2 # Because each block starts with an id and the delta
                end
 
-               # When all super-classes have their identifiers and vtables, allocate current one
-               allocate_vtable(v, ids, nb_methods, nb_attributes, offset_attributes, offset_methods)
-               loaded = true
+               # Update the positions of the class
+               update_positions(offset_attributes, offset_methods)
 
-               # Set the absolute position of the identifier of this class in the virtual table
-               color = offset_methods - 2
+               ordering.add(self)
 
-               # The virtual table now needs to be filled with pointer to methods
-               superclasses.add(self)
-               for cl in superclasses do
-                       fill_vtable(v, vtable.as(not null), cl)
+               # Compute the identifier with Perfect Hashing
+               compute_identifier(vm, ids, offset_methods)
+
+               # Update caches and offsets of methods and attributes for this class
+               # If the loading was explicit, the virtual table will be allocated and filled
+               set_offsets(vm, explicit)
+
+               if not explicit then
+                       # Just init the C-pointer to NULL to avoid errors
+                       vtable.internal_vtable = vm.memory_manager.null_ptr
                end
        end
 
-       # Allocate a single vtable
-       # * `ids : Array of superclasses identifiers
-       # * `nb_methods : Array which contain the number of introduced methods for each class in ids
-       # * `nb_attributes : Array which contain the number of introduced attributes for each class in ids
-       # * `offset_attributes : Offset from the beginning of the table of the group of attributes
+       # Allocate a unique identifier to the class with perfect hashing
+       # * `vm` The currently executed VirtualMachine
+       # * `ids` Array of superclasses identifiers
        # * `offset_methods : Offset from the beginning of the table of the group of methods
-       private fun allocate_vtable(v: VirtualMachine, ids: Array[Int], nb_methods: Array[Int], nb_attributes: Array[Int],
-                       offset_attributes: Int, offset_methods: Int)
+       private fun compute_identifier(vm: VirtualMachine, ids: Array[Int], offset_methods: Int)
        do
                vtable = new VTable
                var idc = new Array[Int]
 
-               vtable.mask = v.ph.pnand(ids, 1, idc) - 1
+               # Give an identifier to the class and put it inside the virtual table
+               vtable.mask = vm.ph.pnand(ids, 1, idc) - 1
                vtable.id = idc[0]
                vtable.classname = name
 
-               # Add current id to Array of super-ids
-               var ids_total = new Array[Int]
-               ids_total.add_all(ids)
-               ids_total.push(vtable.id)
+               # Set the color for subtyping tests in SST of this class
+               color = offset_methods - 2
 
-               var nb_methods_total = new Array[Int]
-               var nb_attributes_total = new Array[Int]
+               # Indicate the class has its identifier computed
+               abstract_loaded = true
+       end
 
-               var self_methods = 0
-               var nb_introduced_attributes = 0
+       # Update the positions of this class
+       # * `offset_attributes` The offset of the block of attributes of this class
+       # * `offset_methods` The offset of the block of methods of this class
+       private fun update_positions(offset_attributes: Int, offset_methods: Int)
+       do
+               # Recopy the position tables of the prefix in `self`
+               for key, value in prefix.positions_methods do
+                       positions_methods[key] = value
+               end
 
+               for key, value in prefix.positions_attributes do
+                       positions_attributes[key] = value
+               end
+
+               # Save the offsets of self class
+               position_attributes = offset_attributes
+               position_methods = offset_methods
+       end
+
+       # Set the offsets for the properties introduced by `self` class
+       # * `vm` The currently executed VirtualMachine
+       # * `explicit` Indicate if this class was explicitly loaded
+       private fun set_offsets(vm: VirtualMachine, explicit: Bool)
+       do
                # Fixing offsets for self attributes and methods
                var relative_offset_attr = 0
                var relative_offset_meth = 0
@@ -508,17 +569,13 @@ redef class MClass
                        for p in classdef.intro_mproperties do
                                # Collect properties and fixing offsets
                                if p isa MMethod then
-                                       self_methods += 1
                                        p.offset = relative_offset_meth
-                                       p.absolute_offset = offset_methods + relative_offset_meth
                                        relative_offset_meth += 1
 
                                        intro_mmethods.add(p)
                                end
                                if p isa MAttribute then
-                                       nb_introduced_attributes += 1
                                        p.offset = relative_offset_attr
-                                       p.absolute_offset = offset_attributes + relative_offset_attr
                                        relative_offset_attr += 1
 
                                        intro_mattributes.add(p)
@@ -530,34 +587,50 @@ redef class MClass
                mattributes.add_all(intro_mattributes)
                mmethods.add_all(intro_mmethods)
 
-               nb_methods_total.add_all(nb_methods)
-               nb_methods_total.push(self_methods)
+               if explicit then allocate_vtable(vm)
+       end
 
-               nb_attributes_total.add_all(nb_attributes)
-               nb_attributes_total.push(nb_introduced_attributes)
+       # Allocate a single vtable
+       # * `vm` The currently executed VirtualMachine
+       private fun allocate_vtable(vm: VirtualMachine)
+       do
+               var ids = new Array[Int]
+               var nb_methods_total = new Array[Int]
+               var nb_attributes_total = new Array[Int]
 
-               # Save the offsets of self class
-               update_positions(offset_attributes, offset_methods, self)
+               for cl in ordering do
+                       ids.add(cl.vtable.id)
+                       nb_methods_total.add(cl.intro_mmethods.length)
+                       nb_attributes_total.add(cl.intro_mattributes.length)
+               end
 
-               # Since we have the number of attributes for each class, calculate the delta
+               # Calculate the delta to prepare object structure
                var deltas = calculate_delta(nb_attributes_total)
-               vtable.internal_vtable = v.memory_manager.init_vtable(ids_total, nb_methods_total, deltas, vtable.mask)
+               vtable.internal_vtable = vm.memory_manager.init_vtable(ids, nb_methods_total, deltas, vtable.mask)
+
+               # The virtual table now needs to be filled with pointer to methods
+               for cl in ordering do
+                       fill_vtable(vm, vtable.as(not null), cl)
+               end
+
+               loaded = true
        end
 
-       # Fill the vtable with methods of `self` class
-       # * `v` : Current instance of the VirtualMachine
-       # * `table` : the table of self class, will be filled with its methods
-       private fun fill_vtable(v:VirtualMachine, table: VTable, cl: MClass)
+       # Fill the vtable with local methods for `self` class
+       # * `vm` Current instance of the VirtualMachine
+       # * `table` the table of self class, will be filled with its methods
+       # * `cl` The class which introduced the methods
+       private fun fill_vtable(vm: VirtualMachine, table: VTable, cl: MClass)
        do
                var methods = new Array[MMethodDef]
                for m in cl.intro_mmethods do
                        # `propdef` is the most specific implementation for this MMethod
-                       var propdef = m.lookup_first_definition(v.mainmodule, self.intro.bound_mtype)
+                       var propdef = m.lookup_first_definition(vm.mainmodule, self.intro.bound_mtype)
                        methods.push(propdef)
                end
 
                # Call a method in C to put propdefs of self methods in the vtables
-               v.memory_manager.put_methods(vtable.internal_vtable, vtable.mask, cl.vtable.id, methods)
+               vm.memory_manager.put_methods(vtable.internal_vtable, vtable.mask, cl.vtable.id, methods)
        end
 
        # Computes delta for each class
@@ -594,6 +667,7 @@ redef class MClass
                        return ordering
                else
                        # There is no super-class, self is Object
+                       prefix = self
                        return superclasses
                end
        end
@@ -625,6 +699,8 @@ redef class MClass
                        end
 
                        if prefix != null then
+                               if self.prefix == null then self.prefix = prefix
+
                                # Add the prefix class ordering at the beginning of our sequence
                                var prefix_res = new Array[MClass]
                                prefix_res = prefix.dfs(v, prefix_res)
@@ -646,6 +722,8 @@ redef class MClass
                        res.push(self)
                else
                        if direct_parents.length > 0 then
+                               if prefix == null then prefix = direct_parents.first
+
                                res = direct_parents.first.dfs(v, res)
                        end
                end
@@ -655,31 +733,138 @@ redef class MClass
                return res
        end
 
-       # Update positions of the class `cl`
-       # * `attributes_offset`: absolute offset of introduced attributes
-       # * `methods_offset`: absolute offset of introduced methods
-       private fun update_positions(attributes_offsets: Int, methods_offset:Int, cl: MClass)
+       # This method is called when `current_class` class is moved in virtual table of `self`
+       # *`vm` Running instance of the virtual machine
+       # *`current_class` The class which was moved in `self` structures
+       # *`offset` The offset of block of methods of `current_class` in `self`
+       fun moved_class_methods(vm: VirtualMachine, current_class: MClass, offset: Int)
        do
-               positions_attributes[cl] = attributes_offsets
-               positions_methods[cl] = methods_offset
+               # `current_class` was moved in `self` method table
+               if current_class.position_methods > 0 then
+                       # The invariant position is no longer satisfied
+                       current_class.positions_methods[current_class] = current_class.position_methods
+                       current_class.position_methods = - current_class.position_methods
+               else
+                       # The class has already several positions and an update is needed
+                       current_class.positions_methods[current_class] = -current_class.positions_methods[current_class]
+
+                       for sub in ordering do
+                               if sub == current_class then continue
+
+                               var super_id = current_class.vtable.id
+                               var mask = sub.vtable.mask
+                               vm.load_class(sub)
+
+                               if vm.inter_is_subtype_ph(super_id, mask, sub.vtable.internal_vtable) then
+                                       if not sub.positions_methods.has_key(current_class) then
+                                               sub.positions_methods[current_class] = current_class.position_methods
+                                       else
+                                               var old_position = sub.positions_methods[current_class]
+                                               if old_position > 0 then
+                                                       # Indicate this class can not used anymore single inheritance implementation
+                                                       sub.positions_methods[current_class] = - old_position
+                                               end
+                                       end
+                               end
+                       end
+               end
+
+               # Save the position of `current_class` in `self`
+               positions_methods[current_class] = offset
        end
+
+       # This method is called when `current_class` class is moved in attribute table of `self`
+       # *`vm` Running instance of the virtual machine
+       # *`current_class` The class which was moved in `self` structures
+       # *`offset` The offset of block of attributes of `current_class` in `self`
+       fun moved_class_attributes(vm: VirtualMachine, current_class: MClass, offset: Int)
+       do
+               # `current_class` was moved in `self` attribute table
+               if not current_class.positions_attributes.has_key(current_class) then
+                       # The invariant position is no longer satisfied
+                       current_class.positions_attributes[current_class] = current_class.position_attributes
+                       current_class.position_attributes = - current_class.position_attributes
+               else
+                       # The class has already several positions and an update is needed
+                       current_class.positions_attributes[current_class] = - current_class.positions_attributes[current_class]
+
+                       for sub in ordering do
+                               if sub == current_class then continue
+
+                               var super_id = current_class.vtable.id
+                               var mask = sub.vtable.mask
+                               vm.load_class(sub)
+
+                               if vm.inter_is_subtype_ph(super_id, mask, sub.vtable.internal_vtable) then
+                                       if not sub.positions_methods.has_key(current_class) then
+                                               sub.positions_attributes[current_class] = current_class.position_attributes
+                                       else
+                                               var old_position = sub.positions_attributes[current_class]
+                                               if old_position > 0 then
+                                                       # Indicate this class can not used anymore single inheritance implementation
+                                                       sub.positions_attributes[current_class] = - old_position
+                                               end
+                                       end
+                               end
+                       end
+               end
+
+               # Save the position of `current_class` in `self`
+               positions_attributes[current_class] = offset
+       end
+
+       # Return the position of the method's block of class `cl` in `self` if `cl` has an invariant position in self,
+       # Otherwise return a negative position
+       fun get_position_methods(cl: MClass): Int
+       do
+               # The class has an invariant position in all subclasses
+               if cl.position_methods > 0 then return cl.position_methods
+
+               # The position has an invariant position for this class and its subclasses only
+               if positions_methods.has_key(cl) then
+                       var pos = positions_methods[cl]
+                       if pos > 0 then return pos
+                       return -1
+               end
+
+               # No invariant position at all, the caller must use a multiple inheritance implementation
+               return -1
+       end
+
+       # Return the position of the attribute's block of class `cl` in `self` if `cl` has an invariant position in self,
+       # Otherwise return a negative position
+       fun get_position_attributes(cl: MClass): Int
+       do
+               # The class has an invariant position in all subclasses
+               if cl.position_attributes > 0 then return cl.position_attributes
+
+               # The position has an invariant position for this class and its subclasses only
+               if positions_attributes.has_key(cl) then
+                       var pos = positions_attributes[cl]
+                       if pos > 0 then return pos
+                       return -1
+               end
+
+               # No invariant position at all, the caller must use a multiple inheritance implementation
+               return -1
+       end
+end
+
+redef class MProperty
+       # Relative offset of this in the runtime instance
+       # (beginning of the block of its introducing class for attributes or methods)
+       var offset: Int
 end
 
 redef class MAttribute
        # Relative offset of this attribute in the runtime instance
        # (beginning of the block of its introducing class)
-       var offset: Int
-
-       # Absolute offset of this attribute in the runtime instance (beginning of the attribute table)
-       var absolute_offset: Int
+       redef var offset: Int
 end
 
 redef class MMethod
        # Relative offset of this method in the virtual table (from the beginning of the block)
-       var offset: Int
-
-       # Absolute offset of this method in the virtual table (from the beginning of the vtable)
-       var absolute_offset: Int
+       redef var offset: Int
 end
 
 # Redef MutableInstance to improve implementation of attributes in objects
@@ -818,4 +1003,9 @@ class MemoryManager
                        MMethodDef_incr_ref(method);
                }
        `}
+
+       # Return a NULL pointer, used to initialize virtual tables
+       private fun null_ptr: Pointer `{
+               return NULL;
+       `}
 end
index 6f3c201..514d3d1 100644 (file)
@@ -66,6 +66,8 @@ redef class VirtualMachine
                                callsite.id, callsite.offset)
                end
 
+               #TODO : we need recompilations here
+               callsite.status = 0
                return self.call(propdef, args)
        end
 end
@@ -92,9 +94,10 @@ redef class AAttrFormExpr
        # * `recv` The receiver (The object) of the access
        protected fun optimize(mproperty: MAttribute, recv: MutableInstance)
        do
-               if mproperty.intro_mclassdef.mclass.positions_attributes[recv.mtype.as(MClassType).mclass] != -1 then
+               var position = recv.mtype.as(MClassType).mclass.get_position_attributes(mproperty.intro_mclassdef.mclass)
+               if position > 0 then
                        # if this attribute class has an unique position for this receiver, then use direct access
-                       offset = mproperty.absolute_offset
+                       offset = position + mproperty.offset
                        status = 1
                else
                        # Otherwise, perfect hashing must be used
@@ -134,6 +137,9 @@ redef class AAttrExpr
                        abort
                end
 
+               #TODO : we need recompilations here
+               status = 0
+
                return i
        end
 end
@@ -163,6 +169,9 @@ redef class AAttrAssignExpr
                        v.write_attribute_ph(recv.internal_attributes, recv.vtable.internal_vtable,
                                        recv.vtable.mask, id, offset, i)
                end
+
+               #TODO : we need recompilations here
+               status = 0
        end
 end
 
@@ -189,8 +198,9 @@ redef class CallSite
        # Otherwise we must use perfect hashing
        fun optimize(recv: Instance)
        do
-               if mproperty.intro_mclassdef.mclass.positions_methods[recv.mtype.as(MClassType).mclass] != -1 then
-                       offset = mproperty.absolute_offset
+               var position = recv.mtype.as(MClassType).mclass.get_position_methods(mproperty.intro_mclassdef.mclass)
+               if position > 0 then
+                       offset = position + mproperty.offset
                        status = 1
                else
                        offset = mproperty.offset
@@ -222,7 +232,7 @@ redef class AIsaExpr
                var recv = v.expr(self.n_expr)
                if recv == null then return null
 
-               if status == 0 then optimize(v, recv.mtype, self.cast_type.as(not null))
+               optimize(v, recv.mtype, self.cast_type.as(not null))
                var mtype = v.unanchor_type(self.cast_type.as(not null))
 
                # If this test can be optimized, directly call appropriate subtyping methods
@@ -248,20 +258,18 @@ redef class AIsaExpr
                        return
                end
 
-               if not target.mclass.loaded then return
+               if not target.mclass.abstract_loaded then return
 
-               # Try to get the position of the target type in source's structures
-               var value = source.mclass.positions_methods.get_or_null(target.mclass)
-
-               if value != null then
-                       if value != -1 then
-                               # Store informations for Cohen test
-                               position = target.mclass.color
-                               status = 1
-                       else
-                               # We use perfect hashing
-                               status = 2
-                       end
+               # If the value is positive, the target class has an invariant position in source's structures
+               var value = source.mclass.get_position_methods(target.mclass)
+
+               if value > 0 then
+                       # `value - 2` is the position of the target identifier in source vtable
+                       position = value - 2
+                       status = 1
+               else
+                       # We use perfect hashing
+                       status = 2
                end
                id = target.mclass.vtable.id
        end
@@ -289,7 +297,7 @@ redef class AAsCastExpr
                var recv = v.expr(self.n_expr)
                if recv == null then return null
 
-               if status == 0 then optimize(v, recv.mtype, self.mtype.as(not null))
+               optimize(v, recv.mtype, self.mtype.as(not null))
 
                var mtype = self.mtype.as(not null)
                var amtype = v.unanchor_type(mtype)
@@ -324,18 +332,16 @@ redef class AAsCastExpr
 
                if not target.mclass.loaded then return
 
-               # Try to get the position of the target type in source's structures
-               var value = source.mclass.positions_methods.get_or_null(target.mclass)
-
-               if value != null then
-                       if value != -1 then
-                               # Store informations for Cohen test
-                               position = target.mclass.color
-                               status = 1
-                       else
-                               # We use perfect hashing
-                               status = 2
-                       end
+               # If the value is positive, the target class has an invariant position in source's structures
+               var value = source.mclass.get_position_methods(target.mclass)
+
+               if value > 0 then
+                       # `value - 2` is the position of the target identifier in source vtable
+                       position = value - 2
+                       status = 1
+               else
+                       # We use perfect hashing
+                       status = 2
                end
                id = target.mclass.vtable.id
        end
index 0b8c466..12c5bcb 100644 (file)
@@ -46,4 +46,4 @@ store:
        ./store_save.sh *.nit
 
 clean:
-       rm -r -f -- out/ alt .nit_compile errlist errlist.bak *.xml 2> /dev/null || true
+       rm -r -f -- out/ alt nit_compile errlist errlist.bak *.xml 2> /dev/null || true
diff --git a/tests/base_do_block.nit b/tests/base_do_block.nit
new file mode 100644 (file)
index 0000000..b9fdad4
--- /dev/null
@@ -0,0 +1,41 @@
+# 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 Foo
+       fun start do end
+       fun finish do end
+end
+fun foo: Foo do return new Foo
+
+do do
+       1.output
+end
+while false do do
+       2.output
+end
+if true then do
+       3.output
+end else do
+       4.output
+end
+for i in [0..1] do do
+       5.output
+end
+with foo do do
+       6.output
+end
+loop do
+       7.output
+       return
+end
diff --git a/tests/base_error_literal.nit b/tests/base_error_literal.nit
new file mode 100644 (file)
index 0000000..612e837
--- /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.
+
+import standard::kernel
+
+var b = 0b_
+var x = 0x_
+var o = 0o_
index 5930588..081b84b 100644 (file)
@@ -19,8 +19,8 @@ class A
        var b: Object is noautoinit
        #alt1#var b2: Object = get(-4) is noautoinit
        var c: Object is noautoinit
-       var d: Object = get(2) is autoinit
-       #alt2#var d2: Object = get(-2) is autoinit, lazy
+       var d: Object = get(2) is lateinit
+       #alt2#var d2: Object = get(-2) is lateinit, lazy
        var e: Object = get(1)
        fun setc(v: Object) is autoinit do self.c = get(v)
        init do
index 37c2cb2..51cb465 100644 (file)
@@ -40,7 +40,7 @@ class E
        noautoinit #alt6#
        #alt6,7# autoinit
        super A
-       var a: A
+       var a: A #alt9#
 end
 
 class F
diff --git a/tests/base_native_array.nit b/tests/base_native_array.nit
new file mode 100644 (file)
index 0000000..e59c93e
--- /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.
+
+intrude import standard::collection::array
+
+var a = new Array[Bool]
+var cpt = 0
+while cpt < 20 do
+       a.push(false)
+       cpt += 1
+end
+
+for i in a do i.output
diff --git a/tests/base_scope.nit b/tests/base_scope.nit
new file mode 100644 (file)
index 0000000..5012785
--- /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.
+
+class Foo
+       fun start do end
+       fun finish do end
+       redef fun output do 0.output
+end
+var foo = new Foo
+var maybe: Bool = true
+
+#alt1#var a = 0
+#alt1#var b = 0
+#alt1#var c = 0
+
+if maybe then
+       if maybe then var a = 1 else var a = 2
+       while maybe do
+               while false do var a = 3
+               loop
+                       do
+                               do var a = 4
+                               with a = foo do
+                                       a.output
+                                       with b = foo do var c = 5
+                                       var b = 6
+                                       b.output
+                                       var c = 7
+                                       c.output
+                               end
+
+                               for a in [8] do
+                                       a.output
+                                       for b in [9] do var c = 10
+                                       var b = 11
+                                       b.output
+                                       var c = 12
+                                       c.output
+                               end
+                               assert maybe else
+                                       assert maybe else var a = 13
+                                       var a = 14
+                                       a.output
+                               end
+                               var a = 15
+                               a.output
+                       end
+                       var a = 16
+                       a.output
+                       if maybe then break
+               end
+               var a = 17
+               a.output
+               if maybe then break
+       end
+       var a = 18
+       a.output
+else if maybe then
+       var a = 19
+       a.output
+else
+       var a = 20
+       a.output
+end
+var a = 21
+a.output
diff --git a/tests/base_test_bases.nit b/tests/base_test_bases.nit
new file mode 100644 (file)
index 0000000..b21c85e
--- /dev/null
@@ -0,0 +1,28 @@
+# 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 standard::kernel
+
+assert 0b1001 == 0x09
+assert 0o715 == 0x1CD
+assert 461 == 0o715
+assert 0b111001101 == 0o715
+assert 256 == 0x100
+assert 0o400 == 256
+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
diff --git a/tests/nitpick.args b/tests/nitpick.args
new file mode 100644 (file)
index 0000000..3ae7a2a
--- /dev/null
@@ -0,0 +1 @@
+--no-color -W test_advice_repeated_types.nit
index 402451a..7f05220 100644 (file)
@@ -1,3 +1,3 @@
-base_simple3.nit A
-base_simple3.nit foo
-base_simple3.nit base_simple3
+base_simple3.nit -q A
+base_simple3.nit -q foo
+base_simple3.nit -q base_simple3
similarity index 100%
rename from tests/sav/README
rename to tests/sav/README.md
index 23b0f98..9dd9003 100644 (file)
@@ -1 +1 @@
-alt/base_adaptive_loop3_alt3.nit:29,10--13: Error: method `next` called on `null`.
+alt/base_adaptive_loop3_alt3.nit:29,10--13: Error: method `next` does not exists in `null`.
diff --git a/tests/sav/base_do_block.res b/tests/sav/base_do_block.res
new file mode 100644 (file)
index 0000000..f99d451
--- /dev/null
@@ -0,0 +1,11 @@
+base_do_block.nit:21,4--23,3: Warning: superfluous `do` block.
+base_do_block.nit:24,16--26,3: Warning: superfluous `do` block.
+base_do_block.nit:32,20--34,3: Warning: superfluous `do` block.
+base_do_block.nit:35,13--37,3: Warning: superfluous `do` block.
+base_do_block.nit:38,6--41,3: Warning: superfluous `do` block.
+1
+3
+5
+5
+6
+7
diff --git a/tests/sav/base_error_literal.res b/tests/sav/base_error_literal.res
new file mode 100644 (file)
index 0000000..a74724b
--- /dev/null
@@ -0,0 +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
index 4fcab0a..debc62f 100644 (file)
@@ -1 +1 @@
-alt/base_import_alt3.nit:1,8--21: Error: cannot find module `fail` from `project1`. Tried: ., ../lib/standard, ../lib/standard/collection, alt, ../lib.
+alt/base_import_alt3.nit:1,8--21: Error: cannot find module `fail` from `project1`. Tried: ., ../lib/standard, ../lib/standard/collection, alt, ../lib, ../contrib.
index 91e3496..db23606 100644 (file)
@@ -1 +1 @@
-alt/base_init_autoinit2_alt2.nit:23,40--43: Error: `lazy` incompatible with `autoinit`.
+alt/base_init_autoinit2_alt2.nit:23,40--43: Error: `lazy` incompatible with `lateinit`.
diff --git a/tests/sav/base_init_autoinit3_alt9.res b/tests/sav/base_init_autoinit3_alt9.res
new file mode 100644 (file)
index 0000000..6851c6d
--- /dev/null
@@ -0,0 +1,8 @@
+1
+2
+false
+3
+3.300000
+4
+true
+4.400000
diff --git a/tests/sav/base_native_array.res b/tests/sav/base_native_array.res
new file mode 100644 (file)
index 0000000..9486349
--- /dev/null
@@ -0,0 +1,20 @@
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
diff --git a/tests/sav/base_scope.res b/tests/sav/base_scope.res
new file mode 100644 (file)
index 0000000..25e862a
--- /dev/null
@@ -0,0 +1,11 @@
+0
+6
+7
+8
+11
+12
+15
+16
+17
+18
+21
diff --git a/tests/sav/base_scope_alt1.res b/tests/sav/base_scope_alt1.res
new file mode 100644 (file)
index 0000000..8868091
--- /dev/null
@@ -0,0 +1,23 @@
+alt/base_scope_alt1.nit:28,20: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:28,35: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:30,22: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:33,12: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:34,10: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:36,11: Error: a variable named `b` already exists.
+alt/base_scope_alt1.nit:36,26: Error: a variable named `c` already exists.
+alt/base_scope_alt1.nit:37,10: Error: a variable named `b` already exists.
+alt/base_scope_alt1.nit:39,10: Error: a variable named `c` already exists.
+alt/base_scope_alt1.nit:43,9: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:45,10: Error: a variable named `b` already exists.
+alt/base_scope_alt1.nit:45,26: Error: a variable named `c` already exists.
+alt/base_scope_alt1.nit:46,10: Error: a variable named `b` already exists.
+alt/base_scope_alt1.nit:48,10: Error: a variable named `c` already exists.
+alt/base_scope_alt1.nit:52,28: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:53,10: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:56,9: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:59,8: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:63,7: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:67,6: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:70,6: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:73,6: Error: a variable named `a` already exists.
+alt/base_scope_alt1.nit:76,5: Error: a variable named `a` already exists.
diff --git a/tests/sav/base_test_bases.res b/tests/sav/base_test_bases.res
new file mode 100644 (file)
index 0000000..e69de29
index ba1fd0e..88f7f46 100644 (file)
@@ -1 +1 @@
-alt/base_var_null_alt12.nit:45,3--4: Error: method `+` called on `null`.
+alt/base_var_null_alt12.nit:45,3--4: Error: method `+` does not exists in `null`.
index 551e7aa..423e515 100644 (file)
@@ -1 +1 @@
-alt/base_var_null_alt4.nit:31,3--4: Error: method `+` called on `null`.
+alt/base_var_null_alt4.nit:31,3--4: Error: method `+` does not exists in `null`.
index ad947f4..f168d60 100644 (file)
@@ -1 +1 @@
-alt/base_var_null_alt8.nit:38,3--4: Error: method `+` called on `null`.
+alt/base_var_null_alt8.nit:38,3--4: Error: method `+` does not exists in `null`.
index 0e499b0..bd0a8fc 100644 (file)
@@ -8,9 +8,9 @@ alt/error_expr_not_ok_alt6.nit:41,16--19: Type Error: expected `Int`, got `null`
 alt/error_expr_not_ok_alt6.nit:42,7--9: Type Error: expected `A`, got `Int`.
 alt/error_expr_not_ok_alt6.nit:43,5--8: Error: method `fail` does not exists in `Int`.
 alt/error_expr_not_ok_alt6.nit:45,7--10: Type Error: expected `A`, got `null`.
-alt/error_expr_not_ok_alt6.nit:46,6--9: Error: method `fail` called on `null`.
+alt/error_expr_not_ok_alt6.nit:46,6--9: Error: method `fail` does not exists in `null`.
 alt/error_expr_not_ok_alt6.nit:49,7--10: Type Error: expected `A`, got `null`.
-alt/error_expr_not_ok_alt6.nit:50,6--10: Error: method `trash` called on `null`.
+alt/error_expr_not_ok_alt6.nit:50,6--10: Error: method `trash` does not exists in `null`.
 alt/error_expr_not_ok_alt6.nit:60,4--7: Type Error: expected `Bool`, got `Int`.
 alt/error_expr_not_ok_alt6.nit:60,20: Type Error: expected `A`, got `Int`.
 alt/error_expr_not_ok_alt6.nit:62,10--13: Type Error: expected `Bool`, got `Int`.
index 20bc8ca..29ce68b 100644 (file)
@@ -1 +1 @@
-error_mod_unk.nit:17,8--11: Error: cannot find module `dfgd` from `error_mod_unk`. Tried: ., ../lib/standard, ../lib/standard/collection, alt, ../lib.
+error_mod_unk.nit:17,8--11: Error: cannot find module `dfgd` from `error_mod_unk`. Tried: ., ../lib/standard, ../lib/standard/collection, alt, ../lib, ../contrib.
index 0d6a211..a732359 100644 (file)
@@ -1457,7 +1457,7 @@ Edge
 8:MPropDef
 13:MAttributeDef
 =properties=JsonObject(5):
-{"location":"%SOURCE_DIRECTORY%\/org\/example\/foo\/C.java:25,1---1,1","visibility":"public","name":"THE_ANSWER","mdoc":["\u000e2\u00080\u0009cAnswer to the Ultimate Question of Life, the Universe, and Everything.","\u000e2\u00080\u0009c"],"is_intro":true}
+{"location":"%SOURCE_DIRECTORY%\/org\/example\/foo\/C.java:25,1---1,1","visibility":"public","name":"THE_ANSWER","mdoc":["“Answer to the Ultimate Question of Life, the Universe, and Everything.","“"],"is_intro":true}
 ----
 =to=Entity#0:
 =labels=Array(4):
@@ -1481,7 +1481,7 @@ Edge
 8:MPropDef
 13:MAttributeDef
 =properties=JsonObject(5):
-{"location":"%SOURCE_DIRECTORY%\/org\/example\/foo\/C.java:25,1---1,1","visibility":"public","name":"THE_ANSWER","mdoc":["\u000e2\u00080\u0009cAnswer to the Ultimate Question of Life, the Universe, and Everything.","\u000e2\u00080\u0009c"],"is_intro":true}
+{"location":"%SOURCE_DIRECTORY%\/org\/example\/foo\/C.java:25,1---1,1","visibility":"public","name":"THE_ANSWER","mdoc":["“Answer to the Ultimate Question of Life, the Universe, and Everything.","“"],"is_intro":true}
 ----
 =to=Entity#0:
 =labels=Array(4):
@@ -1722,7 +1722,7 @@ Edge
 8:MPropDef
 13:MAttributeDef
 =properties=JsonObject(5):
-{"location":"%SOURCE_DIRECTORY%\/org\/example\/foo\/C.java:25,1---1,1","visibility":"public","name":"THE_ANSWER","mdoc":["\u000e2\u00080\u0009cAnswer to the Ultimate Question of Life, the Universe, and Everything.","\u000e2\u00080\u0009c"],"is_intro":true}
+{"location":"%SOURCE_DIRECTORY%\/org\/example\/foo\/C.java:25,1---1,1","visibility":"public","name":"THE_ANSWER","mdoc":["“Answer to the Ultimate Question of Life, the Universe, and Everything.","“"],"is_intro":true}
 
 
 Edge
index 70cda4d..5e63fb7 100644 (file)
@@ -1457,7 +1457,7 @@ Edge
 8:MPropDef
 13:MAttributeDef
 =properties=JsonObject(5):
-{"location":"%SOURCE_DIRECTORY%\/org\/example\/foo\/C.java:25,1---1,1","visibility":"public","name":"THE_ANSWER","mdoc":["\u000e2\u00080\u0009cAnswer to the Ultimate Question of Life, the Universe, and Everything.","\u000e2\u00080\u0009c"],"is_intro":true}
+{"location":"%SOURCE_DIRECTORY%\/org\/example\/foo\/C.java:25,1---1,1","visibility":"public","name":"THE_ANSWER","mdoc":["“Answer to the Ultimate Question of Life, the Universe, and Everything.","“"],"is_intro":true}
 ----
 =to=Entity#0:
 =labels=Array(4):
@@ -1481,7 +1481,7 @@ Edge
 8:MPropDef
 13:MAttributeDef
 =properties=JsonObject(5):
-{"location":"%SOURCE_DIRECTORY%\/org\/example\/foo\/C.java:25,1---1,1","visibility":"public","name":"THE_ANSWER","mdoc":["\u000e2\u00080\u0009cAnswer to the Ultimate Question of Life, the Universe, and Everything.","\u000e2\u00080\u0009c"],"is_intro":true}
+{"location":"%SOURCE_DIRECTORY%\/org\/example\/foo\/C.java:25,1---1,1","visibility":"public","name":"THE_ANSWER","mdoc":["“Answer to the Ultimate Question of Life, the Universe, and Everything.","“"],"is_intro":true}
 ----
 =to=Entity#0:
 =labels=Array(4):
@@ -1722,7 +1722,7 @@ Edge
 8:MPropDef
 13:MAttributeDef
 =properties=JsonObject(5):
-{"location":"%SOURCE_DIRECTORY%\/org\/example\/foo\/C.java:25,1---1,1","visibility":"public","name":"THE_ANSWER","mdoc":["\u000e2\u00080\u0009cAnswer to the Ultimate Question of Life, the Universe, and Everything.","\u000e2\u00080\u0009c"],"is_intro":true}
+{"location":"%SOURCE_DIRECTORY%\/org\/example\/foo\/C.java:25,1---1,1","visibility":"public","name":"THE_ANSWER","mdoc":["“Answer to the Ultimate Question of Life, the Universe, and Everything.","“"],"is_intro":true}
 
 
 Edge
index f1d9e06..d65304c 100644 (file)
@@ -1,4 +1,4 @@
-Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:426)
+Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:537)
 11
 21
 31
index f1d9e06..d65304c 100644 (file)
@@ -1,4 +1,4 @@
-Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:426)
+Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:537)
 11
 21
 31
index f1d9e06..d65304c 100644 (file)
@@ -1,4 +1,4 @@
-Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:426)
+Runtime error: Cast failed. Expected `OTHER`, got `Float` (../lib/standard/kernel.nit:537)
 11
 21
 31
index 90e0d60..f4b4a49 100644 (file)
@@ -1,40 +1,40 @@
-Runtime error: Aborted (../lib/serialization/serialization.nit:109)
+Runtime error: Aborted (../lib/serialization/serialization.nit:111)
 # Nit:
-<A: true a 0.123 1234 asdf false>
+<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>
+<A: true a 0.123 1234 asdf false p4ssw0rd>
 
 # Nit:
-<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+<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> 1111 qwer>
+<B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>
 
 # Nit:
-<C: <A: true a 0.123 1234 asdf false> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+<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> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+<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> 1111         f"\r\/> true>
+<- 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> 1111         f"\r\/> true>
+<- false p4ssw0rd> 1111        f"\r\/> true>
 
 Error: doesn't know how to deserialize class "Array"
diff --git a/tests/sav/nitg-e/test_serialization_alt2.res b/tests/sav/nitg-e/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/nitg-e/test_serialization_alt3.res b/tests/sav/nitg-e/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/nitg-e/test_serialization_alt4.res b/tests/sav/nitg-e/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/nitg-e/test_serialization_alt5.res b/tests/sav/nitg-e/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}}
+
index fb5f270..1813e55 100644 (file)
          min: base_simple3 (1)
          std: 0.0
          sum: 1
-
-# MClasses metrics
-
- ## project base_simple3
-  `- group base_simple3
-       cnoa: number of ancestor classes
-         avg: 0.0
-         max: Bool (1)
-         min: Object (0)
-         std: 0.926
-         sum: 6
-       cnop: number of parent classes
-         avg: 0.0
-         max: Bool (1)
-         min: Object (0)
-         std: 0.926
-         sum: 6
-       cnoc: number of child classes
-         avg: 0.0
-         max: Object (6)
-         min: Bool (0)
-         std: 2.268
-         sum: 6
-       cnod: number of descendant classes
-         avg: 0.0
-         max: Object (6)
-         min: Bool (0)
-         std: 2.268
-         sum: 6
-       cdit: depth in class tree
-         avg: 0.0
-         max: Bool (1)
-         min: Object (0)
-         std: 0.926
-         sum: 6
-       cnbp: number of accessible properties (inherited + local)
-         avg: 3.0
-         max: C (7)
-         min: Object (1)
-         std: 2.36
-         sum: 24
-       cnba: number of accessible attributes (inherited + local)
-         avg: 0.0
-         max: C (2)
-         min: Object (0)
-         std: 0.845
-         sum: 3
-       cnbip: number of introduced properties
-         avg: 2.0
-         max: C (6)
-         min: Bool (0)
-         std: 2.268
-         sum: 18
-       cnbrp: number of redefined properties
-         avg: 0.0
-         max: A (1)
-         min: Object (0)
-         std: 0.535
-         sum: 2
-       cnbhp: number of inherited properties
-         avg: 0.0
-         max: Bool (1)
-         min: Object (0)
-         std: 0.926
-         sum: 6
-
- ## global metrics
-       cnoa: number of ancestor classes
-         avg: 0.0
-         max: Bool (1)
-         min: Object (0)
-         std: 0.926
-         sum: 6
-       cnop: number of parent classes
-         avg: 0.0
-         max: Bool (1)
-         min: Object (0)
-         std: 0.926
-         sum: 6
-       cnoc: number of child classes
-         avg: 0.0
-         max: Object (6)
-         min: Bool (0)
-         std: 2.268
-         sum: 6
-       cnod: number of descendant classes
-         avg: 0.0
-         max: Object (6)
-         min: Bool (0)
-         std: 2.268
-         sum: 6
-       cdit: depth in class tree
-         avg: 0.0
-         max: Bool (1)
-         min: Object (0)
-         std: 0.926
-         sum: 6
-       cnbp: number of accessible properties (inherited + local)
-         avg: 3.0
-         max: C (7)
-         min: Object (1)
-         std: 2.36
-         sum: 24
-       cnba: number of accessible attributes (inherited + local)
-         avg: 0.0
-         max: C (2)
-         min: Object (0)
-         std: 0.845
-         sum: 3
-       cnbip: number of introduced properties
-         avg: 2.0
-         max: C (6)
-         min: Bool (0)
-         std: 2.268
-         sum: 18
-       cnbrp: number of redefined properties
-         avg: 0.0
-         max: A (1)
-         min: Object (0)
-         std: 0.535
-         sum: 2
-       cnbhp: number of inherited properties
-         avg: 0.0
-         max: Bool (1)
-         min: Object (0)
-         std: 0.926
-         sum: 6
 --- Metrics of refinement usage ---
 Number of modules: 1
 
@@ -488,6 +361,133 @@ Distribution of direct smallers
   bivariants: 0 (na%)
   invariants: 0 (na%)
   total: 0
+
+# MClasses metrics
+
+ ## project base_simple3
+  `- group base_simple3
+       cnoa: number of ancestor classes
+         avg: 0.0
+         max: Bool (1)
+         min: Object (0)
+         std: 0.926
+         sum: 6
+       cnop: number of parent classes
+         avg: 0.0
+         max: Bool (1)
+         min: Object (0)
+         std: 0.926
+         sum: 6
+       cnoc: number of child classes
+         avg: 0.0
+         max: Object (6)
+         min: Bool (0)
+         std: 2.268
+         sum: 6
+       cnod: number of descendant classes
+         avg: 0.0
+         max: Object (6)
+         min: Bool (0)
+         std: 2.268
+         sum: 6
+       cdit: depth in class tree
+         avg: 0.0
+         max: Bool (1)
+         min: Object (0)
+         std: 0.926
+         sum: 6
+       cnbp: number of accessible properties (inherited + local)
+         avg: 3.0
+         max: C (7)
+         min: Object (1)
+         std: 2.36
+         sum: 24
+       cnba: number of accessible attributes (inherited + local)
+         avg: 0.0
+         max: C (2)
+         min: Object (0)
+         std: 0.845
+         sum: 3
+       cnbip: number of introduced properties
+         avg: 2.0
+         max: C (6)
+         min: Bool (0)
+         std: 2.268
+         sum: 18
+       cnbrp: number of redefined properties
+         avg: 0.0
+         max: A (1)
+         min: Object (0)
+         std: 0.535
+         sum: 2
+       cnbhp: number of inherited properties
+         avg: 0.0
+         max: Bool (1)
+         min: Object (0)
+         std: 0.926
+         sum: 6
+
+ ## global metrics
+       cnoa: number of ancestor classes
+         avg: 0.0
+         max: Bool (1)
+         min: Object (0)
+         std: 0.926
+         sum: 6
+       cnop: number of parent classes
+         avg: 0.0
+         max: Bool (1)
+         min: Object (0)
+         std: 0.926
+         sum: 6
+       cnoc: number of child classes
+         avg: 0.0
+         max: Object (6)
+         min: Bool (0)
+         std: 2.268
+         sum: 6
+       cnod: number of descendant classes
+         avg: 0.0
+         max: Object (6)
+         min: Bool (0)
+         std: 2.268
+         sum: 6
+       cdit: depth in class tree
+         avg: 0.0
+         max: Bool (1)
+         min: Object (0)
+         std: 0.926
+         sum: 6
+       cnbp: number of accessible properties (inherited + local)
+         avg: 3.0
+         max: C (7)
+         min: Object (1)
+         std: 2.36
+         sum: 24
+       cnba: number of accessible attributes (inherited + local)
+         avg: 0.0
+         max: C (2)
+         min: Object (0)
+         std: 0.845
+         sum: 3
+       cnbip: number of introduced properties
+         avg: 2.0
+         max: C (6)
+         min: Bool (0)
+         std: 2.268
+         sum: 18
+       cnbrp: number of redefined properties
+         avg: 0.0
+         max: A (1)
+         min: Object (0)
+         std: 0.535
+         sum: 2
+       cnbhp: number of inherited properties
+         avg: 0.0
+         max: Bool (1)
+         min: Object (0)
+         std: 0.926
+         sum: 6
 generating project_hierarchy.dot
 generating module_hierarchy.dot
 
@@ -697,10 +697,10 @@ Statistics of type usage:
 # Mendel metrics
        large mclasses (threshold: 3.354)
           Sys: 4
-       budding mclasses (threshold: 3.51)
-          Sys: 4.0
-       blooming mclasses (threshold: 12.0)
-          Sys: 16.0
+       budding mclasses (threshold: 4.177)
+          Sys: 5.0
+       blooming mclasses (threshold: 14.626)
+          Sys: 20.0
 --- Detection of the usage of covariance static type conformance ---
 -- Total --
 - Kinds of the subtype -
diff --git a/tests/sav/nitpick_args1.res b/tests/sav/nitpick_args1.res
new file mode 100644 (file)
index 0000000..38f9166
--- /dev/null
@@ -0,0 +1,12 @@
+../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:444,6--19: Documentation warning: Undocumented property `read_all_bytes`
+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`
+test_advice_repeated_types.nit:38,27--29: Warning: useless type repetition on parameter `c2` for redefined method `c`
+test_advice_repeated_types.nit:39,15--20: Warning: useless return type repetition for redefined method `d`
+test_advice_repeated_types.nit:40,18--20: Warning: useless type repetition on parameter `e1` for redefined method `e`
+test_advice_repeated_types.nit:40,24--29: Warning: useless return type repetition for redefined method `e`
+test_advice_repeated_types.nit:49,18--20: Warning: useless type repetition on parameter `e1` for redefined method `e`
index b63845a..4c208ff 100644 (file)
@@ -53,7 +53,7 @@ private class A
                printf( "received msg: %s, of length = %d\n", c_msg, msg_len );
 
                /* A_my_attr is a callback to the getter of self.my_attr */
-               printf( "old attr %d\n", A_my_attr(recv) );
+               printf( "old attr %d\n", A_my_attr(self) );
 
                if(chose)
                        truc;
@@ -61,21 +61,21 @@ private class A
                        chose;
 
                /* A_my_attr is a callback to the setter of self.my_attr= */
-               A_my_attr__assign( recv, msg_len );
+               A_my_attr__assign( self, msg_len );
        `}
 end
 
 extern class TimeT `{time_t`}
        new `{ return time(NULL); `}
        new from_i(i: Int) `{ return i; `}
-       fun update `{ time(&recv); `}
+       fun update `{ time(&self); `}
 
        fun ctime: String import NativeString.to_s_with_copy `{
-               return NativeString_to_s_with_copy( ctime(&recv) );
+               return NativeString_to_s_with_copy( ctime(&self) );
        `}
 
        # Difference in secondes from start (self if the end time)
-       fun difftime(start: TimeT): Float `{ return difftime(recv, start); `}
+       fun difftime(start: TimeT): Float `{ return difftime(self, start); `}
 
        private fun intern_poll(in_fds: Array[Int], out_fds: Array[Int]): nullable Int is
                extern import Array[Int].length, Array[Int].[], Int.as(nullable Int) `{`}
@@ -83,4 +83,4 @@ end
 
 fun address_is_null: Bool is extern "address_is_null"
 
-fun free `{ free(recv); `}
+fun free `{ free(self); `}
index 415c33f..9a17fac 100644 (file)
@@ -53,7 +53,7 @@ private class A
                printf( "received msg: %s, of length = %d\n", c_msg, msg_len );
 
                /* A_my_attr is a callback to the getter of self.my_attr */
-               printf( "old attr %d\n", A_my_attr(recv) );
+               printf( "old attr %d\n", A_my_attr(self) );
 
                if(chose)
                        truc;
@@ -61,7 +61,7 @@ private class A
                        chose;
 
                /* A_my_attr is a callback to the setter of self.my_attr= */
-               A_my_attr__assign( recv, msg_len );
+               A_my_attr__assign( self, msg_len );
        `}
 end
 
@@ -69,14 +69,14 @@ extern class TimeT `{time_t`}
        new `{ return time(NULL); `}
        new from_i(i: Int) `{ return i; `}
 
-       fun update `{ time(&recv); `}
+       fun update `{ time(&self); `}
 
        fun ctime: String import NativeString.to_s_with_copy `{
-               return NativeString_to_s_with_copy( ctime(&recv) );
+               return NativeString_to_s_with_copy( ctime(&self) );
        `}
 
        # Difference in secondes from start (self if the end time)
-       fun difftime(start: TimeT): Float `{ return difftime(recv, start); `}
+       fun difftime(start: TimeT): Float `{ return difftime(self, start); `}
 
        private fun intern_poll(in_fds: Array[Int], out_fds: Array[Int]): nullable Int is
                extern import Array[Int].length, Array[Int].[], Int.as(nullable Int) `{`}
@@ -84,5 +84,5 @@ end
 
 fun address_is_null: Bool is extern "address_is_null"
 
-fun free `{ free(recv); `}
+fun free `{ free(self); `}
 
index fc2e797..b36335e 100644 (file)
@@ -9,12 +9,10 @@ redef class Deserializer
        redef fun deserialize_class(name)
        do
                # Module: test_serialization
-               if name == "Array[Object]" then return new Array[Object].from_deserializer(self)
+               if name == "Array[String]" then return new Array[String].from_deserializer(self)
                if name == "Array[nullable Object]" then return new Array[nullable Object].from_deserializer(self)
                if name == "Array[Serializable]" then return new Array[Serializable].from_deserializer(self)
-               if name == "Array[String]" then return new Array[String].from_deserializer(self)
-               if name == "HashMap[Serializable, Array[Couple[Serializable, Int]]]" then return new HashMap[Serializable, Array[Couple[Serializable, Int]]].from_deserializer(self)
-               if name == "Array[Couple[Serializable, Int]]" then return new Array[Couple[Serializable, Int]].from_deserializer(self)
+               if name == "Array[Object]" then return new Array[Object].from_deserializer(self)
                return super
        end
 end
index fd2ef3c..33e2d20 100644 (file)
@@ -12,7 +12,7 @@ digraph G {
                                        fontsize = 8
                                ]
 Object [
- label = "{interface\nObject||+ object_id(): Int\l+ is_same_type(other: Object): Bool\l+ is_same_instance(other: nullable Object): Bool\l+ ==(other: nullable Object): Bool\l+ !=(other: nullable Object): Bool\l+ output()\l+ output_class_name()\l+ hash(): Int\l+ sys(): Sys\l}"
+ label = "{interface\nObject||+ object_id(): Int\l+ is_same_type(other: Object): Bool\l+ is_same_instance(other: nullable Object): Bool\l+ ==(other: nullable Object): Bool\l+ !=(other: nullable Object): Bool\l+ output()\l+ output_class_name()\l+ hash(): Int\l+ sys(): Sys\l+ init()\l}"
 ]
 
 Sys [
@@ -36,7 +36,7 @@ Cloneable [
 Object -> Cloneable [dir=back arrowtail=open style=dashed];
 
 Numeric [
- label = "{interface\nNumeric||+ +(i: OTHER): OTHER\l+ -(i: OTHER): OTHER\l+ unary -(): OTHER\l+ *(i: OTHER): OTHER\l+ /(i: OTHER): OTHER\l+ to_i(): Int\l+ to_f(): Float\l+ is_zero(): Bool\l+ zero(): OTHER\l+ value_of(val: Numeric): OTHER\l}"
+ label = "{interface\nNumeric||+ +(i: OTHER): OTHER\l+ -(i: OTHER): OTHER\l+ unary -(): OTHER\l+ *(i: OTHER): OTHER\l+ /(i: OTHER): OTHER\l+ to_i(): Int\l+ to_f(): Float\l+ to_b(): Byte\l+ is_zero(): Bool\l+ zero(): OTHER\l+ value_of(val: Numeric): OTHER\l}"
 ]
 Comparable -> Numeric [dir=back arrowtail=open style=dashed];
 
@@ -50,6 +50,12 @@ Float [
 ]
 Numeric -> Float [dir=back arrowtail=open style=dashed];
 
+Byte [
+ label = "{Byte||+ %(i: Byte): Byte\l+ lshift(i: Int): Byte\l+ \<\<(i: Int): Byte\l+ rshift(i: Int): Byte\l+ \>\>(i: Int): Byte\l}"
+]
+Discrete -> Byte [dir=back arrowtail=open style=dashed];
+Numeric -> Byte [dir=back arrowtail=open style=dashed];
+
 Int [
  label = "{Int||+ %(i: Int): Int\l+ lshift(i: Int): Int\l+ \<\<(i: Int): Int\l+ rshift(i: Int): Int\l+ \>\>(i: Int): Int\l+ ascii(): Char\l+ digit_count(b: Int): Int\l+ digit_count_base_10(): Int\l+ to_c(): Char\l+ abs(): Int\l}"
 ]
index 43e3f9e..8fc87eb 100644 (file)
@@ -12,7 +12,7 @@ digraph G {
                                        fontsize = 8
                                ]
 Object [
- label = "{interface\nObject||+ object_id(): Int\l+ is_same_type(other: Object): Bool\l+ is_same_instance(other: nullable Object): Bool\l+ ==(other: nullable Object): Bool\l+ !=(other: nullable Object): Bool\l+ output()\l+ output_class_name()\l+ hash(): Int\l+ sys(): Sys\l}"
+ label = "{interface\nObject||+ object_id(): Int\l+ is_same_type(other: Object): Bool\l+ is_same_instance(other: nullable Object): Bool\l+ ==(other: nullable Object): Bool\l+ !=(other: nullable Object): Bool\l+ output()\l+ output_class_name()\l+ hash(): Int\l+ sys(): Sys\l+ init()\l}"
 ]
 
 Sys [
@@ -36,7 +36,7 @@ Cloneable [
 Object -> Cloneable [dir=back arrowtail=open style=dashed];
 
 Numeric [
- label = "{interface\nNumeric||+ +(i: OTHER): OTHER\l+ -(i: OTHER): OTHER\l+ unary -(): OTHER\l+ *(i: OTHER): OTHER\l+ /(i: OTHER): OTHER\l+ to_i(): Int\l+ to_f(): Float\l+ is_zero(): Bool\l+ zero(): OTHER\l+ value_of(val: Numeric): OTHER\l}"
+ label = "{interface\nNumeric||+ +(i: OTHER): OTHER\l+ -(i: OTHER): OTHER\l+ unary -(): OTHER\l+ *(i: OTHER): OTHER\l+ /(i: OTHER): OTHER\l+ to_i(): Int\l+ to_f(): Float\l+ to_b(): Byte\l+ is_zero(): Bool\l+ zero(): OTHER\l+ value_of(val: Numeric): OTHER\l}"
 ]
 Comparable -> Numeric [dir=back arrowtail=open style=dashed];
 
@@ -50,6 +50,12 @@ Float [
 ]
 Numeric -> Float [dir=back arrowtail=open style=dashed];
 
+Byte [
+ label = "{Byte||+ %(i: Byte): Byte\l+ lshift(i: Int): Byte\l+ \<\<(i: Int): Byte\l+ rshift(i: Int): Byte\l+ \>\>(i: Int): Byte\l}"
+]
+Discrete -> Byte [dir=back arrowtail=open style=dashed];
+Numeric -> Byte [dir=back arrowtail=open style=dashed];
+
 Int [
  label = "{Int||+ %(i: Int): Int\l+ lshift(i: Int): Int\l+ \<\<(i: Int): Int\l+ rshift(i: Int): Int\l+ \>\>(i: Int): Int\l+ ascii(): Char\l+ digit_count(b: Int): Int\l+ digit_count_base_10(): Int\l+ to_c(): Char\l+ abs(): Int\l}"
 ]
index bb20768..ec462a0 100644 (file)
@@ -1,3 +1,3 @@
-Usage: nitx [OPTION]... <file.nit> [query]
+Usage: nitx [OPTION]... <file.nit>... [query]
 Displays specific pieces of API information from Nit source files.
 Use --help for help
index bf43dd3..f22bfee 100644 (file)
@@ -1,22 +1,13 @@
-\e[1m= result for 'A'\e[0m
 
-  class \e[32m\e[1mA\e[0m\e[0m
-  \e[30m\e[1mbase_simple3::A\e[0m\e[0m\e[30m (lines 29-32)\e[0m
-    
-    \e[1m== supers\e[0m
-      
-      interface \e[32m\e[1mObject\e[0m\e[0m
-      \e[30m\e[1mbase_simple3::Object\e[0m\e[0m\e[30m (lines 19-20)\e[0m
-    
-    \e[1m== constructors\e[0m
-      
-      redef \e[1m\e[32minit\e[0m\e[0m
-      \e[30m\e[1mbase_simple3::A::init\e[0m\e[0m\e[30m (lines 30-30)\e[0m
-    
-    \e[1m== methods\e[0m
-      
-      fun \e[1m\e[32mrun\e[0m\e[0m
-      \e[30m\e[1mbase_simple3::A::run\e[0m\e[0m\e[30m (lines 31-31)\e[0m
-    
-    \e[1m== refinements\e[0m
+\e[1m\e[32m# 2 result(s) for 'comment: A'\e[m\e[m
+
\e[1m\e[32mC\e[m\e[m \e[1m\e[34mA\e[m\e[m
+   \e[1m\e[30mbase_simple3::A\e[m\e[m
+   class A
+   \e[30mbase_simple3.nit:29,1--32,3\e[m
+
\e[1m\e[32mC\e[m\e[m \e[1m\e[34mA\e[m\e[m
+   \e[1m\e[30mbase_simple3::base_simple3::A\e[m\e[m
+   class A
+   \e[30mbase_simple3.nit:29,1--32,3\e[m
 
index bdb2b9f..b7ca320 100644 (file)
@@ -1,5 +1,13 @@
-\e[1m= result for 'foo'\e[0m
 
-  fun \e[1m\e[32mfoo\e[0m\e[0m
-  \e[30m\e[1mbase_simple3::Sys::foo\e[0m\e[0m\e[30m (lines 49-49)\e[0m
+\e[1m\e[32m# 2 result(s) for 'comment: foo'\e[m\e[m
+
\e[1m\e[32mF\e[m\e[m \e[1m\e[34mfoo\e[m\e[m
+   \e[1m\e[30mbase_simple3::Sys::foo\e[m\e[m
+   fun foo
+   \e[30mbase_simple3.nit:49,1--19\e[m
+
\e[1m\e[32mF\e[m\e[m \e[1m\e[34mfoo\e[m\e[m
+   \e[1m\e[30mbase_simple3::base_simple3::Sys::foo\e[m\e[m
+   fun foo
+   \e[30mbase_simple3.nit:49,1--19\e[m
 
index 83a361e..b1fdd02 100644 (file)
@@ -1,28 +1,18 @@
-\e[1m= result for 'base_simple3'\e[0m
 
-  module \e[1mbase_simple3\e[0m
-  \e[30m\e[1mbase_simple3\e[0m\e[0m\e[30m (lines 17-66)\e[0m
-    
-    \e[1m== introduced classes\e[0m
-      
-      class \e[32m\e[1mA\e[0m\e[0m
-      \e[30m\e[1mbase_simple3::A\e[0m\e[0m\e[30m (lines 29-32)\e[0m
-      
-      class \e[32m\e[1mB\e[0m\e[0m
-      \e[30m\e[1mbase_simple3::B\e[0m\e[0m\e[30m (lines 34-42)\e[0m
-      
-      enum \e[32m\e[1mBool\e[0m\e[0m
-      \e[30m\e[1mbase_simple3::Bool\e[0m\e[0m\e[30m (lines 22-23)\e[0m
-      
-      class \e[32m\e[1mC\e[0m\e[0m
-      \e[30m\e[1mbase_simple3::C\e[0m\e[0m\e[30m (lines 44-47)\e[0m
-      
-      enum \e[32m\e[1mInt\e[0m\e[0m
-      \e[30m\e[1mbase_simple3::Int\e[0m\e[0m\e[30m (lines 25-27)\e[0m
-      
-      interface \e[32m\e[1mObject\e[0m\e[0m
-      \e[30m\e[1mbase_simple3::Object\e[0m\e[0m\e[30m (lines 19-20)\e[0m
-      
-      class \e[32m\e[1mSys\e[0m\e[0m
-      \e[30m\e[1mbase_simple3::Sys\e[0m\e[0m\e[30m (lines 49-49)\e[0m
+\e[1m\e[32m# 3 result(s) for 'comment: base_simple3'\e[m\e[m
+
\e[1m\e[32mP\e[m\e[m \e[1m\e[34mbase_simple3\e[m\e[m
+   \e[1m\e[30mbase_simple3\e[m\e[m
+   project base_simple3
+   \e[30mbase_simple3.nit:17,1--66,13\e[m
+
\e[1m\e[32mG\e[m\e[m \e[1m\e[34mbase_simple3\e[m\e[m
+   \e[1m\e[30mbase_simple3\e[m\e[m
+   group base_simple3
+   \e[30mbase_simple3.nit:17,1--66,13\e[m
+
\e[1m\e[32mM\e[m\e[m \e[1m\e[34mbase_simple3\e[m\e[m
+   \e[1m\e[30mbase_simple3::base_simple3\e[m\e[m
+   module base_simple3
+   \e[30mbase_simple3.nit:17,1--66,13\e[m
 
diff --git a/tests/sav/test_byte.res b/tests/sav/test_byte.res
new file mode 100644 (file)
index 0000000..256f8b1
--- /dev/null
@@ -0,0 +1,5 @@
+0xff
+0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
+0xff
+0x01
+0x85
index cd932ee..feaed3f 100644 (file)
@@ -5,3 +5,9 @@
 12.346
 12.3
 12
+0.5
+0.000
+0.000003125
+3410.0
+400.0
+10.0
index 047314c..f4172ad 100644 (file)
@@ -1,38 +1,38 @@
 # Nit:
-<A: true a 0.123 1234 asdf false>
+<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>
+<A: true a 0.123 1234 asdf false p4ssw0rd>
 
 # Nit:
-<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+<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> 1111 qwer>
+<B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>
 
 # Nit:
-<C: <A: true a 0.123 1234 asdf false> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+<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> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+<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> 1111         f"\r\/> true>
+<- 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> 1111         f"\r\/> true>
+<- false p4ssw0rd> 1111        f"\r\/> true>
 
index 58293c5..8c7e49a 100644 (file)
@@ -1,40 +1,40 @@
 # Nit:
-<A: true a 0.123 1234 asdf false>
+<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>
+<A: true a 0.123 1234 asdf false p4ssw0rd>
 
 # Nit:
-<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+<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> 1111 qwer>
+<B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>
 
 # Nit:
-<C: <A: true a 0.123 1234 asdf false> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+<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> <B: <A: false b 123.123 2345 hjkl false> 1111 qwer>>
+<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> 1111         f"\r\/> true>
+<- 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> 1111         f"\r\/> true>
+<- false p4ssw0rd> 1111        f"\r\/> true>
 
 # Nit:
 <E: a: hello, 1234, 123.4; b: hella, 2345, 234.5>
index 99e49d6..2dde071 100644 (file)
@@ -1,24 +1,24 @@
 # Nit:
-<A: true a 0.123 1234 asdf false>
+<A: true a 0.123 1234 asdf false p4ssw0rd>
 
 # Json:
 {"b": true, "c": "a", "f": 0.123, "i": 1234, "s": "asdf", "n": null}
 
 # Nit:
-<B: <A: false b 123.123 2345 hjkl false> 1111 qwer>
+<B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>
 
 # Json:
 {"b": false, "c": "b", "f": 123.123, "i": 2345, "s": "hjkl", "n": 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>>
+<C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl false p4ssw0rd> 1111 qwer>>
 
 # Json:
 {"a": {"b": true, "c": "a", "f": 0.123, "i": 1234, "s": "asdf", "n": null}, "b": {"b": false, "c": "b", "f": 123.123, "i": 2345, "s": "hjkl", "n": null, "ii": 1111, "ss": "qwer"}, "aa": {"b": true, "c": "a", "f": 0.123, "i": 1234, "s": "asdf", "n": null}}
 
 # Nit:
 <D: <B: <A: false b 123.123 2345 new line ->
-<- false> 1111         f"\r\/> true>
+<- false p4ssw0rd> 1111        f"\r\/> true>
 
 # Json:
 {"b": false, "c": "b", "f": 123.123, "i": 2345, "s": "new line ->\n<-", "n": null, "ii": 1111, "ss": "\tf\"\r\\\/", "d": null}
index 43e3636..209563a 100644 (file)
@@ -1,4 +1,4 @@
-Runtime error: Cast failed. Expected `E`, got `Bool` (../lib/standard/collection/array.nit:960)
+Runtime error: Cast failed. Expected `E`, got `Bool` (../lib/standard/collection/array.nit:957)
 NativeString
 N
 Nit
diff --git a/tests/sav/test_serialization_alt2.res b/tests/sav/test_serialization_alt2.res
new file mode 100644 (file)
index 0000000..e5910cf
--- /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[nullable Object]", "__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[nullable Object]", "__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[nullable Object]", "__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[nullable Object]", "__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[nullable Object]", "__length": 3, "__items": [88, "hello", null]}, "d": {"__kind": "ref", "__id": 0}}
+
diff --git a/tests/sav/test_serialization_alt3.res b/tests/sav/test_serialization_alt3.res
new file mode 100644 (file)
index 0000000..c8f072c
--- /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[nullable Object]", "__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[nullable Object]", "__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[nullable Object]", "__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[nullable Object]", "__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[nullable Object]", "__length": 3, "__items": [88, "hello", null]}, "d": {"__kind": "ref", "__id": 0}}
+
diff --git a/tests/sav/test_serialization_alt4.res b/tests/sav/test_serialization_alt4.res
new file mode 100644 (file)
index 0000000..966388f
--- /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[nullable Object]", "__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[nullable Object]", "__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[nullable Object]", "__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[nullable Object]", "__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[nullable Object]", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "\tf\"\r\\\/", "d": {"__kind": "ref", "__id": 0}}
+
diff --git a/tests/sav/test_serialization_alt5.res b/tests/sav/test_serialization_alt5.res
new file mode 100644 (file)
index 0000000..d1b73a6
--- /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[nullable Object]", "__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[nullable Object]", "__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[nullable Object]", "__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[nullable Object]", "__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[nullable Object]", "__length": 3, "__items": [88, "hello", null]}, "ii": 1111, "ss": "\tf\"\r\\\/", "d": {"__kind": "ref", "__id": 0}}
+
diff --git a/tests/sav/utf_noindex_test.res b/tests/sav/utf_noindex_test.res
deleted file mode 100644 (file)
index b5e3e16..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-28
-ハaロЖー𐍃a世界 ᓀ . ᓂ A,𐍆 a日本A語aです
-ハaロЖー𐍃a世界 ᓀ . ᓂ A,𐍆 a日本A語aです
-すでa語A本日a 𐍆,A ᓂ . ᓀ 界世a𐍃ーЖロaハ
-ー𐍃a世
-世a𐍃ー
-世a𐍃ー
-ー𐍃a世
-すでa語A本日a 𐍆,A ᓂ . ᓀ 界世a𐍃ーЖロaハ
-ハaロЖー𐍃a世界 ᓀ . ᓂ A,𐍆 a日本A語aです
-ハAロЖー𐍃A世界 ᓀ . ᓂ A,𐍆 A日本A語Aです
-ハaロЖー𐍃a世界 ᓀ . ᓂ a,𐍆 a日本a語aです
-aハロЖー𐍃a世界 ᓀ . ᓂ A,𐍆 a日本A語aです
-aハロЖー𐍃a世界 ᓀ . ᓂ a,𐍆 a日本a語aです
-AハロЖー𐍃A世界 ᓀ . ᓂ A,𐍆 A日本A語Aです
-すでA語A本日A 𐍆,A ᓂ . ᓀ 界世A𐍃ーЖロハA
index 112bdb0..64d374b 100644 (file)
@@ -1,3 +1,2 @@
-../examples/nitcorn/src/xymus_net.nit:24,8--14: Error: cannot find module `tnitter` from `nitcorn`. Tried: alt, ../lib, ../examples/nitcorn.
-../examples/nitcorn/src/xymus_net.nit:25,8--26: Error: cannot find module `benitlux_controller` from `nitcorn`. Tried: alt, ../lib, ../examples/nitcorn.
-../examples/nitcorn/src/xymus_net.nit:26,8--29: Error: cannot find module `opportunity_controller` from `nitcorn`. Tried: alt, ../lib, ../examples/nitcorn.
+../examples/nitcorn/src/xymus_net.nit:25,8--26: Error: cannot find module `benitlux_controller` from `nitcorn`. Tried: alt, ../lib, ../contrib, ../examples/nitcorn.
+../examples/nitcorn/src/xymus_net.nit:26,8--29: Error: cannot find module `opportunity_controller` from `nitcorn`. Tried: alt, ../lib, ../contrib, ../examples/nitcorn.
index 427d28c..a94d2f0 100644 (file)
@@ -29,10 +29,10 @@ class StringTest
                char* string = "This is a test string";
 
                FlatString ref_string = NativeString_to_s(string);
-               StringTest_ref_test(recv, ref_string);
+               StringTest_ref_test(self, ref_string);
 
                FlatString copy_string = NativeString_to_s_with_copy(string);
-               StringTest_copy_test(recv, copy_string);
+               StringTest_copy_test(self, copy_string);
 
                int same_refs = FlatString_items(copy_string) == FlatString_items(ref_string);
 
diff --git a/tests/test_advice_repeated_types.nit b/tests/test_advice_repeated_types.nit
new file mode 100644 (file)
index 0000000..21f1a04
--- /dev/null
@@ -0,0 +1,56 @@
+# 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 A
+       var a: Object
+       fun b(b1: Int) is abstract
+       fun c(c1: Int, c2: Int) is abstract
+       fun d: Object is abstract
+       fun e(e1: Int): Object is abstract
+end
+
+class B
+       super A
+
+       redef var a
+       redef fun b(b1) do end
+       redef fun c(c1, c2) do end
+       redef fun d do return ""
+       redef fun e(e1) do return ""
+end
+
+class C
+       super A
+
+       redef var a: Object
+       redef fun b(b1: Int) do end
+       redef fun c(c1: Int, c2: Int) do end
+       redef fun d: Object do return ""
+       redef fun e(e1: Int): Object do return ""
+end
+
+class D
+       super A
+
+       redef fun b(b1) do end
+       redef fun c(c1, c2) do end
+       redef fun d: Int do return 1
+       redef fun e(e1: Int): Numeric do return 1
+end
+
+class E
+       super A
+
+       redef var d: Int = 1
+end
diff --git a/tests/test_byte.nit b/tests/test_byte.nit
new file mode 100644 (file)
index 0000000..97e9bde
--- /dev/null
@@ -0,0 +1,28 @@
+# 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 b = 0xFF.to_b
+
+print b
+
+var a = new Array[Byte]
+
+for i in [0 .. 0xFF] do a.push i.to_b
+
+print a.join(", ")
+
+print ((-1).to_b)
+
+print 1.to_b
+print((-123).to_b)
index 79cdb5b..1b8bc03 100644 (file)
@@ -99,7 +99,7 @@ assert infoResp:info != null
 info = curl.easy_getinfo_long(new CURLInfoLong.rtsp_server_cseq)
 assert infoResp:info != null
 
-info = curl.easy_getinfo_long(new CURLInfoLong.rtsp_cseq_recv)
+info = curl.easy_getinfo_long(new CURLInfoLong.rtsp_cseq_self)
 assert infoResp:info != null
 
 # Double
index 1360bf2..deb8997 100644 (file)
@@ -26,6 +26,7 @@ class A
        var i = 123
        var s = "asdf"
        var n: nullable Int
+       var password = "p4ssw0rd" is lazy, noserialize
 
        init(b: Bool, c: Char, f: Float, i: Int, s: String, n: nullable Int)
        do
@@ -36,7 +37,7 @@ class A
                self.s = s
        end
 
-       redef fun to_s do return "<A: {b} {c} {f} {i} {s} {n != null}>"
+       redef fun to_s do return "<A: {b} {c} {f} {i} {s} {n != null} {password}>"
 end
 
 # Sub-class of A
index ad76c0a..71634fd 100644 (file)
@@ -21,12 +21,12 @@ class A
 
        fun print_all import String.to_cstring, r, rw `{
                printf( "%s %s\n",
-                       String_to_cstring( A_r( recv ) ),
-                       String_to_cstring( A_rw( recv ) ) );
+                       String_to_cstring( A_r( self ) ),
+                       String_to_cstring( A_rw( self ) ) );
        `}
        fun modify import NativeString.to_s, w=, rw= `{
-               A_w__assign( recv, NativeString_to_s( "w set from native" ) );
-               A_rw__assign( recv, NativeString_to_s( "rw set from native" ) );
+               A_w__assign( self, NativeString_to_s( "w set from native" ) );
+               A_rw__assign( self, NativeString_to_s( "rw set from native" ) );
        `}
 end
 
index 3fe526c..7e05520 100644 (file)
@@ -33,7 +33,7 @@ extern class Test
         int i;
         for(i = 0; i < 2000; ++i) {
             printf("%d\n", i);
-            Test_foo(recv, NativeString_to_s("asdf"));
+            Test_foo(self, NativeString_to_s("asdf"));
         }
     `}
 
index 5445bbf..f84ac24 100644 (file)
@@ -21,7 +21,7 @@ end
 fun foo do print "foo"
 
 fun call_a_fun import foo `{
-       Sys_foo(recv);
+       Sys_foo(self);
 `}
 
 fun call_a_constructor import A, A.bar `{
index db8c50b..1554719 100644 (file)
@@ -21,18 +21,18 @@ class FibonacciEngine
                if ( n == 1 )
                    return 1;
                else
-                   return FibonacciEngine_fibonacci( recv, n-1 ) + FibonacciEngine_fibonacci( recv,  n-2 );
+                   return FibonacciEngine_fibonacci( self, n-1 ) + FibonacciEngine_fibonacci( self,  n-2 );
        `}
 end
 
 redef class Int
        fun fibonacci : Int import fibonacci `{
-               if ( recv == 0 )
+               if ( self == 0 )
                    return 0;
-               else if ( recv == 1 )
+               else if ( self == 1 )
                    return 1;
                else
-                   return Int_fibonacci( recv-1 ) + Int_fibonacci( recv-2 );
+                   return Int_fibonacci( self-1 ) + Int_fibonacci( self-2 );
        `}
 end
 
index 79c2654..d6abce2 100644 (file)
@@ -20,12 +20,12 @@ extern class As `{ A* `}
        `}
 
        fun []=(i: Int, v: A) `{
-               recv[i] = v;
+               self[i] = v;
                A_incr_ref(v);
        `}
 
        fun [](i: Int): A `{
-               return recv[i];
+               return self[i];
        `}
 end
 
index 7e9ec29..24d152d 100644 (file)
@@ -47,7 +47,7 @@ extern class A
        `}
 
        fun p : Int import m `{
-               return A_m( recv ) + 5;
+               return A_m( self ) + 5;
        `}
 
        fun in_language : Int is extern in "C" `{
index 5fb5b35..1b927aa 100644 (file)
@@ -33,7 +33,7 @@ fun in2(i: Float) do print "Back in Nit: in2"
 
 fun out(i: Int, f: Float): Int import in1, in2, A, A.alt, A.to_i `{
        printf("From C, beginning out: %ld\n", i);
-       Sys_in1(recv, i);
+       Sys_in1(self, i);
        A a = new_A();
        A b = new_A_alt(10);
        printf("From C, a=%ld\n", A_to_i(a));
index 6f5a95a..7e826eb 100644 (file)
@@ -32,7 +32,7 @@ extern class A `{int *`}
 
        fun a do print "a"
        fun p `{
-           printf( "allo from %i\n", *recv );
+           printf( "allo from %i\n", *self );
        `}
        fun d : A import d, A `{
         return new_A();
index e9b46d2..1a15da1 100644 (file)
@@ -24,9 +24,9 @@ extern class IntPtr `{ int* `}
        `}
 
        redef fun to_s import NativeString, NativeString.to_s `{
-               int len = snprintf(NULL, 0, "%d", *recv) + 1;
+               int len = snprintf(NULL, 0, "%d", *self) + 1;
                char *c = new_NativeString(len);
-               sprintf(c, "%d", *recv);
+               sprintf(c, "%d", *self);
                return NativeString_to_s(c);
        `}
 end
index 80a3025..d78ceac 100644 (file)
@@ -20,100 +20,100 @@ class A
        init(value: Int) do self.value = value
 
        fun +(other: A): A import value, A `{
-               int s = A_value( recv );
+               int s = A_value( self );
                int o = A_value( other );
 
                return new_A( s + o );
        `}
 
        fun +: A import value, A `{
-               int s = A_value(recv);
+               int s = A_value(self);
                return new_A(+s);
        `}
 
        fun -(other: A): A import value, A `{
-               int s = A_value( recv );
+               int s = A_value( self );
                int o = A_value( other );
 
                return new_A( s - o );
        `}
 
        fun -: A import value, A `{
-               int s = A_value(recv);
+               int s = A_value(self);
                return new_A(-s);
        `}
 
        fun *(by: Int): A import value, A `{
-               int s = A_value( recv );
+               int s = A_value( self );
 
                return new_A( s * by );
        `}
 
        fun /(by: Int): A import value, A `{
-               int s = A_value( recv );
+               int s = A_value( self );
 
                return new_A( s / by );
        `}
 
        redef fun ==(other) import value, nullable Object.as(A) `{
                if ( nullable_Object_is_a_A( other ) &&
-                        A_value( nullable_Object_as_A(other) ) == A_value( recv ) )
+                        A_value( nullable_Object_as_A(other) ) == A_value( self ) )
                        return 1;
                else
                        return 0;
        `}
 
        fun %(other: A): A import value, A `{
-               return new_A( A_value( recv ) % A_value( other ) );
+               return new_A( A_value( self ) % A_value( other ) );
        `}
 
        fun <=>(other: A): A import value, A `{
-               return new_A( A_value( recv )* 1024 );
+               return new_A( A_value( self )* 1024 );
        `}
 
        fun >(other: A): Bool import value `{
-               return A_value( recv ) > A_value( other );
+               return A_value( self ) > A_value( other );
        `}
 
        fun <(other: A): Bool import value `{
-               return A_value( recv ) < A_value( other );
+               return A_value( self ) < A_value( other );
        `}
 
        fun >=(other: A): Bool import value `{
-               return A_value( recv ) >= A_value( other );
+               return A_value( self ) >= A_value( other );
        `}
 
        fun <=(other: A): Bool import value `{
-               return A_value( recv ) <= A_value( other );
+               return A_value( self ) <= A_value( other );
        `}
 
        fun >>(other: A): A import value, value=, A `{
-               int new_val = A_value( recv ) >> A_value( other );
+               int new_val = A_value( self ) >> A_value( other );
                return new_A(new_val);
        `}
 
        fun <<(other: A): A import value, A `{
-               int new_val = A_value( recv ) << A_value( other );
+               int new_val = A_value( self ) << A_value( other );
                return new_A(new_val);
        `}
 
        fun |(other: A): A import value, A `{
-               int new_val = A_value( recv ) | A_value( other );
+               int new_val = A_value( self ) | A_value( other );
                return new_A(new_val);
        `}
 
        fun ^(other: A): A import value, A `{
-               int new_val = A_value( recv ) ^ A_value( other );
+               int new_val = A_value( self ) ^ A_value( other );
                return new_A(new_val);
        `}
 
        fun ~: A import value, A `{
-               int new_val = ~A_value( recv );
+               int new_val = ~A_value( self );
                return new_A(new_val);
        `}
 
        fun &(other: A): A import value, A `{
-               int new_val = A_value( recv ) & A_value( other );
+               int new_val = A_value( self ) & A_value( other );
                return new_A(new_val);
        `}
 
index 8b241ff..e3052cf 100644 (file)
@@ -24,7 +24,7 @@ class B
        redef fun id : String import super, NativeString.to_s, String.to_cstring `{
                char *new_name;
                char *prefix = "B special ";
-               char *super_name = String_to_cstring( B_id___super( recv ) );
+               char *super_name = String_to_cstring( B_id___super( self ) );
 
                new_name = calloc( strlen( prefix )+strlen( super_name )+1, sizeof(char) );
                strcpy( new_name, prefix );
index 071fa86..7607127 100644 (file)
@@ -16,7 +16,7 @@ extern class A in "C" `{struct s_a*`}
                return v;
        `}
        fun p `{
-               printf( "A< %d %d >\n", recv->x, recv->y );
+               printf( "A< %d %d >\n", self->x, self->y );
        `}
 end
 
@@ -32,8 +32,8 @@ extern class B in "C" `{struct s_b*`}
        `}
        redef fun p import super `{
                printf( "B< " );
-               B_p___super(recv);
-               printf( "   %d %d >\n", recv->w, recv->h );
+               B_p___super(self);
+               printf( "   %d %d >\n", self->w, self->h );
        `}
 end
 
@@ -46,7 +46,7 @@ extern class C
                return v;
        `}
        redef fun p `{
-               printf( "C< %d %d >\n", recv->x, recv->y );
+               printf( "C< %d %d >\n", self->x, self->y );
        `}
 end
 
index e212c32..f899a47 100644 (file)
@@ -33,23 +33,23 @@ extern class CppVector in "C++" `{vector<int>*`}
 
        # Adds an element to the end of the vector
        fun push(v: Int) in "C++" `{
-               recv->push_back(v);
+               self->push_back(v);
        `}
 
        # Pops an element from the end of the vector
        fun pop: Int in "C++" `{
-               long val = recv->back();
-               recv->pop_back();
+               long val = self->back();
+               self->pop_back();
                return val;
        `}
 
        fun safe_pop_with_default(default_return: Int): Int import report_error in "C++" `{
-               if (recv->empty()) {
-                       CppVector_report_error(recv);
+               if (self->empty()) {
+                       CppVector_report_error(self);
                        return default_return;
                } else {
-                       long val = recv->back();
-                       recv->pop_back();
+                       long val = self->back();
+                       self->pop_back();
                        return val;
                }
        `}
index 76c1172..16375e3 100644 (file)
@@ -17,7 +17,7 @@ in "C++ Header" `{
 `}
 
 fun print_a(str: String) import String.to_cstring in "C++" `{
-       puts(String_to_cstring(str));
+       puts(reinterpret_cast<char*>(String_to_cstring(str)));
 `}
 
 print_a "Hello from `a`."
index 01eb25c..e4631dc 100644 (file)
@@ -19,7 +19,7 @@ in "C++ header" `{
 `}
 
 fun print_b(str: String) import String.to_cstring in "C++" `{
-       puts(String_to_cstring(str));
+       puts(reinterpret_cast<char*>(String_to_cstring(str)));
 `}
 
 print_a "Hello from `a`."
index 5b6c59f..7b9c3b0 100644 (file)
@@ -35,24 +35,24 @@ extern class CppVector in "C++" `{vector<int>*`}
 
        # Adds an element to the end of the vector
        fun push(v: Int) in "C++" `{
-               recv->push_back(v);
+               self->push_back(v);
        `}
 
        # Pops an element from the end of the vector
        fun pop: Int in "C++" `{
-               long val = recv->back();
-               recv->pop_back();
+               long val = self->back();
+               self->pop_back();
                return val;
        `}
 
        # Uses a callback to report when receiver is empty
        fun safe_pop_with_default(default_return: Int): Int import report_error in "C++" `{
-               if (recv->empty()) {
-                       CppVector_report_error(recv);
+               if (self->empty()) {
+                       CppVector_report_error(self);
                        return default_return;
                } else {
-                       long val = recv->back();
-                       recv->pop_back();
+                       long val = self->back();
+                       self->pop_back();
                        return val;
                }
        `}
@@ -62,13 +62,13 @@ extern class CppVector in "C++" `{vector<int>*`}
 
        # Prints the given string when receiver is empty
        fun safe_pop_with_custom_error(default_return: Int, error_msg: String): Int import String.to_cpp_string in "C++" `{
-               if (recv->empty()) {
+               if (self->empty()) {
                        string *cpp_error_msg = String_to_cpp_string(error_msg);
                        cout << *cpp_error_msg << "\n";
                        return default_return;
                } else {
-                       long val = recv->back();
-                       recv->pop_back();
+                       long val = self->back();
+                       self->pop_back();
                        return val;
                }
        `}
index 6cdd3f5..364ec9e 100644 (file)
@@ -33,13 +33,13 @@ extern class CppVector in "C++" `{vector<int>*`}
 
        # Adds an element to the end of the vector
        fun push(v: Int) in "C++" `{
-               recv->push_back(v);
+               self->push_back(v);
        `}
 
        # Pops an element from the end of the vector
        fun pop: Int in "C++" `{
-               long val = recv->back();
-               recv->pop_back();
+               long val = self->back();
+               self->pop_back();
                return val;
        `}
 end
index 4fcdbf6..6f438be 100644 (file)
@@ -24,8 +24,8 @@ class A
        fun i: Int do return 777
 
        fun foo import bar, i in "Java" `{
-               A_bar(recv);
-               long i = A_i(recv);
+               A_bar(self);
+               long i = A_i(self);
                System.out.println(i);
        `}
 
index 8c968fd..3ceb224 100644 (file)
@@ -28,12 +28,12 @@ extern class JavaQueueOfString in "Java" `{ java.util.Queue<String> `}
                return new LinkedBlockingQueue<String>();
        `}
 
-       fun offer(o: JavaString) in "Java" `{ recv.offer(o); `}
+       fun offer(o: JavaString) in "Java" `{ self.offer(o); `}
 
-       fun remove: JavaString in "Java" `{ return recv.remove(); `}
+       fun remove: JavaString in "Java" `{ return self.remove(); `}
 
        redef fun output in "Java" `{
-               for (String s: recv) {
+               for (String s: self) {
                        System.out.println(s);
                }
        `}
index 5f5819d..40fbf84 100644 (file)
@@ -30,7 +30,7 @@ class A
                System.out.println(input);
 
                // Callback Nit with string
-               String str = A_bar(recv, "Created in Java");
+               String str = A_bar(self, "Created in Java");
                System.out.println(str);
 
                // Send back a string
index 19ca640..cbdfa0f 100644 (file)
@@ -27,16 +27,16 @@ extern class JavaArrayList in "Java" `{ java.util.ArrayList `}
                return new ArrayList();
        `}
 
-       fun add(o: JavaString) in "Java" `{ recv.add(o); `}
+       fun add(o: JavaString) in "Java" `{ self.add(o); `}
 
        redef fun output in "Java" `{
-               for (Object i: recv) {
+               for (Object i: self) {
                        System.out.println((String)i);
                }
        `}
 
        fun sort in "Java" `{
-               Collections.sort(recv);         
+               Collections.sort(self);
        `}
 end
 
index 4512519..6869ac9 100644 (file)
@@ -24,7 +24,7 @@ import bar, String.to_cstring, Int.+ in "ObjC" `{
 
        printf("From Objective-C: %ld %f %s\n", ii, f, cstr);
 
-       Sys_bar(recv, ii, f, s);
+       Sys_bar(self, ii, f, s);
 `}
 
 fun bar(i: Int, f: Float, s: String)
index 387c312..a997f01 100644 (file)
@@ -23,3 +23,14 @@ print(f.to_s)
 print(f.to_precision(3))
 print(f.to_precision(1))
 print(f.to_precision(0))
+f = 5.0e-1
+print(f)
+f = 3.125e-6
+print(f.to_precision(3))
+print(f.to_precision(9))
+f = 3.41e3
+print f
+f = 4e2
+print f
+f = .1e2
+print f
index d2fc373..715ccb0 100644 (file)
@@ -52,7 +52,7 @@ private class A
                printf( "received msg: %s, of length = %d\n", c_msg, msg_len );
 
                /* A_my_attr is a callback to the getter of self.my_attr */
-               printf( "old attr %d\n", A_my_attr(recv) );
+               printf( "old attr %d\n", A_my_attr(self) );
 
                if(chose)
                        truc;
@@ -60,7 +60,7 @@ private class A
                        chose;
 
                /* A_my_attr is a callback to the setter of self.my_attr= */
-               A_my_attr__assign( recv, msg_len );
+               A_my_attr__assign( self, msg_len );
     `}
 end
 
@@ -68,19 +68,19 @@ extern class TimeT `{time_t`}
        new `{ return time(NULL); `}
        new from_i(i: Int) `{ return i; `}
 
-       fun update `{ time(&recv); `}
+       fun update `{ time(&self); `}
 
        fun ctime: String import NativeString.to_s_with_copy `{
-               return NativeString_to_s_with_copy( ctime(&recv) );
+               return NativeString_to_s_with_copy( ctime(&self) );
        `}
 
        # Difference in secondes from start (self if the end time)
-       fun difftime(start: TimeT): Float `{ return difftime(recv, start); `}
+       fun difftime(start: TimeT): Float `{ return difftime(self, start); `}
 
        private fun intern_poll(in_fds: Array[Int], out_fds: Array[Int]) : nullable Int is extern import Array[Int].length, Array[Int].[], Int.as(nullable Int) `{`}
 end
 
 fun address_is_null: Bool is extern "address_is_null"
 
-fun free `{ free(recv); `}
+fun free `{ free(self); `}
 
similarity index 99%
rename from tests/test_prog/README
rename to tests/test_prog/README.md
index e71ce81..c300f42 100644 (file)
@@ -6,4 +6,3 @@ This program creates a fake model that can be used to test tools like:
 * `nitmetrics`
 * `nitx`
 * or others `modelbuilder`.
-
similarity index 96%
rename from tests/test_prog/rpg/README
rename to tests/test_prog/rpg/README.md
index 683bccc..641a7ed 100644 (file)
@@ -1,2 +1 @@
 Role Playing Game group
-
index 5517cff..75c7a9d 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+#alt2#module test_serialization_alt2 is serialize
+
 import serialization
 import json::serialization
 
 # Simple class
 class A
-       auto_serializable
+       serialize
+#alt5# serialize
 
        var b = false
-       var c: Char
-       var f: Float
+       var c: Char#alt2#
+       #alt2#var c: Char is noserialize
+       var f: Float#alt4#
+       #alt4#var f: Float is serialize
        var i = 123
        var s = "asdf"
        var n: nullable Int
@@ -43,7 +48,9 @@ end
 
 # Sub-class of A
 class B
-       auto_serializable
+       auto_serializable#alt2##alt3#
+#alt2# noserialize
+#alt3# noserialize
        super A
 
        var ii: Int
diff --git a/tests/test_unrolled_list.nit b/tests/test_unrolled_list.nit
new file mode 100644 (file)
index 0000000..df5f6a2
--- /dev/null
@@ -0,0 +1,65 @@
+# 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 more_collections
+
+var ul = new UnrolledList[Object]
+var ll = new List[Object]
+
+for i in 1000.times do
+       var val = 100.rand+1
+
+       var act = 3.rand
+       #print "+"+act.to_s
+       if act == 0 then
+               ll.add val
+               ul.add val
+       else if act == 1 then
+               ll.unshift val
+               ul.unshift val
+       else if act == 2 then
+               var index = ll.length.rand
+               ll.insert(val, index)
+               ul.insert(val, index)
+       else abort
+
+       #assert ll == ul
+end
+
+for i in 200.times do
+       var act = 3.rand
+       #print "-"+act.to_s
+       if act == 0 then
+               var o = ll.pop
+               var c = ul.pop
+               assert o == c
+       else if act == 1 then
+               var o = ll.shift
+               var c = ul.shift
+               assert o == c
+       else if act == 2 then
+               var index = ll.length.rand
+               ll.remove_at(index)
+               ul.remove_at(index)
+       else abort
+
+       #assert ll == ul
+end
+
+while ul.not_empty do
+       var c = ul.shift
+       var o = ll.shift
+       assert c == o else print "{c} vs {o}"
+end
+assert ll.is_empty
index 2769eba..3fd5510 100755 (executable)
@@ -35,7 +35,7 @@ JNI_LIB_PATH=`dirname ${paths[0]}`
 shopt -u nullglob
 
 outdir="out"
-compdir=".nit_compile"
+compdir="nit_compile"
 
 usage()
 {
@@ -48,7 +48,7 @@ Usage: $e [options] modulenames
 --engine    Use a specific engine (default=nitc)
 --noskip    Do not skip a test even if the .skip file matches
 --outdir    Use a specific output folder (default=out/)
---compdir   Use a specific temporary compilation folder (default=.nit_compile)
+--compdir   Use a specific temporary compilation folder (default=$compdir)
 --node      Run as a node in parallel, will not output context information
 --autosav   Copy the .res files directly in the sav folder overriding existing .res files
 END
@@ -564,6 +564,8 @@ END
                                cat -- "$ff.compile.log"
                                cat >&2 -- "$ff.cmp.err"
                        fi
+                       # Clean
+                       rm -r "$compdir" 2>/dev/null
                fi
                if [ "$engine" = "emscripten" ]; then
                        echo > "$ff.bin" "nodejs $ffout \"\$@\""
diff --git a/tests/utf_noindex_test.nit b/tests/utf_noindex_test.nit
deleted file mode 100644 (file)
index 5353bdb..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-# 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.
-
-import standard
-intrude import string_experimentations::utf8_noindex
-
-var s = "aàハ𐍆".as(FlatString)
-assert s.char_at(0).code_point == 97
-assert s.char_at(1).code_point == 224
-assert s.char_at(2).code_point == 12495
-assert s.char_at(3).code_point == 66374
-
-var str = "ハaロЖー𐍃a世界 ᓀ . ᓂ A,𐍆 a日本A語aです".as(FlatString)
-
-print str.length
-print str
-
-for i in [0 .. str.length[ do
-       str.char_at(i).output
-end
-
-'\n'.output
-
-var ss = str.reversed.as(FlatString)
-
-for i in [0 .. ss.length[ do ss.char_at(i).output
-
-'\n'.output
-
-var x = str.substring(4,4).as(FlatString)
-
-for i in [0 .. x.length[ do x.char_at(i).output
-
-'\n'.output
-
-var xx = x.reversed.as(FlatString)
-
-for i in [0 .. xx.length[ do xx.char_at(i).output
-
-'\n'.output
-
-var it = new FlatStringReviter(x)
-for i in it do
-       i.output
-end
-
-'\n'.output
-
-var it2 = new FlatStringIter(x)
-for i in it2 do
-       i.output
-end
-
-'\n'.output
-
-it = new FlatStringReviter(str)
-for i in it do
-       i.output
-end
-
-'\n'.output
-
-it2 = new FlatStringIter(str)
-for i in it2 do
-       i.output
-end
-
-'\n'.output
-
-assert str * 2 == str + str
-
-assert x * 2 == x + x
-
-print str.to_upper
-
-print str.to_lower
-
-var buf = new FlatBuffer.from(str)
-
-buf.append str
-
-var bf = new FlatBuffer.from(str)
-
-bf.times(2)
-
-assert bf == buf
-
-var bf2 = new FlatBuffer.from(str)
-
-bf2.char_at(0) = str.char_at(1)
-bf2.char_at(1) = str.char_at(0)
-
-for i in [0 .. bf2.length[ do bf2.char_at(i).output
-
-'\n'.output
-
-bf2.lower
-
-for i in [0 .. bf2.length[ do bf2.char_at(i).output
-
-'\n'.output
-
-bf2.upper
-
-for i in [0 .. bf2.length[ do bf2.char_at(i).output
-
-'\n'.output
-
-bf2.reverse
-
-for i in [0 .. bf2.length[ do bf2.char_at(i).output
-
-'\n'.output