Skip to content

Commit e9171e7

Browse files
committed
added project
0 parents  commit e9171e7

40 files changed

+705
-0
lines changed
128 KB
Binary file not shown.
128 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace RuleDslCompiler
7+
{
8+
class Program
9+
{
10+
static void Main(string[] args)
11+
{
12+
}
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("RuleDslCompiler")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("RuleDslCompiler")]
13+
[assembly: AssemblyCopyright("Copyright © 2010")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("f23dbdf8-8c71-4daf-b3e8-7171882daa58")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>9.0.21022</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{7F3A5F9E-ED86-4765-B5AC-F2BC9258EA96}</ProjectGuid>
9+
<OutputType>Exe</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>RuleDslCompiler</RootNamespace>
12+
<AssemblyName>RuleDslCompiler</AssemblyName>
13+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="System" />
35+
<Reference Include="System.Core">
36+
<RequiredTargetFramework>3.5</RequiredTargetFramework>
37+
</Reference>
38+
<Reference Include="System.Xml.Linq">
39+
<RequiredTargetFramework>3.5</RequiredTargetFramework>
40+
</Reference>
41+
<Reference Include="System.Data.DataSetExtensions">
42+
<RequiredTargetFramework>3.5</RequiredTargetFramework>
43+
</Reference>
44+
<Reference Include="System.Data" />
45+
<Reference Include="System.Xml" />
46+
</ItemGroup>
47+
<ItemGroup>
48+
<Compile Include="Program.cs" />
49+
<Compile Include="Properties\AssemblyInfo.cs" />
50+
</ItemGroup>
51+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
52+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
53+
Other similar extension points exist, see Microsoft.Common.targets.
54+
<Target Name="BeforeBuild">
55+
</Target>
56+
<Target Name="AfterBuild">
57+
</Target>
58+
-->
59+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 10.00
3+
# Visual Studio 2008
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RuleDslCompiler", "RuleDslCompiler.csproj", "{7F3A5F9E-ED86-4765-B5AC-F2BC9258EA96}"
5+
EndProject
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedLibrary", "..\SharedLibrary\SharedLibrary.csproj", "{60AD4508-8456-4F0C-88BD-7D0F80B27121}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "..\Tests\Tests.csproj", "{C0248247-A6B7-49F5-943C-438CD65582EC}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{7F3A5F9E-ED86-4765-B5AC-F2BC9258EA96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{7F3A5F9E-ED86-4765-B5AC-F2BC9258EA96}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{7F3A5F9E-ED86-4765-B5AC-F2BC9258EA96}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{7F3A5F9E-ED86-4765-B5AC-F2BC9258EA96}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{60AD4508-8456-4F0C-88BD-7D0F80B27121}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{60AD4508-8456-4F0C-88BD-7D0F80B27121}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{60AD4508-8456-4F0C-88BD-7D0F80B27121}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{60AD4508-8456-4F0C-88BD-7D0F80B27121}.Release|Any CPU.Build.0 = Release|Any CPU
24+
{C0248247-A6B7-49F5-943C-438CD65582EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25+
{C0248247-A6B7-49F5-943C-438CD65582EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
26+
{C0248247-A6B7-49F5-943C-438CD65582EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
27+
{C0248247-A6B7-49F5-943C-438CD65582EC}.Release|Any CPU.Build.0 = Release|Any CPU
28+
EndGlobalSection
29+
GlobalSection(SolutionProperties) = preSolution
30+
HideSolutionNode = FALSE
31+
EndGlobalSection
32+
EndGlobal
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3+
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
4+
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
5+
<security>
6+
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
7+
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
8+
</requestedPrivileges>
9+
</security>
10+
</trustInfo>
11+
</assembly>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
D:\Rule DSL compiler\RuleDslCompiler\bin\Debug\RuleDslCompiler.exe
2+
D:\Rule DSL compiler\RuleDslCompiler\bin\Debug\RuleDslCompiler.pdb
3+
D:\Rule DSL compiler\RuleDslCompiler\obj\Debug\ResolveAssemblyReference.cache
4+
D:\Rule DSL compiler\RuleDslCompiler\obj\Debug\RuleDslCompiler.exe
5+
D:\Rule DSL compiler\RuleDslCompiler\obj\Debug\RuleDslCompiler.pdb
6+
D:\My Dropbox\private items\Rule DSL compiler\RuleDslCompiler\obj\Debug\RuleDslCompiler.exe
7+
D:\My Dropbox\private items\Rule DSL compiler\RuleDslCompiler\obj\Debug\RuleDslCompiler.pdb
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace SharedLibrary
7+
{
8+
public static class CharExtension
9+
{
10+
public static bool IsDigit(this char chararcter)
11+
{
12+
return char.IsDigit(chararcter);
13+
}
14+
15+
public static bool IsLetter(this char chararcter)
16+
{
17+
return char.IsLetter(chararcter);
18+
}
19+
20+
public static bool IsLower(this char chararcter)
21+
{
22+
return char.IsLower(chararcter);
23+
}
24+
25+
public static bool IsUpper(this char chararcter)
26+
{
27+
return char.IsUpper(chararcter);
28+
}
29+
30+
public static bool IsWhiteSpace(this char chararcter)
31+
{
32+
return char.IsWhiteSpace(chararcter);
33+
}
34+
35+
public static bool IsLetterOrDigit(this char chararcter)
36+
{
37+
return char.IsLetterOrDigit(chararcter);
38+
}
39+
40+
public static bool IsControl(this char chararcter)
41+
{
42+
return char.IsControl(chararcter);
43+
}
44+
45+
public static bool IsSeparator(this char chararcter)
46+
{
47+
return char.IsSeparator(chararcter);
48+
}
49+
50+
public static bool IsSymbol(this char chararcter)
51+
{
52+
return char.IsSymbol(chararcter);
53+
}
54+
}
55+
}
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace SharedLibrary
7+
{
8+
public class Class1
9+
{
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace SharedLibrary
7+
{
8+
public static class ConstsDefinition
9+
{
10+
public const char EOF_CHAR = (char)0;
11+
12+
}
13+
}
+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace SharedLibrary
7+
{
8+
public class Lexer
9+
{
10+
public string Expression { get; set; }
11+
private char[] expressionData;
12+
private int currentPosition=-1;
13+
private int expressionLength = 0;
14+
15+
public Lexer(string expression)
16+
{
17+
initializeExpressionData(expression);
18+
resetCursor();
19+
}
20+
21+
public Token NextToken()
22+
{
23+
return new Token();
24+
}
25+
26+
protected char advance()
27+
{
28+
moveCursor();
29+
if (ReachedEnd())
30+
{
31+
reverseCursor();
32+
return ConstsDefinition.EOF_CHAR;
33+
}
34+
return expressionData[currentPosition];
35+
}
36+
37+
private void initializeExpressionData(string expression)
38+
{
39+
Expression = expression;
40+
expressionData = expression.ToCharArray();
41+
expressionLength = expressionData.Length;
42+
}
43+
44+
private void resetCursor()
45+
{
46+
currentPosition = -1;
47+
}
48+
49+
private void moveCursor()
50+
{
51+
currentPosition++;
52+
}
53+
54+
private void reverseCursor()
55+
{
56+
currentPosition--;
57+
}
58+
59+
private bool ReachedEnd()
60+
{
61+
return currentPosition >= expressionLength;
62+
}
63+
}
64+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("SharedLibrary")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("SharedLibrary")]
13+
[assembly: AssemblyCopyright("Copyright © 2010")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("bc18024c-ddad-4af7-a42a-12d4fcf24cc3")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

0 commit comments

Comments
 (0)