scala.util.parsing.combinator.lexical

class Lexical

[source: scala/util/parsing/combinator/lexical/Lexical.scala]

abstract class Lexical
extends Scanners with Tokens

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

{@see StdLexical} for a concrete implementation for a simple, Scala-like language.

Author
Martin Odersky, Adriaan Moors
Direct Known Subclasses:
StdLexical

Values and Variables inherited from Parsers
lastNoSuccess
Method Summary
def chrExcept (cs : Char*) : Parser[Char]
A character-parser that matches any character except the ones given in `cs' (and returns it)
def digit : Parser[Char]
A character-parser that matches a digit (and returns it)
def letter : Parser[Char]
A character-parser that matches a letter (and returns it)
def whitespaceChar : Parser[Char]
A character-parser that matches a white-space character (and returns it)
Methods inherited from Tokens
errorToken
Methods inherited from Parsers
Parser, OnceParser, commit, elem, elem, accept, accept, accept, acceptIf, acceptMatch, acceptSeq, failure, err, success, log, rep, repsep, rep1, rep1, repN, rep1sep, chainl1, chainl1, chainr1, opt, not, positioned, phrase, mkList
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Methods inherited from Scanners
token (abstract), whitespace (abstract)
Method Details
def letter : Parser[Char]
A character-parser that matches a letter (and returns it)

def digit : Parser[Char]
A character-parser that matches a digit (and returns it)

def chrExcept(cs : Char*) : Parser[Char]
A character-parser that matches any character except the ones given in `cs' (and returns it)

def whitespaceChar : Parser[Char]
A character-parser that matches a white-space character (and returns it)