From: Jean Privat Date: Tue, 15 Feb 2011 13:53:29 +0000 (-0500) Subject: Merge branch 'update_syntax' into next X-Git-Tag: v0.4~8 X-Git-Url: http://nitlanguage.org?hp=5b3f929a88328097df368de029535049b0ccd1e8 Merge branch 'update_syntax' into next --- diff --git a/examples/fibonacci.nit b/examples/fibonacci.nit index fcf7426..e1a72c9 100644 --- a/examples/fibonacci.nit +++ b/examples/fibonacci.nit @@ -15,7 +15,7 @@ # limitations under the License. # A simple exemple of refinement where a method is added to the integer class. -package fibonacci +module fibonacci redef class Int # Calculate the self-th element of the fibonacci sequence. diff --git a/examples/print_arguments.nit b/examples/print_arguments.nit index 01e6cdc..3bdddc6 100644 --- a/examples/print_arguments.nit +++ b/examples/print_arguments.nit @@ -15,7 +15,7 @@ # limitations under the License. # How to print arguments of the command line. -package print_arguments +module print_arguments for a in args do print a diff --git a/examples/procedural_array.nit b/examples/procedural_array.nit index 8ceb3a8..838bda0 100644 --- a/examples/procedural_array.nit +++ b/examples/procedural_array.nit @@ -16,7 +16,7 @@ # A procedural program (without explicit class definition). # This program manipulates arrays of integers. -package procedural_array +module procedural_array # The sum of the elements of `a'. # Uses a 'for' control structure. diff --git a/lib/dummy_array.nit b/lib/dummy_array.nit index 46297ea..a0ea46c 100644 --- a/lib/dummy_array.nit +++ b/lib/dummy_array.nit @@ -11,8 +11,8 @@ # another product. class DummyArray -special Set[Int] -special ArrayCapable[Int] + super Set[Int] + super ArrayCapable[Int] var _capacity: Int redef readable var _length: Int var _keys: NativeArray[Int] @@ -85,7 +85,7 @@ special ArrayCapable[Int] end class DummyIterator -special Iterator[Int] + super Iterator[Int] var _array: DummyArray var _pos: Int diff --git a/lib/filter_stream.nit b/lib/filter_stream.nit index 4146345..66366c6 100644 --- a/lib/filter_stream.nit +++ b/lib/filter_stream.nit @@ -12,7 +12,7 @@ # another product. class FilterIStream -special IStream + super IStream # Filter readed elements readable var _stream: nullable IStream @@ -29,7 +29,7 @@ special IStream end class FilterOStream -special OStream + super OStream # Filter outputed elements readable var _stream: nullable OStream @@ -47,7 +47,7 @@ special OStream end class StreamCat -special FilterIStream + super FilterIStream var _streams: Iterator[IStream] redef fun eof: Bool @@ -98,7 +98,7 @@ special FilterIStream end class StreamDemux -special FilterOStream + super FilterOStream var _streams: Array[OStream] redef fun is_writable: Bool diff --git a/lib/game.nit b/lib/game.nit index dea6d9f..1319a17 100644 --- a/lib/game.nit +++ b/lib/game.nit @@ -124,7 +124,7 @@ end # A sprite is a drawable element. # It is represented by a main pixel (x,y) and an image (image) class Sprite -special Rectangle + super Rectangle # Absolute X coordinate of the main pixel in the screen readable writable var _x: Int diff --git a/lib/opts.nit b/lib/opts.nit index fd4a8a1..59391cd 100644 --- a/lib/opts.nit +++ b/lib/opts.nit @@ -79,7 +79,7 @@ class Option end class OptionText -special Option + super Option init(text: String) do init_opt(text, null, null) redef fun pretty(off) do return to_s @@ -88,7 +88,7 @@ special Option end class OptionBool -special Option + super Option redef type VALUE: Bool init(help: String, names: String...) do init_opt(help, false, names) @@ -97,7 +97,7 @@ special Option end class OptionCount -special Option + super Option redef type VALUE: Int init(help: String, names: String...) do init_opt(help, 0, names) @@ -107,7 +107,7 @@ end # Option with one mandatory parameter class OptionParameter -special Option + super Option protected fun convert(str: String): VALUE is abstract redef fun read_param(it) @@ -124,7 +124,7 @@ special Option end class OptionString -special OptionParameter + super OptionParameter redef type VALUE: nullable String init(help: String, names: String...) do init_opt(help, null, names) @@ -133,29 +133,29 @@ special OptionParameter end class OptionEnum -special OptionParameter + super OptionParameter redef type VALUE: Int - var _enum: Array[String] + var _values: Array[String] - init(enum: Array[String], help: String, default: Int, names: String...) + init(values: Array[String], help: String, default: Int, names: String...) do - assert enum.length > 0 - _enum = enum.to_a - init_opt("{help} <{enum.join(", ")}>", default, names) + assert values.length > 0 + _values = values.to_a + init_opt("{help} <{values.join(", ")}>", default, names) end redef fun convert(str) do - var id = _enum.index_of(str) + var id = _values.index_of(str) return id end - fun value_name: String = _enum[value] + fun value_name: String = _values[value] redef fun pretty_default do if default_value != null then - return " ({_enum[default_value.as(not null)]})" + return " ({_values[default_value.as(not null)]})" else return "" end @@ -163,7 +163,7 @@ special OptionParameter end class OptionInt -special OptionParameter + super OptionParameter redef type VALUE: Int init(help: String, default: Int, names: String...) do init_opt(help, default, names) @@ -172,7 +172,7 @@ special OptionParameter end class OptionArray -special OptionParameter + super OptionParameter redef type VALUE: Array[String] init(help: String, names: String...) diff --git a/lib/sdl.nit b/lib/sdl.nit index e1e8b87..960c062 100644 --- a/lib/sdl.nit +++ b/lib/sdl.nit @@ -14,7 +14,7 @@ package sdl universal SDL_Surface -special Pointer + super Pointer fun width: Int is extern "sdl_surface_width" fun height: Int is extern "sdl_surface_height" @@ -37,12 +37,12 @@ special Pointer end universal SDL_Screen -special SDL_Surface + super SDL_Surface fun flip is extern "SDL_Flip" end universal SDL_Event -special Pointer + super Pointer fun is_keyboard: Bool is extern "sdl_evt_is_keyboard" fun as_keyboard: SDL_KeyboardEvent is extern "sdl_evt_as_keyboard" fun is_mouse_button: Bool is extern "sdl_evt_is_mouse_button" @@ -54,24 +54,24 @@ special Pointer end universal SDL_ButtonEvent -special SDL_Event + super SDL_Event fun is_pressed: Bool is abstract end universal SDL_MouseEvent -special SDL_Event + super SDL_Event fun x: Int is abstract fun y: Int is abstract end universal SDL_KeyboardEvent -special SDL_ButtonEvent + super SDL_ButtonEvent redef fun is_pressed: Bool is extern "sdl_keyboard_evt_state" end universal SDL_MouseButtonEvent -special SDL_ButtonEvent -special SDL_MouseEvent + super SDL_ButtonEvent + super SDL_MouseEvent redef fun is_pressed: Bool is extern "sdl_mouse_button_evt_state" redef fun x: Int is extern "sdl_mouse_button_evt_x" redef fun y: Int is extern "sdl_mouse_button_evt_y" @@ -79,7 +79,7 @@ special SDL_MouseEvent end universal SDL_MouseMotionEvent -special SDL_MouseEvent + super SDL_MouseEvent redef fun x: Int is extern "sdl_mouse_evt_x" redef fun y: Int is extern "sdl_mouse_evt_y" fun xrel: Int is extern "sdl_mouse_evt_xrel" diff --git a/lib/standard/collection/abstract_collection.nit b/lib/standard/collection/abstract_collection.nit index b6e734a..6f9693b 100644 --- a/lib/standard/collection/abstract_collection.nit +++ b/lib/standard/collection/abstract_collection.nit @@ -79,7 +79,7 @@ end # Naive implementation of collections method # You only have to define iterator! interface NaiveCollection[E] -special Collection[E] + super Collection[E] redef fun is_empty do return length == 0 redef fun length @@ -132,7 +132,7 @@ end # A collection that contains only one item. class Container[E] -special Collection[E] + super Collection[E] redef fun first do return _item @@ -164,7 +164,7 @@ end # This iterator is quite stupid since it is used for only one item. class ContainerIterator[E] -special Iterator[E] + super Iterator[E] redef fun item do return _container.item redef fun next do _is_ok = false @@ -178,7 +178,7 @@ end # Items can be removed from this collection interface RemovableCollection[E] -special Collection[E] + super Collection[E] # Remove all items fun clear is abstract @@ -191,7 +191,7 @@ end # Items can be added to these collections. interface SimpleCollection[E] -special RemovableCollection[E] + super RemovableCollection[E] # Add an item in a collection. # Ensure col.has(item) fun add(item: E) is abstract @@ -210,7 +210,7 @@ end # s.add(a) # s.has(b) # --> true interface Set[E: Object] -special SimpleCollection[E] + super SimpleCollection[E] redef fun has_only(item) do @@ -239,7 +239,7 @@ special SimpleCollection[E] end interface MapRead[K: Object, E] -special Collection[E] + super Collection[E] # Get the item at `key'. fun [](key: K): E is abstract @@ -262,8 +262,8 @@ end # map.has_key(u1) # -> true # map.has_key(u3) # -> false interface Map[K: Object, E] -special RemovableCollection[E] -special MapRead[K, E] + super RemovableCollection[E] + super MapRead[K, E] # Set the`item' at `key'. fun []=(key: K, item: E) is abstract @@ -284,7 +284,7 @@ end # Iterators for Map. interface MapIterator[K: Object, E] -special Iterator[E] + super Iterator[E] # The key of the current item. fun key: K is abstract @@ -295,7 +295,7 @@ end # Indexed collection are ordoned collections. # The first item is 0. The last is `length'-1. interface SequenceRead[E] -special MapRead[Int, E] + super MapRead[Int, E] # Get the first item. # Is equivalent with `self'[0]. redef fun first @@ -330,9 +330,9 @@ end # Indexed collection are ordoned collections. # The first item is 0. The last is `length'-1. interface Sequence[E] -special SequenceRead[E] -special Map[Int, E] -special SimpleCollection[E] + super SequenceRead[E] + super Map[Int, E] + super SimpleCollection[E] # Set the first item. # Is equivalent with `self'[0] = `item'. fun first=(item: E) @@ -373,7 +373,7 @@ end # Iterators on indexed collections. interface IndexedIterator[E] -special MapIterator[Int, E] + super MapIterator[Int, E] # The index of the current item. fun index: Int is abstract @@ -383,7 +383,7 @@ end # Associatives arrays that internally uses couples to represent each (key, value) pairs. interface CoupleMap[K: Object, E] -special Map[K, E] + super Map[K, E] # Return the couple of the corresponding key # Return null if the key is no associated element protected fun couple_at(key: K): nullable Couple[K, E] is abstract @@ -405,7 +405,7 @@ end # # Actually is is a wrapper around an iterator of the internal array of the map. class CoupleMapIterator[K: Object, E] -special MapIterator[K, E] + super MapIterator[K, E] redef fun item do return _iter.item.second #redef fun item=(e) do _iter.item.second = e diff --git a/lib/standard/collection/array.nit b/lib/standard/collection/array.nit index 86357ae..133ea5b 100644 --- a/lib/standard/collection/array.nit +++ b/lib/standard/collection/array.nit @@ -19,7 +19,7 @@ import abstract_collection # One dimention array of objects. class AbstractArrayRead[E] -special SequenceRead[E] + super SequenceRead[E] # The current length redef readable var _length: Int = 0 @@ -142,8 +142,8 @@ end # Resizeable one dimention array of objects. class AbstractArray[E] -special AbstractArrayRead[E] -special Sequence[E] + super AbstractArrayRead[E] + super Sequence[E] fun enlarge(cap: Int) is abstract redef fun push(item) do add(item) @@ -226,8 +226,8 @@ end # a.push(32) # a.push(8) class Array[E] -special AbstractArray[E] -special ArrayCapable[E] + super AbstractArray[E] + super ArrayCapable[E] redef fun iterate !each(e: E) do @@ -391,7 +391,7 @@ end # An `Iterator' on `AbstractArray' class ArrayIterator[E] -special IndexedIterator[E] + super IndexedIterator[E] redef fun item do return _array[_index] # redef fun item=(e) do _array[_index] = e @@ -414,7 +414,7 @@ end # A set implemented with an Array. class ArraySet[E: Object] -special Set[E] + super Set[E] # The stored elements. var _array: Array[E] @@ -462,7 +462,7 @@ end # Iterators on sets implemented with arrays. class ArraySetIterator[E: Object] -special Iterator[E] + super Iterator[E] redef fun is_ok do return _iter.is_ok @@ -478,7 +478,7 @@ end # Associative arrays implemented with an array of (key, value) pairs. class ArrayMap[K: Object, E] -special CoupleMap[K, E] + super CoupleMap[K, E] # O(n) redef fun [](key) diff --git a/lib/standard/collection/hash_collection.nit b/lib/standard/collection/hash_collection.nit index e30f7e5..13d5a7a 100644 --- a/lib/standard/collection/hash_collection.nit +++ b/lib/standard/collection/hash_collection.nit @@ -18,8 +18,8 @@ import hash # A HashCollection is an array of HashNode[K] indexed by the K hash value private class HashCollection[K: Object, N: HashNode[K], E] -special Collection[E] -special ArrayCapable[nullable N] + super Collection[E] + super ArrayCapable[nullable N] var _array: nullable NativeArray[nullable N] = null # Used to store items var _capacity: Int = 0 # Size of _array redef readable var _length: Int = 0 # Number of items in the map @@ -198,8 +198,8 @@ private class HashNode[K: Object] end class HashMap[K: Object, V] -special Map[K, V] -special HashCollection[K, HashMapNode[K, V], V] + super Map[K, V] + super HashCollection[K, HashMapNode[K, V], V] redef fun [](key) do @@ -301,7 +301,7 @@ special HashCollection[K, HashMapNode[K, V], V] end class HashMapNode[K: Object, V] -special HashNode[K] + super HashNode[K] redef type N: HashMapNode[K, V] var _value: V @@ -313,7 +313,7 @@ special HashNode[K] end class HashMapIterator[K: Object, V] -special MapIterator[K, V] + super MapIterator[K, V] redef fun is_ok do return _node != null redef fun item @@ -354,8 +354,8 @@ special MapIterator[K, V] end class HashSet[E: Object] -special Set[E] -special HashCollection[E, HashSetNode[E], E] + super Set[E] + super HashCollection[E, HashSetNode[E], E] redef fun is_empty do return _length == 0 @@ -396,7 +396,7 @@ special HashCollection[E, HashSetNode[E], E] end class HashSetNode[E: Object] -special HashNode[E] + super HashNode[E] redef type N: HashSetNode[E] init(e: E) @@ -406,7 +406,7 @@ special HashNode[E] end class HashSetIterator[E: Object] -special Iterator[E] + super Iterator[E] redef fun is_ok do return _node != null redef fun item diff --git a/lib/standard/collection/list.nit b/lib/standard/collection/list.nit index 3b11a6b..d032066 100644 --- a/lib/standard/collection/list.nit +++ b/lib/standard/collection/list.nit @@ -17,7 +17,7 @@ import abstract_collection # Double linked lists. class List[E] -special Sequence[E] + super Sequence[E] # Access redef fun [](index) do return get_node(index).item @@ -242,7 +242,7 @@ end # This is the iterator class of List class ListIterator[E] -special IndexedIterator[E] + super IndexedIterator[E] redef fun item do return _node.item fun item=(e: E) do _node.item = e @@ -287,7 +287,7 @@ end # Linked nodes that constitute a linked list. private class ListNode[E] -special Container[E] + super Container[E] init(i: E) do item = i diff --git a/lib/standard/collection/range.nit b/lib/standard/collection/range.nit index aa96cf0..9dbbc80 100644 --- a/lib/standard/collection/range.nit +++ b/lib/standard/collection/range.nit @@ -17,7 +17,7 @@ import abstract_collection # Range of discrete objects. class Range[E: Discrete] -special Collection[E] + super Collection[E] redef readable var _first: E @@ -86,7 +86,7 @@ end class IteratorRange[E: Discrete] # Iterator on ranges. -special Iterator[E] + super Iterator[E] var _range: Range[E] redef readable var _item: E diff --git a/lib/standard/collection/sorter.nit b/lib/standard/collection/sorter.nit index 8240a0c..99c58a1 100644 --- a/lib/standard/collection/sorter.nit +++ b/lib/standard/collection/sorter.nit @@ -89,7 +89,7 @@ end # This class uses the operator <=> to sort arrays. # You can also use the `sort' method of the `Array' class. class ComparableSorter[E: Comparable] -special AbstractSorter[E] + super AbstractSorter[E] # Return a <=> b redef fun compare(a, b) do return a <=> b diff --git a/lib/standard/exec.nit b/lib/standard/exec.nit index 996136b..ddeca9d 100644 --- a/lib/standard/exec.nit +++ b/lib/standard/exec.nit @@ -74,8 +74,8 @@ end # stdout of the processus is readable class IProcess -special Process -special IStream + super Process + super IStream var _in: FDIStream redef fun close do _in.close @@ -99,8 +99,8 @@ end # stdin of the processus is writable class OProcess -special Process -special OStream + super Process + super OStream var _out: OStream redef fun close do _out.close @@ -124,9 +124,9 @@ end # stdin and stdout are both accessible class IOProcess -special IProcess -special OProcess -special IOStream + super IProcess + super OProcess + super IOStream redef fun close do @@ -162,7 +162,7 @@ redef class NativeString end private universal NativeProcess -special Pointer + super Pointer fun id: Int is extern "exec_NativeProcess_NativeProcess_id_0" fun is_finished: Bool is extern "exec_NativeProcess_NativeProcess_is_finished_0" fun status: Int is extern "exec_NativeProcess_NativeProcess_status_0" diff --git a/lib/standard/file.nit b/lib/standard/file.nit index 5ea2468..903554c 100644 --- a/lib/standard/file.nit +++ b/lib/standard/file.nit @@ -50,8 +50,8 @@ end # File Abstract Stream class FStream -special IOS -special NativeFileCapable + super IOS + super NativeFileCapable # The path of the file. readable var _path: nullable String = null @@ -64,8 +64,8 @@ end # File input stream class IFStream -special FStream -special BufferedIStream + super FStream + super BufferedIStream # Misc fun reopen @@ -113,8 +113,8 @@ end # File output stream class OFStream -special FStream -special OStream + super FStream + super OStream # Write a string. redef fun write(s) @@ -161,7 +161,7 @@ end ############################################################################### class Stdin -special IFStream + super IFStream private init do _file = native_stdin _path = "/dev/stdin" @@ -170,7 +170,7 @@ special IFStream end class Stdout -special OFStream + super OFStream private init do _file = native_stdout _path = "/dev/stdout" @@ -179,7 +179,7 @@ special OFStream end class Stderr -special OFStream + super OFStream private init do _file = native_stderr _path = "/dev/stderr" @@ -262,7 +262,7 @@ redef class NativeString end universal FileStat -special Pointer + super Pointer # This class is system dependent ... must reify the vfs fun mode: Int is extern "file_FileStat_FileStat_mode_0" fun atime: Int is extern "file_FileStat_FileStat_atime_0" @@ -273,7 +273,7 @@ end # Instance of this class are standard FILE * pointers private universal NativeFile -special Pointer + super Pointer fun io_read(buf: NativeString, len: Int): Int is extern "file_NativeFile_NativeFile_io_read_2" fun io_write(buf: NativeString, len: Int): Int is extern "file_NativeFile_NativeFile_io_write_2" fun io_close: Int is extern "file_NativeFile_NativeFile_io_close_0" diff --git a/lib/standard/kernel.nit b/lib/standard/kernel.nit index 35e46ca..30c592d 100644 --- a/lib/standard/kernel.nit +++ b/lib/standard/kernel.nit @@ -119,7 +119,7 @@ end # Discrete total orders. interface Discrete -special Comparable + super Comparable redef type OTHER: Discrete @@ -200,7 +200,7 @@ end # Native integer numbers. # Correspond to C int. universal Int -special Discrete + super Discrete redef type OTHER: Int redef fun object_id is intern @@ -340,7 +340,7 @@ end # Characters are denoted with simple quote. # eg. 'a' or '\n'. universal Char -special Discrete + super Discrete redef type OTHER: Char redef fun object_id is intern diff --git a/lib/standard/stream.nit b/lib/standard/stream.nit index 7752773..1a90d56 100644 --- a/lib/standard/stream.nit +++ b/lib/standard/stream.nit @@ -23,7 +23,7 @@ end # Abstract input streams class IStream -special IOS + super IOS # Read a character. Return its ASCII value, -1 on EOF or timeout fun read_char: Int is abstract @@ -82,7 +82,7 @@ end # Abstract output stream class OStream -special IOS + super IOS # write a string fun write(s: String) is abstract @@ -92,7 +92,7 @@ end # Input streams with a buffer class BufferedIStream -special IStream + super IStream redef fun read_char do assert not eof @@ -204,14 +204,14 @@ special IStream end class IOStream -special IStream -special OStream + super IStream + super OStream end ##############################################################" class FDStream -special IOS + super IOS # File description var _fd: Int @@ -226,8 +226,8 @@ special IOS end class FDIStream -special FDStream -special IStream + super FDStream + super IStream redef readable var _eof: Bool = false redef fun read_char @@ -241,8 +241,8 @@ special IStream end class FDOStream -special FDStream -special OStream + super FDStream + super OStream redef readable var _is_writable: Bool redef fun write(s) @@ -258,9 +258,9 @@ special OStream end class FDIOStream -special FDIStream -special FDOStream -special IOStream + super FDIStream + super FDOStream + super IOStream init(fd: Int) do _fd = fd diff --git a/lib/standard/string.nit b/lib/standard/string.nit index 164e6f3..d61b260 100644 --- a/lib/standard/string.nit +++ b/lib/standard/string.nit @@ -22,7 +22,7 @@ import hash ############################################################################### abstract class AbstractString -special AbstractArrayRead[Char] + super AbstractArrayRead[Char] readable private var _items: NativeString redef fun [](index) do return _items[index] @@ -160,8 +160,8 @@ end class String -special Comparable -special AbstractString + super Comparable + super AbstractString redef type OTHER: String # Create a new string from a given char *. @@ -265,10 +265,10 @@ end # Strings are arrays of characters. class Buffer -special AbstractString -special Comparable -special StringCapable -special AbstractArray[Char] + super AbstractString + super Comparable + super StringCapable + super AbstractArray[Char] redef type OTHER: String diff --git a/lib/standard/string_search.nit b/lib/standard/string_search.nit index ef9256a..d37ac7b 100644 --- a/lib/standard/string_search.nit +++ b/lib/standard/string_search.nit @@ -63,7 +63,7 @@ end # Communications of the Association for Computing Machinery, 20(10), 1977, pp. 762-772.) # see also http://www.cs.utexas.edu/users/moore/best-ideas/string-searching/index.html class BM_Pattern -special Pattern + super Pattern redef fun to_s do return _motif # boyer-moore search gives the position of the first occurence of a pattern starting at position `from' @@ -230,7 +230,7 @@ class Match end redef class Char -special Pattern + super Pattern redef fun search_index_in(s, from) do var stop = s.length @@ -253,7 +253,7 @@ special Pattern end redef class String -special Pattern + super Pattern redef fun search_index_in(s, from) do assert from >= 0 diff --git a/misc/gtksourceview/nit.lang b/misc/gtksourceview/nit.lang index b3d09cd..eac19d0 100644 --- a/misc/gtksourceview/nit.lang +++ b/misc/gtksourceview/nit.lang @@ -72,8 +72,10 @@ redef var package + module type universal + enum diff --git a/misc/source-highlight/nit.lang b/misc/source-highlight/nit.lang index 9a9d386..aef7375 100644 --- a/misc/source-highlight/nit.lang +++ b/misc/source-highlight/nit.lang @@ -20,6 +20,6 @@ comment start "#" include "number.lang" string delim "\"" "\"" escape "\\" string delim "'" "'" escape "\\" -keyword = "abort|abstract|as|assert|break|continue|do|else|end|extern|for|if|import|in|interface|intern|intrude|is|isa|isset|new|label|loop|private|protected|readable|return|super|then|while|false|null|nullable|redef|self|true|and|not|or|fun|var|type|init|class|package|special|universal|writable" +keyword = "abort|abstract|as|assert|break|continue|do|else|end|enum|extern|for|if|import|in|interface|intern|intrude|is|isa|isset|new|label|loop|private|protected|readable|return|super|then|while|false|null|nullable|redef|self|true|and|not|or|fun|var|type|init|class|package|module|special|universal|writable" type = '[[:upper:]]([[:word:]]*)' include "symbols.lang" diff --git a/misc/vim/syntax/nit.vim b/misc/vim/syntax/nit.vim index 8ad3f26..899dc7d 100644 --- a/misc/vim/syntax/nit.vim +++ b/misc/vim/syntax/nit.vim @@ -52,8 +52,8 @@ syn match NITKeyword "\<\(super\)\>" syn match Error "\" " Declarations, definitions and blocks -syn region NITPackageDecl matchgroup=NITDefine start="\<\(import\|package\)\>\s*" matchgroup=NONE end="\ze\(\s\|:\|(\|$\)" oneline -syn region NITClassBlock matchgroup=NITDefine start="\<\(class\|universal\|interface\)\>" matchgroup=NITDefine end="\" contains=ALL fold +syn region NITModuleDecl matchgroup=NITDefine start="\<\(import\|module\|package\)\>\s*" matchgroup=NONE end="\ze\(\s\|:\|(\|$\)" oneline +syn region NITClassBlock matchgroup=NITDefine start="\<\(class\|enum\|universal\|interface\)\>" matchgroup=NITDefine end="\" contains=ALL fold syn region NITFunctionDecl matchgroup=NITDefine start="\\s*" matchgroup=NONE end="\ze\(\\|\s\|:\|(\|$\)" oneline syn region NITTypeDecl matchgroup=NITDefine start="\\s*" matchgroup=NONE end="\ze\(\\|\s\|:\|(\|$\)" oneline contained containedin=NITClassBlock syn region NITAttrDecl matchgroup=NITDefine start="\\s*\ze_" matchgroup=NONE end="\ze\(\\|\s\|:\|(\|$\)" oneline contained containedin=NITClassBlock @@ -84,7 +84,7 @@ syn keyword NITSelf self " Define the default highlighting. hi def link NITDefine Define -hi def link NITPackageDecl Identifier +hi def link NITModuleDecl Identifier hi def link NITFunctionDecl Function hi def link NITTypeDecl Function hi def link NITAttrDecl Function diff --git a/src/abstracttool.nit b/src/abstracttool.nit index 37381fa..3f5e50b 100644 --- a/src/abstracttool.nit +++ b/src/abstracttool.nit @@ -24,7 +24,7 @@ import syntax import nit_version class AbstractCompiler -special ToolContext + super ToolContext init(tool_name: String) do diff --git a/src/analysis/allocate_iregister_slots.nit b/src/analysis/allocate_iregister_slots.nit index a8ac823..98c8e89 100644 --- a/src/analysis/allocate_iregister_slots.nit +++ b/src/analysis/allocate_iregister_slots.nit @@ -27,7 +27,7 @@ private import primitive_info # * register aliasing # * IMove optimization class IRegisterSlotAllocationVisitor -special ICodeVisitor + super ICodeVisitor # The visitor works in two pass: # First pass is used to detect first and last iregisters occurences and slot groups # Second pass is used to assign an effective slot to iregsiters diff --git a/src/analysis/cha_analysis.nit b/src/analysis/cha_analysis.nit index ba68c2b..7d06441 100644 --- a/src/analysis/cha_analysis.nit +++ b/src/analysis/cha_analysis.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This package implements Class Hierarchy Analysis (CHA) +# This module implements Class Hierarchy Analysis (CHA) package cha_analysis import reachable_method_analysis @@ -22,7 +22,7 @@ import icode import program class ChaContext -special ReachableMethodAnalysis + super ReachableMethodAnalysis readable var _reachable_iroutines: HashSet[IRoutine] = new HashSet[IRoutine] redef fun is_iroutine_reachable(ir: nullable IRoutine): Bool do @@ -88,7 +88,7 @@ class ChaBuilder end class ChaVisitor -special ICodeVisitor + super ICodeVisitor readable var _builder: ChaBuilder redef fun visit_icode(ic) diff --git a/src/analysis/dead_method_removal.nit b/src/analysis/dead_method_removal.nit index 8e9c18b..beb6a7c 100644 --- a/src/analysis/dead_method_removal.nit +++ b/src/analysis/dead_method_removal.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This package introduces an algorithm to remove the body of dead methods +# This module introduces an algorithm to remove the body of dead methods package dead_method_removal import reachable_method_analysis diff --git a/src/analysis/inline_get_and_set.nit b/src/analysis/inline_get_and_set.nit index 791d4da..b581833 100644 --- a/src/analysis/inline_get_and_set.nit +++ b/src/analysis/inline_get_and_set.nit @@ -45,7 +45,7 @@ redef class Program end private class InlineGetSetVisitor -special ICodeVisitor + super ICodeVisitor var _icb: ICodeBuilder readable var _number_inlined: Int = 0 diff --git a/src/analysis/inline_methods.nit b/src/analysis/inline_methods.nit index a56ecd4..875da44 100644 --- a/src/analysis/inline_methods.nit +++ b/src/analysis/inline_methods.nit @@ -20,7 +20,7 @@ package inline_methods import icode private class InlineMethodVisitor -special ICodeVisitor + super ICodeVisitor var _pass: Int = 0 var _icb: ICodeBuilder diff --git a/src/analysis/instantiated_type_analysis.nit b/src/analysis/instantiated_type_analysis.nit index 58af9d4..f052eda 100644 --- a/src/analysis/instantiated_type_analysis.nit +++ b/src/analysis/instantiated_type_analysis.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Package containing all bases for instantiated type analysis +# Module containing all bases for instantiated type analysis package instantiated_type_analysis import program @@ -63,7 +63,7 @@ end # Default behavior is to say that all types are instantiated class DefaultInstantiatedTypeAnalysis -special InstantiatedTypeAnalysis + super InstantiatedTypeAnalysis redef fun is_class_instantiated(local_class: MMLocalClass): Bool do return true init do end diff --git a/src/analysis/reachable_as_init.nit b/src/analysis/reachable_as_init.nit index 0d9fb88..2f65f7a 100644 --- a/src/analysis/reachable_as_init.nit +++ b/src/analysis/reachable_as_init.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Package containing all bases for the reachable from init method analysis +# Module containing all bases for the reachable from init method analysis package reachable_as_init import icode @@ -51,7 +51,7 @@ end # Default behavior is to say that all initializers are called as init class DefaultReachableAsInitAnalysis -special ReachableAsInitAnalysis + super ReachableAsInitAnalysis redef fun is_method_reachable_as_init(method: MMMethod, c: MMLocalClass): Bool do if method.global.is_init and method.global.is_init_for(c) then return true return false diff --git a/src/analysis/reachable_as_init_impl.nit b/src/analysis/reachable_as_init_impl.nit index 3aaa15a..22e9b32 100644 --- a/src/analysis/reachable_as_init_impl.nit +++ b/src/analysis/reachable_as_init_impl.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This package introduces an analysis that flags all initializers called as new A.x +# This module introduces an analysis that flags all initializers called as new A.x package reachable_as_init_impl import reachable_method_analysis @@ -41,7 +41,7 @@ end # Visitor will add only initializers in the _methods list. # If the checked method is in this list, it is reachable as init ! class ReachableAsInitAnalysisImpl -special ReachableAsInitAnalysis + super ReachableAsInitAnalysis var _methods: HashMap[MMLocalClass, List[MMMethod]] = new HashMap[MMLocalClass, List[MMMethod]] redef fun is_method_reachable_as_init(method: MMMethod, c: MMLocalClass): Bool do @@ -53,7 +53,7 @@ special ReachableAsInitAnalysis end class RAIVisitor -special ICodeVisitor + super ICodeVisitor readable var _builder: ReachableAsInitBuilder redef fun visit_icode(ic) diff --git a/src/analysis/reachable_from_init_method_analysis.nit b/src/analysis/reachable_from_init_method_analysis.nit index 4397066..fcffe1e 100644 --- a/src/analysis/reachable_from_init_method_analysis.nit +++ b/src/analysis/reachable_from_init_method_analysis.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Package containing all bases for the reachable from init method analysis +# Module containing all bases for the reachable from init method analysis package reachable_from_init_method_analysis import icode @@ -61,7 +61,7 @@ end # Default behavior is to say that all methods/iroutines are reachable # from at least one init class DefaultReachableFromInitMethodAnalysis -special ReachableFromInitMethodAnalysis + super ReachableFromInitMethodAnalysis redef fun is_iroutine_reachable_from_init(ir: nullable IRoutine): Bool do return true redef fun is_method_reachable_from_init(method: MMMethod): Bool do return true diff --git a/src/analysis/reachable_from_init_method_analysis_impl.nit b/src/analysis/reachable_from_init_method_analysis_impl.nit index ad04ed1..902fb24 100644 --- a/src/analysis/reachable_from_init_method_analysis_impl.nit +++ b/src/analysis/reachable_from_init_method_analysis_impl.nit @@ -49,7 +49,7 @@ class RFIMABuilder end class RFIMAContext -special ReachableFromInitMethodAnalysis + super ReachableFromInitMethodAnalysis readable var _reachable_from_init_iroutines: HashSet[IRoutine] = new HashSet[IRoutine] redef fun is_iroutine_reachable_from_init(ir: nullable IRoutine): Bool do @@ -62,7 +62,7 @@ special ReachableFromInitMethodAnalysis end class RFIMAVisitor -special ICodeVisitor + super ICodeVisitor readable var _context: RFIMAContext readable var _program: Program diff --git a/src/analysis/reachable_method_analysis.nit b/src/analysis/reachable_method_analysis.nit index ef2b4fe..a7ac075 100644 --- a/src/analysis/reachable_method_analysis.nit +++ b/src/analysis/reachable_method_analysis.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Package containing all bases for the reachable method analysis +# Module containing all bases for the reachable method analysis package reachable_method_analysis import icode @@ -57,7 +57,7 @@ end # Default behavior is to say that all methods/iroutines are reachable class DefaultReachableMethodAnalysis -special ReachableMethodAnalysis + super ReachableMethodAnalysis redef fun is_iroutine_reachable(ir: nullable IRoutine): Bool do return true redef fun is_method_reachable(method: MMMethod): Bool do return true diff --git a/src/analysis/remove_out_of_init_get_test.nit b/src/analysis/remove_out_of_init_get_test.nit index 8db2cb4..0685777 100644 --- a/src/analysis/remove_out_of_init_get_test.nit +++ b/src/analysis/remove_out_of_init_get_test.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This package introduces an optimization that removes 'get' tests when +# This module introduces an optimization that removes 'get' tests when # not reachable from an initializer package remove_out_of_init_get_test @@ -55,7 +55,7 @@ redef class Program end class IssetCounter -special ICodeVisitor + super ICodeVisitor readable var _nb_isset: Int = 0 redef fun visit_icode(ic) @@ -69,7 +69,7 @@ special ICodeVisitor end class GetterTestRemover -special ICodeVisitor + super ICodeVisitor readable var _nb_optimized_isset: Int = 0 redef fun visit_icode(ic) diff --git a/src/analysis/rta_analysis.nit b/src/analysis/rta_analysis.nit index a10dcac..1646f4f 100644 --- a/src/analysis/rta_analysis.nit +++ b/src/analysis/rta_analysis.nit @@ -23,8 +23,8 @@ import icode import program class RtaContext -special ReachableMethodAnalysis -special InstantiatedTypeAnalysis + super ReachableMethodAnalysis + super InstantiatedTypeAnalysis init do end readable var _instanciated_classes: HashSet[MMLocalClass] = new HashSet[MMLocalClass] @@ -165,7 +165,7 @@ class RtaBuilder end for cls in program.main_module.global_classes do - if not cls.is_universal then continue + if not cls.is_enum then continue add_instantiated_class(program.main_module[cls]) end end @@ -195,7 +195,7 @@ class RtaBuilder end class RtaVisitor -special ICodeVisitor + super ICodeVisitor readable var _builder: RtaBuilder redef fun visit_icode(ic) diff --git a/src/compiling/compiling_writer.nit b/src/compiling/compiling_writer.nit index 8e2294a..d32211a 100644 --- a/src/compiling/compiling_writer.nit +++ b/src/compiling/compiling_writer.nit @@ -118,7 +118,7 @@ end # A writer node that contains a full writer private class WriterCoreNode -special WriterNode + super WriterNode var _writer: Writer redef fun internal_write_to_stream(s) do _writer.write_to_stream(s) @@ -128,7 +128,7 @@ end # A simple writer node that contains only strings private class WriterStrings -special WriterNode + super WriterNode # The first string var _string: String diff --git a/src/compiling/icode_generator.nit b/src/compiling/icode_generator.nit index 04d479c..a1eb934 100644 --- a/src/compiling/icode_generator.nit +++ b/src/compiling/icode_generator.nit @@ -34,7 +34,7 @@ end # A class to dump ICode to a file class FileICodeDumper -special ICodeDumper + super ICodeDumper var _file: OFStream init(f: OFStream) do diff --git a/src/compiling/table_computation.nit b/src/compiling/table_computation.nit index df7dc3b..20461ff 100644 --- a/src/compiling/table_computation.nit +++ b/src/compiling/table_computation.nit @@ -52,14 +52,14 @@ end # All information and results of the global analysis. class TableInformation -special ColorContext + super ColorContext # FIXME: do something better. readable writable var _max_class_table_length: Int = 0 end # A compiled class is a class in a program class CompiledClass -special ColorContext + super ColorContext # The corresponding local class in the main module of the prgram readable var _local_class: MMLocalClass @@ -413,7 +413,7 @@ end # An element of a class or an instance table # Such an elements represent method function pointers, attribute values, etc. abstract class TableElt -special AbsTableElt + super AbsTableElt # Is the element conflict to class `c' (used for coloring) fun is_related_to(c: MMLocalClass): Bool is abstract @@ -427,18 +427,18 @@ end # An element of a module table # Such an elements represent colors or identifiers abstract class ModuleTableElt -special AbsTableElt + super AbsTableElt end # An element of a module table that represents a group of TableElt defined in the same local class class ModuleTableEltGroup -special ModuleTableElt + super ModuleTableElt readable var _elements: Array[TableElt] = new Array[TableElt] end # An element that represents a class property abstract class TableEltProp -special TableElt + super TableElt readable var _property: MMLocalProperty init(p: MMLocalProperty) @@ -449,22 +449,22 @@ end # An element that represents a function pointer to a global method class TableEltMeth -special TableEltProp + super TableEltProp end # An element that represents a function pointer to the super method of a local method class TableEltSuper -special TableEltProp + super TableEltProp end # An element that represents the value stored for a global attribute class TableEltAttr -special TableEltProp + super TableEltProp end # An element representing a class information class AbsTableEltClass -special AbsTableElt + super AbsTableElt # The local class where the information comes from readable var _local_class: MMLocalClass @@ -476,8 +476,8 @@ end # An element of a class table representing a class information class TableEltClass -special TableElt -special AbsTableEltClass + super TableElt + super AbsTableEltClass redef fun is_related_to(c) do var bc = c.mmmodule[_local_class.global] @@ -487,13 +487,13 @@ end # An element representing the id of a class in a module table class TableEltClassId -special ModuleTableElt -special AbsTableEltClass + super ModuleTableElt + super AbsTableEltClass end # An element representing the constructor marker position in a class table class TableEltClassInitTable -special TableEltClass + super TableEltClass end # An element used for a cast @@ -501,13 +501,13 @@ end # At the TableElt offset, there is the id of the super-class # At the ModuleTableElt offset, there is the TableElt offset (ie. the color of the super-class). class TableEltClassColor -special TableEltClass -special ModuleTableElt + super TableEltClass + super ModuleTableElt end # A Group of elements introduced in the same global-class that are colored together class TableEltComposite -special TableElt + super TableElt var _table: Array[TableElt] var _cc: CompiledClass var _offsets: HashMap[MMLocalClass, Int] @@ -532,24 +532,24 @@ end # The element that represent the class id class TableEltClassSelfId -special TableElt + super TableElt redef fun is_related_to(c) do return true end # The element that represent the Object Size class TableEltClassObjectSize -special TableElt + super TableElt redef fun is_related_to(c) do return true end # The element that represent the object id class TableEltObjectId -special TableElt + super TableElt redef fun is_related_to(c) do return true end # The element that class TableEltVftPointer -special TableElt + super TableElt redef fun is_related_to(c) do return true end diff --git a/src/icode/icode_base.nit b/src/icode/icode_base.nit index d795c55..09c966b 100644 --- a/src/icode/icode_base.nit +++ b/src/icode/icode_base.nit @@ -79,7 +79,7 @@ end # A closure definition in a iroutine body class IClosureDef -special IRoutine + super IRoutine init(p: Array[IRegister], r: nullable IRegister) do super(p, r) @@ -105,13 +105,13 @@ end # An icode that uses no registers (no args) abstract class ICode0 -special ICode + super ICode redef fun arity do return 0 end # An icode that uses a single register (1 arg) abstract class ICode1 -special ICode + super ICode redef fun arity do return 1 # The single argument @@ -122,7 +122,7 @@ end # An icode that uses two single registers (2 args) abstract class ICode2 -special ICode + super ICode redef fun arity do return 2 # The first argument @@ -140,7 +140,7 @@ end # An icode that uses a variable number of registers (n args) and a variable number of closure definitions abstract class ICodeN -special ICode + super ICode redef fun arity do return _exprs.length # All arguments @@ -163,7 +163,7 @@ end # A linear sequence of ICode class ISeq -special ICode0 + super ICode0 # The sequence of icode readable var _icodes: List[ICode] = new List[ICode] @@ -176,14 +176,14 @@ end # An infinite loop of ICode # Use IEscape to exit class ILoop -special ISeq + super ISeq init do end end # A Condidianal if-then-else statement # expr is the condition class IIf -special ICode1 + super ICode1 # The 'then' sequence of icode readable var _then_seq: ISeq = new ISeq # The 'else' sequence of icode @@ -193,7 +193,7 @@ end # Escape to to end of a parent sequence class IEscape -special ICode0 + super ICode0 # The seqeuence to escape # The control flow continues at the next icode after the associated sequence readable var _iescape_mark: IEscapeMark @@ -202,7 +202,7 @@ end # An abort statement class IAbort -special ICode0 + super ICode0 # The reason the abort occured # tests.first is the format readable var _texts: Array[String] @@ -219,7 +219,7 @@ end # The root of all method invocations abstract class IAbsCall -special ICodeN + super ICodeN # The called method readable var _property: MMMethod @@ -233,14 +233,14 @@ end # A simple procedure or function call # exprs.first is the reciever, other are arguments class ICall -special IAbsCall + super IAbsCall init(p, e) do super end # A super method call # exprs.first is the reciever, other are arguments class ISuper -special IAbsCall + super IAbsCall init(p, e) do super end @@ -252,7 +252,7 @@ end # - IStaticCall -> target Initializer # - ICheckInstance class INew -special IAbsCall + super IAbsCall # The type to instantiate readable var _stype: MMType init(t: MMType, p: MMMethod, a: Sequence[IRegister]) @@ -266,7 +266,7 @@ end # No receivers, returns a new object of type 't' # Will allocate memory and ensure dynamic type and object identity class IAllocateInstance -special ICode0 + super ICode0 # The type to allocate readable var _stype: MMType init(t: MMType) @@ -277,13 +277,13 @@ end # A static call to a specific method class IStaticCall -special IAbsCall + super IAbsCall init(p: MMMethod, a: Sequence[IRegister]) do super end # A validation of a newly constructed instance class ICheckInstance -special ICode1 + super ICode1 # The type to allocate readable var _stype: MMType init(t: MMType, e: IRegister) @@ -295,7 +295,7 @@ end # Initialisation of default attributes of a new instance class IInitAttributes -special ICode1 + super ICode1 # The type to initialize readable var _stype: MMType init(t: MMType, e: IRegister) @@ -308,7 +308,7 @@ end # A closure call # exprs are the arguments class IClosCall -special ICodeN + super ICodeN # The called closure readable var _closure_decl: IClosureDecl @@ -326,7 +326,7 @@ end # Native are associated to local properties to distinguish them # expr are the arguments class INative -special ICodeN + super ICodeN # The associated local property readable var _method: MMMethod @@ -341,7 +341,7 @@ end # A literal Int value class IIntValue -special ICode0 + super ICode0 # The value readable var _value: String @@ -352,7 +352,7 @@ end # A literal Bool value class IBoolValue -special ICode0 + super ICode0 # The value readable var _value: Bool @@ -363,7 +363,7 @@ end # A literal NativeString value class IStringValue -special ICode0 + super ICode0 # The value readable var _value: String @@ -374,7 +374,7 @@ end # A literal Float value class IFloatValue -special ICode0 + super ICode0 # The value readable var _value: String @@ -385,7 +385,7 @@ end # A literal Char value class ICharValue -special ICode0 + super ICode0 # The value readable var _value: String @@ -398,7 +398,7 @@ end # expr is the assigned value # result is the register assigned class IMove -special ICode1 + super ICode1 init(r: IRegister, e: IRegister) do super(e) @@ -411,7 +411,7 @@ end # An attribute read access # expr is the reciever class IAttrRead -special ICode1 + super ICode1 # The accessed attribute readable var _property: MMAttribute @@ -427,7 +427,7 @@ end # An attribute assignment # expr1 is the receiver, expr2 is the assigned value class IAttrWrite -special ICode2 + super ICode2 # The accessed attribute readable var _property: MMAttribute @@ -442,7 +442,7 @@ end # An attribute is_set check # expr is the reciever class IAttrIsset -special ICode1 + super ICode1 # The accessed attribute readable var _property: MMAttribute @@ -458,7 +458,7 @@ end # A type check # expr is the expression checked class ITypeCheck -special ICode1 + super ICode1 # The static type checkes to readable var _stype: MMType @@ -474,7 +474,7 @@ end # The 'is' operator # expr1 and expr2 are both operands class IIs -special ICode2 + super ICode2 init(e1, e2: IRegister) do super @@ -486,7 +486,7 @@ end # The unary 'not' operation # expr is the operand class INot -special ICode1 + super ICode1 init(e: IRegister) do super @@ -498,14 +498,14 @@ end # Evaluate body once them return the same value again and again # if result is not null, then it must also be assigned in the body class IOnce -special ICode0 + super ICode0 readable var _body: ISeq = new ISeq init do end end # Is a closure given as a parameter? class IHasClos -special ICode0 + super ICode0 # The called closure readable var _closure_decl: IClosureDecl diff --git a/src/location.nit b/src/location.nit index 3d2a5fd..c6e4dee 100644 --- a/src/location.nit +++ b/src/location.nit @@ -17,7 +17,7 @@ package location class Location -special Comparable + super Comparable redef type OTHER: Location readable var _file: String diff --git a/src/metamodel/abstractmetamodel.nit b/src/metamodel/abstractmetamodel.nit index 4ac84e0..32af390 100644 --- a/src/metamodel/abstractmetamodel.nit +++ b/src/metamodel/abstractmetamodel.nit @@ -106,7 +106,7 @@ class MMDirectory end end -# A module is a NIT package +# A module is a Nit file class MMModule # Global context readable var _context: MMContext @@ -299,8 +299,8 @@ class MMGlobalClass # Is the global class an abstract class? readable writable var _is_abstract: Bool = false - # Is the global class a universal class? - readable writable var _is_universal: Bool = false + # Is the global class a enum class? + readable writable var _is_enum: Bool = false # Visibility of the global class # 1 -> public @@ -649,12 +649,12 @@ end # Attribute local properties class MMAttribute -special MMLocalProperty + super MMLocalProperty end # Method local properties class MMMethod -special MMLocalProperty + super MMLocalProperty # Is the method defined with intern fun is_intern: Bool is abstract @@ -667,6 +667,6 @@ end # Concrete local classes class MMConcreteClass -special MMLocalClass + super MMLocalClass end diff --git a/src/metamodel/genericity.nit b/src/metamodel/genericity.nit index e2d0962..4de61f7 100644 --- a/src/metamodel/genericity.nit +++ b/src/metamodel/genericity.nit @@ -105,7 +105,7 @@ redef class MMTypeSimpleClass end class MMTypeGeneric -special MMTypeClass + super MMTypeClass # Formal arguments readable var _params: Array[MMType] @@ -194,7 +194,7 @@ special MMTypeClass end class MMTypeFormalParameter -special MMTypeFormal + super MMTypeFormal # The class where self is defined readable var _def_class: MMLocalClass diff --git a/src/metamodel/inheritance.nit b/src/metamodel/inheritance.nit index 4d21665..46e6e88 100644 --- a/src/metamodel/inheritance.nit +++ b/src/metamodel/inheritance.nit @@ -469,7 +469,7 @@ end # A local class that is a pure importation of an other local class class MMImplicitLocalClass -special MMLocalClass + super MMLocalClass init(mod: MMModule, g: MMGlobalClass) do var cla = g.intro @@ -479,7 +479,7 @@ special MMLocalClass end class MMRefineAncestor -special MMAncestor + super MMAncestor redef readable var _local_class: MMLocalClass init(b: MMLocalClass, a: MMLocalClass) @@ -492,7 +492,7 @@ end class MMSpecAncestor -special MMAncestor + super MMAncestor redef fun local_class do return stype.local_class init(inheriter: MMType, stype: MMType) @@ -503,7 +503,7 @@ special MMAncestor end class MMDefaultAncestor -special MMAncestor + super MMAncestor redef fun local_class do return stype.local_class init(b: MMLocalClass, anc: MMType) diff --git a/src/metamodel/partial_order.nit b/src/metamodel/partial_order.nit index fd9a8bb..435e3d9 100644 --- a/src/metamodel/partial_order.nit +++ b/src/metamodel/partial_order.nit @@ -20,7 +20,7 @@ package partial_order # Handles partial ordered sets (ie hierarchies) # Thez are built by adding new element at the bottom of the hierarchy class PartialOrder[E: Object] -special Collection[E] + super Collection[E] # Elements var _elements: Map[E, PartialOrderElement[E]] diff --git a/src/metamodel/static_type.nit b/src/metamodel/static_type.nit index 15d735a..fc1f684 100644 --- a/src/metamodel/static_type.nit +++ b/src/metamodel/static_type.nit @@ -379,7 +379,7 @@ abstract class MMType end class MMNullableType -special MMType + super MMType var _base_type: MMType redef fun is_valid do return _base_type.is_valid redef fun is_nullable: Bool do return true @@ -428,7 +428,7 @@ special MMType end class MMTypeClass -special MMType + super MMType redef readable var _local_class: MMLocalClass redef fun mmmodule do return _local_class.mmmodule end redef fun <(t) do return t.is_supertype(self) @@ -454,7 +454,7 @@ special MMType end class MMTypeSimpleClass -special MMTypeClass + super MMTypeClass redef fun is_supertype(t) do return t.local_class.cshe <= _local_class @@ -479,7 +479,7 @@ end # The type of null class MMTypeNone -special MMType + super MMType 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 diff --git a/src/metamodel/type_formal.nit b/src/metamodel/type_formal.nit index e214218..8ab8b8b 100644 --- a/src/metamodel/type_formal.nit +++ b/src/metamodel/type_formal.nit @@ -27,7 +27,7 @@ end # Formal types are named indirect types class MMTypeFormal -special MMType + super MMType redef fun is_valid do return _bound != null and _bound.is_valid # The name of the type diff --git a/src/metamodel/virtualtype.nit b/src/metamodel/virtualtype.nit index 7b09814..527f20e 100644 --- a/src/metamodel/virtualtype.nit +++ b/src/metamodel/virtualtype.nit @@ -27,7 +27,7 @@ end # Virtual type properties class MMTypeProperty -special MMLocalProperty + super MMLocalProperty # The virtual static type associated fun stype_for(recv: MMType): nullable MMVirtualType do @@ -54,7 +54,7 @@ special MMLocalProperty end class MMVirtualType -special MMTypeFormal + super MMTypeFormal # The property associed readable var _property: MMTypeProperty diff --git a/src/mmloader.nit b/src/mmloader.nit index 4b9b578..9a6eeb1 100644 --- a/src/mmloader.nit +++ b/src/mmloader.nit @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This package is used to load a metamodel +# This module is used to load a metamodel package mmloader import metamodel @@ -24,7 +24,7 @@ import opts import location class Message -special Comparable + super Comparable redef type OTHER: Message readable var _location: nullable Location @@ -49,7 +49,7 @@ end # Global context for tools class ToolContext -special MMContext + super MMContext # Number of errors readable var _error_count: Int = 0 diff --git a/src/nitc.nit b/src/nitc.nit index 6754990..1df5d90 100644 --- a/src/nitc.nit +++ b/src/nitc.nit @@ -25,7 +25,7 @@ private import syntax # The main class of the nitcompiler program class NitCompiler -special AbstractCompiler + super AbstractCompiler readable var _opt_output: OptionString = new OptionString("Output file", "-o", "--output") readable var _opt_boost: OptionBool = new OptionBool("Optimize compilation", "-O", "--boost") readable var _opt_no_cc: OptionBool = new OptionBool("Do not invoke C compiler", "--no-cc") diff --git a/src/nitdoc.nit b/src/nitdoc.nit index 3f8978a..437f837 100644 --- a/src/nitdoc.nit +++ b/src/nitdoc.nit @@ -24,7 +24,7 @@ import abstracttool # Store knowledge and facilities to generate files class DocContext -special AbstractCompiler + super AbstractCompiler # Destination directory readable writable var _dir: String = "." @@ -278,7 +278,7 @@ end # Efficiently sort object with their to_s method class AlphaSorter[E: Object] -special AbstractSorter[E] + super AbstractSorter[E] redef fun compare(a, b) do var sa: String @@ -331,7 +331,7 @@ class MMEntity end redef class MMModule -special MMEntity + super MMEntity redef fun html_link(dctx) do if dctx.mmmodule == self then return "{self}" @@ -399,7 +399,7 @@ special MMEntity end redef class MMLocalProperty -special MMEntity + super MMEntity # Anchor of the property description in the module html file fun html_anchor: String do @@ -696,7 +696,7 @@ redef class ADoc end redef class MMLocalClass -special MMEntity + super MMEntity # Anchor of the class description in the module html file fun html_anchor: String do return "CLASS_{self}" diff --git a/src/parser/lexer.nit b/src/parser/lexer.nit index 8726fab..e66dc87 100644 --- a/src/parser/lexer.nit +++ b/src/parser/lexer.nit @@ -106,15 +106,15 @@ redef class TKwinterface end end -redef class TKwuniversal +redef class TKwenum redef fun parser_index: Int do return 7 end - init init_tk(loc: Location) + init init_tk(text: String, loc: Location) do - _text = once "universal" + _text = text _location = loc end end @@ -1200,7 +1200,7 @@ end # The lexer extract NIT tokens from an input stream. # It is better user with the Parser class Lexer -special TablesCapable + super TablesCapable # Last peeked token var _token: nullable Token @@ -1388,7 +1388,8 @@ special TablesCapable return new TKwinterface.init_tk(location) end if accept_token == 8 then - return new TKwuniversal.init_tk(location) + var token_text = text.substring(0, accept_length) + return new TKwenum.init_tk(token_text, location) end if accept_token == 9 then return new TKwspecial.init_tk(location) diff --git a/src/parser/nit.sablecc3xx b/src/parser/nit.sablecc3xx index 9d17d23..88619c5 100644 --- a/src/parser/nit.sablecc3xx +++ b/src/parser/nit.sablecc3xx @@ -62,7 +62,7 @@ kwimport = 'import'; kwclass = 'class'; kwabstract = 'abstract'; kwinterface = 'interface'; -kwuniversal = 'universal'; +kwenum = 'universal'|'enum'; kwspecial = 'special'; kwend = 'end'; kwmeth = 'fun'; @@ -192,7 +192,7 @@ classkind = {concrete} kwclass | {abstract} kwabstract kwclass | {interface} kwinterface - | {universal} kwuniversal + | {enum} kwenum ; formaldefs {-> formaldef*} @@ -605,7 +605,7 @@ classkind = {concrete} kwclass | {abstract} kwabstract kwclass | {interface} kwinterface - | {universal} kwuniversal + | {enum} kwenum ; formaldef = [id]:classid type?; superclass = kwspecial? kwsuper? type; diff --git a/src/parser/parser.nit b/src/parser/parser.nit index 84bf367..5f4bd00 100644 --- a/src/parser/parser.nit +++ b/src/parser/parser.nit @@ -20,7 +20,7 @@ private class State end class Parser -special TablesCapable + super TablesCapable # Associated lexer var _lexer: Lexer @@ -860,7 +860,7 @@ end # Find location of production nodes # Uses existing token locations to infer location of productions. private class ComputeProdLocationVisitor -special Visitor + super Visitor # Currenlty visited productions that need a first token var _need_first_prods: Array[Prod] = new Array[Prod] @@ -956,7 +956,7 @@ private abstract class ReduceAction end private class ReduceAction0 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -974,7 +974,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction1 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -995,7 +995,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction2 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1017,7 +1017,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction3 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1042,7 +1042,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction4 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1064,7 +1064,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction5 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1089,7 +1089,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction6 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1115,7 +1115,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction7 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1144,7 +1144,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction8 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1173,7 +1173,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction9 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1205,7 +1205,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction10 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1238,7 +1238,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction11 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1274,7 +1274,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction12 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1307,7 +1307,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction13 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1343,7 +1343,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction14 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1380,7 +1380,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction15 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1420,7 +1420,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction16 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1444,7 +1444,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction17 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1471,7 +1471,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction18 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1499,7 +1499,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction19 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1530,7 +1530,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction20 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1558,7 +1558,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction21 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1589,7 +1589,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction22 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1621,7 +1621,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction23 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1656,7 +1656,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction24 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1691,7 +1691,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction25 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1729,7 +1729,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction26 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1768,7 +1768,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction27 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1810,7 +1810,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction28 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1849,7 +1849,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction29 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1891,7 +1891,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction30 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1934,7 +1934,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction31 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -1980,7 +1980,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction32 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2007,7 +2007,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction33 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2035,7 +2035,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction34 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2063,7 +2063,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction35 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2084,7 +2084,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction36 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2096,7 +2096,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction37 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2115,7 +2115,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction39 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2154,7 +2154,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction40 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2196,7 +2196,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction41 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2239,7 +2239,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction42 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2285,7 +2285,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction43 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2328,7 +2328,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction44 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2374,7 +2374,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction45 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2421,7 +2421,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction46 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2471,7 +2471,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction47 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2514,7 +2514,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction48 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2560,7 +2560,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction49 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2607,7 +2607,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction50 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2657,7 +2657,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction51 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2704,7 +2704,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction52 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2754,7 +2754,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction53 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2805,7 +2805,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction54 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2859,7 +2859,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction55 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2876,7 +2876,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction56 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2897,7 +2897,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction57 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2914,15 +2914,15 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction58 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null var nodearraylist1 = p.pop - var tkwuniversalnode2 = nodearraylist1 - assert tkwuniversalnode2 isa nullable TKwuniversal - var pclasskindnode1: nullable AUniversalClasskind = new AUniversalClasskind.init_auniversalclasskind( - tkwuniversalnode2 + var tkwenumnode2 = nodearraylist1 + assert tkwenumnode2 isa nullable TKwenum + var pclasskindnode1: nullable AEnumClasskind = new AEnumClasskind.init_aenumclasskind( + tkwenumnode2 ) node_list = pclasskindnode1 p.push(p.go_to(_goto), node_list) @@ -2931,7 +2931,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction59 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2952,7 +2952,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction60 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2977,7 +2977,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction61 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -2992,7 +2992,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction62 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3010,7 +3010,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction63 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3031,7 +3031,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction64 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3055,7 +3055,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction65 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3079,7 +3079,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction66 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3093,7 +3093,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction67 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3132,7 +3132,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction68 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3174,7 +3174,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction69 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3214,7 +3214,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction70 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3257,7 +3257,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction71 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3297,7 +3297,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction72 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3340,7 +3340,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction73 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3376,7 +3376,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction74 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3415,7 +3415,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction75 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3451,7 +3451,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction76 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3490,7 +3490,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction77 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3527,7 +3527,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction78 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3567,7 +3567,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction79 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3607,7 +3607,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction80 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3650,7 +3650,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction81 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3685,7 +3685,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction82 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3723,7 +3723,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction83 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3761,7 +3761,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction84 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3802,7 +3802,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction85 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3840,7 +3840,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction86 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3881,7 +3881,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction87 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3922,7 +3922,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction88 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -3966,7 +3966,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction89 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4004,7 +4004,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction90 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4045,7 +4045,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction91 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4086,7 +4086,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction92 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4130,7 +4130,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction93 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4171,7 +4171,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction94 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4215,7 +4215,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction95 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4259,7 +4259,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction96 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4306,7 +4306,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction97 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4346,7 +4346,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction98 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4389,7 +4389,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction99 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4432,7 +4432,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction100 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4478,7 +4478,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction101 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4521,7 +4521,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction102 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4567,7 +4567,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction103 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4613,7 +4613,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction104 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4662,7 +4662,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction105 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4705,7 +4705,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction106 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4751,7 +4751,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction107 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4797,7 +4797,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction108 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4846,7 +4846,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction109 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4892,7 +4892,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction110 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4941,7 +4941,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction111 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -4990,7 +4990,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction112 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5042,7 +5042,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction113 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5077,7 +5077,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction114 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5115,7 +5115,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction115 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5153,7 +5153,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction116 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5194,7 +5194,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction117 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5232,7 +5232,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction118 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5273,7 +5273,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction119 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5314,7 +5314,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction120 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5358,7 +5358,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction121 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5398,7 +5398,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction122 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5441,7 +5441,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction123 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5484,7 +5484,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction124 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5530,7 +5530,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction125 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5573,7 +5573,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction126 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5619,7 +5619,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction127 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5665,7 +5665,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction128 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5714,7 +5714,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction129 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5750,7 +5750,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction130 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5789,7 +5789,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction131 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5828,7 +5828,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction132 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5870,7 +5870,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction133 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5907,7 +5907,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction134 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5947,7 +5947,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction135 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -5987,7 +5987,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction136 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6030,7 +6030,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction137 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6064,7 +6064,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction138 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6101,7 +6101,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction139 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6119,7 +6119,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction140 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6140,7 +6140,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction141 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6159,7 +6159,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction142 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6181,7 +6181,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction143 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6203,7 +6203,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction144 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6228,7 +6228,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction145 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6241,7 +6241,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction146 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6259,7 +6259,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction147 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6277,7 +6277,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction148 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6295,7 +6295,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction149 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6312,7 +6312,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction150 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6329,7 +6329,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction151 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6346,7 +6346,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction152 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6363,7 +6363,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction153 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6380,7 +6380,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction154 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6397,7 +6397,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction155 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6414,7 +6414,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction156 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6431,7 +6431,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction157 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6448,7 +6448,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction158 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6465,7 +6465,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction159 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6482,7 +6482,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction160 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6499,7 +6499,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction161 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6516,7 +6516,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction162 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6533,7 +6533,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction163 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6554,7 +6554,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction164 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6571,7 +6571,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction165 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6592,7 +6592,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction166 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6617,7 +6617,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction167 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6642,7 +6642,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction168 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6671,7 +6671,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction169 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6693,7 +6693,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction170 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6719,7 +6719,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction171 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6741,7 +6741,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction172 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6767,7 +6767,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction173 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6786,7 +6786,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction174 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6809,7 +6809,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction175 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6827,7 +6827,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction176 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6849,7 +6849,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction177 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6870,7 +6870,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction178 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6895,7 +6895,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction179 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6916,7 +6916,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction180 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6941,7 +6941,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction181 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6956,7 +6956,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction182 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6971,7 +6971,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction183 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -6990,7 +6990,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction184 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7012,7 +7012,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction185 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7037,7 +7037,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction186 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7054,7 +7054,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction187 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7082,7 +7082,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction188 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7113,7 +7113,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction189 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7145,7 +7145,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction190 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7180,7 +7180,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction191 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7213,7 +7213,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction192 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7249,7 +7249,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction193 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7267,7 +7267,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction194 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7287,7 +7287,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction195 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7310,7 +7310,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction196 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7338,7 +7338,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction197 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7369,7 +7369,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction198 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7386,7 +7386,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction199 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7407,7 +7407,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction200 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7422,7 +7422,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction202 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7437,7 +7437,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction203 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7454,7 +7454,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction204 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7470,7 +7470,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction205 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7483,7 +7483,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction206 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7504,7 +7504,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction207 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7529,7 +7529,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction208 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7551,7 +7551,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction209 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7577,7 +7577,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction210 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7591,7 +7591,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction213 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7609,7 +7609,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction214 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7630,7 +7630,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction215 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7649,7 +7649,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction216 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7671,7 +7671,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction217 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7693,7 +7693,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction218 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7718,7 +7718,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction219 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7735,7 +7735,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction220 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7754,7 +7754,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction221 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7776,7 +7776,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction222 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7798,7 +7798,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction223 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7823,7 +7823,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction230 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7854,7 +7854,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction231 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7882,7 +7882,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction232 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7917,7 +7917,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction233 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7949,7 +7949,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction234 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -7973,7 +7973,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction235 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8000,7 +8000,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction236 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8029,7 +8029,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction237 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8055,7 +8055,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction238 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8076,7 +8076,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction239 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8093,7 +8093,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction240 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8114,7 +8114,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction241 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8149,7 +8149,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction242 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8188,7 +8188,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction243 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8220,7 +8220,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction244 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8256,7 +8256,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction245 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8287,7 +8287,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction246 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8322,7 +8322,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction247 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8355,7 +8355,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction248 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8392,7 +8392,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction249 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8422,7 +8422,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction250 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8456,7 +8456,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction251 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8473,7 +8473,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction252 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8490,7 +8490,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction253 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8509,7 +8509,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction254 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8533,7 +8533,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction255 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8560,7 +8560,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction256 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8591,7 +8591,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction257 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8625,7 +8625,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction258 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8656,7 +8656,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction259 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8684,7 +8684,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction260 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8721,7 +8721,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction261 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8755,7 +8755,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction262 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8786,7 +8786,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction263 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8817,7 +8817,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction264 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8845,7 +8845,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction265 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8882,7 +8882,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction266 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8916,7 +8916,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction267 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8947,7 +8947,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction268 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8964,7 +8964,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction269 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -8981,7 +8981,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction270 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9006,7 +9006,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction271 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9028,7 +9028,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction272 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9061,7 +9061,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction273 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9090,7 +9090,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction274 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9123,7 +9123,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction275 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9152,7 +9152,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction276 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9182,7 +9182,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction279 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9207,7 +9207,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction280 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9229,7 +9229,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction281 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9264,7 +9264,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction282 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9296,7 +9296,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction283 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9338,7 +9338,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction284 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9377,7 +9377,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction285 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9404,7 +9404,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction286 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9434,7 +9434,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction287 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9457,7 +9457,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction288 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9483,7 +9483,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction289 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9497,7 +9497,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction293 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9526,7 +9526,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction295 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9568,7 +9568,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction297 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9591,7 +9591,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction298 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9614,7 +9614,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction299 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9638,7 +9638,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction301 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9660,7 +9660,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction303 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9683,7 +9683,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction304 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9706,7 +9706,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction305 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9729,7 +9729,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction306 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9752,7 +9752,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction307 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9775,7 +9775,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction308 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9798,7 +9798,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction309 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9821,7 +9821,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction310 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9844,7 +9844,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction311 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9867,7 +9867,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction312 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9890,7 +9890,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction313 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9913,7 +9913,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction315 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9936,7 +9936,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction316 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9959,7 +9959,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction318 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -9982,7 +9982,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction319 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10005,7 +10005,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction320 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10028,7 +10028,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction322 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10050,7 +10050,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction323 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10072,7 +10072,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction325 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10101,7 +10101,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction326 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10128,7 +10128,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction327 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10152,7 +10152,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction328 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10175,7 +10175,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction329 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10195,7 +10195,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction336 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10220,7 +10220,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction337 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10254,7 +10254,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction338 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10282,7 +10282,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction339 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10310,7 +10310,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction340 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10329,7 +10329,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction341 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10346,7 +10346,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction342 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10363,7 +10363,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction343 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10380,7 +10380,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction344 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10397,7 +10397,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction345 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10414,7 +10414,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction346 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10431,7 +10431,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction347 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10448,7 +10448,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction348 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10465,7 +10465,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction351 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10497,7 +10497,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction352 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10534,7 +10534,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction353 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10559,7 +10559,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction354 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10588,7 +10588,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction355 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10612,7 +10612,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction356 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10629,7 +10629,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction358 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10646,7 +10646,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction359 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10663,7 +10663,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction360 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10684,7 +10684,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction361 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10709,7 +10709,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction363 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10721,7 +10721,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction366 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10738,7 +10738,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction371 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10754,7 +10754,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction372 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10772,7 +10772,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction373 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10788,7 +10788,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction374 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10805,7 +10805,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction375 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10829,7 +10829,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction376 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10848,7 +10848,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction377 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10871,7 +10871,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction378 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10891,7 +10891,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction379 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10906,7 +10906,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction380 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10921,7 +10921,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction381 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10932,7 +10932,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction383 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10951,7 +10951,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction384 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10971,7 +10971,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction386 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10982,7 +10982,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction387 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -10995,7 +10995,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction388 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11007,7 +11007,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction389 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11020,7 +11020,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction637 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11045,7 +11045,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction638 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11066,7 +11066,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction639 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11095,7 +11095,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction642 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11122,7 +11122,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction655 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11137,7 +11137,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction656 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11150,7 +11150,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction663 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11167,7 +11167,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction664 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11188,7 +11188,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction665 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11205,7 +11205,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction666 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11226,7 +11226,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction667 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11243,7 +11243,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction668 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11264,7 +11264,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction669 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11281,7 +11281,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction670 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11302,7 +11302,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction673 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11319,7 +11319,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction674 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11340,7 +11340,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction675 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11357,7 +11357,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction676 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11378,7 +11378,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction677 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11395,7 +11395,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction678 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11416,7 +11416,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction680 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11437,7 +11437,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction682 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11458,7 +11458,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction684 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11478,7 +11478,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction688 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11499,7 +11499,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction689 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11516,7 +11516,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction690 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11537,7 +11537,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction691 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null @@ -11554,7 +11554,7 @@ special ReduceAction init(g: Int) do _goto = g end private class ReduceAction692 -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null diff --git a/src/parser/parser_abs.nit b/src/parser/parser_abs.nit index e152ead..977ddd2 100644 --- a/src/parser/parser_abs.nit +++ b/src/parser/parser_abs.nit @@ -15,354 +15,354 @@ end # Ancestor of all tokens abstract class Token -special ANode + super ANode end # Ancestor of all productions abstract class Prod -special ANode + super ANode fun location=(loc: Location) do _location = loc end class TEol -special Token + super Token end class TComment -special Token + super Token end class TKwmodule -special Token + super Token end class TKwimport -special Token + super Token end class TKwclass -special Token + super Token end class TKwabstract -special Token + super Token end class TKwinterface -special Token + super Token end -class TKwuniversal -special Token +class TKwenum + super Token end class TKwspecial -special Token + super Token end class TKwend -special Token + super Token end class TKwmeth -special Token + super Token end class TKwtype -special Token + super Token end class TKwinit -special Token + super Token end class TKwredef -special Token + super Token end class TKwis -special Token + super Token end class TKwdo -special Token + super Token end class TKwreadable -special Token + super Token end class TKwwritable -special Token + super Token end class TKwvar -special Token + super Token end class TKwintern -special Token + super Token end class TKwextern -special Token + super Token end class TKwprotected -special Token + super Token end class TKwprivate -special Token + super Token end class TKwintrude -special Token + super Token end class TKwif -special Token + super Token end class TKwthen -special Token + super Token end class TKwelse -special Token + super Token end class TKwwhile -special Token + super Token end class TKwloop -special Token + super Token end class TKwfor -special Token + super Token end class TKwin -special Token + super Token end class TKwand -special Token + super Token end class TKwor -special Token + super Token end class TKwnot -special Token + super Token end class TKwreturn -special Token + super Token end class TKwcontinue -special Token + super Token end class TKwbreak -special Token + super Token end class TKwabort -special Token + super Token end class TKwassert -special Token + super Token end class TKwnew -special Token + super Token end class TKwisa -special Token + super Token end class TKwonce -special Token + super Token end class TKwsuper -special Token + super Token end class TKwself -special Token + super Token end class TKwtrue -special Token + super Token end class TKwfalse -special Token + super Token end class TKwnull -special Token + super Token end class TKwas -special Token + super Token end class TKwnullable -special Token + super Token end class TKwisset -special Token + super Token end class TKwlabel -special Token + super Token end class TOpar -special Token + super Token end class TCpar -special Token + super Token end class TObra -special Token + super Token end class TCbra -special Token + super Token end class TComma -special Token + super Token end class TColumn -special Token + super Token end class TQuad -special Token + super Token end class TAssign -special Token + super Token end class TPluseq -special Token + super Token end class TMinuseq -special Token + super Token end class TDotdotdot -special Token + super Token end class TDotdot -special Token + super Token end class TDot -special Token + super Token end class TPlus -special Token + super Token end class TMinus -special Token + super Token end class TStar -special Token + super Token end class TSlash -special Token + super Token end class TPercent -special Token + super Token end class TEq -special Token + super Token end class TNe -special Token + super Token end class TLt -special Token + super Token end class TLe -special Token + super Token end class TLl -special Token + super Token end class TGt -special Token + super Token end class TGe -special Token + super Token end class TGg -special Token + super Token end class TStarship -special Token + super Token end class TBang -special Token + super Token end class TClassid -special Token + super Token end class TId -special Token + super Token end class TAttrid -special Token + super Token end class TNumber -special Token + super Token end class TFloat -special Token + super Token end class TChar -special Token + super Token end class TString -special Token + super Token end class TStartString -special Token + super Token end class TMidString -special Token + super Token end class TEndString -special Token + super Token end class EOF -special Token + super Token private init noinit do end end class AError -special EOF + super EOF private init noinit do end end -class AModule special Prod end -class AModuledecl special Prod end -class AImport special Prod end -class AVisibility special Prod end -class AClassdef special Prod end -class AClasskind special Prod end -class AFormaldef special Prod end -class ASuperclass special Prod end -class APropdef special Prod end -class AAble special Prod end -class AMethid special Prod end -class ASignature special Prod end -class AParam special Prod end -class AClosureDecl special Prod end -class AType special Prod end -class ALabel special Prod end -class AExpr special Prod end -class AAssignOp special Prod end -class AClosureDef special Prod end -class AClosureId special Prod end -class AQualified special Prod end -class ADoc special Prod end +class AModule super Prod end +class AModuledecl super Prod end +class AImport super Prod end +class AVisibility super Prod end +class AClassdef super Prod end +class AClasskind super Prod end +class AFormaldef super Prod end +class ASuperclass super Prod end +class APropdef super Prod end +class AAble super Prod end +class AMethid super Prod end +class ASignature super Prod end +class AParam super Prod end +class AClosureDecl super Prod end +class AType super Prod end +class ALabel super Prod end +class AExpr super Prod end +class AAssignOp super Prod end +class AClosureDef super Prod end +class AClosureId super Prod end +class AQualified super Prod end +class ADoc super Prod end class AModule -special AModule + super AModule 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 AModuledecl -special AModuledecl + super AModuledecl readable var _n_doc: nullable ADoc = null readable var _n_kwmodule: TKwmodule readable var _n_id: TId end class AStdImport -special AImport + super AImport readable var _n_visibility: AVisibility readable var _n_kwimport: TKwimport readable var _n_id: TId end class ANoImport -special AImport + super AImport readable var _n_visibility: AVisibility readable var _n_kwimport: TKwimport readable var _n_kwend: TKwend end class APublicVisibility -special AVisibility + super AVisibility end class APrivateVisibility -special AVisibility + super AVisibility readable var _n_kwprivate: TKwprivate end class AProtectedVisibility -special AVisibility + super AVisibility readable var _n_kwprotected: TKwprotected end class AIntrudeVisibility -special AVisibility + super AVisibility readable var _n_kwintrude: TKwintrude end class AStdClassdef -special AClassdef + super AClassdef readable var _n_doc: nullable ADoc = null readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: AVisibility @@ -373,43 +373,43 @@ special AClassdef readable var _n_propdefs: List[APropdef] = new List[APropdef] end class ATopClassdef -special AClassdef + super AClassdef readable var _n_propdefs: List[APropdef] = new List[APropdef] end class AMainClassdef -special AClassdef + super AClassdef readable var _n_propdefs: List[APropdef] = new List[APropdef] end class AConcreteClasskind -special AClasskind + super AClasskind readable var _n_kwclass: TKwclass end class AAbstractClasskind -special AClasskind + super AClasskind readable var _n_kwabstract: TKwabstract readable var _n_kwclass: TKwclass end class AInterfaceClasskind -special AClasskind + super AClasskind readable var _n_kwinterface: TKwinterface end -class AUniversalClasskind -special AClasskind - readable var _n_kwuniversal: TKwuniversal +class AEnumClasskind + super AClasskind + readable var _n_kwenum: TKwenum end class AFormaldef -special AFormaldef + super AFormaldef readable var _n_id: TClassid readable var _n_type: nullable AType = null end class ASuperclass -special ASuperclass + super ASuperclass readable var _n_kwspecial: nullable TKwspecial = null readable var _n_kwsuper: nullable TKwsuper = null readable var _n_type: AType end class AAttrPropdef -special APropdef + super APropdef readable var _n_doc: nullable ADoc = null readable var _n_readable: nullable AAble = null readable var _n_writable: nullable AAble = null @@ -422,7 +422,7 @@ special APropdef readable var _n_expr: nullable AExpr = null end class AMethPropdef -special APropdef + super APropdef readable var _n_doc: nullable ADoc = null readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: AVisibility @@ -430,7 +430,7 @@ special APropdef readable var _n_signature: ASignature end class ADeferredMethPropdef -special APropdef + super APropdef readable var _n_doc: nullable ADoc = null readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: AVisibility @@ -439,7 +439,7 @@ special APropdef readable var _n_signature: ASignature end class AInternMethPropdef -special APropdef + super APropdef readable var _n_doc: nullable ADoc = null readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: AVisibility @@ -448,7 +448,7 @@ special APropdef readable var _n_signature: ASignature end class AExternMethPropdef -special APropdef + super APropdef readable var _n_doc: nullable ADoc = null readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: AVisibility @@ -458,7 +458,7 @@ special APropdef readable var _n_extern: nullable TString = null end class AConcreteMethPropdef -special APropdef + super APropdef readable var _n_doc: nullable ADoc = null readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: AVisibility @@ -468,7 +468,7 @@ special APropdef readable var _n_block: nullable AExpr = null end class AConcreteInitPropdef -special APropdef + super APropdef readable var _n_doc: nullable ADoc = null readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: AVisibility @@ -478,12 +478,12 @@ special APropdef readable var _n_block: nullable AExpr = null end class AMainMethPropdef -special APropdef + super APropdef readable var _n_kwredef: nullable TKwredef = null readable var _n_block: nullable AExpr = null end class ATypePropdef -special APropdef + super APropdef readable var _n_doc: nullable ADoc = null readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: AVisibility @@ -492,106 +492,106 @@ special APropdef readable var _n_type: AType end class AReadAble -special AAble + super AAble readable var _n_kwredef: nullable TKwredef = null readable var _n_kwreadable: TKwreadable end class AWriteAble -special AAble + super AAble readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: nullable AVisibility = null readable var _n_kwwritable: TKwwritable end class AIdMethid -special AMethid + super AMethid readable var _n_id: TId end class APlusMethid -special AMethid + super AMethid readable var _n_plus: TPlus end class AMinusMethid -special AMethid + super AMethid readable var _n_minus: TMinus end class AStarMethid -special AMethid + super AMethid readable var _n_star: TStar end class ASlashMethid -special AMethid + super AMethid readable var _n_slash: TSlash end class APercentMethid -special AMethid + super AMethid readable var _n_percent: TPercent end class AEqMethid -special AMethid + super AMethid readable var _n_eq: TEq end class ANeMethid -special AMethid + super AMethid readable var _n_ne: TNe end class ALeMethid -special AMethid + super AMethid readable var _n_le: TLe end class AGeMethid -special AMethid + super AMethid readable var _n_ge: TGe end class ALtMethid -special AMethid + super AMethid readable var _n_lt: TLt end class AGtMethid -special AMethid + super AMethid readable var _n_gt: TGt end class ALlMethid -special AMethid + super AMethid readable var _n_ll: TLl end class AGgMethid -special AMethid + super AMethid readable var _n_gg: TGg end class ABraMethid -special AMethid + super AMethid readable var _n_obra: TObra readable var _n_cbra: TCbra end class AStarshipMethid -special AMethid + super AMethid readable var _n_starship: TStarship end class AAssignMethid -special AMethid + super AMethid readable var _n_id: TId readable var _n_assign: TAssign end class ABraassignMethid -special AMethid + super AMethid readable var _n_obra: TObra readable var _n_cbra: TCbra readable var _n_assign: TAssign end class ASignature -special ASignature + super ASignature readable var _n_params: List[AParam] = new List[AParam] readable var _n_type: nullable AType = null readable var _n_closure_decls: List[AClosureDecl] = new List[AClosureDecl] end class AParam -special AParam + super AParam readable var _n_id: TId readable var _n_type: nullable AType = null readable var _n_dotdotdot: nullable TDotdotdot = null end class AClosureDecl -special AClosureDecl + super AClosureDecl readable var _n_kwbreak: nullable TKwbreak = null readable var _n_bang: TBang readable var _n_id: TId @@ -599,22 +599,22 @@ special AClosureDecl readable var _n_expr: nullable AExpr = null end class AType -special AType + super AType readable var _n_kwnullable: nullable TKwnullable = null readable var _n_id: TClassid readable var _n_types: List[AType] = new List[AType] end class ALabel -special ALabel + super ALabel readable var _n_kwlabel: TKwlabel readable var _n_id: TId end class ABlockExpr -special AExpr + super AExpr readable var _n_expr: List[AExpr] = new List[AExpr] end class AVardeclExpr -special AExpr + super AExpr readable var _n_kwvar: TKwvar readable var _n_id: TId readable var _n_type: nullable AType = null @@ -622,41 +622,41 @@ special AExpr readable var _n_expr: nullable AExpr = null end class AReturnExpr -special AExpr + super AExpr readable var _n_kwreturn: nullable TKwreturn = null readable var _n_expr: nullable AExpr = null end class ABreakExpr -special AExpr + super AExpr readable var _n_kwbreak: TKwbreak readable var _n_label: nullable ALabel = null readable var _n_expr: nullable AExpr = null end class AAbortExpr -special AExpr + super AExpr readable var _n_kwabort: TKwabort end class AContinueExpr -special AExpr + super AExpr readable var _n_kwcontinue: nullable TKwcontinue = null readable var _n_label: nullable ALabel = null readable var _n_expr: nullable AExpr = null end class ADoExpr -special AExpr + super AExpr readable var _n_kwdo: TKwdo readable var _n_block: nullable AExpr = null readable var _n_label: nullable ALabel = null end class AIfExpr -special AExpr + super AExpr readable var _n_kwif: TKwif readable var _n_expr: AExpr readable var _n_then: nullable AExpr = null readable var _n_else: nullable AExpr = null end class AIfexprExpr -special AExpr + super AExpr readable var _n_kwif: TKwif readable var _n_expr: AExpr readable var _n_kwthen: TKwthen @@ -665,7 +665,7 @@ special AExpr readable var _n_else: AExpr end class AWhileExpr -special AExpr + super AExpr readable var _n_kwwhile: TKwwhile readable var _n_expr: AExpr readable var _n_kwdo: TKwdo @@ -673,13 +673,13 @@ special AExpr readable var _n_label: nullable ALabel = null end class ALoopExpr -special AExpr + super AExpr readable var _n_kwloop: TKwloop readable var _n_block: nullable AExpr = null readable var _n_label: nullable ALabel = null end class AForExpr -special AExpr + super AExpr readable var _n_kwfor: TKwfor readable var _n_id: TId readable var _n_expr: AExpr @@ -688,166 +688,166 @@ special AExpr readable var _n_label: nullable ALabel = null end class AAssertExpr -special AExpr + super AExpr readable var _n_kwassert: TKwassert readable var _n_id: nullable TId = null readable var _n_expr: AExpr readable var _n_else: nullable AExpr = null end class AOnceExpr -special AExpr + super AExpr readable var _n_kwonce: TKwonce readable var _n_expr: AExpr end class ASendExpr -special AExpr + super AExpr readable var _n_expr: AExpr end class ABinopExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AOrExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AAndExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AOrElseExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class ANotExpr -special AExpr + super AExpr readable var _n_kwnot: TKwnot readable var _n_expr: AExpr end class AEqExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AEeExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class ANeExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class ALtExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class ALeExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class ALlExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AGtExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AGeExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AGgExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AIsaExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_type: AType end class APlusExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AMinusExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AStarshipExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AStarExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class ASlashExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class APercentExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AUminusExpr -special AExpr + super AExpr readable var _n_minus: TMinus readable var _n_expr: AExpr end class ANewExpr -special AExpr + super AExpr readable var _n_kwnew: TKwnew readable var _n_type: AType readable var _n_id: nullable TId = null readable var _n_args: List[AExpr] = new List[AExpr] end class AAttrExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_id: TAttrid end class AAttrAssignExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_id: TAttrid readable var _n_assign: TAssign readable var _n_value: AExpr end class AAttrReassignExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_id: TAttrid readable var _n_assign_op: AAssignOp readable var _n_value: AExpr end class ACallExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_id: TId readable var _n_args: List[AExpr] = new List[AExpr] readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef] end class ACallAssignExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_id: TId readable var _n_args: List[AExpr] = new List[AExpr] @@ -855,7 +855,7 @@ special AExpr readable var _n_value: AExpr end class ACallReassignExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_id: TId readable var _n_args: List[AExpr] = new List[AExpr] @@ -863,162 +863,162 @@ special AExpr readable var _n_value: AExpr end class ASuperExpr -special AExpr + super AExpr readable var _n_qualified: nullable AQualified = null readable var _n_kwsuper: TKwsuper readable var _n_args: List[AExpr] = new List[AExpr] end class AInitExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_kwinit: TKwinit readable var _n_args: List[AExpr] = new List[AExpr] end class ABraExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_args: List[AExpr] = new List[AExpr] readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef] end class ABraAssignExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_args: List[AExpr] = new List[AExpr] readable var _n_assign: TAssign readable var _n_value: AExpr end class ABraReassignExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_args: List[AExpr] = new List[AExpr] readable var _n_assign_op: AAssignOp readable var _n_value: AExpr end class AClosureCallExpr -special AExpr + super AExpr readable var _n_id: TId readable var _n_args: List[AExpr] = new List[AExpr] readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef] end class AVarExpr -special AExpr + super AExpr readable var _n_id: TId end class AVarAssignExpr -special AExpr + super AExpr readable var _n_id: TId readable var _n_assign: TAssign readable var _n_value: AExpr end class AVarReassignExpr -special AExpr + super AExpr readable var _n_id: TId readable var _n_assign_op: AAssignOp readable var _n_value: AExpr end class ARangeExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class ACrangeExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AOrangeExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AArrayExpr -special AExpr + super AExpr readable var _n_exprs: List[AExpr] = new List[AExpr] end class ASelfExpr -special AExpr + super AExpr readable var _n_kwself: TKwself end class AImplicitSelfExpr -special AExpr + super AExpr end class ATrueExpr -special AExpr + super AExpr readable var _n_kwtrue: TKwtrue end class AFalseExpr -special AExpr + super AExpr readable var _n_kwfalse: TKwfalse end class ANullExpr -special AExpr + super AExpr readable var _n_kwnull: TKwnull end class AIntExpr -special AExpr + super AExpr readable var _n_number: TNumber end class AFloatExpr -special AExpr + super AExpr readable var _n_float: TFloat end class ACharExpr -special AExpr + super AExpr readable var _n_char: TChar end class AStringExpr -special AExpr + super AExpr readable var _n_string: TString end class AStartStringExpr -special AExpr + super AExpr readable var _n_string: TStartString end class AMidStringExpr -special AExpr + super AExpr readable var _n_string: TMidString end class AEndStringExpr -special AExpr + super AExpr readable var _n_string: TEndString end class ASuperstringExpr -special AExpr + super AExpr readable var _n_exprs: List[AExpr] = new List[AExpr] end class AParExpr -special AExpr + super AExpr readable var _n_expr: AExpr end class AAsCastExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_kwas: TKwas readable var _n_type: AType end class AAsNotnullExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_kwas: TKwas readable var _n_kwnot: TKwnot readable var _n_kwnull: TKwnull end class AIssetAttrExpr -special AExpr + super AExpr readable var _n_kwisset: TKwisset readable var _n_expr: AExpr readable var _n_id: TAttrid end class APlusAssignOp -special AAssignOp + super AAssignOp readable var _n_pluseq: TPluseq end class AMinusAssignOp -special AAssignOp + super AAssignOp readable var _n_minuseq: TMinuseq end class AClosureDef -special AClosureDef + super AClosureDef readable var _n_bang: TBang readable var _n_id: AClosureId readable var _n_ids: List[TId] = new List[TId] @@ -1027,25 +1027,25 @@ special AClosureDef readable var _n_label: nullable ALabel = null end class ASimpleClosureId -special AClosureId + super AClosureId readable var _n_id: TId end class ABreakClosureId -special AClosureId + super AClosureId readable var _n_kwbreak: TKwbreak end class AQualified -special AQualified + super AQualified readable var _n_id: List[TId] = new List[TId] readable var _n_classid: nullable TClassid = null end class ADoc -special ADoc + super ADoc readable var _n_comment: List[TComment] = new List[TComment] end class Start -special Prod + super Prod readable var _n_base: nullable AModule readable var _n_eof: EOF end diff --git a/src/parser/parser_nodes.nit b/src/parser/parser_nodes.nit index b5975c4..7bc6b4a 100644 --- a/src/parser/parser_nodes.nit +++ b/src/parser/parser_nodes.nit @@ -31,334 +31,334 @@ end # Ancestor of all tokens abstract class Token -special ANode + super ANode end # Ancestor of all productions abstract class Prod -special ANode + super ANode fun location=(l: Location) do _location = l end class TEol -special Token + super Token end class TComment -special Token + super Token end class TKwmodule -special Token + super Token end class TKwimport -special Token + super Token end class TKwclass -special Token + super Token end class TKwabstract -special Token + super Token end class TKwinterface -special Token + super Token end -class TKwuniversal -special Token +class TKwenum + super Token end class TKwspecial -special Token + super Token end class TKwend -special Token + super Token end class TKwmeth -special Token + super Token end class TKwtype -special Token + super Token end class TKwinit -special Token + super Token end class TKwredef -special Token + super Token end class TKwis -special Token + super Token end class TKwdo -special Token + super Token end class TKwreadable -special Token + super Token end class TKwwritable -special Token + super Token end class TKwvar -special Token + super Token end class TKwintern -special Token + super Token end class TKwextern -special Token + super Token end class TKwprotected -special Token + super Token end class TKwprivate -special Token + super Token end class TKwintrude -special Token + super Token end class TKwif -special Token + super Token end class TKwthen -special Token + super Token end class TKwelse -special Token + super Token end class TKwwhile -special Token + super Token end class TKwloop -special Token + super Token end class TKwfor -special Token + super Token end class TKwin -special Token + super Token end class TKwand -special Token + super Token end class TKwor -special Token + super Token end class TKwnot -special Token + super Token end class TKwreturn -special Token + super Token end class TKwcontinue -special Token + super Token end class TKwbreak -special Token + super Token end class TKwabort -special Token + super Token end class TKwassert -special Token + super Token end class TKwnew -special Token + super Token end class TKwisa -special Token + super Token end class TKwonce -special Token + super Token end class TKwsuper -special Token + super Token end class TKwself -special Token + super Token end class TKwtrue -special Token + super Token end class TKwfalse -special Token + super Token end class TKwnull -special Token + super Token end class TKwas -special Token + super Token end class TKwnullable -special Token + super Token end class TKwisset -special Token + super Token end class TKwlabel -special Token + super Token end class TOpar -special Token + super Token end class TCpar -special Token + super Token end class TObra -special Token + super Token end class TCbra -special Token + super Token end class TComma -special Token + super Token end class TColumn -special Token + super Token end class TQuad -special Token + super Token end class TAssign -special Token + super Token end class TPluseq -special Token + super Token end class TMinuseq -special Token + super Token end class TDotdotdot -special Token + super Token end class TDotdot -special Token + super Token end class TDot -special Token + super Token end class TPlus -special Token + super Token end class TMinus -special Token + super Token end class TStar -special Token + super Token end class TSlash -special Token + super Token end class TPercent -special Token + super Token end class TEq -special Token + super Token end class TNe -special Token + super Token end class TLt -special Token + super Token end class TLe -special Token + super Token end class TLl -special Token + super Token end class TGt -special Token + super Token end class TGe -special Token + super Token end class TGg -special Token + super Token end class TStarship -special Token + super Token end class TBang -special Token + super Token end class TClassid -special Token + super Token end class TId -special Token + super Token end class TAttrid -special Token + super Token end class TNumber -special Token + super Token end class TFloat -special Token + super Token end class TChar -special Token + super Token end class TString -special Token + super Token end class TStartString -special Token + super Token end class TMidString -special Token + super Token end class TEndString -special Token + super Token end class EOF -special Token + super Token private init noinit do end end class AError -special EOF + super EOF private init noinit do end end class AModule -special Prod + super Prod 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 AModuledecl -special Prod + super Prod readable var _n_doc: nullable ADoc = null readable var _n_kwmodule: TKwmodule readable var _n_id: TId end -class AImport special Prod end +class AImport super Prod end class AStdImport -special AImport + super AImport readable var _n_visibility: AVisibility readable var _n_kwimport: TKwimport readable var _n_id: TId end class ANoImport -special AImport + super AImport readable var _n_visibility: AVisibility readable var _n_kwimport: TKwimport readable var _n_kwend: TKwend end -class AVisibility special Prod end +class AVisibility super Prod end class APublicVisibility -special AVisibility + super AVisibility end class APrivateVisibility -special AVisibility + super AVisibility readable var _n_kwprivate: TKwprivate end class AProtectedVisibility -special AVisibility + super AVisibility readable var _n_kwprotected: TKwprotected end class AIntrudeVisibility -special AVisibility + super AVisibility readable var _n_kwintrude: TKwintrude end -class AClassdef special Prod end +class AClassdef super Prod end class AStdClassdef -special AClassdef + super AClassdef readable var _n_doc: nullable ADoc = null readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: AVisibility @@ -369,47 +369,47 @@ special AClassdef readable var _n_propdefs: List[APropdef] = new List[APropdef] end class ATopClassdef -special AClassdef + super AClassdef readable var _n_propdefs: List[APropdef] = new List[APropdef] end class AMainClassdef -special AClassdef + super AClassdef readable var _n_propdefs: List[APropdef] = new List[APropdef] end -class AClasskind special Prod end +class AClasskind super Prod end class AConcreteClasskind -special AClasskind + super AClasskind readable var _n_kwclass: TKwclass end class AAbstractClasskind -special AClasskind + super AClasskind readable var _n_kwabstract: TKwabstract readable var _n_kwclass: TKwclass end class AInterfaceClasskind -special AClasskind + super AClasskind readable var _n_kwinterface: TKwinterface end -class AUniversalClasskind -special AClasskind - readable var _n_kwuniversal: TKwuniversal +class AEnumClasskind + super AClasskind + readable var _n_kwenum: TKwenum end class AFormaldef -special Prod + super Prod readable var _n_id: TClassid readable var _n_type: nullable AType = null end class ASuperclass -special Prod + super Prod readable var _n_kwspecial: nullable TKwspecial = null readable var _n_kwsuper: nullable TKwsuper = null readable var _n_type: AType end -class APropdef special Prod +class APropdef super Prod readable var _n_doc: nullable ADoc = null end class AAttrPropdef -special APropdef + super APropdef readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: AVisibility readable var _n_kwvar: TKwvar @@ -421,148 +421,148 @@ special APropdef readable var _n_expr: nullable AExpr = null end class AMethPropdef -special APropdef + super APropdef readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: nullable AVisibility readable var _n_methid: nullable AMethid = null readable var _n_signature: nullable ASignature end class ADeferredMethPropdef -special AMethPropdef + super AMethPropdef readable var _n_kwmeth: TKwmeth end class AInternMethPropdef -special AMethPropdef + super AMethPropdef readable var _n_kwmeth: TKwmeth end class AExternMethPropdef -special AMethPropdef + super AMethPropdef readable var _n_kwmeth: TKwmeth readable var _n_extern: nullable TString = null end class AConcreteMethPropdef -special AMethPropdef + super AMethPropdef readable var _n_kwmeth: nullable TKwmeth readable var _n_block: nullable AExpr = null end class AConcreteInitPropdef -special AConcreteMethPropdef + super AConcreteMethPropdef readable var _n_kwinit: TKwinit end class AMainMethPropdef -special AConcreteMethPropdef + super AConcreteMethPropdef end class ATypePropdef -special APropdef + super APropdef readable var _n_kwredef: nullable TKwredef = null readable var _n_visibility: AVisibility readable var _n_kwtype: TKwtype readable var _n_id: TClassid readable var _n_type: AType end -class AAble special Prod +class AAble super Prod readable var _n_visibility: nullable AVisibility = null readable var _n_kwredef: nullable TKwredef = null end class AReadAble -special AAble + super AAble readable var _n_kwreadable: TKwreadable end class AWriteAble -special AAble + super AAble readable var _n_kwwritable: TKwwritable end -class AMethid special Prod end +class AMethid super Prod end class AIdMethid -special AMethid + super AMethid readable var _n_id: TId end class APlusMethid -special AMethid + super AMethid readable var _n_plus: TPlus end class AMinusMethid -special AMethid + super AMethid readable var _n_minus: TMinus end class AStarMethid -special AMethid + super AMethid readable var _n_star: TStar end class ASlashMethid -special AMethid + super AMethid readable var _n_slash: TSlash end class APercentMethid -special AMethid + super AMethid readable var _n_percent: TPercent end class AEqMethid -special AMethid + super AMethid readable var _n_eq: TEq end class ANeMethid -special AMethid + super AMethid readable var _n_ne: TNe end class ALeMethid -special AMethid + super AMethid readable var _n_le: TLe end class AGeMethid -special AMethid + super AMethid readable var _n_ge: TGe end class ALtMethid -special AMethid + super AMethid readable var _n_lt: TLt end class AGtMethid -special AMethid + super AMethid readable var _n_gt: TGt end class ALlMethid -special AMethid + super AMethid readable writable var _n_ll: TLl end class AGgMethid -special AMethid + super AMethid readable writable var _n_gg: TGg end class ABraMethid -special AMethid + super AMethid readable var _n_obra: TObra readable var _n_cbra: TCbra end class AStarshipMethid -special AMethid + super AMethid readable var _n_starship: TStarship end class AAssignMethid -special AMethid + super AMethid readable var _n_id: TId readable var _n_assign: TAssign end class ABraassignMethid -special AMethid + super AMethid readable var _n_obra: TObra readable var _n_cbra: TCbra readable var _n_assign: TAssign end class ASignature -special Prod + super Prod readable var _n_params: List[AParam] = new List[AParam] readable var _n_type: nullable AType = null readable var _n_closure_decls: List[AClosureDecl] = new List[AClosureDecl] end class AParam -special Prod + super Prod readable var _n_id: TId readable var _n_type: nullable AType = null readable var _n_dotdotdot: nullable TDotdotdot = null end class AClosureDecl -special Prod + super Prod readable var _n_kwbreak: nullable TKwbreak = null readable var _n_bang: TBang readable var _n_id: TId @@ -570,23 +570,23 @@ special Prod readable var _n_expr: nullable AExpr = null end class AType -special Prod + super Prod readable var _n_kwnullable: nullable TKwnullable = null readable var _n_id: TClassid readable var _n_types: List[AType] = new List[AType] end class ALabel -special Prod + super Prod readable var _n_kwlabel: TKwlabel readable var _n_id: TId end -class AExpr special Prod end +class AExpr super Prod end class ABlockExpr -special AExpr + super AExpr readable var _n_expr: List[AExpr] = new List[AExpr] end class AVardeclExpr -special AExpr + super AExpr readable var _n_kwvar: TKwvar readable var _n_id: TId readable var _n_type: nullable AType = null @@ -594,45 +594,45 @@ special AExpr readable var _n_expr: nullable AExpr = null end class AReturnExpr -special AExpr + super AExpr readable var _n_kwreturn: nullable TKwreturn = null readable var _n_expr: nullable AExpr = null end class ALabelable -special Prod + super Prod readable var _n_label: nullable ALabel = null end class ABreakExpr -special AExpr -special ALabelable + super AExpr + super ALabelable readable var _n_kwbreak: TKwbreak readable var _n_expr: nullable AExpr = null end class AAbortExpr -special AExpr + super AExpr readable var _n_kwabort: TKwabort end class AContinueExpr -special AExpr -special ALabelable + super AExpr + super ALabelable readable var _n_kwcontinue: nullable TKwcontinue = null readable var _n_expr: nullable AExpr = null end class ADoExpr -special AExpr -special ALabelable + super AExpr + super ALabelable readable var _n_kwdo: TKwdo readable var _n_block: nullable AExpr = null end class AIfExpr -special AExpr + super AExpr readable var _n_kwif: TKwif readable var _n_expr: AExpr readable var _n_then: nullable AExpr = null readable var _n_else: nullable AExpr = null end class AIfexprExpr -special AExpr + super AExpr readable var _n_kwif: TKwif readable var _n_expr: AExpr readable var _n_kwthen: TKwthen @@ -641,22 +641,22 @@ special AExpr readable var _n_else: AExpr end class AWhileExpr -special AExpr -special ALabelable + super AExpr + super ALabelable readable var _n_kwwhile: TKwwhile readable var _n_expr: AExpr readable var _n_kwdo: TKwdo readable var _n_block: nullable AExpr = null end class ALoopExpr -special AExpr -special ALabelable + super AExpr + super ALabelable readable var _n_kwloop: TKwloop readable var _n_block: nullable AExpr = null end class AForExpr -special AExpr -special ALabelable + super AExpr + super ALabelable readable var _n_kwfor: TKwfor readable var _n_id: TId readable var _n_expr: AExpr @@ -664,306 +664,306 @@ special ALabelable readable var _n_block: nullable AExpr = null end class AAssertExpr -special AExpr + super AExpr readable var _n_kwassert: TKwassert readable var _n_id: nullable TId = null readable var _n_expr: AExpr readable var _n_else: nullable AExpr = null end class AAssignFormExpr -special AExpr + super AExpr readable var _n_assign: TAssign readable var _n_value: AExpr end class AReassignFormExpr -special AExpr + super AExpr readable var _n_assign_op: AAssignOp readable var _n_value: AExpr end class AOnceExpr -special AProxyExpr + super AProxyExpr readable var _n_kwonce: TKwonce end class ASendExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef] end class ABinopExpr -special ASendExpr + super ASendExpr readable var _n_expr2: AExpr end class ABoolExpr -special AExpr + super AExpr end class AOrExpr -special ABoolExpr + super ABoolExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AAndExpr -special ABoolExpr + super ABoolExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class AOrElseExpr -special ABoolExpr + super ABoolExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class ANotExpr -special ABoolExpr + super ABoolExpr readable var _n_kwnot: TKwnot readable var _n_expr: AExpr end class AEqExpr -special ABinopExpr + super ABinopExpr end class AEeExpr -special ABoolExpr + super ABoolExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class ANeExpr -special ABinopExpr + super ABinopExpr end class ALtExpr -special ABinopExpr + super ABinopExpr end class ALeExpr -special ABinopExpr + super ABinopExpr end class ALlExpr -special ABinopExpr + super ABinopExpr end class AGtExpr -special ABinopExpr + super ABinopExpr end class AGeExpr -special ABinopExpr + super ABinopExpr end class AGgExpr -special ABinopExpr + super ABinopExpr end class AIsaExpr -special ABoolExpr + super ABoolExpr readable var _n_expr: AExpr readable var _n_type: AType end class APlusExpr -special ABinopExpr + super ABinopExpr end class AMinusExpr -special ABinopExpr + super ABinopExpr end class AStarshipExpr -special ABinopExpr + super ABinopExpr end class AStarExpr -special ABinopExpr + super ABinopExpr end class ASlashExpr -special ABinopExpr + super ABinopExpr end class APercentExpr -special ABinopExpr + super ABinopExpr end class AUminusExpr -special ASendExpr + super ASendExpr readable var _n_minus: TMinus end class ANewExpr -special AExpr + super AExpr readable var _n_kwnew: TKwnew readable var _n_type: AType readable var _n_id: nullable TId = null readable var _n_args: List[AExpr] = new List[AExpr] end class AAttrFormExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_id: TAttrid end class AAttrExpr -special AAttrFormExpr + super AAttrFormExpr end class AAttrAssignExpr -special AAttrFormExpr -special AAssignFormExpr + super AAttrFormExpr + super AAssignFormExpr end class ACallFormExpr -special ASendExpr + super ASendExpr readable var _n_id: TId readable var _n_args: List[AExpr] = new List[AExpr] end class AAttrReassignExpr -special AExpr -special AAttrFormExpr -special AReassignFormExpr + super AExpr + super AAttrFormExpr + super AReassignFormExpr end class ACallExpr -special ACallFormExpr + super ACallFormExpr end class ACallAssignExpr -special ACallFormExpr -special AAssignFormExpr + super ACallFormExpr + super AAssignFormExpr end class ACallReassignExpr -special AExpr -special ACallFormExpr -special AReassignFormExpr + super AExpr + super ACallFormExpr + super AReassignFormExpr end class ASuperExpr -special AExpr + super AExpr readable var _n_qualified: nullable AQualified = null readable var _n_kwsuper: TKwsuper readable var _n_args: List[AExpr] = new List[AExpr] end class AInitExpr -special ASendExpr + super ASendExpr readable var _n_kwinit: TKwinit readable var _n_args: List[AExpr] = new List[AExpr] end class ABraFormExpr -special ASendExpr + super ASendExpr readable var _n_args: List[AExpr] = new List[AExpr] end class ABraExpr -special ABraFormExpr + super ABraFormExpr end class ABraAssignExpr -special ABraFormExpr -special AAssignFormExpr + super ABraFormExpr + super AAssignFormExpr end class AVarFormExpr -special AExpr + super AExpr readable var _n_id: TId end class ABraReassignExpr -special ABraFormExpr -special AReassignFormExpr + super ABraFormExpr + super AReassignFormExpr end class AClosureCallExpr -special AExpr + super AExpr readable var _n_id: TId readable var _n_args: List[AExpr] = new List[AExpr] readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef] end class AVarExpr -special AVarFormExpr + super AVarFormExpr end class AVarAssignExpr -special AVarFormExpr -special AAssignFormExpr + super AVarFormExpr + super AAssignFormExpr end class AVarReassignExpr -special AVarFormExpr -special AReassignFormExpr + super AVarFormExpr + super AReassignFormExpr end class ARangeExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_expr2: AExpr end class ACrangeExpr -special ARangeExpr + super ARangeExpr end class AOrangeExpr -special ARangeExpr + super ARangeExpr end class AArrayExpr -special AExpr + super AExpr readable var _n_exprs: List[AExpr] = new List[AExpr] end class ASelfExpr -special AExpr + super AExpr readable var _n_kwself: nullable TKwself end class AImplicitSelfExpr -special ASelfExpr + super ASelfExpr end class ATrueExpr -special ABoolExpr + super ABoolExpr readable var _n_kwtrue: TKwtrue end class AFalseExpr -special ABoolExpr + super ABoolExpr readable var _n_kwfalse: TKwfalse end class ANullExpr -special AExpr + super AExpr readable var _n_kwnull: TKwnull end class AIntExpr -special AExpr + super AExpr readable var _n_number: TNumber end class AFloatExpr -special AExpr + super AExpr readable var _n_float: TFloat end class ACharExpr -special AExpr + super AExpr readable var _n_char: TChar end class AStringFormExpr -special AExpr + super AExpr end class AStringExpr -special AStringFormExpr + super AStringFormExpr readable var _n_string: TString end class AStartStringExpr -special AStringFormExpr + super AStringFormExpr readable var _n_string: TStartString end class AMidStringExpr -special AStringFormExpr + super AStringFormExpr readable var _n_string: TMidString end class AEndStringExpr -special AStringFormExpr + super AStringFormExpr readable var _n_string: TEndString end class ASuperstringExpr -special AExpr + super AExpr readable var _n_exprs: List[AExpr] = new List[AExpr] end class AParExpr -special AProxyExpr + super AProxyExpr end class AProxyExpr -special AExpr + super AExpr readable var _n_expr: AExpr end class AAsCastExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_kwas: TKwas readable var _n_type: AType end class AAsNotnullExpr -special AExpr + super AExpr readable var _n_expr: AExpr readable var _n_kwas: TKwas readable var _n_kwnot: TKwnot readable var _n_kwnull: TKwnull end class AIssetAttrExpr -special AAttrFormExpr + super AAttrFormExpr readable var _n_kwisset: TKwisset end -class AAssignOp special Prod end +class AAssignOp super Prod end class APlusAssignOp -special AAssignOp + super AAssignOp readable var _n_pluseq: TPluseq end class AMinusAssignOp -special AAssignOp + super AAssignOp readable var _n_minuseq: TMinuseq end class AClosureDef -special ALabelable + super ALabelable readable var _n_bang: TBang readable var _n_id: AClosureId readable var _n_ids: List[TId] = new List[TId] @@ -971,28 +971,28 @@ special ALabelable readable var _n_expr: nullable AExpr = null end class AClosureId -special Prod + super Prod end class ASimpleClosureId -special AClosureId + super AClosureId readable var _n_id: TId end class ABreakClosureId -special AClosureId + super AClosureId readable var _n_kwbreak: TKwbreak end class AQualified -special Prod + super Prod readable var _n_id: List[TId] = new List[TId] readable var _n_classid: nullable TClassid = null end class ADoc -special Prod + super Prod readable var _n_comment: List[TComment] = new List[TComment] end class Start -special Prod + super Prod readable var _n_base: nullable AModule readable var _n_eof: EOF end diff --git a/src/parser/parser_prod.nit b/src/parser/parser_prod.nit index 4ec1345..847a005 100644 --- a/src/parser/parser_prod.nit +++ b/src/parser/parser_prod.nit @@ -779,25 +779,25 @@ redef class AInterfaceClasskind v.enter_visit(_n_kwinterface) end end -redef class AUniversalClasskind +redef class AEnumClasskind private init empty_init do end - init init_auniversalclasskind ( - n_kwuniversal: nullable TKwuniversal + init init_aenumclasskind ( + n_kwenum: nullable TKwenum ) do empty_init - _n_kwuniversal = n_kwuniversal.as(not null) - n_kwuniversal.parent = self + _n_kwenum = n_kwenum.as(not null) + n_kwenum.parent = self end redef fun replace_child(old_child: ANode, new_child: nullable ANode) do - if _n_kwuniversal == old_child then + if _n_kwenum == old_child then if new_child != null then new_child.parent = self - assert new_child isa TKwuniversal - _n_kwuniversal = new_child + assert new_child isa TKwenum + _n_kwenum = new_child else abort end @@ -807,7 +807,7 @@ redef class AUniversalClasskind redef fun visit_all(v: Visitor) do - v.enter_visit(_n_kwuniversal) + v.enter_visit(_n_kwenum) end end redef class AFormaldef diff --git a/src/parser/tables_nit.c b/src/parser/tables_nit.c index 9db8780..d7c20a8 100644 --- a/src/parser/tables_nit.c +++ b/src/parser/tables_nit.c @@ -448,34 +448,36 @@ static const int lexer_goto_row86[] = { 116, 122, 77 }; static const int lexer_goto_row87[] = { - 3, + 5, 48, 99, -81, 100, 100, 136, - 101, 122, 77 + 101, 116, 77, + 117, 117, 137, + 118, 122, 77 }; static const int lexer_goto_row88[] = { 4, 48, 95, -29, 97, 115, 77, - 116, 116, 137, + 116, 116, 138, 117, 122, 77 }; static const int lexer_goto_row89[] = { 3, 48, 107, -31, - 108, 108, 138, + 108, 108, 139, 109, 122, 77 }; static const int lexer_goto_row90[] = { 3, 48, 113, -30, - 114, 114, 139, + 114, 114, 140, 115, 122, 77 }; static const int lexer_goto_row91[] = { 3, 48, 109, -40, - 110, 110, 140, + 110, 110, 141, 111, 122, 77 }; static const int lexer_goto_row92[] = { @@ -486,68 +488,68 @@ static const int lexer_goto_row93[] = { 4, 48, 95, -29, 97, 111, 77, - 112, 112, 141, + 112, 112, 142, 113, 122, 77 }; static const int lexer_goto_row94[] = { 6, 48, 95, -29, 97, 104, 77, - 105, 105, 142, + 105, 105, 143, 106, 115, 77, - 116, 116, 143, + 116, 116, 144, 117, 122, 77 }; static const int lexer_goto_row95[] = { 5, 48, 95, -29, - 97, 97, 144, + 97, 97, 145, 98, 114, 77, - 115, 115, 145, + 115, 115, 146, 116, 122, 77 }; static const int lexer_goto_row96[] = { 3, 48, 97, -29, - 98, 98, 146, + 98, 98, 147, 99, 122, 77 }; static const int lexer_goto_row97[] = { 3, 48, 110, -32, - 111, 111, 147, + 111, 111, 148, 112, 122, 77 }; static const int lexer_goto_row98[] = { 3, 48, 99, -81, - 100, 100, 148, + 100, 100, 149, 101, 122, 77 }; static const int lexer_goto_row99[] = { 4, 48, 95, -29, 97, 118, 77, - 119, 119, 149, + 119, 119, 150, 120, 122, 77 }; static const int lexer_goto_row100[] = { 3, 48, 115, -89, - 116, 116, 150, + 116, 116, 151, 117, 122, 77 }; static const int lexer_goto_row101[] = { 3, 48, 107, -31, - 108, 108, 151, + 108, 108, 152, 109, 122, 77 }; static const int lexer_goto_row102[] = { 4, 48, 95, -29, 97, 98, 77, - 99, 99, 152, + 99, 99, 153, 100, 122, 77 }; static const int lexer_goto_row103[] = { @@ -557,86 +559,86 @@ static const int lexer_goto_row103[] = { static const int lexer_goto_row104[] = { 3, 48, 98, -103, - 99, 99, 153, + 99, 99, 154, 100, 122, 77 }; static const int lexer_goto_row105[] = { 5, 48, 104, -95, - 105, 105, 154, + 105, 105, 155, 106, 110, 77, - 111, 111, 155, + 111, 111, 156, 112, 122, 77 }; static const int lexer_goto_row106[] = { 7, 48, 95, -29, - 97, 97, 156, + 97, 97, 157, 98, 99, 77, - 100, 100, 157, + 100, 100, 158, 101, 115, 77, - 116, 116, 158, + 116, 116, 159, 117, 122, 77 }; static const int lexer_goto_row107[] = { 3, 48, 107, -31, - 108, 108, 159, + 108, 108, 160, 109, 122, 77 }; static const int lexer_goto_row108[] = { 3, 48, 100, -39, - 101, 101, 160, + 101, 101, 161, 102, 122, 77 }; static const int lexer_goto_row109[] = { 3, 48, 111, -94, - 112, 112, 161, + 112, 112, 162, 113, 122, 77 }; static const int lexer_goto_row110[] = { 3, 48, 100, -39, - 101, 101, 162, + 101, 101, 163, 102, 122, 77 }; static const int lexer_goto_row111[] = { 4, 48, 95, -29, 97, 116, 77, - 117, 117, 163, + 117, 117, 164, 118, 122, 77 }; static const int lexer_goto_row112[] = { 3, 48, 111, -94, - 112, 112, 164, + 112, 112, 165, 113, 122, 77 }; static const int lexer_goto_row113[] = { 3, 48, 104, -95, - 105, 105, 165, + 105, 105, 166, 106, 122, 77 }; static const int lexer_goto_row114[] = { 3, 48, 113, -30, - 114, 114, 166, + 114, 114, 167, 115, 122, 77 }; static const int lexer_goto_row115[] = { 3, 48, 104, -95, - 105, 105, 167, + 105, 105, 168, 106, 122, 77 }; static const int lexer_goto_row116[] = { 3, 48, 104, -95, - 105, 105, 168, + 105, 105, 169, 106, 122, 77 }; static const int lexer_goto_row117[] = { @@ -645,9 +647,9 @@ static const int lexer_goto_row117[] = { }; static const int lexer_goto_row119[] = { 3, - 0, 9, 169, - 11, 12, 169, - 14, 255, 169 + 0, 9, 170, + 11, 12, 170, + 14, 255, 170 }; static const int lexer_goto_row121[] = { 1, @@ -672,13 +674,13 @@ static const int lexer_goto_row128[] = { static const int lexer_goto_row129[] = { 3, 48, 113, -30, - 114, 114, 170, + 114, 114, 171, 115, 122, 77 }; static const int lexer_goto_row130[] = { 3, 48, 115, -89, - 116, 116, 171, + 116, 116, 172, 117, 122, 77 }; static const int lexer_goto_row131[] = { @@ -688,31 +690,31 @@ static const int lexer_goto_row131[] = { static const int lexer_goto_row132[] = { 3, 48, 100, -39, - 101, 101, 172, + 101, 101, 173, 102, 122, 77 }; static const int lexer_goto_row133[] = { 3, 48, 95, -29, - 97, 97, 173, + 97, 97, 174, 98, 122, 77 }; static const int lexer_goto_row134[] = { 3, 48, 114, -82, - 115, 115, 174, + 115, 115, 175, 116, 122, 77 }; static const int lexer_goto_row135[] = { 3, 48, 115, -89, - 116, 116, 175, + 116, 116, 176, 117, 122, 77 }; static const int lexer_goto_row136[] = { 3, 48, 100, -39, - 101, 101, 176, + 101, 101, 177, 102, 122, 77 }; static const int lexer_goto_row137[] = { @@ -720,729 +722,740 @@ static const int lexer_goto_row137[] = { 48, 122, -35 }; static const int lexer_goto_row138[] = { + 4, + 48, 95, -29, + 97, 108, 77, + 109, 109, 178, + 110, 122, 77 +}; +static const int lexer_goto_row139[] = { 3, 48, 100, -39, - 101, 101, 177, + 101, 101, 179, 102, 122, 77 }; -static const int lexer_goto_row139[] = { +static const int lexer_goto_row140[] = { 3, 48, 114, -82, - 115, 115, 178, + 115, 115, 180, 116, 122, 77 }; -static const int lexer_goto_row140[] = { +static const int lexer_goto_row141[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row141[] = { +static const int lexer_goto_row142[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row142[] = { +static const int lexer_goto_row143[] = { 3, 48, 110, -32, - 111, 111, 179, + 111, 111, 181, 112, 122, 77 }; -static const int lexer_goto_row143[] = { +static const int lexer_goto_row144[] = { 3, 48, 115, -89, - 116, 116, 180, + 116, 116, 182, 117, 122, 77 }; -static const int lexer_goto_row144[] = { +static const int lexer_goto_row145[] = { 5, 48, 100, -39, - 101, 101, 181, + 101, 101, 183, 102, 113, 77, - 114, 114, 182, + 114, 114, 184, 115, 122, 77 }; -static const int lexer_goto_row145[] = { +static const int lexer_goto_row146[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row146[] = { +static const int lexer_goto_row147[] = { 3, 48, 100, -39, - 101, 101, 183, + 101, 101, 185, 102, 122, 77 }; -static const int lexer_goto_row147[] = { +static const int lexer_goto_row148[] = { 3, 48, 100, -39, - 101, 101, 184, + 101, 101, 186, 102, 122, 77 }; -static const int lexer_goto_row148[] = { +static const int lexer_goto_row149[] = { 3, 48, 111, -94, - 112, 112, 185, + 112, 112, 187, 113, 122, 77 }; -static const int lexer_goto_row149[] = { +static const int lexer_goto_row150[] = { 3, 48, 116, -112, - 117, 117, 186, + 117, 117, 188, 118, 122, 77 }; -static const int lexer_goto_row150[] = { +static const int lexer_goto_row151[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row151[] = { +static const int lexer_goto_row152[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row152[] = { +static const int lexer_goto_row153[] = { 3, 48, 107, -31, - 108, 108, 187, + 108, 108, 189, 109, 122, 77 }; -static const int lexer_goto_row153[] = { +static const int lexer_goto_row154[] = { 3, 48, 100, -39, - 101, 101, 188, + 101, 101, 190, 102, 122, 77 }; -static const int lexer_goto_row154[] = { +static const int lexer_goto_row155[] = { 4, 48, 95, -29, 97, 106, 77, - 107, 107, 189, + 107, 107, 191, 108, 122, 77 }; -static const int lexer_goto_row155[] = { +static const int lexer_goto_row156[] = { 4, 48, 95, -29, 97, 117, 77, - 118, 118, 190, + 118, 118, 192, 119, 122, 77 }; -static const int lexer_goto_row156[] = { +static const int lexer_goto_row157[] = { 3, 48, 115, -89, - 116, 116, 191, + 116, 116, 193, 117, 122, 77 }; -static const int lexer_goto_row157[] = { +static const int lexer_goto_row158[] = { 3, 48, 99, -81, - 100, 100, 192, + 100, 100, 194, 101, 122, 77 }; -static const int lexer_goto_row158[] = { +static const int lexer_goto_row159[] = { 3, 48, 100, -39, - 101, 101, 193, + 101, 101, 195, 102, 122, 77 }; -static const int lexer_goto_row159[] = { +static const int lexer_goto_row160[] = { 3, 48, 116, -112, - 117, 117, 194, + 117, 117, 196, 118, 122, 77 }; -static const int lexer_goto_row160[] = { +static const int lexer_goto_row161[] = { 3, 48, 101, -36, - 102, 102, 195, + 102, 102, 197, 103, 122, 77 }; -static const int lexer_goto_row161[] = { +static const int lexer_goto_row162[] = { 3, 48, 98, -103, - 99, 99, 196, + 99, 99, 198, 100, 122, 77 }; -static const int lexer_goto_row162[] = { +static const int lexer_goto_row163[] = { 3, 48, 100, -39, - 101, 101, 197, + 101, 101, 199, 102, 122, 77 }; -static const int lexer_goto_row163[] = { +static const int lexer_goto_row164[] = { 3, 48, 109, -40, - 110, 110, 198, + 110, 110, 200, 111, 122, 77 }; -static const int lexer_goto_row164[] = { +static const int lexer_goto_row165[] = { 3, 48, 100, -39, - 101, 101, 199, + 101, 101, 201, 102, 122, 77 }; -static const int lexer_goto_row165[] = { +static const int lexer_goto_row166[] = { 3, 48, 100, -39, - 101, 101, 200, + 101, 101, 202, 102, 122, 77 }; -static const int lexer_goto_row166[] = { +static const int lexer_goto_row167[] = { 3, - 48, 117, -156, - 118, 118, 201, + 48, 117, -157, + 118, 118, 203, 119, 122, 77 }; -static const int lexer_goto_row167[] = { +static const int lexer_goto_row168[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row168[] = { +static const int lexer_goto_row169[] = { 3, 48, 107, -31, - 108, 108, 202, + 108, 108, 204, 109, 122, 77 }; -static const int lexer_goto_row169[] = { +static const int lexer_goto_row170[] = { 3, 48, 115, -89, - 116, 116, 203, + 116, 116, 205, 117, 122, 77 }; -static const int lexer_goto_row170[] = { +static const int lexer_goto_row171[] = { 1, 0, 255, -48 }; -static const int lexer_goto_row171[] = { +static const int lexer_goto_row172[] = { 3, 48, 115, -89, - 116, 116, 204, + 116, 116, 206, 117, 122, 77 }; -static const int lexer_goto_row172[] = { +static const int lexer_goto_row173[] = { 3, 48, 113, -30, - 114, 114, 205, + 114, 114, 207, 115, 122, 77 }; -static const int lexer_goto_row173[] = { +static const int lexer_goto_row174[] = { 3, 48, 113, -30, - 114, 114, 206, + 114, 114, 208, 115, 122, 77 }; -static const int lexer_goto_row174[] = { +static const int lexer_goto_row175[] = { 3, - 48, 106, -155, - 107, 107, 207, + 48, 106, -156, + 107, 107, 209, 108, 122, 77 }; -static const int lexer_goto_row175[] = { +static const int lexer_goto_row176[] = { 3, 48, 114, -82, - 115, 115, 208, + 115, 115, 210, 116, 122, 77 }; -static const int lexer_goto_row176[] = { +static const int lexer_goto_row177[] = { 3, 48, 104, -95, - 105, 105, 209, + 105, 105, 211, 106, 122, 77 }; -static const int lexer_goto_row177[] = { +static const int lexer_goto_row178[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row178[] = { +static const int lexer_goto_row179[] = { + 1, + 48, 122, -35 +}; +static const int lexer_goto_row180[] = { 3, 48, 113, -30, - 114, 114, 210, + 114, 114, 212, 115, 122, 77 }; -static const int lexer_goto_row179[] = { +static const int lexer_goto_row181[] = { 3, 48, 100, -39, - 101, 101, 211, + 101, 101, 213, 102, 122, 77 }; -static const int lexer_goto_row180[] = { +static const int lexer_goto_row182[] = { 3, 48, 113, -30, - 114, 114, 212, + 114, 114, 214, 115, 122, 77 }; -static const int lexer_goto_row181[] = { +static const int lexer_goto_row183[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row182[] = { +static const int lexer_goto_row184[] = { 3, 48, 113, -30, - 114, 114, 213, + 114, 114, 215, 115, 122, 77 }; -static const int lexer_goto_row183[] = { +static const int lexer_goto_row185[] = { 3, 48, 116, -112, - 117, 117, 214, + 117, 117, 216, 118, 122, 77 }; -static const int lexer_goto_row184[] = { +static const int lexer_goto_row186[] = { 3, 48, 115, -89, - 116, 116, 215, + 116, 116, 217, 117, 122, 77 }; -static const int lexer_goto_row185[] = { +static const int lexer_goto_row187[] = { 3, 48, 107, -31, - 108, 108, 216, + 108, 108, 218, 109, 122, 77 }; -static const int lexer_goto_row186[] = { +static const int lexer_goto_row188[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row187[] = { +static const int lexer_goto_row189[] = { 3, 48, 107, -31, - 108, 108, 217, + 108, 108, 219, 109, 122, 77 }; -static const int lexer_goto_row188[] = { +static const int lexer_goto_row190[] = { 3, 48, 95, -29, - 97, 97, 218, + 97, 97, 220, 98, 122, 77 }; -static const int lexer_goto_row189[] = { +static const int lexer_goto_row191[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row190[] = { +static const int lexer_goto_row192[] = { 3, 48, 95, -29, - 97, 97, 219, + 97, 97, 221, 98, 122, 77 }; -static const int lexer_goto_row191[] = { +static const int lexer_goto_row193[] = { 3, 48, 95, -29, - 97, 97, 220, + 97, 97, 222, 98, 122, 77 }; -static const int lexer_goto_row192[] = { +static const int lexer_goto_row194[] = { 3, 48, 100, -39, - 101, 101, 221, + 101, 101, 223, 102, 122, 77 }; -static const int lexer_goto_row193[] = { +static const int lexer_goto_row195[] = { 3, 48, 95, -29, - 97, 97, 222, + 97, 97, 224, 98, 122, 77 }; -static const int lexer_goto_row194[] = { +static const int lexer_goto_row196[] = { 3, 48, 101, -36, - 102, 102, 223, + 102, 102, 225, 103, 122, 77 }; -static const int lexer_goto_row195[] = { +static const int lexer_goto_row197[] = { 3, 48, 113, -30, - 114, 114, 224, + 114, 114, 226, 115, 122, 77 }; -static const int lexer_goto_row196[] = { +static const int lexer_goto_row198[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row197[] = { +static const int lexer_goto_row199[] = { 3, 48, 104, -95, - 105, 105, 225, + 105, 105, 227, 106, 122, 77 }; -static const int lexer_goto_row198[] = { +static const int lexer_goto_row200[] = { 3, 48, 113, -30, - 114, 114, 226, + 114, 114, 228, 115, 122, 77 }; -static const int lexer_goto_row199[] = { +static const int lexer_goto_row201[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row200[] = { +static const int lexer_goto_row202[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row201[] = { +static const int lexer_goto_row203[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row202[] = { +static const int lexer_goto_row204[] = { 3, 48, 100, -39, - 101, 101, 227, + 101, 101, 229, 102, 122, 77 }; -static const int lexer_goto_row203[] = { +static const int lexer_goto_row205[] = { 3, 48, 100, -39, - 101, 101, 228, + 101, 101, 230, 102, 122, 77 }; -static const int lexer_goto_row204[] = { +static const int lexer_goto_row206[] = { 3, 48, 95, -29, - 97, 97, 229, + 97, 97, 231, 98, 122, 77 }; -static const int lexer_goto_row205[] = { +static const int lexer_goto_row207[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row206[] = { +static const int lexer_goto_row208[] = { 3, 48, 95, -29, - 97, 97, 230, + 97, 97, 232, 98, 122, 77 }; -static const int lexer_goto_row207[] = { +static const int lexer_goto_row209[] = { 3, 48, 115, -89, - 116, 116, 231, + 116, 116, 233, 117, 122, 77 }; -static const int lexer_goto_row208[] = { +static const int lexer_goto_row210[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row209[] = { +static const int lexer_goto_row211[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row210[] = { +static const int lexer_goto_row212[] = { 3, 48, 109, -40, - 110, 110, 232, + 110, 110, 234, 111, 122, 77 }; -static const int lexer_goto_row211[] = { +static const int lexer_goto_row213[] = { 3, 48, 109, -40, - 110, 110, 233, + 110, 110, 235, 111, 122, 77 }; -static const int lexer_goto_row212[] = { +static const int lexer_goto_row214[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row213[] = { +static const int lexer_goto_row215[] = { 3, 48, 115, -89, - 116, 116, 234, + 116, 116, 236, 117, 122, 77 }; -static const int lexer_goto_row214[] = { +static const int lexer_goto_row216[] = { 5, 48, 101, -36, - 102, 102, 235, + 102, 102, 237, 103, 109, 77, - 110, 110, 236, + 110, 110, 238, 111, 122, 77 }; -static const int lexer_goto_row215[] = { +static const int lexer_goto_row217[] = { 3, 48, 99, -81, - 100, 100, 237, + 100, 100, 239, 101, 122, 77 }; -static const int lexer_goto_row216[] = { +static const int lexer_goto_row218[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row217[] = { +static const int lexer_goto_row219[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row218[] = { +static const int lexer_goto_row220[] = { 3, 48, 100, -39, - 101, 101, 238, + 101, 101, 240, 102, 122, 77 }; -static const int lexer_goto_row219[] = { +static const int lexer_goto_row221[] = { 3, 48, 97, -29, - 98, 98, 239, + 98, 98, 241, 99, 122, 77 }; -static const int lexer_goto_row220[] = { +static const int lexer_goto_row222[] = { 4, 48, 95, -29, 97, 102, 77, - 103, 103, 240, + 103, 103, 242, 104, 122, 77 }; -static const int lexer_goto_row221[] = { +static const int lexer_goto_row223[] = { 3, 48, 115, -89, - 116, 116, 241, + 116, 116, 243, 117, 122, 77 }; -static const int lexer_goto_row222[] = { +static const int lexer_goto_row224[] = { 3, 48, 98, -103, - 99, 99, 242, + 99, 99, 244, 100, 122, 77 }; -static const int lexer_goto_row223[] = { +static const int lexer_goto_row225[] = { 3, 48, 97, -29, - 98, 98, 243, + 98, 98, 245, 99, 122, 77 }; -static const int lexer_goto_row224[] = { +static const int lexer_goto_row226[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row225[] = { +static const int lexer_goto_row227[] = { 3, 48, 109, -40, - 110, 110, 244, + 110, 110, 246, 111, 122, 77 }; -static const int lexer_goto_row226[] = { +static const int lexer_goto_row228[] = { 3, 48, 95, -29, - 97, 97, 245, + 97, 97, 247, 98, 122, 77 }; -static const int lexer_goto_row227[] = { +static const int lexer_goto_row229[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row228[] = { +static const int lexer_goto_row230[] = { 3, 48, 113, -30, - 114, 114, 246, + 114, 114, 248, 115, 122, 77 }; -static const int lexer_goto_row229[] = { +static const int lexer_goto_row231[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row230[] = { +static const int lexer_goto_row232[] = { 3, 48, 97, -29, - 98, 98, 247, + 98, 98, 249, 99, 122, 77 }; -static const int lexer_goto_row231[] = { +static const int lexer_goto_row233[] = { 3, 48, 98, -103, - 99, 99, 248, + 99, 99, 250, 100, 122, 77 }; -static const int lexer_goto_row232[] = { +static const int lexer_goto_row234[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row233[] = { +static const int lexer_goto_row235[] = { 3, 48, 116, -112, - 117, 117, 249, + 117, 117, 251, 118, 122, 77 }; -static const int lexer_goto_row234[] = { +static const int lexer_goto_row236[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row235[] = { +static const int lexer_goto_row237[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row236[] = { +static const int lexer_goto_row238[] = { 3, 48, 95, -29, - 97, 97, 250, + 97, 97, 252, 98, 122, 77 }; -static const int lexer_goto_row237[] = { +static const int lexer_goto_row239[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row238[] = { +static const int lexer_goto_row240[] = { 3, 48, 100, -39, - 101, 101, 251, + 101, 101, 253, 102, 122, 77 }; -static const int lexer_goto_row239[] = { +static const int lexer_goto_row241[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row240[] = { +static const int lexer_goto_row242[] = { 3, 48, 107, -31, - 108, 108, 252, + 108, 108, 254, 109, 122, 77 }; -static const int lexer_goto_row241[] = { +static const int lexer_goto_row243[] = { 3, 48, 100, -39, - 101, 101, 253, + 101, 101, 255, 102, 122, 77 }; -static const int lexer_goto_row242[] = { +static const int lexer_goto_row244[] = { 3, 48, 100, -39, - 101, 101, 254, + 101, 101, 256, 102, 122, 77 }; -static const int lexer_goto_row243[] = { +static const int lexer_goto_row245[] = { 3, 48, 115, -89, - 116, 116, 255, + 116, 116, 257, 117, 122, 77 }; -static const int lexer_goto_row244[] = { +static const int lexer_goto_row246[] = { 3, 48, 107, -31, - 108, 108, 256, + 108, 108, 258, 109, 122, 77 }; -static const int lexer_goto_row245[] = { +static const int lexer_goto_row247[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row246[] = { +static const int lexer_goto_row248[] = { 3, 48, 107, -31, - 108, 108, 257, + 108, 108, 259, 109, 122, 77 }; -static const int lexer_goto_row247[] = { +static const int lexer_goto_row249[] = { 3, 48, 114, -82, - 115, 115, 258, + 115, 115, 260, 116, 122, 77 }; -static const int lexer_goto_row248[] = { +static const int lexer_goto_row250[] = { 3, 48, 107, -31, - 108, 108, 259, + 108, 108, 261, 109, 122, 77 }; -static const int lexer_goto_row249[] = { +static const int lexer_goto_row251[] = { 3, 48, 115, -89, - 116, 116, 260, + 116, 116, 262, 117, 122, 77 }; -static const int lexer_goto_row250[] = { +static const int lexer_goto_row252[] = { 3, 48, 100, -39, - 101, 101, 261, + 101, 101, 263, 102, 122, 77 }; -static const int lexer_goto_row251[] = { +static const int lexer_goto_row253[] = { 3, 48, 98, -103, - 99, 99, 262, + 99, 99, 264, 100, 122, 77 }; -static const int lexer_goto_row252[] = { +static const int lexer_goto_row254[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row253[] = { +static const int lexer_goto_row255[] = { 3, 48, 100, -39, - 101, 101, 263, + 101, 101, 265, 102, 122, 77 }; -static const int lexer_goto_row254[] = { +static const int lexer_goto_row256[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row255[] = { +static const int lexer_goto_row257[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row256[] = { +static const int lexer_goto_row258[] = { 3, 48, 100, -39, - 101, 101, 264, + 101, 101, 266, 102, 122, 77 }; -static const int lexer_goto_row257[] = { +static const int lexer_goto_row259[] = { 3, 48, 100, -39, - 101, 101, 265, + 101, 101, 267, 102, 122, 77 }; -static const int lexer_goto_row258[] = { +static const int lexer_goto_row260[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row259[] = { +static const int lexer_goto_row261[] = { 3, 48, 95, -29, - 97, 97, 266, + 97, 97, 268, 98, 122, 77 }; -static const int lexer_goto_row260[] = { +static const int lexer_goto_row262[] = { 3, 48, 100, -39, - 101, 101, 267, + 101, 101, 269, 102, 122, 77 }; -static const int lexer_goto_row261[] = { +static const int lexer_goto_row263[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row262[] = { +static const int lexer_goto_row264[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row263[] = { +static const int lexer_goto_row265[] = { 3, 48, 100, -39, - 101, 101, 268, + 101, 101, 270, 102, 122, 77 }; -static const int lexer_goto_row264[] = { +static const int lexer_goto_row266[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row265[] = { +static const int lexer_goto_row267[] = { 3, 48, 99, -81, - 100, 100, 269, + 100, 100, 271, 101, 122, 77 }; -static const int lexer_goto_row266[] = { +static const int lexer_goto_row268[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row267[] = { +static const int lexer_goto_row269[] = { 3, 48, 107, -31, - 108, 108, 270, + 108, 108, 272, 109, 122, 77 }; -static const int lexer_goto_row268[] = { +static const int lexer_goto_row270[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row269[] = { +static const int lexer_goto_row271[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row270[] = { +static const int lexer_goto_row272[] = { 1, 48, 122, -35 }; -static const int lexer_goto_row271[] = { +static const int lexer_goto_row273[] = { 1, 48, 122, -35 }; @@ -1718,11 +1731,13 @@ const int* const lexer_goto_table[] = { lexer_goto_row268, lexer_goto_row269, lexer_goto_row270, - lexer_goto_row271 + lexer_goto_row271, + lexer_goto_row272, + lexer_goto_row273 }; const int lexer_accept_table[] = { - -1,0,1,1,0,79,-1,-1,69,-1,52,53,67,65,56,66,64,68,83,57,72,59,75,80,54,55,-1,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,-1,1,71,-1,86,-1,87,-1,2,2,-1,85,60,61,63,84,-1,58,74,73,70,76,77,80,80,80,80,82,81,81,81,81,81,81,48,81,81,81,16,81,81,81,81,81,81,25,81,31,15,81,81,81,81,81,81,81,33,81,81,81,81,81,81,81,81,81,81,81,81,81,-1,89,-1,88,-1,2,62,78,82,82,82,82,81,81,32,81,81,81,81,81,10,81,81,30,11,81,81,81,41,81,81,81,81,40,34,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,19,81,81,-1,81,81,81,81,81,81,27,81,81,81,13,81,81,81,81,29,81,47,42,81,81,81,81,81,81,44,81,81,26,45,12,81,81,81,38,81,81,37,5,81,81,46,81,81,81,50,51,81,81,81,81,81,81,14,81,81,43,81,28,81,81,39,81,21,4,81,20,81,3,81,81,81,81,81,35,81,81,81,81,81,81,24,81,3,23,81,81,9,81,81,6,36,81,49,81,17,81,18,7,22,8 + -1,0,1,1,0,79,-1,-1,69,-1,52,53,67,65,56,66,64,68,83,57,72,59,75,80,54,55,-1,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,-1,1,71,-1,86,-1,87,-1,2,2,-1,85,60,61,63,84,-1,58,74,73,70,76,77,80,80,80,80,82,81,81,81,81,81,81,48,81,81,81,16,81,81,81,81,81,81,25,81,31,15,81,81,81,81,81,81,81,33,81,81,81,81,81,81,81,81,81,81,81,81,81,-1,89,-1,88,-1,2,62,78,82,82,82,82,81,81,32,81,81,81,81,81,10,81,81,81,30,11,81,81,81,41,81,81,81,81,40,34,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,19,81,81,-1,81,81,81,81,81,81,27,8,81,81,81,13,81,81,81,81,29,81,47,42,81,81,81,81,81,81,44,81,81,26,45,12,81,81,81,38,81,81,37,5,81,81,46,81,81,81,50,51,81,81,81,81,81,81,14,81,81,43,81,28,81,81,39,81,21,4,81,20,81,3,81,81,81,81,81,35,81,81,81,81,81,81,24,81,3,23,81,81,9,81,81,6,36,81,49,81,17,81,18,7,22,8 }; static int parser_action_row1[] = { diff --git a/src/parser/test_parser.nit b/src/parser/test_parser.nit index 4878291..fd53079 100644 --- a/src/parser/test_parser.nit +++ b/src/parser/test_parser.nit @@ -20,7 +20,7 @@ package test_parser import parser class PrintTreeVisitor -special Visitor + super Visitor var _rank: Int redef fun visit(n: nullable ANode) do diff --git a/src/parser/xss/lexer.xss b/src/parser/xss/lexer.xss index 2eb31da..780a118 100644 --- a/src/parser/xss/lexer.xss +++ b/src/parser/xss/lexer.xss @@ -20,7 +20,7 @@ $ template make_lexer() # The lexer extract NIT tokens from an input stream. # It is better user with the Parser class Lexer -special TablesCapable + super TablesCapable # Last peeked token var _token: nullable Token diff --git a/src/parser/xss/nodes.xss b/src/parser/xss/nodes.xss index 3feb578..a62df55 100644 --- a/src/parser/xss/nodes.xss +++ b/src/parser/xss/nodes.xss @@ -27,12 +27,12 @@ end # Ancestor of all tokens abstract class Token -special PNode + super PNode end # Ancestor of all productions abstract class Prod -special PNode + super PNode fun location=(loc: Location) do _location = loc end $ end template diff --git a/src/parser/xss/parser.xss b/src/parser/xss/parser.xss index 8d4d6ce..56c1dfd 100644 --- a/src/parser/xss/parser.xss +++ b/src/parser/xss/parser.xss @@ -33,7 +33,7 @@ private class State end class Parser -special TablesCapable + super TablesCapable # Associated lexer var _lexer: Lexer @@ -183,7 +183,7 @@ end # Find location of production nodes # Uses existing token locations to infer location of productions. private class ComputeProdLocationVisitor -special Visitor + super Visitor # Currenlty visited productions that need a first token var _need_first_prods: Array[Prod] = new Array[Prod] @@ -280,7 +280,7 @@ end $ foreach {rules/rule} private class ReduceAction@index -special ReduceAction + super ReduceAction redef fun action(p: Parser) do var node_list: nullable Object = null diff --git a/src/parser/xss/prods.xss b/src/parser/xss/prods.xss index ef484d0..9f2b330 100644 --- a/src/parser/xss/prods.xss +++ b/src/parser/xss/prods.xss @@ -19,12 +19,12 @@ $ template make_abs_prods() $ set baseprod = {//prod/@ename} $ foreach {//prod} -class @ename special Prod end +class @ename super Prod end $ end $ foreach {//alt} class @ename -special ${../@ename} + super ${../@ename} $ foreach {elem} $ if @is_list readable var _n_@name: List[@etype] = new List[@etype] @@ -40,7 +40,7 @@ end $ end class Start -special Prod + super Prod readable var _n_base: nullable $baseprod readable var _n_eof: EOF end diff --git a/src/parser/xss/tokens.xss b/src/parser/xss/tokens.xss index 03247a7..5352944 100644 --- a/src/parser/xss/tokens.xss +++ b/src/parser/xss/tokens.xss @@ -19,16 +19,16 @@ $ template make_abs_tokens() $ foreach {//token} $ if {@parser_index} class @ename -special Token + super Token end $ end $ end class EOF -special Token + super Token private init noinit do end end class PError -special EOF + super EOF private init noinit do end end $ end template diff --git a/src/primitive_info.nit b/src/primitive_info.nit index 262228f..60da40d 100644 --- a/src/primitive_info.nit +++ b/src/primitive_info.nit @@ -17,7 +17,7 @@ # Common things for NIT compilation and C generation package primitive_info -#FIXME Split this package into 2: one in metamodel and one in compiling +#FIXME Split this module into 2: one in metamodel and one in compiling import metamodel @@ -30,7 +30,6 @@ redef class MMLocalClass # Return the primitive information of the class. # Return null if the class is not primitive - # FIXME: Only here since there is no universal type yet fun primitive_info: nullable PrimitiveInfo do if _primitive_info_b == true then return _primitive_info_cache diff --git a/src/syntax/flow.nit b/src/syntax/flow.nit index 102ed35..e4fbaef 100644 --- a/src/syntax/flow.nit +++ b/src/syntax/flow.nit @@ -136,7 +136,7 @@ end # Root of a variable context hierarchy class RootFlowContext -special FlowContext + super FlowContext init(visitor: AbsSyntaxVisitor, node: ANode) do super(visitor, node) @@ -145,7 +145,7 @@ end # Contexts that are an evolution of a single previous context class SubFlowContext -special FlowContext + super FlowContext readable var _prev: FlowContext redef fun is_set(v) @@ -167,7 +167,7 @@ end # A variable context where a variable got a type adptation class CastFlowContext -special SubFlowContext + super SubFlowContext # The casted variable var _variable: Variable @@ -194,7 +194,7 @@ end # Context that resulting from the combinaisons of other contexts. # Most of the merge computation are done lasily. class MergeFlowContext -special FlowContext + super FlowContext var _base: FlowContext var _alts: Array[FlowContext] diff --git a/src/syntax/icode_generation.nit b/src/syntax/icode_generation.nit index 5bd50bb..afb15b7 100644 --- a/src/syntax/icode_generation.nit +++ b/src/syntax/icode_generation.nit @@ -24,7 +24,7 @@ private import primitive_info # An AST2ICode context stores the currently built icode informations class A2IContext -special ICodeBuilder + super ICodeBuilder redef fun stmt(s: ICode) do if _current_node != null then @@ -279,7 +279,7 @@ redef class MMImplicitInit end class A2IVisitor -special AbsSyntaxVisitor + super AbsSyntaxVisitor writable var _icode_ctx: nullable A2IContext fun icode_ctx: A2IContext do return _icode_ctx.as(not null) redef fun visit(n) do n.accept_icode_generation(self) diff --git a/src/syntax/mmbuilder.nit b/src/syntax/mmbuilder.nit index b36e6b2..3534938 100644 --- a/src/syntax/mmbuilder.nit +++ b/src/syntax/mmbuilder.nit @@ -23,7 +23,7 @@ import syntax_base # Class specialization hierarchy sorter private class CSHSorter -special AbstractSorter[MMLocalClass] + super AbstractSorter[MMLocalClass] redef fun compare(a, b) do return a.cshe.rank <=> b.cshe.rank @@ -97,7 +97,7 @@ redef class MMSrcModule c.accept_class_visitor(mmbv2) # Default and inherited constructor if needed - if c isa MMSrcLocalClass and c.global.intro == c and not c.global.is_universal and not c.global.is_interface then + if c isa MMSrcLocalClass and c.global.intro == c and not c.global.is_enum and not c.global.is_interface then c.process_default_constructors(mmbv2) end @@ -183,7 +183,7 @@ redef class MMSrcLocalClass var super_inits = new ArraySet[MMLocalProperty] var super_constructors = new ArraySet[MMGlobalProperty] for sc in che.direct_greaters do - if sc.global.is_universal or sc.global.is_interface then continue + if sc.global.is_enum or sc.global.is_interface then continue for gp in sc.global_properties do if not gp.is_init then continue super_constructors.add(gp) @@ -311,7 +311,7 @@ end # Concrete NIT class specialization relation class MMSrcAncestor -special MMAncestor + super MMAncestor redef readable var _local_class: MMLocalClass init(c: MMLocalClass) @@ -326,7 +326,7 @@ end # * Build the classes and attach them to global classes # * Collect generic formal parameters. private class ClassBuilderVisitor -special AbsSyntaxVisitor + super AbsSyntaxVisitor # Current class arity readable writable var _local_class_arity: Int = 0 @@ -340,7 +340,7 @@ end # Another pass visitor for syntax analysis. # * Build ancertors (with only class informations not the type one) private class ClassSpecializationBuilderVisitor -special AbsSyntaxVisitor + super AbsSyntaxVisitor redef fun visit(n) do n.accept_class_specialization_builder(self) init(tc, m) do super end @@ -348,7 +348,7 @@ end # Another pass visitor for syntax analysis. # * Compute types in ancestors private class ClassAncestorBuilder -special AbsSyntaxVisitor + super AbsSyntaxVisitor redef fun visit(n) do n.accept_class_ancestor_builder(self) init(tc, m) do super end @@ -356,7 +356,7 @@ end # Another pass visitor for syntax analysis. # * Checks classes in regard to superclasses private class ClassVerifierVisitor -special AbsSyntaxVisitor + super AbsSyntaxVisitor redef fun visit(n) do n.accept_class_verifier(self) init(tc, m) do super end @@ -367,7 +367,7 @@ end # * Build local properties and attache them to global properties # * Attach bound to formal types private class PropertyBuilderVisitor -special AbsSyntaxVisitor + super AbsSyntaxVisitor redef fun visit(n) do n.accept_property_builder(self) init(tc, m) do super end @@ -375,7 +375,7 @@ end # Another pass pass visitor for syntax analysis. # * Check property conformance private class PropertyVerifierVisitor -special AbsSyntaxVisitor + super AbsSyntaxVisitor # The signature currently build readable writable var _signature_builder: SignatureBuilder @@ -462,7 +462,7 @@ redef class AModuledecl redef fun accept_class_builder(v) do 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}") + v.error(n_id, "Error: Module name missmatch between {v.mmmodule.name} and {n_id.to_symbol}") end end end @@ -569,15 +569,15 @@ end redef class AClasskind fun is_interface: Bool do return false - fun is_universal: Bool do return false + fun is_enum: Bool do return false fun is_abstract: Bool do return false end redef class AInterfaceClasskind redef fun is_interface do return true end -redef class AUniversalClasskind - redef fun is_universal do return true +redef class AEnumClasskind + redef fun is_enum do return true end redef class AAbstractClasskind redef fun is_abstract do return true @@ -601,7 +601,7 @@ redef class AStdClassdef glob.visibility_level = visibility_level glob.is_interface = n_classkind.is_interface glob.is_abstract = n_classkind.is_abstract - glob.is_universal = n_classkind.is_universal + glob.is_enum = n_classkind.is_enum if n_kwredef != null then v.error(self, "Redef error: No class {name} is imported. Remove the redef keyword to define a new class.") end @@ -609,18 +609,18 @@ redef class AStdClassdef for c in _local_class.cshe.direct_greaters do var cg = c.global if glob.is_interface then - if cg.is_universal then - v.error(self, "Special error: Interface {name} try to specialise universal class {c.name}.") + if cg.is_enum then + v.error(self, "Special error: Interface {name} try to specialise enum class {c.name}.") else if not cg.is_interface then v.error(self, "Special error: Interface {name} try to specialise class {c.name}.") end - else if glob.is_universal then - if not cg.is_interface and not cg.is_universal then - v.error(self, "Special error: Universal class {name} try to specialise class {c.name}.") + else if glob.is_enum then + if not cg.is_interface and not cg.is_enum then + v.error(self, "Special error: Enum class {name} try to specialise class {c.name}.") end else - if cg.is_universal then - v.error(self, "Special error: Class {name} try to specialise universal class {c.name}.") + if cg.is_enum then + v.error(self, "Special error: Class {name} try to specialise enum class {c.name}.") end end @@ -643,7 +643,7 @@ redef class AStdClassdef if not glob.is_interface and n_classkind.is_interface or not glob.is_abstract and n_classkind.is_abstract or - not glob.is_universal and n_classkind.is_universal + not glob.is_enum and n_classkind.is_enum then v.error(self, "Redef error: cannot change kind of class {name}.") end @@ -772,14 +772,14 @@ redef class APropdef if glob.is_attribute then if gbc.is_interface then v.error(self, "Error: Attempt to define attribute {prop} in the interface {prop.local_class}.") - else if gbc.is_universal then - v.error(self, "Error: Attempt to define attribute {prop} in the universal class {prop.local_class}.") + else if gbc.is_enum then + v.error(self, "Error: Attempt to define attribute {prop} in the enum class {prop.local_class}.") end else if glob.is_init then if gbc.is_interface then v.error(self, "Error: Attempt to define a constructor {prop} in the class {prop.local_class}.") - else if gbc.is_universal then - v.error(self, "Error: Attempt to define a constructor {prop} in the universal {prop.local_class}.") + else if gbc.is_enum then + v.error(self, "Error: Attempt to define a constructor {prop} in the enum {prop.local_class}.") end end if prop.signature == null then @@ -1114,7 +1114,7 @@ end # Visitor used to build a full method name from multiple tokens private class MethidAccumulator -special Visitor + super Visitor readable var _name: Buffer = new Buffer redef fun visit(n) do diff --git a/src/syntax/scope.nit b/src/syntax/scope.nit index 2fa457a..dbe9f73 100644 --- a/src/syntax/scope.nit +++ b/src/syntax/scope.nit @@ -174,7 +174,7 @@ end # labeled 'do' uses the BreakOnlyEscapableBlock subclass # closures uses the EscapableClosure subclass class EscapableBlock -special ScopeBlock + super ScopeBlock # The label of the block (if any) # Set by the push in EscapableContext readable var _lab: nullable Symbol @@ -201,7 +201,7 @@ end # specific EscapableBlock where only labelled break can be used class BreakOnlyEscapableBlock -special EscapableBlock + super EscapableBlock redef fun is_break_block: Bool do return true init(node: ANode) do super @@ -209,7 +209,7 @@ end # specific EscapableBlock for closures class EscapableClosure -special EscapableBlock + super EscapableBlock # The associated closure readable var _closure: MMClosure @@ -230,7 +230,7 @@ end ############################################################################### class AEscapeExpr -special ALabelable + super ALabelable # The associated escapable block readable var _escapable: nullable EscapableBlock @@ -256,12 +256,12 @@ special ALabelable end redef class AContinueExpr -special AEscapeExpr + super AEscapeExpr redef fun kwname do return "continue" end redef class ABreakExpr -special AEscapeExpr + super AEscapeExpr redef fun kwname do return "break" end diff --git a/src/syntax/syntax.nit b/src/syntax/syntax.nit index 0cbb402..a4cbaf0 100644 --- a/src/syntax/syntax.nit +++ b/src/syntax/syntax.nit @@ -25,7 +25,7 @@ import icode_generation # Loader of nit source files class SrcModuleLoader -special ModuleLoader + super ModuleLoader redef type MODULE: MMSrcModule redef fun file_type do return "nit" @@ -39,7 +39,7 @@ special ModuleLoader break end if not name_is_valid then - context.error( null, "{filename}: Error package name \"{name}\", must start with a lower case letter and contain only letters, digits and '_'." ) + context.error( null, "{filename}: Error module name \"{name}\", must start with a lower case letter and contain only letters, digits and '_'." ) end var lexer = new Lexer(file, filename) diff --git a/src/syntax/syntax_base.nit b/src/syntax/syntax_base.nit index 68f8fa2..d7d4a7c 100644 --- a/src/syntax/syntax_base.nit +++ b/src/syntax/syntax_base.nit @@ -22,7 +22,7 @@ import mmloader # Concrete NIT source module class MMSrcModule -special MMModule + super MMModule # A source module can locate AST nodes of related MM entities # Once a source module AST is no more needed, _nodes is set to null # See ToolContext::keep_ast property in syntax.nit for details @@ -83,7 +83,7 @@ end # Concrete NIT source local classes class MMSrcLocalClass -special MMConcreteClass + super MMConcreteClass # The first related AST node (if any) fun node: nullable AClassdef do return mmmodule.nodes(self).as(nullable AClassdef) @@ -134,7 +134,7 @@ end # Concrete NIT source attribute class MMSrcAttribute -special MMAttribute + super MMAttribute redef fun node: nullable AAttrPropdef do return mmmodule.nodes(self).as(nullable AAttrPropdef) init(name: Symbol, cla: MMLocalClass, n: AAttrPropdef) do @@ -145,7 +145,7 @@ end # Concrete NIT source method class MMSrcMethod -special MMMethod + super MMMethod redef fun is_intern do return false redef fun is_abstract do return false redef fun extern_name do return null @@ -153,7 +153,7 @@ end # Concrete NIT source method for an automatic accesor class MMAttrImplementationMethod -special MMSrcMethod + super MMSrcMethod redef fun node: nullable AAttrPropdef do return mmmodule.nodes(self).as(nullable AAttrPropdef) init(name: Symbol, cla: MMLocalClass, n: AAttrPropdef) do @@ -164,7 +164,7 @@ end # Concrete NIT source method for an automatic read accesor class MMReadImplementationMethod -special MMAttrImplementationMethod + super MMAttrImplementationMethod init(name: Symbol, cla: MMLocalClass, n: AAttrPropdef) do super(name, cla, n) @@ -173,7 +173,7 @@ end # Concrete NIT source method for an automatic write accesor class MMWriteImplementationMethod -special MMAttrImplementationMethod + super MMAttrImplementationMethod init(name: Symbol, cla: MMLocalClass, n: AAttrPropdef) do super(name, cla, n) @@ -182,7 +182,7 @@ end # Concrete NIT source method for an explicit method class MMMethSrcMethod -special MMSrcMethod + super MMSrcMethod redef readable var _is_init: Bool redef readable var _is_intern: Bool redef readable var _is_abstract: Bool @@ -201,8 +201,8 @@ end # Concrete NIT source virtual type class MMSrcTypeProperty -special MMLocalProperty -special MMTypeProperty + super MMLocalProperty + super MMTypeProperty init(name: Symbol, cla: MMLocalClass, n: ATypePropdef) do super(name, cla) @@ -211,7 +211,7 @@ end # Concrete NIT implicit constructor class MMImplicitInit -special MMMethSrcMethod + super MMMethSrcMethod fun super_init: nullable MMLocalProperty is abstract redef fun is_init do return true readable var _unassigned_attributes: Array[MMSrcAttribute] @@ -248,21 +248,21 @@ end # Variable declared with 'var' class VarVariable -special Variable + super Variable redef fun kind do return once "variable" init(n: Symbol, d: ANode) do super end # Parameter of method (declared in signature) class ParamVariable -special Variable + super Variable redef fun kind do return once "parameter" init(n: Symbol, d: nullable ANode) do super end # Automatic variable (like in the 'for' statement) class AutoVariable -special Variable + super Variable redef fun kind do return once "automatic variable" init(n: Symbol, d: ANode) do super end @@ -270,7 +270,7 @@ end # False variable corresponding to closures declared in signatures # Lives in the same namespace than variables class ClosureVariable -special Variable + super Variable redef fun kind do return once "closure" # The signature of the closure @@ -287,7 +287,7 @@ end # Visitor used during the syntax analysis class AbsSyntaxVisitor -special Visitor + super Visitor fun get_type_by_name(clsname: Symbol): MMType do if not _mmmodule.has_global_class_named(clsname) then _tc.fatal_error(_mmmodule.location, "Missing necessary class: \"{clsname}\"") @@ -737,7 +737,7 @@ redef class AExpr end class AAbsAbsSendExpr -special AExpr + super AExpr # The signature of the called property (require is_typed) fun prop_signature: MMSignature is abstract @@ -746,7 +746,7 @@ special AExpr end class AAbsSendExpr -special AAbsAbsSendExpr + super AAbsAbsSendExpr # The invoked method (require is_typed) fun prop: MMMethod is abstract @@ -755,20 +755,20 @@ special AAbsAbsSendExpr end class ASuperInitCall -special AAbsSendExpr + super AAbsSendExpr end redef class ASuperExpr -special ASuperInitCall + super ASuperInitCall fun init_in_superclass: nullable MMMethod is abstract end redef class ANewExpr -special AAbsSendExpr + super AAbsSendExpr end redef class ASendExpr -special ASuperInitCall + super ASuperInitCall # Closure definitions fun closure_defs: nullable Array[AClosureDef] is abstract end @@ -779,19 +779,19 @@ redef class AReassignFormExpr end class ASendReassignExpr -special ASendExpr -special AReassignFormExpr + super ASendExpr + super AReassignFormExpr # The invoked method used to read (require is_typed) # prop is the method used to write fun read_prop: MMMethod is abstract end redef class ACallReassignExpr -special ASendReassignExpr + super ASendReassignExpr end redef class ABraReassignExpr -special ASendReassignExpr + super ASendReassignExpr end redef class AAttrFormExpr @@ -828,7 +828,7 @@ redef class AVarFormExpr end redef class AClosureCallExpr -special AAbsAbsSendExpr + super AAbsAbsSendExpr # Associated closure variable fun variable: ClosureVariable is abstract end diff --git a/src/syntax/typing.nit b/src/syntax/typing.nit index 34dc5f1..379c7f0 100644 --- a/src/syntax/typing.nit +++ b/src/syntax/typing.nit @@ -37,7 +37,7 @@ end # * Resolve call and attribute access # * Check type conformance private class TypingVisitor -special AbsSyntaxVisitor + super AbsSyntaxVisitor redef fun visit(n) do if n != null then n.accept_typing(self) @@ -252,7 +252,7 @@ redef class AConcreteInitPropdef var j = 0 while j < v.local_class.cshe.direct_greaters.length do var c = v.local_class.cshe.direct_greaters[j] - if c.global.is_interface or c.global.is_universal or c.global.is_mixin then + if c.global.is_interface or c.global.is_enum or c.global.is_mixin then j += 1 else if cur_c != null and (c.cshe <= cur_c or cur_c.global.is_mixin) then if c == cur_c then j += 1 @@ -503,7 +503,7 @@ end # An abstract control structure with feature escapable block class AAbsControl -special AExpr + super AExpr # The corresponding escapable block readable var _escapable: nullable EscapableBlock @@ -545,7 +545,7 @@ special AExpr end redef class ADoExpr -special AAbsControl + super AAbsControl redef fun accept_typing(v) do process_control(v, new BreakOnlyEscapableBlock(self), n_label, false) @@ -587,7 +587,7 @@ redef class AIfExpr end redef class AWhileExpr -special AAbsControl + super AAbsControl redef fun accept_typing(v) do process_control(v, new EscapableBlock(self), n_label, true) @@ -619,7 +619,7 @@ special AAbsControl end redef class ALoopExpr -special AAbsControl + super AAbsControl redef fun accept_typing(v) do process_control(v, new EscapableBlock(self), n_label, true) @@ -636,7 +636,7 @@ special AAbsControl end redef class AForExpr -special AAbsControl + super AAbsControl var _variable: nullable AutoVariable redef fun variable do return _variable.as(not null) @@ -1822,7 +1822,7 @@ redef class AClosureDef end class ATypeCheckExpr -special AExpr + super AExpr private fun check_expr_cast(v: TypingVisitor, n_expr: AExpr, n_type: AType) do if not v.check_expr(n_expr) then return @@ -1853,7 +1853,7 @@ special AExpr end redef class AIsaExpr -special ATypeCheckExpr + super ATypeCheckExpr redef fun after_typing(v) do check_expr_cast(v, n_expr, n_type) @@ -1868,7 +1868,7 @@ special ATypeCheckExpr end redef class AAsCastExpr -special ATypeCheckExpr + super ATypeCheckExpr redef fun after_typing(v) do check_expr_cast(v, n_expr, n_type) diff --git a/tests/base_as_cast.nit b/tests/base_as_cast.nit index d1637fa..d383482 100644 --- a/tests/base_as_cast.nit +++ b/tests/base_as_cast.nit @@ -21,7 +21,7 @@ class O end class A -special O + super O init do end end @@ -30,8 +30,8 @@ class U end class B -special A -special U + super A + super U redef fun output do 2.output init do end end diff --git a/tests/base_as_notnull.nit b/tests/base_as_notnull.nit index eaeb85c..5ab6412 100644 --- a/tests/base_as_notnull.nit +++ b/tests/base_as_notnull.nit @@ -23,7 +23,7 @@ class A end class B -special A + super A end fun outa(a: A) do a.output diff --git a/tests/base_assert2.nit b/tests/base_assert2.nit index 779e4bd..e57746c 100644 --- a/tests/base_assert2.nit +++ b/tests/base_assert2.nit @@ -21,7 +21,7 @@ class A end class B -special A + super A fun bar do 2.output end diff --git a/tests/base_attr.nit b/tests/base_attr.nit index bb60484..5c81c2b 100644 --- a/tests/base_attr.nit +++ b/tests/base_attr.nit @@ -40,7 +40,7 @@ class Foo end class Bar -special Foo + super Foo var _a3: Int redef fun run do diff --git a/tests/base_attr3.nit b/tests/base_attr3.nit index 8961423..d6b567b 100644 --- a/tests/base_attr3.nit +++ b/tests/base_attr3.nit @@ -15,7 +15,7 @@ import base_attr2 class B -special A + super A fun foo_b(a: A) do a1.output diff --git a/tests/base_attr4.nit b/tests/base_attr4.nit index 7511824..f7bf6a7 100644 --- a/tests/base_attr4.nit +++ b/tests/base_attr4.nit @@ -22,14 +22,14 @@ class A end class B -special A + super A redef var foo: Int = 20 var bar: Int redef writable = 30 redef var baz: Int redef writable = 40 end class C -special B + super B redef fun foo: Int do return 100 redef fun bar=(i: Int) do i.output redef fun baz: Int do return 400 diff --git a/tests/base_attr5.nit b/tests/base_attr5.nit index c20f718..cc918bd 100644 --- a/tests/base_attr5.nit +++ b/tests/base_attr5.nit @@ -30,7 +30,7 @@ class A end class B -special A + super A #alt1#var foo: Int = 10 #alt2#redef var foo: Int = 10 #alt3#var foo: Int writable = 10 diff --git a/tests/base_attr6.nit b/tests/base_attr6.nit index 3945095..a83f792 100644 --- a/tests/base_attr6.nit +++ b/tests/base_attr6.nit @@ -22,7 +22,7 @@ class A end class B -special A + super A redef fun foo: Int do return super + 10 redef fun bar=(i: Int) do diff --git a/tests/base_attr_def.nit b/tests/base_attr_def.nit index 693fe5d..1b7474d 100644 --- a/tests/base_attr_def.nit +++ b/tests/base_attr_def.nit @@ -40,7 +40,7 @@ class Foo end class Bar -special Foo + super Foo readable writable var _a3: Int redef fun run do diff --git a/tests/base_attr_isset.nit b/tests/base_attr_isset.nit index bb60f8f..bc5ab98 100644 --- a/tests/base_attr_isset.nit +++ b/tests/base_attr_isset.nit @@ -19,12 +19,12 @@ import end interface Object end -universal Int +enum Int fun output is intern fun +(o: Int): Int is intern end -universal Bool +enum Bool fun output is intern end @@ -63,7 +63,7 @@ class Foo end class Bar -special Foo + super Foo var _a3: Integer#!alt1# #!alt2# #alt1#var _a3: Integer = new Integer(9000) #alt2#var _a3: nullable Integer @@ -94,7 +94,7 @@ special Foo end class Baz -special Foo + super Foo end #alt4# var b2 = new Baz diff --git a/tests/base_attr_nullable.nit b/tests/base_attr_nullable.nit index 8961bbb..3e2c6f0 100644 --- a/tests/base_attr_nullable.nit +++ b/tests/base_attr_nullable.nit @@ -19,7 +19,7 @@ import end interface Object end -universal Int +enum Int fun output is intern fun +(o: Int): Int is intern end @@ -57,7 +57,7 @@ class Foo end class Bar -special Foo + super Foo var _a3: Integer redef fun run do diff --git a/tests/base_attr_nullable_int.nit b/tests/base_attr_nullable_int.nit index d71916e..8e10a92 100644 --- a/tests/base_attr_nullable_int.nit +++ b/tests/base_attr_nullable_int.nit @@ -19,7 +19,7 @@ import end interface Object end -universal Int +enum Int fun output is intern fun +(o: Int): Int is intern end @@ -51,7 +51,7 @@ class Foo end class Bar -special Foo + super Foo var _a3: Int redef fun run do diff --git a/tests/base_classid.nit b/tests/base_classid.nit index e98e34e..df23c80 100644 --- a/tests/base_classid.nit +++ b/tests/base_classid.nit @@ -21,7 +21,7 @@ class A end class B -special A + super A fun unreasheable do var a: A @@ -32,7 +32,7 @@ special A end class C -special A + super A init do end end diff --git a/tests/base_closure6.nit b/tests/base_closure6.nit index 0d962ec..f9ecb67 100644 --- a/tests/base_closure6.nit +++ b/tests/base_closure6.nit @@ -28,16 +28,16 @@ class T end class U -special T + super T end class V -special T + super T end class W -special U -special V + super U + super V end fun maybe: Bool do return true diff --git a/tests/base_closure_raf.nit b/tests/base_closure_raf.nit index 325f3ed..1bed473 100644 --- a/tests/base_closure_raf.nit +++ b/tests/base_closure_raf.nit @@ -17,7 +17,7 @@ import base_closure2 class B -special A + super A redef fun foo !bar(i: Int) #!alt13# #!alt14# #!alt15# #alt13# !bar diff --git a/tests/base_eq.nit b/tests/base_eq.nit index 5ec38e5..8c738bb 100644 --- a/tests/base_eq.nit +++ b/tests/base_eq.nit @@ -26,7 +26,7 @@ class A end class B -special A + super A redef fun ==(a: nullable Object): Bool do if not a isa B then diff --git a/tests/base_gen.nit b/tests/base_gen.nit index 454c6e4..2fb2485 100644 --- a/tests/base_gen.nit +++ b/tests/base_gen.nit @@ -33,7 +33,7 @@ class Int end class B -special A + super A redef fun i_to_s(i: Int) do (i+1).output diff --git a/tests/base_gen_f.nit b/tests/base_gen_f.nit index 66ca5c6..5d5cb4b 100644 --- a/tests/base_gen_f.nit +++ b/tests/base_gen_f.nit @@ -25,7 +25,7 @@ class G[E: G[E]] end class G1 -special G[G1] + super G[G1] redef fun foo do 1.output @@ -35,7 +35,7 @@ special G[G1] end class G2 -special G[G2] + super G[G2] redef fun foo do 2.output diff --git a/tests/base_init_inh.nit b/tests/base_init_inh.nit index f67f2c1..f9bee31 100644 --- a/tests/base_init_inh.nit +++ b/tests/base_init_inh.nit @@ -23,7 +23,7 @@ class A end class B -special A + super A init(s: Char) do 'B'.output '['.output @@ -34,7 +34,7 @@ special A end class C -special B + super B init(s) do 'C'.output '['.output @@ -44,7 +44,7 @@ special B end class D -special C + super C init(s) do super end diff --git a/tests/base_init_inherit.nit b/tests/base_init_inherit.nit index b6738e7..9c608b3 100644 --- a/tests/base_init_inherit.nit +++ b/tests/base_init_inherit.nit @@ -20,7 +20,7 @@ class A end class B -special A + super A init cb do 'B'.output @@ -37,7 +37,7 @@ special A end class C -special B + super B init cc do 'C'.output @@ -54,7 +54,7 @@ special B end class M -special A + super A redef fun foo do 'm'.output @@ -63,8 +63,8 @@ special A end class N -special B -special M + super B + super M redef fun foo do 'n'.output @@ -73,8 +73,8 @@ special M end class O -special N -special C + super N + super C init co do 'O'.output diff --git a/tests/base_init_inherit2.nit b/tests/base_init_inherit2.nit index d8e1fcf..0ba0516 100644 --- a/tests/base_init_inherit2.nit +++ b/tests/base_init_inherit2.nit @@ -14,7 +14,7 @@ class A end class B -special A + super A #alt1# init cb #alt1# do #alt1# 'B'.output @@ -39,7 +39,7 @@ special A end class C -special A + super A #alt2# init cc #alt2# do #alt2# 'C'.output @@ -64,7 +64,7 @@ special A end class M -special C + super C redef fun foo do 'm'.output @@ -73,8 +73,8 @@ special C end class N -special B -special M + super B + super M redef fun foo do 'n'.output diff --git a/tests/base_init_inherit3.nit b/tests/base_init_inherit3.nit index 1240768..516361b 100644 --- a/tests/base_init_inherit3.nit +++ b/tests/base_init_inherit3.nit @@ -14,7 +14,7 @@ class A end class M -special A + super A redef fun foo do 'm'.output @@ -23,7 +23,7 @@ special A end class B -special A + super A init cb do 'B'.output @@ -40,7 +40,7 @@ special A end class N -special A + super A redef fun foo do 'n'.output @@ -49,8 +49,8 @@ special A end class O -special M -special B + super M + super B redef fun foo do 'o'.output @@ -59,8 +59,8 @@ special B end class P -special B -special N + super B + super N redef fun foo do 'p'.output @@ -69,18 +69,19 @@ special N end class Q -#alt0#special M -#alt0#special B -#alt0#special N + #alt0#super M + #alt0#super B + #alt0#super N -#alt1#special O -#alt1#special N + #alt1#super O + #alt1#super N -#alt2#special M -#alt2#special P + #alt2#super M + #alt2#super P -#alt3#special O -#alt3#special P + #alt3#super O + #alt3#super P + redef fun foo do 'q'.output diff --git a/tests/base_init_inherit4.nit b/tests/base_init_inherit4.nit index 1fe6773..1ac2f5e 100644 --- a/tests/base_init_inherit4.nit +++ b/tests/base_init_inherit4.nit @@ -39,8 +39,8 @@ interface N end class O -special M -special B + super M + super B redef fun foo do 'o'.output @@ -49,8 +49,8 @@ special B end class P -special B -special N + super B + super N redef fun foo do 'p'.output @@ -59,18 +59,18 @@ special N end class Q -#alt0#special M -#alt0#special B -#alt0#special N + #alt0#super M + #alt0#super B + #alt0#super N -#alt1#special O -#alt1#special N + #alt1#super O + #alt1#super N -#alt2#special M -#alt2#special P + #alt2#super M + #alt2#super P -#alt3#special O -#alt3#special P + #alt3#super O + #alt3#super P redef fun foo do 'q'.output diff --git a/tests/base_init_inherit5.nit b/tests/base_init_inherit5.nit index 82f83b2..ef894f9 100644 --- a/tests/base_init_inherit5.nit +++ b/tests/base_init_inherit5.nit @@ -15,7 +15,7 @@ class A end class B -special A + super A init cb(a, b: Char) do 'B'.output @@ -33,7 +33,7 @@ special A end class C -special B + super B init cc(a,b,c: Char) do 'C'.output @@ -51,7 +51,7 @@ special B end class M -special A + super A redef fun foo do 'm'.output @@ -60,8 +60,8 @@ special A end class N -special B -special M + super B + super M redef fun foo do 'n'.output @@ -70,8 +70,8 @@ special M end class O -special N -special C + super N + super C init co(a,b,c,o: Char) do 'O'.output diff --git a/tests/base_init_linext.nit b/tests/base_init_linext.nit index 51460df..ac93fb4 100644 --- a/tests/base_init_linext.nit +++ b/tests/base_init_linext.nit @@ -26,7 +26,7 @@ class A end class B -special A + super A init do 'B'.output '1'.output @@ -40,7 +40,7 @@ special A end class C -special A + super A init do 'C'.output '1'.output @@ -54,8 +54,8 @@ special A end class D -special B -special C + super B + super C init do 'D'.output '0'.output diff --git a/tests/base_init_linext2.nit b/tests/base_init_linext2.nit index ae301ec..2ecfb60 100644 --- a/tests/base_init_linext2.nit +++ b/tests/base_init_linext2.nit @@ -37,7 +37,7 @@ class A end class B -special A + super A init initb do 'B'.output '1'.output @@ -63,7 +63,7 @@ special A end class C -special A + super A init do 'C'.output '1'.output @@ -94,8 +94,8 @@ special A end class D -special B -special C + super B + super C init initd do #alt1# super 'D'.output diff --git a/tests/base_init_simple.nit b/tests/base_init_simple.nit index 2872514..1ebe670 100644 --- a/tests/base_init_simple.nit +++ b/tests/base_init_simple.nit @@ -7,7 +7,7 @@ class A end class B -special A + super A #alt1#redef init do '1'.output init do '1'.output #!alt1# #alt1#redef init init2 do '2'.output diff --git a/tests/base_inline.nit b/tests/base_inline.nit index 1e85bb6..e684f95 100644 --- a/tests/base_inline.nit +++ b/tests/base_inline.nit @@ -22,13 +22,13 @@ interface Inline__ end class A -special Inline__ + super Inline__ redef fun bar do return 20 fun baz do 3.output end class B -special A + super A redef fun foo do 100.output redef fun bar do return 200 redef fun baz do 300.output diff --git a/tests/base_inline_closure.nit b/tests/base_inline_closure.nit index 645fa8c..0d03612 100644 --- a/tests/base_inline_closure.nit +++ b/tests/base_inline_closure.nit @@ -35,7 +35,7 @@ interface Inline__ end class A -special Inline__ + super Inline__ end var a: A = new A diff --git a/tests/base_inline_closure2.nit b/tests/base_inline_closure2.nit index 31ef7b9..6d64fda 100644 --- a/tests/base_inline_closure2.nit +++ b/tests/base_inline_closure2.nit @@ -35,7 +35,7 @@ interface Inline__ end class A -special Inline__ + super Inline__ end var a: A = new A diff --git a/tests/base_inline_closure_nested.nit b/tests/base_inline_closure_nested.nit index 351dedc..b6778dc 100644 --- a/tests/base_inline_closure_nested.nit +++ b/tests/base_inline_closure_nested.nit @@ -35,7 +35,7 @@ interface Inline__ end class A -special Inline__ + super Inline__ end fun test1 diff --git a/tests/base_inline_nested.nit b/tests/base_inline_nested.nit index f25b454..44867dd 100644 --- a/tests/base_inline_nested.nit +++ b/tests/base_inline_nested.nit @@ -23,7 +23,7 @@ interface Inline__ end class A -special Inline__ + super Inline__ redef fun bar do return 20 redef fun baz do bar.output end diff --git a/tests/base_inline_nested2.nit b/tests/base_inline_nested2.nit index ef70646..c94e692 100644 --- a/tests/base_inline_nested2.nit +++ b/tests/base_inline_nested2.nit @@ -36,7 +36,7 @@ interface Inline__ end class A -special Inline__ + super Inline__ redef fun foo(i: Int) do 'A'.output diff --git a/tests/base_isa.nit b/tests/base_isa.nit index 32861e2..6f7f087 100644 --- a/tests/base_isa.nit +++ b/tests/base_isa.nit @@ -20,7 +20,7 @@ class O end class A -special O + super O init do end end @@ -28,8 +28,8 @@ class U end class B -special A -special U + super A + super U init do end end diff --git a/tests/base_isa_cast.nit b/tests/base_isa_cast.nit index 816cb39..e88a015 100644 --- a/tests/base_isa_cast.nit +++ b/tests/base_isa_cast.nit @@ -20,12 +20,12 @@ class A init do end end class B -special A + super A fun foo do 0.output init do end end class C -special B + super B fun bar do 1.output init do end end diff --git a/tests/base_isa_cast2.nit b/tests/base_isa_cast2.nit index 1551ac3..782277e 100644 --- a/tests/base_isa_cast2.nit +++ b/tests/base_isa_cast2.nit @@ -21,7 +21,7 @@ class A end class B -special A + super A fun foo(i: Int) do i.output init do end end diff --git a/tests/base_isa_cast3.nit b/tests/base_isa_cast3.nit index 533ad77..f50fa77 100644 --- a/tests/base_isa_cast3.nit +++ b/tests/base_isa_cast3.nit @@ -20,7 +20,7 @@ class A init do end end class B -special A + super A fun foo(i: Int) do i.output fun bar: Bool do return true init do end diff --git a/tests/base_isa_cast4.nit b/tests/base_isa_cast4.nit index ebc1a27..65ae3d6 100644 --- a/tests/base_isa_cast4.nit +++ b/tests/base_isa_cast4.nit @@ -21,7 +21,7 @@ class A end class B -special A + super A fun foo(i: Int) do i.output init do end end diff --git a/tests/base_isa_cast_self.nit b/tests/base_isa_cast_self.nit index c251d40..1afcd14 100644 --- a/tests/base_isa_cast_self.nit +++ b/tests/base_isa_cast_self.nit @@ -47,13 +47,13 @@ class A end class B -special A + super A fun foo do 0.output init do end end class C -special B + super B fun bar do 1.output init do end end diff --git a/tests/base_primitive.nit b/tests/base_primitive.nit index 8b64c56..3b0df84 100644 --- a/tests/base_primitive.nit +++ b/tests/base_primitive.nit @@ -44,7 +44,7 @@ class A end class B -special A + super A redef fun bar(i: Int) do (i*100).output diff --git a/tests/base_prot2.nit b/tests/base_prot2.nit index 15226d8..4611f85 100644 --- a/tests/base_prot2.nit +++ b/tests/base_prot2.nit @@ -17,7 +17,7 @@ private import base_prot class A2 -special A + super A fun o do pub diff --git a/tests/base_sig_inh.nit b/tests/base_sig_inh.nit index 9770c24..76a24c1 100644 --- a/tests/base_sig_inh.nit +++ b/tests/base_sig_inh.nit @@ -26,7 +26,7 @@ class A end class B -special A + super A redef fun f0 do 0.output redef fun f1(a: Int, b: Int) do (a+b).output redef fun f2(a,b) do (a+b).output diff --git a/tests/base_simple.nit b/tests/base_simple.nit index eca7e08..a8a645f 100644 --- a/tests/base_simple.nit +++ b/tests/base_simple.nit @@ -40,7 +40,7 @@ class A end class B -special A + super A redef fun bar(i: Int) do i.output diff --git a/tests/base_simple2.nit b/tests/base_simple2.nit index 9796cff..3c4c556 100644 --- a/tests/base_simple2.nit +++ b/tests/base_simple2.nit @@ -44,7 +44,7 @@ class A end class B -special A + super A redef fun bar(i: Int) do i.output diff --git a/tests/base_super_linext.nit b/tests/base_super_linext.nit index b6bea33..ed1d84f 100644 --- a/tests/base_super_linext.nit +++ b/tests/base_super_linext.nit @@ -29,7 +29,7 @@ class A end class B -special A + super A redef fun foo do 'B'.output @@ -46,7 +46,7 @@ special A end class C -special A + super A redef fun foo do 'C'.output @@ -63,8 +63,8 @@ special A end class D -special B -special C + super B + super C redef fun foo do 'D'.output diff --git a/tests/base_var_assignment_flow.nit b/tests/base_var_assignment_flow.nit index bd0be76..91bab93 100644 --- a/tests/base_var_assignment_flow.nit +++ b/tests/base_var_assignment_flow.nit @@ -20,11 +20,11 @@ interface Object fun output is abstract end -universal Int +enum Int redef fun output is intern end -universal Bool +enum Bool redef fun output is intern end diff --git a/tests/base_var_type_evolution.nit b/tests/base_var_type_evolution.nit index f62d58e..38e6caf 100644 --- a/tests/base_var_type_evolution.nit +++ b/tests/base_var_type_evolution.nit @@ -21,12 +21,12 @@ class A end class B -special A + super A fun b do 'B'.output end class C -special A + super A fun c do 'C'.output end diff --git a/tests/base_var_type_evolution_null.nit b/tests/base_var_type_evolution_null.nit index 15012e7..6a5273e 100644 --- a/tests/base_var_type_evolution_null.nit +++ b/tests/base_var_type_evolution_null.nit @@ -20,7 +20,7 @@ class A end class B -special A + super A end fun rand: Bool do return true diff --git a/tests/base_virtual_type.nit b/tests/base_virtual_type.nit index ec68f06..db6a045 100644 --- a/tests/base_virtual_type.nit +++ b/tests/base_virtual_type.nit @@ -23,7 +23,7 @@ class A end class B -special A + super A init do end end diff --git a/tests/base_virtual_type2.nit b/tests/base_virtual_type2.nit index b2fdef8..edc99cc 100644 --- a/tests/base_virtual_type2.nit +++ b/tests/base_virtual_type2.nit @@ -23,7 +23,7 @@ class A end class B -special A + super A init do end end @@ -33,7 +33,7 @@ class T end class U -special T + super T redef fun foo do 1.output init do end end diff --git a/tests/base_virtual_type3.nit b/tests/base_virtual_type3.nit index e8df582..c2794fe 100644 --- a/tests/base_virtual_type3.nit +++ b/tests/base_virtual_type3.nit @@ -18,7 +18,7 @@ import base_virtual_type2 import array class C -special A + super A readable writable var _tab: nullable Array[E] init do end end diff --git a/tests/base_virtual_type5.nit b/tests/base_virtual_type5.nit index 8d25f7c..86d2be3 100644 --- a/tests/base_virtual_type5.nit +++ b/tests/base_virtual_type5.nit @@ -17,7 +17,7 @@ import base_virtual_type2 class C -special A + super A redef type E: U init do end end diff --git a/tests/base_virtual_type_self.nit b/tests/base_virtual_type_self.nit index 214fa90..964fc39 100644 --- a/tests/base_virtual_type_self.nit +++ b/tests/base_virtual_type_self.nit @@ -28,7 +28,7 @@ class A[E] end class B -#alt3#special A[Int] + #alt3#super A[Int] type U: Int fun test diff --git a/tests/bench_complex_sort.nit b/tests/bench_complex_sort.nit index 1dac6e4..ad72cc6 100644 --- a/tests/bench_complex_sort.nit +++ b/tests/bench_complex_sort.nit @@ -21,7 +21,7 @@ interface Elt end class A -special Elt + super Elt var _a: Int redef fun val1: Int do return _a @@ -29,7 +29,7 @@ special Elt end class Elt2 -special Elt + super Elt var _b: Int redef fun val1: Int do return _b/2 redef fun val2: Int do return _b @@ -37,12 +37,12 @@ special Elt end class B -special Elt2 + super Elt2 init(i: Int) do initelt2(i) end class C -special Elt + super Elt var _c: Int var _d: Int redef fun val1: Int do return _c end @@ -55,8 +55,8 @@ special Elt end class D -special A -special Elt2 + super A + super Elt2 redef fun val1: Int do return _a end redef fun val2: Int do return _b end @@ -67,14 +67,14 @@ special Elt2 end class E -special Elt2 + super Elt2 redef fun val1: Int do return 5 end init(i: Int) do initelt2(i) end class EltSorter -special AbstractSorter[Elt] + super AbstractSorter[Elt] redef fun compare(a: Elt, b: Elt): Int do if _is_val1 then diff --git a/tests/bench_netsim.nit b/tests/bench_netsim.nit index 6a9ade7..d4a9122 100644 --- a/tests/bench_netsim.nit +++ b/tests/bench_netsim.nit @@ -23,7 +23,7 @@ class Node end class WakeUpNode -special Node + super Node fun wake_up is abstract # Wake up the node fun wake_up_in(d: Int) @@ -35,7 +35,7 @@ special Node end class NodeSource -special Node + super Node var _nexts: nullable ArraySet[NodeSink] = null fun attach(n: NodeSink) # Add the sink `n' the the connected nodes @@ -70,7 +70,7 @@ special Node end class NodeSink -special Node + super Node fun recieve(n: NodeSource) is abstract # the `n' has emeted a signal end @@ -131,8 +131,8 @@ end # class BeepSource -special NodeSource -special WakeUpNode + super NodeSource + super WakeUpNode redef fun wake_up do send @@ -153,7 +153,7 @@ special WakeUpNode end class CountSink -special NodeSink + super NodeSink readable var _count: Int = 0 redef fun recieve(n: NodeSource) do @@ -162,7 +162,7 @@ special NodeSink end class SimpleCountSink -special CountSink + super CountSink init(name: String) do @@ -171,8 +171,8 @@ special CountSink end class NodeAlternate -special NodeSink -special NodeSource + super NodeSink + super NodeSource var _last: nullable NodeSource redef fun recieve(n: NodeSource) do @@ -189,8 +189,8 @@ special NodeSource end class NodeEat -special CountSink -special NodeSource + super CountSink + super NodeSource var _limit: Int redef fun recieve(n: NodeSource) do @@ -211,9 +211,9 @@ special NodeSource end class NodeDelay -special NodeSource -special NodeSink -special WakeUpNode + super NodeSource + super NodeSink + super WakeUpNode var _delay: Int redef fun recieve(n: NodeSource) do diff --git a/tests/bench_send.nit b/tests/bench_send.nit index 2a7fa1b..dcf2d9b 100644 --- a/tests/bench_send.nit +++ b/tests/bench_send.nit @@ -52,7 +52,7 @@ class A end class B -special A + super A redef fun val: Int do return 1 @@ -64,7 +64,7 @@ special A end class C -special A + super A redef fun val: Int do return 2 @@ -76,7 +76,7 @@ special A end class D -special A + super A redef fun val: Int do return 3 diff --git a/tests/bench_send2.nit b/tests/bench_send2.nit index cf863b8..e296465 100644 --- a/tests/bench_send2.nit +++ b/tests/bench_send2.nit @@ -22,32 +22,32 @@ class A init do end end class B -special A + super A redef fun foo do end init do end end class C -special A + super A init do end end class D -special B -special C + super B + super C init do end end class E -special B -special C + super B + super C redef fun foo do end init do end end class F -special D -special E + super D + super E redef fun foo do end init do end diff --git a/tests/error_gen_f_inh_clash.nit b/tests/error_gen_f_inh_clash.nit index aae0c6b..6ea638d 100644 --- a/tests/error_gen_f_inh_clash.nit +++ b/tests/error_gen_f_inh_clash.nit @@ -17,6 +17,6 @@ import base_gen_f class G3 -special G1 -special G2 + super G1 + super G2 end diff --git a/tests/error_inh_clash.nit b/tests/error_inh_clash.nit index b0eafbb..f9e31b5 100644 --- a/tests/error_inh_clash.nit +++ b/tests/error_inh_clash.nit @@ -15,6 +15,6 @@ # limitations under the License. class A -special Array[Int] -special Array[Char] + super Array[Int] + super Array[Char] end diff --git a/tests/error_inh_loop.nit b/tests/error_inh_loop.nit index 8c9cf1b..510e4bd 100644 --- a/tests/error_inh_loop.nit +++ b/tests/error_inh_loop.nit @@ -18,13 +18,13 @@ class Object end class A -special B + super B end class B -special C + super C end class C -special A + super A end diff --git a/tests/error_needed_method.nit b/tests/error_needed_method.nit index 30460d1..b9b7ac8 100644 --- a/tests/error_needed_method.nit +++ b/tests/error_needed_method.nit @@ -22,8 +22,8 @@ end interface Discrete end -universal Int -special Discrete +enum Int + super Discrete end interface Collection[E] @@ -32,15 +32,15 @@ end class String end -universal NativeString +enum NativeString end class Array[E] -special Collection[E] + super Collection[E] end class Range[E] -special Collection[E] + super Collection[E] end #alt1#var a = [1, 2] diff --git a/tests/error_prop_glob.nit b/tests/error_prop_glob.nit index 8010187..e6b29d2 100644 --- a/tests/error_prop_glob.nit +++ b/tests/error_prop_glob.nit @@ -26,6 +26,6 @@ class B fun toto do end end class C -special A -special B + super A + super B end diff --git a/tests/error_prop_loc.nit b/tests/error_prop_loc.nit index 3aceac3..b74fc3c 100644 --- a/tests/error_prop_loc.nit +++ b/tests/error_prop_loc.nit @@ -22,14 +22,14 @@ class A fun toto do end end class B -special A + super A redef fun toto do end end class C -special A + super A redef fun toto do end end class D -special B -special C + super B + super C end diff --git a/tests/error_spe_attr.nit b/tests/error_spe_attr.nit index 235eef4..75feb69 100644 --- a/tests/error_spe_attr.nit +++ b/tests/error_spe_attr.nit @@ -18,6 +18,6 @@ class A var _a: Int end class B -special A + super A redef var _a: Object end diff --git a/tests/error_spe_fun.nit b/tests/error_spe_fun.nit index c98cc5a..7a3ae87 100644 --- a/tests/error_spe_fun.nit +++ b/tests/error_spe_fun.nit @@ -19,6 +19,6 @@ fun toto: Int do return 1 end end class B -special A + super A redef fun toto do end end diff --git a/tests/error_spe_param.nit b/tests/error_spe_param.nit index 590802a..a3615ea 100644 --- a/tests/error_spe_param.nit +++ b/tests/error_spe_param.nit @@ -20,6 +20,6 @@ fun toto(i: Int) do end end class B -special A + super A redef fun toto(c: Object) do end end diff --git a/tests/error_spe_param2.nit b/tests/error_spe_param2.nit index e607091..b0d63ac 100644 --- a/tests/error_spe_param2.nit +++ b/tests/error_spe_param2.nit @@ -20,6 +20,6 @@ fun toto(i: Int) do end end class B -special A + super A redef fun toto(c: Char) do end end diff --git a/tests/error_spe_proc.nit b/tests/error_spe_proc.nit index 5a474df..0b23aef 100644 --- a/tests/error_spe_proc.nit +++ b/tests/error_spe_proc.nit @@ -19,6 +19,6 @@ fun toto do end end class B -special A + super A redef fun toto: Int do return 2end end diff --git a/tests/error_spe_ret.nit b/tests/error_spe_ret.nit index 313c2ce..42c1848 100644 --- a/tests/error_spe_ret.nit +++ b/tests/error_spe_ret.nit @@ -19,6 +19,6 @@ fun toto: Int do return 1 end end class B -special A + super A redef fun toto: Char do return 'a' end end diff --git a/tests/error_type_not_ok.nit b/tests/error_type_not_ok.nit index 16cbee2..cfe5302 100644 --- a/tests/error_type_not_ok.nit +++ b/tests/error_type_not_ok.nit @@ -18,6 +18,6 @@ #alt1#end class A -special Fail + super Fail end diff --git a/tests/error_type_not_ok2.nit b/tests/error_type_not_ok2.nit index 3aad87b..4e49e03 100644 --- a/tests/error_type_not_ok2.nit +++ b/tests/error_type_not_ok2.nit @@ -18,6 +18,6 @@ #alt1#end class B -special Array[Fail] + super Array[Fail] end diff --git a/tests/example_beer.nit b/tests/example_beer.nit index 9380c88..3b3744d 100644 --- a/tests/example_beer.nit +++ b/tests/example_beer.nit @@ -29,7 +29,7 @@ private end class OneBottle -special Bottle + super Bottle redef fun sing do sing_start @@ -45,7 +45,7 @@ special Bottle end class TwoBottles -special Bottle + super Bottle redef fun sing do sing_start @@ -61,7 +61,7 @@ special Bottle end class Bottles -special Bottle + super Bottle redef fun sing do diff --git a/tests/example_objet.nit b/tests/example_objet.nit index ac72c4e..1bcc313 100644 --- a/tests/example_objet.nit +++ b/tests/example_objet.nit @@ -305,7 +305,7 @@ private end class RayonNormal -special Rayon + super Rayon init(r: String) do @@ -317,7 +317,7 @@ end class RayonFroid # Les super-classes sont déclarés avec le mot clé "special". # Implicitement, c'est "Object", la classe de tous les objets. -special Rayon + super Rayon # Tant qu'on parle d'implicite, en l'absence de bloc de propriétés, # celles-ci sont déclarées en tant que "public" diff --git a/tests/example_sorter.nit b/tests/example_sorter.nit index 7a5d8ab..23da9ac 100644 --- a/tests/example_sorter.nit +++ b/tests/example_sorter.nit @@ -16,7 +16,7 @@ class BackIntSorter -special AbstractSorter[Int] + super AbstractSorter[Int] redef fun compare(a: Int, b: Int): Int do return b <=> a @@ -26,7 +26,7 @@ special AbstractSorter[Int] end class DecimalSorter -special AbstractSorter[Int] + super AbstractSorter[Int] redef fun compare(a: Int, b: Int): Int do return (a%10) <=> (b%10) diff --git a/tests/icode_dmr_inh.nit b/tests/icode_dmr_inh.nit index 02a1752..b71ec67 100644 --- a/tests/icode_dmr_inh.nit +++ b/tests/icode_dmr_inh.nit @@ -5,7 +5,7 @@ class B end class A -special B + super B redef fun foo do print "afoo" end diff --git a/tests/module_1.nit b/tests/module_1.nit index 32f758a..f614cfe 100644 --- a/tests/module_1.nit +++ b/tests/module_1.nit @@ -40,7 +40,7 @@ class A # class 1 end class B # class 2 -special A + super A redef fun a12 do print(12) diff --git a/tests/module_2.nit b/tests/module_2.nit index a7a944e..e73f7f6 100644 --- a/tests/module_2.nit +++ b/tests/module_2.nit @@ -34,7 +34,7 @@ end # B is class 4 class C # class 5 -special B + super B redef fun all25 do print(250) diff --git a/tests/module_simple.nit b/tests/module_simple.nit index e2e675c..ba9dc49 100644 --- a/tests/module_simple.nit +++ b/tests/module_simple.nit @@ -20,12 +20,12 @@ class A end class B -special A + super A redef fun q(x: A): B do return self end end class C -special B + super B fun r(x: B) do end fun s: B do return self end var _a: B diff --git a/tests/sav/base_init_inherit3.sav b/tests/sav/base_init_inherit3.sav index 7cf110c..daceadd 100644 --- a/tests/sav/base_init_inherit3.sav +++ b/tests/sav/base_init_inherit3.sav @@ -1 +1 @@ -./base_init_inherit3.nit:82,1--87,7: Error: No property Q::foo is inherited. Remove the redef keyword to define a new property. +./base_init_inherit3.nit:85,2--88,7: Error: No property Q::foo is inherited. Remove the redef keyword to define a new property. diff --git a/tests/sav/error_kern_attr_int.sav b/tests/sav/error_kern_attr_int.sav index 3c595a3..f5e7a14 100644 --- a/tests/sav/error_kern_attr_int.sav +++ b/tests/sav/error_kern_attr_int.sav @@ -1 +1 @@ -./error_kern_attr_int.nit:18,2--18: Error: Attempt to define attribute _toto in the universal class Int. +./error_kern_attr_int.nit:18,2--18: Error: Attempt to define attribute _toto in the enum class Int. diff --git a/tests/sav/error_type_not_ok.sav b/tests/sav/error_type_not_ok.sav index 13f88f2..f2131f6 100644 --- a/tests/sav/error_type_not_ok.sav +++ b/tests/sav/error_type_not_ok.sav @@ -1 +1 @@ -./error_type_not_ok.nit:21,9--12: Type error: class Fail not found in module error_type_not_ok. +./error_type_not_ok.nit:21,8--11: Type error: class Fail not found in module error_type_not_ok. diff --git a/tests/sav/error_type_not_ok2.sav b/tests/sav/error_type_not_ok2.sav index 234cc18..3a07f73 100644 --- a/tests/sav/error_type_not_ok2.sav +++ b/tests/sav/error_type_not_ok2.sav @@ -1 +1 @@ -./error_type_not_ok2.nit:21,15--18: Type error: class Fail not found in module error_type_not_ok2. +./error_type_not_ok2.nit:21,14--17: Type error: class Fail not found in module error_type_not_ok2. diff --git a/tests/sav/error_type_not_ok2_alt1.sav b/tests/sav/error_type_not_ok2_alt1.sav index 549a8af..94da281 100644 --- a/tests/sav/error_type_not_ok2_alt1.sav +++ b/tests/sav/error_type_not_ok2_alt1.sav @@ -1 +1 @@ -alt/error_type_not_ok2_alt1.nit:21,15--18: Type error: 'Fail' is a generic class. +alt/error_type_not_ok2_alt1.nit:21,14--17: Type error: 'Fail' is a generic class. diff --git a/tests/sav/error_type_not_ok_alt1.sav b/tests/sav/error_type_not_ok_alt1.sav index 6b6a3c2..7488aad 100644 --- a/tests/sav/error_type_not_ok_alt1.sav +++ b/tests/sav/error_type_not_ok_alt1.sav @@ -1 +1 @@ -alt/error_type_not_ok_alt1.nit:21,9--12: Type error: 'Fail' is a generic class. +alt/error_type_not_ok_alt1.nit:21,8--11: Type error: 'Fail' is a generic class. diff --git a/tests/sol.nit b/tests/sol.nit index 073423a..1525ba7 100644 --- a/tests/sol.nit +++ b/tests/sol.nit @@ -18,7 +18,7 @@ import game class Playing -special SDL_EventListener + super SDL_EventListener redef fun on_mouse_button(evt: SDL_MouseButtonEvent) do if evt.is_pressed then @@ -240,7 +240,7 @@ redef class Sprite end class MovingSprite -special Sprite + super Sprite var _rx: Float # Real X axis (sub-pixel) var _ry: Float # Real Y axix (sub-pixel) readable var _vx: Float # X velocity (speed) @@ -259,7 +259,7 @@ special Sprite end class Player -special MovingSprite + super MovingSprite fun update_one_step(mx: Int, my: Int) do @@ -361,7 +361,7 @@ special MovingSprite end class Box -special Sprite + super Sprite var _images: Array[SDL_Surface] var _image_number: Int var _image_delay: Int @@ -411,7 +411,7 @@ special Sprite end class Particle -special MovingSprite + super MovingSprite fun update_one_step: Bool do _ttl = _ttl - 1 diff --git a/tests/test_boxing.nit b/tests/test_boxing.nit index 2263140..8683131 100644 --- a/tests/test_boxing.nit +++ b/tests/test_boxing.nit @@ -27,7 +27,8 @@ class Gene[T] init do end end -class GeneBool special Gene[Bool] +class GeneBool + super Gene[Bool] fun a=(b: Bool) do _a_ = b diff --git a/tests/test_calls.nit b/tests/test_calls.nit index bd2ca0b..b8edf26 100644 --- a/tests/test_calls.nit +++ b/tests/test_calls.nit @@ -28,7 +28,7 @@ class A end class B -special A + super A redef fun foo do 2.output @@ -38,7 +38,7 @@ special A end class C -special B + super B fun baz do bar diff --git a/tests/test_gen.nit b/tests/test_gen.nit index 93718dc..6c2c763 100644 --- a/tests/test_gen.nit +++ b/tests/test_gen.nit @@ -28,7 +28,7 @@ class Toto[E] end class TestNative -special ArrayCapable[Int] + super ArrayCapable[Int] init do diff --git a/tests/test_gen_inh.nit b/tests/test_gen_inh.nit index c8545bb..d31db4b 100644 --- a/tests/test_gen_inh.nit +++ b/tests/test_gen_inh.nit @@ -17,7 +17,7 @@ import kernel class Gen1[E, F] -special Object + super Object readable writable var _e: E var _f_: F fun f: F do return _f_ end @@ -27,12 +27,12 @@ special Object end class Gen2[G: Int] -special Gen1[G, Char] + super Gen1[G, Char] init(e:G) do super(e) end class Gen3[H: Int] -special Gen1[H, Char] + super Gen1[H, Char] redef readable redef writable redef var _e: H redef var _f_: Char = 'N' redef fun f: Char do return _f_ end diff --git a/tests/test_genplus.nit b/tests/test_genplus.nit index 4050703..0c01486 100644 --- a/tests/test_genplus.nit +++ b/tests/test_genplus.nit @@ -20,14 +20,14 @@ class T end class U -special T + super T end class A[E: T] end class B -special A[T] + super A[T] end #class A[F: U] diff --git a/tests/test_inheritance.nit b/tests/test_inheritance.nit index 11deb8f..dc9da19 100644 --- a/tests/test_inheritance.nit +++ b/tests/test_inheritance.nit @@ -24,7 +24,7 @@ class A end class B -special A + super A redef fun g do print(2) end redef fun i do print(2) end @@ -32,7 +32,7 @@ special A end class C -special A + super A redef fun h do print(3) end redef fun i do print(3) end @@ -40,8 +40,8 @@ special A end class D -special B -special C + super B + super C redef fun i do print(4) end init do end diff --git a/tests/test_meta.nit b/tests/test_meta.nit index 198f228..b649f99 100644 --- a/tests/test_meta.nit +++ b/tests/test_meta.nit @@ -39,7 +39,7 @@ class A end class B -special A + super A redef fun foo do printn("B") @@ -47,7 +47,7 @@ special A end class C -special A + super A fun foo2 do printn("C") @@ -55,8 +55,8 @@ special A end class D -special B -special C + super B + super C redef fun foo do printn("D") diff --git a/tests/test_multiconstraint.nit b/tests/test_multiconstraint.nit index cebc6d7..d3c0bc8 100644 --- a/tests/test_multiconstraint.nit +++ b/tests/test_multiconstraint.nit @@ -26,7 +26,7 @@ class A end class B -special A + super A redef fun foo do 21.output @@ -40,7 +40,7 @@ special A end class C -special B + super B redef fun foo do 31.output diff --git a/tests/test_multiconstraint_inh.nit b/tests/test_multiconstraint_inh.nit index 99190b1..a3ec367 100644 --- a/tests/test_multiconstraint_inh.nit +++ b/tests/test_multiconstraint_inh.nit @@ -24,7 +24,7 @@ class I[F] end class J -special I[A] + super I[A] fun bar do 2.output end init do end @@ -35,7 +35,7 @@ class G[E] end class H[F] -special G[A] + super G[A] redef fun baz(e: J) do e.bar end init do end diff --git a/tests/test_obj.nit b/tests/test_obj.nit index 0520f7b..f4a430b 100644 --- a/tests/test_obj.nit +++ b/tests/test_obj.nit @@ -30,7 +30,7 @@ class O end class A -special O + super O redef fun foo do printn(11) @@ -45,7 +45,7 @@ special O end class B -special A + super A redef fun foo do printn(12) diff --git a/tests/test_super.nit b/tests/test_super.nit index 2f8d427..1a0036f 100644 --- a/tests/test_super.nit +++ b/tests/test_super.nit @@ -24,7 +24,7 @@ class A end class B -special A + super A redef fun foo do 1.output diff --git a/tests/test_super_gen.nit b/tests/test_super_gen.nit index 7d7aef5..bb749df 100644 --- a/tests/test_super_gen.nit +++ b/tests/test_super_gen.nit @@ -25,7 +25,7 @@ class A[E: Object, F: Object] end class B[G: Int] -special A[Bool,G] + super A[Bool,G] redef fun foo(b: Bool, g: G): G do 1.output diff --git a/tests/test_super_gen_raf.nit b/tests/test_super_gen_raf.nit index 60b72e1..4800390 100644 --- a/tests/test_super_gen_raf.nit +++ b/tests/test_super_gen_raf.nit @@ -17,7 +17,7 @@ import test_super_gen class C[H: Int] -special A[H, Int] + super A[H, Int] redef fun foo(a: H, b: Int): H do return super diff --git a/tests/test_super_param.nit b/tests/test_super_param.nit index b82998e..1ae39e2 100644 --- a/tests/test_super_param.nit +++ b/tests/test_super_param.nit @@ -24,7 +24,7 @@ class A end class B -special A + super A redef fun foo(i: Int): Int do return super + 5 diff --git a/tests/test_super_param_raf2.nit b/tests/test_super_param_raf2.nit index 1723467..fc0bae4 100644 --- a/tests/test_super_param_raf2.nit +++ b/tests/test_super_param_raf2.nit @@ -17,7 +17,7 @@ import test_super_param_raf class C -special B + super B redef fun foo(a: Int): Int do return super * 2 diff --git a/tests/test_variance_attr.nit b/tests/test_variance_attr.nit index 7ae65d3..6717b8c 100644 --- a/tests/test_variance_attr.nit +++ b/tests/test_variance_attr.nit @@ -24,7 +24,7 @@ class A end class B -special A + super A redef var _foo: nullable Int redef var _bar: nullable B redef fun output do 'B'.output end diff --git a/tests/test_variance_param.nit b/tests/test_variance_param.nit index 00009d2..9a13498 100644 --- a/tests/test_variance_param.nit +++ b/tests/test_variance_param.nit @@ -26,7 +26,7 @@ class A end class B -special A + super A redef type T: B redef type U: Int redef fun foo(a: T) do a.out @@ -38,7 +38,7 @@ special A end redef class Int -special B + super B redef type T: Int redef fun foo(a: T) do a.out redef fun bar(b: U) do b.out diff --git a/tests/test_variance_ret.nit b/tests/test_variance_ret.nit index 02093a2..5e19834 100644 --- a/tests/test_variance_ret.nit +++ b/tests/test_variance_ret.nit @@ -39,7 +39,7 @@ class A end class B -special A + super A redef fun foo: B do return new B @@ -61,7 +61,7 @@ special A end redef class Int -special B + super B redef fun foo: Int do return 8