Object

com.github.kmizu.macro_peg

Ast

Related Doc: package macro_peg

Permalink

object Ast

This object provides types representing ASTs of extended PEG. It is used as namespace.

Source
Ast.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Ast
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type ==>[-A, +B] = PartialFunction[A, B]

    Permalink
  2. case class Alt(pos: Pos, lhs: Exp, rhs: Exp) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of ordered choice (e1 / e2).

    This class represents an AST of ordered choice (e1 / e2).

    pos

    position in source file

    lhs

    e1

    rhs

    e2

  3. case class AndPred(pos: Pos, body: Exp) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of and-predicate &(e).

    This class represents an AST of and-predicate &(e).

    pos

    position in source file

    body

    e

  4. case class Call(pos: Pos, name: Symbol, args: List[Exp]) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of rule calls.

    This class represents an AST of rule calls.

    pos

    position in source file

    name

    the name of identifier

  5. case class CharClass(pos: Pos, positive: Boolean, elems: List[CharClassElement]) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of character class [...].

    This class represents an AST of character class [...].

    pos

    position in source file

    elems

    the list of element constituting character class.

  6. sealed trait CharClassElement extends AnyRef

    Permalink

    This trait represents common super-type of element in character class.

  7. case class CharRange(from: Char, to: Char) extends CharClassElement with Product with Serializable

    Permalink

    An element of character class representing characters in this range.

    An element of character class representing characters in this range.

    from

    start of the range

    to

    end of the range

  8. case class CharSet(pos: Pos, positive: Boolean, elems: Set[Char]) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of character set, which is created from CharSet.

  9. case class Debug(pos: Pos, body: Exp) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of Debug(e)

    This class represents an AST of Debug(e)

    pos

    pos position in source file

    body

    e

  10. sealed trait Exp extends HasPosition

    Permalink

    This trait represents common super-type of parsing expression AST.

  11. case class Fun(pos: Pos, args: List[Symbol], body: Exp) extends Exp with Product with Serializable

    Permalink
  12. case class Grammar(pos: Pos, rules: List[Rule]) extends HasPosition with Product with Serializable

    Permalink

    This class represents an AST of PEG grammar.

    This class represents an AST of PEG grammar.

    pos

    position in source file

    rules

    the list of rules constituting PEG grammar

  13. trait HasPosition extends AnyRef

    Permalink

    A trait for types that has position.

  14. case class Ident(pos: Pos, name: Symbol) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of identifier.

    This class represents an AST of identifier. An identifier is used as reference of nonterminal.

    pos

    position in source file

    name

    the name of identifier

  15. case class NotPred(pos: Pos, body: Exp) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of not-predicate !(e).

    This class represents an AST of not-predicate !(e).

    pos

    position in source file

    body

    e

  16. case class OneChar(ch: Char) extends CharClassElement with Product with Serializable

    Permalink

    An element of character class representing one character.

  17. case class Opt(pos: Pos, body: Exp) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of zero-or-one occurrence e?.

    This class represents an AST of zero-or-one occurrence e?.

    pos

    position in source file

    body

    e

  18. case class Pos(line: Int, column: Int) extends Product with Serializable

    Permalink

    This class represents position in a source file.

    This class represents position in a source file.

    line

    line number (0-origin)

    column

    column number (0-origin)

  19. case class Rep0(pos: Pos, body: Exp) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of repetition e*.

    This class represents an AST of repetition e*.

    pos

    position in source file

    body

    e

  20. case class Rep1(pos: Pos, body: Exp) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of one-or-more repetition e+.

    This class represents an AST of one-or-more repetition e+.

    pos

    position in source file

    body

    e

  21. case class Rule(pos: Pos, name: Symbol, body: Exp, args: List[Symbol] = Nil) extends HasPosition with Product with Serializable

    Permalink

    This class represents an AST of rule in PEG grammar.

    This class represents an AST of rule in PEG grammar.

    pos

    position in source file

    name

    the name of this rule. It is referred in body

    body

    the parsing expression which this rule represents

  22. case class RuleType(pos: Pos, paramTypes: List[Type], resultType: Type) extends Type with Product with Serializable

    Permalink
  23. case class Seq(pos: Pos, lhs: Exp, rhs: Exp) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of sequence (e1 e2).

    This class represents an AST of sequence (e1 e2).

    pos

    position in source file

    lhs

    e1

    rhs

    e2

  24. case class SimpleType(pos: Pos) extends Type with Product with Serializable

    Permalink
  25. case class Str(pos: Pos, target: String) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of string literal "...".

    This class represents an AST of string literal "...".

    pos

    position in source file

    target

    literal

  26. sealed abstract class Type extends AnyRef

    Permalink
  27. case class Wildcard(pos: Pos) extends Exp with Product with Serializable

    Permalink

    This class represents an AST of wild-card character ..

    This class represents an AST of wild-card character ..

    pos

    position in source file

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. val DUMMY_POS: Pos

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  16. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped