Skip to content

Add expressions (derived attributes) to the model #231

@Stiivi

Description

@Stiivi

Add expression for measures and aggregates. Consider using Grako for the compiler.

Interface for the backends

Backends might implement their own arithmetic expression compiler as an object with the following methods:

  • compile_literal(literal) – compile a literal object – string, integer. Should return a literal expression object that will be further passed to this compiler.
  • compile_operator(operator, left, right) – compile a binary operator. Left/right are expressions generated by this compiler.
  • compile_unary(operator, operand) – compile an unary operator. Operand is an expression compiled by this compiler.
  • compile_function(func, args) – compile a function with arguments. Args are expressions compiled by this compiler.
  • compile_variable(name) – compile identifier/variable/named constant. Name is a string.

The functions should return a compiled expression that might be passed as an argument.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions