Index: uspace/dist/sysel/property.sy
===================================================================
--- uspace/dist/sysel/property.sy	(revision 6ba20a6b2dda5a2453cdb689201f0b9bf36bece3)
+++ uspace/dist/sysel/property.sy	(revision 6ba20a6b2dda5a2453cdb689201f0b9bf36bece3)
@@ -0,0 +1,99 @@
+--
+-- Copyright (c) 2010 Jiri Svoboda
+-- All rights reserved.
+--
+-- Redistribution and use in source and binary forms, with or without
+-- modification, are permitted provided that the following conditions
+-- are met:
+--
+-- o Redistributions of source code must retain the above copyright
+--   notice, this list of conditions and the following disclaimer.
+-- o Redistributions in binary form must reproduce the above copyright
+--   notice, this list of conditions and the following disclaimer in the
+--   documentation and/or other materials provided with the distribution.
+-- o The name of the author may not be used to endorse or promote products
+--   derived from this software without specific prior written permission.
+--
+-- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+-- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+-- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+-- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+-- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+-- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+-- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+--
+
+class A is
+	var x : int;
+
+	-- Example of a named property
+	prop X : int is
+		get is
+			Builtin.WriteLine("Getting value of X which is");
+			Builtin.WriteLine(x);
+			return x;
+		end
+
+		set value is
+			Builtin.WriteLine("Setting value of X to");
+			Builtin.WriteLine(value);
+			x = value;
+		end
+	end
+
+	-- Backing store for indexed properties
+	var iprops : int[];
+
+	-- Example of an indexed property set (i.e. an indexer)
+	prop self[index : int] : int is
+		get is
+			Builtin.WriteLine("Getting property with index ");
+			Builtin.WriteLine(index);
+			Builtin.WriteLine("which is");
+			Builtin.WriteLine(iprops[index]);
+
+			return iprops[index];
+		end
+
+		set value is
+			Builtin.WriteLine("Setting property with index ");
+			Builtin.WriteLine(index);
+			Builtin.WriteLine("to");
+			Builtin.WriteLine(value);
+
+			iprops[index] = value;
+		end
+	end
+end
+
+class PropertyDemo is
+	fun Main() is
+		var a : A;
+		var i : int;
+
+		a = new A();
+
+		-- Get value of named property.
+		a.X = 1;
+
+		-- Set value of named property.
+		i = a.X;
+
+		Builtin.WriteLine("Main(): Got ");
+		Builtin.WriteLine(i);
+
+		a.iprops = new int[5];
+
+		-- Set value of indexed property.
+		a[1] = 2;
+
+		-- Get value of indexed property.
+		i = a[1];
+
+		Builtin.WriteLine("Main(): Got ");
+		Builtin.WriteLine(i);
+	end
+end
