Utree tutorial

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Utree tutorial

Olivier Austina
Hi,

I would like to learn how to build AST with utree. I am looking for some basic starting points as newbie in boost. Any suggestion is welcome. Thank you.
Regards
Olivier


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Utree tutorial

sehe
On 10/09/2013 12:45 PM, Olivier Austina wrote:
I would like to learn how to build AST with utree. I am looking for some basic starting points as newbie in boost. Any suggestion is welcome. Thank you.
Regards
Olivier
Please keep in mind that utree has some applications, but also some limitations that the developers (IIRC) have decided are not worth investing much more into.

I believe there's a utree compiler example in boost/libs/spirit/example/qi

  • calc_utree_ast.cpp
  • calc_utree.cpp
  • calc_utree_naive.cpp
Also, `reference.cpp` consolidates (non-functional) examples that are supposedly used somewhere in the documentation (as<>, as_string, as_symbol)

There used to be a lisp implementation by Bryce Lelbach (I even recall this being the driving force behind utree back in the day). Google might help you find it (github?)

Seth



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Utree tutorial

Olivier Austina
Thank you Seth for you reply. What do you think about using example of calc2.cpp (http://www.boost.org/doc/libs/1_46_1/libs/spirit/example/qi/calc2_ast.cpp) or  utree example in the links you indicated? Any suggestion is welcome. Thank you.

Regards
Olivier



2013/10/9 Seth Heeren <[hidden email]>
On 10/09/2013 12:45 PM, Olivier Austina wrote:
I would like to learn how to build AST with utree. I am looking for some basic starting points as newbie in boost. Any suggestion is welcome. Thank you.
Regards
Olivier
Please keep in mind that utree has some applications, but also some limitations that the developers (IIRC) have decided are not worth investing much more into.

I believe there's a utree compiler example in boost/libs/spirit/example/qi

  • calc_utree_ast.cpp
  • calc_utree.cpp
  • calc_utree_naive.cpp
Also, `reference.cpp` consolidates (non-functional) examples that are supposedly used somewhere in the documentation (as<>, as_string, as_symbol)

There used to be a lisp implementation by Bryce Lelbach (I even recall this being the driving force behind utree back in the day). Google might help you find it (github?)

Seth



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Utree tutorial

Kostya Kanishev
I'd add to the discussion:

A year ago I was asking about utree
And the answer was that there are some issues with it, (so I went with "boost::variant-based" asts)  

So what are these "problems and limitations"? Are there ways to overcome these?

Kostya


2013/10/9 Olivier Austina <[hidden email]>
Thank you Seth for you reply. What do you think about using example of calc2.cpp (http://www.boost.org/doc/libs/1_46_1/libs/spirit/example/qi/calc2_ast.cpp) or  utree example in the links you indicated? Any suggestion is welcome. Thank you.

Regards
Olivier



2013/10/9 Seth Heeren <[hidden email]>
On 10/09/2013 12:45 PM, Olivier Austina wrote:
I would like to learn how to build AST with utree. I am looking for some basic starting points as newbie in boost. Any suggestion is welcome. Thank you.
Regards
Olivier
Please keep in mind that utree has some applications, but also some limitations that the developers (IIRC) have decided are not worth investing much more into.

I believe there's a utree compiler example in boost/libs/spirit/example/qi

  • calc_utree_ast.cpp
  • calc_utree.cpp
  • calc_utree_naive.cpp
Also, `reference.cpp` consolidates (non-functional) examples that are supposedly used somewhere in the documentation (as<>, as_string, as_symbol)

There used to be a lisp implementation by Bryce Lelbach (I even recall this being the driving force behind utree back in the day). Google might help you find it (github?)

Seth



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Utree tutorial

Olivier Austina
Thank you Kostya for your reply. I have seen it is not recommended.


Regards
Olivier



2013/10/9 Kostya Kanishev <[hidden email]>
I'd add to the discussion:

A year ago I was asking about utree
And the answer was that there are some issues with it, (so I went with "boost::variant-based" asts)  

So what are these "problems and limitations"? Are there ways to overcome these?

Kostya


2013/10/9 Olivier Austina <[hidden email]>
Thank you Seth for you reply. What do you think about using example of calc2.cpp (http://www.boost.org/doc/libs/1_46_1/libs/spirit/example/qi/calc2_ast.cpp) or  utree example in the links you indicated? Any suggestion is welcome. Thank you.

Regards
Olivier



2013/10/9 Seth Heeren <[hidden email]>
On 10/09/2013 12:45 PM, Olivier Austina wrote:
I would like to learn how to build AST with utree. I am looking for some basic starting points as newbie in boost. Any suggestion is welcome. Thank you.
Regards
Olivier
Please keep in mind that utree has some applications, but also some limitations that the developers (IIRC) have decided are not worth investing much more into.

I believe there's a utree compiler example in boost/libs/spirit/example/qi

  • calc_utree_ast.cpp
  • calc_utree.cpp
  • calc_utree_naive.cpp
Also, `reference.cpp` consolidates (non-functional) examples that are supposedly used somewhere in the documentation (as<>, as_string, as_symbol)

There used to be a lisp implementation by Bryce Lelbach (I even recall this being the driving force behind utree back in the day). Google might help you find it (github?)

Seth



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Utree tutorial

Joel de Guzman
In reply to this post by Kostya Kanishev
On 10/9/13 8:34 PM, Kostya Kanishev wrote:
> I'd add to the discussion:
>
> A year ago I was asking about utree
> http://boost.2283326.n4.nabble.com/Operator-precedence-parser-with-Spirit-td4606102.html
> And the answer was that there are some issues with it, (so I went with
> "boost::variant-based" asts)
>
> So what are these "problems and limitations"? Are there ways to overcome these?

Hi Kostya,

(aside: and admin hat on, please avoid top-posting. It messes up the thread)

Anyway, the main problem with the utree is that it is too generic and
the generated AST using utree is too 'noisy'. The tree is too unwieldy
and difficult to traverse and transform into a target data structure.
You will have to transform the result into something more reasonable
-- something that the standard variant/fusion based ASTs can do in
a more straightforward manner. The allure is that there's one and
only one AST type to deal with, but that is also its weakness: a
one-size-fits all approach is almost always not good.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general