UnfoldedInc / deck.gl-native

C++ renderer for deck.gl

Home Page:https://deck.gl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSON styles: Expression parser

ibgreen opened this issue · comments

Integrate a parser for mathematical expressions

A good start is probably: https://github.com/ArashPartow/math-parser-benchmark-project

Background

deck.gl JSON styles support specifying expressions as strings:
. "getPosition": "@=[x,y,z]"

We need a C++ parser for expressions. Ideally it can return both:

  • an evaluation function for row wise application,
  • as well as an AST (abstract syntax tree) so that we can apply the expression on columns or on GPU.

We also need to align the syntax with the JS expression parser in the @deck.gl/json module, but we could potentially make changes on the JS side as well if it makes more sense.