Alexey Demakov
2005-03-18 11:45:11 UTC
Hi all,
I'm trying to write colorer scheme for my language
which have the following structures:
mykeyword
{
...
}
where '...' may be any code with balanced { }.
<block start="/(mykeyword)\s*(\{)/" end="/\}/"
scheme="code"
region01="def:Keyword" region02="def:SymbolStrong"
region10='def:SymbolStrong' region="def:CommentDoc"
/>
<scheme name="code">
<block start="/\{/" end="/\}/"
scheme="code" region00="def:Symbol"
region10='def:Symbol' region="def:CommentDoc"
/>
</scheme>
It works fine when there are no end of line between 'mykeyword' and '{'.
How can I modify 'start' regexp to match newlines also?
I don't understand why my regexp doesn't work - docs say that
'\s' Whitespace character (tab/space/cr/lf)
May be there are other way?
Regards,
Alexey
-----
Alexey Demakov
TreeDL: Tree Description Language: http://treedl.sourceforge.net
RedVerst Group: http://www.unitesk.com
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
I'm trying to write colorer scheme for my language
which have the following structures:
mykeyword
{
...
}
where '...' may be any code with balanced { }.
<block start="/(mykeyword)\s*(\{)/" end="/\}/"
scheme="code"
region01="def:Keyword" region02="def:SymbolStrong"
region10='def:SymbolStrong' region="def:CommentDoc"
/>
<scheme name="code">
<block start="/\{/" end="/\}/"
scheme="code" region00="def:Symbol"
region10='def:Symbol' region="def:CommentDoc"
/>
</scheme>
It works fine when there are no end of line between 'mykeyword' and '{'.
How can I modify 'start' regexp to match newlines also?
I don't understand why my regexp doesn't work - docs say that
'\s' Whitespace character (tab/space/cr/lf)
May be there are other way?
Regards,
Alexey
-----
Alexey Demakov
TreeDL: Tree Description Language: http://treedl.sourceforge.net
RedVerst Group: http://www.unitesk.com
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click