From c1bd6bbabdb7a1fe01431972e82385b05ad32860 Mon Sep 17 00:00:00 2001
From: ninemine <1371605831@qq.com>
Date: Wed, 8 Oct 2025 09:53:53 +0800
Subject: [PATCH] +Resources
---
Resources/CompileErrors.Designer.cs | 424 ++++++++++
Resources/CompileErrors.resx | 240 ++++++
Resources/DocComments.xml | 1220 +++++++++++++++++++++++++++
Resources/ElementNames.Designer.cs | 325 +++++++
Resources/ElementNames.resx | 207 +++++
Resources/FleeResourceManager.cs | 57 ++
Resources/GeneralErrors.Designer.cs | 154 ++++
Resources/GeneralErrors.resx | 150 ++++
Resources/ResourceKeys.cs | 78 ++
9 files changed, 2855 insertions(+)
create mode 100644 Resources/CompileErrors.Designer.cs
create mode 100644 Resources/CompileErrors.resx
create mode 100644 Resources/DocComments.xml
create mode 100644 Resources/ElementNames.Designer.cs
create mode 100644 Resources/ElementNames.resx
create mode 100644 Resources/FleeResourceManager.cs
create mode 100644 Resources/GeneralErrors.Designer.cs
create mode 100644 Resources/GeneralErrors.resx
create mode 100644 Resources/ResourceKeys.cs
diff --git a/Resources/CompileErrors.Designer.cs b/Resources/CompileErrors.Designer.cs
new file mode 100644
index 0000000..c497a51
--- /dev/null
+++ b/Resources/CompileErrors.Designer.cs
@@ -0,0 +1,424 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Flee.Resources {
+ using System;
+ using System.Reflection;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class CompileErrors {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal CompileErrors() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Flee.Resources.CompileErrors", typeof(CompileErrors).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Ambiguous call of function '{0}({1})'.
+ ///
+ internal static string AmbiguousCallOfFunction {
+ get {
+ return ResourceManager.GetString("AmbiguousCallOfFunction", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Ambiguous overloaded operator ('{2}') in types '{0}' and '{1}'.
+ ///
+ internal static string AmbiguousOverloadedOperator {
+ get {
+ return ResourceManager.GetString("AmbiguousOverloadedOperator", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Analysis: {0}.
+ ///
+ internal static string ANALYSIS {
+ get {
+ return ResourceManager.GetString("ANALYSIS", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Array indexers must be of type '{0}'.
+ ///
+ internal static string ArrayIndexersMustBeOfType {
+ get {
+ return ResourceManager.GetString("ArrayIndexersMustBeOfType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The calculation engine does not contain the atom '${0}'.
+ ///
+ internal static string CalcEngineDoesNotContainAtom {
+ get {
+ return ResourceManager.GetString("CalcEngineDoesNotContainAtom", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot convert type '{0}' to '{1}'.
+ ///
+ internal static string CannotConvertType {
+ get {
+ return ResourceManager.GetString("CannotConvertType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot convert type '{0}' to expression result of '{1}'.
+ ///
+ internal static string CannotConvertTypeToExpressionResult {
+ get {
+ return ResourceManager.GetString("CannotConvertTypeToExpressionResult", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to String was not recognized as a valid '{0}'.
+ ///
+ internal static string CannotParseType {
+ get {
+ return ResourceManager.GetString("CannotParseType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot reference a calculation engine atom without a calculation engine.
+ ///
+ internal static string CannotReferenceCalcEngineAtomWithoutCalcEngine {
+ get {
+ return ResourceManager.GetString("CannotReferenceCalcEngineAtomWithoutCalcEngine", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not resolve type of '{0}'.
+ ///
+ internal static string CouldNotResolveType {
+ get {
+ return ResourceManager.GetString("CouldNotResolveType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to First argument does not evaluate to a Boolean.
+ ///
+ internal static string FirstArgNotBoolean {
+ get {
+ return ResourceManager.GetString("FirstArgNotBoolean", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Function '{0}' does not return a value.
+ ///
+ internal static string FunctionHasNoReturnValue {
+ get {
+ return ResourceManager.GetString("FunctionHasNoReturnValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The field/property/variable name '{0}' is ambiguous.
+ ///
+ internal static string IdentifierIsAmbiguous {
+ get {
+ return ResourceManager.GetString("IdentifierIsAmbiguous", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The field/property/variable name '{0}' is ambiguous on type '{1}'.
+ ///
+ internal static string IdentifierIsAmbiguousOnType {
+ get {
+ return ResourceManager.GetString("IdentifierIsAmbiguousOnType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Internal error: {0}.
+ ///
+ internal static string INTERNAL_ERROR {
+ get {
+ return ResourceManager.GetString("INTERNAL_ERROR", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Invalid Token: {0}.
+ ///
+ internal static string INVALID_TOKEN {
+ get {
+ return ResourceManager.GetString("INVALID_TOKEN", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to I/O error: {0}.
+ ///
+ internal static string IO {
+ get {
+ return ResourceManager.GetString("IO", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Line: {0}, Column: {1}.
+ ///
+ internal static string LineColumn {
+ get {
+ return ResourceManager.GetString("LineColumn", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Multiple array indexes are not supported.
+ ///
+ internal static string MultiArrayIndexNotSupported {
+ get {
+ return ResourceManager.GetString("MultiArrayIndexNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Namespace '{0}' cannot be used as a type.
+ ///
+ internal static string NamespaceCannotBeUsedAsType {
+ get {
+ return ResourceManager.GetString("NamespaceCannotBeUsedAsType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot determine result type of expression; neither the True ({0}) or False ({1}) arguments are convertible to one another.
+ ///
+ internal static string NeitherArgIsConvertibleToTheOther {
+ get {
+ return ResourceManager.GetString("NeitherArgIsConvertibleToTheOther", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not find any accessible matches for '{0}({1})'.
+ ///
+ internal static string NoAccessibleMatches {
+ get {
+ return ResourceManager.GetString("NoAccessibleMatches", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not find any accessible matches for '{0}({1})' on type '{2}'.
+ ///
+ internal static string NoAccessibleMatchesOnType {
+ get {
+ return ResourceManager.GetString("NoAccessibleMatchesOnType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not find a field/property/variable with the name '{0}'.
+ ///
+ internal static string NoIdentifierWithName {
+ get {
+ return ResourceManager.GetString("NoIdentifierWithName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not find a field/property/variable with the name '{0}' on the type '{1}'.
+ ///
+ internal static string NoIdentifierWithNameOnType {
+ get {
+ return ResourceManager.GetString("NoIdentifierWithNameOnType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Operand type of '{0}' is not convertible to collection type of '{1}'.
+ ///
+ internal static string OperandNotConvertibleToCollectionType {
+ get {
+ return ResourceManager.GetString("OperandNotConvertibleToCollectionType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Operation not defined for type '{0}'.
+ ///
+ internal static string OperationNotDefinedForType {
+ get {
+ return ResourceManager.GetString("OperationNotDefinedForType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Operation '{0}' is not defined for types '{1}' and '{2}'.
+ ///
+ internal static string OperationNotDefinedForTypes {
+ get {
+ return ResourceManager.GetString("OperationNotDefinedForTypes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Reference to a non-shared member '{0}' requires an object reference.
+ ///
+ internal static string ReferenceToNonSharedMemberRequiresObjectReference {
+ get {
+ return ResourceManager.GetString("ReferenceToNonSharedMemberRequiresObjectReference", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Search argument type '{0}' is not a known collection type.
+ ///
+ internal static string SearchArgIsNotKnownCollectionType {
+ get {
+ return ResourceManager.GetString("SearchArgIsNotKnownCollectionType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Static member '{0}' cannot be accessed with an instance reference; qualify it with a type name instead.
+ ///
+ internal static string StaticMemberCannotBeAccessedWithInstanceReference {
+ get {
+ return ResourceManager.GetString("StaticMemberCannotBeAccessedWithInstanceReference", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to SyntaxError.
+ ///
+ internal static string SyntaxError {
+ get {
+ return ResourceManager.GetString("SyntaxError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to '{0}' is a type and cannot be used as an expression.
+ ///
+ internal static string TypeCannotBeUsedAsAnExpression {
+ get {
+ return ResourceManager.GetString("TypeCannotBeUsedAsAnExpression", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Type '{0}' is not an array and does not have an indexer which accepts '{1}'.
+ ///
+ internal static string TypeNotArrayAndHasNoIndexerOfType {
+ get {
+ return ResourceManager.GetString("TypeNotArrayAndHasNoIndexerOfType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could find not function '{0}({1})'.
+ ///
+ internal static string UndefinedFunction {
+ get {
+ return ResourceManager.GetString("UndefinedFunction", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could find not function '{0}({1})' on type '{2}'.
+ ///
+ internal static string UndefinedFunctionOnType {
+ get {
+ return ResourceManager.GetString("UndefinedFunctionOnType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unexpected character: {0}.
+ ///
+ internal static string UNEXPECTED_CHAR {
+ get {
+ return ResourceManager.GetString("UNEXPECTED_CHAR", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unexpected end of file.
+ ///
+ internal static string UNEXPECTED_EOF {
+ get {
+ return ResourceManager.GetString("UNEXPECTED_EOF", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unexpected token {0}; expected one of {1}.
+ ///
+ internal static string UNEXPECTED_TOKEN {
+ get {
+ return ResourceManager.GetString("UNEXPECTED_TOKEN", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to '{0}' not representable in type '{1}'.
+ ///
+ internal static string ValueNotRepresentableInType {
+ get {
+ return ResourceManager.GetString("ValueNotRepresentableInType", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/Resources/CompileErrors.resx b/Resources/CompileErrors.resx
new file mode 100644
index 0000000..dc1320d
--- /dev/null
+++ b/Resources/CompileErrors.resx
@@ -0,0 +1,240 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Ambiguous call of function '{0}({1})'
+
+
+ Ambiguous overloaded operator ('{2}') in types '{0}' and '{1}'
+
+
+ Analysis: {0}
+
+
+ Array indexers must be of type '{0}'
+
+
+ The calculation engine does not contain the atom '${0}'
+
+
+ Cannot convert type '{0}' to '{1}'
+
+
+ Cannot convert type '{0}' to expression result of '{1}'
+
+
+ String was not recognized as a valid '{0}'
+
+
+ Cannot reference a calculation engine atom without a calculation engine
+
+
+ Could not resolve type of '{0}'
+
+
+ First argument does not evaluate to a Boolean
+
+
+ Function '{0}' does not return a value
+
+
+ The field/property/variable name '{0}' is ambiguous
+
+
+ The field/property/variable name '{0}' is ambiguous on type '{1}'
+
+
+ Internal error: {0}
+
+
+ Invalid Token: {0}
+
+
+ I/O error: {0}
+
+
+ Line: {0}, Column: {1}
+
+
+ Multiple array indexes are not supported
+
+
+ Namespace '{0}' cannot be used as a type
+
+
+ Cannot determine result type of expression; neither the True ({0}) or False ({1}) arguments are convertible to one another
+
+
+ Could not find any accessible matches for '{0}({1})'
+
+
+ Could not find any accessible matches for '{0}({1})' on type '{2}'
+
+
+ Could not find a field/property/variable with the name '{0}'
+
+
+ Could not find a field/property/variable with the name '{0}' on the type '{1}'
+
+
+ Operand type of '{0}' is not convertible to collection type of '{1}'
+
+
+ Operation not defined for type '{0}'
+
+
+ Operation '{0}' is not defined for types '{1}' and '{2}'
+
+
+ Reference to a non-shared member '{0}' requires an object reference
+
+
+ Search argument type '{0}' is not a known collection type
+
+
+ Static member '{0}' cannot be accessed with an instance reference; qualify it with a type name instead
+
+
+ SyntaxError
+
+
+ '{0}' is a type and cannot be used as an expression
+
+
+ Type '{0}' is not an array and does not have an indexer which accepts '{1}'
+
+
+ Could find not function '{0}({1})'
+
+
+ Could find not function '{0}({1})' on type '{2}'
+
+
+ Unexpected character: {0}
+
+
+ Unexpected end of file
+
+
+ Unexpected token {0}; expected one of {1}
+
+
+ '{0}' not representable in type '{1}'
+
+
\ No newline at end of file
diff --git a/Resources/DocComments.xml b/Resources/DocComments.xml
new file mode 100644
index 0000000..1bbda42
--- /dev/null
+++ b/Resources/DocComments.xml
@@ -0,0 +1,1220 @@
+
+
+
+
+
+ Holds all the types whose static members can be used in an expression.
+
+
+ Use this class to allow the static functions, methods, and properties of a type
+ to be used in an expression. By default, no types are imported.
+
+
+ This example shows how to use this class to let an expression use all the static members of the Math class:
+
+ // Define the context of our expression
+ ExpressionContext context = new ExpressionContext();
+ // Import all members of the Math type into the default namespace
+ context.Imports.AddType(typeof(Math));
+
+
+
+
+
+ Makes the static and public members of a type available for use in an expression
+ Imports all public and static members of a type into a specific namespace and makes them available to an expression.
+ The type to import
+ The namespace to import the type into -or- the empty string to import into the default namespace
+
+ Use this method to import a type into an expression. All static and public methods, fields, and properties of the type will be
+ directly accessible in the expression. If the namespace parameter is the empty string, the type's members will be able to be referenced
+ without any qualification. Otherwise, they will be imported into the specified namespace and will need to be qualified with it before being accessed. The
+ imported type is deemed accessible if it is either public or in the same module as the expression owner.
+
+
+ If you import the Math type into the default namespace, you can reference its members in the expression: "cos(1.0)".
+ If you import same type into the "Math" namespace, you will need to qualify its members like so: "math.cos(1.0)".
+
+ The imported type is not accessible
+
+
+
+ Imports all public and static members of a type into the default namespace and makes them available to an expression.
+ The type to import
+
+ Use this method to import a type into an expression. All static and public methods, fields, and properties of the type will be
+ directly accessible in the expression.
+
+ See for more details.
+
+ The imported type is not accessible
+
+
+
+ Imports a single public and static method into an expression.
+ Imports a public and static method of a type into a given namespace and makes it available to an expression.
+ The name of the method to import
+ The type on which to lookup the method
+ The namespace to import the method into -or- the empty string to import into the default namespace
+
+ Use this method to import a single static, public method into an expression. The method with the given name will be looked
+ up on the type argument and added into the specified namespace.
+
+ The type the method belongs to is not accessible
+
+
+
+ Imports a public and static method of a type into a given namespace and makes it available to an expression.
+ The method to import
+ The namespace to import the method into -or- the empty string to import into the default namespace
+
+ Use this method to import a single static, public method into an expression. This overload is used when you already have a specific
+ MethodInfo available.
+
+ The type the method belongs to is not accessible
+
+
+
+
+ Imports the builtin types into an expression
+
+
+ Call this method to import the builtin types (int, string, double) into an expression. After this method is called, you can use members of the
+ builtin types in an expression ie: int.maxvalue * 2
+
+
+
+
+
+ Gets the root import of the context.
+
+ The root import.
+
+ Use this property to access the root import of an expression.
+
+
+
+
+
+ Base class for all expression imports
+
+
+
+ Gets the name of the import
+ The name of the current import instance
+ Use this property to get the name of the import
+
+
+
+ Determines if this import can contain other imports
+ True if this import can contain other imports; False otherwise
+ Use this property to determine if this import contains other imports
+
+
+
+
+ Represents an imported type
+ Use this class when you want to make the members of a type available to an expression
+
+
+ Creates a new import with a given type
+ The type to import
+
+
+ Creates a new import with a given type
+ The type to import
+ True to use the type's name as a namespace; False otherwise
+ When useTypeNameAsNamespace is set to True, the type will act as a namespace in an expression. For example: If
+ you import the DayOfWeek enum and set the flag to true, you can reference it as DayOfWeek.Sunday in an expression. When the flag is false,
+ you would reference it as simply Sunday.
+
+
+ Gets the type that this import represents
+ The type that this import represents
+ Use this property to retrieve the imported type
+
+
+
+
+ Represents an imported method
+ Use this class when you want to make a single method available to an expression
+
+
+ Creates a new method import with a given method
+ The method to import
+
+
+ Gets the method that this import represents
+ The method that this import represents
+ Use this property to retrieve the imported method
+
+
+
+
+ Represents an imported namespace
+ This class acts as a container for other imports. Use it when you want to logically group expression imports.
+
+
+ Creates a new namespace import with a given namespace name
+ The name of the namespace to import
+
+
+
+
+
+ Allows customization of expression compilation.
+
+
+ Use this class when you need to customize how an expression is compiled. For example: by setting
+ the Checked property to true,
+ you can cause all arithmetic and conversion operations to check for overflow.
+
+
+
+
+
+ Gets or sets a value that determines how strings will be compared.
+
+ The type of string comparison to use.
+
+ Use this property to control the type of string comparison used in an expression that compares two strings. For example: the result of
+ the expression "string" = "STRING" will be true if the string comparison is set to ignore case
+ and false otherwise. The default is Ordinal.
+
+
+
+
+
+ Determines how an expression matches member and variable names
+
+ True to respect case when matching; False to ignore case
+
+ Use this property to control how an expression resolves member and variable names. If set to true, variable and member
+ names will be matched in a case-sensitive manner. When false, case will be ignored.
+
+
+
+
+ Gets or sets the type of the expression's result.
+
+ A indicating the desired result type.
+
+
+ Use this property to convert the result of an expression to a particular type. Essentially, it acts as an implicit conversion from the final
+ result of the expression to the given type. When this property is set, the expression will attempt to convert its result to the set value.
+ If the conversion is invalid, an will be thrown.
+
+
+
+
+
+ Gets or sets whether arithmetic and conversion operations check for overflow.
+
+ True to emit overflow checks. False to emit no overflow checks.
+
+ Setting this property to true will cause all arithmetic and conversion operations to emit overflow checks. When
+ one of those operations is executed and the resultant value cannot fit into the result type, an OverflowException
+ will be thrown.
+
+
+
+
+
+ Determines if the expression's IL will be saved to an assembly on disk.
+
+ True to save the expression's IL to an assembly; false otherwise.
+
+ Use this method when you want to inspect the IL that an expression emits. When set to true, the expression will save its IL to the assembly "Expression.dll"
+ on disk. You can then view the IL with a disassembler.
+
+
+
+
+
+ Determines which members on the expression owner are accessible.
+
+ A combination of BindingFlags that determine which members are accessible.
+
+ Using this property, you can control which members on the expression owner are accessible from an expression. For example: if users
+ will be inputing expressions, you can prevent private members on the expression owner from being used. You can use the
+ attribute on individual members to override the access set using this property.
+
+ The default is to only allow access to public members on the expression owner. Currently, only the Public and NonPublic values of the BindingFlags enumeration
+ are used.
+
+
+
+
+
+ Gets or sets the culture to use when parsing expressions
+ The culture to use
+
+ Use this property to allow for parsing of expressions using culture-specific tokens. This is useful, for example, when you
+ wish to parse numbers using a culture-specific decimal separator.
+
+
+
+
+ Gets or sets whether all integer literals are treated as doubles
+ True to treat all integer literals as doubles; False to use integers for integral numbers and floating point for real numbers (ie: any number with a decimal point)
+
+ Use this property to force all integer literals to doubles. When set to true, an expression like "1/2" will return 0.5 since both integer
+ literals are treated as doubles. When false, the same expression will return 0 since an integer division will be performed.
+
+
+
+
+ Gets or sets the data type used for real literals when no explicit type is specified.
+ A value specifying the type to use
+
+ Use this property to set the data type that will be used to represent real literals. For example: if set to Decimal, all real literals (ie: 100.45) will be parsed into
+ a System.Decimal value.
+
+
+
+
+
+
+
+
+ Holds settings which enable customization of the expression parser.
+
+
+
+
+ Updates the expression parser using the settings provided in this class.
+
+
+
+ Gets or sets the format to use for parsing DateTime literals
+ The format to use
+
+ Use this property to set the format that will be used to parse DateTime literals. Expressions which have DateTime literals that are not parseable using this format will fail to compile.
+
+ When set to "dd-MM-yyyy", an expression such as "#04-07-2008#" would be parsed to the corresponding DateTime value.
+
+
+ Gets or sets a value that determines if literals for real numbers must have digits before the decimal point.
+ True to require digits (ie: 0.56); False otherwise (ie: .56)
+
+
+ Gets or sets the character to use as the decimal separator for real number literals.
+
+
+ Gets or sets the character to use to separate function arguments.
+
+
+
+
+
+
+ The exception thrown when an expression cannot be compiled.
+
+
+ This exception is thrown whenever an expression cannot be compiled.
+ The Reason property
+ will contain a value indicating the specific cause of the exception.
+
+
+
+
+
+ Gets the reason why compilation failed.
+
+ A value indicating the cause of the exception
+ Use this property to determine the reason why compilation failed.
+
+
+
+
+
+ Defines values to indicate why compilation of an expression failed.
+
+
+ When compilation of an expression fails, an will be thrown.
+ The Reason property
+ on the exception will contain a value from this enumeration. You can use that value to determine how to handle the exception.
+ For example: if the Reason is a SyntaxError, you can display an error message tailored to syntax errors.
+
+
+
+
+ The expression text is not parsable because it does not meet the syntax rules of the expression grammar.
+
+
+
+ A constant expression cannot be represented in its type.
+
+
+
+ The operation is invalid for the given type.
+
+
+
+ The expression references a name that cannot be resolved.
+
+
+
+ The expression calls a function that does not return a value.
+
+
+
+ The requested explicit cast is not valid for the given types.
+
+
+
+ More than one member matches the required criteria.
+
+
+
+ Access to the specified member is not allowed.
+
+
+
+ The given value is not in the required format.
+
+
+
+
+
+ Defines values to indicate the data type to use for storing real literals.
+
+
+
+
+ Specifies that real literals will be stored using the data type.
+
+
+
+ Specifies that real literals will be stored using the data type.
+
+
+
+
+ Specifies that real literals will be stored using the data type.
+
+
+
+
+
+
+ Manages the variables available to an expression
+
+
+ Use this class to manage the variables that an expression can use
+
+
+
+
+ Removes all variables from the collection.
+ Use this method to remove all variables from the collection
+
+
+
+ Adds a variable to the collection.
+ The name of the variable
+ The value of the variable
+ Use this method to add a variable to the collection
+
+
+
+ Gets the value of a variable in the collection.
+ The name of the variable
+ The location to store the value of the variable
+ True if the collection contains a variable with the given name; False otherwise
+ Use this method to get the value of a variable in the collection
+
+
+
+ Removes a variable from the collection.
+ The name of the variable
+ Use this method to remove a variable from the collection
+
+
+
+ Determines if the collection contains a variable.
+ The name of the variable
+ True if the collection has a variable with the given name; False otherwise
+ Use this method to determine if the collection contains a variable
+
+
+ -
+ Gets or sets the value of a variable.
+ The name of the variable
+ The value of the variable
+
+ Use this method to get or set the value of a variable. If a variable with the given name does not exist, a new variable will be defined. Otherwise, the
+ value of the existing variable will be overwritten.
+
+ The type of the new value is not compatible with the type of the existing variable
+
+
+
+ Gets the number of variables defined in the collection.
+ The number of variables in the collection
+ Use this method to get a count of the number of variables in the collection
+
+
+
+ Gets a collection with the names of all variables.
+ A collection with all the names
+ Use this method to access all the variable names in the collection
+
+
+
+ Gets a collection with the values of all variables.
+ A collection with all the values
+ Use this method to access all the variable values in the collection
+
+
+
+
+ Defines a variable with a specific type.
+
+ The name of the variable
+ The type of the new variable
+ Use this method when you want to add a variable with a type that is different than what would be inferred from defining it using the indexer.
+
+
+
+ Gets the value of a variable
+ The type of the variable's value
+ The name of the variable
+ The variable's value
+ This method is used by the expression to retrieve the values of variables during evaluation. It must be public so that all expressions
+ can access it. It is meant for internal use and you shouldn't depend on any of its functionality.
+
+
+
+ Gets the result of an on-demand function
+ The type of the result's value
+ The name of the function
+ The function's result
+
+ This method is used by the expression to retrieve the values of on-demand functions during evaluation. It must be public so that all expressions
+ can access it. It is meant for internal use and you shouldn't depend on any of its functionality.
+
+
+
+
+ Gets the result of a virtual property
+ The type of the result's value
+ The name of the property
+ The property's value
+
+ This method is used by the expression to retrieve the values of virtual properties during evaluation. It must be public so that all expressions
+ can access it. It is meant for internal use and you shouldn't depend on any of its functionality.
+
+
+
+
+
+ Gets the type of a variable.
+
+ The name of the variable
+ The type of the variable's value
+ Use this method to get the type of the value of a variable.
+
+
+
+
+ Occurs when an expression needs the type of a variable.
+
+ This event is raised when an expression references a variable that doesn't exist in its variable collection. You can handle this event to provide on-demand variables.
+
+
+
+
+ Occurs when an expression needs the value of a variable.
+
+ This event is raised when an expression references a variable that doesn't exist in its variable collection. You can handle this event to provide on-demand variables.
+
+
+
+
+ Occurs when an expression needs the return type of a function.
+
+
+ This event is raised when an expression references a function that doesn't exist on the expression owner or imports. By handling this event and providing a value for the property, you can implement an on-demand function.
+
+
+
+
+
+ Occurs when an expression needs the return value of a function.
+
+
+ This event is raised when an expression needs the return value of an on-demand function. By handling this event and providing a value for the property, you can invoke your on-demand function.
+
+
+
+
+
+
+ Represents the exception thrown when a circular reference is detected in the calculation engine.
+
+
+ This exception will be thrown when Recalculate is called on the CalculationEngine and there is a circular reference present.
+
+
+
+
+
+
+ Provides the data for the ResolveVariableType event.
+
+ Use this class to provide the type of an on-demand variable.
+
+
+
+
+ Gets the name of an on-demand variable.
+
+ The name of the variable
+
+ Use this property to get the name of the variable whose type needs to be resolved.
+
+
+
+
+
+ Gets or sets the type of an on-demand variable.
+
+ The type of the variable
+
+ Use this property to get or set the type of the on-demand variable.
+
+
+
+
+
+
+ Provides the data for the ResolveVariableValue event.
+
+ Use this class to provide the value of an on-demand variable.
+
+
+
+
+ Gets the name of an on-demand variable.
+
+ The name of the variable
+
+ Use this property to get the name of the variable whose value needs to be resolved.
+
+
+
+
+
+ Gets the type of an on-demand variable.
+
+ The type of the variable
+
+ Use this property to get the type of the variable whose value needs to be resolved.
+
+
+
+
+
+ Gets or sets the value of an on-demand variable.
+
+ The value of the variable
+
+ Use this property to get or set the value of an on-demand variable.
+
+
+
+
+
+
+ Provides the data for the ResolveFunction event.
+
+ Use this class to provide the return type of an on-demand function.
+
+
+
+
+ Gets the name of the on-demand function being resolved.
+
+ The name of the function
+
+ Use this property to get the name of the on-demand function being resolved.
+
+
+
+
+
+ Gets the types of the arguments to the on-demand function being resolved.
+
+ An array with the type of each argument
+
+ Use this property to get the types of the arguments to the on-demand function being resolved.
+
+
+
+
+
+ Gets or sets the return type of the on-demand function being resolved.
+
+ The return type of the function
+
+ Use this property to set the return type of the on-demand function being resolved.
+
+
+
+
+
+
+ Provides the data for the InvokeFunction event.
+
+ Use this class to provide the return value of an on-demand function.
+
+
+
+
+ Gets the name of the on-demand function being invoked.
+
+ The name of the function
+
+ Use this property to get the name of the on-demand function being invoked.
+
+
+
+
+
+ Gets the values of the arguments to the on-demand function being invoked.
+
+ An array with the values of each argument
+
+ Use this property to get the values of the arguments to the on-demand function being invoked.
+
+
+
+
+
+ Gets or sets the result of the on-demand function being invoked.
+
+ The return value of the function
+
+ Use this property to set the return value of the on-demand function being invoked.
+
+
+
+
+
+
+ Holds information about a compiled expression.
+
+
+ This class holds information about an expression after it has been compiled. For example: you can use this class to find out what variables
+ an expression uses.
+
+
+
+
+
+ Gets the variables that are used in an expression.
+
+ A string array containing all the variables used in the expression.
+ Use this method when you need to get a list of all variables used in an expression.
+
+
+
+
+
+ Specifies whether access to a member on the expression owner is allowed.
+
+
+ Use this attribute to control the accessibility of individual members on the expression owner. The access specified in
+ this attribute overrides the access level specified using the property.
+
+
+
+
+
+ Initializes the attribute with the desired access.
+
+ True to allow the member to be used in an expression;False otherwise
+ Initializes the attribute with the desired access.
+
+
+
+
+ Interface implemented by all expressions
+ This is the base interface that exposes members common to both dynamic and generic expressions.
+
+
+
+
+ Creates a clone of the current expression
+
+ A copy of the current expression with its own set of variables
+ Use this method when you need to create a copy of an existing expression without the parsing/compilation overhead
+
+
+
+ Gets the text the expression was created with
+ A string with the expression's text
+ Use this property to get the text that was used to compile the expression.
+
+
+
+
+ Gets the expression's instance.
+
+ The ExpressionInfo instance.
+
+ Use this property to access the expression's ExpressionInfo instance which holds information about the expression.
+
+
+
+
+ Gets the context the expression was created with
+
+ The expression's instance
+
+ Use this property to get the context that was used to compile the expression.
+
+
+
+ Gets or sets the expression's owner
+
+ The expression's owner instance. Must be of the same type as the expression's original owner.
+
+ Use this property to get or set the instance of the expression's owner.
+
+
+
+
+ Interface implemented by all expressions that evaluate to an Object
+ This is the interface that dynamic expressions must implement
+
+
+
+ Evaluates the dynamic expression
+ An Object instance that represents the result of evaluating the expression
+ Use this method to evaluate the expression.
+
+
+
+
+ Interface implemented by all expressions that evaluate to a specific type
+ The type that the expression will evaluate to
+ This is the interface that generic expressions must implement
+
+
+
+ Evaluates the generic expression
+ The result of evaluating the expression
+ Use this method to evaluate the expression.
+
+
+
+
+ Class that holds all information required to create an expression
+ This class holds all information required to create an expression.
+ The CompileDynamic and CompileGeneric methods are thread-safe.
+
+ This example shows how to create an evaluate an expression:
+
+// Define the context of our expression
+ExpressionContext context = new ExpressionContext();
+// Allow the expression to use all static public methods of System.Math
+context.Imports.AddType(typeof(Math));
+
+// Define an int variable
+context.Variables["a"] = 100;
+
+// Create a dynamic expression that evaluates to an Object
+IDynamicExpression eDynamic = context.CompileDynamic("sqrt(a) + pi");
+// Create a generic expression that evaluates to a double
+IGenericExpression<double> eGeneric = context.CompileGeneric<double>("sqrt(a) + pi");
+
+// Evaluate the expressions
+double result = (double)eDynamic.Evaluate();
+result = eGeneric.Evaluate();
+
+// Update the value of our variable
+context.Variables["a"] = 144;
+// Evaluate again to get the updated result
+result = eGeneric.Evaluate();
+
+
+
+
+ Creates a new expression context with the default expression owner.
+ Use this constructor to create an expression context when you don't plan to use an expression owner.
+
+
+
+ Creates a new expression context with a specified expression owner.
+ The expression owner instance to use
+ Use this constructor to create an expression context when you want to supply an expression owner.
+
+
+
+ Creates a dynamic expression (one that evaluates to Object) from an expression text string and the current context
+ The expression text to parse
+ A new dynamic expression
+
+ Use this method when you want to create an expression that evaluates to an Object. "Dynamic" means that the result type
+ of the expression can be anything and is not fixed as with a generic expression.
+
+ The context, imports, and options of the compiled expression will be a clone of the originals. The variables however
+ are not cloned and will point to the same instance.
+
+
+ The expression could not be compiled
+
+
+
+ Creates a generic expression from an expression text string and the current context
+ The type that the expression evaluates to
+ The expression text to parse
+ A new generic expression
+
+ Use this method when you want to create an expression that evaluates to a strongly-typed value.
+
+ The context, imports, and options of the compiled expression will be a clone of the originals. The variables however
+ are not cloned and will point to the same instance.
+
+
+ The expression could not be compiled
+
+
+
+ Gets the variables available to an expression
+ The VariableCollection instance
+ Use this property to get collection of variables available to an expression.
+
+
+
+ Gets the CalculationEngine instance used by the expression.
+ The CalculationEngine instance
+ Use this property to get CalculationEngine instance used by an expression
+
+
+
+
+ Gets the types imported by an expression.
+
+ The collection of imported types.
+
+ Use this property to get the imports that will be used by an expression.
+
+
+
+
+ Creates a copy of the current context.
+ An identical copy of the current context
+ Use this method when you need an indentical copy of an existing context. Note that
+
+
+
+ Gets the ExpressionOptions to be used in an expression
+ The ExpressionOptions instance
+ Use this property to access the options to be used in an expression.
+
+
+ Gets the ExpressionParserOptions for this context.
+ The ExpressionParserOptions instance
+ Use this property to customize the expression parser.
+
+
+
+
+
+ The exception thrown when an batch loaded expression cannot be compiled.
+
+
+ This exception is thrown whenever a batch loaded expression cannot be compiled. You use the AtomName and ExpressionText properties
+ to get more information about the source of the exception.
+
+
+
+
+
+ Gets the name of the expression that could not be compiled.
+
+ The name of the expression
+ Use this property to determine the name of the expression that caused the exception.
+
+
+
+
+ Gets the text of the expression that could not be compiled.
+
+ The text of the expression
+ Use this property to determine the text of the expression that caused the exception.
+
+
+
+
+ Represents a class that can be used to populate the calculation engine in one batch.
+
+
+ Normally, you have to add an expression to the calculation engine after any expressions it depends on. By using this class, you can load expressions in any order and
+ then have them be loaded into the calculation engine in one call.
+
+
+
+
+
+ Adds an expression to the batch loader.
+
+ The name that the expression will be associated with
+ The expression to add
+ The context for the expression
+ Use this method to add an expression to the batch loader and associate it with a name
+
+
+
+
+ Determines if the loader contains an expression with a given name.
+
+ The name of the expression to look up
+ True if the loader has an expression with the name; False otherwise
+
+ Use this method to determine if the loader contains an expression with a given name.
+
+
+
+
+
+ Creates a calculation network which allows expressions to refer to the result of other expressions, tracks dependencies, and enables natural order recalculation.
+
+
+ This class acts as a container for expressions. As expressions are added to it, their dependencies are tracked and their result is cached. Expressions defined
+ in this class can reference other contained expressions. Once all expressions are added, a natural order recalculate can be performed.
+
+ This example shows how to add expressions to the engine and have them reference other contained expressions:
+
+ExpressionContext context = new ExpressionContext();
+VariableCollection variables = context.Variables;
+
+// Add some variables
+variables.Add("x", 100);
+variables.Add("y", 200);
+
+// Add an expression to the calculation engine as "a"
+engine.Add("a", "x * 2", context);
+
+// Add an expression to the engine as "b"
+engine.Add("b", "y + 100", context);
+
+// Add an expression at "c" that uses the results of "a" and "b"
+// Notice that we have to prefix the expression names with a '$'
+engine.Add("c", "$a + $b", context);
+
+// Get the value of "c"
+int result = engine.GetResult<int>("c");
+
+// Update a variable on the "a" expression
+variables["x"] = 200;
+
+// Recalculate it
+engine.Recalculate("a");
+
+// Get the updated result
+result = engine.GetResult<int>("c");
+
+
+
+
+
+
+ Occurs when the calculation engine recalculates a node.
+
+ You can listen to this event to be notified when a node in the calculation engine is recalculated.
+
+
+
+
+ Clears all expressions from the CalculationEngine
+
+ Use this method to reset the CalculationEngine to the empty state.
+
+
+
+
+ Gets a string representation of the engine's dependency graph.
+
+ A string representing the graph.
+ Use this property to get a string version of the engine's dependency graph. There will be one line for each dependency. Each line will
+ be of the format "[reference] -> [dependant1, dependant2]" and is read as "A change in [reference] will cause a change in [dependant]".
+
+
+
+
+ Gets the number of expressions contained in the calculation engine.
+
+ The number of expressions in the calculation engine
+
+ Use this property to see how many expressions are contained in the calculation engine.
+
+
+
+
+
+ Gets the cached result of a contained expression.
+
+ The type of the expression's result.
+ The name that the expression is associated with
+ The cached result of evaluating the expression
+ Use this method after a recalculate to get the updated value of an expression.
+
+
+
+
+ Gets the cached result of a contained expression.
+
+ The name that the expression is associated with
+ The cached result of evaluating the expression
+ Use this method after a recalculate to get the updated value of an expression.
+
+
+
+
+ Gets the expression associated with a name.
+
+ The name that the expression is associated with
+ The expression associated with the given name
+ Use this method to obtain the expression associated with a name.
+
+
+
+
+ Gets the names of the expressions that depend on a given name.
+
+ The name of the expression to look up
+ The names of all expressions that depend on the expression with the given name
+ Use this method to obtain all the expressions that depend on a given name. For example: if a=100, b=200, and c=a+b, then calling
+ GetDependents("a") will return "c" since when the value of "a" changes, the value of "c" will also change. This method is not recursive, so it
+ will only return the names that directly depend on the given name. This method is the inverse of
+
+
+
+
+
+ Gets the names of the expressions that a given name depends on.
+
+ The name of the expression to look up
+ The names of all expressions that the given name depends on
+
+ Use this method to obtain all the expressions that a given name depends on. For example: if a=100, b=200, and c=a+b, then calling
+ GetPrecedents("c") will return "a, b" since when either "a" or "b" change, the value of "c" will also change. This method is not recursive, so it
+ will only return the names that the given name directly depends on. This method is the inverse of
+
+
+
+
+
+ Determines if an expression with a given name is referenced by any other expressions in the engine.
+
+ The name of the expression to look up
+ True if the engine has expressions that depend on it; False otherwise
+
+ Use this method to determine if the expression associated with a given name has any expressions that depend on it. For example: you can use this method to allow
+ a user to remove an expression only when no other expressions depend on it.
+
+
+
+
+
+ Determines if an expression with a given name depends on any other expression.
+
+ The name of the expression to look up
+ True if the name has expressions that it depends on; False otherwise
+
+ Use this method to determine if an expression depends on any other expressions.
+
+
+
+
+
+ Determines if the engine contains an expression with a given name.
+
+ The name of the expression to look up
+ True if the engine has an expression with the name; False otherwise
+
+ Use this method to determine if the calculation engine contains an expression with a given name.
+
+
+
+
+
+ Performs a natural order recalculation of the engine.
+
+ The names representing the starting points of the recalculation
+ This method will perform a natural order recalculate on the expressions in the engine. The recalculation will start at the given roots
+ and continue with all their dependents. If no roots are given, then a recalculation of all expressions is performed.
+ A recalculate is requested on an engine containing a circular reference
+
+
+
+
+ Adds an expression to the calculation engine.
+
+ The name that the expression will be associated with
+ The expression to add
+ The context for the expression
+ Use this method to add an expression to the engine and associate it with a name
+
+
+
+
+ Removes an expression and all its dependents from the calculation engine.
+
+ The name whose expression to remove
+ True if the name was removed from the engine; False otherwise
+ Use this method to remove an expression and all its dependents from the calculation engine. No exception is thrown if the
+ name does not exist in the engine.
+
+
+
+
+ Creates a BatchLoader that can be used to populate the calculation engine in one batch.
+
+ A new instance of the BatchLoader class
+
+ Use this method to create a BatchLoader instance.
+
+
+
+
+
+ Populates the calculation engine from the given BatchLoader.
+
+ The batch loader instance to use
+
+ Call this method to load the calculation engine with all the expressions in the given batch loader.
+
+
+
+
+
+ Provides the data for the NodeRecalculated event.
+
+ Use the members of this class to get additional information about the recalculated node.
+
+
+
+
+ Gets the name of the recalculated node.
+
+ The name of the node
+
+ Use this property to get the name of the recalculated node.
+
+
+
+
+
+ Gets the recalculated result of the node.
+
+ The value of the result
+
+ Use this property to get the recalculated result of the node.
+
+
+
\ No newline at end of file
diff --git a/Resources/ElementNames.Designer.cs b/Resources/ElementNames.Designer.cs
new file mode 100644
index 0000000..12570ff
--- /dev/null
+++ b/Resources/ElementNames.Designer.cs
@@ -0,0 +1,325 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Flee.Resources {
+ using System;
+ using System.Reflection;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class ElementNames {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal ElementNames() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Flee.Resources.ElementNames", typeof(ElementNames).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to AndOrElement.
+ ///
+ internal static string AndOrElement {
+ get {
+ return ResourceManager.GetString("AndOrElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to ArithmeticElement.
+ ///
+ internal static string ArithmeticElement {
+ get {
+ return ResourceManager.GetString("ArithmeticElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to BooleanLiteralElement.
+ ///
+ internal static string BooleanLiteralElement {
+ get {
+ return ResourceManager.GetString("BooleanLiteralElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to CalcEngineAtom.
+ ///
+ internal static string CalcEngineAtom {
+ get {
+ return ResourceManager.GetString("CalcEngineAtom", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to CastElement.
+ ///
+ internal static string CastElement {
+ get {
+ return ResourceManager.GetString("CastElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to CharLiteralElement.
+ ///
+ internal static string CharLiteralElement {
+ get {
+ return ResourceManager.GetString("CharLiteralElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to CompareElement.
+ ///
+ internal static string CompareElement {
+ get {
+ return ResourceManager.GetString("CompareElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to ConditionalElement.
+ ///
+ internal static string ConditionalElement {
+ get {
+ return ResourceManager.GetString("ConditionalElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to DateTimeLiteralElement.
+ ///
+ internal static string DateTimeLiteralElement {
+ get {
+ return ResourceManager.GetString("DateTimeLiteralElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to DoubleLiteralElement.
+ ///
+ internal static string DoubleLiteralElement {
+ get {
+ return ResourceManager.GetString("DoubleLiteralElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to ExpressionMemberElement.
+ ///
+ internal static string ExpressionMemberElement {
+ get {
+ return ResourceManager.GetString("ExpressionMemberElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to FunctionCallElement.
+ ///
+ internal static string FunctionCallElement {
+ get {
+ return ResourceManager.GetString("FunctionCallElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to IdentifierElement.
+ ///
+ internal static string IdentifierElement {
+ get {
+ return ResourceManager.GetString("IdentifierElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to IndexerElement.
+ ///
+ internal static string IndexerElement {
+ get {
+ return ResourceManager.GetString("IndexerElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to InElement.
+ ///
+ internal static string InElement {
+ get {
+ return ResourceManager.GetString("InElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Int32Literal.
+ ///
+ internal static string Int32Literal {
+ get {
+ return ResourceManager.GetString("Int32Literal", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Int64LiteralElement.
+ ///
+ internal static string Int64LiteralElement {
+ get {
+ return ResourceManager.GetString("Int64LiteralElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to InvocationListElement.
+ ///
+ internal static string InvocationListElement {
+ get {
+ return ResourceManager.GetString("InvocationListElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to NegateElement.
+ ///
+ internal static string NegateElement {
+ get {
+ return ResourceManager.GetString("NegateElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to NotElement.
+ ///
+ internal static string NotElement {
+ get {
+ return ResourceManager.GetString("NotElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to NullLiteralElement.
+ ///
+ internal static string NullLiteralElement {
+ get {
+ return ResourceManager.GetString("NullLiteralElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to RootExpressionElement.
+ ///
+ internal static string RootExpressionElement {
+ get {
+ return ResourceManager.GetString("RootExpressionElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to ShiftElement.
+ ///
+ internal static string ShiftElement {
+ get {
+ return ResourceManager.GetString("ShiftElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to SingleLiteralElement.
+ ///
+ internal static string SingleLiteralElement {
+ get {
+ return ResourceManager.GetString("SingleLiteralElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to StringLiteralElement.
+ ///
+ internal static string StringLiteralElement {
+ get {
+ return ResourceManager.GetString("StringLiteralElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to TimeSpanLiteralElement.
+ ///
+ internal static string TimeSpanLiteralElement {
+ get {
+ return ResourceManager.GetString("TimeSpanLiteralElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to UInt32LiteralElement.
+ ///
+ internal static string UInt32LiteralElement {
+ get {
+ return ResourceManager.GetString("UInt32LiteralElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to UInt64LiteralElement.
+ ///
+ internal static string UInt64LiteralElement {
+ get {
+ return ResourceManager.GetString("UInt64LiteralElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to XorElement.
+ ///
+ internal static string XorElement {
+ get {
+ return ResourceManager.GetString("XorElement", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/Resources/ElementNames.resx b/Resources/ElementNames.resx
new file mode 100644
index 0000000..ff43118
--- /dev/null
+++ b/Resources/ElementNames.resx
@@ -0,0 +1,207 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ AndOrElement
+
+
+ ArithmeticElement
+
+
+ BooleanLiteralElement
+
+
+ CalcEngineAtom
+
+
+ CastElement
+
+
+ CharLiteralElement
+
+
+ CompareElement
+
+
+ ConditionalElement
+
+
+ DateTimeLiteralElement
+
+
+ DoubleLiteralElement
+
+
+ ExpressionMemberElement
+
+
+ FunctionCallElement
+
+
+ IdentifierElement
+
+
+ IndexerElement
+
+
+ InElement
+
+
+ Int32Literal
+
+
+ Int64LiteralElement
+
+
+ InvocationListElement
+
+
+ NegateElement
+
+
+ NotElement
+
+
+ NullLiteralElement
+
+
+ RootExpressionElement
+
+
+ ShiftElement
+
+
+ SingleLiteralElement
+
+
+ StringLiteralElement
+
+
+ TimeSpanLiteralElement
+
+
+ UInt32LiteralElement
+
+
+ UInt64LiteralElement
+
+
+ XorElement
+
+
\ No newline at end of file
diff --git a/Resources/FleeResourceManager.cs b/Resources/FleeResourceManager.cs
new file mode 100644
index 0000000..9e770b2
--- /dev/null
+++ b/Resources/FleeResourceManager.cs
@@ -0,0 +1,57 @@
+using System.Resources;
+
+namespace Flee.Resources
+{
+ internal class FleeResourceManager
+ {
+
+ private Dictionary MyResourceManagers;
+
+ private static FleeResourceManager OurInstance = new FleeResourceManager();
+ private FleeResourceManager()
+ {
+ MyResourceManagers = new Dictionary(StringComparer.OrdinalIgnoreCase);
+ }
+
+ private ResourceManager GetResourceManager(string resourceFile)
+ {
+ lock (this)
+ {
+ ResourceManager rm = null;
+ if (MyResourceManagers.TryGetValue(resourceFile, out rm) == false)
+ {
+ Type t = typeof(FleeResourceManager);
+ rm = new ResourceManager(string.Format("{0}.{1}", t.Namespace, resourceFile), t.Assembly);
+ MyResourceManagers.Add(resourceFile, rm);
+ }
+ return rm;
+ }
+ }
+
+ private string GetResourceString(string resourceFile, string key)
+ {
+ ResourceManager rm = this.GetResourceManager(resourceFile);
+ return rm.GetString(key);
+ }
+
+ public string GetCompileErrorString(string key)
+ {
+ return this.GetResourceString("CompileErrors", key);
+ }
+
+ public string GetElementNameString(string key)
+ {
+ return this.GetResourceString("ElementNames", key);
+ }
+
+ public string GetGeneralErrorString(string key)
+ {
+ return this.GetResourceString("GeneralErrors", key);
+ }
+
+ public static FleeResourceManager Instance
+ {
+ get { return OurInstance; }
+ }
+ }
+}
diff --git a/Resources/GeneralErrors.Designer.cs b/Resources/GeneralErrors.Designer.cs
new file mode 100644
index 0000000..3011811
--- /dev/null
+++ b/Resources/GeneralErrors.Designer.cs
@@ -0,0 +1,154 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Flee.Resources {
+ using System;
+ using System.Reflection;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class GeneralErrors {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal GeneralErrors() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Flee.Resources.GeneralErrors", typeof(GeneralErrors).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot determine type of new variable.
+ ///
+ internal static string CannotDetermineNewVariableType {
+ get {
+ return ResourceManager.GetString("CannotDetermineNewVariableType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not find a public and static method '{0}' on type '{1}'.
+ ///
+ internal static string CouldNotFindPublicStaticMethodOnType {
+ get {
+ return ResourceManager.GetString("CouldNotFindPublicStaticMethodOnType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Invalid namespace name.
+ ///
+ internal static string InvalidNamespaceName {
+ get {
+ return ResourceManager.GetString("InvalidNamespaceName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to '{0}' is not a valid variable name.
+ ///
+ internal static string InvalidVariableName {
+ get {
+ return ResourceManager.GetString("InvalidVariableName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The type of the new owner is not assignable to the current owner type.
+ ///
+ internal static string NewOwnerTypeNotAssignableToCurrentOwner {
+ get {
+ return ResourceManager.GetString("NewOwnerTypeNotAssignableToCurrentOwner", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Only public and static methods can be imported.
+ ///
+ internal static string OnlyPublicStaticMethodsCanBeImported {
+ get {
+ return ResourceManager.GetString("OnlyPublicStaticMethodsCanBeImported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Type '{0}' is not accessible to the expression.
+ ///
+ internal static string TypeNotAccessibleToExpression {
+ get {
+ return ResourceManager.GetString("TypeNotAccessibleToExpression", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Undefined variable '{0}'.
+ ///
+ internal static string UndefinedVariable {
+ get {
+ return ResourceManager.GetString("UndefinedVariable", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Value type of '{0}' is not assignable to required type of '{1}'.
+ ///
+ internal static string VariableValueNotAssignableToType {
+ get {
+ return ResourceManager.GetString("VariableValueNotAssignableToType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A variable with name '{0}' is already defined.
+ ///
+ internal static string VariableWithNameAlreadyDefined {
+ get {
+ return ResourceManager.GetString("VariableWithNameAlreadyDefined", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/Resources/GeneralErrors.resx b/Resources/GeneralErrors.resx
new file mode 100644
index 0000000..96a6172
--- /dev/null
+++ b/Resources/GeneralErrors.resx
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Cannot determine type of new variable
+
+
+ Could not find a public and static method '{0}' on type '{1}'
+
+
+ Invalid namespace name
+
+
+ '{0}' is not a valid variable name
+
+
+ The type of the new owner is not assignable to the current owner type
+
+
+ Only public and static methods can be imported
+
+
+ Type '{0}' is not accessible to the expression
+
+
+ Undefined variable '{0}'
+
+
+ Value type of '{0}' is not assignable to required type of '{1}'
+
+
+ A variable with name '{0}' is already defined
+
+
\ No newline at end of file
diff --git a/Resources/ResourceKeys.cs b/Resources/ResourceKeys.cs
new file mode 100644
index 0000000..93bb963
--- /dev/null
+++ b/Resources/ResourceKeys.cs
@@ -0,0 +1,78 @@
+namespace Flee.Resources
+{
+ ///
+ /// Resource keys for compile error messages
+ ///
+ ///
+ internal class CompileErrorResourceKeys
+ {
+
+ public const string CouldNotResolveType = "CouldNotResolveType";
+ public const string CannotConvertType = "CannotConvertType";
+ public const string FirstArgNotBoolean = "FirstArgNotBoolean";
+ public const string NeitherArgIsConvertibleToTheOther = "NeitherArgIsConvertibleToTheOther";
+ public const string ValueNotRepresentableInType = "ValueNotRepresentableInType";
+ public const string SearchArgIsNotKnownCollectionType = "SearchArgIsNotKnownCollectionType";
+ public const string OperandNotConvertibleToCollectionType = "OperandNotConvertibleToCollectionType";
+ public const string TypeNotArrayAndHasNoIndexerOfType = "TypeNotArrayAndHasNoIndexerOfType";
+ public const string ArrayIndexersMustBeOfType = "ArrayIndexersMustBeOfType";
+ public const string AmbiguousCallOfFunction = "AmbiguousCallOfFunction";
+ public const string NamespaceCannotBeUsedAsType = "NamespaceCannotBeUsedAsType";
+ public const string TypeCannotBeUsedAsAnExpression = "TypeCannotBeUsedAsAnExpression";
+ public const string StaticMemberCannotBeAccessedWithInstanceReference = "StaticMemberCannotBeAccessedWithInstanceReference";
+ public const string ReferenceToNonSharedMemberRequiresObjectReference = "ReferenceToNonSharedMemberRequiresObjectReference";
+ public const string FunctionHasNoReturnValue = "FunctionHasNoReturnValue";
+ public const string OperationNotDefinedForType = "OperationNotDefinedForType";
+ public const string OperationNotDefinedForTypes = "OperationNotDefinedForTypes";
+ public const string CannotConvertTypeToExpressionResult = "CannotConvertTypeToExpressionResult";
+ public const string AmbiguousOverloadedOperator = "AmbiguousOverloadedOperator";
+ public const string NoIdentifierWithName = "NoIdentifierWithName";
+ public const string NoIdentifierWithNameOnType = "NoIdentifierWithNameOnType";
+ public const string IdentifierIsAmbiguous = "IdentifierIsAmbiguous";
+ public const string IdentifierIsAmbiguousOnType = "IdentifierIsAmbiguousOnType";
+ public const string CannotReferenceCalcEngineAtomWithoutCalcEngine = "CannotReferenceCalcEngineAtomWithoutCalcEngine";
+ public const string CalcEngineDoesNotContainAtom = "CalcEngineDoesNotContainAtom";
+ public const string UndefinedFunction = "UndefinedFunction";
+ public const string UndefinedFunctionOnType = "UndefinedFunctionOnType";
+ public const string NoAccessibleMatches = "NoAccessibleMatches";
+ public const string NoAccessibleMatchesOnType = "NoAccessibleMatchesOnType";
+ public const string CannotParseType = "CannotParseType";
+
+ public const string MultiArrayIndexNotSupported = "MultiArrayIndexNotSupported";
+ // Grammatica
+ public const string UnexpectedToken = "UNEXPECTED_TOKEN";
+ public const string IO = "IO";
+ public const string UnexpectedEof = "UNEXPECTED_EOF";
+ public const string UnexpectedChar = "UNEXPECTED_CHAR";
+ public const string InvalidToken = "INVALID_TOKEN";
+ public const string Analysis = "ANALYSIS";
+
+ public const string LineColumn = "LineColumn";
+
+ public const string SyntaxError = "SyntaxError";
+
+ private CompileErrorResourceKeys()
+ {
+ }
+ }
+
+ internal class GeneralErrorResourceKeys
+ {
+
+ public const string TypeNotAccessibleToExpression = "TypeNotAccessibleToExpression";
+ public const string VariableWithNameAlreadyDefined = "VariableWithNameAlreadyDefined";
+ public const string UndefinedVariable = "UndefinedVariable";
+ public const string InvalidVariableName = "InvalidVariableName";
+ public const string CannotDetermineNewVariableType = "CannotDetermineNewVariableType";
+ public const string VariableValueNotAssignableToType = "VariableValueNotAssignableToType";
+ public const string CouldNotFindPublicStaticMethodOnType = "CouldNotFindPublicStaticMethodOnType";
+ public const string OnlyPublicStaticMethodsCanBeImported = "OnlyPublicStaticMethodsCanBeImported";
+ public const string InvalidNamespaceName = "InvalidNamespaceName";
+
+ public const string NewOwnerTypeNotAssignableToCurrentOwner = "NewOwnerTypeNotAssignableToCurrentOwner";
+
+ private GeneralErrorResourceKeys()
+ {
+ }
+ }
+}