Subject: Re: [Boost-docs] Changes to syntax_highlight.hpp
From: Matias Capeletto (matias.capeletto_at_[hidden])
Date: 2007-08-15 13:56:35
On 8/13/07, Kai Brüning <kai_at_[hidden]> 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
> I am currently implementing QuickBook syntax highlighting for Trac
> using Pygments (http://pygments.org), a Python library. It sports among
> others a regex-based lexer, so it may be worth a look for getting ideas.
> Plus, there are already regex-based implementations available for all
> interesting languages but the boost specific ones. And the later
> shortcoming I am currently fixing.
I think that this can be a very good option. If we can call Python
code from templates we could implement the internal guts of the syntax
highlighting using Pygments.
We should start thinking about using active and supported OS project
to leverage our work.
PS: I am back :)
This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:40 UTC