Skip to content

Commit

Permalink
Version 1.0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zielesny committed Apr 2, 2018
1 parent a3e3a70 commit 71ef988
Show file tree
Hide file tree
Showing 13 changed files with 20,817 additions and 0 deletions.
Binary file added FAQ - MathCompiler Version 1-0-0-0.pdf
Binary file not shown.
160 changes: 160 additions & 0 deletions MathCompiler/CodedInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
// MathCompiler - Mathematical function compiler for calculation of function
// values of arbitrary complex single-line mathematical formulas
// Copyright (C) 2018 Achim Zielesny ([email protected])
//
// Source code is available at <https://github.com/zielesny/MathCompiler>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;
using System.Text;

namespace MathCompiler
{
/// <summary>
/// Coded information for classes MathCompiler
/// </summary>
public enum CodedInfo : int
{
/// <summary>
/// Formula contains forbidden character.
/// </summary>
ForbiddenCharacter = 0,
/// <summary>
/// First token ' {0} ' is invalid.
/// </summary>
InvalidFirstToken = 1,
/// <summary>
/// Token ' {1} ' is not allowed to follow token ' {0} '.
/// </summary>
InvalidFollowToken = 2,
/// <summary>
/// Function ' {0} ' has {1} argument(s).
/// </summary>
InvalidFunctionArgumentCount = 3,
/// <summary>
/// Last token ' {0} ' is invalid.
/// </summary>
InvalidLastToken = 4,
/// <summary>
/// Invalid token: ' {0} '.
/// </summary>
InvalidToken = 5,
/// <summary>
/// Vector expression ' {0} ' is only allowed as an argument of a vector function.
/// </summary>
InvalidVectorExpression = 6,
/// <summary>
/// Closing bracket is missing.
/// </summary>
MissingClosingBracket = 7,
/// <summary>
/// Function ' {0} ' does not have a closing bracket.
/// </summary>
MissingFunctionClosingBracket = 8,
/// <summary>
/// No Formula defined.
/// </summary>
NoFormula = 9,
/// <summary>
/// Formula is null/empty.
/// </summary>
FormulaNullEmpty = 10,
/// <summary>
/// Formula is successfully compiled.
/// </summary>
SuccessfullyCompiled = 11,
/// <summary>
/// Unequal number of brackets: Open/Close = {0} / {1}.
/// </summary>
UnequalNumberOfBrackets = 12,
/// <summary>
/// Argument {0} of vector function ' {1} ' is a vector argument.
/// </summary>
MissingVectorArgument = 13,
/// <summary>
/// Argument {0} of vector function ' {1} ' is a scalar argument.
/// </summary>
MissingScalarArgument = 14,
/// <summary>
/// Not used
/// </summary>
NotUsed1 = 15,
/// <summary>
/// Invalid repeating quotation marks.
/// </summary>
InvalidRepeatingQuotationMarks = 16,
/// <summary>
/// Not used
/// </summary>
NotUsed2 = 17,
/// <summary>
/// Conditional IF has 3 arguments.
/// </summary>
InvalidIfArgumentCount = 18,
/// <summary>
/// Conditional IF does not have a closing bracket.
/// </summary>
MissingIfClosingBracket = 19,
/// <summary>
/// Invalid token outside multi-parameter function: ' {0} '.
/// </summary>
InvalidTokenOutsideFormula = 20,
/// <summary>
/// Not used
/// </summary>
NotUsed3 = 21,
/// <summary>
/// Not used
/// </summary>
NotUsed4 = 22,
/// <summary>
/// Not used
/// </summary>
NotUsed5 = 23,
/// <summary>
/// Not used
/// </summary>
NotUsed6 = 24,
/// <summary>
/// Not used
/// </summary>
NotUsed7 = 25,
/// <summary>
/// Not used
/// </summary>
NotUsed8 = 26,
/// <summary>
/// Invalid vector: Curly closing bracket is missing.
/// </summary>
InvalidVector = 27,
/// <summary>
/// Unequal number of curly brackets: Open/Close = {0} / {1}.
/// </summary>
UnequalNumberOfCurlyBrackets = 28,
/// <summary>
/// Illegal custom item.
/// </summary>
IllegalCustomItem = 29,
/// <summary>
/// Custom items successfully set.
/// </summary>
CustomItemsSuccessfullySet = 30,
/// <summary>
/// Illegal nested vector.
/// </summary>
IllegalNestedVector = 31
}
}
97 changes: 97 additions & 0 deletions MathCompiler/CodedInfoItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// MathCompiler - Mathematical function compiler for calculation of function
// values of arbitrary complex single-line mathematical formulas
// Copyright (C) 2018 Achim Zielesny ([email protected])
//
// Source code is available at <https://github.com/zielesny/MathCompiler>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;
using System.Text;

namespace MathCompiler
{
/// <summary>
/// Coded information item
/// </summary>
public class CodedInfoItem
{

#region Private class variables

/// <summary>
/// Coded information
/// </summary>
private CodedInfo myCodedInfo;
/// <summary>
/// Coded information arguments
/// </summary>
private String[] myCodedInfoArguments;

#endregion

////////////////////////////////////////////////////////////////////////////////

#region Constructor

/// <summary>
/// Constructor
/// </summary>
/// <param name="codedInfo">
/// Coded information
/// </param>
/// <param name="codedInfoArguments">
/// Coded information arguments
/// </param>
public CodedInfoItem(CodedInfo codedInfo, String[] codedInfoArguments)
{
this.myCodedInfo = codedInfo;
this.myCodedInfoArguments = codedInfoArguments;
}

#endregion

////////////////////////////////////////////////////////////////////////////////

#region Public properties (get)

/// <summary>
/// Coded information arguments
/// </summary>
/// <value>
/// May be null
/// </value>
public String[] CodedInfoArguments
{
get
{
return this.myCodedInfoArguments;
}
}
/// <summary>
/// Coded information
/// </summary>
public CodedInfo CodedInfo
{
get
{
return this.myCodedInfo;
}
}

#endregion

}
}
68 changes: 68 additions & 0 deletions MathCompiler/IConstant.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// MathCompiler - Mathematical function compiler for calculation of function
// values of arbitrary complex single-line mathematical formulas
// Copyright (C) 2018 Achim Zielesny ([email protected])
//
// Source code is available at <https://github.com/zielesny/MathCompiler>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;
using System.Text;

namespace MathCompiler
{
/// <summary>
/// Interface for math compiler constant
/// </summary>
public interface IConstant
{

#region Properties

/// <summary>
/// Description of constant (not allowed to be null/empty)
/// </summary>
/// <value>
/// Not null/empty
/// </value>
String Description
{
get;
}
/// <summary>
/// Name of constant (not allowed to be null/empty)
/// </summary>
/// <value>
/// Not null/empty
/// </value>
String Name
{
get;
}
/// <summary>
/// Value of constant
/// </summary>
/// <value>
/// Arbitrary
/// </value>
Double Value
{
get;
}

#endregion

}
}
Loading

0 comments on commit 71ef988

Please sign in to comment.