-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
2,645 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Properties StartupConfiguration="{E5A172D3-CE33-4031-84EA-35835913261E}|Default"> | ||
<MonoDevelop.Ide.Workbench ActiveDocument="Nadia.C.Sharp/Node Folder/Node.cs"> | ||
<Files> | ||
<File FileName="Nadia.C.Sharp/Program.cs" Line="27" Column="1" /> | ||
<File FileName="Nadia.C.Sharp/FactValue Folder/FactListValue.cs" Line="16" Column="9" /> | ||
<File FileName="Nadia.C.Sharp/FactValue Folder/FactValue.cs" Line="43" Column="10" /> | ||
<File FileName="Nadia.C.Sharp/Node Folder/ComparisonLine.cs" Line="12" Column="13" /> | ||
<File FileName="Nadia.C.Sharp/Node Folder/Node.cs" Line="12" Column="35" /> | ||
<File FileName="Nadia.C.Sharp/RuleParser Folder/Tokens.cs" Line="20" Column="13" /> | ||
<File FileName="Nadia.C.Sharp/RuleParser Folder/Tokenizer.cs" Line="22" Column="88" /> | ||
</Files> | ||
</MonoDevelop.Ide.Workbench> | ||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" /> | ||
<MonoDevelop.Ide.DebuggingService.Breakpoints> | ||
<BreakpointStore /> | ||
</MonoDevelop.Ide.DebuggingService.Breakpoints> | ||
<MonoDevelop.Ide.DebuggingService.PinnedWatches /> | ||
<MultiItemStartupConfigurations /> | ||
<MonoDevelop.Ide.ItemProperties.Nadia.C.Sharp PreferredExecutionTarget="MonoDevelop.Default" /> | ||
</Properties> |
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2012 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadia.C.Sharp", "Nadia.C.Sharp\Nadia.C.Sharp.csproj", "{E5A172D3-CE33-4031-84EA-35835913261E}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|x86 = Debug|x86 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{E5A172D3-CE33-4031-84EA-35835913261E}.Debug|x86.ActiveCfg = Debug|x86 | ||
{E5A172D3-CE33-4031-84EA-35835913261E}.Debug|x86.Build.0 = Debug|x86 | ||
{E5A172D3-CE33-4031-84EA-35835913261E}.Release|x86.ActiveCfg = Release|x86 | ||
{E5A172D3-CE33-4031-84EA-35835913261E}.Release|x86.Build.0 = Release|x86 | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Properties StartupConfiguration="{E5A172D3-CE33-4031-84EA-35835913261E}|Default"> | ||
<MonoDevelop.Ide.Workbench ActiveDocument="Node Folder/ComparisonLine.cs"> | ||
<Files> | ||
<File FileName="RuleParser Folder/Tokenizer.cs" Line="10" Column="62" /> | ||
<File FileName="Program.cs" Line="95" Column="25" /> | ||
<File FileName="Node Folder/ComparisonLine.cs" Line="81" Column="116" /> | ||
<File FileName="Node Folder/ExprConclusionLine.cs" Line="86" Column="61" /> | ||
<File FileName="Node Folder/Node.cs" Line="92" Column="21" /> | ||
<File FileName="FactValue Folder/FactDateValue.cs" Line="6" Column="17" /> | ||
</Files> | ||
</MonoDevelop.Ide.Workbench> | ||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" /> | ||
<MonoDevelop.Ide.DebuggingService.Breakpoints> | ||
<BreakpointStore /> | ||
</MonoDevelop.Ide.DebuggingService.Breakpoints> | ||
<MonoDevelop.Ide.DebuggingService.PinnedWatches /> | ||
<MultiItemStartupConfigurations /> | ||
<MonoDevelop.Ide.ItemProperties.Nadia.C.Sharp PreferredExecutionTarget="MonoDevelop.Default" /> | ||
</Properties> |
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System; | ||
namespace Nadia.C.Sharp.FactValueFolder | ||
{ | ||
public class FactBooleanValue<T> : FactValue<T> | ||
{ | ||
private bool value; | ||
private bool? defaultValue; //bool? means nullable bool primative type | ||
|
||
public FactBooleanValue(bool booleanValue) | ||
{ | ||
SetValue(booleanValue); | ||
} | ||
|
||
|
||
public void SetValue(bool booleanValue) | ||
{ | ||
this.value = booleanValue; | ||
} | ||
|
||
public FactValue<T> NegatingValue() | ||
{ | ||
return FactValue<T>.Parse(!this.value); | ||
} | ||
|
||
public override FactValueType GetFactValueType() | ||
{ | ||
return FactValueType.BOOLEAN; | ||
} | ||
|
||
|
||
public override void SetDefaultValue(T defaultValue) | ||
{ | ||
this.defaultValue = (bool)Convert.ChangeType(defaultValue, typeof(bool)); | ||
} | ||
|
||
|
||
public override T GetValue() | ||
{ | ||
return (T)Convert.ChangeType(this.value, typeof(T)); | ||
} | ||
|
||
|
||
public override T GetDefaultValue() | ||
{ | ||
return (T)Convert.ChangeType(this.defaultValue, typeof(T)); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
namespace Nadia.C.Sharp.FactValueFolder | ||
{ | ||
public class FactDateValue<T> : FactValue<T> | ||
{ | ||
private DateTime value; | ||
private DateTime defaultValue; | ||
|
||
public FactDateValue(DateTime date) | ||
{ | ||
SetValue(date); | ||
} | ||
|
||
public void SetValue(DateTime cal) | ||
{ | ||
this.value = cal; | ||
} | ||
|
||
|
||
public override T GetValue() | ||
{ | ||
return (T)Convert.ChangeType(this.value, typeof(T)); | ||
} | ||
|
||
|
||
|
||
public override T GetDefaultValue() | ||
{ | ||
return (T)Convert.ChangeType(this.defaultValue, typeof(T)); | ||
} | ||
|
||
|
||
public override FactValueType GetFactValueType() | ||
{ | ||
return FactValueType.DATE; | ||
} | ||
|
||
public override void SetDefaultValue(T defaultValue) | ||
{ | ||
this.defaultValue = (DateTime)Convert.ChangeType(defaultValue, typeof(DateTime)); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System; | ||
using System.Text.RegularExpressions; | ||
|
||
namespace Nadia.C.Sharp.FactValueFolder | ||
{ | ||
public class FactDefiStringValue<T> : FactValue<T> | ||
{ | ||
private string value; | ||
private string defaultValue; | ||
private string pattern = @"^("")(.*)("")(.)*"; | ||
//private Regex regex = new Regex(pattern); | ||
private Match match; | ||
|
||
public FactDefiStringValue(string s) | ||
{ | ||
match = Regex.Match(s, pattern); | ||
if (match.Success) | ||
{ | ||
SetValue(match.Groups[2].Value); | ||
} | ||
} | ||
public void SetValue(string s) | ||
{ | ||
this.value = s; | ||
} | ||
|
||
|
||
public override FactValueType GetFactValueType() | ||
{ | ||
return FactValueType.DEFI_STRING; | ||
} | ||
|
||
public override void SetDefaultValue(T defaultValue) | ||
{ | ||
this.defaultValue = defaultValue.ToString(); | ||
} | ||
|
||
public override T GetValue() | ||
{ | ||
// TODO Auto-generated method stub | ||
return (T)Convert.ChangeType(this.value, typeof(T)); | ||
} | ||
|
||
public override T GetDefaultValue() | ||
{ | ||
// TODO Auto-generated method stub | ||
return (T)Convert.ChangeType(this.defaultValue, typeof(T)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
namespace Nadia.C.Sharp.FactValueFolder | ||
{ | ||
public class FactDoubleValue<T> : FactValue<T> | ||
{ | ||
private double value; | ||
private double? defaultValue; //double? means nullable double primative type | ||
|
||
public FactDoubleValue(double d) | ||
{ | ||
SetValue(d); | ||
} | ||
|
||
public void SetValue(double d) | ||
{ | ||
this.value = d; | ||
} | ||
|
||
|
||
public override T GetValue() | ||
{ | ||
return (T)Convert.ChangeType(this.value, typeof(T)); | ||
} | ||
|
||
|
||
|
||
public override T GetDefaultValue() | ||
{ | ||
return (T)Convert.ChangeType(this.defaultValue, typeof(T)); | ||
} | ||
|
||
|
||
public override FactValueType GetFactValueType() | ||
{ | ||
return FactValueType.DECIMAL; | ||
} | ||
|
||
|
||
public override void SetDefaultValue(T defaultValue) | ||
{ | ||
this.defaultValue = (double)Convert.ChangeType(defaultValue, typeof(double)); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using System; | ||
namespace Nadia.C.Sharp.FactValueFolder | ||
{ | ||
public class FactHashValue<T> : FactValue<T> | ||
{ | ||
private String value; | ||
private String defaultValue; | ||
|
||
public FactHashValue(String hash) | ||
{ | ||
SetValue(hash); | ||
} | ||
|
||
|
||
|
||
public void SetValue(String hash) | ||
{ | ||
this.value = hash; | ||
} | ||
|
||
|
||
public override FactValueType GetFactValueType() | ||
{ | ||
return FactValueType.HASH; | ||
} | ||
|
||
|
||
public override void SetDefaultValue(T defaultValue) | ||
{ | ||
this.defaultValue = (string)Convert.ChangeType(defaultValue, typeof(string)); | ||
} | ||
|
||
|
||
public override T GetValue() | ||
{ | ||
return (T)Convert.ChangeType(this.value, typeof(T)); | ||
} | ||
|
||
|
||
public override T GetDefaultValue() | ||
{ | ||
return (T)Convert.ChangeType(this.defaultValue, typeof(T)); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System; | ||
namespace Nadia.C.Sharp.FactValueFolder | ||
{ | ||
public class FactIntegerValue<T> : FactValue<T> | ||
{ | ||
private int value; | ||
private int? defaultValue = null; //int? means nullable int primative type | ||
|
||
public FactIntegerValue(int i) | ||
{ | ||
SetValue(i); | ||
} | ||
|
||
|
||
|
||
public void SetValue(int value) | ||
{ | ||
this.value = value; | ||
} | ||
|
||
|
||
|
||
public override FactValueType GetFactValueType() | ||
{ | ||
return FactValueType.INTEGER; | ||
} | ||
|
||
|
||
public override void SetDefaultValue(T defaultValue) | ||
{ | ||
this.defaultValue = (int)Convert.ChangeType(defaultValue, typeof(int)); | ||
} | ||
|
||
|
||
public override T GetValue() | ||
{ | ||
return (T)Convert.ChangeType(this.value, typeof(T)); | ||
} | ||
|
||
|
||
|
||
public override T GetDefaultValue() | ||
{ | ||
// TODO Auto-generated method stub | ||
return (T)Convert.ChangeType(this.defaultValue, typeof(T)); | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.