My application is a state machine with some local variables in each node, and time-outs for arcs as well, Having really enjoyed Shriram’s automaton compile-to-closures, I’ve started to get pretty complicated macros. I wonder if I would be better off compiling the automaton definition (fsm init
[init : (c -> more)]
[more : (a -> more)
(d -> more)
(r -> end)]
[end : ])
for example, to a class - which I could then add methods to so I could query the variables in a node, check time-remaining-in-node etc… I know all of this can be done with closures (and a dispatch method), but it seems a bit more straightforward to do it with explicit objects/methods.
Second questions - given that (above) type of definition, are macros emitting class defns the way to go, or parser-tools (lex/yacc) a better bet?
Again, thanks for the help…
@narek1110 has joined the channel
@greaser has joined the channel
@brown131 has joined the channel