Merge branch 'package2module' into wip
authorJean Privat <jean@pryen.org>
Fri, 28 Jan 2011 21:17:53 +0000 (16:17 -0500)
committerJean Privat <jean@pryen.org>
Fri, 28 Jan 2011 21:17:53 +0000 (16:17 -0500)
Conflicts:
  src/program.nit
  src/abstracttool.nit
  analysis/inline_get_and_set.nit

Signed-off-by: Jean Privat <jean@pryen.org>

39 files changed:
src/abstracttool.nit
src/analysis/cha_analysis.nit
src/analysis/dead_method_removal.nit
src/analysis/inline_get_and_set.nit
src/analysis/instantiated_type_analysis.nit
src/analysis/reachable_as_init.nit
src/analysis/reachable_as_init_impl.nit
src/analysis/reachable_from_init_method_analysis.nit
src/analysis/reachable_from_init_method_analysis_impl.nit
src/analysis/reachable_method_analysis.nit
src/analysis/remove_out_of_init_get_test.nit
src/analysis/rta_analysis.nit
src/compiling/compiling.nit
src/compiling/compiling_base.nit
src/compiling/compiling_global.nit
src/compiling/compiling_icode.nit
src/compiling/table_computation.nit
src/icode/icode_builder.nit
src/metamodel/abstractmetamodel.nit
src/metamodel/genericity.nit
src/metamodel/inheritance.nit
src/metamodel/static_type.nit
src/metamodel/virtualtype.nit
src/mmloader.nit
src/nitdoc.nit
src/parser/lexer.nit
src/parser/nit.sablecc3xx
src/parser/parser.nit
src/parser/parser_abs.nit
src/parser/parser_nodes.nit
src/parser/parser_prod.nit
src/parser/tables_nit.c
src/primitive_info.nit
src/program.nit
src/syntax/icode_generation.nit
src/syntax/mmbuilder.nit
src/syntax/syntax.nit
src/syntax/syntax_base.nit
src/syntax/typing.nit

index d1a53bf..37381fa 100644 (file)
@@ -118,7 +118,7 @@ redef class MMLocalClass
                file.write("class {self}\n")
                if global.visibility_level == 3 and not self == global.intro then
                        file.write("\tclass not visible in this module\n")
-               else if module.visibility_for(global.module) == 0 then
+               else if mmmodule.visibility_for(global.mmmodule) == 0 then
                        file.write("\tclass is defined later in the hierarchy\n")
                else
                        for p in global_properties do
index ed2a120..ba68c2b 100644 (file)
@@ -99,7 +99,7 @@ special ICodeVisitor
                else if ic isa INew then
                        # FIXME: take only the last property on the redef. hierarchie
                        var t = ic.stype
-                       var cls = t.for_module(builder.program.module).local_class
+                       var cls = t.for_module(builder.program.main_module).local_class
                        var m = cls[ic.property.global].as(MMMethod)
                        var r = cls.new_instance_iroutine[m]
                        builder.add_search(ic.property, r, false, false)
@@ -109,12 +109,12 @@ special ICodeVisitor
                        builder.add_search(ic.property, ic.property.iroutine, false, false)
                else if ic isa ICheckInstance then
                        var t = ic.stype
-                       var cls = t.for_module(builder.program.module).local_class
+                       var cls = t.for_module(builder.program.main_module).local_class
                        var ir = cls.checknew_iroutine
                        builder.add_search(null, ir, true, false)
                else if ic isa IInitAttributes then
                        var t = ic.stype
-                       var cls = t.for_module(builder.program.module).local_class
+                       var cls = t.for_module(builder.program.main_module).local_class
                        var ir = cls.init_var_iroutine
                        builder.add_search(null, ir, true, false)
                end
