James Fowler <boost_list <at> openseaconsulting.com> writes:

[snip]

> The capability to create dynamic syntax highlighters could/would
> augment (not necessarily replace) the existing Spirit-grammar-based
> source modes, right?  Or is this referring to some other problem?

James, 

Thanks for your comments.

I would suggest replace! I see no point maintaining more than one way of doing
things.

>       Need to work out where to put the built-in highlight scheme
>     Details please?
> I just meant that the quickbook executable needs to locate (on start up) the
> built in syntax highlight scheme file. The user could extend this scheme by
> supplying their own scheme via the command line, or indeed by editing the
> default one. It's not really a problem...
> 
> Why at startup?   Why not actually load (include) dynamic syntax
> definitions explicitly, something like "[sourcemode foo]"
> pulling in "foo.highlight_def_extension"?   This could
> look first in the local directory, then search relative to a some
> standard lookup path (perhaps $BOOST/tools/QuickBook/highlighters ?). 
> It might allow for more intelligent feedback on errors (i.e.,
> dependency on a definition file that isn't found).  I think it could
> even be leveraged to allow BBv2 to treat referenced definitions as
> dependencies, triggering a QuickBook "rebuild" if the definition is
> updated (which might be much harder to do otherwise, short of any
> change to any definition file triggering every .qbk to get reprocessed
> whether or not it used that definition).

This sounds over-sophisticated to me, for a first version at least, but I do
take all your points. 

I prefer startup since catches syntax errors in the highlight scheme and bad
regexes early. But as far as QuickBook end users are concerned this is all
implementation detail.

>       Any comments or thoughts?
> 
> As a means of extending QuickBook to deal with new grammars, it looks
> like a great idea to me.  I'm not sure I would rush to replace the
> existing Spirit C++ and Python grammars, but this would be great for
> adding in other oddball stuff.  When I was updating quickbook.qbk,  it
> occurred to me how nice it would be to have syntax highlighting for
> showing 'literal' xml/html and even Quickbook syntax.   This seems to
> be a great way to get that in there.

OK, that's another vote for!

[snip]

> hmm... which macros would those be?

These ones!  [def :-)[$images/smiley.png]]

Thomas




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Boost-docs mailing list
[email protected]
Unsubscribe and other administrative requests: 
https://lists.sourceforge.net/lists/listinfo/boost-docs

Reply via email to