Skip to content

Commit 114c79f

Browse files
committed
1 parent a5d7e58 commit 114c79f

File tree

11 files changed

+1309
-0
lines changed

11 files changed

+1309
-0
lines changed

MathParser/LICENSE.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Copyright (c) 2012, Artem Los
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5+
6+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7+
8+
* 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.
9+
10+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT HOLDER OR CONTRIBUTORS 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.

MathParser/MathParser.cs

Lines changed: 556 additions & 0 deletions
Large diffs are not rendered by default.

MathParser/MathParser.csproj

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" 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>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{E17D08FF-ADF8-4F6E-B6D9-ED343E76E3A8}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>MathParser</RootNamespace>
12+
<AssemblyName>MathParser</AssemblyName>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
<SccProjectName>SAK</SccProjectName>
16+
<SccLocalPath>SAK</SccLocalPath>
17+
<SccAuxPath>SAK</SccAuxPath>
18+
<SccProvider>SAK</SccProvider>
19+
</PropertyGroup>
20+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
21+
<DebugSymbols>true</DebugSymbols>
22+
<DebugType>full</DebugType>
23+
<Optimize>false</Optimize>
24+
<OutputPath>bin\Debug\</OutputPath>
25+
<DefineConstants>DEBUG;TRACE</DefineConstants>
26+
<ErrorReport>prompt</ErrorReport>
27+
<WarningLevel>4</WarningLevel>
28+
<DocumentationFile>bin\Debug\MathParser.XML</DocumentationFile>
29+
</PropertyGroup>
30+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
31+
<DebugType>pdbonly</DebugType>
32+
<Optimize>true</Optimize>
33+
<OutputPath>bin\Release\</OutputPath>
34+
<DefineConstants>TRACE</DefineConstants>
35+
<ErrorReport>prompt</ErrorReport>
36+
<WarningLevel>4</WarningLevel>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="System" />
40+
<Reference Include="System.Core" />
41+
<Reference Include="System.Xml.Linq" />
42+
<Reference Include="System.Data.DataSetExtensions" />
43+
<Reference Include="Microsoft.CSharp" />
44+
<Reference Include="System.Data" />
45+
<Reference Include="System.Xml" />
46+
</ItemGroup>
47+
<ItemGroup>
48+
<Compile Include="MathParser.cs" />
49+
<Compile Include="Properties\AssemblyInfo.cs" />
50+
</ItemGroup>
51+
<ItemGroup>
52+
<Content Include="LICENSE.txt" />
53+
<Content Include="READ ME.txt" />
54+
<Content Include="ToAdd.txt" />
55+
</ItemGroup>
56+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
57+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
58+
Other similar extension points exist, see Microsoft.Common.targets.
59+
<Target Name="BeforeBuild">
60+
</Target>
61+
<Target Name="AfterBuild">
62+
</Target>
63+
-->
64+
</Project>