index 703a72b..8e9c18b 100644 (file)
@@ -38,7 +38,7 @@ redef class Program
 
        # This method will create a file and output informations about this optimization
        fun dump_dead_method_optimization(directory_name: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.dmr_opt.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.dmr_opt.log")
 
                f.write("Nb. dead iroutines removed: {nb_removed_iroutines}\n")
                f.write("Nb. live iroutines: {nb_not_removed_iroutines}\n")
index 2168e79..791d4da 100644 (file)
@@ -27,7 +27,7 @@ redef class Program
 
        # This method will create a file and output this optimization's stats in it
        fun dump_inline_get_set(directory_name: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.inline_get_set.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.inline_get_set.log")
 
                f.write ("Number of getters and setters inlined: {_number_getter_setter_inlined}\n")
 
index 3650f44..58af9d4 100644 (file)
@@ -25,7 +25,7 @@ redef class Program
 
        # This method will create a file and output the name of all types that are instantiated in it
        fun dump_instantiated_types(directory_name: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.instantiated_types.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.instantiated_types.log")
                with_each_live_local_classes !action(c) do
                        f.write("{c}\n")
                end
@@ -34,9 +34,9 @@ redef class Program
 
        # This method will create a file and output the names of all types that are not instantiated in it
        fun dump_not_instantiated_types(directory_name: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.not_instantiated_types.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.not_instantiated_types.log")
                # Must overwrite 'with_each_local_classes' since we are looking at non-instantiated classes
-               for c in module.local_classes do
+               for c in main_module.local_classes do
                        if not ita.is_class_instantiated(c) then
                                f.write("{c}\n")
                        end
@@ -48,7 +48,7 @@ redef class Program
        redef fun with_each_live_local_classes
                !action(m: MMLocalClass)
        do
-               for c in module.local_classes do
+               for c in main_module.local_classes do
                        if ita == null or ita.as(not null).is_class_instantiated(c) then action(c)
                end
        end
index fa81128..0d9fb88 100644 (file)
@@ -26,7 +26,7 @@ redef class Program
 
        # This method will create a file and output all inits reachable as init in it
        fun dump_reachable_as_init_methods(directory_name: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.reachable_methods_as_init.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.reachable_methods_as_init.log")
                with_each_live_local_classes !action(c) do
                        for g in c.global_properties do
                                var p = c[g]
index a3b3677..3aaa15a 100644 (file)
@@ -61,7 +61,7 @@ special ICodeVisitor
                if ic isa INew then
                        # FIXME: take only the last property on the redef. hierarchie
                        var t = ic.stype
-                       var cls = t.for_module(builder.program.module).local_class
+                       var cls = t.for_module(builder.program.main_module).local_class
                        var m = cls[ic.property.global].as(MMMethod)
                        assert m.global.is_init
                        if not builder.context._methods.has_key(cls) then builder.context._methods[cls] = new List[MMMethod]
index 9c0f78c..4397066 100644 (file)
@@ -28,7 +28,7 @@ redef class Program
        # This method will create a file and output the name of all methods reachable
        # from an init in it
        fun dump_reachable_methods_from_init(directory_name: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.reachable_methods_from_init.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.reachable_methods_from_init.log")
                with_each_methods !action(m) do
                        if rfima.is_method_reachable_from_init(m) then
                                f.write("{m.full_name}\n")
@@ -40,7 +40,7 @@ redef class Program
        # This method will create a file and output the name of all reachable methods that
        # can not be reached from an init in it
        fun dump_unreachable_methods_from_init(directory_name: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.unreachable_methods_from_init.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.unreachable_methods_from_init.log")
                with_each_methods !action(m) do
                        if not rfima.is_method_reachable_from_init(m) and rma.is_method_reachable(m) then
                                f.write("{m.full_name}\n")
index 220ebd9..ad04ed1 100644 (file)
@@ -86,7 +86,7 @@ special ICodeVisitor
                else if ic isa INew then
                        # FIXME: take only the last property on the redef. hierarchie
                        var t = ic.stype
-                       var cls = t.for_module(program.module).local_class
+                       var cls = t.for_module(program.main_module).local_class
                        var m = cls[ic.property.global].as(MMMethod)
                        var r = cls.new_instance_iroutine[m]
                        process_call(r)
@@ -112,12 +112,12 @@ special ICodeVisitor
                        end
                else if ic isa ICheckInstance then
                        var t = ic.stype
-                       var cls = t.for_module(program.module).local_class
+                       var cls = t.for_module(program.main_module).local_class
                        var ir = cls.checknew_iroutine
                        if ir != null then process_call(ir)
                else if ic isa IInitAttributes then
                        var t = ic.stype
-                       var cls = t.for_module(program.module).local_class
+                       var cls = t.for_module(program.main_module).local_class
                        var ir = cls.init_var_iroutine
                        if ir != null then process_call(ir)
                end
index c1c37d9..ef2b4fe 100644 (file)
@@ -26,7 +26,7 @@ redef class Program
 
        # This method will create a file and output all reachable method names in it
        fun dump_reachable_methods(directory_name: String, algo: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.reachable_methods.{algo}.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.reachable_methods.{algo}.log")
                with_each_methods !action(m) do
                        if rma.is_method_reachable(m) then
                                f.write("{m.full_name}\n")
@@ -37,7 +37,7 @@ redef class Program
 
        # This method will create a file and output all unreachable method names in it
        fun dump_unreachable_methods(directory_name: String, algo: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.unreachable_methods.{algo}.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.unreachable_methods.{algo}.log")
                with_each_methods !action(m) do
                        if not rma.is_method_reachable(m) then
                                f.write("{m.full_name}\n")
index 2dc1c8c..8db2cb4 100644 (file)
@@ -38,7 +38,7 @@ redef class Program
 
        # This method will create a file and output informations about this optimization
        fun dump_out_of_init_information(directory_name: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.out_of_init_opt.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.out_of_init_opt.log")
                var nb_not_optimized = 0
 
                with_each_iroutines !action(i,m) do
index 0fd4165..a10dcac 100644 (file)
@@ -57,7 +57,7 @@ class RtaBuilder
        # Also check every subclasses if they use the same 'version' of the
        # method
        fun check_method(m: MMMethod): Bool do
-               var m_cls = m.local_class.for_module(program.module)
+               var m_cls = m.local_class.for_module(program.main_module)
 
                if context.is_class_instantiated(m_cls) then return true
 
@@ -139,13 +139,13 @@ class RtaBuilder
                var forced_types = ["Object", "Bool", "Float", "Int", "String", "NativeString", "Range", "Array", "ArrayIterator", "Inline__"]
 
                for some_type in forced_types do
-                       if not program.module.has_global_class_named(some_type.to_symbol) then continue
-                       var cls_type = program.module.class_by_name(some_type.to_symbol)
+                       if not program.main_module.has_global_class_named(some_type.to_symbol) then continue
+                       var cls_type = program.main_module.class_by_name(some_type.to_symbol)
                        add_instantiated_class(cls_type)
                end
 
-               if program.module.has_global_class_named("Inline__".to_symbol) then
-                       var ptr_class = program.module.class_by_name("Inline__".to_symbol)
+               if program.main_module.has_global_class_named("Inline__".to_symbol) then
+                       var ptr_class = program.main_module.class_by_name("Inline__".to_symbol)
                        # Assume that all classes that are subclasses of Inline__
                        # can be inlined without notice ...
                        # and are always counted as instantiated
@@ -154,8 +154,8 @@ class RtaBuilder
                        end
                end
 
-               if program.module.has_global_class_named("Pointer".to_symbol) then
-                       var ptr_class = program.module.class_by_name("Pointer".to_symbol)
+               if program.main_module.has_global_class_named("Pointer".to_symbol) then
+                       var ptr_class = program.main_module.class_by_name("Pointer".to_symbol)
                        # Assume that all classes that are subclasses of Pointer
                        # can be returned by the native interface
                        # and are always counted as instantiated
@@ -164,9 +164,9 @@ class RtaBuilder
                        end
                end
 
-               for cls in program.module.global_classes do
+               for cls in program.main_module.global_classes do
                        if not cls.is_universal then continue
-                       add_instantiated_class(program.module[cls])
+                       add_instantiated_class(program.main_module[cls])
                end
        end
 
@@ -175,8 +175,8 @@ class RtaBuilder
                if program.main_method == null then
                        # Add primitive type (so that compiling works)
                        for t in ["Int","Char","Bool"] do
-                               if program.module.has_global_class_named(t.to_symbol) then
-                                       add_instantiated_class(program.module.class_by_name(t.to_symbol))
+                               if program.main_module.has_global_class_named(t.to_symbol) then
+                                       add_instantiated_class(program.main_module.class_by_name(t.to_symbol))
                                end
                        end
                        return
@@ -206,7 +206,7 @@ special ICodeVisitor
                else if ic isa INew then
                        # FIXME: take only the last property on the redef. hierarchie
                        var t = ic.stype
-                       var cls = t.for_module(builder.program.module).local_class
+                       var cls = t.for_module(builder.program.main_module).local_class
                        var m = cls[ic.property.global].as(MMMethod)
                        var r = cls.new_instance_iroutine[m]
                        builder.add_instantiated_class(cls)
@@ -222,12 +222,12 @@ special ICodeVisitor
                        builder.add_reachable_call(ic)
                else if ic isa ICheckInstance then
                        var t = ic.stype
-                       var cls = t.for_module(builder.program.module).local_class
+                       var cls = t.for_module(builder.program.main_module).local_class
                        var ir = cls.checknew_iroutine
                        builder.add_reachable_iroutine(ir)
                else if ic isa IInitAttributes then
                        var t = ic.stype
-                       var cls = t.for_module(builder.program.module).local_class
+                       var cls = t.for_module(builder.program.main_module).local_class
                        var ir = cls.init_var_iroutine
                        builder.add_reachable_iroutine(ir)
                end
index 0099b6b..8dcadba 100644 (file)
@@ -58,7 +58,7 @@ redef class Program
                cprogram.files.add("$CLIBDIR/gc_static_objects_list.c")
 
                tc.info("Generating C code",1)
-               for m in module.mhe.greaters_and_self do m.compile_separate_module(cprogram)
+               for m in main_module.mhe.greaters_and_self do m.compile_separate_module(cprogram)
 
                tc.info("Generating main, tables and makefile ...",1)
                compile_main(cprogram)
@@ -71,15 +71,15 @@ redef class Program
        # Compile the main file
        private fun compile_main(cprogram: CProgram)
        do
-               var v = new CompilerVisitor(module, cprogram)
+               var v = new CompilerVisitor(main_module, cprogram)
                v.add_decl("#include <nit_common.h>")
                compile_tables_to_c(v)
                compile_main_part(v)
-               var filename = "{cprogram.compdir}/{module.name}._tables.c"
+               var filename = "{cprogram.compdir}/{main_module.name}._tables.c"
                cprogram.files.add(filename)
                var f = new OFStream.open(filename)
-               f.write("/* This C file is generated by NIT to compile program {module.name}. */\n")
-               for m in module.mhe.greaters_and_self do
+               f.write("/* This C file is generated by NIT to compile program {main_module.name}. */\n")
+               for m in main_module.mhe.greaters_and_self do
                        f.write("#include \"{cprogram.module_header_name(m)}\"\n")
                end
                v.header_writer.write_to_stream(f)
index c922f05..24d4fcb 100644 (file)
@@ -43,7 +43,7 @@ class CProgram
        do
                _program = p
                _compdir = p.tc.compdir.as(not null)
-               _build_file = "{compdir}/{program.module.name}._build.sh"
+               _build_file = "{compdir}/{program.main_module.name}._build.sh"
        end
 
        # The Nit program compiled to C
@@ -94,15 +94,15 @@ class CProgram
                end
 
                f.write("#!/bin/sh\n")
-               f.write("# This shell script is generated by NIT to compile the program {program.module.name}.\n")
+               f.write("# This shell script is generated by NIT to compile the program {program.main_module.name}.\n")
                f.write("CLIBDIR=\"{tc.clibdir.as(not null)}\"\n")
                f.write("{tc.bindir.as(not null)}/gccx {verbose} -d {compdir} -I $CLIBDIR {include_dirs.join(" ")}")
                if tc.output_file != null then
                        f.write(" -o {tc.output_file.as(not null)}")
                else if tc.ext_prefix.is_empty then
-                       f.write(" -o {program.module.name}")
+                       f.write(" -o {program.main_module.name}")
                else
-                       f.write(" -o {program.module.name}_{tc.ext_prefix}")
+                       f.write(" -o {program.main_module.name}_{tc.ext_prefix}")
                end
                if tc.boost then f.write(" -O")
                if not tc.cc_link then f.write(" -x \"-c\"")
@@ -190,8 +190,8 @@ class CompilerVisitor
                if _indent_level < 0 then _indent_level = 0
        end
 
-       # The processed module
-       readable var _module: MMModule
+       # The processed mmmodule
+       readable var _mmmodule: MMModule
 
        # Where header decl are stored (public stuff)
        readable writable var _header_writer: Writer
@@ -218,9 +218,9 @@ class CompilerVisitor
        readable var _cprogram: CProgram
 
        # Create a new CompilerVisitor based on a module
-       init(module: MMModule, cp: CProgram)
+       init(mod: MMModule, cp: CProgram)
        do
-               _module = module
+               _mmmodule = mod
                _cprogram = cp
                _program = cp.program
 
@@ -277,7 +277,7 @@ redef class MMLocalProperty
        do
                var cname = _cname_cache
                if cname == null then
-                       cname = cmangle(module.name, local_class.name, name)
+                       cname = cmangle(mmmodule.name, local_class.name, name)
                        _cname_cache = cname
                end
                return cname
index 96300b5..da63476 100644 (file)
@@ -24,7 +24,7 @@ redef class Program
        # Compile module and class tables
        fun compile_tables_to_c(v: CompilerVisitor)
        do
-               for m in module.mhe.greaters_and_self do
+               for m in main_module.mhe.greaters_and_self do
                        m.compile_local_table_to_c(v)
                end
 
@@ -35,7 +35,7 @@ redef class Program
 
                var s = new Buffer.from("classtable_t TAG2VFT[4] = \{NULL")
                for t in ["Int","Char","Bool"] do
-                       if module.has_global_class_named(t.to_symbol) then
+                       if main_module.has_global_class_named(t.to_symbol) then
                                s.append(", (const classtable_t)VFT_{t}")
                        else
                                s.append(", NULL")
@@ -70,7 +70,7 @@ redef class MMModule
        fun declare_class_tables_to_c(v: CompilerVisitor)
        do
                for c in local_classes do
-                       if c.global.module == self then
+                       if c.global.mmmodule == self then
                                c.declare_tables_to_c(v)
                        end
                end
index 52caff6..00e87c4 100644 (file)
@@ -289,7 +289,7 @@ redef class IRoutine
                        v.add_decl("struct \{struct stack_frame_t me;\} fra;")
                end
                v.add_instr("fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;")
-               v.add_instr("fra.me.file = LOCATE_{v.visitor.module.name};")
+               v.add_instr("fra.me.file = LOCATE_{v.visitor.mmmodule.name};")
                v.add_instr("fra.me.line = {ll};")
                v.add_instr("fra.me.meth = LOCATE_{v.basecname};")
                v.add_instr("fra.me.has_broke = 0;")
index 9a8a423..df7dc3b 100644 (file)
@@ -143,7 +143,7 @@ redef class Program
        fun do_table_computation
        do
                tc.info("Building tables",1)
-               for m in module.mhe.greaters_and_self do
+               for m in main_module.mhe.greaters_and_self do
                        tc.info("Building tables for module: {m.name}",2)
                        m.local_analysis
                end
@@ -170,7 +170,7 @@ redef class Program
 
                # We have to work on ALL the classes of the module
                var classes = new Array[MMLocalClass]
-               for c in module.local_classes do classes.add(c)
+               for c in main_module.local_classes do classes.add(c)
                classes.sort !cmp(x,y) = x.total_order_compare(y)
 
                for c in classes do
@@ -181,7 +181,7 @@ redef class Program
                        # Assign a unique class identifier
                        # (negative are for primitive classes)
                        var gc = c.global
-                       var bm = gc.module
+                       var bm = gc.mmmodule
                        if c.primitive_info != null then
                                cc.id = pclassid
                                pclassid = pclassid - 4
@@ -480,7 +480,7 @@ special TableElt
 special AbsTableEltClass
        redef fun is_related_to(c)
        do
-               var bc = c.module[_local_class.global]
+               var bc = c.mmmodule[_local_class.global]
                return c.cshe <= bc
        end
 end
index d6691d3..d5c9753 100644 (file)
@@ -49,7 +49,7 @@ class ICodeBuilder
        fun add_null_reciever_check(e: IRegister)
        do
                var nul = lit_null_reg
-               var c = expr(new IIs(e, nul), module.type_bool)
+               var c = expr(new IIs(e, nul), mmmodule.type_bool)
                var iif = new IIf(c)
                stmt(iif)
                var old_seq = seq
@@ -61,7 +61,7 @@ class ICodeBuilder
        # Add a type cast (ITypeCheck + IAbort) in the current icode sequence
        fun add_type_cast(e: IRegister, stype: MMType)
        do
-               var c = expr(new ITypeCheck(e, stype), module.type_bool)
+               var c = expr(new ITypeCheck(e, stype), mmmodule.type_bool)
                var iif = new IIf(c)
                stmt(iif)
                var old_seq = seq
@@ -74,7 +74,7 @@ class ICodeBuilder
        fun add_attr_check(prop: MMAttribute, e: IRegister)
        do
                if not prop.signature.return_type.is_nullable then
-                       var cond = expr(new IAttrIsset(prop, e), module.type_bool)
+                       var cond = expr(new IAttrIsset(prop, e), mmmodule.type_bool)
                        var iif = new IIf(cond)
                        stmt(iif)
                        var seq_old = seq
@@ -94,7 +94,7 @@ class ICodeBuilder
        # Add a localized IAbort
        fun add_abort(s: String...)
        do
-               stmt(new IAbort(s, module))
+               stmt(new IAbort(s, mmmodule))
        end
 
        # Add an assigment to the iroutine return value
@@ -114,7 +114,7 @@ class ICodeBuilder
                if prop.name == ne then
                        var eqp = prop.signature.recv.local_class.select_method(ee)
                        var eqcall = add_call(eqp, args, closcns).as(not null)
-                       return expr(new INot(eqcall), module.type_bool)
+                       return expr(new INot(eqcall), mmmodule.type_bool)
                end
 
                # TODO: Inline x==y as "x is y or (x != null and (== is not the Object one) and x.==(y))"
@@ -123,9 +123,9 @@ class ICodeBuilder
                icall.closure_defs = closcns
                if prop.name == ee then
                        # Prepare the result
-                       var reg = new_register(module.type_bool)
+                       var reg = new_register(mmmodule.type_bool)
                        # "x is y"
-                       var cond = expr(new IIs(args[0], args[1]), module.type_bool)
+                       var cond = expr(new IIs(args[0], args[1]), mmmodule.type_bool)
                        var iif = new IIf(cond)
                        stmt(iif)
                        var seq_old = seq
@@ -136,7 +136,7 @@ class ICodeBuilder
                        # Do the "x != null" part iff x is nullable
                        if args[0].stype.is_nullable then
                                var nul = lit_null_reg
-                               cond = expr(new IIs(args[0], nul), module.type_bool)
+                               cond = expr(new IIs(args[0], nul), mmmodule.type_bool)
                                iif = new IIf(cond)
                                stmt(iif)
                                seq = iif.then_seq
@@ -144,7 +144,7 @@ class ICodeBuilder
                                seq = iif.else_seq
                        end
                        # "x.==(y)"
-                       add_assignment(reg, expr(icall, module.type_bool))
+                       add_assignment(reg, expr(icall, mmmodule.type_bool))
                        seq = seq_old
                        return reg
                end
@@ -175,21 +175,21 @@ class ICodeBuilder
        # Return a literal "null" value
        fun lit_null_reg: IRegister
        do
-               return new_register(module.type_none)
+               return new_register(mmmodule.type_none)
        end
 
        # Return a literal "true" value
        fun lit_true_reg: IRegister
        do
                var e = new IBoolValue(true)
-               return expr(e, module.type_bool)
+               return expr(e, mmmodule.type_bool)
        end
 
        # Return a literal "false" value
        fun lit_false_reg: IRegister
        do
                var e = new IBoolValue(false)
-               return expr(e, module.type_bool)
+               return expr(e, mmmodule.type_bool)
        end
 
        # Get a new register
@@ -201,7 +201,7 @@ class ICodeBuilder
        end
 
        # The module where classes and types are extracted
-       readable var _module: MMModule
+       readable var _mmmodule: MMModule
 
        # The current iroutine build
        readable var _iroutine: IRoutine
@@ -209,9 +209,9 @@ class ICodeBuilder
        # The current sequence of icodes
        readable writable var _seq: ISeq
 
-       init(module: MMModule, r: IRoutine)
+       init(mod: MMModule, r: IRoutine)
        do
-               _module = module
+               _mmmodule = mod
                _current_location = r.location
                _iroutine = r
                _seq = r.body
index cc321ac..4ac84e0 100644 (file)
@@ -40,11 +40,11 @@ class MMContext
        readable var _modules: Array[MMModule] = new Array[MMModule]
 
        # Register a new module with the modules it depends on
-       fun add_module(module: MMModule, supers: Array[MMModule])
+       fun add_module(mod: MMModule, supers: Array[MMModule])
        do
-               _module_hierarchy.add(module, _module_hierarchy.select_smallests(supers))
-               _modules.add(module)
-               module._mhe = _module_hierarchy[module]
+               _module_hierarchy.add(mod, _module_hierarchy.select_smallests(supers))
+               _modules.add(mod)
+               mod._mhe = _module_hierarchy[mod]
        end
 
        # Register a global class
@@ -88,10 +88,10 @@ class MMDirectory
        readable var _modules: Map[Symbol, MMModule] = new HashMap[Symbol, MMModule]
 
        # Register a new module
-       fun add_module(module: MMModule)
+       fun add_module(mod: MMModule)
        do
-               assert not _modules.has_key(module.name)
-               _modules[module.name] = module
+               assert not _modules.has_key(mod.name)
+               _modules[mod.name] = mod
        end
 
        init(name: Symbol, path: String, parent: nullable MMDirectory) do
@@ -271,9 +271,9 @@ class MMGlobalClass
        end
 
        # The module that introduces the global class
-       fun module: MMModule
+       fun mmmodule: MMModule
        do
-               return intro.module
+               return intro.mmmodule
        end
 
        redef fun to_s
@@ -286,7 +286,7 @@ class MMGlobalClass
        do
                var sup = new Array[MMLocalClass]
                for s in class_refinement_hierarchy do
-                       if c.module.mhe < s.module and s isa MMConcreteClass then
+                       if c.mmmodule.mhe < s.mmmodule and s isa MMConcreteClass then
                                sup.add(s)
                        end
                end
@@ -331,7 +331,7 @@ class MMLocalClass
        readable var _arity : Int 
 
        # The module of the local class
-       readable var _module: MMModule
+       readable var _mmmodule: MMModule
 
        # The global class of the local class
        fun global: MMGlobalClass do return _global.as(not null)
@@ -364,7 +364,7 @@ class MMLocalClass
        # Create a new class with a given name and arity
        protected init(mod: MMModule, name: Symbol, arity: Int)
        do
-               _module = mod
+               _mmmodule = mod
                _name = name
                _arity = arity
                mod._local_classes.add(self)
@@ -380,8 +380,8 @@ class MMLocalClass
        fun new_global
        do
                var g = new MMGlobalClass(self)
-               _module._global_classes.add(g)
-               _module._global_class_by_name[name] = g
+               _mmmodule._global_classes.add(g)
+               _mmmodule._global_class_by_name[name] = g
                set_global(g)
        end
 
@@ -392,7 +392,7 @@ class MMLocalClass
        do
                _global = g
                _global.register_local_class(self)
-               _module.register_global_class(self)
+               _mmmodule.register_global_class(self)
        end
 
        # Is there a global propery with a given name
@@ -499,7 +499,7 @@ class MMLocalClass
        end
 
        # The current MMContext
-       fun context: MMContext do return module.context
+       fun context: MMContext do return mmmodule.context
 
        redef fun to_s
        do
@@ -512,9 +512,9 @@ class MMLocalClass
                var a = self
                if a == b then
                        return 0
-               else if a.module.mhe < b.module then
+               else if a.mmmodule.mhe < b.mmmodule then
                        return 1
-               else if b.module.mhe < a.module then
+               else if b.mmmodule.mhe < a.mmmodule then
                        return -1
                end
                var ar = a.cshe.rank
@@ -605,17 +605,17 @@ class MMLocalProperty
        fun prhe: PartialOrderElement[MMLocalProperty] do return _prhe.as(not null)
 
        # The module of the local property
-       fun module: MMModule do return _local_class.module
+       fun mmmodule: MMModule do return _local_class.mmmodule
 
        # Full expanded name with all qualifications
        fun full_name: String
        do
                if _global == null then
-                       return "{local_class.module}::{local_class}::(?::{name})"
+                       return "{local_class.mmmodule}::{local_class}::(?::{name})"
                else if global.intro == self then
-                       return "{local_class.module}::{local_class}::{name}"
+                       return "{local_class.mmmodule}::{local_class}::{name}"
                else
-                       return "{local_class.module}::{local_class}::({global.intro.full_name})"
+                       return "{local_class.mmmodule}::{local_class}::({global.intro.full_name})"
                end
        end
 
index 79efb24..e2d0962 100644 (file)
@@ -71,7 +71,7 @@ redef class MMLocalClass
                        for i in [0..arity[ do
                                var oft = global.intro.get_formal(i)
                                var ft = _formals_types[i] 
-                               ft.bound = oft.bound.for_module(module)
+                               ft.bound = oft.bound.for_module(mmmodule)
                        end
                end
                return _formals_types
@@ -134,7 +134,7 @@ special MMTypeClass
        redef fun for_module(mod)
        do
                var t: MMType = self
-               if module != mod then
+               if mmmodule != mod then
                        var parms = new Array[MMType]
                        for p in _params do
                                parms.add(p.for_module(mod))
@@ -201,12 +201,12 @@ special MMTypeFormal
        # The position is self in def_class
        readable var _position: Int 
 
-       redef fun module do return _def_class.module
+       redef fun mmmodule do return _def_class.mmmodule
 
        redef fun for_module(mod)
        do
                var t: MMType = self
-               if module != mod then
+               if mmmodule != mod then
                        t = mod[_def_class.global].get_formal(position)
                end
                return t
@@ -225,8 +225,8 @@ special MMTypeFormal
                r = r.direct_type
                var old_r = r.upcast_for(def_class)
                #if not old_r isa MMTypeGeneric then
-               #       print "adapt {self}'{def_class}'{self.module} to {r}'{r.module}"
-               #       print "   old_r = {old_r}'{old_r.module}"
+               #       print "adapt {self}'{def_class}'{self.mmmodule} to {r}'{r.mmmodule}"
+               #       print "   old_r = {old_r}'{old_r.mmmodule}"
                #end
                assert old_r isa MMTypeGeneric
                var reduct = old_r.params[position]
index ebc15fe..4d21665 100644 (file)
@@ -81,7 +81,7 @@ redef class MMLocalClass
                var set = new HashSet[MMLocalClass]
                set.add_all(supers)
                var u = set.to_a
-               module.set_supers_class(self,u)
+               mmmodule.set_supers_class(self,u)
                assert _crhe != null
                assert _cshe != null
                _computing_super = false
@@ -123,7 +123,7 @@ redef class MMLocalClass
                                set.add(glob) # Add the global property
 
                                # Do not inherit constructors trough specialization
-                               #print "{c.module}::{c} -> {module}::{self} for {glob.local_property.local_class.module}::{glob.local_property.local_class}::{glob.local_property} : {glob.is_init}"
+                               #print "{c.mmmodule}::{c} -> {mmmodule}::{self} for {glob.local_property.local_class.mmmodule}::{glob.local_property.local_class}::{glob.local_property} : {glob.is_init}"
                                if glob.is_init and glob.intro.local_class.global != global then
                                        #print "pass"
                                        continue
@@ -237,7 +237,7 @@ redef class MMLocalClass
                if _ancestors.has_key(c) then
                        return _ancestors[c]
                end
-               var a = c.for_module(module)
+               var a = c.for_module(mmmodule)
                assert cshe <= a
                var ra: MMAncestor
                if _ancestors.has_key(a) then
@@ -266,7 +266,7 @@ redef class MMLocalClass
        private fun add_default_any_class(supers: Array[MMLocalClass])
        do
                if supers.is_empty and name != once ("Object".to_symbol) then
-                       var t_any = module.type_any
+                       var t_any = mmmodule.type_any
                        supers.add(t_any.local_class)
                        var default = new MMDefaultAncestor(self, t_any)
                        add_direct_parent(default)
@@ -279,7 +279,7 @@ redef class MMLocalClass
                assert _crhe != null
                for ref in _crhe.direct_greaters do
                        for sup in ref.cshe.direct_greaters do
-                               var cla = sup.for_module(_module)
+                               var cla = sup.for_module(_mmmodule)
                                supers.add(cla)
                        end
                end
@@ -403,7 +403,7 @@ redef class MMLocalClass
                        # Conflict case (FIXME)
                        if impls2.length != 1 then
                                stderr.write("Fatal error: inherit_local_property error\n")
-                               print("------- {module}::{self} {glob.intro.full_name}")
+                               print("------- {mmmodule}::{self} {glob.intro.full_name}")
                                for i in impls2 do
                                        print("   {i.full_name}")
                                end
@@ -448,8 +448,8 @@ redef class MMAncestor
                tab.add(self)
                stype.local_class.compute_ancestors
                for anc in stype.local_class.ancestors.as(not null) do
-                       var aaa = anc.stype.for_module(stype.module)
-                       var a = aaa.adapt_to(stype).for_module(inheriter.module)
+                       var aaa = anc.stype.for_module(stype.mmmodule)
+                       var a = aaa.adapt_to(stype).for_module(inheriter.mmmodule)
                        if a.local_class != inheriter.local_class then
                                var it = tab.iterator
                                var b = true
index 063559e..15d735a 100644 (file)
@@ -102,7 +102,7 @@ class MMSignature
                if self == s then
                        return true
                end
-               assert _recv.module == s.recv.module
+               assert _recv.mmmodule == s.recv.mmmodule
                var rt = _return_type
                var srt = s.return_type
                if arity != s.arity or (rt == null) != (srt == null) then return false
@@ -155,7 +155,7 @@ class MMSignature
                if _recv == r then
                        return self
                end
-               var mod = r.module
+               var mod = r.mmmodule
                var p = new Array[MMType]
                for i in _params do
                        p.add(i.for_module(mod).adapt_to(r))
@@ -283,7 +283,7 @@ abstract class MMAncestor
        fun inheriter: MMType do return _inheriter.as(not null)
 
        fun is_reffinement: Bool do
-               return stype.module != stype.module
+               return stype.mmmodule != stype.mmmodule
        end
 
        fun is_specialisation: Bool do
@@ -307,7 +307,7 @@ end
 # Note that static type a related to a specific module
 abstract class MMType
        # The module where self makes sence
-       fun module: MMModule is abstract
+       fun mmmodule: MMModule is abstract
 
        # The local class that self direclty or indirectly refers to
        fun local_class: MMLocalClass is abstract
@@ -387,7 +387,7 @@ special MMType
        redef fun as_nullable do return self
        init(t: MMType) do _base_type = t
 
-       redef fun module do return _base_type.module
+       redef fun mmmodule do return _base_type.mmmodule
 
        redef fun local_class do return _base_type.local_class
 
@@ -430,7 +430,7 @@ end
 class MMTypeClass 
 special MMType
        redef readable var _local_class: MMLocalClass
-       redef fun module do return _local_class.module end
+       redef fun mmmodule do return _local_class.mmmodule end
        redef fun <(t) do return t.is_supertype(self)
 
        redef fun to_s
@@ -463,7 +463,7 @@ special MMTypeClass
        redef fun for_module(mod)
        do
                var t: MMType = self
-               if module != mod then
+               if mmmodule != mod then
                        t = _local_class.for_module(mod).get_type
                end
                return t
@@ -480,7 +480,7 @@ end
 # The type of null
 class MMTypeNone
 special MMType
-       redef readable var _module: MMModule
+       redef readable var _mmmodule: MMModule
        redef fun is_nullable: Bool do return true
        redef fun <(t) do return t isa MMTypeNone or t isa MMNullableType
        redef fun to_s do return "null"
@@ -490,7 +490,7 @@ special MMType
        redef fun as_nullable do return self
        redef fun as_notnull do abort
 
-       private init(m: MMModule) do _module = m
+       private init(m: MMModule) do _mmmodule = m
 end
 
 redef class MMModule
index fa2b2aa..7b09814 100644 (file)
@@ -68,11 +68,11 @@ special MMTypeFormal
                _recv = recv
        end
 
-       redef fun module do return _recv.module
+       redef fun mmmodule do return _recv.mmmodule
 
        redef fun for_module(mod)
        do
-               if mod == module then return self
+               if mod == mmmodule then return self
                return adapt_to(recv.for_module(mod))
        end
 
index 4dfc361..4b9b578 100644 (file)
@@ -364,7 +364,7 @@ class ModuleLoader
        protected fun parse_file(context: ToolContext, file: IFStream, filename: String, module_name: Symbol, dir: MMDirectory): MODULE is abstract
 
        # Process a parsed module
-       protected fun process_metamodel(context: ToolContext, module: MODULE) is abstract
+       protected fun process_metamodel(context: ToolContext, mod: MODULE) is abstract
 end
 
 redef class MMModule
index a8e1b45..3f8978a 100644 (file)
@@ -65,8 +65,8 @@ special AbstractCompiler
                f.close
        end
 
-       # Currently computed module
-       readable var _module: nullable MMSrcModule
+       # Currently computed mmmodule
+       readable var _mmmodule: nullable MMSrcModule
 
        # Is the current directory module computed as a simple modude ?
        readable writable var _inside_mode: Bool = false
@@ -82,7 +82,7 @@ special AbstractCompiler
        do
                _entities.add(e)
                if e isa MMSrcModule then
-                       _module = e
+                       _mmmodule = e
                end
        end
 
@@ -96,7 +96,7 @@ special AbstractCompiler
        fun extract_other_doc
        do
                info("Generating other files",1)
-               _module = null
+               _mmmodule = null
                inside_mode = false
                intrude_mode = false
                clear
@@ -187,23 +187,23 @@ special AbstractCompiler
                add("<a href=\"overview.html\"><b>Overview</b></a>&nbsp; <a href=\"index-1.html\"><b>Index</b></a>&nbsp; <a href=\"index.html\" target=\"_top\"><b>With Frames</b></a>\n")
                add("</td></tr></table>")
                add("Visibility: ")
-               var module = module
-               if (not inside_mode and not intrude_mode) or module == null then
+               var mod = mmmodule
+               if (not inside_mode and not intrude_mode) or mod == null then
                        add("<b>Public</b>&nbsp; ")
                else
-                       add("<a href=\"{module}.html\"><b>Public</b></a>&nbsp; ")
+                       add("<a href=\"{mod}.html\"><b>Public</b></a>&nbsp; ")
                end
-               if inside_mode or module == null then
+               if inside_mode or mod == null then
                        add("<b>Inside</b>&nbsp; ")
-               else if module.directory.owner != module then
+               else if mod.directory.owner != mod then
                        add("<strike><b>Inside</b></strike>&nbsp; ")
                else
-                       add("<a href=\"{module}_.html\"><b>Inside</b></a>&nbsp; ")
+                       add("<a href=\"{mod}_.html\"><b>Inside</b></a>&nbsp; ")
                end
-               if intrude_mode or module == null then
+               if intrude_mode or mod == null then
                        add("<b>Intrude</b>&nbsp; ")
                else
-                       add("<a href=\"{module}__.html\"><b>Intrude</b></a>&nbsp; ")
+                       add("<a href=\"{mod}__.html\"><b>Intrude</b></a>&nbsp; ")
                end
                add("<br/>")
        end
@@ -223,11 +223,11 @@ special AbstractCompiler
        # if inside_mode is set, it could be a different result
        fun known_owner_of(m: MMModule): MMModule
        do
-               var module = module
-               if module == null then return m
-               var res = module.known_owner_of(m)
-               if not inside_mode and not intrude_mode and res.directory.owner == module then
-                       return module
+               var mod = mmmodule
+               if mod == null then return m
+               var res = mod.known_owner_of(m)
+               if not inside_mode and not intrude_mode and res.directory.owner == mod then
+                       return mod
                else
                        return res
                end
@@ -333,7 +333,7 @@ end
 redef class MMModule
 special MMEntity
        redef fun html_link(dctx) do 
-               if dctx.module == self then 
+               if dctx.mmmodule == self then
                        return "{self}"
                else
                        return "<a href=\"{self}.html\">{self}</a>"
@@ -345,18 +345,18 @@ special MMEntity
        var _known_owner_of_cache: Map[MMModule, MMModule] = new HashMap[MMModule, MMModule]
 
        # Return the owner of `module` from the point of view of `self`
-       fun known_owner_of(module: MMModule): MMModule
+       fun known_owner_of(mod: MMModule): MMModule
        do
-               if _known_owner_of_cache.has_key(module) then return _known_owner_of_cache[module]
-               var res = module
+               if _known_owner_of_cache.has_key(mod) then return _known_owner_of_cache[mod]
+               var res = mod
                # is module is publicly imported by self?
-               if mhe < module and visibility_for(module) != 0 then
-                       res = known_owner_of_intern(module, self, false)
+               if mhe < mod and visibility_for(mod) != 0 then
+                       res = known_owner_of_intern(mod, self, false)
                else
                        # Return the canonnical owner of module from the point of view of self
-                       res = module.owner(self)
+                       res = mod.owner(self)
                end
-               _known_owner_of_cache[module] = res
+               _known_owner_of_cache[mod] = res
                return res
        end
 
@@ -374,17 +374,17 @@ special MMEntity
        end
 
        # ???
-       private fun known_owner_of_intern(module: MMModule, from: MMModule, as_owner: Bool): MMModule
+       private fun known_owner_of_intern(mod: MMModule, from: MMModule, as_owner: Bool): MMModule
        do
-               if module == self then return self
+               if mod == self then return self
                var candidates = new Array[MMModule]
                for m in explicit_imported_modules do
                        if from.visibility_for(m) == 0 then continue
-                       if not m.mhe <= module then continue
-                       candidates.add(m.known_owner_of_intern(module, from, true))
+                       if not m.mhe <= mod then continue
+                       candidates.add(m.known_owner_of_intern(mod, from, true))
                end
                # FIXME: I do not know what this does
-               if candidates.is_empty then return module.owner(from)
+               if candidates.is_empty then return mod.owner(from)
                var max = candidates.first
                for m in candidates do
                        if max.mhe < m then max = m
@@ -408,10 +408,10 @@ special MMEntity
 
        redef fun html_link(dctx)
        do
-               var m = module
-               if not need_doc(dctx) then m = global.intro.module
+               var m = mmmodule
+               if not need_doc(dctx) then m = global.intro.mmmodule
                m = dctx.known_owner_of(m)
-               if m == dctx.module then
+               if m == dctx.mmmodule then
                        return "<a href=\"#{html_anchor}\">{self}</a>"
                else
                        return "<a href=\"{m}.html#{html_anchor}\">{self}</a>"
@@ -423,12 +423,12 @@ special MMEntity
 
        redef fun locate(dctx)
        do
-               return "in {module.html_link(dctx)}::{local_class.html_link(dctx)}"
+               return "in {mmmodule.html_link(dctx)}::{local_class.html_link(dctx)}"
        end
 
        fun known_intro_class(dctx: DocContext): MMLocalClass
        do
-               var mod = dctx.known_owner_of(global.intro.local_class.module)
+               var mod = dctx.known_owner_of(global.intro.local_class.mmmodule)
                var cla = mod[global.intro.local_class.global]
                return cla
        end
@@ -449,9 +449,9 @@ special MMEntity
                if is_redef then
                        var gp = global.intro
                        if intro_class.global != local_class.global then
-                               res.append(" {module[intro_class.global].html_link(dctx)}::")
-                       else if intro_class.module != module then
-                               res.append(" {intro_class.module.html_link(dctx)}::")
+                               res.append(" {mmmodule[intro_class.global].html_link(dctx)}::")
+                       else if intro_class.mmmodule != mmmodule then
+                               res.append(" {intro_class.mmmodule.html_link(dctx)}::")
                        end
                end
                return res.to_s
@@ -476,7 +476,7 @@ special MMEntity
        do
                if global.visibility_level >= 3 or self isa MMAttribute then
                        if not dctx.intrude_mode then return false
-                       if dctx.module.visibility_for(module) == 0 then return false
+                       if dctx.mmmodule.visibility_for(mmmodule) == 0 then return false
                end
                if global.intro == self then
                        return true
@@ -661,10 +661,10 @@ redef class MMSrcModule
        redef fun doc
        do
                var n = node
-               if n.n_packagedecl == null then
+               if n.n_moduledecl == null then
                        return null
                end
-               var np = n.n_packagedecl
+               var np = n.n_moduledecl
                var d = np.n_doc
                if d == null then
                        return null
@@ -702,10 +702,10 @@ special MMEntity
 
        redef fun html_link(dctx)
        do
-               var m = module
-               if not need_doc(dctx) then m = global.module
+               var m = mmmodule
+               if not need_doc(dctx) then m = global.mmmodule
                m = dctx.known_owner_of(m)
-               if m == dctx.module then
+               if m == dctx.mmmodule then
                        return "<a href=\"#{html_anchor}\">{self}</a>"
                else
                        return "<a href=\"{m}.html#{html_anchor}\">{self}</a>"
@@ -717,7 +717,7 @@ special MMEntity
        redef fun doc do return global.intro.doc
 
        redef fun need_doc(dctx) do
-               if module == dctx.module then
+               if mmmodule == dctx.mmmodule then
                        for m in dctx.owned_modules do
                                if m.global_classes.has(global) then
                                        var c = m[global]
@@ -728,9 +728,9 @@ special MMEntity
                return false
        end
 
-       redef fun locate(dctx) do return "in {module.html_link(dctx)}"
+       redef fun locate(dctx) do return "in {mmmodule.html_link(dctx)}"
 
-       fun known_intro(dctx: DocContext): MMLocalClass do return dctx.known_owner_of(global.intro.module)[global]
+       fun known_intro(dctx: DocContext): MMLocalClass do return dctx.known_owner_of(global.intro.mmmodule)[global]
 
        redef fun prototype_head(dctx)
        do
@@ -740,7 +740,7 @@ special MMEntity
                if is_redef then res.append("redef ")
                if global.visibility_level == 3 then res.append("private ")
                res.append("class ")
-               if is_redef then res.append("{ki.module.html_link(dctx)}::")
+               if is_redef then res.append("{ki.mmmodule.html_link(dctx)}::")
                return res.to_s
        end
 
@@ -763,26 +763,26 @@ special MMEntity
        # Extract the doc of a class
        fun extract_class_doc(dctx: DocContext)
        do
-               dctx.add("<a name=\"{html_anchor}\"></a><h2>{self}</h2><small>{module.html_link(dctx)}::</small><br/>{prototype_head(dctx)}<b>{self}</b>{prototype_body(dctx)}\n")
+               dctx.add("<a name=\"{html_anchor}\"></a><h2>{self}</h2><small>{mmmodule.html_link(dctx)}::</small><br/>{prototype_head(dctx)}<b>{self}</b>{prototype_body(dctx)}\n")
                dctx.add("<blockquote>\n")
                dctx.add("<dl>\n")
 
                var sup2 = new Array[String]
-               var intro_module = dctx.known_owner_of(global.module)
-               if intro_module != module then
+               var intro_module = dctx.known_owner_of(global.mmmodule)
+               if intro_module != mmmodule then
                        dctx.add("<dt>Refine {self} from: <dd>{intro_module.html_link(dctx)}\n")
                        sup2.clear
                        var mods = new Array[MMModule]
                        for c in crhe.greaters do
                                if c.need_doc(dctx) then
-                                       var km = dctx.known_owner_of(c.module)
-                                       if km != module and km != intro_module and not mods.has(km) then
+                                       var km = dctx.known_owner_of(c.mmmodule)
+                                       if km != mmmodule and km != intro_module and not mods.has(km) then
                                                mods.add(km)
                                        end
                                end
                        end
                        for c in crhe.linear_extension do
-                               if mods.has(c.module) then sup2.add(c.module.html_link(dctx))
+                               if mods.has(c.mmmodule) then sup2.add(c.mmmodule.html_link(dctx))
                        end
                        if not sup2.is_empty then dctx.add("<dt>Previous refinements in: <dd>{sup2.join(", ")}\n")
                end
@@ -809,7 +809,7 @@ special MMEntity
                sup2.clear
                for c in crhe.smallers do
                        c.compute_super_classes
-                       for c2 in c.module.local_classes do
+                       for c2 in c.mmmodule.local_classes do
                                if not c2 isa MMConcreteClass then continue
                                c2.compute_super_classes
                                c2.compute_ancestors
@@ -825,8 +825,8 @@ special MMEntity
                end
                sup2.clear
                for c in crhe.order do
-                       if not module.mhe <= c.module and c.need_doc(dctx) then
-                               sup2.add(c.module.html_link(dctx))
+                       if not mmmodule.mhe <= c.mmmodule and c.need_doc(dctx) then
+                               sup2.add(c.mmmodule.html_link(dctx))
                        end
                end
                if not sup2.is_empty then
@@ -876,7 +876,7 @@ special MMEntity
                var new_props = new Array[MMLocalProperty]
                for g in global_properties do
                        if not accept_prop(g.intro, pass) then continue
-                       if module.visibility_for(g.intro.module) < g.visibility_level then continue
+                       if mmmodule.visibility_for(g.intro.mmmodule) < g.visibility_level then continue
                        var p = self[g]
                        if p.local_class != self or not p.need_doc(dctx) then
                                var cla = new Array[MMLocalClass]
@@ -912,11 +912,11 @@ special MMEntity
                        var mmap = new HashMap[MMModule, Array[MMLocalProperty]]
                        for c in che.greaters do
                                if c isa MMSrcLocalClass then
-                                       var km = dctx.known_owner_of(c.module)
+                                       var km = dctx.known_owner_of(c.mmmodule)
                                        var kc = km[c.global]
                                        if kc == self then continue
                                        var props: Array[MMLocalProperty]
-                                       if km == module then
+                                       if km == mmmodule then
                                                if cmap.has_key(kc) then
                                                        props = cmap[kc]
                                                else
@@ -954,7 +954,7 @@ special MMEntity
 
                        dctx.open_stage
                        dctx.stage("<tr bgcolor=\"#EEEEFF\"><th colspan=\"2\"><small>Imported {passname}</small></th><tr>\n")
-                       for m in module.mhe.linear_extension do
+                       for m in mmmodule.mhe.linear_extension do
                                if not mmap.has_key(m) then continue
                                var props = mmap[m]
                                if props.is_empty then continue
@@ -968,9 +968,9 @@ special MMEntity
 
                var mmap = new HashMap[MMModule, Array[MMLocalProperty]]
                for c in crhe.order do
-                       if module.mhe <= c.module or dctx.owned_modules.has(c.module) or not c isa MMSrcLocalClass then continue
-                       var km = dctx.known_owner_of(c.module)
-                       if module.mhe <= km then continue
+                       if mmmodule.mhe <= c.mmmodule or dctx.owned_modules.has(c.mmmodule) or not c isa MMSrcLocalClass then continue
+                       var km = dctx.known_owner_of(c.mmmodule)
+                       if mmmodule.mhe <= km then continue
                        var kc = km[c.global]
                        var props: Array[MMLocalProperty]
                        if mmap.has_key(km) then
@@ -991,7 +991,7 @@ special MMEntity
                dctx.open_stage
                dctx.stage("<tr bgcolor=\"#EEEEFF\"><th colspan=\"2\"><small>Added {passname} in known modules</small></th><tr>\n")
                for c in crhe.order do
-                       var m = c.module
+                       var m = c.mmmodule
                        if not mmap.has_key(m) then continue
                        var props = mmap[m]
                        if props.is_empty then continue
@@ -1018,7 +1018,7 @@ special MMEntity
 
                dctx.open_stage
                for p in new_props do
-                       dctx.add("<a name=\"{p.html_anchor}\"></a><h3>{p}</h3><p><small>{p.module.html_link(dctx)}::{p.local_class.html_link(dctx)}::</small><br/>{p.prototype_head(dctx)} <b>{p.name}</b>{p.prototype_body(dctx)}</p>\n")
+                       dctx.add("<a name=\"{p.html_anchor}\"></a><h3>{p}</h3><p><small>{p.mmmodule.html_link(dctx)}::{p.local_class.html_link(dctx)}::</small><br/>{p.prototype_head(dctx)} <b>{p.name}</b>{p.prototype_body(dctx)}</p>\n")
                        dctx.add("<blockquote>")
                        var doc = p.doc
                        if doc != null then
@@ -1048,7 +1048,7 @@ special MMEntity
                if not properties.is_empty then
                        var s: String
                        if heir.global == global then
-                               s = module.html_link(dctx)
+                               s = mmmodule.html_link(dctx)
                        else
                                s = self.html_link(dctx)
                        end
@@ -1092,7 +1092,7 @@ redef class MMSrcLocalClass
        do
                if global.visibility_level >= 3 then
                        if not dctx.intrude_mode then return false
-                       if dctx.module.visibility_for(module) == 0 then return false
+                       if dctx.mmmodule.visibility_for(mmmodule) == 0 then return false
                end
                if global.intro == self then
                        return true
index e968e5d..09a6515 100644 (file)
@@ -41,15 +41,15 @@ redef class TComment
     end
 end
 
-redef class TKwpackage
+redef class TKwmodule
     redef fun parser_index: Int
     do
        return 2
     end
 
-    init init_tk(loc: Location)
+    init init_tk(text: String, loc: Location)
     do
-        _text = once "package"
+        _text = text
                _location = loc
     end
 end
@@ -1346,7 +1346,8 @@ special TablesCapable
                                                return new TComment.init_tk(token_text, location)
                                        end
                                        if accept_token == 3 then
-                                               return new TKwpackage.init_tk(location)
+                                               var token_text = text.substring(0, accept_length)
+                                               return new TKwmodule.init_tk(token_text, location)
                                        end
                                        if accept_token == 4 then
                                                return new TKwimport.init_tk(location)
index bcfb303..7a5f825 100644 (file)
@@ -57,7 +57,7 @@ blank = (' ' | tab)+;
 eol = eol_helper;
 comment = '#' any* eol_helper;
 
-kwpackage = 'package';
+kwmodule = 'package'|'module';
 kwimport = 'import';
 kwclass = 'class';
 kwabstract = 'abstract';
@@ -159,10 +159,10 @@ Productions
 
 /* MODULES *******************************************************************/
 module
-       = packagedecl? [imports]:import* [classdefs]:classdef* implicit_top_class? implicit_main_class? {-> New module(packagedecl, [imports.import],[classdefs.classdef,implicit_top_class.classdef,implicit_main_class.classdef])};
+       = moduledecl? [imports]:import* [classdefs]:classdef* implicit_top_class? implicit_main_class? {-> New module(moduledecl, [imports.import],[classdefs.classdef,implicit_top_class.classdef,implicit_main_class.classdef])};
 
-packagedecl
-       = [doc]:no kwpackage no id [n2]:n1 {-> New packagedecl(doc.doc, kwpackage, id)};
+moduledecl
+       = [doc]:no kwmodule no id [n2]:n1 {-> New moduledecl(doc.doc, kwmodule, id)};
 
 import
        = {std} [doc]:no visibility kwimport no id [n2]:n1              {-> New import.std(visibility, kwimport, id)}
@@ -575,10 +575,10 @@ n2
 Abstract Syntax Tree
 /*****************************************************************************/
 
-module = packagedecl? [imports]:import* [classdefs]:classdef*;
+module = moduledecl? [imports]:import* [classdefs]:classdef*;
 
-packagedecl
-       = doc? kwpackage id;
+moduledecl
+       = doc? kwmodule id;
 
 import = {std} visibility kwimport id
        | {no} visibility kwimport kwend
index 3588c23..da6b6ab 100644 (file)
@@ -973,10 +973,10 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode3 = new Array[Object]
                                        var listnode4 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode3,
                                                listnode4
                                        )
@@ -1017,13 +1017,13 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode4 = new Array[Object]
                                        var listnode5 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode3 = nodearraylist2
                                        assert listnode3 isa Array[Object]
                                        listnode4 = concat(listnode4, listnode3)
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode4,
                                                listnode5
                                        )
@@ -1064,13 +1064,13 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode3 = new Array[Object]
                                        var listnode5 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode4 = nodearraylist2
                                        assert listnode4 isa Array[Object]
                                        listnode5 = concat(listnode5, listnode4)
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode3,
                                                listnode5
                                        )
@@ -1116,8 +1116,8 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode4 = new Array[Object]
                                        var listnode6 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode3 = nodearraylist2
                                        assert listnode3 isa Array[Object]
                                        listnode4 = concat(listnode4, listnode3)
@@ -1125,7 +1125,7 @@ special ReduceAction
                                        assert listnode5 isa Array[Object]
                                        listnode6 = concat(listnode6, listnode5)
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode4,
                                                listnode6
                                        )
@@ -1173,8 +1173,8 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode3 = new Array[Object]
                                        var listnode7 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode6 = new Array[Object]
                                        var listnode5 = nodearraylist2
                                        assert listnode5 isa Array[Object]
@@ -1186,7 +1186,7 @@ special ReduceAction
                                                listnode7.add(pclassdefnode4)
                                        end
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode3,
                                                listnode7
                                        )
@@ -1239,8 +1239,8 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode4 = new Array[Object]
                                        var listnode8 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode3 = nodearraylist2
                                        assert listnode3 isa Array[Object]
                                        listnode4 = concat(listnode4, listnode3)
@@ -1255,7 +1255,7 @@ special ReduceAction
                                                listnode8.add(pclassdefnode5)
                                        end
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode4,
                                                listnode8
                                        )
@@ -1308,8 +1308,8 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode3 = new Array[Object]
                                        var listnode8 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode4 = nodearraylist2
                                        assert listnode4 isa Array[Object]
                                        var listnode7 = new Array[Object]
@@ -1324,7 +1324,7 @@ special ReduceAction
                                                listnode8.add(pclassdefnode5)
                                        end
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode3,
                                                listnode8
                                        )
@@ -1382,8 +1382,8 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode4 = new Array[Object]
                                        var listnode9 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode3 = nodearraylist2
                                        assert listnode3 isa Array[Object]
                                        listnode4 = concat(listnode4, listnode3)
@@ -1401,7 +1401,7 @@ special ReduceAction
                                                listnode9.add(pclassdefnode6)
                                        end
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode4,
                                                listnode9
                                        )
@@ -1444,15 +1444,15 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode3 = new Array[Object]
                                        var listnode5 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var pclassdefnode4 = nodearraylist2
                                        assert pclassdefnode4 isa nullable AClassdef
                                        if pclassdefnode4 != null then
                                                listnode5.add(pclassdefnode4)
                                        end
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode3,
                                                listnode5
                                        )
@@ -1500,8 +1500,8 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode4 = new Array[Object]
                                        var listnode6 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode3 = nodearraylist2
                                        assert listnode3 isa Array[Object]
                                        listnode4 = concat(listnode4, listnode3)
@@ -1511,7 +1511,7 @@ special ReduceAction
                                                listnode6.add(pclassdefnode5)
                                        end
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode4,
                                                listnode6
                                        )
@@ -1559,8 +1559,8 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode3 = new Array[Object]
                                        var listnode6 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode4 = nodearraylist2
                                        assert listnode4 isa Array[Object]
                                        var pclassdefnode5 = nodearraylist3
@@ -1570,7 +1570,7 @@ special ReduceAction
                                                listnode6.add(pclassdefnode5)
                                        end
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode3,
                                                listnode6
                                        )
@@ -1623,8 +1623,8 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode4 = new Array[Object]
                                        var listnode7 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode3 = nodearraylist2
                                        assert listnode3 isa Array[Object]
                                        listnode4 = concat(listnode4, listnode3)
@@ -1637,7 +1637,7 @@ special ReduceAction
                                                listnode7.add(pclassdefnode6)
                                        end
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode4,
                                                listnode7
                                        )
