kiama.parsing

trait CharParsers

[source: kiama/parsing/CharParsers.scala]

trait CharParsers
extends Parsers
Parsers that operate on character input.
Direct Known Subclasses:
CharPackratParsers

Type Summary
type Elem
CharParsers parse character elements.
Value Summary
lazy val digit : Parser[Char]
lazy val layout : Parser[scala.List[Char]]
lazy val letter : Parser[Char]
lazy val letterOrDigit : Parser[Char]
lazy val whitespace : Parser[Char]
Values and Variables inherited from Parsers
any
Method Summary
implicit def literal (s : java.lang.String) : Parser[java.lang.String]
(Implicitly) construct a parser that succeeds if the next part of the input is the given string, and otherwise fails. Layout is skipped after the string.
def parse [T](p : => Parser[T], in : java.io.Reader) : ParseResult[T]
Run a parser on a given character sequence and return its result.
def parse [T](p : => Parser[T], in : java.lang.CharSequence) : ParseResult[T]
Run a parser on a given character sequence and return its result.
def parse [T](p : => Parser[T], in : scala.util.parsing.input.Reader) : ParseResult[T]
Run a parser on a given input and return its result.
def parseAll [T](p : => Parser[T], in : scala.util.parsing.input.Reader) : ParseResult[T]
Run a parser on a given input and return its result, requiring that all of the input be consumed.
def parseAll [T](p : => Parser[T], in : java.lang.CharSequence) : ParseResult[T]
Run a parser on a given character sequence and return its result, requiring that all of the input be consumed.
def parseAll [T](p : => Parser[T], in : java.io.Reader) : ParseResult[T]
Run a parser on a given reader and return its result, requiring that all of the input be consumed.
override def phrase [T](p : => Parser[T]) : Parser[T]
Construct a parser that parses with p and then makes sure that the entire input has been consumed (i.e., the input was a phrase that was recognised by p). Layout is allowed at the beginning.
implicit def regex (r : scala.util.matching.Regex) : Parser[java.lang.String]
(Implicitly) construct a parser that succeeds if the next part of the input matches the given regular expression, and otherwise fails.
def token [T](p : Parser[T]) : Parser[T]
Parse whatever p parses followed by layout.
Methods inherited from Parsers
Parser, success, failure, accept, acceptIf, opt, rep, rep1, repN, repsep, rep1sep, and, not
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
type Elem
CharParsers parse character elements.

Value Details
lazy val whitespace : Parser[Char]

lazy val layout : Parser[scala.List[Char]]

lazy val digit : Parser[Char]

lazy val letter : Parser[Char]

lazy val letterOrDigit : Parser[Char]

Method Details
def token[T](p : Parser[T]) : Parser[T]
Parse whatever p parses followed by layout.

override def phrase[T](p : => Parser[T]) : Parser[T]
Construct a parser that parses with p and then makes sure that the entire input has been consumed (i.e., the input was a phrase that was recognised by p). Layout is allowed at the beginning.
Overrides
Parsers.phrase

implicit def literal(s : java.lang.String) : Parser[java.lang.String]
(Implicitly) construct a parser that succeeds if the next part of the input is the given string, and otherwise fails. Layout is skipped after the string.

implicit def regex(r : scala.util.matching.Regex) : Parser[java.lang.String]
(Implicitly) construct a parser that succeeds if the next part of the input matches the given regular expression, and otherwise fails.

def parse[T](p : => Parser[T], in : scala.util.parsing.input.Reader) : ParseResult[T]
Run a parser on a given input and return its result.

def parse[T](p : => Parser[T], in : java.lang.CharSequence) : ParseResult[T]
Run a parser on a given character sequence and return its result.

def parse[T](p : => Parser[T], in : java.io.Reader) : ParseResult[T]
Run a parser on a given character sequence and return its result.

def parseAll[T](p : => Parser[T], in : scala.util.parsing.input.Reader) : ParseResult[T]
Run a parser on a given input and return its result, requiring that all of the input be consumed.

def parseAll[T](p : => Parser[T], in : java.io.Reader) : ParseResult[T]
Run a parser on a given reader and return its result, requiring that all of the input be consumed.

def parseAll[T](p : => Parser[T], in : java.lang.CharSequence) : ParseResult[T]
Run a parser on a given character sequence and return its result, requiring that all of the input be consumed.