Boost logo

Boost :

From: Juan Carlos Arevalo-Baeza (jcab.lists_at_[hidden])
Date: 2003-02-08 15:49:11

On Fri, 10 Jan 2003 11:22:23 +0000, Vincent Finn wrote:

>>>I have added 2 parsers to my code base and the compile time (VC6) has
>>>gone from 10 mins to 30mins :-(
>>At the very least, yes, you can separate the parsers from the project.
>>How about writing some wrappers that *hides* the grammars in
>>*.cpp files? You can for example have an opaque API in a header
>>such as:
>>bool parse(char const* source);
>That seems obvious now that you say it
>I was thinking in terms of spliting spirit off which causes problems but
>, as you say, all I need is to build a lib with my parser in so that
>spirit is hidden.

   This is kind of late (a month), but if you want a working example of this, I just updated and checked in my C++ lexer example into the Boost CVS. The lexer itself is implemented using Spirit grammars, and it's separated from its users by an opaque interface kind of like the one Joel describes.

   Now I'm in the process of cleaning it up and adding a few features, like making it multi-layered (lexer -> preprocessor -> parser, with all the layers separated from each other), so I'll check it in as soon as I'm done.

email: jcab_at_[hidden]
ICQ: 10913692 @WORK: 101728263

Boost list run by bdawes at, gregod at, cpdaniel at, john at