scala.util.parsing.combinator1.syntactical
trait TokenParsers

[source: `scala/util/parsing/combinator1/syntactical/TokenParsers.scala`]

`` `trait` TokenParsers
  `extends` Parsers

  This is the core component for token-based parsers.

  @requires lexical a component providing the tokens consumed by the parsers in this component.

Author
  Martin Odersky, Adriaan Moors

Direct Known Subclasses:
  StdTokenParsers

Type Summary
`type` | Elem The input-type for these parsers
`abstract type` | Tokens <: Tokens Tokens is the abstract type of the `Token's consumed by the parsers in this component

Value Summary
`abstract val` | lexical : Tokens lexical is the component responsible for consuming some basic kind of input (usually character-based) and turning it into the tokens understood by these parsers.

Values and Variables inherited from Parsers
lastNoSuccess

Method Summary
`def` | phrase [t](p : Parser[t]) : Parser[t] A parser generator delimiting whole phrases (i.e. programs). `phrase(p)` succeeds if `p` succeeds and no input is left over after `p`.

Methods inherited from Parsers
commit, elem, elem, accept, accept, accept, failure, err, success, log, rep, repsep, rep1, rep1, repN, rep1sep, chainl1, chainl1, chainr1, opt, positioned, const

Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Type Details

`abstract` `type` Tokens <: Tokens

  Tokens is the abstract type of the `Token's consumed by the parsers in this component

`` `type` Elem

  The input-type for these parsers

Value Details

`abstract` `val` lexical : Tokens

  lexical is the component responsible for consuming some basic kind of input (usually character-based) and turning it into the tokens understood by these parsers.

Method Details

`` `def` phrase[t](p : Parser[t]) : Parser[t]

  A parser generator delimiting whole phrases (i.e. programs).

  `phrase(p)` succeeds if `p` succeeds and no input is left over after `p`.

Parameters
  `p -` the parser that must consume all input for the resulting parser to succeed.
Returns
  a parser that has the same result as `p', but that only succeeds if `p` consumed all the input.