|
Scala Library
|
|
trait
Scanners
extends ParsersThis component provides core functionality for lexical parsers.
See its subclasses {@see Lexical} and -- most interestingly {@see StdLexical}, for more functionality.
@requires token a parser that produces a token (from a stream of characters) @requires whitespace a unit-parser for white-space @provides Scanner essentially a parser that parses a stream of characters to produce `Token's, which are typically passed to a syntactical parser (which operates on `Token's, not on individual characters).| Type Summary | |
type
|
Elem
the type of input elements
|
abstract type
|
Token |
| Values and Variables inherited from Parsers | |
| lastNoSuccess |
| Method Summary | |
abstract def
|
errorToken
(msg : java.lang.String) : Token
This token is produced by a scanner {@see Scanner} when scanning failed.
|
abstract def
|
token
: Parser[Token]
a parser that produces a token (from a stream of characters)
|
abstract def
|
whitespace
: Parser[Any]
a parser for white-space -- its result will be discarded
|
| 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 |
| Class Summary | |
class
|
Scanner
(in : Reader[Char]) extends Reader[Token]
|
| Type Details |
| Method Details |
abstract
def
errorToken(msg : java.lang.String) : Token
|
Scala Library
|
|