Subject: Re: [Boost-docs] Changes to syntax_highlight.hpp
From: Joel de Guzman (joel_at_[hidden])
Date: 2007-08-12 01:07:20
Andreas Pokorny wrote:
> 2007/8/9, Joel de Guzman <joel_at_[hidden]>:
>> What I'd really want is to Regex-ify the syntax highlighter and
>> have them reconfigurable as user-supplied regex strings from
>> configuration files. This would simplify our life a lot. There'll
>> be only one syntax highlighter grammar and code that can accept
>> various lexer files. Our job then is just to churn out various
>> lexer files for different languages.
> Do you already have ideas how this should look like?
> The first thing i thought about would look like that:
> [sourcemode languagename
> [rule name [regex] markup]
> [rule name [regex]]
> [rule [regex]]
> [rule [regex] markup]
> Where name regex and markup are only placeholders. name should be
> unique within the block. The names should allow refering to other rules
> within regular expressions. Quickbook should combine all rules in the
> order given to a big alternative, and add a catch all parser at the
Could you give us an example, say, the c++ description?
> Now I wonder if I should use xpressive, or spirit with regex.
I'm sure Eric will be smiling while reading that. Well, it's
your choice, I guess, as long as it's maintainable by anyone
> PS: With that extensions one cannot implement quickbook within quickbook.
Hrm. Why not?
-- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:40 UTC