+++ /dev/null
-p: 5q: 67
\ No newline at end of file
+++ /dev/null
-2**0*1*
\ No newline at end of file
+++ /dev/null
-2530513
\ No newline at end of file
+++ /dev/null
-55125012
\ No newline at end of file
+++ /dev/null
-0010110010
\ No newline at end of file
+++ /dev/null
-012345
\ No newline at end of file
+++ /dev/null
-11111
\ No newline at end of file
+++ /dev/null
-D34=578
\ No newline at end of file
+++ /dev/null
-11211221122132
\ No newline at end of file
+++ /dev/null
-abcdefghijklnmopqrstuvwxyz
-#"\
\ No newline at end of file
+++ /dev/null
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-2008 Jean Privat <jean@pryen.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class A
- fun p=(i: Int)
- do
- printn("p: ", i)
- end
- fun q=(i: Int, j: Int)
- do
- printn("q: ", i, j)
- end
-
- init
- do
- end
-end
-
-var a = new A
-a.p = 5
-a.q(6) = 7
+++ /dev/null
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-2008 Jean Privat <jean@pryen.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-class Ant
- redef fun to_s: String
- do
- return "*"
- end
-
- init do end
-end
-
-var t = [new Ant, new Ant]
-printn(t.length)
-printn(t)
-var i = 0
-while i < t.length do
- printn(i)
- printn(t[i])
- i = i + 1
-end
+++ /dev/null
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-2008 Jean Privat <jean@pryen.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
- var t = [5,3]
- printn(t.length)
- printn(t)
- var i = 0
- while i < t.length do
- printn(i)
- printn(t[i])
- i = i + 1
- end
+++ /dev/null
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-2008 Jean Privat <jean@pryen.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-redef class Sys
- var _i: Int = 0
- var _j: Int = 0
- redef fun main
- do
- printn(5)
- _i = 5
- printn(_i)
- _i = 12
- printn(_i)
- _j = 50
- printn(_j)
- printn(_i)
- end
-end
+++ /dev/null
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-2008 Jean Privat <jean@pryen.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class A
- var _a_: Int = 0
-
- fun a: Int
- do
- return _a_ * 10
- end
-
- fun a=(a: Int)
- do
- _a_ = a / 10
- end
-
-
-
- init
- do
- end
-end
-
-
-var a = new A
-printn(a.a, a._a_)
-a.a = 10
-printn(a.a, a._a_)
-a._a_ = 10
-printn(a.a, a._a_)
+++ /dev/null
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-2008 Jean Privat <jean@pryen.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
- do
- printn(0)
- end
- var a = 1
- do
- printn(a)
- end
- var b = 2
- while b < 3 do
- printn(b)
- b = b + 1
- end
- var c = 3
- while c < 4 do
- printn(c)
- c = c + 1
- end
- var d = 4
- var e = 2
- while e > 0 do
- printn(d)
- d = d + 1
- e = e - 1
- end
+++ /dev/null
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-2008 Jean Privat <jean@pryen.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-var a = true
-var b = false
-
-if true then
- printn(1)
-else if false then
- printn(0)
-else if true then
- printn(0)
-else
- printn(0)
-end
-
-if false then
- printn(0)
-else if false then
- printn(0)
-else if true then
- printn(1)
-else
- printn(0)
-end
-
-if false then
- printn(0)
-else if false then
- printn(0)
-else
- printn(1)
-end
-
-if a then
- printn(1)
-else
- printn(0)
-end
-
-if b then
- printn(0)
-else
- printn(1)
-end
+++ /dev/null
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-2008 Jean Privat <jean@pryen.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-class A
- fun foo
- do
- printn("A")
- end
- fun blup(a: Int)
- do
- blup2(a, 1)
- end
- fun blup2(a: Int, b : Int)
- do
- printn(a+b)
- end
- fun blop(a: Int, b: Int...)
- do
- var i = b.iterator
- while i.is_ok do
- printn(a+i.item)
- i.next
- end
- end
-end
-
-class B
- super A
- redef fun foo
- do
- printn("B")
- end
-end
-
-class C
- super A
- fun foo2
- do
- printn("C")
- end
-end
-
-class D
- super B
- super C
- redef fun foo
- do
- printn("D")
- end
-
- init do end
-end
-
-fun test1
-do
- var b: B
- b = new D
- b.foo
- b.blup2(1,2)
- b.blup(3)
-end
-
-fun test2
-do
- var b = new D
- var a = [1,2,3]
- var u: Object
- printn("=",5)
- b.blop(5,2,3)
-end
-
-test1
-test2
+++ /dev/null
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-2008 Jean Privat <jean@pryen.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-class O
- fun foo
- do
- printn(10)
- end
-
- fun bar
- do
- printn(20)
- end
-
- init do end
-end
-
-class A
- super O
- redef fun foo
- do
- printn(11)
- end
-
- redef fun bar
- do
- printn(21)
- end
-
- init do end
-end
-
-class B
- super A
- redef fun foo
- do
- printn(12)
- end
-
- fun baz
- do
- printn(32)
- end
-
- init do end
-end
-
-var a = new A
-var ab: A = new B
-var b = new B
-a.foo
-a.bar
-ab.foo
-ab.bar
-b.foo
-b.bar
-b.baz
+++ /dev/null
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-2008 Jean Privat <jean@pryen.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-printn("abcdefghijklnmopqrstuvwxyz")
-printn("\n#\"\\")