Merge: friendz, a new game for contrib
authorJean Privat <jean@pryen.org>
Tue, 22 Jul 2014 02:56:53 +0000 (22:56 -0400)
committerJean Privat <jean@pryen.org>
Tue, 22 Jul 2014 02:56:53 +0000 (22:56 -0400)
Pull-Request: #561
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

342 files changed:
contrib/nitcc/README.md
contrib/nitcc/examples/calc.sablecc
contrib/nitcc/examples/minilang.sablecc
contrib/nitcc/src/autom.nit
contrib/nitcc/src/grammar.nit
contrib/nitcc/src/nitcc.sablecc
contrib/nitcc/src/nitcc_parser_gen.nit
contrib/nitcc/src/nitcc_semantic.nit
contrib/nitcc/src/re2nfa.nit
contrib/nitcc/tests/lexer-chars.input1 [new file with mode: 0644]
contrib/nitcc/tests/lexer-chars.input2 [new file with mode: 0644]
contrib/nitcc/tests/lexer-chars.sablecc [new file with mode: 0644]
contrib/nitcc/tests/lexer-end.input [new file with mode: 0644]
contrib/nitcc/tests/lexer-end.sablecc [new file with mode: 0644]
contrib/nitcc/tests/re.input1 [new file with mode: 0644]
contrib/nitcc/tests/re.input2 [new file with mode: 0644]
contrib/nitcc/tests/re.input3 [new file with mode: 0644]
contrib/nitcc/tests/re.input4 [new file with mode: 0644]
contrib/nitcc/tests/re.sablecc [new file with mode: 0644]
contrib/nitcc/tests/sav/inf5000-06-grammaire2-grammaire2.res
contrib/nitcc/tests/sav/inf5000-06-grammaire2-instructions.alt3.res
contrib/nitcc/tests/sav/inf5000-06-grammaire2-polygone.res
contrib/nitcc/tests/sav/lexer-c-comment.alt2.res
contrib/nitcc/tests/sav/lexer-chars.alt1.input1.res [new file with mode: 0644]
contrib/nitcc/tests/sav/lexer-chars.alt1.input2.res [new file with mode: 0644]
contrib/nitcc/tests/sav/lexer-chars.alt2.input1.res [new file with mode: 0644]
contrib/nitcc/tests/sav/lexer-chars.alt2.input2.res [new file with mode: 0644]
contrib/nitcc/tests/sav/lexer-chars.alt3.input1.res [new file with mode: 0644]
contrib/nitcc/tests/sav/lexer-chars.alt3.input2.res [new file with mode: 0644]
contrib/nitcc/tests/sav/lexer-chars.input1.res [new file with mode: 0644]
contrib/nitcc/tests/sav/lexer-chars.input2.res [new file with mode: 0644]
contrib/nitcc/tests/sav/lexer-end.input.res [new file with mode: 0644]
contrib/nitcc/tests/sav/re.input1.res [new file with mode: 0644]
contrib/nitcc/tests/sav/re.input2.res [new file with mode: 0644]
contrib/nitcc/tests/sav/re.input3.res [new file with mode: 0644]
contrib/nitcc/tests/sav/re.input4.res [new file with mode: 0644]
doc/README
doc/developpez/doc_nit.cls [deleted file]
doc/developpez/licence.tex [deleted file]
doc/developpez/modules/listings/array1_c.nit [deleted file]
doc/developpez/modules/listings/array2_c.nit [deleted file]
doc/developpez/modules/listings/cos1_c.nit [deleted file]
doc/developpez/modules/listings/exp1_c.nit [deleted file]
doc/developpez/modules/listings/hashmap1_c.nit [deleted file]
doc/developpez/modules/listings/iterator1_s.nit [deleted file]
doc/developpez/modules/listings/list1_c.nit [deleted file]
doc/developpez/modules/listings/pi1_c.nit [deleted file]
doc/developpez/modules/listings/set1_c.nit [deleted file]
doc/developpez/modules/listings/sorter1_c.nit [deleted file]
doc/developpez/modules/modules.tex [deleted file]
doc/developpez/nit.tex [deleted file]
doc/developpez/poo/listings/abstract1_c.nit [deleted file]
doc/developpez/poo/listings/abstract2_c.nit [deleted file]
doc/developpez/poo/listings/accesseurs1_c.nit [deleted file]
doc/developpez/poo/listings/accesseurs2_c.nit [deleted file]
doc/developpez/poo/listings/accesseurs3_c.nit [deleted file]
doc/developpez/poo/listings/accesseurs4_c.nit [deleted file]
doc/developpez/poo/listings/attribut1_c.nit [deleted file]
doc/developpez/poo/listings/attribut2_c.nit [deleted file]
doc/developpez/poo/listings/coercition1_c.nit [deleted file]
doc/developpez/poo/listings/coercition2_s.nit [deleted file]
doc/developpez/poo/listings/comparaison1_s.nit [deleted file]
doc/developpez/poo/listings/comparaison2_c.nit [deleted file]
doc/developpez/poo/listings/constructeur1_c.nit [deleted file]
doc/developpez/poo/listings/constructeur2_c.nit [deleted file]
doc/developpez/poo/listings/constructeur3_c.nit [deleted file]
doc/developpez/poo/listings/constructeur4_c.nit [deleted file]
doc/developpez/poo/listings/gen1_c.nit [deleted file]
doc/developpez/poo/listings/gen2_c.nit [deleted file]
doc/developpez/poo/listings/gen3_c.nit [deleted file]
doc/developpez/poo/listings/gen4_s.nit [deleted file]
doc/developpez/poo/listings/gen5_c.nit [deleted file]
doc/developpez/poo/listings/heritage1_s.nit [deleted file]
doc/developpez/poo/listings/import1_c.nit [deleted file]
doc/developpez/poo/listings/interface_c.nit [deleted file]
doc/developpez/poo/listings/isset_c.nit [deleted file]
doc/developpez/poo/listings/methode1_c.nit [deleted file]
doc/developpez/poo/listings/methode2_c.nit [deleted file]
doc/developpez/poo/listings/methode4_s.nit [deleted file]
doc/developpez/poo/listings/methode5_c.nit [deleted file]
doc/developpez/poo/listings/methode6_c.nit [deleted file]
doc/developpez/poo/listings/methode7_c.nit [deleted file]
doc/developpez/poo/listings/methode8_c.nit [deleted file]
doc/developpez/poo/listings/methode9_c.nit [deleted file]
doc/developpez/poo/listings/new1_s.nit [deleted file]
doc/developpez/poo/listings/new2_s.nit [deleted file]
doc/developpez/poo/listings/new3_s.nit [deleted file]
doc/developpez/poo/listings/nullable1_c.nit [deleted file]
doc/developpez/poo/listings/package1_c.nit [deleted file]
doc/developpez/poo/listings/polymorphisme1_c.nit [deleted file]
doc/developpez/poo/listings/polymorphisme_c.nit [deleted file]
doc/developpez/poo/listings/redef1_c.nit [deleted file]
doc/developpez/poo/listings/redef2_c.nit [deleted file]
doc/developpez/poo/listings/redef3_c.nit [deleted file]
doc/developpez/poo/listings/redef4_c.nit [deleted file]
doc/developpez/poo/listings/redef5_c.nit [deleted file]
doc/developpez/poo/listings/self_c.nit [deleted file]
doc/developpez/poo/listings/super1_c.nit [deleted file]
doc/developpez/poo/listings/super2_c.nit [deleted file]
doc/developpez/poo/listings/super3_c.nit [deleted file]
doc/developpez/poo/listings/type1_c.nit [deleted file]
doc/developpez/poo/listings/type2_c.nit [deleted file]
doc/developpez/poo/listings/type3_s.nit [deleted file]
doc/developpez/poo/listings/type4_s.nit [deleted file]
doc/developpez/poo/listings/type5_s.nit [deleted file]
doc/developpez/poo/listings/type6_s.nit [deleted file]
doc/developpez/poo/poo.tex [deleted file]
doc/developpez/presentation/listings/hello_world_s.nit [deleted file]
doc/developpez/presentation/presentation.tex [deleted file]
doc/developpez/syntaxe/listings/array2_c.nit [deleted file]
doc/developpez/syntaxe/listings/array_c.nit [deleted file]
doc/developpez/syntaxe/listings/assert_c.nit [deleted file]
doc/developpez/syntaxe/listings/break_c.nit [deleted file]
doc/developpez/syntaxe/listings/char1_c.nit [deleted file]
doc/developpez/syntaxe/listings/chariot_s.nit [deleted file]
doc/developpez/syntaxe/listings/comment_s.nit [deleted file]
doc/developpez/syntaxe/listings/continue_c.nit [deleted file]
doc/developpez/syntaxe/listings/declaration_s.nit [deleted file]
doc/developpez/syntaxe/listings/do_c.nit [deleted file]
doc/developpez/syntaxe/listings/for_c.nit [deleted file]
doc/developpez/syntaxe/listings/if_c.nit [deleted file]
doc/developpez/syntaxe/listings/label_c.nit [deleted file]
doc/developpez/syntaxe/listings/loop_c.nit [deleted file]
doc/developpez/syntaxe/listings/new_s.nit [deleted file]
doc/developpez/syntaxe/listings/nullable_c.nit [deleted file]
doc/developpez/syntaxe/listings/string2_c.nit [deleted file]
doc/developpez/syntaxe/listings/string3_c.nit [deleted file]
doc/developpez/syntaxe/listings/string4_c.nit [deleted file]
doc/developpez/syntaxe/listings/string_c.nit [deleted file]
doc/developpez/syntaxe/listings/typage2_c.nit [deleted file]
doc/developpez/syntaxe/listings/typage3_c.nit [deleted file]
doc/developpez/syntaxe/listings/typage_c.nit [deleted file]
doc/developpez/syntaxe/listings/var_c.nit [deleted file]
doc/developpez/syntaxe/listings/while_c.nit [deleted file]
doc/developpez/syntaxe/syntaxe.tex [deleted file]
doc/nitreference/nitlanguage.sty [deleted file]
doc/nitreference/nitreference-main.tex [deleted file]
doc/nitreference/nitreference.tex [deleted file]
examples/mnit_ballz/org.nitlanguage.ballz_android.txt [new file with mode: 0644]
examples/mnit_dino/org.nitlanguage.dino.txt [new file with mode: 0644]
examples/mnit_moles/org.nitlanguage.moles_android.txt [new file with mode: 0644]
examples/mnit_simple/assets/sound.ogg [new file with mode: 0644]
examples/mnit_simple/assets/xylofon.ogg [new file with mode: 0644]
examples/mnit_simple/org.nitlanguage.simple.txt [new file with mode: 0644]
examples/mnit_simple/res/drawable/fighter.png [new file with mode: 0644]
examples/mnit_simple/res/raw/sound.ogg [new file with mode: 0644]
examples/mnit_simple/res/raw/xylofon.ogg [new file with mode: 0644]
examples/mnit_simple/res/values/bools.xml [new file with mode: 0644]
examples/mnit_simple/res/values/dimens.xml [new file with mode: 0644]
examples/mnit_simple/res/values/strings.xml [new file with mode: 0644]
examples/mnit_simple/src/simple_android.nit
examples/mnit_simple/src/test_target_api.nit [new file with mode: 0644]
examples/shoot/org.nitlanguage.shoot_android.txt [new file with mode: 0644]
lib/android/assets_and_resources.nit [new file with mode: 0644]
lib/android/audio.nit [new file with mode: 0644]
lib/android/bundle/bundle.nit [new file with mode: 0644]
lib/android/java_io.nit [new file with mode: 0644]
lib/android/shared_preferences/shared_preferences_api10.nit
lib/android/shared_preferences/shared_preferences_api11.nit
lib/curl/curl_c.nit
lib/curses/curses.nit
lib/ini.nit [new file with mode: 0644]
lib/neo4j/curl_json.nit [new file with mode: 0644]
lib/neo4j/jsonable.nit [new file with mode: 0644]
lib/neo4j/neo4j.nit [new file with mode: 0644]
lib/nitcc_runtime.nit
lib/opts.nit
lib/splay_ropes.nit [new file with mode: 0644]
lib/sqlite3/native_sqlite3.nit [new file with mode: 0644]
lib/sqlite3/sqlite3.nit
lib/standard/collection/collection.nit
lib/standard/collection/union_find.nit [moved from lib/union_find.nit with 99% similarity]
lib/standard/ropes.nit
lib/standard/string.nit
lib/xdg_basedir/show_basedir.nit [new file with mode: 0644]
lib/xdg_basedir/xdg_basedir.nit [new file with mode: 0644]
src/Makefile
src/abstract_compiler.nit
src/android_annotations.nit
src/android_platform.nit
src/annotation.nit [new file with mode: 0644]
src/cached.nit
src/common_ffi/c.nit
src/common_ffi/c_compiler_options.nit
src/common_ffi/common_ffi.nit
src/common_ffi/extra_java_files.nit
src/common_ffi/java.nit
src/common_ffi/pkgconfig.nit
src/compiler_ffi.nit
src/doc/doc_model.nit
src/doc/doc_pages.nit
src/global_compiler.nit
src/markdown.nit
src/metrics/metrics_base.nit
src/model/README.md [new file with mode: 0644]
src/model/mmodule.nit
src/model/model.nit
src/model_utils.nit
src/modelbuilder.nit
src/modelize_property.nit
src/naive_interpreter.nit
src/nit.nit
src/nitdoc.nit
src/nitmetrics.nit
src/nitni/nitni_utilities.nit
src/nitunit.nit
src/nitvm.nit
src/parser/README [deleted file]
src/parser/README.md [new file with mode: 0644]
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/tables_nit.c
src/platform.nit
src/scope.nit
src/separate_compiler.nit
src/separate_erasure_compiler.nit
src/test_markdown.nit
src/transform.nit
src/typing.nit
src/vm.nit
tests/base_as_notnull.nit
tests/base_as_notnull2.nit [new file with mode: 0644]
tests/base_as_notnull_int.nit [new file with mode: 0644]
tests/base_attr.nit
tests/base_attr2.nit
tests/base_attr5.nit
tests/base_attr_init_val2.nit
tests/base_attr_isset.nit
tests/base_attr_nullable.nit
tests/base_attr_nullable_int.nit
tests/base_compile.nit
tests/base_gen2.nit
tests/base_label_while2.nit [new file with mode: 0644]
tests/base_nullable.nit
tests/base_primitive_null.nit
tests/base_simple_import.nit
tests/base_var_null.nit
tests/base_var_type_evolution_null3.nit
tests/base_virtual_type_self.nit
tests/bench_complex_sort.nit
tests/bench_netsim.nit
tests/error_attr_2def.nit
tests/error_attr_assign.nit
tests/error_expr_not_ok.nit
tests/error_formal.nit
tests/error_kern_attr_any.nit
tests/error_kern_attr_int.nit
tests/error_ref_attr.nit
tests/error_spe_attr.nit
tests/example_beer.nit
tests/example_hanoi.nit
tests/example_objet.nit
tests/example_point.nit
tests/galerie.nit
tests/gccbug_attribute_access.nit
tests/module_simple.nit
tests/nitg.args
tests/nitvm.skip [new file with mode: 0644]
tests/rterror_null_receiver.nit
tests/sav/base_as_notnull.res
tests/sav/base_as_notnull2.res [new file with mode: 0644]
tests/sav/base_as_notnull2_alt1.res [new file with mode: 0644]
tests/sav/base_as_notnull2_alt2.res [new file with mode: 0644]
tests/sav/base_as_notnull2_alt3.res [new file with mode: 0644]
tests/sav/base_as_notnull_alt1.res
tests/sav/base_as_notnull_alt2.res
tests/sav/base_as_notnull_alt3.res
tests/sav/base_as_notnull_alt4.res
tests/sav/base_as_notnull_alt5.res
tests/sav/base_as_notnull_alt6.res
tests/sav/base_as_notnull_alt7.res
tests/sav/base_as_notnull_int.res [new file with mode: 0644]
tests/sav/base_attr5_alt17.res [new file with mode: 0644]
tests/sav/base_attr5_alt22.res
tests/sav/base_attr5_alt24.res
tests/sav/base_attr5_alt27.res [new file with mode: 0644]
tests/sav/base_attr5_alt7.res [new file with mode: 0644]
tests/sav/base_attr_gen_alt1.res
tests/sav/base_label_while2.res [new file with mode: 0644]
tests/sav/base_label_while2_alt4.res [new file with mode: 0644]
tests/sav/base_label_while2_alt5.res [new file with mode: 0644]
tests/sav/base_label_while2_alt6.res [new file with mode: 0644]
tests/sav/base_label_while2_alt7.res [new file with mode: 0644]
tests/sav/base_simple_import.res
tests/sav/error_attr_2def.res
tests/sav/error_expr_not_ok.res
tests/sav/error_expr_not_ok_alt2.res
tests/sav/error_expr_not_ok_alt3.res
tests/sav/error_expr_not_ok_alt4.res
tests/sav/error_expr_not_ok_alt5.res
tests/sav/error_expr_not_ok_alt6.res
tests/sav/error_formal.res
tests/sav/error_kern_attr_any.res
tests/sav/error_kern_attr_int.res
tests/sav/error_ref_attr.res
tests/sav/error_spe_attr.res
tests/sav/fixme/nitvm_args3.res [new file with mode: 0644]
tests/sav/nitcc_parser_gen.res
tests/sav/nitg-g/fixme/simple_android.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/simple_android.res [new file with mode: 0644]
tests/sav/nitg.res
tests/sav/nitg_args7.res [new file with mode: 0644]
tests/sav/nith.res
tests/sav/niti/base_attr_init_val_raf_alt1.res
tests/sav/niti/rterror_attr_def_alt2.res
tests/sav/niti/rterror_attr_def_alt7.res
tests/sav/nitlight_args1.res
tests/sav/nitmetrics_args1.res
tests/sav/rterror_attr_def_alt2.res
tests/sav/rterror_attr_def_alt7.res
tests/sav/splay_test.res [new file with mode: 0644]
tests/sav/test_ffi_java_generics.res [new file with mode: 0644]
tests/sav/test_flatrope_alt1.res [new file with mode: 0644]
tests/sav/test_neo4j.res [new file with mode: 0644]
tests/sav/test_neo4j_batch.res [new file with mode: 0644]
tests/sav/test_parser_args1.res
tests/sav/test_ropes_alt1.res [new file with mode: 0644]
tests/sav/test_sqlite3_native.res [moved from tests/sav/test_sqlite3.res with 100% similarity]
tests/sav/test_sqlite3_nity.res [new file with mode: 0644]
tests/sav/test_sqlite3_nity_alt1.res [new file with mode: 0644]
tests/sav/test_sqlite3_nity_alt2.res [new file with mode: 0644]
tests/sav/test_variance_attr.res
tests/shootout_binarytrees.nit
tests/splay_test.nit [new file with mode: 0644]
tests/test_create.nit
tests/test_create_more.nit
tests/test_ffi_c_lots_of_refs.nit [new file with mode: 0644]
tests/test_ffi_java_generics.nit [new file with mode: 0644]
tests/test_flatrope.nit
tests/test_gen.nit
tests/test_neo4j.nit [new file with mode: 0644]
tests/test_neo4j_batch.nit [new file with mode: 0644]
tests/test_operator_brackets.nit
tests/test_paire.nit
tests/test_ropes.nit
tests/test_sqlite3_native.nit [moved from tests/test_sqlite3.nit with 89% similarity]
tests/test_sqlite3_nity.nit [new file with mode: 0644]
tests/test_variance_attr.nit
tests/tests.sh

index f08b547..82ee0ff 100644 (file)
@@ -60,7 +60,7 @@ For the parser (and grammar and LR)
  - [x] Rejected
  - [x] Empty (but not mandatory)
  - [ ] Opportunistic
- - [ ] Precedence
+ - [x] Precedence
  - [ ] Separator
  - [x] Dangling (automatic, so mitigate the SLR limitations)
  - [x] simple transformation (unchecked)
index 12a0fbf..309cef3 100644 (file)
@@ -9,14 +9,13 @@ blank = (' '|'\n')+;
 Parser
 Ignored blank;
 e =
-       {add:} e '+' f |
-       {sub:} e '-' f |
-       f {->};
-f {->e} =
-       {mul:} f '*' a |
-       {div:} f '/' a |
-       a {->};
-a {->e} =
        {int:} int |
-       {par:} '(' e ')' |
-       {neg:} '-' a ;
+       {par:} '(' e ')'
+Unary
+       {neg:} '-' e
+Left
+       {mul:} e '*' e |
+       {div:} e '/' e
+Left
+       {add:} e '+' e |
+       {sub:} e '-' e ;
index 0f69b33..954fdb0 100644 (file)
@@ -27,31 +27,29 @@ stmts = '{' s* '}' ;
 else = 'else' stmts;
 
 e = 
-       {add:} [left:]e '+' [right:]e2 |
-       {sub:} [left:]e '-' [right:]e2 |
-       e2 {->};
-e2 {->e} =
-       {mul:} [left:]e2 '*' [right:]e3 |
-       {div:} [left:]e2 '/' [right:]e3 |
-       e3 {->};
-e3 {->e} =
-       {neg:} '-' e3 |
        {lit:} int |
        {par:} '(' e ')' |
        {var:} id |
-       {read:} 'read' '(' ')' ;
+       {read:} 'read' '(' ')'
+Unary
+       {neg:} '-' e
+Left
+       {mul:} [left:]e '*' [right:]e |
+       {div:} [left:]e '/' [right:]e
+Right
+       {add:} [left:]e '+' [right:]e |
+       {sub:} [left:]e '-' [right:]e ;
 
 c =
-       {or:} [left:]c '||' [right:]c2 |
-       c2 {->};
-c2 {->c} =
-       {and:} [left:]c2 '&&' [right:]c3 |
-       c3 {->};
-c3 {->c} =
-       {not:} 'not' [c:]c3 |
        {eq:} [left:]e '=' [right:]e |
        {ne:} [left:]e '!=' [right:]e |
        {lt:} [left:]e '<' [right:]e |
        {le:} [left:]e '<=' [right:]e |
        {gt:} [left:]e '>' [right:]e |
-       {ge:} [left:]e '>=' [right:]e ;
+       {ge:} [left:]e '>=' [right:]e
+Unary
+       {not:} 'not' c
+Left
+       {and:} [left:]c '&&' [right:]c
+Left
+       {or:} [left:]c '||' [right:]c ;
index c20f3df..86f25b3 100644 (file)
@@ -184,6 +184,31 @@ class Automaton
                states.add_all other.states
        end
 
+       # Return a new automaton that recognize `self` but not `other`
+       # For a theorical POV, this is the substraction of languages.
+       # Note: the implementation use `to_dfa` internally, so the theorical complexity is not cheap.
+       fun except(other: Automaton): Automaton
+       do
+               var ta = new Token("1")
+               self.tag_accept(ta)
+               var tb = new Token("2")
+               other.tag_accept(tb)
+
+               var c = new Automaton.empty
+               c.absorb(self)
+               c.absorb(other)
+               c = c.to_dfa
+               c.accept.clear
+               for s in c.retrotags[ta] do
+                       if not c.tags[s].has(tb) then
+                               c.accept.add(s)
+                       end
+               end
+               c.clear_tag(ta)
+               c.clear_tag(tb)
+               return c
+       end
+
        # `self` absorbs all states, transisions, tags, and acceptations of `other`
        # An epsilon transition is added between `self.start` and `other.start`
        fun absorb(other: Automaton)
@@ -307,10 +332,49 @@ class Automaton
                accept.add(st)
        end
 
+       # Remove states (and transitions) that does not reach an accept state
+       fun trim
+       do
+               # Good states are those we want to keep
+               var goods = new HashSet[State]
+               goods.add_all(accept)
+
+               var todo = accept.to_a
+
+               # Propagate goodness
+               while not todo.is_empty do
+                       var s = todo.pop
+                       for t in s.ins do
+                               var s2 = t.from
+                               if goods.has(s2) then continue
+                               goods.add(s2)
+                               todo.add(s2)
+                       end
+               end
+
+               # What are the bad state then?
+               var bads = new Array[State]
+               for s in states do
+                       if not goods.has(s) then bads.add(s)
+               end
+
+               # Remove their transitions
+               for s in bads do
+                       for t in s.ins do t.delete
+                       for t in s.outs do t.delete
+               end
+
+               # Keep only the good stuff
+               states.clear
+               states.add_all(goods)
+       end
+
        # Generate a minimal DFA
        # REQUIRE: self is a DFA
        fun to_minimal_dfa: Automaton
        do
+               trim
+
                var distincts = new HashMap[State, Set[State]]
                for s in states do
                        distincts[s] = new HashSet[State]
@@ -372,11 +436,18 @@ class Automaton
        # Produce a graphvis file for the automaton
        fun to_dot(filepath: String)
        do
+               var names = new HashMap[State, String]
+               var ni = 0
+               for s in states do
+                       names[s] = ni.to_s
+                       ni += 1
+               end
+
                var f = new OFStream.open(filepath) 
                 f.write("digraph g \{\n")
 
                for s in states do
-                       f.write("s{s.object_id}[shape=oval")
+                       f.write("s{names[s]}[shape=oval")
                        #f.write("label=\"\",")
                        if accept.has(s) then
                                f.write(",color=blue")
@@ -414,10 +485,10 @@ class Automaton
                                                labe += c.to_s
                                        end
                                end
-                               f.write("s{s.object_id}->s{s2.object_id} [label=\"{labe.escape_to_c}\"];\n")
+                               f.write("s{names[s]}->s{names[s2]} [label=\"{labe.escape_to_c}\"];\n")
                        end
                end
-               f.write("empty->s{start.object_id}; empty[label=\"\",shape=none];\n")
+               f.write("empty->s{names[start]}; empty[label=\"\",shape=none];\n")
 
                 f.write("\}\n")
                f.close
@@ -427,6 +498,8 @@ class Automaton
        # note: the DFA is not miminized
        fun to_dfa: Automaton
        do
+               trim
+
                var dfa = new Automaton.empty
                var n2d = new ArrayMap[Set[State], State]
                var seen = new ArraySet[Set[State]] 
index e6851f0..48c6195 100644 (file)
@@ -34,7 +34,8 @@ class Gram
                        else
                                res.append("{p.name} =\n")
                        end
-                       var last = p.alts.last
+                       var last = null
+                       if not p.alts.is_empty then p.alts.last
                        for a in p.alts do
                                res.append("\t\{{a.name}:\} {a.elems.join(" ")}")
                                if a.codes == null then a.make_codes
@@ -60,6 +61,7 @@ class Gram
        do
                for p in self.prods do
                        for a in p.alts.to_a do
+                               if a.phony then continue
                                var to_inline = false
                                for e in a.elems do
                                        if e isa Production and prods.has(e) then to_inline = true
@@ -87,6 +89,7 @@ class Gram
                                        end
                                        pool2.clear
                                        for a2 in e.alts do
+                                               if a.phony then continue
                                                if a2.codes == null then a2.make_codes
                                                for x in pool do
                                                        var name = a.name + "_" + pool2.length.to_s
@@ -206,6 +209,7 @@ class Gram
                        for p in prods do
                                if p.is_nullable then continue
                                for a in p.alts do
+                                       if a.phony then continue
                                        var nullabl = true
                                        for e in a.elems do
                                                if e isa Token then
@@ -232,6 +236,7 @@ class Gram
                        for p in prods do
                                var fs = p.firsts
                                for a in p.alts do
+                                       if a.phony then continue
                                        var i = a.first_item
                                        loop
                                                var e = i.next
@@ -258,6 +263,7 @@ class Gram
                        var changed = false
                        for p1 in prods do
                                for a in p1.alts do
+                                       if a.phony then continue
                                        var p0: nullable Production = null
                                        var i = a.first_item
                                        loop
@@ -374,6 +380,7 @@ class Production
        do
                var res = new Array[Item]
                for a in alts do
+                       if a.phony then continue
                        res.add a.first_item
                end
                return res
@@ -422,6 +429,9 @@ class Alternative
        # Is the alternative transformed (ie not in the AST)
        var trans writable = false
 
+       # Is the alternative unparsable? (ie not in the automaton)
+       var phony writable = false
+
        # Imitialize codes with the elements
        fun make_codes
        do
@@ -614,7 +624,7 @@ redef class String
        # escape string used in labels for graphviz
        fun escape_to_dot: String
        do
-               return escape_more_to_c("|\{\}")
+               return escape_more_to_c("|\{\}<>")
        end
 end
 
index 32fc39a..c3208ae 100644 (file)
@@ -15,6 +15,9 @@ str = '\'' (ch-'\\'-'\''|'\\'ch)* '\'';
 // A char by decimal ascii
 ch_dec = '#' ('0'..'9')+ ;
 
+// A char by hexadecimal ascii
+ch_hex = '#' ('x'|'X') ('0'..'9'|'a'..'z'|'A'..'Z')+ ;
+
 // A single-line comment
 comment = '//' ch* '\n'?;
 
@@ -27,14 +30,14 @@ ccomment = '/*' not_star* ('*' (not_star_not_slash not_star*)?)* '*/';
 unknown_keyword = 'A'..'Z'('A'..'Z'|'a'..'z'|'0'..'9'|'_')*;
 
 // Igndored stufs
-blank = '\n' | '\t' | ' ' | comment | ccomment;
+blank = '\r' | '\n' | '\t' | ' ' | comment | ccomment;
 
 Parser
 
 Ignored blank;
 Rejected unknown_keyword;
 
-grammar = 'Grammar' id ';' lexer_part? parser_part?;
+grammar = 'Grammar' id ';' lexer_part? parser_part? tree_part?;
 
 lexer_part = 'Lexer' expr*;
 
@@ -65,11 +68,13 @@ re3 {-> re} =
        {par:} '(' re ')' |
        {class:} text '.' '.' text |
        {any:} 'Any' |
+       {end:} 'End' |
        {text:} text ;
 
 text {-> re} =
        {str:} str |
-       {ch_dec:} ch_dec ;
+       {ch_dec:} ch_dec |
+       {ch_hex:} ch_hex ;
 
 parser_part = 'Parser' ign? rej? prod*;
 
@@ -77,7 +82,7 @@ ign = 'Ignored' elem_list ';' ;
 
 rej = 'Rejected' elem_list ';' ;
 
-prod = id ptrans? '=' alts ';';
+prod = id ptrans? '=' alts priority* ';';
 
 ptrans = '{' '->' id '}';
 atrans = '{' '->' '}';
@@ -105,3 +110,10 @@ elem =
        {ques:} elem '?' |
        {plus:} elem '+' |
        {empty:} 'Empty' ;
+
+priority =
+       {left:} 'Left' alts |
+       {right:} 'Right' alts |
+       {unary:} 'Unary' alts ;
+
+tree_part = 'Tree' prod*;
index b428db2..65608d0 100644 (file)
@@ -54,10 +54,12 @@ var p_altid = new Production("altident")
 var p_elems = new Production("elems")
 var p_elem_list = new Production("elem_list")
 var p_elem = new Production("elem")
-g.prods.add_all([p_gr, p_re, p_re1, p_re2, p_re3, p_text, p_lex, p_exprs, p_expr, p_par, p_ign, p_rej, p_prods, p_prod, p_ptrans_o, p_alts, p_alt, p_altid_o, p_altid, p_elems, p_elem_list, p_elem])
+var p_pri = new Production("priority")
+g.prods.add_all([p_gr, p_re, p_re1, p_re2, p_re3, p_text, p_lex, p_exprs, p_expr, p_par, p_ign, p_rej, p_prods, p_prod, p_ptrans_o, p_alts, p_alt, p_altid_o, p_altid, p_elems, p_elem_list, p_elem, p_pri])
 g.prods.add(new Production("atrans"))
 g.prods.add(new Production("elemid"))
 g.prods.add(new Production("nelem"))
+g.prods.add(new Production("tree_part"))
 
 var t_opar = new Token("opar")
 var t_cpar = new Token("cpar")
@@ -78,11 +80,13 @@ var t_str = new Token("str")
 var t_id = new Token("id")
 var t_kw = new Token("kw")
 var t_any = new Token("any")
+var t_end = new Token("end")
 var t_and = new Token("and")
 var t_except = new Token("except")
 var t_shortest = new Token("shortest")
 var t_longest = new Token("longest")
 var t_ch_dec = new Token("ch_dec")
+var t_ch_hex = new Token("ch_hex")
 g.tokens.add_all([t_opar,
        t_cpar,
        t_ocur,
@@ -102,11 +106,13 @@ g.tokens.add_all([t_opar,
        t_id,
        t_kw,
        t_any,
+       t_end,
        t_and,
        t_except,
        t_shortest,
        t_longest,
-       t_ch_dec])
+       t_ch_dec,
+       t_ch_hex])
 
 p_gr.new_alt("gr", t_kw, t_id, t_semi, p_lex, p_par)
 
@@ -136,11 +142,13 @@ p_re3.new_alt("re_longest", t_longest, t_opar, p_re, t_cpar)
 p_re3.new_alt("re_par", t_opar, p_re, t_cpar)
 p_re3.new_alt("re_class", p_text, t_dot, t_dot, p_text)
 p_re3.new_alt("re_any", t_any)
+p_re3.new_alt("re_end", t_end)
 p_re3.new_alt("re_id", t_id)
 p_re3.new_alt("re_text", p_text)
 
 p_text.new_alt("re_str", t_str)
 p_text.new_alt("re_ch_dec", t_ch_dec)
+p_text.new_alt("re_ch_hex", t_ch_hex)
 
 p_par.new_alt("par", t_kw, p_ign, p_rej, p_prods)
 
@@ -179,6 +187,10 @@ p_elem.new_alt("elem_star", p_elem, t_star)
 p_elem.new_alt("elem_ques", p_elem, t_ques)
 p_elem.new_alt("elem_plus", p_elem, t_plus)
 
+p_pri.new_alt0("priority_left").phony = true
+p_pri.new_alt0("priority_right").phony = true
+p_pri.new_alt0("priority_unary").phony = true
+
 var a = g.lr0
 
 print "LR automaton: {a.states.length} states (see nitcc0.lr.dot)"
index b723c1a..73baa05 100644 (file)
@@ -41,6 +41,12 @@ class CollectNameVisitor
        # Read the result of the visit here
        var nfa = new Automaton.empty
 
+       # The current production, used to initialize priorities
+       var prod: nullable Production = null
+
+       # The current priority counter to name tranformed productions
+       var pricpt: Int = 0
+
        # Run the semantic analysis of the grammar
        fun start(n: Node)
        do
@@ -102,6 +108,10 @@ private class CheckNameVisitor
        # Is the alternative transformed, for the alternative
        var trans = false
 
+       # The current priority class
+       # Used the check, and tranform the grammar
+       var pri: nullable Npriority = null
+
        # Known ignored tokens
        var ignoreds = new Array[Element]
 
@@ -288,9 +298,15 @@ redef class Nrej
 end
 
 redef class Nprod
-       # The associated production
+       # The associated main production
+       # ie the last priority class
        var prod: nullable Production
 
+       # The associated most-priority production
+       # ie the first priority class
+       # If there is no priority then `sub_prod == prod`
+       var sub_prod: nullable Production
+
        redef fun accept_collect_prod(v) do
                var id = children.first.as(Nid)
                var name = id.text
@@ -300,11 +316,33 @@ redef class Nprod
                end
                v.names[name] = self
                v.nprods.add(self)
-               prod = new Production(name)
-               v.gram.prods.add(prod.as(not null))
+               var prod = new Production(name)
+               self.prod = prod
+               v.gram.prods.add(prod)
+
+               # Check priority block
+               var pris = children[4]
+               if pris isa Nodes[Npriority] then
+                       var lastpri = pris.children.last
+                       lastpri.is_last = true
+
+                       v.pricpt = pris.children.length
+
+                       # Create a new production for the first priority class
+                       # The main production will be used for the last priority class
+                       var spe = prod
+                       prod = new Production(name + "$0")
+                       prod.spe = spe
+                       v.gram.prods.add(prod)
+               end
+               self.sub_prod = prod
+
+               v.prod = prod
+               super
+               v.prod = null
        end
        redef fun accept_check_name_visitor(v) do
-               v.prod = prod
+               v.prod = sub_prod
                super
                v.prod = null
        end
@@ -337,6 +375,92 @@ redef class Natrans
        end
 end
 
+redef class Npriority
+       var is_last = false
+
+       # The associated production
+       var prod: nullable Production
+
+       # The production in the with the next less priority class
+       # null is there is no priority or if the first priority class
+       var next: nullable Production
+
+       redef fun accept_collect_prod(v) do
+               var old = v.prod
+               assert old != null
+               var spe = old.spe
+               assert spe != null
+               if is_last then
+                       prod = spe
+               else
+                       v.pricpt -= 1
+                       prod = new Production(spe.name + "${v.pricpt}")
+                       prod.spe = spe
+                       v.gram.prods.add(prod.as(not null))
+               end
+               next = old
+               v.prod = prod
+               super
+
+       end
+       redef fun accept_check_name_visitor(v) do
+               var old = v.prod
+               v.prod = prod
+               v.pri = self
+               super
+
+               # Inject a new alternative that goes to the next less prioty class
+               var alt = prod.new_alt2(prod.name + "_" + prod.alts.length.to_s, [next.as(not null)])
+               alt.trans = true
+               alt.codes = [new CodePop]
+
+               v.pri = null
+               v.prod = old
+       end
+
+       # Check and transform `v.elems` for priority
+       private fun check_priority(v: CheckNameVisitor) is abstract
+end
+
+redef class Npriority_left
+       redef fun check_priority(v) do
+               var p = prod.spe or else prod
+               assert p != null
+               if v.elems.length < 2 or v.elems.first != p or v.elems.last != p then
+                       print("Error: in a Left priority class, left and right must be the production")
+                       exit(1)
+               end
+               v.elems.first = prod.as(not null)
+               v.elems.last = next.as(not null)
+       end
+end
+
+redef class Npriority_right
+       redef fun check_priority(v) do
+               var p = prod.spe or else prod
+               assert p != null
+               if v.elems.length < 2 or v.elems.first != p or v.elems.last != p then
+                       print("Error: in a Right priority class, left and right must be the production")
+                       exit(1)
+               end
+               v.elems.first = next.as(not null)
+               v.elems.last = prod.as(not null)
+       end
+end
+
+redef class Npriority_unary
+       redef fun check_priority(v) do
+               var p = prod.spe or else prod
+               assert p != null
+               if v.elems.length < 2 or (v.elems.first != p and v.elems.last != p) then
+                       print("Error: in a Unary priority class, left or right must be the production")
+                       exit(1)
+               end
+               if v.elems.first == p then v.elems.first = prod.as(not null)
+               if v.elems.last == p then v.elems.last = prod.as(not null)
+       end
+end
+
 redef class Alternative
        var short_name: nullable String
 end
@@ -351,7 +475,12 @@ redef class Nalt
                v.trans = false
                v.elems = new Array[Element]
                v.elems_names = new Array[nullable String]
+
                super
+
+               var pri = v.pri
+               if pri != null then pri.check_priority(v)
+
                var prod = v.prod.as(not null)
                var prodabs = prod.spe
                if prodabs == null then prodabs = prod
@@ -359,7 +488,7 @@ redef class Nalt
                if name == null then
                        if v.trans then
                                name = prod.name + "_" + prod.alts.length.to_s
-                       else if prod.spe == null and prod.alts.is_empty then
+                       else if prod.spe == null and prod.alts.is_empty and pri == null then
                                name = prod.name
                                prod.altone = true
                        else
@@ -376,6 +505,7 @@ redef class Nalt
                        end
                        name = prodabs.name + "_" + name
                end
+
                var alt = prod.new_alt2(name, v.elems)
                alt.short_name = v.altname
                alt.elems_names.add_all(v.elems_names)
@@ -569,3 +699,14 @@ redef class Nelem_plus
                set_elem(v, null, elem)
        end
 end
+
+redef class Ntree_part
+       redef fun accept_collect_prod(v) do
+               print "NOT YET IMPLEMENTED: `Tree` part; it is ignored"
+               # SKIP by doing nothing
+       end
+
+       redef fun accept_check_name_visitor(v) do
+               # SKIP by doing nothing
+       end
+end
index d381fe1..6bca660 100644 (file)
@@ -55,6 +55,15 @@ redef class Nch_dec
        end
 end
 
+redef class Nch_hex
+       redef fun value: String do return text.substring_from(2).to_hex.ascii.to_s
+       redef fun make_rfa: Automaton
+       do
+               var a = new Automaton.atom(self.value.chars.first.ascii)
+               return a
+       end
+end
+
 redef class NProd
        redef fun make_rfa: Automaton
        do
@@ -80,8 +89,17 @@ redef class Nre_minus
                var b = children[2].make_rfa.to_dfa
                for t in b.start.outs do
                        if not t.to.outs.is_empty then
-                               print "Not Yet Implemented Error: '-' only works on single char"
-                               exit(1)
+                               # `b` is not a single char, so just use except
+                               # "a - b == a Except (Any* b Any*)"
+                               var any1 = new Automaton.cla(0, null)
+                               any1.close
+                               var any2 = new Automaton.cla(0, null)
+                               any2.close
+                               var b2 = any1
+                               b2.concat(b)
+                               b2.concat(any2)
+                               var c = a.except(b2)
+                               return c
                        end
                        a.minus_sym(t.symbol.as(not null))
                end
@@ -89,6 +107,14 @@ redef class Nre_minus
        end
 end
 
+redef class Nre_end
+       redef fun make_rfa
+       do
+               print "{children.first.position.to_s}: NOT YET IMPLEMENTED: token `End`; replaced with an empty string"
+               return new Automaton.epsilon
+       end
+end
+
 redef class Nre_and
        redef fun make_rfa
        do
@@ -119,25 +145,8 @@ redef class Nre_except
        redef fun make_rfa
        do
                var a = children[0].make_rfa
-               var ta = new Token("1")
-               a.tag_accept(ta)
                var b = children[2].make_rfa
-               var tb = new Token("2")
-               b.tag_accept(tb)
-
-               var c = new Automaton.empty
-               c.absorb(a)
-               c.absorb(b)
-               c = c.to_dfa
-               c.accept.clear
-               for s in c.retrotags[ta] do
-                       if not c.tags[s].has(tb) then
-                               c.accept.add(s)
-                       end
-               end
-               c.clear_tag(ta)
-               c.clear_tag(tb)
-               return c
+               return a.except(b)
        end
 end
 
diff --git a/contrib/nitcc/tests/lexer-chars.input1 b/contrib/nitcc/tests/lexer-chars.input1
new file mode 100644 (file)
index 0000000..7898192
--- /dev/null
@@ -0,0 +1 @@
+a
diff --git a/contrib/nitcc/tests/lexer-chars.input2 b/contrib/nitcc/tests/lexer-chars.input2
new file mode 100644 (file)
index 0000000..2c88a88
--- /dev/null
@@ -0,0 +1 @@
+a.
diff --git a/contrib/nitcc/tests/lexer-chars.sablecc b/contrib/nitcc/tests/lexer-chars.sablecc
new file mode 100644 (file)
index 0000000..3568f34
--- /dev/null
@@ -0,0 +1,11 @@
+Grammar x;
+
+Lexer
+
+lf =
+       '\n' //alt1 #10 //alt2 #x0a //alt3 #x0A
+       ;
+
+Parser
+
+       x = 'a' lf;
diff --git a/contrib/nitcc/tests/lexer-end.input b/contrib/nitcc/tests/lexer-end.input
new file mode 100644 (file)
index 0000000..18954c7
--- /dev/null
@@ -0,0 +1 @@
+aabaa
\ No newline at end of file
diff --git a/contrib/nitcc/tests/lexer-end.sablecc b/contrib/nitcc/tests/lexer-end.sablecc
new file mode 100644 (file)
index 0000000..ec2454c
--- /dev/null
@@ -0,0 +1,11 @@
+Grammar x;
+
+Lexer
+
+       a = 'a' End | 'ab'; // this is buggy
+       c = 'a';
+
+Parser
+
+       p = q*;
+       q = a | c;
diff --git a/contrib/nitcc/tests/re.input1 b/contrib/nitcc/tests/re.input1
new file mode 100644 (file)
index 0000000..72943a1
--- /dev/null
@@ -0,0 +1 @@
+aaa
diff --git a/contrib/nitcc/tests/re.input2 b/contrib/nitcc/tests/re.input2
new file mode 100644 (file)
index 0000000..f96c4cb
--- /dev/null
@@ -0,0 +1,2 @@
+(a(aa)) |
+((aa)a)
diff --git a/contrib/nitcc/tests/re.input3 b/contrib/nitcc/tests/re.input3
new file mode 100644 (file)
index 0000000..9134cec
--- /dev/null
@@ -0,0 +1,2 @@
+aa* |
+(aa)*
diff --git a/contrib/nitcc/tests/re.input4 b/contrib/nitcc/tests/re.input4
new file mode 100644 (file)
index 0000000..493fd8d
--- /dev/null
@@ -0,0 +1,2 @@
+aa|aa|
+a(a|a)a
diff --git a/contrib/nitcc/tests/re.sablecc b/contrib/nitcc/tests/re.sablecc
new file mode 100644 (file)
index 0000000..b79bb78
--- /dev/null
@@ -0,0 +1,16 @@
+Grammar x;
+Lexer
+blank = #10 | #13 | #32;
+Parser
+Ignored blank;
+re =
+       'a' |
+       '(' re ')'
+Unary
+       re '+' |
+       re '*' |
+       re '?'
+Left
+       re re
+Left
+       re '|' re ;
index 037ddd5..8b96f3e 100644 (file)
@@ -1 +1 @@
-11:15-11:16 Syntax Error: Unexpected '('; is acceptable instead: ';', '|'
+11:15-11:16 Syntax Error: Unexpected '('; is acceptable instead: priority+, priority
index 1a15e3c..db1e0bb 100644 (file)
@@ -1 +1 @@
-20:8-20:9 Syntax Error: Unexpected '('; is acceptable instead: ';', '|'
+20:8-20:9 Syntax Error: Unexpected '('; is acceptable instead: priority+, priority
index 1ee47be..69ed902 100644 (file)
@@ -1 +1 @@
-8:18-8:19 Syntax Error: Unexpected '('; is acceptable instead: ';', '|'
+8:18-8:19 Syntax Error: Unexpected '('; is acceptable instead: priority+, priority
index b835c24..6518794 100644 (file)
@@ -1 +1 @@
-Not Yet Implemented Error: '-' only works on single char
+Error: Conflicting tokens: com1 com2
diff --git a/contrib/nitcc/tests/sav/lexer-chars.alt1.input1.res b/contrib/nitcc/tests/sav/lexer-chars.alt1.input1.res
new file mode 100644 (file)
index 0000000..aaa6f2b
--- /dev/null
@@ -0,0 +1,5 @@
+Start
+  x
+    'a'@(1:1-1:2)
+    lf@(1:2-2:1)='\n'
+  Eof@(2:1-2:1)=''
diff --git a/contrib/nitcc/tests/sav/lexer-chars.alt1.input2.res b/contrib/nitcc/tests/sav/lexer-chars.alt1.input2.res
new file mode 100644 (file)
index 0000000..7360813
--- /dev/null
@@ -0,0 +1,4 @@
+NLexerError@(1:2-1:2)='.'
+Nodes[Node]
+  'a'@(1:1-1:2)
+  NLexerError@(1:2-1:2)='.'
diff --git a/contrib/nitcc/tests/sav/lexer-chars.alt2.input1.res b/contrib/nitcc/tests/sav/lexer-chars.alt2.input1.res
new file mode 100644 (file)
index 0000000..aaa6f2b
--- /dev/null
@@ -0,0 +1,5 @@
+Start
+  x
+    'a'@(1:1-1:2)
+    lf@(1:2-2:1)='\n'
+  Eof@(2:1-2:1)=''
diff --git a/contrib/nitcc/tests/sav/lexer-chars.alt2.input2.res b/contrib/nitcc/tests/sav/lexer-chars.alt2.input2.res
new file mode 100644 (file)
index 0000000..7360813
--- /dev/null
@@ -0,0 +1,4 @@
+NLexerError@(1:2-1:2)='.'
+Nodes[Node]
+  'a'@(1:1-1:2)
+  NLexerError@(1:2-1:2)='.'
diff --git a/contrib/nitcc/tests/sav/lexer-chars.alt3.input1.res b/contrib/nitcc/tests/sav/lexer-chars.alt3.input1.res
new file mode 100644 (file)
index 0000000..aaa6f2b
--- /dev/null
@@ -0,0 +1,5 @@
+Start
+  x
+    'a'@(1:1-1:2)
+    lf@(1:2-2:1)='\n'
+  Eof@(2:1-2:1)=''
diff --git a/contrib/nitcc/tests/sav/lexer-chars.alt3.input2.res b/contrib/nitcc/tests/sav/lexer-chars.alt3.input2.res
new file mode 100644 (file)
index 0000000..7360813
--- /dev/null
@@ -0,0 +1,4 @@
+NLexerError@(1:2-1:2)='.'
+Nodes[Node]
+  'a'@(1:1-1:2)
+  NLexerError@(1:2-1:2)='.'
diff --git a/contrib/nitcc/tests/sav/lexer-chars.input1.res b/contrib/nitcc/tests/sav/lexer-chars.input1.res
new file mode 100644 (file)
index 0000000..aaa6f2b
--- /dev/null
@@ -0,0 +1,5 @@
+Start
+  x
+    'a'@(1:1-1:2)
+    lf@(1:2-2:1)='\n'
+  Eof@(2:1-2:1)=''
diff --git a/contrib/nitcc/tests/sav/lexer-chars.input2.res b/contrib/nitcc/tests/sav/lexer-chars.input2.res
new file mode 100644 (file)
index 0000000..7360813
--- /dev/null
@@ -0,0 +1,4 @@
+NLexerError@(1:2-1:2)='.'
+Nodes[Node]
+  'a'@(1:1-1:2)
+  NLexerError@(1:2-1:2)='.'
diff --git a/contrib/nitcc/tests/sav/lexer-end.input.res b/contrib/nitcc/tests/sav/lexer-end.input.res
new file mode 100644 (file)
index 0000000..eb66f44
--- /dev/null
@@ -0,0 +1,12 @@
+Start
+  p
+    Nodes[Nq]
+      q_1
+        c@(1:1-1:2)='a'
+      q_0
+        a@(1:2-1:4)='ab'
+      q_1
+        c@(1:4-1:5)='a'
+      q_1
+        c@(1:5-1:6)='a'
+  Eof@(1:6-1:6)=''
diff --git a/contrib/nitcc/tests/sav/re.input1.res b/contrib/nitcc/tests/sav/re.input1.res
new file mode 100644 (file)
index 0000000..2735f59
--- /dev/null
@@ -0,0 +1,10 @@
+Start
+  re$1_0
+    re$1_0
+      re$0_0
+        'a'@(1:1-1:2)
+      re$0_0
+        'a'@(1:2-1:3)
+    re$0_0
+      'a'@(1:3-1:4)
+  Eof@(2:1-2:1)=''
diff --git a/contrib/nitcc/tests/sav/re.input2.res b/contrib/nitcc/tests/sav/re.input2.res
new file mode 100644 (file)
index 0000000..ad6b977
--- /dev/null
@@ -0,0 +1,32 @@
+Start
+  re_0
+    re$0_1
+      '('@(1:1-1:2)
+      re$1_0
+        re$0_0
+          'a'@(1:2-1:3)
+        re$0_1
+          '('@(1:3-1:4)
+          re$1_0
+            re$0_0
+              'a'@(1:4-1:5)
+            re$0_0
+              'a'@(1:5-1:6)
+          ')'@(1:6-1:7)
+      ')'@(1:7-1:8)
+    '|'@(1:9-1:10)
+    re$0_1
+      '('@(2:1-2:2)
+      re$1_0
+        re$0_1
+          '('@(2:2-2:3)
+          re$1_0
+            re$0_0
+              'a'@(2:3-2:4)
+            re$0_0
+              'a'@(2:4-2:5)
+          ')'@(2:5-2:6)
+        re$0_0
+          'a'@(2:6-2:7)
+      ')'@(2:7-2:8)
+  Eof@(3:1-3:1)=''
diff --git a/contrib/nitcc/tests/sav/re.input3.res b/contrib/nitcc/tests/sav/re.input3.res
new file mode 100644 (file)
index 0000000..83ed010
--- /dev/null
@@ -0,0 +1,21 @@
+Start
+  re_0
+    re$1_0
+      re$0_0
+        'a'@(1:1-1:2)
+      re$2_1
+        re$0_0
+          'a'@(1:2-1:3)
+        '*'@(1:3-1:4)
+    '|'@(1:5-1:6)
+    re$2_1
+      re$0_1
+        '('@(2:1-2:2)
+        re$1_0
+          re$0_0
+            'a'@(2:2-2:3)
+          re$0_0
+            'a'@(2:3-2:4)
+        ')'@(2:4-2:5)
+      '*'@(2:5-2:6)
+  Eof@(3:1-3:1)=''
diff --git a/contrib/nitcc/tests/sav/re.input4.res b/contrib/nitcc/tests/sav/re.input4.res
new file mode 100644 (file)
index 0000000..4c1c369
--- /dev/null
@@ -0,0 +1,31 @@
+Start
+  re_0
+    re_0
+      re$1_0
+        re$0_0
+          'a'@(1:1-1:2)
+        re$0_0
+          'a'@(1:2-1:3)
+      '|'@(1:3-1:4)
+      re$1_0
+        re$0_0
+          'a'@(1:4-1:5)
+        re$0_0
+          'a'@(1:5-1:6)
+    '|'@(1:6-1:7)
+    re$1_0
+      re$1_0
+        re$0_0
+          'a'@(2:1-2:2)
+        re$0_1
+          '('@(2:2-2:3)
+          re_0
+            re$0_0
+              'a'@(2:3-2:4)
+            '|'@(2:4-2:5)
+            re$0_0
+              'a'@(2:5-2:6)
+          ')'@(2:6-2:7)
+      re$0_0
+        'a'@(2:7-2:8)
+  Eof@(3:1-3:1)=''
index 6b4c50a..0e23e6a 100644 (file)
@@ -1,8 +1,6 @@
 This directory contains various documentation for Nit
 
 * advanced_options [TXT]: documentation for advanced options of the compiler and run-time execution.
-* developpez [LaTeX/PDF]: a French documentation "Développez en Nit". 
-* nitreference [LaTeX/PDF]: the Nit language reference.
 * stdlib [HTML]: Autodocumentation for the Nit standard library.
 
-
+For more documentation, visit http://nitlanguage.org/doc/
diff --git a/doc/developpez/doc_nit.cls b/doc/developpez/doc_nit.cls
deleted file mode 100644 (file)
index 104525b..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{doc_nit}[2011/01/17 1.0 Format LaTeX pour doc NIT.]
-\LoadClass{report}
-
-% Chargement des extensions
-\usepackage{color} % Gestion des couleurs
-\usepackage{listings} % Gestion du code
-\usepackage{multicol} % Gestion multi-colonne
-\usepackage[pdfborder={0 0 0}, colorlinks=true]{hyperref} % Liens hyper texte
-\usepackage{tabularx} % Tableaux améliorés
-\usepackage[latin1]{inputenc} % Prise en compte de l'UTF-8
-\usepackage[T1]{fontenc}
-\usepackage[francais]{babel} %Traduction en français des éléments chapitres, sections...
-%\usepackage[autolanguage]{numprint}
-\usepackage{graphicx}
-%\usepackage{textcomp}
-%\usepackage[french]{varioref}
-\usepackage{url}
-%\usepackage{moreverb}
-
-% Définition des couleurs
-\definecolor{code_background}{RGB}{239, 255, 188}
-\definecolor{code_border}{RGB}{122, 193, 39}
-
-% Marges
-\setlength{\oddsidemargin}{0cm}      % 4cm left margin
-\setlength{\evensidemargin}{0cm}
-\setlength{\topmargin}{0cm}           % 4cm top margin
-\setlength{\textwidth}{16cm}          % 6.0in text - 1.25in rt margin
-\setlength{\textheight}{21cm} % Body ht for 1in margins 
-
-% Mise forme des paragraphes
-\setlength{\parindent}{0.0in}
-\setlength{\parskip}{0.1in}
-
-% Mise en forme des chapitres
-
-% Mise en forme des listings
-\lstdefinelanguage{Nit}
-{morekeywords={package,import, class,abstract,interface,universal,special,end,fun,type,init,redef,is,do,
-      readable,writable,var,intern,extern,protected,private,intrude,if,then,else,while,loop,for,in,and,or,not,
-      return,continue,break,abort,assert,new,isa,once,super,self,true,false,null,as,nullable,isset,label,print},
-  sensitive=true,
-  morecomment=[l]\#,
-  morestring=[b]",
-  morestring=[b]',
-  basicstyle=\small,
-}
-\lstset{language=Nit,
-  numbers=left,
-  numberstyle=\tiny,    %font size
-  stepnumber=1,
-  numbersep=15pt,
-  backgroundcolor=\color{code_background},
-  rulecolor=\color{code_border},
-  frame=leftline,
-  framerule=3pt,  
-  framexleftmargin=-5pt,
-  xleftmargin=25pt,
-  framesep=15pt,
-  showspaces=false,
-  showstringspaces=false, 
-  showtabs=false,
-  tabsize=2,                % sets default tabsize to 2 spaces
-  breaklines=true,          % sets automatic line breaking
-  breakatwhitespace=false   % sets if automatic breaks should only happen at whitespace
-}
-
-% Macro de lstinline
-\lstMakeShortInline[language=Nit]|
-
-% Environnement Warning TODO
-\newenvironment{warn}
-{\setlength{\parindent}{0.0in}}
-{}
-
diff --git a/doc/developpez/licence.tex b/doc/developpez/licence.tex
deleted file mode 100644 (file)
index 4e64fe6..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-\chapter*{Annexe A : GNU Free Documentation Licence}
-
-Version 1.1, March 2000
-
-Copyright (C) 2000 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-0. PREAMBLE
-The purpose of this License is to make a manual, textbook, or other written document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.
-
-This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. 
-
-We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.
-
-1. APPLICABILITY AND DEFINITIONS
-This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you".
-
-A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.
-
-A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.
-
-The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License.
-
-The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License.
-
-A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not "Transparent" is called "Opaque".
-
-Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only.
-
-The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text.
-
-2. VERBATIM COPYING
-You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section COPYIN IN QUANTITY.
-
-You may also lend copies, under the same conditions stated above, and you may publicly display copies.
-
-3. COPYING IN QUANTITY
-If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.
-
-If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as it reasonably) on the actual cover, and continue the rest onto adjacent pages. 
-
-If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.
-
-It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.
-
-4. MODIFICATIONS
-You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:
-
-A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
-
-B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five).
-
-C. State on the Title page the name of the publisher of the Modified Version, as the publisher.
-
-D. Preserve all the copyright notices of the Document.
-
-E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
-
-F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
-
-G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice.
-
-H. Include an unaltered copy of this License.
-
-I. Preserve the section entitled "History", and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
-
-J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
-
-K. In any section entitled "Acknowledgements" or "Dedications", preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
-
-L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
-
-M. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version.
-
-N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section.
-
-If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles.
-
-You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative définition of a standard.
-
-You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.
-
-The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.
-
-5. COMBINING DOCUMENTS
-You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice.
-
-The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.
-
-In the combination, you must combine any sections entitled "History" in the various original documents, forming one section entitled "History"; likewise combine any sections entitled "Acknowledgements", and any sections entitled "Dedications". You must delete all sections entitled "Endorsements."
-
-6. COLLECTIONS OF DOCUMENTS
-You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.
-
-You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.
-
-7. AGGREGATION WITH INDEPENDENT WORKS
-A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an "aggregate", and this License does not apply to the other self-contained works thus compiled with the Document, on account of their being thus compiled, if they are not themselves derivative works of the Document.
-
-If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate.
-
-8. TRANSLATION
-Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail.
-
-10. TERMINATION
-You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
-
-11. FUTURE REVISIONS OF THIS LICENSE
-The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.
-
-Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation.
\ No newline at end of file
diff --git a/doc/developpez/modules/listings/array1_c.nit b/doc/developpez/modules/listings/array1_c.nit
deleted file mode 100644 (file)
index 9eb67d6..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-var array = new Array[String]
-
-array.enlarge(100) # Agrandie le tableau avant un ajout massif
-
-var i = 0
-while i < 100 do
-       array[i] = "toto"
-       i+=1
-end
diff --git a/doc/developpez/modules/listings/array2_c.nit b/doc/developpez/modules/listings/array2_c.nit
deleted file mode 100644 (file)
index f962720..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var array = new Array[String].with_capacity(100)
diff --git a/doc/developpez/modules/listings/cos1_c.nit b/doc/developpez/modules/listings/cos1_c.nit
deleted file mode 100644 (file)
index 0ddfa37..0000000
+++ /dev/null
@@ -1 +0,0 @@
-print "Cos de 1 radian : " + 1.0.cos.to_s #0.540302
diff --git a/doc/developpez/modules/listings/exp1_c.nit b/doc/developpez/modules/listings/exp1_c.nit
deleted file mode 100644 (file)
index efceed0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-print "5 au cube : " + 5.0.pow(3.0).to_s #125.0
-print "Racine carrée de 25 : " + 25.0.sqrt.to_s #5.0
-print "Exponentielle de 5 : " + 5.0.exp.to_s #148.413162
diff --git a/doc/developpez/modules/listings/hashmap1_c.nit b/doc/developpez/modules/listings/hashmap1_c.nit
deleted file mode 100644 (file)
index 62bafcf..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# On enregistre les notes des étudiants dans une HashMap
-var notes = new HashMap[String, Int] #(String : Code Etudiant, Int : Note)
-
-notes["ATE1234"] = 12
-notes["BRE2345"] = 13
-notes["RUY3456"] = 9
-notes["FIO4567"] = 10
-notes["XUH5678"] = 16
-notes["COP6789"] = 6
-
-# Affiche une note
-print "Note de l'étudiant BRE2345 : {notes["BRE2345"]}"
-
-# Calcule la moyenne
-var somme = 0
-
-for note in notes do
-       somme += note   
-end
-
-var moyenne = somme / notes.length
-
-print "Moyenne de la classe : {moyenne}"
diff --git a/doc/developpez/modules/listings/iterator1_s.nit b/doc/developpez/modules/listings/iterator1_s.nit
deleted file mode 100644 (file)
index e4caa4b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-var iterator = collection.iterator
-
-while iterator.is_ok do
-       print iterator.item
-       iterator.next
-end
diff --git a/doc/developpez/modules/listings/list1_c.nit b/doc/developpez/modules/listings/list1_c.nit
deleted file mode 100644 (file)
index 2596c9d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-var list = new List[Int] #Instancie une nouvelle liste
-list.push(1) #Ajoute l'élément à la fin de la liste
-list.push(2) #Ajoute l'élément à la fin de la liste
-list.push(3) #Ajoute l'élément à la fin de la liste
-
-print list.is_empty #false : la liste n'est pas vide
-
-print list[1] #2 : Affiche l'élément à l'index 2 (sans le retirer)
-
-print list.pop #3 : Retourne le dernier élément et le retire de la liste
-print list.pop #2 : Retourne le dernier élément et le retire de la liste
-print list.pop #1 : Retourne le dernier élément et le retire de la liste
-
-print list.is_empty #true : la liste est vide
diff --git a/doc/developpez/modules/listings/pi1_c.nit b/doc/developpez/modules/listings/pi1_c.nit
deleted file mode 100644 (file)
index 1dd0e1b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-print pi
diff --git a/doc/developpez/modules/listings/set1_c.nit b/doc/developpez/modules/listings/set1_c.nit
deleted file mode 100644 (file)
index 359717d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-var set = new ArraySet[String]
-var a = "Coucou"
-var b = "Coucou"
-
-set.add(a)
-print set.has(b) # true : le set contient déjà la chaîne "Coucou"
diff --git a/doc/developpez/modules/listings/sorter1_c.nit b/doc/developpez/modules/listings/sorter1_c.nit
deleted file mode 100644 (file)
index 30a6c11..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-var tab = ["a", "c", "b"] # Un tableau non trié
-
-print tab # acb
-
-var sorter = new ComparableSorter[String] # On instancie le sorter ComparableSorter en précisant le type que l'on veut trier, ici des String
-
-sorter.sort(tab) # On trie le tableau
-
-print tab # abc
diff --git a/doc/developpez/modules/modules.tex b/doc/developpez/modules/modules.tex
deleted file mode 100644 (file)
index d08ad2a..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-\part{Modules de la bibliothèque standard Nit}
-
-\chapter{Kernel}
-Le module |kernel| est à la base de toute la hiérarchie objet de Nit, c'est donc un module de base. Par exemple, il contient les classes fondamentales telles que |Bool|, |Char|, |Float|, |Int|, |Object|...
-
-Faisons un tour rapide des classes principales du module |kernel| :
-\begin{description}
-    \item[Object]C'est la super classe implicite de toutes les classes en Nit : toutes ces méthodes sont donc héritées par toutes les classes.
-    \item[Bool]Représente les booléens. Les seules instances possibles de cette classe sont |true| et |false|. Les booléens sont souvent utilisés dans les branchements conditionnels et les boucles.
-    \item[Char]Représente les caractères.
-    \item[Comparable]C'est l'ancêtre de toutes les classes dont les instances peuvent être comparées selon un ordre total.
-    \item[Discrete]L'ancêtre de toutes les classes représentant des ensembles dénombrables comme les entiers ou l'alphabet.
-    \item[Float]Représente les nombres à virgule flottante.
-    \item[Int]Représente les nombres entiers.
-\end{description}
-
-Les classes du module |kernel| sont fréquemment raffinées dans les autres modules de la bibliothèque standard.
-
-\chapter{String}
-Ce module introduit les classes permettant de manipuler les chaînes de caractères.
-
-La classe principale du module string est |String|.
-
-Le module string raffine les classes |Array|, |Collection|, |Float|, |Int|, |Map| et |Object| pour y rajouter la méthode |to_s|.
-
-\chapter{Maths}
-Le module math raffine les classes Object, Int et Float pour y rajouter une série de méthodes en rapport avec les mathématiques. Elle est automatiquement importée avec la bibliothèque standard.
-
-\section{Variables mathématiques}
-Le module math raffine la classes Object pour lui rajouter la méthode |pi| (3.141592) :
-\lstinputlisting[language=Nit]{./modules/listings/pi1_c.nit}
-
-\section{Fonctions trigonométriques}
-Les méthodes sin(), cos(), tan(), asin(), acos(), atan() permettent d'effectuer les opérations trigonométriques. Les angles doivent être exprimés en radians. Pour convertir des degrés en radian, il suffit de les multiplier par pi/180.
-
-Exemple :
-\lstinputlisting[language=Nit]{./modules/listings/cos1_c.nit}
-
-\section{Exponentielles et puissances}
-Les méthodes |pow|, |exp| et |sqrt| permettent de calculer des puissances, des exponentielles et des racines carrées.
-
-Exemple :
-\lstinputlisting[language=Nit]{./modules/listings/exp1_c.nit}
-
-\chapter{Collections}
-Les collections sont des objets qui permettent de gérer des ensembles d'objets. Ces ensembles de données peuvent être définis avec plusieurs caractéristiques : la possibilité de gérer des doublons, de gérer un ordre de tri, etc. Chaque objet contenu dans une collection est appelé un élément.
-
-Les collections sont basées sur le principe de la généricité que nous avons déjà abordé.
-
-\section{Interfaces des collections}
-\subsection{Interface Collection}
-Cette interface définit des méthodes pour des objets qui gèrent des éléments d'une façon assez générale. Elle est la super interface de plusieurs interfaces de la bibliothèque standard. Plusieurs classes qui gèrent une collection implémentent une interface qui hérite de l'interface Collection.
-
-Cette interface définit plusieurs méthodes :
-
-\begin{tabularx}{\linewidth}{|c|X|}
-    \hline
-    Méthode & Rôle \\
-    \hline
-    count(E):Int & Nombre d'occurrence d'un élément dans une collection. \\
-    \hline
-    has(E):Bool & Vérifie si un élément se trouve dans la collection. \\
-    \hline
-    has\_only(E):Bool & Vérifie si la collection contient seulement l'élément précisé. \\
-    \hline   
-    is\_empty:Bool & Vérifie si la collection est vide. \\
-    \hline
-    iterate & Itère sur chaque élément de la collection. \\
-    \hline
-    iterator:Iterator[E] & Retourne un itérateur associé à la collection. \\
-    \hline
-    length & Retourne le nombre d'élément contenu dans la collection. \\
-    \hline
-\end{tabularx}
-
-Cette interface représente un minimum commun pour les objets qui gèrent des collections.
-
-\subsection{Interface Iterator}
-Cette interface définit des méthodes pour des objets capables de parcourir les données d'une collection :
-
-\begin{tabularx}{\linewidth}{|c|X|}
-    \hline
-    Méthode & Rôle \\
-    \hline
-    is\_ok & Indique s'il reste au moins un élément à parcourir dans la collection. \\
-    \hline
-    item & Renvoie l'élément courant de la collection.  \\
-    \hline
-    next & Saute au prochain élément de la collection. \\
-    \hline
-\end{tabularx}
-
-Un exemple d'utilisation de l'iterator :
-\lstinputlisting[language=Nit]{./modules/listings/iterator1_s.nit}
-
-\subsection{Interface RemovableCollection}
-Cette interface introduit des méthodes permettant de retirer des éléments d'une collection :
-
-\begin{tabularx}{\linewidth}{|c|X|}
-    \hline
-    Méthode & Rôle \\
-    \hline
-    clear & Retire tous les éléments de la collection. \\
-    \hline
-    remove(E) & Retire l'élément précisé de la collection.  \\
-    \hline
-    remove\_all(E) & Retire toutes les occurrences de l'élément précisé de la collection. \\
-    \hline
-\end{tabularx}
-
-\subsection{Interface SimpleCollection}
-Cette interface introduit des méthodes permettant d'ajouter des éléments dans une collection :
-
-\begin{tabularx}{\linewidth}{|c|X|}
-    \hline
-    Méthode & Rôle \\
-    \hline
-    add(E) & Ajoute l'élément dans la collection. \\
-    \hline
-    add\_all(Collection[E]) & Ajoute tous les éléments dans la collection. \\
-    \hline
-\end{tabularx}
-
-\section{Séquences}
-Les séquences sont des collections indexées et ordonnées. La notion d'index est importante, elle précise que chaque valeur est associée à une sorte d'étiquette numérique permettant de la retrouver. L'ordre de la séquence est donc induit par l'ordre des étiquettes.
-
-L'interface Sequence introduit les méthodes suivantes :
-
-\begin{tabularx}{\linewidth}{|c|X|}
-    \hline
-    Méthode & Rôle \\
-    \hline
-    append(Collection[E]) & Ajoute tous les éléments de la collection passée en paramètre à la fin de la séquence. \\
-    \hline
-    first:E & Retourne le premier élément de la séquence. \\
-    \hline
-    first=(E) & Définit le premier élément de la séquence. \\
-    \hline
-    last:E & Retourne le dernier élément de la séquence. \\
-    \hline    
-    last=(E) & Définit le dernier élément de la séquence. \\
-    \hline
-    pop:E & Retourne et retire le dernier élément de la séquence. \\
-    \hline
-    push(E) & Ajoute l'élément à la fin de la séquence. \\
-    \hline
-    shift:E & Retourne et retire le premier élément de la séquence. \\ 
-    \hline
-    unshift(E) & Ajoute l'élément au début de la séquence. \\
-    \hline
-\end{tabularx}
-
-L'interface Sequence est implémentée par les tableaux et les listes.
-
-\subsection{Listes}
-Les listes sont des Collections qui autorisent des doublons dans les éléments de la liste, elle acceptent aussi des éléments |null|. Les listes étant aussi des séquences, elles sont donc indexées et ordonnées, un élément de la liste peut donc être accédé directement à partir de son index. C'est aussi une implémentation concrète de Séquence, elle peut donc être instanciée et utilisée directement.
-
-La classe liste représente une liste doublement chaînée : l'ajout d'un élément peut se faire seulement au début ou à la fin de la collection.
-
-Voici un exemple d'utilisation d'une liste :
-\lstinputlisting[language=Nit]{./modules/listings/list1_c.nit}
-
-\subsection{Tableaux}
-Les tableaux représentent des collections d'objets dont la taille est dynamique. Les tableaux sont gérés grâce à la classe Array.
-
-Chaque objet de type Array gère une capacité qui est le nombre total d'éléments qu'il est possible d'insérer avant d'agrandir le tableau. Cette capacité a donc une relation avec le nombre d'éléments contenus dans la collection. Lors d'un ajout dans la collection, cette capacité et le nombre d'éléments de la collection déterminent si le tableau doit être agrandi. Si un nombre important d'éléments doit être ajouté, il est possible de forcer l'agrandissement de cette capacité avec la méthode |enlarge|. Son usage évite une perte de temps liée au recalcul de la taille de la collection. 
-
-Exemple :
-\lstinputlisting[language=Nit]{./modules/listings/array1_c.nit}
-
-Un constructeur permet de préciser la capacité initiale :
-\lstinputlisting[language=Nit]{./modules/listings/array2_c.nit}
-
-\section{Ensembles}
-Un ensemble (Set) est une collection qui n'autorise pas la présence de doublons.
-
-L'interface Set définit les méthodes d'une collection qui n'accepte pas de doublons dans ces éléments. Elle hérite de l'interface Collection mais elle ne définit pas de nouvelle méthode. Pour déterminer si un élément est déjà présent dans la collection, la comparaison est basée sur les valeurs des éléments. 
-
-L'interface Set possède deux implémentations concrètes : 
-
-\begin{description}
-    \item[ArraySet] Implémentation basée sur les tableaux.
-    \item[HashSet] Implémentation basée sur une table de hachage.
-\end{description}
-
-Exemple avec l'implémentation ArraySet :
-\lstinputlisting[language=Nit]{./modules/listings/set1_c.nit}
-
-\section{Collections gérées sous la forme clé/valeur}
-Ce type de collection gère les éléments avec deux entités : une clé et une valeur associée. La clé doit être unique donc il ne peut y avoir de doublons. En revanche la même valeur peut être associée à plusieurs clés différentes.
-
-\subsection{Interface Map}
-L'interface Map définit les méthodes d'une collection gérant des ensembles clés => valeur. Elle hérite de l'interface Collection et introduit ou redéfinit les méthodes suivantes :
-
-\begin{tabularx}{\linewidth}{|c|X|}
-    \hline
-    Méthode & Rôle \\
-    \hline
-    [](K):E & Retourne l'élément E correspondant à la clé K. \\
-    \hline
-    []=(K, E) & Définit l'élément E à la clé K. \\
-    \hline
-    has\_key(K):Bool & Indique si un élément existe à la clé K. \\
-    \hline
-    recover\_with(Map[K, E]) & Ajoute chaque valeur de la Map passée en paramètre dans la Map courante. En cas de conflit de clé, la valeur de la Map courante est remplacée par celle en paramètre.  \\
-    \hline
-    remove\_at(K) & Retire l'élément correspondant à la clé K. \\
-    \hline
-\end{tabularx}
-
-L'interface Map possède une implémentation concrète basée sur une table de hachage, HashMap.
-
-Voici un exemple d'utilisation d'une HashMap :
-\lstinputlisting[language=Nit]{./modules/listings/hashmap1_c.nit}
-
-\section{Tri des collections}
-Pour trier les collections, Nit propose la classe abstraite AbstractSorter. Elle apporte des fonctionnalités de tri pour les tableaux mais doit être spécialisée pour pouvoir être utilisée. 
-
-\begin{tabularx}{\linewidth}{|c|X|}
-    \hline
-    Méthode & Rôle \\
-    \hline
-    compare(E, E):Int & Méthode abstraite de comparaison. \\
-    \hline
-    sort(Array[E]) & Trie le tableau passé en paramètre. \\
-    \hline
-\end{tabularx}
-
-La méthode compare doit être redéfinie dans une sous classe afin de pouvoir être utilisée.
-
-Nit propose une implémentation par défaut basée sur les comparables : ComparableSorter.
-
-Voici un exemple de son utilisation :
-\lstinputlisting[language=Nit]{./modules/listings/sorter1_c.nit}
-
diff --git a/doc/developpez/nit.tex b/doc/developpez/nit.tex
deleted file mode 100644 (file)
index d90f7a2..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-\documentclass[letterpaper,11pt]{doc_nit}
-% Titre du document et auteur
-\title{Développez en Nit}
-\author{Université du Québec à Montréal}
-\date{v0.5}
-
-% Début du document
-\begin{document}
-
-% Génération de la page de garde
-\maketitle
-
-\chapter*{Introduction}
-\section*{Contact}
-Le projet Nit a une liste de diffusion (\url{nitlanguage-discussion@lists.nitlanguage.org}) où les utilisateurs et les développeurs peuvent discuter de diverses questions et s'entraider.
-
-\section*{A propos de ce document}
-Ce document débuté en 2010 présente le langage Nit et son utilisation dans son état actuel. Il est voué à évoluer avec le temps.
-
-Aujourd'hui, celui-ci est composé de 4 chapitres :
-\begin{itemize}
-    \item Présentation de Nit
-    \item Syntaxes et éléments de bases de Nit
-    \item Programmation Orientée Objet
-    \item Modules de la librairie standard Nit
-\end{itemize}
-
-Pour toutes modifications ou corrections, merci de contacter la mailing list.
-
-La dernière version publiée de ce document est disponible au format PDF sur le site officiel de Nit : \url{http://www.nitlanguage.org/}.
-
-La version PDF de ce document est réalisée grâce à l'outil Kile (KDE Integrated LaTeX Environment) version 2.0.85 de Kile Team. Cet outil peut être téléchargé à l'adresse : http://kile.sourceforge.net.
-
-\section*{Remerciements}
-Ce document s'inspire de la documentation Développons en Java rédigé par Jean Michel Doudoux, merci à lui.
-
-La dernière version publiée du document original est disponible aux formats HTML et PDF sur son site : \url{http://www.jmdoudoux.fr/java/}
-
-Il est aussi disponible dans les deux formats à l'adresse : \url{http://jmdoudoux.developpez.com/cours/developpons/java/}
-
-\pagebreak
-
-\section*{Notes de licence}
-Copyright (C) 2010 UQAM
-Vous pouvez copier, redistribuer et/ou modifier ce document selon les termes de la Licence de Documentation Libre GNU, Version 1.3 ou toute autre version ultérieure publiée par la Free Software Foundation; les Sections Invariantes étant constituées du chapitre Préambule, aucun Texte de Première de Couverture, et aucun Texte de Quatrième de Couverture. Une copie de la licence est incluse dans la section GNU Free Documentation Licence de ce document.
-
-La version la plus récente de cette licence est disponible à l'adresse : \url{http://www.fsf.org/copyleft/fdl.html}.
-
-% Génération de la table des matières
-\tableofcontents
-
-%Part : Présentation de Nit
-\input{./presentation/presentation.tex}
-
-%Part : Syntaxes et éléments de bases de Nit
-\input{./syntaxe/syntaxe.tex}
-
-%Part : Programmation Orientée Objet
-\input{./poo/poo.tex}
-
-%Part : Modules de la librairie standard Nit
-\input{./modules/modules.tex}
-
-\part*{Annexes}
-\input{./licence.tex}
-
-% Fin du document
-\end{document}
\ No newline at end of file
diff --git a/doc/developpez/poo/listings/abstract1_c.nit b/doc/developpez/poo/listings/abstract1_c.nit
deleted file mode 100644 (file)
index 9dc5bcf..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-abstract class ClasseAbstraite
-       fun methode 
-       do
-               # code partagé par tous les descendants
-       end
-end
-
-class ClasseComplete
-       super ClasseAbstraite
-end
-
-var o = new ClasseComplete
-o.methode
diff --git a/doc/developpez/poo/listings/abstract2_c.nit b/doc/developpez/poo/listings/abstract2_c.nit
deleted file mode 100644 (file)
index 5fbd61c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-class MaClasse
-       fun methode(i: Int): Int is abstract
-end
-
-class MonAutreClasse
-       super MaClasse
-       redef fun methode(i: Int): Int 
-       do
-               return i
-       end
-end
diff --git a/doc/developpez/poo/listings/accesseurs1_c.nit b/doc/developpez/poo/listings/accesseurs1_c.nit
deleted file mode 100644 (file)
index 1f53c57..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-class MaClasse
-       var minutes: Int
-
-       fun heures: Int 
-       do
-               return minutes / 60
-       end
-
-       fun heures=(val: Int)
-       do
-               minutes = val * 60
-       end
-end
diff --git a/doc/developpez/poo/listings/accesseurs2_c.nit b/doc/developpez/poo/listings/accesseurs2_c.nit
deleted file mode 100644 (file)
index 6b5f2a2..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-class Test 
-       var attribut1: String = "Getter public"
-       protected var attribut2: String = "Getter protected"
-end
-
-var test = new Test
-
-print test.attribut1 #Getter public
-#print test.attribut2 #Illégal puisque le getter implicite est défini comme protected
diff --git a/doc/developpez/poo/listings/accesseurs3_c.nit b/doc/developpez/poo/listings/accesseurs3_c.nit
deleted file mode 100644 (file)
index 3982e2d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-class Test 
-       var attribut1: String writable = "Attribut 1"
-       protected var attribut2: String protected writable = "Attribut 2"
-end
-
-var test = new Test
-
-test.attribut1= "Setter public"
-print test.attribut1 #Setter public
diff --git a/doc/developpez/poo/listings/accesseurs4_c.nit b/doc/developpez/poo/listings/accesseurs4_c.nit
deleted file mode 100644 (file)
index f52be92..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-interface I
-       fun attr: Int is abstract
-       fun attr=(o: Int) is abstract
-end
-
-class A
-super I
-       redef var attr: Int redef writable
-end
-
diff --git a/doc/developpez/poo/listings/attribut1_c.nit b/doc/developpez/poo/listings/attribut1_c.nit
deleted file mode 100644 (file)
index f1b6a76..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-class MaClasse
-       var monAttribut1: Int
-       var monAttribut2: String
-end
diff --git a/doc/developpez/poo/listings/attribut2_c.nit b/doc/developpez/poo/listings/attribut2_c.nit
deleted file mode 100644 (file)
index 4c0c29b..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-class MaClasse
-       var monAttribut1: Int = 1
-       var monAttribut2: String = "toto"
-end
-
-var o = new MaClasse
-
-print o.monAttribut1 #1
-print o.monAttribut2 #toto
diff --git a/doc/developpez/poo/listings/coercition1_c.nit b/doc/developpez/poo/listings/coercition1_c.nit
deleted file mode 100644 (file)
index 83be83d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-class Animal
-end
-
-class Vache
-       super Animal
-
-       fun broute 
-       do
-               print "La vache broute..."
-       end
-end
-       
-var x: Animal = new Vache
-x.as(Vache).broute
diff --git a/doc/developpez/poo/listings/coercition2_s.nit b/doc/developpez/poo/listings/coercition2_s.nit
deleted file mode 100644 (file)
index 48a3e40..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-if x isa Vache then
-       # Ici, le type statique de x est Vache
-       x.broute
-end
-# Le type statique de x est redevnu Animal
diff --git a/doc/developpez/poo/listings/comparaison1_s.nit b/doc/developpez/poo/listings/comparaison1_s.nit
deleted file mode 100644 (file)
index 8ee736b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-var r1 = new Rectangle(100,50)
-var r2 = new Rectangle(100,50)
-
-print r1 == r1 #true
-print r1 == r2 #false
diff --git a/doc/developpez/poo/listings/comparaison2_c.nit b/doc/developpez/poo/listings/comparaison2_c.nit
deleted file mode 100644 (file)
index f594a9c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-var s1 = "toto"
-var s2 = "toto"
-var i1 = 12
-
-print s1 == s2 #true
-print s1 is s2 #false
-
-print s1.is_same_type(s2) #true
-print s1.is_same_type(i1) #false
diff --git a/doc/developpez/poo/listings/constructeur1_c.nit b/doc/developpez/poo/listings/constructeur1_c.nit
deleted file mode 100644 (file)
index ca7fb7a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-class MaClasse
-       init 
-       do
-               print "Appel du constructeur"
-       end
-end
-
-var o = new MaClasse
diff --git a/doc/developpez/poo/listings/constructeur2_c.nit b/doc/developpez/poo/listings/constructeur2_c.nit
deleted file mode 100644 (file)
index 8a8026f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-class MaClasse
-
-       var entier: Int
-       var chaine: String      
-
-       # Le constructeur par défaut sera init(Int, String)
-end
-
-var o = new MaClasse(10, "toto")
diff --git a/doc/developpez/poo/listings/constructeur3_c.nit b/doc/developpez/poo/listings/constructeur3_c.nit
deleted file mode 100644 (file)
index 44f7700..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-class MaClasse
-
-       var entier: Int
-       var chaine: String      
-
-       # Réécriture du constructeur par défaut
-       init(i: Int, s: String)
-       do
-               entier = i
-               chaine = s
-       end
-end
-
-var o = new MaClasse(10, "toto")
diff --git a/doc/developpez/poo/listings/constructeur4_c.nit b/doc/developpez/poo/listings/constructeur4_c.nit
deleted file mode 100644 (file)
index 18ec2d1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-class MaClasse
-
-       var entier: Int
-       var chaine: String      
-
-       # Constructeur utilisant des valeurs par défaut
-       init 
-       do
-               entier = 10
-               chaine = "toto"
-       end
-
-       # Constructeur nommé acceptant des valeurs
-       init with_value(i: Int) 
-       do
-               entier = i
-               chaine = "tata"
-       end
-end
-
-var o1 = new MaClasse
-var o2 = new MaClasse.with_values(10)
diff --git a/doc/developpez/poo/listings/gen1_c.nit b/doc/developpez/poo/listings/gen1_c.nit
deleted file mode 100644 (file)
index 14a8da5..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-class Solo
-       var valeur: String writable
-end
diff --git a/doc/developpez/poo/listings/gen2_c.nit b/doc/developpez/poo/listings/gen2_c.nit
deleted file mode 100644 (file)
index 443eeea..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-class Solo
-       var valeur: Object writable
-end
-
-var val: Solo = new Solo(10)
-
-var x: Int = val.valeur.as(Int)
diff --git a/doc/developpez/poo/listings/gen3_c.nit b/doc/developpez/poo/listings/gen3_c.nit
deleted file mode 100644 (file)
index 0fb7a0e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-class Solo[T]
-       var valeur: T writable
-end
-
-var solo_int = new Solo[Int](10)
-var x: Int = solo_int.valeur
-
-var solo_string = new Solo[String]("toto")
-var x: String = solo_string.valeur
diff --git a/doc/developpez/poo/listings/gen4_s.nit b/doc/developpez/poo/listings/gen4_s.nit
deleted file mode 100644 (file)
index 5cbc753..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-class Solo[T: Animal]
-       var valeur: T writable
-end
-
-var soloAnimal = new Solo[Animal](new Animal)
-var soloVache = new Solo[Vache](new Vache)
-
-soloAnimal = soloVache
diff --git a/doc/developpez/poo/listings/gen5_c.nit b/doc/developpez/poo/listings/gen5_c.nit
deleted file mode 100644 (file)
index a822ab2..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-class Duo[T, S]
-       var valeur1: T writable
-       var valeur2: S writable
-end
-
-var duo = new Duo[Int, String](10, "toto")
-
-var i: Int = duo.valeur1
-var s: String = duo.valeur2
diff --git a/doc/developpez/poo/listings/heritage1_s.nit b/doc/developpez/poo/listings/heritage1_s.nit
deleted file mode 100644 (file)
index 24ec2f9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-class ClasseFille
-       super ClasseMere1
-       super ClasseMere2
-
-       # Corps de la classe fille
-
-end
diff --git a/doc/developpez/poo/listings/import1_c.nit b/doc/developpez/poo/listings/import1_c.nit
deleted file mode 100644 (file)
index 325fa8d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-import test
-
-var a = new A
diff --git a/doc/developpez/poo/listings/interface_c.nit b/doc/developpez/poo/listings/interface_c.nit
deleted file mode 100644 (file)
index 3da822d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-interface AfficheType
-       fun afficherType is abstract
-end
-
-class Personne 
-       super AfficheType
-
-       redef fun afficherType 
-       do
-               print "Je suis une personne"
-       end
-
-end
-
-class Voiture
-       super AfficheType
-
-       redef fun afficherType 
-       do
-               print "Je suis une voiture"
-       end
-end
diff --git a/doc/developpez/poo/listings/isset_c.nit b/doc/developpez/poo/listings/isset_c.nit
deleted file mode 100644 (file)
index c99a42a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-class A
-
-       var attr: nullable String
-
-       fun meth do
-               if isset attr then print attr
-       end
-end
-
-var a = new A
-a.meth
diff --git a/doc/developpez/poo/listings/methode1_c.nit b/doc/developpez/poo/listings/methode1_c.nit
deleted file mode 100644 (file)
index e25c442..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-class MaClasse
-       fun methode1 
-       do
-               print "Bonjour !"
-       end
-
-       fun methode2: String 
-       do
-               return "Bonjour !"
-       end
-end
diff --git a/doc/developpez/poo/listings/methode2_c.nit b/doc/developpez/poo/listings/methode2_c.nit
deleted file mode 100644 (file)
index 82b2de3..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-class MaClasse
-       fun methode1 
-       do
-               print "Bonjour M. X !"
-       end
-
-       fun methode2(prenom: String) 
-       do
-               print "Bonjour {prenom} !"
-       end
-end
-
-var o = new MaClasse
-o.methode1 #Bonjour M. X
-o.methode2("Dave") #Bonjour Dave !
diff --git a/doc/developpez/poo/listings/methode4_s.nit b/doc/developpez/poo/listings/methode4_s.nit
deleted file mode 100644 (file)
index 4e8970d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-o.methode1 # Appel sans paramètre
-o.methode2("Dave") # Appel avec un paramètre
-o.methode3("Dave", 20) #Appel avec plusieurs paramètres
diff --git a/doc/developpez/poo/listings/methode5_c.nit b/doc/developpez/poo/listings/methode5_c.nit
deleted file mode 100644 (file)
index 87a2b2f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-print "abcd".substring(1, 2).to_upper #BC
diff --git a/doc/developpez/poo/listings/methode6_c.nit b/doc/developpez/poo/listings/methode6_c.nit
deleted file mode 100644 (file)
index 79a677f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-class MaClasse
-       fun +(i: Int): String 
-       do
-               return "J'ajoute {i} à l'objet de type MaClasse..."
-       end
-end
-
-var o = new MaClasse
-print o+10
diff --git a/doc/developpez/poo/listings/methode7_c.nit b/doc/developpez/poo/listings/methode7_c.nit
deleted file mode 100644 (file)
index d3d8e88..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-class MaClasse
-       fun methode(prenom, nom: String) 
-       do
-               print "Bonjour {prenom} {nom} !"
-       end
-end
-
-var o = new MaClasse
-o.methode("John", "Doe") #Bonjour John Do !
diff --git a/doc/developpez/poo/listings/methode8_c.nit b/doc/developpez/poo/listings/methode8_c.nit
deleted file mode 100644 (file)
index 2982ad7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-print("test")
-print "test" # Ca marche aussi
diff --git a/doc/developpez/poo/listings/methode9_c.nit b/doc/developpez/poo/listings/methode9_c.nit
deleted file mode 100644 (file)
index 2bf0059..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-class A
-       fun methode(x: Int, y: Int..., z: Int)
-       do
-               print "x = {x}; y = {y.join(",")}; z = {z}"
-       end
-end
-
-var a = new A
-a.methode(1,2,3,4) # Affiche "x = 1; y = 2,3; z = 4"
-a.methode(1,2,3) # Affiche "x = 1; y = ; z = 2"
diff --git a/doc/developpez/poo/listings/new1_s.nit b/doc/developpez/poo/listings/new1_s.nit
deleted file mode 100644 (file)
index 67867ce..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var instance = new MaClasse
diff --git a/doc/developpez/poo/listings/new2_s.nit b/doc/developpez/poo/listings/new2_s.nit
deleted file mode 100644 (file)
index 4e65359..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var instance: MaClasse = new MaClasse
diff --git a/doc/developpez/poo/listings/new3_s.nit b/doc/developpez/poo/listings/new3_s.nit
deleted file mode 100644 (file)
index e5bf781..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-var instance1 = new MaClasse
-
-var instance2 = instance1 #instance2 ne désigne pas un nouvel objet, en fait instance1 et instance2 désignent tous les deux le même objet.
diff --git a/doc/developpez/poo/listings/nullable1_c.nit b/doc/developpez/poo/listings/nullable1_c.nit
deleted file mode 100644 (file)
index 04db820..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-var ma_var: nullable Int
-
-ma_var = null
diff --git a/doc/developpez/poo/listings/package1_c.nit b/doc/developpez/poo/listings/package1_c.nit
deleted file mode 100644 (file)
index 43df876..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-module test
-
-class A
-       #Corps de la classe
-end
-
-class B
-       #Corps de la classe
-end
diff --git a/doc/developpez/poo/listings/polymorphisme1_c.nit b/doc/developpez/poo/listings/polymorphisme1_c.nit
deleted file mode 100644 (file)
index c651de2..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-abstract class Forme 
-       fun aire :Float is abstract
-end
-class Carre
-       super Forme
-
-       var cote: Float
-
-       init(c: Float) 
-       do
-               cote = c
-       end
-
-       redef fun aire: Float 
-       do
-               return cote * cote
-       end
-end
-class Cercle
-       super Forme
-   
-       var rayon: Float
-
-       init (r: Float) 
-       do
-               rayon = r
-       end
-
-       redef fun aire: Float 
-       do
-               return  pi * rayon * rayon
-       end
-end
-
-var forme: Forme
-
-forme = new Carre(10.0)
-print forme.aire # Affiche "100"
-
-forme = new Cercle(10.0)
-print forme.aire # Affiche "314.15"
diff --git a/doc/developpez/poo/listings/polymorphisme_c.nit b/doc/developpez/poo/listings/polymorphisme_c.nit
deleted file mode 100644 (file)
index 3aca530..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-abstract class Forme 
-       fun aire :Float is abstract
-end
-class Carre
-       super Forme
-
-       var cote: Float
-
-       init(c: Float) 
-       do
-               cote = c
-       end
-
-       redef fun aire: Float 
-       do
-               return cote * cote
-       end
-end
-class Cercle
-       super Forme
-   
-       var rayon: Float
-
-       init (r: Float) 
-       do
-               rayon = r
-       end
-
-       redef fun aire: Float 
-       do
-               return  pi * rayon * rayon
-       end
-end
-
-var forme: Forme
-
-forme = new Carre(10.0)
-print forme.aire # Affiche "100"
-
-forme = new Cercle(10.0)
-print forme.aire # Affiche "314.15"
diff --git a/doc/developpez/poo/listings/redef1_c.nit b/doc/developpez/poo/listings/redef1_c.nit
deleted file mode 100644 (file)
index 4357902..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-class ClasseMere
-       fun methode 
-       do
-               print "Méthode originale"
-       end
-end
-
-class ClasseFille
-       super ClasseMere
-
-       redef fun methode 
-       do
-               print "Méthode redéfinie"
-       end
-end
-
-var o = new ClasseFille
-o.methode #Méthode redéfinie
diff --git a/doc/developpez/poo/listings/redef2_c.nit b/doc/developpez/poo/listings/redef2_c.nit
deleted file mode 100644 (file)
index 5ba0705..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-redef class Object
-
-       fun coucou 
-       do
-               print "Coucou !"
-       end
-end
-
-var i: Int = 10
-
-i.coucou #Coucou !
-
diff --git a/doc/developpez/poo/listings/redef3_c.nit b/doc/developpez/poo/listings/redef3_c.nit
deleted file mode 100644 (file)
index 7e27ee0..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-redef class String
-       redef fun to_s 
-       do
-               return self.to_upper
-       end
-end
-
-var chaine = "Hello World !"
-
-print chaine #HELLO WORLD !
diff --git a/doc/developpez/poo/listings/redef4_c.nit b/doc/developpez/poo/listings/redef4_c.nit
deleted file mode 100644 (file)
index 7a925b0..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-class A 
-       fun methode(a: String, b: Int): Bool
-       do
-               return a[b]
-       end
-end
-
-class B
-       super A
-
-       redef fun methode(a, b)
-       do
-               return a.to_upper[b]
-       end
-end
diff --git a/doc/developpez/poo/listings/redef5_c.nit b/doc/developpez/poo/listings/redef5_c.nit
deleted file mode 100644 (file)
index 3f63f37..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-class A
-       var attr: String
-end
-
-class B
-       super A
-
-       init(attr)
-       do
-               self.attr = attr.to_upper
-       end
-end
-
-var a = new A("toto")
-print a.attr
-
-var b = new B("toto")
-print b.attr
diff --git a/doc/developpez/poo/listings/self_c.nit b/doc/developpez/poo/listings/self_c.nit
deleted file mode 100644 (file)
index 21fd506..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-class A
-       var attr: Int
-
-       fun meth(attr: Int)
-       do
-               self.attr = attr
-       end
-end
-
-var a = new A(10)
-print a.attr # Affiche "10"
-
-a.meth(20)
-
-print a.attr # Affiche "20"
diff --git a/doc/developpez/poo/listings/super1_c.nit b/doc/developpez/poo/listings/super1_c.nit
deleted file mode 100644 (file)
index 18a9905..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-class ClasseMere
-       fun coucou(nom: String) 
-       do
-               print "Bonjour {nom} (depuis la classe mère)"
-       end
-end
-
-class ClasseFille
-       super ClasseMere
-
-       redef fun coucou(nom: String) 
-       do
-               super
-               print "Bonjour {nom} (depuis la classe fille)"
-       end
-end
-
-var o = new ClasseFille
-o.coucou("Dave") #Bonjour Dave (depuis la classe mère)
-                #Bonjour Dave (depuis la classe fille)
diff --git a/doc/developpez/poo/listings/super2_c.nit b/doc/developpez/poo/listings/super2_c.nit
deleted file mode 100644 (file)
index 515bade..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-class ClasseMere
-       init 
-       do
-               print "Constructeur de la super classe"
-       end
-end
-
-class ClasseFille
-       super ClasseMere
-
-       init 
-       do
-               print "Constructeur de la sous classe"
-       end
-end
-
-var o = new ClasseFille # Constructeur de la super classe
-                       # Constructeur de la sous classe
diff --git a/doc/developpez/poo/listings/super3_c.nit b/doc/developpez/poo/listings/super3_c.nit
deleted file mode 100644 (file)
index 2cc6dd0..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-class ClasseMere
-       init 
-       do
-               print "Constructeur de la super classe"
-       end
-end
-
-class ClasseFille
-       super ClasseMere
-
-       init 
-       do
-               print "Constructeur de la sous classe"
-               super
-       end
-end
-
-var o = new ClasseFille # Constructeur de la sous classe
-                       # Constructeur de la super classe
diff --git a/doc/developpez/poo/listings/type1_c.nit b/doc/developpez/poo/listings/type1_c.nit
deleted file mode 100644 (file)
index cf3ad76..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-abstract class Aliment end
-
-class Herbe super Aliment end
-
-class Animal
-       type REGIME: Aliment
-
-       fun manger(x: REGIME) do print "Je mange"
-end
-
-class Vache
-       super Animal
-
-       redef type REGIME: Herbe
-end
-
-var vache = new Vache
-vache.manger(new Herbe)
diff --git a/doc/developpez/poo/listings/type2_c.nit b/doc/developpez/poo/listings/type2_c.nit
deleted file mode 100644 (file)
index 5a381ae..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-abstract class Graph
-       var nodes: Array[Node] = new Array[Node]
-
-       fun add_node(node: Node) 
-       do
-               nodes.add(node)
-       end
-end
-
-class Node end
diff --git a/doc/developpez/poo/listings/type3_s.nit b/doc/developpez/poo/listings/type3_s.nit
deleted file mode 100644 (file)
index 9ace3cd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-class XMLDocument super Graph end
-
-class XMLNode super Node end
diff --git a/doc/developpez/poo/listings/type4_s.nit b/doc/developpez/poo/listings/type4_s.nit
deleted file mode 100644 (file)
index e452f25..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-var doc = new XMLDocument
-
-doc.add_node(new XMLNode) # Jusque là  tout va bien
-
-doc.add_node(new Node) # Cet ajout là  n'a aucun sens !
diff --git a/doc/developpez/poo/listings/type5_s.nit b/doc/developpez/poo/listings/type5_s.nit
deleted file mode 100644 (file)
index 82e28e2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-class XMLDocument 
-       super Graph
-
-       redef var nodes: Array[XMLNode] = new Array[XMLNode]
-
-       redef fun add_node(node: XMLNode) 
-       do
-               super(node)
-       end
-end
diff --git a/doc/developpez/poo/listings/type6_s.nit b/doc/developpez/poo/listings/type6_s.nit
deleted file mode 100644 (file)
index 25acb5d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-abstract class Graph
-       type NODE: Node
-       
-       var nodes: Array[NODE] = new Array[NODE]
-
-       fun add_node(node: NODE) 
-       do
-               nodes.add(node)
-       end
-end
-
-class Node end
-
-class XMLDocument 
-       super Graph 
-
-       redef type NODE: XMLNode
-end
-
-class XMLNode super Node end
-
-var doc = new XMLDocument
-
-doc.add_node(new XMLNode) 
-#doc.add_node(new Node) # Cet ajout déclenche une erreur de type à la compilation
diff --git a/doc/developpez/poo/poo.tex b/doc/developpez/poo/poo.tex
deleted file mode 100644 (file)
index 8c94b9b..0000000
+++ /dev/null
@@ -1,515 +0,0 @@
-\part{Programmation orientée objet}\r
-\chapter{Concept de classe}\r
-L'idée de base de la programmation orientée objet est de rassembler dans une même entité les données et les traitements qui s'y appliquent. Dans cette partie, nous allons voir comment Nit permet de développer en objet.\r
-\r
-Une classe est le support de l'encapsulation : c'est un ensemble de données et de fonction regroupées dans une même entité. Une classe est une description abstraite d'un ensemble d'objet ayant des propriétés communes. Les fonctions qui opèrent sur les données sont appelées des méthodes. Les données en elles-mêmes sont appelées des attributs. Les attributs et les méthodes représentent les propriétés de la classe.\r
-\r
-Rappelons qu'en Nit absolument TOUT est objet.\r
-\r
-Pour accéder à une classe il faut en déclarer une instance ou objet.\r
-\r
-Une classe se compose de deux parties : un en-tête et un corps. Le corps peut être divisé en deux sections : la déclaration de ses propriétés (attributs) et la définition des méthodes. Les méthodes et les données sont pourvues d'attributs de visibilité qui gèrent leur accessibilité par les composants hors de la classe.\r
-\r
-Une classe comporte donc sa déclaration, des attributs et la définition de ses méthodes.\r
-\r
-En Nit, toutes les classes héritent forcément de la classe |Object|. Cette relation d'héritage est implicite, c'est à dire qu'il n'est pas nécessaire de la déclarer.\r
-\r
-\section{Syntaxe et déclaration d'une classe}\r
-La syntaxe de déclaration d'un classe est la suivante :\r
-\begin{lstlisting}[language=Nit]\r
-    [redef][abstract] class nomDeClasse [super classeMere...]\r
-        ...\r
-    end\r
-\end{lstlisting}\r
-\r
-Les modificateurs de classe sont :\r
-\begin{description}\r
-    \item[abstract] Une classe abstraite est une classe contenant une ou plusieurs méthodes abstraites, qui n'ont pas de déclaration explicite. Une classe déclarée |abstract| ne peut pas être instanciée : il faut définir une classe qui hérite de cette classe et qui implémente les méthodes nécessaires pour ne plus être abstraite (voir section~\ref{classes-abstraites} \nameref{classes-abstraites}).\r
-    \item[redef] Ce modificateur permet de raffiner une classe pour y ajouter ou modifier des propriétés (voir section~\ref{redef} \nameref{redef}).\r
-\end{description}\r
-\r
-Le mot clé |super| permet de spécifier une ou des superclasses éventuelles : ce mot clé permet de préciser une classe mère dans une relation d'héritage. Nit supporte l'héritage multiple, il est donc possible d'utiliser plusieurs fois |super| sur la même classe (voir chapitre~\ref{heritage} \nameref{heritage}).\r
-\r
-L'ordre des méthodes dans une classe n'a pas d'importance. Si dans une classe, on rencontre d'abord la méthode A puis la méthode B, B peut être appelée sans problème dans A.\r
-\r
-\chapter{Objets}\r
-La classe est la description d'un objet. Un objet est une instance d'une classe. Pour chaque instance d'une classe, le code est le même, seules les données (valeurs des attributs) sont différentes pour chaque objet.\r
-\r
-\section{Instancier une classe : créer un objet}\r
-L'opérateur |new| se charge de créer une nouvelle instance d'une classe et de l'associer à une variable.\r
-\r
-Exemple :\r
-\lstinputlisting[language=Nit]{./poo/listings/new1_s.nit}\r
-\r
-Cela n'est pas obligatoire grâce au typage adaptatif (voir chapitre~\ref{typage-adaptatif} \nameref{typage-adaptatif}) mais on peut aussi préciser le type sur la variable qui va recevoir l'instance :\r
-\lstinputlisting[language=Nit]{./poo/listings/new2_s.nit}\r
-\r
-En Nit, toutes les classes sont instanciées par allocation dynamique à part les types universels (voir chapitre~\ref{universal} \nameref{universal}). Dans l'exemple précédent, la variable |instance| contient une référence sur un objet de la classe instanciée (contient l'adresse de l'objet qu'elle désigne : attention toutefois, il n'est pas possible de manipuler ou d'effectuer des opérations directement sur cette adresse comme en C).\r
-\r
-\lstinputlisting[language=Nit]{./poo/listings/new3_s.nit}\r
-\r
-L'opérateur |new|, lorsqu'il instancie la classe, appelle une méthode particulière de cet objet : le constructeur (voir chapitre~\ref{constructeurs} \nameref{constructeurs}).\r
-\r
-\section{Durée de vie d'un objet}\r
-La durée de vie d'un objet ne correspond pas forcément à la durée de vie du programme.\r
-\r
-La durée de vie d'un objet passe par trois étapes :\r
-\begin{description}\r
-    \item[La création] de l'objet grâce à l'opérateur d'instanciation |new|.\r
-    \item[L'utilisation] de l'objet en appelant ses méthodes.\r
-    \item[La destruction] de l'objet, c'est à dire la libération de la mémoire qu'occupe l'objet. En Nit, la libération de la mémoire est automatiquement effectuée par le ramasse miette (garbage collector). Quand le ramasse miette découvre un objet qui ne sera plus utilisé dans le programme alors il va automatiquement le supprimer. Il n'existe pas d'instruction \lstinline[language=C++]{delete} comme en C++.\r
-\end{description}\r
-\r
-\section{Références et comparaison d'objets}\r
-Les variables de  type objet que l'on déclare ne contiennent pas un objet mais une référence vers cet objet. Lorsque l'on écrit |instance1 = instance2|, on copie la référence |instance1| dans |instance2| : |instance1| et |instance2| pointent sur le même objet. Par défaut, l'opérateur |==| est celui de la classe |Object| et permet de comparer ces références. Deux objets avec des propriétés identiques sont deux objets distincts.\r
-\r
-\lstinputlisting[language=Nit]{./poo/listings/comparaison1_s.nit}\r
-Si on souhaite comparer deux objets en se basant sur la valeur de leurs attributs, il est possible de redéfinir l'opérateur |==| dans leur classe (voir section~\ref{redef-operateur} \nameref{redef-operateur}).\r
-\r
-Par exemple, l'opérateur |==| a été redéfini pour la classe String il est donc possible de comparer deux String en se basant sur leurs valeurs :\r
-\lstinputlisting[language=Nit, linerange=1-5]{./poo/listings/comparaison2_c.nit}\r
-\r
-Il est possible de comparer le type de deux objets, c'est à dire de vérifier si deux objets sont de la même classe ou non. Pour cela il faut utiliser la méthode |is_same_type(o:Object)|. Cette méthode est introduite dans la classe |Object|, comme toutes les classes en héritent implicitement, elle est disponible dans toutes les classes.\r
-\r
-\lstinputlisting[language=Nit, linerange=8-9, firstnumber=last]{./poo/listings/comparaison2_c.nit}\r
-\r
-Pour vérifier que deux variables sont en fait des références vers le même objet, il est possible d'utiliser le mot-clé |is| :\r
-\lstinputlisting[language=Nit, linerange=6-6, firstnumber=last]{./poo/listings/comparaison2_c.nit}\r
-\r
-\section{Types nullable}\r
-En Nit, il existe une particularité pour la valeur |null|. Contrairement à Java il ne peut pas être utilisé n'importe où. En effet, Nit propose un mécanisme permettant de limiter statiquement les erreurs fréquentes de type |nullPointerException|.\r
-\r
-Pour qu'une variable puisse prendre la valeur |null|, elle doit avoir été déclarée explicitement avec le type |nullable| :\r
-\lstinputlisting[language=Nit]{./poo/listings/nullable1_c.nit}\r
-Dans l'exemple précédent, si on omet de préciser le type comme |nullable|, le compilateur Nit lèvera une erreur au moment de la compilation.\r
-\r
-La valeur |null| peut donc être utilisée avec n'importe quel type \textit{nullable} mais aucun message ne peut être envoyé à |null|.\r
-\r
-\chapter{Modificateurs d'accès}\r
-Les modificateurs d'accès assurent le contrôle des conditions d'héritage, d'accès aux éléments et de modification de données par les autres classes. Ils s'appliquent aussi bien aux classes qu'aux méthodes et attributs.\r
-\r
-\section{Visibilité des entités}\r
-De nombreux langages orientés objet introduisent des attributs de visibilité pour réglementer l'accès aux classes et aux objets, aux méthodes et aux données.\r
-\r
-Il existe 2 modificateurs qui peuvent être utilisés pour définir les attributs de visibilité des entités (classes, méthodes ou attributs) : |private| et |protected|. Leur utilisation permet de définir des niveaux de protection différents (présentés dans un ordre croissant de niveau de protection offert) :\r
-\r
-%TODO reformuler\r
-\begin{description}\r
-    \item[Par défaut : public] Il n'existe pas de mot clé pour définir ce niveau, qui est le niveau par défaut lorsqu'aucun modificateur n'est précisé. Un attribut ou une méthode public est visible par tous les autres objets. Dans la philosophie orientée objet, aucun attribut ne devrait être déclaré public : il est préférable d'écrire des méthodes pour le consulter et le modifier.\r
-    \item[protected] Si un attribut ou une méthode est déclaré |protected|, seules les méthodes des sous classes pourront y accéder.\r
-    \item[private] C'est le niveau de protection le plus fort. Les composants ne sont visibles qu'à l'intérieur du fichier où est définie la classe.\r
-\end{description}\r
-\r
-Ces modificateurs d'accès sont mutuellement exclusifs.\r
-\r
-\section{Classes abstraites}\r
-\label{classes-abstraites}\r
-\r
-Le mot clé |abstract| peut être appliqué à une classe qui ne doit pas être instanciée. Cela permet de créer une classe qui sera une sorte de moule : toutes les classes dérivées pourront profiter des méthodes héritées.\r
-\r
-\lstinputlisting[language=Nit]{./poo/listings/abstract1_c.nit}\r
-\r
-Essayer d'instancier une classe abstraite générera une erreur de compilation.\r
-\r
-\chapter{Méthodes}\r
-Les méthodes sont des fonctions qui implémentent les traitements de la classe.\r
-\r
-\section{Syntaxe et déclaration}\r
-La syntaxe de la déclaration d'une méthode est :\r
-\begin{lstlisting}[language=Nit]\r
-    [redef] [protected|private] fun nom_de_méthode[( arg1:Type, ... )][:Type_retourné] do\r
-        ...\r
-    end\r
-\end{lstlisting}\r
-\r
-\section{Types retournés}\r
-Le type retourné correspond au type de l'objet qui est renvoyé par la méthode. Si la méthode ne retourne rien, alors on ne précise pas le type retourné.\r
-\r
-La valeur de retour de la méthode doit être transmise par l'instruction |return|. Elle indique la valeur que prend la méthode et termine celle ci : les instructions qui suivent |return| à l'intérieur du même bloc ne seront pas exécutées. Si des instructions sont placées après le mot clé |return|, une erreur |unreachable statement| sera levée lors de la compilation.\r
-\r
-\lstinputlisting[language=Nit]{./poo/listings/methode1_c.nit}\r
-\r
-Il est possible d'inclure une instruction |return| dans une méthode sensée ne rien retourner : cela permet de quitter la méthode.\r
-\r
-\section{Passage de paramètres}\r
-Les paramètres des méthodes sont déclarés entre parenthèses et séparés par des virgules. Le type et le nombre de paramètres déclarés doivent correspondre au type et au nombre de paramètres transmis. Si une méthode n'accepte pas de paramètres, il suffit de ne pas indiquer de parenthèses :\r
-\lstinputlisting[language=Nit]{./poo/listings/methode2_c.nit}\r
-\r
-Si plusieurs paramètres ont le même type, il est possible de le factoriser :\r
-\lstinputlisting[language=Nit]{./poo/listings/methode7_c.nit}\r
-\r
-Il n'est pas possible d'indiquer des valeurs par défaut dans les paramètres. \r
-\r
-Lorsqu'un objet est passé comme paramètre à une méthode, cette dernière reçoit une référence qui désigne son emplacement mémoire d'origine. Il est possible de modifier l'objet grâce à ces méthodes mais il n'est pas possible de remplacer la référence contenue dans la variable passée en paramètre : ce changement n'aura lieu que localement à la méthode.\r
-\r
-\section{Envoi de message}\r
-Un message est émis lorsqu'on demande à un objet d'exécuter l'une de ses méthodes.\r
-La syntaxe d'appel d'une méthode est : |objet.methode(paramètre, ...)|\r
-\r
-Si la méthode appelée ne contient aucun paramètre, il n'est pas nécessaire de mettre les parenthèses.\r
-\r
-\lstinputlisting[language=Nit]{./poo/listings/methode4_s.nit}\r
-\r
-Quand l'appel de méthode se fait en dehors d'une expression et qu'elle n'accepte qu'un seul paramètre, il est possible de ne pas utiliser les parenthèses :\r
-\lstinputlisting[language=Nit]{./poo/listings/methode8_c.nit}\r
-\r
-\section{Nombre variable de paramètres}\r
-Il est possible d'indiquer qu'une méthode peut recevoir un nombre variable de paramètre grâce à l'opérateur |...|. Le paramètre sera alors considéré comme un tableau du type spécifié. L'envoi de message pourra alors contenir zéro, un ou plusieurs arguments pour le paramètre ainsi déclaré.\r
-\r
-\lstinputlisting[language=Nit]{./poo/listings/methode9_c.nit}\r
-\r
-Un seul paramètre variable est autorisé dans une signature.\r
-\r
-\section{Enchaînement de références}\r
-Il est possible d'enchaîner les envois de messages aux retours des méthodes :\r
-\lstinputlisting[language=Nit]{./poo/listings/methode5_c.nit}\r
-\r
-Ici on appelle la méthode \textit{to\_upper} de l'objet retourné par la méthode \textit{substring} de l'objet \textit{"abcd"}.\r
-\r
-\section{Mot-clé self}\r
-\r
-Le mot-clé |self| est l'équivalent du |this| en Java. Il permet de pointer sur le receveur courant :\r
-\lstinputlisting[language=Nit]{./poo/listings/self_c.nit}\r
-\r
-\section{Redéfinition d'opérateurs}\r
-\label{redef-operateur}\r
-\r
-Avec Nit il est possible de définir ou redéfinir des opérateurs arithmétiques (|+|, |-|, |*|...) pour chacune de nos classes en suivant la même déclaration que pour une méthode normale :\r
-\lstinputlisting[language=Nit]{./poo/listings/methode6_c.nit}\r
-\r
-La seule restriction est que la méthode doit forcément prendre un et un seul paramètre et retourner quelque chose.\r
-\r
-\section{Surcharge statique de méthode}\r
-Pour des raisons liées à l'héritage, Nit ne permet pas la surcharge statique des méthodes. Il n'est donc pas possible de définir plusieurs fois une même méthode avec des types de paramètres différents.\r
-\r
-\section{Méthodes abstraites}\r
-Une méthode abstraite est une méthode déclarée avec le modificateur |is abstract| et sans corps. Elle correspond à une méthode dont on veut forcer l'implémentation dans une sous classe. \r
-\r
-La syntaxe de la déclaration d'une méthode abstraite est :\r
-\begin{lstlisting}[language=Nit]\r
-    [redef] [protected|private] fun nom_de_méthode[( arg1:Type, ... )][:Type_retourné] is abstract\r
-\end{lstlisting}\r
-\r
-\lstinputlisting[language=Nit, linerange=1-3]{./poo/listings/abstract2_c.nit}\r
-\r
-Pour pouvoir utiliser la méthode, il faut la redéfinir dans une sous classe grâce au mot clé |redef| (voir section~\ref{redef} \nameref{redef}) :\r
-\lstinputlisting[language=Nit, linerange=5-11, firstnumber=last]{./poo/listings/abstract2_c.nit}\r
-\r
-Contrairement à d'autres langages, une classe n'est pas automatiquement abstraite dès lors qu'une de ses méthodes est déclarée abstraite. Cela est lié au concept de raffinement de classe que nous aborderons un peu plus tard (voir section~\ref{raffinement-classe} \nameref{raffinement-classe}).\r
-\r
-Un appel à une méthode abstraite n'est pas décelé au moment de la compilation (toujours à cause du raffinement de classe) mais au moment de l'exécution.\r
-\r
-\chapter{Attributs}\r
-Les données d'une classe sont contenues dans des variables nommées attributs. \r
-\r
-\section{Déclaration des attributs}\r
-Le mot-clé |var| permet aussi de déclarer un attribut dans le corps de la classe. En Nit, tous les attributs doivent avoir un type explicite.\r
-\r
-\lstinputlisting[language=Nit]{./poo/listings/attribut1_c.nit}\r
-\r
-Chaque instance de la classe a accès à sa propre occurrence de l'attribut.\r
-\r
-Il est possible de définir des valeurs par défaut pour chaque attribut :\r
-\lstinputlisting[language=Nit]{./poo/listings/attribut2_c.nit}\r
-\r
-\section{Accesseurs}\r
-L'encapsulation permet de sécuriser l'accès aux données d'une classe, la bonne pratique consiste donc à créer des méthodes permettant d'accéder indirectement à ces données : les accesseurs. Nit applique à la lettre cette bonne pratique en empêchant systématiquement tout accès direct à l'attribut. En effet, pour chaque attribut déclaré dans une classe, Nit va généré un accesseur automatiquement pour en permettre l'accès.\r
-\r
-Un accesseur est une méthode qui donne l'accès à une variable d'instance. Pour une variable d'instance, il peut ne pas y avoir d'accesseur, un accesseur en lecture (getter) et/ou un accesseur en écriture (setter). \r
-\r
-Il reste tout de même possible de définir ses propres accesseurs :\r
-\lstinputlisting[language=Nit]{./poo/listings/accesseurs1_c.nit}\r
-\r
-Les accesseurs manuels sont tout a fait comme des méthodes et acceptent de ce fait les modificateurs d'accès de visibilité. Pour les accesseurs automatiques, le principe est différent.\r
-\r
-Pour les getters, c'est la visibilité de l'attribut qui va déterminer la visibilité de la méthode :\r
-\begin{description}\r
-    \item[par défaut (public)] Le getter automatique sera généré avec la visibilité public.\r
-    \item[protected] Le getter automatique sera généré avec la visibilité |protected|.\r
-    \item[private] Le getter automatique sera généré avec la visibilité |private|.\r
-\end{description}\r
-\r
-Voici un exemple d'utilisation des getters automatiques :\r
-\lstinputlisting[language=Nit]{./poo/listings/accesseurs2_c.nit}\r
-\r
-Pour les setters, ils sont toujours générer comme étant |private|. Pour changer cette visibilité, il est nécessaire de préciser l'attribut comme |writable| en lui rajoutant la visibilité souhaitée :\r
-\begin{description}\r
-    \item[writable] Le setter automatique sera généré avec la visibilité public.\r
-    \item[protected writable] Le setter automatique sera généré avec la visibilité |protected|.\r
-    \item[private writable] Le setter automatique sera généré avec la visibilité |private| (c'est le comportement par défaut).\r
-\end{description}\r
-\r
-Voici un exemple d'utilisation des setters automatiques :\r
-\lstinputlisting[language=Nit]{./poo/listings/accesseurs3_c.nit}\r
-\r
-\section{Redéfinition d'attributs}\r
-Les accesseurs automatiques sont considérés comme des méthodes normales, ils peuvent donc être hérités et redéfinis. De plus les accesseurs automatiques peuvent être utilisés pour redéfinir des accesseurs manuels. |redef var| permet de préciser une redéfinition du getter alors que |redef writable| permet de redéfinir le setter :\r
-\lstinputlisting[language=Nit]{./poo/listings/accesseurs4_c.nit}\r
-\r
-\section{Opérateur isset}\r
-\r
-Pour vérifier si un attribut a été initialisé, on peut utiliser l'opérateur |isset| :\r
-\lstinputlisting[language=Nit,]{./poo/listings/isset_c.nit}\r
-\r
-\chapter{Constructeurs}\r
-\label{constructeurs}\r
-\r
-\section{Constructeurs standards}\r
-L'instanciation d'un objet est suivie d'une sorte d'initialisation par le moyen d'une méthode particulière appelée constructeur pour que les variables aient une valeur de départ. Elle n'est systématiquement invoquée que lors de la création d'un objet.\r
-\r
-La syntaxe de la déclaration d'une constructeur est :\r
-\begin{lstlisting}[language=Nit]\r
-    [redef] [protected|private] init [nom][( arg1:Type, ... )] do\r
-        ...\r
-    end\r
-\end{lstlisting}\r
-\r
-Un constructeur ne possède pas de type de retour. \r
-\r
-\lstinputlisting[language=Nit]{./poo/listings/constructeur1_c.nit}\r
-\r
-La définition d'un constructeur est facultative. Si aucun constructeur n'est explicitement défini dans la classe, le compilateur va créer un constructeur par défaut en fonction des attributs définis dans la classe :\r
-\lstinputlisting[language=Nit]{./poo/listings/constructeur2_c.nit}\r
-\r
-Bien sûr, il est possible de forcer un constructeur en le déclarant explicitement afin de créer un constructeur différent que celui qui serait généré par défaut:\r
-\lstinputlisting[language=Nit]{./poo/listings/constructeur3_c.nit}\r
-\r
-\section{Constructeurs nommés}\r
-En Nit, il n'est pas possible de surcharger un constructeur. En revanche, il est possible de nommer les constructeurs :\r
-\lstinputlisting[language=Nit]{./poo/listings/constructeur4_c.nit}\r
-\r
-\section{Constructeurs abstraits}\r
-Les constructeurs peuvent être déclarés comme abstrait avec la syntaxe suivante :\r
-\begin{lstlisting}[language=Nit]\r
-    [redef] [protected|private] init [nom][( arg1:Type, ... )] is abstract\r
-\end{lstlisting}\r
-\r
-\chapter{Héritage}\r
-\label{heritage}\r
-L'héritage est un mécanisme qui facilite la réutilisation du code et la gestion de son évolution. Elle définit une relation entre deux classes :\r
-\begin{itemize}\r
-  \item une classe mère ou super classe\r
-  \item une classe fille ou sous classe qui hérite de sa classe mère\r
-\end{itemize}\r
-\r
-\section{Principes de l'héritage}\r
-Grâce à l'héritage, les objets d'une classe fille ont accès aux données et aux méthodes des classes parentes et peuvent les étendre. Les sous classes peuvent redéfinir les attributs et les méthodes héritées. \r
-\r
-L'héritage successif de classes permet de définir une hiérarchie de classe qui se compose de super classes et de sous classes. Une classe qui hérite d'une autre est une sous classe et celle dont elle hérite est une super classe. Une classe peut avoir plusieurs sous classes et plusieurs classes mères. |Object| est la classe parente de toutes les classes en Nit. Tous les attributs et méthodes contenues dans |Object| sont accessibles à partir de n'importe quelle classe car par héritages successifs toutes les classes héritent d'|Object|.\r
-\r
-\section{Mise en \oe{}uvre}\r
-On utilise le mot clé |super| pour indiquer qu'une classe hérite d'une autre. En l'absence de ce mot réservé associé à une classe, le compilateur considère la classe |Object| comme classe mère.\r
-\lstinputlisting[language=Nit]{./poo/listings/heritage1_s.nit}\r
-\r
-Pour invoquer une méthode d'une classe parent, il suffit d'utiliser le mot-clé |super|. Les paramètres seront transmis automatiquement :\r
-\lstinputlisting[language=Nit]{./poo/listings/super1_c.nit}\r
-\r
-En Nit, il est obligatoire dans un constructeur d'une classe fille de faire appel explicitement ou implicitement au constructeur de la classe mère. \r
-\r
-Si rien n'est précisé alors l'appel sera fait implicitement, le constructeur de la classe mère sera appelé avant le constructeur de la classe fille :\r
-\lstinputlisting[language=Nit]{./poo/listings/super2_c.nit}\r
-\r
-Si |super| est utilisé, alors l'appel sera fait à l'endroit précisé :\r
-\lstinputlisting[language=Nit, linerange=8-19]{./poo/listings/super3_c.nit}\r
-\r
-\section{Accès aux propriétés héritées}\r
-Les variables et méthodes définies avec le modificateur d'accès par défaut (public) restent publiques à travers l'héritage et toutes les autres classes.\r
-Une variable d'instance définie avec le modificateur |private| est bien héritée mais elle n'est pas accessible directement mais via les méthodes héritées (mise à part dans le fichier où est définie la classe).\r
-\r
-Si l'on veut conserver pour une propriété une protection semblable à celle assurée par le modificateur |private|, il faut utiliser le modificateur |protected|. La propriété ainsi définie sera héritée dans toutes les classes descendantes qui pourront y accéder en utilisant le mot-clé |self| mais ne sera pas accessible sur tout autre receveur.\r
-\r
-\section{Redéfinition de méthodes}\r
-\label{redef}\r
-La redéfinition d'une méthode héritée doit impérativement conserver la déclaration de la méthode parent (type et nombre de paramètres et la valeur de retour doivent être identiques). Si la signature de la méthode change, ce n'est plus une redéfinition mais une surcharge... et rappelez-vous : ce n'est pas autorisé en Nit.\r
-\r
-Pour redéfinir une méthode, il suffit d'utiliser le mot-clé |redef| :\r
-\lstinputlisting[language=Nit]{./poo/listings/redef1_c.nit}\r
-\r
-Lors de la redéfinition d'une méthode avec le mot-clé |redef|, il n'est pas nécessaire de préciser à nouveau le prototype de la méthode :\r
-\lstinputlisting[language=Nit]{./poo/listings/redef4_c.nit}\r
-\r
-%\section{Redéfinition de constructeurs}\r
-\r
-%\subsubsection{Redéfinition de constructeurs automatiques}\r
-\r
-%Les constructeurs automatiques ou manuel sont transmis de la classe mère à la classe fille par héritage. Il est possible de redéfinir un constructeur automatique sans utiliser le mot-clé |redef| comme ceci :\r
-%\lstinputlisting[language=Nit]{./poo/listings/redef5_c.nit}\r
-\r
-\section{Polymorphisme}\r
-Le polymorphisme est la capacité, pour un même message, de correspondre à plusieurs formes de traitements selon l'objet auquel ce message est adressé. La gestion du polymorphisme est assurée dynamiquement à l'exécution.\r
-\r
-L'idée est de partir d'un type et de le modifier. Par exemple, on peut créer une classe de base, puis faire des classes dérivées :\r
-\lstinputlisting[language=Nit, linerange=1-35]{./poo/listings/polymorphisme_c.nit}\r
-\r
-On peut ensuite traiter les objets de la même manière quelques soit leur type dynamique :\r
-\lstinputlisting[language=Nit, linerange=37-43, firstnumber=last]{./poo/listings/polymorphisme_c.nit}\r
-\r
-L'héritage définit un sous-typage implicite de la classe fille vers la classe mère : on peut affecter à une référence d'une classe n'importe quel objet d'une de ses sous classes.\r
-\r
-\section{Coercition}\r
-La coercition (conversion de type) peut être utilisée dans le cadre d'un cast standard grâce au mot-clé |as| :\r
-\lstinputlisting[language=Nit]{./poo/listings/coercition1_c.nit}\r
-\r
-L'inconvénient de cette méthode est que si l'objet n'avait pas été dynamiquement typé en tant que Vache, une erreur d'exécution serait survenue lors du cast puisque celui-ci aurait échoué.\r
-\r
-Nit propose une méthode plus sûre permettant de changer temporairement le type statique d'une variable au mot-clé |isa| :\r
-\lstinputlisting[language=Nit,firstnumber=last]{./poo/listings/coercition2_s.nit}\r
-\r
-\section{Interfaces}\r
-Une interface est un ensemble de déclarations de méthodes correspondant un peu à une classe abstraite. C'est une sorte de standard auquel une classe peut répondre. Tous les objets qui se conforment à cette interface (qui implémentent cette interface) possèdent donc les méthodes déclarées dans celle-ci. Plusieurs interfaces peuvent être implémentées par une même classe.\r
-\r
-Les interfaces se comportent donc comme des classes un peu spéciales :\r
-\begin{itemize}\r
-    \item Une interface ne peut étendre qu'une interface ;\r
-    \item Une interface ne peut pas avoir de constructeur (méthode init) ;\r
-    \item Une interface ne peut donc pas être instanciée ;\r
-    \item Une interface ne peut pas avoir d'attributs ;\r
-\end{itemize}\r
-\r
-En Nit, il est possible d'implémenter le corps des méthodes directement dans l'interface, celui-ci sera alors transmis par héritage.\r
-\r
-Voici la syntaxe d'une interface :\r
-\begin{lstlisting}[language=Nit]\r
-    interface nom_interface [super interface_mere...]\r
-        ...\r
-    end\r
-\end{lstlisting}\r
-\r
-Un exemple de déclaration d'une interface :\r
-\lstinputlisting[language=Nit]{./poo/listings/interface_c.nit}\r
-\r
-Les interfaces sont ensuite intégrées aux autres classes avec le mot-clé |super| :\r
-\lstinputlisting[language=Nit, linerange=5-22, firstnumber=last]{./poo/listings/interface_c.nit}\r
-\r
-\chapter{Types universels}\r
-\label{universal}\r
-\r
-Les types universels sont déclarés à l'aide du mot-clé |universal|. Il s'agit d'éléments qui ne peuvent pas être spécialisés, qui ne peuvent spécialiser que des interfaces, n'ont pas d'attributs et pas de constructeurs.\r
-\r
-Les types universels peuvent avoir des instances mais elles ne sont pas initialisées par le développeur, c'est à dire qu'il est impossible d'utiliser le mot-clé |new| avec un type universel.\r
-\r
-Int et Bool sont deux exemples de types universels.\r
-\r
-\chapter{Généricité et types virtuels}\r
-\r
-\section{Généricité}\r
-Le principe de la généricité est de factoriser les méthodes pouvant s'appliquer à n'importe quelle variable quel que soit son type en évitant les problèmes de coercition.\r
-\r
-\subsection{Généricité simple}\r
-Prenons un exemple de classe non générique :\r
-\lstinputlisting[language=Nit]{./poo/listings/gen1_c.nit}\r
-\r
-Si nous souhaitons pouvoir utiliser cette classe avec d'autres objets que des |String|, il serait possible de se baser sur le type le plus haut dans la hiérarchie Nit, c'est à dire |Object| :\r
-\lstinputlisting[language=Nit, linerange=1-3]{./poo/listings/gen2_c.nit}\r
-\r
-Voyons maintenant ce qui se passe quand nous utilisons cette classe avec des |Int| :\r
-\lstinputlisting[language=Nit, linerange=5-7, firstnumber=last]{./poo/listings/gen2_c.nit}\r
-\r
-Vous remarquerez qu'il est nécessaire d'utiliser un cast pour utiliser le retour du |getter| de l'attribut |valeur| puisque celui-ci est de type |Object|. Ce n'est pas pratique et potentiellement dangereux pour la stabilité du programme puisque le risque d'erreur d'exécution sur un cast qui a échoué augmente.\r
-\r
-Dans ce cas, la généricité apporte une solution fiable et robuste. Elle permet de paramétrer des méthodes avec un type de données joker qui sera résolu dynamiquement au moment de l'instanciation de l'objet.\r
-\r
-Voici le code de la classe déclarée comme générique :\r
-\lstinputlisting[language=Nit, linerange=1-3]{./poo/listings/gen3_c.nit}\r
-\r
-Dans cette classe, le T n'est pas encore défini, cela se fera à l'instanciation. Par contre, une fois instancié avec un type, l'objet ne pourra travailler qu'avec le type de données spécifié à l'instanciation.\r
-\r
-La déclaration d'une classe générique se fait en précisant le type joker (représenté par n'importe quel mot) entre crochet |[T]|. Il suffit ensuite d'implémenter les méthodes comme nous le ferions habituellement mais en remplaçant les types par le joker que nous avons défini dans la déclaration de la classe.\r
-\r
-Voyons comment utiliser notre classe générique avec des entiers :\r
-\lstinputlisting[language=Nit, linerange=5-6, firstnumber=last]{./poo/listings/gen3_c.nit}\r
-\r
-Ou encore avec des chaînes de caractères :\r
-\lstinputlisting[language=Nit, linerange=8-9, firstnumber=last]{./poo/listings/gen3_c.nit}\r
-\r
-\subsection{Généricité bornée}\r
-Dans certains cas, il peut être utile de limiter la portée de la généricité à un certain nombre de types ayant la même intention. Pour cela nous pouvons utiliser l'héritage afin de n'autoriser que les sous-types d'une certaine classe. C'est le principe de la généricité bornée.\r
-\r
-Imaginons cette fois que la classe Solo n'a de sens que si elle est utilisée avec un objet de type Animal ou l'un de ses sous-type. Nous allons pouvoir préciser la borne sur notre joker dans la définition de la classe générique :\r
-\lstinputlisting[language=Nit, linerange=1-3]{./poo/listings/gen4_s.nit}\r
-\r
-Il n'est maintenant plus possible d'utiliser cette classe avec autre chose que le type Animal ou l'un de ses sous-type.\r
-\r
-En réalité, toute classe utilisant la généricité sans borne apparente est bornée implicitement sur |[T: nullable Object]|.\r
-\r
-\subsection{Généricité et héritage}\r
-Nit, contrairement à d'autres langages, supporte la covariance des variables dans le cas des classes génériques.\r
-\r
-L'exemple suivant est donc tout à fait valable en Nit :\r
-\lstinputlisting[language=Nit, linerange=5-8, firstnumber=last]{./poo/listings/gen4_s.nit}\r
-\r
-\subsection{Généricité multiple}\r
-Nit supporte aussi la généricité multiple comme le montre l'exemple suivant :\r
-\lstinputlisting[language=Nit]{./poo/listings/gen5_c.nit}\r
-\r
-\section{Types virtuels}\r
-Les types virtuels permettent définir au sein d'une classe un champ qui va contenir un type plutôt d'un objet. Ce champ peut ensuite être utilisé pour typer les paramètres et les types de retour des méthodes. Sa valeur sera exploitée à la compilation pour définir le type à utiliser.\r
-\r
-Exemple d'utilisation d'un type virtuel :\r
-\lstinputlisting[language=Nit]{./poo/listings/type1_c.nit}\r
-\r
-A quoi peuvent servir les types virtuels ?\r
-\r
-Prenons un exemple très simplifié qui n'utilise pas les types virtuels :\r
-\lstinputlisting[language=Nit]{./poo/listings/type2_c.nit}\r
-\r
-Nous souhaitons maintenant étendre cette classe pour représenter un XMLDocument comprenant des XMLNode :\r
-\lstinputlisting[language=Nit,firstnumber=last]{./poo/listings/type3_s.nit}\r
-\r
-Jusque là tout va bien. Essayons maintenant de manipuler cette classe :\r
-\lstinputlisting[language=Nit,firstnumber=last]{./poo/listings/type4_s.nit}\r
-\r
-Pour forcer l'utilisation de la méthode add\_node de XMLDocument avec un paramètre de type XMLNode, nous voilà obligé de redéfinir entièrement la classe Node :\r
-\lstinputlisting[language=Nit]{./poo/listings/type5_s.nit}\r
-\r
-Nous aurions pu éviter cela en utilisant les types virtuels :\r
-\lstinputlisting[language=Nit]{./poo/listings/type6_s.nit}\r
-\r
-\chapter{Modules}\r
-En Nit, il existe un moyen de regrouper des classes voisines ou qui couvrent un même domaine : ce sont les modules.\r
-\r
-\section{Définition d'un module}\r
-En Nit, la convention est de regrouper les classes qui doivent faire partie du même module dans un même fichier. Le nom du module doit correspondre au nom du fichier sans l'extension .nit.\r
-\r
-Pour spécifier le nom du moule, il suffit de rajouter la directive |module nom_du_module| au début du fichier :\r
-\lstinputlisting[language=Nit]{./poo/listings/package1_c.nit}\r
-\r
-Le mot-clé |module| doit être la première instruction dans un fichier source et il ne doit être présent qu'une seule fois dans le fichier source (une classe ne peut pas appartenir à plusieurs modules).\r
-\r
-\section{Utilisation d'un module}\r
-\r
-\subsection{Import standard}\r
-Pour utiliser ensuite le module ainsi créé, on l'importe dans le fichier grâce à l'instruction :\r
-\begin{lstlisting}[language=Nit]\r
-    [intrude|private] import nom_du_module\r
-\end{lstlisting}\r
-\lstinputlisting[language=Nit]{./poo/listings/import1_c.nit}\r
-\r
-Si le nom du module diffère du nom du fichier, le compilateur ne sera pas capable de lier le module est retournera une erreur à la compilation : no ressource found for module nom\_du\_module.\r
-\r
-Pour l'instant il n'est pas possible d'importer des modules se trouvant dans un autre répertoire que celui où se trouvent les fichiers sources.\r
-\r
-\subsection{Import privé}\r
-Si on utilise le mot-clé |private| devant le |import|, le module sera importé dans le module courant comme privé. C'est à dire que les modules qui importeront le module courant ne verrons pas les classes et les propriétés importées.\r
-\r
-\subsection{Import intrusif}\r
-L'utilisation du mot-clé |intrude| avant l'import d'un module permet d'importer le module en mode intrusif, c'est à dire d'ignorer toutes les restrictions liées à la visibilité. Ainsi les méthodes déclarées |private| seront considérées comme publiques.\r
-\r
-Cette fonctionnalité est à utiliser avec beaucoup de précautions, elle est même déconseillée dans la plupart des cas.\r
-\r
-\section{Raffinement de classe}\r
-\label{raffinement-classe}\r
-Nit permet de redéfinir des classes depuis une autre module pour en modifier les méthodes ou en rajouter, c'est le raffinement de classe.\r
-\r
-Pour modifier une classe déjà déclarée il faut utiliser le mot-clé |redef| :\r
-\lstinputlisting[language=Nit]{./poo/listings/redef2_c.nit}\r
-\r
-Ici, nous venons de raffiner la classe Object pour lui ajouter la méthode coucou. Maintenant Object et toutes ses sous classes possèdent la méthode coucou. Par exemple nous appelons la méthode coucou sur l'objet de type Int.\r
-\r
-Il est aussi possible de redéfinir les méthodes déjà existantes :\r
-\lstinputlisting[language=Nit]{./poo/listings/redef3_c.nit}\r
-\r
-Dans cet exemple nous avons redéfini la méthode to\_s de la classe String afin de retourner toutes les chaines en majuscules.\r
-\r
-\chapter{Importation de la bibliothèque standard}\r
-Il faut noter que les modules de la bibliothèque standard sont toujours importés implicitement lors de la compilation si aucun import n'a été spécifié. Par exemple il n'est pas nécessaire d'importer le module string pour utiliser la classe String.\r
diff --git a/doc/developpez/presentation/listings/hello_world_s.nit b/doc/developpez/presentation/listings/hello_world_s.nit
deleted file mode 100644 (file)
index f4da9af..0000000
+++ /dev/null
@@ -1 +0,0 @@
-print "Hello World!"
diff --git a/doc/developpez/presentation/presentation.tex b/doc/developpez/presentation/presentation.tex
deleted file mode 100644 (file)
index 7fa039c..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-\part{Présentation de Nit}\r
-\r
-\chapter{Caractéristiques}\r
-Nit est un langage de programmation orienté objet dont la syntaxe est proche de celle des langages de scripts. Le but de Nit est de proposer un langage de programmation robuste à typage statique, où la structure n'est pas une torture.\r
-\begin{description}\r
-       \item[Nit est compilé]Le code source de Nit est compilé pour être ensuite traduit en C.\r
-       \item[Nit est orienté objet]Comme la plupart des langages récents, Nit est orienté objet. Chaque fichier source contient la définition d'une ou plusieurs classes qui sont utilisées les unes avec les autres pour former une application. En Nit, TOUT est objet (Et oui même a = 0, c'est de l'objet).\r
-       \item[Nit supporte l'héritage multiple]Avec Nit il est possible de faire hériter une classe de plusieurs classes parentes, et bien d'autres choses plus intéressantes encore !\r
-       \item[Nit est fortement typé]Toutes les variables sont statiquement typées mais Nit utilise le typage adaptatif. C'est à dire qu'il devinera automatiquement et adaptera le type statique d'une variable en fonction de son utilisation dans le programme. Il n'est donc plus nécessaire de spécifier un type à chaque déclaration (mais cela reste possible). Le typage fort n'est plus une torture !\r
-       \item[Nit assure la gestion de la mémoire]L'allocation de la mémoire pour un objet est automatique à sa création et Nit récupère automatiquement la mémoire utilisée grâce à un ramasse miette qui restitue les zones de mémoires laissées libres suite à la destruction des objets.\r
-\end{description}\r
-\r
-\begin{quote}\r
-\centering\r
-    \textsc{\textbf{Nit : A Fun Language for Serious Programming !}}\r
-\end{quote}\r
-\r
-\chapter{Historique}\r
-Nit est le descendant direct de PRM développé en 2005 au LIRMM en France. Il s'agissait d'un langage jouet servant à expérimenter des traits de langage et des techniques d'implémentation.\r
-\r
-En 2008 nait Nit un langage plus généraliste développé conjointement à l'UQAM et au LIRMM. Il étend PRM en y ajoutant utilisabilité et robustesse.\r
-\r
-Aujourd'hui, en 2011, le développement de Nit continue...\r
-\r
-\r
-\chapter{Installation de Nit}\r
-Le compilateur Nit est librement accessible grâce à git : \r
-\begin{description}\r
-       \item[Protocole GIT]\url{git://nitlanguage.org/nit.git}\r
-       \item[Protocole HTTP]\url{http://nitlanguage.org/nit.git}\r
-\end{description}\r
-\r
-La documentation de la librairie standard se trouve sur le site web de Nit : \url{http://nitlanguage.org/}\r
-\r
-Pour télécharger le compilateur :\r
-\begin{lstlisting}[language=bash]\r
-$ git clone git://nitlanguage.org/nit.git\r
-\end{lstlisting}\r
-ou\r
-\begin{lstlisting}[language=bash]\r
-$ git clone http://nitlanguage.org/nit.git\r
-\end{lstlisting}\r
-\r
-Il faut maintenant compiler le compilateur :\r
\r
-\begin{lstlisting}[language=bash,firstnumber=last]\r
-$ cd nit\r
-$ make\r
-\end{lstlisting}\r
-\r
-Ça y est, le compilateur Nit est maintenant installé sur votre ordinateur !\r
-\r
-\chapter{Compilation et exécution}\r
-Un programme Nit est composé d'un ou plus généralement plusieurs fichiers source. N'importe quel éditeur de texte peut être utilisé pour modifier un fichier Nit.\r
-\r
-Ces fichiers source possèdent l'extension \og .nit \fg. Ils peuvent contenir du code, une ou plusieurs classes et/ou modules.\r
-\r
-Il est nécessaire de compiler le source pour pouvoir l'exécuter. Le compilateur \textbf{nitc} est utilisé pour compiler chaque fichier source en code exécutable par la machine. Lors de la compilation, les fichiers sources écrits en Nit seront transformés en C pour être exécutés.\r
-\r
-Commençons par créer le classique Hello World dans le fichier hello\_world.nit :\r
-\lstinputlisting[language=Nit]{./presentation/listings/hello_world_s.nit}\r
-\r
-A présent il faut le compiler :\r
-\begin{lstlisting}[language=bash]\r
-$ bin/nitc hello_world.nit\r
-\end{lstlisting}\r
-\r
-Puis l'exécuter comme on le ferait en C :\r
-\begin{lstlisting}[language=bash,firstnumber=last]\r
-$ ./hello_world\r
-\end{lstlisting}
\ No newline at end of file
diff --git a/doc/developpez/syntaxe/listings/array2_c.nit b/doc/developpez/syntaxe/listings/array2_c.nit
deleted file mode 100644 (file)
index e09ea1a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-var tableau = ["toto", "titi", "tata"]
-
-for case in tableau do
-       print case #toto, titi, tata
-end
diff --git a/doc/developpez/syntaxe/listings/array_c.nit b/doc/developpez/syntaxe/listings/array_c.nit
deleted file mode 100644 (file)
index 29c82ff..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-var tableau = new Array[String]
-
-tableau[0] = "toto"
-tableau[1] = "tata"
-
-print tableau[0] #Affiche "toto"
-print tableau[1] #Affiche "tata"
diff --git a/doc/developpez/syntaxe/listings/assert_c.nit b/doc/developpez/syntaxe/listings/assert_c.nit
deleted file mode 100644 (file)
index 964eedb..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-var i = -1
-
-assert etiquette: i > 0 else
-       print "Erreur fatale, i ne devrait pas être négatif"
-end
-# Retoune une erreur d'exécution : Assert 'etiquette' failed
diff --git a/doc/developpez/syntaxe/listings/break_c.nit b/doc/developpez/syntaxe/listings/break_c.nit
deleted file mode 100644 (file)
index 51a0330..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-for i in [0..100] do
-       if i > 4 then
-               break
-       end
-       print i
-end
-#Affiche 0,1,2,3,4
diff --git a/doc/developpez/syntaxe/listings/char1_c.nit b/doc/developpez/syntaxe/listings/char1_c.nit
deleted file mode 100644 (file)
index d6eedd0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var char:Char = 'a'
diff --git a/doc/developpez/syntaxe/listings/chariot_s.nit b/doc/developpez/syntaxe/listings/chariot_s.nit
deleted file mode 100644 (file)
index 24b8532..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-if x then foo
-if x then 
-       foo
-end
diff --git a/doc/developpez/syntaxe/listings/comment_s.nit b/doc/developpez/syntaxe/listings/comment_s.nit
deleted file mode 100644 (file)
index 61f5759..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#Commentaire sur une ligne
-var maVar = 1 #Commentaire en fin de ligne
diff --git a/doc/developpez/syntaxe/listings/continue_c.nit b/doc/developpez/syntaxe/listings/continue_c.nit
deleted file mode 100644 (file)
index 0753bcb..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-for i in [0..10] do
-       if i%2 != 0 then
-               continue
-       end
-       print i
-end
-#Affiche 0,2,4,6,8,10
diff --git a/doc/developpez/syntaxe/listings/declaration_s.nit b/doc/developpez/syntaxe/listings/declaration_s.nit
deleted file mode 100644 (file)
index 0f362e7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-var x:Int
-x = 0
-var x:Int = 0
-var x = 0
diff --git a/doc/developpez/syntaxe/listings/do_c.nit b/doc/developpez/syntaxe/listings/do_c.nit
deleted file mode 100644 (file)
index ecf8db9..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-do
-       var x = 5
-       print x # Affiche 5
-end
-# x n'est plus défini à partir d'ici
diff --git a/doc/developpez/syntaxe/listings/for_c.nit b/doc/developpez/syntaxe/listings/for_c.nit
deleted file mode 100644 (file)
index cf37b73..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-for i in [0..5] do
-       print i
-end
-#Affiche 0 1 2 3 4 5
-
-var debut = 0
-var fin = 5
-for i in [debut..fin] do
-       print i
-end
-#Affiche 0 1 2 3 4 5
-
-for i in [10*0..10-5] do
-       print i
-end
-#Affiche 0 1 2 3 4 5
-
-for i in [1, 3, 5] do print i #Affiche 1 3 5
diff --git a/doc/developpez/syntaxe/listings/if_c.nit b/doc/developpez/syntaxe/listings/if_c.nit
deleted file mode 100644 (file)
index 39aab0d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-var booleen = true
-if booleen then
-       print "Le booléen vaut TRUE !"
-else
-       print "Le booléen vaut FALSE !"
-end
-#Affiche "Le booléen vaut TRUE !"
-
-var ma_var = 1
-if ma_var < 0 then 
-       print "ma_var est negative"
-else if ma_var > 0 then
-       print "ma_var est positive"
-else
-       print "ma_var = 0"
-end
-#Affiche "ma_var est positive"
diff --git a/doc/developpez/syntaxe/listings/label_c.nit b/doc/developpez/syntaxe/listings/label_c.nit
deleted file mode 100644 (file)
index 7bab0d8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-var largeur = 3
-var hauteur = 3
-
-for i in [0..largeur] do
-       for j in [0..hauteur] do
-               if i > 2 then break label boucle_largeur
-       end
-end label boucle_largeur
diff --git a/doc/developpez/syntaxe/listings/loop_c.nit b/doc/developpez/syntaxe/listings/loop_c.nit
deleted file mode 100644 (file)
index de1cc41..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-var i = 0
-
-loop
-       print i
-       i += 1
-       
-       if i > 5 then break
-end
-# Affiche 0 1 2 3 4 5
diff --git a/doc/developpez/syntaxe/listings/new_s.nit b/doc/developpez/syntaxe/listings/new_s.nit
deleted file mode 100644 (file)
index 67867ce..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var instance = new MaClasse
diff --git a/doc/developpez/syntaxe/listings/nullable_c.nit b/doc/developpez/syntaxe/listings/nullable_c.nit
deleted file mode 100644 (file)
index 1865f86..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var x:nullable Int
diff --git a/doc/developpez/syntaxe/listings/string2_c.nit b/doc/developpez/syntaxe/listings/string2_c.nit
deleted file mode 100644 (file)
index 533c6f1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-var s1 = "Dave"
-var s2 = "Da" + "ve"
-
-print s1 == s2 #true
diff --git a/doc/developpez/syntaxe/listings/string3_c.nit b/doc/developpez/syntaxe/listings/string3_c.nit
deleted file mode 100644 (file)
index 77919fd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-var chaine = "toto"
-
-print chaine[0] # Affiche "t"
diff --git a/doc/developpez/syntaxe/listings/string4_c.nit b/doc/developpez/syntaxe/listings/string4_c.nit
deleted file mode 100644 (file)
index 13d4df6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-print "NIT is a fun language ! "*4
diff --git a/doc/developpez/syntaxe/listings/string_c.nit b/doc/developpez/syntaxe/listings/string_c.nit
deleted file mode 100644 (file)
index b259a1b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-var string:String = "Hello World"
-
-print string.to_upper # Affiche "HELLO WORLD"
-
-string += "Coucou" + "!"
-
-print " Une voiture possède : " + 4.to_s + "roues"
-
-var prenom = "David"
-print "Bonjour {prenom.to_upper}! " # Affiche "Bonjour DAVID!"
-
-print " La valeur de Pi est d'environ{3.14}..."
diff --git a/doc/developpez/syntaxe/listings/typage2_c.nit b/doc/developpez/syntaxe/listings/typage2_c.nit
deleted file mode 100644 (file)
index 5d36596..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# Exemple simple
-var x: Object = "une string"
-if x isa Int then
-       # Le type statique de x devient Int
-       print x * 10 # Ok
-end
-
-# Exemple basé sur les opérateurs booléens
-var a: Array[Object] = new Array[Object]
-
-for i in a do
-       # Le type statique de i est Object
-       if not i isa Int then continue
-       # Le type statique de i devient Int
-       print i * 10 # Ok
-end
-
-# Encore plus fort
-var max = 0
-
-for i in a do
-       if i isa Int and i > max then max = 1
-       # Le > est valide puisque dans la partie à gauche du 'and' le type statique de i est Int
-end
diff --git a/doc/developpez/syntaxe/listings/typage3_c.nit b/doc/developpez/syntaxe/listings/typage3_c.nit
deleted file mode 100644 (file)
index ceaa2a2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-var x : nullable Int = 10
-
-if x != null then
-       # Ici le type statique de x devient Int (sans nullable)
-       print x + 6
-end
-# Le type statique de x redevient nullable Int
diff --git a/doc/developpez/syntaxe/listings/typage_c.nit b/doc/developpez/syntaxe/listings/typage_c.nit
deleted file mode 100644 (file)
index 1c6c397..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-var x # Déclaration d'une variable locale
-
-x = 5 # Le type statique de x devient Int
-print x + 1 # Affiche 6
-
-x = [6, 7] # Le type statique de x devient Array[Int]
-print x[0] # Affiche 6
diff --git a/doc/developpez/syntaxe/listings/var_c.nit b/doc/developpez/syntaxe/listings/var_c.nit
deleted file mode 100644 (file)
index 1e20958..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-var ma_var
-var ma_VAR
diff --git a/doc/developpez/syntaxe/listings/while_c.nit b/doc/developpez/syntaxe/listings/while_c.nit
deleted file mode 100644 (file)
index 097ba67..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-var i = 0
-while i < 5 do
-       print i
-       i += 1
-end
-#Affiche 0 1 2 3 4 5
-
-while true do print "boucle infinie..."
diff --git a/doc/developpez/syntaxe/syntaxe.tex b/doc/developpez/syntaxe/syntaxe.tex
deleted file mode 100644 (file)
index b9ec45e..0000000
+++ /dev/null
@@ -1,434 +0,0 @@
-\part{Syntaxe et éléments de base de Nit}\r
-\r
-\chapter{Syntaxe}\r
-\r
-\section{Nit est sensible à la casse}\r
-Nit est sensible à la casse :\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/var_c.nit}\r
-Ici |ma_var| et |ma_VAR| sont deux variables différentes.\r
-\r
-\section{Retours chariots}\r
-Avec Nit, les retours chariots ont du sens !\r
-\r
-Exemple \og One Liner \fg :\r
-\lstinputlisting[language=Nit,linerange=1-1]{./syntaxe/listings/chariot_s.nit}\r
-Exemple \og Bloc \fg :\r
-\lstinputlisting[language=Nit,linerange=2-4]{./syntaxe/listings/chariot_s.nit}\r
-\r
-Notez que l'indentation est ignorée du compilateur mais elle permet une meilleure compréhension du code par le programmeur, il est donc conseillé de bien indenter son code !\r
-\r
-\pagebreak\r
-\r
-\section{Identificateurs}\r
-\r
-Chaque objet, classe, module ou variable est associé à un nom : l'\textbf{identificateur} qui peut se composer de tous les caractères alphanumériques et du caractère de soulignement (\_). Le premier caractère doit être une lettre ou le caractère de soulignement. \r
-\r
-Attention : Le compilateur lèvera une exception si une variable commence par une majuscule.\r
-\r
-Un identificateur ne peut pas appartenir à la liste des mots clés réservés du langage Nit :\r
-\begin{multicols}{4}\r
-  \begin{itemize}\r
-      \item |abort|\r
-      \item |abstract|\r
-      \item |and|\r
-      \item |as|\r
-      \item |assert|\r
-      \item |break|\r
-      \item |class|\r
-      \item |continue|\r
-      \item |do|\r
-      \item |else|\r
-      \item |end|\r
-      \item |extern|\r
-      \item |false|\r
-      \item |for|\r
-      \item |fun|\r
-      \item |if|\r
-      \item |import|\r
-      \item |in|\r
-      \item |init|\r
-      \item |interface|\r
-      \item |intern|\r
-      \item |intrude|\r
-      \item |is|\r
-      \item |isa|\r
-      \item |isset|\r
-      \item |loop|\r
-      \item |label|\r
-      \item |new|\r
-      \item |not|\r
-      \item |null|\r
-      \item |nullable|\r
-      \item |once|\r
-      \item |or|\r
-      \item |package|\r
-      \item |print|\r
-      \item |private|\r
-      \item |protected|\r
-      \item |readable|\r
-      \item |redef|\r
-      \item |return|\r
-      \item |self|\r
-      \item |special|\r
-      \item |super|\r
-      \item |then|\r
-      \item |true|\r
-      \item |type|\r
-      \item |universal|\r
-      \item |var|\r
-      \item |while|\r
-      \item |writable|\r
-  \end{itemize}\r
-\end{multicols}\r
-\r
-\section{Convention d'écriture}\r
-\r
-Quelques règles pour l'écriture d'un programme en Nit :\r
-\begin{itemize}\r
-    \item On préfèrera utiliser la notation basée sur le soulignement pour les variables. Par exemple : |ma_variable| ;\r
-    \item Les types, comme les noms des classes seront écrits en \og CamelCase \fg. Par exemple : |MaClasse| ;\r
-    \item L'indentation est faite avec le caractère de tabulation et est affichée comme 8 espaces ;\r
-    \item Les opérateurs sont entourés d'espaces. Par exemple : |4 + 5| ou |x = 5| ;\r
-    \item Les spécificateurs de type (|:|) et les virgules (|,|) ont un espace après mais pas avant. Par exemple : |var x: X| ou |[1, 2, 3]| ;\r
-    \item Les parenthèses (|()|) et les crochets (|[]|) ne prennent pas d'espaces ;\r
-    \item Le |do| des méthodes se trouve sur sa propre ligne et n'est pas indenté ;\r
-    \item Le |do| des boucles se trouve sur la même ligne que la déclaration de la boucle ;\r
-\end{itemize}\r
-\r
-\section{Commentaires}\r
-Les commentaires ne sont pas pris en compte par le compilateur. En Nit il existe seulement des commentaires sur une seule ligne grâce au caractère |#|. \r
-Il peuvent s'utiliser seulement sur une ligne ou alors en fin de ligne comme le montre l'exemple suivant : \r
-\lstinputlisting[language=Nit]{./syntaxe/listings/comment_s.nit}\r
-\r
-A l'heure actuelle, Nit ne supporte pas les commentaires multi-lignes.\r
-\r
-\chapter{Éléments de base de Nit}\r
-\r
-\section{Déclaration et utilisation des variables}\r
-\r
-Une variable possède un nom, un type et une valeur. Une variable est accessible et utilisable dans le bloc où elle est définie.\r
-\r
-La déclaration d'une variable permet de réserver une zone de la mémoire pour y stocker une valeur.\r
-\r
-En Nit les types peuvent être optionnels dans une déclaration. En effet, Nit est un langage statiquement typé par type adaptatif. C'est à dire qu'il est capable de \og deviner \fg le type de la variable déclarée en fonction de son utilisation.\r
-\r
-Déclaration et affectation sur deux lignes en précisant le type :\r
-\lstinputlisting[language=Nit, linerange=1-2]{./syntaxe/listings/declaration_s.nit}\r
-Déclaration et affectation sur une seule ligne en précisant le type :\r
-\lstinputlisting[language=Nit, linerange=3-3]{./syntaxe/listings/declaration_s.nit}\r
-Déclaration et affectation sur une seule ligne sans préciser le type :\r
-\lstinputlisting[language=Nit, linerange=4-4]{./syntaxe/listings/declaration_s.nit}\r
-\r
-Ces trois exemples reviennent strictement au même. Dans le dernier exemple, lorsque l'on affecte 0 à la variable x, Nit comprend que |x| est de type |Int|.\r
-\r
-Rappel : Les noms de variables en Nit peuvent commencer par une lettre ou par le caractères de soulignement. Le reste du nom peut comporter des lettres ou des nombres mais jamais d'espace.\r
-\r
-Nit est un langage à typage rigoureux qui ne possède pas de transtypage automatique lorsque ce transtypage risque de conduire à une perte d'information ou à une erreur d'exécution.\r
-\r
-Pour les objets, il est nécessaire en plus de la déclaration de la variable, de créer un objet avant de pouvoir l'utiliser. Il faut réserver de la mémoire pour la création d'un objet avec l'instruction |new|. Si l'objet n'est plus utilisé, la libération de la mémoire se fait automatiquement grâce au ramasse miettes.\r
-\r
-Exemple d'utilisation du mot clé |new| :\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/new_s.nit}\r
-\r
-Vous remarquerez qu'en Nit, il n'est pas nécessaire d'utiliser les parenthèses si le constructeur ne prend pas de paramètres.\r
-\r
-\section{Type nullable}\r
-Pour éviter les exceptions |nullPointerException| qui peuvent être fréquentes sur d'autres langages, Nit impose au développeur de préciser si une variable a le droit de prendre la valeur |null|.\r
-\r
-Pour préciser qu'une variable peut prendre la valeur |null|, il faut utiliser le mot clé |nullable|.\r
-\r
-Exemple :\r
-\lstinputlisting[language=Nit, linerange=1]{./syntaxe/listings/nullable_c.nit}\r
-\r
-En Nit, toute variable déclarée |nullable| mais qui n'a pas été initialisé a la valeur par défaut |null|. A l'inverse, une variable qui n'est pas déclarée |nullable| et n'est pas initialisée avant d'être utilisée provoquera une erreur de compilation.\r
-\r
-\section{Affectation}\r
-Le signe |=| est l'opérateur d'affectation et s'utilise avec une expression de la forme |variable = expression|.\r
-\r
-Il existe des opérateurs qui permettent de simplifier l'écriture d'une opération d'affectation associée à un opérateur mathématique :\r
-\r
-\begin{tabularx}{\linewidth}{|c|c|X|}\r
-       \hline\r
-       \textbf{Opérateur} & \textbf{Exemple} & \textbf{Signification} \\\r
-       \hline\r
-       = & a = 10 & équivalent à : a = 10 \\\r
-       \hline\r
-       += & a += 10 & équivalent à : a = a + 10 \\\r
-       \hline\r
-       -= & a -= 10 & équivalent à : a = a - 10 \\\r
-       \hline\r
-\end{tabularx}\r
-\r
-\pagebreak\r
-\r
-\section{Comparaison}\r
-\r
-Nit propose les opérateurs pour toutes les comparaisons :\r
-\r
-\begin{tabularx}{\linewidth}{|c|c|X|}\r
-       \hline\r
-       \textbf{Opérateur} & \textbf{Exemple} & \textbf{Signification} \\\r
-       \hline\r
-       > & a > 10 & strictement supérieur \\\r
-       \hline\r
-       < & a < 10 & strictement inférieur \\\r
-       \hline\r
-       >= & a >= 10 & supérieur ou égal\\\r
-       \hline\r
-       <= & a <= 10 & inférieur ou égal\\\r
-       \hline\r
-       == & a <= 10 & égal\\\r
-       \hline\r
-    != & a != 10 & différent de\\\r
-       \hline\r
-       and & a and b & ET logique (pour expressions booléennes) : \newline l'évaluation de l'expression cesse dés qu'elle devient fausse\\\r
-       \hline\r
-       or & a or b & OU logique (pour expressions booléennes) : \newline l'évaluation de l'expression cesse dés qu'elle devient vraie\\\r
-       \hline\r
-    not & not b & NON logique\\\r
-    \hline\r
-\end{tabularx}\r
-\r
-\r
-\section{Priorité des opérateurs}\r
-\r
-Les opérateurs sont exécutés dans l'ordre suivant à l'intérieur d'une expression qui est analysée de gauche à droite :\r
-\begin{itemize}\r
-      \item multiplication, division et reste de division (modulo)\r
-      \item addition et soustraction\r
-      \item comparaison\r
-      \item le signe |=| d'affectation d'une valeur à une variable\r
-      \item NON logique\r
-      \item ET logique\r
-      \item OU logique\r
-\end{itemize}\r
-\r
-L'usage des parenthèses permet de modifier cet ordre de priorité.\r
-       \r
-\section{Structures de contrôles}\r
-\r
-Comme les autres langages de développement, Nit propose un ensemble d'instructions qui permettent d'organiser et de structurer les traitements. L'usage de ces instructions est similaire à celui rencontré à leur équivalent dans d'autres langages.\r
-\r
-\subsection{Boucles}\r
-\subsubsection{While}\r
-Dans une boucle |while|, le code est exécuté tant que la condition est vraie. Si avant l'instruction |while|, le booléen est faux, alors le code de la boucle ne sera jamais exécuté.\r
-\r
-Exemple :\r
-\lstinputlisting[language=Nit, linerange=1-6]{./syntaxe/listings/while_c.nit}\r
-\r
-Le |while| peut aussi s'écrire sur une seule ligne :\r
-\lstinputlisting[language=Nit, linerange=8]{./syntaxe/listings/while_c.nit}\r
-\r
-\subsubsection{For}\r
-En Nit, TOUT est objet et même les structures de contrôle. Ceci amène donc à une syntaxe un peu particulière. Ne vous en faites pas, on s'y fait !\r
-\r
-Voici donc la syntaxe d'une boucle |for| :\r
-\lstinputlisting[language=Nit, linerange=1-4]{./syntaxe/listings/for_c.nit}\r
-\r
-On peut bien sûr utiliser des variables pour créer nos boucles :\r
-\lstinputlisting[language=Nit, linerange=6-11]{./syntaxe/listings/for_c.nit}\r
-\r
-Ou même des expressions :\r
-\lstinputlisting[language=Nit, linerange=13-16]{./syntaxe/listings/for_c.nit}\r
-\r
-Le |for| peut lui aussi s'écrire sur une ligne :\r
-\lstinputlisting[language=Nit, linerange=18]{./syntaxe/listings/for_c.nit}\r
-\r
-\subsubsection{Loop}\r
-Les boucles infinies sont souvent utilisés accompagnées de l'instruction |break|. Elles sont utiles pour implémenter les boucles de type \og jusqu'à \fg \textit{untill} ou pour simuler le \textit{exit when} de Ada.\r
-\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/loop_c.nit}\r
-\r
-\subsection{Blocs do}\r
-Le |do| simple peut être utilisé pour déclarer des blocs de code ou jouer avec la portée des variables.\r
-\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/do_c.nit}\r
-\r
-\subsection{Branchements conditionnels}\r
-Avec Nit il n'existe qu'un seul type de branchement conditionnel : le |if|. On peut l'utiliser avec ou sans clause |else|. \r
-\r
-Exemple :\r
-\lstinputlisting[language=Nit, linerange=1-7]{./syntaxe/listings/if_c.nit}\r
-\r
-On peut aussi utiliser des clauses |else if| pour chaîner plusieurs tests :\r
-\lstinputlisting[language=Nit, linerange=9-17]{./syntaxe/listings/if_c.nit}\r
-\r
-Attention : Si on utilise un |else| ou un |else if|, l'instruction ne peut pas être écrit \textit{On Liner}.\r
-\r
-\subsection{Débranchements}\r
-|continue| permet de passer immédiatement à l'itération suivante dans une boucle |for|, |while| ou |loop| :\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/continue_c.nit}\r
-\r
-|break| permet de quitter immédiatement une boucle |for|, |while|, |loop| ou un bloc |do| :\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/break_c.nit}\r
-\r
-Des labels peuvent être utilisés pour spécifier sur quel élément |for|, |while|, |loop| ou |do| doit agir le break :\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/label_c.nit}\r
-\r
-On peut aussi utiliser les labels de la même manière avec l'instruction |continue|.\r
-\r
-\subsection{Arrêt du programme}\r
-L'instruction |abort| permet d'arrêter le programme en lançant une erreur fatale.\r
-\r
-\subsection{Assertions}\r
-L'instruction |assert| vérifie si une expression booléenne est vrai, sinon elle arrêtera le programme comme |abort|. Elle peut être combinée à une clause |else| pour exécuter du code avant d'arrêter le programme :\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/assert_c.nit}\r
-\r
-Comme on peut le voir dans l'exemple précédent, une étiquette peut être précisée pour être affichée dans le message d'erreur.\r
-\r
-\section{Tableaux}\r
-Les tableaux permettent de stocker un ensemble de valeur du même type dans la même variable. En Nit, la classe de base pour manipuler les tableaux est la classe |Array|. \r
-\r
-\subsection{Déclaration des tableaux}\r
-Pour commencer, il va falloir instancier la classe |Array|. Chaque instance de |Array| ne peut contenir qu'un seul type de variable à la fois. Il faut préciser le type lors de l'instanciation grâce aux crochets |[]|.\r
-\r
-\lstinputlisting[language=Nit, linerange=1]{./syntaxe/listings/array_c.nit}\r
-\r
-Il est ensuite possible d'ajouter des valeurs dans le tableau en précisant dans quelle case du tableau on souhaite ajouter la valeur en utilisant l'opérateur |[]|. \r
-\r
-Exemple :\r
-\lstinputlisting[language=Nit, linerange=3-4, firstnumber=last]{./syntaxe/listings/array_c.nit}\r
-\r
-Ce même opérateur permet de récupérer les valeurs du tableau :\r
-\lstinputlisting[language=Nit, linerange=6-7, firstnumber=last]{./syntaxe/listings/array_c.nit}\r
-\r
-Attention, en Nit, la première case du tableau est la case 0 !\r
-\r
-\subsection{Parcours d'un tableau}\r
-On peut parcourir les tableaux grâce à une boucle |for| :\r
-\lstinputlisting[language=Nit, linerange=3-5, firstnumber=last]{./syntaxe/listings/array2_c.nit}\r
-\r
-\subsection{Initialisation explicite d'un tableau}\r
-Il existe une manière plus rapide de créer les tableaux en initialisant explicitement le tableau avec les valeurs qu'il doit contenir.\r
-\r
-\lstinputlisting[language=Nit, linerange=1]{./syntaxe/listings/array2_c.nit}\r
-\r
-%\section{Intervalles}\r
-%TODO vérifier et faire\r
-%Il est possible de déclarer des intervalles |Range| basés sur des types discrets (comme |Int| par exemple). Il existe deux types d'intervalles : les intervalles ouverts |[1..5[| qui excluent le dernier élément, et les intervalles fermés |[1..5]| qui incluent le dernier élément.\r
-\r
-%Par exemple :\r
-\r
-\r
-\section{Conversions de types}\r
-En Nit, il n'existe pas de mot clé de transtypage. Les conversions de types se font par des méthodes. La bibliothèque standard fournit une série de classes qui contiennent des méthodes de manipulation et de conversion de types.\r
-\r
-\begin{tabularx}{\linewidth}{|c|X|}\r
-       \hline\r
-       \textbf{Classe} & \textbf{Rôle} \\\r
-       \hline\r
-       \textit{Char} & pour les caractères \\\r
-       \hline\r
-       \textit{String} & pour les chaînes de caractères \\\r
-       \hline\r
-       \textit{Int} & pour les entiers \\\r
-       \hline\r
-       \textit{Float} & pour les nombres à virgule flottante \\\r
-       \hline\r
-\end{tabularx}\r
-\r
-Par exemple la classe \textit{Int} propose les méthodes suivantes :\r
-\begin{description}\r
-       \item[Int.to\_c: Char] Retourne le caractère correspondant.\r
-       \item[Int.to\_f: Float] Retourne l'entier sous forme de |Float|.\r
-       \item[Int.to\_s: String] Retourne l'entier sous forme de |String|.\r
-\end{description}\r
-\r
-\section{Manipulation de chaînes de caractères}\r
-\subsection{Char et String}\r
-La définition d'un caractère se fait grâce au type |Char|.\r
-\r
-Pour assigner explicitement un caractère à une variable de type |Char|, il faut utiliser l'apostrophe |'|.\r
-\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/char1_c.nit}\r
-\r
-La définition d'une chaine de caractères se fait grâce au type |String|.\r
-\r
-Pour assigner explicitement un caractère à une variable de type |String|, il faut utiliser les guillemets |"|.\r
-\r
-\lstinputlisting[language=Nit, linerange=1-1]{./syntaxe/listings/string_c.nit}\r
-\r
-Les variables de type |Char| et |String| sont des objets. Partout où des constantes de caractères ou de chaînes figurent entre guillemets, le compilateur Nit génère l'objet correspondant avec le contenu spécifié. Il est donc possible d'écrire :\r
-\lstinputlisting[language=Nit, linerange=3-3, firstnumber=last]{./syntaxe/listings/string_c.nit}\r
-\r
-Bien que |Char| et |String| soient des classes, ils ne possèdent pas de constructeurs, il n'est donc pas possible de les initialiser en appelant la méthode |init|.\r
-\r
-Attention, Nit ne supporte que l'encodage UTF-8 !\r
-\r
-\subsection{Caractères spéciaux}\r
-\r
-Dans une chaîne de caractères, plusieurs caractères particuliers doivent être échappés grâce au caractère |\| pour être utilisés. \r
-\r
-Le tableau ci-dessous recense les principaux caractères à échapper :\r
-\r
-\begin{center}  \r
-  \begin{tabular}{|c|c|}\r
-      \hline\r
-      \textbf{Caractères spéciaux} & \textbf{Affichage} \\\r
-      \hline\r
-      ' & apostrophe \\\r
-      \hline\r
-      " & guillemet \\\r
-      \hline\r
-      \lstinline!\! & antislash \\\r
-      \hline\r
-      \lstinline!\t! & tabulation \\\r
-      \hline\r
-      \lstinline!\b! & retour arrière (backspace) \\\r
-      \hline\r
-      \lstinline!\r! & retour chariot \\\r
-      \hline\r
-      \lstinline!\f! & saut de page \\\r
-      \hline\r
-      \lstinline!\n! & saut de ligne \\\r
-      \hline\r
-  \end{tabular}\r
-\end{center}\r
-\r
-\subsection{Concaténation de chaînes de caractères}\r
-\r
-Il est possible de concaténer des chaînes de caractères à l'aide  de l'opérateur |+| et de le combiner à l'opérateur d'affectation |=|.\r
-\r
-\lstinputlisting[language=Nit, linerange=5-5, firstnumber=last]{./syntaxe/listings/string_c.nit}\r
-\r
-Pour concaténer un autre type avec un string, il faut faire appel à la méthode |to_s|.\r
-\r
-Par exemple avec un Int :\r
-\lstinputlisting[language=Nit, linerange=7-7]{./syntaxe/listings/string_c.nit}\r
-\r
-Une notation particulière permet d'inclure une variable ou une expression dans une chaine de caractères :\r
-\lstinputlisting[language=Nit, linerange=9-10]{./syntaxe/listings/string_c.nit}\r
-\r
-La notation allégée appelle implicitement la méthode |to_s| sur les types autres que |String| :\r
-\lstinputlisting[language=Nit, linerange=12-12]{./syntaxe/listings/string_c.nit}\r
-\r
-La notation allégée sera préférée puisqu'elle est plus lisible mais aussi bien plus performante car traitée différemment pas le compilateur.\r
-\r
-\subsection{Comparaison de chaînes de caractères}\r
-\r
-En Nit il est possible de comparer deux chaînes de caractères directement grâce à l'opérateur |==|. Contrairement à Java par exemple, Nit va comparer la valeur des objets String est non pas les références vers les objets.\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/string2_c.nit}\r
-\r
-\subsection{Autres opérations sur les chaînes de caractères}\r
-Les méthodes |to_upper| et |to_lower| permettent respectivement d'obtenir une chaîne toute en majuscule ou toute en minuscule.\r
-\r
-La méthodes |length| permet d'obtenir la taille de la chaîne.\r
-\r
-On peut accéder aux caractères d'une chaine en utilisant la notation en tableau :\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/string3_c.nit}\r
-\r
-Enfin, il est possible de répéter une chaine de caractères grâce à l'opérateur de multiplication |*| :\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/string4_c.nit}\r
-\r
-\chapter{Typage Adaptatif}\r
-\label{typage-adaptatif}\r
-Nit est le premier langage à introduire la notion de \textbf{typage adaptatif}. Le principe est que le type statique d'une variable peut changer en fonction de l'assignation des variables et du contrôle de flot.\r
-\r
-Par exemple :\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/typage_c.nit}\r
-\r
-Les instructions de contrôle de flot vont elles aussi agir sur le typage de la variable :\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/typage2_c.nit}\r
-\r
-Le typage adaptatif fonctionne aussi avec les types nullables :\r
-\lstinputlisting[language=Nit]{./syntaxe/listings/typage3_c.nit}
\ No newline at end of file
diff --git a/doc/nitreference/nitlanguage.sty b/doc/nitreference/nitlanguage.sty
deleted file mode 100644 (file)
index ef024ec..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-% This file is part of Nit ( http://www.nitlanguage.org ).
-%
-% Copyright 2011 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.
-
-\usepackage{lmodern} % because there is a bizarre 'pdfTeX error (font expansion): auto expansion is only possible with scalable fonts' unless
-\usepackage{listings} % because we extends it
-\usepackage{xcolor} % because we like colors
-
-% definition of the nit language
-\lstdefinelanguage{nit}{%
-keywords={import,class,interface,universal,super,fun,var,redef,protected,private,module,init,do,end,new,%
-               return,if,then,else,while,for,loop,in,isa,isset,break,continue,label,%
-               is,abstract,self,true,false,null,nullable,writable,assert,and,or,not,extern,intern},%
-morecomment=[l]{\#},%
-morestring=[b]",%
-}
-
-% disable spaces ij strings by default
-\lstset{showstringspaces=false}
-
-% easy nice environement for nit listings
-\lstnewenvironment{lst}[1][]{%
-       \lstset{basicstyle=\scriptsize\ttfamily,%
-       keywordstyle=\bf\color{blue!30!black},%
-       commentstyle=\itshape\color{green!30!black},%
-       language=nit,%
-       backgroundcolor=\color{black!10},%
-       moredelim=[is][\color{yellow!30!black}]{@}{@},%
-       tabsize=3,%
-       #1}}{}
-
-% makes @ a nice shortcut for inline Nit code
-%\lstMakeShortInline[basicstyle=\small\ttfamily\color{blue!30!black}]{@}
-
diff --git a/doc/nitreference/nitreference-main.tex b/doc/nitreference/nitreference-main.tex
deleted file mode 100644 (file)
index 22288a0..0000000
+++ /dev/null
@@ -1,1738 +0,0 @@
-% This file is part of Nit ( http://www.nitlanguage.org ).
-%
-% Copyright 2011 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.
-\noindent\textbf{A Concise Reference of the Nit Language}
-
-This document attempts to be as short as possible while covering all features of the language in deepth.
-It is not a real manual to learn the language since concepts are covered when required.
-Forward and backward references about concepts are written like this~\goto{redef} which means Section~\ref*{redef}.
-An index\goto{index} also lists concepts and keywords for an improved navigation.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Basic Syntax}\label{syntax}\label{end}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-The syntax of Nit belongs to the Pascal tradition and is inspired by various script languages (especially Ruby).
-Its objective is readability.
-
-Indentation is not meaningful in Nit; blocks usually starts by a specific keyword and finish with @end@.
-Newlines are only meaningful at the end of declarations, at the end of statements, and after some specific keywords.
-The philosophy is that the newline is ignored if something (a statement, a declaration, or whatever) obviously needs more input; while the newline terminates lines that seems completed.
-See the complete Nit grammar for more details.
-
-\begin{lst}
-print 1 + 1 # a first complete statement that outputs "2"
-print 2 + # the second statement is not yet finished
-2 # the end of the second statement, outputs "4"
-\end{lst}
-
-Nit tries to achieve some uniformity in its usage of the common punctuation:
-equal (@=@) is for assignment,
-double equal (@==@) is for equality test\goto{Bool}, 
-column (@:@) is for type declaration,
-dot (@.@) is for polymorphism\goto{call},
-comma (@,@) separates elements,
-and quad (@::@) is for explicit designation.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Identifiers}\label{identifier}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Identifiers of modules, variables, methods, attributes and labels must begin with a lowercase letter and can be followed by letters, digits, or underscores.
-However, the usage of uppercase letters (and camelcase) is discouraged and the usage of underscore to separate words in identifiers is preferred: @some_identifier@.
-
-Identifiers of classes and types must begin with a uppercase letter and can be followed by letters, digits, or underscores.
-However, in classes, the usage of camelcase is preferred while formal types should be written all in uppercases: @SomeClass@ and @SOME_VIRTUAL_TYPE@.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Style}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-While Nit does not enforce any kind of source code formatting, the following is encouraged:
-\begin{itemize}
-\item indentation is done with the tabulation character and is displayed as 8 spaces;
-\item lines are less than 80 characters long;
-\item binary operators have spaces around them: @4 + 5@, @x = 5@;
-\item columns (@:@) and commas (@,@) have a space after them but not before: @var x: X@, @[1, 2, 3]@;
-\item parenthesis and brackets do not need spaces around them;
-\item superfluous parenthesis should be avoided;
-\item the @do@ of methods\goto{fun} and the single @do@\goto{do} is on its own line and not indented;
-\item the other @do@ are not on a newline.
-\end{itemize}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Comments and Documentation}\label{comment}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-As in many script languages, comments begin with a sharp (@#@) and run up to the end of the line.
-Currently, there is no multiline-comments.
-
-A block of comments that precede any definition of module, class, or property, is considered as its documentation and will be displayed as such by the autodoc.
-At this point, documentation is displayed verbatim (no special formatting or meta-information).
-
-\begin{lst}
-# doc. of foo
-module foo
-
-# doc. of Bar
-class Bar
-       # doc. of baz
-       fun baz ...
-end
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Types, Literals and Operations}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Object}\label{Object}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Nit is a full object language.
-Each value is the instance of a class\goto{class}.
-Even the basic types described in this section.
-
-@Object@ is the root of the class hierarchy.
-All other classes, including the basic ones, are a specialization of @Object@.
-\goto{superclass}
-
-Classes\goto{class}, methods\goto{fun} and operators\goto{operator} presented in this section are defined in the standard Nit library that is implicitly imported in every module\goto{module}.
-Many other classes and methods are also defined in the standard library.
-Please look at the specific standard library documentation for all details.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Int and Float}\label{Int}\label{Float}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@1@, @-1@ are @Int@ literals, and @1.0@, @-0.1@ are @Float@ literals.
-Standard arithmetic operators are available with a common precedence rules: @*@, @/@, and @%@ (modulo) ; then @+@ and @-@. 
-Some operators can be composed with the assignment (@=@). \goto{operator}
-\begin{lst}
-var i = 5
-i += 2
-print i # outputs 7
-\end{lst}
-
-Conversion from @Int@ to @Float@ and @Float@ to @Int@ must be done with the @to_f@ and @to_i@ methods.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{String}\label{String}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Literal strings are enclosed within quotes (@"@).
-Common escaping sequences are available (@\n@, @\t@, etc.)
-To insert a value inside a literal string, include the values inside brackets (@{}@).
-@+@ is the concatenation operator but is less efficient than the bracket form.
-
-\begin{lst}
-var i = 5
-print "i={i}; i+1={i+1}" # outputs "i=5; i+1=6"
-\end{lst}
-
-All objects have a @to_s@ method that converts the object to a String.
-@print@ is a top-level method\goto{toplevel} that takes any number of arguments\goto{vararg} and prints to the standard output.
-@print@ always add a newline, another top-level method, @printn@, does not add the newline.
-
-\begin{lst}
-var x: String
-x = 5.to_s # -> the String "5"
-print x, 6 # outputs "56"
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Bool}\label{Bool}\label{is}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@true@ and @false@ are the only two @Bool@ values.
-Standard Boolean operators are available with the standard precedence rule: @not@; then @and@; then @or@.
-
-Common comparison operators are available: @==@ and @!=@ on all objects; @<@, @>@, @<=@, @>=@ and @<=>@ on @Comparable@ objects (which include @Int@, @String@ and others). \goto{operator}
-
-\begin{itemize}
-\item @==@, @<@, @>@, @<=@, @>=@ and @<=>@ are standard Nit operators (it means they are redefinable)\goto{operator}.
-\item @and@, @or@ and @not@ are not standard Nit operators: they are not redefinable, also they are lazy and have adaptive typing flow effects\goto{adaptive typing}.
-\item @==@ is not for reference equality but for value equality (like @equals@ in Java).
-There is a special reference equality operator, @is@, but it cannot be redefined and its usage is not recommended.
-Note also that while @==@ is redefinable, it has a special adaptive typing flow effect when used with @null@\goto{null}.
-\item @!=@ is not a standard Nit operator. In fact @x != y@ is syntactically equivalent to @not x == y@.
-\end{itemize}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Array}\label{Array}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@Array@ is a generic class\goto{generic}, thus @Array[Int]@ denotes an array of integers and @Array[Array[Bool]]@ denotes an array of array of Booleans.
-Literal arrays can be declared with the bracket notation (@[]@).
-Empty arrays can also be instantiated with the @new@\goto{new} keyword and elements added with the @add@ method.
-Elements can be retrieved or stored with the bracket operator\goto{operator}.
-
-\begin{lst}
-var a = [1, 2, 3, 4] # A literal array of integers
-print a.join(":") # outputs "1:2:3:4"
-var b = new Array[Int] # A new empty array of integers
-b.add(10)
-b.add_all(a)
-b.add(20)
-print b[0] # outputs "10"
-print b.length # outputs "6"
-b[1] = 30
-print b.join(", ") # outputs "10, 30, 2, 3, 4, 20"
-\end{lst}
-
-Note that the type of literal arrays is deduced using the static type combination rule\goto{combination}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Range}\label{Range}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@Range@ is also a generic class but accepts only @Discrete@ types (@Int@ is discrete).
-There are two kinds of literal ranges, the open one @[1..5[@ that excludes the last element, and the closed one @[1..5]@ that includes it.
-
-\begin{lst}
-print([1..5[.join(":")) # outputs "1:2:3:4"
-print([1..5].join(":")) # outputs "1:2:3:4:5"
-\end{lst}
-
-Ranges are mainly used in @for@ loops\goto{for}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{HashMap}\label{HashMap}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@HashMap@ is a generic class that associates keys with values.
-There is no literal hashmap, therefore the @new@\goto{new} keyword is used to create an empty @HashMap@ and the bracket operators\goto{operator} are used to store and retrieve values.
-
-\begin{lst}
-var h = new HashMap[String, Int] 
-# h associates strings to integers
-h["six"] = 6
-print h["six"] + 1 # outputs "7"
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Control Structures}\label{control}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Traditional procedural control structures exist in Nit.
-They also often exist in two versions: a one-liner and a block version.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Control Flow}\label{control flow}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Control structures dictate the control flow of the program.
-Nit heavily refers to the control flow in its specification:
-\begin{itemize}
-\item No unreachable statement;
-\item No usage of undefined variables\goto{var};
-\item No function without a @return@ with a value\goto{fun};
-\item Adaptive typing\goto{adaptive typing}.
-\end{itemize}
-
-Some structures alter the control flow but are not described in this section: @and@, @or@, @not@\goto{Bool}, @or else@\goto{or else} and @return@\goto{return}.
-
-Note that the control flow is determined only from the position, the order and the nesting of the control structures.
-The real value of the expressions used has no effect on the control flow analyses.
-\begin{multicols}{2}
-\begin{lst}
-if true then
-       return
-else
-       return
-end
-print 1
-# Compile error: 
-# unreachable statement
-\end{lst}
-\columnbreak
-\begin{lst}
-if true then
-       return
-end
-print 1
-# OK, but never executed
-\end{lst}
-\end{multicols}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{if}\label{if}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\begin{multicols}{2}
-\begin{lst}
-if exp then stm
-if exp then stm else stm
-if exp then
-       stms
-end
-\end{lst}
-\columnbreak
-\begin{lst}
-if exp then
-       stms
-else if exp then
-       stms
-else
-       stms
-end
-\end{lst}
-\end{multicols}
-Note that the following example is invalid since the first line is syntactically complete thus the newline terminate the whole @if@ structure\goto{syntax}; then an error is signaled since a statement cannot begin with @else@.
-\begin{lst}
-if exp then stm # OK: complete 'if' structure
-else stm # Syntax error: unexpected 'else'
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{while}\label{while}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\begin{lst}
-while exp do stm
-while exp do
-       stms
-end
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{for}\label{for}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@for@ declares an automatic variable\goto{var} used to iterates on @Collection@ (@Array@ and @Range@ are both @Collection@).
-
-\begin{lst}
-for x in [1..5] do print x # outputs 1 2 3 4 5
-for x in [1, 4, 6] do
-       print x # outputs 1 4 6
-end
-\end{lst}
-
-In fact, @for@ is syntactic sugar for a closure\goto{closure}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{loop}\label{loop}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Infinite loops are mainly used with breaks.
-They are useful to implement \textit{until} loops or to simulate the \textit{exit when} control of Ada.
-
-\begin{lst}
-loop
-       stms
-       if exp then break
-       stms
-end
-\end{lst}
-
-Note that @loop@ is different from @while true@ because the control flow does not consider the values of expression\goto{control flow}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{do}\label{do}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Single @do@ are used to create scope for variables or to be attached with labeled breaks.
-
-\begin{lst}
-do
-       var x = 5
-       print x
-end
-# x is not defined here
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{break, continue and label}\label{break}\label{continue}\label{label}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Unlabeled @break@ exits the current @for@, @while@, @loop@, or closure\goto{closure}.
-Unlabeled @continue@ skips the current @for@, @while@, @loop@, or closure.
-
-@label@ can be used with @break@ or @continue@ to act on a specific control structure (not necessary the current one). 
-The corresponding @label@ must be defined after the @end@ keyword of the designated control structure.
-
-\begin{lst}
-for i in [0..width[ do
-       for j in [0..height[ do
-               if foo(i, j) then break label outer_loop
-               # The 'break' breaks the 'for i' loop
-       end
-end label outer_loop
-\end{lst}
-
-@label@ can also be used with @break@ and single @do@ structures.
-
-\begin{lst}
-do
-       stmts
-       if expr then break label block
-       stmts
-end label block
-\end{lst}
-
-In closures, @break@ and @continue@ can return values\goto{closure return}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{abort}\label{abort}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@abort@ stops the program with a fatal error and prints a stack trace.
-Since there is currently no exception nor run-time-errors, abort is somewhat used to simulate them.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{assert}\label{assert}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@assert@ verifies that a given Boolean expression is true, or else it aborts.
-An optional label can be precised, it will be displayed on the error message.
-An optional @else@ can also be added and will be executed before the abort.
-\begin{lst}
-assert bla: whatever else
-       # "bla" is the label
-       # "whatever" is the expression to verify
-       print "Fatal error in module blablabla."
-       print "Please contact the customer service."
-end
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Local Variables and Static Typing}\label{var}\label{static type}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@var@ declares local variables.
-In fact there is no global variable in Nit, so in this document \textit{variable} always refers to a local variable.
-A variable is visible up to the end of the current control structure.
-Two variables with the same name cannot coexist: no nesting nor masking.
-
-Variables are bound to values.
-A variable cannot be used unless it has a value in all control flow paths (\`a la Java).
-
-\begin{lst}
-var x
-var y
-if whatever then
-       x = 5
-       y = 6
-else
-       x = 7
-end
-print x # OK
-print y # Compile error: y is possibly not initialized
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Adaptive Typing}\label{adaptive typing}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Nit features adaptive typing, which means that the static type of a variable can change according to:
-the assignments of variables,
-the control flow\goto{control flow},
-and some special operators (@and@, @or@\goto{Bool}, @or else@\goto{or else}, @==@, @!=@\goto{null}, and @isa@\goto{isa}).
-
-\begin{multicols}{2}
-\begin{lst}
-var x # a variable
-x = 5
-# static type is Int
-print x + 1 # outputs 6
-x = [6, 7]
-# static type is Array[Int]
-print x[0] # outputs "6"
-\end{lst}
-\columnbreak
-\begin{lst}
-var x
-if whatever then
-       x = 5
-else
-       x = 6
-end
-# Static type is Int
-\end{lst}
-\end{multicols}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Variable Upper Bound}\label{upper bound}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-An optional type information can be added to a variable declaration.
-This type is used as an upper bound of the type of the variable.
-When a initial value is given in a variable declaration without a specific type information, the static type of the initial value is used as an upper bound.
-If no type and no initial value are given, the upper bound is set to @nullable Object@\goto{null}.
-
-\begin{lst}
-var x: Int # Upper bound is Int
-x = "Hello" # Compile error: expected Int
-var y: Object # Upper bound is Object
-y = 5 # OK since Int specializes Object
-var z = 5 # Upper bound is Int
-z = "Hello" # Compile error: expected Int
-var t: Object = 5 # Upper bound is Object
-t = "Hello" # OK
-\end{lst}
-
-The adaptive typing flow is straightforward, therefore loops (@for@\goto{for}, @while@\goto{for}, @loop@\goto{for}) and closures\goto{closure} have a special requirement: on entry, the upper bound is set to the current static type; on exit, the upper bound is reset to its previous value.
-
-\begin{lst}
-var x: Object = ...
-# static type is Object, upper bound is Object
-x = 5
-# static type is Int, bound remains Object
-while x > 0 do
-       # static type remains Int, bound sets to Int
-       x -= 1 # OK
-       x = "Hello" # Compile error: expected Int
-end
-# static type is Int, bound reset to Object
-x = "Hello" # OK
-\end{lst}
-
-\future{A possible future version of Nit will use a fixed point analysis, thus remove the need of resetting the upper bound.}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Type Checks}\label{isa}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@isa@ tests if an object is an instance of a given type.
-If the expression used in an @isa@ is a variable, then its static type is automatically adapted, therefore avoiding the need of a specific cast\goto{as}.
-
-\begin{lst}
-var x: Object = whatever
-if x isa Int then
-       # static type of x is Int
-       print x * 10 # OK
-end
-\end{lst}
-
-Remember that adaptive typing follows the control flow\goto{control flow}, including the Boolean operators\goto{Bool}.
-
-\begin{lst}
-var a: Array[Object] = ...
-for i in a do
-       # the static type of i is Object 
-       if not i isa Int then continue
-       # now the static type of i is Int
-       print i * 10 # OK
-end
-\end{lst}
-
-An interesting example:
-\begin{lst}
-var max = 0
-for i in whatever do
-       if i isa Int and i > max then max = i
-       # the > is valid since, in the right part
-       # of the "and", the static type of i is Int
-end
-\end{lst}
-
-Note that type adaptation occurs only in an @isa@ if the target type is more specific that the current type.
-\begin{lst}
-var a: Collection[Int] = ...
-if a isa Comparable then
-       # the static type is still Collection[Int]
-       # even if the dynamic type of a is a subclass
-       # of both Collection[Int] and Comparable
-       ...
-end
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Nullable Types}\label{null}\label{nullable}\label{or else}\label{not null}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@null@ is a literal value that is only accepted by some specific static types.
-However, thanks to adaptive typing, the static type management can be mainly automatic.
-
-@nullable@ annotates types that can accept @null@ or an expression of a compatible nullable static type.
-
-\begin{lst}
-var x: nullable Int
-var y: Int
-x = 1 # OK
-y = 1 # OK
-x = null # OK
-y = null # Compile error
-x = y # OK
-y = x # Compile error
-\end{lst}
-
-Adaptive typing works well with nullable types.
-
-\begin{lst}
-var x
-if whatever then
-       x = 5
-else
-       x = null
-end
-# The static type of x is nullable Int
-\end{lst}
-
-Moreover, like the @isa@ keyword, the @==@ and @!=@ operators can adapt the static type of a variable when compared to @null@.
-
-\begin{lst}
-var x: nullable Int = whatever
-if x != null then
-       # The static type of x is Int (without nullable)
-       print x + 6
-end
-# The static type of x is nullable Int
-\end{lst}
-
-And another example:
-\begin{lst}
-var x: nullable Int = whatever
-loop
-       if x == null then continue
-       # The static type of x is Int
-end
-\end{lst}
-
-%FIXME: Pas clair il parrait
-@or else@ can be used to compose a nullable expression with any other expression.
-The value of @x or else y@ is @x@ if @x@ is not @null@ and is @y@ if @x@ is null.
-The static type of @x or else y@ is the combination\goto{combination} of the type of @y@ and the not null version of the type of @x@.
-\begin{lst}
-var i: nullable Int = ...
-var j = i or else 0
-# the static type of j is Int (without nullable)
-\end{lst}
-
-Note that nullable types require a special management for attributes and constructors\goto{initialization}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Explicit Cast}\label{as}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@as@ casts an expression to a type.
-The expression is either casted successfully or there is an @abort@\goto{abort}.
-
-\begin{lst}
-var x: Object = 5 # static type of x is Object
-print x.as(Int) * 10 # outputs 50
-print x.as(String) # aborts: cast failed
-\end{lst}
-
-Note that @as@ does not change the object nor does perform conversion.
-\begin{lst}
-var x: Object = 5 # static type of x is Object
-print x.as(Int) + 10 # outputs "15"
-print x.to_s + "10" # outputs "510"
-\end{lst}
-
-
-Because of type adaptation, @as@ is rarely used on variables.
-@isa@ (sometime coupled with @assert@\goto{assert}) is preferred.
-\begin{lst}
-var x: Object = 5 # static type of x is Object
-assert x isa Int
-# static type of x is now Int
-print x * 10 # outputs 50
-\end{lst}
-
-@as(not null)@ can be used to cast an expression typed by a nullable type to its non nullable version.
-This form keeps the programmer from writing explicit static types.
-
-\begin{lst}
-var x: nullable Int = 5 # static type of x is nullable Int
-print x.as(not null) * 10 # cast, outputs 50
-print x.as(Int) * 10 # same cast, outputs 50
-assert x != null # same cast, but type of x is now Int
-print x * 10 # outputs 50
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Static Type Combination Rule}\label{combination}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Adaptive typing, literal arrays\goto{Array}, @or else@\goto{or else}, and valued @break@ in closure\goto{closure} need to determine a static type by combining other static types.
-This is done by using the following rule:
-\begin{itemize}
-\item The final type is @nullable@ if at least one of the types is @nullable@.
-\item The final type is the static type that is more general than all the other types.
-\item If there is no such a type, and the thing typed is a variable, then the final type is the upper bound type of the variable; else there is a compilation error.
-\end{itemize}
-% FIXME: the 'thing' typed?!
-
-\begin{lst}
-var d: Discrete = ...
-# Note: Int < Discrete < Object
-var x
-if whatever then x = 1 else x = d
-# static type is Discrete
-if whatever then x = 1 else x = "1"
-# static type is nullable Object (upper bound)
-var a1 = [1, d] # a1 is a Array[Discrete]
-var a2 = [1, "1"] # Compile error:
-               # incompatible types Int and String 
-\end{lst}
-
-\future{A possible future version of Nit will introduce union types, thus simplifying the rule of combination.}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Modules}\label{module}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@module@ declares the name of a module.
-While optional it is recommended to use it, at least for documentation purpose\goto{comment}.
-The basename of the source file must match the name declared with @module@.
-The extension of the source file must be @nit@.
-
-A module is made of, in order:
-\begin{itemize}
-\item the module declaration;
-\item module importations;
-\item class definitions (and refinements) \goto{class};
-\item top-level function definitions (and redefinitions) \goto{toplevel};
-\item main instructions \goto{toplevel}.
-\end{itemize}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Module Importation}\label{import}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@import@ declares dependencies between modules.
-By default, a module publicly imports the module @standard@.
-Dependencies must not produce cycles.
-By importing a module, the importer module can see and use classes and properties defined in the imported module.
-
-\begin{itemize}
-\item @import@ indicates a public importation.
-Importers of a given module will also import its publicly imported modules.
-%Modules that import the current module will implicitly also import the other module.
-An analogy is using @#include@ in a header file (@.h@) in C/C++.
-\item @private import@ indicates a private importation.
-Importers of a given module will not automatically import its privately imported modules.
-An analogy is using @#include@ in a body file (@.c@) in C/C++.
-%Modules that import the current module will not see the classes and properties imported.
-%However, while the classes and properties imported are invisible, the information that the module import an other one is still public and required to compile and run the program.
-\item @intrude import@ indicates an intrusive importation.
-@intrude@ @import@ bypasses the @private@ visibility and gives to the importer module a full access on the imported module.
-Such an import may only be considered when modules are strongly bounded and developed together.
-The closest, but insufficient, analogy is something like including a body file in a body file in C/C++.
-\end{itemize}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Visibility}\label{visibility}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-By default, all classes\goto{class}, methods\goto{fun}, constructors\goto{init} and virtual types\goto{type} are public which means freely usable by any importer module.
-Once something is public it belongs to the API of the module and should not be changed.
-
-@private@ indicates classes and methods that do not belong to the API.
-They are still freely usable inside the module but are invisible in other modules (except those that use @intrude import@).
-
-@protected@ indicates restricted methods and constructors.
-Such methods belong to the API of the module but they can only be used with the @self@ receiver.
-Basically, @protected@ methods are limited to the current class and its subclasses.
-Note that inside the module (and in intrude importers), there is still no restriction.
-
-Visibility of attributes is more specific and is detailed in its own section\goto{attribute visibility}.
-
-\begin{multicols}{2}
-\begin{lst}
-module m1
-class Foo
-       fun pub do ...
-       protected fun pro
-       do ...
-       private fun pri
-       do ...
-end
-private class Bar
-       fun pri2 do ...
-end
-var x: Foo = ...
-var y: Bar = ...
-# All OK, it is
-# inside the module
-x.foo
-x.pro
-x.pro
-y.pri2
-\end{lst}
-\columnbreak
-\begin{lst}
-module m2
-import m1
-class Baz
-       super Foo
-       fun derp
-       do
-               self.pro # OK
-       end
-end
-var x: Foo = ...
-x.pub # OK
-x.pro # Compile error:
-      # pro is protected
-x.pri # Compile error:
-      # unknown method pro
-
-var y: Bar
-# Compile error:
-# unknown class Bar
-\end{lst}
-\end{multicols}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Visibility Coherence}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-In order to guarantee the coherence in the visibility, the following rules apply:
-\begin{itemize}
-\item Classes and properties privately imported are considered private: they are not exported and do not belong to the API of the importer.
-\item Properties defined in a private class are private.
-\item A static type is private if it contains a private class or a private virtual type\goto{type}.
-\item Signatures of public and protected properties cannot contain a private static type.
-\item Bounds of public generic class\goto{generic} and public virtual types\goto{type} cannot contain a private static type.
-\end{itemize}
-
-% FIXME: What about specialization links between a public class and a privately imported public class
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Classes}\label{class}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@interface@, @abstract class@, @class@ and @enum@ are the four kinds of classes. All these classes can be in multiple inheritance, can define new methods and redefine inherited method (yes, even interfaces). Here are the differences:
-\begin{itemize}
-\item interfaces can only specialize other interfaces, cannot have attributes, cannot have constructors, cannot be instantiated.
-\item abstract classes cannot specialize enums, can have attributes, must have constructors, cannot be instantiated.
-\item concrete classes (i.e. @class@) cannot specialize enums, can have attributes, must have constructors, can be instantiated.
-\item enums (e.g. @Int@ or @Bool@) can only specialize interfaces, cannot have attributes, cannot have constructors, have proper instances but they are not instantiated by the programmer---it means no @new Int@. Note that at this point there is no user-defined enums.
-\end{itemize}
-
-All kinds of classes must have a name, can have some superclasses and can have some definitions of properties.
-Properties are methods\goto{fun}, attributes\goto{attribute}, constructors\goto{init} and virtual types\goto{type}.
-All kinds of classes can also be generic\goto{generic}.
-When we talk about ``classes'' in general, it means all these four kinds.
-We say ``concrete classes'' to designate only the classes declared with the @class@ keyword alone.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Class Specialization}\label{superclass}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@super@ declares superclasses.
-Classes inherit methods, attributes and virtual-types defined in their superclasses.
-Currently, constructors are inherited in a specific manner\goto{init inheritance}.
-
-@Object@ is the root of the class hierarchy.
-It is an interface and all other kinds of classes are implicitly a subclass of @Object@.
-
-There is no repeated inheritance nor private inheritance.
-The specialization between classes is transitive, therefore @super@ declarations are superfluous (thus ignored).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Class Refinement}\label{refine}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@redef@ allows modules to refine imported classes (even basic ones).
-Refining a class means:
-\begin{itemize}
-\item adding new properties: methods, attributes, constructors, virtual types;
-\item redefining existing properties: methods and constructors;
-\item adding new superclasses.
-\end{itemize}
-
-Note that the kind\goto{class} or the visibility\goto{visibility} of a class cannot be changed by a refinement.
-Therefore, it is allowed to just write @redef class X@ whatever is the kind or the visibility of @X@.
-
-In programs, the real instantiated classes are always the combination of all their refinements.
-%This is quite powerful and permit a programing style only found in some dynamically typed languages or aspect-oriented languages.
-
-\begin{lst}
-redef class Int
-       fun fib
-       do
-               if self < 2 then return self
-               return (self-1).fib + (self-2).fib
-       end
-end
-# Now all integers have the fib method
-print 15.fib # outputs 610
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Methods}\label{fun}\label{self}\label{return}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@fun@ declares methods.
-Methods must have a name, may have parameters, and may have a return type.
-Parameters are typed; however, a single type can be used for multiple parameters.
-\begin{lst}
-fun foo(x, y: Int, s: String): Bool ...
-\end{lst}
-
-@do@ declares the body of methods.
-Alike control structures\goto{control}, a one-liner version is available.
-Moreover, a shorter version using the @=@ symbol is also available for functional methods.
-Therefore, the three following methods are equivalent. 
-\begin{lst}
-fun next1(i: Int): Int
-do
-       return i + 1
-end
-
-fun next2(i: Int): Int do return i + 1
-
-fun next3(i: Int): Int = i + 1
-\end{lst}
-
-Inside the method body, parameters are considered as variables\goto{var}.
-They can be assigned and are subject to adaptive typing.
-
-@self@, the current receiver, is a special parameter.
-It is not assignable but is subject to adaptive typing.
-
-@return@ exits the method and returns to the caller.
-In a function, the return value must be provided with a return in all control flow paths\goto{control flow}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Method Call}\label{call}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Calling a method is usually done with the dotted notation @x.foo(y, z)@.
-The dotted notation can be chained.
-
-A method call with no argument does not need parentheses.
-Moreover, even with arguments, the parentheses are not required in the principal method of a statement.
-\begin{lst}
-var a = [1]
-a.add 5 # no () for add
-print a.length # no () for length, no () for print
-\end{lst}
-
-However, this last facility requires that the first argument does not start with a parenthesis or a bracket.
-\begin{lst}
-foo (x).bar # will be interpreted as (foo(x)).bar
-foo [x].bar # will be interpreted as (foo[x]).bar
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Method Redefinition}\label{redef}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@redef@ denotes methods that are redefined in subclasses\goto{superclass} or in class refinements\goto{refine}.
-The number and the types of the parameters must be invariant.
-Thus, there is no need to reprecise the types of the parameters, only names are mandatory.
-
-The return type can be redefined to be a more precise type.
-If same type is returned, there is no need to reprecise it.
-
-The visibility, also, cannot be changed, thus there is also no need to reprecise it.
-
-\begin{lst}
-class Foo
-       # implicitly an Object
-       # therefore inherit '==' and 'to_s' 
-       var i: Int
-       redef to_s do return "Foo{self.i}"
-       redef ==(f) do return f isa Foo and f.i == self.i
-end
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Abstract Methods}\label{abstract}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@is abstract@ indicates methods defined without a body.
-Subclasses and refinements can then redefine it (the @redef@ is still mandatory) with a proper body.
-
-\begin{lst}
-interface Foo
-       fun derp(x: Int): Int is abstract
-end
-class Bar
-       super Foo
-       redef derp(x) do return x + 1
-end
-\end{lst}
-
-Concrete classes may have abstract methods.
-It is up to a refinement\goto{refine} to provide a body.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Call to Super}\label{super}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@super@ calls the ``previous'' definition of the method.
-It is used in a redefinition of a method in a subclass or in a refinement,
-It can be used with or without arguments; in the latter case, the original arguments are implicitly used.
-
-The @super@ of Nit behave more like the @call-next-method@ of CLOS that the @super@ of Java or Smalltalk.
-It permits the traversal of complex class hierarchies and refinement.
-Basically, @super@ is polymorphic: the method called by @super@ is not only determined by the class of definition of the method but also by the dynamic type of @self@.
-
-\begin{comment}
-The principle it to produce a strict order of the redefinitions of a method (the linearization).
-Each call to @super@ call the next method definition in the linearization.
-From a technical point of view, the linearization algorithm used is based on C4.
-It ensures that:
-\begin{itemize}
-\item A definition comes after its redefinition.
-\item A redefinition in a refinement comes before a redefnition in a
-\item The order of the declaration of the superclasses is used as the ultimate deabiguization.
-\end{itemize}
-
-%@super@ is really powerful and can deals with very complex multiple inheritance and multiple refinement thanks to some linearization algorithm.
-
-\begin{lst}
-class A
-       fun derp: String do return "A"
-end
-class B
-       super A
-       redef fun derp do return "B" + super
-end
-class C
-       super A
-       redef fun derp do return "C" + super
-end
-class D
-       super B
-       super C
-       redef fun derp do return "D" + super
-       # Here the linearization order of the class D is DBCA
-       # D before B because D specializes B
-       # B before A because B specializes A 
-       # D before C because D specializes C
-       # C before A because C specializes A
-       # B before C because in D 'super B' is before 'super C'  
-end
-var b = new B
-print b.derp # outputs "BA"
-var d = new D
-print d.derp # outputs "DBCA"
-\end{lst}
-\end{comment}
-
-% TODO: linearization.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Operators and Setters}\label{operator}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Operators and setters are methods that require a special syntax for their definition and their invocation.
-
-\begin{itemize}
-\item binary operators: @+@, @-@, @*@, @/@, @\%@, @==@, @<@, @>@, @<=@, @>=@, @<<@, @>>@ and @<=>@.
-Their definitions require exactly one parameter and a return value.
-Their invocation is done with @x + y@ where @x@ is the receiver, @+@ is the operator, and @y@ is the argument.
-\item unary operator: @-@.
-Its definition requires a return value but no parameter.
-Its invocation is done with @-x@ where @x@ is the receiver.
-\item bracket operator: @[]@.
-Its definition requires one parameter or more and a return value.
-Its invocation is done with @x[y, z]@ where @x@ is the receiver, @y@ the first argument and @z@ the second argument.
-\item setters: @something=@ where @something@ can be any valid method identifier.
-Their definitions require one parameter or more and no return value.
-If there is only one parameter, the invocation is done with @x.something = y@ where @x@ is the receiver and y the argument.
-If there is more that one parameter, the invocation is done with @x.something(y, z) = t@ where @x@ is the receiver, @y@ the first argument, @z@ the second argument and @t@ the last argument.
-\item bracket setter: @[]=@.
-Its definition requires two parameters or more and no return value.
-Its invocation is done with @x[y, z] = t@ where @x@ is the receiver, @y@ the first argument, @z@ the second argument and @t@ the last argument.
-\end{itemize}
-
-\begin{lst}
-class Foo
-       fun +(a: Bar): Baz do ...
-       fun -: Baz do ...
-       fun [](a: Bar): Baz do ...
-       fun derp(a: Bar): Baz do ...
-       fun derp=(a: Bar, b: Baz) do ...
-       fun []= (a: Bar, b: Baz) do ...
-end
-var a: Foo = ...
-var b: Bar = ...
-var c: Baz = ...
-c = a + b
-c = -b
-c = a[b] # The bracket operator '[]'
-c = a.derp(b) # A normal method 'derp'
-a.derp(b) = c # A setter 'derp='
-a[b] = c # The bracket setter '[]='
-\end{lst}
-
-@+=@ and @-=@ are combinations of the assignment (@=@) and a binary operator.
-These feature are extended to setters where a single @+=@ is in fact three method calls: a function call, the operator call, then a setter call.
-\begin{lst}
-a += c # equiv. a = a + c
-a[b] += c # equiv. a[b] = a[b] + c
-a.foo += c # equiv. a.foo = a.foo + c
-a.bar(b) += c # equiv. a.bar(b) = a.bar(b) + c
-\end{lst} 
-
-% FIXME: priority of operators?
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Variable Number of Arguments}\label{vararg}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-A method can accept a variable number of arguments using ellipsis (@...@).
-The definition use @x: Foo...@ where @x@ is the name of the parameter and @Foo@ a type.
-Inside the body, the static type of @x@ is @Array[Foo]@.
-The caller can use 0, 1, or more arguments for the parameter @x@.
-Only one ellipsis is allowed in a signature.
-
-\begin{lst}
-fun foo(x: Int, y: Int..., z: Int)
-do
-       print "{x};{y.join(",")};{z}"
-end
-foo(1, 2, 3, 4, 5) # outputs "1;2,3,4;5"
-foo(1, 2) # outputs "1;;2"
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Top-level Methods and Main Body}\label{toplevel}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Some functions, like @print@, are usable everywhere simply without using a specific receiver.
-Such methods are just defined outside any classes.
-In fact, these methods are implicitly defined in the @Object@ interface, therefore inherited by all classes, therefore usable everywhere.
-However, this principle may change in a future version.
-
-In a module, the main body is a bunch of statements at the end of a file.
-The main body of the main module is the program entry point.
-In fact, the main method of a program is implicitly defined as the redefinition of the method @main@ of the @Sys@ class; and the start of the program is the implicit statement @(Sys.new).main@.
-Note that because it is a redefinition, the main part can use @super@\goto{super} to call the ``previous'' main part in the imported modules.
-If there is no main part in a module, it is inherited from imported modules.
-
-Top-level methods coupled with the main body can be used to program in a pseudo-procedural way.
-Therefore, the following programs are valid:
-\begin{multicols}{2}
-\begin{lst}
-print "Hello World!"
-\end{lst}
-\columnbreak 
-\begin{lst}
-fun sum(i, j: Int): Int
-do
-       return i + j
-end
-print sum(4, 5)
-\end{lst}
-\end{multicols}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Intern and Extern Methods}\label{intern}\label{extern}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@intern@ and @extern@ indicate concrete methods whose body is not written in Nit.
-
-The body of @intern@ methods is provided by the compiler itself for performance or bootstrap reasons.
-For the same reasons, some intern methods, like @+@ in @Int@\goto{Int} are not redefinable.
-
-The body of @extern@ methods is provided by libraries written in C; for instance, the system libraries required for input/output.
-Extern methods are always redefinable.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Attributes}\label{attribute}\label{writable}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@var@, used inside concrete and abstract classes, declares attributes.
-Attributes require a static type and can possibly have an initial value (it may be any kind of expression, even including @self@\goto{self})
-
-%In Nit, attributes cannot be directly accessed.
-%In fact by declaring an attribute, two methods are automatically generated.
-%One is the getter, the other is the setter.
-
-\begin{lst}
-class Foo
-       var i: Int = 5
-       fun dec(x: Int): Int
-       do
-               var k = self.i
-               if k > x then self.i = k - x else self.i = 0
-       end
-end
-\end{lst}
-
-Note that from an API point of view, there is no way to distinguish the read access of an attribute with a normal method neither to distinguish a write access of an attribute with a setter.
-Therefore, the read access of an attribute is called a getter while the write access is called a setter.
-\begin{lst}
-var x = foo.bar # Is bar an attribute or a method?
-foo.bar = y # Is bar an attribute or a setter?
-# In fact, we do not need to know.
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Visibility of Attributes}\label{attribute visibility}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-By default, a getter is public and a setter is private.
-The visibility of getters can be precised with the @private@ or @protected@ keywords.
-The visibility of setters can be specified with an additional @writable@ keyword.
-
-\begin{lst}
-class Foo
-       var pub_pri: X
-       protected var pro_pri: X
-       var pub_pub: X writable
-       private var pri_pro: X protected writable
-       var pub_pri2: X private writable # the default
-end
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Redefinition of Attributes}\label{redef var}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Getters and setters of attributes behave like genuine methods that can be inherited and redefined.
-Getters and setters can also redefine inherited methods.
-@redef var@ declares that the getter is a redefinition while @redef writable@ declares that the setter is a redefinition.
-
-\begin{lst}
-interface Foo
-       fun derp: Int is abstract
-       fun derp=(o: Int) is abstract
-end
-class Bar
-       super Foo
-       redef var derp: Int redef writable
-end
-class Baz
-       super Bar
-       redef fun derp do ...
-       redef fun derp=(o) do ...
-end
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Constructors and Instantiation}\label{init}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@init@ declares constructors in concrete and in abstract classes.
-The role of constructors is basically to initialize the attributes of the class.
-Constructors can have: a visibility (by default it is public), a name (by default, constructors are anonymous) and parameters.
-They cannot have a return value.
-
-\begin{lst}
-class Foo
-       init(i:Int) do ...
-       init herp do ...
-       init derp(i, j: Int) do ...
-end
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Class Instantiation}\label{new}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@new@ instantiates a concrete class using a specific constructor. 
-\begin{lst}
-var x = new Foo(4) # invoke init
-var y = new Foo.herp # invoke herp
-var z = new Foo.derp(1, 2) # invoke derp
-\end{lst}
-Note that syntactically, @new Bar@ means ``instantiate @Bar@ with the anonymous constructor'', and @new Bar.foo@ means ``instantiate @Bar@ with the constructor named @foo@'', but @(new Bar).foo@ means ``instantiate @Bar@ with the anonymous constructor then call the method @foo@ on the result''.
-
-Constructors can also be called by other constructors in order to factorize or delegate parts of the construction process.
-In other constructors, @init@ denotes the anonymous constructor.
-\begin{lst}
-class Foo
-       init(i: Int) do self.derp(i.to_s)
-       init herp do self.init(5)
-       init derp(s: String) do ...
-end
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Initialization of Attributes}\label{initialization}\label{isset}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-The tricky part in constructors is the initialization of attributes since they cannot be initialized in an atomic way.
-The various steps apply in the following order:
-\begin{itemize}
-\item Attributes typed by a nullable type are initialized with @null@\goto{null}; other attributes remain uninitialized.
-\item Default values of all attributes (including inherited ones) are computed in the order of their definitions.
-\item The constructor designated in the @new@ is executed.
-\item During the constructor execution (including any methods or other constructors called), accessing an uninitialized attribute aborts the program.
-\item After the execution of the constructor designated in the @new@, if some attributes remain uninitialized, the program aborts.
-\end{itemize}
-
-\begin{comment}
-@isset@ can be used to avoid aborting during the construction.
-It checks if an attribute is defined.
-\begin{lst}
-class Foo
-       var x: Int
-       fun safe_x: nullable Int
-       do
-               if isset self.x then
-                       return self.x
-               else
-                       return null
-               end
-       end
-       init
-       do
-               print safe_x or else 0 # outputs 0
-               # "print x" would have aborted the program
-               self.x = 5
-               print safe_x or else 0 # outputs "5"
-               print x # outputs "5". It is safe.
-       end
-end
-var f = new Foo
-\end{lst}
-\end{comment}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Free and Inherited Constructors}\label{init inheritance}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-When there is no constructor defined in a concrete class or in an abstract class that specializes only interfaces (@Object@ is always a superclass), a free anonymous constructor is implicitly declared.
-This free constructor gathers all attributes without a initial value and assign them in order.
-If all attributes have an initial value (or if there is no attributes), the free constructor has no parameters.
-
-\begin{lst}
-class Foo
-       var x: Int
-       var y: String
-       var z: Int = 0
-       # a free init(x: Int, y: String) is implicit
-end
-var f = new Foo(5, "five") # OK
-\end{lst}
-
-When there is no constructors defined in a concrete class or in an abstract class, and this class has only one direct superclass that is a concrete class or an abstract class, and all attributes defined in this class have an initial value, then all constructors of the superclass are inherited.
-
-\begin{lst}
-class Bar
-       super Foo
-       var t: String = "Hello"
-       # init(Int, String) is inherited
-end
-\end{lst}
-
-If none of these two cases apply, then there is a compilation error.
-The programmer usually has to define its own constructors for the class.
-
-\begin{lst}
-class Baz
-       super Foo
-       var u: Int
-       # Compile error: a constructor must be defined
-end
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Generic Classes and Virtual Types}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Generic Classes}\label{generic}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Generic classes are defined with formal generic parameters declared within brackets.
-Formal generic parameters can then be used as a regular type inside the class.
-Generic classes must always be qualified when used.
-
-\begin{lst}
-class Pair[E]
-       var first: E
-       var second: E
-       fun is_same: Bool
-       do
-               return self.first == self.second
-       end
-end
-var p1 = new Pair[Int](1, 2)
-print p1.second * 10 # outputs "20"
-print p1.is_same # outputs "false"
-var p2 = new Pair[String]("hello", "world")
-p2.first = "world"
-print p2.is_same # outputs "true"
-\end{lst}
-
-Unlike many object-oriented languages, generic classes in Nit yield a kind of sub-typing.
-For example, @Pair[Int]@ is a subtype of @Pair[Object]@.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Virtual Types}\label{type}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@type@ declares a virtual types in a class.
-A bound type is mandatory.
-Virtual types can then be used as regular types in the class and its subclasses.
-Subclasses can also redefine it with a more specific bound type.
-One can see a virtual type as an internal formal generic parameter or as a redefinable \textit{typedef}.
-
-\begin{lst}
-class Foo
-       type E: Object
-       var derp: E 
-end
-class Bar
-       super Foo
-       redef type E: Int
-end
-var b = new Bar(5)
-print b.derp + 1 # outputs 6
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Closures}\label{closure}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Closures are pieces of code that are passed to methods as additional arguments.
-Closures are defined and used with the @!@ character.
-The following example shows the use of the @sort@ method for arrays (defined in the Nit standard library).
-
-\begin{lst}
-var a = [4, 2, 9, 6]
-a.sort !cmp(x, y) = x <=> y
-print a.join(", ") # outputs "2, 4, 6, 9"
-a.sort !cmp(x, y) = y <=> x
-print a.join(", ") # outputs "9, 6, 4, 2"
-\end{lst}
-
-@!cmp@ indicates the closure parameter of the @sort@ method.
-The documentation of the @sort@ method says that @!cmp@ is used to compare two elements.
-Thus, @sort@ provides to @!cmp@ two elements and expects a Boolean result. %saying if the first element provided should be sorted before the second element provided.
-%Therefore, when invoking @sort@, the programmer gets two automatic variables (one associated to each element) and is expected to return a Boolean.
-
-Closures can also be used to perform work.
-In the following example, @file_open@ is used to open a file for reading.
-If the opening fails, the @!error@ closure is executed with the reason as argument (``file not found'' for instance).
-If the opening is successful, @!work@ is executed and the automatic variable @f@ is associated with the opened file handler.
-@file_open@ also ensures that the file is correctly closed when the @!work@ closure returns.
-
-\begin{lst}
-var fname = "input.txt"
-file_open(fname) !work(f) do
-       print f.read_line
-!error(e) do
-       print "Cannot open '{fname}': {e}"
-end
-\end{lst}
-
-Note that a method can have multiple closures.
-Syntactically, a closure is ended by the start of another closure or by the @end@ keyword that terminates the list of the closures.
-In the one-liner version, there is no @end@ but only one closure can be used.
-
-Closures can access visible variables.
-In the following example, the @iterate@ procedure asks for an @!each@ closure that is executed on each element of a @Collection@.
-In fact, the @for@ control structure is a call of the @iterate@ method.
-The following two examples are thus strictly equivalent.
-
-\begin{multicols}{2}
-\begin{lst}
-var sum = 0
-var a = [4, 2, 9]
-a.iterate !each(i) do
-       sum += i
-end
-print sum # outputs "15"
-\end{lst}
-\columnbreak
-\begin{lst}
-var sum = 0
-var a = [4, 2, 9]
-for i in a do
-       sum += i
-end
-print sum # outputs "15"
-\end{lst}
-\end{multicols}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Returning Values and Escaping}\label{closure return}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@break@ and @continue@ are extended to closures.
-
-@continue@ exits the closure.
-If the closure expects a return value, @continue@ can also be used to return the correct value.
-As with method definition, the @do continue value@ syntax can be replaced by @= value@ as in the first @sort@ example.
-
-
-@break@ exits completely the called method.
-If the called method is a function, @break@ is also used to set the result returned by the function.
-The types returned by @break@ can be different from the return type of the function.
-The return type of the whole expression is the combination\goto{combination} of the return type of the function and the types of each @break@.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Closures in Method Declarations}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Closure parameters are declared with their signature between the prototype and the @do@ of the method.
-Closure invocations in the body of the method simply use the closure name (without the @!@) like a standard call.
-More than one closure parameter can be declared.
-Each has to be declared on a separate line.
-%At the method invocations, the closure name is used to associate each closure definition with each closure parameter.
-The order of the closure definitions does not matter.
-
-\begin{multicols}{2}
-\begin{lst}
-fun twice
-       !work
-do
-       work
-       work
-end
-twice !work do print "One"
-# outputs "One One"
-\end{lst}
-
-
-\begin{lst}
-fun foo(i: String): String
-       !f(j: String): String
-do
-       var k = f(i + "B")
-       # k will be "ABC"
-       return k + "D"
-end
-var x = foo("A") !f(y) =
-               y + "C"
-print x # outputs "ABCD"
-\end{lst}
-\columnbreak
-\begin{lst}
-fun bar(i: String)
-       !b1(j: String): String
-       !b2(k: String)
-do
-       b2(b1(i))
-end
-
-bar("A") !b1(y) do
-       continue y + "B"
-!b2(z) do
-       print z
-end
-# outputs "AB"
-\end{lst}
-\end{multicols}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Default Closures}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-A default closure can be given along with the closure parameter declaration in a method.
-If there is no default closure, then the corresponding closure argument is mandatory.
-Otherwise, if there is a default closure, the corresponding closure argument is optional.
-
-
-\begin{lst}
-fun are_all_comparable(a: Collection[Int]): Bool
-       !cmp(x, y: Int): Bool = x == y
-do
-       if a.is_empty then return true
-       var e1 = a.first
-       for e2 in a do if not cmp(e1, e2) then return false
-       return true
-end
-
-var a = [2, 2, 6, 2]
-print are_all_comparable(a) # outputs "false"
-var x = are_all_comparable(a) !cmp(i, j) = i%2 == j%2
-print x # outputs "true"
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Break Closures}\label{break closure}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Some closures, called break closures, cannot be continued.
-On the method definition, it means that the closure invocation does not return (like a @return@ or an @abort@).
-On method invocations, it means that the closure definition must not continue.
-Break closures are usually used to process error or exception handling.
-
-
-\begin{lst}
-fun open_file(fname: String)
-       !work(f: File)
-       break !error(e: String) do
-               print "Cannot open {fname}: {e}."
-               abort
-       end
-do
-       # ...
-end
-
-open_file("config.ini") !error(e) do
-       print "Cannot open file (config.ini): {e}."
-!work(f) do
-       # ...
-end
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Full Closure Example}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-To conclude the explanation about closures, the last example shows the bracket operator\goto{operator} (@[]@) of the @Map@ interface.
-A map, like @HashMap@, is used to implement a dictionary that associates some objects (keys) to some other objects (items).
-The operator returns the item associated to key.
-The operator has a @!def@ closure that is executed when the key is not found.
-@!def@ is expected to return the item associated with the new key so it can be stored in the hashmap then returned.
-By default, @!def@ aborts.
-
-
-\begin{lst}
-var map = new HashMap[Int, String]
-map[5] = "five" # associate '5' to "five"
-var x1 = map[5] # return "five"
-var x2 = map[6] !def = "six" # associate '6' to "six" 
-                               # and return "six"
-var x3 = map[6] !def = "?" # return "six" since '6' is
-                               # a known key
-var x4 = map[7] !def do break "seven" # return "seven" 
-                               # since '7' is not a known key
-var x5 = map[7] # aborts since '7' was not associated 
-                               # with the previous statement
-\end{lst}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Conclusion}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-The specification of Nit is not yet completed.
-At least the major following features need to be implemented and documented:
-\begin{itemize}
-\item User-defined @enum@.
-\item Union and intersection types.
-\item A usable native interface to bind Nit with system libraries and other languages.
-\end{itemize}
-Moreover, the language also needs a complete and stable standard library.
-
-Some other topics also need a deeper analysis : exceptions, threads, parallelism, contracts, etc.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Index}\label{index}{\small\raggedleft
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@#@\goto{comment},
-@!@\goto{closure},
-@.@\goto{call},
-@..@\goto{Range},
-@...@\goto{vararg},
-@{}@\goto{String},
-@[]@ (array)\goto{Array},
-@[]@ (operator)\goto{operator},
-@[]@ (generic)\goto{generic},
-@"@\goto{String},
-@abstract@ (class)\goto{class},
-@abstract@ (method)\goto{abstract},
-adaptive typing\goto{adaptive typing},
-@and@\goto{Bool},
-@Array@\goto{Array},
-@as@\goto{as},
-@assert@\goto{assert},
-attribute\goto{attribute},
-@Bool@\goto{Bool},
-@break@\goto{break},
-break closure\goto{break closure},
-cast\goto{as},
-@class@\goto{class},
-closure\goto{closure},
-comment\goto{comment},
-constructor\goto{init},
-@continue@\goto{continue},
-control structure\goto{control},
-@do@\goto{do},
-@else@ (if)\goto{if},
-@else@ (abort)\goto{abort},
-@end@\goto{end},
-@enum@\goto{class},
-@extern@\goto{extern},
-@false@\goto{Bool},
-@Float@\goto{Float}
-@for@\goto{for},
-@fun@\goto{fun},
-generic class\goto{generic},
-getter\goto{attribute},
-@HashMap@\goto{HashMap},
-identifier\goto{identifier},
-@if@\goto{if},
-@import@\goto{import},
-@in@\goto{for},
-@init@\goto{init},
-inheritance\goto{superclass},
-@Int@\goto{Int},
-@interface@\goto{class},
-@intern@\goto{intern},
-@is@\goto{is},
-@isa@\goto{isa},
-@isset@\goto{isset},
-@label@\goto{label},
-@loop@\goto{loop},
-@module@\goto{module}
-@new@\goto{new},
-@not@\goto{Bool},
-@not null@\goto{null},
-@null@\goto{null},
-@nullable@\goto{null},
-@Object@\goto{Object},
-operator\goto{operator},
-@or@\goto{Bool},
-@or else@\goto{or else} 
-@private@\goto{visibility}
-@protected@\goto{visibility},
-@Range@\goto{Range},
-@redef@ (class)\goto{refine},
-@redef@ (method)\goto{redef},
-@redef@ (attribute)\goto{redef var},
-@return@\goto{return},
-@self@\goto{self},
-setter\goto{operator},
-setter (attribute)\goto{attribute},
-specialization\goto{superclass},
-@String@\goto{String},
-@super@ (class)\goto{superclass},
-@super@ (method)\goto{super},
-syntax\goto{syntax},
-@then@\goto{if},
-@true@\goto{Bool},
-type (static)\goto{static type},
-@type@\goto{type},
-@upper bound@\goto{upper bound},
-@var@ (attribute)\goto{attribute},
-@var@ (variable)\goto{var},
-virtual type\goto{type},
-visibility\goto{visibility},
-@while@\goto{while},
-@writable@\goto{writable},
-}
-
diff --git a/doc/nitreference/nitreference.tex b/doc/nitreference/nitreference.tex
deleted file mode 100644 (file)
index 551d2d1..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-% This file is part of Nit ( http://www.nitlanguage.org ).
-%
-% Copyright 2011 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.
-\documentclass[10pt]{article}
-
-\usepackage[T1]{fontenc}
-\usepackage{nitlanguage}
-\usepackage{multicol}
-\usepackage{savetrees}
-\usepackage{listings}
-\usepackage{microtype}
-\usepackage{xcolor}
-\usepackage{comment}
-\usepackage{../nit_version}
-
-\newcommand\thedoctitle{A Concise Reference of the Nit Language}
-\title{\thedoctitle}
-\author{Jean Privat}
-\date{\today}
-
-\usepackage[bookmarks=false,pdftitle={\thedoctitle}]{hyperref}
-\pdfcompresslevel=9 %best compression level for text and image
-
-%\setcounter{collectmore}{90} % Force better column breaks
-
-\lstMakeShortInline[basicstyle=\small\ttfamily\color{blue!30!black}]{@}
-
-\hypersetup{colorlinks=true}
-\newcommand\goto[1]{\hyperref[#1]{{\color{red}\scriptsize[\ref*{#1}]}}}
-\newcommand\future[1]{}
-
-\geometry{margin=0.35in} % short margins
-% footer
-\usepackage{fancyhdr}
-\pagestyle{fancy}
-\lhead{}
-\chead{}
-\rhead{}
-\lfoot{\small\it\today}
-\cfoot{\small\it\thedoctitle~---~\nitversion}
-\rfoot{\small\it\thepage}
-\renewcommand{\headrulewidth}{0pt}
-\renewcommand{\footrulewidth}{0pt}
-\setlength\footskip{15pt}
-
-\begin{document}
-\setlength\columnsep{8pt} % space around big columns
-\begin{multicols}{2}
-\setlength\columnsep{4pt} % space around smalls columns (for examples)
-\input{nitreference-main.tex}
-\end{multicols}
-\end{document}
diff --git a/examples/mnit_ballz/org.nitlanguage.ballz_android.txt b/examples/mnit_ballz/org.nitlanguage.ballz_android.txt
new file mode 100644 (file)
index 0000000..3cc279c
--- /dev/null
@@ -0,0 +1,11 @@
+Categories:Nit
+License:Apache2
+Web Site:http://nitlanguage.org
+Source Code:http://nitlanguage.org/nit.git/tree/HEAD:/examples/mnit_ballz
+Issue Tracker:https://github.com/privat/nit/issues
+
+Summary:A Sensor Demo
+Description:
+Demonstration of the mnit+android sensor API.
+Control a ball with tap, tilt, obscur, etc.
+.
diff --git a/examples/mnit_dino/org.nitlanguage.dino.txt b/examples/mnit_dino/org.nitlanguage.dino.txt
new file mode 100644 (file)
index 0000000..ac9df86
--- /dev/null
@@ -0,0 +1,10 @@
+Categories:Nit,Games
+License:Apache2
+Web Site:http://nitlanguage.org
+Source Code:http://nitlanguage.org/nit.git/tree/HEAD:/examples/mnit_dino
+Issue Tracker:https://github.com/privat/nit/issues
+
+Summary:Tactical arcade game
+Description:
+You're being hunted by puny cavemen! Defend yourself.
+.
diff --git a/examples/mnit_moles/org.nitlanguage.moles_android.txt b/examples/mnit_moles/org.nitlanguage.moles_android.txt
new file mode 100644 (file)
index 0000000..e7a88eb
--- /dev/null
@@ -0,0 +1,10 @@
+Categories:Nit,Games
+License:Apache2
+Web Site:http://nitlanguage.org
+Source Code:http://nitlanguage.org/nit.git/tree/HEAD:/examples/mnit_moles
+Issue Tracker:https://github.com/privat/nit/issues
+
+Summary:Wack-a-Mole game
+Description:
+Tap on cute groundhogs that infest the lawn, but avoid the cactuses.
+.
diff --git a/examples/mnit_simple/assets/sound.ogg b/examples/mnit_simple/assets/sound.ogg
new file mode 100644 (file)
index 0000000..60c707e
Binary files /dev/null and b/examples/mnit_simple/assets/sound.ogg differ
diff --git a/examples/mnit_simple/assets/xylofon.ogg b/examples/mnit_simple/assets/xylofon.ogg
new file mode 100644 (file)
index 0000000..c4bf4fd
Binary files /dev/null and b/examples/mnit_simple/assets/xylofon.ogg differ
diff --git a/examples/mnit_simple/org.nitlanguage.simple.txt b/examples/mnit_simple/org.nitlanguage.simple.txt
new file mode 100644 (file)
index 0000000..314259b
--- /dev/null
@@ -0,0 +1,10 @@
+Categories:Nit
+License:Apache2
+Web Site:http://nitlanguage.org
+Source Code:http://nitlanguage.org/nit.git/tree/HEAD:/examples/mnit_simple
+Issue Tracker:https://github.com/privat/nit/issues
+
+Summary:Simple Demo for MNit
+Description:
+A useless application that shows various API usage of the MNit+Android framework.
+.
diff --git a/examples/mnit_simple/res/drawable/fighter.png b/examples/mnit_simple/res/drawable/fighter.png
new file mode 100644 (file)
index 0000000..de25557
Binary files /dev/null and b/examples/mnit_simple/res/drawable/fighter.png differ
diff --git a/examples/mnit_simple/res/raw/sound.ogg b/examples/mnit_simple/res/raw/sound.ogg
new file mode 100644 (file)
index 0000000..60c707e
Binary files /dev/null and b/examples/mnit_simple/res/raw/sound.ogg differ
diff --git a/examples/mnit_simple/res/raw/xylofon.ogg b/examples/mnit_simple/res/raw/xylofon.ogg
new file mode 100644 (file)
index 0000000..c4bf4fd
Binary files /dev/null and b/examples/mnit_simple/res/raw/xylofon.ogg differ
diff --git a/examples/mnit_simple/res/values/bools.xml b/examples/mnit_simple/res/values/bools.xml
new file mode 100644 (file)
index 0000000..2b1f0d6
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <bool name="test_bool">true</bool>
+</resources>
\ No newline at end of file
diff --git a/examples/mnit_simple/res/values/dimens.xml b/examples/mnit_simple/res/values/dimens.xml
new file mode 100644 (file)
index 0000000..da43c8f
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <dimen name="test_dimen_1">25dp</dimen>
+    <dimen name="test_dimen_2">150dp</dimen>
+</resources> 
diff --git a/examples/mnit_simple/res/values/strings.xml b/examples/mnit_simple/res/values/strings.xml
new file mode 100644 (file)
index 0000000..6ef469c
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name"> mnit Simple</string>
+    <string name="nit_string">Test Resources</string>
+    <string name="string_test">string test</string>
+</resources>
index 1f17806..e36aa83 100644 (file)
@@ -21,7 +21,10 @@ end
 
 import simple
 import mnit_android
+import android::bundle
 import android::shared_preferences
+import android::assets_and_resources
+import android::audio
 
 in "Java" `{
        import android.content.Context;
@@ -29,15 +32,127 @@ in "Java" `{
 `}
 
 redef class App
+       var soundsp: Sound
+       var soundmp: Sound
+
+       redef fun init_window
+       do
+               super
+               manage_audio_mode
+               # retrieve sound
+               soundsp = load_sound("sound.ogg")
+               soundmp = load_music("xylofon.ogg")
+               default_mediaplayer.looping = true
+               default_mediaplayer.prepare
+               soundmp.play
+       end
+
        redef fun input( ie )
        do
-               if ie isa PointerEvent and ie.depressed then
+               if ie isa PointerEvent and ie.depressed then 
                        do_java_stuff
+                       test_bundle
                        test_shared_preferences
-               end     
+                       soundsp.play
+                       test_assets
+                       test_resources
+               end
                return super
        end
 
+       #testing the assets manager
+       fun test_assets
+       do
+               assert asset_manager.bitmap("fighter.png") != null
+       end
+
+       #testing the resources manager
+       fun test_resources do
+               assert resource_manager.string("string_test") == "string test"
+               assert resource_manager.boolean("test_bool") == true
+               assert resource_manager.dimension("test_dimen_1") != null
+               assert resource_manager.dimension("test_dimen_2") != null
+       end
+
+       fun test_bundle
+       do
+               var bundle = new Bundle(self)
+                
+               bundle["anInt"] = 1
+               bundle["aFloat"] = 1.1
+               bundle["aString"] = "A string"
+               bundle["aBool"] = true
+               
+               var int_array = new Array[Int]
+               var bool_array = new Array[Bool]
+
+               var value = true
+
+               for i in [0..5] do
+                       int_array.add(i)
+                       bool_array.add(value)
+                       value = not value
+               end
+
+               bundle["anArrayOfInt"] = int_array
+               bundle["anArrayOfBool"] = bool_array
+
+               assert bundle.int("anInt", 0) == 1
+               assert bundle.int("wrongInt", 0) == 0
+               assert bundle.float("aFloat", 0.0) == 1.1
+               assert bundle.float("wrongFloat", 0.0) == 0.0
+               assert bundle.string("aString") == "A string"
+               assert bundle.string("wrongString") == null
+               assert bundle.bool("aBool", false)
+               assert bundle.bool("wrongBool", false) == false
+               
+               var int_array_test = bundle.array_of_int("anArrayOfInt")
+               var bool_array_test = bundle.array_of_bool("anArrayOfBool")
+
+               value = true
+
+               for i in [0..5] do
+                       assert int_array_test[i] == i
+                       assert bool_array_test[i] == value
+                       value = not value
+               end
+               
+               assert bundle.size == 6
+               assert bundle.has("aBool")
+               assert not bundle.is_empty
+
+               bundle.remove("aString")
+               bundle.remove("anArrayOfBool")
+
+               assert bundle.string("aString") == null
+               assert bundle.array_of_bool("anArrayOfBool") == null
+
+               # Serializable tests
+               var p1 = new Point(10, 10)
+               bundle["aPoint"] = p1
+               var p2 = bundle.deserialize("aPoint")
+
+               assert p1.to_s == p2.to_s
+
+               var point_array = new Array[Point]
+
+               for i in [0..5] do point_array.add(new Point(i, i))
+
+               bundle["anArrayOfPoint"] = point_array
+
+               var deserialized_point_array = bundle.deserialize_array("anArrayOfPoint")
+
+               for i in [0..5] do 
+                       var point = new Point(i, i)
+                       assert deserialized_point_array[i].to_s == point.to_s
+               end
+
+               bundle.clear
+
+               assert bundle.keys.is_empty
+               assert bundle.is_empty
+       end
+
        fun test_shared_preferences
        do
                # Private mode tests
@@ -55,9 +170,9 @@ redef class App
                # Serialized object test
                var my_point = new Point(10, 10)
                sp["a_point"] = my_point
-               var my_deserialized_point = sp.deserialize("a_point")
+               var my_deserialized_point = sp["a_point"]
                assert my_point.to_s == my_deserialized_point.to_s
-               
+
                assert sp.bool("a_boolean", false) == true
                assert sp.bool("wrong_boolean", false) == false
                assert sp.float("a_float", 0.0) != 0.0
@@ -121,4 +236,3 @@ class Point
 
        redef fun to_s do return "({x}, {y})"
 end
-
diff --git a/examples/mnit_simple/src/test_target_api.nit b/examples/mnit_simple/src/test_target_api.nit
new file mode 100644 (file)
index 0000000..c59b3dc
--- /dev/null
@@ -0,0 +1,56 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Test for the API level related annotations
+module test_target_api is
+       min_sdk_version(10)
+       max_sdk_version(19)
+       target_sdk_version(11)
+end
+
+import simple_android
+#FIXME: Double quad to access lib/foo/goo/bar.nit is evil
+import android::shared_preferences::shared_preferences_api11
+
+redef class App
+       redef fun input( ie )
+       do
+               if ie isa PointerEvent and ie.depressed then 
+                       test_target_api
+               end
+               return super
+       end
+
+       fun test_target_api
+       do
+               var hash_set = new HashSet[JavaString]
+               hash_set.add "foo".to_java_string
+               hash_set.add "bar".to_java_string
+
+               shared_preferences.add_string_set("test", hash_set)
+
+               var hash_set2 = shared_preferences.string_set("test")
+
+               var tab = ["foo", "bar"]
+               var i = 0
+
+               for entry in hash_set2 do
+                       assert entry == tab[i].to_java_string
+                       i+=1
+               end
+
+       end
+end
diff --git a/examples/shoot/org.nitlanguage.shoot_android.txt b/examples/shoot/org.nitlanguage.shoot_android.txt
new file mode 100644 (file)
index 0000000..404a703
--- /dev/null
@@ -0,0 +1,10 @@
+Categories:Nit,Games
+License:Apache2
+Web Site:http://nitlanguage.org
+Source Code:http://nitlanguage.org/nit.git/tree/HEAD:/examples/shoot
+Issue Tracker:https://github.com/privat/nit/issues
+
+Summary:A shoot'em up in space
+Description:
+*piew* *piew* *boom* *piew* *boom* etc.
+.
diff --git a/lib/android/assets_and_resources.nit b/lib/android/assets_and_resources.nit
new file mode 100644 (file)
index 0000000..ef78d72
--- /dev/null
@@ -0,0 +1,359 @@
+# this file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2014 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.
+
+# Android Assets and Resources Management
+#
+# Use the ResourceManager to retrieve resources from the `res` folder of your app
+# Use the AssetManager to retrieve resources files from the `assets` folder of your app
+# both are available from `App`
+# If you write your own resources in your NIT project part of the application,
+# you are obliged to set a string resource with the name "app_name" or it will be
+# impossible for you to compile the apk correctly
+module assets_and_resources
+
+import native_app_glue
+import java_io
+import java
+
+in "Java" `{
+       import android.content.res.AssetManager;
+       import android.content.res.AssetFileDescriptor;
+       import android.content.res.Resources;
+       import android.content.res.XmlResourceParser;
+       import java.io.IOException;
+       import android.graphics.Bitmap;
+       import android.graphics.BitmapFactory;
+       import android.graphics.drawable.Drawable;
+       import java.io.InputStream;
+       import android.util.Log;
+       import java.io.FileDescriptor;
+`}
+
+# AssetManager from Java, used by `AssetManager` to access resources in `assets` app's directory
+# This is a low-level class, use `AssetManager` instead
+extern class NativeAssetManager in "Java" `{ android.content.res.AssetManager `}
+       super JavaObject
+       redef type SELF: NativeAssetManager
+
+       fun close in "Java" `{ recv.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()) {
+                       Array_of_JavaString_add(arr, s);
+               }
+               return arr;
+       `}
+
+       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)) {
+                               Array_of_JavaString_add(arr, s);
+                       }
+               }catch (IOException e) {
+                       Log.e("Error retrieving the list of assets at 'path' ", e.getMessage());
+                       e.printStackTrace();
+               }
+               return arr;
+       `}
+
+       fun open(file_name: JavaString): NativeInputStream in "Java" `{
+               InputStream stream = null;
+               try {
+                       stream = recv.open(file_name);
+               }catch (IOException e) {
+                       Log.e("Error while opening " + file_name, e.getMessage());
+                       e.printStackTrace();
+               }
+               return stream;
+       `}
+
+       fun open_fd(file_name: JavaString): NativeAssetFileDescriptor in "Java" `{
+               AssetFileDescriptor afd = null;
+               try {
+                       afd = recv.openFd(file_name);
+               }catch(IOException e){
+                       Log.e("Error while opening " + file_name, e.getMessage());
+                       e.printStackTrace();
+               }
+               return afd;
+       `}
+
+       fun open_non_asset_fd(file_name: JavaString): NativeAssetFileDescriptor in "Java" `{
+               AssetFileDescriptor afd = null;
+               try {
+                       afd =  recv.openNonAssetFd(file_name);
+               }catch(IOException e){
+                       Log.e("Error while opening " + file_name, e.getMessage());
+                       e.printStackTrace();
+               }
+               return afd;
+       `}
+end
+
+# Assets manager using a `NativeAssetManager` to manage android assets
+class AssetManager
+       # Native asset manager
+       var native_assets_manager: NativeAssetManager
+
+       init(app: App) do self.native_assets_manager = app.assets.new_global_ref
+
+       # Close this asset manager
+       fun close do native_assets_manager.close
+
+       # Get the locales that this assets manager contains data for
+       fun locales: Array[String] do
+               var java_array = native_assets_manager.get_locales
+               var nit_array = new Array[String]
+               for s in java_array do
+                       nit_array.add(s.to_s)
+               end
+               return nit_array
+       end
+
+       # Return a string array of all the assets at the given path
+       fun list(path: String): Array[String] do
+               sys.jni_env.push_local_frame(1)
+               var java_array = native_assets_manager.list(path.to_java_string)
+               var nit_array = new Array[String]
+               for s in java_array do
+                       nit_array.add(s.to_s)
+               end
+               sys.jni_env.pop_local_frame
+               return nit_array
+       end
+
+       # Open an asset using ACCESS_STREAMING mode, returning a NativeInputStream
+       fun open(file_name: String): NativeInputStream do
+               var return_value =  native_assets_manager.open(file_name.to_java_string)
+               return return_value
+       end
+
+       # Open an asset using it's name and returning a NativeAssetFileDescriptor
+       # `file_name` is
+       fun open_fd(file_name: String): NativeAssetFileDescriptor do
+               var return_value = native_assets_manager.open_fd(file_name.to_java_string)
+               return return_value
+       end
+
+       # Open a file that is not an asset returning a NativeAssetFileDescriptor
+       fun open_non_asset_fd(file_name: String): NativeAssetFileDescriptor do
+               var return_value =  native_assets_manager.open_non_asset_fd(file_name.to_java_string)
+               return return_value
+       end
+
+       # Return a bitmap from the assets
+       fun bitmap(name: String): NativeBitmap do
+               sys.jni_env.push_local_frame(1)
+               var return_value = new NativeBitmap.from_stream(native_assets_manager.open(name.to_java_string))
+               sys.jni_env.pop_local_frame
+               return return_value
+       end
+
+       # Deallocate the global reference allocated by AssetManager
+       fun destroy do self.native_assets_manager.delete_global_ref
+end
+
+# Resource manager for android resources placed in the `res` folder of your app
+# This is a low-level class, use `ResourcesManager` instead
+extern class NativeResources in "Java" `{ android.content.res.Resources `}
+       super JavaObject
+       redef type SELF: NativeResources
+
+       fun get_assets:NativeAssetManager in "Java" `{ return recv.getAssets(); `}
+       fun get_color(id: Int): Int in "Java" `{ return recv.getColor(id); `}
+       fun get_boolean(id: Int): Bool in "Java" `{ return recv.getBoolean(id); `}
+       fun get_dimension(id: Int): Int in "Java" `{ return (int)recv.getDimension(id); `}
+       fun get_drawable(id: Int): NativeDrawable in "Java" `{ return recv.getDrawable(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(id); `}
+       fun get_string(id: Int): JavaString in "Java" `{ return recv.getString(id); `}
+       fun get_resource_entry_name(resid: Int): JavaString in "Java" `{ return recv.getResourceEntryName(resid); `}
+       fun get_resource_name(resid: Int): JavaString in "Java" `{ return recv.getResourceName(resid); `}
+       fun get_resource_pakage_name(resid: Int): JavaString in "Java" `{ return recv.getResourcePackageName(resid); `}
+       fun get_resource_type_name(resid: Int): JavaString in "Java" `{ return recv.getResourceTypeName(resid); `}
+end
+
+# Resource manager for android resources placed in the `res` folder of your app
+class ResourcesManager
+       # Native resources
+       var android_resources: NativeResources
+
+       # The name of the app_package
+       var app_package: String
+
+       init(res: NativeResources, app_package: String)
+       do
+               self.android_resources = res.new_global_ref
+               self.app_package = app_package
+       end
+
+       # Get a color from resources
+       fun color(name: String): Int do
+               sys.jni_env.push_local_frame(3)
+               var return_value = android_resources.get_color(android_resources.get_identifier(name.to_java_string, "color".to_java_string, app_package.to_java_string))
+               sys.jni_env.pop_local_frame
+               return return_value
+       end
+
+       # Get a `Bool` from resources
+       fun boolean(name: String): Bool do
+               sys.jni_env.push_local_frame(3)
+               var return_value = android_resources.get_boolean(android_resources.get_identifier(name.to_java_string, "bool".to_java_string, app_package.to_java_string))
+               sys.jni_env.pop_local_frame
+               return return_value
+       end
+
+       # Get a dimension from resources
+       # A dimension is specified with a number followed by a unit of measure
+       fun dimension(name: String): Int do
+               sys.jni_env.push_local_frame(3)
+               var return_value =  android_resources.get_dimension(android_resources.get_identifier(name.to_java_string, "dimen".to_java_string, app_package.to_java_string))
+               sys.jni_env.pop_local_frame
+               return return_value
+       end
+
+       # Get an `Integer` from resources
+       fun integer(name: String): Int do
+               sys.jni_env.push_local_frame(3)
+               var return_value =  android_resources.get_integer(android_resources.get_identifier(name.to_java_string, "integer".to_java_string, app_package.to_java_string))
+               sys.jni_env.pop_local_frame
+               return return_value
+       end
+
+
+       # Get a `String` from resources
+       fun string(name: String): String do
+               sys.jni_env.push_local_frame(3)
+               var return_value =  android_resources.get_string(android_resources.get_identifier(name.to_java_string, "string".to_java_string, app_package.to_java_string)).to_s
+               sys.jni_env.pop_local_frame
+               return return_value
+       end
+
+       # Get a resource ID from one resource in `res/raw`folder
+       # you may use this to retrieve the id of a sound for example
+       fun raw_id(name: String): Int do
+               sys.jni_env.push_local_frame(3)
+               var return_value = android_resources.get_identifier(name.to_java_string, "raw".to_java_string, app_package.to_java_string)
+               sys.jni_env.pop_local_frame
+               return return_value
+       end
+
+       # Get a drawable from `res/drawable` folder
+       fun drawable(name: String): NativeDrawable do
+               sys.jni_env.push_local_frame(3)
+               var return_value = android_resources.get_drawable(android_resources.get_identifier(name.to_java_string, "drawable".to_java_string, app_package.to_java_string))
+               sys.jni_env.pop_local_frame
+               return return_value
+       end
+
+       # Get and ID from a specific resource in `res/res_type` folder
+       fun other_id(name, res_type: String): Int do
+               sys.jni_env.push_local_frame(3)
+               var return_value = android_resources.get_identifier(name.to_java_string, res_type.to_java_string, app_package.to_java_string)
+               sys.jni_env.pop_local_frame
+               return return_value
+       end
+
+       # Deallocate global reference allocated by ResourcesManager
+       fun destroy do self.android_resources.delete_global_ref
+end
+
+# An android Bitmap, get an instance using the AssetManager or the ResourceManager
+extern class NativeBitmap in "Java" `{ android.graphics.Bitmap `}
+       super JavaObject
+       redef type SELF: NativeBitmap
+
+       # Create a NativeBitmap from a NativeInputStream retrieved with `open` function of the AssetManager
+       # Called by the AssetManager
+       new from_stream(input_stream: NativeInputStream) in "Java" `{ return BitmapFactory.decodeStream(input_stream); `}
+
+       # 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, id); `}
+       fun width: Int in "Java" `{ return recv.getWidth(); `}
+       fun height: Int in "Java" `{ return recv.getHeight(); `}
+end
+
+# Android AssetFileDescriptor, can be retrieve by AssetManager and used to load a sound in a SoundPool
+extern class NativeAssetFileDescriptor in "Java" `{ android.content.res.AssetFileDescriptor `}
+       super JavaObject
+       redef type SELF: NativeAssetFileDescriptor
+
+       fun close in "Java" `{
+               try {
+                       recv.close();
+               }catch(IOException e){
+                       e.printStackTrace();
+               }
+       `}
+       fun create_input_stream: NativeFileInputStream in "Java" `{
+               try {
+                       return recv.createInputStream();
+               }catch(IOException e){
+                       Log.e("Error creating input_stream", e.getMessage());
+                       e.printStackTrace();
+                       return null;
+               }
+       `}
+       fun create_output_stream: NativeFileOutputStream in "Java" `{
+               try {
+                       return recv.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  file_descriptor: NativeFileDescriptor in "Java" `{
+               FileDescriptor fd =  recv.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()); `}
+end
+
+# Native class representing something drawable, can be retrieved from the resources
+# will be used by the GUI
+extern class NativeDrawable in "Java" `{ android.graphics.drawable.Drawable `}
+end
+
+redef class App
+       # Resource Manager used to manage resources placed in the `res` folder of the app
+       fun resource_manager: ResourcesManager is cached do return new ResourcesManager(self.resources, self.package_name.to_s)
+
+       # Assets Manager used to manage resources placed in the `assets` folder of the app
+       fun asset_manager: AssetManager is cached 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(); `}
+
+       # Get the package name of the application
+       private fun package_name: JavaString import native_activity in "Java" `{ return App_native_activity(recv).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(); `}
+end
diff --git a/lib/android/audio.nit b/lib/android/audio.nit
new file mode 100644 (file)
index 0000000..b46a660
--- /dev/null
@@ -0,0 +1,413 @@
+# this file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2014 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.
+
+# Android audio services
+#
+# You can get a sound by loading it with a `SoundPool` or a `MediaPlayer`
+# the recommended way to load a sound is by it's resource ID or it's name
+# other ways are for advanced use
+module audio
+
+import java
+import java_io
+import assets_and_resources
+import app
+
+in "Java" `{
+       import android.media.MediaPlayer;
+       import android.media.SoundPool;
+       import java.io.IOException;
+       import android.media.AudioManager;
+       import android.content.Context;
+       import android.util.Log;
+`}
+
+# AudioManager of the application, used to manage the audio mode
+extern class NativeAudioManager in "Java" `{ android.media.AudioManager `}
+       super JavaObject
+       redef type SELF: NativeAudioManager
+
+       fun mode: Int in "Java" `{ return recv.getMode(); `}
+       fun mode=(i: Int) in "Java" `{ recv.setMode(i); `}
+       fun wired_headset_on: Bool in "Java" `{ return recv.isWiredHeadsetOn(); `}
+       fun wired_headset_on=(b: Bool) in "Java" `{ recv.setWiredHeadsetOn(b); `}
+       fun speakerphone_on: Bool in "Java" `{ return recv.isSpeakerphoneOn(); `}
+       fun speakerphone_on=(b: Bool) in "Java" `{ recv.setSpeakerphoneOn(b); `}
+       fun manage_audio_mode in "Java" `{
+               recv.setMode(0);
+               if (recv.isWiredHeadsetOn()) {
+                       recv.setSpeakerphoneOn(false);
+               } else {
+                       recv.setSpeakerphoneOn(true);
+               }
+       `}
+
+end
+
+# Media Player from Java, used to play long sounds or musics, not simultaneously
+# This is a low-level class, use `MediaPlater` instead
+extern class NativeMediaPlayer in "Java" `{ android.media.MediaPlayer `}
+       super JavaObject
+       redef type SELF: NativeMediaPlayer
+
+       new in "Java" `{ return new MediaPlayer(); `}
+       fun start in "Java" `{ recv.start(); `}
+       fun prepare in "Java" `{
+               try {
+                       recv.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, 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(stream_type); `}
+       fun data_source_fd(fd: NativeFileDescriptor, start_offset, length: Int) in "Java"  `{
+               try {
+                       recv.setDataSource(fd, start_offset, length);
+               }catch(IOException e) {
+                       Log.e("Error loading the Media Player with a file descriptor", e.getMessage());
+                       e.printStackTrace();
+               }
+       `}
+       fun data_source_path(path: JavaString) in "Java" `{
+               try {
+                       recv.setDataSource(path);
+               }catch(IOException e) {
+                       Log.e("Error loading the Media Player", e.getMessage());
+                       e.printStackTrace();
+               }
+       `}
+end
+
+# Sound Pool from Java, used to play sounds simultaneously
+# This is a low-level class, use `SoundPool`instead
+extern class NativeSoundPool in "Java" `{ android.media.SoundPool `}
+       super JavaObject
+       redef type SELF: NativeSoundPool
+
+       new(max_streams, stream_type, src_quality: Int) in "Java" `{
+               return new SoundPool(max_streams, stream_type, src_quality);
+       `}
+       fun load_asset_fd(afd: NativeAssetFileDescriptor, priority: Int): Int in "Java" `{ return recv.load(afd, priority); `}
+       fun load_id(context: NativeActivity, resid, priority: Int): Int in "Java" `{ return recv.load(context, resid, priority); `}
+       fun load_path(path: JavaString, priority: Int): Int in "Java" `{ return recv.load(path, priority); `}
+       fun play(sound_id: Int, left_volume, right_volume: Float, priority, l: Int, rate: Float): Int in "Java" `{
+               return recv.play(sound_id, (float)left_volume, (float)right_volume, priority, l, (float)rate);
+       `}
+       fun pause(stream_id: Int) in "Java" `{ recv.pause(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(stream_id); `}
+       fun set_loop(stream_id, l: Int) in "Java" `{ recv.setLoop(stream_id, l); `}
+       fun set_priority(stream_id, priority: Int) in "Java" `{ recv.setPriority(stream_id, priority); `}
+       fun set_rate(stream_id: Int, rate: Float) in "Java" `{ recv.setRate(stream_id, (float)rate); `}
+       fun set_volume(stream_id: Int, left_volume, right_volume: Float) in "Java" `{ recv.setVolume(stream_id, (float)left_volume, (float)right_volume); `}
+       fun stop(stream_id: Int) in "Java" `{ recv.stop(stream_id); `}
+       fun unload(sound_id: Int): Bool in "Java" `{ return recv.unload(sound_id); `}
+end
+
+
+# Used to play sound, best suited for sounds effects in apps or games
+class SoundPool
+       private var nsoundpool: NativeSoundPool
+       # The maximum number of simultaneous streams for this SoundPool
+       var max_streams writable = 10
+
+       # The audio stream type, 3 is STREAM_MUSIC, default for game application
+       var stream_type writable = 3
+
+       # The sample-rate converter quality, currently has no effect
+       var src_quality writable = 0
+
+       # Left volume value, range 0.0 to 1.0
+       var left_volume writable = 1.0
+
+       # Right volume value, range 0.0 to 1.0
+       var right_volume writable = 1.0
+
+       # Playback rate, 1.0 = normal playback, range 0.5 to 2.0
+       var rate writable = 1.0
+
+       # Loop mode, 0 = no loop, -1 = loop forever
+       var looping writable = 0
+
+       # Stream priority
+       private var priority = 1
+
+       init do self.nsoundpool = new NativeSoundPool(max_streams, stream_type, src_quality)
+
+       # Load the sound from an asset file descriptor
+       # this function is for advanced use
+       fun load_asset_fd(afd: NativeAssetFileDescriptor): Sound do
+               return new SoundSP(null, nsoundpool.load_asset_fd(afd, priority), self)
+       end
+
+       # Load the sound from it's resource id
+       fun load_id(context: NativeActivity, id:Int): Sound do
+               return new SoundSP(null, nsoundpool.load_id(context, id, priority), self)
+       end
+
+       # Load the sound from the specified path
+       fun load_path(path: String): Sound do
+               sys.jni_env.push_local_frame(1)
+               var return_value = new SoundSP(0, nsoundpool.load_path(path.to_java_string, priority), self)
+               sys.jni_env.pop_local_frame
+               return return_value
+       end
+
+       # Play a sound from a sound ID
+       # return non-zero streamID if successful, zero if failed
+       fun play(id: Int): Int do
+               return nsoundpool.play(id, left_volume, right_volume, priority, looping, rate)
+       end
+
+       # Load a sound by it's name in the resources, the sound must be in the `res/raw` folder
+       fun load_name(resource_manager: ResourcesManager, context: NativeActivity, sound: String): Sound do
+               var id = resource_manager.raw_id(sound)
+               return new SoundSP(id, nsoundpool.load_id(context, id, priority), self)
+       end
+
+       # Pause a playback stream
+       fun pause_stream(stream_id: Int) do nsoundpool.pause(stream_id)
+
+       # Pause all active_streams
+       fun auto_pause do nsoundpool.auto_pause
+
+       # Resume all previously active streams
+       fun auto_resume do nsoundpool.auto_resume
+
+       # Resume a playback stream
+       fun resume(stream_id: Int) do nsoundpool.resume(stream_id)
+
+       # Set loop mode on a stream
+       fun stream_loop=(stream_id, looping: Int) do nsoundpool.set_loop(stream_id, looping)
+
+       # Change stream priority
+       fun stream_priority=(stream_id, priority: Int) do nsoundpool.set_priority(stream_id, priority)
+
+       # Change playback rate
+       fun stream_rate=(stream_id: Int, rate: Float) do nsoundpool.set_rate(stream_id, rate)
+
+       # Set stream volume
+       fun stream_volume(stream_id: Int, left_volume, right_volume: Float) do
+               nsoundpool.set_volume(stream_id, left_volume, right_volume)
+       end
+
+       # Stop a playback stream
+       fun stop_stream(stream_id: Int) do nsoundpool.stop(stream_id)
+
+       # Unload a sound from a sound ID
+       fun unload(sound: SoundSP): Bool do return nsoundpool.unload(sound.soundpool_id)
+end
+
+# Used to play sounds, designed to use with medium sized sounds or streams
+# The Android MediaPlayer has a complex state diagram that you'll need to
+# respect if you want your MediaPlayer to work fine, see the android doc
+class MediaPlayer
+       private var nmedia_player: NativeMediaPlayer
+
+       # The sound associated with this mediaplayer
+       var sound: nullable Sound
+
+       # Create a new MediaPlayer, but no sound is attached, you'll need
+       # to use `load_sound` before using it
+       init do self.nmedia_player = new NativeMediaPlayer
+
+       # Init the mediaplayer with a sound resource id
+       init from_id(context: NativeActivity, id: Int) do
+               self.nmedia_player = new NativeMediaPlayer
+               self.nmedia_player = nmedia_player.create(context, id)
+               self.sound = new SoundMP(id, self)
+       end
+
+       # Load a sound for a given resource id
+       fun load_sound(id: Int, context: NativeActivity): Sound do
+               self.nmedia_player = self.nmedia_player.create(context, id)
+               self.sound = new SoundMP(id, self)
+               return self.sound.as(not null)
+       end
+
+       # Starts or resume playback
+       # REQUIRE `self.sound != null`
+       fun start do
+               assert sound != null
+               nmedia_player.start
+       end
+
+       # Stops playback after playback has been stopped or paused
+       # REQUIRE `self.sound != null`
+       fun stop do
+               assert sound != null
+               nmedia_player.stop
+       end
+
+       # Prepares the player for playback, synchronously
+       # REQUIRE `self.sound != null`
+       fun prepare do
+               assert sound != null
+               nmedia_player.prepare
+       end
+
+       # Pauses playback
+       # REQUIRE `self.sound != null`
+       fun pause do
+               assert sound != null
+               nmedia_player.pause
+       end
+
+       # Checks whether the mediaplayer is playing
+       fun playing: Bool do return nmedia_player.playing
+
+       # Releases the resources associated with this MediaPlayer
+       fun destroy do
+               nmedia_player.release
+               self.sound = null
+       end
+
+       # Sets the datasource (file-pathor http/rtsp URL) to use
+       fun data_source(path: String): Sound do
+               sys.jni_env.push_local_frame(1)
+               nmedia_player.data_source_path(path.to_java_string)
+               sys.jni_env.pop_local_frame
+               self.sound = new SoundMP(null, self)
+               return self.sound.as(not null)
+       end
+       # Sets the data source (NativeFileDescriptor) to use
+       fun data_source_fd(fd: NativeFileDescriptor, start_offset, length: Int): Sound do
+               nmedia_player.data_source_fd(fd, start_offset, length)
+               self.sound = new SoundMP(null, self)
+               return self.sound.as(not null)
+       end
+
+       # Checks whether the MediaPlayer is looping or non-looping
+       fun looping: Bool do return nmedia_player.looping
+
+       # Sets the player to be looping or non-looping
+       fun looping=(b: Bool) do nmedia_player.looping = b
+
+       # Sets the volume on this player
+       fun volume=(volume: Float) do nmedia_player.volume = volume
+
+       # Sets the left volume and the right volume of this player
+       fun both_volume(left_volume, right_volume: Float) do nmedia_player.both_volume(left_volume, right_volume)
+
+       # Sets the audio stream type for this media player
+       fun stream_type=(stream_type: Int) do nmedia_player.stream_type = stream_type
+
+end
+
+# Represents an android sound that can be played by a SoundPool or a MediaPlayer
+# The only way to get a sound is by a MediaPlayer, a SoundPool, or the App
+abstract class Sound
+
+       # The resource ID of this sound
+       var id: nullable Int
+
+       fun play is abstract
+end
+
+# Sound implemented with a SoundPool
+class SoundSP
+       super Sound
+
+       # The SoundPool who loaded this sound
+       var soundpool: SoundPool
+
+       # The SoundID of this sound in his SoundPool
+       var soundpool_id: Int
+
+       private init (id: nullable Int, soundpool_id: Int, soundpool: SoundPool) do
+               self.id = id
+               self.soundpool_id = soundpool_id
+               self.soundpool = soundpool
+       end
+
+       redef fun play do soundpool.play(soundpool_id)
+end
+
+# Sound Implemented with a MediaPlayer
+class SoundMP
+       super Sound
+
+       # The MediaPlayer who loaded this sound
+       var media_player: MediaPlayer
+
+       private init (id: nullable Int, media_player: MediaPlayer) do
+               self.id = id
+               self.media_player = media_player
+       end
+
+       redef fun play do self.media_player.start
+end
+
+redef class App
+
+       fun default_mediaplayer: MediaPlayer is cached do return new MediaPlayer
+       fun default_soundpool: SoundPool is cached do return new SoundPool
+
+       # Get the native audio manager
+       private fun audio_manager: NativeAudioManager import native_activity in "Java" `{
+               return (AudioManager)App_native_activity(recv).getSystemService(Context.AUDIO_SERVICE);
+       `}
+
+       # Manages whether the app sound need to be in headphones mode or not
+       # TODO: this method is not ideal, need to find a better way
+       fun manage_audio_mode import native_activity in "Java" `{
+               AudioManager manager = (AudioManager)App_native_activity(recv).getSystemService(Context.AUDIO_SERVICE);
+               manager.setMode(0);
+                       if (manager.isWiredHeadsetOn()) {
+                               manager.setSpeakerphoneOn(false);
+                       } else {
+                               manager.setSpeakerphoneOn(true);
+                       }
+       `}
+
+       # Retrieve a sound with a soundpool in the `assets` folder using it's name
+       # Used to play short songs, can play multiple sounds simultaneously
+       fun load_sound(path: String): Sound do
+               return default_soundpool.load_asset_fd(asset_manager.open_fd(path))
+       end
+
+       # Retrieve a music with a media player in the `assets`folder using it's name
+       # Used to play long sounds or musics, can't play multiple sounds simultaneously
+       fun load_music(path: String): Sound do
+               var fd = asset_manager.open_fd(path)
+               var sound =  default_mediaplayer.data_source_fd(fd.file_descriptor, fd.start_offset, fd.length)
+               return sound
+       end
+
+       # same as `load_sound` but load the sound from the `res\raw` folder
+       fun load_sound_from_res(sound_name: String): Sound do
+               return default_soundpool.load_name(resource_manager,self.native_activity, sound_name)
+       end
+
+       # same as `load_music` but load the sound from the `res\raw` folder
+       fun load_music_from_res(music: String): Sound do
+               return default_mediaplayer.load_sound(resource_manager.raw_id(music), self.native_activity)
+       end
+
+end
diff --git a/lib/android/bundle/bundle.nit b/lib/android/bundle/bundle.nit
new file mode 100644 (file)
index 0000000..b8b8390
--- /dev/null
@@ -0,0 +1,759 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
+#
+# 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 mapping class of `String` to various value types used by the 
+# Android API for various data exchange purposes
+module bundle
+
+import native_app_glue
+import serialization
+import json_serialization
+
+in "Java" `{
+       import android.os.Bundle;
+       import android.app.Activity;
+       import java.util.ArrayList;
+       import java.util.Set;
+`}
+
+extern class NativeBundle in "Java" `{ android.os.Bundle `}
+       super JavaObject
+       redef type SELF: NativeBundle
+
+       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 key_set: HashSet[JavaString] import HashSet[JavaString], 
+         HashSet[JavaString].add in "Java" `{ 
+               Set<String> java_set = recv.keySet(); 
+               int nit_hashset = new_HashSet_of_JavaString();
+
+               for (String element: java_set)
+                       HashSet_of_JavaString_add(nit_hashset, element);
+
+               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 put_byte(key: JavaString, value: Int) in "Java" `{ 
+               recv.putByte(key, (byte) value); 
+       `}
+       fun put_char(key: JavaString, value: Char) in "Java" `{ 
+               recv.putChar(key, value); 
+       `}
+       fun put_short(key: JavaString, value: Int) in "Java" `{ 
+               recv.putShort(key, (short) value); 
+       `}
+       fun put_int(key: JavaString, value: Int) in "Java" `{ 
+               recv.putInt(key, (int) value); 
+       `}
+       fun put_long(key: JavaString, value: Int) in "Java" `{ 
+               recv.putLong(key, value); 
+       `}
+       fun put_float(key: JavaString, value: Float) in "Java" `{ 
+               recv.putFloat(key, (float) value); 
+       `}
+       fun put_double(key: JavaString, value: Float) in "Java" `{ 
+               recv.putDouble(key, value); 
+       `}
+       fun put_string(key: JavaString, value: JavaString) in "Java" `{ 
+               recv.putString(key, value); 
+       `}
+       fun put_char_sequence(key: JavaString, value: JavaString) in "Java" `{ 
+               recv.putCharSequence(key, value); 
+       `}
+       fun put_integer_array_list(key: JavaString, value: Array[Int]) 
+         import Array[Int].length, Array[Int].[] in "Java" `{
+               ArrayList<Integer> java_array = 
+                       new ArrayList<Integer>(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); 
+       `}
+       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>(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); 
+       `}
+       fun put_char_sequence_array_list(key: JavaString, value: Array[JavaString])
+         import Array[JavaString].length, Array[JavaString].[] in "Java" `{
+               ArrayList<CharSequence> java_array = 
+                 new ArrayList<CharSequence>(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); 
+       `}
+       fun put_boolean_array(key: JavaString, value: Array[Bool])
+         import Array[Bool].length, Array[Bool].[] in "Java" `{
+               boolean[] java_array = new boolean[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); 
+       `}
+       fun put_byte_array(key: JavaString, value: Array[Int])
+         import Array[Int].length, Array[Int].[] in "Java" `{
+               byte[] java_array = new byte[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); 
+       `}
+       fun put_short_array(key: JavaString, value: Array[Int])
+         import Array[Int].length, Array[Int].[] in "Java" `{
+               short[] java_array = new short[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); 
+       `}
+       fun put_char_array(key: JavaString, value: Array[Char])
+         import Array[Char].length, Array[Char].[] in "Java" `{
+               char[] java_array = new char[Array_of_Char_length(value)];
+               
+               for(int i=0; i < java_array.length; ++i)
+                       java_array[i] = Array_of_Char__index(value, i);
+
+               recv.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[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); 
+       `}
+       fun put_long_array(key: JavaString, value: Array[Int])
+         import Array[Int].length, Array[Int].[] in "Java" `{
+               long[] java_array = new long[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); 
+       `}
+       fun put_float_array(key: JavaString, value: Array[Float])
+         import Array[Float].length, Array[Float].[] in "Java" `{
+               float[] java_array = new float[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); 
+       `}
+       fun put_double_array(key: JavaString, value: Array[Float])
+         import Array[Float].length, Array[Float].[] in "Java" `{
+               double[] java_array = new double[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); 
+       `}
+       fun put_string_array(key: JavaString, value: Array[JavaString])
+         import Array[JavaString].length, Array[JavaString].[] in "Java" `{
+               String[] java_array = new String[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); 
+       `}
+       fun put_char_sequence_array(key: JavaString, value: Array[JavaString])
+         import Array[JavaString].length, Array[JavaString].[] in "Java" `{
+               CharSequence[] java_array = new CharSequence[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); 
+       `}
+       fun put_bundle(key: JavaString, value: NativeBundle) in "Java" `{ 
+               recv.putBundle(key, value); 
+       `}
+       fun get_boolean(key: JavaString): Bool in "Java" `{ return recv.getBoolean(key); `}
+       fun get_boolean_with_def_value(key: JavaString, def_value: Bool): Bool in "Java" `{
+               return recv.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_char(key: JavaString): Char in "Java" `{ return recv.getChar(key); `}
+       fun get_char_with_def_value(key: JavaString, def_value: Char): Char in "Java" `{
+               return recv.getChar(key, def_value); 
+       `}
+       fun get_short(key: JavaString): Int in "Java" `{ return (short) recv.getShort(key); `}
+       fun get_short_with_def_value(key: JavaString, def_value: Int): Int in "Java" `{
+               return (short) recv.getShort(key, (short) def_value); 
+       `}
+       fun get_int(key: JavaString): Int in "Java" `{ return recv.getInt(key); `}
+       fun get_int_with_def_value(key: JavaString, def_value: Int): Int in "Java" `{
+               return (int) recv.getInt(key, (int) def_value);
+       `}
+       # FIXME: Get rid of the int cast as soon as the ffi is fixed
+       fun get_long(key: JavaString): Int in "Java" `{ return (int) recv.getLong(key); `}
+       # FIXME: Get rid of the int cast as soon as the ffi is fixed
+       fun get_long_with_def_value(key: JavaString, def_value: Int): Int in "Java" `{
+               return (int) recv.getLong(key); 
+       `}
+       fun get_float(key: JavaString): Float in "Java" `{
+               return (float) recv.getFloat(key); 
+       `}
+       fun get_float_with_def_value(key: JavaString, def_value: Float): Float in "Java" `{
+               return (float) recv.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_string(key: JavaString): JavaString in "Java" `{
+               return recv.getString(key);
+       `}
+       fun get_char_sequence(key: JavaString): JavaString in "Java" `{
+               return (String) recv.getCharSequence(key); 
+       `}
+       fun get_bundle(key: JavaString): NativeBundle in "Java" `{
+               return recv.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); 
+               int nit_array = new_Array_of_Int();
+
+               if (java_array == null) return nit_array;
+
+               for (int element: java_array)
+                       Array_of_Int_add(nit_array, element);
+
+               return nit_array;
+       `}
+       fun get_string_array_list(key: JavaString): Array[JavaString]
+               import Array[JavaString], Array[JavaString].add in "Java" `{
+               ArrayList<String> java_array = recv.getStringArrayList(key); 
+               int nit_array = new_Array_of_JavaString();
+
+               if (java_array == null) return nit_array;
+
+               for (String element: java_array)
+                       Array_of_JavaString_add(nit_array, element);
+
+               return nit_array;
+       `}
+       fun get_char_sequence_array_list(key: JavaString): Array[JavaString]
+               import Array[JavaString], Array[JavaString].add in "Java" `{
+               ArrayList<CharSequence> java_array = recv.getCharSequenceArrayList(key); 
+               int nit_array = new_Array_of_JavaString();
+
+               if (java_array == null) return nit_array;
+
+               for (CharSequence element: java_array)
+                       Array_of_JavaString_add(nit_array, (String) element);
+
+               return nit_array;
+       `}
+       fun get_boolean_array(key: JavaString): Array[Bool]
+               import Array[Bool], Array[Bool].add in "Java" `{ 
+               boolean[] java_array = recv.getBooleanArray(key); 
+               int nit_array = new_Array_of_Bool();
+
+               if (java_array == null) return nit_array;
+
+               for (int i=0; i < java_array.length; ++i)
+                       Array_of_Bool_add(nit_array, java_array[i]);
+
+               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); 
+               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, (int) 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); 
+               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, (int) java_array[i]);
+                       
+               return nit_array;
+       `}
+       fun get_char_array(key: JavaString): Array[Char]
+               import Array[Char], Array[Char].add in "Java" `{ 
+               char[] java_array = recv.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]);
+                       
+               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); 
+               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); 
+               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, (int) 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); 
+               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); 
+               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[JavaString]
+               import Array[JavaString], Array[JavaString].add in "Java" `{ 
+               String[] java_array = recv.getStringArray(key); 
+               int nit_array = new_Array_of_JavaString();
+               
+               if (java_array == null) return nit_array;
+
+               for(int i=0; i < java_array.length; ++i)
+                       Array_of_JavaString_add(nit_array, java_array[i]);
+                       
+               return nit_array;
+       `}
+       fun get_char_sequence_array(key: JavaString): Array[JavaString]
+               import Array[JavaString], Array[JavaString].add in "Java" `{ 
+               CharSequence[] java_array = recv.getCharSequenceArray(key); 
+               int nit_array = new_Array_of_JavaString();
+               
+               if (java_array == null) return nit_array;
+
+               for(int i=0; i < java_array.length; ++i)
+                       Array_of_JavaString_add(nit_array, (String) java_array[i]);
+                       
+               return nit_array;
+       `}
+       fun describe_contents: Int in "Java" `{ return recv.describeContents(); `}
+       fun to_string: JavaString in "Java" `{ return recv.toString(); `}
+end
+
+# A class mapping `String` keys to various value types
+class Bundle
+       private var native_bundle: NativeBundle
+       private var context: NativeActivity
+
+       init(app: App)
+       do
+               self.context = app.native_activity
+               setup
+       end
+
+       private fun set_vars(native_bundle: NativeBundle)
+       do
+               self.native_bundle = native_bundle.new_global_ref
+       end
+
+       private fun setup import context, set_vars in "Java" `{
+               Activity context = (Activity) Bundle_context(recv);
+               Bundle bundle = new Bundle();
+               
+               Bundle_set_vars(recv, bundle);
+       `}
+
+       # Returns `true` if the Bundle contains this key
+       fun has(key: String): Bool
+       do
+               sys.jni_env.push_local_frame(1)
+               var return_value = native_bundle.contains_key(key.to_java_string)
+               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
+
+       # Returns true if the current `Bundle` is empty
+       fun is_empty: Bool do return native_bundle.is_empty
+
+       # Clears all entries
+       fun clear do native_bundle.clear
+
+       # Removes the entry associated with the given key
+       fun remove(key: String)
+       do
+               sys.jni_env.push_local_frame(1)
+               native_bundle.remove(key.to_java_string)
+               sys.jni_env.pop_local_frame
+       end
+
+       # Returns a `HashSet[String]` containing every mapping keys in the current
+       # `Bundle`
+       fun keys: HashSet[String]
+       do
+               var javastring_set = native_bundle.key_set
+               var string_set = new HashSet[String]
+
+               for element in javastring_set do
+                       string_set.add(element.to_s)
+               end
+
+               return string_set
+       end
+
+       # 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 
+       # overwrites it
+       #
+       # To retrieve entries, you'll have to call the type corresponding method
+       # conforming to these rules :
+       #
+       # | Nit type              | corresponding getter            |
+       # |:----------------------|:--------------------------------|
+       # ! `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`               |
+       # | `Array[Serializable]` | `deserialize_array`             |
+       fun []=(key: String, value: Serializable): Bundle
+       do
+               sys.jni_env.push_local_frame(1)
+               value.add_to_bundle(self.native_bundle, key.to_java_string)
+               sys.jni_env.pop_local_frame
+               return self
+       end
+
+       # 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 
+       # redefines the appropriate methods. Refer to `Serializable` documentation
+       # for further details
+       fun deserialize(key: String): nullable Object
+       do
+               var serialized_string = self.string(key)
+
+               if serialized_string == null then return null
+
+               var deserializer = new JsonDeserializer(serialized_string)
+
+               return deserializer.deserialize
+       end
+
+       # 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 
+       # redefine the appropriate methods. Refer to `Serializable` documentation
+       # for further details
+       fun deserialize_array(key: String): nullable Array[nullable Object]
+       do
+               var serialized_array = self.array_of_string(key)
+
+               if serialized_array == null then return null
+
+               var deserialized_array = new Array[nullable Object]
+
+               for serialized_element in serialized_array do
+                       var deserializer = new JsonDeserializer(serialized_element)
+                       deserialized_array.add(deserializer.deserialize)
+               end
+
+               return deserialized_array
+       end
+
+       # Retrieves the `String` value corresponding to the given key
+       # Returns `null` if none or if it's the wrong value type
+       fun string(key: String): nullable String
+       do
+               sys.jni_env.push_local_frame(1)
+               var return_value = native_bundle.get_string(key.to_java_string).to_s
+               sys.jni_env.pop_local_frame
+
+               if return_value == "" then return null
+
+               return return_value.to_s
+       end
+
+       # Retrieves the `Bool` value corresponding to the given key
+       # Returns the `def_value` if none or if it's the wrong value type
+       fun bool(key: String, def_value: Bool): Bool
+       do
+               sys.jni_env.push_local_frame(1)
+               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
+       end
+
+       # Retrieves the `Char` value corresponding to the given key
+       # Returns the `def_value` if none or if it's the wrong value type
+       fun char(key: String, def_value: Char): Char
+       do
+               sys.jni_env.push_local_frame(1)
+               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
+       end
+
+       # Retrieves the `Int` value corresponding to the given key
+       # Returns the `def_value` if none or if it's the wrong value type
+       fun int(key: String, def_value: Int): Int
+       do
+               sys.jni_env.push_local_frame(1)
+               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 = 
+                       native_bundle.get_double_with_def_value(key.to_java_string, def_value)
+               sys.jni_env.pop_local_frame
+               return return_value
+       end
+
+       # Retrieves the `Array[Float]` value corresponding to the given key
+       # Returns the `null` if none or if it's the wrong value type
+       fun array_of_float(key: String): nullable Array[Float]
+       do
+               sys.jni_env.push_local_frame(1)
+               var return_value = native_bundle.get_double_array(key.to_java_string)
+               sys.jni_env.pop_local_frame
+
+               if return_value.is_empty then return null
+
+               return return_value
+       end
+
+       # Retrieves the `Array[Char]` value corresponding to the given key
+       # Returns the `null` if none or if it's the wrong value type
+       fun array_of_char(key: String): nullable Array[Char]
+       do
+               sys.jni_env.push_local_frame(1)
+               var return_value = native_bundle.get_char_array(key.to_java_string)
+               sys.jni_env.pop_local_frame
+
+               if return_value.is_empty then return null
+
+               return return_value
+       end
+       # Retrieves the `Array[Int]` value corresponding to the given key
+       # Returns the `null` if none or if it's the wrong value type
+       fun array_of_int(key: String): nullable Array[Int]
+       do
+               sys.jni_env.push_local_frame(1)
+               var return_value = native_bundle.get_long_array(key.to_java_string)
+               sys.jni_env.pop_local_frame
+
+               if return_value.is_empty then return null
+
+               return return_value
+       end
+
+       # Retrieves the `Array[Bool]` value corresponding to the given key
+       # Returns the `null` if none or if it's the wrong value type
+       fun array_of_bool(key: String): nullable Array[Bool]
+       do
+               sys.jni_env.push_local_frame(1)
+               var return_value = native_bundle.get_boolean_array(key.to_java_string)
+               sys.jni_env.pop_local_frame
+
+               if return_value.is_empty then return null
+
+               return return_value
+       end
+
+       # Retrieves the `Array[String]` value corresponding to the given key
+       # Returns the `null` if none or if it's the wrong value type
+       fun array_of_string(key: String): nullable Array[String]
+       do
+               var string_array = new Array[String]
+               sys.jni_env.push_local_frame(1)
+               var return_value = native_bundle.get_string_array(key.to_java_string)
+
+               for element in return_value 
+               do
+                       string_array.add(element.to_s)
+               end
+
+               sys.jni_env.pop_local_frame
+               
+               if return_value.is_empty then return null
+
+               return string_array
+       end
+end
+
+redef class Serializable
+       # Called by `Bundle::[]=` to dynamically choose the appropriate method according
+       # to the value type to store
+       # Non-primitive Object (`String` excluded) will be stored as a serialized json `String`
+       # Refine your class to customize this method behaviour
+       protected fun add_to_bundle(bundle: NativeBundle, key: JavaString)
+       do
+               sys.jni_env.push_local_frame(1)
+               var serialized_string = new StringOStream
+               var serializer = new JsonSerializer(serialized_string)
+               serializer.serialize(self)
+
+               bundle.put_string(key, serialized_string.to_s.to_java_string)
+       end
+end
+
+redef class Int
+       redef fun add_to_bundle(bundle, key)
+       do
+               bundle.put_long(key, self)
+       end
+end
+
+redef class Char
+       redef fun add_to_bundle(bundle, key)
+       do
+               bundle.put_char(key, self)
+       end
+end
+
+redef class Float
+       redef fun add_to_bundle(bundle, key)
+       do
+               bundle.put_double(key, self)
+       end
+end
+
+redef class Bool
+       redef fun add_to_bundle(bundle, key)
+       do
+               bundle.put_boolean(key, self)
+       end
+end
+
+redef class String
+       redef fun add_to_bundle(bundle, key)
+       do
+               bundle.put_string(key, self.to_java_string)
+       end
+end
+
+redef class Array[E]
+       redef fun add_to_bundle(bundle, key)
+       do
+               if self isa Array[Bool] then
+                       bundle.put_boolean_array(key, self)
+               else if self isa Array[Int] then
+                       bundle.put_long_array(key, self)
+               else if self isa Array[Float] then
+                       bundle.put_double_array(key, self)
+               else if self isa Array[Char] then
+                       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] 
+
+                       for element in self do
+                               java_string_array.push(element.to_s.to_java_string)
+                       end
+
+                       bundle.put_string_array(key, java_string_array)
+               else if self isa Array[Serializable] then
+                       sys.jni_env.push_local_frame(self.length)
+                       var java_string_array = new Array[JavaString]
+
+                       for element in self do
+                       var serialized_string = new StringOStream
+                               var serializer = new JsonSerializer(serialized_string)
+                               serializer.serialize(element)
+                               java_string_array.add(serialized_string.to_s.to_java_string)
+                       end
+
+                       bundle.put_string_array(key, java_string_array)
+               end
+       end
+end
diff --git a/lib/android/java_io.nit b/lib/android/java_io.nit
new file mode 100644 (file)
index 0000000..7b67cb3
--- /dev/null
@@ -0,0 +1,178 @@
+# this file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2014 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.
+
+# java io services
+#
+# this module is used by `assets_and_resources` and `audio` for advanced purposes
+module java_io
+
+import java
+
+in "Java" `{
+       import java.io.File;
+       import java.io.FileInputStream;
+       import java.io.FileOutputStream;
+       import java.io.FileDescriptor;
+       import java.io.IOException;
+       import java.io.SyncFailedException;
+       import android.util.Log;
+`}
+
+extern class NativeFile in "Java" `{ java.io.File `}
+       super JavaObject
+       redef type SELF: NativeFile
+
+       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 create_file: Bool in "Java" `{
+               try {
+                       return recv.createNewFile();
+               }catch(IOException e){
+                       Log.e("Can't create file", e.getMessage());
+                       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 canonical_file: NativeFile in "Java" `{
+               try {
+                       return recv.getCanonicalFile();
+               }catch(IOException e){
+                       Log.e("Can't create file", e.getMessage());
+                       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); `}
+end
+
+extern class NativeFileInputStream in "Java" `{ java.io.FileInputStream `}
+       super JavaObject
+       redef type SELF: NativeFileInputStream
+
+       fun available: Int in "Java" `{
+               try {
+                       return recv.available();
+               }catch(IOException e){
+                       e.printStackTrace();
+                       return -1;
+               }
+       `}
+       fun close in "Java" `{
+               try {
+                       recv.close();
+               }catch(IOException e){
+                       e.printStackTrace();
+               }
+       `}
+       fun read: Int in "Java" `{
+               try {
+                       return recv.read();
+               }catch(IOException e){
+                       e.printStackTrace();
+                       return -1;
+               }
+       `}
+       fun skip(byte_count: Int): Int in "Java" `{
+               try {
+                       return (int)recv.skip(byte_count);
+               }catch(IOException e){
+                       e.printStackTrace();
+                       return -1;
+               }
+       `}
+end
+
+extern class NativeFileOutputStream in "Java" `{ java.io.FileOutputStream `}
+       super JavaObject
+       redef type SELF: NativeFileOutputStream
+
+       fun close in "Java" `{
+               try {
+                       recv.close();
+               }catch(IOException e){
+                       e.printStackTrace();
+               }
+       `}
+       fun write(one_byte: Int) in "Java" `{
+               try {
+                       recv.write(one_byte);
+               }catch(IOException e){
+                       e.printStackTrace();
+               }
+       `}
+       fun flush in "Java" `{
+               try {
+                       recv.flush();
+               }catch(IOException e){
+                       e.printStackTrace();
+               }
+       `}
+end
+
+extern class NativeFileDescriptor in "Java" `{ java.io.FileDescriptor `}
+       super JavaObject
+       redef type SELF: NativeFileDescriptor
+       fun sync in "Java" `{
+               try{
+                       recv.sync();
+               }catch(SyncFailedException e){
+                       e.printStackTrace();
+               }
+       `}
+       fun valid: Bool in "Java" `{ return recv.valid(); `}
+end
+
+extern class NativeInputStream in "Java" `{ java.io.InputStream `}
+       super JavaObject
+       redef type SELF: NativeInputStream
+
+       fun available: Int in "Java" `{
+               try {
+                       return recv.available();
+               }catch(IOException e){
+                       e.printStackTrace();
+                       return -1;
+               }
+       `}
+
+       fun close in "Java" `{
+               try {
+                       recv.close();
+               }catch(IOException e){
+                       e.printStackTrace();
+               }
+       `}
+end
index c78a09d..577d0d2 100644 (file)
@@ -19,7 +19,7 @@ module shared_preferences_api10
 
 import native_app_glue
 import serialization
-import json_serialization
+private import json_serialization
 
 in "Java" `{
        import android.content.SharedPreferences;
@@ -366,20 +366,23 @@ class SharedPreferences
                self.editor.delete_global_ref
        end
 
-       # Save data to file dynamically calling the appropriate method according to value type
-       # Non-primitive Object (`String` excluded) will be stored as a serialized json `String`
-       # Nit `Int` are stored as Java `long`, therefore you'll have to retrieve it with `long` method
-       fun []=(key: String, value: Serializable)
+       # Store `value` as a serialized Json string
+       fun []=(key: String, value: nullable Serializable)
        do
-               value.add_to_preferences(self, key)
+               var serialized_string = new StringOStream
+               var serializer = new JsonSerializer(serialized_string)
+               serializer.serialize(value)
+
+               add_string(key, serialized_string.to_s)
                commit_if_auto
        end
 
-       # Retrieve an `Object` serialized via `[]=` function
+       # 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
        # the appropriate methods. Refer to `Serializable` documentation for further details
-       fun deserialize(key: String): nullable Object
+       fun [](key: String): nullable Object
        do
                var serialized_string = self.string(key, "")
 
@@ -395,45 +398,3 @@ redef class App
                return new SharedPreferences.privately(self, "")
        end
 end
-
-redef class Serializable
-       # Called by []= operator to dynamically call the appropriate add method 
-       # Non-primitive Object (`String` excluded) will be stored as a serialized json `String`
-       # Refine your class to customize this method behaviour
-       protected fun add_to_preferences(shared_preferences: SharedPreferences, key: String) 
-       do 
-               var serialized_string = new StringOStream
-               var serializer = new JsonSerializer(serialized_string)
-               serializer.serialize(self)
-
-               shared_preferences.add_string(key, serialized_string.to_s)
-       end
-end
-
-redef class Bool
-       redef fun add_to_preferences(shared_preferences, key)
-       do
-               shared_preferences.add_bool(key, self)
-       end
-end
-
-redef class Int
-       redef fun add_to_preferences(shared_preferences, key)
-       do
-               shared_preferences.add_long(key, self)
-       end
-end
-
-redef class Float
-       redef fun add_to_preferences(shared_preferences, key)
-       do
-               shared_preferences.add_float(key, self)
-       end
-end
-
-redef class String
-       redef fun add_to_preferences(shared_preferences, key)
-       do
-               shared_preferences.add_string(key, self)
-       end
-end
index 4a87478..4709ca5 100644 (file)
@@ -22,6 +22,7 @@ import shared_preferences
 in "Java" `{ 
        import java.util.HashSet;
        import java.util.Set;
+       import android.content.Context; 
 `}
 
 redef extern class NativeSharedPreferences
@@ -66,7 +67,7 @@ redef class SharedPreferences
        end
 
        # File access mode
-       private fun multi_process_mode: Int in "Java" `{ return Content.MODE_MULTI_PROCESS; `}
+       private fun multi_process_mode: Int in "Java" `{ return Context.MODE_MULTI_PROCESS; `}
 
        # Returns the `HashSet[JavaString]` value corresponding the given key or `null` if none
        #
index b670cbe..152ad55 100644 (file)
@@ -465,205 +465,297 @@ end
 
 # Reproduce Enum of CURL Options usable, used for CCurl.easy_setopt
 extern class CURLOption `{ CURLoption `}
+
+       # Behavior options
+
+       # Display verbose information.
+       new verbose `{ return CURLOPT_VERBOSE; `}
+       # Include the header in the body output.
+       new header `{ return CURLOPT_HEADER; `}
+       # Shut off the progress meter.
+       new no_progress `{ return CURLOPT_NOPROGRESS; `}
+       # Do not install signal handlers.
+       new     no_signal `{ return CURLOPT_NOSIGNAL; `}
+       # Transfer multiple files according to a file name pattern.
+       new     wild_card_match `{ return CURLOPT_WILDCARDMATCH; `}
+
+       # Callback Options
+
+       # Callback for writing data.
        new write_function `{ return CURLOPT_WRITEFUNCTION; `}
+       # Data pointer to pass to the write callback.
        new write_data `{ return CURLOPT_WRITEDATA; `}
-#      new     `{ return CURLOPT_FILE; `}
+
+#      new     `{ return CURLOPT_READFUNCTION; `}
+#      new `{ return CURLOPT_READDATA; `}
+#      new     `{ return CURLOPT_IOCTLFUNCTION; `}
+#      new     `{ return CURLOPT_IOCTLDATA; `}
+#      new     `{ return CURLOPT_SEEKFUNCTION; `}
+#      new     `{ return CURLOPT_SEEKDATA; `}
+#      new     `{ return CURLOPT_SOCKOPTFUNCTION; `}
+#      new     `{ return CURLOPT_SOCKOPTDATA; `}
+#      new     `{ return CURLOPT_OPENSOCKETFUNCTION; `}
+#      new     `{ return CURLOPT_OPENSOCKETDATA; `}
+#      new     `{ return CURLOPT_CLOSESOCKETFUNCTION; `}
+#      new     `{ return CURLOPT_CLOSESOCKETDATA; `}
+#      new     `{ return CURLOPT_PROGRESSFUNCTION; `}
+#      new     `{ return CURLOPT_PROGRESSDATA; `}
+#      new     `{ return CURLOPT_HEADERFUNCTION; `}
+#      new     `{ return CURLOPT_DEBUGFUNCTION; `}
+#      new     `{ return CURLOPT_DEBUGDATA; `}
+#      new     `{ return CURLOPT_SSL_CTX_FUNCTION; `}
+#      new     `{ return CURLOPT_SSL_CTX_DATA; `}
+#      new     `{ return CURLOPT_CONV_TO_NETWORK_FUNCTION; `}
+#      new     `{ return CURLOPT_CONV_FROM_NETWORK_FUNCTION; `}
+#      new     `{ return CURLOPT_CONV_FROM_UTF8_FUNCTION; `}
+#      new     `{ return CURLOPT_INTERLEAVEFUNCTION; `}
+#      new     `{ return CURLOPT_INTERLEAVEDATA; `}
+#      new     `{ return CURLOPT_CHUNK_BGN_FUNCTION; `}
+#      new     `{ return CURLOPT_CHUNK_END_FUNCTION; `}
+#      new     `{ return CURLOPT_CHUNK_DATA; `}
+#      new     `{ return CURLOPT_FNMATCH_FUNCTION; `}
+#      new     `{ return CURLOPT_FNMATCH_DATA; `}
+
+       # Error Options
+
+#      new     `{ return CURLOPT_ERRORBUFFER; `}
+#      new     `{ return CURLOPT_STDERR; `}
+
+       # Fail on HTTP 4xx errors.
+       new fail_on_error `{ return CURLOPT_FAILONERROR; `}
+
+       # Networkd Options
+
+       # URL to work on.
        new url `{ return CURLOPT_URL; `}
-#      new     `{ return CURLOPT_PORT; `}
+
+#      new     `{ return CURLOPT_PROTOCOLS; `}
+#      new     `{ return CURLOPT_REDIR_PROTOCOLS; `}
 #      new     `{ return CURLOPT_PROXY; `}
+#      new     `{ return CURLOPT_PROXYPORT; `}
+#      new     `{ return CURLOPT_PROXYTYPE; `}
+#      new     `{ return CURLOPT_NOPROXY; `}
+#      new     `{ return CURLOPT_HTTPPROXYTUNNEL; `}
+#      new     `{ return CURLOPT_SOCKS5_GSSAPI_SERVICE; `}
+#      new     `{ return CURLOPT_SOCKS5_GSSAPI_NEC; `}
+#      new     `{ return CURLOPT_INTERFACE; `}
+#      new     `{ return CURLOPT_LOCALPORT; `}
+#      new     `{ return CURLOPT_LOCALPORTRANGE; `}
+#      new     `{ return CURLOPT_DNS_CACHE_TIMEOUT; `}
+#      new     `{ return CURLOPT_DNS_USE_GLOBAL_CACHE; `} /* DEPRECATED, do not use! */
+#      new     `{ return CURLOPT_BUFFERSIZE; `}
+#      new     `{ return CURLOPT_PORT; `}
+#      new     `{ return CURLOPT_TCP_NODELAY; `}
+#      new     `{ return CURLOPT_ADDRESS_SCOPE; `}
+#      new     `{ return CURLOPT_TCP_KEEPALIVE; `}
+#      new     `{ return CURLOPT_TCP_KEEPIDLE; `}
+#      new     `{ return CURLOPT_TCP_KEEPINTVL; `}
+
+       # Names and Passwords Options
+
+#      new     `{ return CURLOPT_NETRC; `}
+#      new     `{ return CURLOPT_NETRC_FILE; `}
 #      new     `{ return CURLOPT_USERPWD; `}
 #      new     `{ return CURLOPT_PROXYUSERPWD; `}
-#      new     `{ return CURLOPT_RANGE; `}
-#      new     `{ return CURLOPT_INFILE; `}
-#      new     `{ return CURLOPT_ERRORBUFFER; `}
-#      new     `{ return CURLOPT_WRITEFUNCTION; `}
-#      new     `{ return CURLOPT_READFUNCTION; `}
-#      new     `{ return CURLOPT_TIMEOUT; `}
-#      new     `{ return CURLOPT_INFILESIZE; `}
+
+       new     username `{ return CURLOPT_USERNAME; `}
+       new     password `{ return CURLOPT_PASSWORD; `}
+
+#      new     `{ return CURLOPT_PROXYUSERNAME; `}
+#      new     `{ return CURLOPT_PROXYPASSWORD; `}
+#      new     `{ return CURLOPT_HTTPAUTH; `}
+#      new     `{ return CURLOPT_TLSAUTH_USERNAME; `}
+#      new     `{ return CURLOPT_TLSAUTH_PASSWORD; `}
+#      new     `{ return CURLOPT_PROXYAUTH; `}
+
+       # HTTP Options
+
+#      new     `{ return CURLOPT_AUTOREFERER; `}
+
+       # Accept-Encoding and automatic decompressing data.
+       new     accept_encoding `{ return CURLOPT_ACCEPT_ENCODING; `}
+       # Request Transfer-Encoding.
+       new     transfert_encoding `{ return CURLOPT_TRANSFER_ENCODING; `}
+       # Follow HTTP redirects.
+       new follow_location `{ return CURLOPT_FOLLOWLOCATION; `}
+
+#      new     `{ return CURLOPT_UNRESTRICTED_AUTH; `}
+#      new     `{ return CURLOPT_MAXREDIRS; `}
+#      new     `{ return CURLOPT_POSTREDIR; `}
+
+       # Issue a HTTP PUT request.
+       new put `{ return CURLOPT_PUT; `}
+       # Issue a HTTP POS request.
+       new post `{ return CURLOPT_POST; `}
+       # Send a POST with this data.
        new postfields `{ return CURLOPT_POSTFIELDS; `}
+
+#      new     `{ return CURLOPT_POSTFIELDSIZE; `}
+#      new     `{ return CURLOPT_POSTFIELDSIZE_LARGE; `}
+#      new     `{ return CURLOPT_COPYPOSTFIELDS; `}
+#      new     `{ return CURLOPT_HTTPPOST; `}
 #      new     `{ return CURLOPT_REFERER; `}
-#      new     `{ return CURLOPT_FTPPORT; `}
+
+       # User-Agent: header.
        new user_agent  `{ return CURLOPT_USERAGENT; `}
-#      new     `{ return CURLOPT_LOW_SPEED_LIMIT; `}
-#      new     `{ return CURLOPT_LOW_SPEED_TIME; `}
-#      new     `{ return CURLOPT_RESUME_FROM; `}
-#      new     `{ return CURLOPT_COOKIE; `}
+       # Custom HTTP headers.
        new httpheader `{ return CURLOPT_HTTPHEADER; `}
-#      new     `{ return CURLOPT_HTTPPOST; `}
-#      new     `{ return CURLOPT_SSLCERT; `}
-#      new     `{ return CURLOPT_KEYPASSWD; `}
-#      new     `{ return CURLOPT_CRLF; `}
-#      new     `{ return CURLOPT_QUOTE; `}
-#      new     `{ return CURLOPT_WRITEHEADER; `}
+
+#      new     `{ return CURLOPT_HTTP200ALIASES; `}
+#      new     `{ return CURLOPT_COOKIE; `}
 #      new     `{ return CURLOPT_COOKIEFILE; `}
-#      new     `{ return CURLOPT_SSLVERSION; `}
-#      new     `{ return CURLOPT_TIMECONDITION; `}
-#      new     `{ return CURLOPT_TIMEVALUE; `}
-#      new     `{ return CURLOPT_CUSTOMREQUEST; `}
-#      new     `{ return CURLOPT_STDERR; `}
+#      new     `{ return CURLOPT_COOKIEJAR; `}
+#      new     `{ return CURLOPT_COOKIESESSION; `}
+#      new     `{ return CURLOPT_COOKIELIST; `}
+
+       # Issue a HTTP GET request.
+       new     get `{ return CURLOPT_HTTPGET; `}
+
+       # HTTP version to use.
+       new http_version `{ return CURLOPT_HTTP_VERSION; `}
+
+#      new     `{ return CURLOPT_IGNORE_CONTENT_LENGTH; `}
+#      new     `{ return CURLOPT_HTTP_CONTENT_DECODING; `}
+#      new     `{ return CURLOPT_HTTP_TRANSFER_DECODING; `}
+
+       # SMTP Options
+
+       # Address of the sender.
+       new     mail_from `{ return CURLOPT_MAIL_FROM; `}
+       # Address of the recipients.
+       new     mail_rcpt `{ return CURLOPT_MAIL_RCPT; `}
+
+#      new     `{ return CURLOPT_MAIL_AUTH; `}
+
+       # TFTP Options
+
+#      new     `{ return CURLOPT_TFTP_BLKSIZE; `}
+
+       # FTP Options
+
+#      new     `{ return CURLOPT_FTPPORT; `}
+#      new     `{ return CURLOPT_QUOTE; `}
 #      new     `{ return CURLOPT_POSTQUOTE; `}
-#      new     `{ return CURLOPT_WRITEINFO; `} /* DEPRECATED, do not use! */
-       new verbose `{ return CURLOPT_VERBOSE; `}                       # talk a lot
-       new header `{ return CURLOPT_HEADER; `}                  # throw the header out too
-       new no_progress `{ return CURLOPT_NOPROGRESS; `}         # shut off the progress meter
-       new no_body `{ return CURLOPT_NOBODY; `}                         # use HEAD to get http document
-       new fail_on_error `{ return CURLOPT_FAILONERROR; `}     # no output on http error codes >= 300
-       new upload `{ return CURLOPT_UPLOAD; `}                  # this is an upload
-       new post `{ return CURLOPT_POST; `}                              # HTTP POST method
-       new dir_list_only `{ return CURLOPT_DIRLISTONLY; `}     # bare names when listing directories
-       new append `{ return CURLOPT_APPEND; `}                  # Append instead of overwrite on upload!
-#      new     `{ return CURLOPT_NETRC; `}
-       new follow_location `{ return CURLOPT_FOLLOWLOCATION; `}        # use Location: Luke!
-       new transfert_text `{ return CURLOPT_TRANSFERTEXT; `} # transfer data in text/ASCII format
-       new put `{ return CURLOPT_PUT; `}                                       # HTTP PUT */
-#      new     `{ return CURLOPT_PROGRESSFUNCTION; `}
-#      new     `{ return CURLOPT_PROGRESSDATA; `}
-#      new     `{ return CURLOPT_AUTOREFERER; `}
-#      new     `{ return CURLOPT_PROXYPORT; `}
-#      new     `{ return CURLOPT_POSTFIELDSIZE; `}
-#      new     `{ return CURLOPT_HTTPPROXYTUNNEL; `}
-#      new     `{ return CURLOPT_INTERFACE; `}
-#      new     `{ return CURLOPT_KRBLEVEL; `}
-#      new     `{ return CURLOPT_SSL_VERIFYPEER; `}
-#      new     `{ return CURLOPT_CAINFO; `}
-#      new     `{ return CURLOPT_MAXREDIRS; `}
+#      new     `{ return CURLOPT_PREQUOTE; `}
+
+       # List only.
+       new dir_list_only `{ return CURLOPT_DIRLISTONLY; `}
+       # Append to remote file.
+       new append `{ return CURLOPT_APPEND; `}
+
+#      new     `{ return CURLOPT_FTP_USE_EPRT; `}
+#      new     `{ return CURLOPT_FTP_USE_EPSV; `}
+#      new     `{ return CURLOPT_FTP_USE_PRET; `}
+#      new     `{ return CURLOPT_FTP_CREATE_MISSING_DIRS; `}
+#      new     `{ return CURLOPT_FTP_RESPONSE_TIMEOUT; `}
+#      new     `{ return CURLOPT_FTP_ALTERNATIVE_TO_USER; `}
+#      new     `{ return CURLOPT_FTP_SKIP_PASV_IP; `}
+#      new     `{ return CURLOPT_FTPSSLAUTH; `}
+#      new     `{ return CURLOPT_FTP_SSL_CCC; `}
+#      new     `{ return CURLOPT_FTP_ACCOUNT; `}
+#      new     `{ return CURLOPT_FTP_FILEMETHOD; `}
+
+       # RTSP Options
+
+#      new     `{ return CURLOPT_RTSP_REQUEST; `}
+#      new     `{ return CURLOPT_RTSP_SESSION_ID; `}
+#      new     `{ return CURLOPT_RTSP_STREAM_URI; `}
+#      new     `{ return CURLOPT_RTSP_TRANSPORT; `}
+#      new     `{ return CURLOPT_RTSP_CLIENT_CSEQ; `}
+#      new     `{ return CURLOPT_RTSP_SERVER_CSEQ; `}
+
+       # Protocol Options
+
+       # Transfer data in text/ASCII format.
+       new transfert_text `{ return CURLOPT_TRANSFERTEXT; `}
+
+#      new     `{ return CURLOPT_PROXY_TRANSFER_MODE; `}
+#      new     `{ return CURLOPT_CRLF; `}
+#      new     `{ return CURLOPT_RANGE; `}
+#      new     `{ return CURLOPT_RESUME_FROM; `}
+#      new     `{ return CURLOPT_RESUME_FROM_LARGE; `}
+
+       # Issue a custom request/method.
+       new     custom_request `{ return CURLOPT_CUSTOMREQUEST; `}
+
 #      new     `{ return CURLOPT_FILETIME; `}
-#      new     `{ return CURLOPT_TELNETOPTIONS; `}
+
+       # Do not get the body contents.
+       new no_body `{ return CURLOPT_NOBODY; `}
+
+#      new     `{ return CURLOPT_INFILESIZE; `}
+#      new     `{ return CURLOPT_INFILESIZE_LARGE; `}
+
+       # Upload data.
+       new upload `{ return CURLOPT_UPLOAD; `}
+
+#      new     `{ return CURLOPT_MAXFILESIZE; `}
+#      new     `{ return CURLOPT_MAXFILESIZE_LARGE; `}
+#      new     `{ return CURLOPT_TIMECONDITION; `}
+#      new     `{ return CURLOPT_TIMEVALUE; `}
+
+       # Connection Options
+
+#      new     `{ return CURLOPT_TIMEOUT; `}
+#      new     `{ return CURLOPT_TIMEOUT_MS; `}
+#      new     `{ return CURLOPT_LOW_SPEED_LIMIT; `}
+#      new     `{ return CURLOPT_LOW_SPEED_TIME; `}
+#      new     `{ return CURLOPT_MAX_SEND_SPEED_LARGE; `}
+#      new     `{ return CURLOPT_MAX_RECV_SPEED_LARGE; `}
 #      new     `{ return CURLOPT_MAXCONNECTS; `}
-#      new     `{ return CURLOPT_CLOSEPOLICY; `} /* DEPRECATED, do not use! */
 #      new     `{ return CURLOPT_FRESH_CONNECT; `}
 #      new     `{ return CURLOPT_FORBID_REUSE; `}
-#      new     `{ return CURLOPT_RANDOM_FILE; `}
-#      new     `{ return CURLOPT_EGDSOCKET; `}
 #      new     `{ return CURLOPT_CONNECTTIMEOUT; `}
-#      new     `{ return CURLOPT_HEADERFUNCTION; `}
-#      new     `{ return CURLOPT_HTTPGET; `}
-#      new     `{ return CURLOPT_SSL_VERIFYHOST; `}
-#      new     `{ return CURLOPT_COOKIEJAR; `}
-#      new     `{ return CURLOPT_SSL_CIPHER_LIST; `}
-#      new     `{ return CURLOPT_HTTP_VERSION; `}
-#      new     `{ return CURLOPT_FTP_USE_EPSV; `}
+#      new     `{ return CURLOPT_CONNECTTIMEOUT_MS; `}
+#      new     `{ return CURLOPT_IPRESOLVE; `}
+#      new     `{ return CURLOPT_CONNECT_ONLY; `}
+#      new     `{ return CURLOPT_USE_SSL; `}
+#      new     `{ return CURLOPT_RESOLVE; `}
+#      new     `{ return CURLOPT_ACCEPTTIMEOUT_MS; `}
+
+       # SSL and Security Options
+
+#      new     `{ return CURLOPT_SSLCERT; `}
 #      new     `{ return CURLOPT_SSLCERTTYPE; `}
 #      new     `{ return CURLOPT_SSLKEY; `}
 #      new     `{ return CURLOPT_SSLKEYTYPE; `}
+#      new     `{ return CURLOPT_KEYPASSWD; `}
 #      new     `{ return CURLOPT_SSLENGINE; `}
 #      new     `{ return CURLOPT_SSLENGINE_DEFAULT; `}
-#      new     `{ return CURLOPT_DNS_USE_GLOBAL_CACHE; `} /* DEPRECATED, do not use! */
-#      new     `{ return CURLOPT_DNS_CACHE_TIMEOUT; `}
-#      new     `{ return CURLOPT_PREQUOTE; `}
-#      new     `{ return CURLOPT_DEBUGFUNCTION; `}
-#      new     `{ return CURLOPT_DEBUGDATA; `}
-#      new     `{ return CURLOPT_COOKIESESSION; `}
+#      new     `{ return CURLOPT_SSLVERSION; `}
+#      new     `{ return CURLOPT_SSL_VERIFYPEER; `}
+#      new     `{ return CURLOPT_CAINFO; `}
+#      new     `{ return CURLOPT_ISSUERCERT; `}
 #      new     `{ return CURLOPT_CAPATH; `}
-#      new     `{ return CURLOPT_BUFFERSIZE; `}
-#      new     `{ return CURLOPT_NOSIGNAL; `}
-#      new     `{ return CURLOPT_SHARE; `}
-#      new     `{ return CURLOPT_PROXYTYPE; `}
-#      new     `{ return CURLOPT_ACCEPT_ENCODING; `}
-#      new     `{ return CURLOPT_PRIVATE; `}
-#      new     `{ return CURLOPT_HTTP200ALIASES; `}
-#      new     `{ return CURLOPT_UNRESTRICTED_AUTH; `}
-#      new     `{ return CURLOPT_FTP_USE_EPRT; `}
-#      new     `{ return CURLOPT_HTTPAUTH; `}
-#      new     `{ return CURLOPT_SSL_CTX_FUNCTION; `}
-#      new     `{ return CURLOPT_SSL_CTX_DATA; `}
-#      new     `{ return CURLOPT_FTP_CREATE_MISSING_DIRS; `}
-#      new     `{ return CURLOPT_PROXYAUTH; `}
-#      new     `{ return CURLOPT_FTP_RESPONSE_TIMEOUT; `}
-#      new     `{ return CURLOPT_IPRESOLVE; `}
-#      new     `{ return CURLOPT_MAXFILESIZE; `}
-#      new     `{ return CURLOPT_INFILESIZE_LARGE; `}
-#      new     `{ return CURLOPT_RESUME_FROM_LARGE; `}
-#      new     `{ return CURLOPT_MAXFILESIZE_LARGE; `}
-#      new     `{ return CURLOPT_NETRC_FILE; `}
-#      new     `{ return CURLOPT_USE_SSL; `}
-#      new     `{ return CURLOPT_POSTFIELDSIZE_LARGE; `}
-#      new     `{ return CURLOPT_TCP_NODELAY; `}
-#      new     `{ return CURLOPT_FTPSSLAUTH; `}
-#      new     `{ return CURLOPT_IOCTLFUNCTION; `}
-#      new     `{ return CURLOPT_IOCTLDATA; `}
-#      new     `{ return CURLOPT_FTP_ACCOUNT; `}
-#      new     `{ return CURLOPT_COOKIELIST; `}
-#      new     `{ return CURLOPT_IGNORE_CONTENT_LENGTH; `}
-#      new     `{ return CURLOPT_FTP_SKIP_PASV_IP; `}
-#      new     `{ return CURLOPT_FTP_FILEMETHOD; `}
-#      new     `{ return CURLOPT_LOCALPORT; `}
-#      new     `{ return CURLOPT_LOCALPORTRANGE; `}
-#      new     `{ return CURLOPT_CONNECT_ONLY; `}
-#      new     `{ return CURLOPT_CONV_FROM_NETWORK_FUNCTION; `}
-#      new     `{ return CURLOPT_CONV_TO_NETWORK_FUNCTION; `}
-#      new     `{ return CURLOPT_CONV_FROM_UTF8_FUNCTION; `}
-#      new     `{ return CURLOPT_MAX_SEND_SPEED_LARGE; `}
-#      new     `{ return CURLOPT_MAX_RECV_SPEED_LARGE; `}
-#      new     `{ return CURLOPT_FTP_ALTERNATIVE_TO_USER; `}
-#      new     `{ return CURLOPT_SOCKOPTFUNCTION; `}
-#      new     `{ return CURLOPT_SOCKOPTDATA; `}
+#      new     `{ return CURLOPT_CRLFILE; `}
+#      new     `{ return CURLOPT_SSL_VERIFYHOST; `}
+#      new     `{ return CURLOPT_CERTINFO; `}
+#      new     `{ return CURLOPT_RANDOM_FILE; `}
+#      new     `{ return CURLOPT_EGDSOCKET; `}
+#      new     `{ return CURLOPT_SSL_CIPHER_LIST; `}
 #      new     `{ return CURLOPT_SSL_SESSIONID_CACHE; `}
+#      new     `{ return CURLOPT_SSL_OPTIONS; `}
+#      new     `{ return CURLOPT_KRBLEVEL; `}
+#      new     `{ return CURLOPT_GSSAPI_DELEGATION; `}
+
+       # SSH Options
+
 #      new     `{ return CURLOPT_SSH_AUTH_TYPES; `}
+#      new     `{ return CURLOPT_SSH_HOST_PUBLIC_KEY_MD5; `}
 #      new     `{ return CURLOPT_SSH_PUBLIC_KEYFILE; `}
 #      new     `{ return CURLOPT_SSH_PRIVATE_KEYFILE; `}
-#      new     `{ return CURLOPT_FTP_SSL_CCC; `}
-#      new     `{ return CURLOPT_TIMEOUT_MS; `}
-#      new     `{ return CURLOPT_CONNECTTIMEOUT_MS; `}
-#      new     `{ return CURLOPT_HTTP_TRANSFER_DECODING; `}
-#      new     `{ return CURLOPT_HTTP_CONTENT_DECODING; `}
-#      new     `{ return CURLOPT_NEW_FILE_PERMS; `}
-#      new     `{ return CURLOPT_NEW_DIRECTORY_PERMS; `}
-#      new     `{ return CURLOPT_POSTREDIR; `}
-#      new     `{ return CURLOPT_SSH_HOST_PUBLIC_KEY_MD5; `}
-#      new     `{ return CURLOPT_OPENSOCKETFUNCTION; `}
-#      new     `{ return CURLOPT_OPENSOCKETDATA; `}
-#      new     `{ return CURLOPT_COPYPOSTFIELDS; `}
-#      new     `{ return CURLOPT_PROXY_TRANSFER_MODE; `}
-#      new     `{ return CURLOPT_SEEKFUNCTION; `}
-#      new     `{ return CURLOPT_SEEKDATA; `}
-#      new     `{ return CURLOPT_CRLFILE; `}
-#      new     `{ return CURLOPT_ISSUERCERT; `}
-#      new     `{ return CURLOPT_ADDRESS_SCOPE; `}
-#      new     `{ return CURLOPT_CERTINFO; `}
-       new     username `{ return CURLOPT_USERNAME; `}
-       new     password `{ return CURLOPT_PASSWORD; `}
-#      new     `{ return CURLOPT_PROXYUSERNAME; `}
-#      new     `{ return CURLOPT_PROXYPASSWORD; `}
-#      new     `{ return CURLOPT_NOPROXY; `}
-#      new     `{ return CURLOPT_TFTP_BLKSIZE; `}
-#      new     `{ return CURLOPT_SOCKS5_GSSAPI_SERVICE; `}
-#      new     `{ return CURLOPT_SOCKS5_GSSAPI_NEC; `}
-#      new     `{ return CURLOPT_PROTOCOLS; `}
-#      new     `{ return CURLOPT_REDIR_PROTOCOLS; `}
 #      new     `{ return CURLOPT_SSH_KNOWNHOSTS; `}
 #      new     `{ return CURLOPT_SSH_KEYFUNCTION; `}
 #      new     `{ return CURLOPT_SSH_KEYDATA; `}
-       new     mail_from `{ return CURLOPT_MAIL_FROM; `}
-       new     mail_rcpt `{ return CURLOPT_MAIL_RCPT; `}
-#      new     `{ return CURLOPT_FTP_USE_PRET; `}
-#      new     `{ return CURLOPT_RTSP_REQUEST; `}
-#      new     `{ return CURLOPT_RTSP_SESSION_ID; `}
-#      new     `{ return CURLOPT_RTSP_STREAM_URI; `}
-#      new     `{ return CURLOPT_RTSP_TRANSPORT; `}
-#      new     `{ return CURLOPT_RTSP_CLIENT_CSEQ; `}
-#      new     `{ return CURLOPT_RTSP_SERVER_CSEQ; `}
-#      new     `{ return CURLOPT_INTERLEAVEDATA; `}
-#      new     `{ return CURLOPT_INTERLEAVEFUNCTION; `}
-#      new     `{ return CURLOPT_WILDCARDMATCH; `}
-#      new     `{ return CURLOPT_CHUNK_BGN_FUNCTION; `}
-#      new     `{ return CURLOPT_CHUNK_END_FUNCTION; `}
-#      new     `{ return CURLOPT_FNMATCH_FUNCTION; `}
-#      new     `{ return CURLOPT_CHUNK_DATA; `}
-#      new     `{ return CURLOPT_FNMATCH_DATA; `}
-#      new     `{ return CURLOPT_RESOLVE; `}
-#      new     `{ return CURLOPT_TLSAUTH_USERNAME; `}
-#      new     `{ return CURLOPT_TLSAUTH_PASSWORD; `}
-#      new     `{ return CURLOPT_TLSAUTH_TYPE; `}
-#      new     `{ return CURLOPT_TRANSFER_ENCODING; `}
-#      new     `{ return CURLOPT_CLOSESOCKETFUNCTION; `}
-#      new     `{ return CURLOPT_CLOSESOCKETDATA; `}
-#      new     `{ return CURLOPT_GSSAPI_DELEGATION; `}
-#      new     `{ return CURLOPT_DNS_SERVERS; `}
-#      new     `{ return CURLOPT_ACCEPTTIMEOUT_MS; `}
-#      new     `{ return CURLOPT_TCP_KEEPALIVE; `}
-#      new     `{ return CURLOPT_TCP_KEEPIDLE; `}
-#      new     `{ return CURLOPT_TCP_KEEPINTVL; `}
-#      new     `{ return CURLOPT_SSL_OPTIONS; `}
-#      new     `{ return CURLOPT_MAIL_AUTH; `}
+
+       # Other Options
+
+#      new     `{ return CURLOPT_PRIVATE; `}
+#      new     `{ return CURLOPT_SHARE; `}
+#      new     `{ return CURLOPT_NEW_FILE_PERMS; `}
+#      new     `{ return CURLOPT_NEW_DIRECTORY_PERMS; `}
+
+       # TELNET Options
+
+#      new     `{ return CURLOPT_TELNETOPTIONS; `}
 end
index b705cad..084b68a 100644 (file)
@@ -35,22 +35,29 @@ extern class Window `{WINDOW *`}
                return res;
        `}
 
-       # print a string somewhere
+       # Move the cursor at the position (y,x) and print a string
        # NOTE: as with the curses API, the position is (y,x)
        fun mvaddstr(y,x: Int, str: String) import String.to_cstring `{
                char *c_string = String_to_cstring( str );
                mvaddstr(y, x, c_string);
        `}
 
+       # Update the window
        fun refresh `{
                refresh();
        `}
+
+       # Clear the entire window so it can be repainted from scratch with a refresh
        fun wclear `{
                wclear(recv);
        `}
+
+       # Delete the window
        fun delwin `{
                delwin(recv);
        `}
+
+       # Suspend the curses session and restore the previous terminal
        fun endwin `{
                endwin();
        `}
diff --git a/lib/ini.nit b/lib/ini.nit
new file mode 100644 (file)
index 0000000..232e7c5
--- /dev/null
@@ -0,0 +1,308 @@
+# 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.
+
+# Handle ini config files.
+module ini
+
+# A configuration tree that can read and store data in ini format
+#
+# Write example:
+#
+#    var config = new ConfigTree("config.ini")
+#    config["goo"] = "goo"
+#    config["foo.bar"] = "foobar"
+#    config["foo.baz"] = "foobaz"
+#    config.save
+#    assert config.to_map.length == 3
+#
+# Read example:
+#
+#    config = new ConfigTree("config.ini")
+#    assert config.has_key("foo.bar")
+#    assert config["foo.bar"] == "foobar"
+class ConfigTree
+       super Streamable
+
+       # The ini file used to read/store data
+       var ini_file: String
+
+       init(file: String) do
+               self.ini_file = file
+               if file.file_exists then load
+       end
+
+       # Get the config value for `key`
+       #
+       # REQUIRE: `has_key(key)`
+       #
+       #    var config = new ConfigTree("config.ini")
+       #    assert config["goo"] == "goo"
+       #    assert config["foo.bar"] == "foobar"
+       #    assert config["foo.baz"] == "foobaz"
+       fun [](key: String): String do
+               if not has_key(key) then
+                       print "error: config key `{key}` not found"
+                       abort
+               end
+               var node = get_node(key).as(not null)
+               if node.value == null then
+                       print "error: config key `{key}` has no value"
+                       abort
+               end
+               return node.value.as(not null)
+       end
+
+       # Get the config values under `key`
+       #
+       # REQUIRE: `has_key(key)`
+       #
+       #    var config = new ConfigTree("config.ini")
+       #    var values = config.at("foo")
+       #    assert values.has_key("bar")
+       #    assert values.has_key("baz")
+       #    assert not values.has_key("goo")
+       fun at(key: String): Map[String, String] do
+               if not has_key(key) then
+                       print "error: config key `{key}` not found"
+                       abort
+               end
+               var map = new HashMap[String, String]
+               var node = get_node(key).as(not null)
+               for k, child in node.children do
+                       if child.value == null then continue
+                       map[k] = child.value.to_s
+               end
+               return map
+       end
+
+       # Set `value` at `key`
+       #
+       #    var config = new ConfigTree("config.ini")
+       #    assert config["foo.bar"] == "foobar"
+       #    config["foo.bar"] = "baz"
+       #    assert config["foo.bar"] == "baz"
+       fun []=(key: String, value: nullable String) do
+               set_node(key, value)
+       end
+
+       # Is `key` in the config?
+       #
+       #    var config = new ConfigTree("config.ini")
+       #    assert config.has_key("goo")
+       #    assert config.has_key("foo.bar")
+       #    assert not config.has_key("zoo")
+       fun has_key(key: String): Bool do
+               var children = roots
+               var parts = key.split(".").reversed
+               var node = get_root(parts.pop)
+               if node == null then return false
+               while not parts.is_empty do
+                       node = node.get_child(parts.pop)
+                       if node == null then return false
+               end
+               return true
+       end
+
+       # Get `self` as a Map of `key`, `value`
+       #
+       #    var config = new ConfigTree("config.ini")
+       #    var map = config.to_map
+       #    assert map.has_key("goo")
+       #    assert map.has_key("foo.bar")
+       #    assert map.has_key("foo.baz")
+       #    assert map.length == 3
+       fun to_map: Map[String, String] do
+               var map = new HashMap[String, String]
+               for node in leaves do
+                       if node.value == null then continue
+                       map[node.key] = node.value.to_s
+               end
+               return map
+       end
+
+       redef fun to_s do return to_map.join(", ", ":")
+
+       redef fun write_to(stream) do
+               for node in leaves do
+                       if node.value == null then continue
+                       stream.write("{node.key}={node.value.to_s}\n")
+               end
+       end
+
+       # Reload config from file
+       # Done automatically at init
+       #
+       # Example with hierarchical ini file:
+       #
+       #     # init file
+       #     var str = """
+       #     foo.bar=foobar
+       #     foo.baz=foobaz
+       #     goo=goo"""
+       #     str.write_to_file("config1.ini")
+       #     # load file
+       #     var config = new ConfigTree("config1.ini")
+       #     assert config["foo.bar"] == "foobar"
+       #
+       # Example with sections:
+       #
+       #     # init file
+       #     str = """
+       #     goo=goo
+       #     [foo]
+       #     bar=foobar
+       #     baz=foobaz
+       #     [boo]
+       #     bar=boobar"""
+       #     str.write_to_file("config2.ini")
+       #     # load file
+       #     config = new ConfigTree("config2.ini")
+       #     assert config["foo.bar"] == "foobar"
+       #     assert config["boo.bar"] == "boobar"
+       #
+       # Example with both hierarchy and section:
+       #
+       #     # init file
+       #     str = """
+       #     goo=goo
+       #     [foo]
+       #     bar.baz=foobarbaz
+       #     [goo.boo]
+       #     bar=gooboobar
+       #     baz.bar=gooboobazbar"""
+       #     str.write_to_file("config3.ini")
+       #     # load file
+       #     config = new ConfigTree("config3.ini")
+       #     assert config["goo"] == "goo"
+       #     assert config["foo.bar.baz"] == "foobarbaz"
+       #     assert config["goo.boo.bar"] == "gooboobar"
+       #     assert config["goo.boo.baz.bar"] == "gooboobazbar"
+       fun load do
+               roots.clear
+               var stream = new IFStream.open(ini_file)
+               var path: nullable String = null
+               while not stream.eof do
+                       var line = stream.read_line
+                       if line.is_empty then
+                               continue
+                       else if line.has_prefix(";") then
+                               continue
+                       else if line.has_prefix("[") then
+                               var key = line.trim.substring(1, line.length - 2)
+                               path = key
+                               set_node(path, null)
+                       else
+                               var parts = line.split("=")
+                               var key = parts[0].trim
+                               var val = parts[1].trim
+                               if path == null then
+                                       set_node(key, val)
+                               else
+                                       set_node("{path}.{key}", val)
+                               end
+                       end
+               end
+               stream.close
+       end
+
+       # Save config to file
+       fun save do write_to_file(ini_file)
+
+       private var roots = new Array[ConfigNode]
+
+       private fun set_node(key: String, value: nullable String) do
+               var children = roots
+               var parts = key.split(".").reversed
+               var k = parts.pop
+               var root = get_root(k)
+               if root == null then
+                       root = new ConfigNode(k)
+                       if parts.is_empty then
+                               root.value = value
+                       end
+                       roots.add root
+               end
+               while not parts.is_empty do
+                       k = parts.pop
+                       var node = root.get_child(k)
+                       if node == null then
+                               node = new ConfigNode(k)
+                               node.parent = root
+                               root.children[node.name] = node
+                       end
+                       if parts.is_empty then
+                               node.value = value
+                       end
+                       root = node
+               end
+       end
+
+       private fun get_node(key: String): nullable ConfigNode do
+               var children = roots
+               var parts = key.split(".").reversed
+               var node = get_root(parts.pop)
+               while not parts.is_empty do
+                       node = node.get_child(parts.pop)
+               end
+               return node
+       end
+
+       private fun get_root(name: String): nullable ConfigNode do
+               for root in roots do
+                       if root.name == name then return root
+               end
+               return null
+       end
+
+       private fun leaves: Array[ConfigNode] do
+               var res = new Array[ConfigNode]
+               var todo = new Array[ConfigNode]
+               todo.add_all roots
+               while not todo.is_empty do
+                       var node = todo.pop
+                       if node.children.is_empty then
+                               res.add node
+                       else
+                               todo.add_all node.children.values
+                       end
+               end
+               return res
+       end
+end
+
+private class ConfigNode
+       var parent: nullable ConfigNode
+       var children = new HashMap[String, ConfigNode]
+       var name: String writable
+       var value: nullable String
+
+       init(name: String) do
+               self.name = name
+       end
+
+       fun key: String do
+               if parent == null then
+                       return name
+               end
+               return "{parent.key}.{name}"
+       end
+
+       fun get_child(name: String): nullable ConfigNode do
+               if children.has_key(name) then
+                       return children[name]
+               end
+               return null
+       end
+end
+
diff --git a/lib/neo4j/curl_json.nit b/lib/neo4j/curl_json.nit
new file mode 100644 (file)
index 0000000..77d3650
--- /dev/null
@@ -0,0 +1,182 @@
+# 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.
+
+# cURL requests compatible with the JSON REST APIs.
+module curl_json
+
+import jsonable
+intrude import curl
+
+# An abstract request that defines most of the standard options for Neo4j REST API
+abstract class JsonCurlRequest
+       super CurlRequest
+       super CCurlCallbacks
+       super CurlCallbacksRegisterIntern
+
+       # REST API service URL
+       var url: String
+
+       init (url: String, curl: nullable Curl) do
+               self.url = url
+               self.curl = curl
+
+               init_headers
+       end
+
+       # OAuth token
+       var auth: nullable String writable
+
+       # User agent (is used by github to contact devs in case of problems)
+       # Eg. "Awesome-Octocat-App"
+       var user_agent: nullable String writable
+
+       # HTTP headers to send
+       var headers: nullable HeaderMap writable = null
+
+
+       # init HTTP headers for Neo4j REST API
+       protected fun init_headers do
+               headers = new HeaderMap
+               headers["Accept"] = "application/json; charset=UTF-8"
+               headers["Transfer-Encoding"] = "chunked"
+               if auth != null then
+                       headers["Authorization"] = "token {auth.to_s}"
+               end
+               if user_agent != null then
+                       headers["User-Agent"] = user_agent.to_s
+               end
+       end
+
+       redef fun execute do
+               init_headers
+               if not self.curl.is_ok then
+                       return answer_failure(0, "Curl instance is not correctly initialized")
+               end
+
+               var success_response = new CurlResponseSuccess
+               var callback_receiver: CurlCallbacks = success_response
+               if self.delegate != null then callback_receiver = self.delegate.as(not null)
+
+               var err
+
+               err = self.curl.prim_curl.easy_setopt(new CURLOption.follow_location, 1)
+               if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+
+               err = self.curl.prim_curl.easy_setopt(new CURLOption.http_version, 1)
+               if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+
+
+               err = self.curl.prim_curl.easy_setopt(new CURLOption.url, url)
+               if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+
+               err = self.curl.prim_curl.register_callback(callback_receiver, new CURLCallbackType.header)
+               if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+
+               err = self.curl.prim_curl.register_callback(callback_receiver, new CURLCallbackType.body)
+               if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+
+               # HTTP Header
+               if self.headers != null then
+                       var headers_joined = self.headers.join_pairs(": ")
+                       err = self.curl.prim_curl.easy_setopt(
+                               new CURLOption.httpheader, headers_joined.to_curlslist)
+                       if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+               end
+
+               var err_hook = execute_hook
+           if err_hook != null then return err_hook
+
+               var err_resp = perform
+               if err_resp != null then return err_resp
+
+               var st_code = self.curl.prim_curl.easy_getinfo_long(new CURLInfoLong.response_code)
+               if not st_code == null then success_response.status_code = st_code.response
+
+               return success_response
+       end
+
+       # Hook to implement in concrete requests
+       protected fun execute_hook: nullable CurlResponse do return null
+end
+
+# HTTP GET command
+class JsonGET
+       super JsonCurlRequest
+
+       redef fun execute_hook do
+               var err = self.curl.prim_curl.easy_setopt(new CURLOption.get, true)
+               if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+               return null
+       end
+end
+
+# HTTP POST command that sends JSON data
+class JsonPOST
+       super JsonCurlRequest
+
+       var data: nullable Jsonable writable = null
+
+       redef fun init_headers do
+               super
+               headers["Content-Type"] = "application/json"
+       end
+
+       redef fun execute_hook do
+               var err = self.curl.prim_curl.easy_setopt(new CURLOption.post, true)
+               if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+
+               if self.data != null then
+                       var postdatas = self.data.to_json
+                       err = self.curl.prim_curl.easy_setopt(new CURLOption.postfields, postdatas)
+                       if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+               end
+               return null
+       end
+end
+
+# HTTP DELETE command
+class JsonDELETE
+       super JsonCurlRequest
+
+       redef fun execute_hook do
+               var err = self.curl.prim_curl.easy_setopt(new CURLOption.custom_request, "DELETE")
+               if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+               return null
+       end
+end
+
+# HTTP PUT command that sends JSON data
+class JsonPUT
+       super JsonCurlRequest
+
+       var data: nullable Jsonable writable = null
+
+       redef fun init_headers do
+               super
+               headers["Content-Type"] = "application/json"
+       end
+
+       redef fun execute_hook do
+               var err = self.curl.prim_curl.easy_setopt(new CURLOption.custom_request, "PUT")
+               if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+
+               if self.data != null then
+                       var postdatas = self.data.to_json
+                       err = self.curl.prim_curl.easy_setopt(new CURLOption.postfields, postdatas)
+                       if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+               end
+               return null
+       end
+end
+
diff --git a/lib/neo4j/jsonable.nit b/lib/neo4j/jsonable.nit
new file mode 100644 (file)
index 0000000..630a992
--- /dev/null
@@ -0,0 +1,425 @@
+# 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.
+
+# Introduce base classes and services for JSON handling.
+module jsonable
+
+import standard
+private import json::json_parser
+private import json::json_lexer
+
+# Something that can be translated to JSON
+interface Jsonable
+       # Get the JSON representation of `self`
+       fun to_json: String is abstract
+end
+
+redef class String
+       super Jsonable
+
+       redef fun to_json do
+               var res = new FlatBuffer
+               res.add '\"'
+               for i in [0..self.length[ do
+                       var char = self[i]
+                       if char == '\\' then
+                               res.append("\\\\")
+                               continue
+                       else if char == '\"' then
+                               res.append("\\\"")
+                               continue
+                       else if char == '\/' then
+                               res.append("\\/")
+                               continue
+                       else if char == '\n' then
+                               res.append("\\n")
+                               continue
+                       else if char == '\r' then
+                               res.append("\\r")
+                               continue
+                       else if char == '\t' then
+                               res.append("\\t")
+                               continue
+                       end
+                       res.add char
+               end
+               res.add '\"'
+               return res.write_to_string
+       end
+end
+
+redef class Int
+       super Jsonable
+
+       redef fun to_json do return self.to_s
+end
+
+redef class Float
+       super Jsonable
+
+       redef fun to_json do return self.to_s
+end
+
+redef class Bool
+       super Jsonable
+
+       redef fun to_json do return self.to_s
+end
+
+# A JSON Object representation that behaves like a `Map`
+class JsonObject
+       super Jsonable
+       super Map[String, nullable Jsonable]
+
+       private var map = new HashMap[String, nullable Jsonable]
+
+       # Create an empty `JsonObject`
+       #
+       #     var obj = new JsonObject
+       #     assert obj.is_empty
+       init do end
+
+       # Init the JSON Object from a Nit `Map`
+       #
+       #     var map = new HashMap[String, String]
+       #     map["foo"] = "bar"
+       #     map["goo"] = "baz"
+       #     var obj = new JsonObject.from(map)
+       #     assert obj.length == 2
+       #     assert obj["foo"] == "bar"
+       #     assert obj["goo"] == "baz"
+       init from(items: Map[String, nullable Jsonable]) do
+               for k, v in items do map[k] = v
+       end
+
+       redef fun [](key) do return map[key]
+       redef fun []=(key, value) do map[key] = value
+       redef fun clear do map.clear
+       redef fun has_key(key) do return map.has_key(key)
+       redef fun is_empty do return map.is_empty
+       redef fun iterator do return map.iterator
+       redef fun keys do return map.keys
+       redef fun values do return map.values
+       redef fun length do return map.length
+
+       # Advanced query to get a value within `self` or its children.
+       #
+       # A query is composed of the keys to each object seperated by '.'.
+       #
+       # REQUIRE `self.has_key(query)`
+       #
+       #     var obj1 = new JsonObject
+       #     obj1["baz"] = "foobarbaz"
+       #     var obj2 = new JsonObject
+       #     obj2["bar"] = obj1
+       #     var obj3 = new JsonObject
+       #     obj3["foo"] = obj2
+       #     assert obj3.get("foo.bar.baz") == "foobarbaz"
+       fun get(query: String): nullable Jsonable do
+               var keys = query.split(".").reversed
+               var key = keys.pop
+
+               assert has_key(key)
+               var node = self[key]
+
+               while not keys.is_empty do
+                       key = keys.pop
+                       assert node isa JsonObject and node.has_key(key)
+                       node = node[key]
+               end
+               return node
+       end
+
+       # Create an empty `JsonObject`
+       #
+       #     var obj = new JsonObject
+       #     obj["foo"] = "bar"
+       #     assert obj.to_json == "\{\"foo\": \"bar\"\}"
+       redef fun to_json do
+               var tpl = new Array[String]
+               tpl.add "\{"
+               var vals = new Array[String]
+               for k, v in self do
+                       if v == null then
+                               vals.add "{k.to_json}: null"
+                       else
+                               vals.add "{k.to_json}: {v.to_json}"
+                       end
+               end
+               tpl.add vals.join(",")
+               tpl.add "\}"
+               return tpl.join("")
+       end
+
+       redef fun to_s do return to_json
+end
+
+# A JSON Array representation that behaves like a `Sequence`
+class JsonArray
+       super Jsonable
+       super Sequence[nullable Jsonable]
+
+       private var array = new Array[nullable Jsonable]
+
+       init do end
+
+       # init the JSON Array from a Nit `Collection`
+       init from(items: Collection[nullable Jsonable]) do
+               array.add_all(items)
+       end
+
+       redef fun [](key) do return array[key]
+       redef fun []=(key, value) do array[key] = value
+       redef fun add(value) do array.add(value)
+       redef fun clear do array.clear
+       redef fun is_empty do return array.is_empty
+       redef fun iterator do return array.iterator
+       redef fun length do return array.length
+
+       redef fun to_json do
+               var tpl = new Array[String]
+               tpl.add "["
+               var vals = new Array[String]
+               for v in self do
+                       if v == null then
+                               vals.add "null"
+                       else
+                               vals.add v.to_json
+                       end
+               end
+               tpl.add vals.join(",")
+               tpl.add "]"
+               return tpl.join("")
+       end
+
+       redef fun to_s do return to_json
+end
+
+# An error in JSON format that can be returned by tools using JSON like parsers.
+#
+#     var error = new JsonError("ErrorCode", "ErrorMessage")
+#     assert error.to_s == "ErrorCode: ErrorMessage"
+#     assert error.to_json == "\{\"error\": \"ErrorCode\", \"message\": \"ErrorMessage\"\}"
+class JsonError
+       super Jsonable
+
+       # The error code
+       var error: String
+
+       # The error message
+       var message: String
+
+       redef fun to_json do
+               var tpl = new Array[String]
+               tpl.add "\{"
+               tpl.add "\"error\": {error.to_json}, "
+               tpl.add "\"message\": {message.to_json}"
+               tpl.add "\}"
+               return tpl.join("")
+       end
+
+       redef fun to_s do return "{error}: {message}"
+end
+
+# Redef parser
+
+redef class Nvalue
+       private fun to_nit_object: nullable Jsonable is abstract
+end
+
+redef class Nvalue_number
+       redef fun to_nit_object
+       do
+               var text = n_number.text
+               if text.chars.has('.') or text.chars.has('e') or text.chars.has('E') then return text.to_f
+               return text.to_i
+       end
+end
+
+redef class Nvalue_string
+       redef fun to_nit_object do return n_string.to_nit_string
+end
+
+redef class Nvalue_true
+       redef fun to_nit_object do return true
+end
+
+redef class Nvalue_false
+       redef fun to_nit_object do return false
+end
+
+redef class Nvalue_null
+       redef fun to_nit_object do return null
+end
+
+redef class Nstring
+       # FIXME support \n, etc.
+       fun to_nit_string: String do
+               var res = new FlatBuffer
+               var skip = false
+               for i in [1..text.length-2] do
+                       if skip then
+                               skip = false
+                               continue
+                       end
+                       var char = text[i]
+                       if char == '\\' and i < text.length - 2 then
+                               if text[i + 1] == '\\' then
+                                       res.add('\\')
+                                       skip = true
+                                       continue
+                               end
+                               if text[i + 1] == '\"' then
+                                       res.add('\"')
+                                       skip = true
+                                       continue
+                               end
+                               if text[i + 1] == '/' then
+                                       res.add('\/')
+                                       skip = true
+                                       continue
+                               end
+                               if text[i + 1] == 'n' then
+                                       res.add('\n')
+                                       skip = true
+                                       continue
+                               end
+                               if text[i + 1] == 'r' then
+                                       res.add('\r')
+                                       skip = true
+                                       continue
+                               end
+                               if text[i + 1] == 't' then
+                                       res.add('\t')
+                                       skip = true
+                                       continue
+                               end
+                       end
+                       res.add char
+               end
+               return res.write_to_string
+       end
+end
+
+redef class Nvalue_object
+       redef fun to_nit_object
+       do
+               var obj = new JsonObject
+               var members = n_members
+               if members != null then
+                       var pairs = members.pairs
+                       for pair in pairs do obj[pair.name] = pair.value
+               end
+               return obj
+       end
+end
+
+redef class Nmembers
+       fun pairs: Array[Npair] is abstract
+end
+
+redef class Nmembers_tail
+       redef fun pairs
+       do
+               var arr = n_members.pairs
+               arr.add n_pair
+               return arr
+       end
+end
+
+redef class Nmembers_head
+       redef fun pairs do return [n_pair]
+end
+
+redef class Npair
+       fun name: String do return n_string.to_nit_string
+       fun value: nullable Jsonable do return n_value.to_nit_object
+end
+
+redef class Nvalue_array
+       redef fun to_nit_object
+       do
+               var arr = new JsonArray
+               var elements = n_elements
+               if elements != null then
+                       var items = elements.items
+                       for item in items do arr.add(item.to_nit_object)
+               end
+               return arr
+       end
+end
+
+redef class Nelements
+       fun items: Array[Nvalue] is abstract
+end
+
+redef class Nelements_tail
+       redef fun items
+       do
+               var items = n_elements.items
+               items.add(n_value)
+               return items
+       end
+end
+
+redef class Nelements_head
+       redef fun items do return [n_value]
+end
+
+redef class Text
+       # Parse a JSON String as Jsonable entities
+       #
+       # Example with `JsonObject`"
+       #
+       #     var obj = "\{\"foo\": \{\"bar\": true, \"goo\": [1, 2, 3]\}\}".to_jsonable
+       #     assert obj isa JsonObject
+       #     assert obj["foo"] isa JsonObject
+       #     assert obj["foo"].as(JsonObject)["bar"] == true
+       #
+       # Example with `JsonArray`
+       #
+       #     var arr = "[1, 2, 3]".to_jsonable
+       #     assert arr isa JsonArray
+       #     assert arr.length == 3
+       #     assert arr.first == 1
+       #     assert arr.last == 3
+       #
+       # Example with `String`
+       #
+       #     var str = "\"foo, bar, baz\"".to_jsonable
+       #     assert str isa String
+       #     assert str == "foo, bar, baz"
+       #
+       # Malformed JSON input returns a `JsonError` object
+       #
+       #     var bad = "\{foo: \"bar\"\}".to_jsonable
+       #     assert bad isa JsonError
+       #     assert bad.error == "JsonLexerError"
+       fun to_jsonable: nullable Jsonable
+       do
+               var lexer = new Lexer_json(to_s)
+               var parser = new Parser_json
+               var tokens = lexer.lex
+               parser.tokens.add_all(tokens)
+               var root_node = parser.parse
+               if root_node isa NStart then
+                       return root_node.n_0.to_nit_object
+               else if root_node isa NLexerError then
+                       var pos = root_node.position
+                       var msg =  "{root_node.message} at {pos or else "<unknown>"} for {root_node}"
+                       return new JsonError("JsonLexerError", msg)
+               else if root_node isa NParserError then
+                       var pos = root_node.position
+                       var msg = "{root_node.message} at {pos or else "<unknown>"} for {root_node}"
+                       return new JsonError("JsonParsingError", msg)
+               else abort
+       end
+end
+
diff --git a/lib/neo4j/neo4j.nit b/lib/neo4j/neo4j.nit
new file mode 100644 (file)
index 0000000..6b3f0f3
--- /dev/null
@@ -0,0 +1,971 @@
+# 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.
+
+# Neo4j connector through its JSON REST API using curl.
+#
+# For ease of use and testing this module provide a wrapper to the `neo4j` command:
+#
+#     # Start the Neo4j server
+#     var srv = new Neo4jServer
+#     assert srv.start_quiet
+#
+# In order to connect to Neo4j you need a connector:
+#
+#    # Create new Neo4j client
+#    var client = new Neo4jClient("http://localhost:7474")
+#    assert client.is_ok
+#
+# The fundamental units that form a graph are nodes and relationships.
+#
+# Nodes are used to represent entities stored in base:
+#
+#    # Create a disconnected node
+#    var andres = new NeoNode
+#    andres["name"] = "Andres"
+#    # Connect the node to Neo4j
+#    client.save_node(andres)
+#    assert andres.is_linked
+#    #
+#    # Create a second node
+#    var kate = new NeoNode
+#    kate["name"] = "Kate"
+#    client.save_node(kate)
+#    assert kate.is_linked
+#
+# Relationships between nodes are a key part of a graph database.
+# They allow for finding related data. Just like nodes, relationships can have properties.
+#
+#    # Create a relationship
+#    var loves = new NeoEdge(andres, "LOVES", kate)
+#    client.save_edge(loves)
+#    assert loves.is_linked
+#
+# Nodes can also be loaded fron Neo4j:
+#
+#    # Get a node from DB and explore edges
+#    var url = andres.url.to_s
+#    var from = client.load_node(url)
+#    assert from["name"].to_s == "Andres"
+#    var to = from.out_nodes("LOVES").first            # follow the first LOVES relationship
+#    assert to["name"].to_s == "Kate"
+#
+# For more details, see http://docs.neo4j.org/chunked/milestone/rest-api.html
+module neo4j
+
+import curl_json
+
+# Handles Neo4j server start and stop command
+#
+# `neo4j` binary must be in `PATH` in order to work
+class Neo4jServer
+
+       # Start the local Neo4j server instance
+       fun start: Bool do
+               sys.system("neo4j start console")
+               return true
+       end
+
+       # Like `start` but redirect the console output to `/dev/null`
+       fun start_quiet: Bool do
+               sys.system("neo4j start console > /dev/null")
+               return true
+       end
+
+       # Stop the local Neo4j server instance
+       fun stop: Bool do
+               sys.system("neo4j stop")
+               return true
+       end
+
+       # Like `stop` but redirect the console output to `/dev/null`
+       fun stop_quiet: Bool do
+               sys.system("neo4j stop > /dev/null")
+               return true
+       end
+end
+
+# `Neo4jClient` is needed to communicate through the REST API
+#
+#    var client = new Neo4jClient("http://localhost:7474")
+#    assert client.is_ok
+class Neo4jClient
+
+       # Neo4j REST services baseurl
+       var base_url: String
+       # REST service to get node data
+       private var node_url: String
+       # REST service to batch
+       private var batch_url: String
+       # REST service to send cypher requests
+       private var cypher_url: String
+
+       private var curl = new Curl
+
+       init(base_url: String) do
+               self.base_url = base_url
+               var root = service_root
+               if not root isa JsonObject then
+                       print "Neo4jClientError: cannot connect to server at {base_url}"
+                       abort
+               end
+               self.node_url = root["node"].to_s
+               self.batch_url = root["batch"].to_s
+               self.cypher_url = root["cypher"].to_s
+       end
+
+       fun service_root: Jsonable do return get("{base_url}/db/data")
+
+       # Is the connection with the Neo4j server ok?
+       fun is_ok: Bool do return service_root isa JsonObject
+
+       # Empty the graph
+       fun clear_graph do
+               cypher(new CypherQuery.from_string("MATCH (n) OPTIONAL MATCH n-[r]-() DELETE r, n"))
+       end
+
+       # Last errors
+       var errors = new Array[String]
+
+       # Nodes view stored locally
+       private var local_nodes = new HashMap[String, nullable NeoNode]
+
+       # Save the node in base
+       #
+       #     var client = new Neo4jClient("http://localhost:7474")
+       #     #
+       #     # Create a node
+       #     var andres = new NeoNode
+       #     andres["name"] = "Andres"
+       #     client.save_node(andres)
+       #     assert andres.is_linked
+       #
+       # Once linked, nodes cannot be created twice:
+       #
+       #     var oldurl = andres.url
+       #     client.save_node(andres) # do nothing
+       #     assert andres.url == oldurl
+       fun save_node(node: NeoNode): Bool do
+               if node.is_linked then return true
+               node.neo = self
+               var batch = new NeoBatch(self)
+               batch.save_node(node)
+               # batch.create_edges(node.out_edges)
+               var errors = batch.execute
+               if not errors.is_empty then
+                       errors.add_all errors
+                       return false
+               end
+               local_nodes[node.url.to_s] = node
+               return true
+       end
+
+       # Load a node from base
+       # Data, labels and edges will be loaded lazily.
+       fun load_node(url: String): NeoNode do
+               if local_nodes.has_key(url) then
+                       var node = local_nodes[url]
+                       if node != null then return node
+               end
+               var node = new NeoNode.from_neo(self, url)
+               local_nodes[url] = node
+               return node
+       end
+
+       # Remove the entity from base
+       fun delete_node(node: NeoNode): Bool do
+               if not node.is_linked then return false
+               var url = node.url.to_s
+               delete(url)
+               local_nodes[url] = null
+               node.url = null
+               return true
+       end
+
+       # Edges view stored locally
+       private var local_edges = new HashMap[String, nullable NeoEdge]
+
+       # Save the edge in base
+       # From and to nodes will be created.
+       #
+       #     var client = new Neo4jClient("http://localhost:7474")
+       #     #
+       #     var andres = new NeoNode
+       #     var kate = new NeoNode
+       #     var edge = new NeoEdge(andres, "LOVES", kate)
+       #     client.save_edge(edge)
+       #     assert andres.is_linked
+       #     assert kate.is_linked
+       #     assert edge.is_linked
+       fun save_edge(edge: NeoEdge): Bool do
+               if edge.is_linked then return true
+               edge.neo = self
+               edge.from.out_edges.add edge
+               edge.to.in_edges.add edge
+               var batch = new NeoBatch(self)
+               batch.save_edge(edge)
+               var errors = batch.execute
+               if not errors.is_empty then
+                       errors.add_all errors
+                       return false
+               end
+               local_edges[edge.url.to_s] = edge
+               return true
+       end
+
+       # Load a edge from base
+       # Data will be loaded lazily.
+       fun load_edge(url: String): NeoEdge do
+               if local_edges.has_key(url) then
+                       var node = local_edges[url]
+                       if node != null then return node
+               end
+               var edge = new NeoEdge.from_neo(self, url)
+               local_edges[url] = edge
+               return edge
+       end
+
+       # Remove the edge from base
+       fun delete_edge(edge: NeoEdge): Bool do
+               if not edge.is_linked then return false
+               var url = edge.url.to_s
+               delete(url)
+               local_edges[url] = null
+               edge.url = null
+               return true
+       end
+
+       # Retrieve all nodes with specified `lbl`
+       fun nodes_with_label(lbl: String): Array[NeoNode] do
+               var res = get("{base_url}/db/data/label/{lbl}/nodes")
+               var nodes = new Array[NeoNode]
+               for json in res.as(JsonArray) do
+                       var obj = json.as(JsonObject)
+                       var node = load_node(obj["self"].to_s)
+                       node.internal_properties = obj["data"].as(JsonObject)
+                       nodes.add node
+               end
+               return nodes
+       end
+
+       # Perform a `CypherQuery`
+       # see: CypherQuery
+       fun cypher(query: CypherQuery): Jsonable do
+               return post("{cypher_url}", query.to_json)
+       end
+
+       # GET JSON data from `url`
+       fun get(url: String): Jsonable do
+               var request = new JsonGET(url, curl)
+               var response = request.execute
+               return parse_response(response)
+       end
+
+       # POST `params` to `url`
+       fun post(url: String, params: Jsonable): Jsonable do
+               var request = new JsonPOST(url, curl)
+               request.data = params
+               var response = request.execute
+               return parse_response(response)
+       end
+
+       # PUT `params` at `url`
+       fun put(url: String, params: Jsonable): Jsonable do
+               var request = new JsonPUT(url, curl)
+               request.data = params
+               var response = request.execute
+               return parse_response(response)
+       end
+
+       # DELETE `url`
+       fun delete(url: String): Jsonable do
+               var request = new JsonDELETE(url, curl)
+               var response = request.execute
+               return parse_response(response)
+       end
+
+       # Parse the cURL `response` as a JSON string
+       private fun parse_response(response: CurlResponse): Jsonable do
+               if response isa CurlResponseSuccess then
+                       if response.body_str.is_empty then
+                               return new JsonObject
+                       else
+                               var str = response.body_str
+                               var res = str.to_jsonable
+                               if res == null then
+                                       # empty response wrap it in empty object
+                                       return new JsonObject
+                               else if res isa JsonObject and res.has_key("exception") then
+                                       var error = "Neo4jError::{res["exception"] or else "null"}"
+                                       var msg = ""
+                                       if res.has_key("message") then
+                                               msg = res["message"].to_s
+                                       end
+                                       return new JsonError(error, msg.to_json)
+                               else
+                                       return res
+                               end
+                       end
+               else if response isa CurlResponseFailed then
+                       return new JsonError("Curl error", "{response.error_msg} ({response.error_code})")
+               else
+                       return new JsonError("Curl error", "Unexpected response '{response}'")
+               end
+       end
+end
+
+# A Cypher query for Neo4j REST API
+#
+# The Neo4j REST API allows querying with Cypher.
+# The results are returned as a list of string headers (columns), and a data part,
+# consisting of a list of all rows, every row consisting of a list of REST representations
+# of the field value - Node, Relationship, Path or any simple value like String.
+#
+# Example:
+#
+#    var client = new Neo4jClient("http://localhost:7474")
+#    var query = new CypherQuery
+#    query.nmatch("(n)-[r:LOVES]->(m)")
+#    query.nwhere("n.name=\"Andres\"")
+#    query.nreturn("m.name")
+#    var res = client.cypher(query).as(JsonObject)
+#    assert res["data"].as(JsonArray).first.as(JsonArray).first == "Kate"
+#
+# For more details, see: http://docs.neo4j.org/chunked/milestone/rest-api-cypher.html
+class CypherQuery
+       # Query string to perform
+       private var query: String
+
+       # `params` to embed in the query like in prepared statements
+       var params = new JsonObject
+
+       init do
+               self.query = ""
+       end
+
+       # init the query from a query string
+       init from_string(query: String) do
+               self.query = query
+       end
+
+       # init the query with parameters
+       init with_params(params: JsonObject) do
+               self.params = params
+       end
+
+       # Add a `CREATE` statement to the query
+       fun ncreate(query: String): CypherQuery do
+               self.query = "{self.query}CREATE {query} "
+               return self
+       end
+
+       # Add a `START` statement to the query
+       fun nstart(query: String): CypherQuery do
+               self.query = "{self.query}START {query} "
+               return self
+       end
+
+       # Add a `MATCH` statement to the query
+       fun nmatch(query: String): CypherQuery do
+               self.query = "{self.query}MATCH {query} "
+               return self
+       end
+
+       # Add a `WHERE` statement to the query
+       fun nwhere(query: String): CypherQuery do
+               self.query = "{self.query}WHERE {query} "
+               return self
+       end
+
+       # Add a `AND` statement to the query
+       fun nand(query: String): CypherQuery do
+               self.query = "{self.query}AND {query} "
+               return self
+       end
+
+       # Add a `RETURN` statement to the query
+       fun nreturn(query: String): CypherQuery do
+               self.query = "{self.query}RETURN {query} "
+               return self
+       end
+
+       # Translate the query to JSON
+       fun to_json: JsonObject do
+               var obj = new JsonObject
+               obj["query"] = query
+               if not params.is_empty then
+                       obj["params"] = params
+               end
+               return obj
+       end
+
+       redef fun to_s do return to_json.to_s
+end
+
+# The fundamental units that form a graph are nodes and relationships.
+#
+# Entities can have two states:
+#
+# * linked: the NeoEntity references an existing node or edge in Neo4j
+# * unlinked: the NeoEntity is not yet created in Neo4j
+#
+# If the entity is initialized unlinked from neo4j:
+#
+#    # Create a disconnected node
+#    var andres = new NeoNode
+#    andres["name"] = "Andres"
+#    # At this point, the node is not linked
+#    assert not andres.is_linked
+#
+# Then we can link the entity to the base:
+#
+#     # Init client
+#     var client = new Neo4jClient("http://localhost:7474")
+#     client.save_node(andres)
+#     # The node is now linked
+#     assert andres.is_linked
+#
+# Entities can also be loaded from Neo4j:
+#
+#     # Get a node from Neo4j
+#     var url = andres.url.to_s
+#     var node = client.load_node(url)
+#     assert node.is_linked
+#
+# When working in connected mode, all reading operations are executed lazily on the base:
+#
+#     # Get the node `name` property
+#     assert node["name"] == "Andres"  # loaded lazily from base
+abstract class NeoEntity
+       # Neo4j client connector
+       private var neo: Neo4jClient
+
+       # Entity unique URL in Neo4j REST API
+       var url: nullable String
+
+       # Temp id used in batch mode to update the entity
+       private var batch_id: nullable Int = null
+
+       # Load the entity from base
+       private init from_neo(neo: Neo4jClient, url: String) do
+               self.neo = neo
+               self.url = url
+       end
+
+       # Init entity from JSON representation
+       private init from_json(neo: Neo4jClient, obj: JsonObject) do
+               self.neo = neo
+               self.url = obj["self"].to_s
+               self.internal_properties = obj["data"].as(JsonObject)
+       end
+
+       # Create a empty (and not-connected) entity
+       init do
+               self.internal_properties = new JsonObject
+       end
+
+       # Is the entity linked to a Neo4j database?
+       fun is_linked: Bool do return url != null
+
+       # In Neo4j, both nodes and relationships can contain properties.
+       # Properties are key-value pairs where the key is a string.
+       # Property values are JSON formatted.
+       #
+       # Properties are loaded lazily
+       fun properties: JsonObject do return internal_properties or else load_properties
+
+       private var internal_properties: nullable JsonObject = null
+
+       private fun load_properties: JsonObject do
+               var obj = neo.get("{url.to_s}/properties").as(JsonObject)
+               internal_properties = obj
+               return obj
+       end
+
+       # Get the entity `id` if connected to base
+       fun id: nullable Int do
+               if url == null then return null
+               return url.split("/").last.to_i
+       end
+
+       # Get the entity property at `key`
+       fun [](key: String): nullable Jsonable do
+               if not properties.has_key(key) then return null
+               return properties[key]
+       end
+
+       # Set the entity property `value` at `key`
+       fun []=(key: String, value: nullable Jsonable) do properties[key] = value
+
+       # Is the property `key` set?
+       fun has_key(key: String): Bool do return properties.has_key(key)
+
+       # Translate `self` to JSON
+       fun to_json: JsonObject do return properties
+end
+
+# Nodes are used to represent entities stored in base.
+# Apart from properties and relationships (edges),
+# nodes can also be labeled with zero or more labels.
+#
+# A label is a `String` that is used to group nodes into sets.
+# All nodes labeled with the same label belongs to the same set.
+# A node may be labeled with any number of labels, including none,
+# making labels an optional addition to the graph.
+#
+# Creating new nodes:
+#
+#    var client = new Neo4jClient("http://localhost:7474")
+#    #
+#    var andres = new NeoNode
+#    andres.labels.add "Person"
+#    andres["name"] = "Andres"
+#    andres["age"] = 22
+#    client.save_node(andres)
+#    assert andres.is_linked
+#
+# Get nodes from Neo4j:
+#
+#    var url = andres.url.to_s
+#    var node = client.load_node(url)
+#    assert node["name"] == "Andres"
+#    assert node["age"].to_s.to_i      == 22
+class NeoNode
+       super NeoEntity
+
+       private var internal_labels: nullable Array[String] = null
+       private var internal_in_edges: nullable List[NeoEdge] = null
+       private var internal_out_edges: nullable List[NeoEdge] = null
+
+       init do
+               super
+               self.internal_labels = new Array[String]
+               self.internal_in_edges = new List[NeoEdge]
+               self.internal_out_edges = new List[NeoEdge]
+       end
+
+       redef fun to_s do
+               var tpl = new FlatBuffer
+               tpl.append "\{"
+               tpl.append "labels: [{labels.join(", ")}],"
+               tpl.append "data: {to_json}"
+               tpl.append "\}"
+               return tpl.write_to_string
+       end
+
+       # A label is a `String` that is used to group nodes into sets.
+       # A node may be labeled with any number of labels, including none.
+       # All nodes labeled with the same label belongs to the same set.
+       #
+       # Many database queries can work with these sets instead of the whole graph,
+       # making queries easier to write and more efficient.
+       #
+       # Labels are loaded lazily
+       fun labels: Array[String] do return internal_labels or else load_labels
+
+       private fun load_labels: Array[String] do
+               var labels = new Array[String]
+               var res = neo.get("{url.to_s}/labels")
+               if res isa JsonArray then
+                       for val in res do labels.add val.to_s
+               end
+               internal_labels = labels
+               return labels
+       end
+
+       # Get the list of `NeoEdge` pointing to `self`
+       #
+       # Edges are loaded lazily
+       fun in_edges: List[NeoEdge] do return internal_in_edges or else load_in_edges
+
+       private fun load_in_edges: List[NeoEdge] do
+               var edges = new List[NeoEdge]
+               var res = neo.get("{url.to_s}/relationships/in").as(JsonArray)
+               for obj in res do
+                       edges.add(new NeoEdge.from_json(neo, obj.as(JsonObject)))
+               end
+               internal_in_edges = edges
+               return edges
+       end
+
+       # Get the list of `NeoEdge` pointing from `self`
+       #
+       # Edges are loaded lazily
+       fun out_edges: List[NeoEdge] do return internal_out_edges or else load_out_edges
+
+       private fun load_out_edges: List[NeoEdge] do
+               var edges = new List[NeoEdge]
+               var res = neo.get("{url.to_s}/relationships/out")
+               for obj in res.as(JsonArray) do
+                       edges.add(new NeoEdge.from_json(neo, obj.as(JsonObject)))
+               end
+               internal_out_edges = edges
+               return edges
+       end
+
+       # Get nodes pointed by `self` following a `rel_type` edge
+       fun out_nodes(rel_type: String): Array[NeoNode] do
+               var res = new Array[NeoNode]
+               for edge in out_edges do
+                       if edge.rel_type == rel_type then res.add edge.to
+               end
+               return res
+       end
+
+       # Get nodes pointing to `self` following a `rel_type` edge
+       fun in_nodes(rel_type: String): Array[NeoNode] do
+               var res = new Array[NeoNode]
+               for edge in in_edges do
+                       if edge.rel_type == rel_type then res.add edge.from
+               end
+               return res
+       end
+end
+
+# A relationship between two nodes.
+# Relationships between nodes are a key part of a graph database.
+# They allow for finding related data. Just like nodes, relationships can have properties.
+#
+# Create a relationship:
+#
+#    var client = new Neo4jClient("http://localhost:7474")
+#    # Create nodes
+#    var andres = new NeoNode
+#    andres["name"] = "Andres"
+#    var kate = new NeoNode
+#    kate["name"] = "Kate"
+#    # Create a relationship of type `LOVES`
+#    var loves = new NeoEdge(andres, "LOVES", kate)
+#    client.save_edge(loves)
+#    assert loves.is_linked
+#
+# Get an edge from DB:
+#
+#    var url = loves.url.to_s
+#    var edge = client.load_edge(url)
+#    assert edge.from["name"].to_s == "Andres"
+#    assert edge.to["name"].to_s == "Kate"
+class NeoEdge
+       super NeoEntity
+
+       private var internal_from: nullable NeoNode
+       private var internal_to: nullable NeoNode
+       private var internal_type: nullable String
+       private var internal_from_url: nullable String
+       private var internal_to_url: nullable String
+
+       init(from: NeoNode, rel_type: String, to: NeoNode) do
+               self.internal_from = from
+               self.internal_to = to
+               self.internal_type = rel_type
+       end
+
+       redef init from_neo(neo, url) do
+               super
+               var obj = neo.get(url).as(JsonObject)
+               self.internal_type = obj["type"].to_s
+               self.internal_from_url = obj["start"].to_s
+               self.internal_to_url = obj["end"].to_s
+       end
+
+       redef init from_json(neo, obj) do
+               super
+               self.internal_type = obj["type"].to_s
+               self.internal_from_url = obj["start"].to_s
+               self.internal_to_url = obj["end"].to_s
+       end
+
+       # Get `from` node
+       fun from: NeoNode do return internal_from or else load_from
+
+       private fun load_from: NeoNode do
+               var node = neo.load_node(internal_from_url.to_s)
+               internal_from = node
+               return node
+       end
+
+       # Get `to` node
+       fun to: NeoNode do return internal_to or else load_to
+
+       private fun load_to: NeoNode do
+               var node = neo.load_node(internal_to_url.to_s)
+               internal_to = node
+               return node
+       end
+
+       # Get edge type
+       fun rel_type: nullable String do return internal_type
+
+       redef fun to_json do
+               var obj = new JsonObject
+               if to.is_linked then
+                       obj["to"] = to.url
+               else
+                       obj["to"] = "\{{to.batch_id.to_s}\}"
+               end
+               obj["type"] = rel_type
+               obj["data"] = properties
+               return obj
+       end
+end
+
+# Batches are used to perform multiple operations on the REST API in one cURL request.
+# This can significantly improve performance for large insert and update operations.
+#
+# see: http://docs.neo4j.org/chunked/milestone/rest-api-batch-ops.html
+#
+# This service is transactional.
+# If any of the operations performed fails (returns a non-2xx HTTP status code),
+# the transaction will be rolled back and all changes will be undone.
+#
+# Example:
+#
+#    var client = new Neo4jClient("http://localhost:7474")
+#    #
+#    var node1 = new NeoNode
+#    var node2 = new NeoNode
+#    var edge = new NeoEdge(node1, "TO", node2)
+#    #
+#    var batch = new NeoBatch(client)
+#    batch.save_node(node1)
+#    batch.save_node(node2)
+#    batch.save_edge(edge)
+#    batch.execute
+#    #
+#    assert node1.is_linked
+#    assert node2.is_linked
+#    assert edge.is_linked
+class NeoBatch
+
+       # Neo4j client connector
+       var client: Neo4jClient
+
+       # Jobs to perform in this batch
+       #
+       # The batch service expects an array of job descriptions as input,
+       # each job description describing an action to be performed via the normal server API.
+       var jobs = new HashMap[Int, NeoJob]
+
+       # Append a new job to the batch in JSON Format
+       # see `NeoJob`
+       fun new_job(nentity: NeoEntity): NeoJob do
+               var id = jobs.length
+               var job = new NeoJob(id, nentity)
+               jobs[id] = job
+               return job
+       end
+
+       # Load a node in batch mode also load labels, data and edges
+       fun load_node(node: NeoNode) do
+               var job = new_job(node)
+               job.action = load_node_data_action
+               job.method = "GET"
+               if node.id != null then
+                       job.to = "/node/{node.id.to_s}"
+               else
+                       job.to = "\{{node.batch_id.to_s}\}"
+               end
+               job = new_job(node)
+               job.action = load_node_labels_action
+               job.method = "GET"
+               if node.id != null then
+                       job.to = "/node/{node.id.to_s}/labels"
+               else
+                       job.to = "\{{node.batch_id.to_s}\}/labels"
+               end
+       end
+
+       # Load in and out edges into node
+       fun load_node_edges(node: NeoNode) do
+               var job = new_job(node)
+               job.action = load_node_in_edges_action
+               job.method = "GET"
+               if node.id != null then
+                       job.to = "/node/{node.id.to_s}/relationships/in"
+               else
+                       job.to = "\{{node.batch_id.to_s}\}/relationships/in"
+               end
+               job = new_job(node)
+               job.action = load_node_out_edges_action
+               job.method = "GET"
+               if node.id != null then
+                       job.to = "/node/{node.id.to_s}/relationships/out"
+               else
+                       job.to = "\{{node.batch_id.to_s}\}/relationships/out"
+               end
+       end
+
+       # Create a node in batch mode also create labels and edges
+       fun save_node(node: NeoNode) do
+               if node.id != null or node.batch_id != null then return
+               # create node
+               var job = new_job(node)
+               node.batch_id = job.id
+               job.action = create_node_action
+               job.method = "POST"
+               job.to = "/node"
+               job.body = node.properties
+               # add labels
+               job = new_job(node)
+               job.method = "POST"
+               job.to = "\{{node.batch_id.to_s}\}/labels"
+               job.body = new JsonArray.from(node.labels)
+               # add edges
+               #save_edges(node.out_edges)
+       end
+
+       # Create multiple nodes
+       # also create labels and edges
+       fun save_nodes(nodes: Collection[NeoNode]) do for node in nodes do save_node(node)
+
+       # Create an edge
+       # nodes `edge.from` and `edge.to` will be created if not in base
+       fun save_edge(edge: NeoEdge) do
+               if edge.id != null or edge.batch_id != null then return
+               # create nodes
+               save_node(edge.from)
+               save_node(edge.to)
+               # create edge
+               var job = new_job(edge)
+               edge.batch_id = job.id
+               job.action = create_edge_action
+               job.method = "POST"
+               if edge.from.id != null then
+                       job.to = "/node/{edge.from.id.to_s}/relationships"
+               else
+                       job.to = "\{{edge.from.batch_id.to_s}\}/relationships"
+               end
+               job.body = edge.to_json
+       end
+
+       # Create multiple edges
+       fun save_edges(edges: Collection[NeoEdge]) do for edge in edges do save_edge(edge)
+
+       # Execute the batch and update local nodes
+       fun execute: List[JsonError] do
+               var request = new JsonPOST(client.batch_url, client.curl)
+               # request.headers["X-Stream"] = "true"
+               var json_jobs = new JsonArray
+               for job in jobs.values do json_jobs.add job.to_json
+               request.data = json_jobs
+               var response = request.execute
+               var res = client.parse_response(response)
+               return finalize_batch(res)
+       end
+
+       # Associate data from response in original nodes and edges
+       private fun finalize_batch(response: Jsonable): List[JsonError] do
+               var errors = new List[JsonError]
+               if not response isa JsonArray then
+                       errors.add(new JsonError("Neo4jError", "Unexpected batch response format"))
+                       return errors
+               end
+               # print " {res.length} jobs executed"
+               for res in response do
+                       if not res isa JsonObject then
+                               errors.add(new JsonError("Neo4jError", "Unexpected job format in batch response"))
+                               continue
+                       end
+                       var id = res["id"].as(Int)
+                       var job = jobs[id]
+                       if job.action == create_node_action then
+                               var node = job.entity.as(NeoNode)
+                               node.batch_id = null
+                               node.url = res["location"].to_s
+                       else if job.action == create_edge_action then
+                               var edge = job.entity.as(NeoEdge)
+                               edge.batch_id = null
+                               edge.url = res["location"].to_s
+                       else if job.action == load_node_data_action then
+                               var node = job.entity.as(NeoNode)
+                               node.internal_properties = res["body"].as(JsonObject)["data"].as(JsonObject)
+                       else if job.action == load_node_labels_action then
+                               var node = job.entity.as(NeoNode)
+                               var labels = new Array[String]
+                               for l in res["body"].as(JsonArray) do labels.add l.to_s
+                               node.internal_labels = labels
+                       else if job.action == load_node_in_edges_action then
+                               var node = job.entity.as(NeoNode)
+                               var edges = res["body"].as(JsonArray)
+                               node.internal_in_edges = new List[NeoEdge]
+                               for edge in edges do
+                                       node.internal_in_edges.add client.load_edge(edge.as(JsonObject)["self"].to_s)
+                               end
+                       else if job.action == load_node_out_edges_action then
+                               var node = job.entity.as(NeoNode)
+                               var edges = res["body"].as(JsonArray)
+                               node.internal_out_edges = new List[NeoEdge]
+                               for edge in edges do
+                                       node.internal_out_edges.add client.load_edge(edge.as(JsonObject)["self"].to_s)
+                               end
+                       end
+               end
+               return errors
+       end
+
+       # JobActions
+       # TODO replace with enum
+
+       private fun create_node_action: Int do return 1
+       private fun create_edge_action: Int do return 2
+       private fun load_node_data_action: Int do return 3
+       private fun load_node_labels_action: Int do return 4
+       private fun load_node_in_edges_action: Int do return 5
+       private fun load_node_out_edges_action: Int do return 6
+end
+
+# A job that can be executed in a `NeoBatch`
+# This is a representation of a neo job in JSON Format
+#
+# Each job description should contain a `to` attribute, with a value relative to the data API root
+# (so http://localhost:7474/db/data/node becomes just /node), and a `method` attribute containing
+# HTTP verb to use.
+#
+# Optionally you may provide a `body` attribute, and an `id` attribute to help you keep track
+# of responses, although responses are guaranteed to be returned in the same order the job
+# descriptions are received.
+class NeoJob
+       # The job uniq `id`
+       var id: Int
+       # Entity targeted by the job
+       var entity: NeoEntity
+
+       init(id: Int, entity: NeoEntity) do
+               self.id = id
+               self.entity = entity
+       end
+
+       # What kind of action do the job
+       # used to attach responses to original Neo objets
+       private var action: nullable Int = null
+
+       # Job HTTP method: `GET`, `POST`, `PUT`, `DELETE`...
+       var method: String
+       # Job service target: `/node`, `/labels` etc...
+       var to: String
+       # Body to send with the job service request
+       var body: nullable Jsonable = null
+
+       # JSON formated job
+       fun to_json: JsonObject do
+               var job = new JsonObject
+               job["id"] = id
+               job["method"] = method
+               job["to"] = to
+               if not body == null then
+                       job["body"] = body
+               end
+               return job
+       end
+end
+
index 51ee0c8..9d455c8 100644 (file)
@@ -491,7 +491,7 @@ end
 # A hogeneous sequence of node, used to represent unbounded lists (and + modifier)
 class Nodes[T: Node]
        super Node
-       redef var children = new Array[T]
+       redef var children: Array[T] = new Array[T]
 end
 
 # A production with a specific, named and statically typed children
index 3e0e0e0..d1320a4 100644 (file)
@@ -185,7 +185,7 @@ class OptionEnum
        redef fun pretty_default
        do
                if default_value != null then
-                       return " ({values[default_value.as(not null)]})"
+                       return " ({values[default_value]})"
                else
                        return ""
                end
diff --git a/lib/splay_ropes.nit b/lib/splay_ropes.nit
new file mode 100644 (file)
index 0000000..e167ce7
--- /dev/null
@@ -0,0 +1,127 @@
+# 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.
+
+# Introduces a self-balancing method on Rope, using a Splay Tree
+module splay_ropes
+
+import standard
+intrude import standard::ropes
+
+redef class Rope
+
+       # Performs a Left rotation on node `x`
+       # Since a Rope does not have any notion of parent in its node, they need to be passed as arguments if available.
+       private fun left_rotate(r: Concat): Concat
+       do
+               var rr = r.right.as(Concat)
+               var rl = r.left
+               var pl = rr.left
+               var pr = rr.right
+               var nr = new Concat(rl, pl)
+               var np = new Concat(nr, pr)
+               return np
+       end
+
+       # Performs a Right rotation on node `r`
+       # Since a Rope does not have any notion of parent in its node, they need to be passed as arguments if available.
+       private fun right_rotate(r: Concat): Concat
+       do
+               var rl = r.left.as(Concat)
+               var rr = r.right
+               var pr = rl.right
+               var pl = rl.left
+               var nr = new Concat(pr, rr)
+               var np = new Concat(pl, nr)
+               return np
+       end
+
+       # Performs a Splay operation on a complete path
+       # The last node of the path will become the root.
+       private fun splay(path: Path): nullable Concat
+       do
+               var st = path.stack
+               if st.is_empty then return null
+               var cct = st.pop.node
+               while not st.is_empty do
+                       var tmp = st.pop
+                       var nod: Concat
+                       if tmp.left then
+                               nod = new Concat(cct, tmp.node.right)
+                               cct = right_rotate(nod)
+                       else
+                               nod = new Concat(tmp.node.left, cct)
+                               cct = left_rotate(nod)
+                       end
+               end
+               return cct
+       end
+end
+
+redef class RopeString
+
+       # Inserts a String `str` at position `pos`
+       redef fun insert_at(str, pos)
+       do
+               if str.length == 0 then return self
+               if self.length == 0 then return new RopeString.from(str)
+
+               assert pos >= 0 and pos <= length
+
+               var path = node_at(pos)
+
+               var last_concat: Concat
+
+               if path.offset == 0 then
+                       if str isa FlatString then
+                               last_concat = new Concat(new StringLeaf(str), path.leaf)
+                       else
+                               last_concat = new Concat(str.as(RopeString).root, path.leaf)
+                       end
+               else if path.offset == path.leaf.length then
+                       if str isa FlatString then
+                               last_concat = new Concat(path.leaf, new StringLeaf(str))
+                       else
+                               last_concat = new Concat(path.leaf, str.as(RopeString).root)
+                       end
+               else
+                       var s = path.leaf.str
+                       var l_half = s.substring(0, s.length - path.offset)
+                       var r_half = s.substring_from(s.length - path.offset)
+                       var cct: Concat
+                       var ll = new StringLeaf(l_half.as(FlatString))
+                       if str isa FlatString then
+                               cct = new Concat(ll, new StringLeaf(str))
+                       else
+                               cct = new Concat(ll, str.as(RopeString).root)
+                       end
+                       last_concat = new Concat(cct, new StringLeaf(r_half.as(FlatString)))
+               end
+
+               var st = path.stack
+
+               if st.is_empty then return new RopeString.from_root(last_concat)
+
+               var tmp = st.pop
+
+               if tmp.left then
+                       var n = tmp.node.right
+                       var r = new Concat(last_concat, n)
+                       st.push(new PathElement(r))
+               else
+                       var n = tmp.node.left
+                       var r = new Concat(n, last_concat)
+                       st.push(new PathElement(r))
+               end
+
+               return new RopeString.from_root(splay(path).as(not null))
+       end
+
+end
+
diff --git a/lib/sqlite3/native_sqlite3.nit b/lib/sqlite3/native_sqlite3.nit
new file mode 100644 (file)
index 0000000..da93820
--- /dev/null
@@ -0,0 +1,191 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2013 Guillaume Auger <jeho@resist.ca>
+# Copyright 2013-2014 Alexis Laferrière <alexis.laf@xymus.net>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     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.
+
+# Low-level Sqlite3 features
+module native_sqlite3 is pkgconfig("sqlite3")
+
+in "C header" `{
+       #include <sqlite3.h>
+`}
+
+redef class Sys
+       # Last error raised when calling `Sqlite3::open`
+       var sqlite_open_error: nullable Sqlite3Code = null
+end
+
+extern class Sqlite3Code `{int`}
+       new ok `{ return SQLITE_OK; `} #         0   /* Successful result */
+       fun is_ok: Bool `{ return recv == SQLITE_OK; `}
+
+       # new  `{ return SQLITE_ERROR; `} #      1   /* SQL error or missing database */
+       # new  `{ return SQLITE_INTERNAL; `} #    2   /* Internal logic error in SQLite */
+       # new  `{ return SQLITE_PERM; `} #        3   /* Access permission denied */
+       # new  `{ return SQLITE_ABORT; `} #       4   /* Callback routine requested an abort */
+       # new  `{ return SQLITE_BUSY; `} #        5   /* The database file is locked */
+       # new  `{ return SQLITE_LOCKED; `} #      6   /* A table in the database is locked */
+       # new  `{ return SQLITE_NOMEM; `} #       7   /* A malloc() failed */
+       # new  `{ return SQLITE_READONLY; `} #    8   /* Attempt to write a readonly database */
+       # new  `{ return SQLITE_INTERRUPT; `} #   9   /* Operation terminated by sqlite3_interrupt()*/
+       # new  `{ return SQLITE_IOERR; `} #      10   /* Some kind of disk I/O error occurred */
+       # new  `{ return SQLITE_CORRUPT; `} #    11   /* The database disk image is malformed */
+       # new  `{ return SQLITE_NOTFOUND; `} #   12   /* Unknown opcode in sqlite3_file_control() */
+       # new  `{ return SQLITE_FULL; `} #       13   /* Insertion failed because database is full */
+       # new  `{ return SQLITE_CANTOPEN; `} #   14   /* Unable to open the database file */
+       # new  `{ return SQLITE_PROTOCOL; `} #   15   /* Database lock protocol error */
+       # new  `{ return SQLITE_EMPTY; `} #      16   /* Database is empty */
+       # new  `{ return SQLITE_SCHEMA; `} #     17   /* The database schema changed */
+       # new  `{ return SQLITE_TOOBIG; `} #     18   /* String or BLOB exceeds size limit */
+       # new  `{ return SQLITE_CONSTRAINT; `} # 19   /* Abort due to constraint violation */
+       # new  `{ return SQLITE_MISMATCH; `} #   20   /* Data type mismatch */
+       # new  `{ return SQLITE_MISUSE; `} #     21   /* Library used incorrectly */
+       # new  `{ return SQLITE_NOLFS; `} #      22   /* Uses OS features not supported on host */
+       # new  `{ return SQLITE_AUTH; `} #       23   /* Authorization denied */
+       # new  `{ return SQLITE_FORMAT; `} #     24   /* Auxiliary database format error */
+       # new  `{ return SQLITE_RANGE; `} #      25   /* 2nd parameter to sqlite3_bind out of range */
+       # new  `{ return SQLITE_NOTADB; `} #     26   /* File opened that is not a database file */
+       # new  `{ return SQLITE_NOTICE; `} #     27   /* Notifications from sqlite3_log() */
+       # 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; `}
+
+       new done `{ return SQLITE_DONE; `} #       101  /* sqlite3_step() has finished executing */
+       fun is_done: Bool `{ return recv == SQLITE_DONE; `}
+
+       redef fun to_s: String import NativeString.to_s `{
+#if SQLITE_VERSION_NUMBER >= 3007015
+               char *err = (char *)sqlite3_errstr(recv);
+#else
+               char *err = "sqlite3_errstr supported only by version >= 3.7.15";
+#endif
+               if (err == NULL) err = "";
+               return NativeString_to_s(err);
+       `}
+end
+
+# A prepared statement
+extern class NativeStatement `{sqlite3_stmt*`}
+
+       # Evaluate the statement
+       fun step: Sqlite3Code `{
+               return sqlite3_step(recv);
+       `}
+
+       fun column_name(i: Int) : String import NativeString.to_s `{
+               const char * name = (sqlite3_column_name(recv, i));
+               if(name == NULL){
+                       name = "";
+               }
+               char * ret = (char *) name;
+               return NativeString_to_s(ret);
+       `}
+
+       # Number of bytes in the blob or string at row `i`
+       fun column_bytes(i: Int) : Int `{
+               return sqlite3_column_bytes(recv, i);
+       `}
+
+       fun column_double(i: Int) : Float `{
+               return sqlite3_column_double(recv, i);
+       `}
+
+       fun column_int(i: Int) : Int `{
+               return sqlite3_column_int(recv, i);
+       `}
+
+       fun column_text(i: Int): NativeString `{
+               return (char *)sqlite3_column_text(recv, i);
+       `}
+
+       # Type of the entry at row `i`
+       fun column_type(i: Int): DataType `{
+               return sqlite3_column_type(recv, i);
+       `}
+
+       fun column_blob(i: Int): Pointer `{ return (void*)sqlite3_column_blob(recv, i); `}
+
+       fun column_count: Int `{
+               return sqlite3_column_count(recv);
+       `}
+
+       # Reset this statement to its original state, to be reexecuted
+       fun reset: Sqlite3Code `{ return sqlite3_reset(recv); `}
+
+       # Delete this statement
+       fun finalize: Sqlite3Code `{ return sqlite3_finalize(recv); `}
+end
+
+# A database connection
+extern class NativeSqlite3 `{sqlite3 *`}
+
+       # Open a connection to a database in UTF-8
+       new open(filename: String) import String.to_cstring, set_sys_sqlite_open_error `{
+               sqlite3 *self = NULL;
+               int err = sqlite3_open(String_to_cstring(filename), &self);
+               NativeSqlite3_set_sys_sqlite_open_error(self, (void*)(long)err);
+               // The previous cast is a hack, using non pointers in extern classes is not
+               // yet in the spec of the FFI.
+               return self;
+       `}
+
+       # Utility method to set `Sys.sqlite_open_error`
+       private fun set_sys_sqlite_open_error(err: Sqlite3Code) do sys.sqlite_open_error = err
+
+       # Has this DB been correctly opened?
+       #
+       # To know if it has been closed or interrupted, you must check for errors with `error`.
+       fun is_valid: Bool do return not address_is_null
+
+       fun destroy do close
+
+       # Close this connection
+       fun close `{ sqlite3_close_v2(recv); `}
+
+       # Execute a SQL statement
+       fun exec(sql: String): Sqlite3Code import String.to_cstring `{
+               return sqlite3_exec(recv, 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);
+               if (res == SQLITE_OK)
+                       return NativeStatement_as_nullable(stmt);
+               else
+                       return null_NativeStatement();
+       `}
+
+       fun last_insert_rowid: Int `{
+               return sqlite3_last_insert_rowid(recv);
+       `}
+
+       fun error: Sqlite3Code `{
+               return sqlite3_errcode(recv);
+       `}
+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 to_i: Int `{ return recv; `}
+end
index a187c3a..d194362 100644 (file)
@@ -1,7 +1,6 @@
 # This file is part of NIT ( http://www.nitlanguage.org ).
 #
-# Copyright 2013 Guillaume Auger <jeho@resist.ca>
-# Copyright 2013 Alexis Laferrière <alexis.laf@xymus.net>
+# Copyright 201 Alexis Laferrière <alexis.laf@xymus.net>
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-module sqlite3 is pkgconfig("sqlite3")
-
-in "C header" `{
-       #include <sqlite3.h>
-`}
-
-extern class Sqlite3Code `{int`}
-       new ok `{ return SQLITE_OK; `} #         0   /* Successful result */
-       fun is_ok: Bool `{ return recv == SQLITE_OK; `}
-
-       # new  `{ return SQLITE_ERROR; `} #      1   /* SQL error or missing database */
-       # new  `{ return SQLITE_INTERNAL; `} #    2   /* Internal logic error in SQLite */
-       # new  `{ return SQLITE_PERM; `} #        3   /* Access permission denied */
-       # new  `{ return SQLITE_ABORT; `} #       4   /* Callback routine requested an abort */
-       # new  `{ return SQLITE_BUSY; `} #        5   /* The database file is locked */
-       # new  `{ return SQLITE_LOCKED; `} #      6   /* A table in the database is locked */
-       # new  `{ return SQLITE_NOMEM; `} #       7   /* A malloc() failed */
-       # new  `{ return SQLITE_READONLY; `} #    8   /* Attempt to write a readonly database */
-       # new  `{ return SQLITE_INTERRUPT; `} #   9   /* Operation terminated by sqlite3_interrupt()*/
-       # new  `{ return SQLITE_IOERR; `} #      10   /* Some kind of disk I/O error occurred */
-       # new  `{ return SQLITE_CORRUPT; `} #    11   /* The database disk image is malformed */
-       # new  `{ return SQLITE_NOTFOUND; `} #   12   /* Unknown opcode in sqlite3_file_control() */
-       # new  `{ return SQLITE_FULL; `} #       13   /* Insertion failed because database is full */
-       # new  `{ return SQLITE_CANTOPEN; `} #   14   /* Unable to open the database file */
-       # new  `{ return SQLITE_PROTOCOL; `} #   15   /* Database lock protocol error */
-       # new  `{ return SQLITE_EMPTY; `} #      16   /* Database is empty */
-       # new  `{ return SQLITE_SCHEMA; `} #     17   /* The database schema changed */
-       # new  `{ return SQLITE_TOOBIG; `} #     18   /* String or BLOB exceeds size limit */
-       # new  `{ return SQLITE_CONSTRAINT; `} # 19   /* Abort due to constraint violation */
-       # new  `{ return SQLITE_MISMATCH; `} #   20   /* Data type mismatch */
-       # new  `{ return SQLITE_MISUSE; `} #     21   /* Library used incorrectly */
-       # new  `{ return SQLITE_NOLFS; `} #      22   /* Uses OS features not supported on host */
-       # new  `{ return SQLITE_AUTH; `} #       23   /* Authorization denied */
-       # new  `{ return SQLITE_FORMAT; `} #     24   /* Auxiliary database format error */
-       # new  `{ return SQLITE_RANGE; `} #      25   /* 2nd parameter to sqlite3_bind out of range */
-       # new  `{ return SQLITE_NOTADB; `} #     26   /* File opened that is not a database file */
-       # new  `{ return SQLITE_NOTICE; `} #     27   /* Notifications from sqlite3_log() */
-       # 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; `}
-
-       new done `{ return SQLITE_DONE; `} #       101  /* sqlite3_step() has finished executing */
-       fun is_done: Bool `{ return recv == SQLITE_DONE; `}
-
-       redef fun to_s: String import NativeString.to_s `{
-#if SQLITE_VERSION_NUMBER >= 3007015
-               char *err = (char *)sqlite3_errstr(recv);
-#else
-               char *err = "sqlite3_errstr supported only by version >= 3.7.15";
-#endif
-               if (err == NULL) err = "";
-               return NativeString_to_s(err);
-       `}
+# Services to manipulate a Sqlite3 database
+#
+# For more information, refer to the documentation of http://www.sqlite.org/docs.html
+module sqlite3
+
+private import native_sqlite3
+import standard
+
+# A connection to a Sqlite3 database
+class Sqlite3DB
+       private var native_connection: NativeSqlite3
+
+       # Is this connection to the DB open?
+       var is_open = false
+
+       # All `Statement` opened from this connection that must be closed with this connection
+       private var open_statements = new Array[Statement]
+
+       # Open a connection to the database file at `path`
+       init open(path: Text)
+       do
+               native_connection = new NativeSqlite3.open(path.to_s)
+               if native_connection.is_valid then is_open = true
+       end
+
+       # Close this connection to the DB and all open statements
+       fun close
+       do
+               is_open = false
+
+               # close open statements
+               for stmt in open_statements do if stmt.is_open then
+                       stmt.close
+               end
+
+               native_connection.close
+       end
+
+       # Prepare and return a `Statement`, return `null` on error
+       fun prepare(sql: Text): nullable Statement
+       do
+               var native_stmt = native_connection.prepare(sql.to_s)
+               if native_stmt == null then return null
+
+               var stmt = new Statement(native_stmt)
+               open_statements.add stmt
+               return stmt
+       end
+
+       # Execute the `sql` statement and return `true` on success
+       fun execute(sql: Text): Bool
+       do
+               var err = native_connection.exec(sql.to_s)
+               return err.is_ok
+       end
+
+       # Create a table on the DB with a statement beginning with "CREATE TABLE ", followed by `rest`
+       #
+       # This method does not escape special characters.
+       fun create_table(rest: Text): Bool do return execute("CREATE TABLE " + rest)
+
+       # Insert in the DB with a statement beginning with "INSERT ", followed by `rest`
+       #
+       # This method does not escape special characters.
+       fun insert(rest: Text): Bool do return execute("INSERT " + rest)
+
+       # Replace in the DB with a statement beginning with "REPLACE", followed by `rest`
+       #
+       # This method does not escape special characters.
+       fun replace(rest: Text): Bool do return execute("REPLACE " + rest)
+
+       # Select from the DB with a statement beginning with "SELECT ", followed by `rest`
+       #
+       # This method does not escape special characters.
+       fun select(rest: Text): nullable Statement do return prepare("SELECT " + rest)
+
+       # TODO add more prefix here as needed
+
+       # The latest error message, or `null` if there is none
+       fun error: nullable String
+       do
+               if not native_connection.is_valid then
+                       var err = sys.sqlite_open_error
+                       if err == null then return null
+                       return err.to_s
+               end
+
+               var err = native_connection.error
+               if err.is_ok then return null
+               return err.to_s
+       end
+end
+
+# A prepared Sqlite3 statement, created from `Sqlite3DB::prepare` or `Sqlite3DB::select`
+class Statement
+       private var native_statement: NativeStatement
+
+       private init(ns: NativeStatement) do self.native_statement = ns
+
+       # Is this statement usable?
+       var is_open = true
+
+       # Close and finalize this statement
+       fun close
+       do
+               is_open = false
+               native_statement.finalize
+       end
+
+       # Reset this statement and return a `StatementIterator` to iterate over the result
+       fun iterator: StatementIterator
+       do
+               native_statement.reset
+               native_statement.step
+               return new StatementIterator(self)
+       end
+end
+
+class StatementRow
+       # Statement linked to `self`
+       var statement: Statement
+
+       private init(s: Statement) do self.statement = s
+
+       # Number of entries in this row
+       #
+       # require: `self.statement.is_open`
+       fun length: Int
+       do
+               assert statement_closed: statement.is_open
+
+               return statement.native_statement.column_count
+       end
+
+       # Returns the `i`th entry on this row
+       fun [](i: Int): StatementEntry do return new StatementEntry(statement, i)
 end
 
-extern class Statement `{sqlite3_stmt*`}
-
-       fun step: Sqlite3Code `{
-               return sqlite3_step(recv);
-       `}
-
-       fun column_name(i: Int) : String import NativeString.to_s `{
-               const char * name = (sqlite3_column_name(recv, i));
-               if(name == NULL){
-                       name = "";
-               }
-               char * ret = (char *) name;
-               return NativeString_to_s(ret);
-       `}
-
-       fun column_bytes(i: Int) : Int `{
-               return sqlite3_column_bytes(recv, i);
-       `}
-
-       fun column_double(i: Int) : Float `{
-               return sqlite3_column_double(recv, i);
-       `}
-
-       fun column_int(i: Int) : Int `{
-               return sqlite3_column_int(recv, i);
-       `}
-
-       fun column_text(i: Int) : String import NativeString.to_s `{
-               char * ret = (char *) sqlite3_column_text(recv, i);
-               if( ret == NULL ){
-                       ret = "";
-               }
-               return NativeString_to_s(ret);
-       `}
-
-       fun column_type(i: Int) : Int `{
-               return sqlite3_column_type(recv, i);
-       `}
-
-       #       fun column_blob(i : Int) : String `{
-       #               TODO
-       #       `}
-
-       fun column_count: Int `{
-               return sqlite3_column_count(recv);
-       `}
+# An entry on a `StatementRow`
+class StatementEntry
+       # Statement linked to `self`
+       var statement: Statement
+
+       private var index: Int
+
+       private init(s: Statement, i: Int)
+       do
+               self.statement = s
+               self.index = i
+       end
+
+       # Name of the column
+       #
+       # require: `self.statement.is_open`
+       fun name: String is cached do
+               assert statement_closed: statement.is_open
+
+               return statement.native_statement.column_name(index)
+       end
+
+       # Get the value of this entry according to its Sqlite type
+       #
+       # require: `self.statement.is_open`
+       fun value: nullable Sqlite3Data
+       do
+               assert statement_closed: statement.is_open
+
+               var data_type = statement.native_statement.column_type(index)
+               if data_type.is_integer then return to_i
+               if data_type.is_float then return to_f
+               if data_type.is_blob then return to_blob
+               if data_type.is_null then return null
+               if data_type.is_text then return to_s
+               abort
+       end
+
+       # Get this entry as `Int`
+       #
+       # If the Sqlite type of this entry is not an integer, it will be `CAST` to
+       # integer. If `null`, returns 0.
+       #
+       # require: `self.statement.is_open`
+       fun to_i: Int
+       do
+               assert statement_closed: statement.is_open
+
+               return statement.native_statement.column_int(index)
+       end
+
+       # Get this entry as `Float`
+       #
+       # If the Sqlite type of this entry is not a floating point, it will be `CAST`
+       # to float. If `null`, returns 0.0.
+       #
+       # require: `self.statement.is_open`
+       fun to_f: Float
+       do
+               assert statement_closed: statement.is_open
+
+               return statement.native_statement.column_double(index)
+       end
+
+       # Get this entry as `String`
+       #
+       # If the Sqlite type of this entry is not text, it will be `CAST` to text.
+       # If null, returns an empty string.
+       #
+       # require: `self.statement.is_open`
+       redef fun to_s
+       do
+               assert statement_closed: statement.is_open
+
+               var native_string = statement.native_statement.column_text(index)
+               if native_string.address_is_null then return ""
+               return native_string.to_s
+       end
+
+       # Get this entry as `Blob`
+       #
+       # If the Sqlite type of this entry is not a blob, it will be `CAST` to text.
+       # If null, returns a NULL pointer.
+       #
+       # require: `self.statement.is_open`
+       fun to_blob: Blob
+       do
+               assert statement_closed: statement.is_open
+
+               # By spec, we must get the pointer before the byte count
+               var pointer = statement.native_statement.column_blob(index)
+               var length = statement.native_statement.column_bytes(index)
+
+               return new Blob(pointer, length)
+       end
 end
 
-extern class Sqlite3 `{sqlite3 *`}
-       new open(filename: String) import String.to_cstring `{
-               sqlite3 *self;
-               sqlite3_open(String_to_cstring(filename), &self);
-               return self;
-       `}
+# Iterator over the rows of a statement result
+class StatementIterator
+       super Iterator[StatementRow]
 
-       fun destroy do close
+       # Statement linked to `self`
+       var statement: Statement
 
-       fun close `{ sqlite3_close(recv); `}
+       private init(s: Statement)
+       do
+               self.statement = s
+               self.item = new StatementRow(s)
+       end
 
-       fun exec(sql : String): Sqlite3Code import String.to_cstring `{
-               return sqlite3_exec(recv, String_to_cstring(sql), 0, 0, 0);
-       `}
+       redef var item: StatementRow
 
-       fun prepare(sql: String): nullable Statement import String.to_cstring, Statement.as nullable `{
-               sqlite3_stmt *stmt;
-               int res = sqlite3_prepare_v2(recv, String_to_cstring(sql), -1, &stmt, 0);
-               if (res == SQLITE_OK)
-                       return Statement_as_nullable(stmt);
+       redef var is_ok = true
+
+       # require: `self.statement.is_open`
+       redef fun next
+       do
+               assert statement_closed: statement.is_open
+
+               var err = statement.native_statement.step
+               if err.is_row then
+                       is_ok = true
+               else if err.is_done then
+                       # Clean complete
+                       is_ok = false
                else
-                       return null_Statement();
-       `}
+                       # error
+                       # FIXME do something with the error?
+                       is_ok = false
+               end
+       end
+end
+
+# A data type supported by Sqlite3
+interface Sqlite3Data end
+
+redef universal Int super Sqlite3Data end
+redef universal Float super Sqlite3Data end
+redef class String super Sqlite3Data end
+
+# A Sqlite3 blob
+class Blob
+       super Sqlite3Data
 
-       fun last_insert_rowid: Int `{
-               return sqlite3_last_insert_rowid(recv);
-       `}
+       private init(pointer: Pointer, length: Int)
+       do
+               self.pointer = pointer
+               self.length = length
+       end
 
-       fun error: Sqlite3Code `{
-               return sqlite3_errcode(recv);
-       `}
+       var pointer: Pointer
+       var length: Int
 end
index cce8495..401c3c9 100644 (file)
@@ -19,6 +19,7 @@ import list
 intrude import array # FIXME because of string.nit
 import sorter
 import hash_collection
+import union_find
 
 redef class Sequence[E]
        fun subarray(start, len: Int): Array[E]
@@ -28,3 +29,430 @@ redef class Sequence[E]
                return a
        end
 end
+
+# A queue is a FIFO data structure
+#
+# It's particular kind of collection in which the entities in the collection are kept in order.
+# and the principal operations on the collection are:
+#  * the addition of entities to the rear terminal position, known as `enqueue`
+#  * the removal of entities from the front terminal position, known as `dequeue`
+# This makes the queue a First-In-First-Out (FIFO) data structure.
+# In a FIFO data structure, the first element added to the queue will be the first one to be removed.
+# This is equivalent to the requirement that once a new element is added,
+# all elements that were added before have to be removed before the new element can be removed.
+interface Queue[E]
+       super Collection[E]
+
+       # Add an item in the queue
+       fun enqueue(item: E) is abstract
+
+       # Dequeue the next item
+       fun dequeue: E is abstract
+
+       # Show the next item on the queue but do not remove it
+       fun top: E is abstract
+end
+
+# Circular queue based on an array.
+# A data structure that uses a single, fixed-size queue as if it were connected end-to-end.
+class CircularQueue[E]
+       super Queue[E]
+
+       private var items: Array[nullable E]
+       private var head = 0
+       private var tail = 0
+       private var icount = 0
+       private var size: Int
+
+       init(size: Int) do
+               self.size = size
+               items = new Array[nullable E].filled_with(null, size)
+       end
+
+       #     var queue = new CircularQueue[Int](5)
+       #     queue.enqueue 10
+       #     queue.enqueue 20
+       #     queue.enqueue 30
+       #     assert queue.length == 3
+       redef fun enqueue(item) do
+               assert is_full: not is_full
+               items[tail] = item
+               if tail == size - 1 then
+                       tail = 0
+               else
+                       tail += 1
+               end
+               icount += 1
+       end
+
+       #     var queue = new CircularQueue[Int](5)
+       #     queue.enqueue 10
+       #     queue.enqueue 20
+       #     assert queue.dequeue == 10
+       #     assert queue.dequeue == 20
+       #     assert queue.is_empty
+       redef fun dequeue do
+               assert is_empty: not is_empty
+               var e = items[head]
+               items[head] = null
+               if head == size - 1 then
+                       head = 0
+               else
+                       head += 1
+               end
+               icount -= 1
+               return e.as(not null)
+       end
+
+       #     var queue = new CircularQueue[Int](5)
+       #     queue.enqueue 1
+       #     queue.enqueue 2
+       #     assert queue.top == 1
+       #     queue.dequeue
+       #     assert queue.top == 2
+       redef fun top do
+               assert is_empty: not is_empty
+               return items[head]
+       end
+
+       #     var queue = new CircularQueue[Int](5)
+       #     queue.enqueue 10
+       #     assert queue.length == 1
+       #     queue.enqueue 20
+       #     assert queue.length == 2
+       #     queue.dequeue
+       #     assert queue.length == 1
+       #     queue.dequeue
+       #     assert queue.length == 0
+       redef fun length do return icount
+
+       #     var queue = new CircularQueue[Int](5)
+       #     assert queue.is_empty
+       #     queue.enqueue 1
+       #     assert not queue.is_empty
+       #     queue.dequeue
+       #     assert queue.is_empty
+       redef fun is_empty do return icount == 0
+
+       # Is the queue full?
+       #
+       #     var queue = new CircularQueue[Int](3)
+       #     assert not queue.is_full
+       #     queue.enqueue 10
+       #     queue.enqueue 20
+       #     queue.enqueue 30
+       #     assert queue.is_full
+       #     queue.dequeue
+       #     assert not queue.is_full
+       fun is_full: Bool do return icount == size
+
+       #     var queue = new CircularQueue[Int](3)
+       #     queue.enqueue 10
+       #     queue.enqueue 20
+       #     queue.enqueue 30
+       #     var res = new Array[Int]
+       #     for e in queue do res.add(e)
+       #     assert res == [10, 20, 30]
+       redef fun iterator do return new CircularQueueIterator[E](self)
+end
+
+private class CircularQueueIterator[E]
+       super Iterator[E]
+
+       var queue: CircularQueue[E]
+       var current: Int
+       var iterations: Int
+
+       init(queue: CircularQueue[E]) do
+               self.queue = queue
+               self.current = queue.head
+               self.iterations = 0
+       end
+
+       redef fun is_ok do return iterations < queue.length
+
+       redef fun next do
+               if current == queue.size - 1 then
+                       current = 0
+               else
+                       current += 1
+               end
+               iterations += 1
+       end
+
+       redef fun item do return queue.items[current]
+end
+
+# Stack implemented with an array
+# A stack is a particular kind of collection
+# in which the principal operations are:
+#  * the addition of an entity to the collection, known as `push`
+#  * the removal of an entity, known as `pop`
+# This makes the queue a Last-In-First-Out (LIFO) data structure.
+# In a LIFO data structure, the last element added to the structure must be the first one
+# to be removed.
+# This is equivalent to the requirement that, considered as a linear collection,
+# the push and pop operations occur only at one end of the structure,
+# referred to as the top of the stack.
+#
+# Example:
+#
+#     var stack = new Stack[Int]
+#     stack.push 1
+#     stack.push 2
+#     assert stack.pop == 2
+#     assert stack.pop == 1
+class Stack[E]
+       super Collection[E]
+
+       private var items = new List[E]
+       private var itop = 0
+
+       # Is the stack empty?
+       #
+       #     var stack = new Stack[Int]
+       #     assert stack.is_empty
+       #     stack.push 1
+       #     assert not stack.is_empty
+       #     stack.pop
+       #     assert stack.is_empty
+       redef fun is_empty do return itop == 0
+
+       # Add an item on top of the stack
+       #
+       #     var stack = new Stack[Int]
+       #     stack.push 1
+       #     stack.push 2
+       #     assert stack.length == 2
+       fun push(item: E) do
+               itop += 1
+               items.add item
+       end
+
+       # Pop the item on the top of the stack
+       #
+       #     var stack = new Stack[Int]
+       #     stack.push 1
+       #     stack.push 2
+       #     assert stack.pop == 2
+       #     assert stack.pop == 1
+       #     assert stack.is_empty
+       fun pop: E do
+               assert empty: not is_empty
+               itop -= 1
+               return items[itop]
+       end
+
+       # Show the item on the top of the stack but do not remove it
+       #
+       #     var stack = new Stack[Int]
+       #     stack.push 1
+       #     stack.push 2
+       #     assert stack.top == 2
+       #     stack.pop
+       #     assert stack.top == 1
+       fun top: E do
+               assert empty: not is_empty
+               return items[itop - 1]
+       end
+
+       # Number of items contained in the stack
+       #
+       #     var stack = new Stack[Int]
+       #     assert stack.length == 0
+       #     stack.push 1
+       #     assert stack.length == 1
+       #     stack.push 2
+       #     assert stack.length == 2
+       #     assert stack.pop == 2
+       #     assert stack.length == 1
+       #     assert stack.pop == 1
+       #     assert stack.length == 0
+       redef fun length do return itop
+
+       # Get an iterator over the stack
+       #
+       #     var stack = new Stack[Int]
+       #     stack.push 1
+       #     stack.push 2
+       #     var sum = 0
+       #     for item in stack do sum += item
+       #     assert sum == 3
+       redef fun iterator do return items.iterator
+end
+
+# A heap is a data structure that satisfies the heap property:
+# If A is a parent node of B then the key of node A is ordered with respect
+# to the key of node B with the same ordering applying across the heap.
+# Either the keys of parent nodes are always greater than or equal to those of the children
+# and the highest key is in the root node (this kind of heap is called max heap)
+# or the keys of parent nodes are less than or equal to those of the children
+# and the lowest key is in the root node (min heap).
+#
+# Heaps are crucial in several efficient graph algorithms such as Dijkstra's algorithm,
+# and in the sorting algorithm heapsort.
+interface Heap[E]
+       super Collection[E]
+
+       # Get the minimum element of the heap
+       fun min: E is abstract
+
+       # Remove and return the minimum
+       fun pop: E is abstract
+
+       # Add an element in the heap
+       fun add(e: E) is abstract
+
+       # Update the heap structure
+       fun build_heap is abstract
+end
+
+# Heap implemented over an array
+class ArrayHeap[E]
+       super Heap[E]
+
+       private var items: Array[E]
+       private var size: Int = -1
+       private var comparator: Comparator[E]
+
+       init(comparator: Comparator[E]) do
+               self.comparator = comparator
+               items = new Array[E]
+       end
+
+       # Init the heap using an existing array
+       init from(comparator: Comparator[E], array: Array[E]) do
+               self.comparator = comparator
+               size = array.length - 1
+               items = array
+               build_heap
+       end
+
+       redef fun build_heap do
+               var i = size / 2
+               while i >= 0 do
+                       heapify(i)
+                       i -= 1
+               end
+       end
+
+       private fun heapify(from: Int) do
+               var l = from * 2 + 1
+               var r = l + 1
+               var largest = from
+               if l <= size and comparator.compare(items[l], items[largest]) > 0 then
+                       largest = l
+               else
+                       largest = from
+               end
+               if r <= size and comparator.compare(items[r], items[largest]) > 0 then
+                       largest = r
+               end
+               if largest != from then
+                       items.swap_at(from, largest)
+                       heapify(largest)
+               end
+       end
+
+       private fun swap_at(a, b: Int) do
+               var tmp = items[a]
+               items[a] = items[b]
+               items[b] = tmp
+       end
+
+       redef fun length do return size + 1
+       redef fun is_empty do return length == 0
+       redef fun iterator do return items.iterator
+
+       redef fun min do
+               assert not_empty: not is_empty
+               return items.first
+       end
+
+       redef fun pop do
+               assert not_empty: not is_empty
+               var e = min
+               swap_at(0, size)
+               size -= 1
+               build_heap
+               return e
+       end
+
+       redef fun add(e) do
+               size += 1
+               items[size] = e
+               build_heap
+       end
+
+       redef fun to_a do
+               var res = new Array[E]
+               for i in [0..size] do res.add items[i]
+               return res
+       end
+end
+
+# Priority Queue implemented over an ArrayHeap
+# A priority queue is an abstract data type which is like a regular queue,
+# but where additionally each element has a "priority" associated with it.
+# In a priority queue, an element with high priority is served before an element with low priority.
+# If two elements have the same priority, they are served according to their order in the queue.
+#
+# Example:
+#
+#     var comparator = new DefaultComparator[Int]
+#     var queue = new PriorityQueue[Int](comparator)
+#     queue.enqueue 11
+#     queue.enqueue 9
+#     queue.enqueue 30
+#     assert not queue.is_empty
+#     assert queue.dequeue == 30
+#     assert queue.dequeue == 11
+#     assert queue.dequeue == 9
+#
+# Init priority queue from array:
+#
+#     var queue2 = new PriorityQueue[Int].from(comparator, [2, 4, 1, 5, 3, 12, 0])
+#     assert queue2.length == 7
+#     assert queue2.top == 12
+class PriorityQueue[E]
+       super Queue[E]
+
+       var heap: Heap[E]
+
+       init(comparator: Comparator[E]) do
+               heap = new ArrayHeap[E](comparator)
+       end
+
+       init from(comparator: Comparator[E], items: Collection[E]) do
+               heap = new ArrayHeap[E].from(comparator, items.to_a)
+       end
+
+       #     var comparator = new DefaultComparator[Int]
+       #     var queue = new PriorityQueue[Int].from(comparator, [2, 4, 1, 5, 3, 12, 0])
+       #     assert queue.dequeue == 12
+       #     assert queue.dequeue == 5
+       #     assert queue.dequeue == 4
+       #     assert queue.length == 4
+       redef fun dequeue do return heap.pop
+
+       #     var comparator = new DefaultComparator[Int]
+       #     var queue = new PriorityQueue[Int](comparator)
+       #     queue.enqueue 18
+       #     queue.enqueue 12
+       #     queue.enqueue 32
+       #     assert queue.dequeue == 32
+       #     assert queue.dequeue == 18
+       #     assert queue.dequeue == 12
+       redef fun enqueue(e) do heap.add e
+
+       #     var comparator = new DefaultComparator[Int]
+       #     var queue = new PriorityQueue[Int].from(comparator, [2, 4, 1, 5, 3, 12, 0])
+       #     assert queue.top == 12
+       #     queue.dequeue
+       #     assert queue.top == 5
+       redef fun top do return heap.min
+
+       redef fun length do return heap.length
+       redef fun iterator do return heap.iterator
+end
+
similarity index 99%
rename from lib/union_find.nit
rename to lib/standard/collection/union_find.nit
index 0134eb2..e865703 100644 (file)
@@ -2,7 +2,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
@@ -11,6 +11,8 @@
 # union–find algorithm using an efficient disjoint-set data structure
 module union_find
 
+import hash_collection
+
 # Data structure to keeps track of elements partitioned into disjoint subsets
 #     var s = new DisjointSet[Int]
 #     s.add(1)
index c58b012..c17e9bd 100644 (file)
@@ -203,7 +203,7 @@ abstract class Rope
                                return new Path(root.as(Leaf), length, st)
                        end
                end
-               return get_node_from(root.as(not null), 0, position, new List[PathElement])
+               return get_node_from(root, 0, position, new List[PathElement])
        end
 
        # Special case for when the required pos is length
index 7e42fb6..74ec7a2 100644 (file)
@@ -293,6 +293,33 @@ abstract class Text
                return true
        end
 
+       # Are all letters in `self` upper-case ?
+       #
+       #     assert "HELLO WORLD".is_upper == true
+       #     assert "%$&%!".is_upper       == true
+       #     assert "hello world".is_upper == false
+       #     assert "Hello World".is_upper == false
+       fun is_upper: Bool
+       do
+               for char in self.chars do 
+                       if char.is_lower then return false
+               end
+               return true
+       end
+
+       # Are all letters in `self` lower-case ?
+       #
+       #     assert "hello world".is_lower == true
+       #     assert "%$&%!".is_lower       == true
+       #     assert "Hello World".is_lower == false
+       fun is_lower: Bool
+       do
+               for char in self.chars do 
+                       if char.is_upper then return false
+               end
+               return true
+       end
+                       
        # Removes the whitespaces at the beginning of self
        #
        #     assert " \n\thello \n\t".l_trim == "hello \n\t"
@@ -613,6 +640,79 @@ abstract class String
        #
        #     assert "Hello World!".to_lower     == "hello world!"
        fun to_lower : SELFTYPE is abstract
+
+       # Takes a camel case `self` and converts it to snake case 
+       #
+       #     assert "randomMethodId".to_snake_case == "random_method_id"
+       #
+       # If `self` is upper, it is returned unchanged
+       #
+       #     assert "RANDOM_METHOD_ID".to_snake_case == "RANDOM_METHOD_ID"
+       #
+       # If the identifier is prefixed by an underscore, the underscore is ignored
+       #
+       #     assert "_privateField".to_snake_case == "_private_field"
+       fun to_snake_case: SELFTYPE
+       do
+               if self.is_upper then return self
+
+               var new_str = new FlatBuffer.with_capacity(self.length)
+               var is_first_char = true
+
+               for char in self.chars do
+                       if is_first_char then 
+                               new_str.add(char.to_lower)
+                               is_first_char = false
+                       else if char.is_upper then
+                               new_str.add('_')
+                               new_str.add(char.to_lower)
+                       else
+                               new_str.add(char)
+                       end
+               end
+               
+               return new_str.to_s
+       end
+
+       # Takes a snake case `self` and converts it to camel case 
+       #
+       #     assert "random_method_id".to_camel_case == "randomMethodId"
+       #
+       # If the identifier is prefixed by an underscore, the underscore is ignored
+       #
+       #     assert "_private_field".to_camel_case == "_privateField"
+       #
+       # If `self` is upper, it is returned unchanged
+       #
+       #     assert "RANDOM_ID".to_camel_case == "RANDOM_ID"
+       #
+       # If there are several consecutive underscores, they are considered as a single one
+       #
+       #     assert "random__method_id".to_camel_case == "randomMethodId"
+       fun to_camel_case: SELFTYPE
+       do
+               if self.is_upper then return self
+
+               var new_str = new FlatBuffer
+               var is_first_char = true
+               var follows_us = false
+
+               for char in self.chars do
+                       if is_first_char then
+                               new_str.add(char)
+                               is_first_char = false
+                       else if char == '_' then
+                               follows_us = true
+                       else if follows_us then
+                               new_str.add(char.to_upper)
+                               follows_us = false
+                       else
+                               new_str.add(char)
+                       end
+               end
+
+               return new_str.to_s
+       end
 end
 
 private class FlatSubstringsIter
diff --git a/lib/xdg_basedir/show_basedir.nit b/lib/xdg_basedir/show_basedir.nit
new file mode 100644 (file)
index 0000000..9fc95fc
--- /dev/null
@@ -0,0 +1,28 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2014 Alexis Laferrière <alexis.laf@xymus.net>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     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.
+
+# Prints the local base directories as per the XDG Base Directory specification
+module show_basedir
+
+import xdg_basedir
+
+print "Data home: {xdg_basedir.data_home}"
+print "Config home: {xdg_basedir.config_home}"
+print "Cache home: {xdg_basedir.cache_home}"
+print "Data dirs: {xdg_basedir.data_dirs.join(", ")}"
+print "Searchable data dirs: {xdg_basedir.searchable_data_dirs.join(", ")}"
+print "Config dirs: {xdg_basedir.config_dirs.join(", ")}"
+print "Searchable config dirs: {xdg_basedir.searchable_config_dirs.join(", ")}"
diff --git a/lib/xdg_basedir/xdg_basedir.nit b/lib/xdg_basedir/xdg_basedir.nit
new file mode 100644 (file)
index 0000000..c1ad485
--- /dev/null
@@ -0,0 +1,132 @@
+# This file is part of NIT (http://www.nitlanguage.org).
+#
+# Copyright 2014 Alexis Laferrière <alexis.laf@xymus.net>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     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 using the XDG Base Directory specification
+#
+# This is a low-level module, it is meant to be wrapped by higher level services.
+#
+# For more information, refer to the documentation of the `libxdg-basedir`
+# project or the official specification at:
+# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
+module xdg_basedir is pkgconfig("libxdg-basedir")
+
+in "C Header" `{
+       #include <basedir.h>
+`}
+
+# Handle to a local cache of XDG base directories
+extern class XdgBasedir `{ xdgHandle* `}
+
+       # Initialize a handle to an XDG data cache and initialize the cache.
+       new `{ return xdgInitHandle(NULL); `}
+
+       # Has this instance been correctly initialized?
+       fun is_valid: Bool do return not address_is_null
+
+       # Wipe handle of XDG data cache.
+       fun destroy `{ xdgWipeHandle(recv); `}
+
+       # Update the data cache.
+       #
+       # This should not be done frequently as it reallocates the cache.
+       # Even if updating the cache fails the handle remains valid and can
+       # 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); `}
+
+       # Base directory for user specific data files.
+       fun data_home: String import NativeString.to_s `{
+               return NativeString_to_s((char*)xdgDataHome(recv));
+       `}
+
+       # Base directory for user specific configuration files.
+       fun config_home: String import NativeString.to_s `{
+               return NativeString_to_s((char*)xdgConfigHome(recv));
+       `}
+
+       # Base directory for user specific non-essential data files.
+       fun cache_home: String import NativeString.to_s `{
+               return NativeString_to_s((char*)xdgCacheHome(recv));
+       `}
+
+       # Preference-ordered set of base directories to search for data files
+       # in addition to the $XDG_DATA_HOME base directory.
+       fun data_dirs: Array[String] do return native_data_dirs.to_string_array
+
+       private fun native_data_dirs: ConstPointer `{
+               return xdgDataDirectories(recv);
+       `}
+
+       # Preference-ordered set of base directories to search for data files
+       # with $XDG_DATA_HOME prepended.
+       #
+       # The base directory defined by $XDG_DATA_HOME is considered more
+       # important than any of the base directories defined by $XDG_DATA_DIRS.
+       fun searchable_data_dirs: Array[String]
+       do
+               return native_searchable_data_dirs.to_string_array
+       end
+
+       private fun native_searchable_data_dirs: ConstPointer `{
+               return xdgSearchableDataDirectories(recv);
+       `}
+
+       # Preference-ordered set of base directories to search for configuration
+       # files in addition to the $XDG_CONFIG_HOME base directory.
+       fun config_dirs: Array[String] do return native_config_dirs.to_string_array
+
+       private fun native_config_dirs: ConstPointer `{
+               return xdgConfigDirectories(recv);
+       `}
+
+       # Preference-ordered set of base directories to search for configuration
+       # files with $XDG_CONFIG_HOME prepended.
+       #
+       # The base directory defined by $XDG_CONFIG_HOME is considered more
+       # important than any of the base directories defined by $XDG_CONFIG_DIRS.
+       fun searchable_config_dirs: Array[String]
+       do
+               return native_searchable_config_dirs.to_string_array
+       end
+
+       private fun native_searchable_config_dirs: ConstPointer `{
+               return xdgSearchableConfigDirectories(recv);
+       `}
+end
+
+private extern class ConstPointer `{ const void * `}
+       # Convert a C `char **` to a Nit `Array[String]`
+       private fun to_string_array: Array[String]
+       import Array[String], Array[String].add, NativeString.to_s `{
+               char **strings = (char**)recv;
+
+               Array_of_String aos = new_Array_of_String();
+               int p = 0;
+               while (strings[p] != NULL) {
+                       Array_of_String_add(aos, NativeString_to_s((char*)strings[p]));
+                       p ++;
+               }
+
+               return aos;
+       `}
+end
+
+# Version of XDG Base Directory specification implemented in this library.
+fun xdg_basedir_spec: Float `{ return XDG_BASEDIR_SPEC; `}
+
+# Get an instance of XdgBasedir
+fun xdg_basedir: XdgBasedir do return once new XdgBasedir
index 2ca0fb7..0fc9de9 100644 (file)
 
 NITCOPT=
 OLDNITCOPT= --no-stacktrace
+OBJS=nitdoc nitmetrics nitg nit nitx nitunit nitlight nitls nitdbg_client
+SRCS=$(patsubst %,%.nit,$(OBJS))
+BINS=$(patsubst %,../bin/%,$(OBJS))
 
-all: ../bin/nitdoc ../bin/nitmetrics ../bin/nitg ../bin/nit ../bin/nitx ../bin/nitunit ../bin/nitlight ../bin/nitls ../bin/nitdbg_client
+all: $(BINS)
 
 nitg_0: ../c_src/nitg parser/parser.nit
        @echo '***************************************************************'
-       @echo '* Compile nitg_0 from NIT source files                          *'
+       @echo '* Compile nitg_0 from NIT source files                        *'
        @echo '***************************************************************'
        ./git-gen-version.sh
        ../c_src/nitg ${OLDNITCOPT} -o nitg_0 -v nitg.nit
 
-../bin/nitg: nitg_0 parser/parser.nit
+$(BINS): nitg_0 parser/parser.nit
        @echo '***************************************************************'
-       @echo '* Compile nitg from NIT source files                          *'
+       @echo '* Compile binaries from NIT source files                      *'
        @echo '***************************************************************'
        ./git-gen-version.sh
-       ./nitg_0 ${NITCOPT} -o ../bin/nitg -v nitg.nit
+       ./nitg_0 ${NITCOPT} -v --dir ../bin $(SRCS)
 
-../bin/nitdoc: ../bin/nitg
-       @echo '***************************************************************'
-       @echo '* Compile nitdoc from NIT source files                        *'
-       @echo '***************************************************************'
-       ./git-gen-version.sh
-       ../bin/nitg ${NITCOPT} -o ../bin/nitdoc -v nitdoc.nit
-
-../bin/nitmetrics: ../bin/nitg
-       @echo '***************************************************************'
-       @echo '* Compile nitmetrics from NIT source files                     *'
-       @echo '***************************************************************'
-       ./git-gen-version.sh
-       ../bin/nitg ${NITCOPT} -o ../bin/nitmetrics -v nitmetrics.nit
-
-../bin/nit: ../bin/nitg
-       @echo '***************************************************************'
-       @echo '* Compile nit from NIT source files                           *'
-       @echo '***************************************************************'
-       ./git-gen-version.sh
-       ../bin/nitg ${NITCOPT} -o ../bin/nit -v nit.nit
-
-../bin/nitdbg_client : ../bin/nitg
-       @echo '***************************************************************'
-       @echo '* Compile nitdbg_client from NIT source files                 *'
-       @echo '***************************************************************'
-       ./git-gen-version.sh
-       ../bin/nitg ${NITCOPT} -o ../bin/nitdbg_client -v nitdbg_client.nit
-
-../bin/nitx: ../bin/nitg
-       @echo '***************************************************************'
-       @echo '* Compile nitx from NIT source files                          *'
-       @echo '***************************************************************'
-       ./git-gen-version.sh
-       ../bin/nitg ${NITCOPT} -o ../bin/nitx -v nitx.nit
-
-../bin/nitunit : ../bin/nitg
-       @echo '***************************************************************'
-       @echo '* Compile nitunit from NIT source files                       *'
-       @echo '***************************************************************'
-       ./git-gen-version.sh
-       ../bin/nitg ${NITCOPT} -o ../bin/nitunit -v nitunit.nit
-
-../bin/nitlight : ../bin/nitg
-       @echo '***************************************************************'
-       @echo '* Compile nitlight from NIT source files                      *'
-       @echo '***************************************************************'
-       ./git-gen-version.sh
-       ../bin/nitg ${NITCOPT} -o ../bin/nitlight -v nitlight.nit
-
-../bin/nitls : ../bin/nitg
-       @echo '***************************************************************'
-       @echo '* Compile nitls from NIT source files                         *'
-       @echo '***************************************************************'
+$(OBJS): nitg_0 parser/parser.nit
        ./git-gen-version.sh
-       ../bin/nitg ${NITCOPT} -o ../bin/nitls -v nitls.nit
+       ./nitg_0 ${NITCOPT} -v $@.nit
 
 ../c_src/nitg: ../c_src/*.c ../c_src/*.h ../c_src/Makefile
        @echo '***************************************************************'
index f01b3f0..a2c08de 100644 (file)
@@ -27,6 +27,8 @@ import c_tools
 redef class ToolContext
        # --output
        var opt_output: OptionString = new OptionString("Output file", "-o", "--output")
+       # --dir
+       var opt_dir: OptionString = new OptionString("Output directory", "--dir")
        # --no-cc
        var opt_no_cc: OptionBool = new OptionBool("Do not invoke C compiler", "--no-cc")
        # --no-main
@@ -67,7 +69,7 @@ redef class ToolContext
        redef init
        do
                super
-               self.option_context.add_option(self.opt_output, self.opt_no_cc, self.opt_no_main, self.opt_make_flags, self.opt_compile_dir, self.opt_hardening, self.opt_no_shortcut_range)
+               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.opt_no_shortcut_range)
                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_other)
                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)
@@ -80,15 +82,20 @@ redef class ToolContext
                super
 
                var st = opt_stacktrace.value
-               if st == null or st == "none" or st == "libunwind" or st == "nitstack" then
+               if st == "none" or st == "libunwind" or st == "nitstack" then
                        # Fine, do nothing
-               else if st == "auto" then
-                       # Default just unset
-                       opt_stacktrace.value = null
+               else if st == "auto" or st == null then
+                       # Default is nitstack
+                       opt_stacktrace.value = "nitstack"
                else
                        print "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 "Error: cannot use both --dir and --output"
+                       exit(1)
+               end
        end
 end
 
@@ -200,9 +207,8 @@ class MakefileToolchain
 
        fun write_files(compiler: AbstractCompiler, compile_dir: String, cfiles: Array[String])
        do
-               if self.toolcontext.opt_stacktrace.value == "nitstack" then compiler.build_c_to_nit_bindings
-
                var platform = compiler.mainmodule.target_platform
+               if self.toolcontext.opt_stacktrace.value == "nitstack" and (platform == null or platform.supports_libunwind) then compiler.build_c_to_nit_bindings
                var cc_opt_with_libgc = "-DWITH_LIBGC"
                if platform != null and not platform.supports_libgc then cc_opt_with_libgc = ""
 
@@ -296,11 +302,23 @@ class MakefileToolchain
 
        fun default_outname(mainmodule: MModule): String do return mainmodule.name
 
+       # Combine options and platform informations to get the final path of the outfile
+       fun outfile(mainmodule: MModule): String
+       do
+               var res = self.toolcontext.opt_output.value
+               if res != null then return res
+               res = default_outname(mainmodule)
+               var dir = self.toolcontext.opt_dir.value
+               if dir != null then return dir.join_path(res)
+               return res
+       end
+
        fun write_makefile(compiler: AbstractCompiler, compile_dir: String, cfiles: Array[String])
        do
                var mainmodule = compiler.mainmodule
+               var platform = compiler.mainmodule.target_platform
 
-               var outname = self.toolcontext.opt_output.value or else default_outname(mainmodule)
+               var outname = outfile(mainmodule)
 
                var orig_dir=".." # FIXME only works if `compile_dir` is a subdirectory of cwd
                var outpath = orig_dir.join_path(outname).simplify_path
@@ -323,7 +341,7 @@ class MakefileToolchain
                makefile.write("CC = ccache cc\nCXX = ccache c++\nCFLAGS = -g -O2 -Wno-unused-value -Wno-switch\nCINCL = {cc_includes}\nLDFLAGS ?= \nLDLIBS  ?= -lm -lgc {linker_options.join(" ")}\n\n")
 
                var ost = toolcontext.opt_stacktrace.value
-               if ost == "libunwind" or ost == "nitstack" then makefile.write("NEED_LIBUNWIND := YesPlease\n")
+               if (ost == "libunwind" or ost == "nitstack") and (platform == null or platform.supports_libunwind) then makefile.write("NEED_LIBUNWIND := YesPlease\n")
 
                # Dynamic adaptations
                # While `platform` enable complex toolchains, they are statically applied
@@ -560,7 +578,40 @@ abstract class AbstractCompiler
        protected fun compile_header_structs is abstract
 
        # Declaration of structures for nitni undelying the FFI
-       protected fun compile_nitni_structs is abstract
+       protected fun compile_nitni_structs
+       do
+               self.header.add_decl """
+/* Native reference to Nit objects */
+/* This structure is used to represent every Nit type in extern methods and custom C code. */
+struct nitni_ref {
+       struct nitni_ref *next,
+               *prev; /* adjacent global references in global list */
+       int count; /* number of time this global reference has been marked */
+};
+
+/* List of global references from C code to Nit objects */
+/* Instanciated empty at init of Nit system and filled explicitly by user in C code */
+struct nitni_global_ref_list_t {
+       struct nitni_ref *head, *tail;
+};
+extern struct nitni_global_ref_list_t *nitni_global_ref_list;
+
+/* Initializer of global reference list */
+extern void nitni_global_ref_list_init();
+
+/* Intern function to add a global reference to the list */
+extern void nitni_global_ref_add( struct nitni_ref *ref );
+
+/* Intern function to remove a global reference from the list */
+extern void nitni_global_ref_remove( struct nitni_ref *ref );
+
+/* Increase count on an existing global reference */
+extern void nitni_global_ref_incr( struct nitni_ref *ref );
+
+/* Decrease count on an existing global reference */
+extern void nitni_global_ref_decr( struct nitni_ref *ref );
+"""
+       end
 
        # Generate the main C function.
        # This function:
@@ -574,16 +625,9 @@ abstract class AbstractCompiler
                var ost = modelbuilder.toolcontext.opt_stacktrace.value
                var platform = mainmodule.target_platform
 
-               if ost == null then
-                       if platform != null and not platform.supports_libunwind then
-                               ost = "none"
-                       else
-                               ost = "nitstack"
-                       end
-                       modelbuilder.toolcontext.opt_stacktrace.value = ost
-               end
+               if platform != null and not platform.supports_libunwind then ost = "none"
 
-               if platform != null and platform.no_main then modelbuilder.toolcontext.opt_no_main.value = true
+               var no_main = (platform != null and platform.no_main) or modelbuilder.toolcontext.opt_no_main.value
 
                if ost == "nitstack" or ost == "libunwind" then
                        v.add_decl("#define UNW_LOCAL_ONLY")
@@ -661,7 +705,7 @@ abstract class AbstractCompiler
                v.add_decl("exit(signo);")
                v.add_decl("\}")
 
-               if modelbuilder.toolcontext.opt_no_main.value then
+               if no_main then
                        v.add_decl("int nit_main(int argc, char** argv) \{")
                else
                        v.add_decl("int main(int argc, char** argv) \{")
@@ -677,6 +721,9 @@ abstract class AbstractCompiler
 
                v.add("glob_argc = argc; glob_argv = argv;")
                v.add("initialize_gc_option();")
+
+               v.add "initialize_nitni_global_refs();"
+
                var main_type = mainmodule.sys_type
                if main_type != null then
                        var mainmodule = v.compiler.mainmodule
@@ -736,6 +783,67 @@ abstract class AbstractCompiler
                v.add("\}")
        end
 
+       # Copile all C functions related to the [incr|decr]_ref features of the FFI
+       fun compile_nitni_global_ref_functions
+       do
+               var v = self.new_visitor
+               v.add """
+struct nitni_global_ref_list_t *nitni_global_ref_list;
+void initialize_nitni_global_refs() {
+       nitni_global_ref_list = (struct nitni_global_ref_list_t*)nit_alloc(sizeof(struct nitni_global_ref_list_t));
+       nitni_global_ref_list->head = NULL;
+       nitni_global_ref_list->tail = NULL;
+}
+
+void nitni_global_ref_add( struct nitni_ref *ref ) {
+       if ( nitni_global_ref_list->head == NULL ) {
+               nitni_global_ref_list->head = ref;
+               ref->prev = NULL;
+       } else {
+               nitni_global_ref_list->tail->next = ref;
+               ref->prev = nitni_global_ref_list->tail;
+       }
+       nitni_global_ref_list->tail = ref;
+
+       ref->next = NULL;
+}
+
+void nitni_global_ref_remove( struct nitni_ref *ref ) {
+       if ( ref->prev == NULL ) {
+               nitni_global_ref_list->head = ref->next;
+       } else {
+               ref->prev->next = ref->next;
+       }
+
+       if ( ref->next == NULL ) {
+               nitni_global_ref_list->tail = ref->prev;
+       } else {
+               ref->next->prev = ref->prev;
+       }
+}
+
+extern void nitni_global_ref_incr( struct nitni_ref *ref ) {
+       if ( ref->count == 0 ) /* not registered */
+       {
+               /* add to list */
+               nitni_global_ref_add( ref );
+       }
+
+       ref->count ++;
+}
+
+extern void nitni_global_ref_decr( struct nitni_ref *ref ) {
+       if ( ref->count == 1 ) /* was last reference */
+       {
+               /* remove from list */
+               nitni_global_ref_remove( ref );
+       }
+
+       ref->count --;
+}
+"""
+       end
+
        # List of additional files required to compile (FFI)
        var extern_bodies = new Array[ExternFile]
 
@@ -2534,6 +2642,8 @@ redef class AAsNotnullExpr
                var i = v.expr(self.n_expr, null)
                if v.compiler.modelbuilder.toolcontext.opt_no_check_assert.value then return i
 
+               if i.mtype.ctype != "val*" then return i
+
                v.add("if (unlikely({i} == NULL)) \{")
                v.add_abort("Cast failed")
                v.add("\}")
@@ -2571,7 +2681,7 @@ redef class ASendExpr
        do
                var recv = v.expr(self.n_expr, null)
                var args = [recv]
-               for a in self.raw_arguments.as(not null) do
+               for a in self.raw_arguments do
                        args.add(v.expr(a, null))
                end
                return v.compile_callsite(self.callsite.as(not null), args)
@@ -2583,7 +2693,7 @@ redef class ASendReassignFormExpr
        do
                var recv = v.expr(self.n_expr, null)
                var args = [recv]
-               for a in self.raw_arguments.as(not null) do
+               for a in self.raw_arguments do
                        args.add(v.expr(a, null))
                end
                var value = v.expr(self.n_value, null)
@@ -2734,6 +2844,7 @@ redef class MModule
                                properties.add_all(self.properties(parent))
                        end
                        for mclassdef in mclass.mclassdefs do
+                               if not self.in_importation <= mclassdef.mmodule then continue
                                for mprop in mclassdef.intro_mproperties do
                                        properties.add(mprop)
                                end
@@ -2758,7 +2869,7 @@ var toolcontext = new ToolContext
 var opt_mixins = new OptionArray("Additionals module to min-in", "-m")
 toolcontext.option_context.add_option(opt_mixins)
 
-toolcontext.tooldescription = "Usage: nitg [OPTION]... file.nit\nCompiles Nit programs."
+toolcontext.tooldescription = "Usage: nitg [OPTION]... file.nit...\nCompiles Nit programs."
 
 # We do not add other options, so process them now!
 toolcontext.process_options(args)
@@ -2769,26 +2880,24 @@ var model = new Model
 var modelbuilder = new ModelBuilder(model, toolcontext)
 
 var arguments = toolcontext.option_context.rest
-if arguments.length > 1 then
-       print "Too much arguments: {arguments.join(" ")}"
-       print toolcontext.tooldescription
+if arguments.length > 1 and toolcontext.opt_output.value != null then
+       print "Error: --output needs a single source file. Do you prefer --dir?"
        exit 1
 end
-var progname = arguments.first
 
 # Here we load an process all modules passed on the command line
-var mmodules = modelbuilder.parse([progname])
-mmodules.add_all modelbuilder.parse(opt_mixins.value)
+var mmodules = modelbuilder.parse(arguments)
+var mixins = modelbuilder.parse(opt_mixins.value)
 
 if mmodules.is_empty then return
 modelbuilder.run_phases
 
-var mainmodule
-if mmodules.length == 1 then
-       mainmodule = mmodules.first
-else
-       mainmodule = new MModule(model, null, mmodules.first.name, mmodules.first.location)
-       mainmodule.set_imported_mmodules(mmodules)
+for mmodule in mmodules do
+       toolcontext.info("*** PROCESS {mmodule} ***", 1)
+       var ms = [mmodule]
+       if not mixins.is_empty then
+               ms.add_all mixins
+       end
+       toolcontext.run_global_phases(ms)
 end
 
-toolcontext.run_global_phases(mmodules)
index 0ae0078..cad98bd 100644 (file)
@@ -23,6 +23,7 @@ import modelbuilder
 import modelize_property
 import literal
 import typing
+private import annotation
 
 # Metadata associated to an Android project
 class AndroidProject
@@ -44,6 +45,15 @@ class AndroidProject
        # Custom lines to add to the AndroidManifest.xml in the <application> node
        var manifest_application_lines = new Array[String]
 
+       # Minimum API level required for the application to run
+       var min_api: nullable Int = null
+
+       # Build target API level
+       var target_api: nullable Int = null
+
+       # Maximum API level on which the application will be allowed to run
+       var max_api: nullable Int = null
+
        redef fun to_s do return """
 name: {{{name or else "null"}}}
 namespace: {{{java_package or else "null"}}}
@@ -65,11 +75,20 @@ redef class ModelBuilder
                annot = priority_annotation_on_modules("java_package", mmodule)
                if annot != null then project.java_package = annot.arg_as_string(self)
 
-               var annots = collect_annotations_on_modules("android_manifest", mmodule)
-               for an in annots do project.manifest_lines.add an.arg_as_string(self)
+               var annots = collect_annotations_on_modules("min_api_version", mmodule)
+               for an in annots do project.min_api = an.arg_as_int(self)
+
+               annots = collect_annotations_on_modules("max_api_version", mmodule)
+               for an in annots do project.max_api = an.arg_as_int(self)
+
+               annots = collect_annotations_on_modules("target_api_version", mmodule)
+               for an in annots do project.target_api = an.arg_as_int(self)
+
+               annots = collect_annotations_on_modules("android_manifest", mmodule)
+               for an in annots do project.manifest_lines.add an.arg_as_string(self) or else ""
 
                annots = collect_annotations_on_modules("android_manifest_application", mmodule)
-               for an in annots do project.manifest_application_lines.add an.arg_as_string(self)
+               for an in annots do project.manifest_application_lines.add an.arg_as_string(self) or else ""
 
                # Get the date and time (down to the minute) as string
                var local_time = new Tm.localtime
@@ -133,34 +152,6 @@ redef class ModelBuilder
 end
 
 redef class AAnnotation
-       # Get the single argument of `self` as a `String`. Raise error on any inconsistency.
-       private fun arg_as_string(modelbuilder: ModelBuilder): String
-       do
-               var annotation_name = n_atid.n_id.text
-               var format_error = "Annotation error: \"{annotation_name}\" expects a single String as argument."
-
-               var args = n_args
-               var platform_name
-               if args.length != 1 then
-                       modelbuilder.error(self, format_error)
-                       return ""
-               else
-                       var arg = args.first
-                       
-                       if not arg isa AExprAtArg then
-                               modelbuilder.error(self, format_error)
-                               return ""
-                       end
-
-                       var expr = arg.n_expr
-                       if not expr isa AStringFormExpr then
-                               modelbuilder.error(self, format_error)
-                               return ""
-                       end
-                       return expr.value.as(not null)
-               end
-       end
-
        # Returns a version string (example: "1.5.6b42a7c") from an annotation `version(1, 5, git_revision)`.
        #
        # The user can enter as many fields as needed. The call to `git_revision` will be replaced by the short
@@ -173,33 +164,26 @@ redef class AAnnotation
                var args = n_args
                var platform_name
                if args.length < 1 then
-                       modelbuilder.error(self, "Annotation error: \"{annotation_name}\" expects at least a single argument.")
+                       modelbuilder.error(self, "Annotation error: \"{name}\" expects at least a single argument.")
                        return ""
                else
                        for arg in args do
-                               var format_error = "Annotation error: \"{annotation_name}\" expects its arguments to be of type Int or a call to `git_revision`"
+                               var format_error = "Annotation error: \"{name}\" expects its arguments to be of type Int or a call to `git_revision`"
                                
-                               if not arg isa AExprAtArg then
-                                       modelbuilder.error(self, format_error)
-                                       return ""
+                               var value
+                               value = arg.as_int
+                               if value != null then
+                                       version_fields.add value
+                                       continue
                                end
 
-                               var expr = arg.n_expr
-                               if expr isa AIntExpr then
-                                       var value = expr.value
-                                       assert value != null
+                               value = arg.as_string
+                               if value != null then
                                        version_fields.add value
-                               else if expr isa AStringFormExpr then
-                                       version_fields.add expr.value.as(not null)
-                               else if expr isa ACallExpr then
-                                       # We support calls to "git" only
-                                       var exec_args = expr.n_args.to_a
-                                       if expr.n_id.text != "git_revision" or not exec_args.is_empty then
-                                               modelbuilder.error(self,
-                                                       "Annotation error: \"{annotation_name}\" accepts only calls to `git_revision` with the command as arguments.")
-                                               return ""
-                                       end
+                               end
 
+                               value = arg.as_id
+                               if value == "git_revision" then
                                        # Get Git short revision
                                        var proc = new IProcess("git", "rev-parse", "--short", "HEAD")
                                        proc.wait
@@ -215,10 +199,11 @@ redef class AAnnotation
                                        if dirty then revision += ".d"
 
                                        version_fields.add revision
-                               else
-                                       modelbuilder.error(self, format_error)
-                                       return ""
+                                       continue
                                end
+
+                               modelbuilder.error(self, format_error)
+                               return ""
                        end
                end
 
index ff8ca4c..7de42f4 100644 (file)
@@ -1,4 +1,3 @@
-# This file is part of NIT ( http://www.nitlanguage.org )
 #
 # Copyright 2014 Alexis Laferrière <alexis.laf@xymus.net>
 #
@@ -50,6 +49,8 @@ class AndroidToolchain
                return "{android_project_root}/jni/nit_compile/"
        end
 
+       redef fun default_outname(mainmodule) do return "{mainmodule.name}.apk"
+
        redef fun write_files(compiler, compile_dir, cfiles)
        do
                var android_project_root = android_project_root.as(not null)
@@ -66,6 +67,15 @@ class AndroidToolchain
                var app_version = project.version
                if app_version == null then app_version = "1.0"
 
+               var app_min_api = project.min_api
+               if app_min_api == null then app_min_api = 10
+
+               var app_target_api = project.target_api
+               if app_target_api == null then app_target_api = app_min_api
+
+               var app_max_api = ""
+               if project.max_api != null then app_max_api = "android:maxSdkVersion=\"{project.max_api.as(not null)}\""
+
                # Clear the previous android project, so there is no "existing project warning"
                # or conflict between Java files of different projects
                if android_project_root.file_exists then android_project_root.rmdir
@@ -73,7 +83,7 @@ class AndroidToolchain
                var args = ["android", "-s",
                        "create", "project",
                        "--name", short_project_name,
-                       "--target", "android-10",
+                       "--target", "android-{app_target_api}",
                        "--path", android_project_root,
                        "--package", app_package,
                        "--activity", short_project_name]
@@ -128,7 +138,10 @@ $(call import-module,android/native_app_glue)
         android:versionName="{{{app_version}}}">
 
     <!-- This is the platform API where NativeActivity was introduced. -->
-    <uses-sdk android:minSdkVersion="9" />
+    <uses-sdk 
+        android:minSdkVersion="{{{app_min_api}}}" 
+        android:targetSdkVersion="{{{app_target_api}}}" 
+        {{{app_max_api}}} /> 
 
     <application
                android:label="@string/app_name"
@@ -161,17 +174,6 @@ $(call import-module,android/native_app_glue)
 <!-- END_INCLUDE(manifest) -->
                """.write_to_file("{dir}/AndroidManifest.xml")
 
-               ### generate res/values/strings.xml
-               dir = "{android_project_root}/res/"
-               if not dir.file_exists then dir.mkdir
-               dir = "{dir}/values/"
-               if not dir.file_exists then dir.mkdir
-               """<?xml version="1.0" encoding="utf-8"?>
-<resources>
-    <string name="app_name">{{{app_name}}}</string>
-</resources>
-               """.write_to_file("{dir}/strings.xml")
-
                ### Link to png sources
                # libpng is not available on Android NDK
                # FIXME make obtionnal when we have alternatives to mnit
@@ -204,6 +206,26 @@ $(call import-module,android/native_app_glue)
                                toolcontext.exec_and_check(["ln", "-s", assets_dir, target_assets_dir], "Android project error")
                        end
                end
+               
+               ### copy resources  (for android)
+               # This will be accessed from `android_project_root`
+               var res_dir
+               if compiler.mainmodule.location.file != null then
+                       # it is a real file, use "{file}/../res"
+                       res_dir = "{compiler.mainmodule.location.file.filename.dirname}/../res"
+               else
+                       # probably used -m, use "."
+                       res_dir = "res"
+               end
+               if res_dir.file_exists then
+                       res_dir = res_dir.realpath
+                       var target_res_dir = "{android_project_root}"
+                       if target_res_dir.file_exists then
+                               # copy the res folder to .nit_compile
+                               toolcontext.exec_and_check(["cp", "-R", res_dir, target_res_dir], "Android project error")
+                       end
+               end
+
        end
 
        redef fun write_makefile(compiler, compile_dir, cfiles)
@@ -227,8 +249,7 @@ $(call import-module,android/native_app_glue)
                toolcontext.exec_and_check(args, "Android project error")
 
                # Move the apk to the target
-               var outname = toolcontext.opt_output.value
-               if outname == null then outname = "{compiler.mainmodule.name}.apk"
+               var outname = outfile(compiler.mainmodule)
 
                var src_apk_suffix
                if release then
diff --git a/src/annotation.nit b/src/annotation.nit
new file mode 100644 (file)
index 0000000..4daafef
--- /dev/null
@@ -0,0 +1,90 @@
+# 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.
+
+# Management and utilities on annotations
+module annotation
+
+import parser
+import modelbuilder
+import literal
+
+redef class AAnnotation
+       # The name of the annotation
+       fun name: String
+       do
+               return n_atid.n_id.text
+       end
+
+       # Get the single argument of `self` as a `String`.
+       # Raise error and return null on any inconsistency.
+       fun arg_as_string(modelbuilder: ModelBuilder): nullable String
+       do
+               var args = n_args
+               if args.length == 1 then
+                       var arg = args.first.as_string
+                       if arg != null then return arg
+               end
+
+               modelbuilder.error(self, "Annotation error: \"{name}\" expects a single String as argument.")
+               return null
+       end
+
+       # Get the single argument of `self` as an `Int`.
+       # Raise error and return null on any inconsistency.
+       fun arg_as_int(modelbuilder: ModelBuilder): nullable Int
+       do
+               var args = n_args
+               if args.length == 1 then
+                       var arg = args.first.as_int
+                       if arg != null then return arg
+               end
+
+               modelbuilder.error(self, "Annotation error: \"{name}\" expects a single Int as argument.")
+               return null
+       end
+end
+
+redef class AAtArg
+       # Get `self` as a `String`.
+       # Return null if not a string.
+       fun as_string: nullable String
+       do
+               if not self isa AExprAtArg then return null
+               var nexpr = n_expr
+               if not nexpr isa AStringFormExpr then return null
+               return nexpr.value.as(not null)
+       end
+
+       # Get `self` as an `Int`.
+       # Return null if not an integer.
+       fun as_int: nullable Int
+       do
+               if not self isa AExprAtArg then return null
+               var nexpr = n_expr
+               if not nexpr isa AIntExpr then return null
+               return nexpr.value.as(not null)
+       end
+
+       # Get `self` as a single identifier.
+       # Return null if not a single identifier.
+       fun as_id: nullable String
+       do
+               if not self isa AExprAtArg then return null
+               var nexpr = n_expr
+               if not nexpr isa ACallExpr then return null
+               if not nexpr.n_expr isa AImplicitSelfExpr then return null
+               if not nexpr.n_args.n_exprs.is_empty then return null
+               return nexpr.n_id.text
+       end
+end
index 1ca9256..ead285f 100644 (file)
@@ -21,6 +21,7 @@ module cached
 import modelize_property
 import parser_util
 import simple_misc_analysis
+private import annotation
 
 redef class ToolContext
        var cached_phase: Phase = new CachedPhase(self, [modelize_property_phase])
@@ -41,7 +42,7 @@ private class CachedPhase
        redef fun process_annotated_node(npropdef, nat)
        do
                # Skip if we are not interested
-               if nat.n_atid.n_id.text != "cached" then return
+               if nat.name != "cached" then return
 
                # Do some validity checks and print errors if the annotation is used incorrectly
                var modelbuilder = toolcontext.modelbuilder
index 65b1a22..4e4402c 100644 (file)
@@ -41,7 +41,7 @@ class CLanguage
 
        redef fun compile_extern_method(block, m, ecc, mmodule)
        do
-               var fc = new ExternCFunction(m, mmodule.as(not null))
+               var fc = new ExternCFunction(m, mmodule)
                fc.decls.add( block.location.as_line_pragma )
                fc.exprs.add( block.code )
                ecc.add_exported_function( fc )
index ca64759..7717973 100644 (file)
@@ -21,6 +21,7 @@ module c_compiler_options
 
 import c
 import cpp
+private import annotation
 
 redef class ToolContext
        var c_compiler_options_phase: Phase = new CCompilerOptionsPhase(self, null)
@@ -36,7 +37,7 @@ private class CCompilerOptionsPhase
        redef fun process_annotated_node(nmoduledecl, nat)
        do
                # Skip if we are not interested
-               var annotation_name = nat.n_atid.n_id.text
+               var annotation_name = nat.name
                if annotation_name != compiler_annotation_name and
                   annotation_name != linker_annotation_name and
                   annotation_name != cpp_compiler_annotation_name then return
index c22180c..302c472 100644 (file)
@@ -24,7 +24,7 @@ import modelbuilder
 
 import nitni
 
-import ffi_base
+intrude import ffi_base
 import extern_classes
 import header_dependency
 import pkgconfig
@@ -63,6 +63,11 @@ redef class MModule
                ffi_ccu.write_as_impl(self, compdir)
                for filename in ffi_ccu.files do ffi_files.add(new ExternCFile(filename, c_compiler_options))
        end
+
+       # Avoid the compile a ffi propdef more than once
+       # See `AMethPropdef::compile_ffi_method`
+       # FIXME find a better way
+       private var compiled_ffi_methods = new HashSet[AMethPropdef]
 end
 
 redef class AModule
@@ -110,15 +115,13 @@ redef class AModule
 end
 
 redef class AMethPropdef
-       private var ffi_has_been_compiled = false
-
        # Compile the necessary wrapper around this extern method or constructor
        fun compile_ffi_method(mmodule: MModule)
        do
                assert n_extern_code_block != null
 
-               if ffi_has_been_compiled then return
-               ffi_has_been_compiled = true
+               if mmodule.compiled_ffi_methods.has(self) then return
+               mmodule.compiled_ffi_methods.add self
 
                var language = n_extern_code_block.language
                assert language != null
index 632a322..67a5f9d 100644 (file)
@@ -21,6 +21,7 @@ module extra_java_files
 
 import literal
 import java
+private import annotation
 
 redef class ToolContext
        var extra_java_files_phase: Phase = new JavaExtraFilesPhase(self, [literal_phase])
@@ -38,7 +39,7 @@ private class JavaExtraFilesPhase
        do
                # Skip if we are not interested
                var annot_name = "extra_java_files"
-               if nat.n_atid.n_id.text != annot_name then return
+               if nat.name != annot_name then return
 
                # Do some validity checks and print errors if the annotation is used incorrectly
                var modelbuilder = toolcontext.modelbuilder
@@ -65,20 +66,12 @@ private class JavaExtraFilesPhase
 
                var format_error = "Syntax error: \"{annot_name}\" expects its arguments to be paths to java files."
                for arg in args do
-                       if not arg isa AExprAtArg then
-                               modelbuilder.error(nat, format_error)
+                       var path = arg.as_string
+                       if path == null then
+                               modelbuilder.error(arg, format_error)
                                return
                        end
 
-                       var expr = arg.n_expr
-                       if not expr isa AStringFormExpr then
-                               modelbuilder.error(nat, format_error)
-                               return
-                       end
-
-                       var path = expr.value
-                       assert path != null
-
                        # Append specified path to directory of the Nit source file
                        var source_file = nat.location.file
                        if source_file != null then path = "{source_file.filename.dirname}/{path}"
index f6e44f7..2e499d3 100644 (file)
@@ -487,7 +487,27 @@ redef class MClassType
        redef fun jni_format
        do
                var ftype = mclass.ftype
-               if ftype isa ForeignJavaType then return "L{ftype.java_type.replace('.', "/").replace(' ', "").replace('\n', "")};"
+               if ftype isa ForeignJavaType then
+                       var ori_jni_type = jni_type
+                       var jni_type = ftype.java_type.
+                               replace('.', "/").replace(' ', "").replace('\n', "")
+
+                       # Remove parameters of generic types
+                       loop
+                               var i = jni_type.last_index_of('<')
+                               if i >= 0 then
+                                       var j = jni_type.index_of_from('>', i)
+                                       if j == -1 then
+                                               print "Error: missing closing '>' in extern Java type of \"{mclass.name}\""
+                                               exit 1
+                                       end
+                                       jni_type = jni_type.substring(0, i) +
+                                               jni_type.substring(j+1, jni_type.length)
+                               else break
+                       end
+
+                       return "L{jni_type};"
+               end
                if mclass.name == "Bool" then return "Z"
                if mclass.name == "Char" then return "C"
                if mclass.name == "Int" then return "I"
index b263834..5306b97 100644 (file)
 module pkgconfig
 
 import c
+private import annotation
 
 redef class ToolContext
-       var pkgconfig_phase: Phase = new PkgconfigPhase(self, null)
+       var pkgconfig_phase: Phase = new PkgconfigPhase(self, [literal_phase])
 end
 
 # Detects the `pkgconfig` annotation on the module declaration only.
@@ -31,7 +32,7 @@ class PkgconfigPhase
        redef fun process_annotated_node(nmoduledecl, nat)
        do
                # Skip if we are not interested
-               if nat.n_atid.n_id.text != "pkgconfig" then return
+               if nat.name != "pkgconfig" then return
 
                # Do some validity checks and print errors if the annotation is used incorrectly
                var modelbuilder = toolcontext.modelbuilder
@@ -49,19 +50,12 @@ class PkgconfigPhase
 
                var pkgs = new Array[String]
                for arg in args do
-                       if not arg isa AExprAtArg then
+                       var pkg = arg.as_string
+                       if pkg == null then
                                modelbuilder.error(nat, "Syntax error: \"pkgconfig\" expects its arguments to be the name of the package as String literals.")
                                return
                        end
 
-                       var expr = arg.n_expr
-                       if not expr isa AStringFormExpr then
-                               modelbuilder.error(nat, "Syntax error: \"pkgconfig\" expects its arguments to be the name of the package as String literals.")
-                               return
-                       end
-
-                       var pkg = expr.collect_text
-                       pkg = pkg.substring(1, pkg.length-2)
                        pkgs.add(pkg)
                end
 
index 2ebf76d..9a83ba4 100644 (file)
@@ -45,12 +45,25 @@ redef class MModule
                ensure_compile_nitni_base(v)
 
                nitni_ccu.header_c_types.add("#include \"{name}._ffi.h\"\n")
+               nitni_ccu.header_c_types.add """
+extern void nitni_global_ref_incr(void*);
+extern void nitni_global_ref_decr(void*);
+"""
 
                nitni_ccu.write_as_nitni(self, v.compiler.modelbuilder.compile_dir)
 
                for file in nitni_ccu.files do
                        v.compiler.extern_bodies.add(new ExternCFile(file, c_compiler_options))
                end
+
+               # reset FFI things so the next compilation job, if any, starts with a clean context
+               # FIXME clean and rationalize this
+               nitni_ccu = null
+               compiled_ffi_methods.clear
+               ffi_ccu = null
+               ffi_files.clear
+               compiled_callbacks.clear
+               #Do not reset `foreign_callbacks` and `ffi_callbacks` because they are computed in previous phases
        end
 
        private fun ensure_compile_nitni_base(v: AbstractCompilerVisitor)
@@ -169,7 +182,7 @@ redef class AMethPropdef
                                arguments_for_c.add(arg.name)
                        else
                                v.add("struct nitni_instance* var_for_c_{a};")
-                               v.add("var_for_c_{a} = malloc(sizeof(struct nitni_instance));")
+                               v.add("var_for_c_{a} = nit_alloc(sizeof(struct nitni_instance));")
                                v.add("var_for_c_{a}->value = {arg.name};")
                                arguments_for_c.add("var_for_c_{a}")
                        end
@@ -226,7 +239,7 @@ redef class AMethPropdef
                                arguments_for_c.add(arg.name)
                        else
                                v.add("struct nitni_instance* var_for_c_{a};")
-                               v.add("var_for_c_{a} = malloc(sizeof(struct nitni_instance));")
+                               v.add("var_for_c_{a} = nit_alloc(sizeof(struct nitni_instance));")
                                v.add("var_for_c_{a}->value = {arg.name};")
                                arguments_for_c.add("var_for_c_{a}")
                        end
@@ -261,6 +274,12 @@ redef class CCompilationUnit
        end
 end
 
+redef class AbstractCompiler
+       # Cache to avoid multiple compilation of NULL values
+       # see FIXME in `MNullableType#compile_extern_helper_functions`
+       private var compiled_null_types = new Array[MNullableType]
+end
+
 redef class AbstractCompilerVisitor
        # Create a `RuntimeVariable` for this C variable originating from C user code
        private fun var_from_c(name: String, mtype: MType): RuntimeVariable
@@ -279,7 +298,7 @@ redef class AbstractCompilerVisitor
                        add("return {src};")
                else
                        add("struct nitni_instance* ret_for_c;")
-                       add("ret_for_c = malloc(sizeof(struct nitni_instance));")
+                       add("ret_for_c = nit_alloc(sizeof(struct nitni_instance));")
                        add("ret_for_c->value = {src};")
                        add("return ret_for_c;")
                end
@@ -301,14 +320,17 @@ redef class MType
        private fun compile_extern_helper_functions(v: AbstractCompilerVisitor, ccu: CCompilationUnit)
        do
                # actually, we do not need to do anything when using the bohem garbage collector
+               var call_context = from_c_call_context
 
                # incr_ref
-               var nitni_visitor = v.compiler.new_visitor
-               ccu.header_decl.add("#define {mangled_cname}_incr_ref(from) while(0)\{\}\n")
-
-               # incr_ref
-               nitni_visitor = v.compiler.new_visitor
-               ccu.header_decl.add("#define {mangled_cname}_decr_ref(from) while(0)\{\}\n")
+               ccu.header_decl.add "#ifndef {mangled_cname}_incr_ref\n"
+               ccu.header_decl.add "   #define {mangled_cname}_incr_ref(from) nitni_global_ref_incr(({call_context.name_mtype(self)})(from))\n"
+               ccu.header_decl.add "#endif\n"
+
+               # decr_ref
+               ccu.header_decl.add "#ifndef {mangled_cname}_decr_ref\n"
+               ccu.header_decl.add "   #define {mangled_cname}_decr_ref(from) nitni_global_ref_decr(({call_context.name_mtype(self)})(from))\n"
+               ccu.header_decl.add "#endif\n"
        end
 end
 
@@ -330,8 +352,8 @@ redef class MNullableType
                # FIXME: This is ugly an broke the separate compilation principle
                # The real function MUST be compiled only once, #define pragma only protect the compiler, not the loader
                # However, I am not sure of the right approach here (eg. week refs are ugly)
-               if is_already_compiled then return
-               is_already_compiled = true
+               if v.compiler.compiled_null_types.has(self) then return
+               v.compiler.compiled_null_types.add self
 
                # Internally, implement internal function
                var nitni_visitor = v.compiler.new_visitor
@@ -339,13 +361,11 @@ redef class MNullableType
                var full_internal_csignature = "{cname_blind} {full_cname}()"
                nitni_visitor.add("{full_internal_csignature} \{")
                nitni_visitor.add("struct nitni_instance* ret_for_c;")
-               nitni_visitor.add("ret_for_c = malloc(sizeof(struct nitni_instance));")
+               nitni_visitor.add("ret_for_c = nit_alloc(sizeof(struct nitni_instance));")
                nitni_visitor.add("ret_for_c->value = NULL;")
                nitni_visitor.add("return ret_for_c;")
                nitni_visitor.add("\}")
        end
-
-       private var is_already_compiled = false # FIXME to remove, show above
 end
 
 redef class MExplicitCall
index 1c39a2f..9080dbf 100644 (file)
@@ -16,7 +16,6 @@
 module doc_model
 
 import model_utils
-import modelize_property
 import markdown
 import doc_templates
 import ordered_tree
@@ -221,9 +220,6 @@ redef class MGroup
 end
 
 redef class MModule
-       # Is the mmodule created by nitdoc for internal purpose?
-       var is_fictive: Bool writable = false
-
        redef fun nitdoc_name do return name.html_escape
 
        redef fun nitdoc_id do
index a2f7b5e..a49b76d 100644 (file)
 # Nitdoc page generation
 module doc_pages
 
+import toolcontext
 import doc_model
 
-# The NitdocContext contains all the knowledge used for doc generation
-class NitdocContext
+redef class ToolContext
        private var opt_dir = new OptionString("output directory", "-d", "--dir")
        private var opt_source = new OptionString("link for source (%f for filename, %l for first line, %L for last line)", "--source")
        private var opt_sharedir = new OptionString("directory containing nitdoc assets", "--sharedir")
@@ -38,14 +38,13 @@ class NitdocContext
        private var opt_piwik_tracker = new OptionString("Piwik tracker URL (ex: nitlanguage.org/piwik/)", "--piwik-tracker")
        private var opt_piwik_site_id = new OptionString("Piwik site ID", "--piwik-site-id")
 
-       private var toolcontext = new ToolContext
-       private var mbuilder: ModelBuilder
-       private var mainmodule: MModule
        private var output_dir: String
        private var min_visibility: MVisibility
 
-       init do
-               var opts = toolcontext.option_context
+       redef init do
+               super
+
+               var opts = option_context
                opts.add_option(opt_dir, opt_source, opt_sharedir, opt_shareurl, opt_nodot, opt_private)
                opts.add_option(opt_custom_title, opt_custom_footer, opt_custom_intro, opt_custom_brand)
                opts.add_option(opt_github_upstream, opt_github_base_sha1, opt_github_gitdir)
@@ -54,19 +53,25 @@ class NitdocContext
                var tpl = new Template
                tpl.add "Usage: nitdoc [OPTION]... <file.nit>...\n"
                tpl.add "Generates HTML pages of API documentation from Nit source files."
-               toolcontext.tooldescription = tpl.write_to_string
-               toolcontext.process_options(args)
-
-               self.process_options
-               self.parse(toolcontext.option_context.rest)
+               tooldescription = tpl.write_to_string
        end
 
-       private fun process_options do
+       redef fun process_options(args) do
+               super
+
+               # output dir
+               var output_dir = opt_dir.value
+               if output_dir == null then
+                       output_dir = "doc"
+               end
+               self.output_dir = output_dir
+               # min visibility
                if opt_private.value then
                        min_visibility = none_visibility
                else
                        min_visibility = protected_visibility
                end
+               # github urls
                var gh_upstream = opt_github_upstream.value
                var gh_base_sha = opt_github_base_sha1.value
                var gh_gitdir = opt_github_gitdir.value
@@ -77,23 +82,21 @@ class NitdocContext
                        end
                end
        end
+end
 
-       private fun parse(arguments: Array[String]) do
-               var model = new Model
-               mbuilder = new ModelBuilder(model, toolcontext)
-               var mmodules = mbuilder.parse(arguments)
-               if mmodules.is_empty then return
-               mbuilder.run_phases
-               if mmodules.length == 1 then
-                       mainmodule = mmodules.first
-               else
-                       mainmodule = new MModule(model, null, "<main>", new Location(null, 0, 0, 0, 0))
-                       mainmodule.is_fictive = true
-                       mainmodule.set_imported_mmodules(mmodules)
-               end
+# The Nitdoc class explores the model and generate pages for each mentities found
+class Nitdoc
+       var model: Model
+       var mainmodule: MModule
+       var ctx: ToolContext
+
+       init(ctx: ToolContext, model: Model, mainmodule: MModule) do
+               self.ctx = ctx
+               self.model = model
+               self.mainmodule = mainmodule
        end
 
-       fun generate_nitdoc do
+       fun generate do
                init_output_dir
                overview
                search
@@ -105,18 +108,13 @@ class NitdocContext
        end
 
        private fun init_output_dir do
-               # location output dir
-               var output_dir = opt_dir.value
-               if output_dir == null then
-                       output_dir = "doc"
-               end
-               self.output_dir = output_dir
                # create destination dir if it's necessary
+               var output_dir = ctx.output_dir
                if not output_dir.file_exists then output_dir.mkdir
                # locate share dir
-               var sharedir = opt_sharedir.value
+               var sharedir = ctx.opt_sharedir.value
                if sharedir == null then
-                       var dir = toolcontext.nit_dir
+                       var dir = ctx.nit_dir
                        if dir == null then
                                print "Error: Cannot locate nitdoc share files. Uses --sharedir or envvar NIT_DIR"
                                abort
@@ -128,7 +126,7 @@ class NitdocContext
                        end
                end
                # copy shared files
-               if opt_shareurl.value == null then
+               if ctx.opt_shareurl.value == null then
                        sys.system("cp -r {sharedir.to_s}/* {output_dir.to_s}/")
                else
                        sys.system("cp -r {sharedir.to_s}/resources/ {output_dir.to_s}/resources/")
@@ -137,49 +135,49 @@ class NitdocContext
        end
 
        private fun overview do
-               var overviewpage = new NitdocOverview(self)
-               overviewpage.render.write_to_file("{output_dir.to_s}/index.html")
+               var overviewpage = new NitdocOverview(ctx, model, mainmodule)
+               overviewpage.render.write_to_file("{ctx.output_dir.to_s}/index.html")
        end
 
        private fun search do
-               var searchpage = new NitdocSearch(self)
-               searchpage.render.write_to_file("{output_dir.to_s}/search.html")
+               var searchpage = new NitdocSearch(ctx, model, mainmodule)
+               searchpage.render.write_to_file("{ctx.output_dir.to_s}/search.html")
        end
 
        private fun groups do
-               for mproject in mbuilder.model.mprojects do
+               for mproject in model.mprojects do
                        for mgroup in mproject.mgroups.to_a do
-                               var page = new NitdocGroup(mgroup, self)
-                               page.render.write_to_file("{output_dir.to_s}/{mgroup.nitdoc_url}")
+                               var page = new NitdocGroup(ctx, model, mainmodule, mgroup)
+                               page.render.write_to_file("{ctx.output_dir.to_s}/{mgroup.nitdoc_url}")
                        end
                end
        end
 
        private fun modules do
-               for mmodule in mbuilder.model.mmodules do
-                       if mmodule.name == "<main>" then continue
-                       var modulepage = new NitdocModule(mmodule, self)
-                       modulepage.render.write_to_file("{output_dir.to_s}/{mmodule.nitdoc_url}")
+               for mmodule in model.mmodules do
+                       if mmodule.is_fictive then continue
+                       var modulepage = new NitdocModule(ctx, model, mainmodule, mmodule)
+                       modulepage.render.write_to_file("{ctx.output_dir.to_s}/{mmodule.nitdoc_url}")
                end
        end
 
        private fun classes do
-               for mclass in mbuilder.model.mclasses do
-                       var classpage = new NitdocClass(mclass, self)
-                       classpage.render.write_to_file("{output_dir.to_s}/{mclass.nitdoc_url}")
+               for mclass in model.mclasses do
+                       var classpage = new NitdocClass(ctx, model, mainmodule, mclass)
+                       classpage.render.write_to_file("{ctx.output_dir.to_s}/{mclass.nitdoc_url}")
                end
        end
 
        private fun properties do
-               for mproperty in mbuilder.model.mproperties do
-                       var page = new NitdocProperty(mproperty, self)
-                       page.render.write_to_file("{output_dir.to_s}/{mproperty.nitdoc_url}")
+               for mproperty in model.mproperties do
+                       var page = new NitdocProperty(ctx, model, mainmodule, mproperty)
+                       page.render.write_to_file("{ctx.output_dir.to_s}/{mproperty.nitdoc_url}")
                end
        end
 
        private fun quicksearch_list do
-               var quicksearch = new QuickSearch(self)
-               quicksearch.render.write_to_file("{output_dir.to_s}/quicksearch-list.js")
+               var quicksearch = new QuickSearch(ctx, model)
+               quicksearch.render.write_to_file("{ctx.output_dir.to_s}/quicksearch-list.js")
        end
 end
 
@@ -196,16 +194,16 @@ class QuickSearch
        private var mclasses = new HashSet[MClass]
        private var mpropdefs = new HashMap[String, Set[MPropDef]]
 
-       init(ctx: NitdocContext) do
-               for mmodule in ctx.mbuilder.model.mmodules do
-                       if mmodule.name == "<main>" then continue
+       init(ctx: ToolContext, model: Model) do
+               for mmodule in model.mmodules do
+                       if mmodule.is_fictive then continue
                        mmodules.add mmodule
                end
-               for mclass in ctx.mbuilder.model.mclasses do
+               for mclass in model.mclasses do
                        if mclass.visibility < ctx.min_visibility then continue
                        mclasses.add mclass
                end
-               for mproperty in ctx.mbuilder.model.mproperties do
+               for mproperty in model.mproperties do
                        if mproperty.visibility < ctx.min_visibility then continue
                        if mproperty isa MAttribute then continue
                        if not mpropdefs.has_key(mproperty.name) then
@@ -246,13 +244,15 @@ end
 # Define page structure and properties
 abstract class NitdocPage
 
-       private var ctx: NitdocContext
+       private var ctx: ToolContext
        private var model: Model
+       private var mainmodule: MModule
        private var name_sorter = new MEntityNameSorter
 
-       init(ctx: NitdocContext) do
+       init(ctx: ToolContext, model: Model, mainmodule: MModule) do
                self.ctx = ctx
-               self.model = ctx.mbuilder.model
+               self.model = model
+               self.mainmodule = mainmodule
        end
 
        # Render the page as a html template
@@ -382,7 +382,7 @@ abstract class NitdocPage
                article.content = mmodule.tpl_definition
                # mclassdefs list
                var intros = mmodule.intro_mclassdefs(ctx.min_visibility).to_a
-               ctx.mainmodule.linearize_mclassdefs(intros)
+               mainmodule.linearize_mclassdefs(intros)
                var intros_art = new TplArticle.with_title("{mmodule.nitdoc_id}_intros", "Introduces")
                var intros_lst = new TplList.with_classes(["list-unstyled", "list-labeled"])
                for mclassdef in intros do
@@ -393,7 +393,7 @@ abstract class NitdocPage
                        article.add_child intros_art
                end
                var redefs = mmodule.redef_mclassdefs(ctx.min_visibility).to_a
-               ctx.mainmodule.linearize_mclassdefs(redefs)
+               mainmodule.linearize_mclassdefs(redefs)
                var redefs_art = new TplArticle.with_title("{mmodule.nitdoc_id}_redefs", "Redefines")
                var redefs_lst = new TplList.with_classes(["list-unstyled", "list-labeled"])
                for mclassdef in redefs do
@@ -415,7 +415,7 @@ abstract class NitdocPage
                        intro_article.source_link = tpl_showsource(mclass.intro.location)
                        article.add_child intro_article
                end
-               ctx.mainmodule.linearize_mclassdefs(mclassdefs)
+               mainmodule.linearize_mclassdefs(mclassdefs)
                for mclassdef in mclassdefs do
                        # add mclassdef full description
                        var redef_article = mclassdef.tpl_article
@@ -461,7 +461,7 @@ abstract class NitdocPage
                        intro_article.source_link = tpl_showsource(mproperty.intro.location)
                        article.add_child intro_article
                end
-               ctx.mainmodule.linearize_mpropdefs(mpropdefs)
+               mainmodule.linearize_mpropdefs(mpropdefs)
                for mpropdef in mpropdefs do
                        # add mpropdef description
                        var redef_article = mpropdef.tpl_article
@@ -485,8 +485,6 @@ end
 class NitdocOverview
        super NitdocPage
 
-       init(ctx: NitdocContext) do super(ctx)
-
        private var page = new TplPage
        redef fun tpl_page do return page
 
@@ -544,8 +542,6 @@ end
 class NitdocSearch
        super NitdocPage
 
-       init(ctx: NitdocContext) do super(ctx)
-
        private var page = new TplPage
        redef fun tpl_page do return page
 
@@ -587,8 +583,8 @@ class NitdocSearch
        # Extract mmodule list to display (sorted by name)
        private fun modules_list: Array[MModule] do
                var sorted = new Array[MModule]
-               for mmodule in ctx.mbuilder.model.mmodule_importation_hierarchy do
-                       if mmodule.name == "<main>" then continue
+               for mmodule in model.mmodule_importation_hierarchy do
+                       if mmodule.is_fictive then continue
                        sorted.add mmodule
                end
                name_sorter.sort(sorted)
@@ -598,7 +594,7 @@ class NitdocSearch
        # Extract mclass list to display (sorted by name)
        private fun classes_list: Array[MClass] do
                var sorted = new Array[MClass]
-               for mclass in ctx.mbuilder.model.mclasses do
+               for mclass in model.mclasses do
                        if mclass.visibility < ctx.min_visibility then continue
                        sorted.add mclass
                end
@@ -609,7 +605,7 @@ class NitdocSearch
        # Extract mproperty list to display (sorted by name)
        private fun mprops_list: Array[MProperty] do
                var sorted = new Array[MProperty]
-               for mproperty in ctx.mbuilder.model.mproperties do
+               for mproperty in model.mproperties do
                        if mproperty.visibility < ctx.min_visibility then continue
                        if mproperty isa MAttribute then continue
                        sorted.add mproperty
@@ -630,10 +626,9 @@ class NitdocGroup
        private var intros: Set[MClass]
        private var redefs: Set[MClass]
 
-       init(mgroup: MGroup, ctx: NitdocContext) do
+       init(ctx: ToolContext, model: Model, mainmodule: MModule, mgroup: MGroup) do
+               super
                self.mgroup = mgroup
-               super(ctx)
-
                self.concerns = model.concerns_tree(mgroup.collect_mmodules)
                self.concerns.sort_with(new MConcernRankSorter)
                self.intros = mgroup.in_nesting_intro_mclasses(ctx.min_visibility)
@@ -760,10 +755,10 @@ class NitdocModule
        private var mclasses2mdefs: Map[MClass, Set[MClassDef]]
        private var mmodules2mclasses: Map[MModule, Set[MClass]]
 
-       init(mmodule: MModule, ctx: NitdocContext) do
-               self.mmodule = mmodule
-               super(ctx)
 
+       init(ctx: ToolContext, model: Model, mainmodule: MModule, mmodule: MModule) do
+               super
+               self.mmodule = mmodule
                var mclassdefs = new HashSet[MClassDef]
                mclassdefs.add_all mmodule.intro_mclassdefs(ctx.min_visibility)
                mclassdefs.add_all mmodule.redef_mclassdefs(ctx.min_visibility)
@@ -1004,9 +999,9 @@ class NitdocClass
        private var mprops2mdefs: Map[MProperty, Set[MPropDef]]
        private var mmodules2mprops: Map[MModule, Set[MProperty]]
 
-       init(mclass: MClass, ctx: NitdocContext) do
+       init(ctx: ToolContext, model: Model, mainmodule: MModule, mclass: MClass) do
+               super
                self.mclass = mclass
-               super(ctx)
                var mpropdefs = new HashSet[MPropDef]
                mpropdefs.add_all mclass.intro_mpropdefs(ctx.min_visibility)
                mpropdefs.add_all mclass.redef_mpropdefs(ctx.min_visibility)
@@ -1103,14 +1098,14 @@ class NitdocClass
        private fun tpl_inheritance(parent: TplSection) do
                # parents
                var hparents = new HashSet[MClass]
-               for c in mclass.in_hierarchy(ctx.mainmodule).direct_greaters do
+               for c in mclass.in_hierarchy(mainmodule).direct_greaters do
                        if c.visibility < ctx.min_visibility then continue
                        hparents.add c
                end
 
                # ancestors
                var hancestors = new HashSet[MClass]
-               for c in mclass.in_hierarchy(ctx.mainmodule).greaters do
+               for c in mclass.in_hierarchy(mainmodule).greaters do
                        if c == mclass then continue
                        if c.visibility < ctx.min_visibility then continue
                        if hparents.has(c) then continue
@@ -1119,14 +1114,14 @@ class NitdocClass
 
                # children
                var hchildren = new HashSet[MClass]
-               for c in mclass.in_hierarchy(ctx.mainmodule).direct_smallers do
+               for c in mclass.in_hierarchy(mainmodule).direct_smallers do
                        if c.visibility < ctx.min_visibility then continue
                        hchildren.add c
                end
 
                # descendants
                var hdescendants = new HashSet[MClass]
-               for c in mclass.in_hierarchy(ctx.mainmodule).smallers do
+               for c in mclass.in_hierarchy(mainmodule).smallers do
                        if c == mclass then continue
                        if c.visibility < ctx.min_visibility then continue
                        if hchildren.has(c) then continue
@@ -1255,7 +1250,7 @@ class NitdocClass
                var map = new HashMap[MModule, Set[MProperty]]
                for mprop in mprops do
                        var mpropdefs = mprops2mdefs[mprop].to_a
-                       ctx.mainmodule.linearize_mpropdefs(mpropdefs)
+                       mainmodule.linearize_mpropdefs(mpropdefs)
                        var mmodule = mpropdefs.first.mclassdef.mmodule
                        if not map.has_key(mmodule) then map[mmodule] = new HashSet[MProperty]
                        map[mmodule].add mprop
@@ -1285,7 +1280,7 @@ class NitdocClass
        private fun mclass_inherited_mprops: Set[MProperty] do
                var res = new HashSet[MProperty]
                var local = mclass.local_mproperties(ctx.min_visibility)
-               for mprop in mclass.inherited_mproperties(ctx.mainmodule, ctx.min_visibility) do
+               for mprop in mclass.inherited_mproperties(mainmodule, 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
@@ -1326,7 +1321,7 @@ class NitdocClass
                        poset.add_node mclass
                        for oclass in mclasses do
                                poset.add_node oclass
-                               if mclass.in_hierarchy(ctx.mainmodule) < oclass then
+                               if mclass.in_hierarchy(mainmodule) < oclass then
                                        poset.add_edge(mclass, oclass)
                                end
                        end
@@ -1358,9 +1353,9 @@ class NitdocProperty
        private var concerns: ConcernsTree
        private var mmodules2mdefs: Map[MModule, Set[MPropDef]]
 
-       init(mproperty: MProperty, ctx: NitdocContext) do
+       init(ctx: ToolContext, model: Model, mainmodule: MModule, mproperty: MProperty) do
+               super
                self.mproperty = mproperty
-               super(ctx)
                self.mmodules2mdefs = sort_by_mmodule(collect_mpropdefs)
                self.concerns = model.concerns_tree(mmodules2mdefs.keys)
                self.concerns.sort_with(new MConcernRankSorter)
index 9e79281..322fcda 100644 (file)
@@ -77,6 +77,7 @@ redef class ModelBuilder
                end
 
                # The main function of the C
+               compiler.compile_nitni_global_ref_functions
                compiler.compile_main_function
 
                # Compile until all runtime_functions are visited
@@ -269,7 +270,14 @@ class GlobalCompiler
 
        redef fun compile_nitni_structs
        do
-               self.header.add_decl("struct nitni_instance \{ val *value; \};")
+               self.header.add_decl """
+struct nitni_instance \{
+       struct nitni_instance *next,
+               *prev; /* adjacent global references in global list */
+       int count; /* number of time this global reference has been marked */
+       val *value;
+\};"""
+               super
        end
 end
 
index ac80b99..90cb227 100644 (file)
@@ -15,9 +15,9 @@
 # Transform Nit verbatim documentation into HTML
 module markdown
 
-import parser
+private import parser
 import html
-import highlight
+private import highlight
 
 # The class that does the convertion from a `ADoc` to HTML
 private class Doc2Mdwn
index e39cf51..b55e1b8 100644 (file)
@@ -19,6 +19,7 @@
 module metrics_base
 
 import model_utils
+import modelbuilder
 import csv
 import counter
 import console
diff --git a/src/model/README.md b/src/model/README.md
new file mode 100644 (file)
index 0000000..5e5d735
--- /dev/null
@@ -0,0 +1,43 @@
+The meta model of Nit programs
+
+These modules define the entities of the Nit meta-model like modules, classes, types and properties
+They also provide an API to build and query models.
+All model classes starts with the `M` letter (`MModule`, `MClass`, etc.)
+
+The model is used by tools that need a higher view than a AST (see `parser`).
+The model represents What the programmer means.
+
+Because of the specification of the Nit language, the model is complex and sometime difficult to understand.
+
+## POSet
+
+There is a lot of classes and relation in the model.
+Most of there relations are based on posets (from the lib `poset`.)
+
+Posets are *partially-ordered sets*; they are used to modelize hierarchies of things (eg. hierarchies of modules)
+
+The poset is an expressive data structure that generalizes most services about hierarchies.
+This avoid the duplication of code and the over-specialization of services.
+The drawback is that a specific request on the model use an abstract vocabulary.
+
+Example. you want the set of modules directly imported by another module.
+There is no specific method in `MModule` for that, the good way is to use services on the some posets
+
+~~~
+var res = mymodule.in_importation.direct_greaters
+~~~
+
+posets are used in two dual ways :
+
+ - by the whole hierarchy, most are in the `Model` and are named `something_somerelation_hierarchy` (eg. `Model::mmodule_importation_hierarchy`).
+ - by the view on en entity in a specific hierarchy, they are in the `MEntity` subclasses and are name `in_somerelation`. (eg. `MModule::in_importation`).
+
+
+## Refinement
+
+The refinement is the cause of the biggest difficulty with the model since the relations between entities are relative to the module considered.
+
+"How many method in this class?" -- It depends, what modules are you considering?
+"What is called by `x.foo` when `x` is dynamically a `Bar`?" -- It depends, in which main module?
+
+This relativity cause most services on model entities to have an additional parameter for the module considered.
index 18e835d..2b7e5af 100644 (file)
@@ -222,5 +222,10 @@ class MModule
                end
        end
 
+       # Is the mmodule created for internal purpose?
+       # Fictive module are instantied internally but they should not be
+       # exposed to the final user
+       var is_fictive: Bool writable = false
+
        redef fun parent_concern do return mgroup
 end
index 7481338..be29e6f 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Object model of the Nit language
+# Classes, types and properties
 #
-# This module define the entities of the Nit meta-model like modules,
-# classes, types and properties
-#
-# It also provide an API to build and query models.
-#
-# All model classes starts with the M letter (`MModule`, `MClass`, etc.)
-#
-# TODO: better doc
+# All three concepts are defined in this same module because these are strongly connected:
+# * types are based on classes
+# * classes contains properties
+# * some properties are types (virtual types)
 #
 # TODO: liearization, extern stuff
 # FIXME: better handling of the types
@@ -319,9 +315,20 @@ end
 #
 # This characteristic helps the reasoning about classes in a program since a
 # single `MClass` object always denote the same class.
-# However, because a `MClass` is global, it does not really have properties nor
-# belong to a hierarchy since the property and the
-# hierarchy of a class depends of a module.
+#
+# The drawback is that classes (`MClass`) contain almost nothing by themselves.
+# These do not really have properties nor belong to a hierarchy since the property and the
+# hierarchy of a class depends of the refinement in the modules.
+#
+# Most services on classes require the precision of a module, and no one can asks what are
+# the super-classes of a class nor what are properties of a class without precising what is
+# the module considered.
+#
+# For instance, during the typing of a source-file, the module considered is the module of the file.
+# eg. the question *is the method `foo` exists in the class `Bar`?* must be reformulated into
+# *is the method `foo` exists in the class `Bar` in the current module?*
+#
+# During some global analysis, the module considered may be the main module of the program.
 class MClass
        super MEntity
 
@@ -448,7 +455,14 @@ end
 #
 # A `MClassDef` is associated with an explicit (or almost) definition of a
 # class. Unlike `MClass`, a `MClassDef` is a local definition that belong to
-# a specific module
+# a specific class and a specific module, and contains declarations like super-classes
+# or properties.
+#
+# It is the class definitions that are the backbone of most things in the model:
+# ClassDefs are defined with regard with other classdefs.
+# Refinement and specialization are combined to produce a big poset called the `Model::mclassdef_hierarchy`.
+#
+# Moreover, the extension and the intention of types is defined by looking at the MClassDefs.
 class MClassDef
        super MEntity
 
@@ -769,7 +783,7 @@ abstract class MType
 
        # Replace formals generic types in self with resolved values in `mtype`
        # If `cleanup_virtual` is true, then virtual types are also replaced
-       # with their bounds
+       # with their bounds.
        #
        # This function returns self if `need_anchor` is false.
        #
@@ -830,8 +844,6 @@ abstract class MType
        #
        # The resolution can be done because `E` make sense for the class A (see `can_resolve_for`)
        #
-       # TODO: Explain the cleanup_virtual
-       #
        # FIXME: the parameter `cleanup_virtual` is just a bad idea, but having
        # two function instead of one seems also to be a bad idea.
        #
@@ -1199,8 +1211,8 @@ end
 # It's mean that all refinements of a same class "share" the parameter type,
 # but that a generic subclass has its on parameter types.
 #
-# However, in the sense of the meta-model, the a parameter type of a class is
-# a valid types in a subclass. The "in the sense of the meta-model" is
+# However, in the sense of the meta-model, a parameter type of a class is
+# a valid type in a subclass. The "in the sense of the meta-model" is
 # important because, in the Nit language, the programmer cannot refers
 # directly to the parameter types of the super-classes.
 #
index 3fba8dc..bc8d2cb 100644 (file)
@@ -17,7 +17,7 @@
 # Model exploration and traversing facilities
 module model_utils
 
-import modelbuilder
+import model
 
 redef class MConcern
 
index 3dbd389..724d79f 100644 (file)
@@ -64,7 +64,8 @@ redef class ToolContext
                        mainmodule = mmodules.first
                else
                        # We need a main module, so we build it by importing all modules
-                       mainmodule = new MModule(modelbuilder.model, null, mmodules.first.name, new Location(null, 0, 0, 0, 0))
+                       mainmodule = new MModule(modelbuilder.model, null, mmodules.first.name, new Location(mmodules.first.location.file, 0, 0, 0, 0))
+                       mainmodule.is_fictive = true
                        mainmodule.set_imported_mmodules(mmodules)
                end
                for phase in phases_list do
index 39e2b69..938a3a0 100644 (file)
@@ -205,7 +205,11 @@ redef class ModelBuilder
 
                # No error, try to go deeper in generic types
                if node isa AType then
-                       for a in node.n_types do check_visibility(a, a.mtype.as(not null), mpropdef)
+                       for a in node.n_types do
+                               var t = a.mtype
+                               if t == null then continue # Error, thus skipped
+                               check_visibility(a, t, mpropdef)
+                       end
                else if mtype isa MGenericType then
                        for t in mtype.arguments do check_visibility(node, t, mpropdef)
                end
@@ -678,7 +682,7 @@ redef class AAttrPropdef
                else
                        # New attribute style
                        var nid2 = self.n_id2.as(not null)
-                       var mprop = new MAttribute(mclassdef, "@" + name, none_visibility)
+                       var mprop = new MAttribute(mclassdef, "_" + name, private_visibility)
                        var mpropdef = new MAttributeDef(mclassdef, mprop, self.location)
                        self.mpropdef = mpropdef
                        modelbuilder.mpropdef2npropdef[mpropdef] = self
@@ -716,7 +720,7 @@ redef class AAttrPropdef
                                mwriteprop = new MMethod(mclassdef, writename, mvisibility)
                                if not self.check_redef_keyword(modelbuilder, mclassdef, nwkwredef, false, mwriteprop) then return
                        else
-                               if not self.check_redef_keyword(modelbuilder, mclassdef, nwkwredef, true, mwriteprop) then return
+                               if not self.check_redef_keyword(modelbuilder, mclassdef, nwkwredef or else n_kwredef, true, mwriteprop) then return
                                if nwritable != null then
                                        check_redef_property_visibility(modelbuilder, nwritable.n_visibility, mwriteprop)
                                end
@@ -738,12 +742,21 @@ redef class AAttrPropdef
                var mmodule = mclassdef.mmodule
                var mtype: nullable MType = null
 
+               var mreadpropdef = self.mreadpropdef
+
                var ntype = self.n_type
                if ntype != null then
                        mtype = modelbuilder.resolve_mtype(mmodule, mclassdef, ntype)
                        if mtype == null then return
                end
 
+               # Inherit the type from the getter (usually an abstact getter)
+               if mtype == null and mreadpropdef != null and not mreadpropdef.is_intro then
+                       var msignature = mreadpropdef.mproperty.intro.msignature
+                       if msignature == null then return # Error, thus skiped
+                       mtype = msignature.return_mtype
+               end
+
                var nexpr = self.n_expr
                if mtype == null then
                        if nexpr != null then
@@ -771,11 +784,9 @@ redef class AAttrPropdef
                                        modelbuilder.error(self, "Error: Untyped attribute {mpropdef}. Implicit typing allowed only for literals and new.")
                                end
 
-                       else
-                               modelbuilder.error(self, "Error: Untyped attribute {mpropdef}")
+                               if mtype == null then return
                        end
-               else
-                       assert ntype != null
+               else if ntype != null then
                        if nexpr isa ANewExpr then
                                var xmtype = modelbuilder.resolve_mtype(mmodule, mclassdef, nexpr.n_type)
                                if xmtype == mtype and modelbuilder.toolcontext.opt_warn.value >= 2 then
@@ -784,11 +795,13 @@ redef class AAttrPropdef
                        end
                end
 
-               if mtype == null then return
+               if mtype == null then
+                       modelbuilder.error(self, "Error: Untyped attribute {mpropdef}")
+                       return
+               end
 
                mpropdef.static_mtype = mtype
 
-               var mreadpropdef = self.mreadpropdef
                if mreadpropdef != null then
                        var msignature = new MSignature(new Array[MParameter], mtype)
                        mreadpropdef.msignature = msignature
@@ -881,7 +894,7 @@ redef class AAttrPropdef
                                for i in [0..mysignature.arity[ do
                                        var myt = mysignature.mparameters[i].mtype
                                        var prt = msignature.mparameters[i].mtype
-                                       if not myt.is_subtype(mmodule, mclassdef.bound_mtype, prt) and
+                                       if not myt.is_subtype(mmodule, mclassdef.bound_mtype, prt) or
                                                        not prt.is_subtype(mmodule, mclassdef.bound_mtype, myt) then
                                                var node: ANode
                                                if nsig != null then node = nsig else node = self
@@ -955,7 +968,7 @@ redef class ATypePropdef
                var bound = self.mpropdef.bound
                if bound == null then return # Error thus skiped
 
-               modelbuilder.check_visibility(n_type.as(not null), bound, mpropdef)
+               modelbuilder.check_visibility(n_type, bound, mpropdef)
 
                # Fast case: the bound is not a formal type
                if not bound isa MVirtualType then return
index a579aa2..fc6cbfc 100644 (file)
@@ -434,6 +434,13 @@ private class NaiveInterpreter
                return recv.attributes[mproperty]
        end
 
+       # Replace in `recv` the value of the attribute `mproperty` by `value`
+       fun write_attribute(mproperty: MAttribute, recv: Instance, value: Instance)
+       do
+               assert recv isa MutableInstance
+               recv.attributes[mproperty] = value
+       end
+
        # Collect attributes of a type in the order of their init
        fun collect_attr_propdef(mtype: MType): Array[AAttrPropdef]
        do
@@ -979,7 +986,7 @@ redef class AAttrPropdef
                        return v.read_attribute(attr, recv)
                else
                        assert args.length == 2
-                       recv.attributes[attr] = args[1]
+                       v.write_attribute(attr, recv, args[1])
                        return null
                end
        end
@@ -996,13 +1003,13 @@ redef class AAttrPropdef
                        assert val != null
                        v.frames.shift
                        assert not v.is_escaping
-                       recv.attributes[self.mpropdef.mproperty] = val
+                       v.write_attribute(self.mpropdef.mproperty, recv, val)
                        return
                end
                var mtype = self.mpropdef.static_mtype.as(not null)
                mtype = mtype.anchor_to(v.mainmodule, recv.mtype.as(MClassType))
                if mtype isa MNullableType then
-                       recv.attributes[self.mpropdef.mproperty] = v.null_instance
+                       v.write_attribute(self.mpropdef.mproperty, recv, v.null_instance)
                end
        end
 end
@@ -1025,7 +1032,7 @@ redef class AClassdef
                # Collect undefined attributes
                for npropdef in self.n_propdefs do
                        if npropdef isa AAttrPropdef and npropdef.n_expr == null then
-                               recv.attributes[npropdef.mpropdef.mproperty] = args[i]
+                               v.write_attribute(npropdef.mpropdef.mproperty, recv, args[i])
                                i += 1
                        end
                end
@@ -1521,7 +1528,7 @@ redef class ASendExpr
                var recv = v.expr(self.n_expr)
                if recv == null then return null
                var args = [recv]
-               for a in self.raw_arguments.as(not null) do
+               for a in self.raw_arguments do
                        var i = v.expr(a)
                        if i == null then return null
                        args.add(i)
@@ -1538,7 +1545,7 @@ redef class ASendReassignFormExpr
                var recv = v.expr(self.n_expr)
                if recv == null then return
                var args = [recv]
-               for a in self.raw_arguments.as(not null) do
+               for a in self.raw_arguments do
                        var i = v.expr(a)
                        if i == null then return
                        args.add(i)
@@ -1635,8 +1642,7 @@ redef class AAttrAssignExpr
                var i = v.expr(self.n_value)
                if i == null then return
                var mproperty = self.mproperty.as(not null)
-               assert recv isa MutableInstance
-               recv.attributes[mproperty] = i
+               v.write_attribute(mproperty, recv, i)
        end
 end
 
@@ -1652,8 +1658,7 @@ redef class AAttrReassignExpr
                var attr = v.read_attribute(mproperty, recv)
                var res = v.callsite(reassign_callsite, [attr, value])
                assert res != null
-               assert recv isa MutableInstance
-               recv.attributes[mproperty] = res
+               v.write_attribute(mproperty, recv, res)
        end
 end
 
index dc48db8..2481ce8 100644 (file)
@@ -35,7 +35,7 @@ toolcontext.process_options(args)
 # We need a model to collect stufs
 var model = new Model
 # An a model builder to parse files
-var modelbuilder = new ModelBuilder(model, toolcontext.as(not null))
+var modelbuilder = new ModelBuilder(model, toolcontext)
 
 var arguments = toolcontext.option_context.rest
 var progname = arguments.first
@@ -57,8 +57,8 @@ else
        mainmodule.set_imported_mmodules(mmodules)
 end
 
-var self_mm = mainmodule.as(not null)
-var self_args = arguments.as(not null)
+var self_mm = mainmodule
+var self_args = arguments
 
 if toolcontext.opt_debugger_autorun.value then
        modelbuilder.run_debugger_autorun(self_mm, self_args)
index fcdd045..02f3bb1 100644 (file)
 # Generate API documentation in HTML format from nit source code.
 module nitdoc
 
+import modelbuilder
 import doc
 
-var nitdoc = new NitdocContext
-nitdoc.generate_nitdoc
+redef class ToolContext
+       var docphase: Phase = new NitdocPhase(self, null)
+end
 
+private class NitdocPhase
+       super Phase
+       redef fun process_mainmodule(mainmodule, mmodules)
+       do
+               # generate doc
+               var nitdoc = new Nitdoc(toolcontext, mainmodule.model, mainmodule)
+               nitdoc.generate
+       end
+end
+
+# process options
+var toolcontext = new ToolContext
+toolcontext.process_options(args)
+var arguments = toolcontext.option_context.rest
+
+# build model
+var model = new Model
+var mbuilder = new ModelBuilder(model, toolcontext)
+var mmodules = mbuilder.parse(arguments)
+
+if mmodules.is_empty then return
+mbuilder.run_phases
+toolcontext.run_global_phases(mmodules)
index 89bec39..ab95c3d 100644 (file)
@@ -17,7 +17,6 @@
 # A program that collects various metrics on nit programs and libraries
 module nitmetrics
 
-import modelbuilder
 import frontend
 import metrics
 
index 5c5b9c1..f6a0959 100644 (file)
@@ -103,6 +103,7 @@ redef class MMethod
                        return_mtype = recv_mtype
                else if signature.return_mtype != null then
                        return_mtype = signature.return_mtype
+                       return_mtype = return_mtype.resolve_for(recv_mtype, recv_mtype, from_mmodule, true)
                end
 
                var cname = build_cname(recv_mtype, from_mmodule, suffix, length)
index 56ffeff..627e223 100644 (file)
@@ -203,12 +203,12 @@ redef class ModelBuilder
                var nmodule = mmodule2nmodule[mmodule]
                assert nmodule != null
 
-               # what module to import in the unit test.
-               # try to detect the main module of the project
-               # TODO do things correctly once the importation of arbitraty nested module is legal
+               # usualy, only the original module must be imported in the unit test.
                var o = mmodule
                var g = o.mgroup
                if g != null and g.mproject.name == "standard" then
+                       # except for a unit test in a module of standard
+                       # in this case, the whole standard must be imported
                        o = get_mmodule_by_name(nmodule, g, g.mproject.name).as(not null)
                end
 
index 9a62208..c0887db 100644 (file)
@@ -34,7 +34,7 @@ toolcontext.process_options(args)
 var model = new Model
 
 # Add a model builder to parse files
-var modelbuilder = new ModelBuilder(model, toolcontext.as(not null))
+var modelbuilder = new ModelBuilder(model, toolcontext)
 
 var arguments = toolcontext.option_context.rest
 var progname = arguments.first
@@ -56,7 +56,7 @@ else
        mainmodule.set_imported_mmodules(mmodules)
 end
 
-var self_mm = mainmodule.as(not null)
-var self_args = arguments.as(not null)
+var self_mm = mainmodule
+var self_args = arguments
 
 modelbuilder.run_naive_interpreter(self_mm, self_args)
diff --git a/src/parser/README b/src/parser/README
deleted file mode 100644 (file)
index 981578a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-This directory contains the nit parser. It is generated from a grammar for sablecc3 ( http://www.sablecc.org ).
-In order to generate nit parser, you need the alternate SableCC3 generator ( http://www.mare.ee/indrek/sablecc/ ).
-
-Contents:
-
-       fact_parser.pl: Script used to factorize parser.nit
-       Makefile: Update grammar and generate .nit files
-       nit.sablecc3xx: Extended sablecc3 grammar (see prescc.pl)
-       prescc.pl: Program to transform an extended sablecc3 to a standard one
-       parser_nodes.nit: token and nodes classes hierarchy used by the parser and the lexer
-       tables.nit, tables_nit.h: Interfaces to access the tables needed by the parser and the lexer
-       test_parser.nit:
-       xss/*.xss: alternate SableCC3 template files for the Nit language
-
-
-The following are generated but present to avoid the need of sablecc3:
-
-       lexer.nit: generated lexer
-       parser.nit: generated parser
-       parser_prod.nit: All production with generated visit methods
-       tables_nit.c: The tables needed by the parser and the lexer
-       parser_abs.nit: Raw generated token and nodes classes used to maintain coherence of parser_nodes.nit
-
-
-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
-
diff --git a/src/parser/README.md b/src/parser/README.md
new file mode 100644 (file)
index 0000000..3595aa7
--- /dev/null
@@ -0,0 +1,42 @@
+Parser and AST for the Nit language
+
+The parser ans the AST are mostly used by all tools.
+
+The `parser` is the tool that transform source-files into abstract syntax trees (AST) (see `parser_nodes`)
+While the AST is a higher abstraction than blob of text, the AST is still limited and represents only *What the programmer says*.
+
+Classes of nodes of the AST starts with the letter `A` (for most things, eg. `AClassdef`) or `T` (for token eg. `TId`), there is no real reason except historical that might be solved with a new parser.
+
+Variable names of the AST usually starts with `n` (for node). This is also historical but some names with a `a` (to mimic the class name) remains.
+
+## SableCC
+
+Most files in this directory are generated from a grammar for sablecc3 ( http://www.sablecc.org ).
+In order to generate nit parser, you need the alternate SableCC3 generator ( http://www.mare.ee/indrek/sablecc/ ).
+
+## Contents
+
+* fact_parser.pl: Script used to factorize parser.nit
+* Makefile: Update grammar and generate .nit files
+* nit.sablecc3xx: Extended sablecc3 grammar (see prescc.pl)
+* prescc.pl: Program to transform an extended sablecc3 to a standard one
+* parser_nodes.nit: token and nodes classes hierarchy used by the parser and the lexer
+* tables.nit, tables_nit.h: Interfaces to access the tables needed by the parser and the lexer
+* xss/*.xss: alternate SableCC3 template files for the Nit language
+
+
+The following are generated but present to avoid the need of sablecc3:
+
+* lexer.nit: generated lexer
+* parser.nit: generated parser
+* parser_prod.nit: All production with generated visit methods
+* tables_nit.c: The tables needed by the parser and the lexer
+* parser_abs.nit: Raw generated token and nodes classes used to maintain coherence of parser_nodes.nit
+
+
+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 98bbcc2..52516c7 100644 (file)
@@ -211,7 +211,7 @@ module
        = moduledecl? [imports]:import* [extern_bodies]:extern_code_body* [classdefs]:topdef* implicit_main_class {-> New module(moduledecl, [imports.import], [extern_bodies.extern_code_block], [classdefs.classdef,implicit_main_class.classdef])};
 
 moduledecl
-       = [doc]:no kwmodule no module_name annotation_withend [n2]:n1 {-> New moduledecl(doc.doc, kwmodule, module_name, annotation_withend.annotations)};
+       = [doc]:no redef visibility kwmodule no module_name annotation_withend [n2]:n1 {-> New moduledecl(doc.doc, redef.kwredef, visibility, kwmodule, module_name, annotation_withend.annotations)};
 
 import
        = {std} [doc]:no redef visibility kwimport no module_name annotation_withend [n2]:n1 {-> New import.std(visibility, kwimport, module_name, annotation_withend.annotations)}
@@ -267,16 +267,16 @@ propdef~toplevel {-> propdef}
 !toplevel| {deferred} [doc]:no redef visibility kwmeth methid signature kwis kwabstract {-> New propdef.deferred_meth(doc.doc, redef.kwredef, visibility, kwmeth, methid, signature.signature, Null)}
        | {intern} [doc]:no redef visibility kwmeth methid signature kwis kwintern {-> New propdef.intern_meth(doc.doc, redef.kwredef, visibility, kwmeth, methid, signature.signature)}
 !toplevel| {intern_new} [doc]:no redef visibility kwnew methid? signature kwis kwintern {-> New propdef.intern_new(doc.doc, redef.kwredef, visibility, kwnew, methid, signature)}
-       | {extern} [doc]:no redef visibility kwmeth methid signature kwis kwextern string_o extern_calls extern_code_block_o {-> New propdef.extern_meth(doc.doc, redef.kwredef, visibility, kwmeth, methid, signature.signature, string_o.string, extern_calls, extern_code_block_o.extern_code_block)}
-       | {extern_implicit} [doc]:no redef visibility kwmeth methid signature extern_calls extern_code_block {-> New propdef.extern_meth(doc.doc, redef.kwredef, visibility, kwmeth, methid, signature.signature, Null, extern_calls, extern_code_block)}
+       | {extern} [doc]:no redef visibility kwmeth methid signature kwis kwextern string_o extern_calls extern_code_block_o {-> New propdef.extern_meth(doc.doc, redef.kwredef, visibility, kwmeth, methid, signature.signature, Null, string_o.string, extern_calls, extern_code_block_o.extern_code_block)}
+       | {extern_implicit} [doc]:no redef visibility kwmeth methid signature annotation_noend? extern_calls extern_code_block {-> New propdef.extern_meth(doc.doc, redef.kwredef, visibility, kwmeth, methid, signature.signature, annotation_noend.annotations, Null, extern_calls, extern_code_block)}
 !toplevel| {var} [doc]:no readable? writable? redef visibility kwvar attrid typing_o {-> New propdef.attr(doc.doc, readable.able, writable.able, redef.kwredef, visibility, kwvar, attrid, Null, typing_o.type, Null, Null)}
 !toplevel| {var2} [doc]:no readable? writable? redef visibility kwvar attrid typing_o assign [n2]:no expr {-> New propdef.attr(doc.doc, readable.able, writable.able, redef.kwredef, visibility, kwvar, attrid, Null, typing_o.type, Null, expr)}
 !toplevel| {var3} [doc]:no redef visibility kwvar id typing_o writable? annotation_withend {-> New propdef.attr(doc.doc, Null, writable.able, redef.kwredef, visibility, kwvar, Null, id, typing_o.type, annotation_withend.annotations, Null)}
 !toplevel| {var4} [doc]:no redef visibility kwvar id typing_o writable? assign [n2]:no expr annotation_withend {-> New propdef.attr(doc.doc, Null, writable.able, redef.kwredef, visibility, kwvar, Null, id, typing_o.type, annotation_withend.annotations, expr.expr)}
 !toplevel| {init} [doc]:no redef visibility kwinit methid? signature annotation_noend? kwdo stmtso kwend_o {-> New propdef.concrete_init(doc.doc, redef.kwredef, visibility, kwinit, methid, signature, annotation_noend.annotations, stmtso.expr)}
 !toplevel| {type} [doc]:no redef visibility kwtype classid typing annotation_withend {-> New propdef.type(doc.doc, redef.kwredef, visibility, kwtype, classid, typing.type, annotation_withend.annotations)}
-!toplevel| {extern_init} [doc]:no redef visibility kwnew methid? signature kwis kwextern string_o extern_calls extern_code_block_o {-> New propdef.extern_init(doc.doc, redef.kwredef, visibility, kwnew, methid, signature, string_o.string, extern_calls, extern_code_block_o.extern_code_block)}
-!toplevel| {extern_init_implicit} [doc]:no redef visibility kwnew methid? signature string_o extern_calls extern_code_block {-> New propdef.extern_init(doc.doc, redef.kwredef, visibility, kwnew, methid, signature, string_o.string, extern_calls, extern_code_block)}
+!toplevel| {extern_init} [doc]:no redef visibility kwnew methid? signature kwis kwextern string_o extern_calls extern_code_block_o {-> New propdef.extern_init(doc.doc, redef.kwredef, visibility, kwnew, methid, signature, Null, string_o.string, extern_calls, extern_code_block_o.extern_code_block)}
+!toplevel| {extern_init_implicit} [doc]:no redef visibility kwnew methid? signature annotation_noend? extern_calls extern_code_block {-> New propdef.extern_init(doc.doc, redef.kwredef, visibility, kwnew, methid, signature, annotation_noend.annotations, Null, extern_calls, extern_code_block)}
        ;
 annotation_withend~nonull {-> annotations?}
        = {oneliner} kwis many_annotations {-> many_annotations.annotations}
@@ -295,7 +295,8 @@ writable {-> able}
        ;
 
 visibility
-       = {public} {-> New visibility.public()}
+       = {public} {-> New visibility.public(Null)}
+       | {public2} kwpublic no {-> New visibility.public(kwpublic)}
        | {private} kwprivate no {-> New visibility.private(kwprivate)}
        | {protected} kwprotected no {-> New visibility.protected(kwprotected)}
        | {intrude} kwintrude no {-> New visibility.intrude(kwintrude)}
@@ -410,9 +411,9 @@ stmt~withelse~noexpr~nopar {-> expr}
        = {vardecl} vardecl~withelse {-> vardecl~withelse.expr}
        | {assign} assignment~withelse~nopar {-> assignment~withelse~nopar.expr}
        | {return} kwreturn expr_final~withelse? {-> New expr.return(kwreturn, expr_final~withelse.expr)}
-       | {break} kwbreak label? expr_final~withelse? {-> New expr.break(kwbreak, label, expr_final~withelse.expr)}
+       | {break} kwbreak label? {-> New expr.break(kwbreak, label)}
        | {abort} kwabort {-> New expr.abort(kwabort)}
-       | {continue} kwcontinue label? expr_final~withelse? {-> New expr.continue(kwcontinue, label, expr_final~withelse.expr)}
+       | {continue} kwcontinue label? {-> New expr.continue(kwcontinue, label)}
        | {do} do~withelse {-> do~withelse.expr}
 !noexpr        | {if} if~withelse {-> if~withelse.expr}
        | {while} while~withelse {-> while~withelse.expr}
@@ -425,11 +426,7 @@ stmt~withelse~noexpr~nopar {-> expr}
        | {debug_type_is} kwdebug kwtype type column expr_final~withelse {-> New expr.debug_type(kwdebug, kwtype, expr_final~withelse.expr, type) }
        ;
 
-label= kwlabel id;
-
-assign_continue~withelse{-> expr}
-       = expr_final~withelse {-> New expr.continue(Null, Null, expr_final~withelse.expr)}
-       ;
+label= kwlabel id?;
 
 vardecl~withelse{-> expr}
        = kwvar id annotations? typing_o {-> New expr.vardecl(kwvar, id, typing_o.type, Null, Null, annotations)}
@@ -574,6 +571,7 @@ expr_atom~nopar~nobra {-> expr}
         | {as_cast} expr_atom~nopar~nobra dot no kwas [n2]:no opar [n3]:no type [n4]:no cpar {-> New expr.as_cast(expr_atom~nopar~nobra.expr, kwas, opar, type, cpar)}
         | {as_notnull} expr_atom~nopar~nobra dot no kwas [n2]:no opar [n3]:no kwnot [n4]:no kwnull [n5]:no cpar {-> New expr.as_notnull(expr_atom~nopar~nobra.expr, kwas, opar, kwnot, kwnull, cpar)}
         | {as_notnull2}expr_atom~nopar~nobra dot no kwas [n2]:no kwnot [n4]:no kwnull {-> New expr.as_notnull(expr_atom~nopar~nobra.expr, kwas, Null, kwnot, kwnull, Null)}
+       | {vararg} [expr]:expr_atom~nopar~nobra dotdotdot {-> New expr.vararg(expr.expr, dotdotdot)}
        ;
 
 superstring {-> expr} 
@@ -605,9 +603,9 @@ annotations_o~nopar {-> annotations?}
        ;
 
 one_annotation~nopar {-> annotation}
-       = {alone} atid annotations_o~nopar {-> New annotation(atid, Null, [], Null, annotations_o~nopar.annotations)}
+       = {alone} redef visibility atid annotations_o~nopar {-> New annotation(Null, redef.kwredef, visibility, atid, Null, [], Null, annotations_o~nopar.annotations)}
 // !nopar to unambiguise 'new T@foo(bar)' between 'new T@(foo(bar))' and 'new (T@foo)(bar)'
-!nopar | {args} atid opar no at_args [n2]:no cpar annotations_o~nopar {-> New annotation(atid, opar, [at_args.at_arg], cpar, annotations_o~nopar.annotations)}
+!nopar | {args} redef visibility atid opar no at_args [n2]:no cpar annotations_o~nopar {-> New annotation(Null, redef.kwredef, visibility, atid, opar, [at_args.at_arg], cpar, annotations_o~nopar.annotations)}
        ;
 
 many_annotations {-> annotations}
@@ -618,13 +616,21 @@ annotation_list {-> annotation*}
        = {many} one_annotation annotations_tail* {-> [one_annotation.annotation, annotations_tail.annotation] }
        ;
 
-line_annotations~forclass {-> annotations}
-       = line_annotation~forclass+ {-> New annotations(Null, Null, [line_annotation~forclass.annotation], Null) }
+line_annotations {-> annotations}
+       = line_annotation+ {-> New annotations(Null, Null, [line_annotation.annotation], Null) }
+       ;
+line_annotation {-> annotation}
+       = [doc]:no redef visibility atid annotations? n1 {-> New annotation(doc.doc, redef.kwredef, visibility, atid.atid, Null, [], Null, annotations)}
+       | {args} [doc]:no redef visibility atid opar no at_args cpar annotations? n1 {-> New annotation(doc.doc, redef.kwredef, visibility, atid.atid, opar, [at_args.at_arg], cpar, annotations)}
+       | {nopar} [doc]:no redef visibility atid at_args_nopar n1 {-> New annotation(doc.doc, redef.kwredef, visibility, atid.atid, Null, [at_args_nopar.at_arg], Null, Null)}
+       ;
+line_annotations_forclass {-> annotations}
+       = line_annotation_forclass+ {-> New annotations(Null, Null, [line_annotation_forclass.annotation], Null) }
        ;
-line_annotation~forclass {-> annotation}
-       = [doc]:no atid~forclass annotations? n1 {-> New annotation(atid~forclass.atid, Null, [], Null, annotations)}
-       | {args} [doc]:no atid~forclass opar no at_args cpar annotations? n1 {-> New annotation(atid~forclass.atid, opar, [at_args.at_arg], cpar, annotations)}
-       | {nopar} [doc]:no atid~forclass at_args_nopar n1 {-> New annotation(atid~forclass.atid, Null, [at_args_nopar.at_arg], Null, Null)}
+line_annotation_forclass {-> annotation}
+       = [doc]:no atid_forclass annotations? n1 {-> New annotation(doc.doc, Null, Null, atid_forclass.atid, Null, [], Null, annotations)}
+       | {args} [doc]:no atid_forclass opar no at_args cpar annotations? n1 {-> New annotation(doc.doc, Null, Null, atid_forclass.atid, opar, [at_args.at_arg], cpar, annotations)}
+       | {nopar} [doc]:no atid_forclass at_args_nopar n1 {-> New annotation(doc.doc, Null, Null, atid_forclass.atid, Null, [at_args_nopar.at_arg], Null, Null)}
        ;
 
 annotations_tail {-> annotation}
@@ -652,7 +658,7 @@ atid~forclass {-> atid}
 //!forclass    | {kwintern} kwintern {-> New atid.kwintern(kwintern)}
 !forclass      | {kwreadable} kwreadable {-> New atid.kwreadable(kwreadable)}
 !forclass      | {kwwritable} kwwritable {-> New atid.kwwritable(kwwritable)}
-       | {kwimport} kwimport {-> New atid.kwimport(kwimport)}
+//     | {kwimport} kwimport {-> New atid.kwimport(kwimport)}
        ;
 
 /* MISC **********************************************************************/
@@ -738,14 +744,14 @@ Abstract Syntax Tree
 module = moduledecl? [imports]:import* [extern_code_blocks]:extern_code_block* [classdefs]:classdef*;
 
 moduledecl
-       = doc? kwmodule [name]:module_name annotations?;
+       = doc? kwredef? visibility kwmodule [name]:module_name annotations?;
 
 import = {std} visibility kwimport [name]:module_name annotations?
        | {no} visibility kwimport kwend
        ;
 
 visibility
-       = {public}
+       = {public} kwpublic?
        | {private} kwprivate
        | {protected} kwprotected
        | {intrude} kwintrude
@@ -771,11 +777,11 @@ propdef = {attr} doc? [readable]:able? [writable]:able? kwredef? visibility kwva
        | {deferred_meth} doc? kwredef? visibility kwmeth methid signature annotations?
        | {intern_meth} doc? kwredef? visibility kwmeth methid signature
        | {intern_new} doc? kwredef? visibility kwnew methid? signature
-       | {extern_meth} doc? kwredef? visibility kwmeth methid signature [extern]:string? extern_calls? extern_code_block?
+       | {extern_meth} doc? kwredef? visibility kwmeth methid signature annotations? [extern]:string? extern_calls? extern_code_block?
        | {concrete_meth} doc? kwredef? visibility kwmeth methid signature annotations? [block]:expr?
        | {concrete_init} doc? kwredef? visibility kwinit methid? signature annotations? [block]:expr?
        //| {concrete_new} doc? kwredef? visibility kwnew methid? signature [block]:expr?
-       | {extern_init} doc? kwredef? visibility kwnew methid? signature [extern]:string? extern_calls? extern_code_block?
+       | {extern_init} doc? kwredef? visibility kwnew methid? signature annotations? [extern]:string? extern_calls? extern_code_block?
        | {main_meth} kwredef? [block]:expr?
        | {type} doc? kwredef? visibility kwtype [id]:classid type annotations?
        ;
@@ -793,14 +799,14 @@ param     = id type? dotdotdot? annotations?
 
 type   = kwnullable? [id]:classid [types]:type* annotations?;
 
-label = kwlabel id;
+label = kwlabel id?;
 
 expr   = {block} expr* kwend? 
        | {vardecl} kwvar id type? assign? expr? annotations?
        | {return} kwreturn? expr?
-       | {break} kwbreak label? expr?
+       | {break} kwbreak label?
        | {abort} kwabort
-       | {continue} kwcontinue? label? expr?
+       | {continue} kwcontinue? label?
        | {do} kwdo [block]:expr? label?
        | {if} kwif expr [then]:expr? [else]:expr? 
        | {ifexpr} kwif expr kwthen [then]:expr kwelse [else]:expr
@@ -870,6 +876,7 @@ expr        = {block} expr* kwend?
         | {as_notnull} expr kwas opar? kwnot kwnull cpar?
        | {isset_attr} kwisset expr [id]:attrid
        | {debug_type} kwdebug kwtype expr type
+       | {vararg} expr dotdotdot
        ;
 exprs
        = {list} [exprs]:expr*
@@ -902,7 +909,7 @@ doc = comment+;
 
 annotations = at? opar? [items]:annotation* cpar?;
 
-annotation = atid opar? [args]:at_arg* cpar? annotations?;
+annotation = doc? kwredef? visibility? atid opar? [args]:at_arg* cpar? annotations?;
 
 at_arg
        = {type} type
index 9a6f8d2..c5d09eb 100644 (file)
@@ -97,21 +97,21 @@ redef class Parser
                        new ReduceAction84(14),
                        new ReduceAction85(14),
                        new ReduceAction86(14),
-                       new ReduceAction87(15),
-                       new ReduceAction88(15),
+                       new ReduceAction87(14),
+                       new ReduceAction88(14),
+                       new ReduceAction89(14),
+                       new ReduceAction90(15),
+                       new ReduceAction91(15),
                        new ReduceAction22(15),
-                       new ReduceAction87(16),
-                       new ReduceAction91(16),
-                       new ReduceAction92(17),
-                       new ReduceAction93(18),
-                       new ReduceAction94(19),
-                       new ReduceAction95(19),
-                       new ReduceAction96(19),
+                       new ReduceAction90(16),
+                       new ReduceAction94(16),
+                       new ReduceAction95(17),
+                       new ReduceAction96(18),
                        new ReduceAction97(19),
-                       new ReduceAction98(20),
-                       new ReduceAction99(20),
-                       new ReduceAction100(20),
-                       new ReduceAction101(20),
+                       new ReduceAction98(19),
+                       new ReduceAction99(19),
+                       new ReduceAction100(19),
+                       new ReduceAction101(19),
                        new ReduceAction102(20),
                        new ReduceAction103(20),
                        new ReduceAction104(20),
@@ -126,70 +126,70 @@ redef class Parser
                        new ReduceAction113(20),
                        new ReduceAction114(20),
                        new ReduceAction115(20),
-                       new ReduceAction116(21),
-                       new ReduceAction117(21),
-                       new ReduceAction118(21),
-                       new ReduceAction119(21),
-                       new ReduceAction120(22),
-                       new ReduceAction121(22),
+                       new ReduceAction116(20),
+                       new ReduceAction117(20),
+                       new ReduceAction118(20),
+                       new ReduceAction119(20),
+                       new ReduceAction120(21),
+                       new ReduceAction121(21),
+                       new ReduceAction122(21),
+                       new ReduceAction123(21),
+                       new ReduceAction124(22),
+                       new ReduceAction125(22),
                        new ReduceAction51(22),
-                       new ReduceAction123(23),
-                       new ReduceAction124(24),
-                       new ReduceAction125(24),
-                       new ReduceAction126(24),
-                       new ReduceAction127(24),
+                       new ReduceAction127(23),
                        new ReduceAction128(24),
-                       new ReduceAction129(25),
-                       new ReduceAction130(25),
+                       new ReduceAction129(24),
+                       new ReduceAction130(24),
+                       new ReduceAction131(24),
+                       new ReduceAction132(24),
+                       new ReduceAction133(25),
+                       new ReduceAction134(25),
                        new ReduceAction22(25),
-                       new ReduceAction132(26),
-                       new ReduceAction133(27),
-                       new ReduceAction133(27),
-                       new ReduceAction135(27),
-                       new ReduceAction136(28),
-                       new ReduceAction137(28),
-                       new ReduceAction138(28),
-                       new ReduceAction139(29),
-                       new ReduceAction140(29),
-                       new ReduceAction141(29),
-                       new ReduceAction142(29),
+                       new ReduceAction136(26),
+                       new ReduceAction137(27),
+                       new ReduceAction137(27),
+                       new ReduceAction139(27),
+                       new ReduceAction140(28),
+                       new ReduceAction141(28),
+                       new ReduceAction142(28),
                        new ReduceAction143(29),
                        new ReduceAction144(29),
+                       new ReduceAction145(29),
+                       new ReduceAction146(29),
+                       new ReduceAction147(29),
+                       new ReduceAction148(29),
                        new ReduceAction22(30),
-                       new ReduceAction146(30),
-                       new ReduceAction147(31),
-                       new ReduceAction148(32),
-                       new ReduceAction149(32),
-                       new ReduceAction150(33),
+                       new ReduceAction150(30),
+                       new ReduceAction151(31),
+                       new ReduceAction152(32),
+                       new ReduceAction153(32),
+                       new ReduceAction154(33),
                        new ReduceAction22(33),
-                       new ReduceAction152(34),
-                       new ReduceAction153(35),
-                       new ReduceAction154(35),
-                       new ReduceAction155(35),
-                       new ReduceAction156(35),
-                       new ReduceAction157(36),
-                       new ReduceAction158(36),
-                       new ReduceAction159(37),
-                       new ReduceAction159(38),
-                       new ReduceAction159(39),
+                       new ReduceAction156(34),
+                       new ReduceAction157(35),
+                       new ReduceAction158(35),
+                       new ReduceAction159(35),
+                       new ReduceAction160(35),
+                       new ReduceAction161(36),
+                       new ReduceAction162(36),
+                       new ReduceAction163(37),
+                       new ReduceAction163(38),
+                       new ReduceAction163(39),
                        new ReduceAction22(39),
-                       new ReduceAction163(40),
-                       new ReduceAction164(40),
-                       new ReduceAction165(40),
-                       new ReduceAction166(40),
-                       new ReduceAction167(41),
-                       new ReduceAction168(41),
-                       new ReduceAction169(42),
-                       new ReduceAction170(42),
-                       new ReduceAction171(43),
-                       new ReduceAction172(43),
-                       new ReduceAction163(44),
-                       new ReduceAction166(45),
-                       new ReduceAction166(45),
-                       new ReduceAction176(45),
-                       new ReduceAction177(45),
-                       new ReduceAction178(45),
-                       new ReduceAction179(45),
+                       new ReduceAction167(40),
+                       new ReduceAction168(40),
+                       new ReduceAction169(40),
+                       new ReduceAction170(40),
+                       new ReduceAction171(41),
+                       new ReduceAction172(41),
+                       new ReduceAction173(42),
+                       new ReduceAction174(42),
+                       new ReduceAction175(43),
+                       new ReduceAction176(43),
+                       new ReduceAction167(44),
+                       new ReduceAction170(45),
+                       new ReduceAction170(45),
                        new ReduceAction180(45),
                        new ReduceAction181(45),
                        new ReduceAction182(45),
@@ -197,12 +197,12 @@ redef class Parser
                        new ReduceAction184(45),
                        new ReduceAction185(45),
                        new ReduceAction186(45),
-                       new ReduceAction166(45),
-                       new ReduceAction166(45),
-                       new ReduceAction166(45),
-                       new ReduceAction166(45),
-                       new ReduceAction166(45),
-                       new ReduceAction166(45),
+                       new ReduceAction170(45),
+                       new ReduceAction170(45),
+                       new ReduceAction170(45),
+                       new ReduceAction170(45),
+                       new ReduceAction170(45),
+                       new ReduceAction170(45),
                        new ReduceAction193(45),
                        new ReduceAction194(45),
                        new ReduceAction195(45),
@@ -216,185 +216,190 @@ redef class Parser
                        new ReduceAction201(45),
                        new ReduceAction204(45),
                        new ReduceAction205(46),
-                       new ReduceAction206(47),
-                       new ReduceAction207(48),
-                       new ReduceAction208(48),
-                       new ReduceAction209(48),
-                       new ReduceAction210(48),
-                       new ReduceAction211(49),
-                       new ReduceAction212(49),
-                       new ReduceAction213(49),
-                       new ReduceAction214(49),
-                       new ReduceAction215(49),
-                       new ReduceAction216(49),
-                       new ReduceAction217(49),
-                       new ReduceAction218(49),
-                       new ReduceAction219(49),
-                       new ReduceAction220(49),
-                       new ReduceAction221(50),
-                       new ReduceAction222(50),
-                       new ReduceAction223(51),
-                       new ReduceAction224(51),
-                       new ReduceAction225(52),
-                       new ReduceAction226(52),
-                       new ReduceAction227(52),
-                       new ReduceAction228(52),
-                       new ReduceAction229(52),
-                       new ReduceAction163(53),
-                       new ReduceAction165(53),
-                       new ReduceAction232(54),
-                       new ReduceAction233(54),
-                       new ReduceAction234(55),
-                       new ReduceAction235(55),
-                       new ReduceAction236(56),
-                       new ReduceAction237(56),
-                       new ReduceAction238(56),
-                       new ReduceAction239(56),
-                       new ReduceAction240(57),
-                       new ReduceAction241(57),
-                       new ReduceAction242(57),
-                       new ReduceAction243(57),
-                       new ReduceAction244(58),
-                       new ReduceAction166(59),
-                       new ReduceAction166(60),
-                       new ReduceAction247(60),
-                       new ReduceAction166(61),
-                       new ReduceAction249(61),
-                       new ReduceAction250(61),
-                       new ReduceAction251(61),
-                       new ReduceAction252(61),
-                       new ReduceAction166(62),
-                       new ReduceAction254(62),
-                       new ReduceAction166(63),
-                       new ReduceAction256(63),
-                       new ReduceAction257(63),
-                       new ReduceAction258(63),
-                       new ReduceAction259(63),
-                       new ReduceAction260(63),
-                       new ReduceAction261(63),
-                       new ReduceAction262(63),
-                       new ReduceAction263(63),
-                       new ReduceAction264(63),
-                       new ReduceAction265(63),
-                       new ReduceAction166(64),
-                       new ReduceAction267(64),
-                       new ReduceAction268(64),
-                       new ReduceAction166(65),
-                       new ReduceAction270(65),
-                       new ReduceAction271(65),
-                       new ReduceAction272(65),
-                       new ReduceAction166(66),
-                       new ReduceAction274(66),
-                       new ReduceAction275(66),
-                       new ReduceAction166(67),
-                       new ReduceAction277(67),
-                       new ReduceAction278(67),
-                       new ReduceAction279(67),
-                       new ReduceAction280(68),
-                       new ReduceAction281(68),
-                       new ReduceAction193(68),
-                       new ReduceAction194(68),
-                       new ReduceAction195(68),
-                       new ReduceAction196(68),
-                       new ReduceAction197(68),
-                       new ReduceAction287(68),
-                       new ReduceAction288(68),
-                       new ReduceAction289(68),
-                       new ReduceAction290(68),
-                       new ReduceAction291(68),
-                       new ReduceAction292(68),
-                       new ReduceAction293(68),
-                       new ReduceAction294(68),
-                       new ReduceAction295(68),
-                       new ReduceAction296(68),
-                       new ReduceAction297(68),
-                       new ReduceAction298(68),
-                       new ReduceAction299(68),
-                       new ReduceAction300(68),
-                       new ReduceAction166(68),
-                       new ReduceAction302(68),
-                       new ReduceAction303(68),
-                       new ReduceAction304(68),
-                       new ReduceAction305(68),
-                       new ReduceAction306(69),
-                       new ReduceAction307(69),
-                       new ReduceAction308(70),
-                       new ReduceAction309(70),
+                       new ReduceAction206(46),
+                       new ReduceAction207(47),
+                       new ReduceAction208(47),
+                       new ReduceAction209(47),
+                       new ReduceAction210(47),
+                       new ReduceAction211(48),
+                       new ReduceAction212(48),
+                       new ReduceAction213(48),
+                       new ReduceAction214(48),
+                       new ReduceAction215(48),
+                       new ReduceAction216(48),
+                       new ReduceAction217(48),
+                       new ReduceAction218(48),
+                       new ReduceAction219(48),
+                       new ReduceAction220(48),
+                       new ReduceAction221(49),
+                       new ReduceAction222(49),
+                       new ReduceAction223(50),
+                       new ReduceAction224(50),
+                       new ReduceAction225(51),
+                       new ReduceAction226(51),
+                       new ReduceAction227(51),
+                       new ReduceAction228(51),
+                       new ReduceAction229(51),
+                       new ReduceAction167(52),
+                       new ReduceAction169(52),
+                       new ReduceAction232(53),
+                       new ReduceAction233(53),
+                       new ReduceAction234(54),
+                       new ReduceAction235(54),
+                       new ReduceAction236(55),
+                       new ReduceAction237(55),
+                       new ReduceAction238(55),
+                       new ReduceAction239(55),
+                       new ReduceAction240(56),
+                       new ReduceAction241(56),
+                       new ReduceAction242(56),
+                       new ReduceAction243(56),
+                       new ReduceAction244(57),
+                       new ReduceAction170(58),
+                       new ReduceAction170(59),
+                       new ReduceAction247(59),
+                       new ReduceAction170(60),
+                       new ReduceAction249(60),
+                       new ReduceAction250(60),
+                       new ReduceAction251(60),
+                       new ReduceAction252(60),
+                       new ReduceAction170(61),
+                       new ReduceAction254(61),
+                       new ReduceAction170(62),
+                       new ReduceAction256(62),
+                       new ReduceAction257(62),
+                       new ReduceAction258(62),
+                       new ReduceAction259(62),
+                       new ReduceAction260(62),
+                       new ReduceAction261(62),
+                       new ReduceAction262(62),
+                       new ReduceAction263(62),
+                       new ReduceAction264(62),
+                       new ReduceAction265(62),
+                       new ReduceAction170(63),
+                       new ReduceAction267(63),
+                       new ReduceAction268(63),
+                       new ReduceAction170(64),
+                       new ReduceAction270(64),
+                       new ReduceAction271(64),
+                       new ReduceAction272(64),
+                       new ReduceAction170(65),
+                       new ReduceAction274(65),
+                       new ReduceAction275(65),
+                       new ReduceAction170(66),
+                       new ReduceAction277(66),
+                       new ReduceAction278(66),
+                       new ReduceAction279(66),
+                       new ReduceAction280(67),
+                       new ReduceAction281(67),
+                       new ReduceAction193(67),
+                       new ReduceAction194(67),
+                       new ReduceAction195(67),
+                       new ReduceAction196(67),
+                       new ReduceAction197(67),
+                       new ReduceAction287(67),
+                       new ReduceAction288(67),
+                       new ReduceAction289(67),
+                       new ReduceAction290(67),
+                       new ReduceAction291(67),
+                       new ReduceAction292(67),
+                       new ReduceAction293(67),
+                       new ReduceAction294(67),
+                       new ReduceAction295(67),
+                       new ReduceAction296(67),
+                       new ReduceAction297(67),
+                       new ReduceAction298(67),
+                       new ReduceAction299(67),
+                       new ReduceAction300(67),
+                       new ReduceAction170(67),
+                       new ReduceAction302(67),
+                       new ReduceAction303(67),
+                       new ReduceAction304(67),
+                       new ReduceAction305(67),
+                       new ReduceAction306(67),
+                       new ReduceAction307(68),
+                       new ReduceAction308(68),
+                       new ReduceAction309(69),
+                       new ReduceAction310(69),
+                       new ReduceAction311(70),
+                       new ReduceAction309(71),
                        new ReduceAction310(71),
-                       new ReduceAction308(72),
-                       new ReduceAction309(72),
-                       new ReduceAction313(73),
-                       new ReduceAction314(74),
-                       new ReduceAction315(75),
-                       new ReduceAction316(75),
-                       new ReduceAction317(76),
-                       new ReduceAction22(76),
-                       new ReduceAction319(77),
-                       new ReduceAction320(77),
-                       new ReduceAction321(78),
+                       new ReduceAction314(72),
+                       new ReduceAction315(73),
+                       new ReduceAction316(74),
+                       new ReduceAction317(74),
+                       new ReduceAction318(75),
+                       new ReduceAction22(75),
+                       new ReduceAction320(76),
+                       new ReduceAction321(76),
+                       new ReduceAction322(77),
+                       new ReduceAction323(78),
+                       new ReduceAction324(78),
                        new ReduceAction322(79),
-                       new ReduceAction323(79),
-                       new ReduceAction321(80),
-                       new ReduceAction325(81),
-                       new ReduceAction326(81),
-                       new ReduceAction327(81),
-                       new ReduceAction328(81),
-                       new ReduceAction329(81),
-                       new ReduceAction330(82),
-                       new ReduceAction331(83),
-                       new ReduceAction332(83),
-                       new ReduceAction333(84),
-                       new ReduceAction334(85),
-                       new ReduceAction335(85),
-                       new ReduceAction335(85),
-                       new ReduceAction337(85),
-                       new ReduceAction338(86),
-                       new ReduceAction339(86),
-                       new ReduceAction340(86),
-                       new ReduceAction341(86),
-                       new ReduceAction342(87),
-                       new ReduceAction343(87),
-                       new ReduceAction344(87),
-                       new ReduceAction342(88),
-                       new ReduceAction346(88),
-                       new ReduceAction343(88),
-                       new ReduceAction344(88),
-                       new ReduceAction349(89),
-                       new ReduceAction309(90),
-                       new ReduceAction351(90),
-                       new ReduceAction352(91),
-                       new ReduceAction353(92),
-                       new ReduceAction354(92),
-                       new ReduceAction355(93),
-                       new ReduceAction356(93),
-                       new ReduceAction357(93),
-                       new ReduceAction358(93),
-                       new ReduceAction359(94),
-                       new ReduceAction360(94),
-                       new ReduceAction361(94),
+                       new ReduceAction326(80),
+                       new ReduceAction327(80),
+                       new ReduceAction328(80),
+                       new ReduceAction329(80),
+                       new ReduceAction330(80),
+                       new ReduceAction331(81),
+                       new ReduceAction332(81),
+                       new ReduceAction333(81),
+                       new ReduceAction334(81),
+                       new ReduceAction335(81),
+                       new ReduceAction336(82),
+                       new ReduceAction337(83),
+                       new ReduceAction338(83),
+                       new ReduceAction339(84),
+                       new ReduceAction340(85),
+                       new ReduceAction341(85),
+                       new ReduceAction341(85),
+                       new ReduceAction343(85),
+                       new ReduceAction344(86),
+                       new ReduceAction345(86),
+                       new ReduceAction346(86),
+                       new ReduceAction347(87),
+                       new ReduceAction348(87),
+                       new ReduceAction349(87),
+                       new ReduceAction347(88),
+                       new ReduceAction351(88),
+                       new ReduceAction348(88),
+                       new ReduceAction349(88),
+                       new ReduceAction354(89),
+                       new ReduceAction310(90),
+                       new ReduceAction356(90),
+                       new ReduceAction357(91),
+                       new ReduceAction358(92),
+                       new ReduceAction359(92),
+                       new ReduceAction360(93),
+                       new ReduceAction361(93),
+                       new ReduceAction362(93),
+                       new ReduceAction363(93),
+                       new ReduceAction364(94),
+                       new ReduceAction365(94),
+                       new ReduceAction366(94),
                        new ReduceAction22(94),
-                       new ReduceAction363(95),
-                       new ReduceAction364(95),
-                       new ReduceAction365(95),
-                       new ReduceAction364(95),
-                       new ReduceAction367(96),
-                       new ReduceAction368(96),
-                       new ReduceAction369(96),
-                       new ReduceAction368(96),
-                       new ReduceAction371(97),
-                       new ReduceAction372(98),
+                       new ReduceAction368(95),
+                       new ReduceAction369(95),
+                       new ReduceAction370(95),
+                       new ReduceAction369(95),
+                       new ReduceAction372(96),
+                       new ReduceAction373(96),
+                       new ReduceAction374(96),
+                       new ReduceAction373(96),
+                       new ReduceAction376(97),
+                       new ReduceAction377(98),
                        new ReduceAction22(99),
-                       new ReduceAction374(99),
-                       new ReduceAction375(100),
-                       new ReduceAction375(100),
-                       new ReduceAction377(101),
-                       new ReduceAction378(101),
+                       new ReduceAction379(99),
+                       new ReduceAction380(100),
+                       new ReduceAction380(100),
+                       new ReduceAction382(101),
+                       new ReduceAction383(101),
                        new ReduceAction23(101),
                        new ReduceAction22(102),
-                       new ReduceAction381(102),
-                       new ReduceAction382(103),
-                       new ReduceAction383(103),
-                       new ReduceAction375(103),
+                       new ReduceAction386(102),
+                       new ReduceAction387(103),
+                       new ReduceAction388(103),
+                       new ReduceAction380(103),
                        new ReduceAction56(104),
                        new ReduceAction57(105),
                        new ReduceAction58(105),
@@ -402,21 +407,22 @@ redef class Parser
                        new ReduceAction61(105),
                        new ReduceAction64(105),
                        new ReduceAction65(105),
-                       new ReduceAction87(106),
-                       new ReduceAction88(106),
-                       new ReduceAction153(107),
-                       new ReduceAction154(107),
-                       new ReduceAction166(108),
-                       new ReduceAction166(109),
+                       new ReduceAction66(105),
+                       new ReduceAction90(106),
+                       new ReduceAction91(106),
+                       new ReduceAction157(107),
+                       new ReduceAction158(107),
+                       new ReduceAction170(108),
+                       new ReduceAction170(109),
                        new ReduceAction247(109),
-                       new ReduceAction166(110),
+                       new ReduceAction170(110),
                        new ReduceAction249(110),
                        new ReduceAction250(110),
                        new ReduceAction251(110),
                        new ReduceAction252(110),
-                       new ReduceAction166(111),
+                       new ReduceAction170(111),
                        new ReduceAction254(111),
-                       new ReduceAction166(112),
+                       new ReduceAction170(112),
                        new ReduceAction256(112),
                        new ReduceAction257(112),
                        new ReduceAction258(112),
@@ -427,17 +433,17 @@ redef class Parser
                        new ReduceAction263(112),
                        new ReduceAction264(112),
                        new ReduceAction265(112),
-                       new ReduceAction166(113),
+                       new ReduceAction170(113),
                        new ReduceAction267(113),
                        new ReduceAction268(113),
-                       new ReduceAction166(114),
+                       new ReduceAction170(114),
                        new ReduceAction270(114),
                        new ReduceAction271(114),
                        new ReduceAction272(114),
-                       new ReduceAction166(115),
+                       new ReduceAction170(115),
                        new ReduceAction274(115),
                        new ReduceAction275(115),
-                       new ReduceAction166(116),
+                       new ReduceAction170(116),
                        new ReduceAction277(116),
                        new ReduceAction278(116),
                        new ReduceAction279(116),
@@ -458,21 +464,18 @@ redef class Parser
                        new ReduceAction298(117),
                        new ReduceAction299(117),
                        new ReduceAction300(117),
-                       new ReduceAction166(117),
+                       new ReduceAction170(117),
                        new ReduceAction302(117),
                        new ReduceAction303(117),
                        new ReduceAction304(117),
                        new ReduceAction305(117),
-                       new ReduceAction153(118),
-                       new ReduceAction154(118),
-                       new ReduceAction155(118),
-                       new ReduceAction156(118),
-                       new ReduceAction166(119),
-                       new ReduceAction166(119),
-                       new ReduceAction176(119),
-                       new ReduceAction177(119),
-                       new ReduceAction178(119),
-                       new ReduceAction179(119),
+                       new ReduceAction306(117),
+                       new ReduceAction157(118),
+                       new ReduceAction158(118),
+                       new ReduceAction159(118),
+                       new ReduceAction160(118),
+                       new ReduceAction170(119),
+                       new ReduceAction170(119),
                        new ReduceAction180(119),
                        new ReduceAction181(119),
                        new ReduceAction182(119),
@@ -480,12 +483,12 @@ redef class Parser
                        new ReduceAction184(119),
                        new ReduceAction185(119),
                        new ReduceAction186(119),
-                       new ReduceAction166(119),
-                       new ReduceAction166(119),
-                       new ReduceAction166(119),
-                       new ReduceAction166(119),
-                       new ReduceAction166(119),
-                       new ReduceAction166(119),
+                       new ReduceAction170(119),
+                       new ReduceAction170(119),
+                       new ReduceAction170(119),
+                       new ReduceAction170(119),
+                       new ReduceAction170(119),
+                       new ReduceAction170(119),
                        new ReduceAction193(119),
                        new ReduceAction194(119),
                        new ReduceAction195(119),
@@ -508,17 +511,17 @@ redef class Parser
                        new ReduceAction218(120),
                        new ReduceAction219(120),
                        new ReduceAction220(120),
-                       new ReduceAction166(121),
-                       new ReduceAction166(122),
+                       new ReduceAction170(121),
+                       new ReduceAction170(122),
                        new ReduceAction247(122),
-                       new ReduceAction166(123),
+                       new ReduceAction170(123),
                        new ReduceAction249(123),
                        new ReduceAction250(123),
                        new ReduceAction251(123),
                        new ReduceAction252(123),
-                       new ReduceAction166(124),
+                       new ReduceAction170(124),
                        new ReduceAction254(124),
-                       new ReduceAction166(125),
+                       new ReduceAction170(125),
                        new ReduceAction256(125),
                        new ReduceAction257(125),
                        new ReduceAction258(125),
@@ -529,17 +532,17 @@ redef class Parser
                        new ReduceAction263(125),
                        new ReduceAction264(125),
                        new ReduceAction265(125),
-                       new ReduceAction166(126),
+                       new ReduceAction170(126),
                        new ReduceAction267(126),
                        new ReduceAction268(126),
-                       new ReduceAction166(127),
+                       new ReduceAction170(127),
                        new ReduceAction270(127),
                        new ReduceAction271(127),
                        new ReduceAction272(127),
-                       new ReduceAction166(128),
+                       new ReduceAction170(128),
                        new ReduceAction274(128),
                        new ReduceAction275(128),
-                       new ReduceAction166(129),
+                       new ReduceAction170(129),
                        new ReduceAction277(129),
                        new ReduceAction278(129),
                        new ReduceAction279(129),
@@ -561,33 +564,34 @@ redef class Parser
                        new ReduceAction298(130),
                        new ReduceAction299(130),
                        new ReduceAction300(130),
-                       new ReduceAction166(130),
+                       new ReduceAction170(130),
                        new ReduceAction303(130),
                        new ReduceAction304(130),
                        new ReduceAction305(130),
-                       new ReduceAction315(131),
+                       new ReduceAction306(130),
                        new ReduceAction316(131),
-                       new ReduceAction317(132),
+                       new ReduceAction317(131),
+                       new ReduceAction318(132),
                        new ReduceAction22(132),
-                       new ReduceAction319(133),
-                       new ReduceAction331(134),
-                       new ReduceAction332(134),
-                       new ReduceAction334(135),
-                       new ReduceAction335(135),
-                       new ReduceAction335(135),
-                       new ReduceAction153(136),
-                       new ReduceAction154(136),
-                       new ReduceAction166(137),
-                       new ReduceAction166(138),
+                       new ReduceAction320(133),
+                       new ReduceAction337(134),
+                       new ReduceAction338(134),
+                       new ReduceAction340(135),
+                       new ReduceAction341(135),
+                       new ReduceAction341(135),
+                       new ReduceAction157(136),
+                       new ReduceAction158(136),
+                       new ReduceAction170(137),
+                       new ReduceAction170(138),
                        new ReduceAction247(138),
-                       new ReduceAction166(139),
+                       new ReduceAction170(139),
                        new ReduceAction249(139),
                        new ReduceAction250(139),
                        new ReduceAction251(139),
                        new ReduceAction252(139),
-                       new ReduceAction166(140),
+                       new ReduceAction170(140),
                        new ReduceAction254(140),
-                       new ReduceAction166(141),
+                       new ReduceAction170(141),
                        new ReduceAction256(141),
                        new ReduceAction257(141),
                        new ReduceAction258(141),
@@ -598,23 +602,23 @@ redef class Parser
                        new ReduceAction263(141),
                        new ReduceAction264(141),
                        new ReduceAction265(141),
-                       new ReduceAction166(142),
+                       new ReduceAction170(142),
                        new ReduceAction267(142),
                        new ReduceAction268(142),
-                       new ReduceAction166(143),
+                       new ReduceAction170(143),
                        new ReduceAction270(143),
                        new ReduceAction271(143),
                        new ReduceAction272(143),
-                       new ReduceAction166(144),
+                       new ReduceAction170(144),
                        new ReduceAction274(144),
                        new ReduceAction275(144),
-                       new ReduceAction166(145),
+                       new ReduceAction170(145),
                        new ReduceAction277(145),
-                       new ReduceAction600(145),
-                       new ReduceAction601(146),
-                       new ReduceAction602(146),
+                       new ReduceAction604(145),
+                       new ReduceAction605(146),
+                       new ReduceAction606(146),
                        new ReduceAction195(146),
-                       new ReduceAction604(146),
+                       new ReduceAction608(146),
                        new ReduceAction288(146),
                        new ReduceAction292(146),
                        new ReduceAction293(146),
@@ -625,22 +629,19 @@ redef class Parser
                        new ReduceAction298(146),
                        new ReduceAction299(146),
                        new ReduceAction300(146),
-                       new ReduceAction166(146),
+                       new ReduceAction170(146),
                        new ReduceAction303(146),
                        new ReduceAction304(146),
                        new ReduceAction305(146),
-                       new ReduceAction619(147),
-                       new ReduceAction620(147),
-                       new ReduceAction163(148),
-                       new ReduceAction164(148),
-                       new ReduceAction165(148),
-                       new ReduceAction166(148),
-                       new ReduceAction166(149),
-                       new ReduceAction166(149),
-                       new ReduceAction176(149),
-                       new ReduceAction177(149),
-                       new ReduceAction178(149),
-                       new ReduceAction179(149),
+                       new ReduceAction306(146),
+                       new ReduceAction624(147),
+                       new ReduceAction625(147),
+                       new ReduceAction167(148),
+                       new ReduceAction168(148),
+                       new ReduceAction169(148),
+                       new ReduceAction170(148),
+                       new ReduceAction170(149),
+                       new ReduceAction170(149),
                        new ReduceAction180(149),
                        new ReduceAction181(149),
                        new ReduceAction182(149),
@@ -648,12 +649,12 @@ redef class Parser
                        new ReduceAction184(149),
                        new ReduceAction185(149),
                        new ReduceAction186(149),
-                       new ReduceAction166(149),
-                       new ReduceAction166(149),
-                       new ReduceAction166(149),
-                       new ReduceAction166(149),
-                       new ReduceAction166(149),
-                       new ReduceAction166(149),
+                       new ReduceAction170(149),
+                       new ReduceAction170(149),
+                       new ReduceAction170(149),
+                       new ReduceAction170(149),
+                       new ReduceAction170(149),
+                       new ReduceAction170(149),
                        new ReduceAction193(149),
                        new ReduceAction194(149),
                        new ReduceAction195(149),
@@ -666,91 +667,97 @@ redef class Parser
                        new ReduceAction202(149),
                        new ReduceAction201(149),
                        new ReduceAction204(149),
-                       new ReduceAction206(150),
-                       new ReduceAction207(151),
-                       new ReduceAction208(151),
-                       new ReduceAction209(151),
-                       new ReduceAction210(151),
-                       new ReduceAction211(152),
-                       new ReduceAction212(152),
-                       new ReduceAction213(152),
-                       new ReduceAction214(152),
-                       new ReduceAction215(152),
-                       new ReduceAction216(152),
-                       new ReduceAction217(152),
-                       new ReduceAction218(152),
-                       new ReduceAction219(152),
-                       new ReduceAction220(152),
-                       new ReduceAction223(153),
-                       new ReduceAction224(153),
-                       new ReduceAction225(154),
-                       new ReduceAction232(155),
-                       new ReduceAction233(155),
-                       new ReduceAction234(156),
-                       new ReduceAction235(156),
-                       new ReduceAction236(157),
-                       new ReduceAction237(157),
-                       new ReduceAction238(157),
-                       new ReduceAction239(157),
-                       new ReduceAction240(158),
-                       new ReduceAction241(158),
-                       new ReduceAction166(159),
-                       new ReduceAction166(160),
-                       new ReduceAction166(161),
-                       new ReduceAction166(161),
-                       new ReduceAction176(161),
-                       new ReduceAction177(161),
-                       new ReduceAction178(161),
-                       new ReduceAction179(161),
-                       new ReduceAction180(161),
-                       new ReduceAction181(161),
-                       new ReduceAction182(161),
-                       new ReduceAction183(161),
-                       new ReduceAction184(161),
-                       new ReduceAction185(161),
-                       new ReduceAction186(161),
-                       new ReduceAction166(161),
-                       new ReduceAction166(161),
-                       new ReduceAction166(161),
-                       new ReduceAction166(161),
-                       new ReduceAction166(161),
-                       new ReduceAction166(161),
-                       new ReduceAction193(161),
-                       new ReduceAction194(161),
-                       new ReduceAction195(161),
-                       new ReduceAction196(161),
-                       new ReduceAction197(161),
-                       new ReduceAction198(161),
-                       new ReduceAction199(161),
-                       new ReduceAction198(161),
-                       new ReduceAction201(161),
-                       new ReduceAction202(161),
-                       new ReduceAction201(161),
-                       new ReduceAction204(161),
-                       new ReduceAction211(162),
-                       new ReduceAction212(162),
-                       new ReduceAction213(162),
-                       new ReduceAction214(162),
-                       new ReduceAction215(162),
-                       new ReduceAction216(162),
-                       new ReduceAction217(162),
-                       new ReduceAction218(162),
-                       new ReduceAction219(162),
-                       new ReduceAction220(162),
-                       new ReduceAction166(163),
-                       new ReduceAction166(164),
-                       new ReduceAction163(165),
-                       new ReduceAction164(165),
-                       new ReduceAction165(165),
-                       new ReduceAction163(166),
-                       new ReduceAction164(166),
-                       new ReduceAction165(166),
-                       new ReduceAction166(167),
-                       new ReduceAction166(167),
-                       new ReduceAction176(167),
-                       new ReduceAction177(167),
-                       new ReduceAction178(167),
-                       new ReduceAction179(167),
+                       new ReduceAction207(150),
+                       new ReduceAction208(150),
+                       new ReduceAction209(150),
+                       new ReduceAction210(150),
+                       new ReduceAction211(151),
+                       new ReduceAction212(151),
+                       new ReduceAction213(151),
+                       new ReduceAction214(151),
+                       new ReduceAction215(151),
+                       new ReduceAction216(151),
+                       new ReduceAction217(151),
+                       new ReduceAction218(151),
+                       new ReduceAction219(151),
+                       new ReduceAction220(151),
+                       new ReduceAction223(152),
+                       new ReduceAction224(152),
+                       new ReduceAction225(153),
+                       new ReduceAction232(154),
+                       new ReduceAction233(154),
+                       new ReduceAction234(155),
+                       new ReduceAction235(155),
+                       new ReduceAction236(156),
+                       new ReduceAction237(156),
+                       new ReduceAction238(156),
+                       new ReduceAction239(156),
+                       new ReduceAction240(157),
+                       new ReduceAction241(157),
+                       new ReduceAction170(158),
+                       new ReduceAction170(159),
+                       new ReduceAction170(160),
+                       new ReduceAction170(160),
+                       new ReduceAction180(160),
+                       new ReduceAction181(160),
+                       new ReduceAction182(160),
+                       new ReduceAction183(160),
+                       new ReduceAction184(160),
+                       new ReduceAction185(160),
+                       new ReduceAction186(160),
+                       new ReduceAction170(160),
+                       new ReduceAction170(160),
+                       new ReduceAction170(160),
+                       new ReduceAction170(160),
+                       new ReduceAction170(160),
+                       new ReduceAction170(160),
+                       new ReduceAction193(160),
+                       new ReduceAction194(160),
+                       new ReduceAction195(160),
+                       new ReduceAction196(160),
+                       new ReduceAction197(160),
+                       new ReduceAction198(160),
+                       new ReduceAction199(160),
+                       new ReduceAction198(160),
+                       new ReduceAction201(160),
+                       new ReduceAction202(160),
+                       new ReduceAction201(160),
+                       new ReduceAction204(160),
+                       new ReduceAction211(161),
+                       new ReduceAction212(161),
+                       new ReduceAction213(161),
+                       new ReduceAction214(161),
+                       new ReduceAction215(161),
+                       new ReduceAction216(161),
+                       new ReduceAction217(161),
+                       new ReduceAction218(161),
+                       new ReduceAction219(161),
+                       new ReduceAction220(161),
+                       new ReduceAction170(162),
+                       new ReduceAction170(163),
+                       new ReduceAction167(164),
+                       new ReduceAction168(164),
+                       new ReduceAction169(164),
+                       new ReduceAction167(165),
+                       new ReduceAction168(165),
+                       new ReduceAction169(165),
+                       new ReduceAction170(166),
+                       new ReduceAction170(166),
+                       new ReduceAction180(166),
+                       new ReduceAction181(166),
+                       new ReduceAction182(166),
+                       new ReduceAction183(166),
+                       new ReduceAction184(166),
+                       new ReduceAction185(166),
+                       new ReduceAction186(166),
+                       new ReduceAction170(166),
+                       new ReduceAction170(166),
+                       new ReduceAction170(166),
+                       new ReduceAction170(166),
+                       new ReduceAction170(166),
+                       new ReduceAction204(166),
+                       new ReduceAction170(167),
+                       new ReduceAction170(167),
                        new ReduceAction180(167),
                        new ReduceAction181(167),
                        new ReduceAction182(167),
@@ -758,18 +765,14 @@ redef class Parser
                        new ReduceAction184(167),
                        new ReduceAction185(167),
                        new ReduceAction186(167),
-                       new ReduceAction166(167),
-                       new ReduceAction166(167),
-                       new ReduceAction166(167),
-                       new ReduceAction166(167),
-                       new ReduceAction166(167),
+                       new ReduceAction170(167),
+                       new ReduceAction170(167),
+                       new ReduceAction170(167),
+                       new ReduceAction170(167),
+                       new ReduceAction170(167),
                        new ReduceAction204(167),
-                       new ReduceAction166(168),
-                       new ReduceAction166(168),
-                       new ReduceAction176(168),
-                       new ReduceAction177(168),
-                       new ReduceAction178(168),
-                       new ReduceAction179(168),
+                       new ReduceAction170(168),
+                       new ReduceAction170(168),
                        new ReduceAction180(168),
                        new ReduceAction181(168),
                        new ReduceAction182(168),
@@ -777,18 +780,14 @@ redef class Parser
                        new ReduceAction184(168),
                        new ReduceAction185(168),
                        new ReduceAction186(168),
-                       new ReduceAction166(168),
-                       new ReduceAction166(168),
-                       new ReduceAction166(168),
-                       new ReduceAction166(168),
-                       new ReduceAction166(168),
+                       new ReduceAction170(168),
+                       new ReduceAction170(168),
+                       new ReduceAction170(168),
+                       new ReduceAction170(168),
+                       new ReduceAction170(168),
                        new ReduceAction204(168),
-                       new ReduceAction166(169),
-                       new ReduceAction166(169),
-                       new ReduceAction176(169),
-                       new ReduceAction177(169),
-                       new ReduceAction178(169),
-                       new ReduceAction179(169),
+                       new ReduceAction170(169),
+                       new ReduceAction170(169),
                        new ReduceAction180(169),
                        new ReduceAction181(169),
                        new ReduceAction182(169),
@@ -796,76 +795,51 @@ redef class Parser
                        new ReduceAction184(169),
                        new ReduceAction185(169),
                        new ReduceAction186(169),
-                       new ReduceAction166(169),
-                       new ReduceAction166(169),
-                       new ReduceAction166(169),
-                       new ReduceAction166(169),
-                       new ReduceAction166(169),
+                       new ReduceAction170(169),
+                       new ReduceAction170(169),
+                       new ReduceAction170(169),
+                       new ReduceAction170(169),
+                       new ReduceAction170(169),
                        new ReduceAction204(169),
-                       new ReduceAction166(170),
-                       new ReduceAction166(170),
-                       new ReduceAction176(170),
-                       new ReduceAction177(170),
-                       new ReduceAction178(170),
-                       new ReduceAction179(170),
-                       new ReduceAction180(170),
-                       new ReduceAction181(170),
-                       new ReduceAction182(170),
-                       new ReduceAction183(170),
-                       new ReduceAction184(170),
-                       new ReduceAction185(170),
-                       new ReduceAction186(170),
-                       new ReduceAction166(170),
-                       new ReduceAction166(170),
-                       new ReduceAction166(170),
-                       new ReduceAction166(170),
-                       new ReduceAction166(170),
-                       new ReduceAction204(170),
-                       new ReduceAction325(171),
-                       new ReduceAction326(171),
-                       new ReduceAction327(171),
-                       new ReduceAction328(171),
-                       new ReduceAction329(171),
-                       new ReduceAction338(172),
-                       new ReduceAction341(172),
-                       new ReduceAction818(173),
-                       new ReduceAction819(173),
-                       new ReduceAction820(174),
-                       new ReduceAction821(174),
-                       new ReduceAction822(175),
-                       new ReduceAction823(175),
-                       new ReduceAction824(176),
-                       new ReduceAction825(176),
-                       new ReduceAction826(177),
-                       new ReduceAction827(177),
-                       new ReduceAction828(178),
-                       new ReduceAction829(178),
-                       new ReduceAction830(179),
-                       new ReduceAction831(179),
-                       new ReduceAction832(180),
-                       new ReduceAction833(180),
-                       new ReduceAction157(181),
-                       new ReduceAction835(181),
-                       new ReduceAction836(182),
-                       new ReduceAction837(182),
-                       new ReduceAction838(183),
-                       new ReduceAction839(183),
-                       new ReduceAction322(184),
-                       new ReduceAction841(184),
-                       new ReduceAction322(185),
-                       new ReduceAction841(185),
-                       new ReduceAction331(186),
-                       new ReduceAction845(186),
-                       new ReduceAction836(187),
-                       new ReduceAction837(187),
-                       new ReduceAction353(188),
-                       new ReduceAction849(188),
-                       new ReduceAction850(189),
-                       new ReduceAction851(189),
-                       new ReduceAction852(190),
-                       new ReduceAction853(190),
-                       new ReduceAction322(191),
-                       new ReduceAction841(191)
+                       new ReduceAction344(170),
+                       new ReduceAction792(171),
+                       new ReduceAction793(171),
+                       new ReduceAction794(172),
+                       new ReduceAction795(172),
+                       new ReduceAction796(173),
+                       new ReduceAction797(173),
+                       new ReduceAction798(174),
+                       new ReduceAction799(174),
+                       new ReduceAction800(175),
+                       new ReduceAction801(175),
+                       new ReduceAction802(176),
+                       new ReduceAction803(176),
+                       new ReduceAction804(177),
+                       new ReduceAction805(177),
+                       new ReduceAction806(178),
+                       new ReduceAction807(178),
+                       new ReduceAction161(179),
+                       new ReduceAction809(179),
+                       new ReduceAction810(180),
+                       new ReduceAction811(180),
+                       new ReduceAction812(181),
+                       new ReduceAction813(181),
+                       new ReduceAction323(182),
+                       new ReduceAction815(182),
+                       new ReduceAction323(183),
+                       new ReduceAction815(183),
+                       new ReduceAction323(184),
+                       new ReduceAction815(184),
+                       new ReduceAction337(185),
+                       new ReduceAction821(185),
+                       new ReduceAction810(186),
+                       new ReduceAction811(186),
+                       new ReduceAction358(187),
+                       new ReduceAction825(187),
+                       new ReduceAction826(188),
+                       new ReduceAction827(188),
+                       new ReduceAction828(189),
+                       new ReduceAction829(189)
                )
        end
 end
@@ -1379,6 +1353,8 @@ private class ReduceAction16
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
+                                       var nodearraylist8 = p.pop
+                                       var nodearraylist7 = p.pop
                                        var nodearraylist6 = p.pop
                                        var nodearraylist5 = p.pop
                                        var nodearraylist4 = p.pop
@@ -1387,17 +1363,23 @@ private class ReduceAction16
                                        var nodearraylist1 = p.pop
                                        var pdocnode2 = nodearraylist1
                                        assert pdocnode2 isa nullable ADoc
-                                       var tkwmodulenode3 = nodearraylist2
-                                       assert tkwmodulenode3 isa nullable TKwmodule
-                                       var pmodulenamenode4 = nodearraylist4
-                                       assert pmodulenamenode4 isa nullable AModuleName
-                                       var pannotationsnode5 = nodearraylist5
-                                       assert pannotationsnode5 isa nullable AAnnotations
+                                       var tkwredefnode3 = nodearraylist2
+                                       assert tkwredefnode3 isa nullable TKwredef
+                                       var pvisibilitynode4 = nodearraylist3
+                                       assert pvisibilitynode4 isa nullable AVisibility
+                                       var tkwmodulenode5 = nodearraylist4
+                                       assert tkwmodulenode5 isa nullable TKwmodule
+                                       var pmodulenamenode6 = nodearraylist6
+                                       assert pmodulenamenode6 isa nullable AModuleName
+                                       var pannotationsnode7 = nodearraylist7
+                                       assert pannotationsnode7 isa nullable AAnnotations
                                        var pmoduledeclnode1: nullable AModuledecl = new AModuledecl.init_amoduledecl(
                                                pdocnode2,
-                                               tkwmodulenode3,
-                                               pmodulenamenode4,
-                                               pannotationsnode5
+                                               tkwredefnode3,
+                                               pvisibilitynode4,
+                                               tkwmodulenode5,
+                                               pmodulenamenode6,
+                                               pannotationsnode7
                                        )
                                        node_list = pmoduledeclnode1
                                        p.push(p.go_to(_goto), node_list)
@@ -3045,12 +3027,12 @@ private class ReduceAction64
                                        assert pmethidnode6 isa nullable AMethid
                                        var psignaturenode7 = nodearraylist6
                                        assert psignaturenode7 isa nullable ASignature
-                                       var tstringnode8 = nodearraylist9
-                                       assert tstringnode8 isa nullable TString
-                                       var pexterncallsnode9 = nodearraylist10
-                                       assert pexterncallsnode9 isa nullable AExternCalls
-                                       var pexterncodeblocknode10 = nodearraylist11
-                                       assert pexterncodeblocknode10 isa nullable AExternCodeBlock
+                                       var tstringnode9 = nodearraylist9
+                                       assert tstringnode9 isa nullable TString
+                                       var pexterncallsnode10 = nodearraylist10
+                                       assert pexterncallsnode10 isa nullable AExternCalls
+                                       var pexterncodeblocknode11 = nodearraylist11
+                                       assert pexterncodeblocknode11 isa nullable AExternCodeBlock
                                        var ppropdefnode1: nullable AExternMethPropdef = new AExternMethPropdef.init_aexternmethpropdef(
                                                pdocnode2,
                                                tkwredefnode3,
@@ -3058,9 +3040,10 @@ private class ReduceAction64
                                                tkwmethnode5,
                                                pmethidnode6,
                                                psignaturenode7,
-                                               tstringnode8,
-                                               pexterncallsnode9,
-                                               pexterncodeblocknode10
+                                               null,
+                                               tstringnode9,
+                                               pexterncallsnode10,
+                                               pexterncodeblocknode11
                                        )
                                        node_list = ppropdefnode1
                                        p.push(p.go_to(_goto), node_list)
@@ -3091,10 +3074,10 @@ private class ReduceAction65
                                        assert pmethidnode6 isa nullable AMethid
                                        var psignaturenode7 = nodearraylist6
                                        assert psignaturenode7 isa nullable ASignature
-                                       var pexterncallsnode9 = nodearraylist7
-                                       assert pexterncallsnode9 isa nullable AExternCalls
-                                       var pexterncodeblocknode10 = nodearraylist8
-                                       assert pexterncodeblocknode10 isa nullable AExternCodeBlock
+                                       var pexterncallsnode10 = nodearraylist7
+                                       assert pexterncallsnode10 isa nullable AExternCalls
+                                       var pexterncodeblocknode11 = nodearraylist8
+                                       assert pexterncodeblocknode11 isa nullable AExternCodeBlock
                                        var ppropdefnode1: nullable AExternMethPropdef = new AExternMethPropdef.init_aexternmethpropdef(
                                                pdocnode2,
                                                tkwredefnode3,
@@ -3103,8 +3086,9 @@ private class ReduceAction65
                                                pmethidnode6,
                                                psignaturenode7,
                                                null,
-                                               pexterncallsnode9,
-                                               pexterncodeblocknode10
+                                               null,
+                                               pexterncallsnode10,
+                                               pexterncodeblocknode11
                                        )
                                        node_list = ppropdefnode1
                                        p.push(p.go_to(_goto), node_list)
@@ -3115,6 +3099,54 @@ private class ReduceAction66
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
+                                       var nodearraylist9 = p.pop
+                                       var nodearraylist8 = p.pop
+                                       var nodearraylist7 = p.pop
+                                       var nodearraylist6 = p.pop
+                                       var nodearraylist5 = p.pop
+                                       var nodearraylist4 = p.pop
+                                       var nodearraylist3 = p.pop
+                                       var nodearraylist2 = p.pop
+                                       var nodearraylist1 = p.pop
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var tkwredefnode3 = nodearraylist2
+                                       assert tkwredefnode3 isa nullable TKwredef
+                                       var pvisibilitynode4 = nodearraylist3
+                                       assert pvisibilitynode4 isa nullable AVisibility
+                                       var tkwmethnode5 = nodearraylist4
+                                       assert tkwmethnode5 isa nullable TKwmeth
+                                       var pmethidnode6 = nodearraylist5
+                                       assert pmethidnode6 isa nullable AMethid
+                                       var psignaturenode7 = nodearraylist6
+                                       assert psignaturenode7 isa nullable ASignature
+                                       var pannotationsnode8 = nodearraylist7
+                                       assert pannotationsnode8 isa nullable AAnnotations
+                                       var pexterncallsnode10 = nodearraylist8
+                                       assert pexterncallsnode10 isa nullable AExternCalls
+                                       var pexterncodeblocknode11 = nodearraylist9
+                                       assert pexterncodeblocknode11 isa nullable AExternCodeBlock
+                                       var ppropdefnode1: nullable AExternMethPropdef = new AExternMethPropdef.init_aexternmethpropdef(
+                                               pdocnode2,
+                                               tkwredefnode3,
+                                               pvisibilitynode4,
+                                               tkwmethnode5,
+                                               pmethidnode6,
+                                               psignaturenode7,
+                                               pannotationsnode8,
+                                               null,
+                                               pexterncallsnode10,
+                                               pexterncodeblocknode11
+                                       )
+                                       node_list = ppropdefnode1
+                                       p.push(p.go_to(_goto), node_list)
+       end
+end
+private class ReduceAction67
+       super ReduceAction
+       redef fun action(p: Parser)
+       do
+                                       var node_list: nullable Object = null
                                        var nodearraylist6 = p.pop
                                        var nodearraylist5 = p.pop
                                        var nodearraylist4 = p.pop
@@ -3150,7 +3182,7 @@ private class ReduceAction66
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction67
+private class ReduceAction68
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3193,7 +3225,7 @@ private class ReduceAction67
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction68
+private class ReduceAction69
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3236,7 +3268,7 @@ private class ReduceAction68
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction69
+private class ReduceAction70
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3282,7 +3314,7 @@ private class ReduceAction69
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction70
+private class ReduceAction71
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3327,7 +3359,7 @@ private class ReduceAction70
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction71
+private class ReduceAction72
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3375,7 +3407,7 @@ private class ReduceAction71
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction72
+private class ReduceAction73
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3423,7 +3455,7 @@ private class ReduceAction72
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction73
+private class ReduceAction74
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3474,7 +3506,7 @@ private class ReduceAction73
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction74
+private class ReduceAction75
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3517,7 +3549,7 @@ private class ReduceAction74
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction75
+private class ReduceAction76
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3563,7 +3595,7 @@ private class ReduceAction75
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction76
+private class ReduceAction77
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3611,7 +3643,7 @@ private class ReduceAction76
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction77
+private class ReduceAction78
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3662,7 +3694,7 @@ private class ReduceAction77
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction78
+private class ReduceAction79
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3701,7 +3733,7 @@ private class ReduceAction78
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction79
+private class ReduceAction80
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3743,7 +3775,7 @@ private class ReduceAction79
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction80
+private class ReduceAction81
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3785,7 +3817,7 @@ private class ReduceAction80
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction81
+private class ReduceAction82
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3830,7 +3862,7 @@ private class ReduceAction81
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction82
+private class ReduceAction83
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3869,7 +3901,7 @@ private class ReduceAction82
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction83
+private class ReduceAction84
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3894,12 +3926,12 @@ private class ReduceAction83
                                        assert tkwnewnode5 isa nullable TKwnew
                                        var psignaturenode7 = nodearraylist5
                                        assert psignaturenode7 isa nullable ASignature
-                                       var tstringnode8 = nodearraylist8
-                                       assert tstringnode8 isa nullable TString
-                                       var pexterncallsnode9 = nodearraylist9
-                                       assert pexterncallsnode9 isa nullable AExternCalls
-                                       var pexterncodeblocknode10 = nodearraylist10
-                                       assert pexterncodeblocknode10 isa nullable AExternCodeBlock
+                                       var tstringnode9 = nodearraylist8
+                                       assert tstringnode9 isa nullable TString
+                                       var pexterncallsnode10 = nodearraylist9
+                                       assert pexterncallsnode10 isa nullable AExternCalls
+                                       var pexterncodeblocknode11 = nodearraylist10
+                                       assert pexterncodeblocknode11 isa nullable AExternCodeBlock
                                        var ppropdefnode1: nullable AExternInitPropdef = new AExternInitPropdef.init_aexterninitpropdef(
                                                pdocnode2,
                                                tkwredefnode3,
@@ -3907,15 +3939,16 @@ private class ReduceAction83
                                                tkwnewnode5,
                                                null,
                                                psignaturenode7,
-                                               tstringnode8,
-                                               pexterncallsnode9,
-                                               pexterncodeblocknode10
+                                               null,
+                                               tstringnode9,
+                                               pexterncallsnode10,
+                                               pexterncodeblocknode11
                                        )
                                        node_list = ppropdefnode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction84
+private class ReduceAction85
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3943,12 +3976,12 @@ private class ReduceAction84
                                        assert pmethidnode6 isa nullable AMethid
                                        var psignaturenode7 = nodearraylist6
                                        assert psignaturenode7 isa nullable ASignature
-                                       var tstringnode8 = nodearraylist9
-                                       assert tstringnode8 isa nullable TString
-                                       var pexterncallsnode9 = nodearraylist10
-                                       assert pexterncallsnode9 isa nullable AExternCalls
-                                       var pexterncodeblocknode10 = nodearraylist11
-                                       assert pexterncodeblocknode10 isa nullable AExternCodeBlock
+                                       var tstringnode9 = nodearraylist9
+                                       assert tstringnode9 isa nullable TString
+                                       var pexterncallsnode10 = nodearraylist10
+                                       assert pexterncallsnode10 isa nullable AExternCalls
+                                       var pexterncodeblocknode11 = nodearraylist11
+                                       assert pexterncodeblocknode11 isa nullable AExternCodeBlock
                                        var ppropdefnode1: nullable AExternInitPropdef = new AExternInitPropdef.init_aexterninitpropdef(
                                                pdocnode2,
                                                tkwredefnode3,
@@ -3956,15 +3989,103 @@ private class ReduceAction84
                                                tkwnewnode5,
                                                pmethidnode6,
                                                psignaturenode7,
-                                               tstringnode8,
-                                               pexterncallsnode9,
-                                               pexterncodeblocknode10
+                                               null,
+                                               tstringnode9,
+                                               pexterncallsnode10,
+                                               pexterncodeblocknode11
                                        )
                                        node_list = ppropdefnode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction85
+private class ReduceAction86
+       super ReduceAction
+       redef fun action(p: Parser)
+       do
+                                       var node_list: nullable Object = null
+                                       var nodearraylist7 = p.pop
+                                       var nodearraylist6 = p.pop
+                                       var nodearraylist5 = p.pop
+                                       var nodearraylist4 = p.pop
+                                       var nodearraylist3 = p.pop
+                                       var nodearraylist2 = p.pop
+                                       var nodearraylist1 = p.pop
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var tkwredefnode3 = nodearraylist2
+                                       assert tkwredefnode3 isa nullable TKwredef
+                                       var pvisibilitynode4 = nodearraylist3
+                                       assert pvisibilitynode4 isa nullable AVisibility
+                                       var tkwnewnode5 = nodearraylist4
+                                       assert tkwnewnode5 isa nullable TKwnew
+                                       var psignaturenode7 = nodearraylist5
+                                       assert psignaturenode7 isa nullable ASignature
+                                       var pexterncallsnode10 = nodearraylist6
+                                       assert pexterncallsnode10 isa nullable AExternCalls
+                                       var pexterncodeblocknode11 = nodearraylist7
+                                       assert pexterncodeblocknode11 isa nullable AExternCodeBlock
+                                       var ppropdefnode1: nullable AExternInitPropdef = new AExternInitPropdef.init_aexterninitpropdef(
+                                               pdocnode2,
+                                               tkwredefnode3,
+                                               pvisibilitynode4,
+                                               tkwnewnode5,
+                                               null,
+                                               psignaturenode7,
+                                               null,
+                                               null,
+                                               pexterncallsnode10,
+                                               pexterncodeblocknode11
+                                       )
+                                       node_list = ppropdefnode1
+                                       p.push(p.go_to(_goto), node_list)
+       end
+end
+private class ReduceAction87
+       super ReduceAction
+       redef fun action(p: Parser)
+       do
+                                       var node_list: nullable Object = null
+                                       var nodearraylist8 = p.pop
+                                       var nodearraylist7 = p.pop
+                                       var nodearraylist6 = p.pop
+                                       var nodearraylist5 = p.pop
+                                       var nodearraylist4 = p.pop
+                                       var nodearraylist3 = p.pop
+                                       var nodearraylist2 = p.pop
+                                       var nodearraylist1 = p.pop
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var tkwredefnode3 = nodearraylist2
+                                       assert tkwredefnode3 isa nullable TKwredef
+                                       var pvisibilitynode4 = nodearraylist3
+                                       assert pvisibilitynode4 isa nullable AVisibility
+                                       var tkwnewnode5 = nodearraylist4
+                                       assert tkwnewnode5 isa nullable TKwnew
+                                       var pmethidnode6 = nodearraylist5
+                                       assert pmethidnode6 isa nullable AMethid
+                                       var psignaturenode7 = nodearraylist6
+                                       assert psignaturenode7 isa nullable ASignature
+                                       var pexterncallsnode10 = nodearraylist7
+                                       assert pexterncallsnode10 isa nullable AExternCalls
+                                       var pexterncodeblocknode11 = nodearraylist8
+                                       assert pexterncodeblocknode11 isa nullable AExternCodeBlock
+                                       var ppropdefnode1: nullable AExternInitPropdef = new AExternInitPropdef.init_aexterninitpropdef(
+                                               pdocnode2,
+                                               tkwredefnode3,
+                                               pvisibilitynode4,
+                                               tkwnewnode5,
+                                               pmethidnode6,
+                                               psignaturenode7,
+                                               null,
+                                               null,
+                                               pexterncallsnode10,
+                                               pexterncodeblocknode11
+                                       )
+                                       node_list = ppropdefnode1
+                                       p.push(p.go_to(_goto), node_list)
+       end
+end
+private class ReduceAction88
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -3987,12 +4108,12 @@ private class ReduceAction85
                                        assert tkwnewnode5 isa nullable TKwnew
                                        var psignaturenode7 = nodearraylist5
                                        assert psignaturenode7 isa nullable ASignature
-                                       var tstringnode8 = nodearraylist6
-                                       assert tstringnode8 isa nullable TString
-                                       var pexterncallsnode9 = nodearraylist7
-                                       assert pexterncallsnode9 isa nullable AExternCalls
-                                       var pexterncodeblocknode10 = nodearraylist8
-                                       assert pexterncodeblocknode10 isa nullable AExternCodeBlock
+                                       var pannotationsnode8 = nodearraylist6
+                                       assert pannotationsnode8 isa nullable AAnnotations
+                                       var pexterncallsnode10 = nodearraylist7
+                                       assert pexterncallsnode10 isa nullable AExternCalls
+                                       var pexterncodeblocknode11 = nodearraylist8
+                                       assert pexterncodeblocknode11 isa nullable AExternCodeBlock
                                        var ppropdefnode1: nullable AExternInitPropdef = new AExternInitPropdef.init_aexterninitpropdef(
                                                pdocnode2,
                                                tkwredefnode3,
@@ -4000,15 +4121,16 @@ private class ReduceAction85
                                                tkwnewnode5,
                                                null,
                                                psignaturenode7,
-                                               tstringnode8,
-                                               pexterncallsnode9,
-                                               pexterncodeblocknode10
+                                               pannotationsnode8,
+                                               null,
+                                               pexterncallsnode10,
+                                               pexterncodeblocknode11
                                        )
                                        node_list = ppropdefnode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction86
+private class ReduceAction89
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4034,12 +4156,12 @@ private class ReduceAction86
                                        assert pmethidnode6 isa nullable AMethid
                                        var psignaturenode7 = nodearraylist6
                                        assert psignaturenode7 isa nullable ASignature
-                                       var tstringnode8 = nodearraylist7
-                                       assert tstringnode8 isa nullable TString
-                                       var pexterncallsnode9 = nodearraylist8
-                                       assert pexterncallsnode9 isa nullable AExternCalls
-                                       var pexterncodeblocknode10 = nodearraylist9
-                                       assert pexterncodeblocknode10 isa nullable AExternCodeBlock
+                                       var pannotationsnode8 = nodearraylist7
+                                       assert pannotationsnode8 isa nullable AAnnotations
+                                       var pexterncallsnode10 = nodearraylist8
+                                       assert pexterncallsnode10 isa nullable AExternCalls
+                                       var pexterncodeblocknode11 = nodearraylist9
+                                       assert pexterncodeblocknode11 isa nullable AExternCodeBlock
                                        var ppropdefnode1: nullable AExternInitPropdef = new AExternInitPropdef.init_aexterninitpropdef(
                                                pdocnode2,
                                                tkwredefnode3,
@@ -4047,15 +4169,16 @@ private class ReduceAction86
                                                tkwnewnode5,
                                                pmethidnode6,
                                                psignaturenode7,
-                                               tstringnode8,
-                                               pexterncallsnode9,
-                                               pexterncodeblocknode10
+                                               pannotationsnode8,
+                                               null,
+                                               pexterncallsnode10,
+                                               pexterncodeblocknode11
                                        )
                                        node_list = ppropdefnode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction87
+private class ReduceAction90
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4067,7 +4190,7 @@ private class ReduceAction87
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction88
+private class ReduceAction91
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4081,7 +4204,7 @@ private class ReduceAction88
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction91
+private class ReduceAction94
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4094,7 +4217,7 @@ private class ReduceAction91
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction92
+private class ReduceAction95
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4114,7 +4237,7 @@ private class ReduceAction92
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction93
+private class ReduceAction96
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4137,17 +4260,35 @@ private class ReduceAction93
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction94
+private class ReduceAction97
        super ReduceAction
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
-                                       var pvisibilitynode1: nullable APublicVisibility = new APublicVisibility.init_apublicvisibility
+                                       var pvisibilitynode1: nullable APublicVisibility = new APublicVisibility.init_apublicvisibility(
+                                               null
+                                       )
                                        node_list = pvisibilitynode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction95
+private class ReduceAction98
+       super ReduceAction
+       redef fun action(p: Parser)
+       do
+                                       var node_list: nullable Object = null
+                                       var nodearraylist2 = p.pop
+                                       var nodearraylist1 = p.pop
+                                       var tkwpublicnode2 = nodearraylist1
+                                       assert tkwpublicnode2 isa nullable TKwpublic
+                                       var pvisibilitynode1: nullable APublicVisibility = new APublicVisibility.init_apublicvisibility(
+                                               tkwpublicnode2
+                                       )
+                                       node_list = pvisibilitynode1
+                                       p.push(p.go_to(_goto), node_list)
+       end
+end
+private class ReduceAction99
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4163,7 +4304,7 @@ private class ReduceAction95
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction96
+private class ReduceAction100
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4179,7 +4320,7 @@ private class ReduceAction96
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction97
+private class ReduceAction101
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4195,7 +4336,7 @@ private class ReduceAction97
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction98
+private class ReduceAction102
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4210,7 +4351,7 @@ private class ReduceAction98
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction99
+private class ReduceAction103
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4225,7 +4366,7 @@ private class ReduceAction99
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction100
+private class ReduceAction104
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4240,7 +4381,7 @@ private class ReduceAction100
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction101
+private class ReduceAction105
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4255,7 +4396,7 @@ private class ReduceAction101
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction102
+private class ReduceAction106
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4270,7 +4411,7 @@ private class ReduceAction102
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction103
+private class ReduceAction107
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4285,7 +4426,7 @@ private class ReduceAction103
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction104
+private class ReduceAction108
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4300,7 +4441,7 @@ private class ReduceAction104
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction105
+private class ReduceAction109
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4315,7 +4456,7 @@ private class ReduceAction105
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction106
+private class ReduceAction110
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4330,7 +4471,7 @@ private class ReduceAction106
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction107
+private class ReduceAction111
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4345,7 +4486,7 @@ private class ReduceAction107
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction108
+private class ReduceAction112
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4360,7 +4501,7 @@ private class ReduceAction108
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction109
+private class ReduceAction113
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4375,7 +4516,7 @@ private class ReduceAction109
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction110
+private class ReduceAction114
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4390,7 +4531,7 @@ private class ReduceAction110
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction111
+private class ReduceAction115
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4405,7 +4546,7 @@ private class ReduceAction111
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction112
+private class ReduceAction116
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4424,7 +4565,7 @@ private class ReduceAction112
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction113
+private class ReduceAction117
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4439,7 +4580,7 @@ private class ReduceAction113
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction114
+private class ReduceAction118
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4458,7 +4599,7 @@ private class ReduceAction114
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction115
+private class ReduceAction119
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4481,7 +4622,7 @@ private class ReduceAction115
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction116
+private class ReduceAction120
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4512,7 +4653,7 @@ private class ReduceAction116
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction117
+private class ReduceAction121
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4540,7 +4681,7 @@ private class ReduceAction117
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction118
+private class ReduceAction122
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4560,7 +4701,7 @@ private class ReduceAction118
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction119
+private class ReduceAction123
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4577,7 +4718,7 @@ private class ReduceAction119
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction120
+private class ReduceAction124
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4593,7 +4734,7 @@ private class ReduceAction120
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction121
+private class ReduceAction125
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4613,7 +4754,7 @@ private class ReduceAction121
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction123
+private class ReduceAction127
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4626,7 +4767,7 @@ private class ReduceAction123
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction124
+private class ReduceAction128
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4647,7 +4788,7 @@ private class ReduceAction124
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction125
+private class ReduceAction129
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4668,7 +4809,7 @@ private class ReduceAction125
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction126
+private class ReduceAction130
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4692,7 +4833,7 @@ private class ReduceAction126
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction127
+private class ReduceAction131
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4716,7 +4857,7 @@ private class ReduceAction127
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction128
+private class ReduceAction132
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4743,7 +4884,7 @@ private class ReduceAction128
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction129
+private class ReduceAction133
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4767,7 +4908,7 @@ private class ReduceAction129
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction130
+private class ReduceAction134
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4795,7 +4936,7 @@ private class ReduceAction130
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction132
+private class ReduceAction136
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4808,7 +4949,7 @@ private class ReduceAction132
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction133
+private class ReduceAction137
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4819,7 +4960,7 @@ private class ReduceAction133
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction135
+private class ReduceAction139
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4834,7 +4975,7 @@ private class ReduceAction135
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction136
+private class ReduceAction140
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4849,7 +4990,7 @@ private class ReduceAction136
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction137
+private class ReduceAction141
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4872,7 +5013,7 @@ private class ReduceAction137
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction138
+private class ReduceAction142
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4887,7 +5028,7 @@ private class ReduceAction138
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction139
+private class ReduceAction143
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4919,7 +5060,7 @@ private class ReduceAction139
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction140
+private class ReduceAction144
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4947,7 +5088,7 @@ private class ReduceAction140
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction141
+private class ReduceAction145
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -4976,7 +5117,7 @@ private class ReduceAction141
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction142
+private class ReduceAction146
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5001,7 +5142,7 @@ private class ReduceAction142
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction143
+private class ReduceAction147
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5035,7 +5176,7 @@ private class ReduceAction143
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction144
+private class ReduceAction148
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5065,7 +5206,7 @@ private class ReduceAction144
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction146
+private class ReduceAction150
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5076,7 +5217,7 @@ private class ReduceAction146
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction147
+private class ReduceAction151
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5097,7 +5238,7 @@ private class ReduceAction147
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction148
+private class ReduceAction152
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5113,7 +5254,7 @@ private class ReduceAction148
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction149
+private class ReduceAction153
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5132,7 +5273,7 @@ private class ReduceAction149
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction150
+private class ReduceAction154
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5143,7 +5284,7 @@ private class ReduceAction150
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction152
+private class ReduceAction156
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5155,7 +5296,7 @@ private class ReduceAction152
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction153
+private class ReduceAction157
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5177,7 +5318,7 @@ private class ReduceAction153
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction154
+private class ReduceAction158
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5202,7 +5343,7 @@ private class ReduceAction154
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction155
+private class ReduceAction159
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5232,7 +5373,7 @@ private class ReduceAction155
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction156
+private class ReduceAction160
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5265,7 +5406,7 @@ private class ReduceAction156
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction157
+private class ReduceAction161
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5280,7 +5421,7 @@ private class ReduceAction157
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction158
+private class ReduceAction162
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5299,7 +5440,7 @@ private class ReduceAction158
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction159
+private class ReduceAction163
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5312,7 +5453,7 @@ private class ReduceAction159
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction163
+private class ReduceAction167
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5324,7 +5465,7 @@ private class ReduceAction163
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction164
+private class ReduceAction168
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5342,7 +5483,7 @@ private class ReduceAction164
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction165
+private class ReduceAction169
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5359,7 +5500,7 @@ private class ReduceAction165
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction166
+private class ReduceAction170
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5370,7 +5511,7 @@ private class ReduceAction166
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction167
+private class ReduceAction171
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5390,7 +5531,7 @@ private class ReduceAction167
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction168
+private class ReduceAction172
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5414,7 +5555,7 @@ private class ReduceAction168
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction169
+private class ReduceAction173
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5435,7 +5576,7 @@ private class ReduceAction169
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction170
+private class ReduceAction174
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5460,7 +5601,7 @@ private class ReduceAction170
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction171
+private class ReduceAction175
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5484,7 +5625,7 @@ private class ReduceAction171
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction172
+private class ReduceAction176
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5512,7 +5653,7 @@ private class ReduceAction172
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction176
+private class ReduceAction180
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5528,7 +5669,7 @@ private class ReduceAction176
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction177
+private class ReduceAction181
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5547,87 +5688,42 @@ private class ReduceAction177
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction178
-       super ReduceAction
-       redef fun action(p: Parser)
-       do
-                                       var node_list: nullable Object = null
-                                       var nodearraylist1 = p.pop
-                                       var tkwbreaknode2 = nodearraylist1
-                                       assert tkwbreaknode2 isa nullable TKwbreak
-                                       var pexprnode1: nullable ABreakExpr = new ABreakExpr.init_abreakexpr(
-                                               tkwbreaknode2,
-                                               null,
-                                               null
-                                       )
-                                       node_list = pexprnode1
-                                       p.push(p.go_to(_goto), node_list)
-       end
-end
-private class ReduceAction179
+private class ReduceAction182
        super ReduceAction
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
-                                       var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
                                        var tkwbreaknode2 = nodearraylist1
                                        assert tkwbreaknode2 isa nullable TKwbreak
-                                       var plabelnode3 = nodearraylist2
-                                       assert plabelnode3 isa nullable ALabel
                                        var pexprnode1: nullable ABreakExpr = new ABreakExpr.init_abreakexpr(
                                                tkwbreaknode2,
-                                               plabelnode3,
                                                null
                                        )
                                        node_list = pexprnode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction180
-       super ReduceAction
-       redef fun action(p: Parser)
-       do
-                                       var node_list: nullable Object = null
-                                       var nodearraylist2 = p.pop
-                                       var nodearraylist1 = p.pop
-                                       var tkwbreaknode2 = nodearraylist1
-                                       assert tkwbreaknode2 isa nullable TKwbreak
-                                       var pexprnode4 = nodearraylist2
-                                       assert pexprnode4 isa nullable AExpr
-                                       var pexprnode1: nullable ABreakExpr = new ABreakExpr.init_abreakexpr(
-                                               tkwbreaknode2,
-                                               null,
-                                               pexprnode4
-                                       )
-                                       node_list = pexprnode1
-                                       p.push(p.go_to(_goto), node_list)
-       end
-end
-private class ReduceAction181
+private class ReduceAction183
        super ReduceAction
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
-                                       var nodearraylist3 = p.pop
                                        var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
                                        var tkwbreaknode2 = nodearraylist1
                                        assert tkwbreaknode2 isa nullable TKwbreak
                                        var plabelnode3 = nodearraylist2
                                        assert plabelnode3 isa nullable ALabel
-                                       var pexprnode4 = nodearraylist3
-                                       assert pexprnode4 isa nullable AExpr
                                        var pexprnode1: nullable ABreakExpr = new ABreakExpr.init_abreakexpr(
                                                tkwbreaknode2,
-                                               plabelnode3,
-                                               pexprnode4
+                                               plabelnode3
                                        )
                                        node_list = pexprnode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction182
+private class ReduceAction184
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -5642,58 +5738,17 @@ private class ReduceAction182
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction183
-       super ReduceAction
-       redef fun action(p: Parser)
-       do
-                                       var node_list: nullable Object = null
-                                       var nodearraylist1 = p.pop
-                                       var tkwcontinuenode2 = nodearraylist1
-                                       assert tkwcontinuenode2 isa nullable TKwcontinue
-                                       var pexprnode1: nullable AContinueExpr = new AContinueExpr.init_acontinueexpr(
-                                               tkwcontinuenode2,
-                                               null,
-                                               null
-                                       )
-                                       node_list = pexprnode1
-                                       p.push(p.go_to(_goto), node_list)
-       end
-end
-private class ReduceAction184
-       super ReduceAction
-       redef fun action(p: Parser)
-       do
-                                       var node_list: nullable Object = null
-                                       var nodearraylist2 = p.pop
-                                       var nodearraylist1 = p.pop
-                                       var tkwcontinuenode2 = nodearraylist1
-                                       assert tkwcontinuenode2 isa nullable TKwcontinue
-                                       var plabelnode3 = nodearraylist2
-                                       assert plabelnode3 isa nullable ALabel
-                                       var pexprnode1: nullable AContinueExpr = new AContinueExpr.init_acontinueexpr(
-                                               tkwcontinuenode2,
-                                               plabelnode3,
-                                               null
-                                       )
-                                       node_list = pexprnode1
-                                       p.push(p.go_to(_goto), node_list)
-       end
-end
 private class ReduceAction185
        super ReduceAction
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
-                                       var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
                                        var tkwcontinuenode2 = nodearraylist1
                                        assert tkwcontinuenode2 isa nullable TKwcontinue
-                                       var pexprnode4 = nodearraylist2
-                                       assert pexprnode4 isa nullable AExpr
                                        var pexprnode1: nullable AContinueExpr = new AContinueExpr.init_acontinueexpr(
                                                tkwcontinuenode2,
-                                               null,
-                                               pexprnode4
+                                               null
                                        )
                                        node_list = pexprnode1
                                        p.push(p.go_to(_goto), node_list)
@@ -5704,19 +5759,15 @@ private class ReduceAction186
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
-                                       var nodearraylist3 = p.pop
                                        var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
                                        var tkwcontinuenode2 = nodearraylist1
                                        assert tkwcontinuenode2 isa nullable TKwcontinue
                                        var plabelnode3 = nodearraylist2
                                        assert plabelnode3 isa nullable ALabel
-                                       var pexprnode4 = nodearraylist3
-                                       assert pexprnode4 isa nullable AExpr
                                        var pexprnode1: nullable AContinueExpr = new AContinueExpr.init_acontinueexpr(
                                                tkwcontinuenode2,
-                                               plabelnode3,
-                                               pexprnode4
+                                               plabelnode3
                                        )
                                        node_list = pexprnode1
                                        p.push(p.go_to(_goto), node_list)
@@ -5968,15 +6019,12 @@ private class ReduceAction205
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
-                                       var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
                                        var tkwlabelnode2 = nodearraylist1
                                        assert tkwlabelnode2 isa nullable TKwlabel
-                                       var tidnode3 = nodearraylist2
-                                       assert tidnode3 isa nullable TId
                                        var plabelnode1: nullable ALabel = new ALabel.init_alabel(
                                                tkwlabelnode2,
-                                               tidnode3
+                                               null
                                        )
                                        node_list = plabelnode1
                                        p.push(p.go_to(_goto), node_list)
@@ -5987,15 +6035,17 @@ private class ReduceAction206
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
+                                       var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
-                                       var pexprnode4 = nodearraylist1
-                                       assert pexprnode4 isa nullable AExpr
-                                       var pexprnode1: nullable AContinueExpr = new AContinueExpr.init_acontinueexpr(
-                                               null,
-                                               null,
-                                               pexprnode4
+                                       var tkwlabelnode2 = nodearraylist1
+                                       assert tkwlabelnode2 isa nullable TKwlabel
+                                       var tidnode3 = nodearraylist2
+                                       assert tidnode3 isa nullable TId
+                                       var plabelnode1: nullable ALabel = new ALabel.init_alabel(
+                                               tkwlabelnode2,
+                                               tidnode3
                                        )
-                                       node_list = pexprnode1
+                                       node_list = plabelnode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
@@ -8084,6 +8134,25 @@ private class ReduceAction306
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
+                                       var nodearraylist2 = p.pop
+                                       var nodearraylist1 = p.pop
+                                       var pexprnode2 = nodearraylist1
+                                       assert pexprnode2 isa nullable AExpr
+                                       var tdotdotdotnode3 = nodearraylist2
+                                       assert tdotdotdotnode3 isa nullable TDotdotdot
+                                       var pexprnode1: nullable AVarargExpr = new AVarargExpr.init_avarargexpr(
+                                               pexprnode2,
+                                               tdotdotdotnode3
+                                       )
+                                       node_list = pexprnode1
+                                       p.push(p.go_to(_goto), node_list)
+       end
+end
+private class ReduceAction307
+       super ReduceAction
+       redef fun action(p: Parser)
+       do
+                                       var node_list: nullable Object = null
                                        var nodearraylist3 = p.pop
                                        var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
@@ -8106,7 +8175,7 @@ private class ReduceAction306
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction307
+private class ReduceAction308
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8137,7 +8206,7 @@ private class ReduceAction307
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction308
+private class ReduceAction309
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8159,7 +8228,7 @@ private class ReduceAction308
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction309
+private class ReduceAction310
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8175,7 +8244,7 @@ private class ReduceAction309
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction310
+private class ReduceAction311
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8190,7 +8259,7 @@ private class ReduceAction310
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction313
+private class ReduceAction314
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8205,7 +8274,7 @@ private class ReduceAction313
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction314
+private class ReduceAction315
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8220,7 +8289,7 @@ private class ReduceAction314
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction315
+private class ReduceAction316
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8245,7 +8314,7 @@ private class ReduceAction315
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction316
+private class ReduceAction317
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8276,7 +8345,7 @@ private class ReduceAction316
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction317
+private class ReduceAction318
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8287,34 +8356,45 @@ private class ReduceAction317
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction319
+private class ReduceAction320
        super ReduceAction
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
+                                       var nodearraylist4 = p.pop
+                                       var nodearraylist3 = p.pop
                                        var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
-                                       var listnode4 = new Array[Object]
-                                       var patidnode2 = nodearraylist1
-                                       assert patidnode2 isa nullable AAtid
-                                       var pannotationsnode6 = nodearraylist2
-                                       assert pannotationsnode6 isa nullable AAnnotations
+                                       var listnode7 = new Array[Object]
+                                       var tkwredefnode3 = nodearraylist1
+                                       assert tkwredefnode3 isa nullable TKwredef
+                                       var pvisibilitynode4 = nodearraylist2
+                                       assert pvisibilitynode4 isa nullable AVisibility
+                                       var patidnode5 = nodearraylist3
+                                       assert patidnode5 isa nullable AAtid
+                                       var pannotationsnode9 = nodearraylist4
+                                       assert pannotationsnode9 isa nullable AAnnotations
                                        var pannotationnode1: nullable AAnnotation = new AAnnotation.init_aannotation(
-                                               patidnode2,
                                                null,
-                                               listnode4,
+                                               tkwredefnode3,
+                                               pvisibilitynode4,
+                                               patidnode5,
                                                null,
-                                               pannotationsnode6
+                                               listnode7,
+                                               null,
+                                               pannotationsnode9
                                        )
                                        node_list = pannotationnode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction320
+private class ReduceAction321
        super ReduceAction
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
+                                       var nodearraylist9 = p.pop
+                                       var nodearraylist8 = p.pop
                                        var nodearraylist7 = p.pop
                                        var nodearraylist6 = p.pop
                                        var nodearraylist5 = p.pop
@@ -8322,30 +8402,37 @@ private class ReduceAction320
                                        var nodearraylist3 = p.pop
                                        var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
-                                       var listnode5 = new Array[Object]
-                                       var patidnode2 = nodearraylist1
-                                       assert patidnode2 isa nullable AAtid
-                                       var toparnode3 = nodearraylist2
-                                       assert toparnode3 isa nullable TOpar
-                                       var listnode4 = nodearraylist4
-                                       assert listnode4 isa Array[Object]
-                                       listnode5 = concat(listnode5, listnode4)
-                                       var tcparnode6 = nodearraylist6
-                                       assert tcparnode6 isa nullable TCpar
-                                       var pannotationsnode7 = nodearraylist7
-                                       assert pannotationsnode7 isa nullable AAnnotations
+                                       var listnode8 = new Array[Object]
+                                       var tkwredefnode3 = nodearraylist1
+                                       assert tkwredefnode3 isa nullable TKwredef
+                                       var pvisibilitynode4 = nodearraylist2
+                                       assert pvisibilitynode4 isa nullable AVisibility
+                                       var patidnode5 = nodearraylist3
+                                       assert patidnode5 isa nullable AAtid
+                                       var toparnode6 = nodearraylist4
+                                       assert toparnode6 isa nullable TOpar
+                                       var listnode7 = nodearraylist6
+                                       assert listnode7 isa Array[Object]
+                                       listnode8 = concat(listnode8, listnode7)
+                                       var tcparnode9 = nodearraylist8
+                                       assert tcparnode9 isa nullable TCpar
+                                       var pannotationsnode10 = nodearraylist9
+                                       assert pannotationsnode10 isa nullable AAnnotations
                                        var pannotationnode1: nullable AAnnotation = new AAnnotation.init_aannotation(
-                                               patidnode2,
-                                               toparnode3,
-                                               listnode5,
-                                               tcparnode6,
-                                               pannotationsnode7
+                                               null,
+                                               tkwredefnode3,
+                                               pvisibilitynode4,
+                                               patidnode5,
+                                               toparnode6,
+                                               listnode8,
+                                               tcparnode9,
+                                               pannotationsnode10
                                        )
                                        node_list = pannotationnode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction321
+private class ReduceAction322
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8365,7 +8452,7 @@ private class ReduceAction321
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction322
+private class ReduceAction323
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8380,7 +8467,7 @@ private class ReduceAction322
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction323
+private class ReduceAction324
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8399,21 +8486,32 @@ private class ReduceAction323
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction325
+private class ReduceAction326
        super ReduceAction
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
+                                       var nodearraylist5 = p.pop
+                                       var nodearraylist4 = p.pop
                                        var nodearraylist3 = p.pop
                                        var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
-                                       var listnode4 = new Array[Object]
-                                       var patidnode2 = nodearraylist2
-                                       assert patidnode2 isa nullable AAtid
+                                       var listnode7 = new Array[Object]
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var tkwredefnode3 = nodearraylist2
+                                       assert tkwredefnode3 isa nullable TKwredef
+                                       var pvisibilitynode4 = nodearraylist3
+                                       assert pvisibilitynode4 isa nullable AVisibility
+                                       var patidnode5 = nodearraylist4
+                                       assert patidnode5 isa nullable AAtid
                                        var pannotationnode1: nullable AAnnotation = new AAnnotation.init_aannotation(
-                                               patidnode2,
+                                               pdocnode2,
+                                               tkwredefnode3,
+                                               pvisibilitynode4,
+                                               patidnode5,
                                                null,
-                                               listnode4,
+                                               listnode7,
                                                null,
                                                null
                                        )
@@ -8421,36 +8519,49 @@ private class ReduceAction325
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction326
+private class ReduceAction327
        super ReduceAction
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
+                                       var nodearraylist6 = p.pop
+                                       var nodearraylist5 = p.pop
                                        var nodearraylist4 = p.pop
                                        var nodearraylist3 = p.pop
                                        var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
-                                       var listnode4 = new Array[Object]
-                                       var patidnode2 = nodearraylist2
-                                       assert patidnode2 isa nullable AAtid
-                                       var pannotationsnode6 = nodearraylist3
-                                       assert pannotationsnode6 isa nullable AAnnotations
+                                       var listnode7 = new Array[Object]
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var tkwredefnode3 = nodearraylist2
+                                       assert tkwredefnode3 isa nullable TKwredef
+                                       var pvisibilitynode4 = nodearraylist3
+                                       assert pvisibilitynode4 isa nullable AVisibility
+                                       var patidnode5 = nodearraylist4
+                                       assert patidnode5 isa nullable AAtid
+                                       var pannotationsnode9 = nodearraylist5
+                                       assert pannotationsnode9 isa nullable AAnnotations
                                        var pannotationnode1: nullable AAnnotation = new AAnnotation.init_aannotation(
-                                               patidnode2,
+                                               pdocnode2,
+                                               tkwredefnode3,
+                                               pvisibilitynode4,
+                                               patidnode5,
                                                null,
-                                               listnode4,
+                                               listnode7,
                                                null,
-                                               pannotationsnode6
+                                               pannotationsnode9
                                        )
                                        node_list = pannotationnode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction327
+private class ReduceAction328
        super ReduceAction
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
+                                       var nodearraylist9 = p.pop
+                                       var nodearraylist8 = p.pop
                                        var nodearraylist7 = p.pop
                                        var nodearraylist6 = p.pop
                                        var nodearraylist5 = p.pop
@@ -8458,32 +8569,43 @@ private class ReduceAction327
                                        var nodearraylist3 = p.pop
                                        var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
-                                       var listnode5 = new Array[Object]
-                                       var patidnode2 = nodearraylist2
-                                       assert patidnode2 isa nullable AAtid
-                                       var toparnode3 = nodearraylist3
-                                       assert toparnode3 isa nullable TOpar
-                                       var listnode4 = nodearraylist5
-                                       assert listnode4 isa Array[Object]
-                                       listnode5 = concat(listnode5, listnode4)
-                                       var tcparnode6 = nodearraylist6
-                                       assert tcparnode6 isa nullable TCpar
+                                       var listnode8 = new Array[Object]
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var tkwredefnode3 = nodearraylist2
+                                       assert tkwredefnode3 isa nullable TKwredef
+                                       var pvisibilitynode4 = nodearraylist3
+                                       assert pvisibilitynode4 isa nullable AVisibility
+                                       var patidnode5 = nodearraylist4
+                                       assert patidnode5 isa nullable AAtid
+                                       var toparnode6 = nodearraylist5
+                                       assert toparnode6 isa nullable TOpar
+                                       var listnode7 = nodearraylist7
+                                       assert listnode7 isa Array[Object]
+                                       listnode8 = concat(listnode8, listnode7)
+                                       var tcparnode9 = nodearraylist8
+                                       assert tcparnode9 isa nullable TCpar
                                        var pannotationnode1: nullable AAnnotation = new AAnnotation.init_aannotation(
-                                               patidnode2,
-                                               toparnode3,
-                                               listnode5,
-                                               tcparnode6,
+                                               pdocnode2,
+                                               tkwredefnode3,
+                                               pvisibilitynode4,
+                                               patidnode5,
+                                               toparnode6,
+                                               listnode8,
+                                               tcparnode9,
                                                null
                                        )
                                        node_list = pannotationnode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction328
+private class ReduceAction329
        super ReduceAction
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
+                                       var nodearraylist10 = p.pop
+                                       var nodearraylist9 = p.pop
                                        var nodearraylist8 = p.pop
                                        var nodearraylist7 = p.pop
                                        var nodearraylist6 = p.pop
@@ -8492,48 +8614,68 @@ private class ReduceAction328
                                        var nodearraylist3 = p.pop
                                        var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
-                                       var listnode5 = new Array[Object]
-                                       var patidnode2 = nodearraylist2
-                                       assert patidnode2 isa nullable AAtid
-                                       var toparnode3 = nodearraylist3
-                                       assert toparnode3 isa nullable TOpar
-                                       var listnode4 = nodearraylist5
-                                       assert listnode4 isa Array[Object]
-                                       listnode5 = concat(listnode5, listnode4)
-                                       var tcparnode6 = nodearraylist6
-                                       assert tcparnode6 isa nullable TCpar
-                                       var pannotationsnode7 = nodearraylist7
-                                       assert pannotationsnode7 isa nullable AAnnotations
+                                       var listnode8 = new Array[Object]
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var tkwredefnode3 = nodearraylist2
+                                       assert tkwredefnode3 isa nullable TKwredef
+                                       var pvisibilitynode4 = nodearraylist3
+                                       assert pvisibilitynode4 isa nullable AVisibility
+                                       var patidnode5 = nodearraylist4
+                                       assert patidnode5 isa nullable AAtid
+                                       var toparnode6 = nodearraylist5
+                                       assert toparnode6 isa nullable TOpar
+                                       var listnode7 = nodearraylist7
+                                       assert listnode7 isa Array[Object]
+                                       listnode8 = concat(listnode8, listnode7)
+                                       var tcparnode9 = nodearraylist8
+                                       assert tcparnode9 isa nullable TCpar
+                                       var pannotationsnode10 = nodearraylist9
+                                       assert pannotationsnode10 isa nullable AAnnotations
                                        var pannotationnode1: nullable AAnnotation = new AAnnotation.init_aannotation(
-                                               patidnode2,
-                                               toparnode3,
-                                               listnode5,
-                                               tcparnode6,
-                                               pannotationsnode7
+                                               pdocnode2,
+                                               tkwredefnode3,
+                                               pvisibilitynode4,
+                                               patidnode5,
+                                               toparnode6,
+                                               listnode8,
+                                               tcparnode9,
+                                               pannotationsnode10
                                        )
                                        node_list = pannotationnode1
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction329
+private class ReduceAction330
        super ReduceAction
        redef fun action(p: Parser)
        do
                                        var node_list: nullable Object = null
+                                       var nodearraylist6 = p.pop
+                                       var nodearraylist5 = p.pop
                                        var nodearraylist4 = p.pop
                                        var nodearraylist3 = p.pop
                                        var nodearraylist2 = p.pop
                                        var nodearraylist1 = p.pop
-                                       var listnode5 = new Array[Object]
-                                       var patidnode2 = nodearraylist2
-                                       assert patidnode2 isa nullable AAtid
-                                       var listnode4 = nodearraylist3
-                                       assert listnode4 isa Array[Object]
-                                       listnode5 = concat(listnode5, listnode4)
+                                       var listnode8 = new Array[Object]
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var tkwredefnode3 = nodearraylist2
+                                       assert tkwredefnode3 isa nullable TKwredef
+                                       var pvisibilitynode4 = nodearraylist3
+                                       assert pvisibilitynode4 isa nullable AVisibility
+                                       var patidnode5 = nodearraylist4
+                                       assert patidnode5 isa nullable AAtid
+                                       var listnode7 = nodearraylist5
+                                       assert listnode7 isa Array[Object]
+                                       listnode8 = concat(listnode8, listnode7)
                                        var pannotationnode1: nullable AAnnotation = new AAnnotation.init_aannotation(
-                                               patidnode2,
+                                               pdocnode2,
+                                               tkwredefnode3,
+                                               pvisibilitynode4,
+                                               patidnode5,
                                                null,
-                                               listnode5,
+                                               listnode8,
                                                null,
                                                null
                                        )
@@ -8541,7 +8683,174 @@ private class ReduceAction329
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction330
+private class ReduceAction331
+       super ReduceAction
+       redef fun action(p: Parser)
+       do
+                                       var node_list: nullable Object = null
+                                       var nodearraylist3 = p.pop
+                                       var nodearraylist2 = p.pop
+                                       var nodearraylist1 = p.pop
+                                       var listnode7 = new Array[Object]
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var patidnode5 = nodearraylist2
+                                       assert patidnode5 isa nullable AAtid
+                                       var pannotationnode1: nullable AAnnotation = new AAnnotation.init_aannotation(
+                                               pdocnode2,
+                                               null,
+                                               null,
+                                               patidnode5,
+                                               null,
+                                               listnode7,
+                                               null,
+                                               null
+                                       )
+                                       node_list = pannotationnode1
+                                       p.push(p.go_to(_goto), node_list)
+       end
+end
+private class ReduceAction332
+       super ReduceAction
+       redef fun action(p: Parser)
+       do
+                                       var node_list: nullable Object = null
+                                       var nodearraylist4 = p.pop
+                                       var nodearraylist3 = p.pop
+                                       var nodearraylist2 = p.pop
+                                       var nodearraylist1 = p.pop
+                                       var listnode7 = new Array[Object]
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var patidnode5 = nodearraylist2
+                                       assert patidnode5 isa nullable AAtid
+                                       var pannotationsnode9 = nodearraylist3
+                                       assert pannotationsnode9 isa nullable AAnnotations
+                                       var pannotationnode1: nullable AAnnotation = new AAnnotation.init_aannotation(
+                                               pdocnode2,
+                                               null,
+                                               null,
+                                               patidnode5,
+                                               null,
+                                               listnode7,
+                                               null,
+                                               pannotationsnode9
+                                       )
+                                       node_list = pannotationnode1
+                                       p.push(p.go_to(_goto), node_list)
+       end
+end
+private class ReduceAction333
+       super ReduceAction
+       redef fun action(p: Parser)
+       do
+                                       var node_list: nullable Object = null
+                                       var nodearraylist7 = p.pop
+                                       var nodearraylist6 = p.pop
+                                       var nodearraylist5 = p.pop
+                                       var nodearraylist4 = p.pop
+                                       var nodearraylist3 = p.pop
+                                       var nodearraylist2 = p.pop
+                                       var nodearraylist1 = p.pop
+                                       var listnode8 = new Array[Object]
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var patidnode5 = nodearraylist2
+                                       assert patidnode5 isa nullable AAtid
+                                       var toparnode6 = nodearraylist3
+                                       assert toparnode6 isa nullable TOpar
+                                       var listnode7 = nodearraylist5
+                                       assert listnode7 isa Array[Object]
+                                       listnode8 = concat(listnode8, listnode7)
+                                       var tcparnode9 = nodearraylist6
+                                       assert tcparnode9 isa nullable TCpar
+                                       var pannotationnode1: nullable AAnnotation = new AAnnotation.init_aannotation(
+                                               pdocnode2,
+                                               null,
+                                               null,
+                                               patidnode5,
+                                               toparnode6,
+                                               listnode8,
+                                               tcparnode9,
+                                               null
+                                       )
+                                       node_list = pannotationnode1
+                                       p.push(p.go_to(_goto), node_list)
+       end
+end
+private class ReduceAction334
+       super ReduceAction
+       redef fun action(p: Parser)
+       do
+                                       var node_list: nullable Object = null
+                                       var nodearraylist8 = p.pop
+                                       var nodearraylist7 = p.pop
+                                       var nodearraylist6 = p.pop
+                                       var nodearraylist5 = p.pop
+                                       var nodearraylist4 = p.pop
+                                       var nodearraylist3 = p.pop
+                                       var nodearraylist2 = p.pop
+                                       var nodearraylist1 = p.pop
+                                       var listnode8 = new Array[Object]
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var patidnode5 = nodearraylist2
+                                       assert patidnode5 isa nullable AAtid
+                                       var toparnode6 = nodearraylist3
+                                       assert toparnode6 isa nullable TOpar
+                                       var listnode7 = nodearraylist5
+                                       assert listnode7 isa Array[Object]
+                                       listnode8 = concat(listnode8, listnode7)
+                                       var tcparnode9 = nodearraylist6
+                                       assert tcparnode9 isa nullable TCpar
+                                       var pannotationsnode10 = nodearraylist7
+                                       assert pannotationsnode10 isa nullable AAnnotations
+                                       var pannotationnode1: nullable AAnnotation = new AAnnotation.init_aannotation(
+                                               pdocnode2,
+                                               null,
+                                               null,
+                                               patidnode5,
+                                               toparnode6,
+                                               listnode8,
+                                               tcparnode9,
+                                               pannotationsnode10
+                                       )
+                                       node_list = pannotationnode1
+                                       p.push(p.go_to(_goto), node_list)
+       end
+end
+private class ReduceAction335
+       super ReduceAction
+       redef fun action(p: Parser)
+       do
+                                       var node_list: nullable Object = null
+                                       var nodearraylist4 = p.pop
+                                       var nodearraylist3 = p.pop
+                                       var nodearraylist2 = p.pop
+                                       var nodearraylist1 = p.pop
+                                       var listnode8 = new Array[Object]
+                                       var pdocnode2 = nodearraylist1
+                                       assert pdocnode2 isa nullable ADoc
+                                       var patidnode5 = nodearraylist2
+                                       assert patidnode5 isa nullable AAtid
+                                       var listnode7 = nodearraylist3
+                                       assert listnode7 isa Array[Object]
+                                       listnode8 = concat(listnode8, listnode7)
+                                       var pannotationnode1: nullable AAnnotation = new AAnnotation.init_aannotation(
+                                               pdocnode2,
+                                               null,
+                                               null,
+                                               patidnode5,
+                                               null,
+                                               listnode8,
+                                               null,
+                                               null
+                                       )
+                                       node_list = pannotationnode1
+                                       p.push(p.go_to(_goto), node_list)
+       end
+end
+private class ReduceAction336
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8554,7 +8863,7 @@ private class ReduceAction330
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction331
+private class ReduceAction337
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8569,7 +8878,7 @@ private class ReduceAction331
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction332
+private class ReduceAction338
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8588,7 +8897,7 @@ private class ReduceAction332
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction333
+private class ReduceAction339
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8601,7 +8910,7 @@ private class ReduceAction333
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction334
+private class ReduceAction340
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8616,7 +8925,7 @@ private class ReduceAction334
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction335
+private class ReduceAction341
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8631,7 +8940,7 @@ private class ReduceAction335
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction337
+private class ReduceAction343
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8646,7 +8955,7 @@ private class ReduceAction337
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction338
+private class ReduceAction344
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8661,7 +8970,7 @@ private class ReduceAction338
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction339
+private class ReduceAction345
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8676,7 +8985,7 @@ private class ReduceAction339
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction340
+private class ReduceAction346
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8691,22 +9000,7 @@ private class ReduceAction340
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction341
-       super ReduceAction
-       redef fun action(p: Parser)
-       do
-                                       var node_list: nullable Object = null
-                                       var nodearraylist1 = p.pop
-                                       var tkwimportnode2 = nodearraylist1
-                                       assert tkwimportnode2 isa nullable TKwimport
-                                       var patidnode1: nullable AKwimportAtid = new AKwimportAtid.init_akwimportatid(
-                                               tkwimportnode2
-                                       )
-                                       node_list = patidnode1
-                                       p.push(p.go_to(_goto), node_list)
-       end
-end
-private class ReduceAction342
+private class ReduceAction347
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8732,7 +9026,7 @@ private class ReduceAction342
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction343
+private class ReduceAction348
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8754,7 +9048,7 @@ private class ReduceAction343
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction344
+private class ReduceAction349
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8767,7 +9061,7 @@ private class ReduceAction344
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction346
+private class ReduceAction351
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8786,7 +9080,7 @@ private class ReduceAction346
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction349
+private class ReduceAction354
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8812,7 +9106,7 @@ private class ReduceAction349
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction351
+private class ReduceAction356
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8832,7 +9126,7 @@ private class ReduceAction351
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction352
+private class ReduceAction357
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8846,7 +9140,7 @@ private class ReduceAction352
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction353
+private class ReduceAction358
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8861,7 +9155,7 @@ private class ReduceAction353
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction354
+private class ReduceAction359
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8883,7 +9177,7 @@ private class ReduceAction354
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction355
+private class ReduceAction360
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8901,7 +9195,7 @@ private class ReduceAction355
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction356
+private class ReduceAction361
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8923,7 +9217,7 @@ private class ReduceAction356
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction357
+private class ReduceAction362
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8945,7 +9239,7 @@ private class ReduceAction357
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction358
+private class ReduceAction363
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8971,7 +9265,7 @@ private class ReduceAction358
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction359
+private class ReduceAction364
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -8988,7 +9282,7 @@ private class ReduceAction359
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction360
+private class ReduceAction365
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9009,7 +9303,7 @@ private class ReduceAction360
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction361
+private class ReduceAction366
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9027,7 +9321,7 @@ private class ReduceAction361
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction363
+private class ReduceAction368
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9038,7 +9332,7 @@ private class ReduceAction363
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction364
+private class ReduceAction369
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9050,7 +9344,7 @@ private class ReduceAction364
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction365
+private class ReduceAction370
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9063,7 +9357,7 @@ private class ReduceAction365
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction367
+private class ReduceAction372
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9074,7 +9368,7 @@ private class ReduceAction367
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction368
+private class ReduceAction373
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9086,7 +9380,7 @@ private class ReduceAction368
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction369
+private class ReduceAction374
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9099,7 +9393,7 @@ private class ReduceAction369
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction371
+private class ReduceAction376
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9112,7 +9406,7 @@ private class ReduceAction371
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction372
+private class ReduceAction377
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9125,7 +9419,7 @@ private class ReduceAction372
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction374
+private class ReduceAction379
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9136,7 +9430,7 @@ private class ReduceAction374
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction375
+private class ReduceAction380
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9145,7 +9439,7 @@ private class ReduceAction375
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction377
+private class ReduceAction382
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9162,7 +9456,7 @@ private class ReduceAction377
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction378
+private class ReduceAction383
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9180,7 +9474,7 @@ private class ReduceAction378
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction381
+private class ReduceAction386
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9191,7 +9485,7 @@ private class ReduceAction381
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction382
+private class ReduceAction387
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9201,7 +9495,7 @@ private class ReduceAction382
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction383
+private class ReduceAction388
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9212,7 +9506,7 @@ private class ReduceAction383
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction600
+private class ReduceAction604
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9236,7 +9530,7 @@ private class ReduceAction600
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction601
+private class ReduceAction605
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9256,7 +9550,7 @@ private class ReduceAction601
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction602
+private class ReduceAction606
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9279,7 +9573,7 @@ private class ReduceAction602
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction604
+private class ReduceAction608
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9302,7 +9596,7 @@ private class ReduceAction604
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction619
+private class ReduceAction624
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9315,7 +9609,7 @@ private class ReduceAction619
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction620
+private class ReduceAction625
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9325,7 +9619,7 @@ private class ReduceAction620
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction818
+private class ReduceAction792
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9340,7 +9634,7 @@ private class ReduceAction818
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction819
+private class ReduceAction793
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9359,7 +9653,7 @@ private class ReduceAction819
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction820
+private class ReduceAction794
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9374,7 +9668,7 @@ private class ReduceAction820
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction821
+private class ReduceAction795
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9393,7 +9687,7 @@ private class ReduceAction821
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction822
+private class ReduceAction796
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9408,7 +9702,7 @@ private class ReduceAction822
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction823
+private class ReduceAction797
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9427,7 +9721,7 @@ private class ReduceAction823
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction824
+private class ReduceAction798
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9442,7 +9736,7 @@ private class ReduceAction824
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction825
+private class ReduceAction799
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9461,7 +9755,7 @@ private class ReduceAction825
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction826
+private class ReduceAction800
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9476,7 +9770,7 @@ private class ReduceAction826
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction827
+private class ReduceAction801
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9495,7 +9789,7 @@ private class ReduceAction827
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction828
+private class ReduceAction802
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9510,7 +9804,7 @@ private class ReduceAction828
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction829
+private class ReduceAction803
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9529,7 +9823,7 @@ private class ReduceAction829
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction830
+private class ReduceAction804
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9544,7 +9838,7 @@ private class ReduceAction830
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction831
+private class ReduceAction805
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9563,7 +9857,7 @@ private class ReduceAction831
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction832
+private class ReduceAction806
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9578,7 +9872,7 @@ private class ReduceAction832
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction833
+private class ReduceAction807
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9597,7 +9891,7 @@ private class ReduceAction833
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction835
+private class ReduceAction809
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9616,7 +9910,7 @@ private class ReduceAction835
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction836
+private class ReduceAction810
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9631,7 +9925,7 @@ private class ReduceAction836
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction837
+private class ReduceAction811
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9650,7 +9944,7 @@ private class ReduceAction837
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction838
+private class ReduceAction812
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9664,7 +9958,7 @@ private class ReduceAction838
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction839
+private class ReduceAction813
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9682,7 +9976,7 @@ private class ReduceAction839
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction841
+private class ReduceAction815
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9701,7 +9995,7 @@ private class ReduceAction841
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction845
+private class ReduceAction821
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9720,7 +10014,7 @@ private class ReduceAction845
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction849
+private class ReduceAction825
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9739,7 +10033,7 @@ private class ReduceAction849
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction850
+private class ReduceAction826
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9754,7 +10048,7 @@ private class ReduceAction850
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction851
+private class ReduceAction827
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9773,7 +10067,7 @@ private class ReduceAction851
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction852
+private class ReduceAction828
        super ReduceAction
        redef fun action(p: Parser)
        do
@@ -9788,7 +10082,7 @@ private class ReduceAction852
                                        p.push(p.go_to(_goto), node_list)
        end
 end
-private class ReduceAction853
+private class ReduceAction829
        super ReduceAction
        redef fun action(p: Parser)
        do
index 91326e3..5cf40bd 100644 (file)
@@ -352,6 +352,12 @@ class AModuledecl
        var _n_doc: nullable ADoc = null
        fun n_doc: nullable ADoc do return _n_doc
        fun n_doc=(n_doc: nullable ADoc) do _n_doc = n_doc
+       var _n_kwredef: nullable TKwredef = null
+       fun n_kwredef: nullable TKwredef do return _n_kwredef
+       fun n_kwredef=(n_kwredef: nullable TKwredef) do _n_kwredef = n_kwredef
+       var _n_visibility: AVisibility = null
+       fun n_visibility: AVisibility do return _n_visibility
+       fun n_visibility=(n_visibility: AVisibility) do _n_visibility = n_visibility
        var _n_kwmodule: TKwmodule = null
        fun n_kwmodule: TKwmodule do return _n_kwmodule
        fun n_kwmodule=(n_kwmodule: TKwmodule) do _n_kwmodule = n_kwmodule
@@ -391,6 +397,9 @@ class ANoImport
 end
 class APublicVisibility
        super AVisibility
+       var _n_kwpublic: nullable TKwpublic = null
+       fun n_kwpublic: nullable TKwpublic do return _n_kwpublic
+       fun n_kwpublic=(n_kwpublic: nullable TKwpublic) do _n_kwpublic = n_kwpublic
 end
 class APrivateVisibility
        super AVisibility
@@ -648,6 +657,9 @@ class AExternMethPropdef
        var _n_signature: ASignature = null
        fun n_signature: ASignature do return _n_signature
        fun n_signature=(n_signature: ASignature) do _n_signature = n_signature
+       var _n_annotations: nullable AAnnotations = null
+       fun n_annotations: nullable AAnnotations do return _n_annotations
+       fun n_annotations=(n_annotations: nullable AAnnotations) do _n_annotations = n_annotations
        var _n_extern: nullable TString = null
        fun n_extern: nullable TString do return _n_extern
        fun n_extern=(n_extern: nullable TString) do _n_extern = n_extern
@@ -732,6 +744,9 @@ class AExternInitPropdef
        var _n_signature: ASignature = null
        fun n_signature: ASignature do return _n_signature
        fun n_signature=(n_signature: ASignature) do _n_signature = n_signature
+       var _n_annotations: nullable AAnnotations = null
+       fun n_annotations: nullable AAnnotations do return _n_annotations
+       fun n_annotations=(n_annotations: nullable AAnnotations) do _n_annotations = n_annotations
        var _n_extern: nullable TString = null
        fun n_extern: nullable TString do return _n_extern
        fun n_extern=(n_extern: nullable TString) do _n_extern = n_extern
@@ -962,9 +977,9 @@ class ALabel
        var _n_kwlabel: TKwlabel = null
        fun n_kwlabel: TKwlabel do return _n_kwlabel
        fun n_kwlabel=(n_kwlabel: TKwlabel) do _n_kwlabel = n_kwlabel
-       var _n_id: TId = null
-       fun n_id: TId do return _n_id
-       fun n_id=(n_id: TId) do _n_id = n_id
+       var _n_id: nullable TId = null
+       fun n_id: nullable TId do return _n_id
+       fun n_id=(n_id: nullable TId) do _n_id = n_id
 end
 class ABlockExpr
        super AExpr
@@ -1011,9 +1026,6 @@ class ABreakExpr
        var _n_label: nullable ALabel = null
        fun n_label: nullable ALabel do return _n_label
        fun n_label=(n_label: nullable ALabel) do _n_label = n_label
-       var _n_expr: nullable AExpr = null
-       fun n_expr: nullable AExpr do return _n_expr
-       fun n_expr=(n_expr: nullable AExpr) do _n_expr = n_expr
 end
 class AAbortExpr
        super AExpr
@@ -1029,9 +1041,6 @@ class AContinueExpr
        var _n_label: nullable ALabel = null
        fun n_label: nullable ALabel do return _n_label
        fun n_label=(n_label: nullable ALabel) do _n_label = n_label
-       var _n_expr: nullable AExpr = null
-       fun n_expr: nullable AExpr do return _n_expr
-       fun n_expr=(n_expr: nullable AExpr) do _n_expr = n_expr
 end
 class ADoExpr
        super AExpr
@@ -1800,6 +1809,15 @@ class ADebugTypeExpr
        fun n_type: AType do return _n_type
        fun n_type=(n_type: AType) do _n_type = n_type
 end
+class AVarargExpr
+       super AExpr
+       var _n_expr: AExpr = null
+       fun n_expr: AExpr do return _n_expr
+       fun n_expr=(n_expr: AExpr) do _n_expr = n_expr
+       var _n_dotdotdot: TDotdotdot = null
+       fun n_dotdotdot: TDotdotdot do return _n_dotdotdot
+       fun n_dotdotdot=(n_dotdotdot: TDotdotdot) do _n_dotdotdot = n_dotdotdot
+end
 class AListExprs
        super AExprs
        var n_exprs: List[AExpr] = new List[AExpr]
@@ -1972,6 +1990,15 @@ class AAnnotations
 end
 class AAnnotation
        super AAnnotation
+       var _n_doc: nullable ADoc = null
+       fun n_doc: nullable ADoc do return _n_doc
+       fun n_doc=(n_doc: nullable ADoc) do _n_doc = n_doc
+       var _n_kwredef: nullable TKwredef = null
+       fun n_kwredef: nullable TKwredef do return _n_kwredef
+       fun n_kwredef=(n_kwredef: nullable TKwredef) do _n_kwredef = n_kwredef
+       var _n_visibility: nullable AVisibility = null
+       fun n_visibility: nullable AVisibility do return _n_visibility
+       fun n_visibility=(n_visibility: nullable AVisibility) do _n_visibility = n_visibility
        var _n_atid: AAtid = null
        fun n_atid: AAtid do return _n_atid
        fun n_atid=(n_atid: AAtid) do _n_atid = n_atid
index 7ea1c4b..8a6bf20 100644 (file)
@@ -706,6 +706,12 @@ class AModuledecl
        var _n_doc: nullable ADoc = null
        fun n_doc: nullable ADoc do return _n_doc
        fun n_doc=(n_doc: nullable ADoc) do _n_doc = n_doc
+       var _n_kwredef: nullable TKwredef = null
+       fun n_kwredef: nullable TKwredef do return _n_kwredef
+       fun n_kwredef=(n_kwredef: nullable TKwredef) do _n_kwredef = n_kwredef
+       var _n_visibility: AVisibility
+       fun n_visibility: AVisibility do return _n_visibility
+       fun n_visibility=(n_visibility: AVisibility) do _n_visibility = n_visibility
        var _n_kwmodule: TKwmodule
        fun n_kwmodule: TKwmodule do return _n_kwmodule
        fun n_kwmodule=(n_kwmodule: TKwmodule) do _n_kwmodule = n_kwmodule
@@ -761,6 +767,10 @@ abstract class AVisibility
 end
 class APublicVisibility
        super AVisibility
+       var _n_kwpublic: nullable TKwpublic
+       fun n_kwpublic: nullable TKwpublic do return _n_kwpublic
+       fun n_kwpublic=(n_kwpublic: nullable TKwpublic) do _n_kwpublic = n_kwpublic
+       init do end
 end
 class APrivateVisibility
        super AVisibility
@@ -1395,9 +1405,9 @@ class ALabel
        var _n_kwlabel: TKwlabel
        fun n_kwlabel: TKwlabel do return _n_kwlabel
        fun n_kwlabel=(n_kwlabel: TKwlabel) do _n_kwlabel = n_kwlabel
-       var _n_id: TId
-       fun n_id: TId do return _n_id
-       fun n_id=(n_id: TId) do _n_id = n_id
+       var _n_id: nullable TId
+       fun n_id: nullable TId do return _n_id
+       fun n_id=(n_id: nullable TId) do _n_id = n_id
        init do end
 end
 
@@ -2246,6 +2256,18 @@ class AIssetAttrExpr
        init do end
 end
 
+# A elyspis notation used to pass an expression as it in a vararg parameter
+class AVarargExpr
+       super AExpr
+       var _n_expr: AExpr
+       fun n_expr: AExpr do return _n_expr
+       fun n_expr=(n_expr: AExpr) do _n_expr = n_expr
+       var _n_dotdotdot: TDotdotdot
+       fun n_dotdotdot: TDotdotdot do return _n_dotdotdot
+       fun n_dotdotdot=(n_dotdotdot: TDotdotdot) do _n_dotdotdot = n_dotdotdot
+       init do end
+end
+
 # A list of expression separated with commas (arguments for instance)
 abstract class AExprs
        super Prod 
@@ -2253,6 +2275,7 @@ abstract class AExprs
        init do end
 end
 
+
 class ADebugTypeExpr
        super AExpr
        var _n_kwdebug: TKwdebug
@@ -2385,6 +2408,15 @@ class AAnnotations
 end
 class AAnnotation
        super Prod
+       var _n_doc: nullable ADoc = null
+       fun n_doc: nullable ADoc do return _n_doc
+       fun n_doc=(n_doc: nullable ADoc) do _n_doc = n_doc
+       var _n_kwredef: nullable TKwredef = null
+       fun n_kwredef: nullable TKwredef do return _n_kwredef
+       fun n_kwredef=(n_kwredef: nullable TKwredef) do _n_kwredef = n_kwredef
+       var _n_visibility: nullable AVisibility
+       fun n_visibility: nullable AVisibility do return _n_visibility
+       fun n_visibility=(n_visibility: nullable AVisibility) do _n_visibility = n_visibility
        var _n_atid: AAtid
        fun n_atid: AAtid do return _n_atid
        fun n_atid=(n_atid: AAtid) do _n_atid = n_atid
index 2363e3f..c7125ee 100644 (file)
@@ -50,6 +50,8 @@ end
 redef class AModuledecl
        init init_amoduledecl (
                n_doc: nullable ADoc,
+               n_kwredef: nullable TKwredef,
+               n_visibility: nullable AVisibility,
                n_kwmodule: nullable TKwmodule,
                n_name: nullable AModuleName,
                n_annotations: nullable AAnnotations
@@ -57,6 +59,10 @@ redef class AModuledecl
        do
                _n_doc = n_doc
                if n_doc != null then n_doc.parent = self
+               _n_kwredef = n_kwredef
+               if n_kwredef != null then n_kwredef.parent = self
+               _n_visibility = n_visibility.as(not null)
+               n_visibility.parent = self
                _n_kwmodule = n_kwmodule.as(not null)
                n_kwmodule.parent = self
                _n_name = n_name.as(not null)
@@ -71,6 +77,14 @@ redef class AModuledecl
                        n_doc = new_child.as(nullable ADoc)
                        return
                end
+               if _n_kwredef == old_child then
+                       n_kwredef = new_child.as(nullable TKwredef)
+                       return
+               end
+               if _n_visibility == old_child then
+                       n_visibility = new_child.as(AVisibility)
+                       return
+               end
                if _n_kwmodule == old_child then
                        n_kwmodule = new_child.as(TKwmodule)
                        return
@@ -90,6 +104,16 @@ redef class AModuledecl
                _n_doc = node
                if node != null then node.parent = self
        end
+       redef fun n_kwredef=(node)
+       do
+               _n_kwredef = node
+               if node != null then node.parent = self
+       end
+       redef fun n_visibility=(node)
+       do
+               _n_visibility = node
+               node.parent = self
+       end
        redef fun n_kwmodule=(node)
        do
                _n_kwmodule = node
@@ -110,6 +134,8 @@ redef class AModuledecl
        redef fun visit_all(v: Visitor)
        do
                v.enter_visit(_n_doc)
+               v.enter_visit(_n_kwredef)
+               v.enter_visit(_n_visibility)
                v.enter_visit(_n_kwmodule)
                v.enter_visit(_n_name)
                v.enter_visit(_n_annotations)
@@ -239,18 +265,32 @@ redef class ANoImport
        end
 end
 redef class APublicVisibility
-       init init_apublicvisibility
+       init init_apublicvisibility (
+               n_kwpublic: nullable TKwpublic
+       )
        do
+               _n_kwpublic = n_kwpublic
+               if n_kwpublic != null then n_kwpublic.parent = self
        end
 
        redef fun replace_child(old_child: ANode, new_child: nullable ANode)
        do
+               if _n_kwpublic == old_child then
+                       n_kwpublic = new_child.as(nullable TKwpublic)
+                       return
+               end
        end
 
+       redef fun n_kwpublic=(node)
+       do
+               _n_kwpublic = node
+               if node != null then node.parent = self
+       end
 
 
        redef fun visit_all(v: Visitor)
        do
+               v.enter_visit(_n_kwpublic)
        end
 end
 redef class APrivateVisibility
@@ -1336,6 +1376,7 @@ redef class AExternMethPropdef
                n_kwmeth: nullable TKwmeth,
                n_methid: nullable AMethid,
                n_signature: nullable ASignature,
+               n_annotations: nullable AAnnotations,
                n_extern: nullable TString,
                n_extern_calls: nullable AExternCalls,
                n_extern_code_block: nullable AExternCodeBlock
@@ -1353,6 +1394,8 @@ redef class AExternMethPropdef
                n_methid.parent = self
                _n_signature = n_signature.as(not null)
                n_signature.parent = self
+               _n_annotations = n_annotations
+               if n_annotations != null then n_annotations.parent = self
                _n_extern = n_extern
                if n_extern != null then n_extern.parent = self
                _n_extern_calls = n_extern_calls
@@ -1387,6 +1430,10 @@ redef class AExternMethPropdef
                        n_signature = new_child.as(ASignature)
                        return
                end
+               if _n_annotations == old_child then
+                       n_annotations = new_child.as(nullable AAnnotations)
+                       return
+               end
                if _n_extern == old_child then
                        n_extern = new_child.as(nullable TString)
                        return
@@ -1431,6 +1478,11 @@ redef class AExternMethPropdef
                _n_signature = node
                node.parent = self
        end
+       redef fun n_annotations=(node)
+       do
+               _n_annotations = node
+               if node != null then node.parent = self
+       end
        redef fun n_extern=(node)
        do
                _n_extern = node
@@ -1456,6 +1508,7 @@ redef class AExternMethPropdef
                v.enter_visit(_n_kwmeth)
                v.enter_visit(_n_methid)
                v.enter_visit(_n_signature)
+               v.enter_visit(_n_annotations)
                v.enter_visit(_n_extern)
                v.enter_visit(_n_extern_calls)
                v.enter_visit(_n_extern_code_block)
@@ -1709,6 +1762,7 @@ redef class AExternInitPropdef
                n_kwnew: nullable TKwnew,
                n_methid: nullable AMethid,
                n_signature: nullable ASignature,
+               n_annotations: nullable AAnnotations,
                n_extern: nullable TString,
                n_extern_calls: nullable AExternCalls,
                n_extern_code_block: nullable AExternCodeBlock
@@ -1726,6 +1780,8 @@ redef class AExternInitPropdef
                if n_methid != null then n_methid.parent = self
                _n_signature = n_signature.as(not null)
                n_signature.parent = self
+               _n_annotations = n_annotations
+               if n_annotations != null then n_annotations.parent = self
                _n_extern = n_extern
                if n_extern != null then n_extern.parent = self
                _n_extern_calls = n_extern_calls
@@ -1760,6 +1816,10 @@ redef class AExternInitPropdef
                        n_signature = new_child.as(ASignature)
                        return
                end
+               if _n_annotations == old_child then
+                       n_annotations = new_child.as(nullable AAnnotations)
+                       return
+               end
                if _n_extern == old_child then
                        n_extern = new_child.as(nullable TString)
                        return
@@ -1804,6 +1864,11 @@ redef class AExternInitPropdef
                _n_signature = node
                node.parent = self
        end
+       redef fun n_annotations=(node)
+       do
+               _n_annotations = node
+               if node != null then node.parent = self
+       end
        redef fun n_extern=(node)
        do
                _n_extern = node
@@ -1829,6 +1894,7 @@ redef class AExternInitPropdef
                v.enter_visit(_n_kwnew)
                v.enter_visit(_n_methid)
                v.enter_visit(_n_signature)
+               v.enter_visit(_n_annotations)
                v.enter_visit(_n_extern)
                v.enter_visit(_n_extern_calls)
                v.enter_visit(_n_extern_code_block)
@@ -2848,8 +2914,8 @@ redef class ALabel
        do
                _n_kwlabel = n_kwlabel.as(not null)
                n_kwlabel.parent = self
-               _n_id = n_id.as(not null)
-               n_id.parent = self
+               _n_id = n_id
+               if n_id != null then n_id.parent = self
        end
 
        redef fun replace_child(old_child: ANode, new_child: nullable ANode)
@@ -2859,7 +2925,7 @@ redef class ALabel
                        return
                end
                if _n_id == old_child then
-                       n_id = new_child.as(TId)
+                       n_id = new_child.as(nullable TId)
                        return
                end
        end
@@ -2872,7 +2938,7 @@ redef class ALabel
        redef fun n_id=(node)
        do
                _n_id = node
-               node.parent = self
+               if node != null then node.parent = self
        end
 
 
@@ -3054,16 +3120,13 @@ end
 redef class ABreakExpr
        init init_abreakexpr (
                n_kwbreak: nullable TKwbreak,
-               n_label: nullable ALabel,
-               n_expr: nullable AExpr
+               n_label: nullable ALabel
        )
        do
                _n_kwbreak = n_kwbreak.as(not null)
                n_kwbreak.parent = self
                _n_label = n_label
                if n_label != null then n_label.parent = self
-               _n_expr = n_expr
-               if n_expr != null then n_expr.parent = self
        end
 
        redef fun replace_child(old_child: ANode, new_child: nullable ANode)
@@ -3076,10 +3139,6 @@ redef class ABreakExpr
                        n_label = new_child.as(nullable ALabel)
                        return
                end
-               if _n_expr == old_child then
-                       n_expr = new_child.as(nullable AExpr)
-                       return
-               end
        end
 
        redef fun n_kwbreak=(node)
@@ -3092,18 +3151,12 @@ redef class ABreakExpr
                _n_label = node
                if node != null then node.parent = self
        end
-       redef fun n_expr=(node)
-       do
-               _n_expr = node
-               if node != null then node.parent = self
-       end
 
 
        redef fun visit_all(v: Visitor)
        do
                v.enter_visit(_n_kwbreak)
                v.enter_visit(_n_label)
-               v.enter_visit(_n_expr)
        end
 end
 redef class AAbortExpr
@@ -3138,16 +3191,13 @@ end
 redef class AContinueExpr
        init init_acontinueexpr (
                n_kwcontinue: nullable TKwcontinue,
-               n_label: nullable ALabel,
-               n_expr: nullable AExpr
+               n_label: nullable ALabel
        )
        do
                _n_kwcontinue = n_kwcontinue
                if n_kwcontinue != null then n_kwcontinue.parent = self
                _n_label = n_label
                if n_label != null then n_label.parent = self
-               _n_expr = n_expr
-               if n_expr != null then n_expr.parent = self
        end
 
        redef fun replace_child(old_child: ANode, new_child: nullable ANode)
@@ -3160,10 +3210,6 @@ redef class AContinueExpr
                        n_label = new_child.as(nullable ALabel)
                        return
                end
-               if _n_expr == old_child then
-                       n_expr = new_child.as(nullable AExpr)
-                       return
-               end
        end
 
        redef fun n_kwcontinue=(node)
@@ -3176,18 +3222,12 @@ redef class AContinueExpr
                _n_label = node
                if node != null then node.parent = self
        end
-       redef fun n_expr=(node)
-       do
-               _n_expr = node
-               if node != null then node.parent = self
-       end
 
 
        redef fun visit_all(v: Visitor)
        do
                v.enter_visit(_n_kwcontinue)
                v.enter_visit(_n_label)
-               v.enter_visit(_n_expr)
        end
 end
 redef class ADoExpr
@@ -6719,6 +6759,48 @@ redef class ADebugTypeExpr
                v.enter_visit(_n_type)
        end
 end
+redef class AVarargExpr
+       init init_avarargexpr (
+               n_expr: nullable AExpr,
+               n_dotdotdot: nullable TDotdotdot
+       )
+       do
+               _n_expr = n_expr.as(not null)
+               n_expr.parent = self
+               _n_dotdotdot = n_dotdotdot.as(not null)
+               n_dotdotdot.parent = self
+       end
+
+       redef fun replace_child(old_child: ANode, new_child: nullable ANode)
+       do
+               if _n_expr == old_child then
+                       n_expr = new_child.as(AExpr)
+                       return
+               end
+               if _n_dotdotdot == old_child then
+                       n_dotdotdot = new_child.as(TDotdotdot)
+                       return
+               end
+       end
+
+       redef fun n_expr=(node)
+       do
+               _n_expr = node
+               node.parent = self
+       end
+       redef fun n_dotdotdot=(node)
+       do
+               _n_dotdotdot = node
+               node.parent = self
+       end
+
+
+       redef fun visit_all(v: Visitor)
+       do
+               v.enter_visit(_n_expr)
+               v.enter_visit(_n_dotdotdot)
+       end
+end
 redef class AListExprs
        init init_alistexprs (
                n_exprs: Collection[Object] # Should be Collection[AExpr]
@@ -7514,6 +7596,9 @@ redef class AAnnotations
 end
 redef class AAnnotation
        init init_aannotation (
+               n_doc: nullable ADoc,
+               n_kwredef: nullable TKwredef,
+               n_visibility: nullable AVisibility,
                n_atid: nullable AAtid,
                n_opar: nullable TOpar,
                n_args: Collection[Object], # Should be Collection[AAtArg]
@@ -7521,6 +7606,12 @@ redef class AAnnotation
                n_annotations: nullable AAnnotations
        )
        do
+               _n_doc = n_doc
+               if n_doc != null then n_doc.parent = self
+               _n_kwredef = n_kwredef
+               if n_kwredef != null then n_kwredef.parent = self
+               _n_visibility = n_visibility
+               if n_visibility != null then n_visibility.parent = self
                _n_atid = n_atid.as(not null)
                n_atid.parent = self
                _n_opar = n_opar
@@ -7534,6 +7625,18 @@ redef class AAnnotation
 
        redef fun replace_child(old_child: ANode, new_child: nullable ANode)
        do
+               if _n_doc == old_child then
+                       n_doc = new_child.as(nullable ADoc)
+                       return
+               end
+               if _n_kwredef == old_child then
+                       n_kwredef = new_child.as(nullable TKwredef)
+                       return
+               end
+               if _n_visibility == old_child then
+                       n_visibility = new_child.as(nullable AVisibility)
+                       return
+               end
                if _n_atid == old_child then
                        n_atid = new_child.as(AAtid)
                        return
@@ -7553,6 +7656,21 @@ redef class AAnnotation
                end
        end
 
+       redef fun n_doc=(node)
+       do
+               _n_doc = node
+               if node != null then node.parent = self
+       end
+       redef fun n_kwredef=(node)
+       do
+               _n_kwredef = node
+               if node != null then node.parent = self
+       end
+       redef fun n_visibility=(node)
+       do
+               _n_visibility = node
+               if node != null then node.parent = self
+       end
        redef fun n_atid=(node)
        do
                _n_atid = node
@@ -7577,6 +7695,9 @@ redef class AAnnotation
 
        redef fun visit_all(v: Visitor)
        do
+               v.enter_visit(_n_doc)
+               v.enter_visit(_n_kwredef)
+               v.enter_visit(_n_visibility)
                v.enter_visit(_n_atid)
                v.enter_visit(_n_opar)
                n_args.visit_all(v)
index 852a50f..646ce11 100644 (file)
@@ -2304,18 +2304,18 @@ const int lexer_accept_table[] = {
 
 static int parser_action_row1[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
 static int parser_action_row2[] = {
        1,
-       -1, 1, 852
+       -1, 1, 828
 };
 static int parser_action_row3[] = {
        1,
-       -1, 1, 850
+       -1, 1, 826
 };
 static int parser_action_row4[] = {
        2,
@@ -2324,18 +2324,18 @@ static int parser_action_row4[] = {
 };
 static int parser_action_row5[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
 static int parser_action_row6[] = {
        1,
-       -1, 1, 818
+       -1, 1, 792
 };
 static int parser_action_row7[] = {
        1,
-       -1, 1, 822
+       -1, 1, 796
 };
 static int parser_action_row8[] = {
        1,
@@ -2351,54 +2351,53 @@ static int parser_action_row10[] = {
 };
 static int parser_action_row11[] = {
        1,
-       -1, 1, 820
+       -1, 1, 794
 };
 static int parser_action_row12[] = {
        2,
-       -1, 1, 381,
+       -1, 1, 386,
        97, 1, 23
 };
 static int parser_action_row13[] = {
-       35,
+       34,
        -1, 1, 42,
-       3, 0, 26,
-       12, 0, 27,
-       13, 0, 28,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       31, 0, 35,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56,
-       96, 0, 57
+       12, 0, 26,
+       13, 0, 27,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       31, 0, 34,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       44, 1, 367,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55,
+       96, 0, 56
 };
 static int parser_action_row14[] = {
        2,
-       -1, 1, 379,
+       -1, 1, 384,
        1, 0, 2
 };
 static int parser_action_row15[] = {
@@ -2408,40 +2407,40 @@ static int parser_action_row15[] = {
 static int parser_action_row16[] = {
        3,
        -1, 3, 15,
-       0, 0, 83,
-       1, 0, 84
+       0, 0, 82,
+       1, 0, 83
 };
 static int parser_action_row17[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
 static int parser_action_row18[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
 static int parser_action_row19[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
 static int parser_action_row20[] = {
        3,
-       -1, 1, 377,
+       -1, 1, 382,
        0, 0, 1,
-       1, 0, 97
+       1, 0, 96
 };
 static int parser_action_row21[] = {
        2,
-       -1, 1, 384,
-       0, 0, 99
+       -1, 1, 389,
+       0, 0, 98
 };
 static int parser_action_row22[] = {
        1,
@@ -2450,686 +2449,646 @@ static int parser_action_row22[] = {
 static int parser_action_row23[] = {
        34,
        -1, 1, 42,
-       12, 0, 27,
-       13, 0, 28,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       31, 0, 35,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56,
-       96, 0, 57
+       12, 0, 26,
+       13, 0, 27,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       31, 0, 34,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       44, 1, 367,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55,
+       96, 0, 56
 };
 static int parser_action_row24[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
 static int parser_action_row25[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
 static int parser_action_row26[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
 static int parser_action_row27[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       26,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 116,
+       56, 1, 349,
+       64, 1, 349,
+       66, 1, 349,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row28[] = {
-       25,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 118,
-       56, 1, 344,
-       66, 1, 344,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
-};
-static int parser_action_row29[] = {
        1,
        -1, 1, 43
 };
-static int parser_action_row30[] = {
+static int parser_action_row29[] = {
        32,
-       -1, 1, 362,
+       -1, 1, 367,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 141,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       9, 0, 139,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
-static int parser_action_row31[] = {
+static int parser_action_row30[] = {
        2,
-       -1, 3, 30,
-       84, 0, 146
+       -1, 3, 29,
+       84, 0, 144
 };
-static int parser_action_row32[] = {
+static int parser_action_row31[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row33[] = {
+static int parser_action_row32[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row34[] = {
+static int parser_action_row33[] = {
        32,
-       -1, 1, 362,
+       -1, 1, 367,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 141,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       9, 0, 139,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
-static int parser_action_row35[] = {
+static int parser_action_row34[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row36[] = {
+static int parser_action_row35[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row37[] = {
+static int parser_action_row36[] = {
        24,
-       -1, 1, 176,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 180,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       44, 1, 367,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
+};
+static int parser_action_row37[] = {
+       2,
+       -1, 1, 185,
+       52, 0, 171
 };
 static int parser_action_row38[] = {
-       25,
-       -1, 1, 183,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       52, 0, 172,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 182,
+       52, 0, 171
 };
 static int parser_action_row39[] = {
-       25,
-       -1, 1, 178,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       52, 0, 172,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
-};
-static int parser_action_row40[] = {
        1,
-       -1, 1, 182
+       -1, 1, 184
 };
-static int parser_action_row41[] = {
+static int parser_action_row40[] = {
        22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 177,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 174,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
-static int parser_action_row42[] = {
+static int parser_action_row41[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row42[] = {
+       2,
+       -1, 1, 319,
+       82, 0, 180
+};
 static int parser_action_row43[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row44[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row45[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row46[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 3, 45,
+       11, 0, 186
 };
 static int parser_action_row47[] = {
-       2,
-       -1, 3, 46,
-       11, 0, 189
-};
-static int parser_action_row48[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row49[] = {
+static int parser_action_row48[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row49[] = {
+       2,
+       -1, 3, 48,
+       60, 0, 189
+};
 static int parser_action_row50[] = {
        2,
-       -1, 3, 49,
-       60, 0, 192
+       -1, 1, 368,
+       60, 0, 190
 };
 static int parser_action_row51[] = {
        2,
-       -1, 1, 363,
-       60, 0, 193
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row52[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row53[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row54[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row55[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       1,
+       -1, 1, 311
 };
 static int parser_action_row56[] = {
-       1,
-       -1, 1, 310
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row57[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       1,
+       -1, 1, 152
 };
 static int parser_action_row58[] = {
-       1,
-       -1, 1, 148
+       5,
+       -1, 1, 97,
+       21, 0, 196,
+       22, 0, 197,
+       23, 0, 198,
+       24, 0, 199
 };
 static int parser_action_row59[] = {
-       4,
-       -1, 1, 94,
-       22, 0, 199,
-       23, 0, 200,
-       24, 0, 201
-};
-static int parser_action_row60[] = {
        2,
-       -1, 3, 59,
-       96, 0, 203
+       -1, 3, 58,
+       96, 0, 201
 };
-static int parser_action_row61[] = {
+static int parser_action_row60[] = {
        1,
-       -1, 1, 152
+       -1, 1, 156
 };
-static int parser_action_row62[] = {
+static int parser_action_row61[] = {
        1,
        -1, 1, 24
 };
-static int parser_action_row63[] = {
+static int parser_action_row62[] = {
        1,
        -1, 1, 25
 };
-static int parser_action_row64[] = {
+static int parser_action_row63[] = {
        3,
-       -1, 1, 167,
+       -1, 1, 171,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row64[] = {
+       1,
+       -1, 1, 178
+};
 static int parser_action_row65[] = {
        1,
-       -1, 1, 174
+       -1, 1, 179
 };
 static int parser_action_row66[] = {
        1,
-       -1, 1, 175
+       -1, 1, 187
 };
 static int parser_action_row67[] = {
        1,
-       -1, 1, 187
+       -1, 1, 188
 };
 static int parser_action_row68[] = {
        1,
-       -1, 1, 188
+       -1, 1, 190
 };
 static int parser_action_row69[] = {
        1,
-       -1, 1, 190
+       -1, 1, 189
 };
 static int parser_action_row70[] = {
        1,
-       -1, 1, 189
+       -1, 1, 191
 };
 static int parser_action_row71[] = {
        1,
-       -1, 1, 191
+       -1, 1, 192
 };
 static int parser_action_row72[] = {
-       1,
-       -1, 1, 192
+       4,
+       -1, 3, 71,
+       56, 0, 205,
+       64, 0, 206,
+       66, 0, 207
 };
 static int parser_action_row73[] = {
-       3,
-       -1, 3, 72,
-       56, 0, 207,
-       66, 0, 208
-};
-static int parser_action_row74[] = {
        1,
        -1, 1, 301
 };
-static int parser_action_row75[] = {
+static int parser_action_row74[] = {
        3,
-       -1, 3, 74,
-       91, 0, 210,
-       92, 0, 211
+       -1, 3, 73,
+       91, 0, 209,
+       92, 0, 210
 };
-static int parser_action_row76[] = {
+static int parser_action_row75[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row77[] = {
+static int parser_action_row76[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
-static int parser_action_row78[] = {
+static int parser_action_row77[] = {
        3,
-       -1, 3, 77,
-       44, 0, 218,
-       85, 0, 219
+       -1, 3, 76,
+       44, 0, 217,
+       85, 0, 218
 };
-static int parser_action_row79[] = {
-       28,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 118,
-       56, 1, 344,
-       61, 1, 344,
-       62, 1, 344,
-       63, 1, 344,
-       66, 1, 344,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+static int parser_action_row78[] = {
+       29,
+       -1, 1, 349,
+       0, 1, 353,
+       1, 1, 353,
+       9, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 116,
+       55, 1, 353,
+       58, 1, 353,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122,
+       97, 1, 353
 };
-static int parser_action_row80[] = {
+static int parser_action_row79[] = {
        1,
-       -1, 1, 848
+       -1, 1, 824
 };
-static int parser_action_row81[] = {
+static int parser_action_row80[] = {
        3,
-       -1, 1, 359,
-       12, 0, 222,
-       84, 0, 223
+       -1, 1, 364,
+       12, 0, 221,
+       84, 0, 222
 };
-static int parser_action_row82[] = {
+static int parser_action_row81[] = {
        4,
-       -1, 1, 361,
-       12, 0, 224,
-       83, 0, 49,
-       84, 0, 225
+       -1, 1, 366,
+       12, 0, 223,
+       83, 0, 48,
+       84, 0, 224
 };
-static int parser_action_row83[] = {
+static int parser_action_row82[] = {
        3,
-       -1, 1, 378,
+       -1, 1, 383,
        0, 0, 1,
-       1, 0, 97
+       1, 0, 96
+};
+static int parser_action_row83[] = {
+       1,
+       -1, 1, 381
 };
 static int parser_action_row84[] = {
        1,
-       -1, 1, 376
+       -1, 1, 380
 };
 static int parser_action_row85[] = {
        1,
-       -1, 1, 375
+       -1, 1, 390
 };
 static int parser_action_row86[] = {
        1,
-       -1, 1, 385
+       -1, 1, 793
 };
 static int parser_action_row87[] = {
        1,
-       -1, 1, 819
-};
-static int parser_action_row88[] = {
-       1,
        -1, 1, 2
 };
-static int parser_action_row89[] = {
+static int parser_action_row88[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
-static int parser_action_row90[] = {
+static int parser_action_row89[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
-static int parser_action_row91[] = {
+static int parser_action_row90[] = {
        1,
        -1, 1, 4
 };
-static int parser_action_row92[] = {
+static int parser_action_row91[] = {
        1,
-       -1, 1, 821
+       -1, 1, 795
 };
-static int parser_action_row93[] = {
+static int parser_action_row92[] = {
        34,
        -1, 1, 42,
-       12, 0, 27,
-       13, 0, 28,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       31, 0, 35,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56,
-       96, 0, 57
+       12, 0, 26,
+       13, 0, 27,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       31, 0, 34,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       44, 1, 367,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55,
+       96, 0, 56
 };
-static int parser_action_row94[] = {
+static int parser_action_row93[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
-static int parser_action_row95[] = {
+static int parser_action_row94[] = {
        1,
-       -1, 1, 823
+       -1, 1, 797
 };
-static int parser_action_row96[] = {
+static int parser_action_row95[] = {
        1,
        -1, 1, 8
 };
-static int parser_action_row97[] = {
+static int parser_action_row96[] = {
        32,
        -1, 1, 42,
-       12, 0, 27,
-       13, 0, 28,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       12, 0, 26,
+       13, 0, 27,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       44, 1, 367,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
-static int parser_action_row98[] = {
+static int parser_action_row97[] = {
        1,
-       -1, 1, 851
+       -1, 1, 827
 };
-static int parser_action_row99[] = {
+static int parser_action_row98[] = {
        2,
-       -1, 1, 382,
-       0, 0, 99
+       -1, 1, 387,
+       0, 0, 98
 };
-static int parser_action_row100[] = {
+static int parser_action_row99[] = {
        1,
-       -1, 1, 853
+       -1, 1, 829
+};
+static int parser_action_row100[] = {
+       5,
+       -1, 1, 97,
+       21, 0, 196,
+       22, 0, 197,
+       23, 0, 198,
+       24, 0, 199
 };
 static int parser_action_row101[] = {
        1,
@@ -3137,14 +3096,14 @@ static int parser_action_row101[] = {
 };
 static int parser_action_row102[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
 static int parser_action_row103[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
@@ -3155,7 +3114,7 @@ static int parser_action_row104[] = {
 };
 static int parser_action_row105[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
@@ -3165,1008 +3124,971 @@ static int parser_action_row106[] = {
        -1, 1, 9
 };
 static int parser_action_row107[] = {
-       1,
-       -1, 1, 381
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row108[] = {
        3,
-       -1, 3, 107,
-       60, 0, 238,
-       84, 0, 239
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row109[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row110[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row111[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row112[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row113[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row114[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row115[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row116[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
-};
-static int parser_action_row117[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
-};
-static int parser_action_row118[] = {
        15,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 252,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 248,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
-static int parser_action_row119[] = {
+static int parser_action_row117[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row120[] = {
+static int parser_action_row118[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row119[] = {
+       2,
+       -1, 1, 319,
+       82, 0, 180
+};
+static int parser_action_row120[] = {
+       2,
+       -1, 1, 319,
+       82, 0, 180
+};
 static int parser_action_row121[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row122[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row123[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row124[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       1,
+       -1, 1, 554
 };
 static int parser_action_row125[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       1,
+       -1, 1, 286
 };
 static int parser_action_row126[] = {
        1,
-       -1, 1, 551
+       -1, 1, 197
 };
 static int parser_action_row127[] = {
-       1,
-       -1, 1, 286
+       3,
+       -1, 3, 126,
+       44, 0, 258,
+       85, 0, 259
 };
 static int parser_action_row128[] = {
-       1,
-       -1, 1, 197
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row129[] = {
-       3,
-       -1, 3, 128,
-       44, 0, 262,
-       85, 0, 263
+       2,
+       -1, 1, 364,
+       84, 0, 222
 };
 static int parser_action_row130[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       1,
+       -1, 1, 351
 };
 static int parser_action_row131[] = {
-       2,
-       -1, 1, 359,
-       84, 0, 223
+       4,
+       -1, 1, 502,
+       32, 0, 261,
+       33, 0, 262,
+       35, 0, 263
 };
 static int parser_action_row132[] = {
        1,
-       -1, 1, 346
+       -1, 1, 504
 };
 static int parser_action_row133[] = {
-       4,
-       -1, 1, 499,
-       32, 0, 265,
-       33, 0, 266,
-       35, 0, 267
+       3,
+       -1, 1, 509,
+       76, 0, 264,
+       79, 0, 265
 };
 static int parser_action_row134[] = {
-       1,
-       -1, 1, 501
+       11,
+       -1, 1, 511,
+       42, 0, 266,
+       67, 0, 267,
+       68, 0, 268,
+       72, 0, 269,
+       73, 0, 270,
+       74, 0, 271,
+       75, 0, 272,
+       77, 0, 273,
+       78, 0, 274,
+       80, 0, 275
 };
 static int parser_action_row135[] = {
-       3,
-       -1, 1, 506,
-       76, 0, 268,
-       79, 0, 269
+       4,
+       -1, 1, 522,
+       69, 0, 276,
+       70, 0, 277,
+       71, 0, 278
 };
 static int parser_action_row136[] = {
-       11,
-       -1, 1, 508,
-       42, 0, 270,
-       67, 0, 271,
-       68, 0, 272,
-       72, 0, 273,
-       73, 0, 274,
-       74, 0, 275,
-       75, 0, 276,
-       77, 0, 277,
-       78, 0, 278,
-       80, 0, 279
+       1,
+       -1, 1, 525
 };
 static int parser_action_row137[] = {
-       4,
-       -1, 1, 519,
-       69, 0, 280,
-       70, 0, 281,
-       71, 0, 282
+       1,
+       -1, 1, 529
 };
 static int parser_action_row138[] = {
-       1,
-       -1, 1, 522
+       4,
+       -1, 1, 532,
+       56, 0, 205,
+       64, 0, 279,
+       66, 0, 280
 };
 static int parser_action_row139[] = {
-       1,
-       -1, 1, 526
+       3,
+       -1, 1, 366,
+       83, 0, 48,
+       84, 0, 224
 };
 static int parser_action_row140[] = {
-       3,
-       -1, 1, 529,
-       56, 0, 207,
-       66, 0, 283
+       2,
+       -1, 1, 169,
+       52, 1, 727
 };
 static int parser_action_row141[] = {
-       3,
-       -1, 1, 361,
-       83, 0, 49,
-       84, 0, 225
+       1,
+       -1, 1, 224
 };
 static int parser_action_row142[] = {
-       2,
-       -1, 1, 165,
-       52, 1, 731
+       1,
+       -1, 1, 170
 };
 static int parser_action_row143[] = {
-       1,
-       -1, 1, 224
+       30,
+       -1, 1, 367,
+       9, 0, 283,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row144[] = {
-       1,
-       -1, 1, 166
+       2,
+       -1, 3, 143,
+       52, 0, 171
 };
 static int parser_action_row145[] = {
-       30,
-       -1, 1, 362,
-       9, 0, 286,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 166,
+       59, 0, 287,
+       82, 0, 180
 };
 static int parser_action_row146[] = {
-       2,
-       -1, 3, 145,
-       52, 0, 172
+       1,
+       -1, 1, 386
 };
 static int parser_action_row147[] = {
-       3,
-       -1, 1, 162,
-       59, 0, 290,
-       82, 0, 183
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row148[] = {
        22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row149[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
-};
-static int parser_action_row150[] = {
        1,
        -1, 1, 233
 };
-static int parser_action_row151[] = {
+static int parser_action_row150[] = {
        2,
+       -1, 3, 149,
+       52, 0, 171
+};
+static int parser_action_row151[] = {
+       3,
        -1, 3, 150,
-       52, 0, 172
+       54, 0, 293,
+       84, 0, 294
 };
 static int parser_action_row152[] = {
-       3,
+       2,
        -1, 3, 151,
-       54, 0, 296,
-       84, 0, 297
+       89, 0, 296
 };
 static int parser_action_row153[] = {
        2,
-       -1, 3, 152,
-       89, 0, 299
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row154[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row155[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row156[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row157[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row158[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
-};
-static int parser_action_row159[] = {
        17,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
-static int parser_action_row160[] = {
+static int parser_action_row159[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row161[] = {
+static int parser_action_row160[] = {
        1,
-       -1, 1, 177
+       -1, 1, 181
 };
-static int parser_action_row162[] = {
+static int parser_action_row161[] = {
        1,
        -1, 1, 245
 };
-static int parser_action_row163[] = {
+static int parser_action_row162[] = {
        4,
        -1, 1, 246,
-       32, 0, 307,
-       33, 0, 308,
-       35, 0, 309
+       32, 0, 304,
+       33, 0, 305,
+       35, 0, 306
 };
-static int parser_action_row164[] = {
+static int parser_action_row163[] = {
        1,
        -1, 1, 248
 };
-static int parser_action_row165[] = {
+static int parser_action_row164[] = {
        3,
        -1, 1, 253,
-       76, 0, 310,
-       79, 0, 311
+       76, 0, 307,
+       79, 0, 308
 };
-static int parser_action_row166[] = {
+static int parser_action_row165[] = {
        11,
        -1, 1, 255,
-       42, 0, 312,
-       67, 0, 313,
-       68, 0, 314,
-       72, 0, 315,
-       73, 0, 316,
-       74, 0, 317,
-       75, 0, 318,
-       77, 0, 319,
-       78, 0, 320,
-       80, 0, 321
+       42, 0, 309,
+       67, 0, 310,
+       68, 0, 311,
+       72, 0, 312,
+       73, 0, 313,
+       74, 0, 314,
+       75, 0, 315,
+       77, 0, 316,
+       78, 0, 317,
+       80, 0, 318
 };
-static int parser_action_row167[] = {
+static int parser_action_row166[] = {
        4,
        -1, 1, 266,
-       69, 0, 322,
-       70, 0, 323,
-       71, 0, 324
+       69, 0, 319,
+       70, 0, 320,
+       71, 0, 321
 };
-static int parser_action_row168[] = {
+static int parser_action_row167[] = {
        1,
        -1, 1, 269
 };
-static int parser_action_row169[] = {
+static int parser_action_row168[] = {
        1,
        -1, 1, 273
 };
+static int parser_action_row169[] = {
+       4,
+       -1, 1, 276,
+       56, 0, 205,
+       64, 0, 206,
+       66, 0, 322
+};
 static int parser_action_row170[] = {
        3,
-       -1, 1, 276,
-       56, 0, 207,
-       66, 0, 325
+       -1, 3, 169,
+       44, 0, 324,
+       85, 0, 325
 };
 static int parser_action_row171[] = {
-       3,
-       -1, 3, 170,
-       44, 0, 327,
-       85, 0, 328
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row172[] = {
        2,
-       -1, 1, 344,
-       54, 0, 242
+       -1, 1, 205,
+       84, 0, 327
 };
 static int parser_action_row173[] = {
-       2,
-       -1, 3, 172,
-       84, 0, 330
-};
-static int parser_action_row174[] = {
-       24,
-       -1, 1, 184,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
-};
-static int parser_action_row175[] = {
        1,
-       -1, 1, 185
-};
-static int parser_action_row176[] = {
-       24,
-       -1, 1, 179,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 186
 };
-static int parser_action_row177[] = {
+static int parser_action_row174[] = {
        1,
-       -1, 1, 180
+       -1, 1, 183
 };
-static int parser_action_row178[] = {
+static int parser_action_row175[] = {
        3,
-       -1, 1, 363,
-       59, 0, 333,
-       60, 0, 193
+       -1, 1, 368,
+       59, 0, 328,
+       60, 0, 190
 };
-static int parser_action_row179[] = {
+static int parser_action_row176[] = {
        22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
-static int parser_action_row180[] = {
+static int parser_action_row177[] = {
        1,
        -1, 1, 242
 };
-static int parser_action_row181[] = {
+static int parser_action_row178[] = {
        2,
        -1, 1, 245,
        27, 1, 684
 };
-static int parser_action_row182[] = {
+static int parser_action_row179[] = {
        2,
-       -1, 3, 181,
-       27, 0, 336
+       -1, 3, 178,
+       27, 0, 331
 };
-static int parser_action_row183[] = {
+static int parser_action_row180[] = {
        3,
-       -1, 3, 182,
-       50, 0, 337,
-       83, 0, 338
+       -1, 3, 179,
+       50, 0, 332,
+       83, 0, 333
 };
-static int parser_action_row184[] = {
-       6,
-       -1, 3, 183,
-       4, 0, 340,
-       16, 0, 341,
-       17, 0, 342,
-       54, 0, 343,
-       84, 0, 344
+static int parser_action_row181[] = {
+       3,
+       -1, 1, 42,
+       13, 0, 27,
+       54, 0, 335
 };
-static int parser_action_row185[] = {
+static int parser_action_row182[] = {
        1,
-       -1, 1, 317
+       -1, 1, 318
 };
-static int parser_action_row186[] = {
+static int parser_action_row183[] = {
        1,
        -1, 1, 292
 };
-static int parser_action_row187[] = {
+static int parser_action_row184[] = {
        1,
        -1, 1, 293
 };
-static int parser_action_row188[] = {
+static int parser_action_row185[] = {
        1,
        -1, 1, 294
 };
-static int parser_action_row189[] = {
+static int parser_action_row186[] = {
        1,
        -1, 1, 295
 };
-static int parser_action_row190[] = {
+static int parser_action_row187[] = {
        3,
-       -1, 3, 189,
-       50, 0, 347,
-       83, 0, 348
+       -1, 3, 186,
+       50, 0, 338,
+       83, 0, 339
 };
-static int parser_action_row191[] = {
+static int parser_action_row188[] = {
        22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
-static int parser_action_row192[] = {
+static int parser_action_row189[] = {
        22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
-static int parser_action_row193[] = {
+static int parser_action_row190[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row194[] = {
+static int parser_action_row191[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row195[] = {
+static int parser_action_row192[] = {
        1,
        -1, 1, 296
 };
-static int parser_action_row196[] = {
+static int parser_action_row193[] = {
        1,
        -1, 1, 297
 };
-static int parser_action_row197[] = {
+static int parser_action_row194[] = {
        1,
        -1, 1, 298
 };
-static int parser_action_row198[] = {
+static int parser_action_row195[] = {
        1,
        -1, 1, 300
 };
-static int parser_action_row199[] = {
+static int parser_action_row196[] = {
        1,
        -1, 1, 299
 };
-static int parser_action_row200[] = {
+static int parser_action_row197[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row201[] = {
+static int parser_action_row198[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row202[] = {
+static int parser_action_row199[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row203[] = {
-       8,
-       -1, 3, 202,
-       4, 0, 358,
-       5, 0, 359,
-       6, 0, 360,
-       7, 0, 361,
-       8, 0, 362,
-       10, 0, 363,
-       20, 0, 364
+static int parser_action_row200[] = {
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
-static int parser_action_row204[] = {
+static int parser_action_row201[] = {
+       9,
+       -1, 3, 200,
+       3, 0, 350,
+       4, 0, 351,
+       5, 0, 352,
+       6, 0, 353,
+       7, 0, 354,
+       8, 0, 355,
+       10, 0, 356,
+       20, 0, 357
+};
+static int parser_action_row202[] = {
        1,
-       -1, 1, 149
+       -1, 1, 153
 };
-static int parser_action_row205[] = {
+static int parser_action_row203[] = {
        1,
-       -1, 1, 836
+       -1, 1, 810
 };
-static int parser_action_row206[] = {
+static int parser_action_row204[] = {
        31,
-       -1, 1, 169,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 173,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       44, 1, 367,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
-static int parser_action_row207[] = {
+static int parser_action_row205[] = {
        3,
-       -1, 1, 168,
+       -1, 1, 172,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row208[] = {
+static int parser_action_row206[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row209[] = {
+static int parser_action_row207[] = {
+       1,
+       -1, 1, 306
+};
+static int parser_action_row208[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row210[] = {
+static int parser_action_row209[] = {
        4,
        -1, 1, 287,
-       61, 0, 371,
-       62, 0, 372,
-       63, 0, 373
+       61, 0, 364,
+       62, 0, 365,
+       63, 0, 366
+};
+static int parser_action_row210[] = {
+       1,
+       -1, 1, 314
 };
 static int parser_action_row211[] = {
        1,
-       -1, 1, 313
+       -1, 1, 315
 };
 static int parser_action_row212[] = {
        1,
-       -1, 1, 314
+       -1, 1, 812
 };
 static int parser_action_row213[] = {
-       1,
-       -1, 1, 838
-};
-static int parser_action_row214[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row215[] = {
+static int parser_action_row214[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 1, 319,
+       82, 0, 180
 };
-static int parser_action_row216[] = {
+static int parser_action_row215[] = {
        3,
-       -1, 3, 215,
-       91, 0, 210,
-       92, 0, 211
+       -1, 3, 214,
+       91, 0, 209,
+       92, 0, 210
 };
-static int parser_action_row217[] = {
+static int parser_action_row216[] = {
        24,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       91, 1, 309,
-       92, 1, 309,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       91, 1, 310,
+       92, 1, 310,
+       93, 0, 55
 };
-static int parser_action_row218[] = {
+static int parser_action_row217[] = {
        1,
        -1, 1, 291
 };
-static int parser_action_row219[] = {
-       25,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 118,
-       56, 1, 344,
-       66, 1, 344,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+static int parser_action_row218[] = {
+       26,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 116,
+       56, 1, 349,
+       64, 1, 349,
+       66, 1, 349,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
-static int parser_action_row220[] = {
+static int parser_action_row219[] = {
        4,
        -1, 1, 281,
-       61, 0, 382,
-       62, 0, 372,
-       63, 0, 373
+       61, 0, 375,
+       62, 0, 365,
+       63, 0, 366
 };
-static int parser_action_row221[] = {
+static int parser_action_row220[] = {
        4,
        -1, 1, 283,
-       61, 0, 384,
-       62, 0, 372,
-       63, 0, 373
+       61, 0, 377,
+       62, 0, 365,
+       63, 0, 366
 };
-static int parser_action_row222[] = {
+static int parser_action_row221[] = {
        1,
        -1, 1, 194
 };
-static int parser_action_row223[] = {
+static int parser_action_row222[] = {
        23,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 386,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 379,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
-static int parser_action_row224[] = {
+static int parser_action_row223[] = {
        1,
-       -1, 1, 364
+       -1, 1, 369
 };
-static int parser_action_row225[] = {
+static int parser_action_row224[] = {
        23,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 386,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 379,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
-static int parser_action_row226[] = {
+static int parser_action_row225[] = {
        2,
-       -1, 1, 366,
-       60, 0, 193
+       -1, 1, 371,
+       60, 0, 190
 };
-static int parser_action_row227[] = {
+static int parser_action_row226[] = {
        1,
-       -1, 1, 849
+       -1, 1, 825
 };
-static int parser_action_row228[] = {
+static int parser_action_row227[] = {
        3,
-       -1, 1, 360,
-       12, 0, 389,
-       84, 0, 390
+       -1, 1, 365,
+       12, 0, 382,
+       84, 0, 383
 };
-static int parser_action_row229[] = {
+static int parser_action_row228[] = {
        2,
-       -1, 1, 383,
-       0, 0, 99
+       -1, 1, 388,
+       0, 0, 98
 };
-static int parser_action_row230[] = {
+static int parser_action_row229[] = {
        1,
        -1, 1, 6
 };
-static int parser_action_row231[] = {
+static int parser_action_row230[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
 };
-static int parser_action_row232[] = {
+static int parser_action_row231[] = {
        1,
        -1, 1, 10
 };
-static int parser_action_row233[] = {
-       4,
-       -1, 1, 94,
-       22, 0, 199,
-       23, 0, 200,
-       24, 0, 201
+static int parser_action_row232[] = {
+       5,
+       -1, 1, 97,
+       21, 0, 196,
+       22, 0, 197,
+       23, 0, 198,
+       24, 0, 199
 };
-static int parser_action_row234[] = {
+static int parser_action_row233[] = {
        1,
        -1, 1, 12
 };
+static int parser_action_row234[] = {
+       8,
+       -1, 3, 233,
+       4, 0, 351,
+       5, 0, 352,
+       6, 0, 353,
+       7, 0, 354,
+       8, 0, 355,
+       10, 0, 356,
+       20, 0, 357
+};
 static int parser_action_row235[] = {
        1,
        -1, 1, 7
 };
 static int parser_action_row236[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
        97, 1, 22
@@ -4181,11086 +4103,10851 @@ static int parser_action_row238[] = {
 };
 static int parser_action_row239[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row240[] = {
-       2,
-       -1, 1, 355,
-       60, 0, 193
+       1,
+       -1, 1, 542
 };
 static int parser_action_row241[] = {
-       2,
-       -1, 1, 89,
-       14, 0, 395
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row242[] = {
-       2,
-       -1, 3, 241,
-       84, 0, 397
+       19,
+       -1, 1, 367,
+       12, 0, 106,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row243[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 3, 242,
+       50, 0, 332,
+       83, 0, 333
 };
 static int parser_action_row244[] = {
-       1,
-       -1, 1, 539
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row245[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 545
 };
 static int parser_action_row246[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 108,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       1,
+       -1, 1, 546
 };
 static int parser_action_row247[] = {
-       3,
-       -1, 3, 246,
-       50, 0, 337,
-       83, 0, 338
+       1,
+       -1, 1, 547
 };
 static int parser_action_row248[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       1,
+       -1, 1, 548
 };
 static int parser_action_row249[] = {
-       1,
-       -1, 1, 542
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row250[] = {
-       1,
-       -1, 1, 543
+       3,
+       -1, 3, 249,
+       44, 0, 258,
+       85, 0, 393
 };
 static int parser_action_row251[] = {
-       1,
-       -1, 1, 544
+       4,
+       -1, 3, 250,
+       56, 0, 205,
+       64, 0, 279,
+       66, 0, 394
 };
 static int parser_action_row252[] = {
-       1,
-       -1, 1, 545
+       23,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       55, 0, 395,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row253[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row254[] = {
-       3,
-       -1, 3, 253,
-       44, 0, 262,
-       85, 0, 404
+       1,
+       -1, 1, 549
 };
 static int parser_action_row255[] = {
-       3,
-       -1, 3, 254,
-       56, 0, 207,
-       66, 0, 405
+       1,
+       -1, 1, 550
 };
 static int parser_action_row256[] = {
-       23,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       55, 0, 406,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 551
 };
 static int parser_action_row257[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       1,
+       -1, 1, 553
 };
 static int parser_action_row258[] = {
        1,
-       -1, 1, 546
+       -1, 1, 552
 };
 static int parser_action_row259[] = {
-       1,
-       -1, 1, 547
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row260[] = {
        1,
-       -1, 1, 548
+       -1, 1, 537
 };
 static int parser_action_row261[] = {
        1,
-       -1, 1, 550
+       -1, 1, 539
 };
 static int parser_action_row262[] = {
-       1,
-       -1, 1, 549
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row263[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       4,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       27, 0, 401
 };
 static int parser_action_row264[] = {
-       1,
-       -1, 1, 534
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row265[] = {
-       1,
-       -1, 1, 536
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row266[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row267[] = {
-       4,
-       -1, 1, 380,
+       3,
+       -1, 1, 385,
        0, 0, 1,
-       1, 0, 2,
-       27, 0, 412
+       1, 0, 2
 };
 static int parser_action_row268[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row269[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row270[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row271[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row272[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row273[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row274[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row275[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row276[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row277[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row278[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row279[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row280[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 558
 };
 static int parser_action_row281[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row282[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
-};
-static int parser_action_row283[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
-};
-static int parser_action_row284[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
-};
-static int parser_action_row285[] = {
        1,
-       -1, 1, 540
+       -1, 1, 543
 };
-static int parser_action_row286[] = {
+static int parser_action_row283[] = {
        2,
-       -1, 1, 360,
-       84, 0, 390
+       -1, 1, 365,
+       84, 0, 383
 };
-static int parser_action_row287[] = {
+static int parser_action_row284[] = {
        2,
-       -1, 1, 164,
-       52, 1, 730
+       -1, 1, 168,
+       52, 1, 726
 };
-static int parser_action_row288[] = {
+static int parser_action_row285[] = {
        2,
-       -1, 1, 163,
-       52, 1, 729
+       -1, 1, 167,
+       52, 1, 725
 };
-static int parser_action_row289[] = {
+static int parser_action_row286[] = {
        3,
-       -1, 3, 288,
+       -1, 3, 285,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row290[] = {
+static int parser_action_row287[] = {
        1,
        -1, 1, 223
 };
-static int parser_action_row291[] = {
+static int parser_action_row288[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row292[] = {
+static int parser_action_row289[] = {
        2,
        -1, 1, 207,
-       61, 0, 434
+       61, 0, 423
 };
-static int parser_action_row293[] = {
+static int parser_action_row290[] = {
        2,
-       -1, 1, 162,
-       59, 0, 290
+       -1, 1, 166,
+       59, 0, 287
 };
-static int parser_action_row294[] = {
+static int parser_action_row291[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row295[] = {
+static int parser_action_row292[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row296[] = {
+static int parser_action_row293[] = {
        1,
        -1, 1, 232
 };
-static int parser_action_row297[] = {
+static int parser_action_row294[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row298[] = {
+static int parser_action_row295[] = {
        1,
-       -1, 1, 353
+       -1, 1, 358
 };
-static int parser_action_row299[] = {
+static int parser_action_row296[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row300[] = {
+static int parser_action_row297[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row301[] = {
+static int parser_action_row298[] = {
        22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
-static int parser_action_row302[] = {
+static int parser_action_row299[] = {
        21,
-       -1, 1, 362,
-       12, 0, 153,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
+};
+static int parser_action_row300[] = {
+       3,
+       -1, 3, 299,
+       50, 0, 332,
+       83, 0, 333
+};
+static int parser_action_row301[] = {
+       20,
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
+};
+static int parser_action_row302[] = {
+       4,
+       -1, 3, 301,
+       56, 0, 205,
+       64, 0, 206,
+       66, 0, 434
 };
 static int parser_action_row303[] = {
        3,
        -1, 3, 302,
-       50, 0, 337,
-       83, 0, 338
+       44, 0, 324,
+       85, 0, 435
 };
 static int parser_action_row304[] = {
        20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row305[] = {
        3,
-       -1, 3, 304,
-       56, 0, 207,
-       66, 0, 445
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row306[] = {
-       3,
-       -1, 3, 305,
-       44, 0, 327,
-       85, 0, 446
+       4,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       27, 0, 438
 };
 static int parser_action_row307[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row308[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row309[] = {
-       4,
-       -1, 1, 380,
+       3,
+       -1, 1, 385,
        0, 0, 1,
-       1, 0, 2,
-       27, 0, 449
+       1, 0, 2
 };
 static int parser_action_row310[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row311[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row312[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row313[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row314[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row315[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row316[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row317[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row318[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row319[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row320[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row321[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row322[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row323[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row324[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 287
 };
 static int parser_action_row325[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row326[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 281
 };
 static int parser_action_row327[] = {
        1,
-       -1, 1, 287
+       -1, 1, 283
 };
 static int parser_action_row328[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       1,
+       -1, 1, 206
 };
 static int parser_action_row329[] = {
        1,
-       -1, 1, 281
+       -1, 1, 244
 };
 static int parser_action_row330[] = {
        1,
-       -1, 1, 283
+       -1, 1, 243
 };
 static int parser_action_row331[] = {
-       1,
-       -1, 1, 205
+       2,
+       -1, 3, 330,
+       27, 0, 457
 };
 static int parser_action_row332[] = {
-       1,
-       -1, 1, 186
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 458,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row333[] = {
-       1,
-       -1, 1, 181
+       2,
+       -1, 3, 332,
+       83, 0, 461
 };
 static int parser_action_row334[] = {
-       1,
-       -1, 1, 244
+       3,
+       -1, 1, 562,
+       56, 0, 462,
+       82, 0, 463
 };
 static int parser_action_row335[] = {
-       1,
-       -1, 1, 243
+       2,
+       -1, 3, 334,
+       66, 0, 466
 };
 static int parser_action_row336[] = {
-       2,
-       -1, 3, 335,
-       27, 0, 468
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row337[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 469,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       5,
+       -1, 1, 97,
+       21, 0, 196,
+       22, 0, 197,
+       23, 0, 198,
+       24, 0, 199
 };
 static int parser_action_row338[] = {
-       2,
-       -1, 3, 337,
-       83, 0, 472
+       1,
+       -1, 1, 316
 };
 static int parser_action_row339[] = {
-       3,
-       -1, 1, 558,
-       56, 0, 473,
-       82, 0, 474
+       2,
+       -1, 3, 338,
+       83, 0, 469
 };
 static int parser_action_row340[] = {
-       2,
-       -1, 3, 339,
-       66, 0, 477
+       3,
+       -1, 1, 319,
+       56, 0, 470,
+       82, 0, 180
 };
 static int parser_action_row341[] = {
-       1,
-       -1, 1, 341
+       2,
+       -1, 3, 340,
+       59, 0, 472
 };
 static int parser_action_row342[] = {
-       1,
-       -1, 1, 339
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row343[] = {
-       1,
-       -1, 1, 340
-};
-static int parser_action_row344[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row344[] = {
+       2,
+       -1, 3, 343,
+       57, 0, 475
+};
 static int parser_action_row345[] = {
        1,
-       -1, 1, 338
+       -1, 1, 377
 };
 static int parser_action_row346[] = {
        1,
-       -1, 1, 315
+       -1, 1, 376
 };
 static int parser_action_row347[] = {
-       3,
-       -1, 1, 318,
-       54, 0, 479,
-       82, 0, 183
+       1,
+       -1, 1, 98
 };
 static int parser_action_row348[] = {
-       2,
-       -1, 3, 347,
-       83, 0, 481
+       1,
+       -1, 1, 100
 };
 static int parser_action_row349[] = {
-       3,
-       -1, 1, 318,
-       56, 0, 482,
-       82, 0, 183
+       1,
+       -1, 1, 99
 };
 static int parser_action_row350[] = {
-       2,
-       -1, 3, 349,
-       59, 0, 484
+       1,
+       -1, 1, 101
 };
 static int parser_action_row351[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row352[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row353[] = {
-       2,
-       -1, 3, 352,
-       57, 0, 487
+       1,
+       -1, 1, 44
 };
 static int parser_action_row354[] = {
-       1,
-       -1, 1, 372
+       2,
+       -1, 3, 353,
+       5, 0, 478
 };
 static int parser_action_row355[] = {
        1,
-       -1, 1, 371
+       -1, 1, 46
 };
 static int parser_action_row356[] = {
        1,
-       -1, 1, 96
+       -1, 1, 47
 };
 static int parser_action_row357[] = {
-       1,
-       -1, 1, 95
+       17,
+       -1, 3, 356,
+       56, 0, 479,
+       67, 0, 480,
+       68, 0, 481,
+       69, 0, 482,
+       70, 0, 483,
+       71, 0, 484,
+       72, 0, 485,
+       73, 0, 486,
+       74, 0, 487,
+       75, 0, 488,
+       76, 0, 489,
+       77, 0, 490,
+       78, 0, 491,
+       79, 0, 492,
+       80, 0, 493,
+       84, 0, 494
 };
 static int parser_action_row358[] = {
-       1,
-       -1, 1, 97
+       2,
+       -1, 3, 357,
+       5, 0, 496
 };
 static int parser_action_row359[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row360[] = {
        1,
-       -1, 1, 44
+       -1, 1, 177
 };
 static int parser_action_row361[] = {
-       2,
-       -1, 3, 360,
-       5, 0, 489
+       1,
+       -1, 1, 811
 };
 static int parser_action_row362[] = {
-       1,
-       -1, 1, 46
+       31,
+       -1, 1, 174,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       44, 1, 367,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row363[] = {
-       1,
-       -1, 1, 47
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row364[] = {
-       17,
-       -1, 3, 363,
-       56, 0, 490,
-       67, 0, 491,
-       68, 0, 492,
-       69, 0, 493,
-       70, 0, 494,
-       71, 0, 495,
-       72, 0, 496,
-       73, 0, 497,
-       74, 0, 498,
-       75, 0, 499,
-       76, 0, 500,
-       77, 0, 501,
-       78, 0, 502,
-       79, 0, 503,
-       80, 0, 504,
-       84, 0, 505
+       5,
+       -1, 1, 367,
+       12, 0, 498,
+       49, 0, 499,
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row365[] = {
-       2,
-       -1, 3, 364,
-       5, 0, 507
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row366[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 221
 };
 static int parser_action_row367[] = {
        1,
-       -1, 1, 173
+       -1, 1, 222
 };
 static int parser_action_row368[] = {
-       1,
-       -1, 1, 837
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row369[] = {
-       31,
-       -1, 1, 170,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       24,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       91, 1, 313,
+       92, 1, 313,
+       93, 0, 55
 };
 static int parser_action_row370[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 307
 };
 static int parser_action_row371[] = {
-       5,
-       -1, 1, 362,
-       12, 0, 509,
-       49, 0, 510,
-       83, 0, 49,
-       84, 0, 50
+       1,
+       -1, 1, 813
 };
 static int parser_action_row372[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row373[] = {
-       1,
-       -1, 1, 221
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row374[] = {
        1,
-       -1, 1, 222
+       -1, 1, 284
 };
 static int parser_action_row375[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 195
 };
 static int parser_action_row376[] = {
-       24,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       91, 1, 312,
-       92, 1, 312,
-       93, 0, 56
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row377[] = {
-       1,
-       -1, 1, 306
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row378[] = {
-       1,
-       -1, 1, 839
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row379[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row380[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row381[] = {
        1,
-       -1, 1, 284
+       -1, 1, 201
 };
 static int parser_action_row382[] = {
        1,
-       -1, 1, 195
+       -1, 1, 203
 };
 static int parser_action_row383[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       23,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 379,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row384[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 370
 };
 static int parser_action_row385[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 14
 };
 static int parser_action_row386[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       7,
+       -1, 3, 385,
+       5, 0, 352,
+       6, 0, 353,
+       7, 0, 354,
+       8, 0, 355,
+       10, 0, 356,
+       20, 0, 357
 };
 static int parser_action_row387[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 15
 };
 static int parser_action_row388[] = {
-       1,
-       -1, 1, 201
+       23,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       55, 0, 515,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row389[] = {
-       1,
-       -1, 1, 203
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row390[] = {
-       23,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 386,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       1,
+       -1, 1, 510
 };
 static int parser_action_row391[] = {
-       1,
-       -1, 1, 365
+       3,
+       -1, 1, 349,
+       54, 0, 238,
+       66, 0, 518
 };
 static int parser_action_row392[] = {
        1,
-       -1, 1, 14
+       -1, 1, 531
 };
 static int parser_action_row393[] = {
-       7,
+       3,
        -1, 3, 392,
-       5, 0, 359,
-       6, 0, 360,
-       7, 0, 361,
-       8, 0, 362,
-       10, 0, 363,
-       20, 0, 364
+       50, 0, 332,
+       83, 0, 333
 };
 static int parser_action_row394[] = {
-       1,
-       -1, 1, 15
+       4,
+       -1, 1, 535,
+       56, 1, 537,
+       64, 1, 537,
+       66, 1, 537
 };
 static int parser_action_row395[] = {
-       2,
-       -1, 3, 394,
-       84, 0, 526
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row396[] = {
        7,
-       -1, 3, 395,
-       0, 0, 83,
-       1, 0, 84,
-       4, 0, 340,
-       16, 0, 341,
-       17, 0, 342,
-       84, 0, 344
+       -1, 1, 352,
+       56, 1, 348,
+       61, 1, 348,
+       62, 1, 348,
+       63, 1, 348,
+       64, 1, 348,
+       66, 1, 348
 };
 static int parser_action_row397[] = {
        3,
-       -1, 3, 396,
-       0, 0, 83,
-       1, 0, 84
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row398[] = {
        2,
-       -1, 1, 356,
-       60, 0, 193
+       -1, 3, 397,
+       55, 0, 523
 };
 static int parser_action_row399[] = {
-       23,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       55, 0, 533,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 530
 };
 static int parser_action_row400[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 540
 };
 static int parser_action_row401[] = {
-       1,
-       -1, 1, 507
+       19,
+       -1, 1, 367,
+       12, 0, 106,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row402[] = {
        3,
-       -1, 1, 344,
-       54, 0, 242,
-       66, 0, 536
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row403[] = {
-       1,
-       -1, 1, 528
+       19,
+       -1, 1, 367,
+       12, 0, 106,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row404[] = {
-       3,
-       -1, 3, 403,
-       50, 0, 337,
-       83, 0, 338
+       19,
+       -1, 1, 367,
+       12, 0, 106,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row405[] = {
-       3,
-       -1, 1, 532,
-       56, 1, 534,
-       66, 1, 534
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row406[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row407[] = {
-       6,
-       -1, 1, 347,
-       56, 1, 343,
-       61, 1, 343,
-       62, 1, 343,
-       63, 1, 343,
-       66, 1, 343
+       3,
+       -1, 3, 406,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row408[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row409[] = {
-       2,
-       -1, 3, 408,
-       55, 0, 541
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row410[] = {
-       1,
-       -1, 1, 527
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row411[] = {
-       1,
-       -1, 1, 537
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row412[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 108,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row413[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row414[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 108,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row415[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 108,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row416[] = {
        18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row417[] = {
        18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row418[] = {
-       3,
-       -1, 3, 417,
-       50, 0, 347,
-       83, 0, 348
+       18,
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row419[] = {
        18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       -1, 1, 367,
+       12, 0, 106,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row420[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       5,
+       -1, 1, 367,
+       12, 0, 543,
+       49, 0, 544,
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row421[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       30,
+       -1, 1, 367,
+       9, 0, 547,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row422[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       3,
+       -1, 3, 421,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row423[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       3,
+       -1, 3, 422,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row424[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row425[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       2,
+       -1, 1, 208,
+       61, 0, 551
 };
 static int parser_action_row426[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       2,
+       -1, 3, 425,
+       26, 0, 552
 };
 static int parser_action_row427[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       2,
+       -1, 3, 426,
+       15, 0, 553
 };
 static int parser_action_row428[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       2,
+       -1, 3, 427,
+       84, 0, 294
 };
 static int parser_action_row429[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       3,
+       -1, 3, 428,
+       31, 0, 555,
+       58, 0, 556
 };
 static int parser_action_row430[] = {
-       18,
-       -1, 1, 362,
-       12, 0, 108,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       1,
+       -1, 1, 151
 };
 static int parser_action_row431[] = {
-       5,
-       -1, 1, 362,
-       12, 0, 561,
-       49, 0, 562,
-       83, 0, 49,
-       84, 0, 50
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row432[] = {
-       30,
-       -1, 1, 362,
-       9, 0, 565,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 254
 };
 static int parser_action_row433[] = {
        3,
-       -1, 3, 432,
-       0, 0, 1,
-       1, 0, 2
+       -1, 1, 349,
+       54, 0, 238,
+       66, 0, 466
 };
 static int parser_action_row434[] = {
-       3,
-       -1, 3, 433,
-       50, 0, 347,
-       83, 0, 348
+       1,
+       -1, 1, 275
 };
 static int parser_action_row435[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row436[] = {
-       2,
-       -1, 1, 208,
-       61, 0, 569
+       4,
+       -1, 1, 279,
+       56, 1, 281,
+       64, 1, 281,
+       66, 1, 281
 };
 static int parser_action_row437[] = {
-       2,
-       -1, 3, 436,
-       26, 0, 570
+       1,
+       -1, 1, 274
 };
 static int parser_action_row438[] = {
-       2,
-       -1, 3, 437,
-       15, 0, 571
+       21,
+       -1, 1, 367,
+       12, 0, 152,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row439[] = {
-       2,
-       -1, 3, 438,
-       84, 0, 297
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row440[] = {
-       3,
-       -1, 3, 439,
-       31, 0, 573,
-       58, 0, 574
+       21,
+       -1, 1, 367,
+       12, 0, 152,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row441[] = {
-       1,
-       -1, 1, 147
+       21,
+       -1, 1, 367,
+       12, 0, 152,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row442[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       20,
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row443[] = {
-       1,
-       -1, 1, 254
+       20,
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row444[] = {
        3,
-       -1, 1, 344,
-       54, 0, 242,
-       66, 0, 477
+       -1, 3, 443,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row445[] = {
-       1,
-       -1, 1, 275
+       20,
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row446[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       20,
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row447[] = {
-       3,
-       -1, 1, 279,
-       56, 1, 281,
-       66, 1, 281
+       20,
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row448[] = {
-       1,
-       -1, 1, 274
+       20,
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row449[] = {
-       21,
-       -1, 1, 362,
-       12, 0, 153,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       20,
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row450[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       20,
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row451[] = {
-       21,
-       -1, 1, 362,
-       12, 0, 153,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       20,
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row452[] = {
-       21,
-       -1, 1, 362,
-       12, 0, 153,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       20,
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row453[] = {
        20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row454[] = {
        20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row455[] = {
-       3,
-       -1, 3, 454,
-       50, 0, 347,
-       83, 0, 348
+       20,
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row456[] = {
        20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row457[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       5,
+       -1, 1, 367,
+       12, 0, 579,
+       49, 0, 499,
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row458[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 458,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row459[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 169
 };
 static int parser_action_row460[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 240
 };
 static int parser_action_row461[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       30,
+       -1, 1, 367,
+       9, 0, 583,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row462[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 562,
+       56, 0, 585,
+       82, 0, 463
 };
 static int parser_action_row463[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row464[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 42,
+       13, 0, 27,
+       54, 0, 588
 };
 static int parser_action_row465[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 561
 };
 static int parser_action_row466[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 460
 };
 static int parser_action_row467[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 153,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row468[] = {
-       5,
-       -1, 1, 362,
-       12, 0, 597,
-       49, 0, 510,
-       83, 0, 49,
-       84, 0, 50
+       2,
+       -1, 1, 42,
+       13, 0, 27
 };
 static int parser_action_row469[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 469,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       4,
+       -1, 3, 468,
+       16, 0, 594,
+       17, 0, 595,
+       84, 0, 596
 };
 static int parser_action_row470[] = {
-       1,
-       -1, 1, 165
+       3,
+       -1, 1, 319,
+       56, 0, 598,
+       82, 0, 180
 };
 static int parser_action_row471[] = {
-       1,
-       -1, 1, 240
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row472[] = {
-       30,
-       -1, 1, 362,
-       9, 0, 601,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 157
 };
 static int parser_action_row473[] = {
-       3,
-       -1, 1, 558,
-       56, 0, 603,
-       82, 0, 474
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row474[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 473,
+       55, 0, 602
 };
 static int parser_action_row475[] = {
-       6,
-       -1, 3, 474,
-       4, 0, 340,
-       16, 0, 341,
-       17, 0, 342,
-       54, 0, 606,
-       84, 0, 344
+       3,
+       -1, 1, 355,
+       58, 0, 603,
+       65, 0, 604
 };
 static int parser_action_row476[] = {
        1,
-       -1, 1, 557
+       -1, 1, 354
 };
 static int parser_action_row477[] = {
-       1,
-       -1, 1, 453
+       3,
+       -1, 3, 476,
+       60, 0, 607,
+       84, 0, 608
 };
 static int parser_action_row478[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       4,
+       -1, 3, 477,
+       9, 0, 611,
+       60, 0, 607,
+       84, 0, 608
 };
 static int parser_action_row479[] = {
-       5,
-       -1, 3, 478,
-       4, 0, 340,
-       16, 0, 341,
-       17, 0, 342,
-       84, 0, 344
+       1,
+       -1, 1, 45
 };
 static int parser_action_row480[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 479,
+       57, 0, 613
 };
 static int parser_action_row481[] = {
        1,
-       -1, 1, 319
+       -1, 1, 103
 };
 static int parser_action_row482[] = {
-       3,
-       -1, 1, 318,
-       56, 0, 612,
-       82, 0, 183
+       1,
+       -1, 1, 104
 };
 static int parser_action_row483[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 105
 };
 static int parser_action_row484[] = {
        1,
-       -1, 1, 153
+       -1, 1, 106
 };
 static int parser_action_row485[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 107
 };
 static int parser_action_row486[] = {
-       2,
-       -1, 3, 485,
-       55, 0, 616
+       1,
+       -1, 1, 108
 };
 static int parser_action_row487[] = {
-       3,
-       -1, 1, 350,
-       58, 0, 617,
-       65, 0, 618
+       1,
+       -1, 1, 109
 };
 static int parser_action_row488[] = {
        1,
-       -1, 1, 349
+       -1, 1, 112
 };
 static int parser_action_row489[] = {
-       4,
-       -1, 3, 488,
-       9, 0, 621,
-       60, 0, 238,
-       84, 0, 239
+       1,
+       -1, 1, 110
 };
 static int parser_action_row490[] = {
        1,
-       -1, 1, 45
+       -1, 1, 114
 };
 static int parser_action_row491[] = {
-       2,
-       -1, 3, 490,
-       57, 0, 623
+       1,
+       -1, 1, 113
 };
 static int parser_action_row492[] = {
        1,
-       -1, 1, 99
+       -1, 1, 111
 };
 static int parser_action_row493[] = {
        1,
-       -1, 1, 100
+       -1, 1, 115
 };
 static int parser_action_row494[] = {
        1,
-       -1, 1, 101
+       -1, 1, 117
 };
 static int parser_action_row495[] = {
-       1,
-       -1, 1, 102
+       2,
+       -1, 1, 102,
+       61, 0, 614
 };
 static int parser_action_row496[] = {
-       1,
-       -1, 1, 103
+       5,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       54, 0, 615,
+       59, 0, 616
 };
 static int parser_action_row497[] = {
        1,
-       -1, 1, 104
+       -1, 1, 48
 };
 static int parser_action_row498[] = {
-       1,
-       -1, 1, 105
+       3,
+       -1, 3, 497,
+       83, 0, 620,
+       84, 0, 621
 };
 static int parser_action_row499[] = {
-       1,
-       -1, 1, 108
+       26,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 116,
+       56, 1, 349,
+       64, 1, 349,
+       66, 1, 349,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row500[] = {
-       1,
-       -1, 1, 106
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row501[] = {
-       1,
-       -1, 1, 110
+       2,
+       -1, 3, 500,
+       85, 0, 628
 };
 static int parser_action_row502[] = {
-       1,
-       -1, 1, 109
+       29,
+       -1, 1, 349,
+       0, 1, 353,
+       1, 1, 353,
+       9, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 116,
+       55, 1, 353,
+       58, 1, 353,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122,
+       97, 1, 353
 };
 static int parser_action_row503[] = {
-       1,
-       -1, 1, 107
+       3,
+       -1, 1, 364,
+       12, 0, 631,
+       84, 0, 222
 };
 static int parser_action_row504[] = {
-       1,
-       -1, 1, 111
+       4,
+       -1, 1, 366,
+       12, 0, 632,
+       83, 0, 48,
+       84, 0, 224
 };
 static int parser_action_row505[] = {
        1,
-       -1, 1, 113
+       -1, 1, 215
 };
 static int parser_action_row506[] = {
-       2,
-       -1, 1, 98,
-       61, 0, 624
+       1,
+       -1, 1, 220
 };
 static int parser_action_row507[] = {
-       5,
-       -1, 1, 380,
+       3,
+       -1, 1, 385,
        0, 0, 1,
-       1, 0, 2,
-       54, 0, 625,
-       59, 0, 626
+       1, 0, 2
 };
 static int parser_action_row508[] = {
        1,
-       -1, 1, 48
+       -1, 1, 308
 };
 static int parser_action_row509[] = {
-       3,
-       -1, 3, 508,
-       83, 0, 630,
-       84, 0, 631
+       1,
+       -1, 1, 309
 };
 static int parser_action_row510[] = {
-       25,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 118,
-       56, 1, 344,
-       66, 1, 344,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       1,
+       -1, 1, 212
 };
 static int parser_action_row511[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 217
 };
 static int parser_action_row512[] = {
-       2,
-       -1, 3, 511,
-       85, 0, 638
+       1,
+       -1, 1, 214
 };
 static int parser_action_row513[] = {
-       28,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 118,
-       56, 1, 344,
-       61, 1, 344,
-       62, 1, 344,
-       63, 1, 344,
-       66, 1, 344,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       1,
+       -1, 1, 219
 };
 static int parser_action_row514[] = {
-       3,
-       -1, 1, 359,
-       12, 0, 641,
-       84, 0, 223
+       23,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       55, 0, 635,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row515[] = {
-       4,
-       -1, 1, 361,
-       12, 0, 642,
-       83, 0, 49,
-       84, 0, 225
+       1,
+       -1, 1, 202
 };
 static int parser_action_row516[] = {
        1,
-       -1, 1, 215
+       -1, 1, 348
 };
 static int parser_action_row517[] = {
-       1,
-       -1, 1, 220
+       2,
+       -1, 3, 516,
+       55, 0, 637
 };
 static int parser_action_row518[] = {
+       2,
+       -1, 3, 517,
+       26, 0, 638
+};
+static int parser_action_row519[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row519[] = {
-       1,
-       -1, 1, 307
-};
 static int parser_action_row520[] = {
        1,
-       -1, 1, 308
+       -1, 1, 533
 };
 static int parser_action_row521[] = {
-       1,
-       -1, 1, 212
+       2,
+       -1, 3, 520,
+       66, 0, 518
 };
 static int parser_action_row522[] = {
-       1,
-       -1, 1, 217
+       5,
+       -1, 1, 367,
+       12, 0, 543,
+       49, 0, 544,
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row523[] = {
-       1,
-       -1, 1, 214
+       2,
+       -1, 1, 355,
+       58, 0, 603
 };
 static int parser_action_row524[] = {
-       1,
-       -1, 1, 219
+       7,
+       -1, 1, 350,
+       56, 1, 347,
+       61, 1, 347,
+       62, 1, 347,
+       63, 1, 347,
+       64, 1, 347,
+       66, 1, 347
 };
 static int parser_action_row525[] = {
-       23,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       55, 0, 645,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 506
 };
 static int parser_action_row526[] = {
-       1,
-       -1, 1, 202
+       19,
+       -1, 1, 367,
+       12, 0, 106,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row527[] = {
-       2,
-       -1, 1, 357,
-       60, 0, 193
+       1,
+       -1, 1, 505
 };
 static int parser_action_row528[] = {
-       2,
-       -1, 3, 527,
-       84, 0, 647
+       1,
+       -1, 1, 508
 };
 static int parser_action_row529[] = {
-       2,
-       -1, 1, 322,
-       58, 0, 648
+       3,
+       -1, 1, 516,
+       67, 0, 267,
+       68, 0, 268
 };
 static int parser_action_row530[] = {
-       1,
-       -1, 1, 87
+       3,
+       -1, 1, 519,
+       67, 0, 267,
+       68, 0, 268
 };
 static int parser_action_row531[] = {
        1,
-       -1, 1, 321
+       -1, 1, 521
 };
 static int parser_action_row532[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       4,
+       -1, 1, 523,
+       69, 0, 276,
+       70, 0, 277,
+       71, 0, 278
 };
 static int parser_action_row533[] = {
-       1,
-       -1, 1, 16
+       4,
+       -1, 1, 524,
+       69, 0, 276,
+       70, 0, 277,
+       71, 0, 278
 };
 static int parser_action_row534[] = {
-       1,
-       -1, 1, 343
+       3,
+       -1, 1, 512,
+       67, 0, 267,
+       68, 0, 268
 };
 static int parser_action_row535[] = {
-       2,
-       -1, 3, 534,
-       55, 0, 655
+       3,
+       -1, 1, 513,
+       67, 0, 267,
+       68, 0, 268
 };
 static int parser_action_row536[] = {
-       2,
-       -1, 3, 535,
-       26, 0, 656
+       3,
+       -1, 1, 514,
+       67, 0, 267,
+       68, 0, 268
 };
 static int parser_action_row537[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 1, 515,
+       67, 0, 267,
+       68, 0, 268
 };
 static int parser_action_row538[] = {
-       1,
-       -1, 1, 530
+       3,
+       -1, 1, 517,
+       67, 0, 267,
+       68, 0, 268
 };
 static int parser_action_row539[] = {
-       2,
-       -1, 3, 538,
-       66, 0, 536
+       3,
+       -1, 1, 518,
+       67, 0, 267,
+       68, 0, 268
 };
 static int parser_action_row540[] = {
-       5,
-       -1, 1, 362,
-       12, 0, 561,
-       49, 0, 562,
-       83, 0, 49,
-       84, 0, 50
+       3,
+       -1, 1, 520,
+       67, 0, 267,
+       68, 0, 268
 };
 static int parser_action_row541[] = {
-       2,
-       -1, 1, 350,
-       58, 0, 617
+       1,
+       -1, 1, 526
 };
 static int parser_action_row542[] = {
-       6,
-       -1, 1, 345,
-       56, 1, 342,
-       61, 1, 342,
-       62, 1, 342,
-       63, 1, 342,
-       66, 1, 342
+       1,
+       -1, 1, 527
 };
 static int parser_action_row543[] = {
        1,
-       -1, 1, 503
+       -1, 1, 528
 };
 static int parser_action_row544[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 108,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row545[] = {
-       1,
-       -1, 1, 502
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row546[] = {
-       1,
-       -1, 1, 505
+       2,
+       -1, 3, 545,
+       85, 0, 644
 };
 static int parser_action_row547[] = {
-       3,
-       -1, 1, 513,
-       67, 0, 271,
-       68, 0, 272
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row548[] = {
-       3,
-       -1, 1, 516,
-       67, 0, 271,
-       68, 0, 272
+       1,
+       -1, 1, 175
 };
 static int parser_action_row549[] = {
-       1,
-       -1, 1, 518
+       30,
+       -1, 1, 367,
+       9, 0, 646,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row550[] = {
-       4,
-       -1, 1, 520,
-       69, 0, 280,
-       70, 0, 281,
-       71, 0, 282
+       1,
+       -1, 1, 165
 };
 static int parser_action_row551[] = {
-       4,
-       -1, 1, 521,
-       69, 0, 280,
-       70, 0, 281,
-       71, 0, 282
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row552[] = {
        3,
-       -1, 1, 509,
-       67, 0, 271,
-       68, 0, 272
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row553[] = {
-       3,
-       -1, 1, 510,
-       67, 0, 271,
-       68, 0, 272
+       33,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 649,
+       12, 0, 650,
+       15, 0, 651,
+       18, 0, 652,
+       25, 0, 653,
+       27, 0, 654,
+       28, 0, 655,
+       29, 0, 656,
+       30, 0, 657,
+       36, 0, 658,
+       37, 0, 659,
+       38, 0, 660,
+       39, 0, 661,
+       40, 0, 662,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 663,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row554[] = {
-       3,
-       -1, 1, 511,
-       67, 0, 271,
-       68, 0, 272
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 139,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row555[] = {
        3,
-       -1, 1, 512,
-       67, 0, 271,
-       68, 0, 272
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row556[] = {
        3,
-       -1, 1, 514,
-       67, 0, 271,
-       68, 0, 272
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row557[] = {
        3,
-       -1, 1, 515,
-       67, 0, 271,
-       68, 0, 272
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row558[] = {
-       3,
-       -1, 1, 517,
-       67, 0, 271,
-       68, 0, 272
+       2,
+       -1, 3, 557,
+       26, 0, 686
 };
 static int parser_action_row559[] = {
        1,
-       -1, 1, 523
+       -1, 1, 277
 };
 static int parser_action_row560[] = {
-       1,
-       -1, 1, 524
+       5,
+       -1, 1, 367,
+       12, 0, 579,
+       49, 0, 499,
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row561[] = {
        1,
-       -1, 1, 525
+       -1, 1, 250
 };
 static int parser_action_row562[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       21,
+       -1, 1, 367,
+       12, 0, 152,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row563[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 249
 };
 static int parser_action_row564[] = {
-       2,
-       -1, 3, 563,
-       85, 0, 662
+       1,
+       -1, 1, 252
 };
 static int parser_action_row565[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       3,
+       -1, 1, 260,
+       67, 0, 310,
+       68, 0, 311
 };
 static int parser_action_row566[] = {
-       1,
-       -1, 1, 171
+       3,
+       -1, 1, 263,
+       67, 0, 310,
+       68, 0, 311
 };
 static int parser_action_row567[] = {
-       30,
-       -1, 1, 362,
-       9, 0, 664,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 265
 };
 static int parser_action_row568[] = {
-       1,
-       -1, 1, 161
+       4,
+       -1, 1, 267,
+       69, 0, 319,
+       70, 0, 320,
+       71, 0, 321
 };
 static int parser_action_row569[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       4,
+       -1, 1, 268,
+       69, 0, 319,
+       70, 0, 320,
+       71, 0, 321
 };
 static int parser_action_row570[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 1, 256,
+       67, 0, 310,
+       68, 0, 311
 };
 static int parser_action_row571[] = {
-       33,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 667,
-       12, 0, 668,
-       15, 0, 669,
-       18, 0, 670,
-       25, 0, 671,
-       27, 0, 672,
-       28, 0, 673,
-       29, 0, 674,
-       30, 0, 675,
-       36, 0, 676,
-       37, 0, 677,
-       38, 0, 678,
-       39, 0, 679,
-       40, 0, 680,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 681,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 257,
+       67, 0, 310,
+       68, 0, 311
 };
 static int parser_action_row572[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 141,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 258,
+       67, 0, 310,
+       68, 0, 311
 };
 static int parser_action_row573[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 1, 259,
+       67, 0, 310,
+       68, 0, 311
 };
 static int parser_action_row574[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 1, 261,
+       67, 0, 310,
+       68, 0, 311
 };
 static int parser_action_row575[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 1, 262,
+       67, 0, 310,
+       68, 0, 311
 };
 static int parser_action_row576[] = {
-       2,
-       -1, 3, 575,
-       26, 0, 704
+       3,
+       -1, 1, 264,
+       67, 0, 310,
+       68, 0, 311
 };
 static int parser_action_row577[] = {
        1,
-       -1, 1, 277
+       -1, 1, 270
 };
 static int parser_action_row578[] = {
-       5,
-       -1, 1, 362,
-       12, 0, 597,
-       49, 0, 510,
-       83, 0, 49,
-       84, 0, 50
+       1,
+       -1, 1, 271
 };
 static int parser_action_row579[] = {
        1,
-       -1, 1, 250
+       -1, 1, 272
 };
 static int parser_action_row580[] = {
-       21,
-       -1, 1, 362,
-       12, 0, 153,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row581[] = {
-       1,
-       -1, 1, 249
+       2,
+       -1, 3, 580,
+       85, 0, 689
 };
 static int parser_action_row582[] = {
-       1,
-       -1, 1, 252
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row583[] = {
-       3,
-       -1, 1, 260,
-       67, 0, 313,
-       68, 0, 314
+       1,
+       -1, 1, 241
 };
 static int parser_action_row584[] = {
-       3,
-       -1, 1, 263,
-       67, 0, 313,
-       68, 0, 314
+       1,
+       -1, 1, 168
 };
 static int parser_action_row585[] = {
        1,
-       -1, 1, 265
+       -1, 1, 167
 };
 static int parser_action_row586[] = {
-       4,
-       -1, 1, 267,
-       69, 0, 322,
-       70, 0, 323,
-       71, 0, 324
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row587[] = {
-       4,
-       -1, 1, 268,
-       69, 0, 322,
-       70, 0, 323,
-       71, 0, 324
+       1,
+       -1, 1, 461
 };
 static int parser_action_row588[] = {
        3,
-       -1, 1, 256,
-       67, 0, 313,
-       68, 0, 314
+       -1, 3, 587,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row589[] = {
        3,
-       -1, 1, 257,
-       67, 0, 313,
-       68, 0, 314
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row590[] = {
-       3,
-       -1, 1, 258,
-       67, 0, 313,
-       68, 0, 314
+       5,
+       -1, 1, 97,
+       21, 0, 196,
+       22, 0, 197,
+       23, 0, 198,
+       24, 0, 199
 };
 static int parser_action_row591[] = {
-       3,
-       -1, 1, 259,
-       67, 0, 313,
-       68, 0, 314
+       1,
+       -1, 1, 559
 };
 static int parser_action_row592[] = {
        3,
-       -1, 1, 261,
-       67, 0, 313,
-       68, 0, 314
+       -1, 3, 591,
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row593[] = {
-       3,
-       -1, 1, 262,
-       67, 0, 313,
-       68, 0, 314
+       2,
+       -1, 1, 323,
+       58, 0, 699
 };
 static int parser_action_row594[] = {
        3,
-       -1, 1, 264,
-       67, 0, 313,
-       68, 0, 314
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row595[] = {
        1,
-       -1, 1, 270
+       -1, 1, 345
 };
 static int parser_action_row596[] = {
        1,
-       -1, 1, 271
+       -1, 1, 346
 };
 static int parser_action_row597[] = {
        1,
-       -1, 1, 272
+       -1, 1, 344
 };
 static int parser_action_row598[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       3,
+       -1, 1, 319,
+       54, 0, 703,
+       82, 0, 180
 };
 static int parser_action_row599[] = {
-       2,
-       -1, 3, 598,
-       85, 0, 707
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row600[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       1,
+       -1, 1, 158
 };
 static int parser_action_row601[] = {
-       1,
-       -1, 1, 241
+       3,
+       -1, 3, 600,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row602[] = {
        1,
-       -1, 1, 164
+       -1, 1, 204
 };
 static int parser_action_row603[] = {
-       1,
-       -1, 1, 163
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row604[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row605[] = {
-       1,
-       -1, 1, 454
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row606[] = {
-       3,
-       -1, 3, 605,
-       50, 0, 347,
-       83, 0, 348
+       1,
+       -1, 1, 822
 };
 static int parser_action_row607[] = {
+       2,
+       -1, 1, 356,
+       58, 0, 603
+};
+static int parser_action_row608[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row608[] = {
-       2,
-       -1, 1, 558,
-       82, 0, 474
-};
 static int parser_action_row609[] = {
-       1,
-       -1, 1, 555
+       2,
+       -1, 1, 360,
+       60, 0, 190
 };
 static int parser_action_row610[] = {
-       3,
-       -1, 3, 609,
-       83, 0, 49,
-       84, 0, 50
+       2,
+       -1, 1, 92,
+       14, 0, 712
 };
 static int parser_action_row611[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 610,
+       84, 0, 714
 };
 static int parser_action_row612[] = {
-       35,
-       -1, 1, 362,
-       12, 0, 153,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 154,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       34, 0, 155,
-       36, 0, 718,
-       37, 0, 719,
-       38, 0, 720,
-       39, 0, 721,
-       40, 0, 40,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       50, 0, 347,
-       51, 0, 158,
-       53, 0, 722,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       82, 0, 183,
-       83, 0, 723,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 3, 611,
+       0, 0, 82,
+       1, 0, 83
 };
 static int parser_action_row613[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 92,
+       14, 0, 712
 };
 static int parser_action_row614[] = {
-       1,
-       -1, 1, 154
+       2,
+       -1, 1, 116,
+       61, 0, 717
 };
 static int parser_action_row615[] = {
-       3,
-       -1, 3, 614,
-       50, 0, 347,
-       83, 0, 348
+       1,
+       -1, 1, 118
 };
 static int parser_action_row616[] = {
-       1,
-       -1, 1, 204
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row617[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
-};
-static int parser_action_row618[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row618[] = {
+       4,
+       -1, 1, 135,
+       4, 0, 720,
+       14, 0, 721,
+       15, 0, 722
+};
 static int parser_action_row619[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row620[] = {
        1,
-       -1, 1, 846
+       -1, 1, 123
 };
 static int parser_action_row621[] = {
        2,
-       -1, 1, 351,
-       58, 0, 617
+       -1, 1, 372,
+       60, 0, 189
 };
 static int parser_action_row622[] = {
-       3,
+       2,
        -1, 3, 621,
-       0, 0, 83,
-       1, 0, 84
+       60, 0, 190
 };
 static int parser_action_row623[] = {
        2,
-       -1, 1, 89,
-       14, 0, 395
+       -1, 1, 51,
+       56, 0, 727
 };
 static int parser_action_row624[] = {
        2,
-       -1, 1, 112,
-       61, 0, 748
+       -1, 3, 623,
+       83, 0, 729
 };
 static int parser_action_row625[] = {
-       1,
-       -1, 1, 114
+       3,
+       -1, 3, 624,
+       83, 0, 730,
+       84, 0, 621
 };
 static int parser_action_row626[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 285
 };
 static int parser_action_row627[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 196
 };
 static int parser_action_row628[] = {
-       4,
-       -1, 1, 131,
-       4, 0, 751,
-       14, 0, 752,
-       15, 0, 753
+       3,
+       -1, 3, 627,
+       34, 0, 732,
+       54, 0, 733
 };
 static int parser_action_row629[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       4,
+       -1, 1, 280,
+       61, 0, 734,
+       62, 0, 365,
+       63, 0, 366
 };
 static int parser_action_row630[] = {
-       1,
-       -1, 1, 119
+       4,
+       -1, 1, 282,
+       61, 0, 736,
+       62, 0, 365,
+       63, 0, 366
 };
 static int parser_action_row631[] = {
-       2,
-       -1, 1, 367,
-       60, 0, 192
+       1,
+       -1, 1, 193
 };
 static int parser_action_row632[] = {
-       2,
-       -1, 3, 631,
-       60, 0, 193
+       23,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 379,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row633[] = {
-       2,
-       -1, 1, 51,
-       56, 0, 758
+       23,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 379,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row634[] = {
-       2,
-       -1, 3, 633,
-       83, 0, 760
+       3,
+       -1, 1, 365,
+       12, 0, 740,
+       84, 0, 383
 };
 static int parser_action_row635[] = {
-       3,
-       -1, 3, 634,
-       83, 0, 761,
-       84, 0, 631
+       1,
+       -1, 1, 312
 };
 static int parser_action_row636[] = {
        1,
-       -1, 1, 285
+       -1, 1, 352
 };
 static int parser_action_row637[] = {
-       1,
-       -1, 1, 196
+       2,
+       -1, 3, 636,
+       55, 0, 741
 };
 static int parser_action_row638[] = {
-       3,
-       -1, 3, 637,
-       34, 0, 763,
-       54, 0, 764
+       1,
+       -1, 1, 347
 };
 static int parser_action_row639[] = {
-       4,
-       -1, 1, 280,
-       61, 0, 765,
-       62, 0, 372,
-       63, 0, 373
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row640[] = {
-       4,
-       -1, 1, 282,
-       61, 0, 767,
-       62, 0, 372,
-       63, 0, 373
+       3,
+       -1, 3, 639,
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row641[] = {
-       1,
-       -1, 1, 193
+       2,
+       -1, 3, 640,
+       85, 0, 744
 };
 static int parser_action_row642[] = {
-       23,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 386,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       1,
+       -1, 1, 507
 };
 static int parser_action_row643[] = {
-       23,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 386,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       1,
+       -1, 1, 541
 };
 static int parser_action_row644[] = {
        3,
-       -1, 1, 360,
-       12, 0, 771,
-       84, 0, 390
+       -1, 3, 643,
+       34, 0, 745,
+       54, 0, 746
 };
 static int parser_action_row645[] = {
        1,
-       -1, 1, 311
+       -1, 1, 536
 };
 static int parser_action_row646[] = {
        1,
-       -1, 1, 347
+       -1, 1, 538
 };
 static int parser_action_row647[] = {
-       2,
-       -1, 3, 646,
-       55, 0, 772
+       1,
+       -1, 1, 176
 };
 static int parser_action_row648[] = {
-       2,
-       -1, 1, 358,
-       60, 0, 193
+       1,
+       -1, 1, 209
 };
 static int parser_action_row649[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row650[] = {
        1,
-       -1, 1, 840
+       -1, 1, 231
 };
 static int parser_action_row651[] = {
-       2,
-       -1, 1, 323,
-       58, 0, 648
+       26,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 116,
+       56, 1, 349,
+       64, 1, 349,
+       66, 1, 349,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row652[] = {
-       2,
-       -1, 3, 651,
-       9, 0, 775
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 749,
+       12, 0, 650,
+       15, 0, 651,
+       18, 0, 652,
+       25, 0, 653,
+       28, 0, 655,
+       29, 0, 656,
+       30, 0, 657,
+       36, 0, 658,
+       37, 0, 659,
+       38, 0, 660,
+       39, 0, 661,
+       40, 0, 662,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 663,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row653[] = {
-       1,
-       -1, 1, 842
+       2,
+       -1, 3, 652,
+       84, 0, 754
 };
 static int parser_action_row654[] = {
-       5,
-       -1, 3, 653,
-       4, 0, 340,
-       16, 0, 341,
-       17, 0, 342,
-       84, 0, 344
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row655[] = {
-       5,
-       -1, 1, 380,
+       32,
+       -1, 1, 367,
        0, 0, 1,
        1, 0, 2,
-       9, 1, 324,
-       15, 1, 324
+       9, 0, 458,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row656[] = {
-       1,
-       -1, 1, 342
-};
-static int parser_action_row657[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row657[] = {
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 749,
+       12, 0, 650,
+       15, 0, 651,
+       18, 0, 652,
+       25, 0, 653,
+       28, 0, 655,
+       29, 0, 656,
+       30, 0, 657,
+       36, 0, 658,
+       37, 0, 659,
+       38, 0, 660,
+       39, 0, 661,
+       40, 0, 662,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 663,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
+};
 static int parser_action_row658[] = {
        3,
-       -1, 3, 657,
-       83, 0, 49,
-       84, 0, 50
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row659[] = {
-       2,
-       -1, 3, 658,
-       85, 0, 780
+       25,
+       -1, 1, 180,
+       12, 0, 152,
+       25, 0, 153,
+       27, 1, 632,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       44, 1, 367,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row660[] = {
-       1,
-       -1, 1, 504
+       3,
+       -1, 1, 185,
+       27, 1, 637,
+       52, 0, 171
 };
 static int parser_action_row661[] = {
-       1,
-       -1, 1, 538
+       3,
+       -1, 1, 182,
+       27, 1, 634,
+       52, 0, 171
 };
 static int parser_action_row662[] = {
-       3,
-       -1, 3, 661,
-       34, 0, 781,
-       54, 0, 782
+       2,
+       -1, 1, 184,
+       27, 1, 636
 };
 static int parser_action_row663[] = {
-       1,
-       -1, 1, 533
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 174,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row664[] = {
-       1,
-       -1, 1, 535
+       2,
+       -1, 3, 663,
+       11, 0, 766
 };
 static int parser_action_row665[] = {
        1,
-       -1, 1, 172
+       -1, 1, 226
 };
 static int parser_action_row666[] = {
        1,
-       -1, 1, 209
+       -1, 1, 228
 };
 static int parser_action_row667[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       4,
+       -1, 3, 666,
+       56, 0, 205,
+       64, 0, 206,
+       66, 0, 767
 };
 static int parser_action_row668[] = {
-       1,
-       -1, 1, 231
+       3,
+       -1, 3, 667,
+       44, 0, 769,
+       85, 0, 770
 };
 static int parser_action_row669[] = {
-       25,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 118,
-       56, 1, 344,
-       66, 1, 344,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       29,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 116,
+       56, 1, 349,
+       61, 1, 349,
+       62, 1, 349,
+       63, 1, 349,
+       64, 1, 349,
+       66, 1, 349,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row670[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 785,
-       12, 0, 668,
-       15, 0, 669,
-       18, 0, 670,
-       25, 0, 671,
-       28, 0, 673,
-       29, 0, 674,
-       30, 0, 675,
-       36, 0, 676,
-       37, 0, 677,
-       38, 0, 678,
-       39, 0, 679,
-       40, 0, 680,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 681,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 364,
+       12, 0, 773,
+       84, 0, 222
 };
 static int parser_action_row671[] = {
-       2,
-       -1, 3, 670,
-       84, 0, 790
+       31,
+       -1, 1, 367,
+       9, 0, 649,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       27, 0, 654,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row672[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 671,
+       27, 0, 777
 };
 static int parser_action_row673[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 469,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 630
 };
 static int parser_action_row674[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 631
 };
 static int parser_action_row675[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 785,
-       12, 0, 668,
-       15, 0, 669,
-       18, 0, 670,
-       25, 0, 671,
-       28, 0, 673,
-       29, 0, 674,
-       30, 0, 675,
-       36, 0, 676,
-       37, 0, 677,
-       38, 0, 678,
-       39, 0, 679,
-       40, 0, 680,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 681,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 639
 };
 static int parser_action_row676[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 640
 };
 static int parser_action_row677[] = {
-       25,
-       -1, 1, 176,
-       12, 0, 153,
-       25, 0, 154,
-       27, 1, 627,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 642
 };
 static int parser_action_row678[] = {
-       26,
-       -1, 1, 183,
-       12, 0, 153,
-       25, 0, 154,
-       27, 1, 634,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       52, 0, 172,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 641
 };
 static int parser_action_row679[] = {
-       26,
-       -1, 1, 178,
-       12, 0, 153,
-       25, 0, 154,
-       27, 1, 629,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       52, 0, 172,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 643
 };
 static int parser_action_row680[] = {
-       2,
-       -1, 1, 182,
-       27, 1, 633
+       1,
+       -1, 1, 644
 };
 static int parser_action_row681[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 177,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       4,
+       -1, 1, 366,
+       12, 0, 778,
+       83, 0, 48,
+       84, 0, 224
 };
 static int parser_action_row682[] = {
-       2,
-       -1, 3, 681,
-       11, 0, 804
+       1,
+       -1, 1, 235
 };
 static int parser_action_row683[] = {
-       1,
-       -1, 1, 226
+       2,
+       -1, 3, 682,
+       52, 0, 171
 };
 static int parser_action_row684[] = {
-       1,
-       -1, 1, 228
+       3,
+       -1, 3, 683,
+       55, 0, 781,
+       58, 0, 556
 };
 static int parser_action_row685[] = {
-       3,
-       -1, 3, 684,
-       56, 0, 207,
-       66, 0, 805
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row686[] = {
-       3,
+       2,
        -1, 3, 685,
-       44, 0, 807,
-       85, 0, 808
+       84, 0, 783
 };
 static int parser_action_row687[] = {
-       28,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 118,
-       56, 1, 344,
-       61, 1, 344,
-       62, 1, 344,
-       63, 1, 344,
-       66, 1, 344,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row688[] = {
-       3,
-       -1, 1, 359,
-       12, 0, 811,
-       84, 0, 223
+       2,
+       -1, 3, 687,
+       85, 0, 785
 };
 static int parser_action_row689[] = {
-       31,
-       -1, 1, 362,
-       9, 0, 667,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       27, 0, 672,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 251
 };
 static int parser_action_row690[] = {
-       2,
-       -1, 3, 689,
-       27, 0, 815
+       1,
+       -1, 1, 280
 };
 static int parser_action_row691[] = {
        1,
-       -1, 1, 625
+       -1, 1, 282
 };
 static int parser_action_row692[] = {
-       1,
-       -1, 1, 626
+       3,
+       -1, 3, 691,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row693[] = {
-       1,
-       -1, 1, 638
+       2,
+       -1, 1, 161,
+       58, 0, 787
 };
 static int parser_action_row694[] = {
-       1,
-       -1, 1, 639
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row695[] = {
-       1,
-       -1, 1, 641
+       2,
+       -1, 1, 42,
+       13, 0, 27
 };
 static int parser_action_row696[] = {
-       1,
-       -1, 1, 640
+       4,
+       -1, 3, 695,
+       16, 0, 594,
+       17, 0, 595,
+       84, 0, 596
 };
 static int parser_action_row697[] = {
-       1,
-       -1, 1, 642
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row698[] = {
-       1,
-       -1, 1, 643
+       2,
+       -1, 3, 697,
+       84, 0, 222
 };
 static int parser_action_row699[] = {
-       4,
-       -1, 1, 361,
-       12, 0, 816,
-       83, 0, 49,
-       84, 0, 225
+       3,
+       -1, 3, 698,
+       83, 0, 48,
+       84, 0, 224
 };
 static int parser_action_row700[] = {
-       1,
-       -1, 1, 235
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row701[] = {
-       2,
-       -1, 3, 700,
-       52, 0, 172
+       1,
+       -1, 1, 814
 };
 static int parser_action_row702[] = {
-       3,
-       -1, 3, 701,
-       55, 0, 819,
-       58, 0, 574
+       2,
+       -1, 1, 324,
+       58, 0, 699
 };
 static int parser_action_row703[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
-};
-static int parser_action_row704[] = {
        2,
-       -1, 3, 703,
-       84, 0, 821
+       -1, 3, 702,
+       55, 0, 797
 };
-static int parser_action_row705[] = {
+static int parser_action_row704[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row705[] = {
+       1,
+       -1, 1, 320
+};
 static int parser_action_row706[] = {
-       2,
+       3,
        -1, 3, 705,
-       85, 0, 823
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row707[] = {
-       1,
-       -1, 1, 251
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row708[] = {
        1,
-       -1, 1, 280
+       -1, 1, 302
 };
 static int parser_action_row709[] = {
-       1,
-       -1, 1, 282
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row710[] = {
-       3,
-       -1, 3, 709,
-       50, 0, 347,
-       83, 0, 348
+       21,
+       -1, 1, 367,
+       12, 0, 802,
+       25, 0, 803,
+       34, 0, 804,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row711[] = {
-       2,
-       -1, 1, 157,
-       58, 0, 825
+       1,
+       -1, 1, 823
 };
 static int parser_action_row712[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 711,
+       84, 0, 831
 };
 static int parser_action_row713[] = {
-       5,
-       -1, 3, 712,
-       4, 0, 340,
-       16, 0, 341,
-       17, 0, 342,
-       84, 0, 344
+       4,
+       -1, 1, 42,
+       0, 0, 82,
+       1, 0, 83,
+       13, 0, 27
 };
 static int parser_action_row714[] = {
-       1,
-       -1, 1, 559
+       3,
+       -1, 3, 713,
+       0, 0, 82,
+       1, 0, 83
 };
 static int parser_action_row715[] = {
        2,
-       -1, 1, 344,
-       54, 0, 242
+       -1, 1, 361,
+       60, 0, 190
 };
 static int parser_action_row716[] = {
-       2,
-       -1, 3, 715,
-       84, 0, 223
+       1,
+       -1, 1, 18
 };
 static int parser_action_row717[] = {
        3,
        -1, 3, 716,
-       83, 0, 49,
-       84, 0, 225
+       0, 0, 82,
+       1, 0, 83
 };
 static int parser_action_row718[] = {
-       2,
-       -1, 3, 717,
-       55, 0, 832
+       1,
+       -1, 1, 119
 };
 static int parser_action_row719[] = {
-       24,
-       -1, 1, 737,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 126,
+       84, 0, 838
 };
 static int parser_action_row720[] = {
-       25,
-       -1, 1, 744,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       52, 0, 172,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 3, 719,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row721[] = {
-       25,
-       -1, 1, 739,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       52, 0, 172,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row722[] = {
-       1,
-       -1, 1, 743
+       6,
+       -1, 1, 42,
+       0, 0, 82,
+       1, 0, 83,
+       13, 0, 27,
+       19, 0, 843,
+       20, 0, 844
 };
 static int parser_action_row723[] = {
-       2,
-       -1, 3, 722,
-       11, 0, 838
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 458,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row724[] = {
-       4,
-       -1, 1, 318,
-       56, 0, 482,
-       60, 0, 192,
-       82, 0, 183
+       3,
+       -1, 1, 135,
+       4, 0, 720,
+       15, 0, 848
 };
 static int parser_action_row725[] = {
-       1,
-       -1, 1, 334
+       3,
+       -1, 3, 724,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row726[] = {
        1,
-       -1, 1, 735
+       -1, 1, 393
 };
 static int parser_action_row727[] = {
        1,
-       -1, 1, 736
+       -1, 1, 122
 };
 static int parser_action_row728[] = {
-       1,
-       -1, 1, 748
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row729[] = {
-       1,
-       -1, 1, 750
+       5,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row730[] = {
        1,
-       -1, 1, 749
+       -1, 1, 373
 };
 static int parser_action_row731[] = {
-       1,
-       -1, 1, 751
+       2,
+       -1, 1, 375,
+       60, 0, 189
 };
 static int parser_action_row732[] = {
-       1,
-       -1, 1, 752
+       2,
+       -1, 3, 731,
+       83, 0, 861
 };
 static int parser_action_row733[] = {
-       1,
-       -1, 1, 335
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row734[] = {
        3,
-       -1, 1, 276,
-       56, 0, 207,
-       66, 0, 839
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row735[] = {
-       1,
-       -1, 1, 337
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row736[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row737[] = {
-       2,
-       -1, 1, 331,
-       58, 0, 841
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row738[] = {
-       3,
-       -1, 3, 737,
-       44, 0, 327,
-       85, 0, 219
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row739[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       1,
+       -1, 1, 198
 };
 static int parser_action_row740[] = {
        1,
-       -1, 1, 336
+       -1, 1, 200
 };
 static int parser_action_row741[] = {
-       3,
-       -1, 3, 740,
-       50, 0, 347,
-       83, 0, 348
+       23,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 379,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row742[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 350
 };
 static int parser_action_row743[] = {
-       1,
-       -1, 1, 302
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row744[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row745[] = {
-       21,
-       -1, 1, 362,
-       12, 0, 847,
-       25, 0, 848,
-       34, 0, 849,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       4,
+       -1, 1, 534,
+       56, 1, 536,
+       64, 1, 536,
+       66, 1, 536
 };
 static int parser_action_row746[] = {
-       1,
-       -1, 1, 847
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row747[] = {
-       1,
-       -1, 1, 18
-};
-static int parser_action_row748[] = {
        3,
-       -1, 3, 747,
-       0, 0, 83,
-       1, 0, 84
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
-static int parser_action_row749[] = {
+static int parser_action_row748[] = {
        1,
-       -1, 1, 115
+       -1, 1, 210
 };
-static int parser_action_row750[] = {
+static int parser_action_row749[] = {
        2,
-       -1, 1, 122,
-       84, 0, 877
+       -1, 1, 197,
+       27, 1, 649
 };
-static int parser_action_row751[] = {
+static int parser_action_row750[] = {
        3,
-       -1, 3, 750,
-       50, 0, 347,
-       83, 0, 348
+       -1, 1, 169,
+       27, 1, 628,
+       52, 1, 727
+};
+static int parser_action_row751[] = {
+       30,
+       -1, 1, 367,
+       9, 0, 873,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row752[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 672
 };
 static int parser_action_row753[] = {
-       9,
-       -1, 3, 752,
-       0, 0, 83,
-       1, 0, 84,
-       4, 0, 340,
-       16, 0, 341,
-       17, 0, 342,
-       19, 0, 882,
-       20, 0, 883,
-       84, 0, 344
+       1,
+       -1, 1, 629
 };
 static int parser_action_row754[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 469,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 3, 753,
+       52, 0, 171
 };
 static int parser_action_row755[] = {
-       2,
-       -1, 3, 754,
-       15, 0, 887
+       3,
+       -1, 1, 166,
+       59, 0, 287,
+       82, 0, 180
 };
 static int parser_action_row756[] = {
-       3,
-       -1, 3, 755,
-       31, 0, 35,
-       96, 0, 57
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row757[] = {
        1,
-       -1, 1, 388
+       -1, 1, 230
 };
 static int parser_action_row758[] = {
-       1,
-       -1, 1, 118
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row759[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 675
 };
 static int parser_action_row760[] = {
-       5,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2,
-       31, 0, 35,
-       96, 0, 57
+       2,
+       -1, 3, 759,
+       52, 0, 171
 };
 static int parser_action_row761[] = {
-       1,
-       -1, 1, 368
+       3,
+       -1, 3, 760,
+       54, 0, 881,
+       84, 0, 294
 };
 static int parser_action_row762[] = {
-       2,
-       -1, 1, 370,
-       60, 0, 192
+       1,
+       -1, 1, 633
 };
 static int parser_action_row763[] = {
        2,
-       -1, 3, 762,
-       83, 0, 899
+       -1, 1, 186,
+       27, 1, 638
 };
 static int parser_action_row764[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 183,
+       27, 1, 635
 };
 static int parser_action_row765[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row766[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 3, 765,
+       27, 0, 884
 };
 static int parser_action_row767[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 3, 766,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row768[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row769[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       4,
+       -1, 1, 287,
+       61, 0, 887,
+       62, 0, 365,
+       63, 0, 366
 };
 static int parser_action_row770[] = {
-       1,
-       -1, 1, 198
+       26,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 116,
+       56, 1, 349,
+       64, 1, 349,
+       66, 1, 349,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row771[] = {
-       1,
-       -1, 1, 200
+       4,
+       -1, 1, 281,
+       61, 0, 890,
+       62, 0, 365,
+       63, 0, 366
 };
 static int parser_action_row772[] = {
-       23,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 386,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       4,
+       -1, 1, 283,
+       61, 0, 892,
+       62, 0, 365,
+       63, 0, 366
 };
 static int parser_action_row773[] = {
-       1,
-       -1, 1, 345
+       2,
+       -1, 1, 194,
+       27, 1, 646
 };
 static int parser_action_row774[] = {
-       5,
-       -1, 3, 773,
-       4, 0, 340,
-       16, 0, 341,
-       17, 0, 342,
-       84, 0, 344
+       23,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 379,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row775[] = {
-       1,
-       -1, 1, 841
+       3,
+       -1, 3, 774,
+       9, 0, 649,
+       27, 0, 654
 };
 static int parser_action_row776[] = {
-       1,
-       -1, 1, 88
+       3,
+       -1, 3, 775,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row777[] = {
-       36,
-       -1, 1, 362,
-       0, 0, 83,
-       1, 0, 84,
-       12, 0, 108,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 109,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       34, 0, 110,
-       36, 0, 908,
-       37, 0, 909,
-       38, 0, 910,
-       39, 0, 911,
-       40, 0, 40,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       50, 0, 347,
-       51, 0, 117,
-       53, 0, 912,
-       54, 0, 913,
-       68, 0, 119,
-       82, 0, 183,
-       83, 0, 723,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       1,
+       -1, 1, 229
 };
 static int parser_action_row778[] = {
-       1,
-       -1, 1, 843
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 458,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row779[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       23,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 379,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row780[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       3,
+       -1, 1, 365,
+       12, 0, 899,
+       84, 0, 383
 };
 static int parser_action_row781[] = {
-       3,
-       -1, 1, 531,
-       56, 1, 533,
-       66, 1, 533
+       1,
+       -1, 1, 234
 };
 static int parser_action_row782[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row783[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row784[] = {
        1,
-       -1, 1, 210
+       -1, 1, 359
 };
 static int parser_action_row785[] = {
-       2,
-       -1, 1, 197,
-       27, 1, 648
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row786[] = {
-       3,
-       -1, 1, 165,
-       27, 1, 623,
-       52, 1, 731
+       4,
+       -1, 1, 278,
+       56, 1, 280,
+       64, 1, 280,
+       66, 1, 280
 };
 static int parser_action_row787[] = {
-       30,
-       -1, 1, 362,
-       9, 0, 935,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row788[] = {
-       1,
-       -1, 1, 672
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row789[] = {
        1,
-       -1, 1, 624
+       -1, 1, 808
 };
 static int parser_action_row790[] = {
        2,
-       -1, 3, 789,
-       52, 0, 172
+       -1, 1, 162,
+       58, 0, 787
 };
 static int parser_action_row791[] = {
-       3,
-       -1, 1, 162,
-       59, 0, 290,
-       82, 0, 183
+       2,
+       -1, 3, 790,
+       57, 0, 906
 };
 static int parser_action_row792[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row793[] = {
-       1,
-       -1, 1, 230
+       2,
+       -1, 1, 562,
+       82, 0, 463
 };
 static int parser_action_row794[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 288
 };
 static int parser_action_row795[] = {
-       1,
-       -1, 1, 675
+       2,
+       -1, 3, 794,
+       84, 0, 383
 };
 static int parser_action_row796[] = {
        2,
-       -1, 3, 795,
-       52, 0, 172
+       -1, 1, 42,
+       13, 0, 27
 };
 static int parser_action_row797[] = {
-       3,
-       -1, 3, 796,
-       54, 0, 943,
-       84, 0, 297
+       1,
+       -1, 1, 815
 };
 static int parser_action_row798[] = {
        1,
-       -1, 1, 628
+       -1, 1, 317
 };
 static int parser_action_row799[] = {
-       25,
-       -1, 1, 184,
-       12, 0, 153,
-       25, 0, 154,
-       27, 1, 635,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       35,
+       -1, 1, 367,
+       12, 0, 152,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 153,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       34, 0, 154,
+       36, 0, 910,
+       37, 0, 911,
+       38, 0, 912,
+       39, 0, 913,
+       40, 0, 39,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       50, 0, 338,
+       51, 0, 157,
+       53, 0, 914,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       82, 0, 180,
+       83, 0, 915,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row800[] = {
-       1,
-       -1, 1, 636
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row801[] = {
-       25,
-       -1, 1, 179,
-       12, 0, 153,
-       25, 0, 154,
-       27, 1, 630,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 3, 800,
+       57, 0, 933
 };
 static int parser_action_row802[] = {
-       1,
-       -1, 1, 631
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row803[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row804[] = {
-       2,
-       -1, 3, 803,
-       27, 0, 948
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row805[] = {
        3,
-       -1, 3, 804,
-       50, 0, 347,
-       83, 0, 348
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row806[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row807[] = {
-       4,
-       -1, 1, 287,
-       61, 0, 951,
-       62, 0, 372,
-       63, 0, 373
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row808[] = {
-       25,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 118,
-       56, 1, 344,
-       66, 1, 344,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row809[] = {
-       4,
-       -1, 1, 281,
-       61, 0, 954,
-       62, 0, 372,
-       63, 0, 373
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row810[] = {
-       4,
-       -1, 1, 283,
-       61, 0, 956,
-       62, 0, 372,
-       63, 0, 373
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row811[] = {
        2,
-       -1, 1, 194,
-       27, 1, 645
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row812[] = {
-       23,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 386,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       16,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 944,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       54, 0, 812,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row813[] = {
        3,
-       -1, 3, 812,
-       9, 0, 667,
-       27, 0, 672
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row814[] = {
        3,
-       -1, 3, 813,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row815[] = {
-       1,
-       -1, 1, 229
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row816[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 469,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row817[] = {
-       23,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 386,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row818[] = {
-       3,
-       -1, 1, 360,
-       12, 0, 963,
-       84, 0, 390
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row819[] = {
-       1,
-       -1, 1, 234
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row820[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 454
 };
 static int parser_action_row821[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 3, 820,
+       44, 0, 954,
+       85, 0, 955
 };
 static int parser_action_row822[] = {
-       1,
-       -1, 1, 354
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row823[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row824[] = {
-       3,
-       -1, 1, 278,
-       56, 1, 280,
-       66, 1, 280
+       4,
+       -1, 1, 403,
+       32, 0, 958,
+       33, 0, 959,
+       35, 0, 960
 };
 static int parser_action_row825[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 405
 };
 static int parser_action_row826[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 1, 410,
+       76, 0, 961,
+       79, 0, 962
 };
 static int parser_action_row827[] = {
-       1,
-       -1, 1, 834
+       11,
+       -1, 1, 412,
+       42, 0, 963,
+       67, 0, 964,
+       68, 0, 965,
+       72, 0, 966,
+       73, 0, 967,
+       74, 0, 968,
+       75, 0, 969,
+       77, 0, 970,
+       78, 0, 971,
+       80, 0, 972
 };
 static int parser_action_row828[] = {
-       2,
-       -1, 1, 158,
-       58, 0, 825
+       4,
+       -1, 1, 423,
+       69, 0, 973,
+       70, 0, 974,
+       71, 0, 975
 };
 static int parser_action_row829[] = {
-       2,
-       -1, 3, 828,
-       57, 0, 970
+       1,
+       -1, 1, 426
 };
 static int parser_action_row830[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 430
 };
 static int parser_action_row831[] = {
-       1,
-       -1, 1, 288
+       3,
+       -1, 1, 433,
+       64, 0, 976,
+       66, 0, 977
 };
 static int parser_action_row832[] = {
        2,
-       -1, 3, 831,
-       84, 0, 390
+       -1, 1, 362,
+       60, 0, 190
 };
 static int parser_action_row833[] = {
-       1,
-       -1, 1, 316
+       2,
+       -1, 3, 832,
+       84, 0, 978
 };
 static int parser_action_row834[] = {
        1,
-       -1, 1, 738
+       -1, 1, 90
 };
 static int parser_action_row835[] = {
-       24,
-       -1, 1, 745,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 322
 };
 static int parser_action_row836[] = {
-       1,
-       -1, 1, 746
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row837[] = {
-       24,
-       -1, 1, 740,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 16
 };
 static int parser_action_row838[] = {
        1,
-       -1, 1, 741
+       -1, 1, 17
 };
 static int parser_action_row839[] = {
        3,
-       -1, 3, 838,
-       50, 0, 347,
-       83, 0, 348
+       -1, 1, 319,
+       59, 0, 616,
+       82, 0, 180
 };
 static int parser_action_row840[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 839,
+       55, 0, 986
 };
 static int parser_action_row841[] = {
-       2,
-       -1, 3, 840,
-       55, 0, 976
+       4,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       58, 0, 987
 };
 static int parser_action_row842[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 164
 };
 static int parser_action_row843[] = {
-       1,
-       -1, 1, 844
+       20,
+       -1, 3, 842,
+       44, 0, 991,
+       50, 0, 338,
+       56, 0, 479,
+       67, 0, 480,
+       68, 0, 481,
+       69, 0, 482,
+       70, 0, 483,
+       71, 0, 484,
+       72, 0, 485,
+       73, 0, 486,
+       74, 0, 487,
+       75, 0, 488,
+       76, 0, 489,
+       77, 0, 490,
+       78, 0, 491,
+       79, 0, 492,
+       80, 0, 493,
+       83, 0, 339,
+       84, 0, 494
 };
 static int parser_action_row844[] = {
-       2,
-       -1, 1, 332,
-       58, 0, 841
+       1,
+       -1, 1, 394
 };
 static int parser_action_row845[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 149,
+       89, 0, 997
 };
 static int parser_action_row846[] = {
-       2,
-       -1, 3, 845,
-       57, 0, 980
+       3,
+       -1, 1, 93,
+       0, 1, 398,
+       1, 1, 398
 };
 static int parser_action_row847[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row848[] = {
        2,
-       -1, 1, 344,
-       54, 0, 242
+       -1, 1, 378,
+       9, 0, 1000
 };
 static int parser_action_row849[] = {
-       3,
-       -1, 1, 380,
+       32,
+       -1, 1, 367,
        0, 0, 1,
-       1, 0, 2
+       1, 0, 2,
+       9, 0, 458,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row850[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 3, 849,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row851[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 396
 };
 static int parser_action_row852[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 851,
+       83, 0, 1004
 };
 static int parser_action_row853[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       1,
+       -1, 1, 798
 };
 static int parser_action_row854[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       1,
+       -1, 1, 800
 };
 static int parser_action_row855[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       3,
+       -1, 3, 854,
+       0, 0, 82,
+       1, 0, 83
 };
 static int parser_action_row856[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row857[] = {
-       16,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 991,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       54, 0, 857,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       1,
+       -1, 1, 818
 };
 static int parser_action_row858[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       5,
+       -1, 1, 42,
+       9, 0, 1010,
+       13, 0, 27,
+       44, 0, 1011,
+       84, 0, 1012
 };
 static int parser_action_row859[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row860[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row861[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       5,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row862[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       1,
+       -1, 1, 374
 };
 static int parser_action_row863[] = {
        2,
-       -1, 1, 318,
-       82, 0, 183
+       -1, 3, 862,
+       48, 0, 1027
 };
 static int parser_action_row864[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       4,
+       -1, 3, 863,
+       34, 0, 1028,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row865[] = {
        1,
-       -1, 1, 448
+       -1, 1, 211
 };
 static int parser_action_row866[] = {
-       3,
-       -1, 3, 865,
-       44, 0, 1001,
-       85, 0, 1002
+       1,
+       -1, 1, 216
 };
 static int parser_action_row867[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       1,
+       -1, 1, 213
 };
 static int parser_action_row868[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 218
 };
 static int parser_action_row869[] = {
-       4,
-       -1, 1, 397,
-       32, 0, 1005,
-       33, 0, 1006,
-       35, 0, 1007
+       1,
+       -1, 1, 199
 };
 static int parser_action_row870[] = {
-       1,
-       -1, 1, 399
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row871[] = {
-       3,
-       -1, 1, 404,
-       76, 0, 1008,
-       79, 0, 1009
+       1,
+       -1, 1, 544
 };
 static int parser_action_row872[] = {
-       11,
-       -1, 1, 406,
-       42, 0, 1010,
-       67, 0, 1011,
-       68, 0, 1012,
-       72, 0, 1013,
-       73, 0, 1014,
-       74, 0, 1015,
-       75, 0, 1016,
-       77, 0, 1017,
-       78, 0, 1018,
-       80, 0, 1019
+       2,
+       -1, 3, 871,
+       48, 0, 1031
 };
 static int parser_action_row873[] = {
        4,
-       -1, 1, 417,
-       69, 0, 1020,
-       70, 0, 1021,
-       71, 0, 1022
+       -1, 3, 872,
+       34, 0, 1032,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row874[] = {
-       1,
-       -1, 1, 420
+       3,
+       -1, 1, 168,
+       27, 1, 627,
+       52, 1, 726
 };
 static int parser_action_row875[] = {
-       1,
-       -1, 1, 424
+       3,
+       -1, 1, 167,
+       27, 1, 626,
+       52, 1, 725
 };
 static int parser_action_row876[] = {
        2,
-       -1, 1, 427,
-       66, 0, 1023
+       -1, 1, 223,
+       27, 1, 671
 };
 static int parser_action_row877[] = {
-       1,
-       -1, 1, 17
+       3,
+       -1, 1, 207,
+       27, 1, 657,
+       61, 0, 1034
 };
 static int parser_action_row878[] = {
-       3,
-       -1, 1, 318,
-       59, 0, 626,
-       82, 0, 183
+       2,
+       -1, 1, 166,
+       59, 0, 287
 };
 static int parser_action_row879[] = {
-       2,
-       -1, 3, 878,
-       55, 0, 1027
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row880[] = {
-       4,
-       -1, 1, 380,
+       3,
+       -1, 1, 385,
        0, 0, 1,
-       1, 0, 2,
-       58, 0, 1028
+       1, 0, 2
 };
 static int parser_action_row881[] = {
-       1,
-       -1, 1, 160
+       2,
+       -1, 1, 232,
+       27, 1, 674
 };
 static int parser_action_row882[] = {
-       20,
-       -1, 3, 881,
-       44, 0, 1032,
-       50, 0, 347,
-       56, 0, 490,
-       67, 0, 491,
-       68, 0, 492,
-       69, 0, 493,
-       70, 0, 494,
-       71, 0, 495,
-       72, 0, 496,
-       73, 0, 497,
-       74, 0, 498,
-       75, 0, 499,
-       76, 0, 500,
-       77, 0, 501,
-       78, 0, 502,
-       79, 0, 503,
-       80, 0, 504,
-       83, 0, 348,
-       84, 0, 505
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row883[] = {
-       1,
-       -1, 1, 389
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row884[] = {
        2,
-       -1, 1, 145,
-       89, 0, 1038
+       -1, 3, 883,
+       27, 0, 1040
 };
 static int parser_action_row885[] = {
-       2,
-       -1, 1, 392,
-       15, 1, 90
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 1041,
+       12, 0, 650,
+       15, 0, 651,
+       18, 0, 652,
+       25, 0, 653,
+       28, 0, 655,
+       29, 0, 656,
+       30, 0, 657,
+       36, 0, 658,
+       37, 0, 659,
+       38, 0, 660,
+       39, 0, 661,
+       40, 0, 662,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 663,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row886[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 885,
+       59, 0, 1044
 };
 static int parser_action_row887[] = {
-       2,
-       -1, 1, 373,
-       9, 0, 1041
+       5,
+       -1, 1, 367,
+       12, 0, 1045,
+       49, 0, 499,
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row888[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 469,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row889[] = {
-       1,
-       -1, 1, 391
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row890[] = {
        2,
-       -1, 3, 889,
-       83, 0, 1044
+       -1, 1, 195,
+       27, 1, 647
 };
 static int parser_action_row891[] = {
-       1,
-       -1, 1, 824
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row892[] = {
-       1,
-       -1, 1, 826
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row893[] = {
-       3,
-       -1, 3, 892,
-       0, 0, 83,
-       1, 0, 84
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row894[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row895[] = {
-       6,
-       -1, 1, 42,
-       4, 0, 1050,
-       9, 0, 1051,
-       13, 0, 28,
-       44, 0, 1052,
-       84, 0, 1053
+       2,
+       -1, 1, 201,
+       27, 1, 653
 };
 static int parser_action_row896[] = {
        1,
-       -1, 1, 854
+       -1, 1, 227
 };
 static int parser_action_row897[] = {
        3,
-       -1, 1, 380,
+       -1, 3, 896,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row898[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 225
 };
 static int parser_action_row899[] = {
-       5,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2,
-       31, 0, 35,
-       96, 0, 57
+       2,
+       -1, 1, 203,
+       27, 1, 655
 };
 static int parser_action_row900[] = {
-       1,
-       -1, 1, 369
+       23,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 379,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row901[] = {
        2,
        -1, 3, 900,
-       48, 0, 1068
+       31, 0, 1057
 };
 static int parser_action_row902[] = {
-       4,
+       2,
        -1, 3, 901,
-       34, 0, 1069,
-       50, 0, 347,
-       83, 0, 348
+       15, 0, 1058
 };
 static int parser_action_row903[] = {
-       1,
-       -1, 1, 211
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row904[] = {
-       1,
-       -1, 1, 216
+       2,
+       -1, 3, 903,
+       57, 0, 1060
 };
 static int parser_action_row905[] = {
-       1,
-       -1, 1, 213
+       3,
+       -1, 3, 904,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row906[] = {
        1,
-       -1, 1, 218
+       -1, 1, 809
 };
 static int parser_action_row907[] = {
-       1,
-       -1, 1, 199
+       2,
+       -1, 1, 562,
+       82, 0, 463
 };
 static int parser_action_row908[] = {
-       1,
-       -1, 1, 330
+       2,
+       -1, 3, 907,
+       55, 0, 1063
 };
 static int parser_action_row909[] = {
-       24,
-       -1, 1, 756,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 563
 };
 static int parser_action_row910[] = {
-       25,
-       -1, 1, 763,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       52, 0, 172,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 336
 };
 static int parser_action_row911[] = {
-       25,
-       -1, 1, 758,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       52, 0, 172,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       24,
+       -1, 1, 733,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       44, 1, 367,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row912[] = {
-       1,
-       -1, 1, 762
+       2,
+       -1, 1, 738,
+       52, 0, 171
 };
 static int parser_action_row913[] = {
        2,
-       -1, 3, 912,
-       11, 0, 1076
+       -1, 1, 735,
+       52, 0, 171
 };
 static int parser_action_row914[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
-};
-static int parser_action_row915[] = {
        1,
-       -1, 1, 562
+       -1, 1, 737
+};
+static int parser_action_row915[] = {
+       2,
+       -1, 3, 914,
+       11, 0, 1067
 };
 static int parser_action_row916[] = {
-       1,
-       -1, 1, 754
+       4,
+       -1, 1, 319,
+       56, 0, 470,
+       60, 0, 189,
+       82, 0, 180
 };
 static int parser_action_row917[] = {
        1,
-       -1, 1, 767
+       -1, 1, 340
 };
 static int parser_action_row918[] = {
        1,
-       -1, 1, 769
+       -1, 1, 731
 };
 static int parser_action_row919[] = {
        1,
-       -1, 1, 768
+       -1, 1, 732
 };
 static int parser_action_row920[] = {
        1,
-       -1, 1, 770
+       -1, 1, 740
 };
 static int parser_action_row921[] = {
        1,
-       -1, 1, 771
+       -1, 1, 742
 };
 static int parser_action_row922[] = {
-       3,
-       -1, 3, 921,
-       0, 0, 83,
-       1, 0, 84
+       1,
+       -1, 1, 741
 };
 static int parser_action_row923[] = {
-       3,
-       -1, 3, 922,
-       44, 0, 262,
-       85, 0, 1079
+       1,
+       -1, 1, 743
 };
 static int parser_action_row924[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       1,
+       -1, 1, 744
 };
 static int parser_action_row925[] = {
        1,
-       -1, 1, 325
+       -1, 1, 341
 };
 static int parser_action_row926[] = {
-       1,
-       -1, 1, 755
+       4,
+       -1, 1, 276,
+       56, 0, 205,
+       64, 0, 206,
+       66, 0, 1068
 };
 static int parser_action_row927[] = {
        1,
-       -1, 1, 563
+       -1, 1, 343
 };
 static int parser_action_row928[] = {
        3,
-       -1, 1, 529,
-       56, 0, 207,
-       66, 0, 1081
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row929[] = {
-       3,
-       -1, 3, 928,
-       0, 0, 83,
-       1, 0, 84
+       2,
+       -1, 1, 337,
+       58, 0, 1070
 };
 static int parser_action_row930[] = {
-       2,
-       -1, 1, 560,
-       58, 0, 841
+       3,
+       -1, 3, 929,
+       44, 0, 324,
+       85, 0, 218
 };
 static int parser_action_row931[] = {
-       1,
-       -1, 1, 564
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row932[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 342
 };
 static int parser_action_row933[] = {
-       1,
-       -1, 1, 541
+       2,
+       -1, 3, 932,
+       57, 0, 1073
 };
 static int parser_action_row934[] = {
        2,
-       -1, 3, 933,
-       48, 0, 1086
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row935[] = {
-       4,
-       -1, 3, 934,
-       34, 0, 1087,
-       50, 0, 347,
-       83, 0, 348
+       1,
+       -1, 1, 357
 };
 static int parser_action_row936[] = {
-       3,
-       -1, 1, 164,
-       27, 1, 622,
-       52, 1, 730
+       1,
+       -1, 1, 443
 };
 static int parser_action_row937[] = {
-       3,
-       -1, 1, 163,
-       27, 1, 621,
-       52, 1, 729
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row938[] = {
-       2,
-       -1, 1, 223,
-       27, 1, 671
+       20,
+       -1, 1, 367,
+       12, 0, 802,
+       34, 0, 804,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row939[] = {
        3,
-       -1, 1, 207,
-       27, 1, 657,
-       61, 0, 1089
+       -1, 3, 938,
+       50, 0, 1077,
+       83, 0, 1078
 };
 static int parser_action_row940[] = {
-       2,
-       -1, 1, 162,
-       59, 0, 290
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row941[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 445
 };
 static int parser_action_row942[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 446
 };
 static int parser_action_row943[] = {
-       2,
-       -1, 1, 232,
-       27, 1, 674
+       1,
+       -1, 1, 447
 };
 static int parser_action_row944[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 448
 };
 static int parser_action_row945[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row946[] = {
-       1,
-       -1, 1, 637
+       3,
+       -1, 3, 945,
+       44, 0, 954,
+       85, 0, 1082
 };
 static int parser_action_row947[] = {
-       1,
-       -1, 1, 632
+       3,
+       -1, 3, 946,
+       64, 0, 976,
+       66, 0, 1083
 };
 static int parser_action_row948[] = {
-       2,
-       -1, 3, 947,
-       27, 0, 1095
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row949[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 1096,
-       12, 0, 668,
-       15, 0, 669,
-       18, 0, 670,
-       25, 0, 671,
-       28, 0, 673,
-       29, 0, 674,
-       30, 0, 675,
-       36, 0, 676,
-       37, 0, 677,
-       38, 0, 678,
-       39, 0, 679,
-       40, 0, 680,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 681,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row950[] = {
-       2,
-       -1, 3, 949,
-       59, 0, 1099
+       1,
+       -1, 1, 449
 };
 static int parser_action_row951[] = {
-       5,
-       -1, 1, 362,
-       12, 0, 1100,
-       49, 0, 510,
-       83, 0, 49,
-       84, 0, 50
+       1,
+       -1, 1, 450
 };
 static int parser_action_row952[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 451
 };
 static int parser_action_row953[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 453
 };
 static int parser_action_row954[] = {
-       2,
-       -1, 1, 195,
-       27, 1, 646
+       1,
+       -1, 1, 452
 };
 static int parser_action_row955[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row956[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 438
 };
 static int parser_action_row957[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 440
 };
 static int parser_action_row958[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 3, 957,
+       56, 0, 1087,
+       57, 0, 1088
 };
 static int parser_action_row959[] = {
-       2,
-       -1, 1, 201,
-       27, 1, 652
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row960[] = {
-       1,
-       -1, 1, 227
+       4,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       27, 0, 1090
 };
 static int parser_action_row961[] = {
        3,
-       -1, 3, 960,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row962[] = {
-       1,
-       -1, 1, 225
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row963[] = {
-       2,
-       -1, 1, 203,
-       27, 1, 654
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row964[] = {
-       23,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 386,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row965[] = {
-       2,
-       -1, 3, 964,
-       31, 0, 1112
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row966[] = {
-       2,
-       -1, 3, 965,
-       15, 0, 1113
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row967[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row968[] = {
-       2,
-       -1, 3, 967,
-       57, 0, 1115
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row969[] = {
        3,
-       -1, 3, 968,
-       50, 0, 347,
-       83, 0, 348
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row970[] = {
-       1,
-       -1, 1, 835
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row971[] = {
-       2,
-       -1, 1, 558,
-       82, 0, 474
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row972[] = {
-       2,
-       -1, 3, 971,
-       55, 0, 1118
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row973[] = {
-       1,
-       -1, 1, 747
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row974[] = {
-       1,
-       -1, 1, 742
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row975[] = {
-       2,
-       -1, 3, 974,
-       59, 0, 1119
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row976[] = {
-       5,
-       -1, 1, 362,
-       12, 0, 597,
-       49, 0, 510,
-       83, 0, 49,
-       84, 0, 50
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row977[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       1,
+       -1, 1, 459
 };
 static int parser_action_row978[] = {
-       35,
-       -1, 1, 362,
-       12, 0, 153,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 154,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       34, 0, 155,
-       36, 0, 718,
-       37, 0, 719,
-       38, 0, 720,
-       39, 0, 721,
-       40, 0, 40,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       50, 0, 347,
-       51, 0, 158,
-       53, 0, 722,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       82, 0, 183,
-       83, 0, 723,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row979[] = {
-       1,
-       -1, 1, 845
+       2,
+       -1, 1, 363,
+       60, 0, 190
 };
 static int parser_action_row980[] = {
        2,
        -1, 3, 979,
-       57, 0, 1123
+       9, 0, 1109
 };
 static int parser_action_row981[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       1,
+       -1, 1, 816
 };
 static int parser_action_row982[] = {
-       1,
-       -1, 1, 352
+       2,
+       -1, 1, 42,
+       13, 0, 27
 };
 static int parser_action_row983[] = {
-       1,
-       -1, 1, 437
+       8,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       4, 1, 325,
+       9, 1, 325,
+       15, 1, 325,
+       31, 1, 325,
+       96, 1, 325
 };
 static int parser_action_row984[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 129,
+       64, 0, 1112
 };
 static int parser_action_row985[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 847,
-       34, 0, 849,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       2,
+       -1, 1, 318,
+       59, 0, 616
 };
 static int parser_action_row986[] = {
-       3,
-       -1, 3, 985,
-       50, 0, 1127,
-       83, 0, 1128
+       1,
+       -1, 1, 128
 };
 static int parser_action_row987[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       4,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       59, 0, 616
 };
 static int parser_action_row988[] = {
-       1,
-       -1, 1, 439
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row989[] = {
        1,
-       -1, 1, 440
+       -1, 1, 804
 };
 static int parser_action_row990[] = {
        1,
-       -1, 1, 441
+       -1, 1, 124
 };
 static int parser_action_row991[] = {
-       1,
-       -1, 1, 442
+       4,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       58, 0, 987
 };
 static int parser_action_row992[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 139
 };
 static int parser_action_row993[] = {
-       3,
-       -1, 3, 992,
-       44, 0, 1001,
-       85, 0, 1132
-};
+       1,
+       -1, 1, 140
+};
 static int parser_action_row994[] = {
        2,
-       -1, 3, 993,
-       66, 0, 1133
+       -1, 1, 133,
+       58, 0, 1119
 };
 static int parser_action_row995[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 137
 };
 static int parser_action_row996[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       1,
+       -1, 1, 138
 };
 static int parser_action_row997[] = {
-       1,
-       -1, 1, 443
+       2,
+       -1, 1, 142,
+       66, 0, 1122
 };
 static int parser_action_row998[] = {
        1,
-       -1, 1, 444
+       -1, 1, 150
 };
 static int parser_action_row999[] = {
-       1,
-       -1, 1, 445
+       2,
+       -1, 1, 135,
+       4, 0, 720
 };
 static int parser_action_row1000[] = {
-       1,
-       -1, 1, 447
+       2,
+       -1, 1, 94,
+       9, 0, 1124
 };
 static int parser_action_row1001[] = {
        1,
-       -1, 1, 446
+       -1, 1, 379
 };
 static int parser_action_row1002[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       1,
+       -1, 1, 391
 };
 static int parser_action_row1003[] = {
-       1,
-       -1, 1, 432
+       2,
+       -1, 1, 378,
+       9, 0, 1000
 };
 static int parser_action_row1004[] = {
        1,
-       -1, 1, 434
+       -1, 1, 397
 };
 static int parser_action_row1005[] = {
        3,
-       -1, 3, 1004,
-       56, 0, 1137,
-       57, 0, 1138
+       -1, 1, 166,
+       59, 0, 287,
+       82, 0, 180
 };
 static int parser_action_row1006[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
-};
-static int parser_action_row1007[] = {
        4,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2,
-       27, 0, 1140
+       58, 0, 1128
+};
+static int parser_action_row1007[] = {
+       1,
+       -1, 1, 56
 };
 static int parser_action_row1008[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       4,
+       -1, 1, 42,
+       9, 0, 1132,
+       13, 0, 27,
+       44, 0, 1011
 };
 static int parser_action_row1009[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row1010[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row1011[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 26
 };
 static int parser_action_row1012[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row1013[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 791
 };
 static int parser_action_row1014[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       5,
+       -1, 1, 97,
+       21, 0, 196,
+       22, 0, 197,
+       23, 0, 198,
+       24, 0, 199
 };
 static int parser_action_row1015[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 42,
+       13, 0, 27
 };
 static int parser_action_row1016[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 42,
+       13, 0, 27
 };
 static int parser_action_row1017[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       36,
+       -1, 1, 367,
+       0, 0, 82,
+       1, 0, 83,
+       12, 0, 106,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 107,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       34, 0, 108,
+       36, 0, 1141,
+       37, 0, 1142,
+       38, 0, 1143,
+       39, 0, 1144,
+       40, 0, 39,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       50, 0, 338,
+       51, 0, 115,
+       53, 0, 1145,
+       54, 0, 1146,
+       68, 0, 117,
+       82, 0, 180,
+       83, 0, 915,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row1018[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 799
 };
 static int parser_action_row1019[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       4,
+       -1, 1, 42,
+       9, 0, 1164,
+       13, 0, 27,
+       44, 0, 1011
 };
 static int parser_action_row1020[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row1021[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 801
 };
 static int parser_action_row1022[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 1, 42,
+       9, 0, 1166,
+       13, 0, 27
 };
 static int parser_action_row1023[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row1024[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 819
 };
 static int parser_action_row1025[] = {
-       2,
-       -1, 1, 125,
-       64, 0, 1159
+       5,
+       -1, 1, 42,
+       9, 0, 1170,
+       13, 0, 27,
+       44, 0, 1011,
+       84, 0, 1012
 };
 static int parser_action_row1026[] = {
-       2,
-       -1, 1, 317,
-       59, 0, 626
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1027[] = {
-       1,
-       -1, 1, 124
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1028[] = {
-       4,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2,
-       59, 0, 626
+       1,
+       -1, 1, 305
 };
 static int parser_action_row1029[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row1030[] = {
-       1,
-       -1, 1, 830
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1031[] = {
-       1,
-       -1, 1, 120
+       2,
+       -1, 3, 1030,
+       27, 0, 1176
 };
 static int parser_action_row1032[] = {
-       4,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2,
-       58, 0, 1028
+       1,
+       -1, 1, 557
 };
 static int parser_action_row1033[] = {
-       1,
-       -1, 1, 135
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1034[] = {
-       1,
-       -1, 1, 136
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1035[] = {
-       2,
-       -1, 1, 129,
-       58, 0, 1166
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1036[] = {
-       1,
-       -1, 1, 133
+       3,
+       -1, 1, 208,
+       27, 1, 658,
+       61, 0, 1180
 };
 static int parser_action_row1037[] = {
-       1,
-       -1, 1, 134
+       2,
+       -1, 3, 1036,
+       26, 0, 1181
 };
 static int parser_action_row1038[] = {
        2,
-       -1, 1, 138,
-       66, 0, 1169
+       -1, 3, 1037,
+       15, 0, 1182
 };
 static int parser_action_row1039[] = {
-       1,
-       -1, 1, 146
+       2,
+       -1, 3, 1038,
+       84, 0, 294
 };
 static int parser_action_row1040[] = {
-       2,
-       -1, 1, 131,
-       4, 0, 751
+       3,
+       -1, 3, 1039,
+       31, 0, 1184,
+       58, 0, 556
 };
 static int parser_action_row1041[] = {
-       2,
-       -1, 1, 91,
-       9, 0, 1171
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 1041,
+       12, 0, 650,
+       15, 0, 651,
+       18, 0, 652,
+       25, 0, 653,
+       28, 0, 655,
+       29, 0, 656,
+       30, 0, 657,
+       36, 0, 658,
+       37, 0, 659,
+       38, 0, 660,
+       39, 0, 661,
+       40, 0, 662,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 663,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1042[] = {
-       1,
-       -1, 1, 374
+       2,
+       -1, 1, 169,
+       27, 1, 628
 };
 static int parser_action_row1043[] = {
-       1,
-       -1, 1, 386
+       30,
+       -1, 1, 367,
+       9, 0, 1186,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1044[] = {
-       2,
-       -1, 1, 373,
-       9, 0, 1041
+       1,
+       -1, 1, 682
 };
 static int parser_action_row1045[] = {
-       3,
-       -1, 1, 162,
-       59, 0, 290,
-       82, 0, 183
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1046[] = {
-       4,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2,
-       58, 0, 1175
+       26,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 116,
+       56, 1, 349,
+       64, 1, 349,
+       66, 1, 349,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row1047[] = {
-       1,
-       -1, 1, 56
+       2,
+       -1, 3, 1046,
+       85, 0, 1190
 };
 static int parser_action_row1048[] = {
-       4,
-       -1, 1, 42,
-       9, 0, 1179,
-       13, 0, 28,
-       44, 0, 1052
+       29,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 116,
+       56, 1, 349,
+       61, 1, 349,
+       62, 1, 349,
+       63, 1, 349,
+       64, 1, 349,
+       66, 1, 349,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row1049[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 1, 364,
+       12, 0, 1193,
+       84, 0, 222
 };
 static int parser_action_row1050[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       4,
+       -1, 1, 366,
+       12, 0, 1194,
+       83, 0, 48,
+       84, 0, 224
 };
 static int parser_action_row1051[] = {
        1,
-       -1, 1, 817
+       -1, 1, 665
 };
 static int parser_action_row1052[] = {
        1,
-       -1, 1, 26
+       -1, 1, 670
 };
 static int parser_action_row1053[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 662
 };
 static int parser_action_row1054[] = {
        1,
-       -1, 1, 816
+       -1, 1, 667
 };
 static int parser_action_row1055[] = {
-       4,
-       -1, 1, 94,
-       22, 0, 199,
-       23, 0, 200,
-       24, 0, 201
+       1,
+       -1, 1, 664
 };
 static int parser_action_row1056[] = {
-       2,
-       -1, 1, 42,
-       13, 0, 28
+       1,
+       -1, 1, 669
 };
 static int parser_action_row1057[] = {
        2,
-       -1, 1, 42,
-       13, 0, 28
+       -1, 1, 202,
+       27, 1, 654
 };
 static int parser_action_row1058[] = {
-       36,
-       -1, 1, 362,
-       0, 0, 83,
-       1, 0, 84,
-       12, 0, 108,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 109,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       34, 0, 110,
-       36, 0, 908,
-       37, 0, 909,
-       38, 0, 910,
-       39, 0, 911,
-       40, 0, 40,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       50, 0, 347,
-       51, 0, 117,
-       53, 0, 912,
-       54, 0, 1188,
-       68, 0, 119,
-       82, 0, 183,
-       83, 0, 723,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1059[] = {
-       1,
-       -1, 1, 825
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 139,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1060[] = {
-       4,
-       -1, 1, 42,
-       9, 0, 1192,
-       13, 0, 28,
-       44, 0, 1052
+       2,
+       -1, 3, 1059,
+       27, 0, 1199
 };
 static int parser_action_row1061[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 562,
+       82, 0, 463
 };
 static int parser_action_row1062[] = {
        1,
-       -1, 1, 827
+       -1, 1, 163
 };
 static int parser_action_row1063[] = {
-       3,
-       -1, 1, 42,
-       9, 0, 1194,
-       13, 0, 28
+       1,
+       -1, 1, 462
 };
 static int parser_action_row1064[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 560
 };
 static int parser_action_row1065[] = {
-       6,
-       -1, 1, 42,
-       4, 0, 1050,
-       9, 0, 1198,
-       13, 0, 28,
-       44, 0, 1052,
-       84, 0, 1053
+       1,
+       -1, 1, 734
 };
 static int parser_action_row1066[] = {
        1,
-       -1, 1, 855
+       -1, 1, 739
 };
 static int parser_action_row1067[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 736
 };
 static int parser_action_row1068[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 3, 1067,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row1069[] = {
-       1,
-       -1, 1, 305
-};
-static int parser_action_row1070[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row1070[] = {
+       2,
+       -1, 3, 1069,
+       55, 0, 1203
+};
 static int parser_action_row1071[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row1072[] = {
        1,
-       -1, 1, 757
+       -1, 1, 820
 };
 static int parser_action_row1073[] = {
-       24,
-       -1, 1, 764,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 338,
+       58, 0, 1070
 };
 static int parser_action_row1074[] = {
-       1,
-       -1, 1, 765
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row1075[] = {
-       24,
-       -1, 1, 759,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       44, 1, 362,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 159
 };
 static int parser_action_row1076[] = {
-       1,
-       -1, 1, 760
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1077[] = {
-       3,
-       -1, 3, 1076,
-       50, 0, 347,
-       83, 0, 348
+       1,
+       -1, 1, 411
 };
 static int parser_action_row1078[] = {
-       35,
-       -1, 1, 362,
-       12, 0, 153,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 154,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       34, 0, 155,
-       36, 0, 718,
-       37, 0, 719,
-       38, 0, 720,
-       39, 0, 721,
-       40, 0, 40,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       50, 0, 347,
-       51, 0, 158,
-       53, 0, 722,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       82, 0, 183,
-       83, 0, 723,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 3, 1077,
+       83, 0, 1208
 };
 static int parser_action_row1079[] = {
-       1,
-       -1, 1, 326
+       2,
+       -1, 1, 562,
+       82, 0, 463
 };
 static int parser_action_row1080[] = {
-       4,
-       -1, 1, 534,
-       61, 0, 1208,
-       62, 0, 372,
-       63, 0, 373
+       3,
+       -1, 1, 349,
+       54, 0, 238,
+       66, 0, 1210
 };
 static int parser_action_row1081[] = {
-       4,
-       -1, 1, 536,
-       61, 0, 1210,
-       62, 0, 372,
-       63, 0, 373
+       1,
+       -1, 1, 432
 };
 static int parser_action_row1082[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 3, 1081,
+       50, 0, 1077,
+       83, 0, 1078
 };
 static int parser_action_row1083[] = {
-       4,
-       -1, 1, 540,
-       61, 0, 1213,
-       62, 0, 372,
-       63, 0, 373
+       3,
+       -1, 1, 436,
+       64, 1, 438,
+       66, 1, 438
 };
 static int parser_action_row1084[] = {
-       1,
-       -1, 1, 329
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1085[] = {
-       2,
-       -1, 1, 561,
-       58, 0, 841
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1086[] = {
-       2,
-       -1, 3, 1085,
-       27, 0, 1215
+       1,
+       -1, 1, 431
 };
 static int parser_action_row1087[] = {
        1,
-       -1, 1, 554
+       -1, 1, 441
 };
 static int parser_action_row1088[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row1089[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row1090[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       20,
+       -1, 1, 367,
+       12, 0, 802,
+       34, 0, 804,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1091[] = {
        3,
-       -1, 1, 208,
-       27, 1, 658,
-       61, 0, 1219
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1092[] = {
-       2,
-       -1, 3, 1091,
-       26, 0, 1220
+       20,
+       -1, 1, 367,
+       12, 0, 802,
+       34, 0, 804,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1093[] = {
-       2,
-       -1, 3, 1092,
-       15, 0, 1221
+       20,
+       -1, 1, 367,
+       12, 0, 802,
+       34, 0, 804,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1094[] = {
-       2,
-       -1, 3, 1093,
-       84, 0, 297
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1095[] = {
-       3,
-       -1, 3, 1094,
-       31, 0, 1223,
-       58, 0, 574
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1096[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 1096,
-       12, 0, 668,
-       15, 0, 669,
-       18, 0, 670,
-       25, 0, 671,
-       28, 0, 673,
-       29, 0, 674,
-       30, 0, 675,
-       36, 0, 676,
-       37, 0, 677,
-       38, 0, 678,
-       39, 0, 679,
-       40, 0, 680,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 681,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 3, 1095,
+       50, 0, 1223,
+       83, 0, 1224
 };
 static int parser_action_row1097[] = {
-       2,
-       -1, 1, 165,
-       27, 1, 623
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1098[] = {
-       30,
-       -1, 1, 362,
-       9, 0, 1225,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1099[] = {
-       1,
-       -1, 1, 682
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1100[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1101[] = {
-       25,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 118,
-       56, 1, 344,
-       66, 1, 344,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1102[] = {
-       2,
-       -1, 3, 1101,
-       85, 0, 1229
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1103[] = {
-       28,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 118,
-       56, 1, 344,
-       61, 1, 344,
-       62, 1, 344,
-       63, 1, 344,
-       66, 1, 344,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1104[] = {
-       3,
-       -1, 1, 359,
-       12, 0, 1232,
-       84, 0, 223
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1105[] = {
-       4,
-       -1, 1, 361,
-       12, 0, 1233,
-       83, 0, 49,
-       84, 0, 225
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1106[] = {
-       1,
-       -1, 1, 665
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1107[] = {
-       1,
-       -1, 1, 670
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1108[] = {
-       1,
-       -1, 1, 662
+       19,
+       -1, 1, 367,
+       12, 0, 802,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1109[] = {
-       1,
-       -1, 1, 667
+       5,
+       -1, 1, 367,
+       12, 0, 1238,
+       49, 0, 1239,
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row1110[] = {
        1,
-       -1, 1, 664
+       -1, 1, 91
 };
 static int parser_action_row1111[] = {
-       1,
-       -1, 1, 669
+       5,
+       -1, 1, 97,
+       21, 0, 196,
+       22, 0, 197,
+       23, 0, 198,
+       24, 0, 199
 };
 static int parser_action_row1112[] = {
-       2,
-       -1, 1, 202,
-       27, 1, 653
+       1,
+       -1, 1, 817
 };
 static int parser_action_row1113[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 131
 };
 static int parser_action_row1114[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 141,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 130,
+       64, 0, 1243
 };
 static int parser_action_row1115[] = {
-       2,
-       -1, 3, 1114,
-       27, 0, 1238
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1116[] = {
-       2,
-       -1, 1, 558,
-       82, 0, 474
+       1,
+       -1, 1, 121
 };
 static int parser_action_row1117[] = {
-       1,
-       -1, 1, 159
+       2,
+       -1, 3, 1116,
+       84, 0, 838
 };
 static int parser_action_row1118[] = {
        1,
-       -1, 1, 455
+       -1, 1, 805
 };
 static int parser_action_row1119[] = {
        1,
-       -1, 1, 556
+       -1, 1, 125
 };
 static int parser_action_row1120[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1121[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       1,
+       -1, 1, 806
 };
 static int parser_action_row1122[] = {
-       1,
-       -1, 1, 320
+       2,
+       -1, 1, 134,
+       58, 0, 1119
 };
 static int parser_action_row1123[] = {
-       1,
-       -1, 1, 333
+       18,
+       -1, 3, 1122,
+       49, 0, 1248,
+       56, 0, 479,
+       67, 0, 480,
+       68, 0, 481,
+       69, 0, 482,
+       70, 0, 483,
+       71, 0, 484,
+       72, 0, 485,
+       73, 0, 486,
+       74, 0, 487,
+       75, 0, 488,
+       76, 0, 489,
+       77, 0, 490,
+       78, 0, 491,
+       79, 0, 492,
+       80, 0, 493,
+       84, 0, 494
 };
 static int parser_action_row1124[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       3,
+       -1, 1, 155,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row1125[] = {
        1,
-       -1, 1, 155
+       -1, 1, 399
 };
 static int parser_action_row1126[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 392
 };
 static int parser_action_row1127[] = {
        1,
-       -1, 1, 405
+       -1, 1, 53
 };
 static int parser_action_row1128[] = {
        2,
-       -1, 3, 1127,
-       83, 0, 1243
+       -1, 1, 166,
+       59, 0, 287
 };
 static int parser_action_row1129[] = {
-       2,
-       -1, 1, 558,
-       82, 0, 474
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1130[] = {
-       3,
-       -1, 1, 344,
-       54, 0, 242,
-       66, 0, 1245
+       1,
+       -1, 1, 802
 };
 static int parser_action_row1131[] = {
-       1,
-       -1, 1, 426
+       2,
+       -1, 3, 1130,
+       57, 0, 1254
 };
 static int parser_action_row1132[] = {
-       3,
-       -1, 3, 1131,
-       50, 0, 1127,
-       83, 0, 1128
+       4,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       58, 0, 1128
 };
 static int parser_action_row1133[] = {
-       2,
-       -1, 1, 430,
-       66, 1, 432
+       1,
+       -1, 1, 28
 };
 static int parser_action_row1134[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       4,
+       -1, 1, 42,
+       9, 0, 1257,
+       13, 0, 27,
+       44, 0, 1011
 };
 static int parser_action_row1135[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row1136[] = {
-       1,
-       -1, 1, 425
+       3,
+       -1, 1, 42,
+       9, 0, 1259,
+       13, 0, 27
 };
 static int parser_action_row1137[] = {
-       1,
-       -1, 1, 435
+       3,
+       -1, 3, 1136,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row1138[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       8,
+       -1, 3, 1137,
+       10, 0, 1261,
+       11, 0, 1262,
+       12, 0, 1263,
+       16, 0, 1264,
+       17, 0, 1265,
+       18, 0, 1266,
+       41, 0, 1267
 };
 static int parser_action_row1139[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       5,
+       -1, 1, 97,
+       21, 0, 196,
+       22, 0, 197,
+       23, 0, 198,
+       24, 0, 199
 };
 static int parser_action_row1140[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 847,
-       34, 0, 849,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       2,
+       -1, 1, 42,
+       13, 0, 27
 };
 static int parser_action_row1141[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       5,
+       -1, 1, 97,
+       21, 0, 196,
+       22, 0, 197,
+       23, 0, 198,
+       24, 0, 199
 };
 static int parser_action_row1142[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 847,
-       34, 0, 849,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       24,
+       -1, 1, 748,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       44, 1, 367,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1143[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 847,
-       34, 0, 849,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       2,
+       -1, 1, 753,
+       52, 0, 171
 };
 static int parser_action_row1144[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       2,
+       -1, 1, 750,
+       52, 0, 171
 };
 static int parser_action_row1145[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       1,
+       -1, 1, 752
 };
 static int parser_action_row1146[] = {
-       3,
+       2,
        -1, 3, 1145,
-       50, 0, 1258,
-       83, 0, 1259
+       11, 0, 1274
 };
 static int parser_action_row1147[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1148[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       1,
+       -1, 1, 566
 };
 static int parser_action_row1149[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       1,
+       -1, 1, 746
 };
 static int parser_action_row1150[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       1,
+       -1, 1, 755
 };
 static int parser_action_row1151[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       1,
+       -1, 1, 757
 };
 static int parser_action_row1152[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       1,
+       -1, 1, 756
 };
 static int parser_action_row1153[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       1,
+       -1, 1, 758
 };
 static int parser_action_row1154[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       1,
+       -1, 1, 759
 };
 static int parser_action_row1155[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       3,
+       -1, 3, 1154,
+       0, 0, 82,
+       1, 0, 83
 };
 static int parser_action_row1156[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       3,
+       -1, 3, 1155,
+       44, 0, 258,
+       85, 0, 1277
 };
 static int parser_action_row1157[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row1158[] = {
-       19,
-       -1, 1, 362,
-       12, 0, 847,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       1,
+       -1, 1, 331
 };
 static int parser_action_row1159[] = {
-       5,
-       -1, 1, 362,
-       12, 0, 1273,
-       49, 0, 1274,
-       83, 0, 49,
-       84, 0, 50
+       1,
+       -1, 1, 747
 };
 static int parser_action_row1160[] = {
        1,
-       -1, 1, 127
+       -1, 1, 567
 };
 static int parser_action_row1161[] = {
-       2,
-       -1, 1, 126,
-       64, 0, 1277
+       4,
+       -1, 1, 532,
+       56, 0, 205,
+       64, 0, 279,
+       66, 0, 1279
 };
 static int parser_action_row1162[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 3, 1161,
+       0, 0, 82,
+       1, 0, 83
 };
 static int parser_action_row1163[] = {
-       1,
-       -1, 1, 117
+       2,
+       -1, 1, 564,
+       58, 0, 1070
 };
 static int parser_action_row1164[] = {
-       2,
-       -1, 3, 1163,
-       84, 0, 877
+       1,
+       -1, 1, 568
 };
 static int parser_action_row1165[] = {
        1,
-       -1, 1, 831
+       -1, 1, 30
 };
 static int parser_action_row1166[] = {
-       1,
-       -1, 1, 121
+       3,
+       -1, 1, 42,
+       9, 0, 1283,
+       13, 0, 27
 };
 static int parser_action_row1167[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 34
 };
 static int parser_action_row1168[] = {
-       1,
-       -1, 1, 832
+       4,
+       -1, 1, 42,
+       9, 0, 1284,
+       13, 0, 27,
+       44, 0, 1011
 };
 static int parser_action_row1169[] = {
-       2,
-       -1, 1, 130,
-       58, 0, 1166
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1170[] = {
-       18,
-       -1, 3, 1169,
-       49, 0, 1282,
-       56, 0, 490,
-       67, 0, 491,
-       68, 0, 492,
-       69, 0, 493,
-       70, 0, 494,
-       71, 0, 495,
-       72, 0, 496,
-       73, 0, 497,
-       74, 0, 498,
-       75, 0, 499,
-       76, 0, 500,
-       77, 0, 501,
-       78, 0, 502,
-       79, 0, 503,
-       80, 0, 504,
-       84, 0, 505
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1171[] = {
-       3,
-       -1, 1, 151,
-       31, 0, 35,
-       96, 0, 57
+       1,
+       -1, 1, 27
 };
 static int parser_action_row1172[] = {
-       1,
-       -1, 1, 393
+       4,
+       -1, 1, 42,
+       9, 0, 1288,
+       13, 0, 27,
+       44, 0, 1011
 };
 static int parser_action_row1173[] = {
-       1,
-       -1, 1, 387
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1174[] = {
-       1,
-       -1, 1, 53
+       3,
+       -1, 1, 42,
+       9, 0, 1290,
+       13, 0, 27
 };
 static int parser_action_row1175[] = {
        2,
-       -1, 1, 162,
-       59, 0, 290
+       -1, 3, 1174,
+       48, 0, 1291
 };
 static int parser_action_row1176[] = {
+       2,
+       -1, 3, 1175,
+       55, 0, 1292
+};
+static int parser_action_row1177[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1177[] = {
-       1,
-       -1, 1, 828
-};
 static int parser_action_row1178[] = {
        2,
        -1, 3, 1177,
-       57, 0, 1288
+       48, 0, 1294
 };
 static int parser_action_row1179[] = {
-       4,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2,
-       58, 0, 1175
+       2,
+       -1, 3, 1178,
+       55, 0, 1295
 };
 static int parser_action_row1180[] = {
-       1,
-       -1, 1, 28
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1181[] = {
-       4,
-       -1, 1, 42,
-       9, 0, 1291,
-       13, 0, 28,
-       44, 0, 1052
-};
-static int parser_action_row1182[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row1182[] = {
+       33,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 649,
+       12, 0, 650,
+       15, 0, 651,
+       18, 0, 652,
+       25, 0, 653,
+       27, 0, 654,
+       28, 0, 655,
+       29, 0, 656,
+       30, 0, 657,
+       36, 0, 658,
+       37, 0, 659,
+       38, 0, 660,
+       39, 0, 661,
+       40, 0, 662,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 663,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
+};
 static int parser_action_row1183[] = {
-       3,
-       -1, 1, 42,
-       9, 0, 1293,
-       13, 0, 28
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 749,
+       12, 0, 650,
+       15, 0, 651,
+       18, 0, 652,
+       25, 0, 653,
+       28, 0, 655,
+       29, 0, 656,
+       30, 0, 657,
+       36, 0, 658,
+       37, 0, 659,
+       38, 0, 660,
+       39, 0, 661,
+       40, 0, 662,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 663,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1184[] = {
        3,
-       -1, 3, 1183,
-       50, 0, 347,
-       83, 0, 348
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1185[] = {
-       8,
-       -1, 3, 1184,
-       10, 0, 1295,
-       11, 0, 1296,
-       12, 0, 1297,
-       16, 0, 1298,
-       17, 0, 1299,
-       18, 0, 1300,
-       41, 0, 1301
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1186[] = {
-       4,
-       -1, 1, 94,
-       22, 0, 199,
-       23, 0, 200,
-       24, 0, 201
+       1,
+       -1, 1, 683
 };
 static int parser_action_row1187[] = {
        2,
-       -1, 1, 42,
-       13, 0, 28
+       -1, 1, 168,
+       27, 1, 627
 };
 static int parser_action_row1188[] = {
-       4,
-       -1, 1, 94,
-       22, 0, 199,
-       23, 0, 200,
-       24, 0, 201
+       2,
+       -1, 1, 167,
+       27, 1, 626
 };
 static int parser_action_row1189[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 656
 };
 static int parser_action_row1190[] = {
-       3,
-       -1, 3, 1189,
-       0, 0, 83,
-       1, 0, 84
+       2,
+       -1, 1, 196,
+       27, 1, 648
 };
 static int parser_action_row1191[] = {
-       1,
-       -1, 1, 811
+       4,
+       -1, 1, 280,
+       61, 0, 1303,
+       62, 0, 365,
+       63, 0, 366
 };
 static int parser_action_row1192[] = {
-       3,
-       -1, 3, 1191,
-       0, 0, 83,
-       1, 0, 84
+       4,
+       -1, 1, 282,
+       61, 0, 1305,
+       62, 0, 365,
+       63, 0, 366
 };
 static int parser_action_row1193[] = {
-       1,
-       -1, 1, 30
+       2,
+       -1, 1, 193,
+       27, 1, 645
 };
 static int parser_action_row1194[] = {
-       3,
-       -1, 1, 42,
-       9, 0, 1308,
-       13, 0, 28
+       23,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 379,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row1195[] = {
-       1,
-       -1, 1, 34
+       23,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 379,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row1196[] = {
-       4,
-       -1, 1, 42,
-       9, 0, 1309,
-       13, 0, 28,
-       44, 0, 1052
+       3,
+       -1, 1, 365,
+       12, 0, 1309,
+       84, 0, 383
 };
 static int parser_action_row1197[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1198[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 239
 };
 static int parser_action_row1199[] = {
-       1,
-       -1, 1, 27
+       2,
+       -1, 3, 1198,
+       52, 0, 171
 };
 static int parser_action_row1200[] = {
-       4,
-       -1, 1, 42,
-       9, 0, 1313,
-       13, 0, 28,
-       44, 0, 1052
-};
-static int parser_action_row1201[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row1201[] = {
+       1,
+       -1, 1, 463
+};
 static int parser_action_row1202[] = {
-       3,
-       -1, 1, 42,
-       9, 0, 1315,
-       13, 0, 28
+       2,
+       -1, 3, 1201,
+       59, 0, 1313
 };
 static int parser_action_row1203[] = {
-       2,
-       -1, 3, 1202,
-       48, 0, 1316
+       5,
+       -1, 1, 367,
+       12, 0, 579,
+       49, 0, 499,
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row1204[] = {
        2,
-       -1, 3, 1203,
-       55, 0, 1317
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row1205[] = {
-       1,
-       -1, 1, 766
+       35,
+       -1, 1, 367,
+       12, 0, 152,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 153,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       34, 0, 154,
+       36, 0, 910,
+       37, 0, 911,
+       38, 0, 912,
+       39, 0, 913,
+       40, 0, 39,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       50, 0, 338,
+       51, 0, 157,
+       53, 0, 914,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       82, 0, 180,
+       83, 0, 915,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1206[] = {
        1,
-       -1, 1, 761
+       -1, 1, 821
 };
 static int parser_action_row1207[] = {
-       2,
-       -1, 3, 1206,
-       59, 0, 1318
+       1,
+       -1, 1, 160
 };
 static int parser_action_row1208[] = {
        2,
        -1, 3, 1207,
-       55, 0, 1319
+       26, 0, 1317
 };
 static int parser_action_row1209[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 562,
+       82, 0, 463
 };
 static int parser_action_row1210[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 569
 };
 static int parser_action_row1211[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1212[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 434
 };
 static int parser_action_row1213[] = {
-       5,
-       -1, 1, 362,
-       12, 0, 561,
-       49, 0, 562,
-       83, 0, 49,
-       84, 0, 50
+       2,
+       -1, 3, 1212,
+       66, 0, 1210
 };
 static int parser_action_row1214[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       5,
+       -1, 1, 367,
+       12, 0, 1238,
+       49, 0, 1239,
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row1215[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 3, 1214,
+       55, 0, 1321
 };
 static int parser_action_row1216[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 290
 };
 static int parser_action_row1217[] = {
-       2,
-       -1, 3, 1216,
-       48, 0, 1329
+       1,
+       -1, 1, 289
 };
 static int parser_action_row1218[] = {
-       2,
-       -1, 3, 1217,
-       55, 0, 1330
+       1,
+       -1, 1, 407
 };
 static int parser_action_row1219[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       20,
+       -1, 1, 367,
+       12, 0, 802,
+       34, 0, 804,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1220[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 406
 };
 static int parser_action_row1221[] = {
-       33,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 667,
-       12, 0, 668,
-       15, 0, 669,
-       18, 0, 670,
-       25, 0, 671,
-       27, 0, 672,
-       28, 0, 673,
-       29, 0, 674,
-       30, 0, 675,
-       36, 0, 676,
-       37, 0, 677,
-       38, 0, 678,
-       39, 0, 679,
-       40, 0, 680,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 681,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 409
 };
 static int parser_action_row1222[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 785,
-       12, 0, 668,
-       15, 0, 669,
-       18, 0, 670,
-       25, 0, 671,
-       28, 0, 673,
-       29, 0, 674,
-       30, 0, 675,
-       36, 0, 676,
-       37, 0, 677,
-       38, 0, 678,
-       39, 0, 679,
-       40, 0, 680,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 681,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 417,
+       67, 0, 964,
+       68, 0, 965
 };
 static int parser_action_row1223[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 1, 420,
+       67, 0, 964,
+       68, 0, 965
 };
 static int parser_action_row1224[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 1223,
+       83, 0, 1323
 };
 static int parser_action_row1225[] = {
-       1,
-       -1, 1, 683
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row1226[] = {
-       2,
-       -1, 1, 164,
-       27, 1, 622
+       1,
+       -1, 1, 422
 };
 static int parser_action_row1227[] = {
-       2,
-       -1, 1, 163,
-       27, 1, 621
+       4,
+       -1, 1, 424,
+       69, 0, 973,
+       70, 0, 974,
+       71, 0, 975
 };
 static int parser_action_row1228[] = {
-       1,
-       -1, 1, 655
+       4,
+       -1, 1, 425,
+       69, 0, 973,
+       70, 0, 974,
+       71, 0, 975
 };
 static int parser_action_row1229[] = {
-       2,
-       -1, 1, 196,
-       27, 1, 647
+       3,
+       -1, 1, 413,
+       67, 0, 964,
+       68, 0, 965
 };
 static int parser_action_row1230[] = {
-       4,
-       -1, 1, 280,
-       61, 0, 1338,
-       62, 0, 372,
-       63, 0, 373
+       3,
+       -1, 1, 414,
+       67, 0, 964,
+       68, 0, 965
 };
 static int parser_action_row1231[] = {
-       4,
-       -1, 1, 282,
-       61, 0, 1340,
-       62, 0, 372,
-       63, 0, 373
+       3,
+       -1, 1, 415,
+       67, 0, 964,
+       68, 0, 965
 };
 static int parser_action_row1232[] = {
-       2,
-       -1, 1, 193,
-       27, 1, 644
+       3,
+       -1, 1, 416,
+       67, 0, 964,
+       68, 0, 965
 };
 static int parser_action_row1233[] = {
-       23,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 386,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       3,
+       -1, 1, 418,
+       67, 0, 964,
+       68, 0, 965
 };
 static int parser_action_row1234[] = {
-       23,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 386,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       3,
+       -1, 1, 419,
+       67, 0, 964,
+       68, 0, 965
 };
 static int parser_action_row1235[] = {
        3,
-       -1, 1, 360,
-       12, 0, 1344,
-       84, 0, 390
+       -1, 1, 421,
+       67, 0, 964,
+       68, 0, 965
 };
 static int parser_action_row1236[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 427
 };
 static int parser_action_row1237[] = {
        1,
-       -1, 1, 239
+       -1, 1, 428
 };
 static int parser_action_row1238[] = {
-       2,
-       -1, 3, 1237,
-       52, 0, 172
+       1,
+       -1, 1, 429
 };
 static int parser_action_row1239[] = {
+       2,
+       -1, 1, 349,
+       54, 0, 238
+};
+static int parser_action_row1240[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1240[] = {
-       1,
-       -1, 1, 456
-};
 static int parser_action_row1241[] = {
-       1,
-       -1, 1, 753
+       2,
+       -1, 3, 1240,
+       85, 0, 1327
 };
 static int parser_action_row1242[] = {
-       1,
-       -1, 1, 156
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row1243[] = {
-       2,
+       4,
        -1, 3, 1242,
-       26, 0, 1348
+       16, 0, 594,
+       17, 0, 595,
+       84, 0, 596
 };
 static int parser_action_row1244[] = {
-       2,
-       -1, 1, 558,
-       82, 0, 474
+       1,
+       -1, 1, 132
 };
 static int parser_action_row1245[] = {
        1,
-       -1, 1, 565
+       -1, 1, 120
 };
 static int parser_action_row1246[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 127
 };
 static int parser_action_row1247[] = {
-       1,
-       -1, 1, 428
+       20,
+       -1, 3, 1246,
+       44, 0, 991,
+       50, 0, 338,
+       56, 0, 479,
+       67, 0, 480,
+       68, 0, 481,
+       69, 0, 482,
+       70, 0, 483,
+       71, 0, 484,
+       72, 0, 485,
+       73, 0, 486,
+       74, 0, 487,
+       75, 0, 488,
+       76, 0, 489,
+       77, 0, 490,
+       78, 0, 491,
+       79, 0, 492,
+       80, 0, 493,
+       83, 0, 339,
+       84, 0, 494
 };
 static int parser_action_row1248[] = {
-       2,
-       -1, 3, 1247,
-       66, 0, 1245
+       1,
+       -1, 1, 807
 };
 static int parser_action_row1249[] = {
-       5,
-       -1, 1, 362,
-       12, 0, 1273,
-       49, 0, 1274,
-       83, 0, 49,
-       84, 0, 50
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1250[] = {
-       2,
-       -1, 3, 1249,
-       55, 0, 1352
+       1,
+       -1, 1, 141
 };
 static int parser_action_row1251[] = {
        1,
-       -1, 1, 290
+       -1, 1, 154
 };
 static int parser_action_row1252[] = {
        1,
-       -1, 1, 289
+       -1, 1, 395
 };
 static int parser_action_row1253[] = {
        1,
-       -1, 1, 401
+       -1, 1, 54
 };
 static int parser_action_row1254[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 847,
-       34, 0, 849,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       2,
+       -1, 3, 1253,
+       83, 0, 1004
 };
 static int parser_action_row1255[] = {
        1,
-       -1, 1, 400
+       -1, 1, 49
 };
 static int parser_action_row1256[] = {
        1,
-       -1, 1, 403
+       -1, 1, 803
 };
 static int parser_action_row1257[] = {
-       3,
-       -1, 1, 411,
-       67, 0, 1011,
-       68, 0, 1012
+       2,
+       -1, 3, 1256,
+       57, 0, 1333
 };
 static int parser_action_row1258[] = {
-       3,
-       -1, 1, 414,
-       67, 0, 1011,
-       68, 0, 1012
+       1,
+       -1, 1, 32
 };
 static int parser_action_row1259[] = {
-       2,
-       -1, 3, 1258,
-       83, 0, 1354
+       3,
+       -1, 1, 42,
+       9, 0, 1334,
+       13, 0, 27
 };
 static int parser_action_row1260[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       1,
+       -1, 1, 36
 };
 static int parser_action_row1261[] = {
-       1,
-       -1, 1, 416
+       2,
+       -1, 1, 92,
+       14, 0, 712
 };
 static int parser_action_row1262[] = {
-       4,
-       -1, 1, 418,
-       69, 0, 1020,
-       70, 0, 1021,
-       71, 0, 1022
+       17,
+       -1, 3, 1261,
+       56, 0, 479,
+       67, 0, 480,
+       68, 0, 481,
+       69, 0, 482,
+       70, 0, 483,
+       71, 0, 484,
+       72, 0, 485,
+       73, 0, 486,
+       74, 0, 487,
+       75, 0, 488,
+       76, 0, 489,
+       77, 0, 490,
+       78, 0, 491,
+       79, 0, 492,
+       80, 0, 493,
+       84, 0, 494
 };
 static int parser_action_row1263[] = {
-       4,
-       -1, 1, 419,
-       69, 0, 1020,
-       70, 0, 1021,
-       71, 0, 1022
+       2,
+       -1, 3, 1262,
+       83, 0, 1337
 };
 static int parser_action_row1264[] = {
-       3,
-       -1, 1, 407,
-       67, 0, 1011,
-       68, 0, 1012
+       21,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       54, 0, 615,
+       56, 0, 479,
+       59, 0, 616,
+       67, 0, 480,
+       68, 0, 481,
+       69, 0, 482,
+       70, 0, 483,
+       71, 0, 484,
+       72, 0, 485,
+       73, 0, 486,
+       74, 0, 487,
+       75, 0, 488,
+       76, 0, 489,
+       77, 0, 490,
+       78, 0, 491,
+       79, 0, 492,
+       80, 0, 493,
+       84, 0, 494
 };
 static int parser_action_row1265[] = {
-       3,
-       -1, 1, 408,
-       67, 0, 1011,
-       68, 0, 1012
+       1,
+       -1, 1, 95
 };
 static int parser_action_row1266[] = {
-       3,
-       -1, 1, 409,
-       67, 0, 1011,
-       68, 0, 1012
+       1,
+       -1, 1, 96
 };
 static int parser_action_row1267[] = {
        3,
-       -1, 1, 410,
-       67, 0, 1011,
-       68, 0, 1012
+       -1, 3, 1266,
+       84, 0, 1340,
+       85, 0, 1341
 };
 static int parser_action_row1268[] = {
-       3,
-       -1, 1, 412,
-       67, 0, 1011,
-       68, 0, 1012
+       21,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       54, 0, 615,
+       56, 0, 479,
+       59, 0, 616,
+       67, 0, 480,
+       68, 0, 481,
+       69, 0, 482,
+       70, 0, 483,
+       71, 0, 484,
+       72, 0, 485,
+       73, 0, 486,
+       74, 0, 487,
+       75, 0, 488,
+       76, 0, 489,
+       77, 0, 490,
+       78, 0, 491,
+       79, 0, 492,
+       80, 0, 493,
+       84, 0, 494
 };
 static int parser_action_row1269[] = {
        3,
-       -1, 1, 413,
-       67, 0, 1011,
-       68, 0, 1012
+       -1, 3, 1268,
+       17, 0, 1265,
+       18, 0, 1344
 };
 static int parser_action_row1270[] = {
-       3,
-       -1, 1, 415,
-       67, 0, 1011,
-       68, 0, 1012
+       5,
+       -1, 1, 97,
+       21, 0, 196,
+       22, 0, 197,
+       23, 0, 198,
+       24, 0, 199
 };
 static int parser_action_row1271[] = {
-       1,
-       -1, 1, 421
+       2,
+       -1, 3, 1270,
+       18, 0, 1346
 };
 static int parser_action_row1272[] = {
        1,
-       -1, 1, 422
+       -1, 1, 749
 };
 static int parser_action_row1273[] = {
        1,
-       -1, 1, 423
+       -1, 1, 754
 };
 static int parser_action_row1274[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       1,
+       -1, 1, 751
 };
 static int parser_action_row1275[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 3, 1274,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row1276[] = {
-       2,
-       -1, 3, 1275,
-       85, 0, 1358
+       35,
+       -1, 1, 367,
+       12, 0, 152,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 153,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       34, 0, 154,
+       36, 0, 910,
+       37, 0, 911,
+       38, 0, 912,
+       39, 0, 913,
+       40, 0, 39,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       50, 0, 338,
+       51, 0, 157,
+       53, 0, 914,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       82, 0, 180,
+       83, 0, 915,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1277[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       1,
+       -1, 1, 332
 };
 static int parser_action_row1278[] = {
-       1,
-       -1, 1, 128
+       4,
+       -1, 1, 537,
+       61, 0, 1349,
+       62, 0, 365,
+       63, 0, 366
 };
 static int parser_action_row1279[] = {
-       1,
-       -1, 1, 116
+       4,
+       -1, 1, 539,
+       61, 0, 1351,
+       62, 0, 365,
+       63, 0, 366
 };
 static int parser_action_row1280[] = {
-       1,
-       -1, 1, 123
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1281[] = {
-       20,
-       -1, 3, 1280,
-       44, 0, 1032,
-       50, 0, 347,
-       56, 0, 490,
-       67, 0, 491,
-       68, 0, 492,
-       69, 0, 493,
-       70, 0, 494,
-       71, 0, 495,
-       72, 0, 496,
-       73, 0, 497,
-       74, 0, 498,
-       75, 0, 499,
-       76, 0, 500,
-       77, 0, 501,
-       78, 0, 502,
-       79, 0, 503,
-       80, 0, 504,
-       83, 0, 348,
-       84, 0, 505
+       4,
+       -1, 1, 543,
+       61, 0, 1354,
+       62, 0, 365,
+       63, 0, 366
 };
 static int parser_action_row1282[] = {
        1,
-       -1, 1, 833
+       -1, 1, 335
 };
 static int parser_action_row1283[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 565,
+       58, 0, 1070
 };
 static int parser_action_row1284[] = {
        1,
-       -1, 1, 137
+       -1, 1, 38
 };
 static int parser_action_row1285[] = {
        1,
-       -1, 1, 150
+       -1, 1, 29
 };
 static int parser_action_row1286[] = {
-       1,
-       -1, 1, 390
+       4,
+       -1, 1, 42,
+       9, 0, 1356,
+       13, 0, 27,
+       44, 0, 1011
 };
 static int parser_action_row1287[] = {
-       1,
-       -1, 1, 54
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1288[] = {
-       2,
-       -1, 3, 1287,
-       83, 0, 1044
+       3,
+       -1, 1, 42,
+       9, 0, 1358,
+       13, 0, 27
 };
 static int parser_action_row1289[] = {
        1,
-       -1, 1, 49
+       -1, 1, 31
 };
 static int parser_action_row1290[] = {
-       1,
-       -1, 1, 829
+       3,
+       -1, 1, 42,
+       9, 0, 1359,
+       13, 0, 27
 };
 static int parser_action_row1291[] = {
-       2,
-       -1, 3, 1290,
-       57, 0, 1363
+       1,
+       -1, 1, 35
 };
 static int parser_action_row1292[] = {
-       1,
-       -1, 1, 32
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1293[] = {
-       3,
-       -1, 1, 42,
-       9, 0, 1364,
-       13, 0, 28
+       1,
+       -1, 1, 303
 };
 static int parser_action_row1294[] = {
-       1,
-       -1, 1, 36
+       20,
+       -1, 1, 367,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row1295[] = {
-       2,
-       -1, 1, 89,
-       14, 0, 395
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1296[] = {
-       17,
-       -1, 3, 1295,
-       56, 0, 490,
-       67, 0, 491,
-       68, 0, 492,
-       69, 0, 493,
-       70, 0, 494,
-       71, 0, 495,
-       72, 0, 496,
-       73, 0, 497,
-       74, 0, 498,
-       75, 0, 499,
-       76, 0, 500,
-       77, 0, 501,
-       78, 0, 502,
-       79, 0, 503,
-       80, 0, 504,
-       84, 0, 505
+       1,
+       -1, 1, 555
 };
 static int parser_action_row1297[] = {
-       2,
-       -1, 3, 1296,
-       83, 0, 1367
+       1,
+       -1, 1, 659
 };
 static int parser_action_row1298[] = {
-       21,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2,
-       54, 0, 625,
-       56, 0, 490,
-       59, 0, 626,
-       67, 0, 491,
-       68, 0, 492,
-       69, 0, 493,
-       70, 0, 494,
-       71, 0, 495,
-       72, 0, 496,
-       73, 0, 497,
-       74, 0, 498,
-       75, 0, 499,
-       76, 0, 500,
-       77, 0, 501,
-       78, 0, 502,
-       79, 0, 503,
-       80, 0, 504,
-       84, 0, 505
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1299[] = {
-       1,
-       -1, 1, 92
+       2,
+       -1, 3, 1298,
+       27, 0, 1364
 };
 static int parser_action_row1300[] = {
        1,
-       -1, 1, 93
+       -1, 1, 677
 };
 static int parser_action_row1301[] = {
-       3,
+       2,
        -1, 3, 1300,
-       84, 0, 1370,
-       85, 0, 1371
+       52, 0, 171
 };
 static int parser_action_row1302[] = {
-       21,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2,
-       54, 0, 625,
-       56, 0, 490,
-       59, 0, 626,
-       67, 0, 491,
-       68, 0, 492,
-       69, 0, 493,
-       70, 0, 494,
-       71, 0, 495,
-       72, 0, 496,
-       73, 0, 497,
-       74, 0, 498,
-       75, 0, 499,
-       76, 0, 500,
-       77, 0, 501,
-       78, 0, 502,
-       79, 0, 503,
-       80, 0, 504,
-       84, 0, 505
+       3,
+       -1, 3, 1301,
+       55, 0, 1366,
+       58, 0, 556
 };
 static int parser_action_row1303[] = {
-       3,
-       -1, 3, 1302,
-       17, 0, 1299,
-       18, 0, 1374
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1304[] = {
-       4,
-       -1, 1, 94,
-       22, 0, 199,
-       23, 0, 200,
-       24, 0, 201
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1305[] = {
-       2,
-       -1, 3, 1304,
-       18, 0, 1376
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1306[] = {
-       35,
-       -1, 1, 362,
-       12, 0, 153,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 154,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       34, 0, 155,
-       36, 0, 718,
-       37, 0, 719,
-       38, 0, 720,
-       39, 0, 721,
-       40, 0, 40,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       50, 0, 347,
-       51, 0, 158,
-       53, 0, 722,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       82, 0, 183,
-       83, 0, 723,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1307[] = {
-       1,
-       -1, 1, 812
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1308[] = {
-       1,
-       -1, 1, 815
+       2,
+       -1, 1, 198,
+       27, 1, 650
 };
 static int parser_action_row1309[] = {
-       1,
-       -1, 1, 38
+       2,
+       -1, 1, 200,
+       27, 1, 652
 };
 static int parser_action_row1310[] = {
-       1,
-       -1, 1, 29
+       23,
+       -1, 1, 353,
+       12, 0, 106,
+       25, 0, 107,
+       34, 0, 108,
+       41, 0, 109,
+       43, 0, 110,
+       44, 1, 367,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       51, 0, 115,
+       54, 0, 379,
+       68, 0, 117,
+       83, 0, 48,
+       84, 0, 49,
+       85, 1, 367,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row1311[] = {
-       4,
-       -1, 1, 42,
-       9, 0, 1378,
-       13, 0, 28,
-       44, 0, 1052
-};
-static int parser_action_row1312[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row1312[] = {
+       1,
+       -1, 1, 237
+};
 static int parser_action_row1313[] = {
-       3,
-       -1, 1, 42,
-       9, 0, 1380,
-       13, 0, 28
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1314[] = {
-       1,
-       -1, 1, 31
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1315[] = {
-       3,
-       -1, 1, 42,
-       9, 0, 1381,
-       13, 0, 28
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row1316[] = {
        1,
-       -1, 1, 35
+       -1, 1, 321
 };
 static int parser_action_row1317[] = {
+       1,
+       -1, 1, 339
+};
+static int parser_action_row1318[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1318[] = {
-       1,
-       -1, 1, 303
-};
 static int parser_action_row1319[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 570
 };
 static int parser_action_row1320[] = {
-       4,
+       3,
        -1, 3, 1319,
-       0, 0, 83,
-       1, 0, 84,
-       82, 0, 183
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row1321[] = {
-       1,
-       -1, 1, 489
+       2,
+       -1, 3, 1320,
+       85, 0, 1378
 };
 static int parser_action_row1322[] = {
-       1,
-       -1, 1, 494
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row1323[] = {
        1,
-       -1, 1, 491
+       -1, 1, 408
 };
 static int parser_action_row1324[] = {
-       1,
-       -1, 1, 496
+       2,
+       -1, 1, 319,
+       82, 0, 180
 };
 static int parser_action_row1325[] = {
-       2,
-       -1, 3, 1324,
-       85, 0, 1386
+       1,
+       -1, 1, 400
 };
 static int parser_action_row1326[] = {
-       2,
-       -1, 1, 344,
-       54, 0, 242
+       1,
+       -1, 1, 442
 };
 static int parser_action_row1327[] = {
-       1,
-       -1, 1, 492
+       3,
+       -1, 3, 1326,
+       34, 0, 1381,
+       54, 0, 1382
 };
 static int parser_action_row1328[] = {
        1,
-       -1, 1, 497
+       -1, 1, 437
 };
 static int parser_action_row1329[] = {
-       20,
-       -1, 1, 362,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       1,
+       -1, 1, 439
 };
 static int parser_action_row1330[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       36,
+       -1, 1, 367,
+       0, 0, 82,
+       1, 0, 83,
+       12, 0, 106,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 107,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       34, 0, 108,
+       36, 0, 1141,
+       37, 0, 1142,
+       38, 0, 1143,
+       39, 0, 1144,
+       40, 0, 39,
+       41, 0, 109,
+       43, 0, 110,
+       45, 0, 111,
+       46, 0, 112,
+       47, 0, 113,
+       48, 0, 114,
+       50, 0, 338,
+       51, 0, 115,
+       53, 0, 1145,
+       54, 0, 1383,
+       68, 0, 117,
+       82, 0, 180,
+       83, 0, 915,
+       84, 0, 49,
+       86, 0, 118,
+       87, 0, 119,
+       88, 0, 120,
+       89, 0, 121,
+       90, 0, 54,
+       93, 0, 122
 };
 static int parser_action_row1331[] = {
        1,
-       -1, 1, 552
+       -1, 1, 136
 };
 static int parser_action_row1332[] = {
-       1,
-       -1, 1, 659
+       5,
+       -1, 3, 1331,
+       34, 0, 1387,
+       50, 0, 1388,
+       54, 0, 1389,
+       83, 0, 339
 };
 static int parser_action_row1333[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 52
 };
 static int parser_action_row1334[] = {
-       2,
-       -1, 3, 1333,
-       27, 0, 1391
+       1,
+       -1, 1, 50
 };
 static int parser_action_row1335[] = {
        1,
-       -1, 1, 677
+       -1, 1, 40
 };
 static int parser_action_row1336[] = {
-       2,
-       -1, 3, 1335,
-       52, 0, 172
+       1,
+       -1, 1, 55
 };
 static int parser_action_row1337[] = {
-       3,
-       -1, 3, 1336,
-       55, 0, 1393,
-       58, 0, 574
+       5,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       54, 0, 615,
+       59, 0, 616
 };
 static int parser_action_row1338[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 3, 1337,
+       59, 0, 616
 };
 static int parser_action_row1339[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       5,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       54, 0, 615,
+       59, 0, 616
 };
 static int parser_action_row1340[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 3, 1339,
+       14, 0, 1394,
+       15, 0, 1395
 };
 static int parser_action_row1341[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 166,
+       59, 0, 287
 };
 static int parser_action_row1342[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 166,
+       59, 0, 287
 };
 static int parser_action_row1343[] = {
-       2,
-       -1, 1, 198,
-       27, 1, 649
+       5,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       54, 0, 615,
+       59, 0, 616
 };
 static int parser_action_row1344[] = {
-       2,
-       -1, 1, 200,
-       27, 1, 651
+       3,
+       -1, 1, 135,
+       4, 0, 720,
+       14, 0, 1400
 };
 static int parser_action_row1345[] = {
-       23,
-       -1, 1, 348,
-       12, 0, 108,
-       25, 0, 109,
-       34, 0, 110,
-       41, 0, 111,
-       43, 0, 112,
-       44, 1, 362,
-       45, 0, 113,
-       46, 0, 114,
-       47, 0, 115,
-       48, 0, 116,
-       51, 0, 117,
-       54, 0, 386,
-       68, 0, 119,
-       83, 0, 49,
-       84, 0, 50,
-       85, 1, 362,
-       86, 0, 120,
-       87, 0, 121,
-       88, 0, 122,
-       89, 0, 123,
-       90, 0, 55,
-       93, 0, 124
+       2,
+       -1, 3, 1344,
+       85, 0, 1403
 };
 static int parser_action_row1346[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 1345,
+       18, 0, 1404
 };
 static int parser_action_row1347[] = {
-       1,
-       -1, 1, 237
+       2,
+       -1, 3, 1346,
+       85, 0, 1405
 };
 static int parser_action_row1348[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 3, 1347,
+       59, 0, 1406
 };
 static int parser_action_row1349[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 1348,
+       55, 0, 1407
 };
 static int parser_action_row1350[] = {
-       1,
-       -1, 1, 566
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1351[] = {
-       3,
-       -1, 3, 1350,
-       83, 0, 49,
-       84, 0, 50
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1352[] = {
-       2,
-       -1, 3, 1351,
-       85, 0, 1404
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1353[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1354[] = {
-       1,
-       -1, 1, 402
+       5,
+       -1, 1, 367,
+       12, 0, 543,
+       49, 0, 544,
+       83, 0, 48,
+       84, 0, 49
 };
 static int parser_action_row1355[] = {
-       2,
-       -1, 1, 318,
-       82, 0, 183
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1356[] = {
-       1,
-       -1, 1, 394
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1357[] = {
        1,
-       -1, 1, 436
+       -1, 1, 33
 };
 static int parser_action_row1358[] = {
        3,
-       -1, 3, 1357,
-       34, 0, 1407,
-       54, 0, 1408
+       -1, 1, 42,
+       9, 0, 1416,
+       13, 0, 27
 };
 static int parser_action_row1359[] = {
        1,
-       -1, 1, 431
+       -1, 1, 37
 };
 static int parser_action_row1360[] = {
        1,
-       -1, 1, 433
+       -1, 1, 39
 };
 static int parser_action_row1361[] = {
-       1,
-       -1, 1, 132
+       2,
+       -1, 3, 1360,
+       55, 0, 1417
 };
 static int parser_action_row1362[] = {
-       5,
-       -1, 3, 1361,
-       34, 0, 1409,
-       50, 0, 1410,
-       54, 0, 1411,
-       83, 0, 348
+       1,
+       -1, 1, 503
 };
 static int parser_action_row1363[] = {
-       1,
-       -1, 1, 52
+       2,
+       -1, 3, 1362,
+       55, 0, 1418
 };
 static int parser_action_row1364[] = {
        1,
-       -1, 1, 50
+       -1, 1, 660
 };
 static int parser_action_row1365[] = {
-       1,
-       -1, 1, 40
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 1041,
+       12, 0, 650,
+       15, 0, 651,
+       18, 0, 652,
+       25, 0, 653,
+       28, 0, 655,
+       29, 0, 656,
+       30, 0, 657,
+       36, 0, 658,
+       37, 0, 659,
+       38, 0, 660,
+       39, 0, 661,
+       40, 0, 662,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 663,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1366[] = {
-       1,
-       -1, 1, 55
+       2,
+       -1, 1, 234,
+       27, 1, 676
 };
 static int parser_action_row1367[] = {
-       5,
-       -1, 1, 380,
+       3,
+       -1, 1, 385,
        0, 0, 1,
-       1, 0, 2,
-       54, 0, 625,
-       59, 0, 626
+       1, 0, 2
 };
 static int parser_action_row1368[] = {
-       2,
-       -1, 3, 1367,
-       59, 0, 626
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1369[] = {
-       5,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2,
-       54, 0, 625,
-       59, 0, 626
+       1,
+       -1, 1, 661
 };
 static int parser_action_row1370[] = {
-       3,
-       -1, 3, 1369,
-       14, 0, 1416,
-       15, 0, 1417
+       1,
+       -1, 1, 666
 };
 static int parser_action_row1371[] = {
-       2,
-       -1, 1, 162,
-       59, 0, 290
+       1,
+       -1, 1, 663
 };
 static int parser_action_row1372[] = {
-       2,
-       -1, 1, 162,
-       59, 0, 290
+       1,
+       -1, 1, 668
 };
 static int parser_action_row1373[] = {
-       5,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2,
-       54, 0, 625,
-       59, 0, 626
+       2,
+       -1, 1, 199,
+       27, 1, 651
 };
 static int parser_action_row1374[] = {
-       3,
-       -1, 1, 145,
-       14, 0, 1422,
-       89, 0, 1038
+       2,
+       -1, 3, 1373,
+       15, 0, 1422
 };
 static int parser_action_row1375[] = {
-       2,
-       -1, 3, 1374,
-       85, 0, 1424
+       1,
+       -1, 1, 247
 };
 static int parser_action_row1376[] = {
-       2,
-       -1, 3, 1375,
-       18, 0, 1425
+       1,
+       -1, 1, 745
 };
 static int parser_action_row1377[] = {
-       2,
-       -1, 3, 1376,
-       85, 0, 1426
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1378[] = {
        2,
-       -1, 3, 1377,
-       55, 0, 1427
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row1379[] = {
-       1,
-       -1, 1, 33
+       3,
+       -1, 1, 435,
+       64, 1, 437,
+       66, 1, 437
 };
 static int parser_action_row1380[] = {
-       3,
-       -1, 1, 42,
-       9, 0, 1428,
-       13, 0, 28
+       1,
+       -1, 1, 455
 };
 static int parser_action_row1381[] = {
        1,
-       -1, 1, 37
+       -1, 1, 401
 };
 static int parser_action_row1382[] = {
-       1,
-       -1, 1, 39
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1383[] = {
-       2,
-       -1, 3, 1382,
-       55, 0, 1429
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1384[] = {
-       1,
-       -1, 1, 772
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1385[] = {
        3,
        -1, 3, 1384,
-       0, 0, 83,
-       1, 0, 84
+       0, 0, 82,
+       1, 0, 83
 };
 static int parser_action_row1386[] = {
        1,
-       -1, 1, 327
+       -1, 1, 326
 };
 static int parser_action_row1387[] = {
-       4,
-       -1, 1, 533,
-       61, 0, 1431,
-       62, 0, 372,
-       63, 0, 373
+       3,
+       -1, 3, 1386,
+       0, 0, 82,
+       1, 0, 83
 };
 static int parser_action_row1388[] = {
-       4,
-       -1, 1, 535,
-       61, 0, 1433,
-       62, 0, 372,
-       63, 0, 373
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1389[] = {
-       1,
-       -1, 1, 500
+       2,
+       -1, 1, 146,
+       83, 0, 469
 };
 static int parser_action_row1390[] = {
-       2,
-       -1, 3, 1389,
-       55, 0, 1435
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1391[] = {
        1,
-       -1, 1, 660
+       -1, 1, 144
 };
 static int parser_action_row1392[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 1096,
-       12, 0, 668,
-       15, 0, 669,
-       18, 0, 670,
-       25, 0, 671,
-       28, 0, 673,
-       29, 0, 674,
-       30, 0, 675,
-       36, 0, 676,
-       37, 0, 677,
-       38, 0, 678,
-       39, 0, 679,
-       40, 0, 680,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 681,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       4,
+       -1, 1, 135,
+       4, 0, 720,
+       14, 0, 1432,
+       15, 0, 1433
 };
 static int parser_action_row1393[] = {
        2,
-       -1, 1, 234,
-       27, 1, 676
+       -1, 1, 92,
+       14, 0, 712
 };
 static int parser_action_row1394[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 3, 1393,
+       14, 0, 1394,
+       15, 0, 1438
 };
 static int parser_action_row1395[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       4,
+       -1, 1, 42,
+       0, 0, 82,
+       1, 0, 83,
+       13, 0, 27
 };
 static int parser_action_row1396[] = {
-       1,
-       -1, 1, 661
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 458,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1397[] = {
-       1,
-       -1, 1, 666
+       2,
+       -1, 3, 1396,
+       15, 0, 1443
 };
 static int parser_action_row1398[] = {
-       1,
-       -1, 1, 663
+       6,
+       -1, 1, 42,
+       0, 1, 92,
+       1, 1, 92,
+       13, 0, 27,
+       14, 0, 712,
+       61, 0, 1444
 };
 static int parser_action_row1399[] = {
-       1,
-       -1, 1, 668
+       2,
+       -1, 1, 67,
+       61, 0, 1448
 };
 static int parser_action_row1400[] = {
-       2,
-       -1, 1, 199,
-       27, 1, 650
+       3,
+       -1, 1, 135,
+       4, 0, 720,
+       14, 0, 1449
 };
 static int parser_action_row1401[] = {
-       2,
-       -1, 3, 1400,
-       15, 0, 1439
+       6,
+       -1, 1, 42,
+       0, 0, 82,
+       1, 0, 83,
+       13, 0, 27,
+       19, 0, 1452,
+       20, 0, 1453
 };
 static int parser_action_row1402[] = {
-       1,
-       -1, 1, 247
+       2,
+       -1, 1, 135,
+       4, 0, 720
 };
 static int parser_action_row1403[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 3, 1402,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row1404[] = {
        2,
-       -1, 1, 344,
-       54, 0, 242
+       -1, 1, 166,
+       59, 0, 287
 };
 static int parser_action_row1405[] = {
        2,
-       -1, 1, 429,
-       66, 1, 431
+       -1, 3, 1404,
+       85, 0, 1457
 };
 static int parser_action_row1406[] = {
-       1,
-       -1, 1, 449
+       2,
+       -1, 1, 166,
+       59, 0, 287
 };
 static int parser_action_row1407[] = {
-       1,
-       -1, 1, 395
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1408[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       4,
+       -1, 3, 1407,
+       0, 0, 82,
+       1, 0, 83,
+       82, 0, 180
 };
 static int parser_action_row1409[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 492
 };
 static int parser_action_row1410[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 497
 };
 static int parser_action_row1411[] = {
-       2,
-       -1, 1, 142,
-       83, 0, 481
+       1,
+       -1, 1, 494
 };
 static int parser_action_row1412[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 499
 };
 static int parser_action_row1413[] = {
-       1,
-       -1, 1, 140
+       2,
+       -1, 3, 1412,
+       85, 0, 1462
 };
 static int parser_action_row1414[] = {
-       4,
-       -1, 1, 131,
-       4, 0, 751,
-       14, 0, 1446,
-       15, 0, 1447
+       2,
+       -1, 1, 349,
+       54, 0, 238
 };
 static int parser_action_row1415[] = {
-       2,
-       -1, 1, 89,
-       14, 0, 395
+       1,
+       -1, 1, 495
 };
 static int parser_action_row1416[] = {
-       3,
-       -1, 3, 1415,
-       14, 0, 1416,
-       15, 0, 1452
+       1,
+       -1, 1, 500
 };
 static int parser_action_row1417[] = {
-       7,
-       -1, 3, 1416,
-       0, 0, 83,
-       1, 0, 84,
-       4, 0, 340,
-       16, 0, 341,
-       17, 0, 342,
-       84, 0, 344
+       1,
+       -1, 1, 41
 };
 static int parser_action_row1418[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 469,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 304
 };
 static int parser_action_row1419[] = {
-       2,
-       -1, 3, 1418,
-       15, 0, 1457
+       1,
+       -1, 1, 556
 };
 static int parser_action_row1420[] = {
-       6,
-       -1, 1, 42,
-       0, 1, 89,
-       1, 1, 89,
-       13, 0, 28,
-       14, 0, 395,
-       61, 0, 1458
+       1,
+       -1, 1, 673
 };
 static int parser_action_row1421[] = {
        2,
-       -1, 1, 66,
-       61, 0, 1462
+       -1, 3, 1420,
+       31, 0, 1464
 };
 static int parser_action_row1422[] = {
-       3,
-       -1, 1, 145,
-       14, 0, 1463,
-       89, 0, 1038
+       2,
+       -1, 3, 1421,
+       15, 0, 1465
 };
 static int parser_action_row1423[] = {
-       3,
-       -1, 3, 1422,
-       19, 0, 1465,
-       20, 0, 1466
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 139,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1424[] = {
-       2,
-       -1, 1, 131,
-       4, 0, 751
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1425[] = {
-       2,
-       -1, 1, 162,
-       59, 0, 290
+       1,
+       -1, 1, 444
 };
 static int parser_action_row1426[] = {
        2,
        -1, 3, 1425,
-       85, 0, 1469
+       48, 0, 1469
 };
 static int parser_action_row1427[] = {
-       2,
-       -1, 1, 162,
-       59, 0, 290
+       4,
+       -1, 3, 1426,
+       34, 0, 1470,
+       50, 0, 338,
+       83, 0, 339
 };
 static int parser_action_row1428[] = {
-       4,
-       -1, 3, 1427,
-       0, 0, 83,
-       1, 0, 84,
-       82, 0, 183
+       35,
+       -1, 1, 367,
+       12, 0, 152,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 153,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       34, 0, 154,
+       36, 0, 910,
+       37, 0, 911,
+       38, 0, 912,
+       39, 0, 913,
+       40, 0, 39,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       50, 0, 338,
+       51, 0, 157,
+       53, 0, 914,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       82, 0, 180,
+       83, 0, 915,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1429[] = {
        1,
-       -1, 1, 41
+       -1, 1, 327
 };
 static int parser_action_row1430[] = {
        1,
-       -1, 1, 304
+       -1, 1, 330
 };
 static int parser_action_row1431[] = {
-       1,
-       -1, 1, 328
+       2,
+       -1, 3, 1430,
+       50, 0, 1473
 };
 static int parser_action_row1432[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       4,
+       -1, 3, 1431,
+       34, 0, 1474,
+       50, 0, 1475,
+       83, 0, 339
 };
 static int parser_action_row1433[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       7,
+       -1, 1, 42,
+       0, 0, 82,
+       1, 0, 83,
+       6, 0, 1477,
+       13, 0, 27,
+       19, 0, 1478,
+       20, 0, 1479
 };
 static int parser_action_row1434[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 458,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1435[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 135,
+       4, 0, 720,
+       15, 0, 1481
 };
 static int parser_action_row1436[] = {
-       1,
-       -1, 1, 553
+       3,
+       -1, 3, 1435,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row1437[] = {
        1,
-       -1, 1, 673
+       -1, 1, 59
 };
 static int parser_action_row1438[] = {
-       2,
-       -1, 3, 1437,
-       31, 0, 1477
+       1,
+       -1, 1, 83
 };
 static int parser_action_row1439[] = {
-       2,
-       -1, 3, 1438,
-       15, 0, 1478
-};
-static int parser_action_row1440[] = {
        32,
-       -1, 1, 362,
+       -1, 1, 367,
        0, 0, 1,
        1, 0, 2,
-       9, 0, 141,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       9, 0, 458,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
+};
+static int parser_action_row1440[] = {
+       2,
+       -1, 3, 1439,
+       15, 0, 1485
 };
 static int parser_action_row1441[] = {
+       1,
+       -1, 1, 93
+};
+static int parser_action_row1442[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
-static int parser_action_row1442[] = {
-       1,
-       -1, 1, 438
-};
 static int parser_action_row1443[] = {
        2,
-       -1, 3, 1442,
-       48, 0, 1482
+       -1, 1, 378,
+       9, 0, 1000
 };
 static int parser_action_row1444[] = {
-       4,
-       -1, 3, 1443,
-       34, 0, 1483,
-       50, 0, 347,
-       83, 0, 348
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 458,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1445[] = {
-       2,
-       -1, 3, 1444,
-       50, 0, 1485
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1446[] = {
-       4,
-       -1, 3, 1445,
-       34, 0, 1486,
-       50, 0, 1487,
-       83, 0, 348
+       5,
+       -1, 1, 97,
+       21, 0, 196,
+       22, 0, 197,
+       23, 0, 198,
+       24, 0, 199
 };
 static int parser_action_row1447[] = {
-       10,
-       -1, 3, 1446,
-       0, 0, 83,
-       1, 0, 84,
-       4, 0, 340,
-       6, 0, 1489,
-       16, 0, 341,
-       17, 0, 342,
-       19, 0, 1490,
-       20, 0, 1491,
-       84, 0, 344
+       1,
+       -1, 1, 75
 };
 static int parser_action_row1448[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 469,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 92,
+       14, 0, 712,
+       61, 0, 1491
 };
 static int parser_action_row1449[] = {
-       2,
-       -1, 3, 1448,
-       15, 0, 1493
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1450[] = {
-       3,
-       -1, 3, 1449,
-       31, 0, 35,
-       96, 0, 57
+       6,
+       -1, 1, 42,
+       0, 0, 82,
+       1, 0, 83,
+       13, 0, 27,
+       19, 0, 1494,
+       20, 0, 1495
 };
 static int parser_action_row1451[] = {
-       1,
-       -1, 1, 59
+       2,
+       -1, 1, 135,
+       4, 0, 720
 };
 static int parser_action_row1452[] = {
-       1,
-       -1, 1, 82
+       3,
+       -1, 3, 1451,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row1453[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 469,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 62
 };
 static int parser_action_row1454[] = {
        2,
-       -1, 3, 1453,
-       15, 0, 1496
+       -1, 1, 149,
+       89, 0, 997
 };
 static int parser_action_row1455[] = {
-       1,
-       -1, 1, 90
+       3,
+       -1, 3, 1454,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row1456[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 86
 };
 static int parser_action_row1457[] = {
        2,
-       -1, 1, 373,
-       9, 0, 1041
+       -1, 1, 68,
+       61, 0, 1500
 };
 static int parser_action_row1458[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 469,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 1, 166,
+       59, 0, 287
 };
 static int parser_action_row1459[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 69,
+       61, 0, 1502
 };
 static int parser_action_row1460[] = {
-       4,
-       -1, 1, 94,
-       22, 0, 199,
-       23, 0, 200,
-       24, 0, 201
+       1,
+       -1, 1, 760
 };
 static int parser_action_row1461[] = {
-       1,
-       -1, 1, 74
+       3,
+       -1, 3, 1460,
+       0, 0, 82,
+       1, 0, 83
 };
 static int parser_action_row1462[] = {
-       3,
-       -1, 1, 89,
-       14, 0, 395,
-       61, 0, 1502
+       1,
+       -1, 1, 333
 };
 static int parser_action_row1463[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       4,
+       -1, 1, 536,
+       61, 0, 1504,
+       62, 0, 365,
+       63, 0, 366
 };
 static int parser_action_row1464[] = {
-       3,
-       -1, 3, 1463,
-       19, 0, 1505,
-       20, 0, 1506
+       4,
+       -1, 1, 538,
+       61, 0, 1506,
+       62, 0, 365,
+       63, 0, 366
 };
 static int parser_action_row1465[] = {
-       2,
-       -1, 1, 131,
-       4, 0, 751
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1466[] = {
-       1,
-       -1, 1, 62
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 749,
+       12, 0, 650,
+       15, 0, 651,
+       18, 0, 652,
+       25, 0, 653,
+       28, 0, 655,
+       29, 0, 656,
+       30, 0, 657,
+       36, 0, 658,
+       37, 0, 659,
+       38, 0, 660,
+       39, 0, 661,
+       40, 0, 662,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 663,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1467[] = {
-       2,
-       -1, 1, 145,
-       89, 0, 1038
+       1,
+       -1, 1, 238
 };
 static int parser_action_row1468[] = {
-       3,
+       2,
        -1, 3, 1467,
-       31, 0, 35,
-       96, 0, 57
+       52, 0, 171
 };
 static int parser_action_row1469[] = {
        2,
-       -1, 1, 67,
-       61, 0, 1510
+       -1, 3, 1468,
+       27, 0, 1512
 };
 static int parser_action_row1470[] = {
-       2,
-       -1, 1, 162,
-       59, 0, 290
+       1,
+       -1, 1, 458
 };
 static int parser_action_row1471[] = {
-       2,
-       -1, 1, 68,
-       61, 0, 1512
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1472[] = {
        3,
-       -1, 3, 1471,
-       0, 0, 83,
-       1, 0, 84
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1473[] = {
-       1,
-       -1, 1, 813
+       2,
+       -1, 3, 1472,
+       55, 0, 1515
 };
 static int parser_action_row1474[] = {
        1,
-       -1, 1, 488
+       -1, 1, 148
 };
 static int parser_action_row1475[] = {
-       1,
-       -1, 1, 493
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1476[] = {
-       1,
-       -1, 1, 490
+       4,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2,
+       83, 0, 469
 };
 static int parser_action_row1477[] = {
-       1,
-       -1, 1, 495
-};
-static int parser_action_row1478[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
+static int parser_action_row1478[] = {
+       1,
+       -1, 1, 60
+};
 static int parser_action_row1479[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 785,
-       12, 0, 668,
-       15, 0, 669,
-       18, 0, 670,
-       25, 0, 671,
-       28, 0, 673,
-       29, 0, 674,
-       30, 0, 675,
-       36, 0, 676,
-       37, 0, 677,
-       38, 0, 678,
-       39, 0, 679,
-       40, 0, 680,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 681,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 61
 };
 static int parser_action_row1480[] = {
-       1,
-       -1, 1, 238
+       2,
+       -1, 1, 149,
+       89, 0, 997
 };
 static int parser_action_row1481[] = {
        2,
-       -1, 3, 1480,
-       52, 0, 172
+       -1, 1, 378,
+       9, 0, 1000
 };
 static int parser_action_row1482[] = {
-       2,
-       -1, 3, 1481,
-       27, 0, 1518
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 458,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1483[] = {
-       1,
-       -1, 1, 452
+       3,
+       -1, 3, 1482,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row1484[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 65
 };
 static int parser_action_row1485[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 378,
+       9, 0, 1000
 };
 static int parser_action_row1486[] = {
-       1,
-       -1, 1, 144
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 458,
+       12, 0, 26,
+       15, 0, 28,
+       18, 0, 29,
+       25, 0, 30,
+       28, 0, 31,
+       29, 0, 32,
+       30, 0, 33,
+       36, 0, 35,
+       37, 0, 36,
+       38, 0, 37,
+       39, 0, 38,
+       40, 0, 39,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 45,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1487[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 94
 };
 static int parser_action_row1488[] = {
-       4,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2,
-       83, 0, 481
+       1,
+       -1, 1, 79
 };
 static int parser_action_row1489[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 1, 378,
+       9, 0, 1000
 };
 static int parser_action_row1490[] = {
-       1,
-       -1, 1, 60
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1491[] = {
-       1,
-       -1, 1, 61
+       2,
+       -1, 3, 1490,
+       17, 0, 1265
 };
 static int parser_action_row1492[] = {
-       2,
-       -1, 1, 145,
-       89, 0, 1038
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1493[] = {
-       2,
-       -1, 1, 373,
-       9, 0, 1041
+       1,
+       -1, 1, 76
 };
 static int parser_action_row1494[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 469,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1495[] = {
        1,
-       -1, 1, 65
+       -1, 1, 63
 };
 static int parser_action_row1496[] = {
        2,
-       -1, 1, 373,
-       9, 0, 1041
+       -1, 1, 149,
+       89, 0, 997
 };
 static int parser_action_row1497[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 469,
-       12, 0, 27,
-       15, 0, 29,
-       18, 0, 30,
-       25, 0, 31,
-       28, 0, 32,
-       29, 0, 33,
-       30, 0, 34,
-       36, 0, 36,
-       37, 0, 37,
-       38, 0, 38,
-       39, 0, 39,
-       40, 0, 40,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 46,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 3, 1496,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row1498[] = {
        1,
-       -1, 1, 91
+       -1, 1, 87
 };
 static int parser_action_row1499[] = {
-       1,
-       -1, 1, 78
+       2,
+       -1, 1, 135,
+       4, 0, 720
 };
 static int parser_action_row1500[] = {
-       2,
-       -1, 1, 373,
-       9, 0, 1041
+       1,
+       -1, 1, 88
 };
 static int parser_action_row1501[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1502[] = {
        2,
-       -1, 3, 1501,
-       17, 0, 1299
+       -1, 1, 70,
+       61, 0, 1533
 };
 static int parser_action_row1503[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row1504[] = {
        1,
-       -1, 1, 75
+       -1, 1, 334
 };
 static int parser_action_row1505[] = {
        22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1506[] = {
-       1,
-       -1, 1, 63
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1507[] = {
-       2,
-       -1, 1, 145,
-       89, 0, 1038
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1508[] = {
-       3,
-       -1, 3, 1507,
-       31, 0, 35,
-       96, 0, 57
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1509[] = {
-       2,
-       -1, 1, 131,
-       4, 0, 751
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1510[] = {
        1,
-       -1, 1, 85
+       -1, 1, 681
 };
 static int parser_action_row1511[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 1510,
+       52, 0, 171
 };
 static int parser_action_row1512[] = {
-       2,
-       -1, 1, 69,
-       61, 0, 1537
+       1,
+       -1, 1, 236
 };
 static int parser_action_row1513[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row1514[] = {
-       1,
-       -1, 1, 814
+       2,
+       -1, 3, 1513,
+       48, 0, 1542
 };
 static int parser_action_row1515[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       2,
+       -1, 3, 1514,
+       55, 0, 1543
 };
 static int parser_action_row1516[] = {
-       1,
-       -1, 1, 681
+       4,
+       -1, 3, 1515,
+       0, 0, 82,
+       1, 0, 83,
+       82, 0, 180
 };
 static int parser_action_row1517[] = {
        2,
        -1, 3, 1516,
-       52, 0, 172
+       50, 0, 1546
 };
 static int parser_action_row1518[] = {
-       1,
-       -1, 1, 236
+       2,
+       -1, 3, 1517,
+       55, 0, 1547
 };
 static int parser_action_row1519[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       2,
+       -1, 3, 1518,
+       55, 0, 1548
 };
 static int parser_action_row1520[] = {
        2,
-       -1, 3, 1519,
-       48, 0, 1542
+       -1, 1, 135,
+       4, 0, 720
 };
 static int parser_action_row1521[] = {
-       2,
-       -1, 3, 1520,
-       55, 0, 1543
+       1,
+       -1, 1, 57
 };
 static int parser_action_row1522[] = {
        2,
-       -1, 3, 1521,
-       50, 0, 1544
+       -1, 1, 378,
+       9, 0, 1000
 };
 static int parser_action_row1523[] = {
-       2,
-       -1, 3, 1522,
-       55, 0, 1545
+       1,
+       -1, 1, 66
 };
 static int parser_action_row1524[] = {
-       2,
-       -1, 3, 1523,
-       55, 0, 1546
+       1,
+       -1, 1, 80
 };
 static int parser_action_row1525[] = {
        2,
-       -1, 1, 131,
-       4, 0, 751
+       -1, 1, 378,
+       9, 0, 1000
 };
 static int parser_action_row1526[] = {
        1,
-       -1, 1, 57
+       -1, 1, 81
 };
 static int parser_action_row1527[] = {
        2,
-       -1, 1, 373,
-       9, 0, 1041
+       -1, 1, 92,
+       14, 0, 712
 };
 static int parser_action_row1528[] = {
-       1,
-       -1, 1, 79
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1529[] = {
-       2,
-       -1, 1, 373,
-       9, 0, 1041
+       1,
+       -1, 1, 71
 };
 static int parser_action_row1530[] = {
-       1,
-       -1, 1, 80
+       2,
+       -1, 1, 135,
+       4, 0, 720
 };
 static int parser_action_row1531[] = {
-       2,
-       -1, 1, 89,
-       14, 0, 395
+       1,
+       -1, 1, 89
 };
 static int parser_action_row1532[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       3,
+       -1, 1, 155,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row1533[] = {
-       1,
-       -1, 1, 70
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1534[] = {
-       2,
-       -1, 1, 131,
-       4, 0, 751
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1535[] = {
-       1,
-       -1, 1, 86
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1536[] = {
-       3,
-       -1, 1, 151,
-       31, 0, 35,
-       96, 0, 57
+       1,
+       -1, 1, 491
 };
 static int parser_action_row1537[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 496
 };
 static int parser_action_row1538[] = {
-       3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       1,
+       -1, 1, 493
 };
 static int parser_action_row1539[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 498
 };
 static int parser_action_row1540[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
@@ -15271,206 +14958,220 @@ static int parser_action_row1541[] = {
 };
 static int parser_action_row1542[] = {
        21,
-       -1, 1, 362,
-       12, 0, 847,
-       25, 0, 848,
-       34, 0, 849,
-       41, 0, 850,
-       43, 0, 851,
-       45, 0, 852,
-       46, 0, 853,
-       47, 0, 854,
-       48, 0, 855,
-       51, 0, 856,
-       54, 0, 857,
-       68, 0, 858,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 859,
-       87, 0, 860,
-       88, 0, 861,
-       89, 0, 862,
-       90, 0, 55,
-       93, 0, 863
+       -1, 1, 367,
+       12, 0, 802,
+       25, 0, 803,
+       34, 0, 804,
+       41, 0, 805,
+       43, 0, 806,
+       45, 0, 807,
+       46, 0, 808,
+       47, 0, 809,
+       48, 0, 810,
+       51, 0, 811,
+       54, 0, 812,
+       68, 0, 813,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 814,
+       87, 0, 815,
+       88, 0, 816,
+       89, 0, 817,
+       90, 0, 54,
+       93, 0, 818
 };
 static int parser_action_row1543[] = {
        3,
-       -1, 1, 380,
+       -1, 1, 385,
        0, 0, 1,
        1, 0, 2
 };
 static int parser_action_row1544[] = {
        1,
-       -1, 1, 450
+       -1, 1, 456
 };
 static int parser_action_row1545[] = {
        3,
-       -1, 1, 380,
-       0, 0, 1,
-       1, 0, 2
+       -1, 3, 1544,
+       0, 0, 82,
+       1, 0, 83
 };
 static int parser_action_row1546[] = {
        1,
-       -1, 1, 141
+       -1, 1, 328
 };
 static int parser_action_row1547[] = {
-       1,
-       -1, 1, 139
+       3,
+       -1, 1, 385,
+       0, 0, 1,
+       1, 0, 2
 };
 static int parser_action_row1548[] = {
-       3,
-       -1, 1, 151,
-       31, 0, 35,
-       96, 0, 57
+       1,
+       -1, 1, 145
 };
 static int parser_action_row1549[] = {
        1,
-       -1, 1, 58
+       -1, 1, 143
 };
 static int parser_action_row1550[] = {
-       1,
-       -1, 1, 81
+       3,
+       -1, 1, 155,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row1551[] = {
        1,
-       -1, 1, 76
+       -1, 1, 58
 };
 static int parser_action_row1552[] = {
-       2,
-       -1, 1, 89,
-       14, 0, 395
+       1,
+       -1, 1, 82
 };
 static int parser_action_row1553[] = {
-       3,
-       -1, 1, 151,
-       31, 0, 35,
-       96, 0, 57
+       1,
+       -1, 1, 77
 };
 static int parser_action_row1554[] = {
-       1,
-       -1, 1, 83
+       2,
+       -1, 1, 92,
+       14, 0, 712
 };
 static int parser_action_row1555[] = {
-       1,
-       -1, 1, 71
+       3,
+       -1, 1, 155,
+       31, 0, 34,
+       96, 0, 56
 };
 static int parser_action_row1556[] = {
-       22,
-       -1, 1, 362,
-       12, 0, 153,
-       25, 0, 154,
-       34, 0, 155,
-       41, 0, 156,
-       43, 0, 157,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       51, 0, 158,
-       54, 0, 47,
-       56, 0, 48,
-       68, 0, 159,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 84
 };
 static int parser_action_row1557[] = {
        1,
        -1, 1, 72
 };
 static int parser_action_row1558[] = {
-       2,
-       -1, 3, 1557,
-       15, 0, 1565
+       22,
+       -1, 1, 367,
+       12, 0, 152,
+       25, 0, 153,
+       34, 0, 154,
+       41, 0, 155,
+       43, 0, 156,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       51, 0, 157,
+       54, 0, 46,
+       56, 0, 47,
+       68, 0, 158,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
 };
 static int parser_action_row1559[] = {
        1,
-       -1, 1, 398
+       -1, 1, 73
 };
 static int parser_action_row1560[] = {
        2,
        -1, 3, 1559,
-       55, 0, 1566
+       15, 0, 1568
 };
 static int parser_action_row1561[] = {
-       2,
-       -1, 3, 1560,
-       55, 0, 1567
+       1,
+       -1, 1, 404
 };
 static int parser_action_row1562[] = {
-       1,
-       -1, 1, 64
+       2,
+       -1, 3, 1561,
+       55, 0, 1569
 };
 static int parser_action_row1563[] = {
        1,
-       -1, 1, 77
+       -1, 1, 329
 };
 static int parser_action_row1564[] = {
-       1,
-       -1, 1, 84
+       2,
+       -1, 3, 1563,
+       55, 0, 1570
 };
 static int parser_action_row1565[] = {
        1,
-       -1, 1, 73
+       -1, 1, 64
 };
 static int parser_action_row1566[] = {
-       32,
-       -1, 1, 362,
-       0, 0, 1,
-       1, 0, 2,
-       9, 0, 785,
-       12, 0, 668,
-       15, 0, 669,
-       18, 0, 670,
-       25, 0, 671,
-       28, 0, 673,
-       29, 0, 674,
-       30, 0, 675,
-       36, 0, 676,
-       37, 0, 677,
-       38, 0, 678,
-       39, 0, 679,
-       40, 0, 680,
-       41, 0, 41,
-       45, 0, 42,
-       46, 0, 43,
-       47, 0, 44,
-       48, 0, 45,
-       53, 0, 681,
-       54, 0, 47,
-       56, 0, 48,
-       83, 0, 49,
-       84, 0, 50,
-       86, 0, 51,
-       87, 0, 52,
-       88, 0, 53,
-       89, 0, 54,
-       90, 0, 55,
-       93, 0, 56
+       1,
+       -1, 1, 78
 };
 static int parser_action_row1567[] = {
        1,
-       -1, 1, 451
+       -1, 1, 85
 };
 static int parser_action_row1568[] = {
        1,
-       -1, 1, 143
+       -1, 1, 74
 };
 static int parser_action_row1569[] = {
+       32,
+       -1, 1, 367,
+       0, 0, 1,
+       1, 0, 2,
+       9, 0, 749,
+       12, 0, 650,
+       15, 0, 651,
+       18, 0, 652,
+       25, 0, 653,
+       28, 0, 655,
+       29, 0, 656,
+       30, 0, 657,
+       36, 0, 658,
+       37, 0, 659,
+       38, 0, 660,
+       39, 0, 661,
+       40, 0, 662,
+       41, 0, 40,
+       45, 0, 41,
+       46, 0, 42,
+       47, 0, 43,
+       48, 0, 44,
+       53, 0, 663,
+       54, 0, 46,
+       56, 0, 47,
+       83, 0, 48,
+       84, 0, 49,
+       86, 0, 50,
+       87, 0, 51,
+       88, 0, 52,
+       89, 0, 53,
+       90, 0, 54,
+       93, 0, 55
+};
+static int parser_action_row1570[] = {
+       1,
+       -1, 1, 457
+};
+static int parser_action_row1571[] = {
+       1,
+       -1, 1, 147
+};
+static int parser_action_row1572[] = {
        1,
        -1, 1, 680
 };
-static int parser_action_row1570[] = {
+static int parser_action_row1573[] = {
        2,
-       -1, 3, 1569,
-       52, 0, 172
+       -1, 3, 1572,
+       52, 0, 171
 };
-static int parser_action_row1571[] = {
+static int parser_action_row1574[] = {
        2,
        -1, 1, 236,
        27, 1, 678
@@ -17047,7 +16748,10 @@ const int* const parser_action_table[] = {
        parser_action_row1568,
        parser_action_row1569,
        parser_action_row1570,
-       parser_action_row1571
+       parser_action_row1571,
+       parser_action_row1572,
+       parser_action_row1573,
+       parser_action_row1574
 };
 
 static int parser_goto_row1[] = {
@@ -17061,39 +16765,39 @@ static int parser_goto_row2[] = {
 static int parser_goto_row3[] = {
        3,
        -1, 5,
-       16, 86,
-       23, 86
+       16, 85,
+       23, 85
 };
 static int parser_goto_row4[] = {
        9,
        -1, 6,
-       18, 94,
-       25, 94,
-       89, 94,
-       93, 94,
-       102, 94,
-       104, 94,
-       230, 94,
-       235, 94
+       18, 93,
+       25, 93,
+       88, 93,
+       92, 93,
+       102, 93,
+       104, 93,
+       229, 93,
+       235, 93
 };
 static int parser_goto_row5[] = {
        16,
        -1, 7,
        4, 21,
-       16, 87,
-       17, 90,
-       18, 95,
+       16, 86,
+       17, 89,
+       18, 94,
        23, 100,
        24, 103,
        25, 105,
-       88, 229,
-       89, 231,
-       93, 233,
+       87, 228,
+       88, 230,
+       92, 232,
        101, 234,
        102, 236,
        104, 237,
-       230, 391,
-       235, 393
+       229, 384,
+       235, 386
 };
 static int parser_goto_row6[] = {
        1,
@@ -17104,1362 +16808,1369 @@ static int parser_goto_row7[] = {
        -1, 9
 };
 static int parser_goto_row8[] = {
-       9,
-       -1, 1054,
-       12, 58,
-       22, 58,
-       92, 232,
-       96, 232,
-       1055, 1185,
-       1056, 1187,
-       1186, 1303,
-       1419, 1459
+       21,
+       -1, 1013,
+       12, 57,
+       22, 99,
+       91, 231,
+       95, 231,
+       180, 336,
+       463, 589,
+       467, 336,
+       694, 336,
+       712, 336,
+       721, 336,
+       795, 336,
+       981, 1110,
+       1014, 1138,
+       1015, 1140,
+       1139, 1269,
+       1394, 336,
+       1397, 1445,
+       1400, 336,
+       1432, 336,
+       1449, 336
 };
 static int parser_goto_row9[] = {
        1,
-       -1, 365
+       -1, 358
 };
 static int parser_goto_row10[] = {
        1,
-       -1, 759
+       -1, 728
 };
 static int parser_goto_row11[] = {
        2,
-       -1, 1176,
-       1178, 1289
+       -1, 1129,
+       1131, 1255
 };
 static int parser_goto_row12[] = {
        2,
-       -1, 1045,
-       1287, 1362
+       -1, 1005,
+       1253, 1332
 };
 static int parser_goto_row13[] = {
        5,
-       -1, 890,
-       896, 1058,
-       1048, 1058,
-       1066, 1058,
-       1196, 1058
+       -1, 852,
+       858, 1017,
+       1008, 1017,
+       1025, 1017,
+       1168, 1017
 };
 static int parser_goto_row14[] = {
        9,
-       -1, 891,
-       897, 1061,
-       1049, 1061,
-       1060, 1061,
-       1067, 1061,
-       1181, 1061,
-       1197, 1061,
-       1200, 1061,
-       1311, 1061
+       -1, 853,
+       859, 1020,
+       1009, 1020,
+       1019, 1020,
+       1026, 1020,
+       1134, 1020,
+       1169, 1020,
+       1172, 1020,
+       1286, 1020
 };
 static int parser_goto_row15[] = {
        1,
-       -1, 892
+       -1, 854
 };
 static int parser_goto_row16[] = {
        8,
-       -1, 396,
-       622, 747,
-       1294, 1365,
-       1414, 1451,
-       1419, 1460,
-       1461, 1503,
-       1530, 1550,
-       1551, 1562
+       -1, 713,
+       612, 716,
+       1260, 1335,
+       1392, 1437,
+       1397, 1446,
+       1447, 1492,
+       1526, 1552,
+       1553, 1565
 };
 static int parser_goto_row17[] = {
-       4,
-       -1, 754,
-       1369, 1418,
-       1413, 1448,
-       1415, 1453
+       6,
+       -1, 723,
+       1339, 1396,
+       1343, 1401,
+       1391, 1434,
+       1393, 1439,
+       1399, 1450
 };
 static int parser_goto_row18[] = {
        1,
-       -1, 1055
+       -1, 1014
 };
 static int parser_goto_row19[] = {
        3,
-       -1, 1056,
-       1055, 1186,
-       1419, 1461
+       -1, 1015,
+       1014, 1139,
+       1397, 1447
 };
 static int parser_goto_row20[] = {
-       7,
-       -1, 202,
-       232, 392,
-       1054, 1184,
-       1185, 1302,
-       1187, 1304,
-       1303, 1375,
-       1459, 1501
+       11,
+       -1, 200,
+       99, 233,
+       231, 385,
+       336, 468,
+       589, 695,
+       1013, 1137,
+       1110, 1242,
+       1138, 1268,
+       1140, 1270,
+       1269, 1345,
+       1445, 1490
 };
 static int parser_goto_row21[] = {
        6,
-       -1, 1033,
-       363, 506,
-       1169, 1283,
-       1295, 1366,
-       1297, 1368,
-       1301, 1372
+       -1, 992,
+       356, 495,
+       1122, 1249,
+       1261, 1336,
+       1263, 1338,
+       1267, 1342
 };
 static int parser_goto_row22[] = {
        6,
-       -1, 627,
-       1297, 1369,
-       1301, 1373,
-       1366, 1413,
-       1368, 1415,
-       1372, 1421
+       -1, 617,
+       1263, 1339,
+       1267, 1343,
+       1336, 1391,
+       1338, 1393,
+       1342, 1399
 };
 static int parser_goto_row23[] = {
        1,
-       -1, 878
+       -1, 839
 };
 static int parser_goto_row24[] = {
        2,
-       -1, 1029,
-       1031, 1164
+       -1, 988,
+       990, 1117
 };
 static int parser_goto_row25[] = {
        2,
-       -1, 879,
-       1163, 1279
+       -1, 840,
+       1116, 1245
 };
 static int parser_goto_row26[] = {
-       8,
-       -1, 755,
-       1039, 1170,
-       1413, 1449,
-       1423, 1467,
-       1464, 1507,
-       1508, 1535,
-       1524, 1547,
-       1533, 1552
+       12,
+       -1, 724,
+       723, 849,
+       998, 1123,
+       1343, 1402,
+       1391, 1435,
+       1399, 1451,
+       1401, 1454,
+       1434, 1482,
+       1450, 1496,
+       1498, 1531,
+       1519, 1549,
+       1529, 1554
 };
 static int parser_goto_row27[] = {
        2,
-       -1, 1167,
-       1168, 1281
+       -1, 1120,
+       1121, 1247
 };
 static int parser_goto_row28[] = {
        2,
-       -1, 1034,
-       1280, 1360
+       -1, 993,
+       1246, 1330
 };
 static int parser_goto_row29[] = {
        1,
-       -1, 1035
+       -1, 994
 };
 static int parser_goto_row30[] = {
        1,
-       -1, 1036
+       -1, 995
 };
 static int parser_goto_row31[] = {
-       6,
-       -1, 1039,
-       1373, 1423,
-       1421, 1464,
-       1466, 1508,
-       1491, 1524,
-       1506, 1533
+       4,
+       -1, 998,
+       1453, 1498,
+       1479, 1519,
+       1495, 1529
 };
 static int parser_goto_row32[] = {
        1,
-       -1, 59
+       -1, 58
 };
 static int parser_goto_row33[] = {
-       10,
-       -1, 1284,
-       12, 60,
-       22, 60,
-       92, 60,
-       755, 888,
-       759, 893,
-       898, 1063,
-       1449, 1494,
-       1467, 1509,
-       1507, 1534
+       14,
+       -1, 1250,
+       12, 59,
+       22, 59,
+       91, 59,
+       724, 850,
+       728, 855,
+       849, 1003,
+       860, 1022,
+       1402, 1455,
+       1435, 1483,
+       1451, 1497,
+       1454, 1499,
+       1482, 1522,
+       1496, 1530
 };
 static int parser_goto_row34[] = {
        4,
-       -1, 1285,
-       1535, 1553,
-       1547, 1561,
-       1552, 1563
+       -1, 1251,
+       1531, 1555,
+       1549, 1564,
+       1554, 1566
 };
 static int parser_goto_row35[] = {
        5,
        -1, 10,
-       17, 91,
-       24, 91,
-       88, 91,
-       101, 91
+       17, 90,
+       24, 90,
+       87, 90,
+       101, 90
 };
 static int parser_goto_row36[] = {
        24,
-       -1, 710,
-       189, 349,
-       417, 548,
-       433, 567,
-       454, 584,
-       611, 724,
-       750, 880,
-       776, 914,
-       804, 949,
-       838, 974,
-       881, 1037,
-       901, 1070,
-       934, 1088,
-       968, 1116,
-       977, 724,
-       1057, 914,
-       1076, 1206,
-       1077, 724,
-       1183, 1294,
-       1280, 1037,
-       1305, 724,
-       1361, 1412,
-       1443, 1484,
-       1445, 1488
+       -1, 692,
+       186, 340,
+       406, 530,
+       422, 549,
+       443, 566,
+       719, 841,
+       766, 885,
+       798, 916,
+       842, 996,
+       863, 1029,
+       872, 1033,
+       904, 1061,
+       1016, 1147,
+       1067, 1201,
+       1136, 1260,
+       1204, 916,
+       1246, 996,
+       1274, 1347,
+       1275, 916,
+       1329, 1147,
+       1331, 1390,
+       1426, 1471,
+       1427, 916,
+       1431, 1476
 };
 static int parser_goto_row37[] = {
        4,
-       -1, 711,
-       614, 741,
-       709, 824,
-       740, 844
+       -1, 693,
+       600, 706,
+       691, 786,
+       705, 799
 };
 static int parser_goto_row38[] = {
        2,
-       -1, 826,
-       827, 969
+       -1, 788,
+       789, 905
 };
 static int parser_goto_row39[] = {
        5,
-       -1, 628,
-       877, 1024,
-       1025, 1160,
-       1027, 1161,
-       1367, 1414
+       -1, 618,
+       838, 983,
+       984, 1113,
+       986, 1114,
+       1337, 1392
 };
 static int parser_goto_row40[] = {
        11,
-       -1, 291,
-       292, 435,
-       790, 938,
-       939, 1090,
-       1044, 1173,
-       1174, 1286,
-       1370, 1419,
-       1371, 1420,
-       1424, 1468,
-       1426, 1470,
-       1469, 1511
+       -1, 288,
+       289, 424,
+       754, 876,
+       877, 1035,
+       1004, 1126,
+       1127, 1252,
+       1340, 1397,
+       1341, 1398,
+       1403, 1456,
+       1405, 1458,
+       1457, 1501
 };
 static int parser_goto_row41[] = {
        24,
-       -1, 142,
-       33, 149,
-       336, 470,
-       468, 600,
-       571, 699,
-       672, 792,
-       674, 149,
-       753, 886,
-       815, 961,
-       887, 1043,
-       948, 470,
-       1095, 600,
-       1113, 1236,
-       1221, 699,
-       1391, 961,
-       1417, 1456,
-       1439, 1479,
-       1447, 1492,
-       1452, 1495,
-       1457, 1499,
-       1478, 1236,
-       1493, 1526,
-       1496, 1528,
-       1565, 1479
+       -1, 140,
+       32, 148,
+       331, 459,
+       457, 582,
+       553, 681,
+       654, 756,
+       656, 148,
+       722, 847,
+       777, 897,
+       848, 1002,
+       884, 459,
+       1040, 582,
+       1058, 1197,
+       1182, 681,
+       1364, 897,
+       1395, 1442,
+       1422, 1466,
+       1433, 1480,
+       1438, 1484,
+       1443, 1488,
+       1465, 1197,
+       1481, 1521,
+       1485, 1524,
+       1568, 1466
 };
 static int parser_goto_row42[] = {
        1,
-       -1, 61
+       -1, 60
 };
 static int parser_goto_row43[] = {
        2,
-       -1, 62,
-       688, 812
+       -1, 61,
+       670, 774
 };
 static int parser_goto_row44[] = {
        4,
-       -1, 287,
-       471, 602,
-       786, 936,
-       1097, 1226
+       -1, 284,
+       460, 584,
+       750, 874,
+       1042, 1187
 };
 static int parser_goto_row45[] = {
        4,
-       -1, 204,
-       206, 367,
-       432, 367,
-       960, 367
+       -1, 202,
+       204, 360,
+       421, 360,
+       896, 360
 };
 static int parser_goto_row46[] = {
        16,
-       -1, 143,
-       12, 63,
-       22, 63,
-       92, 63,
-       96, 63,
-       144, 288,
-       205, 366,
-       368, 366,
-       431, 366,
-       471, 288,
-       566, 366,
-       570, 682,
-       688, 813,
-       786, 288,
-       1097, 288,
-       1220, 682
+       -1, 141,
+       12, 62,
+       22, 62,
+       91, 62,
+       95, 62,
+       142, 285,
+       203, 359,
+       361, 359,
+       420, 359,
+       460, 285,
+       548, 359,
+       552, 664,
+       670, 775,
+       750, 285,
+       1042, 285,
+       1181, 664
 };
 static int parser_goto_row47[] = {
        18,
-       -1, 173,
-       38, 175,
-       145, 289,
-       150, 295,
-       677, 798,
-       678, 800,
-       700, 818,
-       719, 834,
-       720, 836,
-       789, 937,
-       795, 942,
-       909, 1072,
-       910, 1074,
-       1237, 1346,
-       1335, 1392,
-       1480, 1517,
-       1516, 1540,
-       1569, 1570
+       -1, 172,
+       37, 173,
+       143, 286,
+       149, 292,
+       659, 762,
+       660, 763,
+       682, 780,
+       753, 875,
+       759, 880,
+       911, 1065,
+       912, 1066,
+       1142, 1272,
+       1143, 1273,
+       1198, 1311,
+       1300, 1365,
+       1467, 1511,
+       1510, 1540,
+       1572, 1573
 };
 static int parser_goto_row48[] = {
-       1,
-       -1, -1
+       7,
+       -1, 63,
+       798, 917,
+       1016, 1148,
+       1204, 917,
+       1275, 917,
+       1329, 1148,
+       1427, 917
 };
 static int parser_goto_row49[] = {
-       7,
+       5,
        -1, 64,
-       611, 725,
-       776, 915,
-       977, 725,
-       1057, 915,
-       1077, 725,
-       1305, 725
+       798, 918,
+       1204, 918,
+       1275, 918,
+       1427, 918
 };
 static int parser_goto_row50[] = {
-       5,
-       -1, 65,
-       611, 726,
-       977, 726,
-       1077, 726,
-       1305, 726
+       15,
+       -1, 367,
+       218, 376,
+       219, 378,
+       628, 735,
+       629, 737,
+       768, 888,
+       770, 891,
+       771, 893,
+       1190, 1304,
+       1191, 1306,
+       1277, 1350,
+       1278, 1352,
+       1280, 1355,
+       1462, 1505,
+       1463, 1507
 };
 static int parser_goto_row51[] = {
-       15,
-       -1, 374,
-       219, 383,
-       220, 385,
-       638, 766,
-       639, 768,
-       806, 952,
-       808, 955,
-       809, 957,
-       1079, 1209,
-       1080, 1211,
-       1082, 1214,
-       1229, 1339,
-       1230, 1341,
-       1386, 1432,
-       1387, 1434
+       7,
+       -1, 65,
+       798, 919,
+       1016, 1149,
+       1204, 919,
+       1275, 919,
+       1329, 1149,
+       1427, 919
 };
 static int parser_goto_row52[] = {
-       7,
-       -1, 66,
-       611, 727,
-       776, 916,
-       977, 727,
-       1057, 916,
-       1077, 727,
-       1305, 727
+       1,
+       -1, 66
 };
 static int parser_goto_row53[] = {
-       1,
-       -1, 67
+       3,
+       -1, 665,
+       670, 776,
+       774, 895
 };
 static int parser_goto_row54[] = {
-       3,
-       -1, 683,
-       688, 814,
-       812, 959
+       7,
+       -1, 67,
+       798, 920,
+       1016, 1150,
+       1204, 920,
+       1275, 920,
+       1329, 1150,
+       1427, 920
 };
 static int parser_goto_row55[] = {
        7,
        -1, 68,
-       611, 728,
-       776, 917,
-       977, 728,
-       1057, 917,
-       1077, 728,
-       1305, 728
+       798, 921,
+       1016, 1151,
+       1204, 921,
+       1275, 921,
+       1329, 1151,
+       1427, 921
 };
 static int parser_goto_row56[] = {
        7,
        -1, 69,
-       611, 729,
-       776, 918,
-       977, 729,
-       1057, 918,
-       1077, 729,
-       1305, 729
+       798, 922,
+       1016, 1152,
+       1204, 922,
+       1275, 922,
+       1329, 1152,
+       1427, 922
 };
 static int parser_goto_row57[] = {
        7,
        -1, 70,
-       611, 730,
-       776, 919,
-       977, 730,
-       1057, 919,
-       1077, 730,
-       1305, 730
+       798, 923,
+       1016, 1153,
+       1204, 923,
+       1275, 923,
+       1329, 1153,
+       1427, 923
 };
 static int parser_goto_row58[] = {
-       7,
-       -1, 71,
-       611, 731,
-       776, 920,
-       977, 731,
-       1057, 920,
-       1077, 731,
-       1305, 731
+       2,
+       -1, 175,
+       662, 764
 };
 static int parser_goto_row59[] = {
-       2,
-       -1, 178,
-       680, 802
+       45,
+       -1, 159,
+       39, 176,
+       175, 329,
+       364, 504,
+       367, 505,
+       375, 509,
+       376, 510,
+       377, 511,
+       378, 512,
+       472, 601,
+       550, 647,
+       648, 747,
+       662, 176,
+       734, 864,
+       735, 865,
+       736, 866,
+       737, 867,
+       764, 329,
+       887, 504,
+       888, 505,
+       890, 509,
+       891, 510,
+       892, 511,
+       893, 512,
+       910, 1064,
+       1044, 601,
+       1141, 1271,
+       1179, 647,
+       1297, 747,
+       1303, 864,
+       1304, 865,
+       1305, 866,
+       1306, 867,
+       1313, 1375,
+       1349, 1408,
+       1350, 1409,
+       1351, 1410,
+       1352, 1411,
+       1354, 1414,
+       1355, 1415,
+       1406, 1459,
+       1504, 1535,
+       1505, 1536,
+       1506, 1537,
+       1507, 1538
 };
 static int parser_goto_row60[] = {
-       61,
+       54,
        -1, 160,
-       37, 174,
-       38, 176,
-       40, 179,
-       173, 331,
-       175, 332,
-       178, 334,
-       371, 515,
-       374, 516,
-       382, 520,
-       383, 521,
-       384, 522,
-       385, 523,
-       484, 615,
-       568, 665,
-       666, 783,
-       677, 174,
-       678, 176,
-       680, 179,
-       718, 833,
-       719, 835,
-       720, 837,
-       765, 902,
-       766, 903,
-       767, 904,
-       768, 905,
-       798, 331,
-       800, 332,
-       802, 334,
-       834, 972,
-       836, 973,
-       908, 1071,
-       909, 1073,
-       910, 1075,
-       951, 515,
-       952, 516,
-       954, 520,
-       955, 521,
-       956, 522,
-       957, 523,
-       1072, 1204,
-       1074, 1205,
-       1099, 615,
-       1119, 1240,
-       1208, 1320,
-       1209, 1321,
-       1210, 1322,
-       1211, 1323,
-       1213, 1326,
-       1214, 1327,
-       1218, 665,
-       1318, 1383,
-       1332, 783,
-       1338, 902,
-       1339, 903,
-       1340, 904,
-       1341, 905,
-       1431, 1473,
-       1432, 1474,
-       1433, 1475,
-       1434, 1476
+       39, 177,
+       146, 290,
+       147, 291,
+       175, 177,
+       187, 341,
+       188, 342,
+       215, 372,
+       240, 388,
+       251, 396,
+       297, 430,
+       362, 396,
+       368, 506,
+       387, 396,
+       513, 396,
+       658, 177,
+       662, 177,
+       684, 782,
+       708, 801,
+       742, 869,
+       755, 878,
+       757, 879,
+       764, 177,
+       784, 902,
+       798, 924,
+       887, 177,
+       888, 177,
+       890, 177,
+       891, 177,
+       892, 177,
+       893, 177,
+       936, 1075,
+       947, 1084,
+       1044, 177,
+       1179, 177,
+       1196, 1310,
+       1204, 924,
+       1275, 924,
+       1297, 177,
+       1302, 1367,
+       1303, 177,
+       1304, 177,
+       1305, 177,
+       1306, 177,
+       1312, 1374,
+       1376, 1423,
+       1427, 924,
+       1489, 1526,
+       1493, 1528,
+       1508, 1539,
+       1527, 1553,
+       1532, 1556,
+       1534, 1558,
+       1557, 1567
 };
 static int parser_goto_row61[] = {
-       58,
-       -1, 161,
-       40, 180,
-       147, 293,
-       148, 294,
-       178, 180,
-       190, 350,
-       191, 351,
-       216, 379,
-       244, 399,
-       255, 407,
-       300, 441,
-       369, 407,
-       375, 517,
-       398, 407,
-       524, 407,
-       611, 732,
-       676, 180,
-       677, 180,
-       678, 180,
-       680, 180,
-       702, 820,
-       743, 846,
-       778, 931,
-       791, 940,
-       793, 941,
-       798, 180,
-       800, 180,
-       802, 180,
-       822, 966,
-       951, 180,
-       952, 180,
-       954, 180,
-       955, 180,
-       956, 180,
-       957, 180,
-       977, 732,
-       983, 1125,
-       994, 1134,
-       1077, 732,
-       1099, 180,
-       1218, 180,
-       1235, 1345,
-       1305, 732,
-       1332, 180,
-       1337, 1394,
-       1338, 180,
-       1339, 180,
-       1340, 180,
-       1341, 180,
-       1347, 1401,
-       1402, 1440,
-       1500, 1530,
-       1504, 1532,
-       1514, 1539,
-       1531, 1551,
-       1536, 1554,
-       1538, 1556,
-       1555, 1564
+       1,
+       -1, 161
 };
 static int parser_goto_row62[] = {
-       1,
-       -1, 162
+       6,
+       -1, 162,
+       298, 431,
+       437, 560,
+       439, 562,
+       440, 563,
+       561, 688
 };
 static int parser_goto_row63[] = {
-       6,
-       -1, 163,
-       301, 442,
-       448, 578,
-       450, 580,
-       451, 581,
-       579, 706
+       1,
+       -1, 163
 };
 static int parser_goto_row64[] = {
-       1,
-       -1, 164
+       10,
+       -1, 164,
+       441, 564,
+       442, 565,
+       446, 569,
+       447, 570,
+       448, 571,
+       449, 572,
+       450, 573,
+       451, 574,
+       452, 575
 };
 static int parser_goto_row65[] = {
-       10,
+       3,
        -1, 165,
-       452, 582,
-       453, 583,
-       457, 587,
-       458, 588,
-       459, 589,
-       460, 590,
-       461, 591,
-       462, 592,
-       463, 593
+       444, 567,
+       445, 568
 };
 static int parser_goto_row66[] = {
-       3,
+       6,
        -1, 166,
-       455, 585,
-       456, 586
+       300, 433,
+       303, 436,
+       453, 576,
+       454, 577,
+       455, 578
 };
 static int parser_goto_row67[] = {
-       6,
-       -1, 167,
-       303, 444,
-       306, 447,
-       464, 594,
-       465, 595,
-       466, 596
+       1,
+       -1, 167
 };
 static int parser_goto_row68[] = {
-       1,
-       -1, 168
+       46,
+       -1, 168,
+       12, 71,
+       22, 71,
+       28, 71,
+       32, 71,
+       91, 71,
+       95, 71,
+       142, 71,
+       157, 301,
+       203, 71,
+       331, 71,
+       361, 71,
+       420, 71,
+       457, 71,
+       460, 71,
+       548, 71,
+       552, 666,
+       553, 71,
+       651, 666,
+       654, 71,
+       656, 666,
+       670, 71,
+       722, 71,
+       750, 71,
+       777, 71,
+       798, 925,
+       848, 71,
+       884, 666,
+       1040, 666,
+       1042, 71,
+       1058, 71,
+       1181, 666,
+       1182, 666,
+       1204, 925,
+       1275, 925,
+       1364, 666,
+       1395, 71,
+       1422, 71,
+       1427, 925,
+       1433, 71,
+       1438, 71,
+       1443, 71,
+       1465, 666,
+       1481, 71,
+       1485, 71,
+       1568, 666
 };
 static int parser_goto_row69[] = {
-       46,
-       -1, 169,
-       12, 72,
-       22, 72,
-       29, 72,
-       33, 72,
-       92, 72,
-       96, 72,
-       144, 72,
-       158, 304,
-       205, 72,
-       336, 72,
-       368, 72,
-       431, 72,
-       468, 72,
-       471, 72,
-       566, 72,
-       570, 684,
-       571, 72,
-       611, 733,
-       669, 684,
-       672, 72,
-       674, 684,
-       688, 72,
-       753, 72,
-       786, 72,
-       815, 72,
-       887, 72,
-       948, 684,
-       977, 733,
-       1077, 733,
-       1095, 684,
-       1097, 72,
-       1113, 72,
-       1220, 684,
-       1221, 684,
-       1305, 733,
-       1391, 684,
-       1417, 72,
-       1439, 72,
-       1447, 72,
-       1452, 72,
-       1457, 72,
-       1478, 684,
-       1493, 72,
-       1496, 72,
-       1565, 684
+       72,
+       -1, 72,
+       26, 123,
+       77, 123,
+       115, 123,
+       217, 123,
+       221, 123,
+       223, 123,
+       241, 123,
+       243, 123,
+       252, 123,
+       382, 123,
+       400, 123,
+       402, 123,
+       403, 123,
+       404, 123,
+       405, 123,
+       407, 123,
+       408, 123,
+       409, 123,
+       410, 123,
+       411, 123,
+       412, 123,
+       413, 123,
+       414, 123,
+       415, 123,
+       416, 123,
+       417, 123,
+       418, 123,
+       498, 123,
+       501, 123,
+       525, 123,
+       631, 123,
+       632, 123,
+       650, 123,
+       668, 123,
+       709, 819,
+       740, 123,
+       769, 123,
+       773, 123,
+       778, 123,
+       811, 819,
+       899, 123,
+       937, 819,
+       939, 819,
+       948, 819,
+       1016, 123,
+       1045, 123,
+       1047, 123,
+       1089, 819,
+       1091, 819,
+       1092, 819,
+       1093, 819,
+       1094, 819,
+       1096, 819,
+       1097, 819,
+       1098, 819,
+       1099, 819,
+       1100, 819,
+       1101, 819,
+       1102, 819,
+       1103, 819,
+       1104, 819,
+       1105, 819,
+       1106, 819,
+       1107, 819,
+       1193, 123,
+       1194, 123,
+       1218, 819,
+       1293, 123,
+       1309, 123,
+       1329, 123,
+       1541, 819
 };
 static int parser_goto_row70[] = {
-       72,
-       -1, 73,
-       27, 125,
-       78, 125,
-       117, 125,
-       218, 125,
-       222, 125,
-       224, 125,
-       245, 125,
-       247, 125,
-       256, 125,
-       389, 125,
-       411, 125,
-       413, 125,
-       414, 125,
-       415, 125,
-       416, 125,
-       418, 125,
-       419, 125,
-       420, 125,
-       421, 125,
-       422, 125,
-       423, 125,
-       424, 125,
-       425, 125,
-       426, 125,
-       427, 125,
-       428, 125,
-       429, 125,
-       509, 125,
-       512, 125,
-       543, 125,
-       641, 125,
-       642, 125,
-       668, 125,
-       686, 125,
-       744, 864,
-       771, 125,
-       776, 125,
-       807, 125,
-       811, 125,
-       816, 125,
-       856, 864,
-       963, 125,
-       984, 864,
-       986, 864,
-       995, 864,
-       1057, 125,
-       1100, 125,
-       1102, 125,
-       1139, 864,
-       1141, 864,
-       1142, 864,
-       1143, 864,
-       1144, 864,
-       1146, 864,
-       1147, 864,
-       1148, 864,
-       1149, 864,
-       1150, 864,
-       1151, 864,
-       1152, 864,
-       1153, 864,
-       1154, 864,
-       1155, 864,
-       1156, 864,
-       1157, 864,
-       1232, 125,
-       1233, 125,
-       1253, 864,
-       1328, 125,
-       1344, 125,
-       1541, 864
+       1,
+       -1, 73
 };
 static int parser_goto_row71[] = {
        1,
        -1, 74
 };
 static int parser_goto_row72[] = {
-       1,
-       -1, 75
+       2,
+       -1, 211,
+       214, 370
 };
 static int parser_goto_row73[] = {
-       2,
-       -1, 212,
-       215, 377
+       1,
+       -1, 212
 };
 static int parser_goto_row74[] = {
-       1,
-       -1, 213
+       2,
+       -1, 213,
+       214, 371
 };
 static int parser_goto_row75[] = {
-       2,
-       -1, 214,
-       215, 378
+       13,
+       -1, 181,
+       144, 289,
+       754, 877,
+       798, 926,
+       838, 984,
+       1004, 1127,
+       1016, 1154,
+       1204, 926,
+       1275, 926,
+       1329, 1384,
+       1407, 1460,
+       1427, 926,
+       1515, 1544
 };
 static int parser_goto_row76[] = {
-       13,
-       -1, 184,
-       146, 292,
-       611, 734,
-       776, 921,
-       790, 939,
-       877, 1025,
-       977, 734,
-       1044, 1174,
-       1057, 1189,
-       1077, 734,
-       1305, 734,
-       1319, 1384,
-       1427, 1471
+       43,
+       -1, 471,
+       41, 182,
+       42, 183,
+       43, 184,
+       44, 185,
+       50, 191,
+       51, 192,
+       52, 193,
+       53, 194,
+       55, 195,
+       75, 216,
+       111, 244,
+       112, 245,
+       113, 246,
+       114, 247,
+       118, 253,
+       119, 254,
+       120, 255,
+       121, 256,
+       122, 257,
+       213, 369,
+       371, 507,
+       469, 599,
+       597, 704,
+       602, 707,
+       807, 940,
+       808, 941,
+       809, 942,
+       810, 943,
+       814, 949,
+       815, 950,
+       816, 951,
+       817, 952,
+       818, 953,
+       838, 985,
+       933, 1074,
+       1073, 1206,
+       1087, 1215,
+       1088, 1216,
+       1203, 1315,
+       1224, 1324,
+       1321, 1379,
+       1323, 1380
 };
 static int parser_goto_row77[] = {
-       43,
-       -1, 483,
-       42, 185,
-       43, 186,
-       44, 187,
-       45, 188,
-       51, 194,
-       52, 195,
-       53, 196,
-       54, 197,
-       56, 198,
-       76, 217,
-       113, 248,
-       114, 249,
-       115, 250,
-       116, 251,
-       120, 257,
-       121, 258,
-       122, 259,
-       123, 260,
-       124, 261,
-       214, 376,
-       346, 480,
-       378, 518,
-       481, 613,
-       616, 742,
-       852, 987,
-       853, 988,
-       854, 989,
-       855, 990,
-       859, 996,
-       860, 997,
-       861, 998,
-       862, 999,
-       863, 1000,
-       877, 1026,
-       976, 1121,
-       980, 1124,
-       1123, 1241,
-       1137, 1250,
-       1138, 1251,
-       1259, 1355,
-       1352, 1405,
-       1354, 1406
+       3,
+       -1, 592,
+       180, 337,
+       795, 909
 };
 static int parser_goto_row78[] = {
-       3,
-       -1, 528,
-       183, 345,
-       773, 907
+       4,
+       -1, 1440,
+       712, 833,
+       721, 845,
+       1432, 845
 };
 static int parser_goto_row79[] = {
        3,
-       -1, 884,
-       395, 529,
-       1416, 1454
+       -1, 834,
+       467, 593,
+       694, 791
 };
 static int parser_goto_row80[] = {
        3,
-       -1, 530,
-       478, 610,
-       712, 829
+       -1, 979,
+       846, 999,
+       1441, 1486
 };
 static int parser_goto_row81[] = {
-       3,
-       -1, 651,
-       885, 1040,
-       1455, 1497
+       2,
+       -1, 980,
+       982, 1111
 };
 static int parser_goto_row82[] = {
        2,
-       -1, 652,
-       654, 777
+       -1, 856,
+       860, 1023
 };
 static int parser_goto_row83[] = {
        2,
-       -1, 649,
-       650, 774
+       -1, 700,
+       701, 796
 };
 static int parser_goto_row84[] = {
        3,
-       -1, 735,
-       1077, 1207,
-       1305, 1377
+       -1, 927,
+       1275, 1348,
+       1427, 1472
 };
 static int parser_goto_row85[] = {
        3,
-       -1, 842,
-       843, 978,
-       1084, 978
+       -1, 1071,
+       1072, 1205,
+       1282, 1205
 };
 static int parser_goto_row86[] = {
        2,
-       -1, 736,
-       977, 1122
+       -1, 928,
+       1204, 1316
 };
 static int parser_goto_row87[] = {
        3,
-       -1, 346,
-       474, 607,
-       653, 776
+       -1, 597,
+       695, 792,
+       1242, 1329
 };
 static int parser_goto_row88[] = {
        33,
-       -1, 126,
-       78, 220,
-       108, 243,
-       129, 264,
-       171, 329,
-       218, 380,
-       262, 410,
-       327, 380,
-       401, 537,
-       443, 576,
-       509, 635,
-       512, 639,
-       561, 660,
-       564, 663,
-       597, 635,
-       599, 708,
-       686, 809,
-       714, 830,
-       738, 220,
-       779, 932,
-       807, 380,
-       847, 982,
-       866, 1003,
-       923, 1080,
-       1001, 1136,
-       1100, 635,
-       1102, 1230,
-       1120, 639,
-       1129, 1246,
-       1273, 1356,
-       1276, 1359,
-       1325, 1387,
-       1403, 1441
+       -1, 124,
+       77, 219,
+       106, 239,
+       127, 260,
+       170, 326,
+       217, 373,
+       258, 399,
+       324, 373,
+       390, 519,
+       432, 558,
+       498, 625,
+       501, 629,
+       543, 642,
+       546, 645,
+       579, 625,
+       581, 690,
+       668, 771,
+       696, 793,
+       743, 870,
+       769, 373,
+       802, 935,
+       821, 956,
+       930, 219,
+       954, 1086,
+       1045, 625,
+       1047, 1191,
+       1079, 1211,
+       1156, 1278,
+       1238, 1325,
+       1241, 1328,
+       1314, 629,
+       1377, 1424,
+       1413, 1463
 };
 static int parser_goto_row89[] = {
        22,
-       -1, 127,
-       78, 221,
-       218, 381,
-       222, 387,
-       224, 388,
-       389, 525,
-       509, 636,
-       512, 640,
-       641, 769,
-       642, 770,
-       668, 784,
-       686, 810,
-       771, 906,
-       807, 953,
-       811, 958,
-       816, 962,
-       963, 1111,
-       1100, 1228,
-       1102, 1231,
-       1232, 1342,
-       1233, 1343,
-       1344, 1399
+       -1, 125,
+       77, 220,
+       217, 374,
+       221, 380,
+       223, 381,
+       382, 514,
+       498, 626,
+       501, 630,
+       631, 738,
+       632, 739,
+       650, 748,
+       668, 772,
+       740, 868,
+       769, 889,
+       773, 894,
+       778, 898,
+       899, 1056,
+       1045, 1189,
+       1047, 1192,
+       1193, 1307,
+       1194, 1308,
+       1309, 1372
 };
 static int parser_goto_row90[] = {
        9,
-       -1, 76,
-       72, 209,
-       139, 284,
-       169, 326,
-       254, 284,
-       304, 326,
-       684, 806,
-       733, 209,
-       927, 1082
+       -1, 75,
+       71, 208,
+       137, 281,
+       168, 323,
+       250, 281,
+       301, 323,
+       666, 768,
+       925, 208,
+       1160, 1280
 };
 static int parser_goto_row91[] = {
        4,
-       -1, 352,
-       255, 408,
-       398, 534,
-       524, 646
+       -1, 343,
+       251, 397,
+       387, 516,
+       513, 636
 };
 static int parser_goto_row92[] = {
        2,
-       -1, 619,
-       620, 745
+       -1, 605,
+       606, 710
 };
 static int parser_goto_row93[] = {
        4,
-       -1, 298,
-       438, 572,
-       796, 944,
-       1093, 1222
+       -1, 295,
+       427, 554,
+       760, 882,
+       1038, 1183
 };
 static int parser_goto_row94[] = {
        2,
-       -1, 240,
-       488, 622
+       -1, 609,
+       477, 612
 };
 static int parser_goto_row95[] = {
        127,
-       -1, 170,
-       12, 77,
-       22, 77,
-       27, 128,
-       29, 77,
-       33, 77,
-       78, 128,
-       92, 77,
-       96, 77,
-       117, 253,
-       144, 77,
-       158, 305,
-       205, 77,
-       218, 128,
-       222, 128,
-       224, 128,
-       245, 128,
-       247, 128,
-       256, 128,
-       336, 77,
-       368, 77,
-       370, 511,
-       389, 128,
-       411, 128,
-       413, 128,
-       414, 128,
-       415, 128,
-       416, 128,
-       418, 128,
-       419, 128,
-       420, 128,
-       421, 128,
-       422, 128,
-       423, 128,
-       424, 128,
-       425, 128,
-       426, 128,
-       427, 128,
-       428, 128,
-       429, 128,
-       430, 563,
-       431, 77,
-       467, 598,
-       468, 77,
-       471, 77,
-       509, 128,
-       512, 128,
-       539, 658,
-       543, 128,
-       566, 77,
-       570, 685,
-       571, 77,
-       577, 705,
-       611, 737,
-       641, 128,
-       642, 128,
-       668, 128,
-       669, 685,
-       672, 77,
-       674, 685,
-       686, 128,
-       688, 77,
-       744, 865,
-       753, 77,
-       771, 128,
-       776, 922,
-       786, 77,
-       807, 128,
-       811, 128,
-       815, 77,
-       816, 128,
-       856, 992,
-       887, 77,
-       948, 685,
-       950, 1101,
-       963, 128,
-       975, 511,
-       977, 737,
-       984, 865,
-       986, 865,
-       995, 865,
-       1057, 922,
-       1077, 737,
-       1095, 685,
-       1097, 77,
-       1100, 128,
-       1102, 128,
-       1113, 77,
-       1139, 865,
-       1141, 865,
-       1142, 865,
-       1143, 865,
-       1144, 865,
-       1146, 865,
-       1147, 865,
-       1148, 865,
-       1149, 865,
-       1150, 865,
-       1151, 865,
-       1152, 865,
-       1153, 865,
-       1154, 865,
-       1155, 865,
-       1156, 865,
-       1157, 865,
-       1158, 1275,
-       1212, 1324,
-       1220, 685,
-       1221, 685,
-       1232, 128,
-       1233, 128,
-       1248, 1351,
-       1253, 865,
-       1305, 737,
-       1328, 128,
-       1344, 128,
-       1391, 685,
-       1417, 77,
-       1439, 77,
-       1447, 77,
-       1452, 77,
-       1457, 77,
-       1478, 685,
-       1493, 77,
-       1496, 77,
-       1541, 865,
-       1565, 685
+       -1, 169,
+       12, 76,
+       22, 76,
+       26, 126,
+       28, 76,
+       32, 76,
+       77, 126,
+       91, 76,
+       95, 76,
+       115, 249,
+       142, 76,
+       157, 302,
+       203, 76,
+       217, 126,
+       221, 126,
+       223, 126,
+       241, 126,
+       243, 126,
+       252, 126,
+       331, 76,
+       361, 76,
+       363, 500,
+       382, 126,
+       400, 126,
+       402, 126,
+       403, 126,
+       404, 126,
+       405, 126,
+       407, 126,
+       408, 126,
+       409, 126,
+       410, 126,
+       411, 126,
+       412, 126,
+       413, 126,
+       414, 126,
+       415, 126,
+       416, 126,
+       417, 126,
+       418, 126,
+       419, 545,
+       420, 76,
+       456, 580,
+       457, 76,
+       460, 76,
+       498, 126,
+       501, 126,
+       521, 640,
+       525, 126,
+       548, 76,
+       552, 667,
+       553, 76,
+       559, 687,
+       631, 126,
+       632, 126,
+       650, 126,
+       651, 667,
+       654, 76,
+       656, 667,
+       668, 126,
+       670, 76,
+       709, 820,
+       722, 76,
+       740, 126,
+       750, 76,
+       769, 126,
+       773, 126,
+       777, 76,
+       778, 126,
+       798, 929,
+       811, 945,
+       848, 76,
+       884, 667,
+       886, 1046,
+       899, 126,
+       937, 820,
+       939, 820,
+       948, 820,
+       1016, 1155,
+       1040, 667,
+       1042, 76,
+       1045, 126,
+       1047, 126,
+       1058, 76,
+       1089, 820,
+       1091, 820,
+       1092, 820,
+       1093, 820,
+       1094, 820,
+       1096, 820,
+       1097, 820,
+       1098, 820,
+       1099, 820,
+       1100, 820,
+       1101, 820,
+       1102, 820,
+       1103, 820,
+       1104, 820,
+       1105, 820,
+       1106, 820,
+       1107, 820,
+       1108, 1240,
+       1181, 667,
+       1182, 667,
+       1193, 126,
+       1194, 126,
+       1202, 500,
+       1204, 929,
+       1213, 1320,
+       1218, 820,
+       1275, 929,
+       1293, 126,
+       1309, 126,
+       1329, 1155,
+       1353, 1412,
+       1364, 667,
+       1395, 76,
+       1422, 76,
+       1427, 929,
+       1433, 76,
+       1438, 76,
+       1443, 76,
+       1465, 667,
+       1481, 76,
+       1485, 76,
+       1541, 820,
+       1568, 667
 };
 static int parser_goto_row96[] = {
        129,
-       -1, 171,
-       12, 78,
-       22, 78,
-       27, 129,
-       29, 78,
-       33, 78,
-       78, 129,
-       92, 78,
-       96, 78,
-       117, 129,
-       144, 78,
-       205, 78,
-       218, 129,
-       222, 129,
-       224, 129,
-       245, 129,
-       247, 129,
-       256, 129,
-       336, 78,
-       368, 78,
-       370, 512,
-       389, 129,
-       411, 129,
-       413, 129,
-       414, 129,
-       415, 129,
-       416, 129,
-       418, 129,
-       419, 129,
-       420, 129,
-       421, 129,
-       422, 129,
-       423, 129,
-       424, 129,
-       425, 129,
-       426, 129,
-       427, 129,
-       428, 129,
-       429, 129,
-       430, 564,
-       431, 78,
-       467, 599,
-       468, 78,
-       471, 78,
-       509, 129,
-       512, 129,
-       539, 564,
-       543, 129,
-       566, 78,
-       570, 686,
-       571, 78,
-       577, 599,
-       609, 714,
-       611, 738,
-       641, 129,
-       642, 129,
-       657, 779,
-       668, 129,
-       669, 686,
-       672, 78,
-       674, 686,
-       686, 129,
-       688, 78,
-       744, 866,
-       753, 78,
-       771, 129,
-       776, 923,
-       786, 78,
-       807, 129,
-       811, 129,
-       815, 78,
-       816, 129,
-       856, 866,
-       887, 78,
-       948, 686,
-       950, 1102,
-       963, 129,
-       975, 1120,
-       977, 738,
-       984, 866,
-       986, 866,
-       995, 866,
-       1057, 923,
-       1077, 738,
-       1095, 686,
-       1097, 78,
-       1100, 129,
-       1102, 129,
-       1113, 78,
-       1139, 866,
-       1141, 866,
-       1142, 866,
-       1143, 866,
-       1144, 866,
-       1146, 866,
-       1147, 866,
-       1148, 866,
-       1149, 866,
-       1150, 866,
-       1151, 866,
-       1152, 866,
-       1153, 866,
-       1154, 866,
-       1155, 866,
-       1156, 866,
-       1157, 866,
-       1158, 1276,
-       1212, 1325,
-       1220, 686,
-       1221, 686,
-       1232, 129,
-       1233, 129,
-       1248, 1276,
-       1253, 866,
-       1305, 738,
-       1328, 129,
-       1344, 129,
-       1350, 1403,
-       1391, 686,
-       1417, 78,
-       1439, 78,
-       1447, 78,
-       1452, 78,
-       1457, 78,
-       1478, 686,
-       1493, 78,
-       1496, 78,
-       1541, 866,
-       1565, 686
+       -1, 170,
+       12, 77,
+       22, 77,
+       26, 127,
+       28, 77,
+       32, 77,
+       77, 127,
+       91, 77,
+       95, 77,
+       115, 127,
+       142, 77,
+       203, 77,
+       217, 127,
+       221, 127,
+       223, 127,
+       241, 127,
+       243, 127,
+       252, 127,
+       331, 77,
+       361, 77,
+       363, 501,
+       382, 127,
+       400, 127,
+       402, 127,
+       403, 127,
+       404, 127,
+       405, 127,
+       407, 127,
+       408, 127,
+       409, 127,
+       410, 127,
+       411, 127,
+       412, 127,
+       413, 127,
+       414, 127,
+       415, 127,
+       416, 127,
+       417, 127,
+       418, 127,
+       419, 546,
+       420, 77,
+       456, 581,
+       457, 77,
+       460, 77,
+       498, 127,
+       501, 127,
+       521, 546,
+       525, 127,
+       548, 77,
+       552, 668,
+       553, 77,
+       559, 581,
+       591, 696,
+       631, 127,
+       632, 127,
+       639, 743,
+       650, 127,
+       651, 668,
+       654, 77,
+       656, 668,
+       668, 127,
+       670, 77,
+       709, 821,
+       722, 77,
+       740, 127,
+       750, 77,
+       769, 127,
+       773, 127,
+       777, 77,
+       778, 127,
+       798, 930,
+       811, 821,
+       848, 77,
+       884, 668,
+       886, 1047,
+       899, 127,
+       937, 821,
+       939, 821,
+       948, 821,
+       1016, 1156,
+       1040, 668,
+       1042, 77,
+       1045, 127,
+       1047, 127,
+       1058, 77,
+       1089, 821,
+       1091, 821,
+       1092, 821,
+       1093, 821,
+       1094, 821,
+       1096, 821,
+       1097, 821,
+       1098, 821,
+       1099, 821,
+       1100, 821,
+       1101, 821,
+       1102, 821,
+       1103, 821,
+       1104, 821,
+       1105, 821,
+       1106, 821,
+       1107, 821,
+       1108, 1241,
+       1181, 668,
+       1182, 668,
+       1193, 127,
+       1194, 127,
+       1202, 1314,
+       1204, 930,
+       1213, 1241,
+       1218, 821,
+       1275, 930,
+       1293, 127,
+       1309, 127,
+       1319, 1377,
+       1329, 1156,
+       1353, 1413,
+       1364, 668,
+       1395, 77,
+       1422, 77,
+       1427, 930,
+       1433, 77,
+       1438, 77,
+       1443, 77,
+       1465, 668,
+       1481, 77,
+       1485, 77,
+       1541, 821,
+       1568, 668
 };
 static int parser_goto_row97[] = {
        1,
-       -1, 632
+       -1, 622
 };
 static int parser_goto_row98[] = {
        10,
-       -1, 79,
-       81, 226,
-       140, 226,
-       241, 226,
-       514, 226,
-       527, 226,
-       634, 226,
-       698, 226,
-       716, 226,
-       1104, 226
+       -1, 78,
+       80, 225,
+       138, 225,
+       503, 225,
+       610, 225,
+       624, 225,
+       680, 225,
+       698, 225,
+       832, 225,
+       1049, 225
 };
 static int parser_goto_row99[] = {
        54,
-       -1, 130,
-       12, 80,
-       22, 80,
-       29, 80,
-       33, 80,
-       81, 227,
-       92, 80,
-       96, 80,
-       140, 285,
-       144, 80,
-       205, 80,
-       336, 80,
-       368, 80,
-       370, 513,
-       431, 80,
-       468, 80,
-       471, 80,
-       508, 633,
-       514, 643,
-       566, 80,
-       570, 687,
-       571, 80,
-       609, 715,
-       634, 762,
-       657, 715,
-       669, 687,
-       672, 80,
-       674, 687,
-       688, 80,
-       698, 817,
-       716, 831,
-       753, 80,
-       786, 80,
-       815, 80,
-       887, 80,
-       948, 687,
-       950, 1103,
-       1095, 687,
-       1097, 80,
-       1104, 1234,
-       1113, 80,
-       1220, 687,
-       1221, 687,
-       1350, 715,
-       1391, 687,
-       1417, 80,
-       1439, 80,
-       1447, 80,
-       1452, 80,
-       1457, 80,
-       1478, 687,
-       1493, 80,
-       1496, 80,
-       1565, 687
+       -1, 128,
+       12, 79,
+       22, 79,
+       28, 79,
+       32, 79,
+       80, 226,
+       91, 79,
+       95, 79,
+       138, 282,
+       142, 79,
+       203, 79,
+       331, 79,
+       361, 79,
+       363, 502,
+       420, 79,
+       457, 79,
+       460, 79,
+       497, 623,
+       503, 633,
+       548, 79,
+       552, 669,
+       553, 79,
+       591, 697,
+       624, 731,
+       639, 697,
+       651, 669,
+       654, 79,
+       656, 669,
+       670, 79,
+       680, 779,
+       698, 794,
+       722, 79,
+       750, 79,
+       777, 79,
+       848, 79,
+       884, 669,
+       886, 1048,
+       1040, 669,
+       1042, 79,
+       1049, 1195,
+       1058, 79,
+       1181, 669,
+       1182, 669,
+       1319, 697,
+       1364, 669,
+       1395, 79,
+       1422, 79,
+       1433, 79,
+       1438, 79,
+       1443, 79,
+       1465, 669,
+       1481, 79,
+       1485, 79,
+       1568, 669
 };
 static int parser_goto_row100[] = {
        8,
-       -1, 1042,
-       1043, 1172,
-       1456, 1498,
-       1492, 1525,
-       1495, 1527,
-       1499, 1529,
-       1526, 1548,
-       1528, 1549
+       -1, 1001,
+       1002, 1125,
+       1442, 1487,
+       1480, 1520,
+       1484, 1523,
+       1488, 1525,
+       1521, 1550,
+       1524, 1551
 };
 static int parser_goto_row101[] = {
-       18,
-       -1, 885,
-       15, 85,
-       395, 531,
-       396, 532,
-       621, 746,
-       747, 876,
-       776, 924,
-       892, 1046,
-       921, 1078,
-       928, 1083,
-       1057, 1190,
-       1189, 1306,
-       1191, 1307,
-       1319, 1385,
-       1384, 1430,
-       1416, 1455,
-       1427, 1472,
-       1471, 1513
+       19,
+       -1, 1441,
+       15, 84,
+       611, 715,
+       712, 835,
+       713, 836,
+       716, 837,
+       721, 846,
+       854, 1006,
+       1016, 1157,
+       1154, 1276,
+       1161, 1281,
+       1329, 1385,
+       1384, 1428,
+       1386, 1429,
+       1407, 1461,
+       1432, 846,
+       1460, 1503,
+       1515, 1545,
+       1544, 1562
 };
 static int parser_goto_row102[] = {
        50,
-       -1, 106,
+       -1, 145,
        0, 11,
        4, 11,
        16, 11,
@@ -18468,312 +18179,313 @@ static int parser_goto_row102[] = {
        23, 11,
        24, 11,
        25, 11,
-       29, 144,
-       33, 144,
-       63, 205,
+       28, 142,
+       32, 142,
+       62, 203,
+       87, 11,
        88, 11,
-       89, 11,
-       93, 11,
+       92, 11,
        101, 11,
        102, 11,
        104, 11,
-       206, 368,
-       230, 11,
+       204, 361,
+       229, 11,
        235, 11,
-       288, 431,
-       336, 471,
-       432, 566,
-       468, 471,
-       570, 688,
-       571, 144,
-       669, 786,
-       672, 471,
-       674, 786,
-       753, 471,
-       813, 205,
-       815, 471,
-       887, 471,
-       948, 1097,
-       960, 368,
-       1095, 1097,
-       1113, 144,
-       1220, 688,
-       1221, 786,
-       1391, 1097,
-       1417, 471,
-       1439, 144,
-       1447, 471,
-       1452, 471,
-       1457, 471,
-       1478, 786,
-       1493, 471,
-       1496, 471,
-       1565, 786
+       285, 420,
+       331, 460,
+       421, 548,
+       457, 460,
+       552, 670,
+       553, 142,
+       651, 750,
+       654, 460,
+       656, 750,
+       722, 460,
+       775, 203,
+       777, 460,
+       848, 460,
+       884, 1042,
+       896, 361,
+       1040, 1042,
+       1058, 142,
+       1181, 670,
+       1182, 750,
+       1364, 1042,
+       1395, 460,
+       1422, 142,
+       1433, 460,
+       1438, 460,
+       1443, 460,
+       1465, 750,
+       1481, 460,
+       1485, 460,
+       1568, 750
 };
 static int parser_goto_row103[] = {
-       262,
-       -1, 96,
+       263,
+       -1, 95,
        0, 12,
        4, 22,
        16, 22,
-       17, 92,
+       17, 91,
        23, 22,
-       24, 92,
-       26, 107,
+       24, 91,
+       30, 146,
        31, 147,
-       32, 148,
+       33, 150,
        34, 151,
-       35, 152,
-       41, 182,
-       47, 190,
-       48, 191,
-       75, 216,
-       88, 92,
-       101, 92,
-       109, 244,
-       110, 245,
-       111, 246,
-       112, 247,
-       118, 255,
-       119, 256,
-       154, 300,
-       155, 301,
-       156, 302,
-       157, 303,
-       159, 306,
-       192, 353,
-       193, 354,
-       199, 355,
-       200, 356,
-       201, 357,
-       207, 369,
-       208, 370,
-       213, 375,
-       238, 394,
-       242, 398,
-       252, 403,
-       265, 411,
-       266, 413,
-       267, 414,
-       268, 415,
-       269, 416,
-       270, 417,
-       271, 418,
-       272, 419,
-       273, 420,
-       274, 421,
-       275, 422,
-       276, 423,
-       277, 424,
-       278, 425,
-       279, 426,
-       280, 427,
-       281, 428,
-       282, 429,
-       283, 430,
-       290, 433,
-       293, 436,
-       294, 437,
-       296, 438,
-       298, 439,
-       299, 440,
-       307, 448,
-       308, 450,
-       309, 451,
-       310, 452,
-       311, 453,
-       312, 454,
-       313, 455,
-       314, 456,
-       315, 457,
-       316, 458,
-       317, 459,
-       318, 460,
-       319, 461,
-       320, 462,
-       321, 463,
-       322, 464,
-       323, 465,
-       324, 466,
-       325, 467,
-       343, 478,
-       350, 485,
-       351, 486,
-       358, 488,
-       365, 508,
-       379, 519,
-       386, 524,
-       399, 535,
-       405, 539,
-       407, 540,
-       412, 543,
-       434, 568,
-       441, 575,
-       445, 577,
-       449, 579,
-       473, 605,
-       477, 609,
-       479, 611,
-       482, 614,
-       506, 629,
-       510, 637,
-       517, 644,
-       531, 653,
-       536, 657,
-       562, 661,
-       569, 666,
-       572, 701,
-       573, 702,
-       574, 703,
-       603, 709,
-       606, 712,
-       610, 717,
-       612, 740,
-       617, 743,
-       618, 744,
-       625, 749,
-       626, 750,
-       628, 757,
-       648, 773,
-       654, 653,
-       656, 778,
-       671, 791,
-       673, 793,
-       675, 796,
-       704, 822,
-       711, 828,
-       735, 840,
-       741, 845,
-       751, 881,
-       758, 889,
-       759, 894,
-       763, 900,
-       764, 901,
-       781, 933,
-       782, 934,
-       805, 950,
-       819, 964,
-       820, 965,
-       824, 967,
-       825, 968,
-       829, 971,
-       839, 975,
-       841, 977,
-       844, 979,
+       40, 179,
+       46, 187,
+       47, 188,
+       74, 215,
+       87, 91,
+       101, 91,
+       107, 240,
+       108, 241,
+       109, 242,
+       110, 243,
+       116, 251,
+       117, 252,
+       153, 297,
+       154, 298,
+       155, 299,
+       156, 300,
+       158, 303,
+       189, 344,
+       190, 345,
+       196, 346,
+       197, 347,
+       198, 348,
+       199, 349,
+       205, 362,
+       207, 363,
+       212, 368,
+       238, 387,
+       248, 392,
+       261, 400,
+       262, 402,
+       263, 403,
+       264, 404,
+       265, 405,
+       266, 406,
+       267, 407,
+       268, 408,
+       269, 409,
+       270, 410,
+       271, 411,
+       272, 412,
+       273, 413,
+       274, 414,
+       275, 415,
+       276, 416,
+       277, 417,
+       278, 418,
+       280, 419,
+       287, 422,
+       290, 425,
+       291, 426,
+       293, 427,
+       295, 428,
+       296, 429,
+       304, 437,
+       305, 439,
+       306, 440,
+       307, 441,
+       308, 442,
+       309, 443,
+       310, 444,
+       311, 445,
+       312, 446,
+       313, 447,
+       314, 448,
+       315, 449,
+       316, 450,
+       317, 451,
+       318, 452,
+       319, 453,
+       320, 454,
+       321, 455,
+       322, 456,
+       335, 467,
+       341, 473,
+       342, 474,
+       350, 476,
+       351, 477,
+       358, 497,
+       372, 508,
+       379, 513,
+       388, 517,
+       394, 521,
+       396, 522,
+       401, 525,
+       423, 550,
+       430, 557,
+       434, 559,
+       438, 561,
+       462, 587,
+       466, 591,
+       470, 600,
+       495, 619,
+       499, 627,
+       506, 634,
+       518, 639,
+       544, 643,
+       551, 648,
+       554, 683,
+       555, 684,
+       556, 685,
+       585, 691,
+       588, 694,
+       593, 702,
+       598, 705,
+       603, 708,
+       604, 709,
+       607, 711,
+       615, 718,
+       616, 719,
+       618, 726,
+       638, 742,
+       653, 755,
+       655, 757,
+       657, 760,
+       686, 784,
+       693, 790,
+       699, 795,
+       703, 798,
+       706, 800,
+       720, 842,
+       727, 851,
+       728, 857,
+       732, 862,
+       733, 863,
+       745, 871,
+       746, 872,
+       767, 886,
+       781, 900,
+       782, 901,
+       786, 903,
+       787, 904,
+       791, 907,
+       799, 932,
+       801, 934,
+       803, 936,
+       804, 937,
+       805, 938,
+       806, 939,
+       812, 947,
+       813, 948,
+       822, 957,
+       835, 981,
+       840, 989,
        846, 981,
-       848, 983,
-       849, 984,
-       850, 985,
-       851, 986,
-       857, 994,
-       858, 995,
-       867, 1004,
-       879, 1030,
-       885, 653,
-       893, 1047,
-       896, 1059,
-       897, 1062,
-       898, 1064,
-       913, 1077,
-       931, 1085,
-       940, 1091,
-       941, 1092,
-       943, 1093,
-       944, 1094,
-       966, 1114,
-       991, 1131,
-       1005, 1139,
-       1006, 1141,
-       1007, 1142,
-       1008, 1143,
-       1009, 1144,
-       1010, 1145,
-       1011, 1146,
-       1012, 1147,
-       1013, 1148,
-       1014, 1149,
-       1015, 1150,
-       1016, 1151,
-       1017, 1152,
-       1018, 1153,
-       1019, 1154,
-       1020, 1155,
-       1021, 1156,
-       1022, 1157,
-       1023, 1158,
-       1027, 1162,
-       1028, 1163,
-       1031, 1165,
-       1045, 1177,
-       1048, 1180,
-       1049, 1182,
-       1052, 1183,
-       1060, 1193,
-       1063, 1195,
-       1066, 1199,
-       1067, 1201,
-       1069, 1202,
-       1070, 1203,
-       1081, 1212,
-       1087, 1216,
-       1088, 1217,
-       1089, 1218,
-       1112, 1235,
-       1125, 1242,
-       1133, 1248,
-       1134, 1249,
-       1140, 1253,
-       1161, 1278,
-       1166, 1280,
-       1175, 1287,
-       1178, 1290,
-       1181, 1292,
-       1188, 1305,
-       1196, 1310,
-       1197, 1312,
-       1200, 1314,
-       1215, 1328,
-       1219, 1332,
-       1222, 1336,
-       1223, 1337,
-       1238, 1347,
-       1245, 1350,
-       1274, 1357,
-       1282, 1361,
-       1297, 629,
-       1301, 629,
-       1311, 1379,
-       1316, 1382,
-       1329, 1389,
-       1345, 1400,
-       1348, 1402,
-       1366, 629,
-       1368, 629,
-       1372, 629,
-       1393, 1437,
-       1394, 1438,
-       1407, 1442,
-       1408, 1443,
-       1409, 1444,
-       1411, 1445,
-       1440, 1481,
-       1455, 653,
-       1458, 1500,
-       1462, 1504,
-       1477, 1514,
-       1483, 1519,
-       1484, 1520,
-       1486, 1521,
-       1487, 1522,
-       1488, 1523,
-       1502, 1531,
-       1510, 1536,
-       1512, 1538,
-       1518, 1541,
-       1537, 1555,
-       1539, 1557,
-       1542, 1559,
-       1544, 1560
+       855, 1007,
+       858, 1018,
+       859, 1021,
+       860, 1024,
+       869, 1030,
+       878, 1036,
+       879, 1037,
+       881, 1038,
+       882, 1039,
+       902, 1059,
+       927, 1069,
+       944, 1081,
+       958, 1089,
+       959, 1091,
+       960, 1092,
+       961, 1093,
+       962, 1094,
+       963, 1095,
+       964, 1096,
+       965, 1097,
+       966, 1098,
+       967, 1099,
+       968, 1100,
+       969, 1101,
+       970, 1102,
+       971, 1103,
+       972, 1104,
+       973, 1105,
+       974, 1106,
+       975, 1107,
+       977, 1108,
+       982, 981,
+       986, 1115,
+       987, 1116,
+       990, 1118,
+       1005, 1130,
+       1008, 1133,
+       1009, 1135,
+       1011, 1136,
+       1019, 1165,
+       1022, 1167,
+       1025, 1171,
+       1026, 1173,
+       1028, 1174,
+       1029, 1175,
+       1032, 1177,
+       1033, 1178,
+       1034, 1179,
+       1057, 1196,
+       1068, 1202,
+       1070, 1204,
+       1075, 1207,
+       1083, 1213,
+       1084, 1214,
+       1090, 1218,
+       1114, 1244,
+       1119, 1246,
+       1128, 1253,
+       1131, 1256,
+       1134, 1258,
+       1146, 1275,
+       1168, 1285,
+       1169, 1287,
+       1172, 1289,
+       1176, 1293,
+       1180, 1297,
+       1183, 1301,
+       1184, 1302,
+       1199, 1312,
+       1210, 1319,
+       1239, 1326,
+       1248, 1331,
+       1263, 619,
+       1267, 619,
+       1279, 1353,
+       1286, 1357,
+       1291, 1360,
+       1294, 1362,
+       1310, 1373,
+       1317, 1376,
+       1336, 619,
+       1338, 619,
+       1342, 619,
+       1366, 1420,
+       1367, 1421,
+       1381, 1425,
+       1382, 1426,
+       1383, 1427,
+       1387, 1430,
+       1389, 1431,
+       1423, 1468,
+       1441, 981,
+       1444, 1489,
+       1448, 1493,
+       1464, 1508,
+       1470, 1513,
+       1471, 1514,
+       1474, 1516,
+       1475, 1517,
+       1476, 1518,
+       1491, 1527,
+       1500, 1532,
+       1502, 1534,
+       1512, 1541,
+       1533, 1557,
+       1539, 1559,
+       1542, 1561,
+       1546, 1563
 };
 static int parser_goto_row104[] = {
        1,
@@ -18789,12 +18501,12 @@ static int parser_goto_row106[] = {
 };
 static int parser_goto_row107[] = {
        2,
-       -1, 756,
-       1413, 1450
+       -1, 725,
+       1391, 1436
 };
 static int parser_goto_row108[] = {
        1,
-       -1, 1260
+       -1, 1225
 };
 static int parser_goto_row109[] = {
        1,
@@ -18802,69 +18514,69 @@ static int parser_goto_row109[] = {
 };
 static int parser_goto_row110[] = {
        2,
-       -1, 867,
-       1541, 1558
+       -1, 822,
+       1541, 1560
 };
 static int parser_goto_row111[] = {
        1,
-       -1, 868
+       -1, 823
 };
 static int parser_goto_row112[] = {
        6,
-       -1, 869,
-       984, 1126,
-       1139, 1252,
-       1141, 1254,
-       1142, 1255,
-       1253, 1353
+       -1, 824,
+       937, 1076,
+       1089, 1217,
+       1091, 1219,
+       1092, 1220,
+       1218, 1322
 };
 static int parser_goto_row113[] = {
        1,
-       -1, 870
+       -1, 825
 };
 static int parser_goto_row114[] = {
        10,
-       -1, 871,
-       1143, 1256,
-       1144, 1257,
-       1148, 1263,
-       1149, 1264,
-       1150, 1265,
-       1151, 1266,
-       1152, 1267,
-       1153, 1268,
-       1154, 1269
+       -1, 826,
+       1093, 1221,
+       1094, 1222,
+       1098, 1228,
+       1099, 1229,
+       1100, 1230,
+       1101, 1231,
+       1102, 1232,
+       1103, 1233,
+       1104, 1234
 };
 static int parser_goto_row115[] = {
        3,
-       -1, 872,
-       1146, 1261,
-       1147, 1262
+       -1, 827,
+       1096, 1226,
+       1097, 1227
 };
 static int parser_goto_row116[] = {
        6,
-       -1, 873,
-       986, 1130,
-       995, 1135,
-       1155, 1270,
-       1156, 1271,
-       1157, 1272
+       -1, 828,
+       939, 1080,
+       948, 1085,
+       1105, 1235,
+       1106, 1236,
+       1107, 1237
 };
 static int parser_goto_row117[] = {
        1,
-       -1, 874
+       -1, 829
 };
 static int parser_goto_row118[] = {
        2,
-       -1, 875,
-       856, 993
+       -1, 830,
+       811, 946
 };
 static int parser_goto_row119[] = {
        4,
-       -1, 339,
-       246, 401,
-       302, 443,
-       403, 538
+       -1, 334,
+       242, 390,
+       299, 432,
+       392, 520
 };
 static int parser_goto_row120[] = {
        1,
@@ -18872,7 +18584,7 @@ static int parser_goto_row120[] = {
 };
 static int parser_goto_row121[] = {
        1,
-       -1, 925
+       -1, 1158
 };
 static int parser_goto_row122[] = {
        1,
@@ -18880,98 +18592,98 @@ static int parser_goto_row122[] = {
 };
 static int parser_goto_row123[] = {
        4,
-       -1, 131,
-       776, 926,
-       1057, 926,
-       1328, 1388
+       -1, 129,
+       1016, 1159,
+       1293, 1361,
+       1329, 1159
 };
 static int parser_goto_row124[] = {
        1,
-       -1, 132
+       -1, 130
 };
 static int parser_goto_row125[] = {
        6,
-       -1, 133,
-       245, 400,
-       411, 542,
-       413, 544,
-       414, 545,
-       543, 659
+       -1, 131,
+       241, 389,
+       400, 524,
+       402, 526,
+       403, 527,
+       525, 641
 };
 static int parser_goto_row126[] = {
        1,
-       -1, 134
+       -1, 132
 };
 static int parser_goto_row127[] = {
        10,
-       -1, 135,
-       415, 546,
-       416, 547,
-       420, 551,
-       421, 552,
-       422, 553,
-       423, 554,
-       424, 555,
-       425, 556,
-       426, 557
+       -1, 133,
+       404, 528,
+       405, 529,
+       409, 533,
+       410, 534,
+       411, 535,
+       412, 536,
+       413, 537,
+       414, 538,
+       415, 539
 };
 static int parser_goto_row128[] = {
        3,
-       -1, 136,
-       418, 549,
-       419, 550
+       -1, 134,
+       407, 531,
+       408, 532
 };
 static int parser_goto_row129[] = {
        6,
-       -1, 137,
-       247, 402,
-       256, 409,
-       427, 558,
-       428, 559,
-       429, 560
+       -1, 135,
+       243, 391,
+       252, 398,
+       416, 540,
+       417, 541,
+       418, 542
 };
 static int parser_goto_row130[] = {
        1,
-       -1, 138
+       -1, 136
 };
 static int parser_goto_row131[] = {
        4,
-       -1, 139,
-       117, 254,
-       776, 927,
-       1057, 927
+       -1, 137,
+       115, 250,
+       1016, 1160,
+       1329, 1160
 };
 static int parser_goto_row132[] = {
        1,
-       -1, 475
+       -1, 464
 };
 static int parser_goto_row133[] = {
        7,
-       -1, 476,
-       472, 604,
-       607, 713,
-       970, 1117,
-       1115, 1239,
-       1128, 1244,
-       1243, 1349
+       -1, 465,
+       461, 586,
+       792, 908,
+       906, 1062,
+       1060, 1200,
+       1078, 1209,
+       1208, 1318
 };
 static int parser_goto_row134[] = {
        1,
-       -1, 608
+       -1, 590
 };
 static int parser_goto_row135[] = {
        2,
-       -1, 928,
-       1057, 1191
+       -1, 1161,
+       1329, 1386
 };
 static int parser_goto_row136[] = {
        1,
-       -1, 929
+       -1, 1162
 };
 static int parser_goto_row137[] = {
        2,
-       -1, 1129,
-       1131, 1247
+       -1, 1079,
+       1081, 1212
 };
 static int parser_goto_row138[] = {
        1,
@@ -19019,81 +18731,77 @@ static int parser_goto_row148[] = {
 };
 static int parser_goto_row149[] = {
        8,
-       -1, 787,
-       674, 794,
-       948, 1098,
-       1095, 1224,
-       1221, 1334,
-       1391, 1436,
-       1478, 1515,
-       1565, 1568
+       -1, 751,
+       656, 758,
+       884, 1043,
+       1040, 1185,
+       1182, 1299,
+       1364, 1419,
+       1465, 1509,
+       1568, 1571
 };
 static int parser_goto_row150[] = {
        3,
-       -1, 788,
-       570, 689,
-       1220, 1333
+       -1, 752,
+       552, 671,
+       1181, 1298
 };
 static int parser_goto_row151[] = {
        1,
-       -1, -1
+       -1, 672
 };
 static int parser_goto_row152[] = {
        1,
-       -1, 690
+       -1, 673
 };
 static int parser_goto_row153[] = {
        1,
-       -1, 691
+       -1, 674
 };
 static int parser_goto_row154[] = {
        1,
-       -1, 692
+       -1, 675
 };
 static int parser_goto_row155[] = {
        1,
-       -1, 693
+       -1, 676
 };
 static int parser_goto_row156[] = {
        1,
-       -1, 694
+       -1, 677
 };
 static int parser_goto_row157[] = {
        1,
-       -1, 695
+       -1, 678
 };
 static int parser_goto_row158[] = {
        1,
-       -1, 696
+       -1, 679
 };
 static int parser_goto_row159[] = {
-       1,
-       -1, 697
+       18,
+       -1, 178,
+       175, 330,
+       658, 761,
+       662, 765,
+       764, 883,
+       887, 1050,
+       888, 1051,
+       890, 1052,
+       891, 1053,
+       892, 1054,
+       893, 1055,
+       1044, 1188,
+       1179, 1296,
+       1297, 1363,
+       1303, 1368,
+       1304, 1369,
+       1305, 1370,
+       1306, 1371
 };
 static int parser_goto_row160[] = {
-       22,
-       -1, 181,
-       178, 335,
-       676, 797,
-       677, 799,
-       678, 801,
-       680, 803,
-       798, 945,
-       800, 946,
-       802, 947,
-       951, 1105,
-       952, 1106,
-       954, 1107,
-       955, 1108,
-       956, 1109,
-       957, 1110,
-       1099, 1227,
-       1218, 1331,
-       1332, 1390,
-       1338, 1395,
-       1339, 1396,
-       1340, 1397,
-       1341, 1398
+       1,
+       -1, -1
 };
 static int parser_goto_row161[] = {
        1,
@@ -19112,33 +18820,33 @@ static int parser_goto_row164[] = {
        -1, -1
 };
 static int parser_goto_row165[] = {
-       1,
-       -1, -1
+       10,
+       -1, 143,
+       32, 149,
+       553, 682,
+       651, 753,
+       656, 759,
+       1058, 1198,
+       1182, 1300,
+       1422, 1467,
+       1465, 1510,
+       1568, 1572
 };
 static int parser_goto_row166[] = {
-       10,
-       -1, 145,
-       33, 150,
-       571, 700,
-       669, 789,
-       674, 795,
-       1113, 1237,
-       1221, 1335,
-       1439, 1480,
-       1478, 1516,
-       1565, 1569
+       1,
+       -1, -1
 };
 static int parser_goto_row167[] = {
        1,
-       -1, -1
+       -1, 931
 };
 static int parser_goto_row168[] = {
        1,
-       -1, 739
+       -1, 1163
 };
 static int parser_goto_row169[] = {
        1,
-       -1, 930
+       -1, -1
 };
 static int parser_goto_row170[] = {
        1,
@@ -19146,168 +18854,159 @@ static int parser_goto_row170[] = {
 };
 static int parser_goto_row171[] = {
        1,
-       -1, -1
+       -1, 1016
 };
 static int parser_goto_row172[] = {
        2,
-       -1, 895,
-       898, 1065
-};
-static int parser_goto_row173[] = {
-       1,
-       -1, 1057
-};
-static int parser_goto_row174[] = {
-       2,
        -1, 16,
        4, 23
 };
-static int parser_goto_row175[] = {
+static int parser_goto_row173[] = {
        4,
        -1, 17,
        4, 24,
-       16, 88,
+       16, 87,
        23, 101
 };
-static int parser_goto_row176[] = {
+static int parser_goto_row174[] = {
        8,
        -1, 18,
        4, 25,
-       16, 89,
-       17, 93,
+       16, 88,
+       17, 92,
        23, 102,
        24, 104,
-       88, 230,
+       87, 229,
        101, 235
 };
-static int parser_goto_row177[] = {
+static int parser_goto_row175[] = {
        4,
-       -1, 896,
-       893, 1048,
-       898, 1066,
-       1063, 1196
+       -1, 858,
+       855, 1008,
+       860, 1025,
+       1022, 1168
 };
-static int parser_goto_row178[] = {
+static int parser_goto_row176[] = {
        8,
-       -1, 897,
-       893, 1049,
-       896, 1060,
-       898, 1067,
-       1048, 1181,
-       1063, 1197,
-       1066, 1200,
-       1196, 1311
+       -1, 859,
+       855, 1009,
+       858, 1019,
+       860, 1026,
+       1008, 1134,
+       1022, 1169,
+       1025, 1172,
+       1168, 1286
+};
+static int parser_goto_row177[] = {
+       1,
+       -1, 1131
+};
+static int parser_goto_row178[] = {
+       1,
+       -1, 990
 };
 static int parser_goto_row179[] = {
        1,
-       -1, 1178
+       -1, 1121
 };
 static int parser_goto_row180[] = {
        1,
-       -1, 1031
+       -1, 789
 };
 static int parser_goto_row181[] = {
-       1,
-       -1, 1168
+       3,
+       -1, 204,
+       285, 421,
+       775, 896
 };
 static int parser_goto_row182[] = {
        1,
-       -1, 827
+       -1, 214
 };
 static int parser_goto_row183[] = {
-       3,
-       -1, 206,
-       288, 432,
-       813, 960
+       1,
+       -1, 701
 };
 static int parser_goto_row184[] = {
        1,
-       -1, 215
+       -1, 982
 };
 static int parser_goto_row185[] = {
        1,
-       -1, 650
+       -1, 860
 };
 static int parser_goto_row186[] = {
-       1,
-       -1, 654
-};
-static int parser_goto_row187[] = {
        2,
-       -1, 843,
-       929, 1084
+       -1, 1072,
+       1162, 1282
 };
-static int parser_goto_row188[] = {
+static int parser_goto_row187[] = {
        1,
-       -1, 620
+       -1, 606
 };
-static int parser_goto_row189[] = {
+static int parser_goto_row188[] = {
        50,
-       -1, 140,
-       12, 81,
-       22, 81,
-       29, 81,
-       33, 81,
-       92, 81,
-       96, 81,
-       107, 241,
-       144, 81,
-       205, 81,
-       336, 81,
-       368, 81,
-       370, 514,
-       394, 527,
-       431, 81,
-       468, 81,
-       471, 81,
-       488, 241,
-       508, 634,
-       566, 81,
-       570, 698,
-       571, 81,
-       609, 716,
-       657, 716,
-       669, 698,
-       672, 81,
-       674, 698,
-       688, 81,
-       753, 81,
-       786, 81,
-       815, 81,
-       887, 81,
-       948, 698,
-       950, 1104,
-       1095, 698,
-       1097, 81,
-       1113, 81,
-       1220, 698,
-       1221, 698,
-       1350, 716,
-       1391, 698,
-       1417, 81,
-       1439, 81,
-       1447, 81,
-       1452, 81,
-       1457, 81,
-       1478, 698,
-       1493, 81,
-       1496, 81,
-       1565, 698
+       -1, 138,
+       12, 80,
+       22, 80,
+       28, 80,
+       32, 80,
+       91, 80,
+       95, 80,
+       142, 80,
+       203, 80,
+       331, 80,
+       361, 80,
+       363, 503,
+       420, 80,
+       457, 80,
+       460, 80,
+       476, 610,
+       477, 610,
+       497, 624,
+       548, 80,
+       552, 680,
+       553, 80,
+       591, 698,
+       639, 698,
+       651, 680,
+       654, 80,
+       656, 680,
+       670, 80,
+       711, 832,
+       722, 80,
+       750, 80,
+       777, 80,
+       848, 80,
+       884, 680,
+       886, 1049,
+       1040, 680,
+       1042, 80,
+       1058, 80,
+       1181, 680,
+       1182, 680,
+       1319, 698,
+       1364, 680,
+       1395, 80,
+       1422, 80,
+       1433, 80,
+       1438, 80,
+       1443, 80,
+       1465, 680,
+       1481, 80,
+       1485, 80,
+       1568, 680
 };
-static int parser_goto_row190[] = {
+static int parser_goto_row189[] = {
        2,
        -1, 19,
-       13, 82
+       13, 81
 };
-static int parser_goto_row191[] = {
+static int parser_goto_row190[] = {
        3,
        -1, 20,
-       19, 98,
-       82, 228
-};
-static int parser_goto_row192[] = {
-       1,
-       -1, 898
+       19, 97,
+       81, 227
 };
 
 const int* const parser_goto_table[] = {
@@ -19500,7 +19199,5 @@ const int* const parser_goto_table[] = {
        parser_goto_row187,
        parser_goto_row188,
        parser_goto_row189,
-       parser_goto_row190,
-       parser_goto_row191,
-       parser_goto_row192
+       parser_goto_row190
 };
index 3c5367f..9e3e92e 100644 (file)
@@ -19,6 +19,7 @@ module platform
 import modelize_property
 import parser_util
 import modelbuilder
+private import annotation
 
 redef class ToolContext
        var platform_phase: Phase = new PlatformPhase(self, [modelize_property_phase])
@@ -37,7 +38,7 @@ private class PlatformPhase
                var annotation_name = "platform"
 
                # Skip if we are not interested
-               if nat.n_atid.n_id.text != annotation_name then return
+               if nat.name != annotation_name then return
 
                # Do some validity checks and print errors if the annotation is used incorrectly
                var modelbuilder = toolcontext.modelbuilder
@@ -54,21 +55,12 @@ private class PlatformPhase
                else if args.is_empty then
                        platform_name = nmoduledecl.n_name.collect_text
                else
-                       var arg = args.first
-                       var format_error = "Syntax error: \"{annotation_name}\" expects its argument to be the name of the target platform as a String literal."
-                       
-                       if not arg isa AExprAtArg then
+                       platform_name = args.first.as_string
+                       if platform_name == null then
+                               var format_error = "Syntax error: \"{annotation_name}\" expects its argument to be the name of the target platform as a String literal."
                                modelbuilder.error(nat, format_error)
                                return
                        end
-
-                       var expr = arg.n_expr
-                       if not expr isa AStringFormExpr then
-                               modelbuilder.error(nat, format_error)
-                               return
-                       end
-                       var target = expr.collect_text
-                       platform_name = target.substring(1, target.length-2)
                end
 
                var nmodule = nmoduledecl.parent.as(AModule)
index 1a27ca3..2d2c00a 100644 (file)
@@ -142,10 +142,19 @@ private class ScopeVisitor
        do
                var name: nullable String
                if nlabel != null then
-                       name = nlabel.n_id.text
-                       var found = self.search_label(name)
-                       if found != null then
-                               self.error(nlabel, "Syntax error: label {name} already defined.")
+                       var nid = nlabel.n_id
+                       if nid == null then
+                               var res = search_label("")
+                               if res != null then
+                                       self.error(nlabel, "Syntax error: anonymous label already defined.")
+                               end
+                               name = ""
+                       else
+                               name = nid.text
+                               var found = self.search_label(name)
+                               if found != null then
+                                       self.error(nlabel, "Syntax error: label {name} already defined.")
+                               end
                        end
                else
                        name = null
@@ -162,7 +171,16 @@ private class ScopeVisitor
        private fun get_escapemark(node: ANode, nlabel: nullable ALabel): nullable EscapeMark
        do
                if nlabel != null then
-                       var name = nlabel.n_id.text
+                       var nid = nlabel.n_id
+                       if nid == null then
+                               var res = search_label("")
+                               if res == null then
+                                       self.error(nlabel, "Syntax error: invalid anonymous label.")
+                                       return null
+                               end
+                               return res
+                       end
+                       var name = nid.text
                        var res = search_label(name)
                        if res == null then
                                self.error(nlabel, "Syntax error: invalid label {name}.")
index f7b8ee8..bf3cb12 100644 (file)
@@ -105,6 +105,7 @@ redef class ModelBuilder
 
                # The main function of the C
                compiler.new_file("{mainmodule.name}.main")
+               compiler.compile_nitni_global_ref_functions
                compiler.compile_main_function
 
                # compile methods
@@ -263,8 +264,8 @@ class SeparateCompiler
                var rta = runtime_type_analysis
 
                # Layouts
-               var mclasses = new HashSet[MClass].from(modelbuilder.model.mclasses)
                var poset = mainmodule.flatten_mclass_hierarchy
+               var mclasses = new HashSet[MClass].from(poset)
                var colorer = new POSetColorer[MClass]
                colorer.colorize(poset)
 
@@ -345,45 +346,12 @@ class SeparateCompiler
                var tables = new HashMap[MClass, Array[nullable MPropDef]]
                for mclass in mclasses do
                        var table = new Array[nullable MPropDef]
-                       var supercalls = new List[MMethodDef]
-
-                       # first, fill table from parents by reverse linearization order
-                       var parents = new Array[MClass]
-                       if mainmodule.flatten_mclass_hierarchy.has(mclass) then
-                               parents = mclass.in_hierarchy(mainmodule).greaters.to_a
-                               self.mainmodule.linearize_mclasses(parents)
-                       end
+                       tables[mclass] = table
 
-                       for parent in parents do
-                               if parent == mclass then continue
-                               for mproperty in self.mainmodule.properties(parent) do
-                                       if not mproperty isa MMethod then continue
-                                       if not method_colors.has_key(mproperty) then continue
-                                       var color = method_colors[mproperty]
-                                       if table.length <= color then
-                                               for i in [table.length .. color[ do
-                                                       table[i] = null
-                                               end
-                                       end
-                                       for mpropdef in mproperty.mpropdefs do
-                                               if mpropdef.mclassdef.mclass == parent then
-                                                       table[color] = mpropdef
-                                               end
-                                       end
-                               end
+                       var mproperties = self.mainmodule.properties(mclass)
+                       var mtype = mclass.intro.bound_mtype
 
-                               # lookup for super calls in super classes
-                               for mmethoddef in super_calls do
-                                       for mclassdef in parent.mclassdefs do
-                                               if mclassdef.mpropdefs.has(mmethoddef) then
-                                                       supercalls.add(mmethoddef)
-                                               end
-                                       end
-                               end
-                       end
-
-                       # then override with local properties
-                       for mproperty in self.mainmodule.properties(mclass) do
+                       for mproperty in mproperties do
                                if not mproperty isa MMethod then continue
                                if not method_colors.has_key(mproperty) then continue
                                var color = method_colors[mproperty]
@@ -392,33 +360,22 @@ class SeparateCompiler
                                                table[i] = null
                                        end
                                end
-                               for mpropdef in mproperty.mpropdefs do
-                                       if mpropdef.mclassdef.mclass == mclass then
-                                               table[color] = mpropdef
-                                       end
-                               end
+                               table[color] = mproperty.lookup_first_definition(mainmodule, mtype)
                        end
 
-                       # lookup for super calls in local class
-                       for mmethoddef in super_calls do
-                               for mclassdef in mclass.mclassdefs do
-                                       if mclassdef.mpropdefs.has(mmethoddef) then
-                                               supercalls.add(mmethoddef)
-                                       end
-                               end
-                       end
-                       # insert super calls in table according to receiver
-                       for supercall in supercalls do
+                       for supercall in super_calls do
+                               if not mtype.collect_mclassdefs(mainmodule).has(supercall.mclassdef) then continue
+
                                var color = method_colors[supercall]
                                if table.length <= color then
                                        for i in [table.length .. color[ do
                                                table[i] = null
                                        end
                                end
-                               var mmethoddef = supercall.lookup_next_definition(self.mainmodule, mclass.intro.bound_mtype)
+                               var mmethoddef = supercall.lookup_next_definition(mainmodule, mtype)
                                table[color] = mmethoddef
                        end
-                       tables[mclass] = table
+
                end
                return tables
        end
@@ -427,46 +384,22 @@ class SeparateCompiler
                var tables = new HashMap[MClass, Array[nullable MPropDef]]
                for mclass in mclasses do
                        var table = new Array[nullable MPropDef]
-                       # first, fill table from parents by reverse linearization order
-                       var parents = new Array[MClass]
-                       if mainmodule.flatten_mclass_hierarchy.has(mclass) then
-                               parents = mclass.in_hierarchy(mainmodule).greaters.to_a
-                               self.mainmodule.linearize_mclasses(parents)
-                       end
-                       for parent in parents do
-                               if parent == mclass then continue
-                               for mproperty in self.mainmodule.properties(parent) do
-                                       if not mproperty isa MAttribute then continue
-                                       var color = attr_colors[mproperty]
-                                       if table.length <= color then
-                                               for i in [table.length .. color[ do
-                                                       table[i] = null
-                                               end
-                                       end
-                                       for mpropdef in mproperty.mpropdefs do
-                                               if mpropdef.mclassdef.mclass == parent then
-                                                       table[color] = mpropdef
-                                               end
-                                       end
-                               end
-                       end
+                       tables[mclass] = table
+
+                       var mproperties = self.mainmodule.properties(mclass)
+                       var mtype = mclass.intro.bound_mtype
 
-                       # then override with local properties
-                       for mproperty in self.mainmodule.properties(mclass) do
+                       for mproperty in mproperties do
                                if not mproperty isa MAttribute then continue
+                               if not attr_colors.has_key(mproperty) then continue
                                var color = attr_colors[mproperty]
                                if table.length <= color then
                                        for i in [table.length .. color[ do
                                                table[i] = null
                                        end
                                end
-                               for mpropdef in mproperty.mpropdefs do
-                                       if mpropdef.mclassdef.mclass == mclass then
-                                               table[color] = mpropdef
-                                       end
-                               end
+                               table[color] = mproperty.lookup_first_definition(mainmodule, mtype)
                        end
-                       tables[mclass] = table
                end
                return tables
        end
@@ -938,9 +871,17 @@ class SeparateCompiler
 
        redef fun compile_nitni_structs
        do
-               self.header.add_decl("struct nitni_instance \{struct instance *value;\};")
+               self.header.add_decl """
+struct nitni_instance \{
+       struct nitni_instance *next,
+               *prev; /* adjacent global references in global list */
+       int count; /* number of time this global reference has been marked */
+       struct instance *value;
+\};
+"""
+               super
        end
-       
+
        redef fun finalize_ffi_for_module(mmodule)
        do
                var old_module = self.mainmodule
index 9583d5b..a60cccd 100644 (file)
@@ -71,6 +71,7 @@ redef class ModelBuilder
 
                # The main function of the C
                compiler.new_file("{mainmodule.name}.main")
+               compiler.compile_nitni_global_ref_functions
                compiler.compile_main_function
 
                # compile methods
@@ -99,8 +100,8 @@ class SeparateErasureCompiler
                super
 
                # Class coloring
-               var mclasses = new HashSet[MClass].from(mmbuilder.model.mclasses)
                var poset = mainmodule.flatten_mclass_hierarchy
+               var mclasses = new HashSet[MClass].from(poset)
                var colorer = new POSetColorer[MClass]
                colorer.colorize(poset)
                class_ids = colorer.ids
index 76a5180..6e6ccc3 100644 (file)
@@ -16,6 +16,7 @@
 module test_markdown
 
 import modelize_property
+import highlight
 import markdown
 
 redef class ModelBuilder
index 6bd37b0..5395559 100644 (file)
@@ -226,7 +226,7 @@ redef class ASendReassignFormExpr
 
                var read_args = new Array[AExpr]
                var write_args = new Array[AExpr]
-               for a in raw_arguments.as(not null) do
+               for a in raw_arguments do
                        nblock.add(a)
                        read_args.add(a.make_var_read)
                        write_args.add(a.make_var_read)
index ccd77e2..2a21437 100644 (file)
@@ -1194,6 +1194,8 @@ redef class AAsNotnullExpr
        redef fun accept_typing(v)
        do
                var mtype = v.visit_expr(self.n_expr)
+               if mtype == null then return # Forward error
+
                if mtype isa MNullType then
                        v.error(self, "Type error: as(not null) on null")
                        return
@@ -1202,8 +1204,18 @@ redef class AAsNotnullExpr
                        self.mtype = mtype.mtype
                        return
                end
-               # TODO: warn on useless as not null
                self.mtype = mtype
+
+               if mtype isa MClassType then
+                       v.modelbuilder.warning(self, "Warning: expression is already not null, since it is a `{mtype}`.")
+                       return
+               end
+               assert mtype.need_anchor
+               var u = v.anchor_to(mtype)
+               if not u isa MNullableType then
+                       v.modelbuilder.warning(self, "Warning: expression is already not null, since it is a `{mtype}: {u}`.")
+                       return
+               end
        end
 end
 
index 3c8f048..73d8683 100644 (file)
@@ -133,13 +133,96 @@ class VirtualMachine super NaiveInterpreter
        redef fun init_instance(recv: Instance)
        do
                if not recv.mtype.as(MClassType).mclass.loaded then create_class(recv.mtype.as(MClassType).mclass)
-               super
 
                recv.vtable = recv.mtype.as(MClassType).mclass.vtable
+
+               assert(recv isa MutableInstance)
+               recv.internal_attributes = init_internal_attributes(null_instance, recv.mtype.as(MClassType).mclass.cached_attributes.length)
+
+               super
        end
-       
+               
+       # Initialize the internal representation of an object (its attribute values)
+       private fun init_internal_attributes(null_instance: Instance, size: Int): Pointer
+               import Array[Instance].length, Array[Instance].[] `{
+               
+               Instance* attributes = malloc(sizeof(Instance) * size);
+
+               int i;
+               for(i=0; i<size; i++)
+                       attributes[i] = null_instance;
+
+               Instance_incr_ref(null_instance);
+               return attributes;
+       `}
+
        # Creates the runtime structures for this class
        fun create_class(mclass: MClass) do     mclass.make_vt(self)
+
+       # Return the value of the attribute `mproperty for the object `recv
+       redef fun read_attribute(mproperty: MAttribute, recv: Instance): Instance
+       do
+               assert recv isa MutableInstance
+
+               # Read the attribute value with perfect hashing
+               var id = mproperty.intro_mclassdef.mclass.vtable.id
+               
+               var i = read_attribute_ph(recv.internal_attributes, recv.vtable.internal_vtable,
+                                       recv.vtable.mask, id, mproperty.offset)
+               
+               return i
+       end
+
+       # Return the attribute value in `instance with a sequence of perfect_hashing
+       #     `instance is the attributes array of the receiver
+       #     `vtable is the pointer to the virtual table of the class (of the receiver)
+       #     `mask is the perfect hashing mask of the class
+       #     `id is the identifier of the class
+       #     `offset is the relative offset of this attribute
+       private fun read_attribute_ph(instance: Pointer, vtable: Pointer, mask: Int, id: Int, offset: Int): Instance `{
+               // Perfect hashing position
+               int hv = mask & id;
+               long unsigned int *pointer = (long unsigned int*)(((long int *)vtable)[-hv]);
+               
+               // pointer+1 is the position where the delta of the class is
+               int absolute_offset = *(pointer + 1);
+
+               Instance res = ((Instance *)instance)[absolute_offset + offset];
+               
+               return res;
+       `}
+
+       # Replace in `recv the value of the attribute `mproperty by `value
+       redef fun write_attribute(mproperty: MAttribute, recv: Instance, value: Instance)
+       do
+               assert recv isa MutableInstance
+
+               var id = mproperty.intro_mclassdef.mclass.vtable.id
+               
+               # Replace the old value of mproperty in recv
+               write_attribute_ph(recv.internal_attributes, recv.vtable.internal_vtable,
+                                       recv.vtable.mask, id, mproperty.offset, value)
+       end
+
+       # Replace the value of an attribute in an instance
+       #     `instance is the attributes array of the receiver
+       #     `vtable is the pointer to the virtual table of the class (of the receiver)
+       #     `mask is the perfect hashing mask of the class
+       #     `id is the identifier of the class
+       #     `offset is the relative offset of this attribute
+       #         `value is the new value for this attribute
+       private fun write_attribute_ph(instance: Pointer, vtable: Pointer, mask: Int, id: Int, offset: Int, value: Instance) `{
+               // Perfect hashing position
+               int hv = mask & id;
+               long unsigned int *pointer = (long unsigned int*)(((long int *)vtable)[-hv]);
+
+               // pointer+1 is the position where the delta of the class is
+               int absolute_offset = *(pointer + 1);
+
+               ((Instance *)instance)[absolute_offset + offset] = value;
+               Instance_incr_ref(value);
+       `}
 end
 
 redef class MClass
@@ -149,6 +232,9 @@ redef class MClass
        # True when the class is effectively loaded by the vm, false otherwise
        var loaded: Bool = false
 
+       # Cached attributes for faster instanciations of this class
+       var cached_attributes: Array[MAttribute] = new Array[MAttribute]
+
        # Allocates a VTable for this class and gives it an id
        private fun make_vt(v: VirtualMachine)
        do
@@ -163,33 +249,38 @@ redef class MClass
                # Make_vt for super-classes
                var ids = new Array[Int]
                var nb_methods = new Array[Int]
+               var nb_attributes = new Array[Int]
 
                for parent in superclasses do
                        if parent.vtable == null then parent.make_vt(v)
                        
-                       # Get the number of introduced methods for this class
-                       var count = 0
-                       var min_visibility = public_visibility
-                       for p in parent.intro_mproperties(min_visibility) do
-                               if p isa MMethod then
-                                       count += 1
+                       # Get the number of introduced methods and attributes for this class
+                       var methods = 0
+                       var attributes = 0
+
+                       for p in parent.intro_mproperties(none_visibility) do
+                               if p isa MMethod then methods += 1
+                               if p isa MAttribute then
+                                       attributes += 1
                                end
                        end
                        
                        ids.push(parent.vtable.id)
-                       nb_methods.push(count)
+                       nb_methods.push(methods)
+                       nb_attributes.push(attributes)
                end
                
                # When all super-classes have their identifiers and vtables, allocate current one
-               allocate_vtable(v, ids, nb_methods)
+               allocate_vtable(v, ids, nb_methods, nb_attributes)
                loaded = true
                # The virtual table now needs to be filled with pointer to methods
        end
 
        # Allocate a single vtable
        #       ids : Array of superclasses identifiers
-       #       nb_methods : Array which contain the number of methods for each class in ids
-       private fun allocate_vtable(v: VirtualMachine, ids: Array[Int], nb_methods: Array[Int])
+       #       nb_methods : Array which contain the number of introducted methods for each class in ids
+       #       nb_attributes : Array which contain the number of introducted attributes for each class in ids
+       private fun allocate_vtable(v: VirtualMachine, ids: Array[Int], nb_methods: Array[Int], nb_attributes: Array[Int])
        do
                vtable = new VTable
                var idc = new Array[Int]
@@ -204,18 +295,62 @@ redef class MClass
                ids_total.push(vtable.id)
 
                var nb_methods_total = new Array[Int]
-               var count = 0
-               var min_visibility = public_visibility
-               for p in intro_mproperties(min_visibility) do
-                       if p isa MMethod then
-                               count += 1
+               var nb_attributes_total = new Array[Int]
+
+               var self_methods = 0
+               var self_attributes = 0
+               
+               # For self attributes, fixing offsets
+               var relative_offset = 0
+               for p in intro_mproperties(none_visibility) do
+                       if p isa MMethod then self_methods += 1
+                       if p isa MAttribute then 
+                               self_attributes += 1
+                               p.offset = relative_offset
+                               relative_offset += 1
+                               cached_attributes.push(p)
                        end
                end
+
                nb_methods_total.add_all(nb_methods)
-               nb_methods_total.push(count)
-               
-               vtable.internal_vtable = v.memory_manager.init_vtable(ids_total, nb_methods_total, vtable.mask)
+               nb_methods_total.push(self_methods)
+
+               nb_attributes_total.add_all(nb_attributes)
+               nb_attributes_total.push(self_attributes)
+
+               # Since we have the number of attributes for each class, calculate the delta 
+               var d = calculate_delta(nb_attributes_total)
+               vtable.internal_vtable = v.memory_manager.init_vtable(ids_total, nb_methods_total, d, vtable.mask)
        end
+
+       # Computes delta for each class
+       # A delta represents the offset for this group of attributes in the object
+       #    nb_attributes : number of attributes for each class (classes are linearized from Object to current)
+       #    return deltas for each class
+       private fun calculate_delta(nb_attributes: Array[Int]): Array[Int]
+       do
+               var deltas = new Array[Int]
+
+               var total = 0
+               for nb in nb_attributes do
+                       deltas.push(total)
+                       total += nb
+               end
+
+               return deltas
+       end
+end
+
+redef class MAttribute
+       # Represents the relative offset of this attribute in the runtime instance
+       var offset: Int
+end
+
+# Redef MutableInstance to improve implementation of attributes in objects
+redef class MutableInstance
+       
+       # C-array to store pointers to attributes of this Object
+       var internal_attributes: Pointer
 end
 
 # A VTable contains the virtual method table for the dispatch
@@ -237,34 +372,23 @@ class VTable
 end
 
 redef class Instance
-       
        var vtable: nullable VTable
-
-       init(mt: MType)
-       do
-               mtype = mt
-
-               # An instance is associated to its class virtual table
-               if mt isa MClassType then
-                       vtable = mt.mclass.vtable
-               end
-       end
 end
 
 # Handle memory, used for allocate virtual table and associated structures
 class MemoryManager
 
        # Allocate and fill a virtual table
-       fun init_vtable(ids: Array[Int], nb_methods: Array[Int], mask: Int): Pointer 
+       fun init_vtable(ids: Array[Int], nb_methods: Array[Int], nb_attributes: Array[Int], mask: Int): Pointer 
        do
                # Allocate in C current virtual table
-               var res = intern_init_vtable(ids, nb_methods, mask)
+               var res = intern_init_vtable(ids, nb_methods, nb_attributes, mask)
 
                return res
        end
 
        # Construct virtual tables with a bi-dimensional layout
-       private fun intern_init_vtable(ids: Array[Int], nb_methods: Array[Int], mask: Int): Pointer 
+       private fun intern_init_vtable(ids: Array[Int], nb_methods: Array[Int], deltas: Array[Int], mask: Int): Pointer 
                import Array[Int].length, Array[Int].[] `{
 
                // Allocate and fill current virtual table
@@ -273,15 +397,16 @@ class MemoryManager
                int nb_classes = Array_of_Int_length(nb_methods);
                for(i = 0; i<nb_classes; i++) {
                        /* - One for each method of this class
-                       *  - One for the delta (pointer to attributes)
+                       *  - One for the delta (offset of this group of attributes in objects)
                        *  - One for the id 
                        */
                        total_size += Array_of_Int__index(nb_methods, i);
                        total_size += 2;
                }
 
-               // And the size of the perfect hashtable
-               total_size += mask+1;
+               // Add the size of the perfect hashtable (mask +1)
+               // Add one because we start to fill the vtable at position 1 (0 is the init position)
+               total_size += mask+2;
                long unsigned int* vtable = malloc(sizeof(long unsigned int)*total_size);
                
                // Initialisation to the first position of the virtual table (ie : Object)
@@ -298,11 +423,12 @@ class MemoryManager
                        /*
                                vtable[hv] contains a pointer to the group of introducted methods
                                For each superclasse we have in virtual table :
-                                       (id | delta (attributes) | introduced methods)
+                                       (id | delta | introduced methods)
                        */
                        int hv = mask & Array_of_Int__index(ids, i);
 
                        vtable[current_size] = Array_of_Int__index(ids, i);
+                       vtable[current_size + 1] = Array_of_Int__index(deltas, i);
                        vtable[-hv] = (long unsigned int)&(vtable[current_size]);
                        
                        current_size += 2;
index 5ab6412..ecd5018 100644 (file)
@@ -17,7 +17,7 @@
 import kernel
 
 class A
-       var _i: Int
+       var i: Int
        redef fun output do _i.output
        init(i: Int) do _i = i
 end
diff --git a/tests/base_as_notnull2.nit b/tests/base_as_notnull2.nit
new file mode 100644 (file)
index 0000000..d9ad95c
--- /dev/null
@@ -0,0 +1,64 @@
+# 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 kernel
+
+class G[E]
+       fun foo(e: E): E
+       do
+               var ee = e.as(not null)
+               ee.output
+               return ee
+       end
+end
+
+class A
+       super G[Object]
+       redef fun foo(e)
+       do
+               var ee = e.as(not null)
+               ee.output
+               return ee
+       end
+end
+
+class B[F: Object]
+       super G[nullable F]
+       redef fun foo(e)
+       do
+               var ee = e.as(not null)
+               ee.output
+               return ee
+       end
+end
+
+class C[F: Object]
+       super G[F]
+       redef fun foo(e)
+       do
+               var ee = e.as(not null)
+               ee.output
+               return ee
+       end
+end
+
+var a = new A
+a.foo(1).output
+#alt1#a.foo(null).output
+var b = new B[Int]
+b.foo(2).output
+#alt2#b.foo(null).output
+var c = new C[Int]
+c.foo(3).output
+#alt3#c.foo(null).output
diff --git a/tests/base_as_notnull_int.nit b/tests/base_as_notnull_int.nit
new file mode 100644 (file)
index 0000000..0b19e6e
--- /dev/null
@@ -0,0 +1,23 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import kernel
+
+var i: Int = 1
+i.as(not null).output
+var oi: Object = i
+oi.as(not null).output
+var ni: nullable Int = i
+ni.as(not null).output
+
index 5c81c2b..4daed95 100644 (file)
@@ -24,8 +24,8 @@ class Int
 end
 
 class Foo
-       var _a1: Int
-       var _a2: Int
+       var a1: Int
+       var a2: Int
        fun run
        do
                _a1.output
@@ -41,7 +41,7 @@ end
 
 class Bar
        super Foo
-       var _a3: Int
+       var a3: Int
        redef fun run
        do
                _a1.output
index df439a1..204b0c9 100644 (file)
@@ -31,7 +31,7 @@ class A
        protected var a11: Object private writable = self
        private var a12: Object private writable = self
 
-       var _cpt: Int = 0
+       var cpt: Int = 0
 
        redef fun output
        do
index cc918bd..56c88da 100644 (file)
@@ -37,23 +37,24 @@ class B
        #alt4#redef var foo: Int writable = 10
        #alt5#var foo: Int redef writable = 10
        #alt6#redef var foo: Int redef writable = 10
-
+       #alt7#redef var foo
        #alt11#var bar: Int = 20
        #alt12#redef var bar: Int = 20
        #alt13#var bar: Int writable = 20
        #alt14#redef var bar: Int writable = 20
        #alt15#var bar: Int redef writable = 20
        #alt16#redef var bar: Int redef writable = 20
-
+       #alt17#redef var bar
        #alt21#var baz: Int = 30
        #alt22#redef var baz: Int = 30
        #alt23#var baz: Int writable = 30
        #alt24#redef var baz: Int writable = 30
        #alt25#var baz: Int redef writable = 30
        #alt26#redef var baz: Int redef writable = 30
+       #alt27#redef var baz
 end
 
-var b = new B
+var b = new B #alt7,17,27# var b = new B(100)
 b.foo.output
 #alt2#b.foo = 100
 #alt4#b.foo = 100
index 9ed6c10..cbddbb7 100644 (file)
@@ -20,5 +20,5 @@ end
 class Int
 end
 class A
-       var _i: Int = 1
+       var i: Int = 1
 end
index f3a1178..5fc7e11 100644 (file)
@@ -29,14 +29,14 @@ enum Bool
 end
 
 class Integer
-       var _val: Int
+       var val: Int
        init(val: Int) do _val = val
        fun output do _val.output
 end
 
 class Foo
-       var _a1: Integer
-       var _a2: Integer
+       var a1: Integer
+       var a2: Integer
        fun run
        do
                _a1.output
@@ -64,9 +64,9 @@ end
 
 class Bar
        super Foo
-       var _a3: Integer#alt1# #alt2#
-       #alt1#var _a3: Integer = new Integer(9000)
-       #alt2#var _a3: nullable Integer
+       var a3: Integer#alt1# #alt2#
+       #alt1#var a3: Integer = new Integer(9000)
+       #alt2#var a3: nullable Integer
        redef fun run
        do
                _a1.output
index 08ad503..1d0ddab 100644 (file)
@@ -25,14 +25,14 @@ enum Int
 end
 
 class Integer
-       var _val: Int
+       var val: Int
        init(val: Int) do _val = val
        fun output do _val.output
 end
 
 class Foo
-       var _a1: Integer
-       var _a2: Integer
+       var a1: Integer
+       var a2: Integer
        fun run
        do
                _a1.output
@@ -58,7 +58,7 @@ end
 
 class Bar
        super Foo
-       var _a3: Integer
+       var a3: Integer
        redef fun run
        do
                _a1.output
index 063dd14..3276d2c 100644 (file)
@@ -25,8 +25,8 @@ enum Int
 end
 
 class Foo
-       var _a1: Int
-       var _a2: Int
+       var a1: Int
+       var a2: Int
        fun run
        do
                _a1.output
@@ -52,7 +52,7 @@ end
 
 class Bar
        super Foo
-       var _a3: Int
+       var a3: Int
        redef fun run
        do
                _a1.output
index cd9061c..aa0efd2 100644 (file)
@@ -17,7 +17,7 @@
 import kernel
 
 class Client
-       var _budjet: Int # 
+       var budjet: Int #
        fun regarde(t: Tableau)
        do
                if t.joli and dans_mes_moyens(t.etiquette.prix) then
index f709c37..263d706 100644 (file)
@@ -30,7 +30,7 @@ end
 
 class B[E]
        redef fun output do _e.output
-       var _e: E
+       var e: E
        init(e: E) do _e = e
 end
 
@@ -40,8 +40,8 @@ class C[F, G]
                _f.output
                _g.output
        end
-       var _f: F
-       var _g: G
+       var f: F
+       var g: G
        init(f: F, g: G)
        do
                _f = f
diff --git a/tests/base_label_while2.nit b/tests/base_label_while2.nit
new file mode 100644 (file)
index 0000000..3beca77
--- /dev/null
@@ -0,0 +1,38 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2009 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.
+
+import kernel
+
+fun maybe: Bool do return true
+
+var a = 1
+1.output
+while a == 1 do
+       a = 2
+       2.output
+       while a == 2 do
+               a = 3
+               3.output
+               if maybe then
+               #alt4#break
+               #alt5#continue label
+               end
+               if maybe then break label
+               4.output
+       end label l2#alt6#end label
+       5.output
+end label#alt7#end label l1
+6.output
index fe19a24..078421c 100644 (file)
@@ -17,7 +17,7 @@
 import kernel
 
 class A
-       var _i: Int
+       var i: Int
        init (i: Int) do _i = i
        redef fun output do _i.output
 end
index 4ab32bd..2ba5388 100644 (file)
@@ -17,9 +17,9 @@
 import kernel
 
 class A
-       var _i: nullable Int = null
-       var _b: nullable Bool = null
-       var _c: nullable Char = null
+       var i: nullable Int = null
+       var b: nullable Bool = null
+       var c: nullable Char = null
 
        init
        do
index 5f9bfc6..195cb0d 100644 (file)
@@ -31,10 +31,10 @@ class C
 
        init
        do
-               1.output
+               10.output
        end
 end
 
 var a = new C  # A complex construction
-a.foo(2)       # A monormphic call
-a.bar(3)       # A polymorphic call
+a.foo(20)      # A monormphic call
+a.bar(30)      # A polymorphic call
index c0cb189..1161192 100644 (file)
@@ -17,7 +17,7 @@
 import kernel
 
 class A
-       var _foo: Int = 1
+       var foo: Int = 1
        fun +(i: Int): A do return new A
        redef fun output do 1.output
 end
index 972b2e5..22b36aa 100644 (file)
@@ -17,7 +17,7 @@
 import kernel
 
 class G[A: nullable Object]
-       var _a: A
+       var a: A
        init (a: A) do _a = a
 
        fun run
index 964fc39..e599f1b 100644 (file)
@@ -18,7 +18,7 @@ import kernel
 
 class A[E]
        type T: E
-       var _t: T
+       var t: T
        fun foo(t: T) do end
        fun foo2: T do return _t
        fun bar(t: A[T]) do end
index 0ead451..116d7d7 100644 (file)
@@ -22,7 +22,7 @@ end
 
 class A
        super Elt
-       var _a: Int
+       var a: Int
        redef fun val1: Int do return _a
 
        init(i: Int) do _a = i
@@ -30,7 +30,7 @@ end
 
 class Elt2
        super Elt
-       var _b: Int
+       var b: Int
        redef fun val1: Int do return _b/2
        redef fun val2: Int do return _b
        init initelt2(i: Int) do _b = i
@@ -43,8 +43,8 @@ end
 
 class C
        super Elt
-       var _c: Int
-       var _d: Int
+       var c: Int
+       var d: Int
        redef fun val1: Int do return _c end
        redef fun val2: Int do return _d end
 
@@ -89,7 +89,7 @@ class EltComparator
                _is_val1 = not _is_val1
        end
        
-       var _is_val1: Bool = false
+       var is_val1: Bool = false
 
        init do end
 end
index ae42bee..accbb45 100644 (file)
@@ -19,7 +19,7 @@ class Node
        do
                return _name
        end
-       var _name: String = "noname"
+       var name: String = "noname"
 end
 
 class WakeUpNode
@@ -31,13 +31,13 @@ class WakeUpNode
        do
                _scheduler.add_event(self, d)
        end
-       var _scheduler: Scheduler
+       var scheduler: Scheduler
        init do end
 end
 
 class NodeSource
        super Node
-       var _nexts: nullable ArraySet[NodeSink] = null
+       var nexts: nullable ArraySet[NodeSink] = null
        fun attach(n: NodeSink)
        # Add the sink `n' the the connected nodes
        # Do nothing if `n' is already connected
@@ -77,8 +77,8 @@ end
 #
 
 class Scheduler
-       var _time_list: Array[Couple[Int, WakeUpNode]] = new Array[Couple[Int, WakeUpNode]]
-       var _time: Int = 0 # What time is it ?
+       var time_list: Array[Couple[Int, WakeUpNode]] = new Array[Couple[Int, WakeUpNode]]
+       var time: Int = 0 # What time is it ?
        fun add_event(n: WakeUpNode, d: Int)
        # The node `n' whant to be weaked up in `d' time units
        do
@@ -137,7 +137,7 @@ class BeepSource
                send
                wake_up_in(_delay)
        end
-       var _delay: Int
+       var delay: Int
        fun start
        do
                wake_up_in(_delay)
@@ -172,7 +172,7 @@ end
 class NodeAlternate
        super NodeSink
        super NodeSource
-       var _last: nullable NodeSource
+       var last: nullable NodeSource
        redef fun recieve(n: NodeSource)
        do
                if n != _last then
@@ -190,7 +190,7 @@ end
 class NodeEat
        super CountSink
        super NodeSource
-       var _limit: Int
+       var limit: Int
        redef fun recieve(n: NodeSource)
        do
                var c = count + 1
@@ -213,7 +213,7 @@ class NodeDelay
        super NodeSource
        super NodeSink
        super WakeUpNode
-       var _delay: Int
+       var delay: Int
        redef fun recieve(n: NodeSource)
        do
                wake_up_in(_delay)
index 497cd8e..e10ed39 100644 (file)
@@ -15,6 +15,6 @@
 # limitations under the License.
 
 class A
-       var _toto: Int
-       var _toto: Object
+       var toto: Int
+       var toto: Object
 end
index ba807d1..173d9b5 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 class A
-       var _toto: Int
+       var toto: Int
        fun m
        do
                _toto = 't'
index 0b25f5c..0e90f64 100644 (file)
@@ -16,8 +16,8 @@
 
 
 class A
-       var _x: Object = fail
-       var _i: Int = 1
+       var x: Object = fail
+       var i: Int = 1
        fun y do fail
        fun z: Object do return fail
        fun t do
index b8555d3..13a16b5 100644 (file)
@@ -15,5 +15,5 @@
 # limitations under the License.
 
 class A[T]
-       var _k: T[Int]
+       var k: T[Int]
 end
index 8146788..e45209c 100644 (file)
@@ -15,5 +15,5 @@
 # limitations under the License.
 
 redef class Object
-       var _toto: Bool
+       var toto: Bool
 end
index 5140f70..5a0ea55 100644 (file)
@@ -15,5 +15,5 @@
 # limitations under the License.
 
 redef class Int
-       var _toto: Object
+       var toto: Object
 end
index dbee0ba..3022e6d 100644 (file)
@@ -17,5 +17,5 @@
 import module_simple
 
 redef class C
-       redef var _a: Int
+       redef var a: Int
 end
index e589ec7..5570921 100644 (file)
@@ -15,9 +15,9 @@
 # limitations under the License.
 
 class A
-       var _a: Int = 1
+       var a: Int = 1
 end
 class B
        super A
-       redef var _a: Object = 2
+       redef var a: Object = 2
 end
index 3b3744d..3d99198 100644 (file)
@@ -79,7 +79,7 @@ class Bottles
                _quantity = i
        end
 
-       var _quantity: Int
+       var quantity: Int
 end
 
 var i = 99
index ee46d40..da0cf31 100644 (file)
@@ -53,7 +53,7 @@ class Tower
                end
        end
 
-       var _t: Array[Int] # The stack of discus (only the diameter is stored).
+       var t: Array[Int] # The stack of discus (only the diameter is stored).
 
        init full(n: Int)
        # Build a new tower with `n' discus.
@@ -95,9 +95,9 @@ class Hanoi
                return "{_tower1} {_tower2} {_tower3}"
        end
 
-       var _tower1: Tower
-       var _tower2: Tower
-       var _tower3: Tower
+       var tower1: Tower
+       var tower2: Tower
+       var tower3: Tower
 
        init(nb: Int)
        do
index a0f69d6..f5aaf0d 100644 (file)
@@ -62,8 +62,8 @@ private
 # receveur ("self")
 
 # Les attributs sont déclarés par le mot clé "fun" et commencent par un "@"
-       var _nom_: String               # Un entrepôt a un nom (de type chaîne).
-       var _rayons: Array[Rayon]       # Il est composé d'un ensemble de rayon.
+       var nom_: String                # Un entrepôt a un nom (de type chaîne).
+       var rayons: Array[Rayon]        # Il est composé d'un ensemble de rayon.
        # "Array" est une classe paramétrée, les crochets en sont la marque.
        # La classe "Rayon" est définie plus loin
 
@@ -156,8 +156,8 @@ end
 
 class Produit
 private
-       var _nom_: String               # Désignation du produit
-       var _qte_: Int                  # Quantité en stock
+       var nom_: String                # Désignation du produit
+       var qte_: Int                   # Quantité en stock
 
 
 
@@ -208,8 +208,8 @@ end
 
 class Rayon
 private
-       var _stock: Array[Produit]              # Des produits en stock
-       var _rubrique: String                   # La catégorie des produits stockés
+       var stock: Array[Produit]               # Des produits en stock
+       var rubrique: String                    # La catégorie des produits stockés
 
        # Cette fonction est utilisé par to_s pour afficher un petit titre
        fun to_s_head: String
@@ -326,7 +326,7 @@ class RayonFroid
                return _temp_max_       # Attribut défini juste en dessous
        end
 
-       var _temp_max_: Int             # Une température maximale
+       var temp_max_: Int              # Une température maximale
        # Les autres attributs sont bien sûr hérités !
 
        redef fun to_s_head: String             # On redéfinit cette méthode
index 8a568f6..2ad57c5 100644 (file)
 
 class Point
 private
-       var _x: Int     # Abscisse
-       var _y: Int     # Ordonnée
-
-
-       fun x: Int
-       do
-               return _x
-       end
-       fun x=(i: Int)
-       do
-               _x = i
-       end
-
-       fun y: Int
-       do
-               return _y
-       end
-       fun y=(i: Int)
-       do
-               _y = i
-       end
+       var x: Int      # Abscisse
+       var y: Int      # Ordonnée
 
        # Change la position d'un point
        fun moveto(x: Int, y: Int)
index 9260d19..3cbaa2b 100644 (file)
@@ -19,7 +19,7 @@
 import kernel
 
 class Client
-       var _credit: Int
+       var credit: Int
        
        fun regarde(t: Tableau)
        do
index d595cdf..07f389a 100644 (file)
@@ -21,7 +21,7 @@
 # * try to change the optimization flags
 # * try to update your gcc version
 class Foo
-       var _count: Int = 0
+       var count: Int = 0
        fun run: Int
        do
                # Under some case gcc produce bad code here and make the if
index ba9dc49..c56e2dd 100644 (file)
@@ -28,5 +28,5 @@ class C
        super B
        fun r(x: B) do end
        fun s: B do return self end
-       var _a: B
+       var a: B
 end
index ac3c10d..3b38c54 100644 (file)
@@ -4,3 +4,4 @@
 --separate base_simple3.nit -o out/nitgs-base_simple3 ; out/nitgs-base_simple3
 --global ../examples/hello_world.nit -m test_mixin.nit -o out/nitg-hello_world_mixed ; out/nitg-hello_world_mixed
 --separate ../examples/hello_world.nit -m test_mixin.nit -o out/nitgs-hello_world_mixed ; out/nitgs-hello_world_mixed
+base_simple_import.nit base_simple.nit --dir out/ ; out/base_simple ; out/base_simple_import
diff --git a/tests/nitvm.skip b/tests/nitvm.skip
new file mode 100644 (file)
index 0000000..afed2b6
--- /dev/null
@@ -0,0 +1,21 @@
+init_inherit
+init_linext
+test_mem
+shoot_logic
+bench_
+nit_args1
+nit_args3
+nitvm_args1
+nitvm_args3
+nitc_args1
+nitg_args1
+nitg_args3
+nitg_args5
+nitg_args6
+test_markdown_args1
+pep8analysis
+test_android_platform
+android
+nitcc_parser_gen
+mnit
+emscripten
index c38c385..7c8bd9c 100644 (file)
@@ -17,7 +17,7 @@
 import kernel
 class A
        var foo: Int = 1
-       var _foo: Int = 2
+       var bar: Int = 2
 end
 
 var a: nullable A = null
@@ -26,6 +26,6 @@ var a: nullable A = null
 #alt1#a.foo.output
 #alt2#a.foo = 1
 #alt3#a.foo += 1
-#alt4#a._foo.output
-#alt5#a._foo = 10
-#alt6#a._foo += 10
+#alt4#a._bar.output
+#alt5#a._bar = 10
+#alt6#a._bar += 10
index 8f499ee..2380a43 100644 (file)
@@ -1,3 +1,7 @@
+base_as_notnull.nit:41,6--19: Warning: expression is already not null, since it is a `A`.
+base_as_notnull.nit:42,6--20: Warning: expression is already not null, since it is a `A`.
+base_as_notnull.nit:43,6--19: Warning: expression is already not null, since it is a `B`.
+base_as_notnull.nit:52,6--19: Warning: expression is already not null, since it is a `B`.
 1
 2
 3
diff --git a/tests/sav/base_as_notnull2.res b/tests/sav/base_as_notnull2.res
new file mode 100644 (file)
index 0000000..c426288
--- /dev/null
@@ -0,0 +1,8 @@
+base_as_notnull2.nit:30,12--25: Warning: expression is already not null, since it is a `G#0: Object`.
+base_as_notnull2.nit:50,12--25: Warning: expression is already not null, since it is a `G#0: Object`.
+1
+1
+2
+2
+3
+3
diff --git a/tests/sav/base_as_notnull2_alt1.res b/tests/sav/base_as_notnull2_alt1.res
new file mode 100644 (file)
index 0000000..e6b980e
--- /dev/null
@@ -0,0 +1,3 @@
+alt/base_as_notnull2_alt1.nit:30,12--25: Warning: expression is already not null, since it is a `G#0: Object`.
+alt/base_as_notnull2_alt1.nit:50,12--25: Warning: expression is already not null, since it is a `G#0: Object`.
+alt/base_as_notnull2_alt1.nit:58,7--10: Type error: expected Object, got null
diff --git a/tests/sav/base_as_notnull2_alt2.res b/tests/sav/base_as_notnull2_alt2.res
new file mode 100644 (file)
index 0000000..0d136a8
--- /dev/null
@@ -0,0 +1,7 @@
+alt/base_as_notnull2_alt2.nit:30,12--25: Warning: expression is already not null, since it is a `G#0: Object`.
+alt/base_as_notnull2_alt2.nit:50,12--25: Warning: expression is already not null, since it is a `G#0: Object`.
+Runtime error: Cast failed (alt/base_as_notnull2_alt2.nit:40)
+1
+1
+2
+2
diff --git a/tests/sav/base_as_notnull2_alt3.res b/tests/sav/base_as_notnull2_alt3.res
new file mode 100644 (file)
index 0000000..c166c42
--- /dev/null
@@ -0,0 +1,3 @@
+alt/base_as_notnull2_alt3.nit:30,12--25: Warning: expression is already not null, since it is a `G#0: Object`.
+alt/base_as_notnull2_alt3.nit:50,12--25: Warning: expression is already not null, since it is a `G#0: Object`.
+alt/base_as_notnull2_alt3.nit:64,7--10: Type error: expected Int, got null
index 60b7d08..ad6b798 100644 (file)
@@ -1 +1,6 @@
+alt/base_as_notnull_alt1.nit:41,6--19: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt1.nit:42,6--20: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt1.nit:43,6--19: Warning: expression is already not null, since it is a `B`.
+alt/base_as_notnull_alt1.nit:50,6--19: Warning: expression is already not null, since it is a `A`.
 alt/base_as_notnull_alt1.nit:50,6--19: Type error: expected B, got A
+alt/base_as_notnull_alt1.nit:52,6--19: Warning: expression is already not null, since it is a `B`.
index c076807..0e0e68c 100644 (file)
@@ -1 +1,6 @@
+alt/base_as_notnull_alt2.nit:41,6--19: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt2.nit:42,6--20: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt2.nit:43,6--19: Warning: expression is already not null, since it is a `B`.
+alt/base_as_notnull_alt2.nit:51,6--20: Warning: expression is already not null, since it is a `A`.
 alt/base_as_notnull_alt2.nit:51,6--20: Type error: expected B, got A
+alt/base_as_notnull_alt2.nit:52,6--19: Warning: expression is already not null, since it is a `B`.
index a88beb6..bd83530 100644 (file)
@@ -1 +1,5 @@
+alt/base_as_notnull_alt3.nit:41,6--19: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt3.nit:42,6--20: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt3.nit:43,6--19: Warning: expression is already not null, since it is a `B`.
+alt/base_as_notnull_alt3.nit:52,6--19: Warning: expression is already not null, since it is a `B`.
 alt/base_as_notnull_alt3.nit:53,6--20: Type error: expected B, got A
index ff16195..0050108 100644 (file)
@@ -1 +1,5 @@
+alt/base_as_notnull_alt4.nit:41,6--19: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt4.nit:42,6--20: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt4.nit:43,6--19: Warning: expression is already not null, since it is a `B`.
+alt/base_as_notnull_alt4.nit:52,6--19: Warning: expression is already not null, since it is a `B`.
 alt/base_as_notnull_alt4.nit:54,6--21: Type error: expected B, got A
index 917dafb..d8136e9 100644 (file)
@@ -1,3 +1,7 @@
+alt/base_as_notnull_alt5.nit:41,6--19: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt5.nit:42,6--20: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt5.nit:43,6--19: Warning: expression is already not null, since it is a `B`.
+alt/base_as_notnull_alt5.nit:52,6--19: Warning: expression is already not null, since it is a `B`.
 Runtime error: Cast failed (alt/base_as_notnull_alt5.nit:59)
 1
 2
index 49784b7..7083fa3 100644 (file)
@@ -1,3 +1,7 @@
+alt/base_as_notnull_alt6.nit:41,6--19: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt6.nit:42,6--20: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt6.nit:43,6--19: Warning: expression is already not null, since it is a `B`.
+alt/base_as_notnull_alt6.nit:52,6--19: Warning: expression is already not null, since it is a `B`.
 Runtime error: Cast failed (alt/base_as_notnull_alt6.nit:60)
 1
 2
index 0419b7f..38f0903 100644 (file)
@@ -1 +1,5 @@
+alt/base_as_notnull_alt7.nit:41,6--19: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt7.nit:42,6--20: Warning: expression is already not null, since it is a `A`.
+alt/base_as_notnull_alt7.nit:43,6--19: Warning: expression is already not null, since it is a `B`.
+alt/base_as_notnull_alt7.nit:52,6--19: Warning: expression is already not null, since it is a `B`.
 alt/base_as_notnull_alt7.nit:61,1--17: Type error: as(not null) on null
diff --git a/tests/sav/base_as_notnull_int.res b/tests/sav/base_as_notnull_int.res
new file mode 100644 (file)
index 0000000..4635340
--- /dev/null
@@ -0,0 +1,5 @@
+base_as_notnull_int.nit:18,1--14: Warning: expression is already not null, since it is a `Int`.
+base_as_notnull_int.nit:20,1--15: Warning: expression is already not null, since it is a `Object`.
+1
+1
+1
diff --git a/tests/sav/base_attr5_alt17.res b/tests/sav/base_attr5_alt17.res
new file mode 100644 (file)
index 0000000..03ea677
--- /dev/null
@@ -0,0 +1,2 @@
+alt/base_attr5_alt17.nit:47,12--14: Error: No property B::bar is inherited. Remove the redef keyword to define a new property.
+alt/base_attr5_alt17.nit:47,12--14: Error: Untyped attribute base_attr5_alt17#B#_bar
index 522382e..38a4119 100644 (file)
@@ -1 +1,7 @@
-alt/base_attr5_alt22.nit:49,12--14: Redef error: B::baz= is an inherited property. To redefine it, add the redef keyword.
+1
+1
+
+#200
+
+30
+300
index 6e9c596..38a4119 100644 (file)
@@ -1 +1,7 @@
-alt/base_attr5_alt24.nit:51,12--14: Redef error: B::baz= is an inherited property. To redefine it, add the redef keyword.
+1
+1
+
+#200
+
+30
+300
diff --git a/tests/sav/base_attr5_alt27.res b/tests/sav/base_attr5_alt27.res
new file mode 100644 (file)
index 0000000..f7d5094
--- /dev/null
@@ -0,0 +1,7 @@
+1
+1
+
+#200
+
+100
+300
diff --git a/tests/sav/base_attr5_alt7.res b/tests/sav/base_attr5_alt7.res
new file mode 100644 (file)
index 0000000..a5bfa07
--- /dev/null
@@ -0,0 +1,8 @@
+100
+100
+
+#200
+
+3
+#300
+3
index 84092c8..abedd5e 100644 (file)
@@ -1 +1 @@
-Runtime error: Uninitialized attribute @e (alt/base_attr_gen_alt1.nit:26)
+Runtime error: Uninitialized attribute _e (alt/base_attr_gen_alt1.nit:26)
diff --git a/tests/sav/base_label_while2.res b/tests/sav/base_label_while2.res
new file mode 100644 (file)
index 0000000..c65db77
--- /dev/null
@@ -0,0 +1,4 @@
+1
+2
+3
+6
diff --git a/tests/sav/base_label_while2_alt4.res b/tests/sav/base_label_while2_alt4.res
new file mode 100644 (file)
index 0000000..150a5fb
--- /dev/null
@@ -0,0 +1,5 @@
+1
+2
+3
+5
+6
diff --git a/tests/sav/base_label_while2_alt5.res b/tests/sav/base_label_while2_alt5.res
new file mode 100644 (file)
index 0000000..c65db77
--- /dev/null
@@ -0,0 +1,4 @@
+1
+2
+3
+6
diff --git a/tests/sav/base_label_while2_alt6.res b/tests/sav/base_label_while2_alt6.res
new file mode 100644 (file)
index 0000000..48cf58d
--- /dev/null
@@ -0,0 +1 @@
+alt/base_label_while2_alt6.nit:35,6--10: Syntax error: anonymous label already defined.
diff --git a/tests/sav/base_label_while2_alt7.res b/tests/sav/base_label_while2_alt7.res
new file mode 100644 (file)
index 0000000..eb284b5
--- /dev/null
@@ -0,0 +1 @@
+alt/base_label_while2_alt7.nit:33,23--27: Syntax error: invalid anonymous label.
index 0ee41fd..5cb4cca 100644 (file)
@@ -1 +1 @@
-error_attr_2def.nit:19,6--10: Error: A property _toto is already defined in class A at line 18.
+error_attr_2def.nit:19,6--9: Error: A property toto is already defined in class A at line 18.
index 033aaaa..e0e3b61 100644 (file)
@@ -1,4 +1,4 @@
-error_expr_not_ok.nit:19,19--22: Error: Method or variable 'fail' unknown in A.
+error_expr_not_ok.nit:19,18--21: Error: Method or variable 'fail' unknown in A.
 error_expr_not_ok.nit:21,11--14: Error: Method or variable 'fail' unknown in A.
 error_expr_not_ok.nit:22,26--29: Error: Method or variable 'fail' unknown in A.
 error_expr_not_ok.nit:24,8--11: Error: Method or variable 'fail' unknown in A.
index 2c60a13..b798295 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_expr_not_ok_alt2.nit:19,19--22: Error: Method or variable 'fail' unknown in A.
+alt/error_expr_not_ok_alt2.nit:19,18--21: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt2.nit:21,11--14: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt2.nit:22,26--29: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt2.nit:24,8--11: Error: Method or variable 'fail' unknown in A.
index 7aaa75d..2da48e6 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_expr_not_ok_alt3.nit:19,19--22: Error: Method or variable 'fail' unknown in A.
+alt/error_expr_not_ok_alt3.nit:19,18--21: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt3.nit:21,11--14: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt3.nit:22,26--29: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt3.nit:24,8--11: Error: Method or variable 'fail' unknown in A.
index 3919001..0e3f1e5 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_expr_not_ok_alt4.nit:19,19--22: Error: Method or variable 'fail' unknown in A.
+alt/error_expr_not_ok_alt4.nit:19,18--21: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt4.nit:21,11--14: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt4.nit:22,26--29: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt4.nit:24,8--11: Error: Method or variable 'fail' unknown in A.
@@ -106,6 +106,7 @@ alt/error_expr_not_ok_alt4.nit:147,7--18: Type error: expected A, got Array[Int]
 alt/error_expr_not_ok_alt4.nit:149,7--24: Type error: expected A, got String
 alt/error_expr_not_ok_alt4.nit:150,7--18: Warning: Expression is already a Int.
 alt/error_expr_not_ok_alt4.nit:150,7--18: Type error: expected A, got Int
+alt/error_expr_not_ok_alt4.nit:151,7--23: Warning: expression is already not null, since it is a `Int`.
 alt/error_expr_not_ok_alt4.nit:151,7--23: Type error: expected A, got Int
 alt/error_expr_not_ok_alt4.nit:152,7--18: Warning: Expression is already a Int.
 alt/error_expr_not_ok_alt4.nit:152,7--18: Type error: expected A, got Bool
index d9dd373..b85ac5b 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_expr_not_ok_alt5.nit:19,19--22: Error: Method or variable 'fail' unknown in A.
+alt/error_expr_not_ok_alt5.nit:19,18--21: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt5.nit:21,11--14: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt5.nit:22,26--29: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt5.nit:24,8--11: Error: Method or variable 'fail' unknown in A.
@@ -101,6 +101,7 @@ alt/error_expr_not_ok_alt5.nit:147,7--18: Type error: expected A, got Array[Int]
 alt/error_expr_not_ok_alt5.nit:149,7--24: Type error: expected A, got String
 alt/error_expr_not_ok_alt5.nit:150,7--18: Warning: Expression is already a Int.
 alt/error_expr_not_ok_alt5.nit:150,7--18: Type error: expected A, got Int
+alt/error_expr_not_ok_alt5.nit:151,7--23: Warning: expression is already not null, since it is a `Int`.
 alt/error_expr_not_ok_alt5.nit:151,7--23: Type error: expected A, got Int
 alt/error_expr_not_ok_alt5.nit:152,7--18: Warning: Expression is already a Int.
 alt/error_expr_not_ok_alt5.nit:152,7--18: Type error: expected A, got Bool
index 212ed6f..039e32d 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_expr_not_ok_alt6.nit:19,19--22: Error: Method or variable 'fail' unknown in A.
+alt/error_expr_not_ok_alt6.nit:19,18--21: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt6.nit:21,11--14: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt6.nit:22,26--29: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt6.nit:24,8--11: Error: Method or variable 'fail' unknown in A.
@@ -105,6 +105,7 @@ alt/error_expr_not_ok_alt6.nit:147,7--18: Type error: expected A, got Array[Int]
 alt/error_expr_not_ok_alt6.nit:149,7--24: Type error: expected A, got String
 alt/error_expr_not_ok_alt6.nit:150,7--18: Warning: Expression is already a Int.
 alt/error_expr_not_ok_alt6.nit:150,7--18: Type error: expected A, got Int
+alt/error_expr_not_ok_alt6.nit:151,7--23: Warning: expression is already not null, since it is a `Int`.
 alt/error_expr_not_ok_alt6.nit:151,7--23: Type error: expected A, got Int
 alt/error_expr_not_ok_alt6.nit:152,7--18: Warning: Expression is already a Int.
 alt/error_expr_not_ok_alt6.nit:152,7--18: Type error: expected A, got Bool
index 364b57b..91cbe5e 100644 (file)
@@ -1 +1 @@
-error_formal.nit:18,10--14: Type error: formal type T cannot have formal parameters.
+error_formal.nit:18,9--13: Type error: formal type T cannot have formal parameters.
index b2cd1ac..5c7b1a6 100644 (file)
@@ -1 +1 @@
-error_kern_attr_any.nit:18,6--10: Error: Attempt to define attribute _toto in the interface Object.
+error_kern_attr_any.nit:18,6--9: Error: Attempt to define attribute toto in the interface Object.
index 9043452..f870a60 100644 (file)
@@ -1 +1 @@
-error_kern_attr_int.nit:18,6--10: Error: Attempt to define attribute _toto in the interface Int.
+error_kern_attr_int.nit:18,6--9: Error: Attempt to define attribute toto in the interface Int.
index e683282..3ff4b7d 100644 (file)
@@ -1 +1 @@
-error_ref_attr.nit:20,16--18: Redef Error: Wrong static type. found Int, expected B.
+error_ref_attr.nit:20,15--17: Redef Error: Wrong return type. found Int, expected B.
index c300561..6f78128 100644 (file)
@@ -1 +1,2 @@
-error_spe_attr.nit:22,16--21: Redef Error: Wrong static type. found Object, expected Int.
+error_spe_attr.nit:22,15--20: Redef Error: Wrong return type. found Object, expected Int.
+error_spe_attr.nit:22,15--20: Redef Error: Wrong type for parameter `a'. found Object, expected Int.
diff --git a/tests/sav/fixme/nitvm_args3.res b/tests/sav/fixme/nitvm_args3.res
new file mode 100644 (file)
index 0000000..4ad3dc3
--- /dev/null
@@ -0,0 +1 @@
+UNDEFINED
index 0b70dcf..7e99042 100644 (file)
@@ -1 +1 @@
-LR automaton: 91 states (see nitcc0.lr.dot)
+LR automaton: 93 states (see nitcc0.lr.dot)
diff --git a/tests/sav/nitg-g/fixme/simple_android.res b/tests/sav/nitg-g/fixme/simple_android.res
new file mode 100644 (file)
index 0000000..4ad3dc3
--- /dev/null
@@ -0,0 +1 @@
+UNDEFINED
diff --git a/tests/sav/nitg-sg/fixme/simple_android.res b/tests/sav/nitg-sg/fixme/simple_android.res
new file mode 100644 (file)
index 0000000..4ad3dc3
--- /dev/null
@@ -0,0 +1 @@
+UNDEFINED
index 855e58d..60ea2fa 100644 (file)
@@ -1,3 +1,3 @@
-Usage: nitg [OPTION]... file.nit
+Usage: nitg [OPTION]... file.nit...
 Compiles Nit programs.
 Use --help for help
diff --git a/tests/sav/nitg_args7.res b/tests/sav/nitg_args7.res
new file mode 100644 (file)
index 0000000..81b98b4
--- /dev/null
@@ -0,0 +1,12 @@
+1
+2
+2
+3
+3
+3
+10
+20
+20
+30
+30
+30
index 855e58d..60ea2fa 100644 (file)
@@ -1,3 +1,3 @@
-Usage: nitg [OPTION]... file.nit
+Usage: nitg [OPTION]... file.nit...
 Compiles Nit programs.
 Use --help for help
index 865f879..e9a2a27 100644 (file)
@@ -1,3 +1,3 @@
-Runtime error: Uninitialized attribute @j (alt/base_attr_init_val_raf_alt1.nit:24)
+Runtime error: Uninitialized attribute _j (alt/base_attr_init_val_raf_alt1.nit:24)
 1
 1
index dbd5b3f..69408b6 100644 (file)
@@ -1 +1 @@
-Runtime error: Uninitialized attribute @a (alt/rterror_attr_def_alt2.nit:26)
+Runtime error: Uninitialized attribute _a (alt/rterror_attr_def_alt2.nit:26)
index 4d56903..ca215fe 100644 (file)
@@ -1,2 +1,2 @@
-Runtime error: Uninitialized attribute @a (alt/rterror_attr_def_alt7.nit:49)
+Runtime error: Uninitialized attribute _a (alt/rterror_attr_def_alt7.nit:49)
 c
index f14eb40..6a4d282 100644 (file)
@@ -32,7 +32,7 @@
 </span></span><span class="line" id="L32"><span class="nc_k">end</span>
 </span></span><span class="line" id="L33">
 </span><span class="nc_cdef foldable" id="base_simple3#B"><span class="line" id="L34"><span class="nc_k">class</span> <span class="nc_def nc_t popupable" title="class B" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B&quot;&gt;class B&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;B&lt;/span&gt;&lt;br/&gt;&lt;div class=&quot;dropdown&quot;&gt; &lt;a data-toggle=&quot;dropdown&quot; href=&quot;#&quot;&gt;&lt;b&gt;hier&lt;/b&gt; super-classes&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul class=&quot;dropdown-menu&quot; role=&quot;menu&quot; aria-labelledby=&quot;dLabel&quot;&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;Object&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;" data-toggle="popover">B</span>
-</span><span class="nc_pdef foldable" id="base_simple3#B#@val"><a id="base_simple3#B#val"></a><a id="base_simple3#B#val="></a><span class="line" id="L35">     <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#B#val" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B#val&quot;&gt;base_simple3#B#val&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span>
+</span><span class="nc_pdef foldable" id="base_simple3#B#_val"><a id="base_simple3#B#val"></a><a id="base_simple3#B#val="></a><span class="line" id="L35">     <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#B#val" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B#val&quot;&gt;base_simple3#B#val&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span>
 </span></span><span class="nc_pdef foldable" id="base_simple3#B#init"><span class="line" id="L36">     <span class="nc_k">init</span><span>(</span><span class="nc_v nc_i popupable" title="v: Int" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;v:&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">v</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span><span>)</span>
 </span><span class="line" id="L37">    <span class="nc_k">do</span>
 </span><span class="line" id="L38">            <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">7</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
@@ -42,8 +42,8 @@
 </span></span><span class="line" id="L42"><span class="nc_k">end</span>
 </span></span><span class="line" id="L43">
 </span><span class="nc_cdef foldable" id="base_simple3#C"><span class="line" id="L44"><span class="nc_k">class</span> <span class="nc_def nc_t popupable" title="class C" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C&quot;&gt;class C&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;C&lt;/span&gt;&lt;br/&gt;&lt;div class=&quot;dropdown&quot;&gt; &lt;a data-toggle=&quot;dropdown&quot; href=&quot;#&quot;&gt;&lt;b&gt;hier&lt;/b&gt; super-classes&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul class=&quot;dropdown-menu&quot; role=&quot;menu&quot; aria-labelledby=&quot;dLabel&quot;&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;Object&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;" data-toggle="popover">C</span>
-</span><span class="nc_pdef foldable" id="base_simple3#C#@val1"><a id="base_simple3#C#val1"></a><a id="base_simple3#C#val1="></a><span class="line" id="L45">  <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#C#val1" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C#val1&quot;&gt;base_simple3#C#val1&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val1&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val1</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span>
-</span></span><span class="nc_pdef foldable" id="base_simple3#C#@val2"><a id="base_simple3#C#val2"></a><a id="base_simple3#C#val2="></a><span class="line" id="L46">   <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#C#val2" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C#val2&quot;&gt;base_simple3#C#val2&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val2&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val2</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span> <span>=</span> <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">10</span>
+</span><span class="nc_pdef foldable" id="base_simple3#C#_val1"><a id="base_simple3#C#val1"></a><a id="base_simple3#C#val1="></a><span class="line" id="L45">  <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#C#val1" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C#val1&quot;&gt;base_simple3#C#val1&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val1&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val1</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span>
+</span></span><span class="nc_pdef foldable" id="base_simple3#C#_val2"><a id="base_simple3#C#val2"></a><a id="base_simple3#C#val2="></a><span class="line" id="L46">   <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#C#val2" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C#val2&quot;&gt;base_simple3#C#val2&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val2&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val2</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span> <span>=</span> <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">10</span>
 </span></span><span class="line" id="L47"><span class="nc_k">end</span>
 </span></span><span class="line" id="L48">
 </span><span class="nc_pdef foldable" id="base_simple3#Object#foo"><span class="line" id="L49"><span class="nc_k">fun</span> <span class="nc_def popupable" title="base_simple3#Object#foo" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Object#foo&quot;&gt;base_simple3#Object#foo&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;foo&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover"><span class="nc_i">foo</span></span> <span class="nc_k">do</span> <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">2</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
index 4540753..9dc118b 100644 (file)
          std: 0.926
          sum: 6
        cnbp: number of accessible properties (inherited + local)
-         avg: 4.0
-         max: C (8)
+         avg: 5.0
+         max: C (10)
          min: Object (3)
-         std: 2.0
-         sum: 34
+         std: 2.507
+         sum: 37
        cnba: number of accessible attributes (inherited + local)
          avg: 0.0
-         max: Object (0)
+         max: C (2)
          min: Object (0)
-         std: 0.0
-         sum: 0
+         std: 0.845
+         sum: 3
        cnbip: number of introduced properties
          avg: 2.0
-         max: C (5)
+         max: C (7)
          min: Bool (0)
-         std: 1.69
-         sum: 16
+         std: 2.42
+         sum: 19
        cnbrp: number of redefined properties
          avg: 0.0
          max: Object (0)
          sum: 6
        cnbp: number of accessible properties (inherited + local)
          avg: 4.0
-         max: C (8)
+         max: C (10)
          min: Object (1)
-         std: 2.151
-         sum: 35
+         std: 2.828
+         sum: 38
        cnba: number of accessible attributes (inherited + local)
          avg: 0.0
-         max: Object (0)
+         max: C (2)
          min: Object (0)
-         std: 0.0
-         sum: 0
+         std: 0.791
+         sum: 3
        cnbip: number of introduced properties
          avg: 2.0
-         max: C (5)
+         max: C (7)
          min: Bool (0)
-         std: 1.62
-         sum: 17
+         std: 2.291
+         sum: 20
        cnbrp: number of redefined properties
          avg: 0.0
          max: Object (0)
@@ -638,10 +638,10 @@ generating out/nitmetrics_args1.write/module_hierarchy.dot
   `- group base_simple3
        cnba: number of accessible attributes (inherited + local)
          avg: 0.0
-         max: Object (0)
+         max: C (2)
          min: Object (0)
-         std: 0.0
-         sum: 0
+         std: 0.845
+         sum: 3
        cnbna: number of accessible nullable attributes (inherited + local) -- nothing
          sum: 0
 
@@ -659,10 +659,10 @@ generating out/nitmetrics_args1.write/module_hierarchy.dot
  ## global metrics
        cnba: number of accessible attributes (inherited + local)
          avg: 0.0
-         max: Object (0)
+         max: C (2)
          min: Object (0)
-         std: 0.0
-         sum: 0
+         std: 0.791
+         sum: 3
        cnbna: number of accessible nullable attributes (inherited + local) -- nothing
          sum: 0
 --- Sends on Nullable Receiver ---
index c789f91..ce6ae7a 100644 (file)
@@ -1 +1 @@
-Runtime error: Uninitialized attribute @a (alt/rterror_attr_def_alt2.nit:24)
+Runtime error: Uninitialized attribute _a (alt/rterror_attr_def_alt2.nit:24)
index 4c1d495..d324a76 100644 (file)
@@ -1,2 +1,2 @@
-Runtime error: Uninitialized attribute @a (alt/rterror_attr_def_alt7.nit:24)
+Runtime error: Uninitialized attribute _a (alt/rterror_attr_def_alt7.nit:24)
 c
diff --git a/tests/sav/splay_test.res b/tests/sav/splay_test.res
new file mode 100644 (file)
index 0000000..a8191ea
--- /dev/null
@@ -0,0 +1,238 @@
+digraph g {
+[label = 6];
+ ->  [label = "left"];
+[label = "AB" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = AB"];
+ ->  [label = "right"];
+[label = 4];
+ ->  [label = "left"];
+[label = "CD" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = CD"];
+ ->  [label = "right"];
+[label = "EF" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = EF"];
+}
+
+ABCDEF
+digraph g {
+[label = 6];
+ ->  [label = "left"];
+[label = 4];
+ ->  [label = "left"];
+[label = "AB" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = AB"];
+ ->  [label = "right"];
+[label = "CD" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = CD"];
+ ->  [label = "right"];
+[label = "EF" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = EF"];
+}
+
+ABCDEF
+ABCDEFGH
+digraph g {
+[label = 8];
+ ->  [label = "left"];
+[label = 6];
+ ->  [label = "left"];
+[label = 4];
+ ->  [label = "left"];
+[label = "AB" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = AB"];
+ ->  [label = "right"];
+[label = "CD" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = CD"];
+ ->  [label = "right"];
+[label = "EF" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = EF"];
+ ->  [label = "right"];
+[label = "GH" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = GH"];
+}
+
+ABCDEFGH
+digraph g {
+[label = 8];
+ ->  [label = "left"];
+[label = "AB" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = AB"];
+ ->  [label = "right"];
+[label = 6];
+ ->  [label = "left"];
+[label = 4];
+ ->  [label = "left"];
+[label = "CD" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = CD"];
+ ->  [label = "right"];
+[label = "EF" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = EF"];
+ ->  [label = "right"];
+[label = "GH" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = GH"];
+}
+
+ABCDEFGH
+digraph g {
+[label = 8];
+ ->  [label = "left"];
+[label = "AB" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = AB"];
+ ->  [label = "right"];
+[label = 6];
+ ->  [label = "left"];
+[label = "CD" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = CD"];
+ ->  [label = "right"];
+[label = 4];
+ ->  [label = "left"];
+[label = "EF" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = EF"];
+ ->  [label = "right"];
+[label = "GH" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = GH"];
+}
+
+ABCDEFGH
+digraph g {
+[label = 8];
+ ->  [label = "left"];
+[label = 6];
+ ->  [label = "left"];
+[label = "AB" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = AB"];
+ ->  [label = "right"];
+[label = 4];
+ ->  [label = "left"];
+[label = "CD" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = CD"];
+ ->  [label = "right"];
+[label = "EF" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = EF"];
+ ->  [label = "right"];
+[label = "GH" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = GH"];
+}
+
+ABCDEFGH
+digraph g {
+[label = 8];
+ ->  [label = "left"];
+[label = 6];
+ ->  [label = "left"];
+[label = "AB" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = AB"];
+ ->  [label = "right"];
+[label = 4];
+ ->  [label = "left"];
+[label = "CD" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = CD"];
+ ->  [label = "right"];
+[label = "EF" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = EF"];
+ ->  [label = "right"];
+[label = "GH" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = GH"];
+}
+
+ABCDEFGH
+digraph g {
+[label = 8];
+ ->  [label = "left"];
+[label = 4];
+ ->  [label = "left"];
+[label = "AB" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = AB"];
+ ->  [label = "right"];
+[label = "CD" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = CD"];
+ ->  [label = "right"];
+[label = 4];
+ ->  [label = "left"];
+[label = "EF" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = EF"];
+ ->  [label = "right"];
+[label = "GH" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = GH"];
+}
+
+ABCDEFGH
+digraph g {
+[label = 8];
+ ->  [label = "left"];
+[label = "AB" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = AB"];
+ ->  [label = "right"];
+[label = 6];
+ ->  [label = "left"];
+[label = 4];
+ ->  [label = "left"];
+[label = "CD" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = CD"];
+ ->  [label = "right"];
+[label = "EF" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = EF"];
+ ->  [label = "right"];
+[label = "GH" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = GH"];
+}
+
+ABCDEFGH
+digraph g {
+[label = 8];
+ ->  [label = "left"];
+[label = 4];
+ ->  [label = "left"];
+[label = "AB" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = AB"];
+ ->  [label = "right"];
+[label = "CD" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = CD"];
+ ->  [label = "right"];
+[label = 4];
+ ->  [label = "left"];
+[label = "EF" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = EF"];
+ ->  [label = "right"];
+[label = "GH" shape = rect];
+ -> [label = "contains"];
+ [label="FlatString\nindex_from = 0\nindex_to = 1\nNativeString = GH"];
+}
+
diff --git a/tests/sav/test_ffi_java_generics.res b/tests/sav/test_ffi_java_generics.res
new file mode 100644 (file)
index 0000000..514b4d6
--- /dev/null
@@ -0,0 +1,12 @@
+a
+b
+c
+d
+e
+f
+e
+f
+remove: a
+remove: b
+remove: c
+remove: d
diff --git a/tests/sav/test_flatrope_alt1.res b/tests/sav/test_flatrope_alt1.res
new file mode 100644 (file)
index 0000000..5ec30ac
--- /dev/null
@@ -0,0 +1,5 @@
+quick brown fox over the lazy dog
+The quick brown fox over the lazy dog
+quick brown fox jumps over the lazy dog
+quick brown fox over the lazy dog.
+The quick brown fox jumps over the lazy dog.
diff --git a/tests/sav/test_neo4j.res b/tests/sav/test_neo4j.res
new file mode 100644 (file)
index 0000000..7ef1fa8
--- /dev/null
@@ -0,0 +1,27 @@
+# Test local
+
+Andres
+24
+true
+[1,2,3]
+PERSON MALE
+LOVES
+1999
+Andres LOVES Kate
+Kate IS LOVED BY Andres
+
+# Test lazy
+
+Andres
+24
+true
+[1,2,3]
+PERSON MALE
+Kate
+25
+false
+PERSON FEMALE
+LOVES
+1999
+Andres LOVES Kate
+Kate IS LOVED BY Andres
diff --git a/tests/sav/test_neo4j_batch.res b/tests/sav/test_neo4j_batch.res
new file mode 100644 (file)
index 0000000..80bb707
--- /dev/null
@@ -0,0 +1,15 @@
+# Save batch
+
+Andres
+24
+true
+[1,2,3]
+PERSON MALE
+Kate
+25
+false
+PERSON FEMALE
+LOVES
+1999
+Andres LOVES Kate
+Kate IS LOVED BY Andres
index fc001c0..dcea069 100644 (file)
@@ -3,6 +3,7 @@ Start ../src/test_parser.nit:17,1--152,1
     AModuledecl ../src/test_parser.nit:17,1--18,18
       ADoc ../src/test_parser.nit:17,1--18,0
         TComment "# Program used to test the NIT parser\n" ../src/test_parser.nit:17,1--18,0
+      APublicVisibility ../src/test_parser.nit:18,1
       TKwmodule "module" ../src/test_parser.nit:18,1--6
       AModuleName ../src/test_parser.nit:18,8--18
         TId "test_parser" ../src/test_parser.nit:18,8--18
diff --git a/tests/sav/test_ropes_alt1.res b/tests/sav/test_ropes_alt1.res
new file mode 100644 (file)
index 0000000..7e4b7c1
--- /dev/null
@@ -0,0 +1,26 @@
+NODEATTEST
+INZZ
+INDDZZ
+EEINDDZZ
+EEINDDZZFF
+eeinddzzff
+EEINDDZZFF
+FFZZDDNIEE
+hello_world.types.1.o
+now step live...
+...evil pets won
+now step live...
+now step live...
+ live...
+.
+ live stepnow
+...evil pets won
+n
+now step live... step live...
+w s
+ZZ
+ZZZZZZZZZZ
+ZZAAZZZZZZZZ
+NNZZAAZZZZZZZZ
+NIINZZAAZZZZZZZZ
+NINIINZZAAZZZZZZZZINZZAAZZZZZZZZ
diff --git a/tests/sav/test_sqlite3_nity.res b/tests/sav/test_sqlite3_nity.res
new file mode 100644 (file)
index 0000000..4101597
--- /dev/null
@@ -0,0 +1,12 @@
+####
+uname: Bob
+pass: zzz
+activated: 1
+perc: 77.7
+####
+uname: Guillaume
+pass: xxx
+activated: 1
+perc: 88.8
+true
+false
diff --git a/tests/sav/test_sqlite3_nity_alt1.res b/tests/sav/test_sqlite3_nity_alt1.res
new file mode 100644 (file)
index 0000000..4aa3a13
--- /dev/null
@@ -0,0 +1,2 @@
+Runtime error: Assert failed (alt/test_sqlite3_nity_alt1.nit:27)
+unable to open database file
diff --git a/tests/sav/test_sqlite3_nity_alt2.res b/tests/sav/test_sqlite3_nity_alt2.res
new file mode 100644 (file)
index 0000000..8d75750
--- /dev/null
@@ -0,0 +1,2 @@
+Runtime error: Assert failed (alt/test_sqlite3_nity_alt2.nit:39)
+SQL logic error or missing database
index 843263b..2bff123 100644 (file)
@@ -1,2 +1,2 @@
-test_variance_attr.nit:28,21--32: Redef Error: Wrong static type. found nullable Int, expected nullable Object.
-test_variance_attr.nit:29,21--30: Redef Error: Wrong static type. found nullable B, expected nullable A.
+test_variance_attr.nit:28,20--31: Redef Error: Wrong type for parameter `foo'. found nullable Int, expected nullable Object.
+test_variance_attr.nit:29,20--29: Redef Error: Wrong type for parameter `bar'. found nullable B, expected nullable A.
index 6ccd4be..a171b58 100644 (file)
@@ -20,9 +20,9 @@
 # contributed by Jean Privat
 
 class TreeNode
-    var _left: nullable TreeNode
-    var _right: nullable TreeNode
-    var _item: Int
+    var left: nullable TreeNode
+    var right: nullable TreeNode
+    var item: Int
 
 
     init(left: nullable TreeNode, right: nullable TreeNode, item: Int)
diff --git a/tests/splay_test.nit b/tests/splay_test.nit
new file mode 100644 (file)
index 0000000..dae8aef
--- /dev/null
@@ -0,0 +1,157 @@
+# 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.
+
+intrude import splay_ropes
+intrude import standard::ropes
+intrude import ropes_debug
+
+redef class Leaf
+       redef fun to_dot(s): String
+       do
+               s += "[label = \"{str}\" shape = rect];\n"
+               s += " -> [label = \"contains\"];\n"
+               s = str.to_dot(s)
+               return s
+       end
+end
+
+redef class Concat
+       redef fun to_dot(s): String
+       do
+               s += "[label = {length}];\n"
+               if left != null then
+                       s += " ->  [label = \"left\"];\n"
+                       s = left.to_dot(s)
+               end
+               if right != null then
+                       s += " ->  [label = \"right\"];\n"
+                       s = right.to_dot(s)
+               end
+               return s
+       end
+end
+
+redef class FlatString
+       redef fun to_dot(s: String): String
+       do
+               return s + " [label=\"FlatString\\nindex_from = {index_from}\\nindex_to = {index_to}\\nNativeString = {items.to_s_with_length(items.cstring_length)}\"];\n"
+       end
+end
+
+redef class FlatBuffer
+       redef fun to_dot(s: String): String
+       do
+               return s + " [label=\"FlatBuffer\\length = {length}\\ncapacity = {capacity}\\nitems = {items.to_s_with_length(items.cstring_length)}\"];\n"
+       end
+end
+
+
+redef class RopeString
+
+       redef fun to_dot(f)
+       do
+               var ret: String = new RopeString.from("digraph g \{\n")
+               ret = root.to_dot(ret).as(RopeString)
+               ret += "\}\n"
+               print ret
+               return ret
+       end
+
+end
+
+var ab = new StringLeaf("AB".as(FlatString))
+var cd = new StringLeaf("CD".as(FlatString))
+var ef = new StringLeaf("EF".as(FlatString))
+var gh = new StringLeaf("GH".as(FlatString))
+
+# Zig test
+
+var c = new Concat(cd,ef)
+c = new Concat(ab,c)
+var ro = new RopeString.from_root(c)
+
+ro.to_dot("Zig-Before_splay.dot")
+print ro
+
+var p = ro.node_at(5)
+
+ro = new RopeString.from_root(ro.splay(p).as(not null))
+
+ro.to_dot("Zig-After_splay.dot")
+print ro
+
+# Zig-zig test left left
+
+var d = new Concat(ab,cd)
+var e = new Concat(d,ef)
+var f = new Concat(e,gh)
+ro = new RopeString.from_root(f)
+
+p = ro.node_at(0)
+
+print ro
+ro.to_dot("Zig-zigll-Before_splay.dot")
+
+ro = new RopeString.from_root(ro.splay(p).as(not null))
+
+print ro
+ro.to_dot("Zig-zigll-After_splay.dot")
+
+# Zig-zig test right right
+
+d = new Concat(ef,gh)
+e = new Concat(cd,d)
+f = new Concat(ab,e)
+ro = new RopeString.from_root(f)
+
+p = ro.node_at(7)
+
+print ro
+ro.to_dot("Zig-zigrr-Before_splay.dot")
+
+ro = new RopeString.from_root(ro.splay(p).as(not null))
+
+print ro
+ro.to_dot("Zig-zigrr-After_splay.dot")
+
+# Zig-zag test left right
+
+d = new Concat(cd,ef)
+e = new Concat(ab,d)
+f = new Concat(e,gh)
+ro = new RopeString.from_root(f)
+
+p = ro.node_at(4)
+
+print ro
+ro.to_dot("Zig-zaglr-Before_splay.dot")
+
+ro = new RopeString.from_root(ro.splay(p).as(not null))
+
+print ro
+ro.to_dot("Zig-zaglr-After_splay.dot")
+
+# Zig-zag test right left
+
+d = new Concat(cd,ef)
+e = new Concat(d,gh)
+f = new Concat(ab,e)
+ro = new RopeString.from_root(f)
+
+p = ro.node_at(4)
+
+print ro
+ro.to_dot("Zig-zagrl-Before_splay.dot")
+
+ro = new RopeString.from_root(ro.splay(p).as(not null))
+
+print ro
+ro.to_dot("Zig-zagrl-After_splay.dot")
+
index b25b637..cb33878 100644 (file)
@@ -24,7 +24,7 @@ redef class Object
 end
 
 class Toto
-       var _a: Int
+       var a: Int
        redef fun output
        do
                printn(_a)
@@ -47,7 +47,7 @@ class Toto
 end
 
 class Test
-       var _t: Toto
+       var t: Toto
 
        init
        do
index 4d1951f..844ffee 100644 (file)
@@ -15,8 +15,8 @@
 # limitations under the License.
 
 class A
-       var _attribute: nullable A
-       var _num: Char
+       var attribute: nullable A
+       var num: Char
 
        fun foo=(a: nullable A)
        do
diff --git a/tests/test_ffi_c_lots_of_refs.nit b/tests/test_ffi_c_lots_of_refs.nit
new file mode 100644 (file)
index 0000000..79c2654
--- /dev/null
@@ -0,0 +1,49 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2014 Alexis Laferrière <alexis.laf@xymus.net>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     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.
+
+extern class As `{ A* `}
+       new (size: Int) `{
+               return malloc(sizeof(A) * size);
+       `}
+
+       fun []=(i: Int, v: A) `{
+               recv[i] = v;
+               A_incr_ref(v);
+       `}
+
+       fun [](i: Int): A `{
+               return recv[i];
+       `}
+end
+
+class A
+       var i: Int
+       var s: String
+
+       init(i: Int)
+       do
+               self.i = i
+               self.s = i.to_s
+       end
+
+       redef fun to_s do return "<{i} {s}>"
+end
+
+var length = 1000000
+var aaa = new As(length)
+for i in length.times do aaa[i] = new A(i)
+sys.force_garbage_collection
+for i in length.times do assert aaa[i].to_s == "<{i} {i}>"
diff --git a/tests/test_ffi_java_generics.nit b/tests/test_ffi_java_generics.nit
new file mode 100644 (file)
index 0000000..8c968fd
--- /dev/null
@@ -0,0 +1,54 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2014 Alexis Laferrière <alexis.laf@xymus.net>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     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.
+
+module test_ffi_java_generics
+
+import java
+
+in "Java" `{
+       import java.util.*;
+       import java.util.concurrent.LinkedBlockingQueue;
+`}
+
+extern class JavaQueueOfString in "Java" `{ java.util.Queue<String> `}
+       new in "Java" `{
+               return new LinkedBlockingQueue<String>();
+       `}
+
+       fun offer(o: JavaString) in "Java" `{ recv.offer(o); `}
+
+       fun remove: JavaString in "Java" `{ return recv.remove(); `}
+
+       redef fun output in "Java" `{
+               for (String s: recv) {
+                       System.out.println(s);
+               }
+       `}
+end
+
+var ll = new JavaQueueOfString
+ll.offer "a".to_java_string
+ll.offer "b".to_java_string
+ll.offer "c".to_java_string
+ll.offer "d".to_java_string
+ll.offer "e".to_java_string
+ll.offer "f".to_java_string
+ll.output
+print "remove: " + ll.remove.to_s
+print "remove: " + ll.remove.to_s
+print "remove: " + ll.remove.to_s
+print "remove: " + ll.remove.to_s
+ll.output
index 09644ca..4cf5e0b 100644 (file)
@@ -12,6 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+#alt1 import splay_ropes
+
 var st = "quick brown fox over the lazy dog"
 
 print st
index 698ad20..0d15f98 100644 (file)
@@ -16,7 +16,7 @@
 
 
 class Toto[E]
-   var _item: E
+   var item: E
    fun set(e: E)
       do _item = e end
    fun get: E
diff --git a/tests/test_neo4j.nit b/tests/test_neo4j.nit
new file mode 100644 (file)
index 0000000..f8cbd4b
--- /dev/null
@@ -0,0 +1,126 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import neo4j
+
+var key = get_time
+
+var srv = new Neo4jServer
+srv.start_quiet
+
+print "# Test local\n"
+
+var client = new Neo4jClient("http://localhost:7474")
+assert client.is_ok
+
+var andres = new NeoNode
+andres.labels.add_all(["PERSON", "MALE"])
+andres["name"] = "Andres"
+andres["age"] = 24
+andres["status"] = true
+andres["groups"] = new JsonArray.from([1, 2, 3])
+andres["key"] = key
+
+# Create node
+client.save_node(andres)
+assert andres.is_linked
+var andres_url = andres.url.to_s
+
+# Read Node
+var res1 = client.load_node(andres_url)
+assert res1.is_linked
+print res1["name"].to_s
+print res1["age"].to_s
+print res1["status"].to_s
+print res1["groups"].to_s
+print res1.labels.join(" ")
+assert res1.out_edges.is_empty
+
+# Create a second node
+var kate = new NeoNode
+kate.labels.add_all(["PERSON", "FEMALE"])
+kate["name"] = "Kate"
+kate["age"] = 25
+kate["status"] = false
+client.save_node(kate)
+assert kate.is_linked
+var kate_url = kate.url.to_s
+var res2 = client.load_node(kate_url)
+
+# Create an edge
+var loves = new NeoEdge(andres, "LOVES", kate)
+loves["since"] = 1999
+client.save_edge(loves)
+assert loves.is_linked
+var loves_url = loves.url.to_s
+
+# Check edge
+assert loves.from == andres
+assert loves.from == res1
+assert loves.to == kate
+assert loves.to == res2
+
+# Read edge
+var res3 = client.load_edge(loves_url)
+assert res3.is_linked
+print res3.rel_type.to_s
+print res3["since"].to_s
+
+# Follow edge
+print "{andres["name"].to_s} LOVES {andres.out_nodes("LOVES").first["name"].to_s}"
+print "{kate["name"].to_s} IS LOVED BY {kate.in_nodes("LOVES").first["name"].to_s}"
+
+print "\n# Test lazy\n"
+
+client = new Neo4jClient("http://localhost:7474")
+assert client.is_ok
+
+# Read Andres
+var res4 = client.load_node(andres_url)
+assert res4.is_linked
+print res4["name"].to_s
+print res4["age"].to_s
+print res4["status"].to_s
+print res4["groups"].to_s
+print res4.labels.join(" ")
+assert res4.in_edges.is_empty
+assert not res4.out_edges.is_empty
+
+# Read Kate
+var res5 = client.load_node(kate_url)
+assert res5.is_linked
+print res5["name"].to_s
+print res5["age"].to_s
+print res5["status"].to_s
+print res5.labels.join(" ")
+assert not res5.in_edges.is_empty
+assert res5.out_edges.is_empty
+
+# Read LOVES
+var res6 = client.load_edge(loves_url)
+assert res6.is_linked
+print res6.rel_type.to_s
+print res6["since"].to_s
+print "{res4["name"].to_s} LOVES {res4.out_nodes("LOVES").first["name"].to_s}"
+print "{res5["name"].to_s} IS LOVED BY {res5.in_nodes("LOVES").first["name"].to_s}"
+
+# Test Cypher
+var query = (new CypherQuery).
+       nmatch("(n: MALE)-[r: LOVES]->(m)").
+       nwhere("n.name = 'Andres'").
+       nand("n.key = {key}").
+       nreturn("n, r, m")
+var res7 = client.cypher(query)
+assert not res7.as(JsonObject)["data"].as(JsonArray).is_empty
+
diff --git a/tests/test_neo4j_batch.nit b/tests/test_neo4j_batch.nit
new file mode 100644 (file)
index 0000000..e6ac890
--- /dev/null
@@ -0,0 +1,99 @@
+# 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 neo4j
+
+var srv = new Neo4jServer
+srv.start_quiet
+
+var key = get_time
+
+var andres = new NeoNode
+andres.labels.add_all(["PERSON", "MALE"])
+andres["name"] = "Andres"
+andres["age"] = 24
+andres["status"] = true
+andres["groups"] = new JsonArray.from([1, 2, 3])
+andres["key"] = key
+
+var kate = new NeoNode
+kate.labels.add_all(["PERSON", "FEMALE"])
+kate["name"] = "Kate"
+kate["age"] = 25
+kate["status"] = false
+
+var loves = new NeoEdge(andres, "LOVES", kate)
+loves["since"] = 1999
+
+var client = new Neo4jClient("http://localhost:7474")
+assert client.is_ok
+
+print "# Save batch\n"
+
+var batch = new NeoBatch(client)
+batch.save_node(andres)
+batch.save_node(kate)
+batch.save_edge(loves)
+var errors = batch.execute
+
+assert errors.is_empty
+assert andres.is_linked
+assert kate.is_linked
+assert loves.is_linked
+
+var andres_url = andres.url.to_s
+var kate_url = kate.url.to_s
+var loves_url = loves.url.to_s
+
+client = new Neo4jClient("http://localhost:7474")
+assert client.is_ok
+
+# Read Andres
+var res4 = client.load_node(andres_url)
+assert res4.is_linked
+print res4["name"].to_s
+print res4["age"].to_s
+print res4["status"].to_s
+print res4["groups"].to_s
+print res4.labels.join(" ")
+assert res4.in_edges.is_empty
+assert not res4.out_edges.is_empty
+
+# Read Kate
+var res5 = client.load_node(kate_url)
+assert res5.is_linked
+print res5["name"].to_s
+print res5["age"].to_s
+print res5["status"].to_s
+print res5.labels.join(" ")
+assert not res5.in_edges.is_empty
+assert res5.out_edges.is_empty
+
+# Read LOVES
+var res6 = client.load_edge(loves_url)
+assert res6.is_linked
+print res6.rel_type.to_s
+print res6["since"].to_s
+print "{res4["name"].to_s} LOVES {res4.out_nodes("LOVES").first["name"].to_s}"
+print "{res5["name"].to_s} IS LOVED BY {res5.in_nodes("LOVES").first["name"].to_s}"
+
+# Test Cypher
+var query = (new CypherQuery).
+       nmatch("(n: MALE)-[r: LOVES]->(m)").
+       nwhere("n.name = 'Andres'").
+       nand("n.key = {key}").
+       nreturn("n, r, m")
+var res7 = client.cypher(query)
+assert res7.as(JsonObject)["data"].as(JsonArray).length == 1
+
index cbf28d8..d88deb2 100644 (file)
@@ -49,7 +49,7 @@ class Matrice
        end
 
 private
-       var _tab: Array[Array[Int]] # An array of array to store items
+       var tab: Array[Array[Int]] # An array of array to store items
 
 
        init
index f567201..dc98ae0 100644 (file)
@@ -33,8 +33,8 @@ class Pair[F, S]
                        return "{first}:{_second}"
                end
 private
-       var _first: F
-       var _second: S
+       var first: F
+       var second: S
 
        init(f: F, s: S)
                do
index 87b0e9a..b0cbec3 100644 (file)
@@ -12,6 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+#alt1 import splay_ropes
+
 var x :String = new RopeString
 
 x = x + "NODE"
similarity index 89%
rename from tests/test_sqlite3.nit
rename to tests/test_sqlite3_native.nit
index 6ddb8a7..614619e 100644 (file)
@@ -15,9 +15,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-module test_sqlite3
+module test_sqlite3_native
 
-import sqlite3
+import sqlite3::native_sqlite3
 
 var filename = "test.db"
 filename.file_delete
@@ -26,7 +26,7 @@ var insert_req_1 = "INSERT INTO users VALUES('Bob', 'zzz', 1)"
 var insert_req_2 = "INSERT INTO users VALUES('Guillaume', 'xxx', 1)"
 var select_req = "SELECT * FROM users"
 
-var db = new Sqlite3.open(filename)
+var db = new NativeSqlite3.open(filename)
 assert sqlite_open: db.error.is_ok
 
 db.exec(create_req)
@@ -53,11 +53,11 @@ end
 
 db.close
 
-db = new Sqlite3.open(filename)
+db = new NativeSqlite3.open(filename)
 assert sqlite_reopen: db.error.is_ok
 
 stmt = db.prepare(select_req)
 assert sqlite_reselect: db.error.is_ok
 assert stmt != null
 stmt.step
-assert sqlite_column_0_0_reopened: stmt.column_text(0) == "Bob"
+assert sqlite_column_0_0_reopened: stmt.column_text(0).to_s == "Bob"
diff --git a/tests/test_sqlite3_nity.nit b/tests/test_sqlite3_nity.nit
new file mode 100644 (file)
index 0000000..ea09f8c
--- /dev/null
@@ -0,0 +1,63 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2013 Guillaume Auger <jeho@resist.ca>
+# Copyright 2013-2014 Alexis Laferrière <alexis.laf@xymus.net>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     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 sqlite3
+
+var path = "test_nity.db"
+#alt1#path = "/../invalid_path.db"
+if path.file_exists then path.file_delete
+
+var db = new Sqlite3DB.open(path)
+assert db.is_open else print db.error or else "no error?"
+
+assert db.create_table("IF NOT EXISTS users (uname TEXT PRIMARY KEY, pass TEXT NOT NULL, activated INTEGER, perc FLOAT)") else
+       print db.error or else "no error?"
+end
+
+assert db.insert("INTO users VALUES('Bob', 'zzz', 1, 77.7)") else
+       print db.error or else "no error?"
+end
+
+assert db.insert("INTO users VALUES('Guillaume', 'xxx', 1, 88.8)") else
+       print db.error or else "no error?"
+end
+
+#alt2#assert db.insert("INTO notable VALUES('Alexis', 'asdf', 2, 99.9)") else
+#alt2# print db.error or else "no error?"
+#alt2#end
+
+for row in db.select("* FROM users") do
+       print "####"
+
+       printn "{row[0].name}: "
+       print row[0]
+
+       printn "{row[1].name}: "
+       var val = row[1].value
+       assert val isa Text
+       print val.to_s
+
+       printn "{row[2].name}: "
+       print row[2].to_i
+
+       printn "{row[3].name}: "
+       print row[3].to_f
+end
+
+print db.is_open
+db.close
+print db.is_open
index 6717b8c..7a81644 100644 (file)
@@ -15,9 +15,9 @@
 # limitations under the License.
 
 class A
-    var _foo: nullable Object
-    var _bar: nullable A
-    var _baz: nullable Int
+    var foo: nullable Object
+    var bar: nullable A
+    var baz: nullable Int
     redef fun output do 'A'.output end
 
     init do end
@@ -25,8 +25,8 @@ end
 
 class B
        super A
-    redef var _foo: nullable Int
-    redef var _bar: nullable B
+    redef var foo: nullable Int
+    redef var bar: nullable B
     redef fun output do 'B'.output end
 
     init do end
@@ -36,42 +36,42 @@ var a = new A
 var b = new B
 var ab: A = b
 
-a._foo = a
-a._foo.output
-a._foo = b
-a._foo.output
-a._foo = 1
-a._foo.output
-a._bar = a
-a._bar.output
-a._bar = b
-a._bar.output
-a._baz = 1
-a._baz.output
+a.foo = a
+a.foo.output
+a.foo = b
+a.foo.output
+a.foo = 1
+a.foo.output
+a.bar = a
+a.bar.output
+a.bar = b
+a.bar.output
+a.baz = 1
+a.baz.output
 
-#ab._foo = a
-#ab._foo.output
-#ab._foo = b
-#ab._foo.output
-ab._foo = 1
-ab._foo.output
-#ab._bar = a 
-#ab._bar.output
-ab._bar = b
-ab._bar.output
-ab._baz = 1
-ab._baz.output
+#ab.foo = a
+#ab.foo.output
+#ab.foo = b
+#ab.foo.output
+ab.foo = 1
+ab.foo.output
+#ab.bar = a 
+#ab.bar.output
+ab.bar = b
+ab.bar.output
+ab.baz = 1
+ab.baz.output
 
-#b._foo = a
-#b._foo.output
-#b._foo = b
-#b._foo.output
-b._foo = 1
-b._foo.output
-#b._bar = a
-#b._bar.output
-b._bar = b
-b._bar.output
-b._baz = 1
-b._baz.output
+#b.foo = a
+#b.foo.output
+#b.foo = b
+#b.foo.output
+b.foo = 1
+b.foo.output
+#b.bar = a
+#b.bar.output
+b.bar = b
+b.bar.output
+b.baz = 1
+b.baz.output
 
index 24c99e4..5bdefd2 100755 (executable)
@@ -237,7 +237,7 @@ need_skip()
                echo >>$xml "<testcase classname='$3' name='$2'><skipped/></testcase>"
                return 0
        fi
-       if test $engine = niti && echo "$1" | grep -f "exec.skip" >/dev/null 2>&1; then
+       if test -n "$isinterpret" && echo "$1" | grep -f "exec.skip" >/dev/null 2>&1; then
                echo "=> $2: [skip exec]"
                echo >>$xml "<testcase classname='$3' name='$2'><skipped/></testcase>"
                return 0
@@ -292,6 +292,7 @@ while [ $stop = false ]; do
        esac
 done
 enginebinname=$engine
+isinterpret=
 case $engine in
        nitg)
                engine=nitg-s;
@@ -316,9 +317,15 @@ case $engine in
                ;;
        nit)
                engine=niti
+               isinterpret=true
                ;;
        niti)
                enginebinname=nit
+               isinterpret=true
+               ;;
+       nitvm)
+               isinterpret=true
+               savdirs="sav/niti/"
                ;;
        emscripten)
                enginebinname=nitg
@@ -423,7 +430,7 @@ for ii in "$@"; do
                        ffout="$ff.bin.js"
                fi
 
-               if [ "$engine" = "niti" ]; then
+               if [ -n "$isinterpret" ]; then
                        cat > "./$ff.bin" <<END
 exec $NITC --no-color $OPT "$i" $includes -- "\$@"
 END
@@ -463,16 +470,18 @@ END
                        echo -n "! "
                        cat "$ff.compile.log" "$ff.cmp.err" > "$ff.res"
                        process_result $bf $bf $pack
-               elif skip_exec "$bf"; then
-                       # No exec
-                       > "$ff.res"
-                       process_result $bf $bf $pack
                elif [ -n "$nocc" ]; then
                        # not compiled
                        echo -n "nocc "
                        > "$ff.res"
                        process_result $bf $bf $pack
                elif [ -x "./$ff.bin" ]; then
+                       if skip_exec "$bf"; then
+                               # No exec
+                               > "$ff.res"
+                               process_result $bf $bf $pack
+                               break
+                       fi
                        echo -n ". "
                        # Execute
                        args=""