Re: [Boost-docs] Changes to syntax_highlight.hpp

Subject: Re: [Boost-docs] Changes to syntax_highlight.hpp
From: Andreas Pokorny (andreas.pokorny_at_[hidden])
Date: 2007-08-19 16:41:11


I am sorry that I was gone for so long. I was offline for some days,
and investigated xpressive in the meanwhile.

2007/8/12, Joel de Guzman <joel_at_[hidden]>:
> Could you give us an example, say, the c++ description?

I will work on that right now, but I want to show what I did so far:

I just added a branch for xpressive, to allow nested dynamic regular
xpressions to boost-svn:

It allows writing stuff like:

    nested_dynamic_compiler<std::string::const_iterator> compiler;
    compiler.add_start("first", "(second)*"); // adds the start "rule" or regex
    compiler.add("second", "ab"); // adds an arbitrary reg ex named "second"
                                                 // which can be
refered to in other regex
                                                 // defined in that compiler

    std::string input;
    std::cin >> input;
    if(regex_match(input, compiler.regex() ) )

I now try to convert the grammar and provide a bigger example.

> > PS: With that extensions one cannot implement quickbook within quickbook.
> Hrm. Why not?

Yeah, why not. At first I did not like that one cannot implement a regex
library in qbks. Now I think it would be much more interesting if we
would invoke templates with results of the match.

Andreas Pokorny

This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:40 UTC