diff --git a/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/ExpressionUtils.cs b/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/ExpressionUtils.cs index 1facc2a3..6a265535 100644 --- a/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/ExpressionUtils.cs +++ b/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/ExpressionUtils.cs @@ -856,7 +856,7 @@ private static void makeParserKeyWords(bool parserKeyWordsOnly, bool UDFExpressi addKeyWord(ParserSymbol.RIGHT_PARENTHESES_STR, ParserSymbol.RIGHT_PARENTHESES_DESC, ParserSymbol.RIGHT_PARENTHESES_ID, ParserSymbol.RIGHT_PARENTHESES_SYN, ParserSymbol.RIGHT_PARENTHESES_SINCE, ParserSymbol.TYPE_ID, keyWordsList); addKeyWord(ParserSymbol.COMMA_STR, ParserSymbol.COMMA_DESC, ParserSymbol.COMMA_ID, ParserSymbol.COMMA_SYN, ParserSymbol.COMMA_SINCE, ParserSymbol.TYPE_ID, keyWordsList); addKeyWord(ParserSymbol.SEMI_STR, ParserSymbol.SEMI_DESC, ParserSymbol.COMMA_ID, ParserSymbol.SEMI_SYN, ParserSymbol.COMMA_SINCE, ParserSymbol.TYPE_ID, keyWordsList); - addKeyWord(ParserSymbol.DECIMAL_REG_EXP, ParserSymbol.NUMBER_REG_DESC, ParserSymbol.NUMBER_ID, ParserSymbol.NUMBER_SYN, ParserSymbol.NUMBER_SINCE, ParserSymbol.NUMBER_TYPE_ID, keyWordsList); + addKeyWord(ParserSymbol.NUMBER_LITERAL_STR, ParserSymbol.NUMBER_LITERAL_DESC, ParserSymbol.NUMBER_ID, ParserSymbol.NUMBER_SYN, ParserSymbol.NUMBER_SINCE, ParserSymbol.NUMBER_TYPE_ID, keyWordsList); addKeyWord(ParserSymbol.BLANK_STR, ParserSymbol.BLANK_DESC, ParserSymbol.BLANK_ID, ParserSymbol.BLANK_SYN, ParserSymbol.BLANK_SINCE, ParserSymbol.TYPE_ID, keyWordsList); } /** @@ -1170,7 +1170,7 @@ internal static String getHelp(String word, List keyWordsList) { kw = keyWord.wordString; switch (keyWord.wordTypeId) { case ParserSymbol.TYPE_ID: type = ParserSymbol.TYPE_DESC; break; - case ParserSymbol.NUMBER_TYPE_ID: type = StringResources.NUMBER; kw = "_" + StringResources.NUMBER + "_"; break; + case ParserSymbol.NUMBER_TYPE_ID: type = StringResources.NUMBER; kw = StringResources.NUMBER; break; case Operator.TYPE_ID: type = Operator.TYPE_DESC; break; case BooleanOperator.TYPE_ID: type = BooleanOperator.TYPE_DESC; break; case BinaryRelation.TYPE_ID: type = BinaryRelation.TYPE_DESC; break; diff --git a/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/StringInvariant.cs b/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/StringInvariant.cs index f8877e36..d9a937e8 100644 --- a/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/StringInvariant.cs +++ b/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/StringInvariant.cs @@ -225,6 +225,8 @@ internal sealed class StringInvariant { internal static readonly String SPACE_EQUAL_SPACE = SPACE + EQUAL + SPACE; internal const String COLON = ":"; internal static readonly String COLON_SPACE = COLON + SPACE; + internal const String SEMICOLON = ";"; + internal static readonly String SEMICOLON_SPACE = SEMICOLON + SPACE; internal const String COMMA = ","; internal static readonly String COMMA_SPACE = COMMA + SPACE; internal const String DOT = "."; @@ -422,6 +424,14 @@ internal sealed class StringInvariant { internal const String UNIT_ZEPTO_SYMBOL = "= 10⁻²¹"; internal const String UNIT_YOCTO_SYMBOL = "= 10⁻²⁴"; // ------------------------------------------------- + internal const String PARSER_SYMBOL_NUMBER_INTEGER_EXAMPLE = "1, -2"; + internal const String PARSER_SYMBOL_NUMBER_DECIMAL_EXAMPLE = "0.2, -0.3, 1.2"; + internal const String PARSER_SYMBOL_NUMBER_LEADING_ZERO_EXAMPLE = "001, -002.1"; + internal const String PARSER_SYMBOL_NUMBER_SCI_NOTATION_EXAMPLE = "1.2e-10, 1.2e+10, 2.3E10"; + internal const String PARSER_SYMBOL_NUMBER_NO_LEADING_ZERO_EXAMPLE = ".2, -.212"; + internal const String PARSER_SYMBOL_NUMBER_FRACTIONS_EXAMPLE = "1_2, 2_1_3, -14_3"; + internal const String PARSER_SYMBOL_NUMBER_OTHER_NUMERAL_SYSTEMS_EXAMPLE = "b1.111, b2.1001, b3.12021, -b16.af12, h.af1, -b.1001, o.0127"; + // ------------------------------------------------- internal const String SEPARATOR = " - "; } } \ No newline at end of file diff --git a/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/StringResources.cs b/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/StringResources.cs index f610f6c7..048c766f 100644 --- a/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/StringResources.cs +++ b/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/StringResources.cs @@ -295,6 +295,7 @@ internal sealed class StringResources { internal static String KEYWORD = "Keyword"; internal static String SYNTAX = "Syntax"; internal static String NUMBER = "Number"; + internal static String NUMBER_LITERAL = "Number literal"; internal static String TYPE = "Type"; internal static String SINCE = "Since"; internal static String DESCRIPTION = "Description"; @@ -670,6 +671,13 @@ internal sealed class StringResources { internal static String PARSER_SYMBOL_COMMA = "Comma (function parameters)"; internal static String PARSER_SYMBOL_SEMI = "Semicolon (function parameters)"; internal static String PARSER_SYMBOL_BLANK = "Blank (whitespace) character"; + internal static String PARSER_SYMBOL_NUMBER_INTEGER = "Integer"; + internal static String PARSER_SYMBOL_NUMBER_DECIMAL = "Decimal"; + internal static String PARSER_SYMBOL_NUMBER_LEADING_ZERO = "Leading zero"; + internal static String PARSER_SYMBOL_NUMBER_SCI_NOTATION = "Scientific notation"; + internal static String PARSER_SYMBOL_NUMBER_NO_LEADING_ZERO = "No leading zero"; + internal static String PARSER_SYMBOL_NUMBER_FRACTIONS = "Fractions"; + internal static String PARSER_SYMBOL_NUMBER_OTHER_NUMERAL_SYSTEMS = "Other numeral systems"; internal static String PARSER_SYMBOL_UNICODE_MATH = " - Unicode math symbol"; // ------------------------------------------------- internal static String DIMENSIONLESS_UNIT_PERC = "Percentage"; @@ -1080,11 +1088,55 @@ internal static void setLanguageSpecificDescriptionsOperator() { } internal static void setLanguageSpecificDescriptionsParserSymbol() { ParserSymbol.TYPE_DESC = PARSER_SYMBOL; + ParserSymbol.NUMBER_LITERAL_STR = NUMBER_LITERAL; ParserSymbol.LEFT_PARENTHESES_DESC = PARSER_SYMBOL_LEFT_PARENTHESES + StringInvariant.SEPARATOR + PARSER_SYMBOL; ParserSymbol.RIGHT_PARENTHESES_DESC = PARSER_SYMBOL_RIGHT_PARENTHESES + StringInvariant.SEPARATOR + PARSER_SYMBOL; ParserSymbol.COMMA_DESC = PARSER_SYMBOL_COMMA + StringInvariant.SEPARATOR + PARSER_SYMBOL; ParserSymbol.SEMI_DESC = PARSER_SYMBOL_SEMI + StringInvariant.SEPARATOR + PARSER_SYMBOL; ParserSymbol.BLANK_DESC = PARSER_SYMBOL_BLANK + StringInvariant.SEPARATOR + PARSER_SYMBOL; + ParserSymbol.NUMBER_LITERAL_DESC = PARSER_SYMBOL_NUMBER_INTEGER + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv10) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_INTEGER_EXAMPLE + + StringInvariant.SEMICOLON_SPACE + + PARSER_SYMBOL_NUMBER_DECIMAL + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv10) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_DECIMAL_EXAMPLE + + StringInvariant.SEMICOLON_SPACE + + PARSER_SYMBOL_NUMBER_LEADING_ZERO + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv41) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_LEADING_ZERO_EXAMPLE + + StringInvariant.SEMICOLON_SPACE + + PARSER_SYMBOL_NUMBER_SCI_NOTATION + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv42) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_SCI_NOTATION_EXAMPLE + + StringInvariant.SEMICOLON_SPACE + + PARSER_SYMBOL_NUMBER_NO_LEADING_ZERO + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv42) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_NO_LEADING_ZERO_EXAMPLE + + StringInvariant.SEMICOLON_SPACE + + PARSER_SYMBOL_NUMBER_FRACTIONS + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv42) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_FRACTIONS_EXAMPLE + + StringInvariant.SEMICOLON_SPACE + + PARSER_SYMBOL_NUMBER_OTHER_NUMERAL_SYSTEMS + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv41) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_OTHER_NUMERAL_SYSTEMS_EXAMPLE + + StringInvariant.SEMICOLON + ; ParserSymbol.UNICODE_MATH_DESC = PARSER_SYMBOL_UNICODE_MATH; } internal static void setLanguageSpecificDescriptionsRandomVariable() { diff --git a/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/parsertokens/ParserSymbol.cs b/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/parsertokens/ParserSymbol.cs index e4f118c2..2a94caf4 100644 --- a/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/parsertokens/ParserSymbol.cs +++ b/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/parsertokens/ParserSymbol.cs @@ -434,15 +434,7 @@ public sealed class ParserSymbol { public const String COMMA_SYN = "(a1, ... ,an)"; public const String SEMI_SYN = "(a1; ... ;an)"; public const String BLANK_SYN = " "; - public const String NUMBER_SYN = "Integer (since v.1.0): 1, -2; Decimal (since v.1.0): 0.2, -0.3, 1.2; Leading zero (since v.4.1): 001, -002.1; Scientific notation (since v.4.2): 1.2e-10, 1.2e+10, 2.3e10; No leading zero (since v.4.2): .2, -.212; Fractions (since v.4.2): 1_2, 2_1_3, 14_3; Other systems (since v.4.1): b1.111, b2.1001, b3.12021, b16.af12, h.af1, b.1001, o.0127"; - public const String NUMBER_SYN_INT = "1, -2, 3"; - public const String NUMBER_SYN_DEC = "0.1, -0.2, 1.3"; - public const String NUMBER_SYN_WITH_ZEROS = "001, -000.2, 00001.3"; - public const String NUMBER_SYN_NO_ZEROS = ".1, -.2, .3"; - public const String NUMBER_SYN_SCI = "1.2e10, 1.2e+10, -3.2e-5, 2.eE+10"; - public const String NUMBER_SYN_FRAC = "1_2, 2_3, 2_3_4, -2_4"; - public const String NUMBER_SYN_OTH_BASE = "\tb1.111, b2.1001, b3.12021, -b16.af12, h.af1, b.1001, o.0127"; - + public const String NUMBER_SYN = "-2, 0.2, -002.1, 2.3e10, -.212, 1_2, 2_1_3, b1.111, b2.1001, h.af1,..."; /* * ParserSymbol - tokens description. */ @@ -453,16 +445,8 @@ public sealed class ParserSymbol { public static String SEMI_DESC = ParserSymbol.NA; public static String BLANK_DESC = ParserSymbol.NA; public static String UNICODE_MATH_DESC = ParserSymbol.NA; - - public const String NUMBER_DESC = "Decimal number"; - public const String NUMBER_REG_DESC = "Regular expression for decimal numbers"; - public const String NUMBER_DESC_INT = "Integer numbers"; - public const String NUMBER_DESC_DEC = "Decimal numbers"; - public const String NUMBER_DESC_WITH_ZEROS = "Integer / Decimal numbers with leading zeros"; - public const String NUMBER_DESC_NO_ZEROS = "Integer / Decimal numbers without leading zeros"; - public const String NUMBER_DESC_SCI = "Decimal numbers in scientific notation"; - public const String NUMBER_DESC_FRAC = "Fractions"; - public const String NUMBER_DESC_OTH_BASE = "Numbers in other numeral bases"; + public static String NUMBER_LITERAL_STR = ParserSymbol.NA; + public static String NUMBER_LITERAL_DESC = ParserSymbol.NA; /* * ParserSymbol - since. */ diff --git a/CURRENT/java/src/org/mariuszgromada/math/mxparser/ExpressionUtils.java b/CURRENT/java/src/org/mariuszgromada/math/mxparser/ExpressionUtils.java index a7fb2a90..cb98c407 100644 --- a/CURRENT/java/src/org/mariuszgromada/math/mxparser/ExpressionUtils.java +++ b/CURRENT/java/src/org/mariuszgromada/math/mxparser/ExpressionUtils.java @@ -857,7 +857,7 @@ private static void makeParserKeyWords(boolean parserKeyWordsOnly, boolean UDFEx addKeyWord(ParserSymbol.RIGHT_PARENTHESES_STR, ParserSymbol.RIGHT_PARENTHESES_DESC, ParserSymbol.RIGHT_PARENTHESES_ID, ParserSymbol.RIGHT_PARENTHESES_SYN, ParserSymbol.RIGHT_PARENTHESES_SINCE, ParserSymbol.TYPE_ID, keyWordsList); addKeyWord(ParserSymbol.COMMA_STR, ParserSymbol.COMMA_DESC, ParserSymbol.COMMA_ID, ParserSymbol.COMMA_SYN, ParserSymbol.COMMA_SINCE, ParserSymbol.TYPE_ID, keyWordsList); addKeyWord(ParserSymbol.SEMI_STR, ParserSymbol.SEMI_DESC, ParserSymbol.COMMA_ID, ParserSymbol.SEMI_SYN, ParserSymbol.COMMA_SINCE, ParserSymbol.TYPE_ID, keyWordsList); - addKeyWord(ParserSymbol.DECIMAL_REG_EXP, ParserSymbol.NUMBER_REG_DESC, ParserSymbol.NUMBER_ID, ParserSymbol.NUMBER_SYN, ParserSymbol.NUMBER_SINCE, ParserSymbol.NUMBER_TYPE_ID, keyWordsList); + addKeyWord(ParserSymbol.NUMBER_LITERAL_STR, ParserSymbol.NUMBER_LITERAL_DESC, ParserSymbol.NUMBER_ID, ParserSymbol.NUMBER_SYN, ParserSymbol.NUMBER_SINCE, ParserSymbol.NUMBER_TYPE_ID, keyWordsList); addKeyWord(ParserSymbol.BLANK_STR, ParserSymbol.BLANK_DESC, ParserSymbol.BLANK_ID, ParserSymbol.BLANK_SYN, ParserSymbol.BLANK_SINCE, ParserSymbol.TYPE_ID, keyWordsList); } /** @@ -1174,7 +1174,7 @@ static String getHelp(String word, List keyWordsList) { kw = keyWord.wordString; switch (keyWord.wordTypeId) { case ParserSymbol.TYPE_ID: type = ParserSymbol.TYPE_DESC; break; - case ParserSymbol.NUMBER_TYPE_ID: type = StringResources.NUMBER; kw = "_" + StringResources.NUMBER + "_"; break; + case ParserSymbol.NUMBER_TYPE_ID: type = StringResources.NUMBER; kw = StringResources.NUMBER; break; case Operator.TYPE_ID: type = Operator.TYPE_DESC; break; case BooleanOperator.TYPE_ID: type = BooleanOperator.TYPE_DESC; break; case BinaryRelation.TYPE_ID: type = BinaryRelation.TYPE_DESC; break; diff --git a/CURRENT/java/src/org/mariuszgromada/math/mxparser/StringInvariant.java b/CURRENT/java/src/org/mariuszgromada/math/mxparser/StringInvariant.java index 8e1a6e1f..8ea81584 100644 --- a/CURRENT/java/src/org/mariuszgromada/math/mxparser/StringInvariant.java +++ b/CURRENT/java/src/org/mariuszgromada/math/mxparser/StringInvariant.java @@ -221,6 +221,8 @@ final class StringInvariant { static final String SPACE_EQUAL_SPACE = SPACE + EQUAL + SPACE; static final String COLON = ":"; static final String COLON_SPACE = COLON + SPACE; + static final String SEMICOLON = ";"; + static final String SEMICOLON_SPACE = SEMICOLON + SPACE; static final String COMMA = ","; static final String COMMA_SPACE = COMMA + SPACE; static final String DOT = "."; @@ -418,5 +420,13 @@ final class StringInvariant { static final String UNIT_ZEPTO_SYMBOL = "= 10⁻²¹"; static final String UNIT_YOCTO_SYMBOL = "= 10⁻²⁴"; // ------------------------------------------------- + static final String PARSER_SYMBOL_NUMBER_INTEGER_EXAMPLE = "1, -2"; + static final String PARSER_SYMBOL_NUMBER_DECIMAL_EXAMPLE = "0.2, -0.3, 1.2"; + static final String PARSER_SYMBOL_NUMBER_LEADING_ZERO_EXAMPLE = "001, -002.1"; + static final String PARSER_SYMBOL_NUMBER_SCI_NOTATION_EXAMPLE = "1.2e-10, 1.2e+10, 2.3E10"; + static final String PARSER_SYMBOL_NUMBER_NO_LEADING_ZERO_EXAMPLE = ".2, -.212"; + static final String PARSER_SYMBOL_NUMBER_FRACTIONS_EXAMPLE = "1_2, 2_1_3, -14_3"; + static final String PARSER_SYMBOL_NUMBER_OTHER_NUMERAL_SYSTEMS_EXAMPLE = "b1.111, b2.1001, b3.12021, -b16.af12, h.af1, -b.1001, o.0127"; + // ------------------------------------------------- static final String SEPARATOR = " - "; } diff --git a/CURRENT/java/src/org/mariuszgromada/math/mxparser/StringResources.java b/CURRENT/java/src/org/mariuszgromada/math/mxparser/StringResources.java index 56724d17..cd1a4608 100644 --- a/CURRENT/java/src/org/mariuszgromada/math/mxparser/StringResources.java +++ b/CURRENT/java/src/org/mariuszgromada/math/mxparser/StringResources.java @@ -295,6 +295,7 @@ final class StringResources { static String KEYWORD = "Keyword"; static String SYNTAX = "Syntax"; static String NUMBER = "Number"; + static String NUMBER_LITERAL = "Number literal"; static String TYPE = "Type"; static String SINCE = "Since"; static String DESCRIPTION = "Description"; @@ -670,6 +671,13 @@ final class StringResources { static String PARSER_SYMBOL_COMMA = "Comma (function parameters)"; static String PARSER_SYMBOL_SEMI = "Semicolon (function parameters)"; static String PARSER_SYMBOL_BLANK = "Blank (whitespace) character"; + static String PARSER_SYMBOL_NUMBER_INTEGER = "Integer"; + static String PARSER_SYMBOL_NUMBER_DECIMAL = "Decimal"; + static String PARSER_SYMBOL_NUMBER_LEADING_ZERO = "Leading zero"; + static String PARSER_SYMBOL_NUMBER_SCI_NOTATION = "Scientific notation"; + static String PARSER_SYMBOL_NUMBER_NO_LEADING_ZERO = "No leading zero"; + static String PARSER_SYMBOL_NUMBER_FRACTIONS = "Fractions"; + static String PARSER_SYMBOL_NUMBER_OTHER_NUMERAL_SYSTEMS = "Other numeral systems"; static String PARSER_SYMBOL_UNICODE_MATH = " - Unicode math symbol"; // ------------------------------------------------- static String DIMENSIONLESS_UNIT_PERC = "Percentage"; @@ -1081,11 +1089,55 @@ static void setLanguageSpecificDescriptionsOperator() { } static void setLanguageSpecificDescriptionsParserSymbol() { ParserSymbol.TYPE_DESC = PARSER_SYMBOL; + ParserSymbol.NUMBER_LITERAL_STR = NUMBER_LITERAL; ParserSymbol.LEFT_PARENTHESES_DESC = PARSER_SYMBOL_LEFT_PARENTHESES + StringInvariant.SEPARATOR + PARSER_SYMBOL; ParserSymbol.RIGHT_PARENTHESES_DESC = PARSER_SYMBOL_RIGHT_PARENTHESES + StringInvariant.SEPARATOR + PARSER_SYMBOL; ParserSymbol.COMMA_DESC = PARSER_SYMBOL_COMMA + StringInvariant.SEPARATOR + PARSER_SYMBOL; ParserSymbol.SEMI_DESC = PARSER_SYMBOL_SEMI + StringInvariant.SEPARATOR + PARSER_SYMBOL; ParserSymbol.BLANK_DESC = PARSER_SYMBOL_BLANK + StringInvariant.SEPARATOR + PARSER_SYMBOL; + ParserSymbol.NUMBER_LITERAL_DESC = PARSER_SYMBOL_NUMBER_INTEGER + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv10) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_INTEGER_EXAMPLE + + StringInvariant.SEMICOLON_SPACE + + PARSER_SYMBOL_NUMBER_DECIMAL + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv10) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_DECIMAL_EXAMPLE + + StringInvariant.SEMICOLON_SPACE + + PARSER_SYMBOL_NUMBER_LEADING_ZERO + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv41) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_LEADING_ZERO_EXAMPLE + + StringInvariant.SEMICOLON_SPACE + + PARSER_SYMBOL_NUMBER_SCI_NOTATION + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv42) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_SCI_NOTATION_EXAMPLE + + StringInvariant.SEMICOLON_SPACE + + PARSER_SYMBOL_NUMBER_NO_LEADING_ZERO + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv42) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_NO_LEADING_ZERO_EXAMPLE + + StringInvariant.SEMICOLON_SPACE + + PARSER_SYMBOL_NUMBER_FRACTIONS + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv42) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_FRACTIONS_EXAMPLE + + StringInvariant.SEMICOLON_SPACE + + PARSER_SYMBOL_NUMBER_OTHER_NUMERAL_SYSTEMS + + StringInvariant.SPACE + + StringUtils.surroundBrackets(SINCE + StringInvariant.SPACE + mXparser.NAMEv41) + + StringInvariant.COLON_SPACE + + StringInvariant.PARSER_SYMBOL_NUMBER_OTHER_NUMERAL_SYSTEMS_EXAMPLE + + StringInvariant.SEMICOLON + ; ParserSymbol.UNICODE_MATH_DESC = PARSER_SYMBOL_UNICODE_MATH; } static void setLanguageSpecificDescriptionsRandomVariable() { diff --git a/CURRENT/java/src/org/mariuszgromada/math/mxparser/parsertokens/ParserSymbol.java b/CURRENT/java/src/org/mariuszgromada/math/mxparser/parsertokens/ParserSymbol.java index b5fee985..39382680 100644 --- a/CURRENT/java/src/org/mariuszgromada/math/mxparser/parsertokens/ParserSymbol.java +++ b/CURRENT/java/src/org/mariuszgromada/math/mxparser/parsertokens/ParserSymbol.java @@ -398,7 +398,6 @@ public final class ParserSymbol { + "(" + nameOnlyTokenOptBracketsRegExp + ANY_NUMBER_LITERAL_REG_EXP + ")+" + "(" + nameOnlyTokenOptBracketsRegExp + ")?" + ")"; - /* * ParserSymbol - token type id. */ @@ -431,15 +430,7 @@ public final class ParserSymbol { public static final String COMMA_SYN = "(a1, ... ,an)"; public static final String SEMI_SYN = "(a1; ... ;an)"; public static final String BLANK_SYN = " "; - public static final String NUMBER_SYN = "Integer (since v.1.0): 1, -2; Decimal (since v.1.0): 0.2, -0.3, 1.2; Leading zero (since v.4.1): 001, -002.1; Scientific notation (since v.4.2): 1.2e-10, 1.2e+10, 2.3e10; No leading zero (since v.4.2): .2, -.212; Fractions (since v.4.2): 1_2, 2_1_3, 14_3; Other systems (since v.4.1): b1.111, b2.1001, b3.12021, b16.af12, h.af1, b.1001, o.0127"; - public static final String NUMBER_SYN_INT = "1, -2, 3"; - public static final String NUMBER_SYN_DEC = "0.1, -0.2, 1.3"; - public static final String NUMBER_SYN_WITH_ZEROS = "001, -000.2, 00001.3"; - public static final String NUMBER_SYN_NO_ZEROS = ".1, -.2, .3"; - public static final String NUMBER_SYN_SCI = "1.2e10, 1.2e+10, -3.2e-5, 2.eE+10"; - public static final String NUMBER_SYN_FRAC = "1_2, 2_3, 2_3_4, -2_4"; - public static final String NUMBER_SYN_OTH_BASE = "\tb1.111, b2.1001, b3.12021, -b16.af12, h.af1, b.1001, o.0127"; - + public static final String NUMBER_SYN = "-2, 0.2, -002.1, 2.3e10, -.212, 1_2, 2_1_3, b1.111, b2.1001, h.af1,..."; /* * ParserSymbol - tokens description. */ @@ -450,18 +441,8 @@ public final class ParserSymbol { public static String SEMI_DESC = ParserSymbol.NA; public static String BLANK_DESC = ParserSymbol.NA; public static String UNICODE_MATH_DESC = ParserSymbol.NA; - - public static final String NUMBER_DESC = "Decimal number"; - public static final String NUMBER_REG_DESC = "Regular expression for decimal numbers"; - public static final String NUMBER_DESC_INT = "Integer numbers"; - public static final String NUMBER_DESC_DEC = "Decimal numbers"; - public static final String NUMBER_DESC_WITH_ZEROS = "Integer / Decimal numbers with leading zeros"; - public static final String NUMBER_DESC_NO_ZEROS = "Integer / Decimal numbers without leading zeros"; - public static final String NUMBER_DESC_SCI = "Decimal numbers in scientific notation"; - public static final String NUMBER_DESC_FRAC = "Fractions"; - public static final String NUMBER_DESC_OTH_BASE = "Numbers in other numeral bases"; - - + public static String NUMBER_LITERAL_STR = ParserSymbol.NA; + public static String NUMBER_LITERAL_DESC = ParserSymbol.NA; /* * ParserSymbol - since. @@ -469,14 +450,6 @@ public final class ParserSymbol { public static final String LEFT_PARENTHESES_SINCE = mXparser.NAMEv10; public static final String RIGHT_PARENTHESES_SINCE = mXparser.NAMEv10; public static final String COMMA_SINCE = mXparser.NAMEv10; - public static final String SEMI_SINCE = mXparser.NAMEv10; public static final String BLANK_SINCE = mXparser.NAMEv42; public static final String NUMBER_SINCE = mXparser.NAMEv10; - public static final String NUMBER_SINCE_INT = mXparser.NAMEv10; - public static final String NUMBER_SINCE_DEC = mXparser.NAMEv10; - public static final String NUMBER_SINCE_WITH_ZEROS = mXparser.NAMEv41; - public static final String NUMBER_SINCE_NO_ZEROS = mXparser.NAMEv42; - public static final String NUMBER_SINCE_SCI = mXparser.NAMEv42; - public static final String NUMBER_SINCE_FRAC = mXparser.NAMEv42; - public static final String NUMBER_SINCE_OTH_BASE = mXparser.NAMEv42; } \ No newline at end of file