Joel de Guzman wrote:Reece Dunn wrote:
some great stuff which I failed to read before responding to Joel, which might have saved me some trouble......
Very feasible, IMHO.With the above syntaxes, the symbol/regex definitions are bound to the colour/format schemes. It may be useful to separate these out, allowing:
[highlighting
[keywords red bold]
[comments "C++" teal]
[comments "C" cyan]
[preprocessor bold olive]
]
These are just ideas. I am not sure how feasible they may be.
Great!
Wonderful idea! It all boils down to:
1) Having a qbk include mechanism.
Yes!
2) Providing a command line switch to specify the search directory for includes
Yes!
Definitely. IMHO, these two are bound together. BoostBuild uses a directory search mechanism, so it does not need search paths via the command line.
4) Having a default.qbk automatically included. <<This is important for backward compatibility. The default.qbk contains the current highlighting schemes>>
Yes! Plus this allows us to easily add "built-in" support for new types. I would suggest something similar Boost Build, such as "bootstrap.qbk" for global setup and a "user.qbk" allowing additional site-specific tweaks without having to modify (and then merge at the next release) "bootstrap.qbk".
When searching for a file, you will search these in order:
1. include paths from the command line;
2. the directory where the current qbk file is. (This allows for things like:
[include syntaxes/cpp.qbk]
-- syntaxes/cpp.qbk
[include c.qbk]
to work, where c.qbk is in syntaxes/c.qbk.
);
3. the default QuickBook include path (e.g. BOOST_ROOT/tools/quickbook).
This then allows you to provide a default.qbk that provides custom behaviour in one of the search directories (such as the directory where the top-level qbk file is), essentially overriding the behaviour of the default.qbk file provided as standard. That is, there is no need for a BoostBook-style configuration mechanism.
One possibility is to allow for environment variables to be used in include paths, allowing:
-- mydir/default.qbk [include $(QUICKBOOK_PATH)/default.qbk] # import the standard default.qbk [include syntaxes/java.qbk] # add Java syntax highlighting
I think this is all very reaonable.
I'm not sure however if its a good idea to go as far as specifying the colors for each. That's the job of the CSS file. Do you want the ability to rewrite the CSS file too? Nah, that's too much, I think.
Actually, this is the only thing I didn't like, and I REALLY don't like it (but this in no way detracts from being very impressed with Reece's suggestions taken as a whole!) because it IMHO corrupts the interface.
Ignore the colour specification (my bad). That was my braindead moment. I temporarily forgot that this would be generating XML/HTML+CSS. I did not intend you to rewrite the CSS file.
Regards, Reece
------------------------------------------------------- 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
