com.opendatagroup.hadrian

ast

package ast

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ast
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait Argument extends Ast

    Trait for all function arguments, which can be expressions or function references.

  2. trait ArgumentContext extends AstContext

    Subtrait for context classes of Argument.

  3. case class ArrayIndex(i: TaskResult, t: AvroType) extends PathIndex with Product with Serializable

    Array indexes, which are concrete PathIndex elements that dereference arrays (expressions of int type).

  4. trait Ast extends AnyRef

    Abstract base class for a PFA abstract syntax tree.

  5. trait AstContext extends AnyRef

    Trait for Ast context classes.

  6. case class AttrGet(expr: Expression, path: Seq[Expression], pos: Option[String] = scala.None) extends Expression with HasPath with Product with Serializable

    Abstract syntax tree for an attr array, map, record extraction.

  7. case class AttrTo(expr: Expression, path: Seq[Expression], to: Argument, pos: Option[String] = scala.None) extends Expression with HasPath with Product with Serializable

    Abstract syntax tree for an attr-to update.

  8. case class Call(name: String, args: Seq[Argument], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a function call.

  9. case class CallUserFcn(name: Expression, args: Seq[Expression], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for calling a user-defined function; choice of function determined at runtime.

  10. case class CastBlock(expr: Expression, castCases: Seq[CastCase], partial: Boolean, pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a cast-case block.

  11. case class CastCase(avroPlaceholder: AvroPlaceholder, named: String, body: Seq[Expression], pos: Option[String] = scala.None) extends Ast with Product with Serializable

    Abstract syntax tree for one case of a cast-case block.

  12. case class Cell(avroPlaceholder: AvroPlaceholder, init: CellSource, shared: Boolean, rollback: Boolean, source: CellPoolSource, pos: Option[String] = scala.None) extends Ast with Product with Serializable

    Abstract syntax tree for a cell definition.

  13. case class CellGet(cell: String, path: Seq[Expression], pos: Option[String] = scala.None) extends Expression with HasPath with Product with Serializable

    Abstract syntax tree for a cell reference or extraction.

  14. trait CellSource extends AnyRef

  15. case class CellTo(cell: String, path: Seq[Expression], to: Argument, pos: Option[String] = scala.None) extends Expression with HasPath with Product with Serializable

    Abstract syntax tree for a cell-to update.

  16. case class Cond(ifthens: Seq[If], elseClause: Option[Seq[Expression]], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a cond branch.

  17. trait DirectJsonToData extends AnyRef

    Interpreter for cell or pool data in a JSON file outside of the original PFA document.

  18. case class Do(body: Seq[Expression], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a do block.

  19. case class DoUntil(body: Seq[Expression], predicate: Expression, pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a do-until post-test loop.

  20. case class Doc(comment: String, pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for inline documentation.

  21. case class EmbeddedJsonDomCellSource(jsonDom: JsonDom, avroPlaceholder: AvroPlaceholder) extends CellSource with Product with Serializable

    Source for cell data embedded in the original PFA document.

  22. case class EmbeddedJsonDomPoolSource(jsonDoms: Map[String, JsonDom], avroPlaceholder: AvroPlaceholder) extends PoolSource with Product with Serializable

    Source for pool data embedded in the original PFA document.

  23. case class EmitFcn(outputType: AvroType) extends Fcn with Product with Serializable

    The special emit function.

  24. case class EngineConfig(name: String, method: Method, inputPlaceholder: AvroPlaceholder, outputPlaceholder: AvroPlaceholder, begin: Seq[Expression], action: Seq[Expression], end: Seq[Expression], fcns: Map[String, FcnDef], zero: Option[String], merge: Option[Seq[Expression]], cells: Map[String, Cell], pools: Map[String, Pool], randseed: Option[Long], doc: Option[String], version: Option[Int], metadata: Map[String, String], options: Map[String, JsonNode], pos: Option[String] = scala.None) extends Ast with Product with Serializable

    Abstract syntax tree for a whole PFA document.

  25. case class Error(message: String, code: Option[Int], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a user-defined error.

  26. trait Expression extends Argument

    Trait for all PFA expressions, which resolve to Avro-typed values.

  27. trait ExpressionContext extends ArgumentContext

    Subtrait for context classes of Expression.

  28. case class ExternalAvroCellSource(url: URL, avroPlaceholder: AvroPlaceholder) extends CellSource with Product with Serializable

    Source for cell data in an Avro file outside of the original PFA document.

  29. case class ExternalAvroPoolSource(url: URL, avroPlaceholder: AvroPlaceholder) extends PoolSource with Product with Serializable

    Source for pool data in an Avro file outside of the original PFA document.

  30. case class ExternalJsonCellSource(url: URL, avroPlaceholder: AvroPlaceholder) extends CellSource with DirectJsonToData with Product with Serializable

    Source for cell data in a JSON file outside of the original PFA document.

  31. case class ExternalJsonPoolSource(url: URL, avroPlaceholder: AvroPlaceholder) extends PoolSource with DirectJsonToData with Product with Serializable

    Source for pool data in a JSON file outside of the original PFA document.

  32. trait Fcn extends AnyRef

    Trait for a function in PFA: could be a library function, user-defined function, or emit.

  33. trait FcnContext extends ArgumentContext

    Subtrait for context classes of FcnDef.

  34. case class FcnDef(paramsPlaceholder: Seq[(String, AvroPlaceholder)], retPlaceholder: AvroPlaceholder, body: Seq[Expression], pos: Option[String] = scala.None) extends Argument with Product with Serializable

    Abstract syntax tree for a fucntion definition.

  35. case class FcnRef(name: String, pos: Option[String] = scala.None) extends Argument with Product with Serializable

    Abstract syntax tree for a function reference.

  36. case class FcnRefFill(name: String, fill: Map[String, Argument], pos: Option[String] = scala.None) extends Argument with Product with Serializable

    Abstract syntax tree for a function reference with partial application.

  37. case class For(init: Map[String, Expression], predicate: Expression, step: Map[String, Expression], body: Seq[Expression], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a for loop.

  38. case class Foreach(name: String, array: Expression, body: Seq[Expression], seq: Boolean, pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a foreach loop.

  39. case class Forkeyval(forkey: String, forval: String, map: Expression, body: Seq[Expression], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for forkey-forval loops.

  40. case class FunctionTable(functions: Map[String, Fcn]) extends Product with Serializable

    Represents a table of all accessible PFA function names, such as library functions, user-defined functions, and possibly emit.

  41. trait HasPath extends AnyRef

    Mixin for Ast classes taht have paths (attr, cell, pool).

  42. case class If(predicate: Expression, thenClause: Seq[Expression], elseClause: Option[Seq[Expression]], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for an if branch.

  43. case class IfNotNull(exprs: Map[String, Expression], thenClause: Seq[Expression], elseClause: Option[Seq[Expression]], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for an ifnotnull block.

  44. case class Let(values: Map[String, Expression], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a let variable declaration.

  45. trait LibFcn extends Fcn

    Trait for a library function in PFA.

  46. case class Literal(avroPlaceholder: AvroPlaceholder, value: String, pos: Option[String] = scala.None) extends LiteralValue with Product with Serializable

    Abstract syntax tree for an arbitrary literal value.

  47. case class LiteralBase64(value: Array[Byte], pos: Option[String] = scala.None) extends LiteralValue with Product with Serializable

    Abstract syntax tree for a literal base-64 encoded binary.

  48. case class LiteralBoolean(value: Boolean, pos: Option[String] = scala.None) extends LiteralValue with Product with Serializable

    Abstract syntax tree for a literal true or false.

  49. case class LiteralDouble(value: Double, pos: Option[String] = scala.None) extends LiteralValue with Product with Serializable

    Abstract syntax tree for a literal double.

  50. case class LiteralFloat(value: Float, pos: Option[String] = scala.None) extends LiteralValue with Product with Serializable

    Abstract syntax tree for a literal float.

  51. case class LiteralInt(value: Int, pos: Option[String] = scala.None) extends LiteralValue with Product with Serializable

    Abstract syntax tree for a literal integer.

  52. case class LiteralLong(value: Long, pos: Option[String] = scala.None) extends LiteralValue with Product with Serializable

    Abstract syntax tree for a literal long.

  53. case class LiteralNull(pos: Option[String] = scala.None) extends LiteralValue with Product with Serializable

    Abstract syntax tree for a literal null.

  54. case class LiteralString(value: String, pos: Option[String] = scala.None) extends LiteralValue with Product with Serializable

    Abstract syntax tree for a literal string.

  55. trait LiteralValue extends Expression

    Trait for all PFA literal values, which are known constants at compile-time.

  56. case class Log(exprs: Seq[Expression], namespace: Option[String], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for log messages.

  57. case class MapIndex(k: TaskResult, t: AvroType) extends PathIndex with Product with Serializable

    Map indexes, which are concrete PathIndex elements that dereference maps (expressions of string type).

  58. case class NewArray(items: Seq[Expression], avroPlaceholder: AvroPlaceholder, pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a new array expression.

  59. case class NewObject(fields: Map[String, Expression], avroPlaceholder: AvroPlaceholder, pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a new map or record expression.

  60. case class Pack(exprs: Seq[(String, Expression)], pos: Option[String]) extends Expression with Product with Serializable

    Abstract syntax tree for a pack construct.

  61. trait PathIndex extends AnyRef

    Trait for path index elements, which can be used in attr, cell, and pool path arrays.

  62. case class Pool(avroPlaceholder: AvroPlaceholder, init: PoolSource, shared: Boolean, rollback: Boolean, source: CellPoolSource, pos: Option[String] = scala.None) extends Ast with Product with Serializable

    Abstract syntax tree for a pool definition.

  63. case class PoolDel(pool: String, del: Expression, pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a pool-del removal.

  64. case class PoolGet(pool: String, path: Seq[Expression], pos: Option[String] = scala.None) extends Expression with HasPath with Product with Serializable

    Abstract syntax tree for a pool reference or extraction.

  65. trait PoolSource extends AnyRef

  66. case class PoolTo(pool: String, path: Seq[Expression], to: Argument, init: Expression, pos: Option[String] = scala.None) extends Expression with HasPath with Product with Serializable

    Abstract syntax tree for a pool-to update.

  67. case class RecordIndex(f: String, t: AvroType) extends PathIndex with Product with Serializable

    Record indexes, which are concrete PathIndex elements that dereference records (literal string expressions).

  68. case class Ref(name: String, pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a variable (symbol) reference.

  69. case class SetVar(values: Map[String, Expression], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a set variable update.

  70. case class SymbolTable(parent: Option[SymbolTable], symbols: Map[String, AvroType], cells: Map[String, Cell], pools: Map[String, Pool], sealedAbove: Boolean, sealedWithin: Boolean) extends Product with Serializable

    Represents the symbols (variables) and their data types in a lexical scope.

  71. trait Task extends (AstContext, EngineOptions, Option[Type]) ⇒ TaskResult

    Trait for a generic task, passed to Ast walk.

  72. trait TaskResult extends AnyRef

    Trait for result of a generic task, passed to Ast walk.

  73. case class Try(exprs: Seq[Expression], filter: Option[Seq[Either[String, Int]]], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a try form.

  74. case class Unpack(bytes: Expression, format: Seq[(String, String)], thenClause: Seq[Expression], elseClause: Option[Seq[Expression]], pos: Option[String]) extends Expression with Product with Serializable

    Abstract syntax tree for the unpack construct.

  75. case class Upcast(expr: Expression, avroPlaceholder: AvroPlaceholder, pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for an upcast.

  76. case class UserFcn(name: String, sig: Sig) extends Fcn with Product with Serializable

    Represents a user-defined function.

  77. case class While(predicate: Expression, body: Seq[Expression], pos: Option[String] = scala.None) extends Expression with Product with Serializable

    Abstract syntax tree for a while loop.

Value Members

  1. object AttrGet extends Serializable

  2. object AttrTo extends Serializable

  3. object BinaryFormatter

    Helper object for pack and unpack that checks format strings.

  4. object Call extends Serializable

  5. object CallUserFcn extends Serializable

  6. object CastBlock extends Serializable

  7. object CastCase extends Serializable

  8. object Cell extends Serializable

  9. object CellGet extends Serializable

  10. object CellPoolSource extends Enumeration

    Source methods for cells and pools.

  11. object CellTo extends Serializable

  12. object Cond extends Serializable

  13. object Do extends Serializable

  14. object DoUntil extends Serializable

  15. object Doc extends Serializable

  16. object EngineConfig extends Serializable

  17. object Error extends Serializable

  18. object FcnDef extends Serializable

  19. object FcnRef extends Serializable

  20. object FcnRefFill extends Serializable

  21. object For extends Serializable

  22. object Foreach extends Serializable

  23. object Forkeyval extends Serializable

  24. object FunctionTable extends Serializable

  25. object If extends Serializable

  26. object IfNotNull extends Serializable

  27. object Let extends Serializable

  28. object Literal extends Serializable

  29. object LiteralBase64 extends Serializable

  30. object LiteralBoolean extends Serializable

  31. object LiteralDouble extends Serializable

  32. object LiteralFloat extends Serializable

  33. object LiteralInt extends Serializable

  34. object LiteralLong extends Serializable

  35. object LiteralNull extends Serializable

  36. object LiteralString extends Serializable

  37. object Log extends Serializable

  38. object Method extends Enumeration

    PFA execution method may be "map", "emit", or "fold".

  39. object NewArray extends Serializable

  40. object NewObject extends Serializable

  41. object NoTask extends Task

    Concrete Task that does nothing, used for type-checking without producing an engine.

  42. object Pack extends Serializable

  43. object Pool extends Serializable

  44. object PoolDel extends Serializable

  45. object PoolGet extends Serializable

  46. object PoolTo extends Serializable

  47. object Ref extends Serializable

  48. object SetVar extends Serializable

  49. object SymbolTable extends Serializable

  50. object Try extends Serializable

  51. object Unpack extends Serializable

  52. object Upcast extends Serializable

  53. object UserFcn extends Serializable

  54. object While extends Serializable

  55. def inferType(expr: Expression, symbols: Map[String, AvroType] = Map[String, AvroType](), cells: Map[String, Cell] = Map[String, Cell](), pools: Map[String, Pool] = Map[String, Pool](), fcns: Map[String, UserFcn] = Map[String, UserFcn](), version: PFAVersion = PFAVersion(0, 0, 0)): AvroType

    Utility function to infer the type of a given expression.

    Utility function to infer the type of a given expression.

    expr

    expression to examine

    symbols

    data types of variables used in the expression

    cells

    data types of cells used in the expression

    pools

    data types of pools used in the expression

    fcns

    functions used in the expression

    returns

    data type of the expression's return value

  56. object validFunctionName extends (String) ⇒ Boolean

    Determine if a function name is valid.

  57. object validSymbolName extends (String) ⇒ Boolean

    Determine if a symbol name is valid.

Inherited from AnyRef

Inherited from Any

Ungrouped