Subject: Re: [Boost-docs] Changes to syntax_highlight.hpp
From: Andreas Pokorny (andreas.pokorny_at_[hidden])
Date: 2007-08-11 07:15:42
Hello,
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
end.
Now I wonder if I should use xpressive, or spirit with regex.
PS: With that extensions one cannot implement quickbook within quickbook.
Regards
Andreas
This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:40 UTC