I want to build kind of a “template string” for lay people (not that much) so they can receive an input (JSON) and create an output (also JSON) via web interface.
Template example:
Any tips on how to build this kind of “template string”? Regex? Finite state transducer?
k
karelpeeters
04/11/2019, 3:15 PM
That almost looks like a small programming language 😒imple_smile:. I'd tokenize it, actually parse it with recursive descent and then walk the tree to run it.
At least that's what I'd do if those expressions can get arbitrarily complicated.
You can also use a real scripting language instead, maybe embed python or Kotlin-script itself to run those pieces of code.