You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I started with the examples/simple-expr-parser.cpp and I am wondering if it would be possible to retrieve from the parser p a type, or some other data, to inspect (or derive from it, if needed) the AST associated to an expression.
For example, when either running the program ./simple-expr-parser '3*(1-5)' or writing code p.parse(cstring_buffer("3*(1-5)") is there somewhere, even if internal, something like o_mul<<number<3>, o_minus<number<1>, number<5>>>?
Thank you very much in advance for any help!
The text was updated successfully, but these errors were encountered:
Sure. Take a look at a json parser example. I creates standard containers (like std::map, std::vector, std::string), however I'm sure you can create whatever else you like.
If you want AST to be constexpr, it is a bit more difficult, I do this in ctjs example (creates constexpr json representation)
Hi, I started with the
examples/simple-expr-parser.cpp
and I am wondering if it would be possible to retrieve from theparser p
a type, or some other data, to inspect (or derive from it, if needed) the AST associated to an expression.For example, when either running the program
./simple-expr-parser '3*(1-5)'
or writing codep.parse(cstring_buffer("3*(1-5)")
is there somewhere, even if internal, something likeo_mul<<number<3>, o_minus<number<1>, number<5>>>
?Thank you very much in advance for any help!
The text was updated successfully, but these errors were encountered: