Object

com.github.kmizu.hopeg

Ast

Related Doc: package hopeg

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. sealed trait Exp extends HasPosition

    Permalink

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

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

    Permalink
  7. 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

  8. trait HasPosition extends AnyRef

    Permalink

    A trait for types that has position.

  9. 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

  10. 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

  11. 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

  12. 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)

  13. 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

  14. 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

  15. 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

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

    Permalink
  17. 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

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

    Permalink
  19. 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

  20. sealed abstract class Type extends AnyRef

    Permalink
  21. 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