Boost logo

Boost Users :

Subject: Re: [Boost-users] How to implement a visitor pattern over an AST
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2018-12-19 00:40:42


On Tue, Dec 18, 2018 at 6:02 PM Nat Goodspeed via Boost-users
<boost-users_at_[hidden]> wrote:
>
> On Mon, Dec 10, 2018 at 3:15 PM Michael Powell via Boost-users <boost-users_at_[hidden]> wrote:
>
>> And so on... Which also guarantees that I am also walking both tree's
>> at the same moment and in like fashion.
>
>
> For comparison, you might consider the use of Boost.Coroutine to allow you to interleave recursive steps through your two trees:
> https://www.youtube.com/watch?v=3SvkWY7JSeY
> (originally discussed here:)
> https://groups.google.com/forum/#!msg/boost-list/AZQgtk6jMho/fIFowJ72AgAJ

That's an interesting idea, but I'm afraid it was my fault for not
communicating that clearly enough. There is little (if any) similarity
between "nodes" in my tree/graph, apart from thin slices, like "has
name" or "has number", etc. Additionally, rather than an explicit
connection, "edge", the connectivity between AST nodes is implicit;
the existence of which via either boost::variant or std::vector
inclusion.

Along these lines. Appreciate the feedback, however.

> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net