scala.util.parsing.combinator.lexical

Members list

Type members

Classlikes

abstract class Lexical extends Scanners, 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.

Attributes

Supertypes
trait Tokens
trait Scanners
trait Parsers
class Object
trait Matchable
class Any
Show all
Known subtypes
class StdLexical
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.

Attributes

Supertypes
trait Parsers
class Object
trait Matchable
class Any
Known subtypes
class Lexical
class StdLexical
class StdLexical extends Lexical, StdTokens

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

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.)

Attributes

Supertypes
trait StdTokens
class Lexical
trait Tokens
trait Scanners
trait Parsers
class Object
trait Matchable
class Any
Show all