Subject: Re: [Boost-docs] Changes to syntax_highlight.hpp
From: Kai Brüning (kai_at_[hidden])
Date: 2007-08-13 17:12:50
>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:
>[rule name [regex] markup]
>[rule name [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.
This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:40 UTC