From: Jomi H. <jom...@gm...> - 2024-01-11 17:21:40
|
> On 11 Jan 2024, at 09:57, Burak Karaduman <bbu...@gm...> wrote: > > Hi Jomi, > > Thank you so much for your help. It is what I needed, and It worked with a bit of modification. > > But, also I need help with parsing the logical context of a plan, I can access the plan's context but, specifically, it is needed to get the execution sequence such as: > > +!planA: ((((speed(60) & temp(40)) | humidity (13) ) | angle (125)) -> I assume this context is parsed and it gives an execution sequence based on the parentheses, operators and operands. yes! > > Is there a way to access that kind of stack or list mechanism? yes, but it is more like a tree (instead of a stack). You have to check the classes of the context, for instance, it could be LogExpr that represents “&” and “|”, RelExpr for “>” ... see classes at https://jason-lang.github.io/api/jason/asSyntax/package-summary.html. HTH, Jomi |