trait SharedPackageDefs extends AnyRef
- Alphabetic
- By Inheritance
- SharedPackageDefs
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type P0 = ParsingRun[Unit]
Shorthand for
P[Unit]
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def AnyChar(implicit ctx: P[_]): P[Unit]
Parses a single character, any character, as long as there is at least one character for it to parse (i.e.
Parses a single character, any character, as long as there is at least one character for it to parse (i.e. the input isn't at its end)
- def End(implicit ctx: P[_]): P[Unit]
Parser that is only successful at the end of the input.
Parser that is only successful at the end of the input. Useful to ensure your parser parses the whole file.
- def Fail(msg: String)(implicit ctx: P[_]): P[Nothing]
No-op parser with a custom error message that always fails, consuming zero characters
- def Fail(implicit ctx: P[_]): P[Nothing]
No-op parser that always fails, consuming zero characters
- def IgnoreCase(s: String)(implicit ctx: P[Any]): P[Unit]
Parses a string value case-insensitively
- def Index(implicit ctx: P[_]): P[Int]
Parser that always succeeds and returns the current index into the parsed input.
Parser that always succeeds and returns the current index into the parsed input. Useful for e.g. capturing source locations so when downstream valiation raises errors you can tell the user where in the input the error originated from
- def NoCut[T](parse: => P[T])(implicit ctx: P[_]): P[T]
Allows backtracking regardless of whether cuts happen within the wrapped parser; this is useful for re-using an existing parser with cuts within it, in other parts of your grammar where backtracking is necessary and unavoidable.
- def NoTrace[T](p: => P[T])(implicit ctx: P[_]): P[T]
Wraps a parser and ensures that none of the parsers within it leave failure traces in terminalMsgs, though unlike ByNameOps.opaque if there is a failure *within* the wrapped parser the failure's location and error message will still be shown
Wraps a parser and ensures that none of the parsers within it leave failure traces in terminalMsgs, though unlike ByNameOps.opaque if there is a failure *within* the wrapped parser the failure's location and error message will still be shown
Useful for wrapping things like whitespace, code-comment, etc. parsers which can be applied everywhere and are not useful to display to the user as part of the error message.
- def Pass[T](v: T)(implicit ctx: P[_]): P[T]
No-op parser that always succeeds with the given value, consuming zero characters
- def Pass(implicit ctx: P[_]): P[Unit]
No-op parser that always succeeds, consuming zero characters
- def SingleChar(implicit ctx: P[_]): P[Char]
Like AnyChar, but returns the single character it parses.
Like AnyChar, but returns the single character it parses. Useful together with EagerOps.flatMapX to provide one-character-lookahead style parsing: SingleChar consumes the single character, and then EagerOps.flatMapX can
matchon that single character and decide which downstream parser you wish to invoke - def Start(implicit ctx: P[_]): P[Unit]
Parser that is only successful at the start of the input.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def parse[T](input: ParserInputSource, parser: (P[_]) => P[T], verboseFailures: Boolean = false, startIndex: Int = 0, instrument: Instrument = null): Parsed[T]
Parses the given input ParserInput using the given parser and returns a Parsed result containing the success value or failure metadata.
Parses the given input ParserInput using the given parser and returns a Parsed result containing the success value or failure metadata.
Can take either a String, an Iterator or strings or a fastparse.ParserInput object
- input
the input to parse
- parser
the parser method to use to parse the input
- verboseFailures
enable this to show a more detailed error message if a parser fails, without needing to run
.traced.trace. Defaults tofalseas it slows down parsing considerably- startIndex
where in the input to start parsing
- instrument
Callbacks that get run before and after every named
P(...)parser
- def parseInputRaw[T](input: ParserInput, parser: (P[_]) => P[T], verboseFailures: Boolean = false, startIndex: Int = 0, traceIndex: Int = -1, instrument: Instrument = null, enableLogging: Boolean = true): ParsingRun[T]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()