@@ -1692,8 +1692,8 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode3 = new Array[Object]
                                        var listnode8 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode6 = new Array[Object]
                                        var listnode5 = nodearraylist2
                                        assert listnode5 isa Array[Object]
@@ -1710,7 +1710,7 @@ special ReduceAction
                                                listnode8.add(pclassdefnode7)
                                        end
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode3,
                                                listnode8
                                        )
@@ -1770,8 +1770,8 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode4 = new Array[Object]
                                        var listnode9 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode3 = nodearraylist2
                                        assert listnode3 isa Array[Object]
                                        listnode4 = concat(listnode4, listnode3)
@@ -1791,7 +1791,7 @@ special ReduceAction
                                                listnode9.add(pclassdefnode8)
                                        end
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode4,
                                                listnode9
                                        )
@@ -1851,8 +1851,8 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode3 = new Array[Object]
                                        var listnode9 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode4 = nodearraylist2
                                        assert listnode4 isa Array[Object]
                                        var listnode7 = new Array[Object]
@@ -1872,7 +1872,7 @@ special ReduceAction
                                                listnode9.add(pclassdefnode8)
                                        end
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode3,
                                                listnode9
                                        )
@@ -1937,8 +1937,8 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var listnode4 = new Array[Object]
                                        var listnode10 = new Array[Object]
