molecule.parsers

ascii

package ascii

Character buffer parsers

These parsers work for ASCII and ASCII compatible encodings, i.e. (1) the byte representation of a character corresponds with the ASCII value, or (2) the byte representation of a character is a single byte > 128, or (3) the byte representation of a character is multiple bytes, all > 128 (cfr UTF-8 for non-ASCII characters) As argument for these parsers though only pure ASCII characters should be used, but any type may appear in the ByteBuffer that is being parsed.

Visibility
  1. Public
  2. All

Type Members

  1. final class StringBuilder extends AnyRef

    An immutable class that creates a String by prepending character buffers

Value Members

  1. object StringBuilder extends AnyRef

  2. val anyChar: Parser[ByteBuffer, Char]

    Parser that accepts any ASCII character

    Parser that accepts any ASCII character

    Definition Classes
    package
  3. final def buffer(range: (Char, Char), ranges: (Char, Char)*): Parser[ByteBuffer, ByteBuffer]

    Parser from ByteBuffer to ByteBuffer.

    Parser from ByteBuffer to ByteBuffer. This parser will build a ByteBuffer accepting all bytes that fall in the specified ranges.

    Definition Classes
    package
    Annotations
    @inline()
  4. final def buffer(char: Char, cs: Char*): Parser[ByteBuffer, ByteBuffer]

    Parser from ByteBuffer to ByteBuffer.

    Parser from ByteBuffer to ByteBuffer. This parser will build a ByteBuffer accepting all specified chars.

    Definition Classes
    package
    Annotations
    @inline()
  5. final def bufferUntil(range: (Char, Char), ranges: (Char, Char)*): Parser[ByteBuffer, ByteBuffer]

    Parser from ByteBuffer to ByteBuffer.

    Parser from ByteBuffer to ByteBuffer. This parser will build a ByteBuffer until the received byte falls in one of the the specified ranges.

    Definition Classes
    package
    Annotations
    @inline()
  6. final def bufferUntil(c: Char, cs: Char*): Parser[ByteBuffer, ByteBuffer]

    Parser from ByteBuffer to ByteBuffer.

    Parser from ByteBuffer to ByteBuffer. This parser will build a ByteBuffer until byte c or any of bytes cs is found.

    Definition Classes
    package
    Annotations
    @inline()
  7. implicit def char(c: Char): Parser[ByteBuffer, Char]

    Parser that succeeds if it matches a single ascii character

    Parser that succeeds if it matches a single ascii character

    Definition Classes
    package
  8. def line(maxLength: Int): Parser[ByteBuffer, String]

    Parse a line.

    Parse a line. A line is a sequence of characters ending with either a carriage-return character ('\r') or a newline character ('\n'). In addition, a carriage-return character followed immediately by a newline character is * treated as a single end-of-line token.

    maxLength

    The maximum length of the line accepted by this parser.

    Definition Classes
    package