Re: compare of 2 existing methods to implement grammar recursion

TONGARI J <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <CANCwVhfb4qug9CEa+0UsthEey-q7G6_s4=DZ670=hmRZtqKi5Q@mail.gmail.com>
2016-08-09 23:09 GMT+08:00 Larry Evans <[email protected]>:
>
> OOPS, apparently the idea of make_defns (which makes a mapping
> from the rule to it's definition) had already been tried here:
>
> https://gist.github.com/jamboree/11133291
>
> where it's called rule_map.
>
> However, the file given in that gist:
>
> boost/spirit/home/x3/nonterminal/grammar.hpp
>
> is not present here:
>
> https://github.com/djowel/spirit_x3/tree/master/include/
> boost/spirit/home/x3/nonterminal
>
> The history for this directory:
>
> https://github.com/djowel/spirit_x3/commits/master/
> include/boost/spirit/home/x3/nonterminal
>
> mentions nothing about grammar.hpp.
>
> Would someone explain why this idea was not used?
>

It was once used and finally replaced with what you see today. I can't
recall the detail, but I remember that someone wrote a monster-sized
grammar in one file and got some problem in compilation, for example, such
a method will drive the linker very hard (especially in debug build)
because it will result in crazy long mangled names for symbols, though some
efforts were put into reducing the symbol size but the effects were not
significant.

Before long, the ADL trick was invented and evolves to what you see today.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev

_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.