-                                       var ppackagedeclnode2 = nodearraylist1
-                                       assert ppackagedeclnode2 isa nullable APackagedecl
+                                       var pmoduledeclnode2 = nodearraylist1
+                                       assert pmoduledeclnode2 isa nullable AModuledecl
                                        var listnode3 = nodearraylist2
                                        assert listnode3 isa Array[Object]
                                        listnode4 = concat(listnode4, listnode3)
@@ -1961,7 +1961,7 @@ special ReduceAction
                                                listnode10.add(pclassdefnode9)
                                        end
                                        var pmodulenode1: nullable AModule = new AModule.init_amodule(
-                                               ppackagedeclnode2,
+                                               pmoduledeclnode2,
                                                listnode4,
                                                listnode10
                                        )
@@ -1983,16 +1983,16 @@ special ReduceAction
                                        var nodearraylist1 = p.pop
                                        var pdocnode2 = nodearraylist1
                                        assert pdocnode2 isa nullable ADoc
-                                       var tkwpackagenode3 = nodearraylist2
-                                       assert tkwpackagenode3 isa nullable TKwpackage
+                                       var tkwmodulenode3 = nodearraylist2
+                                       assert tkwmodulenode3 isa nullable TKwmodule
                                        var tidnode4 = nodearraylist4
                                        assert tidnode4 isa nullable TId
