digitalmars.D - simple parser framework + lazy bool error
- Daniel919 (10/10) Dec 25 2006 Hi, this code is working:
- Deewiant (4/7) Dec 26 2006 Whenever the compiler reports an internal error, one should make a bug r...
- BCS (3/16) Dec 27 2006 Cool! a lot shorter than mine (and it actually works to) but I'm not
- Larry Evans (14/17) Jan 07 2007 That's no longer available :(
- Larry Evans (11/20) Jan 08 2007 The attached file is my first attempt at doing this in D. It just
- Larry Evans (7/15) Jan 08 2007 [snip]
Hi, this code is working: http://mitglied.lycos.de/daniel919/parser.d But when I tried to further simplify it, I encountered an error: http://mitglied.lycos.de/daniel919/parser_lazy.d It fails on compiling (dmd 0.178): Internal error: toir.c 170 Tell me please what you think about the parser. Bug report is necessary for the lazy bool error ? Daniel
Dec 25 2006
Daniel919 wrote:Bug report is necessary for the lazy bool error ? DanielWhenever the compiler reports an internal error, one should make a bug report about it (unless one has already been made). I took the trouble and reported your problem as Issue 749: http://d.puremagic.com/issues/show_bug.cgi?id=749
Dec 26 2006
Daniel919 wrote:Hi, this code is working: http://mitglied.lycos.de/daniel919/parser.d But when I tried to further simplify it, I encountered an error: http://mitglied.lycos.de/daniel919/parser_lazy.d It fails on compiling (dmd 0.178): Internal error: toir.c 170 Tell me please what you think about the parser. Bug report is necessary for the lazy bool error ? DanielCool! a lot shorter than mine (and it actually works to) but I'm not sure what to make of the syntax.
Dec 27 2006
On 12/25/2006 08:02 PM, Daniel919 wrote:Hi, this code is working: http://mitglied.lycos.de/daniel919/parser.dThat's no longer available :( Do you have any idea of how to implement the grammar productions? Spirit's Joel used the subrule_list template: http://boost.cvs.sourceforge.net/boost/boost/boost/spirit/core/non_terminal/subrule.hpp however, there was discussion of using an mpl-like map: http://article.gmane.org/gmane.comp.parsers.spirit.devel/2970 There is a simplified mpl::map implementation prototype in the boost vault here: http://tinyurl.com/y9tuc3 Maybe it could be translated to D. BTW, would a D vault counterpart to boost vault be useful for quick review and feedback on code such as Daniel's?
Jan 07 2007
On 01/07/2007 09:11 AM, Larry Evans wrote: [snip]There is a simplified mpl::map implementation prototype in the boost vault here: http://tinyurl.com/y9tuc3 Maybe it could be translated to D.The attached file is my first attempt at doing this in D. It just tries the mpl::set translation; however, I'm getting: <--------- cut here ----------------- set_proto.d(59): Error: cannot implicitly convert expression ((has_key_tester)(cast(set)(set_int_float))) of type set_proto.bool_!(false).bool_ to set_proto.bool_!(true).bool_--------- cut here -----------------Could someone show how to do this in D? TIA. -Larry
Jan 08 2007
On 01/08/2007 07:48 AM, Larry Evans wrote: [snip]The attached file is my first attempt at doing this in D. It just tries the mpl::set translation; however, I'm getting: <--------- cut here ----------------- set_proto.d(59): Error: cannot implicitly convert expression ((has_key_tester)(cast(set)(set_int_float))) of type set_proto.bool_!(false).bool_ to set_proto.bool_!(true).bool_ >--------- cut here ----------------- Could someone show how to do this in D?[snip] The c++ counter part is attached. The compiler used is available from Douglas Gregor and is described here: http://www.osl.iu.edu/~dgregor/cpp/variadic-templates.pdf Is this not possible with D?
Jan 08 2007