We defined our own DSL for describing UIs which is JSON based.
{
"widget":
{
"type": "label",
"left": "30px",
...
}
}
We do not support any parent child relationships, therefor the max depth of this tree is 1.
My task is that I have to check whether all mandatory properties have been set, that there are no duplicate properties etc. and transform this document into valid qml.
Our first idea was to use Bison and flex but we ran into the problems that we have to determine the type and then check conditionally based on the type which properties need to be set. Since Bison is an LF(1) parser I highly doubt that this is possible without some hacking, correct?
Can somebody provide me with some keywords or ideas how to tackle this task? The solution should be based on C++.