com.phasmidsoftware.number.core.parse
Members list
Type members
Classlikes
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ComplexParser.type
Attributes
- Supertypes
-
class ExpressionParserNumeric[Double]class ExpressionParser[Double]trait String => Try[Double]trait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Self type
Attributes
- Supertypes
-
trait String => Try[T]trait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class ExpressionParserNumeric[T]object DoubleExpressionParserobject IntExpressionParserobject RationalExpressionParser
- Self type
Attributes
- Supertypes
-
class ExpressionParser[T]trait String => Try[T]trait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Known subtypes
- Self type
Attributes
- Supertypes
-
class ExpressionParserNumeric[Int]class ExpressionParser[Int]trait String => Try[Int]trait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Self type
-
IntExpressionParser.type
Trait which is used to define a logging level for the logit method of SignificantSpaceParsers.
Attributes
- Supertypes
-
class BaseMillParserclass BaseNumberParserclass BaseRationalParserclass SignificantSpaceParserstrait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Self type
-
MillParser.type
Attributes
- Supertypes
-
trait Producttrait Equalsclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class ExpressionParserNumeric[Rational]class ExpressionParser[Rational]trait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Self type
The RationalParser object provides functionality to parse strings into Rational objects. It extends the BaseRationalParser and implements parsing logic for rational numbers, including components such as sign, integer part, fractional part, and exponent.
The RationalParser object provides functionality to parse strings into Rational objects. It extends the BaseRationalParser and implements parsing logic for rational numbers, including components such as sign, integer part, fractional part, and exponent.
NOTE unless you are working inside the core module, you should prefer com.phasmidsoftware.number.expression.parse.RationalParser instead.
Attributes
- Supertypes
-
class BaseRationalParserclass SignificantSpaceParserstrait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Self type
-
RationalParser.type
Represents an exception used specifically for handling errors related to parsing rational expressions.
Represents an exception used specifically for handling errors related to parsing rational expressions.
It extends the Exception class, allowing it to contain an error message describing the parsing issue.
Value parameters
- m
-
The error message that provides details about the parsing error.
Attributes
- Supertypes
-
trait Producttrait Equalsclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Represents a repeating decimal number, including its sign, integer part, non-repeating fractional part (if any), and repeating fractional part.
Represents a repeating decimal number, including its sign, integer part, non-repeating fractional part (if any), and repeating fractional part.
This class models numbers that can be expressed as decimals with repeating cycles, providing functionality to compute their exact rational representation.
Value parameters
- integerPart
-
The integer portion of the decimal number.
- nonRepeatingPart
-
The non-repeating fractional part of the decimal (optional).
- repeatingPart
-
The repeating fractional part of the decimal.
- sign
-
Specifies the sign of the number (true for positive, false for negative).
Attributes
- Constructor
-
Creates a new instance of the RepeatingDecimal.
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait ValuableNumberclass Objecttrait Matchableclass AnyShow all
Parser for a Mill. The input to this parser is a string of tokens, each separated by any amount of white space. The input is then converted to an IndexedSeq of Strings which is then reversed and rendered as a single String. The purpose of this strange little dance is to reverse the order of the tokens without reversing the tokens themselves.
Parser for a Mill. The input to this parser is a string of tokens, each separated by any amount of white space. The input is then converted to an IndexedSeq of Strings which is then reversed and rendered as a single String. The purpose of this strange little dance is to reverse the order of the tokens without reversing the tokens themselves.
For detail of the method, please see https://en.wikipedia.org/wiki/Shunting-yard_algorithm
CONSIDER using a TokenParser instead of a RegexParser.
Attributes
- Supertypes
-
class BaseMillParserclass BaseNumberParserclass BaseRationalParserclass SignificantSpaceParserstrait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Self type
-
ShuntingYardParser.type
Attributes
- Supertypes
-
trait Producttrait Equalsclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Represents a numerical value that can be evaluated as a Rational number wrapped in a Try, indicating possible failure during parsing.
Represents a numerical value that can be evaluated as a Rational number wrapped in a Try, indicating possible failure during parsing.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Represents a vulgar (Unicode) fraction such as ⅓, ½, ¼, etc. These are single Unicode characters that represent common fractions.
Represents a vulgar (Unicode) fraction such as ⅓, ½, ¼, etc. These are single Unicode characters that represent common fractions.
Value parameters
- fraction
-
the Unicode fraction character as a string
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait ValuableNumberclass Objecttrait Matchableclass AnyShow all
Deprecated classlikes
Parser for a Mill. The input to this parser is a string of tokens, each separated by any amount of white space. The input is then converted to an IndexedSeq of Strings which is then reversed and rendered as a single String. The purpose of this strange little dance is to reverse the order of the tokens without reversing the tokens themselves.
Parser for a Mill. The input to this parser is a string of tokens, each separated by any amount of white space. The input is then converted to an IndexedSeq of Strings which is then reversed and rendered as a single String. The purpose of this strange little dance is to reverse the order of the tokens without reversing the tokens themselves.
CONSIDER using a TokenParser instead of a RegexParser.
Attributes
- Deprecated
-
[Since version 1.6.5]use com.phasmidsoftware.number.expression.parse.BaseMillParser instead - Supertypes
-
class BaseNumberParserclass BaseRationalParserclass SignificantSpaceParserstrait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object MillParserobject ShuntingYardParser
Parser for Number.
Parser for Number.
NOTE when we specify an exact number by following an integer by an exponent, we must precede the "E" with a decimal point. CONSIDER Try to eliminate that requirement.
Attributes
- Deprecated
-
[Since version 1.6.5]use com.phasmidsoftware.number.expression.parse.BaseNumberParser instead - Supertypes
-
class BaseRationalParserclass SignificantSpaceParserstrait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class BaseMillParserobject MillParserobject ShuntingYardParserclass ComplexParserobject NumberParser
A parser of Rational objects.
A parser of Rational objects.
Attributes
- Deprecated
-
[Since version 1.6.5]use com.phasmidsoftware.number.expression.parse.baseRationalParser instead - Supertypes
-
class SignificantSpaceParserstrait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class BaseNumberParserclass BaseMillParserobject MillParserobject ShuntingYardParserclass ComplexParserobject NumberParserobject RationalParserShow all
A parser of Rational objects.
A parser of Rational objects.
Attributes
- Companion
- object
- Deprecated
-
[Since version 1.6.5]use com.phasmidsoftware.number.expression.parse.ComplexParser instead - Supertypes
-
class BaseNumberParserclass BaseRationalParserclass SignificantSpaceParserstrait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
Object for parsing numerical values, extending the functionality of the BaseNumberParser class. Provides methods for parsing, interpreting, and representing numbers, potentially with fuzziness, exponents, and other modifications.
Object for parsing numerical values, extending the functionality of the BaseNumberParser class. Provides methods for parsing, interpreting, and representing numbers, potentially with fuzziness, exponents, and other modifications.
This object specializes in defining the parsing rules for various numeric representations, including:
- Simple numbers or rational numbers.
- Numbers with fuzziness or uncertainty.
- Factors representing constants, symbols, or mathematical concepts.
The parsing logic accounts for optional components such as fractional parts and exponents, and encapsulates results within domain-specific types, such as Number, NumberWithFuzziness, and ValuableNumber.
Attributes
- Deprecated
-
[Since version 1.6.5]use com.phasmidsoftware.number.expression.parse.NumberParser instead - Supertypes
-
class BaseNumberParserclass BaseRationalParserclass SignificantSpaceParserstrait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Self type
-
NumberParser.type
This abstract class extends JavaTokenParsers but where white space is not ignored.
This abstract class extends JavaTokenParsers but where white space is not ignored.
Attributes
- Deprecated
-
[Since version 1.6.5]use com.phasmidsoftware.number.expression.parse.SignificantSpaceParsers instead - Supertypes
-
trait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class BaseRationalParserclass BaseNumberParserclass BaseMillParserobject MillParserobject ShuntingYardParserclass ComplexParserobject NumberParserobject RationalParserShow all
- Self type