Re: [proto] So I heard proto make AST ...

2010-08-11 Thread Joel . Falcou
> This is kind of like Proto's evaluation contexts, IIUC. I'm not wild for > them because often just the tag isn't enough information to find the > right handler. But maybe it covers enough use cases and can be made > easier to use. Right now, proto has an "eval" function that takes an > expression

Re: [proto] So I heard proto make AST ...

2010-08-11 Thread Eric Niebler
On 8/11/2010 12:00 PM, joel falcou wrote: > On 11/08/10 17:52, Eric Niebler wrote: >> I don't exactly recall the details of Joel's technique. My experiments >> to separate transforms from grammars were largely unsuccessful because >> control flow often need pattern matching. I'd like to see alterna

Re: [proto] So I heard proto make AST ...

2010-08-11 Thread joel falcou
On 11/08/10 17:52, Eric Niebler wrote: I don't exactly recall the details of Joel's technique. My experiments to separate transforms from grammars were largely unsuccessful because control flow often need pattern matching. I'd like to see alternate designs. Mine was just a post-order traversa

Re: [proto] So I heard proto make AST ...

2010-08-11 Thread Eric Niebler
On 8/11/2010 3:53 AM, Thomas Heller wrote: > > Yeah, i already did some traversals. But you have to think everytime: > Did I make it right? Did I miss some rule in my DSEL grammar? IMHO, > the important difference between a proto transform and a proto > expression traversal is that the transform h

Re: [proto] So I heard proto make AST ...

2010-08-11 Thread joel falcou
On 11/08/10 09:53, Thomas Heller wrote: Joel Falcou showed a technique which, to some extend is able to deal with the no-repetition part. Fact is that I just play on the fact Transform X can be applied one xpression buitl on Grammar Z, Z and X being unrelated. We use that quite a lot in o

Re: [proto] So I heard proto make AST ...

2010-08-11 Thread Thomas Heller
On Wednesday 11 August 2010 00:45:44 Eric Niebler wrote: > On 8/10/2010 3:52 PM, Thomas Heller wrote: > > On Tue, Aug 10, 2010 at 8:56 PM, Eric Niebler wrote: > >> Good. Now if you are saying that Proto's existing transforms are > >> too low-level and that things like pre- and post-order traversals

Re: [proto] So I heard proto make AST ...

2010-08-10 Thread Eric Niebler
On 8/10/2010 3:52 PM, Thomas Heller wrote: > On Tue, Aug 10, 2010 at 8:56 PM, Eric Niebler wrote: >> Good. Now if you are saying that Proto's existing transforms are >> too low-level and that things like pre- and post-order traversals >> should be first class Proto citizens ... no argument. Patch

Re: [proto] So I heard proto make AST ...

2010-08-10 Thread Thomas Heller
On Tue, Aug 10, 2010 at 8:56 PM, Eric Niebler wrote: > On 8/10/2010 2:52 PM, joel.fal...@lri.fr wrote: >> Eric Niebler wrote: >>> A pre-order traversal, pushing each visited node into an mpl vector? How >>> about: > >> I'm on a tiny mobile, but my idéa was to have such algo as proto >> transforms

Re: [proto] So I heard proto make AST ...

2010-08-10 Thread Joel . Falcou
> Good. Now if you are saying that Proto's existing transforms are too > low-level and that things like pre- and post-order traversals should be > first class Proto citizens ... no argument. Patch? :- Yup exactly as soon as i haver a real kboard ___ pr

Re: [proto] So I heard proto make AST ...

2010-08-10 Thread Eric Niebler
On 8/10/2010 2:52 PM, joel.fal...@lri.fr wrote: > Eric Niebler wrote: >> A pre-order traversal, pushing each visited node into an mpl vector? How >> about: > I'm on a tiny mobile, but my idéa was to have such algo as proto > transforms & grammar Good. Now if you are saying that Proto's existing t

Re: [proto] So I heard proto make AST ...

2010-08-10 Thread Joel . Falcou
I'm on a tiny mobile, but my idéa was to have such algo as proto transforms & grammar > On 8/10/2010 4:48 AM, Gordon Woodhull wrote: >> Thanks Joel, >> >> This is food for thought! > > Indeed, but I'm struggling to keep up because I don't really know what > you guys are after. > >> On Aug 1

Re: [proto] So I heard proto make AST ...

2010-08-10 Thread Eric Niebler
On 8/10/2010 4:48 AM, Gordon Woodhull wrote: > Thanks Joel, > > This is food for thought! Indeed, but I'm struggling to keep up because I don't really know what you guys are after. > On Aug 10, 2010, at 2:47 AM, joel falcou wrote: >> On 10/08/10 05:24, Gordon Woodhull wrote: >>> >>> I wonder if

Re: [proto] So I heard proto make AST ...

2010-08-10 Thread Gordon Woodhull
Thanks Joel, This is food for thought! On Aug 10, 2010, at 2:47 AM, joel falcou wrote: On 10/08/10 05:24, Gordon Woodhull wrote: I wonder if Dan Marsden's Traversal library would solve this out of the box? http://boost-spirit.com/dl_docs/traversal/html/traversal/introduction.html Oh nice l

Re: [proto] So I heard proto make AST ...

2010-08-09 Thread joel falcou
On 10/08/10 05:24, Gordon Woodhull wrote: Sorry for the slow response - been on vacation offline. No problem ;) I wonder if Dan Marsden's Traversal library would solve this out of the box? http://boost-spirit.com/dl_docs/traversal/html/traversal/introduction.html Oh nice link, I didn't knew