-                                       var ppackagedeclnode1: nullable APackagedecl = new APackagedecl.init_apackagedecl(
+                                       var pmoduledeclnode1: nullable AModuledecl = new AModuledecl.init_amoduledecl(
                                                pdocnode2,
-                                               tkwpackagenode3,
+                                               tkwmodulenode3,
                                                tidnode4
                                        )
-                                       node_list = ppackagedeclnode1
+                                       node_list = pmoduledeclnode1
                                        p.push(p.go_to(_goto), node_list)
        end
        var _goto: Int
index fa19279..954217e 100644 (file)
@@ -29,7 +29,7 @@ end
 class TComment
 special Token
 end
-class TKwpackage
+class TKwmodule
 special Token
 end
 class TKwimport
@@ -294,7 +294,7 @@ private init noinit do end
 end
 
 class AModule special Prod end
-class APackagedecl special Prod end
+class AModuledecl special Prod end
 class AImport special Prod end
 class AVisibility special Prod end
 class AClassdef special Prod end
@@ -318,14 +318,14 @@ class ADoc special Prod end
 
 class AModule
 special AModule
-    readable var _n_packagedecl: nullable APackagedecl = null
+    readable var _n_moduledecl: nullable AModuledecl = null
     readable var _n_imports: List[AImport] = new List[AImport]
     readable var _n_classdefs: List[AClassdef] = new List[AClassdef]
 end
-class APackagedecl
-special APackagedecl
+class AModuledecl
+special AModuledecl
     readable var _n_doc: nullable ADoc = null
-    readable var _n_kwpackage: TKwpackage
+    readable var _n_kwmodule: TKwmodule
     readable var _n_id: TId
 end
 class AStdImport
index 777bddb..804a11c 100644 (file)
@@ -45,7 +45,7 @@ end
 class TComment
 special Token
 end
-class TKwpackage
+class TKwmodule
 special Token
 end
 class TKwimport
@@ -311,14 +311,14 @@ end
 
 class AModule
 special Prod
-    readable var _n_packagedecl: nullable APackagedecl = null
+    readable var _n_moduledecl: nullable AModuledecl = null
     readable var _n_imports: List[AImport] = new List[AImport]
     readable var _n_classdefs: List[AClassdef] = new List[AClassdef]
 end
-class APackagedecl
+class AModuledecl
 special Prod
     readable var _n_doc: nullable ADoc = null
-    readable var _n_kwpackage: TKwpackage
+    readable var _n_kwmodule: TKwmodule
     readable var _n_id: TId
 end
 class AImport special Prod end
index 99107cc..d238917 100644 (file)
@@ -71,15 +71,15 @@ redef class AModule
     private init empty_init do end
 
     init init_amodule (
-            n_packagedecl: nullable APackagedecl,
+            n_moduledecl: nullable AModuledecl,
             n_imports: Collection[Object], # Should be Collection[AImport]
             n_classdefs: Collection[Object] # Should be Collection[AClassdef]
     )
     do
         empty_init
-        _n_packagedecl = n_packagedecl
-       if n_packagedecl != null then
-               n_packagedecl.parent = self
+        _n_moduledecl = n_moduledecl
+       if n_moduledecl != null then
+               n_moduledecl.parent = self
        end
        for n in n_imports do
                assert n isa AImport
@@ -95,13 +95,13 @@ redef class AModule
 
     redef fun replace_child(old_child: ANode, new_child: nullable ANode)
     do
-        if _n_packagedecl == old_child then
+        if _n_moduledecl == old_child then
             if new_child != null then
                 new_child.parent = self
-               assert new_child isa APackagedecl
-                _n_packagedecl = new_child
+               assert new_child isa AModuledecl
+                _n_moduledecl = new_child
            else
-               _n_packagedecl = null
+               _n_moduledecl = null
             end
             return
        end
@@ -133,8 +133,8 @@ redef class AModule
 
     redef fun visit_all(v: Visitor)
     do
-        if _n_packagedecl != null then
-            v.enter_visit(_n_packagedecl.as(not null))
+        if _n_moduledecl != null then
+            v.enter_visit(_n_moduledecl.as(not null))
         end
             for n in _n_imports do
                 v.enter_visit(n)
@@ -144,12 +144,12 @@ redef class AModule
            end
     end
 end
-redef class APackagedecl
+redef class AModuledecl
     private init empty_init do end
 
-    init init_apackagedecl (
+    init init_amoduledecl (
             n_doc: nullable ADoc,
-            n_kwpackage: nullable TKwpackage,
+            n_kwmodule: nullable TKwmodule,
             n_id: nullable TId
     )
     do
@@ -158,8 +158,8 @@ redef class APackagedecl
        if n_doc != null then
                n_doc.parent = self
        end
-        _n_kwpackage = n_kwpackage.as(not null)
-       n_kwpackage.parent = self
+        _n_kwmodule = n_kwmodule.as(not null)
+       n_kwmodule.parent = self
         _n_id = n_id.as(not null)
        n_id.parent = self
     end
@@ -176,11 +176,11 @@ redef class APackagedecl
             end
             return
        end
-        if _n_kwpackage == old_child then
+        if _n_kwmodule == old_child then
             if new_child != null then
                 new_child.parent = self
-               assert new_child isa TKwpackage
-                _n_kwpackage = new_child
+               assert new_child isa TKwmodule
+                _n_kwmodule = new_child
            else
                abort
             end
@@ -203,7 +203,7 @@ redef class APackagedecl
         if _n_doc != null then
             v.enter_visit(_n_doc.as(not null))
         end
-        v.enter_visit(_n_kwpackage)
+        v.enter_visit(_n_kwmodule)
         v.enter_visit(_n_id)
     end
 end
index 5e7aec7..2fff3e9 100644 (file)
@@ -40,19 +40,19 @@ static const int lexer_goto_row1[] = {
        105, 105, 34,
        106, 107, 33,
        108, 108, 35,
-       109, 109, 33,
-       110, 110, 36,
-       111, 111, 37,
-       112, 112, 38,
+       109, 109, 36,
+       110, 110, 37,
+       111, 111, 38,
+       112, 112, 39,
        113, 113, 33,
-       114, 114, 39,
-       115, 115, 40,
-       116, 116, 41,
-       117, 117, 42,
-       118, 118, 43,
-       119, 119, 44,
+       114, 114, 40,
+       115, 115, 41,
+       116, 116, 42,
+       117, 117, 43,
+       118, 118, 44,
+       119, 119, 45,
        120, 122, 33,
-       125, 125, 45
+       125, 125, 46
 };
 static const int lexer_goto_row2[] = {
        2,
@@ -61,7 +61,7 @@ static const int lexer_goto_row2[] = {
 };
 static const int lexer_goto_row4[] = {
        1,
-       10, 10, 46
+       10, 10, 47
 };
 static const int lexer_goto_row5[] = {
        1,
@@ -69,290 +69,292 @@ static const int lexer_goto_row5[] = {
 };
 static const int lexer_goto_row6[] = {
        1,
-       61, 61, 47
+       61, 61, 48
 };
 static const int lexer_goto_row7[] = {
        9,
-       0, 9, 48,
-       11, 12, 48,
-       14, 33, 48,
-       34, 34, 49,
-       35, 91, 48,
-       92, 92, 50,
-       93, 122, 48,
-       123, 123, 51,
-       124, 255, 48
+       0, 9, 49,
+       11, 12, 49,
+       14, 33, 49,
+       34, 34, 50,
+       35, 91, 49,
+       92, 92, 51,
+       93, 122, 49,
+       123, 123, 52,
+       124, 255, 49
 };
 static const int lexer_goto_row8[] = {
        5,
-       0, 9, 52,
-       10, 10, 53,
-       11, 12, 52,
-       13, 13, 54,
-       14, 255, 52
+       0, 9, 53,
+       10, 10, 54,
+       11, 12, 53,
+       13, 13, 55,
+       14, 255, 53
 };
 static const int lexer_goto_row10[] = {
        5,
-       0, 9, 55,
-       11, 12, 55,
-       14, 38, 55,
-       39, 39, 56,
-       40, 255, 55
+       0, 9, 56,
+       11, 12, 56,
+       14, 38, 56,
+       39, 39, 57,
+       40, 255, 56
 };
 static const int lexer_goto_row14[] = {
        1,
-       61, 61, 57
+       61, 61, 58
 };
 static const int lexer_goto_row16[] = {
        1,
-       61, 61, 58
+       61, 61, 59
 };
 static const int lexer_goto_row17[] = {
        2,
-       46, 46, 59,
-       48, 57, 60
+       46, 46, 60,
+       48, 57, 61
 };
 static const int lexer_goto_row19[] = {
        2,
-       46, 46, 61,
+       46, 46, 62,
        48, 57, 18
 };
 static const int lexer_goto_row20[] = {
        1,
-       58, 58, 62
+       58, 58, 63
 };
 static const int lexer_goto_row21[] = {
        1,
-       61, 61, 63
+       61, 61, 64
 };
 static const int lexer_goto_row22[] = {
        1,
-       61, 61, 64
+       61, 61, 65
 };
 static const int lexer_goto_row23[] = {
        1,
-       61, 61, 65
+       61, 61, 66
 };
 static const int lexer_goto_row24[] = {
        4,
-       48, 57, 66,
-       65, 90, 67,
-       95, 95, 68,
-       97, 122, 69
+       48, 57, 67,
+       65, 90, 68,
+       95, 95, 69,
+       97, 122, 70
 };
 static const int lexer_goto_row27[] = {
        1,
-       97, 122, 70
+       97, 122, 71
 };
 static const int lexer_goto_row28[] = {
        10,
-       48, 57, 71,
-       65, 90, 72,
-       95, 95, 73,
-       97, 97, 74,
-       98, 98, 75,
-       99, 109, 74,
-       110, 110, 76,
-       111, 114, 74,
-       115, 115, 77,
-       116, 122, 74
+       48, 57, 72,
+       65, 90, 73,
+       95, 95, 74,
+       97, 97, 75,
+       98, 98, 76,
+       99, 109, 75,
+       110, 110, 77,
+       111, 114, 75,
+       115, 115, 78,
+       116, 122, 75
 };
 static const int lexer_goto_row29[] = {
        4,
        48, 95, -29,
-       97, 113, 74,
-       114, 114, 78,
-       115, 122, 74
+       97, 113, 75,
+       114, 114, 79,
+       115, 122, 75
 };
 static const int lexer_goto_row30[] = {
        6,
        48, 95, -29,
-       97, 107, 74,
-       108, 108, 79,
-       109, 110, 74,
-       111, 111, 80,
-       112, 122, 74
+       97, 107, 75,
+       108, 108, 80,
+       109, 110, 75,
+       111, 111, 81,
+       112, 122, 75
 };
 static const int lexer_goto_row31[] = {
        4,
        48, 95, -29,
-       97, 110, 74,
-       111, 111, 81,
-       112, 122, 74
+       97, 110, 75,
+       111, 111, 82,
+       112, 122, 75
 };
 static const int lexer_goto_row32[] = {
        7,
        48, 107, -31,
-       108, 108, 82,
-       109, 109, 74,
-       110, 110, 83,
-       111, 119, 74,
-       120, 120, 84,
-       121, 122, 74
+       108, 108, 83,
+       109, 109, 75,
+       110, 110, 84,
+       111, 119, 75,
+       120, 120, 85,
+       121, 122, 75
 };
 static const int lexer_goto_row33[] = {
        7,
        48, 95, -29,
-       97, 97, 85,
-       98, 110, 74,
-       111, 111, 86,
-       112, 116, 74,
-       117, 117, 87,
-       118, 122, 74
+       97, 97, 86,
+       98, 110, 75,
+       111, 111, 87,
+       112, 116, 75,
+       117, 117, 88,
+       118, 122, 75
 };
 static const int lexer_goto_row34[] = {
        2,
        48, 95, -29,
-       97, 122, 74
+       97, 122, 75
 };
 static const int lexer_goto_row35[] = {
        9,
        48, 95, -29,
-       97, 101, 74,
-       102, 102, 88,
-       103, 108, 74,
-       109, 109, 89,
-       110, 110, 90,
-       111, 114, 74,
-       115, 115, 91,
-       116, 122, 74
+       97, 101, 75,
+       102, 102, 89,
+       103, 108, 75,
+       109, 109, 90,
+       110, 110, 91,
+       111, 114, 75,
+       115, 115, 92,
+       116, 122, 75
 };
 static const int lexer_goto_row36[] = {
        5,
        48, 95, -29,
-       97, 97, 92,
-       98, 110, 74,
-       111, 111, 93,
-       112, 122, 74
+       97, 97, 93,
+       98, 110, 75,
+       111, 111, 94,
+       112, 122, 75
 };
 static const int lexer_goto_row37[] = {
-       8,
-       48, 95, -29,
-       97, 100, 74,
-       101, 101, 94,
-       102, 110, 74,
+       3,
+       48, 110, -32,
        111, 111, 95,
-       112, 116, 74,
-       117, 117, 96,
-       118, 122, 74
+       112, 122, 75
 };
 static const int lexer_goto_row38[] = {
-       6,
+       8,
        48, 95, -29,
-       97, 109, 74,
-       110, 110, 97,
-       111, 113, 74,
-       114, 114, 98,
-       115, 122, 74
+       97, 100, 75,
+       101, 101, 96,
+       102, 110, 75,
+       111, 111, 97,
+       112, 116, 75,
+       117, 117, 98,
+       118, 122, 75
 };
 static const int lexer_goto_row39[] = {
-       5,
+       6,
        48, 95, -29,
-       97, 97, 99,
-       98, 113, 74,
+       97, 109, 75,
+       110, 110, 99,
+       111, 113, 75,
        114, 114, 100,
-       115, 122, 74
+       115, 122, 75
 };
 static const int lexer_goto_row40[] = {
-       3,
-       48, 100, -38,
-       101, 101, 101,
-       102, 122, 74
+       5,
+       48, 95, -29,
+       97, 97, 101,
+       98, 113, 75,
+       114, 114, 102,
+       115, 122, 75
 };
 static const int lexer_goto_row41[] = {
-       7,
-       48, 100, -38,
-       101, 101, 102,
-       102, 111, 74,
-       112, 112, 103,
-       113, 116, 74,
-       117, 117, 104,
-       118, 122, 74
+       3,
+       48, 100, -39,
+       101, 101, 103,
+       102, 122, 75
 };
 static const int lexer_goto_row42[] = {
+       7,
+       48, 100, -39,
+       101, 101, 104,
+       102, 111, 75,
+       112, 112, 105,
+       113, 116, 75,
+       117, 117, 106,
+       118, 122, 75
+};
+static const int lexer_goto_row43[] = {
        8,
        48, 95, -29,
-       97, 103, 74,
-       104, 104, 105,
-       105, 113, 74,
-       114, 114, 106,
-       115, 120, 74,
-       121, 121, 107,
-       122, 122, 74
+       97, 103, 75,
+       104, 104, 107,
+       105, 113, 75,
+       114, 114, 108,
+       115, 120, 75,
+       121, 121, 109,
+       122, 122, 75
 };
-static const int lexer_goto_row43[] = {
+static const int lexer_goto_row44[] = {
        3,
-       48, 109, -39,
-       110, 110, 108,
-       111, 122, 74
+       48, 109, -40,
+       110, 110, 110,
+       111, 122, 75
 };
-static const int lexer_goto_row44[] = {
+static const int lexer_goto_row45[] = {
        3,
        48, 95, -29,
-       97, 97, 109,
-       98, 122, 74
+       97, 97, 111,
+       98, 122, 75
 };
-static const int lexer_goto_row45[] = {
+static const int lexer_goto_row46[] = {
        5,
-       48, 103, -43,
-       104, 104, 110,
-       105, 113, 74,
-       114, 114, 111,
-       115, 122, 74
+       48, 103, -44,
+       104, 104, 112,
+       105, 113, 75,
+       114, 114, 113,
+       115, 122, 75
 };
-static const int lexer_goto_row46[] = {
+static const int lexer_goto_row47[] = {
        9,
-       0, 9, 112,
-       11, 12, 112,
-       14, 33, 112,
-       34, 34, 113,
-       35, 91, 112,
-       92, 92, 114,
-       93, 122, 112,
-       123, 123, 115,
-       124, 255, 112
-};
-static const int lexer_goto_row49[] = {
+       0, 9, 114,
+       11, 12, 114,
+       14, 33, 114,
+       34, 34, 115,
+       35, 91, 114,
+       92, 92, 116,
+       93, 122, 114,
+       123, 123, 117,
+       124, 255, 114
+};
+static const int lexer_goto_row50[] = {
        1,
        0, 255, -8
 };
-static const int lexer_goto_row51[] = {
+static const int lexer_goto_row52[] = {
        3,
-       0, 9, 116,
-       11, 12, 116,
-       14, 255, 116
+       0, 9, 118,
+       11, 12, 118,
+       14, 255, 118
 };
-static const int lexer_goto_row53[] = {
+static const int lexer_goto_row54[] = {
        1,
        0, 255, -9
 };
-static const int lexer_goto_row55[] = {
-       1,
-       10, 10, 117
-};
 static const int lexer_goto_row56[] = {
        1,
-       0, 255, -11
+       10, 10, 119
 };
-static const int lexer_goto_row60[] = {
+static const int lexer_goto_row57[] = {
        1,
-       46, 46, 118
+       0, 255, -11
 };
 static const int lexer_goto_row61[] = {
        1,
-       48, 57, 60
+       46, 46, 120
 };
 static const int lexer_goto_row62[] = {
        1,
-       48, 57, 60
+       48, 57, 61
 };
-static const int lexer_goto_row64[] = {
+static const int lexer_goto_row63[] = {
        1,
-       62, 62, 119
+       48, 57, 61
 };
-static const int lexer_goto_row67[] = {
+static const int lexer_goto_row65[] = {
        1,
-       48, 122, -25
+       62, 62, 121
 };
 static const int lexer_goto_row68[] = {
        1,
@@ -367,15 +369,15 @@ static const int lexer_goto_row70[] = {
        48, 122, -25
 };
 static const int lexer_goto_row71[] = {
-       4,
-       48, 57, 120,
-       65, 90, 121,
-       95, 95, 122,
-       97, 122, 123
+       1,
+       48, 122, -25
 };
 static const int lexer_goto_row72[] = {
-       1,
-       48, 122, -35
+       4,
+       48, 57, 122,
+       65, 90, 123,
+       95, 95, 124,
+       97, 122, 125
 };
 static const int lexer_goto_row73[] = {
        1,
@@ -390,684 +392,684 @@ static const int lexer_goto_row75[] = {
        48, 122, -35
 };
 static const int lexer_goto_row76[] = {
-       5,
-       48, 110, -32,
-       111, 111, 124,
-       112, 114, 74,
-       115, 115, 125,
-       116, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row77[] = {
-       4,
-       48, 95, -29,
-       97, 99, 74,
-       100, 100, 126,
-       101, 122, 74
+       5,
+       48, 110, -32,
+       111, 111, 126,
+       112, 114, 75,
+       115, 115, 127,
+       116, 122, 75
 };
 static const int lexer_goto_row78[] = {
        4,
        48, 95, -29,
-       97, 114, 74,
-       115, 115, 127,
-       116, 122, 74
+       97, 99, 75,
+       100, 100, 128,
+       101, 122, 75
 };
 static const int lexer_goto_row79[] = {
-       3,
-       48, 100, -38,
-       101, 101, 128,
-       102, 122, 74
+       4,
+       48, 95, -29,
+       97, 114, 75,
+       115, 115, 129,
+       116, 122, 75
 };
 static const int lexer_goto_row80[] = {
        3,
-       48, 95, -29,
-       97, 97, 129,
-       98, 122, 74
+       48, 100, -39,
+       101, 101, 130,
+       102, 122, 75
 };
 static const int lexer_goto_row81[] = {
        3,
-       48, 109, -39,
-       110, 110, 130,
-       111, 122, 74
+       48, 95, -29,
+       97, 97, 131,
+       98, 122, 75
 };
 static const int lexer_goto_row82[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 109, -40,
+       110, 110, 132,
+       111, 122, 75
 };
 static const int lexer_goto_row83[] = {
-       3,
-       48, 114, -79,
-       115, 115, 131,
-       116, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row84[] = {
        3,
-       48, 99, -78,
-       100, 100, 132,
-       101, 122, 74
+       48, 114, -80,
+       115, 115, 133,
+       116, 122, 75
 };
 static const int lexer_goto_row85[] = {
+       3,
+       48, 99, -79,
+       100, 100, 134,
+       101, 122, 75
+};
+static const int lexer_goto_row86[] = {
        4,
        48, 95, -29,
-       97, 115, 74,
-       116, 116, 133,
-       117, 122, 74
+       97, 115, 75,
+       116, 116, 135,
+       117, 122, 75
 };
-static const int lexer_goto_row86[] = {
+static const int lexer_goto_row87[] = {
        3,
        48, 107, -31,
-       108, 108, 134,
-       109, 122, 74
+       108, 108, 136,
+       109, 122, 75
 };
-static const int lexer_goto_row87[] = {
+static const int lexer_goto_row88[] = {
        3,
        48, 113, -30,
-       114, 114, 135,
-       115, 122, 74
+       114, 114, 137,
+       115, 122, 75
 };
-static const int lexer_goto_row88[] = {
+static const int lexer_goto_row89[] = {
        3,
-       48, 109, -39,
-       110, 110, 136,
-       111, 122, 74
+       48, 109, -40,
+       110, 110, 138,
+       111, 122, 75
 };
-static const int lexer_goto_row89[] = {
+static const int lexer_goto_row90[] = {
        1,
        48, 122, -35
 };
-static const int lexer_goto_row90[] = {
+static const int lexer_goto_row91[] = {
        4,
        48, 95, -29,
-       97, 111, 74,
-       112, 112, 137,
-       113, 122, 74
+       97, 111, 75,
+       112, 112, 139,
+       113, 122, 75
 };
-static const int lexer_goto_row91[] = {
+static const int lexer_goto_row92[] = {
        6,
        48, 95, -29,
-       97, 104, 74,
-       105, 105, 138,
-       106, 115, 74,
-       116, 116, 139,
-       117, 122, 74
+       97, 104, 75,
+       105, 105, 140,
+       106, 115, 75,
+       116, 116, 141,
+       117, 122, 75
 };
-static const int lexer_goto_row92[] = {
+static const int lexer_goto_row93[] = {
        5,
        48, 95, -29,
-       97, 97, 140,
-       98, 114, 74,
-       115, 115, 141,
-       116, 122, 74
+       97, 97, 142,
+       98, 114, 75,
+       115, 115, 143,
+       116, 122, 75
 };
-static const int lexer_goto_row93[] = {
+static const int lexer_goto_row94[] = {
        3,
        48, 97, -29,
-       98, 98, 142,
-       99, 122, 74
+       98, 98, 144,
+       99, 122, 75
 };
-static const int lexer_goto_row94[] = {
+static const int lexer_goto_row95[] = {
        3,
        48, 110, -32,
-       111, 111, 143,
-       112, 122, 74
+       111, 111, 145,
+       112, 122, 75
 };
-static const int lexer_goto_row95[] = {
+static const int lexer_goto_row96[] = {
+       3,
+       48, 99, -79,
+       100, 100, 146,
+       101, 122, 75
+};
+static const int lexer_goto_row97[] = {
        4,
        48, 95, -29,
-       97, 118, 74,
-       119, 119, 144,
-       120, 122, 74
+       97, 118, 75,
+       119, 119, 147,
+       120, 122, 75
 };
-static const int lexer_goto_row96[] = {
+static const int lexer_goto_row98[] = {
        3,
-       48, 115, -86,
-       116, 116, 145,
-       117, 122, 74
+       48, 115, -87,
+       116, 116, 148,
+       117, 122, 75
 };
-static const int lexer_goto_row97[] = {
+static const int lexer_goto_row99[] = {
        3,
        48, 107, -31,
-       108, 108, 146,
-       109, 122, 74
+       108, 108, 149,
+       109, 122, 75
 };
-static const int lexer_goto_row98[] = {
+static const int lexer_goto_row100[] = {
        4,
        48, 95, -29,
-       97, 98, 74,
-       99, 99, 147,
-       100, 122, 74
+       97, 98, 75,
+       99, 99, 150,
+       100, 122, 75
 };
-static const int lexer_goto_row99[] = {
+static const int lexer_goto_row101[] = {
        1,
        48, 122, -35
 };
-static const int lexer_goto_row100[] = {
+static const int lexer_goto_row102[] = {
        3,
-       48, 98, -99,
-       99, 99, 148,
-       100, 122, 74
+       48, 98, -101,
+       99, 99, 151,
+       100, 122, 75
 };
-static const int lexer_goto_row101[] = {
+static const int lexer_goto_row103[] = {
        5,
-       48, 104, -92,
-       105, 105, 149,
-       106, 110, 74,
-       111, 111, 150,
-       112, 122, 74
+       48, 104, -93,
+       105, 105, 152,
+       106, 110, 75,
+       111, 111, 153,
+       112, 122, 75
 };
-static const int lexer_goto_row102[] = {
+static const int lexer_goto_row104[] = {
        7,
        48, 95, -29,
-       97, 97, 151,
-       98, 99, 74,
-       100, 100, 152,
-       101, 115, 74,
-       116, 116, 153,
-       117, 122, 74
-};
-static const int lexer_goto_row103[] = {
-       3,
-       48, 107, -31,
-       108, 108, 154,
-       109, 122, 74
-};
-static const int lexer_goto_row104[] = {
-       3,
-       48, 100, -38,
-       101, 101, 155,
-       102, 122, 74
+       97, 97, 154,
+       98, 99, 75,
+       100, 100, 155,
+       101, 115, 75,
+       116, 116, 156,
+       117, 122, 75
 };
 static const int lexer_goto_row105[] = {
        3,
-       48, 111, -91,
-       112, 112, 156,
-       113, 122, 74
+       48, 107, -31,
+       108, 108, 157,
+       109, 122, 75
 };
 static const int lexer_goto_row106[] = {
        3,
-       48, 100, -38,
-       101, 101, 157,
-       102, 122, 74
+       48, 100, -39,
+       101, 101, 158,
+       102, 122, 75
 };
 static const int lexer_goto_row107[] = {
-       4,
-       48, 95, -29,
-       97, 116, 74,
-       117, 117, 158,
-       118, 122, 74
+       3,
+       48, 111, -92,
+       112, 112, 159,
+       113, 122, 75
 };
 static const int lexer_goto_row108[] = {
        3,
-       48, 111, -91,
-       112, 112, 159,
-       113, 122, 74
+       48, 100, -39,
+       101, 101, 160,
+       102, 122, 75
 };
 static const int lexer_goto_row109[] = {
-       3,
-       48, 104, -92,
-       105, 105, 160,
-       106, 122, 74
+       4,
+       48, 95, -29,
+       97, 116, 75,
+       117, 117, 161,
+       118, 122, 75
 };
 static const int lexer_goto_row110[] = {
        3,
-       48, 113, -30,
-       114, 114, 161,
-       115, 122, 74
+       48, 111, -92,
+       112, 112, 162,
+       113, 122, 75
 };
 static const int lexer_goto_row111[] = {
        3,
-       48, 104, -92,
-       105, 105, 162,
-       106, 122, 74
+       48, 104, -93,
+       105, 105, 163,
+       106, 122, 75
 };
 static const int lexer_goto_row112[] = {
        3,
-       48, 104, -92,
-       105, 105, 163,
-       106, 122, 74
+       48, 113, -30,
+       114, 114, 164,
+       115, 122, 75
 };
 static const int lexer_goto_row113[] = {
-       1,
-       0, 255, -47
+       3,
+       48, 104, -93,
+       105, 105, 165,
+       106, 122, 75
 };
-static const int lexer_goto_row115[] = {
+static const int lexer_goto_row114[] = {
        3,
-       0, 9, 164,
-       11, 12, 164,
-       14, 255, 164
+       48, 104, -93,
+       105, 105, 166,
+       106, 122, 75
 };
-static const int lexer_goto_row117[] = {
+static const int lexer_goto_row115[] = {
        1,
-       0, 255, -8
+       0, 255, -48
 };
-static const int lexer_goto_row121[] = {
-       1,
-       48, 122, -72
+static const int lexer_goto_row117[] = {
+       3,
+       0, 9, 167,
+       11, 12, 167,
+       14, 255, 167
 };
-static const int lexer_goto_row122[] = {
+static const int lexer_goto_row119[] = {
        1,
-       48, 122, -72
+       0, 255, -8
 };
 static const int lexer_goto_row123[] = {
        1,
-       48, 122, -72
+       48, 122, -73
 };
 static const int lexer_goto_row124[] = {
        1,
-       48, 122, -72
+       48, 122, -73
 };
 static const int lexer_goto_row125[] = {
-       3,
-       48, 113, -30,
-       114, 114, 165,
-       115, 122, 74
+       1,
+       48, 122, -73
 };
 static const int lexer_goto_row126[] = {
-       3,
-       48, 115, -86,
-       116, 116, 166,
-       117, 122, 74
+       1,
+       48, 122, -73
 };
 static const int lexer_goto_row127[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 113, -30,
+       114, 114, 168,
+       115, 122, 75
 };
 static const int lexer_goto_row128[] = {
        3,
-       48, 100, -38,
-       101, 101, 167,
-       102, 122, 74
+       48, 115, -87,
+       116, 116, 169,
+       117, 122, 75
 };
 static const int lexer_goto_row129[] = {
-       3,
-       48, 95, -29,
-       97, 97, 168,
-       98, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row130[] = {
        3,
-       48, 114, -79,
-       115, 115, 169,
-       116, 122, 74
+       48, 100, -39,
+       101, 101, 170,
+       102, 122, 75
 };
 static const int lexer_goto_row131[] = {
        3,
-       48, 115, -86,
-       116, 116, 170,
-       117, 122, 74
+       48, 95, -29,
+       97, 97, 171,
+       98, 122, 75
 };
 static const int lexer_goto_row132[] = {
        3,
-       48, 100, -38,
-       101, 101, 171,
-       102, 122, 74
+       48, 114, -80,
+       115, 115, 172,
+       116, 122, 75
 };
 static const int lexer_goto_row133[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 115, -87,
+       116, 116, 173,
+       117, 122, 75
 };
 static const int lexer_goto_row134[] = {
        3,
-       48, 100, -38,
-       101, 101, 172,
-       102, 122, 74
+       48, 100, -39,
+       101, 101, 174,
+       102, 122, 75
 };
 static const int lexer_goto_row135[] = {
-       3,
-       48, 114, -79,
-       115, 115, 173,
-       116, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row136[] = {
+       3,
+       48, 100, -39,
+       101, 101, 175,
+       102, 122, 75
+};
+static const int lexer_goto_row137[] = {
+       3,
+       48, 114, -80,
+       115, 115, 176,
+       116, 122, 75
+};
+static const int lexer_goto_row138[] = {
        1,
        48, 122, -35
 };
-static const int lexer_goto_row137[] = {
+static const int lexer_goto_row139[] = {
        1,
        48, 122, -35
 };
-static const int lexer_goto_row138[] = {
+static const int lexer_goto_row140[] = {
        3,
        48, 110, -32,
-       111, 111, 174,
-       112, 122, 74
+       111, 111, 177,
+       112, 122, 75
 };
-static const int lexer_goto_row139[] = {
+static const int lexer_goto_row141[] = {
        3,
-       48, 115, -86,
-       116, 116, 175,
-       117, 122, 74
+       48, 115, -87,
+       116, 116, 178,
+       117, 122, 75
 };
-static const int lexer_goto_row140[] = {
+static const int lexer_goto_row142[] = {
        5,
-       48, 100, -38,
-       101, 101, 176,
-       102, 113, 74,
-       114, 114, 177,
-       115, 122, 74
+       48, 100, -39,
+       101, 101, 179,
+       102, 113, 75,
+       114, 114, 180,
+       115, 122, 75
 };
-static const int lexer_goto_row141[] = {
+static const int lexer_goto_row143[] = {
        1,
        48, 122, -35
 };
-static const int lexer_goto_row142[] = {
-       3,
-       48, 100, -38,
-       101, 101, 178,
-       102, 122, 74
-};
-static const int lexer_goto_row143[] = {
-       3,
-       48, 100, -38,
-       101, 101, 179,
-       102, 122, 74
-};
 static const int lexer_goto_row144[] = {
        3,
-       48, 111, -91,
-       112, 112, 180,
-       113, 122, 74
+       48, 100, -39,
+       101, 101, 181,
+       102, 122, 75
 };
 static const int lexer_goto_row145[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 100, -39,
+       101, 101, 182,
+       102, 122, 75
 };
 static const int lexer_goto_row146[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 111, -92,
+       112, 112, 183,
+       113, 122, 75
 };
 static const int lexer_goto_row147[] = {
        3,
-       48, 107, -31,
-       108, 108, 181,
-       109, 122, 74
+       48, 116, -110,
+       117, 117, 184,
+       118, 122, 75
 };
 static const int lexer_goto_row148[] = {
-       3,
-       48, 100, -38,
-       101, 101, 182,
-       102, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row149[] = {
-       4,
-       48, 95, -29,
-       97, 106, 74,
-       107, 107, 183,
-       108, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row150[] = {
-       4,
-       48, 95, -29,
-       97, 117, 74,
-       118, 118, 184,
-       119, 122, 74
+       3,
+       48, 107, -31,
+       108, 108, 185,
+       109, 122, 75
 };
 static const int lexer_goto_row151[] = {
        3,
-       48, 115, -86,
-       116, 116, 185,
-       117, 122, 74
+       48, 100, -39,
+       101, 101, 186,
+       102, 122, 75
 };
 static const int lexer_goto_row152[] = {
-       3,
-       48, 99, -78,
-       100, 100, 186,
-       101, 122, 74
+       4,
+       48, 95, -29,
+       97, 106, 75,
+       107, 107, 187,
+       108, 122, 75
 };
 static const int lexer_goto_row153[] = {
-       3,
-       48, 100, -38,
-       101, 101, 187,
-       102, 122, 74
+       4,
+       48, 95, -29,
+       97, 117, 75,
+       118, 118, 188,
+       119, 122, 75
 };
 static const int lexer_goto_row154[] = {
        3,
-       48, 116, -108,
-       117, 117, 188,
-       118, 122, 74
+       48, 115, -87,
+       116, 116, 189,
+       117, 122, 75
 };
 static const int lexer_goto_row155[] = {
        3,
-       48, 101, -36,
-       102, 102, 189,
-       103, 122, 74
+       48, 99, -79,
+       100, 100, 190,
+       101, 122, 75
 };
 static const int lexer_goto_row156[] = {
        3,
-       48, 98, -99,
-       99, 99, 190,
-       100, 122, 74
+       48, 100, -39,
+       101, 101, 191,
+       102, 122, 75
 };
 static const int lexer_goto_row157[] = {
        3,
-       48, 100, -38,
-       101, 101, 191,
-       102, 122, 74
+       48, 116, -110,
+       117, 117, 192,
+       118, 122, 75
 };
 static const int lexer_goto_row158[] = {
        3,
-       48, 109, -39,
-       110, 110, 192,
-       111, 122, 74
+       48, 101, -36,
+       102, 102, 193,
+       103, 122, 75
 };
 static const int lexer_goto_row159[] = {
        3,
-       48, 100, -38,
-       101, 101, 193,
-       102, 122, 74
+       48, 98, -101,
+       99, 99, 194,
+       100, 122, 75
 };
 static const int lexer_goto_row160[] = {
        3,
-       48, 100, -38,
-       101, 101, 194,
-       102, 122, 74
+       48, 100, -39,
+       101, 101, 195,
+       102, 122, 75
 };
 static const int lexer_goto_row161[] = {
        3,
-       48, 117, -151,
-       118, 118, 195,
-       119, 122, 74
+       48, 109, -40,
+       110, 110, 196,
+       111, 122, 75
 };
 static const int lexer_goto_row162[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 100, -39,
+       101, 101, 197,
+       102, 122, 75
 };
 static const int lexer_goto_row163[] = {
        3,
-       48, 107, -31,
-       108, 108, 196,
-       109, 122, 74
+       48, 100, -39,
+       101, 101, 198,
+       102, 122, 75
 };
 static const int lexer_goto_row164[] = {
        3,
-       48, 115, -86,
-       116, 116, 197,
-       117, 122, 74
+       48, 117, -154,
+       118, 118, 199,
+       119, 122, 75
 };
 static const int lexer_goto_row165[] = {
        1,
-       0, 255, -47
+       48, 122, -35
 };
 static const int lexer_goto_row166[] = {
        3,
-       48, 115, -86,
-       116, 116, 198,
-       117, 122, 74
+       48, 107, -31,
+       108, 108, 200,
+       109, 122, 75
 };
 static const int lexer_goto_row167[] = {
        3,
-       48, 113, -30,
-       114, 114, 199,
-       115, 122, 74
+       48, 115, -87,
+       116, 116, 201,
+       117, 122, 75
 };
 static const int lexer_goto_row168[] = {
-       3,
-       48, 113, -30,
-       114, 114, 200,
-       115, 122, 74
+       1,
+       0, 255, -48
 };
 static const int lexer_goto_row169[] = {
        3,
-       48, 106, -150,
-       107, 107, 201,
-       108, 122, 74
+       48, 115, -87,
+       116, 116, 202,
+       117, 122, 75
 };
 static const int lexer_goto_row170[] = {
        3,
-       48, 114, -79,
-       115, 115, 202,
-       116, 122, 74
+       48, 113, -30,
+       114, 114, 203,
+       115, 122, 75
 };
 static const int lexer_goto_row171[] = {
        3,
-       48, 104, -92,
-       105, 105, 203,
-       106, 122, 74
+       48, 113, -30,
+       114, 114, 204,
+       115, 122, 75
 };
 static const int lexer_goto_row172[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 106, -153,
+       107, 107, 205,
+       108, 122, 75
 };
 static const int lexer_goto_row173[] = {
        3,
-       48, 113, -30,
-       114, 114, 204,
-       115, 122, 74
+       48, 114, -80,
+       115, 115, 206,
+       116, 122, 75
 };
 static const int lexer_goto_row174[] = {
        3,
-       48, 100, -38,
-       101, 101, 205,
-       102, 122, 74
+       48, 104, -93,
+       105, 105, 207,
+       106, 122, 75
 };
 static const int lexer_goto_row175[] = {
-       3,
-       48, 113, -30,
-       114, 114, 206,
-       115, 122, 74
-};
-static const int lexer_goto_row176[] = {
        1,
        48, 122, -35
 };
-static const int lexer_goto_row177[] = {
+static const int lexer_goto_row176[] = {
        3,
        48, 113, -30,
-       114, 114, 207,
-       115, 122, 74
+       114, 114, 208,
+       115, 122, 75
+};
+static const int lexer_goto_row177[] = {
+       3,
+       48, 100, -39,
+       101, 101, 209,
+       102, 122, 75
 };
 static const int lexer_goto_row178[] = {
        3,
-       48, 116, -108,
-       117, 117, 208,
-       118, 122, 74
+       48, 113, -30,
+       114, 114, 210,
+       115, 122, 75
 };
 static const int lexer_goto_row179[] = {
-       3,
-       48, 115, -86,
-       116, 116, 209,
-       117, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row180[] = {
        3,
-       48, 107, -31,
-       108, 108, 210,
-       109, 122, 74
+       48, 113, -30,
+       114, 114, 211,
+       115, 122, 75
 };
 static const int lexer_goto_row181[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 116, -110,
+       117, 117, 212,
+       118, 122, 75
 };
 static const int lexer_goto_row182[] = {
        3,
-       48, 95, -29,
-       97, 97, 211,
-       98, 122, 74
+       48, 115, -87,
+       116, 116, 213,
+       117, 122, 75
 };
 static const int lexer_goto_row183[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 107, -31,
+       108, 108, 214,
+       109, 122, 75
 };
 static const int lexer_goto_row184[] = {
-       3,
-       48, 95, -29,
-       97, 97, 212,
-       98, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row185[] = {
        3,
-       48, 95, -29,
-       97, 97, 213,
-       98, 122, 74
+       48, 107, -31,
+       108, 108, 215,
+       109, 122, 75
 };
 static const int lexer_goto_row186[] = {
        3,
-       48, 100, -38,
-       101, 101, 214,
-       102, 122, 74
+       48, 95, -29,
+       97, 97, 216,
+       98, 122, 75
 };
 static const int lexer_goto_row187[] = {
-       3,
-       48, 95, -29,
-       97, 97, 215,
-       98, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row188[] = {
        3,
-       48, 101, -36,
-       102, 102, 216,
-       103, 122, 74
+       48, 95, -29,
+       97, 97, 217,
+       98, 122, 75
 };
 static const int lexer_goto_row189[] = {
        3,
-       48, 113, -30,
-       114, 114, 217,
-       115, 122, 74
+       48, 95, -29,
+       97, 97, 218,
+       98, 122, 75
 };
 static const int lexer_goto_row190[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 100, -39,
+       101, 101, 219,
+       102, 122, 75
 };
 static const int lexer_goto_row191[] = {
        3,
-       48, 104, -92,
-       105, 105, 218,
-       106, 122, 74
+       48, 95, -29,
+       97, 97, 220,
+       98, 122, 75
 };
 static const int lexer_goto_row192[] = {
        3,
-       48, 113, -30,
-       114, 114, 219,
-       115, 122, 74
+       48, 101, -36,
+       102, 102, 221,
+       103, 122, 75
 };
 static const int lexer_goto_row193[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 113, -30,
+       114, 114, 222,
+       115, 122, 75
 };
 static const int lexer_goto_row194[] = {
        1,
        48, 122, -35
 };
 static const int lexer_goto_row195[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 104, -93,
+       105, 105, 223,
+       106, 122, 75
 };
 static const int lexer_goto_row196[] = {
        3,
-       48, 100, -38,
-       101, 101, 220,
-       102, 122, 74
+       48, 113, -30,
+       114, 114, 224,
+       115, 122, 75
 };
 static const int lexer_goto_row197[] = {
-       3,
-       48, 100, -38,
-       101, 101, 221,
-       102, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row198[] = {
-       3,
-       48, 95, -29,
-       97, 97, 222,
-       98, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row199[] = {
        1,
@@ -1075,19 +1077,21 @@ static const int lexer_goto_row199[] = {
 };
 static const int lexer_goto_row200[] = {
        3,
-       48, 95, -29,
-       97, 97, 223,
-       98, 122, 74
+       48, 100, -39,
+       101, 101, 225,
+       102, 122, 75
 };
 static const int lexer_goto_row201[] = {
        3,
-       48, 115, -86,
-       116, 116, 224,
-       117, 122, 74
+       48, 100, -39,
+       101, 101, 226,
+       102, 122, 75
 };
 static const int lexer_goto_row202[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 95, -29,
+       97, 97, 227,
+       98, 122, 75
 };
 static const int lexer_goto_row203[] = {
        1,
@@ -1095,104 +1099,104 @@ static const int lexer_goto_row203[] = {
 };
 static const int lexer_goto_row204[] = {
        3,
-       48, 109, -39,
-       110, 110, 225,
-       111, 122, 74
+       48, 95, -29,
+       97, 97, 228,
+       98, 122, 75
 };
 static const int lexer_goto_row205[] = {
        3,
-       48, 109, -39,
-       110, 110, 226,
-       111, 122, 74
+       48, 115, -87,
+       116, 116, 229,
+       117, 122, 75
 };
 static const int lexer_goto_row206[] = {
        1,
        48, 122, -35
 };
 static const int lexer_goto_row207[] = {
-       3,
-       48, 115, -86,
-       116, 116, 227,
-       117, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row208[] = {
-       5,
-       48, 101, -36,
-       102, 102, 228,
-       103, 109, 74,
-       110, 110, 229,
-       111, 122, 74
+       3,
+       48, 109, -40,
+       110, 110, 230,
+       111, 122, 75
 };
 static const int lexer_goto_row209[] = {
        3,
-       48, 99, -78,
-       100, 100, 230,
-       101, 122, 74
+       48, 109, -40,
+       110, 110, 231,
+       111, 122, 75
 };
 static const int lexer_goto_row210[] = {
        1,
        48, 122, -35
 };
 static const int lexer_goto_row211[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 115, -87,
+       116, 116, 232,
+       117, 122, 75
 };
 static const int lexer_goto_row212[] = {
-       3,
-       48, 97, -29,
-       98, 98, 231,
-       99, 122, 74
+       5,
+       48, 101, -36,
+       102, 102, 233,
+       103, 109, 75,
+       110, 110, 234,
+       111, 122, 75
 };
 static const int lexer_goto_row213[] = {
-       4,
-       48, 95, -29,
-       97, 102, 74,
-       103, 103, 232,
-       104, 122, 74
+       3,
+       48, 99, -79,
+       100, 100, 235,
+       101, 122, 75
 };
 static const int lexer_goto_row214[] = {
-       3,
-       48, 115, -86,
-       116, 116, 233,
-       117, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row215[] = {
-       3,
-       48, 98, -99,
-       99, 99, 234,
-       100, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row216[] = {
        3,
-       48, 97, -29,
-       98, 98, 235,
-       99, 122, 74
+       48, 100, -39,
+       101, 101, 236,
+       102, 122, 75
 };
 static const int lexer_goto_row217[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 97, -29,
+       98, 98, 237,
+       99, 122, 75
 };
 static const int lexer_goto_row218[] = {
-       3,
-       48, 109, -39,
-       110, 110, 236,
-       111, 122, 74
+       4,
+       48, 95, -29,
+       97, 102, 75,
+       103, 103, 238,
+       104, 122, 75
 };
 static const int lexer_goto_row219[] = {
        3,
-       48, 95, -29,
-       97, 97, 237,
-       98, 122, 74
+       48, 115, -87,
+       116, 116, 239,
+       117, 122, 75
 };
 static const int lexer_goto_row220[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 98, -101,
+       99, 99, 240,
+       100, 122, 75
 };
 static const int lexer_goto_row221[] = {
        3,
-       48, 113, -30,
-       114, 114, 238,
-       115, 122, 74
+       48, 97, -29,
+       98, 98, 241,
+       99, 122, 75
 };
 static const int lexer_goto_row222[] = {
        1,
@@ -1200,15 +1204,15 @@ static const int lexer_goto_row222[] = {
 };
 static const int lexer_goto_row223[] = {
        3,
-       48, 97, -29,
-       98, 98, 239,
-       99, 122, 74
+       48, 109, -40,
+       110, 110, 242,
+       111, 122, 75
 };
 static const int lexer_goto_row224[] = {
        3,
-       48, 98, -99,
-       99, 99, 240,
-       100, 122, 74
+       48, 95, -29,
+       97, 97, 243,
+       98, 122, 75
 };
 static const int lexer_goto_row225[] = {
        1,
@@ -1216,23 +1220,25 @@ static const int lexer_goto_row225[] = {
 };
 static const int lexer_goto_row226[] = {
        3,
-       48, 116, -108,
-       117, 117, 241,
-       118, 122, 74
+       48, 113, -30,
+       114, 114, 244,
+       115, 122, 75
 };
 static const int lexer_goto_row227[] = {
        1,
        48, 122, -35
 };
 static const int lexer_goto_row228[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 97, -29,
+       98, 98, 245,
+       99, 122, 75
 };
 static const int lexer_goto_row229[] = {
        3,
-       48, 95, -29,
-       97, 97, 242,
-       98, 122, 74
+       48, 98, -101,
+       99, 99, 246,
+       100, 122, 75
 };
 static const int lexer_goto_row230[] = {
        1,
@@ -1240,39 +1246,33 @@ static const int lexer_goto_row230[] = {
 };
 static const int lexer_goto_row231[] = {
        3,
-       48, 100, -38,
-       101, 101, 243,
-       102, 122, 74
+       48, 116, -110,
+       117, 117, 247,
+       118, 122, 75
 };
 static const int lexer_goto_row232[] = {
-       3,
-       48, 107, -31,
-       108, 108, 244,
-       109, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row233[] = {
-       3,
-       48, 100, -38,
-       101, 101, 245,
-       102, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row234[] = {
        3,
-       48, 100, -38,
-       101, 101, 246,
-       102, 122, 74
+       48, 95, -29,
+       97, 97, 248,
+       98, 122, 75
 };
 static const int lexer_goto_row235[] = {
-       3,
-       48, 115, -86,
-       116, 116, 247,
-       117, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row236[] = {
        3,
-       48, 107, -31,
-       108, 108, 248,
-       109, 122, 74
+       48, 100, -39,
+       101, 101, 249,
+       102, 122, 75
 };
 static const int lexer_goto_row237[] = {
        1,
@@ -1281,68 +1281,72 @@ static const int lexer_goto_row237[] = {
 static const int lexer_goto_row238[] = {
        3,
        48, 107, -31,
-       108, 108, 249,
-       109, 122, 74
+       108, 108, 250,
+       109, 122, 75
 };
 static const int lexer_goto_row239[] = {
        3,
-       48, 114, -79,
-       115, 115, 250,
-       116, 122, 74
+       48, 100, -39,
+       101, 101, 251,
+       102, 122, 75
 };
 static const int lexer_goto_row240[] = {
        3,
-       48, 107, -31,
-       108, 108, 251,
-       109, 122, 74
+       48, 100, -39,
+       101, 101, 252,
+       102, 122, 75
 };
 static const int lexer_goto_row241[] = {
        3,
-       48, 115, -86,
-       116, 116, 252,
-       117, 122, 74
+       48, 115, -87,
+       116, 116, 253,
+       117, 122, 75
 };
 static const int lexer_goto_row242[] = {
        3,
-       48, 100, -38,
-       101, 101, 253,
-       102, 122, 74
+       48, 107, -31,
+       108, 108, 254,
+       109, 122, 75
 };
 static const int lexer_goto_row243[] = {
-       3,
-       48, 98, -99,
-       99, 99, 254,
-       100, 122, 74
-};
-static const int lexer_goto_row244[] = {
        1,
        48, 122, -35
 };
+static const int lexer_goto_row244[] = {
+       3,
+       48, 107, -31,
+       108, 108, 255,
+       109, 122, 75
+};
 static const int lexer_goto_row245[] = {
        3,
-       48, 100, -38,
-       101, 101, 255,
-       102, 122, 74
+       48, 114, -80,
+       115, 115, 256,
+       116, 122, 75
 };
 static const int lexer_goto_row246[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 107, -31,
+       108, 108, 257,
+       109, 122, 75
 };
 static const int lexer_goto_row247[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 115, -87,
+       116, 116, 258,
+       117, 122, 75
 };
 static const int lexer_goto_row248[] = {
        3,
-       48, 100, -38,
-       101, 101, 256,
-       102, 122, 74
+       48, 100, -39,
+       101, 101, 259,
+       102, 122, 75
 };
 static const int lexer_goto_row249[] = {
        3,
-       48, 100, -38,
-       101, 101, 257,
-       102, 122, 74
+       48, 98, -101,
+       99, 99, 260,
+       100, 122, 75
 };
 static const int lexer_goto_row250[] = {
        1,
@@ -1350,29 +1354,29 @@ static const int lexer_goto_row250[] = {
 };
 static const int lexer_goto_row251[] = {
        3,
-       48, 95, -29,
-       97, 97, 258,
-       98, 122, 74
+       48, 100, -39,
+       101, 101, 261,
+       102, 122, 75
 };
 static const int lexer_goto_row252[] = {
-       3,
-       48, 100, -38,
-       101, 101, 259,
-       102, 122, 74
+       1,
+       48, 122, -35
 };
 static const int lexer_goto_row253[] = {
        1,
        48, 122, -35
 };
 static const int lexer_goto_row254[] = {
-       1,
-       48, 122, -35
+       3,
+       48, 100, -39,
+       101, 101, 262,
+       102, 122, 75
 };
 static const int lexer_goto_row255[] = {
        3,
-       48, 100, -38,
-       101, 101, 260,
-       102, 122, 74
+       48, 100, -39,
+       101, 101, 263,
+       102, 122, 75
 };
 static const int lexer_goto_row256[] = {
        1,
@@ -1380,33 +1384,63 @@ static const int lexer_goto_row256[] = {
 };
 static const int lexer_goto_row257[] = {
        3,
-       48, 99, -78,
-       100, 100, 261,
-       101, 122, 74
+       48, 95, -29,
+       97, 97, 264,
+       98, 122, 75
 };
 static const int lexer_goto_row258[] = {
+       3,
+       48, 100, -39,
+       101, 101, 265,
+       102, 122, 75
+};
+static const int lexer_goto_row259[] = {
        1,
        48, 122, -35
 };
-static const int lexer_goto_row259[] = {
+static const int lexer_goto_row260[] = {
+       1,
+       48, 122, -35
+};
+static const int lexer_goto_row261[] = {
+       3,
+       48, 100, -39,
+       101, 101, 266,
+       102, 122, 75
+};
+static const int lexer_goto_row262[] = {
+       1,
+       48, 122, -35
+};
+static const int lexer_goto_row263[] = {
+       3,
+       48, 99, -79,
+       100, 100, 267,
+       101, 122, 75
+};
+static const int lexer_goto_row264[] = {
+       1,
+       48, 122, -35
+};
+static const int lexer_goto_row265[] = {
        3,
        48, 107, -31,
-       108, 108, 262,
-       109, 122, 74
+       108, 108, 268,
+       109, 122, 75
 };
-static const int lexer_goto_row260[] = {
+static const int lexer_goto_row266[] = {
        1,
        48, 122, -35
 };
-static const int lexer_goto_row261[] = {
+static const int lexer_goto_row267[] = {
        1,
        48, 122, -35
 };
-static const int lexer_goto_row262[] = {
+static const int lexer_goto_row268[] = {
        1,
        48, 122, -35
 };
-static const int lexer_goto_row263[] = {
+static const int lexer_goto_row269[] = {
        1,
        48, 122, -35
 };
@@ -1458,27 +1492,27 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row44,
        lexer_goto_row45,
        lexer_goto_row46,
+       lexer_goto_row47,
        lexer_goto_row_null,
        lexer_goto_row_null,
-       lexer_goto_row49,
+       lexer_goto_row50,
        lexer_goto_row_null,
-       lexer_goto_row51,
+       lexer_goto_row52,
        lexer_goto_row_null,
-       lexer_goto_row53,
+       lexer_goto_row54,
        lexer_goto_row_null,
-       lexer_goto_row55,
        lexer_goto_row56,
+       lexer_goto_row57,
        lexer_goto_row_null,
        lexer_goto_row_null,
        lexer_goto_row_null,
-       lexer_goto_row60,
        lexer_goto_row61,
        lexer_goto_row62,
+       lexer_goto_row63,
        lexer_goto_row_null,
-       lexer_goto_row64,
+       lexer_goto_row65,
        lexer_goto_row_null,
        lexer_goto_row_null,
-       lexer_goto_row67,
        lexer_goto_row68,
        lexer_goto_row69,
        lexer_goto_row70,
@@ -1525,15 +1559,15 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row111,
        lexer_goto_row112,
        lexer_goto_row113,
-       lexer_goto_row_null,
+       lexer_goto_row114,
        lexer_goto_row115,
        lexer_goto_row_null,
        lexer_goto_row117,
        lexer_goto_row_null,
+       lexer_goto_row119,
+       lexer_goto_row_null,
        lexer_goto_row_null,
        lexer_goto_row_null,
-       lexer_goto_row121,
-       lexer_goto_row122,
        lexer_goto_row123,
        lexer_goto_row124,
        lexer_goto_row125,
@@ -1674,11 +1708,17 @@ const int* const lexer_goto_table[] = {
        lexer_goto_row260,
        lexer_goto_row261,
        lexer_goto_row262,
-       lexer_goto_row263
+       lexer_goto_row263,
+       lexer_goto_row264,
+       lexer_goto_row265,
+       lexer_goto_row266,
+       lexer_goto_row267,
+       lexer_goto_row268,
+       lexer_goto_row269
 };
 
 const int lexer_accept_table[] = {
-       -1,0,1,1,0,77,-1,-1,69,-1,52,53,67,65,56,66,64,68,81,57,72,59,74,78,54,55,-1,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,-1,1,71,-1,84,-1,85,-1,2,2,-1,83,60,61,63,82,-1,58,73,70,75,78,78,78,78,80,79,79,79,79,79,79,48,79,79,79,16,79,79,79,79,79,79,25,79,31,15,79,79,79,79,79,79,33,79,79,79,79,79,79,79,79,79,79,79,79,79,-1,87,-1,86,-1,2,62,76,80,80,80,80,79,79,32,79,79,79,79,79,10,79,79,30,11,79,79,79,41,79,79,79,40,34,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,19,79,79,-1,79,79,79,79,79,79,27,79,79,79,13,79,79,79,79,29,47,42,79,79,79,79,79,79,44,79,79,26,45,12,79,79,79,38,79,79,37,5,79,79,46,79,79,79,50,51,79,79,79,79,79,14,79,79,43,79,28,79,79,39,79,21,4,79,20,79,79,79,79,79,79,35,79,79,79,79,79,79,24,79,3,23,79,79,9,79,79,6,36,79,49,79,17,79,18,7,22,8
+       -1,0,1,1,0,77,-1,-1,69,-1,52,53,67,65,56,66,64,68,81,57,72,59,74,78,54,55,-1,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,-1,1,71,-1,84,-1,85,-1,2,2,-1,83,60,61,63,82,-1,58,73,70,75,78,78,78,78,80,79,79,79,79,79,79,48,79,79,79,16,79,79,79,79,79,79,25,79,31,15,79,79,79,79,79,79,79,33,79,79,79,79,79,79,79,79,79,79,79,79,79,-1,87,-1,86,-1,2,62,76,80,80,80,80,79,79,32,79,79,79,79,79,10,79,79,30,11,79,79,79,41,79,79,79,79,40,34,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,19,79,79,-1,79,79,79,79,79,79,27,79,79,79,13,79,79,79,79,29,79,47,42,79,79,79,79,79,79,44,79,79,26,45,12,79,79,79,38,79,79,37,5,79,79,46,79,79,79,50,51,79,79,79,79,79,79,14,79,79,43,79,28,79,79,39,79,21,4,79,20,79,3,79,79,79,79,79,35,79,79,79,79,79,79,24,79,3,23,79,79,9,79,79,6,36,79,49,79,17,79,18,7,22,8
 };
 
 static int parser_action_row1[] = {
index 41e0cab..262228f 100644 (file)
@@ -44,8 +44,8 @@ redef class MMLocalClass
                var i = ctypes.iterator
                while i.is_ok do
                        var n = i.key
-                       if module.has_global_class_named(n) then
-                               var c = module.class_by_name(n)
+                       if mmmodule.has_global_class_named(n) then
+                               var c = mmmodule.class_by_name(n)
                                if cshe < c then
                                        _primitive_info_cache = i.item
                                        _primitive_info_b = true
index d8b576f..217031a 100644 (file)
@@ -39,7 +39,7 @@ class Program
        readable var _tc: ToolContext
 
        # This module is the 'main' module, the one where we find the 'main' method
-       readable var _module: MMModule
+       readable var _main_module: MMModule
 
        # This method is the entry point of this program
        # There might be no entry point (if in fact we are compiling a library)
@@ -53,7 +53,7 @@ class Program
        # start using all the classes
        private fun finish_processing_classes do
                var classes = new Array[MMLocalClass]
-               for c in module.local_classes do
+               for c in main_module.local_classes do
                        c.compute_super_classes
                        classes.add(c)
                end
@@ -66,8 +66,8 @@ class Program
        fun compute_main_method do
                # Check for the 'Sys' class
                var sysname = once "Sys".to_symbol
-               if not module.has_global_class_named(sysname) then return
-               var sys = module.class_by_name(sysname)
+               if not main_module.has_global_class_named(sysname) then return
+               var sys = main_module.class_by_name(sysname)
 
                # Check for 'Sys::main' method
                var entryname = once "main".to_symbol
@@ -80,7 +80,7 @@ class Program
        # Generation of allocation function of this class
        fun generate_allocation_iroutines
        do
-               for c in module.local_classes do
+               for c in main_module.local_classes do
                        if c.global.is_abstract or c.global.is_interface then continue
                        var pi = c.primitive_info
                        if pi == null then
@@ -89,7 +89,7 @@ class Program
                                        var iself = new IRegister(c.get_type)
                                        var iselfa = [iself]
                                        var iroutine = new IRoutine(iselfa, null)
-                                       var icb = new ICodeBuilder(module, iroutine)
+                                       var icb = new ICodeBuilder(main_module, iroutine)
 
                                        for g in c.global_properties do
                                                if not g.intro isa MMAttribute then continue
@@ -111,7 +111,7 @@ class Program
                                        var iself = new IRegister(c.get_type)
                                        var iselfa = [iself]
                                        var iroutine = new IRoutine(iselfa, null)
-                                       var icb = new ICodeBuilder(module, iroutine)
+                                       var icb = new ICodeBuilder(main_module, iroutine)
                                        for g in c.global_properties do
                                                if not g.intro isa MMAttribute then continue
                                                var p = c[g]
@@ -135,7 +135,7 @@ class Program
                                        for i in [0..p.signature.arity[ do iparams.add(new IRegister(p.signature[i]))
                                        var iroutine = new IRoutine(iparams, iself)
                                        iroutine.location = p.iroutine.location
-                                       var icb = new ICodeBuilder(module, iroutine)
+                                       var icb = new ICodeBuilder(main_module, iroutine)
 
                                        var inew = new IAllocateInstance(c.get_type)
                                        inew.result = iself
@@ -158,7 +158,7 @@ class Program
        fun with_each_iroutines
                !action(i: IRoutine, m: MMModule)
        do
-               for m in module.mhe.greaters_and_self do
+               for m in main_module.mhe.greaters_and_self do
                        for c in m.local_classes do
                                var iroutine: nullable IRoutine = null
 
@@ -194,7 +194,7 @@ class Program
        fun with_each_methods
                !action(m: MMMethod)
        do
-               for m in module.mhe.greaters_and_self do
+               for m in main_module.mhe.greaters_and_self do
                        for c in m.local_classes do
                                # Process methods and attributes initialization
                                for p in c.local_local_properties do
@@ -211,13 +211,13 @@ class Program
        fun with_each_live_local_classes
                !action(m: MMLocalClass)
        do
-               for c in module.local_classes do
+               for c in main_module.local_classes do
                        action(c)
                end
        end
 
        init(m: MMModule, toolcontext: ToolContext) do
-               _module = m
+               _main_module = m
                _tc = toolcontext
                finish_processing_classes
        end
index 11b45db..5bd50bb 100644 (file)
@@ -84,7 +84,7 @@ special ICodeBuilder
 
        init(visitor: AbsSyntaxVisitor, r: IRoutine, m: nullable MMMethod)
        do
-               super(visitor.module, r)
+               super(visitor.mmmodule, r)
                _visitor = visitor
                _return_seq = r.body
                _return_value = r.result
@@ -787,7 +787,7 @@ redef class AOrElseExpr
 
                # Compare left and null
                var n = v.lit_null_reg
-               var c = v.expr(new IIs(e, n), v.module.type_bool)
+               var c = v.expr(new IIs(e, n), v.mmmodule.type_bool)
                var iif = new IIf(c)
                v.stmt(iif)
                var old_seq = v.seq
index a0ca58f..b36e6b2 100644 (file)
@@ -59,7 +59,7 @@ redef class MMSrcModule
 
                # Compute specialization relation
                for c in local_classes do
-                       if visibility_for(c.global.intro.module) < c.global.visibility_level then
+                       if visibility_for(c.global.intro.mmmodule) < c.global.visibility_level then
                                continue
                        end
                        c.compute_super_classes
@@ -458,11 +458,11 @@ redef class AModule
        end
 end
 
-redef class APackagedecl
+redef class AModuledecl
        redef fun accept_class_builder(v)
        do
-               if n_id.to_symbol != v.module.name then
-                       v.error(n_id, "Error: Package name missmatch between {v.module.name} and {n_id.to_symbol}")
+               if n_id.to_symbol != v.mmmodule.name then
+                       v.error(n_id, "Error: Package name missmatch between {v.mmmodule.name} and {n_id.to_symbol}")
                end
        end
 end
@@ -525,7 +525,7 @@ redef class AClassdef
        redef fun accept_class_builder(v)
        do
                var local_class: MMSrcLocalClass
-               var mod = v.module
+               var mod = v.mmmodule
                var local_classes = mod.src_local_classes
                if (local_classes.has_key(name)) then
                        local_class = local_classes[name]
@@ -630,7 +630,7 @@ redef class AStdClassdef
 
                # Redef
 
-               glob.check_visibility(v, self, v.module)
+               glob.check_visibility(v, self, v.mmmodule)
                if n_kwredef == null then
                        v.error(self, "Redef error: {name} is an imported class. Add the redef keyword to refine it.")
                        return
@@ -691,14 +691,14 @@ redef class AFormaldef
                var o = c.global.intro
                if c == o then
                        if n_type == null then
-                               _formal.bound = v.module.type_any.as_nullable
+                               _formal.bound = v.mmmodule.type_any.as_nullable
                        else
                                var stype = n_type.get_stype(v)
                                if stype == null then return
                                _formal.bound = stype
                        end
                else
-                       var ob = o.get_formal(_formal.position).bound.for_module(v.module)
+                       var ob = o.get_formal(_formal.position).bound.for_module(v.mmmodule)
                        if n_type == null then
                                _formal.bound = ob
                        else
@@ -842,7 +842,7 @@ redef class APropdef
                end
 
                var s = prop.signature
-               #print "process {prop.local_class.module}::{prop.local_class}::{prop} from global {prop.global.local_property.local_class.module}::{prop.global.local_property.local_class}::{prop.global.local_property}"
+               #print "process {prop.local_class.mmmodule}::{prop.local_class}::{prop} from global {prop.global.local_property.local_class.mmmodule}::{prop.global.local_property.local_class}::{prop.global.local_property}"
                for i in prop.prhe.direct_greaters do
                        var ip = i.local_class[prop.global]
                        var isig = i.signature.adaptation_to(v.local_class.get_type)
@@ -908,7 +908,7 @@ redef class APropdef
                if visibility_level != 1 and glob.visibility_level != visibility_level then
                        v.error(self, "Redef error: {prop.local_class}::{prop} redefinition cannot change visibility.")
                end
-               glob.check_visibility(v, self, v.module, true)
+               glob.check_visibility(v, self, v.mmmodule, true)
        end
 end
 
@@ -1076,7 +1076,7 @@ redef class AExternMethPropdef
                        ename = n_extern.text
                        ename = ename.substring(1, ename.length-2)
                else
-                       ename = "{method.module.name}_{method.local_class.name}_{method.local_class.name}_{method.name}_{method.signature.arity}"
+                       ename = "{method.mmmodule.name}_{method.local_class.name}_{method.local_class.name}_{method.name}_{method.signature.arity}"
                end
                method.extern_name = ename
        end
@@ -1248,7 +1248,7 @@ redef class AClosureDecl
                end
 
                # Add the finalizer to the closure signature
-               var finalize_sig = new MMSignature(new Array[MMType], null, v.module.type_any) # FIXME should be no receiver
+               var finalize_sig = new MMSignature(new Array[MMType], null, v.mmmodule.type_any) # FIXME should be no receiver
                var finalizer_clos = new MMClosure(once ("break".to_symbol), finalize_sig, false, true)
                sig.closures.add(finalizer_clos)
 
index 06c3bcb..0cbb402 100644 (file)
@@ -53,15 +53,15 @@ special ModuleLoader
                var node_module = node_tree.n_base
                assert node_module != null
                var module_loc = new Location.with_file(filename)
-               var module = new MMSrcModule(context, node_module, dir, name, module_loc)
-               return module
+               var mod = new MMSrcModule(context, node_module, dir, name, module_loc)
+               return mod
        end
 
-       redef fun process_metamodel(context, module)
+       redef fun process_metamodel(context, mod)
        do
-               module.process_supermodules(context)
-               context.info("Syntax analysis for module: {module.name}", 2)
-               module.process_syntax(context)
+               mod.process_supermodules(context)
+               context.info("Syntax analysis for module: {mod.name}", 2)
+               mod.process_syntax(context)
        end
 
        init do end
index 2d0ef27..68f8fa2 100644 (file)
@@ -65,7 +65,7 @@ end
 redef class MMGlobalClass
        # Check that a module can access a class
        fun check_visibility(v: AbsSyntaxVisitor, n: ANode, cm: MMSrcModule): Bool do
-               var pm = intro.module
+               var pm = intro.mmmodule
                assert pm isa MMSrcModule
                var vpm = cm.visibility_for(pm)
                if vpm == 3 then
@@ -85,7 +85,7 @@ end
 class MMSrcLocalClass
 special MMConcreteClass
        # The first related AST node (if any)
-       fun node: nullable AClassdef do return module.nodes(self).as(nullable AClassdef)
+       fun node: nullable AClassdef do return mmmodule.nodes(self).as(nullable AClassdef)
 
        # Concrete NIT source generic formal parameter by name
        readable var _formal_dict: Map[Symbol, MMTypeFormalParameter] = new HashMap[Symbol, MMTypeFormalParameter]
@@ -104,7 +104,7 @@ end
 redef class MMGlobalProperty
        # Check that a module can access a property
        fun check_visibility(v: AbsSyntaxVisitor, n: ANode, cm: MMSrcModule, allows_protected: Bool): Bool do
-               var pm = local_class.module
+               var pm = local_class.mmmodule
                assert pm isa MMSrcModule
                var vpm = cm.visibility_for(pm)
                if vpm == 3 then
@@ -135,11 +135,11 @@ end
 # Concrete NIT source attribute
 class MMSrcAttribute
 special MMAttribute
-       redef fun node: nullable AAttrPropdef do return module.nodes(self).as(nullable AAttrPropdef)
+       redef fun node: nullable AAttrPropdef do return mmmodule.nodes(self).as(nullable AAttrPropdef)
        init(name: Symbol, cla: MMLocalClass, n: AAttrPropdef)
        do
                super(name, cla)
-               cla.module.nodes(self) = n
+               cla.mmmodule.nodes(self) = n
        end
 end
 
@@ -154,11 +154,11 @@ end
 # Concrete NIT source method for an automatic accesor
 class MMAttrImplementationMethod
 special MMSrcMethod
-       redef fun node: nullable AAttrPropdef do return module.nodes(self).as(nullable AAttrPropdef)
+       redef fun node: nullable AAttrPropdef do return mmmodule.nodes(self).as(nullable AAttrPropdef)
        init(name: Symbol, cla: MMLocalClass, n: AAttrPropdef)
        do
                super(name, cla)
-               cla.module.nodes(self) = n
+               cla.mmmodule.nodes(self) = n
        end
 end
 
@@ -187,11 +187,11 @@ special MMSrcMethod
        redef readable var _is_intern: Bool
        redef readable var _is_abstract: Bool
        redef readable writable var _extern_name: nullable String # Will be computed during MMBuilder
-       redef fun node: nullable AMethPropdef do return module.nodes(self).as(nullable AMethPropdef)
+       redef fun node: nullable AMethPropdef do return mmmodule.nodes(self).as(nullable AMethPropdef)
        init(name: Symbol, cla: MMLocalClass, n: nullable AMethPropdef)
        do
                super(name, cla)
-               cla.module.nodes(self) = n
+               cla.mmmodule.nodes(self) = n
                _is_init = node isa AConcreteInitPropdef
                _is_intern = node isa AInternMethPropdef
                _is_abstract = node isa ADeferredMethPropdef
@@ -290,15 +290,15 @@ class AbsSyntaxVisitor
 special Visitor
        fun get_type_by_name(clsname: Symbol): MMType
        do
-               if not _module.has_global_class_named(clsname) then _tc.fatal_error(_module.location, "Missing necessary class: \"{clsname}\"")
-               var cls = _module.class_by_name(clsname)
+               if not _mmmodule.has_global_class_named(clsname) then _tc.fatal_error(_mmmodule.location, "Missing necessary class: \"{clsname}\"")
+               var cls = _mmmodule.class_by_name(clsname)
                return cls.get_type
        end
 
        fun get_instantiated_type_by_name(clsname: Symbol, vtype: Array[MMType]): MMType
        do
-               if not _module.has_global_class_named(clsname) then _tc.fatal_error(_module.location, "Missing necessary class: \"{clsname}\"")
-               var cls = _module.class_by_name(clsname)
+               if not _mmmodule.has_global_class_named(clsname) then _tc.fatal_error(_mmmodule.location, "Missing necessary class: \"{clsname}\"")
+               var cls = _mmmodule.class_by_name(clsname)
                return cls.get_instantiate_type(vtype)
        end
 
@@ -371,7 +371,7 @@ special Visitor
        # The primitive type of null
        fun type_none: MMType
        do
-               return _module.type_none
+               return _mmmodule.type_none
        end
 
        fun get_method(recv: MMType, name: Symbol): MMMethod
@@ -383,7 +383,7 @@ special Visitor
        end
 
        # The current module
-       readable var _module: MMSrcModule
+       readable var _mmmodule: MMSrcModule
 
        # The current class
        fun local_class: MMSrcLocalClass do return _local_class.as(not null)
@@ -494,10 +494,10 @@ special Visitor
                return stype
        end
 
-       protected init(tc: ToolContext, module: MMSrcModule)
+       protected init(tc: ToolContext, mmmodule: MMSrcModule)
        do
                _tc = tc
-               _module = module
+               _mmmodule = mmmodule
        end
 end
 
@@ -596,7 +596,7 @@ redef class AType
        fun get_local_class(v: AbsSyntaxVisitor): nullable MMLocalClass
        do
                var name = n_id.to_symbol
-               var mod = v.module
+               var mod = v.mmmodule
                var cla = v.local_class
 
                if cla.formal_dict.has_key(name) or cla.has_global_property_by_name(name) then
@@ -626,7 +626,7 @@ redef class AType
                _stype_cached = true
 
                var name = n_id.to_symbol
-               var mod = v.module
+               var mod = v.mmmodule
                var cla = v.local_class
                var t: nullable MMType
 
index b7e324a..e125491 100644 (file)
@@ -109,7 +109,7 @@ special AbsSyntaxVisitor
        # Number of nested once
        readable writable var _once_count: Int = 0
 
-       init(tc, module) do super
+       init(tc, mod) do super
 
        private fun get_default_constructor_for(n: ANode, c: MMLocalClass, prop: MMSrcMethod): nullable MMMethod
        do
@@ -247,7 +247,7 @@ redef class AConcreteInitPropdef
                        var cur_c: nullable MMLocalClass = null
                        if i < l then
                                cur_m = explicit_super_init_calls[i]
-                               cur_c = cur_m.global.intro.local_class.for_module(v.module)
+                               cur_c = cur_m.global.intro.local_class.for_module(v.mmmodule)
                        end
                        var j = 0
                        while j < v.local_class.cshe.direct_greaters.length do
@@ -260,7 +260,7 @@ redef class AConcreteInitPropdef
                                        i += 1
                                        if i < l then
                                                cur_m = explicit_super_init_calls[i]
-                                               cur_c = cur_m.global.intro.local_class.for_module(v.module)
+                                               cur_c = cur_m.global.intro.local_class.for_module(v.mmmodule)
                                        else
                                                cur_m = null
                                                cur_c = null
@@ -752,7 +752,7 @@ redef class AReassignFormExpr
                        return null
                end
                var prop = lc.select_method(name)
-               prop.global.check_visibility(v, self, v.module, false)
+               prop.global.check_visibility(v, self, v.mmmodule, false)
                var psig = prop.signature_for(type_lvalue)
                _assign_method = prop
                if not v.check_conform_expr(n_value, psig[0].not_for_self) then return null
@@ -1100,7 +1100,7 @@ redef class ASuperExpr
                        var stype: nullable MMType = null
                        for prop in precs do
                                assert prop isa MMMethod
-                               var t = prop.signature_for(v.self_var.stype.as(not null)).return_type.for_module(v.module).adapt_to(v.local_property.signature.recv)
+                               var t = prop.signature_for(v.self_var.stype.as(not null)).return_type.for_module(v.mmmodule).adapt_to(v.local_property.signature.recv)
                                stypes.add(t)
                                if stype == null or stype < t then
                                        stype = t
@@ -1141,8 +1141,8 @@ redef class AAttrFormExpr
                        return
                end
                var prop = lc.select_attribute(name)
-               if v.module.visibility_for(prop.global.local_class.module) < 3 then
-                       v.error(self, "Error: Attribute {name} from {prop.global.local_class.module} is invisible in {v.module}")
+               if v.mmmodule.visibility_for(prop.global.local_class.mmmodule) < 3 then
+                       v.error(self, "Error: Attribute {name} from {prop.global.local_class.mmmodule} is invisible in {v.mmmodule}")
                end
                _prop = prop
                var at = prop.signature_for(type_recv).return_type 
@@ -1365,7 +1365,7 @@ redef class AAbsSendExpr
        # Get the signature for a local property and a receiver
        private fun get_signature(v: TypingVisitor, type_recv: MMType, prop: MMMethod, recv_is_self: Bool): MMSignature
        do
-               prop.global.check_visibility(v, self, v.module, recv_is_self)
+               prop.global.check_visibility(v, self, v.mmmodule, recv_is_self)
                var psig = prop.signature_for(type_recv)
                if not recv_is_self then psig = psig.not_for_self
                return psig
@@ -1387,7 +1387,7 @@ redef class ASuperInitCall
                if parent != v.top_block and self != v.top_block then
                        v.error(self, "Error: Constructor invocation {property} must not be in nested block.")
                end
-               var cla = v.module[property.global.intro.local_class.global]
+               var cla = v.mmmodule[property.global.intro.local_class.global]
                var prev_class: nullable MMLocalClass = null
                var esic = v.explicit_super_init_calls.as(not null)
                if not esic.is_empty then