[svn] r6826: nemerle/trunk: App App/App.csproj App/Test-001.n
App/bin App/bin/Debug App/bin/Debug/App.exe ...
peter
svnadmin at nemerle.org
Fri Nov 3 15:34:22 CET 2006
Log:
Author: peter
Date: Fri Nov 3 15:34:05 2006
New Revision: 6826
Added:
nemerle/trunk/App/
nemerle/trunk/App/App.csproj
nemerle/trunk/App/Test-001.n
nemerle/trunk/App/bin/
nemerle/trunk/App/bin/Debug/
nemerle/trunk/App/bin/Debug/App.exe (contents, props changed)
nemerle/trunk/App/bin/Debug/App.pdb (contents, props changed)
nemerle/trunk/App/bin/Debug/App.vshost.exe (contents, props changed)
nemerle/trunk/App/bin/Debug/myMacro.dll (contents, props changed)
nemerle/trunk/App/bin/Debug/myMacro.pdb (contents, props changed)
nemerle/trunk/App/obj/
nemerle/trunk/App/obj/App.csproj.FileList.txt
nemerle/trunk/App/obj/Debug/
nemerle/trunk/App/obj/Debug/App.exe (contents, props changed)
nemerle/trunk/App/obj/Debug/App.pdb (contents, props changed)
nemerle/trunk/App/obj/Debug/ResolveAssemblyReference.cache (contents, props changed)
nemerle/trunk/App/obj/Debug/TempPE/
nemerle/trunk/DataParser/
nemerle/trunk/DataParser/DataParser/
nemerle/trunk/DataParser/DataParser.sln
nemerle/trunk/DataParser/DataParser.suo (contents, props changed)
nemerle/trunk/DataParser/DataParser/DataParser.csproj
nemerle/trunk/DataParser/DataParser/Main.n
nemerle/trunk/DataParser/DataParser/bin/
nemerle/trunk/DataParser/DataParser/bin/Debug/
nemerle/trunk/DataParser/DataParser/bin/Debug/DataParser.exe (contents, props changed)
nemerle/trunk/DataParser/DataParser/bin/Debug/DataParser.pdb (contents, props changed)
nemerle/trunk/DataParser/DataParser/bin/Debug/DataParser.vshost.exe (contents, props changed)
nemerle/trunk/DataParser/DataParser/obj/
nemerle/trunk/DataParser/DataParser/obj/DataParser.csproj.FileList.txt
nemerle/trunk/DataParser/DataParser/obj/Debug/
nemerle/trunk/DataParser/DataParser/obj/Debug/DataParser.exe (contents, props changed)
nemerle/trunk/DataParser/DataParser/obj/Debug/DataParser.pdb (contents, props changed)
nemerle/trunk/DataParser/DataParser/obj/Debug/TempPE/
nemerle/trunk/DataParser/ducparser/
nemerle/trunk/DataParser/ducparser/Class1.n
nemerle/trunk/DataParser/ducparser/bin/
nemerle/trunk/DataParser/ducparser/bin/Debug/
nemerle/trunk/DataParser/ducparser/bin/Debug/ducparser.dll (contents, props changed)
nemerle/trunk/DataParser/ducparser/bin/Debug/ducparser.pdb (contents, props changed)
nemerle/trunk/DataParser/ducparser/ducparser.csproj
nemerle/trunk/DataParser/ducparser/ducparser.n
nemerle/trunk/DataParser/ducparser/obj/
nemerle/trunk/DataParser/ducparser/obj/Debug/
nemerle/trunk/DataParser/ducparser/obj/Debug/TempPE/
nemerle/trunk/DataParser/ducparser/obj/Debug/ducparser.dll (contents, props changed)
nemerle/trunk/DataParser/ducparser/obj/Debug/ducparser.pdb (contents, props changed)
nemerle/trunk/DataParser/ducparser/obj/ducparser.csproj.FileList.txt
nemerle/trunk/DucatiTrack/
nemerle/trunk/DucatiTrack/DucatiTrack/
nemerle/trunk/DucatiTrack/DucatiTrack.sln
nemerle/trunk/DucatiTrack/DucatiTrack.suo (contents, props changed)
nemerle/trunk/DucatiTrack/DucatiTrack/DucatiTrack.csproj
nemerle/trunk/DucatiTrack/DucatiTrack/DucatiTrack.csproj.user
nemerle/trunk/DucatiTrack/DucatiTrack/Main.n
nemerle/trunk/DucatiTrack/DucatiTrack/bin/
nemerle/trunk/DucatiTrack/DucatiTrack/bin/Debug/
nemerle/trunk/DucatiTrack/DucatiTrack/bin/Debug/DucatiTrack.exe (contents, props changed)
nemerle/trunk/DucatiTrack/DucatiTrack/bin/Debug/DucatiTrack.pdb (contents, props changed)
nemerle/trunk/DucatiTrack/DucatiTrack/bin/Debug/DucatiTrack.vshost.exe (contents, props changed)
nemerle/trunk/DucatiTrack/DucatiTrack/bin/Debug/track0.dat (contents, props changed)
nemerle/trunk/DucatiTrack/DucatiTrack/bin/Debug/track0.dat.txt (contents, props changed)
nemerle/trunk/DucatiTrack/DucatiTrack/obj/
nemerle/trunk/DucatiTrack/DucatiTrack/obj/Debug/
nemerle/trunk/DucatiTrack/DucatiTrack/obj/Debug/DucatiTrack.exe (contents, props changed)
nemerle/trunk/DucatiTrack/DucatiTrack/obj/Debug/DucatiTrack.pdb (contents, props changed)
nemerle/trunk/DucatiTrack/DucatiTrack/obj/Debug/TempPE/
nemerle/trunk/DucatiTrack/DucatiTrack/obj/DucatiTrack.csproj.FileList.txt
nemerle/trunk/TupleMacro/
nemerle/trunk/TupleMacro/TupleMacro/
nemerle/trunk/TupleMacro/TupleMacro.sln
nemerle/trunk/TupleMacro/TupleMacro.suo (contents, props changed)
nemerle/trunk/TupleMacro/TupleMacro/Macro1.n
nemerle/trunk/TupleMacro/TupleMacro/TupleMacro.csproj
nemerle/trunk/TupleMacro/TupleMacro/TupleMacro.csproj.user
nemerle/trunk/TupleMacro/TupleMacro/bin/
nemerle/trunk/TupleMacro/TupleMacro/bin/Debug/
nemerle/trunk/TupleMacro/TupleMacro/bin/Debug/TupleMacro.dll (contents, props changed)
nemerle/trunk/TupleMacro/TupleMacro/bin/Debug/TupleMacro.pdb (contents, props changed)
nemerle/trunk/TupleMacro/TupleMacro/obj/
nemerle/trunk/TupleMacro/TupleMacro/obj/Debug/
nemerle/trunk/TupleMacro/TupleMacro/obj/Debug/ResolveAssemblyReference.cache (contents, props changed)
nemerle/trunk/TupleMacro/TupleMacro/obj/Debug/TempPE/
nemerle/trunk/TupleMacro/TupleMacro/obj/Debug/TupleMacro.dll (contents, props changed)
nemerle/trunk/TupleMacro/TupleMacro/obj/Debug/TupleMacro.pdb (contents, props changed)
nemerle/trunk/TupleMacro/TupleMacro/obj/TupleMacro.csproj.FileList.txt
nemerle/trunk/TupleMacro/TupleMacro/tMacro.pdb (contents, props changed)
nemerle/trunk/TupleMacro/b.bat
nemerle/trunk/TupleTest/
nemerle/trunk/TupleTest/TupleTest/
nemerle/trunk/TupleTest/TupleTest.sln
nemerle/trunk/TupleTest/TupleTest.suo (contents, props changed)
nemerle/trunk/TupleTest/TupleTest/Main.n
nemerle/trunk/TupleTest/TupleTest/TupleTest.csproj
nemerle/trunk/TupleTest/TupleTest/bin/
nemerle/trunk/TupleTest/TupleTest/bin/Debug/
nemerle/trunk/TupleTest/TupleTest/bin/Debug/TupleMacro.dll (contents, props changed)
nemerle/trunk/TupleTest/TupleTest/bin/Debug/TupleMacro.pdb (contents, props changed)
nemerle/trunk/TupleTest/TupleTest/bin/Debug/TupleTest.exe (contents, props changed)
nemerle/trunk/TupleTest/TupleTest/bin/Debug/TupleTest.pdb (contents, props changed)
nemerle/trunk/TupleTest/TupleTest/bin/Debug/TupleTest.vshost.exe (contents, props changed)
nemerle/trunk/TupleTest/TupleTest/obj/
nemerle/trunk/TupleTest/TupleTest/obj/Debug/
nemerle/trunk/TupleTest/TupleTest/obj/Debug/ResolveAssemblyReference.cache (contents, props changed)
nemerle/trunk/TupleTest/TupleTest/obj/Debug/TempPE/
nemerle/trunk/TupleTest/TupleTest/obj/Debug/TupleTest.exe (contents, props changed)
nemerle/trunk/TupleTest/TupleTest/obj/Debug/TupleTest.pdb (contents, props changed)
nemerle/trunk/TupleTest/TupleTest/obj/TupleTest.csproj.FileList.txt
nemerle/trunk/myMacro/
nemerle/trunk/myMacro/myMacro/
nemerle/trunk/myMacro/myMacro.sln
nemerle/trunk/myMacro/myMacro.suo (contents, props changed)
nemerle/trunk/myMacro/myMacro/Test-001-macro.n
nemerle/trunk/myMacro/myMacro/bin/
nemerle/trunk/myMacro/myMacro/bin/Debug/
nemerle/trunk/myMacro/myMacro/bin/Debug/myMacro.dll (contents, props changed)
nemerle/trunk/myMacro/myMacro/bin/Debug/myMacro.pdb (contents, props changed)
nemerle/trunk/myMacro/myMacro/myMacro.csproj
nemerle/trunk/myMacro/myMacro/obj/
nemerle/trunk/myMacro/myMacro/obj/Debug/
nemerle/trunk/myMacro/myMacro/obj/Debug/ResolveAssemblyReference.cache (contents, props changed)
nemerle/trunk/myMacro/myMacro/obj/Debug/TempPE/
nemerle/trunk/myMacro/myMacro/obj/Debug/myMacro.dll (contents, props changed)
nemerle/trunk/myMacro/myMacro/obj/Debug/myMacro.pdb (contents, props changed)
nemerle/trunk/myMacro/myMacro/obj/myMacro.csproj.FileList.txt
nemerle/trunk/test/
nemerle/trunk/test/Test-001-macro.dll (contents, props changed)
nemerle/trunk/test/Test-001-macro.n
nemerle/trunk/test/Test-001-macro.pdb (contents, props changed)
nemerle/trunk/test/Test-001.exe (contents, props changed)
nemerle/trunk/test/Test-001.n
nemerle/trunk/test/Test-001.pdb (contents, props changed)
nemerle/trunk/test/mymacro.dll (contents, props changed)
nemerle/trunk/test/mymacro.n
nemerle/trunk/test/myprog.exe (contents, props changed)
nemerle/trunk/test/myprog.n
nemerle/trunk/test/variant.n
Added: nemerle/trunk/App/App.csproj
==============================================================================
--- (empty file)
+++ nemerle/trunk/App/App.csproj Fri Nov 3 15:34:05 2006
@@ -0,0 +1,46 @@
+ďťż<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{807454A6-97CA-4C6B-B4A7-995FEDFE0333}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>App</RootNamespace>
+ <AssemblyName>App</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <Import Project="C:\Program Files\Nemerle\Nemerle.MSBuild.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ItemGroup>
+ <Compile Include="Test-001.n" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\myMacro\myMacro\myMacro.csproj">
+ <Project>{30F9DF90-2FAC-4B60-8D61-35516ECBD08D}</Project>
+ <Name>myMacro</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
Added: nemerle/trunk/App/Test-001.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/App/Test-001.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,6 @@
+// abstract, and, array, as, base, catch, class, def, delegate, do, else, enum, event, extern, false, finally, for, foreach, fun, if, implements, in, interface, internal, lock, macro, match, module, mutable, namespace, new, null, out, override, params,
+// WriteLine public private protected internal
+
+TestMacro("Vlad");
+//def a = "Vlad2";
+//TestMacro(a);
Added: nemerle/trunk/App/bin/Debug/App.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/App/bin/Debug/App.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/App/bin/Debug/App.vshost.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/App/bin/Debug/myMacro.dll
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/App/bin/Debug/myMacro.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/App/obj/App.csproj.FileList.txt
==============================================================================
--- (empty file)
+++ nemerle/trunk/App/obj/App.csproj.FileList.txt Fri Nov 3 15:34:05 2006
@@ -0,0 +1,7 @@
+obj\Debug\ResolveAssemblyReference.cache
+bin\Debug\App.exe
+bin\Debug\App.pdb
+bin\Debug\myMacro.dll
+bin\Debug\myMacro.pdb
+obj\Debug\App.exe
+obj\Debug\App.pdb
Added: nemerle/trunk/App/obj/Debug/App.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/App/obj/Debug/App.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/App/obj/Debug/ResolveAssemblyReference.cache
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DataParser/DataParser.sln
==============================================================================
--- (empty file)
+++ nemerle/trunk/DataParser/DataParser.sln Fri Nov 3 15:34:05 2006
@@ -0,0 +1,20 @@
+ďťż
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataParser", "DataParser\DataParser.csproj", "{A4ACC3F5-353B-46C9-B401-1591BEAFFB80}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A4ACC3F5-353B-46C9-B401-1591BEAFFB80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A4ACC3F5-353B-46C9-B401-1591BEAFFB80}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A4ACC3F5-353B-46C9-B401-1591BEAFFB80}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A4ACC3F5-353B-46C9-B401-1591BEAFFB80}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Added: nemerle/trunk/DataParser/DataParser.suo
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DataParser/DataParser/DataParser.csproj
==============================================================================
--- (empty file)
+++ nemerle/trunk/DataParser/DataParser/DataParser.csproj Fri Nov 3 15:34:05 2006
@@ -0,0 +1,40 @@
+ďťż<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{A4ACC3F5-353B-46C9-B401-1591BEAFFB80}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>DataParser</RootNamespace>
+ <AssemblyName>DataParser</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Main.n" />
+ </ItemGroup>
+ <Import Project="C:\Program Files\Nemerle\Nemerle.MSBuild.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: nemerle/trunk/DataParser/DataParser/Main.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/DataParser/DataParser/Main.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,301 @@
+using System.Console;
+
+namespace DucatiEnv
+{
+
+ variant separator
+ {
+ | Soft { a : char }
+ | Hard { a : char }
+ | NULL
+ }
+
+ variant exTree
+ {
+ | Ex { data : string }
+ | NULL;
+ }
+
+ variant parserTree
+ {
+ | Node { left : parserTree; parser : list[string -> exTree]; next : parserTree }
+ | NULL
+ }
+
+ class Class1
+ {
+
+ private static testChar(sim : char, l : list[separator]) : separator
+ {
+ def filter(sep : separator) : bool
+ {
+ match(sep)
+ {
+ | Soft(a) => if(a == sim) true; else false;
+ | Hard(a) => if(a == sim) true; else false;
+ | NULL => throw System.Exception("Separator list is wrong");
+ }
+ }
+ def ll = l.Filter(filter);
+ match(ll)
+ {
+ | [] => separator.NULL();
+ | head::tail => head;
+ }
+ }
+
+ public static parseElem(str : string, ind : int, length : int, ) : (exTree * int)
+
+ public static parseIdent(str : string, ind : int, length : int, l : list[separator]) : (exTree * int)
+ {
+ def getIdent(fl : bool, str : string, ind : int, length : int, l : list[separator]) : (string * int)
+ {
+ if(ind == length)
+ ("", ind);
+ else
+ {
+ def sim = str[ind];
+ def sep = testChar(sim, l);
+ match(sep)
+ {
+ | Soft => if(fl) getIdent(fl, str, ind + 1, length, l); else ("", ind);
+ | Hard => ("", ind);
+ | NULL => def (tmpstr, tmpint) = getIdent(false, str, ind + 1, length, l); (sim.ToString() + tmpstr, tmpint);
+ }
+ }
+ }
+ def (val, lastind) = getIdent(true, str, ind, length, l);
+ if(val == "")
+ (exTree.NULL(), lastind);
+ else
+ (exTree.Ex(val), lastind);
+ }
+
+ public static parserProcess(str : string) : exTree
+ {
+ exTree.Ex("Test");
+ }
+
+ public static Main() : void
+ {
+ System.Console.WriteLine ("2222");
+ }
+ }
+/*
+ variant vVariable
+ {
+ | Variable { name : string; val : string}
+ }
+
+
+ variant exTree
+ {
+ | Node { left : exTree; ex : string; right : exTree }
+ | Param { name : string }
+ | NULL
+ }
+
+ variant vStatement
+ {
+ | LampPole {z : float; count : int; interval : float}
+ | Corner {z : float; count : int; interval : float}
+ | Fence {z : float; count : int; interval : float}
+ | Error
+ }
+
+ public class DataParser
+ {
+ static mutable index : int;
+ static mutable data : string;
+ static mutable length : int;
+ static mutable lineNumber : int;
+
+ static private getVariable(varList : list[vVariable], name : string) : string
+ {
+ match(varList)
+ {
+ | [] => "";
+ | var::rest =>
+ match(var)
+ {
+ | vVariable.Variable(name = _name, val = _val) =>
+ if(_name == name)
+ _val;
+ else
+ getVariable(rest, name);
+ }
+ }
+ }
+
+ static private calcExTree(tree : exTree, varList : list[vVariable]) : string
+ {
+ match(tree)
+ {
+ | exTree.Node(ex = _ex, left = _left, right = _right) =>
+ match(_ex)
+ {
+ | "+" => def sum = float.Parse(calcExTree(_left, varList)) + float.Parse(calcExTree(_right, varList)); sum.ToString();
+ | "-" => def diff = float.Parse(calcExTree(_left, varList)) - float.Parse(calcExTree(_right, varList)); diff.ToString();
+ | "*" => def mut = float.Parse(calcExTree(_left, varList)) * float.Parse(calcExTree(_right, varList)); mut.ToString();
+ | "/" => def rest = float.Parse(calcExTree(_left, varList)) / float.Parse(calcExTree(_right, varList)); rest.ToString();
+ | _ => throw System.Exception("Unknow expess");
+ }
+
+ | exTree.Param(name = _name) =>
+ try
+ {
+ float.Parse(_name);
+ _name;
+ }
+ catch
+ {
+ | _ =>
+ def val = getVariable(varList, _name);
+ when(val == "")
+ throw System.Exception($"No find param $_name");
+ val;
+ }
+ | exTree.NULL => throw System.Exception($"NULL tree");
+ }
+ }
+
+ static private getSimple(blank : bool) : string
+ {
+ if(index >= length)
+ {
+ match(blank)
+ {
+ | false => "";
+ | true => "DATAEND";
+ }
+ }
+ else
+ {
+ def c = data[index];
+ index++;
+ match(c)
+ {
+ | ';' => if(blank) ";"; else {index--; ""; };
+ | '=' => if(blank) "="; else {index--; ""; };
+ | '(' => if(blank) "("; else {index--; ""; };
+ | ')' => if(blank) ")"; else {index--; ""; };
+ | _ => if(c <= ' ')
+ {
+ when(c == '\n')
+ lineNumber++;
+ if(blank) getSimple(true); else "";
+ }
+ else c.ToString() + getSimple(false);
+ }
+ }
+ }
+
+ static private getToken() : string
+ {
+ getSimple(true);
+ }
+
+ static private buildExTree(tree : exTree) : exTree
+ {
+ def a = getToken();
+ match(a)
+ {
+ | "(" => buildExTree(tree);
+ | ")" => buildExTree(tree);
+ | "+" => exTree.Node(tree, "+", buildExTree(exTree.NULL()));
+ | "-" => exTree.Node(tree, "-", buildExTree(exTree.NULL()));
+ | "*" => exTree.Node(tree, "*", buildExTree(exTree.NULL()));
+ | "/" => exTree.Node(tree, "/", buildExTree(exTree.NULL()));
+ | ";" => tree;
+ | "DATAEND" => tree;
+ | _ => def _tree = exTree.Param(a); buildExTree(_tree);
+
+ }
+ exTree.Param("1212");
+ }
+
+ static private getItem(z : float, count : int, interval : float, f : float * int * float -> vStatement) : vStatement
+ {
+ def exTrow() { when(getToken() != "=") { throw System.Exception($"Expecteed =; line $lineNumber") } }
+ def a = getToken();
+ match(a)
+ {
+ | "z" => exTrow();
+ def tree = buildExTree(exTree.NULL());
+ def zs = float.Parse(calcExTree(tree, []));
+ getItem(zs, count, interval, f);
+ | "count" => exTrow();
+ def tree = buildExTree(exTree.NULL());
+ def counts = int.Parse(calcExTree(tree, []));
+ getItem(z, counts, interval, f);
+ | "interval" => exTrow();
+ def tree = buildExTree(exTree.NULL());
+ def intervals = float.Parse(calcExTree(tree, []));
+ getItem(z, count, intervals, f);
+ | "DATAEND" => f(z, count, interval);
+ | _ => throw System.Exception($"Unknow error; line $lineNumber");
+ }
+ }
+
+ static private getStatement() : list[vStatement]
+ {
+ def a = getToken();
+ def buildLampPole(z : float, count : int, interval : float)
+ {
+ if((count == 0) || (interval == 0f))
+ throw System.Exception($"Not all item; line $lineNumber");
+ else
+ vStatement.LampPole(z, count, interval);
+ }
+ def buildFence(z : float, count : int, interval : float)
+ {
+ if((count == 0) || (interval == 0f))
+ throw System.Exception($"Not all item; line $lineNumber");
+ else
+ vStatement.Fence(z, count, interval);
+ }
+ def buildCorner(z : float, count : int, interval : float)
+ {
+ if((count == 0) || (interval == 0f))
+ throw System.Exception($"Not all item; line $lineNumber");
+ else
+ vStatement.Corner(z, count, interval);
+ }
+ def exTrow() { when(getToken() != ";") { throw System.Exception($"Expecteed ;, line $lineNumber") } }
+ match(a)
+ {
+ | "LampPole" => exTrow(); getItem(0, 0, 0, buildLampPole)::getStatement();
+ | "Fence" => exTrow(); getItem(0, 0, 0, buildFence)::getStatement();
+ | "Corner" => exTrow(); getItem(0, 0, 0, buildCorner)::getStatement();
+ | _ => [];
+ }
+ }
+
+ static private toStr(val : vStatement, str : string) : string
+ {
+ match(val)
+ {
+ | vStatement.LampPole(z, count, interval) => str + "LampPole;" + "z=" + z.ToString() + ";count=" + count.ToString() + ";interval=" + interval.ToString() + '\n'.ToString();
+ | vStatement.Corner(z, count, interval) => str + "Corner;" + "z=" + z.ToString() + ";count=" + count.ToString() + ";interval=" + interval.ToString() + '\n'.ToString();
+ | vStatement.Fence(z, count, interval) => str + "Corner;" + "z=" + z.ToString() + ";count=" + count.ToString() + ";interval=" + interval.ToString() + '\n'.ToString();
+ | _ => str + "error";
+ }
+ }
+
+ static public getData(text : string) : string
+ {
+ def initParser = fun() {index = 0; data = text; length = data.Length; lineNumber = 1; };
+ initParser();
+ def items = getStatement();
+ items.FoldLeft("", toStr);
+ }
+
+
+ public static Main() : void
+ {
+ def b = "LampPole ; count = 345; z = 44 ;; interval = 20" + '\n'.ToString() + "Fence ; count = 345; z = 45 ;; interval = 20";
+ def aaa = getData(b);
+ System.Console.WriteLine (aaa);
+ }
+ }*/
+}
Added: nemerle/trunk/DataParser/DataParser/bin/Debug/DataParser.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DataParser/DataParser/bin/Debug/DataParser.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DataParser/DataParser/bin/Debug/DataParser.vshost.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DataParser/DataParser/obj/DataParser.csproj.FileList.txt
==============================================================================
--- (empty file)
+++ nemerle/trunk/DataParser/DataParser/obj/DataParser.csproj.FileList.txt Fri Nov 3 15:34:05 2006
@@ -0,0 +1,4 @@
+bin\Debug\DataParser.exe
+bin\Debug\DataParser.pdb
+obj\Debug\DataParser.exe
+obj\Debug\DataParser.pdb
Added: nemerle/trunk/DataParser/DataParser/obj/Debug/DataParser.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DataParser/DataParser/obj/Debug/DataParser.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DataParser/ducparser/Class1.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/DataParser/ducparser/Class1.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,123 @@
+namespace DucatiEnv
+{
+ class DataParser
+ {
+ static mutable index : int;
+ static mutable data : string;
+ static mutable length : int;
+ static mutable lineNumber : int;
+
+ static private getSimple(blank : bool) : string
+ {
+ if(index >= length)
+ {
+ match(blank)
+ {
+ | false => "";
+ | true => "DATAEND";
+ }
+ }
+ else
+ {
+ def c = data[index];
+ index++;
+ match(c)
+ {
+ | ';' => if(blank) getSimple(true); else "";
+ | '=' => if(blank) "="; else {index--; ""; };
+ | '\n' => if(blank) "LINEEND"; else {index--; ""; };
+ | _ => if(c <= ' ')
+ {
+ if(blank) getSimple(true); else "";
+ }
+ else c.ToString() + getSimple(false);
+ }
+ }
+ }
+
+ static private getToken() : string
+ {
+ getSimple(true);
+ }
+
+ static private getItem(z : float, count : int, interval : float, f : float * int * float -> vStatement) : vStatement
+ {
+ def a = getToken();
+ match(a)
+ {
+ | "z" => when(getToken() != "=") { throw System.Exception($"Expecteed =; line $lineNumber") };
+ def zs = float.Parse(getToken());
+ getItem(zs, count, interval, f);
+ | "count" => when(getToken() != "=") { throw System.Exception($"Expecteed =; line $lineNumber") };
+ def counts = int.Parse(getToken());
+ getItem(z, counts, interval, f);
+ | "interval" => when(getToken() != "=") { throw System.Exception($"Expecteed =; line $lineNumber") };
+ def aaa = getToken();
+ def intervals = float.Parse(aaa);
+ getItem(z, count, intervals, f);
+ | "LINEEND" => lineNumber++; f(z, count, interval);
+ | "DATAEND" => f(z, count, interval);
+ | _ => throw System.Exception($"Unknow error; line $lineNumber");
+ }
+ }
+
+ static private getStatement() : list[vStatement]
+ {
+ def a = getToken();
+ def buildLampPole(z : float, count : int, interval : float)
+ {
+ if((count == 0) || (interval == 0f))
+ throw System.Exception($"Not all item; line $lineNumber");
+ else
+ vStatement.LampPole(z, count, interval);
+ }
+ def buildFence(z : float, count : int, interval : float)
+ {
+ if((count == 0) || (interval == 0f))
+ throw System.Exception($"Not all item; line $lineNumber");
+ else
+ vStatement.Fence(z, count, interval);
+ }
+ def buildCorner(z : float, count : int, interval : float)
+ {
+ if((count == 0) || (interval == 0f))
+ throw System.Exception($"Not all item; line $lineNumber");
+ else
+ vStatement.Corner(z, count, interval);
+ }
+ match(a)
+ {
+ | "LampPole" => getItem(0, 0, 0, buildLampPole)::getStatement();
+ | "Fence" => getItem(0, 0, 0, buildFence)::getStatement();
+ | "Corner" => getItem(0, 0, 0, buildCorner)::getStatement();
+ | _ => [];
+ }
+ }
+
+ static private toStr(val : vStatement, str : string) : string
+ {
+ match(val)
+ {
+ | vStatement.LampPole(z, count, interval) => str + "LampPole;" + "z=" + z.ToString() + ";count=" + count.ToString() + ";interval=" + interval.ToString() + '\n'.ToString();
+ | vStatement.Corner(z, count, interval) => str + "Corner;" + "z=" + z.ToString() + ";count=" + count.ToString() + ";interval=" + interval.ToString() + '\n'.ToString();
+ | vStatement.Fence(z, count, interval) => str + "Corner;" + "z=" + z.ToString() + ";count=" + count.ToString() + ";interval=" + interval.ToString() + '\n'.ToString();
+ | _ => str + "error";
+ }
+ }
+
+ static public getData(text : string) : string
+ {
+ def initParser = fun() {index = 0; data = text; length = data.Length; lineNumber = 1; };
+ initParser();
+ def items = getStatement();
+ items.FoldLeft("", toStr);
+ }
+
+/* public static Main() : void
+ {
+ def b = "LampPole ; count = 345; z = 44 ;; interval = 20" + '\n'.ToString() + "Fence ; count = 345; z = 45 ;; interval = 20";
+ def aaa = getData(b);
+ System.Console.WriteLine (aaa);
+ } */
+ }
+}
Added: nemerle/trunk/DataParser/ducparser/bin/Debug/ducparser.dll
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DataParser/ducparser/bin/Debug/ducparser.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DataParser/ducparser/ducparser.csproj
==============================================================================
--- (empty file)
+++ nemerle/trunk/DataParser/ducparser/ducparser.csproj Fri Nov 3 15:34:05 2006
@@ -0,0 +1,40 @@
+ďťż<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{9A71C750-F12C-4AC5-BF88-68EB51BAE6C2}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>ducparser</RootNamespace>
+ <AssemblyName>ducparser</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="ducparser.n" />
+ </ItemGroup>
+ <Import Project="C:\Program Files\Nemerle\Nemerle.MSBuild.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: nemerle/trunk/DataParser/ducparser/ducparser.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/DataParser/ducparser/ducparser.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,125 @@
+namespace DucatiEnv
+{
+
+ variant vStatement
+ {
+ | LampPole {z : float; count : int; interval : float}
+ | Corner {z : float; count : int; interval : float}
+ | Fence {z : float; count : int; interval : float}
+ | Error
+ }
+
+ public class DataParser
+ {
+ static mutable index : int;
+ static mutable data : string;
+ static mutable length : int;
+ static mutable lineNumber : int;
+
+ static private getSimple(blank : bool) : string
+ {
+ if(index >= length)
+ {
+ match(blank)
+ {
+ | false => "";
+ | true => "DATAEND";
+ }
+ }
+ else
+ {
+ def c = data[index];
+ index++;
+ match(c)
+ {
+ | ';' => if(blank) getSimple(true); else "";
+ | '=' => if(blank) "="; else {index--; ""; };
+ | '\n' => if(blank) "LINEEND"; else {index--; ""; };
+ | _ => if(c <= ' ')
+ {
+ if(blank) getSimple(true); else "";
+ }
+ else c.ToString() + getSimple(false);
+ }
+ }
+ }
+
+ static private getToken() : string
+ {
+ getSimple(true);
+ }
+
+ static private getItem(z : float, count : int, interval : float, f : float * int * float -> vStatement) : vStatement
+ {
+ def a = getToken();
+ match(a)
+ {
+ | "z" => when(getToken() != "=") { throw System.Exception($"Expecteed =; line $lineNumber") };
+ def zs = float.Parse(getToken());
+ getItem(zs, count, interval, f);
+ | "count" => when(getToken() != "=") { throw System.Exception($"Expecteed =; line $lineNumber") };
+ def counts = int.Parse(getToken());
+ getItem(z, counts, interval, f);
+ | "interval" => when(getToken() != "=") { throw System.Exception($"Expecteed =; line $lineNumber") };
+ def aaa = getToken();
+ def intervals = float.Parse(aaa);
+ getItem(z, count, intervals, f);
+ | "LINEEND" => lineNumber++; f(z, count, interval);
+ | "DATAEND" => f(z, count, interval);
+ | _ => throw System.Exception($"Unknow error; line $lineNumber");
+ }
+ }
+
+ static private getStatement() : list[vStatement]
+ {
+ def a = getToken();
+ def buildLampPole(z : float, count : int, interval : float)
+ {
+ if((count == 0) || (interval == 0f))
+ throw System.Exception($"Not all item; line $lineNumber");
+ else
+ vStatement.LampPole(z, count, interval);
+ }
+ def buildFence(z : float, count : int, interval : float)
+ {
+ if((count == 0) || (interval == 0f))
+ throw System.Exception($"Not all item; line $lineNumber");
+ else
+ vStatement.Fence(z, count, interval);
+ }
+ def buildCorner(z : float, count : int, interval : float)
+ {
+ if((count == 0) || (interval == 0f))
+ throw System.Exception($"Not all item; line $lineNumber");
+ else
+ vStatement.Corner(z, count, interval);
+ }
+ match(a)
+ {
+ | "LampPole" => getItem(0, 0, 0, buildLampPole)::getStatement();
+ | "Fence" => getItem(0, 0, 0, buildFence)::getStatement();
+ | "Corner" => getItem(0, 0, 0, buildCorner)::getStatement();
+ | _ => [];
+ }
+ }
+
+ static private toStr(val : vStatement, str : string) : string
+ {
+ match(val)
+ {
+ | vStatement.LampPole(z, count, interval) => str + "LampPole;" + "z=" + z.ToString() + ";count=" + count.ToString() + ";interval=" + interval.ToString() + '\n'.ToString();
+ | vStatement.Corner(z, count, interval) => str + "Corner;" + "z=" + z.ToString() + ";count=" + count.ToString() + ";interval=" + interval.ToString() + '\n'.ToString();
+ | vStatement.Fence(z, count, interval) => str + "Corner;" + "z=" + z.ToString() + ";count=" + count.ToString() + ";interval=" + interval.ToString() + '\n'.ToString();
+ | _ => str + "error";
+ }
+ }
+
+ static public getData(text : string) : string
+ {
+ def initParser = fun() {index = 0; data = text; length = data.Length; lineNumber = 1; };
+ initParser();
+ def items = getStatement();
+ items.FoldLeft("", toStr);
+ }
+ }
+}
Added: nemerle/trunk/DataParser/ducparser/obj/Debug/ducparser.dll
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DataParser/ducparser/obj/Debug/ducparser.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DataParser/ducparser/obj/ducparser.csproj.FileList.txt
==============================================================================
--- (empty file)
+++ nemerle/trunk/DataParser/ducparser/obj/ducparser.csproj.FileList.txt Fri Nov 3 15:34:05 2006
@@ -0,0 +1,4 @@
+bin\Debug\ducparser.dll
+bin\Debug\ducparser.pdb
+obj\Debug\ducparser.dll
+obj\Debug\ducparser.pdb
Added: nemerle/trunk/DucatiTrack/DucatiTrack.sln
==============================================================================
--- (empty file)
+++ nemerle/trunk/DucatiTrack/DucatiTrack.sln Fri Nov 3 15:34:05 2006
@@ -0,0 +1,20 @@
+ďťż
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DucatiTrack", "DucatiTrack\DucatiTrack.csproj", "{6AD075AF-AD9D-41FE-8BFE-1586BF3E450F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6AD075AF-AD9D-41FE-8BFE-1586BF3E450F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6AD075AF-AD9D-41FE-8BFE-1586BF3E450F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6AD075AF-AD9D-41FE-8BFE-1586BF3E450F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6AD075AF-AD9D-41FE-8BFE-1586BF3E450F}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Added: nemerle/trunk/DucatiTrack/DucatiTrack.suo
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DucatiTrack/DucatiTrack/DucatiTrack.csproj
==============================================================================
--- (empty file)
+++ nemerle/trunk/DucatiTrack/DucatiTrack/DucatiTrack.csproj Fri Nov 3 15:34:05 2006
@@ -0,0 +1,40 @@
+ďťż<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{6AD075AF-AD9D-41FE-8BFE-1586BF3E450F}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>DucatiTrack</RootNamespace>
+ <AssemblyName>DucatiTrack</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Main.n" />
+ </ItemGroup>
+ <Import Project="C:\Program Files\Nemerle\Nemerle.MSBuild.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: nemerle/trunk/DucatiTrack/DucatiTrack/DucatiTrack.csproj.user
==============================================================================
--- (empty file)
+++ nemerle/trunk/DucatiTrack/DucatiTrack/DucatiTrack.csproj.user Fri Nov 3 15:34:05 2006
@@ -0,0 +1,5 @@
+ďťż<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <StartArguments>track0.dat</StartArguments>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
Added: nemerle/trunk/DucatiTrack/DucatiTrack/Main.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/DucatiTrack/DucatiTrack/Main.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,48 @@
+using System;
+using System.Console;
+using System.IO;
+
+class DucatiBend
+{
+
+ static parserFile(fileName : string) : void
+ {
+ def fileRead = FileStream(fileName, FileMode.Open, FileAccess.Read);
+// def fileWrite = FileStream(fileName + ".txt", FileMode.Create);
+
+ def binaryWrite = BinaryWriter(fileWrite);
+
+ def myCopy(streamReader, streamWriter) : void
+ {
+ def character = streamReader.ReadByte();
+ when(character != -1)
+ {
+ def a = BitConverter.GetBytes(character);
+ streamWriter.Write(a[0]);
+ myCopy(streamReader, streamWriter);
+ }
+ }
+ myCopy(fileRead, binaryWrite);
+ binaryWrite.Close();
+ fileRead.Close();
+ fileWrite.Close();
+
+ }
+
+ public static Main () : void
+ {
+ System.Console.WriteLine ("Start");
+ def arguments = Environment.GetCommandLineArgs();
+ if(arguments.Length < 2)
+ Console.WriteLine("No file");
+ else
+ {
+ Console.WriteLine("Input file {0}", arguments[1]);
+ if(File.Exists(arguments[1]))
+ parserFile(arguments[1]);
+ else
+ System.Console.WriteLine ("No file {0}", arguments[1]);
+ }
+ System.Console.WriteLine ("End");
+ }
+}
Added: nemerle/trunk/DucatiTrack/DucatiTrack/bin/Debug/DucatiTrack.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DucatiTrack/DucatiTrack/bin/Debug/DucatiTrack.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DucatiTrack/DucatiTrack/bin/Debug/DucatiTrack.vshost.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DucatiTrack/DucatiTrack/bin/Debug/track0.dat
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DucatiTrack/DucatiTrack/bin/Debug/track0.dat.txt
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DucatiTrack/DucatiTrack/obj/Debug/DucatiTrack.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DucatiTrack/DucatiTrack/obj/Debug/DucatiTrack.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/DucatiTrack/DucatiTrack/obj/DucatiTrack.csproj.FileList.txt
==============================================================================
--- (empty file)
+++ nemerle/trunk/DucatiTrack/DucatiTrack/obj/DucatiTrack.csproj.FileList.txt Fri Nov 3 15:34:05 2006
@@ -0,0 +1,4 @@
+bin\Debug\DucatiTrack.exe
+bin\Debug\DucatiTrack.pdb
+obj\Debug\DucatiTrack.exe
+obj\Debug\DucatiTrack.pdb
Added: nemerle/trunk/TupleMacro/TupleMacro.sln
==============================================================================
--- (empty file)
+++ nemerle/trunk/TupleMacro/TupleMacro.sln Fri Nov 3 15:34:05 2006
@@ -0,0 +1,20 @@
+ďťż
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TupleMacro", "TupleMacro\TupleMacro.csproj", "{2E22593D-77D6-443C-BCAE-6599BEC2CAAD}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2E22593D-77D6-443C-BCAE-6599BEC2CAAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2E22593D-77D6-443C-BCAE-6599BEC2CAAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2E22593D-77D6-443C-BCAE-6599BEC2CAAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2E22593D-77D6-443C-BCAE-6599BEC2CAAD}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Added: nemerle/trunk/TupleMacro/TupleMacro.suo
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleMacro/TupleMacro/Macro1.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/TupleMacro/TupleMacro/Macro1.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,22 @@
+using Nemerle.Compiler;
+using System.Console;
+
+namespace VyborMacro
+{
+ macro PrintTuple(tup, size : int)
+ {
+ def symbols = array(size);
+ mutable pvars = [];
+ mutable exps = [];
+
+ for(mutable i = size - 1; i >=0; --i)
+ {
+ symbols[i] = Macros.NewSymbol();
+ pvars = <[ $(symbols[i] : name) ]> :: pvars;
+ exps = <[ WriteLine($(symbols[i] : name)) ]> :: exps;
+ };
+
+ exps = <[ def (..$pvars) = $tup ]> :: exps;
+ <[ {..$exps} ]>
+ }
+}
Added: nemerle/trunk/TupleMacro/TupleMacro/TupleMacro.csproj
==============================================================================
--- (empty file)
+++ nemerle/trunk/TupleMacro/TupleMacro/TupleMacro.csproj Fri Nov 3 15:34:05 2006
@@ -0,0 +1,43 @@
+ďťż<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{2E22593D-77D6-443C-BCAE-6599BEC2CAAD}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>TupleMacro</RootNamespace>
+ <AssemblyName>TupleMacro</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Nemerle.Compiler" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Macro1.n" />
+ </ItemGroup>
+ <Import Project="C:\Program Files\Nemerle\Nemerle.MSBuild.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: nemerle/trunk/TupleMacro/TupleMacro/TupleMacro.csproj.user
==============================================================================
--- (empty file)
+++ nemerle/trunk/TupleMacro/TupleMacro/TupleMacro.csproj.user Fri Nov 3 15:34:05 2006
@@ -0,0 +1,9 @@
+ďťż<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <StartAction>Program</StartAction>
+ <StartProgram>C:\Program Files\Nemerle\ncc.exe</StartProgram>
+ <StartArguments>-no-color -debug+ -r D:\nemerle\TupleMacro\TupleMacro\bin\Debug\TupleMacro.dll -t exe D:\nemerle\TupleTest\TupleTest\Main.n -o D:\nemerle\TupleTest\TupleTest\test.exe</StartArguments>
+ <StartWorkingDirectory>
+ </StartWorkingDirectory>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
Added: nemerle/trunk/TupleMacro/TupleMacro/bin/Debug/TupleMacro.dll
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleMacro/TupleMacro/bin/Debug/TupleMacro.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleMacro/TupleMacro/obj/Debug/ResolveAssemblyReference.cache
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleMacro/TupleMacro/obj/Debug/TupleMacro.dll
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleMacro/TupleMacro/obj/Debug/TupleMacro.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleMacro/TupleMacro/obj/TupleMacro.csproj.FileList.txt
==============================================================================
--- (empty file)
+++ nemerle/trunk/TupleMacro/TupleMacro/obj/TupleMacro.csproj.FileList.txt Fri Nov 3 15:34:05 2006
@@ -0,0 +1,5 @@
+obj\Debug\ResolveAssemblyReference.cache
+bin\Debug\TupleMacro.dll
+bin\Debug\TupleMacro.pdb
+obj\Debug\TupleMacro.dll
+obj\Debug\TupleMacro.pdb
Added: nemerle/trunk/TupleMacro/TupleMacro/tMacro.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleMacro/b.bat
==============================================================================
--- (empty file)
+++ nemerle/trunk/TupleMacro/b.bat Fri Nov 3 15:34:05 2006
@@ -0,0 +1 @@
+ncc.exe -no-color -debug+ -r Nemerle.Compiler.dll -t:library D:\nemerle\TupleMacro\TupleMacro\Macro1.n -out D:\nemerle\TupleMacro\TupleMacro\tMacro.dll
\ No newline at end of file
Added: nemerle/trunk/TupleTest/TupleTest.sln
==============================================================================
--- (empty file)
+++ nemerle/trunk/TupleTest/TupleTest.sln Fri Nov 3 15:34:05 2006
@@ -0,0 +1,20 @@
+ďťż
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TupleTest", "TupleTest\TupleTest.csproj", "{FDDBD8A9-32ED-4800-9F36-5CAF1A4385FC}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FDDBD8A9-32ED-4800-9F36-5CAF1A4385FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FDDBD8A9-32ED-4800-9F36-5CAF1A4385FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FDDBD8A9-32ED-4800-9F36-5CAF1A4385FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FDDBD8A9-32ED-4800-9F36-5CAF1A4385FC}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Added: nemerle/trunk/TupleTest/TupleTest.suo
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleTest/TupleTest/Main.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/TupleTest/TupleTest/Main.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,6 @@
+using VyborMacro;
+using System.Console;
+
+def arr = (100, 1000, 10000, 100000);
+VyborMacro.PrintTuple(arr, 4);
+WriteLine(arr);
Added: nemerle/trunk/TupleTest/TupleTest/TupleTest.csproj
==============================================================================
--- (empty file)
+++ nemerle/trunk/TupleTest/TupleTest/TupleTest.csproj Fri Nov 3 15:34:05 2006
@@ -0,0 +1,46 @@
+ďťż<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{FDDBD8A9-32ED-4800-9F36-5CAF1A4385FC}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>TupleTest</RootNamespace>
+ <AssemblyName>TupleTest</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Main.n" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="TupleMacro, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TupleMacro\TupleMacro\bin\Debug\TupleMacro.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <Import Project="C:\Program Files\Nemerle\Nemerle.MSBuild.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: nemerle/trunk/TupleTest/TupleTest/bin/Debug/TupleMacro.dll
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleTest/TupleTest/bin/Debug/TupleMacro.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleTest/TupleTest/bin/Debug/TupleTest.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleTest/TupleTest/bin/Debug/TupleTest.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleTest/TupleTest/bin/Debug/TupleTest.vshost.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleTest/TupleTest/obj/Debug/ResolveAssemblyReference.cache
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleTest/TupleTest/obj/Debug/TupleTest.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleTest/TupleTest/obj/Debug/TupleTest.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/TupleTest/TupleTest/obj/TupleTest.csproj.FileList.txt
==============================================================================
--- (empty file)
+++ nemerle/trunk/TupleTest/TupleTest/obj/TupleTest.csproj.FileList.txt Fri Nov 3 15:34:05 2006
@@ -0,0 +1,7 @@
+bin\Debug\TupleTest.exe
+bin\Debug\TupleTest.pdb
+bin\Debug\TupleMacro.dll
+bin\Debug\TupleMacro.pdb
+obj\Debug\ResolveAssemblyReference.cache
+obj\Debug\TupleTest.exe
+obj\Debug\TupleTest.pdb
Added: nemerle/trunk/myMacro/myMacro.sln
==============================================================================
--- (empty file)
+++ nemerle/trunk/myMacro/myMacro.sln Fri Nov 3 15:34:05 2006
@@ -0,0 +1,26 @@
+ďťż
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "myMacro", "myMacro\myMacro.csproj", "{30F9DF90-2FAC-4B60-8D61-35516ECBD08D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "..\App\App.csproj", "{807454A6-97CA-4C6B-B4A7-995FEDFE0333}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {30F9DF90-2FAC-4B60-8D61-35516ECBD08D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {30F9DF90-2FAC-4B60-8D61-35516ECBD08D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {30F9DF90-2FAC-4B60-8D61-35516ECBD08D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {30F9DF90-2FAC-4B60-8D61-35516ECBD08D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {807454A6-97CA-4C6B-B4A7-995FEDFE0333}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {807454A6-97CA-4C6B-B4A7-995FEDFE0333}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {807454A6-97CA-4C6B-B4A7-995FEDFE0333}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {807454A6-97CA-4C6B-B4A7-995FEDFE0333}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Added: nemerle/trunk/myMacro/myMacro.suo
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/myMacro/myMacro/Test-001-macro.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/myMacro/myMacro/Test-001-macro.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,11 @@
+using System.Console;
+// abstract, and, array, as, base, catch, class, def, delegate, do, else, enum, event, extern, false, finally, for, foreach, fun, if, implements, in, interface, internal, lock, macro, match, module, mutable, namespace, new, null, out, override, params,
+// WriteLine public private protected internal
+
+macro TestMacro(myName)
+{
+ WriteLine("Compile-time. myName = " + myName.ToString());
+ // WriteLine(myName.GetType());
+// <[ WriteLine("Run-time.\n Hallo, " + myName.ToString()) ]>;
+<[ WriteLine("Run-time.\n Hallo, " + $myName) ]>;
+}
Added: nemerle/trunk/myMacro/myMacro/bin/Debug/myMacro.dll
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/myMacro/myMacro/bin/Debug/myMacro.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/myMacro/myMacro/myMacro.csproj
==============================================================================
--- (empty file)
+++ nemerle/trunk/myMacro/myMacro/myMacro.csproj Fri Nov 3 15:34:05 2006
@@ -0,0 +1,43 @@
+ďťż<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{30F9DF90-2FAC-4B60-8D61-35516ECBD08D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>myMacro</RootNamespace>
+ <AssemblyName>myMacro</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Nemerle.Compiler" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Test-001-macro.n" />
+ </ItemGroup>
+ <Import Project="C:\Program Files\Nemerle\Nemerle.MSBuild.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: nemerle/trunk/myMacro/myMacro/obj/Debug/ResolveAssemblyReference.cache
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/myMacro/myMacro/obj/Debug/myMacro.dll
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/myMacro/myMacro/obj/Debug/myMacro.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/myMacro/myMacro/obj/myMacro.csproj.FileList.txt
==============================================================================
--- (empty file)
+++ nemerle/trunk/myMacro/myMacro/obj/myMacro.csproj.FileList.txt Fri Nov 3 15:34:05 2006
@@ -0,0 +1,5 @@
+bin\Debug\myMacro.dll
+bin\Debug\myMacro.pdb
+obj\Debug\ResolveAssemblyReference.cache
+obj\Debug\myMacro.dll
+obj\Debug\myMacro.pdb
Added: nemerle/trunk/test/Test-001-macro.dll
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/test/Test-001-macro.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/test/Test-001-macro.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,11 @@
+using System.Console;
+// abstract, and, array, as, base, catch, class, def, delegate, do, else, enum, event, extern, false, finally, for, foreach, fun, if, implements, in, interface, internal, lock, macro, match, module, mutable, namespace, new, null, out, override, params,
+// WriteLine public private protected internal
+
+macro TestMacro(myName)
+{
+ WriteLine("Compile-time. myName = " + myName.ToString());
+ // WriteLine(myName.GetType());
+ <[ WriteLine("Run-time.\n Hallo, " + myName.ToString()) ]>;
+//<[ WriteLine("Run-time.\n Hallo, " + $myName) ]>;
+}
Added: nemerle/trunk/test/Test-001-macro.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/test/Test-001.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/test/Test-001.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/test/Test-001.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,6 @@
+// abstract, and, array, as, base, catch, class, def, delegate, do, else, enum, event, extern, false, finally, for, foreach, fun, if, implements, in, interface, internal, lock, macro, match, module, mutable, namespace, new, null, out, override, params,
+// WriteLine public private protected internal
+
+TestMacro("Vlad");
+//def a = "Vlad2";
+//TestMacro(a);
Added: nemerle/trunk/test/Test-001.pdb
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/test/mymacro.dll
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/test/mymacro.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/test/mymacro.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,10 @@
+macro m ()
+{
+ Nemerle.IO.printf ("compile-time\n");
+ <[ Nemerle.IO.printf ("run-time\n") ]>;
+}
+
+macro generate_expression ()
+{
+ MyModule.compute_some_expression ();
+}
\ No newline at end of file
Added: nemerle/trunk/test/myprog.exe
==============================================================================
Binary file. No diff available.
Added: nemerle/trunk/test/myprog.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/test/myprog.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,6 @@
+module M
+{
+ public Main () : void {
+ m ();
+ }
+}
\ No newline at end of file
Added: nemerle/trunk/test/variant.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/test/variant.n Fri Nov 3 15:34:05 2006
@@ -0,0 +1,19 @@
+variant Tree
+{
+ | Node
+ {
+ left : Tree;
+ elem : int;
+ right : Tree;
+ }
+ | Null
+}
+
+Insert (t : Tree, e : int) : Tree
+{
+ math(t)
+ {
+ | Tree.Node (l, cur, r) =>
+ if ()
+ }
+}
\ No newline at end of file
More information about the svn
mailing list