MathParser/MathParser.sln

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.21005.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MathParser", "MathParser.csproj", "{E17D08FF-ADF8-4F6E-B6D9-ED343E76E3A8}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTest", "UnitTest\UnitTest.csproj", "{4BC67DFD-E614-4E23-91D6-25F38D575BA5}"
9+
EndProject
10+
Global
11+
GlobalSection(TeamFoundationVersionControl) = preSolution
12+
SccNumberOfProjects = 3
13+
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
14+
SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs18
15+
SccLocalPath0 = .
16+
SccProjectUniqueName1 = MathParser.csproj
17+
SccLocalPath1 = .
18+
SccProjectUniqueName2 = UnitTest\\UnitTest.csproj
19+
SccProjectName2 = UnitTest
20+
SccLocalPath2 = UnitTest
21+
EndGlobalSection
22+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
23+
Debug|Any CPU = Debug|Any CPU
24+
Release|Any CPU = Release|Any CPU
25+
EndGlobalSection
26+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
27+
{E17D08FF-ADF8-4F6E-B6D9-ED343E76E3A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28+
{E17D08FF-ADF8-4F6E-B6D9-ED343E76E3A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
29+
{E17D08FF-ADF8-4F6E-B6D9-ED343E76E3A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
30+
{E17D08FF-ADF8-4F6E-B6D9-ED343E76E3A8}.Release|Any CPU.Build.0 = Release|Any CPU
31+
{4BC67DFD-E614-4E23-91D6-25F38D575BA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32+
{4BC67DFD-E614-4E23-91D6-25F38D575BA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
33+
{4BC67DFD-E614-4E23-91D6-25F38D575BA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
34+
{4BC67DFD-E614-4E23-91D6-25F38D575BA5}.Release|Any CPU.Build.0 = Release|Any CPU
35+
EndGlobalSection
36+
GlobalSection(SolutionProperties) = preSolution
37+
HideSolutionNode = FALSE
38+
EndGlobalSection
39+
EndGlobal
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
using System.Resources;
5+
6+
// Управление общими сведениями о сборке осуществляется с помощью
7+
// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
8+
// связанные со сборкой.
9+
[assembly: AssemblyTitle("MathParser")]
10+
[assembly: AssemblyDescription("")]
11+
[assembly: AssemblyConfiguration("")]
12+
[assembly: AssemblyCompany("Artem Los")]
13+
[assembly: AssemblyProduct("MathParser")]
14+
[assembly: AssemblyCopyright("Copyright © 2012-2014 Artem Los")]
15+
[assembly: AssemblyTrademark("")]
16+
[assembly: AssemblyCulture("")]
17+
18+
19+
20+
// Сведения о версии сборки состоят из следующих четырех значений:
21+
//
22+
// Основной номер версии
23+
// Дополнительный номер версии
24+
// Номер построения
25+
// Редакция
26+
//
27+
// Можно задать все значения или принять номер построения и номер редакции по умолчанию,
28+
// используя "*", как показано ниже:
29+
// [assembly: AssemblyVersion("1.0.*")]
30+
[assembly: AssemblyVersion("1.0.8.1")]
31+
[assembly: AssemblyFileVersion("1.0.8.1")]
32+
[assembly: NeutralResourcesLanguageAttribute("")]

MathParser/READ ME.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
If you want to get the compiled assembly, go to bin/Debug/MathParser.dll
2+
3+
Enjoy! :)
4+
/Artem

MathParser/ToAdd.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
":" operator should work as a fraction!
2+
3+
4+
add an extension method for decimal.Tostring and make the current culture
5+
6+
7+
8+
ODL
9+
/* CONSTRUCTOR */
10+
//public MathParser()
11+
// :this(culturInfo: new CultureInfo("en-US"))
12+
//{
13+
//}
14+
15+
16+
TO ADD:
17+
Local variables should be able to store arrays ex {}, or ()
18+
and retrive the value by varName[index]
19+
20+
Functions should be able to return an array of decimals
21+
22+
23+
add an eexception when user do not enter two numbers for an operator, ex "5+"
24+
25+
26+
Lines changed: 36 additions & 0 deletions
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("UnitTest")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("UnitTest")]
13+
[assembly: AssemblyCopyright("Copyright © 2014")]
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("6e63adfa-e2d7-4927-97ce-fd3a2468dcd5")]
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")]
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" 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+
<ProjectGuid>{4BC67DFD-E614-4E23-91D6-25F38D575BA5}</ProjectGuid>
7+
<OutputType>Library</OutputType>
8+
<AppDesignerFolder>Properties</AppDesignerFolder>
9+
<RootNamespace>UnitTest</RootNamespace>
10+
<AssemblyName>UnitTest</AssemblyName>
11+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
15+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
16+
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
17+
<IsCodedUITest>False</IsCodedUITest>
18+
<TestProjectType>UnitTest</TestProjectType>
19+
<SccProjectName>SAK</SccProjectName>
20+
<SccLocalPath>SAK</SccLocalPath>
21+
<SccAuxPath>SAK</SccAuxPath>
22+
<SccProvider>SAK</SccProvider>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25+
<DebugSymbols>true</DebugSymbols>
26+
<DebugType>full</DebugType>
27+
<Optimize>false</Optimize>
28+
<OutputPath>bin\Debug\</OutputPath>
29+
<DefineConstants>DEBUG;TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
34+
<DebugType>pdbonly</DebugType>
35+
<Optimize>true</Optimize>
36+
<OutputPath>bin\Release\</OutputPath>
37+
<DefineConstants>TRACE</DefineConstants>
38+
<ErrorReport>prompt</ErrorReport>
39+
<WarningLevel>4</WarningLevel>
40+
</PropertyGroup>
41+
<ItemGroup>
42+
<Reference Include="System" />
43+
<Reference Include="System.Core">
44+
<RequiredTargetFramework>3.5</RequiredTargetFramework>
45+
</Reference>
46+
</ItemGroup>
47+
<Choose>
48+
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
49+
<ItemGroup>
50+
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
51+
</ItemGroup>
52+
</When>
53+
<Otherwise>
54+
<ItemGroup>
55+
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
56+
</ItemGroup>
57+
</Otherwise>
58+
</Choose>
59+
<ItemGroup>
60+
<Compile Include="UnitTest1.cs" />
61+
<Compile Include="Properties\AssemblyInfo.cs" />
62+
</ItemGroup>
63+
<ItemGroup>
64+
<ProjectReference Include="..\MathParser.csproj">
65+
<Project>{e17d08ff-adf8-4f6e-b6d9-ed343e76e3a8}</Project>
66+
<Name>MathParser</Name>
67+
</ProjectReference>
68+
</ItemGroup>
69+
<ItemGroup>
70+
<Content Include="resultsMathosParser1.txt" />
71+
</ItemGroup>
72+
<Choose>
73+
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
74+
<ItemGroup>
75+
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
76+
<Private>False</Private>
77+
</Reference>
78+
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
79+
<Private>False</Private>
80+
</Reference>
81+
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
82+
<Private>False</Private>
83+
</Reference>
84+
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
85+
<Private>False</Private>
86+
</Reference>
87+
</ItemGroup>
88+
</When>
89+
</Choose>
90+
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
91+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
92+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
93+
Other similar extension points exist, see Microsoft.Common.targets.
94+
<Target Name="BeforeBuild">
95+
</Target>
96+
<Target Name="AfterBuild">
97+
</Target>
98+
-->
99+
</Project>

0 commit comments

Comments
 (0)