scala.util.parsing.combinator

lexical

package lexical

Visibility
  1. Public
  2. All

Type Members

  1. abstract class Lexical extends Scanners with Tokens

    This component complements the Scanners component with common operations for lexical parsers.

    This component complements the Scanners component with common operations for lexical parsers.

    Refer to scala.util.parsing.combinator.lexical.StdLexical for a concrete implementation for a simple, Scala-like language.

  2. trait Scanners extends Parsers

    This component provides core functionality for lexical parsers.

    This component provides core functionality for lexical parsers.

    See its subclasses scala.util.parsing.combinator.lexical.Lexical and -- most interestingly scala.util.parsing.combinator.lexical.StdLexical, for more functionality.

  3. class StdLexical extends Lexical with StdTokens

    This component provides a standard lexical parser for a simple, Scala-like language.

    This component provides a standard lexical parser for a simple, Scala-like language. It parses keywords and identifiers, numeric literals (integers), strings, and delimiters.

    To distinguish between identifiers and keywords, it uses a set of reserved identifiers: every string contained in reserved is returned as a keyword token. (Note that => is hard-coded as a keyword.) Additionally, the kinds of delimiters can be specified by the delimiters set.

    Usually this component is used to break character-based input into bigger tokens, which are then passed to a token-parser (see scala.util.parsing.combinator.syntactical.TokenParsers.)