Re: Qi Symbols parser performance

Seth <[email protected]> Sun, 14 Jan 2018 04:07:35 +0100
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
On 13-01-18 19:36, Stephan Menzel wrote:
> In fact, I have just browsed through them and I haven't seen
> any example. Normally they are just inlined, which is also a creation on
> demand.
Creating the grammar is usually compile-time for the actual parser
expressions. It's just in your case you are building the Trie and that
allocates memory, of couse it's going to matter.

I agree. Though many examples are small, the larger samples should do
the right thing.


Correct way:

http://www.boost.org/doc/libs/1_66_0/libs/spirit/example/qi/employee.cpp

http://www.boost.org/doc/libs/1_66_0/libs/spirit/example/qi/calc_utree.cpp


Unexpected incorrect way:

http://www.boost.org/doc/libs/1_66_0/libs/spirit/example/qi/compiler_tutorial/calc4.cpp
etc. (huh)


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot