Packages

object Lexer

Companion object of class Lexer which defines tokens and some utility concepts used for tokens and lexers

Source
Lexer.scala
Linear Supertypes
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Lexer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class Delim(char: Char) extends Token with Product with Serializable

    A subclass of Token representing single-character delimiters

    A subclass of Token representing single-character delimiters

    char

    the delimiter character making up this token

  2. case class FloatLit(str: String) extends Token with Product with Serializable

    A subclass of token representing floating point literals

  3. case class IntLit(str: String) extends Token with Product with Serializable

    A subclass of token representing integer literals

  4. class MalformedInput extends Exception

    An exception raised if an input does not correspond to what's expected

  5. case class StringLit(str: String) extends Token with Product with Serializable

    A subclass of token representing string literals

  6. class Token extends AnyRef

    The class of tokens, i.e.

    The class of tokens, i.e. descriptions of input words (or: lexemes).

Value Members

  1. val Colon: Delim

    The ':' token

  2. val Comma: Delim

    The ',' token

  3. val EOF: Token

    The token representing end of input

  4. val FalseLit: Token

    The false token

  5. val LBrace: Delim

    The '{' token

  6. val LBracket: Delim

    The '[' token

  7. val LParen: Delim

    The '(' token

  8. val NullLit: Token

    The null token

  9. val RBrace: Delim

    The '}' token

  10. val RBracket: Delim

    The ']' token

  11. val RParen: Delim

    The ')' token

  12. val TrueLit: Token

    The true token

  13. def quoted(str: String): String

    Returns given string enclosed in "-quotes with all string characters escaped so that they correspond to the JSON standard.

    Returns given string enclosed in "-quotes with all string characters escaped so that they correspond to the JSON standard. Characters that escaped are: ", \b, \f, \n, \r, \t, \. Furthermore, every other character which is not in the ASCII range 32-127 is escaped as a four hex-digit unicode character of the form \ u x x x x.

    str

    the string to be quoted