I thought it was worth getting a prototype version of the much-discussed "QuickBook + extensible syntax highlighting" out for comment.
You can find the proposal at: http://homepage.ntlworld.com/thomas.guest/qbk_proposal/ This contains documentation and (a link to) source code. If anyone would like, I can email a zip archive off-list. Summary of the change: 1) on startup, quickbook loads and validates a highlight scheme from a file named: "quickbook.hlt" in the current directory. A scheme is essentially an ordered collection of <elements, regex patterns> 2) this scheme defines syntax highlighting for any number of languages (I've provided C++, Python and syntax_highlight support). 3) the .qbk can dynamically select source mode to a new language like this. Here is some inline C++ [>c++] `int main() { return 0; } and here is some inline Python [>python] `lambda x: return x * x` and here is some inline Perl [>perl] ... Comments welcome. As you can see, there's stuff to do. I would greatly welcome any help with getting this building using Bjam. It really should be straightforward! We just need to link with Boost regex. I like Reece's suggestion that the correct way to handle dynamic highlighting is 1) to implement a QuickBook include mechanism and 2) to define the dynamic highlighting schemes inline, but I will have to un-volunteer from this next step for reasons of: 1) time 2) don't know enough about XSL 3) don't want to meddle with the QuickBook grammar itself 4) not 100% convinced of immediate requirement (as a QuickBook user, I don't need this ... yet!) Despite this, I hope my syntax highlight grammar and Boost regex based markup scheme can be of use. 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
