Trait

util.parsing

NestedCommentParser

Related Doc: package parsing

Permalink

trait NestedCommentParser extends RegexPackratWhitespaceParser

A parser offering end of line comments, nested multi-line comments and special comment blocks containing end-of-line and multi-line comments.

Linear Supertypes
RegexPackratWhitespaceParser, RegexPackratParser, PackratParsers, RegexParsers, Parsers, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NestedCommentParser
  2. RegexPackratWhitespaceParser
  3. RegexPackratParser
  4. PackratParsers
  5. RegexParsers
  6. Parsers
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Elem = Char

    Permalink
    Definition Classes
    RegexParsers → Parsers
  2. case class Error extends NoSuccess with Product with Serializable

    Permalink
    Definition Classes
    Parsers
  3. case class Failure extends NoSuccess with Product with Serializable

    Permalink
    Definition Classes
    Parsers
  4. type Input = Reader[Elem]

    Permalink
    Definition Classes
    Parsers
  5. sealed abstract class NoSuccess extends ParseResult[Nothing]

    Permalink
    Definition Classes
    Parsers
  6. trait OnceParser[+T] extends Parser[T]

    Permalink
    Definition Classes
    Parsers
  7. abstract class PackratParser[+T] extends scala.util.parsing.combinator.PackratParsers.Parser[T]

    Permalink
    Definition Classes
    PackratParsers
  8. class PackratReader[+T] extends Reader[T]

    Permalink
    Definition Classes
    PackratParsers
  9. sealed abstract class ParseResult[+T] extends AnyRef

    Permalink
    Definition Classes
    Parsers
  10. abstract class Parser[+T] extends (Input) ⇒ ParseResult[T]

    Permalink
    Definition Classes
    Parsers
  11. case class Success[+T] extends ParseResult[T] with Product with Serializable

    Permalink
    Definition Classes
    Parsers
  12. case class ~[+a, +b] extends Product with Serializable

    Permalink
    Definition Classes
    Parsers

