com.phasmidsoftware.matchers

Members list

Type members

Classlikes

case class DyadicExpression(left: Expression, right: Expression, operator: String)

Represents a dyadic (binary) expression consisting of a left operand, a right operand, and an operator connecting them in an infix notation.

Represents a dyadic (binary) expression consisting of a left operand, a right operand, and an operator connecting them in an infix notation.

Value parameters

left

the left-hand side operand of the expression, represented as an Expression.

operator

the operator as a String connecting the left and right operands.

right

the right-hand side operand of the expression, represented as an Expression.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Expression

Represents an Expression in a symbolic mathematical computation system.

Represents an Expression in a symbolic mathematical computation system.

This class provides operations for mathematical and logical manipulations, including arithmetic, trigonometric, and monadic transformations.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Expression.type
case object LogDebug extends LogLevel

Represents a logging level for debugging purposes.

Represents a logging level for debugging purposes.

This object is a case object that extends the LogLevel trait. It is used to specify that log messages should correspond to the debug logging level.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait LogLevel
class Object
trait Matchable
class Any
Show all
Self type
LogDebug.type
case object LogInfo extends LogLevel

Represents the information level for logging within the context of SignificantSpaceParsers. This level is used to log informational messages that provide general insights or details about the execution without indicating an error or warning.

Represents the information level for logging within the context of SignificantSpaceParsers. This level is used to log informational messages that provide general insights or details about the execution without indicating an error or warning.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait LogLevel
class Object
trait Matchable
class Any
Show all
Self type
LogInfo.type
trait LogLevel

Trait which is used to define a logging level for the log method of SignificantSpaceParsers.

Trait which is used to define a logging level for the log method of SignificantSpaceParsers.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object LogDebug
object LogInfo
object LogOff
object LogLevel

LogLevel is an object that provides a default implicit value representing the log-off level. This implicit value can be used to disable logging when a LogLevel is required implicitly within the application.

LogLevel is an object that provides a default implicit value representing the log-off level. This implicit value can be used to disable logging when a LogLevel is required implicitly within the application.

LogLevel represents a companion to the LogLevel trait, which defines different logging levels.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
LogLevel.type
case object LogOff extends LogLevel

Represents a log-off level used to disable logging. Extends the LogLevel trait, indicating it is one of the possible log level settings. Typically used to silence all log messages.

Represents a log-off level used to disable logging. Extends the LogLevel trait, indicating it is one of the possible log level settings. Typically used to silence all log messages.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait LogLevel
class Object
trait Matchable
class Any
Show all
Self type
LogOff.type
object MatchLogger

Companion object for the MatchLogger class, providing utility methods to create instances of MatchLogger using standard configurations.

Companion object for the MatchLogger class, providing utility methods to create instances of MatchLogger using standard configurations.

This object facilitates the creation of MatchLogger instances with specified log levels, target classes, or custom logger implementations.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class MatchLogger(val logLevel: LogLevel, f: String => Unit) extends String => Unit

A logger class for handling and managing logging operations based on the specified log level.

A logger class for handling and managing logging operations based on the specified log level.

Value parameters

f

A function that takes a string input and performs the logging operation.

logLevel

The logging level to determine the behavior of the logger (LogOff, LogInfo, LogDebug).

Attributes

Constructor

Creates a new MatchLogger instance with a given log level and a logging function.

Note

The class extends String => Unit, enabling it to be used directly as a function.

Companion
object
Supertypes
trait String => Unit
class Object
trait Matchable
class Any
Known subtypes
class Slf4jLogger

Companion object for the MatcherException case class. Provides utility methods for creating MatcherException instances.

Companion object for the MatcherException case class. Provides utility methods for creating MatcherException instances.

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class MatcherException(msg: String, x: Throwable) extends Exception

A MatcherException.

A MatcherException.

Value parameters

msg

a message.

x

a Throwable.

Attributes

Companion
object
Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
object Matchers

The Matchers object provides utilities and implicit conversions for working with matching operations and combining different types into structured forms. It contains an implicit class for the tilde (~) operator as well as a default instance of Matchers.

The Matchers object provides utilities and implicit conversions for working with matching operations and combining different types into structured forms. It contains an implicit class for the tilde (~) operator as well as a default instance of Matchers.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Matchers.type
trait Matchers

The Matchers trait defines behavior including the ability to create and manage many different types of Matcher. A Matcher is a combinator used for pattern matching and transformation based on some rules or functions.

The Matchers trait defines behavior including the ability to create and manage many different types of Matcher. A Matcher is a combinator used for pattern matching and transformation based on some rules or functions.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Self type
case class MonadicExpression(expression: Expression, str: String)

A case class that models a monadic expression, which represents a single-operand operation applied to another Expression.

A case class that models a monadic expression, which represents a single-operand operation applied to another Expression.

Value parameters

expression

the underlying Expression on which the monadic operation is applied.

str

a string representation of the operator.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object RegexGroups

An object providing factory methods for creating instances of RegexGroups, which represent a combination of a regular expression and a list of group indexes.

An object providing factory methods for creating instances of RegexGroups, which represent a combination of a regular expression and a list of group indexes.

It includes methods to construct RegexGroups with a regex pattern as a Regex instance or as a string, along with an optional list of group indexes. If no group indexes are provided, all groups are selected by default.

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class RegexGroups(regex: Regex, groups: Seq[Int])

A class combining a regular expression and a list of group indexes. NOTE: there are no unit tests for this class.

A class combining a regular expression and a list of group indexes. NOTE: there are no unit tests for this class.

Value parameters

groups

a list of required group indexes (if Nil, then all groups are selected). NOTE that the group indexes start at 1.

regex

a Regex.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Slf4jLogger(logLevel: LogLevel, logger: Logger) extends MatchLogger

A case class that wraps SLF4J logging functionality, extending MatchLogger to utilize a specified logging level and SLF4J logger instance for log operations.

A case class that wraps SLF4J logging functionality, extending MatchLogger to utilize a specified logging level and SLF4J logger instance for log operations.

Value parameters

logLevel

The logging level to control the behavior of the logger, determining whether logs are written based on the specified level (e.g., LogInfo, LogDebug).

logger

The SLF4J Logger instance used for performing the logging operations. The class delegates the actual logging operations to SLF4J's Logger methods based on the provided logging level: - Logs at the info level if the logLevel is LogInfo. - Logs at the debug level if the logLevel is LogDebug. - Skips logging for other levels. Inherits functionality from MatchLogger, allowing it to act as a functional logger with behavior controlled by the specified logLevel.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class MatchLogger
trait String => Unit
class Object
trait Matchable
class Any
Show all
object Tilde

Companion object to ~ (although the name had to be changed).

Companion object to ~ (although the name had to be changed).

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Tilde.type
case class Valuable(value: Int)

Represents a terminal expression in the expression hierarchy.

Represents a terminal expression in the expression hierarchy.

A Valuable is a leaf node in the expression structure, encapsulating a numeric value. It directly stores a value of type com.phasmidsoftware.number.Int.

Value parameters

value

The numeric value encapsulated by this terminal expression.

Attributes

Constructor

Creates a Valuable with the specified numeric value.

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ~[+L, +R](l: L, r: R)

The tilde class which is basically a Tuple (i.e., Product) with a few extra methods.

The tilde class which is basically a Tuple (i.e., Product) with a few extra methods.

Type parameters

L

the left type.

R

the right type.

Value parameters

l

the left value.

r

the right value.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object 𝛑

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
𝛑.type

Givens

Givens

given given_Conversion_Int_Expression: Conversion[Int, Expression]
given given_Conversion_String_Expression: Conversion[String, Expression]