# another product.
# This module define several abstract collection classes.
-package abstract_collection
+module abstract_collection
import kernel
# This module introduces the standard array structure.
# It also implements two other abstract collections : ArrayMap and ArraySet
-package array
+module array
import abstract_collection
# another product.
# This module define several collection classes.
-package collection
+module collection
import abstract_collection
import range
# another product.
# Introduce Hashmap and Hashset.
-package hash_collection
+module hash_collection
import array
import hash
# another product.
# This module handle double linked lists
-package list
+module list
import abstract_collection
# another product.
# Module for range of discrete objects.
-package range
+module range
import abstract_collection
# This module contains classes used to sorts arrays.
# In order to provide your own sort class you should define a subclass of `AbstractSorter` with
# a custom `AbstractSorter::compare` function.
-package sorter
+module sorter
import array
# Invocation and management of operating system sub-processes.
# Standard input and output can be handled through streams.
-package exec
+module exec
import stream
# another product.
# File manipulations (create, read, write, etc.)
-package file
+module file
intrude import stream
intrude import string
# Hashable things.
# It introduces an hash function in objects.
-package hash
+module hash
import kernel
# Most minimal classes and methods.
# This module is the root of the standard module hierarchy.
-package kernel
+module kernel
import end # Mark this module is a top level one. (must be only one)
# another product.
# Mathematical operations
-package math
+module math
import kernel
import collection
# Standard classes and methods used by default by Nit programs and libraries.
# This module is implicitly imported by every module.
-package standard
+module standard
import posix
import environ
# another product.
# Input and output streams of characters
-package stream
+module stream
import string
# another product.
# Basic manipulations of strings of characters
-package string
+module string
intrude import collection # FIXME should be collection::array
import hash
# another product.
# Basic string search, match and replace.
-package string_search
+module string_search
import string
# another product.
# Management of time and dates
-package time
+module time
import string_search
# Symbol classes
# FIXME: Should be deprecated soon
-package symbol
+module symbol
redef class String
# Get the unique corresponding to the string
# Base module for nit tools that load, manipulate or transform NIT models
-package abstracttool
+module abstracttool
import mmloader
import syntax
# limitations under the License.
# iregisters slot allocation
-package allocate_iregister_slots
+module allocate_iregister_slots
import icode
private import primitive_info
# limitations under the License.
# Intermediate code local analysis and optimizations
-package analysis
+module analysis
# Global imports
import icode
# limitations under the License.
# Output the intermediate code unded a textual representation
-package icode_dump
+module icode_dump
import icode
import allocate_iregister_slots
# limitations under the License.
# Detect inlinable methods and inline them
-package inline_methods
+module inline_methods
import icode
# limitations under the License.
# Compute and generate tables for classes and modules.
-package compiling
+module compiling
import table_computation
import compiling_base
# limitations under the License.
# Common things for NIT compilation and C generation
-package compiling_base
+module compiling_base
import mmloader
private import utils
# limitations under the License.
# Compute and generate tables for classes and modules.
-package compiling_global
+module compiling_global
import table_computation
private import compiling_icode
# limitations under the License.
# Generate C code from intermediate code representation
-package compiling_icode
+module compiling_icode
import icode
private import analysis
# limitations under the License.
# Generates ICode as an output format
-package icode_generator
+module icode_generator
private import compiling_base
import program
# limitations under the License.
# Compute tables for classes and modules.
-package table_computation
+module table_computation
import mmloader
private import primitive_info
# Helps to generate complex strings.
# Can be used to simplify complex file generation where text addition is not only done at the end
-package compiling_writer
+module compiling_writer
# A writer is used to store a sequence of strings and sub-writers
class Writer
else
cat > nit_version.nit<<END
# This file was generated by git-gen-version.sh
-package nit_version
+module nit_version
fun nit_version: String do return "$*"
END
echo "Version $*"
# limitations under the License.
# This module implements Class Hierarchy Analysis (CHA)
-package cha_analysis
+module cha_analysis
import reachable_method_analysis
import icode
# limitations under the License.
# This module introduces an algorithm to remove the body of dead methods
-package dead_method_removal
+module dead_method_removal
import reachable_method_analysis
# limitations under the License.
# Intermediate code global analysis and optimizations
-package global
+module global
# Global imports
import icode
# Inline every automatic 'getters' and 'setters'
# This optimization is done BEFORE analysis
-package inline_get_and_set
+module inline_get_and_set
import icode
private import syntax
# limitations under the License.
# Module containing all bases for instantiated type analysis
-package instantiated_type_analysis
+module instantiated_type_analysis
import program
# limitations under the License.
# Module containing all bases for the reachable from init method analysis
-package reachable_as_init
+module reachable_as_init
import icode
import program
# limitations under the License.
# This module introduces an analysis that flags all initializers called as new A.x
-package reachable_as_init_impl
+module reachable_as_init_impl
import reachable_method_analysis
import reachable_as_init
# limitations under the License.
# Module containing all bases for the reachable from init method analysis
-package reachable_from_init_method_analysis
+module reachable_from_init_method_analysis
import icode
import program
# This package introduces an algorithm to find all methods reachable
# from at least one reachable initializer
-package reachable_from_init_method_analysis_impl
+module reachable_from_init_method_analysis_impl
import reachable_from_init_method_analysis
import reachable_method_analysis
# limitations under the License.
# Module containing all bases for the reachable method analysis
-package reachable_method_analysis
+module reachable_method_analysis
import icode
import program
# This module introduces an optimization that removes 'get' tests when
# not reachable from an initializer
-package remove_out_of_init_get_test
+module remove_out_of_init_get_test
import reachable_from_init_method_analysis
# limitations under the License.
# This package implements Reachable Type Analysis(RTA)
-package rta_analysis
+module rta_analysis
import instantiated_type_analysis
import reachable_method_analysis
# limitations under the License.
# Base classes for Nit intermediate code representation
-package icode_base
+module icode_base
import metamodel
# limitations under the License.
# Help generation of icode
-package icode_builder
+module icode_builder
import icode_base
# limitations under the License.
# This module is used to model Nit source-file and locations in source-file
-package location
+module location
# A raw text Nit source file
class SourceFile
# limitations under the License.
# core NIT metamodel classes featuring the minimal and simpliest entities
-package abstractmetamodel
+module abstractmetamodel
import partial_order
import location
# limitations under the License.
# Generic classes, generic types and generic formal parameters
-package genericity
+module genericity
intrude import type_formal
intrude import inheritance
# limitations under the License.
# Compute importation of classes and inheritance of properties
-package inheritance
+module inheritance
intrude import static_type
# limitations under the License.
# NIT metamodel bottom module (aka metamodel featuring all extensions)
-package metamodel
+module metamodel
import genericity
import vararg
# limitations under the License.
# Partial ordered sets (ie hierarchies)
-package partial_order
+module partial_order
# Handles partial ordered sets (ie hierarchies)
# Thez are built by adding new element at the bottom of the hierarchy
# limitations under the License.
# Static types and property signatures
-package static_type
+module static_type
intrude import abstractmetamodel
# limitations under the License.
# Formal types
-package type_formal
+module type_formal
import inheritance
# limitations under the License.
# Handle multiple number of parameters in signatures
-package vararg
+module vararg
import genericity
# limitations under the License.
# Virtual type (property of type type)
-package virtualtype
+module virtualtype
import type_formal
# limitations under the License.
# This module is used to load a metamodel
-package mmloader
+module mmloader
import metamodel
import opts
# limitations under the License.
# Nit compiler main module
-package nitc
+module nitc
import abstracttool
import analysis
# limitations under the License.
# The main module of the nitdoc program
-package nitdoc
+module nitdoc
import syntax
private import utils
# Lexer and its tokens.
# This file was generated by SableCC (http://www.sablecc.org/).
-package lexer
+module lexer
intrude import parser_nodes
private import tables
# Parser.
# This file was generated by SableCC (http://www.sablecc.org/).
-package parser
+module parser
intrude import parser_prod
import tables
# Raw AST node hierarchy.
# This file was generated by SableCC (http://www.sablecc.org/).
-package parser_abs
+module parser_abs
import location
# AST nodes of the Nit language
# Was previously based on parser_abs.nit.
-package parser_nodes
+module parser_nodes
import location
# Production AST nodes full definition.
# This file was generated by SableCC (http://www.sablecc.org/).
-package parser_prod
+module parser_prod
import lexer
intrude import parser_nodes
# limitations under the License.
# Module that interfaces the parsing tables.
-package tables
+module tables
# Interface allowing the acces of the tables used during the parsing.
interface TablesCapable
$ output 'parser_abs.nit'
# Raw AST node hierarchy.
# This file was generated by SableCC (http://www.sablecc.org/).
-package parser_abs
+module parser_abs
import location
$ output 'lexer.nit'
# Lexer and its tokens.
# This file was generated by SableCC (http://www.sablecc.org/).
-package lexer
+module lexer
$ if $usermodule
intrude import $usermodule
$ output 'parser_prod.nit'
# Production AST nodes full definition.
# This file was generated by SableCC (http://www.sablecc.org/).
-package parser_prod
+module parser_prod
import lexer
$ if $usermodule
$ output 'parser.nit'
# Parser.
# This file was generated by SableCC (http://www.sablecc.org/).
-package parser
+module parser
intrude import parser_prod
import tables
# limitations under the License.
# Common things for NIT compilation and C generation
-package primitive_info
+module primitive_info
#FIXME Split this module into 2: one in metamodel and one in compiling
# limitations under the License.
# Common things to represent a Nit program/library
-package program
+module program
import metamodel
import icode
# * superfluous parentheses
# * nested "once" expressions
# * use of "while true" instead of "loop"
-package simple_misc_analysis
+module simple_misc_analysis
import toolcontext
import parser
# limitations under the License.
# Analysis control flow and variable visibility in property bodies, statements and expressions
-package flow
+module flow
import syntax_base
# limitations under the License.
# Things needed by typing.nit to generate intermediate code from AST
-package icode_generation
+module icode_generation
import icode
import syntax_base
# Build MM entity from NIT AST and check conformance of these entities.
# This module introduce specific MM class (MMSrcXXX) that specialize the abstract one from metamodel
#
-package mmbuilder
+module mmbuilder
import syntax_base
private import primitive_info
# limitations under the License.
# Manage nested escapable blocks (while, for and closure) and escape statements (break and continue)
-package scope
+module scope
import syntax_base
import flow
# Full syntax analysis of NIT AST.
# Detect syntax and some metamodel errors.
-package syntax
+module syntax
import mmloader
import mmbuilder
# limitations under the License.
# Common syntax structures for syntax analysis of NIT AST.
-package syntax_base
+module syntax_base
import parser
import mmloader
# limitations under the License.
# Analysis property bodies, statements and expressions
-package typing
+module typing
import syntax_base
import flow
# limitations under the License.
# Program used to test the NIT parser
-package test_parser
+module test_parser
import parser
# limitations under the License.
# Common command-line tool infractructure than handle options and error messages
-package toolcontext
+module toolcontext
import opts
import location
# limitations under the License.
# Various functions for NIT tools
-package utils
+module utils
import symbol
Start ../src/test_parser.nit:17,1--110,1
AModule ../src/test_parser.nit:17,1--109,3
- AModuledecl ../src/test_parser.nit:17,1--18,19
+ AModuledecl ../src/test_parser.nit:17,1--18,18
ADoc ../src/test_parser.nit:17,1--18,0
TComment "# Program used to test the NIT parser\n" ../src/test_parser.nit:17,1--18,0
- TKwmodule "package" ../src/test_parser.nit:18,1--7
- AModuleName ../src/test_parser.nit:18,9--19
- TId "test_parser" ../src/test_parser.nit:18,9--19
+ TKwmodule "module" ../src/test_parser.nit:18,1--6
+ AModuleName ../src/test_parser.nit:18,8--18
+ TId "test_parser" ../src/test_parser.nit:18,8--18
AStdImport ../src/test_parser.nit:20,1--13
APublicVisibility ../src/test_parser.nit:20,1
TKwimport "import" ../src/test_parser.nit:20,1--6
'
Read token at ../src/test_parser.nit:17,1--18,0 text='# Program used to test the NIT parser
'
-Read token at ../src/test_parser.nit:18,1--7 text='package'
-Read token at ../src/test_parser.nit:18,9--19 text='test_parser'
-Read token at ../src/test_parser.nit:18,20--19,0 text='
+Read token at ../src/test_parser.nit:18,1--6 text='module'
+Read token at ../src/test_parser.nit:18,8--18 text='test_parser'
+Read token at ../src/test_parser.nit:18,19--19,0 text='
'
Read token at ../src/test_parser.nit:19,1--20,0 text='
'