Re: [proto] So I heard proto make AST ...

2010-08-09 Thread Gordon Woodhull
Hi Joel, Christophe, Eric, I think you should talk to Gordon Woodhull. He's building a metagraph >> (among others) library, which I am going to use in msm for >> compile-time calculations and fsm analysis. This means there will be >> temporarily a metagraph library inside msm as proof of conc

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread Eric Niebler
On 7/27/2010 9:59 AM, joel falcou wrote: > On 27/07/10 15:56, Alp Mestanogullari wrote: >> On Tue, Jul 27, 2010 at 3:25 PM, joel falcou wrote: >>> I do this in NT2 all the time IIRC I gave a link to some svn >>> repo with an example. It wasn't selected as core phoenix 3 though >>> :p >>> >> Yeah I

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread joel falcou
On 27/07/10 15:56, Alp Mestanogullari wrote: On Tue, Jul 27, 2010 at 3:25 PM, joel falcou wrote: I do this in NT2 all the time IIRC I gave a link to some svn repo with an example. It wasn't selected as core phoenix 3 though :p Yeah I remember discussing that code with you on IRC, and

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread Alp Mestanogullari
On Tue, Jul 27, 2010 at 3:25 PM, joel falcou wrote: > I do this in NT2 all the time IIRC I gave a link to some svn repo with an > example. > It wasn't selected as core phoenix 3 though :p Yeah I remember discussing that code with you on IRC, and this is an elegant and very "functional" approach,

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread Christophe Henry
>> I think you should talk to Gordon Woodhull. He's building a metagraph >> (among others) library, which I am going to use in msm for >> compile-time calculations and fsm analysis. This means there will be >> temporarily a metagraph library inside msm as proof of concept until >> there can be a re

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread joel falcou
On 27/07/10 15:21, Alp Mestanogullari wrote: Yeah definitely. They would just have to provide the node transform, and you would just forward it to the tree traversal metafunction. Quite straight for an extension mechanism! I do this in NT2 all the time IIRC I gave a link to some svn repo wi

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread Eric Niebler
On 7/27/2010 9:14 AM, joel falcou wrote: > On 27/07/10 15:08, Eric Niebler wrote: >> That would be awesome, Joel! >> > I'll count on you for helping me making those looking nice :p Uh, have you SEEN proto's code? > What's the easiest ? getting a proto-tree branch or what ? Svn branching suck

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread Alp Mestanogullari
On Tue, Jul 27, 2010 at 3:17 PM, Thomas Heller wrote: > Especially when thinking about phoenix3. People might find it easier to think > of tree traversals instead of proto transforms, grammars and such. > It is at least the case for me. Yeah definitely. They would just have to provide the node tr

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread joel falcou
On 27/07/10 15:15, Christophe Henry wrote I think you should talk to Gordon Woodhull. He's building a metagraph (among others) library, which I am going to use in msm for compile-time calculations and fsm analysis. This means there will be temporarily a metagraph library inside msm as proof of co

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread Thomas Heller
On Tuesday 27 July 2010 15:04:30 Alp Mestanogullari wrote: > On Tue, Jul 27, 2010 at 3:01 PM, joel falcou wrote: > > Do people think such stuff (maybe in proto::tree:: or smthg ?) be useful > > additions ? > > Definitely. We're dealing with a compile-time AST, but this is still > an AST and we of

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread joel falcou
On 27/07/10 15:08, Eric Niebler wrote: That would be awesome, Joel! WHat's the easiest in term of code ? I can bring up some git repo or shoudl I work in some svn branches of proto somewhere at boost ? ___ proto mailing list proto@lists.boost.o

[proto] So I heard proto make AST ...

2010-07-27 Thread Christophe Henry
>what about having some Tree related trasnform/function/meta-function then ? > >I'm often thinking : "dang, this transform is basically a BFS for a node >verifying meta-function foo<>" >and have to rewrite a BFS usign default_ and such, which is relatively easy. > >Now, sometimes it is "dang, this

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread joel falcou
On 27/07/10 15:08, Eric Niebler wrote: That would be awesome, Joel! I'll count on you for helping me making those looking nice :p What's the easiest ? getting a proto-tree branch or what ? ___ proto mailing list proto@lists.boost.org http://lists

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread Eric Niebler
On 7/27/2010 9:01 AM, joel falcou wrote: > what about having some Tree related trasnform/function/meta-function then ? > > I'm often thinking : "dang, this transform is basically a BFS for a node > verifying meta-function foo<>" > and have to rewrite a BFS usign default_ and such, which is relativ

Re: [proto] So I heard proto make AST ...

2010-07-27 Thread Alp Mestanogullari
On Tue, Jul 27, 2010 at 3:01 PM, joel falcou wrote: > Do people think such stuff (maybe in proto::tree:: or smthg ?) be useful > additions ? Definitely. We're dealing with a compile-time AST, but this is still an AST and we often have to apply transformations to ASTs. Thus, having higher order me

[proto] So I heard proto make AST ...

2010-07-27 Thread joel falcou
what about having some Tree related trasnform/function/meta-function then ? I'm often thinking : "dang, this transform is basically a BFS for a node verifying meta-function foo<>" and have to rewrite a BFS usign default_ and such, which is relatively easy. Now, sometimes it is "dang, this code