io.github.iltotore.pureparser
Members list
Packages
Type members
Classlikes
Attributes
- Companion
- object
- Source
- ParserError.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Source
- ParserError.scala
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ParseError.type
The result of a parser. Unlike Either, a ParseResult can contain both an output value and errors, typically in the case of a recovered AST.
The result of a parser. Unlike Either, a ParseResult can contain both an output value and errors, typically in the case of a recovered AST.
Type parameters
- A
-
the output type.
- I
-
the type of a token.
Value parameters
- endPosition
-
the position the parser ended at. It is often supposed to be at the end of the token list (EOF).
- errors
-
the emitted parsing errors. No error means that the parsing was successful.
- output
-
the value outputted by the parser. The Option is empty only if no AST could be recovered.
Attributes
- Source
- ParseResult.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Source
- Parser.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Parser.type
A recovery strategy, basically a recovery Parser based on the original one.
A recovery strategy, basically a recovery Parser based on the original one.
Type parameters
- A
-
the output type.
- I
-
the type of a token.
Attributes
- Companion
- object
- Source
- RecoverStrategy.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Source
- RecoverStrategy.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
RecoverStrategy.type
A span between two positions in the input list, typically used to track the position of each parsed node.
A span between two positions in the input list, typically used to track the position of each parsed node.
Value parameters
Attributes
- Note
-
it is always assumed that
start < end. - Source
- Span.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Types
A parser taking tokens of type I, outputting a A.
A parser taking tokens of type I, outputting a A.
It is a combination of the following effects:
- purelogic.State of Int representing the index of the next token to read.
- purelogic.Reader of a IndexedSeq of tokens
I. - purelogic.Writer of ParseError.
- purelogic.Abort of Unit, used to cut a path.
Type parameters
- A
-
the output type.
- I
-
the type of a token.
Attributes
- Source
- Parser.scala