Abstract Value Members

  1. abstract val endOfLineCommentBegin: String

    Permalink

    String literal starting end-of-line comments.

  2. abstract val multilineCommentBegin: String

    Permalink

    String literal starting a multi-line comment.

  3. abstract val multilineCommentEnd: String

    Permalink

    String literal closing a multi-line comment.

  4. abstract val specialCommentBegin: String

    Permalink

    String literal starting a multi-line special comment block opening ( must be a one character extension of the multiline comment start ).

  5. abstract val specialCommentContents: Parser[Any]

    Permalink

    Parser for the contents of an annotation block (user defined).

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object NoSuccess

    Permalink
    Definition Classes
    Parsers
  5. def OnceParser[T](f: (Input) ⇒ ParseResult[T]): Parser[T] with OnceParser[T]

    Permalink
    Definition Classes
    Parsers
  6. def Parser[T](f: (Input) ⇒ ParseResult[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  7. def accept[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    Permalink
    Definition Classes
    Parsers
  8. def accept[ES](es: ES)(implicit arg0: (ES) ⇒ List[Elem]): Parser[List[Elem]]

    Permalink
    Definition Classes
    Parsers
  9. implicit def accept(e: Elem): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  10. def acceptIf(p: (Elem) ⇒ Boolean)(err: (Elem) ⇒ String): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  11. def acceptMatch[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    Permalink
    Definition Classes
    Parsers
  12. def acceptSeq[ES](es: ES)(implicit arg0: (ES) ⇒ Iterable[Elem]): Parser[List[Elem]]

    Permalink
    Definition Classes
    Parsers
  13. def any: PackratParser[Char]

    Permalink

    A parser that matches any element, failing if the end of input is reached.

    A parser that matches any element, failing if the end of input is reached.

    Definition Classes
    RegexPackratParser
  14. lazy val anyButEOL: PackratParser[Any]

    Permalink

    Matches everything except end of line.

  15. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  16. def chainl1[T, U](first: ⇒ Parser[T], p: ⇒ Parser[U], q: ⇒ Parser[(T, U) ⇒ T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  17. def chainl1[T](p: ⇒ Parser[T], q: ⇒ Parser[(T, T) ⇒ T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  18. def chainr1[T, U](p: ⇒ Parser[T], q: ⇒ Parser[(T, U) ⇒ U], combine: (T, U) ⇒ U, first: U): Parser[U]

    Permalink
    Definition Classes
    Parsers
  19. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. lazy val comment: Parser[Any]

    Permalink

    Any comment.

  21. def commit[T](p: ⇒ Parser[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  22. implicit def constToTupleFunction2[A, B, R](r: (A, B) ⇒ R): (~[A, B]) ⇒ R

    Permalink

    Convenience conversion to allow arity two functions to be used directly in tree construction actions.

    Convenience conversion to allow arity two functions to be used directly in tree construction actions.

    Definition Classes
    RegexPackratParser
  23. implicit def constToTupleFunction3[A, B, C, R](r: (A, B, C) ⇒ R): (~[~[A, B], C]) ⇒ R

    Permalink

    Convenience conversion to allow arity three functions to be used directly in tree construction actions.

    Convenience conversion to allow arity three functions to be used directly in tree construction actions.

    Definition Classes
    RegexPackratParser
  24. implicit def constToTupleFunction4[A, B, C, D, R](r: (A, B, C, D) ⇒ R): (~[~[~[A, B], C], D]) ⇒ R

    Permalink

    Convenience conversion to allow arity four functions to be used directly in tree construction actions.

    Convenience conversion to allow arity four functions to be used directly in tree construction actions.

    Definition Classes
    RegexPackratParser
  25. implicit def constToTupleFunction5[A, B, C, D, E, R](r: (A, B, C, D, E) ⇒ R): (~[~[~[~[A, B], C], D], E]) ⇒ R

    Permalink

    Convenience conversion to allow arity five functions to be used directly in tree construction actions.

    Convenience conversion to allow arity five functions to be used directly in tree construction actions.

    Definition Classes
    RegexPackratParser
  26. implicit def constToTupleFunction6[A, B, C, D, E, F, R](r: (A, B, C, D, E, F) ⇒ R): (~[~[~[~[~[A, B], C], D], E], F]) ⇒ R

    Permalink

    Convenience conversion to allow arity six functions to be used directly in tree construction actions.

    Convenience conversion to allow arity six functions to be used directly in tree construction actions.

    Definition Classes
    RegexPackratParser
  27. lazy val constrainedInt: PackratParser[Int]

    Permalink

    Parse digit strings that are constrained to fit into an Int value.

    Parse digit strings that are constrained to fit into an Int value. If the digit string is too big, a parse error results.

    Definition Classes
    RegexPackratParser
  28. def elem(e: Elem): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  29. def elem(kind: String, p: (Elem) ⇒ Boolean): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  30. lazy val endOfLineComment: PackratParser[Any]

    Permalink

    End of line comments.

  31. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  32. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  33. def err(msg: String): Parser[Nothing]

    Permalink

    Return an error after skipping white space.

    Return an error after skipping white space.

    Definition Classes
    RegexPackratParser → Parsers
  34. def failure(msg: String): Parser[Nothing]

    Permalink

    Return a failure after skipping white space.

    Return a failure after skipping white space.

    Definition Classes
    RegexPackratParser → Parsers
  35. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  36. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  37. def guard[T](p: ⇒ Parser[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  38. def handleWhiteSpace(in: Input): Int

    Permalink

    Version of handleWhiteSpace that accepts an Input value rather than separate source and offset.

    Version of handleWhiteSpace that accepts an Input value rather than separate source and offset. By default, just delegates to the handleWhiteSpace of RegexParsers.

    Definition Classes
    RegexPackratParser
  39. def handleWhiteSpace(source: CharSequence, offset: Int): Int

    Permalink
    Attributes
    protected
    Definition Classes
    RegexParsers
  40. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  41. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  42. def keywords(ext: Regex, kws: List[String]): Parser[String]

    Permalink

    Parser for keywords.

    Parser for keywords. The list of string arguments gives the text of the keywords in a language. The regular expression gives the possible extension of the keyword to stop the keyword being seen as an identifier instead. For example, the keyword list might contain "begin" and "end" and the extension regular expression might be [^a-zA-Z0-9]. Thus, begin followed by something other than a letter or digit is a keyword, but beginfoo8 is an identifier. This parser succeeds if any of the keywords is present, provided that it's not immediately followed by something that extends it.

    Definition Classes
    RegexPackratParser
  43. implicit def literal(s: String): Parser[String]

    Permalink

    A parser that matches a literal string after skipping any whitespace that is parsed by whitespaceParser.

    A parser that matches a literal string after skipping any whitespace that is parsed by whitespaceParser.

    Definition Classes
    RegexPackratWhitespaceParser → RegexParsers
  44. def log[T](p: ⇒ Parser[T])(name: String): Parser[T]

    Permalink
    Definition Classes
    Parsers
  45. def memo[T](p: Parser[T]): PackratParser[T]

    Permalink
    Definition Classes
    PackratParsers
  46. def mkList[T]: (~[T, List[T]]) ⇒ List[T]

    Permalink
    Definition Classes
    Parsers
  47. lazy val multilineComment: PackratParser[Any]

    Permalink

    Nested multiline comments.

  48. lazy val multilineCommentStart: PackratParser[Any]

    Permalink

    Multiline comment start delimiter.

  49. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  50. def not[T](p: ⇒ Parser[T]): Parser[Unit]

    Permalink
    Definition Classes
    Parsers
  51. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  52. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  53. def opt[T](p: ⇒ Parser[T]): Parser[Option[T]]

    Permalink
    Definition Classes
    Parsers
  54. def parse[T](p: Parser[T], in: Reader): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  55. def parse[T](p: Parser[T], in: CharSequence): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  56. def parse[T](p: Parser[T], in: Reader[Char]): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  57. def parseAll[T](p: Parser[T], in: CharSequence): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  58. def parseAll[T](p: Parser[T], in: Reader): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  59. def parseAll[T](p: Parser[T], in: Reader[Char]): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  60. implicit def parseResultToTuple2[A, B](p: Parser[~[A, B]]): PackratParser[(A, B)]

    Permalink

    Convenience conversion to lift parsers that return 2-tilde-tuples to parsers that return regular 2-tuples.

    Convenience conversion to lift parsers that return 2-tilde-tuples to parsers that return regular 2-tuples.

    Definition Classes
    RegexPackratParser
  61. implicit def parseResultToTuple3[A, B, C](p: Parser[~[~[A, B], C]]): PackratParser[(A, B, C)]

    Permalink

    Convenience conversion to lift parsers that return 3-tilde-tuples to parsers that return regular 3-tuples.

    Convenience conversion to lift parsers that return 3-tilde-tuples to parsers that return regular 3-tuples.

    Definition Classes
    RegexPackratParser
  62. implicit def parseResultToTuple4[A, B, C, D](p: Parser[~[~[~[A, B], C], D]]): PackratParser[(A, B, C, D)]

    Permalink

    Convenience conversion to lift parsers that return 4-tilde-tuples to parsers that return regular 4-tuples.

    Convenience conversion to lift parsers that return 4-tilde-tuples to parsers that return regular 4-tuples.

    Definition Classes
    RegexPackratParser
  63. implicit def parseResultToTuple5[A, B, C, D, E](p: Parser[~[~[~[~[A, B], C], D], E]]): PackratParser[(A, B, C, D, E)]

    Permalink

    Convenience conversion to lift parsers that return 5-tilde-tuples to parsers that return regular 5-tuples.

    Convenience conversion to lift parsers that return 5-tilde-tuples to parsers that return regular 5-tuples.

    Definition Classes
    RegexPackratParser
  64. implicit def parseResultToTuple6[A, B, C, D, E, F](p: Parser[~[~[~[~[~[A, B], C], D], E], F]]): PackratParser[(A, B, C, D, E, F)]

    Permalink

    Convenience conversion to lift parsers that return 6-tilde-tuples to parsers that return regular 6-tuples.

    Convenience conversion to lift parsers that return 6-tilde-tuples to parsers that return regular 6-tuples.

    Definition Classes
    RegexPackratParser
  65. def parseString[T](parser: Parser[T], str: String): Either[T, String]

    Permalink

    Use parser to parse the string str.

    Use parser to parse the string str. If the parse is sucessful and produces the value t, return Left ( t ). Otherwise, return Right ( msg ) where msg is the mesage produced by the parser.

    Definition Classes
    RegexPackratParser
  66. def parseWhitespace(in: Input): ParseResult[Any]

    Permalink

    If we are parsing whitespace already, fail if we are the end of the input, otherwise succeed with no progress.

    If we are parsing whitespace already, fail if we are the end of the input, otherwise succeed with no progress. If we are not already parsing whitespace, then apply the whitespace parser, swallowing any errors from it unless they occur at the end of the input. In other words, an error not at the end is treated as the absence of whitespace.

    Attributes
    protected
    Definition Classes
    RegexPackratWhitespaceParser
  67. implicit def parser2packrat[T](p: ⇒ Parser[T]): PackratParser[T]

    Permalink
    Definition Classes
    PackratParsers
  68. var parsingWhitespace: Boolean

    Permalink

    Are we currently parsing whitespace?

    Are we currently parsing whitespace?

    Attributes
    protected
    Definition Classes
    RegexPackratWhitespaceParser
  69. def phrase[T](p: Parser[T]): PackratParser[T]

    Permalink
    Definition Classes
    PackratParsers → Parsers
  70. def positioned[T <: Positional](p: ⇒ Parser[T]): Parser[T]

    Permalink

    As for positioned in RegexParsers, but uses parseWhitespace to skip whitespace.

    As for positioned in RegexParsers, but uses parseWhitespace to skip whitespace.

    Definition Classes
    RegexPackratWhitespaceParser → RegexParsers → Parsers
  71. implicit def regex(r: Regex): Parser[String]

    Permalink

    A parser that matches a regex string after skipping any whitespace that is parsed by whitespaceParser.

    A parser that matches a regex string after skipping any whitespace that is parsed by whitespaceParser.

    Definition Classes
    RegexPackratWhitespaceParser → RegexParsers
  72. def regexnows(r: Regex): Parser[String]

    Permalink

    Create a parser that matches a regex string, but doesn't skip whitespace first.

    Create a parser that matches a regex string, but doesn't skip whitespace first. This operation is useful if you want to recognise parts of a lexical symbol with different regular expressions so you can use the parts separately. Otherwise you have to parse with one regex and then split the resulting string to get at its parts. Based on RegexParser.regex in the Scala library.

    Definition Classes
    RegexPackratParser
  73. def rep[T](p: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  74. def rep1[T](first: ⇒ Parser[T], p0: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The p0 call-by-name arguments is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.

  75. def rep1[T](p: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  76. def rep1sep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  77. def repN[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  78. def repsep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  79. def result[T](v: ⇒ T): Parser[T]

    Permalink

    Construct a parser that always succeeds and returns value v.

    Construct a parser that always succeeds and returns value v. See also the success combinator in the Scala library that does something similar but always returns the same value each time since the parameter is not passed by name.

    Definition Classes
    RegexPackratParser
  80. def skipWhitespace: Boolean

    Permalink
    Definition Classes
    RegexPackratWhitespaceParser → RegexParsers
  81. lazy val specialComment: PackratParser[Any]

    Permalink

    Annotation blocks with user defined contents.

  82. def stringToInt(s: String): Either[Int, String]

    Permalink

    Convert the digit string s to an Int if it's in range, but return an error message if it's too big.

    Convert the digit string s to an Int if it's in range, but return an error message if it's too big.

    Definition Classes
    RegexPackratParser
  83. def success[T](v: T): Parser[T]

    Permalink
    Definition Classes
    Parsers
  84. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  85. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  86. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  87. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  88. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  89. val whiteSpace: Regex

    Permalink
    Attributes
    protected
    Definition Classes
    RegexParsers
  90. lazy val whitespaceParser: PackratParser[Any]

    Permalink

    The whitespace parser, swallows both true whitespace and comments.

    The whitespace parser, swallows both true whitespace and comments.

    Definition Classes
    NestedCommentParserRegexPackratWhitespaceParser
  91. def wrap[T, U](p: ⇒ Parser[T], f: (T) ⇒ Either[U, String]): Parser[U]

    Permalink

    Wrap a parser p that produces a value of type T to produce a parser returning values of type U.

    Wrap a parser p that produces a value of type T to produce a parser returning values of type U. Whitespace is skipped ( if we are skipping white space ) before p is applied, so that we have access to the first non-whitespace position.

    The function f is responsible for converting the T value into either a U value or a string that indicates what went wrong. In the latter case, the resulting parser will error at the original position with the message, ignoring any other errors at that position. Failures or errors of p will be lifted to the returned type.

    Definition Classes
    RegexPackratParser

Inherited from RegexPackratParser

Inherited from PackratParsers

Inherited from RegexParsers

Inherited from Parsers

Inherited from AnyRef

Inherited from Any

Ungrouped