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