Moderated use of def:preprocessor
parent
b532ecdbe0
commit
9171f70d20
|
@ -58,7 +58,7 @@ langs1 = \
|
|||
d.lang \
|
||||
docbook.lang \
|
||||
lua.lang \
|
||||
msil.lang \
|
||||
cil.lang \
|
||||
nemerle.lang \
|
||||
ocaml.lang \
|
||||
R.lang \
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="escape" _name="Escape" map-to="def:escape"/>
|
||||
<style id="preprocessor" _name="Preprocessor"/>
|
||||
<style id="common-defines" _name="Common defines" map-to="c:preprocessor"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="common-defines" _name="Common defines" map-to="def:special-value"/>
|
||||
<style id="included-file" _name="Included File" map-to="c:preprocessor"/>
|
||||
<style id="char" _name="Character" map-to="def:character"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
|
|
|
@ -31,7 +31,7 @@ for l in *.lang; do
|
|||
boo.lang) ;;
|
||||
d.lang) ;;
|
||||
docbook.lang) ;;
|
||||
msil.lang) ;;
|
||||
cil.lang) ;;
|
||||
nemerle.lang) ;;
|
||||
R.lang) ;;
|
||||
spec.lang) ;;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
-->
|
||||
<!-- FIXME: find the correct mimetype -->
|
||||
<language _name="MSIL" version="1.0" _section="Others" mimetypes="text/x-msil">
|
||||
<language _name="CIL" version="1.0" _section="Others" mimetypes="text/x-msil">
|
||||
|
||||
<escape-char>\</escape-char>
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="dimension" _name="Dimension" map-to="def:floating-point"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="at-rules" _name="at-rules" map-to="def:keyword"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
</styles>
|
||||
|
||||
|
@ -94,7 +94,7 @@
|
|||
<keyword>lang</keyword>
|
||||
</context>
|
||||
|
||||
<context id="at-rules" style-ref="preprocessor">
|
||||
<context id="at-rules" style-ref="at-rules">
|
||||
<prefix>^[ \t]*@</prefix>
|
||||
<keyword>charset</keyword>
|
||||
<keyword>font-face</keyword>
|
||||
|
|
|
@ -40,8 +40,10 @@
|
|||
<style id="shebang" _name="Shebang"/>
|
||||
<style id="doc-comment" _name="Documentation Comment" map-to="def:comment"/>
|
||||
<style id="doc-comment-element" _name="Documentation Comment Element"/>
|
||||
<!-- FIXME and this is real nonsense -->
|
||||
<style id="preprocessor" _name="Preprocessor"/>
|
||||
<!-- This one is for '#include <foo.h>' and "#pragma blah" and ''. -->
|
||||
<style id="preprocessor" _name="Preprocessor directive"/>
|
||||
<!-- For things like TRUE and NULL in C. -->
|
||||
<style id="special-value" _name="Special value" map-to="def:preprocessor"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -61,7 +63,6 @@
|
|||
<define-regex id="hexadecimal" extended="true">
|
||||
(?<![\w\.]) 0 [xX] [0-9a-fA-F]+ (?![\w\.])
|
||||
</define-regex>
|
||||
<!-- FIXME: these one is broken, and is it useful at all? -->
|
||||
<define-regex id="float" extended="true" case-sensitive="false">
|
||||
\b
|
||||
([0-9]+ e [-+]? [0-9]+ |
|
||||
|
|
|
@ -33,7 +33,9 @@
|
|||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="state" _name="Widget State" map-to="def:special-value"/>
|
||||
<style id="include-directive" _name="Include directive" map-to="def:preprocessor"/>
|
||||
<style id="boolean-value" _name="Boolean value" map-to="def:special-value"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -80,17 +82,17 @@
|
|||
<keyword>base</keyword>
|
||||
<keyword>text</keyword>
|
||||
</context>
|
||||
<context id="state" style-ref="preprocessor">
|
||||
<context id="state" style-ref="state">
|
||||
<keyword>ACTIVE</keyword>
|
||||
<keyword>SELECTED</keyword>
|
||||
<keyword>NORMAL</keyword>
|
||||
<keyword>PRELIGHT</keyword>
|
||||
<keyword>INSENSITIVE</keyword>
|
||||
</context>
|
||||
<context id="include-directive" style-ref="preprocessor">
|
||||
<context id="include-directive" style-ref="include-directive">
|
||||
<keyword>include</keyword>
|
||||
</context>
|
||||
<context id="boolean-value" style-ref="preprocessor">
|
||||
<context id="boolean-value" style-ref="boolean-value">
|
||||
<keyword>TRUE</keyword>
|
||||
<keyword>FALSE</keyword>
|
||||
</context>
|
||||
|
|
|
@ -48,14 +48,11 @@
|
|||
<style name="def:shebang" foreground="#0000FF" bold="true"/>
|
||||
<style name="def:doc-comment-element" italic="true"/>
|
||||
|
||||
<style name="def:specials" foreground="#FFFFFF" background="#FF0000"/>
|
||||
<style name="def:preprocessor" foreground="#A020F0"/>
|
||||
|
||||
<style name="c:preprocessor" foreground="#A020F0"/>
|
||||
|
||||
<style name="diff:added-line" use-style="Others 2"/>
|
||||
<style name="diff:removed-line" use-style="Others 3"/>
|
||||
<style name="diff:changed-line" use-style="c:preprocessor"/>
|
||||
<style name="diff:changed-line" use-style="def:preprocessor"/>
|
||||
<style name="diff:special-case" use-style="def:string"/>
|
||||
<style name="diff:location" use-style="def:keyword"/>
|
||||
<style name="diff:diff-file" use-style="def:data-type"/>
|
||||
|
@ -63,16 +60,16 @@
|
|||
<style name="xml:attribute-name" foreground="#6A5ACD"/>
|
||||
<style name="xml:tags" foreground="#008B8B"/>
|
||||
<style name="xml:namespace" foreground="#2E8B57" bold="true"/>
|
||||
<style name="xml:doctype" use-style="c:preprocessor"/>
|
||||
<style name="xml:cdata-delim" use-style="c:preprocessor"/>
|
||||
<style name="xml:processing-instruction" use-style="c:preprocessor"/>
|
||||
<style name="xml:doctype" use-style="def:preprocessor"/>
|
||||
<style name="xml:cdata-delim" use-style="def:preprocessor"/>
|
||||
<style name="xml:processing-instruction" use-style="def:preprocessor"/>
|
||||
|
||||
<style name="js:object" foreground="#2E8B57" bold="true"/>
|
||||
<style name="js:constructors" foreground="#008B8B"/>
|
||||
|
||||
<style name="latex:display-math" use-style="Others 3"/>
|
||||
<style name="latex:command" foreground="#2E8B57" bold="true"/>
|
||||
<style name="latex:include" use-style="c:preprocessor"/>
|
||||
<style name="latex:include" use-style="def:preprocessor"/>
|
||||
|
||||
<style name="sh:variable1" use-style="Others 3"/>
|
||||
<style name="sh:variable2" use-style="Others 2"/>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="boolean-value" _name="Boolean value" map-to="def:special-value"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -53,7 +53,7 @@
|
|||
<context id="variable" style-ref="data-type">
|
||||
<match>^[a-zA-Z_][a-zA-Z0-9_.]*</match>
|
||||
</context>
|
||||
<context id="boolean-value" style-ref="preprocessor">
|
||||
<context id="boolean-value" style-ref="boolean-value">
|
||||
<keyword>true</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>on</keyword>
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="null-value" _name="Null Value" map-to="def:preprocessor"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:preprocessor"/>
|
||||
<style id="null-value" _name="Null Value" map-to="def:special-value"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:special-value"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="reserved" _name="Future Reserved Keywords" map-to="def:error"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
|
|
|
@ -41,8 +41,6 @@
|
|||
map-to="def:error"/>
|
||||
<style id="string" _name="String"
|
||||
map-to="def:string"/>
|
||||
<style id="escape" _name="Escape"
|
||||
map-to="def:escape"/>
|
||||
<style id="keyword" _name="Keyword"
|
||||
map-to="def:keyword"/>
|
||||
<style id="object" _name="Object"/> <!--map-to="def:others"-->
|
||||
|
@ -66,10 +64,7 @@
|
|||
<start>//</start>
|
||||
<end>$</end>
|
||||
<include>
|
||||
<!-- FIXME no \n in patterns! -->
|
||||
<context id="comment-continue">
|
||||
<match>\\\n</match>
|
||||
</context>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
@ -87,10 +82,7 @@
|
|||
<start>"</start>
|
||||
<end>"</end>
|
||||
<include>
|
||||
<!-- FIXME no \n in patterns! -->
|
||||
<context id="string-continue" style-ref="escape">
|
||||
<match>\\\n</match>
|
||||
</context>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="def:escape"/>
|
||||
</include>
|
||||
</context>
|
||||
|
@ -99,7 +91,7 @@
|
|||
<start>'</start>
|
||||
<end>'</end>
|
||||
<include>
|
||||
<context ref="string-continue"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="def:escape"/>
|
||||
</include>
|
||||
</context>
|
||||
|
|
|
@ -59,10 +59,11 @@
|
|||
<style name="def:net-address-in-comment" underline="true"/>
|
||||
<style name="def:escape" foreground="#FF00FF"/>
|
||||
|
||||
<style name="def:preprocessor" foreground="dark-green"/>
|
||||
<style name="def:special-value" bold="true"/>
|
||||
<style name="def:preprocessor" bold="true"/>
|
||||
|
||||
<style name="c:common-defines" foreground="#0095FF" bold="true"/>
|
||||
<style name="c:preprocessor" foreground="dark-green"/>
|
||||
<style name="c:common-defines" foreground="#0095FF" bold="true"/>
|
||||
|
||||
<style name="diff:diff-file" use-style="def:keyword"/>
|
||||
<style name="diff:added-line" use-style="def:decimal"/>
|
||||
|
@ -95,6 +96,7 @@
|
|||
<style name="changelog:release" foreground="#0095FF" bold="true"/>
|
||||
|
||||
<style name="python:string-conversion" background="#BEBEBE"/>
|
||||
<style name="python:module-handler" use-style="def:character"/>
|
||||
|
||||
<style name="changelog:email" use-style="c:preprocessor"/>
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<style id="base-n-integer" _name="Base-N Integer" map-to="def:base-n-integer"/>
|
||||
<style id="function" _name="Function" map-to="def:function"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="reserved-constant" _name="Reserved constant" map-to="def:special-value"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -79,7 +79,7 @@
|
|||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="reserved-constant" style-ref="preprocessor">
|
||||
<context id="reserved-constant" style-ref="reserved-constant">
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>Inf</keyword>
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
<!-- ex:set ts=2 et:
|
||||
|
||||
Author: Gustavo Giráldez <gustavo.giraldez@gmx.net>
|
||||
Copyright (C) 2003 Gustavo Giráldez <gustavo.giraldez@gmx.net>
|
||||
Copyright (C) 2003, 2004 Gavin Brown <gavin.brown@uk.com>
|
||||
Copyright (C) 2005 Jaap Karssenberg <pardus@cpan.org>
|
||||
Copyright (C) 2006 Steve Frécinaux <steve@istique.net>
|
||||
Copyright (C) 2007 Joachim Noreiko <jnoreiko@yahoo.com>
|
||||
Copyright (C) 2006, 2007 Steve Frécinaux <code@istique.net>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
|
@ -23,6 +18,9 @@
|
|||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
TODO: extended regex support
|
||||
FIXME: =pod should require an empty line before/after, as written in perlpod
|
||||
|
||||
-->
|
||||
<language id="perl" _name="Perl" version="2.0" _section="Scripts">
|
||||
<metadata>
|
||||
|
@ -33,88 +31,669 @@
|
|||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="line-directive" _name="Line Directive" map-to="def:preprocessor"/>
|
||||
<style id="include-statement" _name="Include Statement" map-to="def:preprocessor"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="builtin-function" _name="Function" map-to="def:function"/>
|
||||
<style id="here-doc" _name="Heredoc" map-to="def:string" />
|
||||
<style id="here-doc-bound" _name="Heredoc Bound" map-to="def:string"/>
|
||||
<style id="system-command" _name="System Command" map-to="def:string"/>
|
||||
<style id="operator" _name="Operator" map-to="def:keyword"/>
|
||||
<style id="others" _name="Others"/>
|
||||
<style id="variable" _name="Variable" map-to="def:data-type"/>
|
||||
<style id="file-descriptor" _name="File Descriptor" map-to="perl:variable"/>
|
||||
<style id="control" _name="Control" map-to="def:preprocessor"/>
|
||||
<style id="regex" _name="Regular Expression" map-to="def:string"/>
|
||||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
<style id="pod-escape" _name="POD Escape" map-to="def:escape"/>
|
||||
<style id="pod-keyword" _name="POD keyword" map-to="def:keyword"/>
|
||||
<style id="pod-heading" _name="POD heading" map-to="def:doc-comment-element"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
||||
<context id="pod" style-ref="comment">
|
||||
<start>^=[a-z]</start>
|
||||
<end>^=cut</end>
|
||||
<context id="perl">
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="def:shebang"/>
|
||||
<context ref="line-directive"/>
|
||||
<context ref="def:shell-like-comment"/>
|
||||
<context ref="pod"/>
|
||||
<context ref="data"/>
|
||||
|
||||
<context ref="double-quoted-string"/>
|
||||
<context ref="single-quoted-string"/>
|
||||
<context ref="system-command"/>
|
||||
<context ref="word-list"/>
|
||||
<context ref="regular-expression"/>
|
||||
<context ref="match"/>
|
||||
<context ref="substitution"/>
|
||||
<context ref="transliteration"/>
|
||||
|
||||
<context ref="match-slashslash"/>
|
||||
|
||||
<context ref="here-doc-no-ve"/>
|
||||
<context ref="here-doc"/>
|
||||
|
||||
<context ref="sub"/>
|
||||
<context ref="variable"/>
|
||||
<context ref="include-statement"/>
|
||||
<context ref="operator"/>
|
||||
<context ref="keyword"/>
|
||||
<context ref="control"/>
|
||||
<context ref="file-descriptor"/>
|
||||
<context ref="builtin-function"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<!-- perl strings do not end at line end,
|
||||
so we cannot use def:string -->
|
||||
<context id="double-quoted-string" style-ref="string">
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
<!-- in case we have an obviously wrong piece of code to highlight.
|
||||
We put it last so it can highlight everything not handled yet. -->
|
||||
<context id="error" style-ref="error" extend-parent="false">
|
||||
<match>\S</match>
|
||||
</context>
|
||||
|
||||
<define-regex id="operator" extended="true">
|
||||
\-> |
|
||||
\+\+ | \-\- |
|
||||
\*\* |
|
||||
\! | \~ | \\ | \+ | \- |
|
||||
[!=]\~ |
|
||||
\* | / | % |
|
||||
<< | >> |
|
||||
< | > | [<>=!]= | <=> |
|
||||
& | \| | \^ |
|
||||
&& |
|
||||
\.\. | \.\.\. |
|
||||
\? | : |
|
||||
= | \*\*= | \+= | \*= | &= | <<= | &&= | \-= | /= |
|
||||
\|= | >>= | \|\|= | \.= | %= | \^= | \bx= |
|
||||
=> |
|
||||
\b(x|lt|gt|le|ge|eq|ne|cmp|not|and|or|xor)\b
|
||||
</define-regex>
|
||||
|
||||
<context id="operator" style-ref="operator"><!-- see `man perlop` -->
|
||||
<match>\%{operator}</match>
|
||||
</context>
|
||||
|
||||
<!-- #### VARIABLES ################################################### -->
|
||||
|
||||
<!-- $ is not defined in this regexp because it would conflict with
|
||||
\%{plain-variable}. $ is the current module. -->
|
||||
<define-regex id="special-variable" extended="true">
|
||||
\$^[ADEFHILMOPSTWX]? | # ($^A, ...)
|
||||
\$[\\\"\[\]'&`+*.,;=%~?@$><\(|/!-] | # ($|, $', ...)
|
||||
\$:[^:] | # avoid confusion with $::foo (equiv. to $main::foo)
|
||||
\$(0|[1-9][0-9]*) # numbered variables (regex matches)
|
||||
</define-regex>
|
||||
|
||||
<define-regex id="plain-variable" extended="true">
|
||||
([$@%]|\$\#)\$*[a-zA-Z_][a-zA-Z0-9_]*
|
||||
</define-regex>
|
||||
|
||||
<context id="plain-variable">
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context style-ref="variable">
|
||||
<start>[$@%]{</start>
|
||||
<end>}</end>
|
||||
</context>
|
||||
<context style-ref="variable">
|
||||
<match>\%{plain-variable}</match>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="single-quoted-string" style-ref="string">
|
||||
<context id="special-variable" style-ref="variable">
|
||||
<match>\%{special-variable}</match>
|
||||
</context>
|
||||
|
||||
<context id="variable">
|
||||
<include>
|
||||
<context ref="plain-variable"/>
|
||||
<context ref="special-variable"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<!-- #### PATTERNS / STRINGS / REGEX ################################## -->
|
||||
<!-- see `man perlop` -->
|
||||
|
||||
<!-- available delimiters for m// or s///-style patterns (probably not
|
||||
complete yet). -->
|
||||
<define-regex id="pattern-delimiter" extended="true">
|
||||
[&+|!/@#\^\-=:;,.?*\\%`"']
|
||||
</define-regex>
|
||||
|
||||
<!-- this assertion is shared by all the regex contexts to avoid wrong
|
||||
highlighing of function calls, etc.
|
||||
\b can't be used because of $var, @var, &func, %func. -->
|
||||
<define-regex id="pattern-before" extended="true">
|
||||
(?<![a-zA-Z0-9@%])
|
||||
</define-regex>
|
||||
|
||||
<context id="in-pattern">
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="plain-variable"/>
|
||||
<context extend-parent="false">
|
||||
<start>(?=\$)</start>
|
||||
<include>
|
||||
<!-- some variables are not recognized in patterns -->
|
||||
<context><match>\$(?=[|)])</match></context>
|
||||
<context ref="special-variable"/>
|
||||
</include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
|
||||
<!-- The following context definitions are there to handle nesting of
|
||||
brackets in bracket-delimited regexes. -->
|
||||
|
||||
<context id="in-pattern-curly-no-ve">
|
||||
<include>
|
||||
<context>
|
||||
<start>{</start><end>}</end>
|
||||
<include><context ref="in-pattern-curly-no-ve"/></include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="in-pattern-curly">
|
||||
<include>
|
||||
<context>
|
||||
<start>{</start><end>}</end>
|
||||
<include><context ref="in-pattern-curly"/></include>
|
||||
</context>
|
||||
<context ref="in-pattern"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="in-pattern-square-no-ve">
|
||||
<include>
|
||||
<context>
|
||||
<start>\[</start><end>\]</end>
|
||||
<include><context ref="in-pattern-square-no-ve"/></include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="in-pattern-square">
|
||||
<include>
|
||||
<context>
|
||||
<start>\[</start><end>\]</end>
|
||||
<include><context ref="in-pattern-square"/></include>
|
||||
</context>
|
||||
<context ref="in-pattern"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="in-pattern-round-no-ve">
|
||||
<include>
|
||||
<context>
|
||||
<start>\(</start><end>}</end>
|
||||
<include><context ref="in-pattern-round-no-ve"/></include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="in-pattern-round">
|
||||
<include>
|
||||
<context>
|
||||
<start>\(</start><end>\)</end>
|
||||
<include><context ref="in-pattern-round"/></include>
|
||||
</context>
|
||||
<context ref="in-pattern"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="in-pattern-angle-no-ve">
|
||||
<include>
|
||||
<context>
|
||||
<start><</start><end>></end>
|
||||
<include><context ref="in-pattern-angle-no-ve"/></include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="in-pattern-angle">
|
||||
<include>
|
||||
<context>
|
||||
<start><</start><end>></end>
|
||||
<include><context ref="in-pattern-angle"/></include>
|
||||
</context>
|
||||
<context ref="in-pattern"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<!-- One level higher: the following contexts define single and double
|
||||
patterns in general, in ve and no-ve version. -->
|
||||
|
||||
<define-regex id="end-of-pattern" extended="true">
|
||||
(?<=
|
||||
[}\]\)>]|
|
||||
\%{pattern-delimiter}
|
||||
)
|
||||
</define-regex>
|
||||
|
||||
<context id="simple-pattern" once-only="true">
|
||||
<start/>
|
||||
<include>
|
||||
<context ref="asserted-comment"/>
|
||||
<context end-parent="true">
|
||||
<start>{</start><end>}</end>
|
||||
<include><context ref="in-pattern-curly"/></include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start>\[</start><end>\]</end>
|
||||
<include><context ref="in-pattern-square"/></include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start>\(</start><end>\)</end>
|
||||
<include><context ref="in-pattern-round"/></include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start><</start><end>></end>
|
||||
<include><context ref="in-pattern-angle"/></include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<!-- '' doesn't usually have var expansion. -->
|
||||
<start>'</start><end>'</end>
|
||||
<include>
|
||||
<context style-ref="def:escape">
|
||||
<match>\\\\|\\'</match>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start>(?P<RD>\%{pattern-delimiter})</start>
|
||||
<end>\%{RD@start}</end>
|
||||
<include><context ref="in-pattern"/></include>
|
||||
</context>
|
||||
<context ref="asserted-comment"/>
|
||||
<context ref="error"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="simple-pattern-no-ve" once-only="true">
|
||||
<start/>
|
||||
<include>
|
||||
<context end-parent="true">
|
||||
<start>{</start><end>}</end>
|
||||
<include><context ref="in-pattern-curly-no-ve"/></include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start>\[</start><end>\]</end>
|
||||
<include><context ref="in-pattern-square-no-ve"/></include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start>\(</start><end>\)</end>
|
||||
<include><context ref="in-pattern-round-no-ve"/></include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start><</start><end>></end>
|
||||
<include><context ref="in-pattern-angle-no-ve"/></include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start>(?P<RD>\%{pattern-delimiter})</start>
|
||||
<end>\%{RD@start}</end>
|
||||
</context>
|
||||
<context ref="asserted-comment"/>
|
||||
<context ref="error"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="double-pattern" once-only="true">
|
||||
<start/>
|
||||
<include>
|
||||
<context end-parent="true">
|
||||
<start>'</start>
|
||||
<end>'</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context once-only="true">
|
||||
<start>(?<=(?P<RD>.))</start>
|
||||
<end>\%{RD@start}</end>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start>(?P<RD>\%{pattern-delimiter})</start>
|
||||
<end>\%{RD@start}</end>
|
||||
<include>
|
||||
<context once-only="true">
|
||||
<start>(?<=(?P<RD>.))</start>
|
||||
<end>\%{RD@start}</end>
|
||||
<include><context ref="in-pattern"/></include>
|
||||
</context>
|
||||
<context ref="in-pattern"/>
|
||||
</include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start/>
|
||||
<include>
|
||||
<context ref="simple-pattern"/>
|
||||
<!-- quick hack to include the same pattern twice: we surround it
|
||||
with a house-keeping context -->
|
||||
<context once-only="true" end-parent="true">
|
||||
<start>\%{end-of-pattern}</start>
|
||||
<end>\%{end-of-pattern}</end>
|
||||
<include><context ref="simple-pattern"/></include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="backtick-quoted-string" style-ref="string">
|
||||
<start>`</start>
|
||||
<end>`</end>
|
||||
<context id="double-pattern-no-ve" once-only="true">
|
||||
<start/>
|
||||
<include>
|
||||
<context end-parent="true">
|
||||
<start>(?P<RD>\%{pattern-delimiter})</start>
|
||||
<end>\%{RD@start}</end>
|
||||
<include>
|
||||
<context once-only="true">
|
||||
<start>(?<=(?P<RD>.))</start>
|
||||
<end>\%{RD@start}</end>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start/>
|
||||
<include>
|
||||
<context ref="simple-pattern-no-ve"/>
|
||||
<context once-only="true" end-parent="true">
|
||||
<start>\%{end-of-pattern}</start>
|
||||
<end>\%{end-of-pattern}</end>
|
||||
<include><context ref="simple-pattern-no-ve"/></include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="single-quoted-string">
|
||||
<include>
|
||||
<context style-ref="string">
|
||||
<start>'</start><end>'</end>
|
||||
<include>
|
||||
<context style-ref="def:escape">
|
||||
<match>\\\\|\\'</match>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
<context style-ref="string">
|
||||
<start>\%{pattern-before}q\b</start>
|
||||
<end>\%{end-of-pattern}</end>
|
||||
<include><context ref="simple-pattern-no-ve"/></include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="double-quoted-string">
|
||||
<include>
|
||||
<context style-ref="string">
|
||||
<start>"</start><end>"</end>
|
||||
<include><context ref="in-pattern"/></include>
|
||||
</context>
|
||||
<context style-ref="string">
|
||||
<start>\%{pattern-before}qq\b</start>
|
||||
<end>\%{end-of-pattern}</end>
|
||||
<include>
|
||||
<context ref="asserted-comment"/>
|
||||
<!-- qq'' *has* var expansion, so we can't just use
|
||||
<context ref="single-pattern"/>. -->
|
||||
<context end-parent="true">
|
||||
<start>{</start><end>}</end>
|
||||
<include><context ref="in-pattern-curly"/></include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start>\[</start><end>\]</end>
|
||||
<include><context ref="in-pattern-square"/></include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start>\(</start><end>\)</end>
|
||||
<include><context ref="in-pattern-round"/></include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start><</start><end>></end>
|
||||
<include><context ref="in-pattern-angle"/></include>
|
||||
</context>
|
||||
<context end-parent="true">
|
||||
<start>(?P<RD>\%{pattern-delimiter})</start>
|
||||
<end>\%{RD@start}</end>
|
||||
<include><context ref="in-pattern"/></include>
|
||||
</context>
|
||||
<context ref="error"/>
|
||||
</include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="word-list" style-ref="string">
|
||||
<start>\%{pattern-before}qw\b</start>
|
||||
<end>\%{end-of-pattern}</end>
|
||||
<include><context ref="simple-pattern-no-ve"/></include>
|
||||
</context>
|
||||
|
||||
<context id="regular-expression" style-ref="regex">
|
||||
<start>\%{pattern-before}qr\b</start>
|
||||
<end>\%{end-of-pattern}[imosx]*</end>
|
||||
<include><context ref="simple-pattern"/></include>
|
||||
</context>
|
||||
|
||||
<context id="system-command">
|
||||
<include>
|
||||
<context style-ref="system-command">
|
||||
<start>`</start><end>`</end>
|
||||
<include><context ref="in-pattern"/></include>
|
||||
</context>
|
||||
<context style-ref="system-command">
|
||||
<start>\%{pattern-before}qx\b</start>
|
||||
<end>\%{end-of-pattern}</end>
|
||||
<include><context ref="simple-pattern"/></include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="match" style-ref="regex">
|
||||
<start>\%{pattern-before}m\b</start>
|
||||
<end>\%{end-of-pattern}[cgimosx]*</end>
|
||||
<include><context ref="simple-pattern"/></include>
|
||||
</context>
|
||||
|
||||
<context id="substitution" style-ref="regex">
|
||||
<start>\%{pattern-before}s\b</start>
|
||||
<end>\%{end-of-pattern}[ecgimosx]*</end>
|
||||
<include><context ref="double-pattern"/></include>
|
||||
</context>
|
||||
|
||||
<context id="transliteration" style-ref="regex">
|
||||
<start>\%{pattern-before}(tr|y)\b</start>
|
||||
<end>\%{end-of-pattern}[cds]*</end>
|
||||
<include><context ref="double-pattern-no-ve"/></include>
|
||||
</context>
|
||||
|
||||
<!-- hacks, mostly taken from vim's perl.vim. As they say:
|
||||
“Below some hacks to recognise the // variant. This is virtually
|
||||
impossible to catch in all cases as the / is used in so many other
|
||||
ways, but these should be the most obvious ones.” -->
|
||||
<context id="match-slashslash">
|
||||
<include>
|
||||
<context style-inside="true" style-ref="regex">
|
||||
<start>(^|[^$@%&])(split|while|if)\s+(/)</start>
|
||||
<end>/[cgimosx]*</end>
|
||||
<include>
|
||||
<context sub-pattern="2" where="start" style-ref="builtin-function"/>
|
||||
<context sub-pattern="3" where="start" style-ref="regex"/>
|
||||
<context sub-pattern="0" where="end" style-ref="regex"/>
|
||||
<context ref="in-pattern"/>
|
||||
</include>
|
||||
</context>
|
||||
<context style-inside="true" style-ref="regex">
|
||||
<start>(^|(?<=[\(\{]))\s*(/)</start>
|
||||
<end>/[cgimosx]*</end>
|
||||
<include>
|
||||
<context sub-pattern="2" where="start" style-ref="regex"/>
|
||||
<context sub-pattern="0" where="end" style-ref="regex"/>
|
||||
<context ref="in-pattern"/>
|
||||
</include>
|
||||
</context>
|
||||
<context style-inside="true" style-ref="regex">
|
||||
<start>\%{operator}\s*(/)</start>
|
||||
<end>/[cgimosx]*</end>
|
||||
<include>
|
||||
<context sub-pattern="1" where="start" style-ref="operator"/>
|
||||
<context sub-pattern="2" where="start" style-ref="regex"/>
|
||||
<context sub-pattern="0" where="end" style-ref="regex"/>
|
||||
<context ref="in-pattern"/>
|
||||
</include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<!-- #### HEREDOC STRINGS ############################################# -->
|
||||
|
||||
<define-regex id="here-doc-bound-char">[^\s'"=;]</define-regex>
|
||||
|
||||
<context id="here-doc-no-ve">
|
||||
<start><<\'(?P<HDB>\%{here-doc-bound-char}*)\'</start>
|
||||
<end>^\%{HDB@start}$</end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="here-doc-bound"/>
|
||||
<context sub-pattern="0" where="end" style-ref="here-doc-bound"/>
|
||||
<context once-only="true" end-at-line-end="true">
|
||||
<start/><include><context ref="perl"/></include>
|
||||
</context>
|
||||
<context style-ref="here-doc" extend-parent="false"><start/></context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="here-doc">
|
||||
<start extended="true" dupnames="true">
|
||||
<<
|
||||
(
|
||||
\"(?P<HDB>\%{here-doc-bound-char}*)\"| # "EOF"
|
||||
(?P<HDB>\%{here-doc-bound-char}*) # EOF
|
||||
)
|
||||
</start>
|
||||
<end>^\%{HDB@start}$</end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="here-doc-bound"/>
|
||||
<context sub-pattern="0" where="end" style-ref="here-doc-bound"/>
|
||||
<context once-only="true" end-at-line-end="true">
|
||||
<start/><include><context ref="perl"/></include>
|
||||
</context>
|
||||
<context style-ref="here-doc" extend-parent="false">
|
||||
<start/>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="variable"/>
|
||||
</include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="variables" style-ref="data-type">
|
||||
<match>[$@%][$]?[a-zA-Z_][a-zA-Z0-9_]*</match>
|
||||
<!-- #### KEYWORDS / BUILTINS / ETC ################################### -->
|
||||
|
||||
<define-regex id="function">[a-zA-Z_][a-zA-Z0-9_]*</define-regex>
|
||||
|
||||
<!-- in sub context, everything is a function -->
|
||||
<context id="sub">
|
||||
<match>(sub)\s+\%{function}\b</match>
|
||||
<include><context sub-pattern="1" style-ref="keyword"/></include>
|
||||
</context>
|
||||
|
||||
<context id="function-call" style-ref="others">
|
||||
<match>&[a-zA-Z_][a-zA-Z0-9_]*</match>
|
||||
<context id="file-descriptor" style-ref="file-descriptor">
|
||||
<keyword>STDIN</keyword>
|
||||
<keyword>STDOUT</keyword>
|
||||
<keyword>STDERR</keyword>
|
||||
</context>
|
||||
|
||||
<context id="method-call" style-ref="others">
|
||||
<match>->[a-zA-Z_][a-zA-Z0-9_]*</match>
|
||||
<context id="control" style-ref="control">
|
||||
<keyword>BEGIN</keyword>
|
||||
<keyword>END</keyword>
|
||||
<keyword>CHECK</keyword>
|
||||
<keyword>INIT</keyword>
|
||||
</context>
|
||||
|
||||
<context id="operators" style-ref="operator">
|
||||
<keyword>and</keyword>
|
||||
<keyword>cmp</keyword>
|
||||
<keyword>eq</keyword>
|
||||
<keyword>ge</keyword>
|
||||
<keyword>gt</keyword>
|
||||
<keyword>le</keyword>
|
||||
<keyword>lt</keyword>
|
||||
<keyword>m</keyword>
|
||||
<keyword>ne</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>q</keyword>
|
||||
<keyword>qq</keyword>
|
||||
<keyword>qr</keyword>
|
||||
<keyword>qw</keyword>
|
||||
<keyword>qx</keyword>
|
||||
<keyword>s</keyword>
|
||||
<keyword>tr</keyword>
|
||||
<keyword>xor</keyword>
|
||||
<context id="include-statement">
|
||||
<include>
|
||||
<context style-ref="include-statement">
|
||||
<keyword>require</keyword>
|
||||
</context>
|
||||
<context>
|
||||
<!-- 'use' and 'no' can be used with special flags, so we try to
|
||||
highlight them as well. -->
|
||||
<start>(use|no)\s</start>
|
||||
<end>;</end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="include-statement"/>
|
||||
<context once-only="true" style-ref="include-statement">
|
||||
<keyword>attributes</keyword>
|
||||
<keyword>autouse</keyword>
|
||||
<keyword>base</keyword>
|
||||
<keyword>bigint</keyword>
|
||||
<keyword>bignum</keyword>
|
||||
<keyword>bigrat</keyword>
|
||||
<keyword>blib</keyword>
|
||||
<keyword>bytes</keyword>
|
||||
<keyword>charnames</keyword>
|
||||
<keyword>constant</keyword>
|
||||
<keyword>diagnostics</keyword>
|
||||
<keyword>encoding</keyword>
|
||||
<keyword>fields</keyword>
|
||||
<keyword>fileset</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>integer</keyword>
|
||||
<keyword>less</keyword>
|
||||
<keyword>lib</keyword>
|
||||
<keyword>locale</keyword>
|
||||
<keyword>open</keyword>
|
||||
<keyword>ops</keyword>
|
||||
<keyword>overload</keyword>
|
||||
<keyword>re</keyword>
|
||||
<keyword>sigtrap</keyword>
|
||||
<keyword>sort</keyword>
|
||||
<keyword>strict</keyword>
|
||||
<keyword>subs</keyword>
|
||||
<keyword>threads</keyword>
|
||||
<keyword>threads::shared</keyword>
|
||||
<keyword>utf8</keyword>
|
||||
<keyword>vars</keyword>
|
||||
<keyword>vmish</keyword>
|
||||
<keyword>warnings</keyword>
|
||||
<keyword>warnings::register</keyword>
|
||||
</context>
|
||||
<context ref="perl"/>
|
||||
</include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="keywords" style-ref="keyword">
|
||||
<context id="keyword" style-ref="keyword">
|
||||
<keyword>break</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>each</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elsif</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>last</keyword>
|
||||
<keyword>local</keyword>
|
||||
<keyword>my</keyword>
|
||||
<keyword>next</keyword>
|
||||
<keyword>our</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>sub</keyword>
|
||||
<keyword>unless</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>__FILE__</keyword>
|
||||
<keyword>__LINE__</keyword>
|
||||
<keyword>__PACKAGE__</keyword>
|
||||
</context>
|
||||
|
||||
<context id="builtin-function" style-ref="builtin-function">
|
||||
<!-- see `man perlfunc` -->
|
||||
<keyword>abs</keyword>
|
||||
<keyword>accept</keyword>
|
||||
<keyword>alarm</keyword>
|
||||
|
@ -133,7 +712,6 @@
|
|||
<keyword>closedir</keyword>
|
||||
<keyword>close</keyword>
|
||||
<keyword>connect</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>cos</keyword>
|
||||
<keyword>crypt</keyword>
|
||||
<keyword>dbmclose</keyword>
|
||||
|
@ -141,12 +719,8 @@
|
|||
<keyword>defined</keyword>
|
||||
<keyword>delete</keyword>
|
||||
<keyword>die</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>dump</keyword>
|
||||
<keyword>each</keyword>
|
||||
<keyword>elseif</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elsif</keyword>
|
||||
<keyword>endgrent</keyword>
|
||||
<keyword>endhostent</keyword>
|
||||
<keyword>endnetent</keyword>
|
||||
|
@ -162,8 +736,6 @@
|
|||
<keyword>fcntl</keyword>
|
||||
<keyword>fileno</keyword>
|
||||
<keyword>flock</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>fork</keyword>
|
||||
<keyword>format</keyword>
|
||||
<keyword>formline</keyword>
|
||||
|
@ -198,7 +770,6 @@
|
|||
<keyword>goto</keyword>
|
||||
<keyword>grep</keyword>
|
||||
<keyword>hex</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>index</keyword>
|
||||
<keyword>int</keyword>
|
||||
|
@ -206,13 +777,11 @@
|
|||
<keyword>join</keyword>
|
||||
<keyword>keys</keyword>
|
||||
<keyword>kill</keyword>
|
||||
<keyword>last</keyword>
|
||||
<keyword>lcfirst</keyword>
|
||||
<keyword>lc</keyword>
|
||||
<keyword>length</keyword>
|
||||
<keyword>link</keyword>
|
||||
<keyword>listen</keyword>
|
||||
<keyword>local</keyword>
|
||||
<keyword>localtime</keyword>
|
||||
<keyword>log</keyword>
|
||||
<keyword>lstat</keyword>
|
||||
|
@ -222,15 +791,11 @@
|
|||
<keyword>msgget</keyword>
|
||||
<keyword>msgrcv</keyword>
|
||||
<keyword>msgsnd</keyword>
|
||||
<keyword>my</keyword>
|
||||
<keyword>next</keyword>
|
||||
<keyword>no</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>oct</keyword>
|
||||
<keyword>opendir</keyword>
|
||||
<keyword>open</keyword>
|
||||
<keyword>ord</keyword>
|
||||
<keyword>our</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>pack</keyword>
|
||||
<keyword>pipe</keyword>
|
||||
<keyword>pop</keyword>
|
||||
|
@ -248,9 +813,7 @@
|
|||
<keyword>redo</keyword>
|
||||
<keyword>ref</keyword>
|
||||
<keyword>rename</keyword>
|
||||
<keyword>require</keyword>
|
||||
<keyword>reset</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>reverse</keyword>
|
||||
<keyword>rewinddir</keyword>
|
||||
<keyword>rindex</keyword>
|
||||
|
@ -290,7 +853,6 @@
|
|||
<keyword>srand</keyword>
|
||||
<keyword>stat</keyword>
|
||||
<keyword>study</keyword>
|
||||
<keyword>sub</keyword>
|
||||
<keyword>substr</keyword>
|
||||
<keyword>symlink</keyword>
|
||||
<keyword>syscall</keyword>
|
||||
|
@ -309,13 +871,10 @@
|
|||
<keyword>uc</keyword>
|
||||
<keyword>umask</keyword>
|
||||
<keyword>undef</keyword>
|
||||
<keyword>unless</keyword>
|
||||
<keyword>unlink</keyword>
|
||||
<keyword>unpack</keyword>
|
||||
<keyword>unshift</keyword>
|
||||
<keyword>untie</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>use</keyword>
|
||||
<keyword>utime</keyword>
|
||||
<keyword>values</keyword>
|
||||
<keyword>vec</keyword>
|
||||
|
@ -323,26 +882,132 @@
|
|||
<keyword>waitpid</keyword>
|
||||
<keyword>wantarray</keyword>
|
||||
<keyword>warn</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>write</keyword>
|
||||
</context>
|
||||
|
||||
<context id="perl">
|
||||
<!-- #### COMMENTS / POD / DATA ####################################### -->
|
||||
|
||||
<!-- usual comments for perl are def:shell-style-comment -->
|
||||
<!-- comment that must have a whitespace before (used in s{}{}, because
|
||||
perl bugs if there is no space between '}' and '#') -->
|
||||
<context id="asserted-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>(?<![^\s])#</start>
|
||||
<include><context ref="def:in-comment"/></include>
|
||||
</context>
|
||||
|
||||
<context id="line-directive" style-ref="line-directive">
|
||||
<!-- see `man perlsyn` line 676 -->
|
||||
<match extended="true">
|
||||
^\# \s*
|
||||
(line \s+ (\d+)) \s*
|
||||
(?:(\s"([^"]+)"|[^"]+))? \s*
|
||||
$
|
||||
</match>
|
||||
<include>
|
||||
<context ref="def:shebang"/>
|
||||
<context ref="def:shell-like-comment"/>
|
||||
<context ref="pod"/>
|
||||
<context ref="double-quoted-string"/>
|
||||
<context ref="single-quoted-string"/>
|
||||
<context ref="backtick-quoted-string"/>
|
||||
<context ref="variables"/>
|
||||
<context ref="function-call"/>
|
||||
<context ref="method-call"/>
|
||||
<context ref="operators"/>
|
||||
<context ref="keywords"/>
|
||||
<context sub-pattern="3" style-ref="string"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
<context id="in-pod">
|
||||
<include>
|
||||
<context ref="def:in-comment"/>
|
||||
<context ref="pod-escape"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="pod-escape">
|
||||
<include>
|
||||
<context>
|
||||
<start>[IBCLEFSXZ]<(?!<)</start><end>(?<!>)></end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="pod-escape"/>
|
||||
<context sub-pattern="0" where="end" style-ref="pod-escape"/>
|
||||
<context ref="in-pod"/>
|
||||
</include>
|
||||
</context>
|
||||
<!-- doubled angle brackets ("<<" and ">>") may be used if and only if
|
||||
there is whitespace right after the opening delimiter and
|
||||
whitespace right before the closing delimiter! (`man perlpod`) -->
|
||||
<context>
|
||||
<start>[IBCLEFSXZ]<{2}\s</start><end>\s>{2}</end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="pod-escape"/>
|
||||
<context sub-pattern="0" where="end" style-ref="pod-escape"/>
|
||||
<context ref="in-pod"/>
|
||||
</include>
|
||||
</context>
|
||||
<context>
|
||||
<start>[IBCLEFSXZ]<{3}\s</start><end>\s>{3}</end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="pod-escape"/>
|
||||
<context sub-pattern="0" where="end" style-ref="pod-escape"/>
|
||||
<context ref="in-pod"/>
|
||||
</include>
|
||||
</context>
|
||||
<context>
|
||||
<start>[IBCLEFSXZ]<{4}\s</start><end>\s>{4}</end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="pod-escape"/>
|
||||
<context sub-pattern="0" where="end" style-ref="pod-escape"/>
|
||||
<context ref="in-pod"/>
|
||||
</include>
|
||||
</context>
|
||||
<context>
|
||||
<start>[IBCLEFSXZ]<{5}\s</start><end>\s>{5}</end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="pod-escape"/>
|
||||
<context sub-pattern="0" where="end" style-ref="pod-escape"/>
|
||||
<context ref="in-pod"/>
|
||||
</include>
|
||||
</context>
|
||||
<context>
|
||||
<start>[IBCLEFSXZ]<{6}\s</start><end>\s>{6}</end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="pod-escape"/>
|
||||
<context sub-pattern="0" where="end" style-ref="pod-escape"/>
|
||||
<context ref="in-pod"/>
|
||||
</include>
|
||||
</context>
|
||||
<!-- one should be insane to put there more than 6 brackets -->
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="pod-heading" end-at-line-end="true" style-inside="true" style-ref="pod-heading">
|
||||
<start>^=(head[1-4])</start>
|
||||
<include>
|
||||
<context sub-pattern="1" where="start" style-ref="pod-keyword"/>
|
||||
<context ref="in-pod"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="pod" style-ref="comment">
|
||||
<start>^(?=(=[a-z]))</start>
|
||||
<end>^=(cut)$</end>
|
||||
<include>
|
||||
<context sub-pattern="1" where="end" style-ref="pod-keyword"/>
|
||||
<context ref="pod-heading"/>
|
||||
<context>
|
||||
<match>^=(pod|encoding|over|item|back)</match>
|
||||
<include><context sub-pattern="1" style-ref="pod-keyword"/></include>
|
||||
</context>
|
||||
<context>
|
||||
<start>^=(begin)\s+(.*)$</start>
|
||||
<end>^=(end)\s+\%{1@start}$</end>
|
||||
<include>
|
||||
<context sub-pattern="1" where="start" style-ref="pod-keyword"/>
|
||||
<context sub-pattern="1" where="end" style-ref="pod-keyword"/>
|
||||
<context ref="pod"/>
|
||||
</include>
|
||||
</context>
|
||||
<context ref="in-pod"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="data" style-ref="comment">
|
||||
<start>__(DATA|END)__</start>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="keyword"/>
|
||||
</include>
|
||||
</context>
|
||||
</definitions>
|
||||
</language>
|
||||
|
|
|
@ -57,14 +57,6 @@
|
|||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
<!-- FIXME no \n in patterns! -->
|
||||
<context id="comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>^#$|^#[^:,\n]</start>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="keyword" style-ref="keyword">
|
||||
<prefix>^</prefix>
|
||||
<keyword>domain</keyword>
|
||||
|
@ -77,7 +69,7 @@
|
|||
<context ref="string"/>
|
||||
<context ref="format"/>
|
||||
<context ref="location"/>
|
||||
<context ref="comment"/>
|
||||
<context ref="def:shell-like-comment" style-ref="comment"/>
|
||||
<context ref="keyword"/>
|
||||
</include>
|
||||
</context>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<styles>
|
||||
<style id="special-variables" _name="Special variables" map-to="def:data-type"/>
|
||||
<style id="module-handler" _name="Module handler" map-to="def:character"/>
|
||||
<style id="module-handler" _name="Module handler" map-to="def:preprocessor"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="function" _name="Function" map-to="def:keyword"/>
|
||||
<style id="builtins" _name="Builtins" map-to="def:data-type"/>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:preprocessor"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:special-value"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="function" _name="Function" map-to="def:function"/>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<style id="function" _name="Function" map-to="def:function"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="some-thing" _name="No idea what it is" map-to="def:preprocessor"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -450,16 +450,16 @@
|
|||
<keyword>REGEXP_LIKE</keyword>
|
||||
<keyword>(NOT[ \t]+)?SUBMULTISET([ \t]+OF)?</keyword>
|
||||
</context>
|
||||
<context id="sql-plus-at-sign" style-ref="preprocessor">
|
||||
<context id="sql-plus-at-sign" style-ref="some-thing">
|
||||
<match>^[ \t]*@</match>
|
||||
</context>
|
||||
<context id="sql-plus-double-at-sign" style-ref="preprocessor">
|
||||
<context id="sql-plus-double-at-sign" style-ref="some-thing">
|
||||
<match>^[ \t]*@@</match>
|
||||
</context>
|
||||
<context id="sql-plus-slash" style-ref="preprocessor">
|
||||
<context id="sql-plus-slash" style-ref="some-thing">
|
||||
<match>^[ \t]*/</match>
|
||||
</context>
|
||||
<context id="sql-plus-commands" style-ref="preprocessor">
|
||||
<context id="sql-plus-commands" style-ref="some-thing">
|
||||
<prefix>^[ \t]*</prefix>
|
||||
<keyword>ACC(EPT)?</keyword>
|
||||
<keyword>A(PPEND)?</keyword>
|
||||
|
|
|
@ -84,13 +84,11 @@
|
|||
<style name="def:preprocessor" foreground="chocolate2"/>
|
||||
|
||||
<!-- Language specific -->
|
||||
<style name="c:preprocessor" use-style="def:preprocessor"/>
|
||||
|
||||
<style name="changelog:email" use-style="def:net-address-in-comment"/>
|
||||
|
||||
<style name="diff:added-line" foreground="chameleon3"/>
|
||||
<style name="diff:removed-line" foreground="plum3"/>
|
||||
<style name="diff:changed-line" use-style="c:preprocessor"/>
|
||||
<style name="diff:changed-line" use-style="def:preprocessor"/>
|
||||
<style name="diff:diff-file" use-style="def:data-type"/>
|
||||
<style name="diff:location" use-style="def:keyword"/>
|
||||
|
||||
|
@ -101,7 +99,7 @@
|
|||
|
||||
<style name="latex:display-math" foreground="plum3"/>
|
||||
<style name="latex:command" foreground="chameleon3" bold="true"/>
|
||||
<style name="latex:include" use-style="c:preprocessor"/>
|
||||
<style name="latex:include" use-style="def:preprocessor"/>
|
||||
|
||||
<style name="python:builtins" foreground="chameleon3" bold="true"/>
|
||||
|
||||
|
@ -111,7 +109,7 @@
|
|||
<style name="xml:attribute-name" foreground="plum3"/>
|
||||
<style name="xml:tags" foreground="chameleon3"/>
|
||||
<style name="xml:namespace" foreground="chameleon3" bold="true"/>
|
||||
<style name="xml:doctype" use-style="c:preprocessor"/>
|
||||
<style name="xml:cdata-delim" use-style="c:preprocessor"/>
|
||||
<style name="xml:processing-instruction" use-style="c:preprocessor"/>
|
||||
<style name="xml:doctype" use-style="def:preprocessor"/>
|
||||
<style name="xml:cdata-delim" use-style="def:preprocessor"/>
|
||||
<style name="xml:processing-instruction" use-style="def:preprocessor"/>
|
||||
</style-scheme>
|
||||
|
|
|
@ -5,13 +5,7 @@
|
|||
# gap.lang gtkrc.lang html.lang ini.lang latex.lang m4.lang
|
||||
# makefile.lang ms.lang perl.lang po.lang python.lang sh.lang
|
||||
# texinfo.lang xml.lang yacc.lang libtool.lang pkgconfig.lang
|
||||
|
||||
# Langs not covered:
|
||||
# ada.lang boo.lang csharp.lang css.lang def.lang d.lang gtk-doc.lang
|
||||
# fortran.lang haskell.lang idl.lang java.lang javascript.lang lua.lang
|
||||
# msil.lang nemerle.lang octave.lang pascal.lang php.lang python-console.lang
|
||||
# R.lang ruby.lang scheme.lang sql.lang tcl.lang vbnet.lang verilog.lang
|
||||
# vhdl.lang dpatch.lang
|
||||
# objc.lang chdr.lang
|
||||
|
||||
dir="testdir"
|
||||
mkdir -p $dir/
|
||||
|
@ -100,6 +94,7 @@ bar:
|
|||
EOFEOF
|
||||
|
||||
cat > $dir/file.ms <<EOFEOF
|
||||
# -*- mooscript -*-
|
||||
a = 1;
|
||||
for i in [1, 2, 3] do
|
||||
a *= i;
|
||||
|
@ -191,6 +186,7 @@ Encoding=UTF-8
|
|||
_Name=medit
|
||||
_Comment=Text editor
|
||||
Exec=medit %F
|
||||
# blah blah blah
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
|
@ -236,7 +232,7 @@ id=APlugin
|
|||
_name=A Plugin
|
||||
_description=A plugin
|
||||
author=Some Guy
|
||||
# this is a plugin version, can be anything
|
||||
; this is a plugin version, can be anything
|
||||
version=3.1415926
|
||||
EOFEOF
|
||||
|
||||
|
@ -511,3 +507,41 @@ Version:
|
|||
Cflags: -I${prefix}/include/moo
|
||||
Libs: -L${libdir} -lmoo -L/usr/lib/python2.4 -lpython2.4 -lpthread -ldl -lutil
|
||||
EOFEOF
|
||||
|
||||
cat > $dir/file.m <<EOFEOF
|
||||
#import <stdio.h>
|
||||
#import <Object.h>
|
||||
@interface Lalala : Object
|
||||
- (BOOL) sayHello;
|
||||
@end
|
||||
|
||||
@implementation Lalala : Object
|
||||
- (BOOL) sayHello
|
||||
{
|
||||
printf ("Hello there!\n");
|
||||
return YES;
|
||||
}
|
||||
@end
|
||||
|
||||
int main (void)
|
||||
{
|
||||
Lalala *obj = [[Lalala alloc] init];
|
||||
[obj sayHello];
|
||||
[obj free];
|
||||
return 0;
|
||||
}
|
||||
EOFEOF
|
||||
|
||||
cat > $dir/file.h <<EOFEOF
|
||||
/* A C header damn it */
|
||||
#include <foo.h>
|
||||
#import <Object.h>
|
||||
|
||||
@interface Lalala : Object
|
||||
- (void) sayHello;
|
||||
@end
|
||||
|
||||
class Boo {
|
||||
void hello ();
|
||||
};
|
||||
EOFEOF
|
||||
|
|
|
@ -33,7 +33,10 @@
|
|||
<style id="others" _name="Others"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="macros" _name="Macros" map-to="def:keyword"/>
|
||||
<style id="file-attributes" _name="File Attributes" map-to="def:keyword"/>
|
||||
<style id="generated-content" _name="Generated Content" map-to="def:keyword"/>
|
||||
<style id="include" _name="Include" map-to="def:preprocessor"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -67,18 +70,18 @@
|
|||
<context ref="generated-line-escape"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="macros" style-ref="preprocessor">
|
||||
<context id="macros" style-ref="macros">
|
||||
<prefix>^@</prefix>
|
||||
<suffix></suffix>
|
||||
<keyword>alias</keyword>
|
||||
<keyword>alias\b</keyword>
|
||||
<keyword>bye$</keyword>
|
||||
<keyword>clear</keyword>
|
||||
<keyword>defcodeindex</keyword>
|
||||
<keyword>defindex</keyword>
|
||||
<keyword>definfoenclose</keyword>
|
||||
<keyword>clear\b</keyword>
|
||||
<keyword>defcodeindex\b</keyword>
|
||||
<keyword>defindex\b</keyword>
|
||||
<keyword>definfoenclose\b</keyword>
|
||||
<keyword>(end )?docbook$</keyword>
|
||||
<keyword>(end )?html$</keyword>
|
||||
<keyword>ifclear</keyword>
|
||||
<keyword>ifclear\b</keyword>
|
||||
<keyword>end ifclear$</keyword>
|
||||
<keyword>(end )?if(not)?docbook$</keyword>
|
||||
<keyword>(end )?if(not)?html$</keyword>
|
||||
|
@ -86,21 +89,20 @@
|
|||
<keyword>(end )?if(not)?plaintext$</keyword>
|
||||
<keyword>(end )?if(not)?tex$</keyword>
|
||||
<keyword>(end )?if(not)?xml$</keyword>
|
||||
<keyword>ifset</keyword>
|
||||
<keyword>ifset\b</keyword>
|
||||
<keyword>end ifset$</keyword>
|
||||
<keyword>lowersections$</keyword>
|
||||
<keyword>macro</keyword>
|
||||
<keyword>macro\b</keyword>
|
||||
<keyword>end macro$</keyword>
|
||||
<keyword>raisesections$</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>syncodeindex</keyword>
|
||||
<keyword>synindex</keyword>
|
||||
<keyword>set\b</keyword>
|
||||
<keyword>syncodeindex\b</keyword>
|
||||
<keyword>synindex\b</keyword>
|
||||
<keyword>(end )?tex$</keyword>
|
||||
<keyword>(end )?xml$</keyword>
|
||||
</context>
|
||||
<context id="indexing" style-ref="keyword">
|
||||
<prefix>^@</prefix>
|
||||
<suffix></suffix>
|
||||
<keyword>cindex</keyword>
|
||||
<keyword>findex</keyword>
|
||||
<keyword>kindex</keyword>
|
||||
|
@ -108,40 +110,40 @@
|
|||
<keyword>tindex</keyword>
|
||||
<keyword>vindex</keyword>
|
||||
</context>
|
||||
<context id="file-attributes" style-ref="preprocessor">
|
||||
<context id="file-attributes" style-ref="file-attributes">
|
||||
<prefix>^@</prefix>
|
||||
<suffix></suffix>
|
||||
<keyword>afivepaper$</keyword>
|
||||
<keyword>afourlatex$</keyword>
|
||||
<keyword>afourpaper$</keyword>
|
||||
<keyword>afourwide$</keyword>
|
||||
<keyword>dircategory</keyword>
|
||||
<keyword>dircategory\b</keyword>
|
||||
<keyword>(end )?direntry$</keyword>
|
||||
<keyword>(end )?documentdescription$</keyword>
|
||||
<keyword>documentencoding</keyword>
|
||||
<keyword>documentlanguage</keyword>
|
||||
<keyword>evenfooting</keyword>
|
||||
<keyword>evenheading</keyword>
|
||||
<keyword>everyfooting</keyword>
|
||||
<keyword>everyheading</keyword>
|
||||
<keyword>documentencoding\b</keyword>
|
||||
<keyword>documentlanguage\b</keyword>
|
||||
<keyword>evenfooting\b</keyword>
|
||||
<keyword>evenheading\b</keyword>
|
||||
<keyword>everyfooting\b</keyword>
|
||||
<keyword>everyheading\b</keyword>
|
||||
<keyword>finalout$</keyword>
|
||||
<keyword>footnotestyle</keyword>
|
||||
<keyword>headings</keyword>
|
||||
<keyword>kbdinputstyle</keyword>
|
||||
<keyword>footnotestyle\b</keyword>
|
||||
<keyword>headings\b</keyword>
|
||||
<keyword>kbdinputstyle\b</keyword>
|
||||
<keyword>novalidate$</keyword>
|
||||
<keyword>oddfooting</keyword>
|
||||
<keyword>oddheading</keyword>
|
||||
<keyword>pagesizes</keyword>
|
||||
<keyword>paragraphindent</keyword>
|
||||
<keyword>setchapternewpage</keyword>
|
||||
<keyword>oddfooting\b</keyword>
|
||||
<keyword>oddheading\b</keyword>
|
||||
<keyword>pagesizes\b</keyword>
|
||||
<keyword>paragraphindent\b</keyword>
|
||||
<keyword>setchapternewpage\b</keyword>
|
||||
<keyword>setcontentsaftertitlepage$</keyword>
|
||||
<keyword>setfilename</keyword>
|
||||
<keyword>setfilename\b</keyword>
|
||||
<keyword>setshortcontentsaftertitlepage$</keyword>
|
||||
<keyword>settitle</keyword>
|
||||
<keyword>settitle\b</keyword>
|
||||
<keyword>smallbook$</keyword>
|
||||
<keyword>titlefont</keyword>
|
||||
<keyword>titlefont\b</keyword>
|
||||
</context>
|
||||
<context id="generated-content" style-ref="preprocessor">
|
||||
<context id="generated-content" style-ref="generated-content">
|
||||
<prefix></prefix>
|
||||
<suffix></suffix>
|
||||
<keyword>^@contents$</keyword>
|
||||
|
@ -151,27 +153,25 @@
|
|||
<keyword>^@shortcontents$</keyword>
|
||||
<keyword>^@shorttitlepage$</keyword>
|
||||
<keyword>^@summarycontents$</keyword>
|
||||
<keyword>@thischapter</keyword>
|
||||
<keyword>@thischaptername</keyword>
|
||||
<keyword>@thisfile</keyword>
|
||||
<keyword>@thispage</keyword>
|
||||
<keyword>@thistitle</keyword>
|
||||
<keyword>@today</keyword>
|
||||
<keyword>@value</keyword>
|
||||
<keyword>@verb</keyword>
|
||||
<keyword>@thischapter\b</keyword>
|
||||
<keyword>@thischaptername\b</keyword>
|
||||
<keyword>@thisfile\b</keyword>
|
||||
<keyword>@thispage\b</keyword>
|
||||
<keyword>@thistitle\b</keyword>
|
||||
<keyword>@today\b</keyword>
|
||||
<keyword>@value\b</keyword>
|
||||
<keyword>@verb\b</keyword>
|
||||
<keyword>^@(end )?verbatim$</keyword>
|
||||
<keyword>^@verbatiminclude</keyword>
|
||||
<keyword>^@verbatiminclude\b</keyword>
|
||||
</context>
|
||||
<context id="include" style-ref="preprocessor">
|
||||
<context id="include" style-ref="include">
|
||||
<prefix></prefix>
|
||||
<suffix></suffix>
|
||||
<keyword>^\\input</keyword>
|
||||
<keyword>^@include</keyword>
|
||||
<keyword>@image</keyword>
|
||||
</context>
|
||||
<context id="markup-inline" style-ref="keyword">
|
||||
<prefix>@</prefix>
|
||||
<suffix></suffix>
|
||||
<keyword>acronym</keyword>
|
||||
<keyword>anchor</keyword>
|
||||
<keyword>caption</keyword>
|
||||
|
@ -203,93 +203,93 @@
|
|||
<context id="markup-block" style-ref="keyword">
|
||||
<prefix>^@</prefix>
|
||||
<suffix></suffix>
|
||||
<keyword>author</keyword>
|
||||
<keyword>author\b</keyword>
|
||||
<keyword>(end )?copying$</keyword>
|
||||
<keyword>defcv(x)?</keyword>
|
||||
<keyword>defcv(x)?\b</keyword>
|
||||
<keyword>end defcv$</keyword>
|
||||
<keyword>deff(u)?n(x)?</keyword>
|
||||
<keyword>deff(u)?n(x)?\b</keyword>
|
||||
<keyword>end def(u)?n$</keyword>
|
||||
<keyword>defivar(x)?</keyword>
|
||||
<keyword>defivar(x)?\b</keyword>
|
||||
<keyword>end defivar$</keyword>
|
||||
<keyword>defmac(x)?</keyword>
|
||||
<keyword>defmac(x)?\b</keyword>
|
||||
<keyword>end defmac$</keyword>
|
||||
<keyword>defmethod(x)?</keyword>
|
||||
<keyword>defmethod(x)?\b</keyword>
|
||||
<keyword>end defmethod$</keyword>
|
||||
<keyword>defop(x)?</keyword>
|
||||
<keyword>defop(x)?\b</keyword>
|
||||
<keyword>end defop$</keyword>
|
||||
<keyword>defopt(x)?</keyword>
|
||||
<keyword>defopt(x)?\b</keyword>
|
||||
<keyword>end defopt$</keyword>
|
||||
<keyword>defspec(x)?</keyword>
|
||||
<keyword>defspec(x)?\b</keyword>
|
||||
<keyword>end defspec$</keyword>
|
||||
<keyword>deftp(x)?</keyword>
|
||||
<keyword>deftp(x)?\b</keyword>
|
||||
<keyword>end deftp$</keyword>
|
||||
<keyword>deftypecv(x)?</keyword>
|
||||
<keyword>deftypecv(x)?\b</keyword>
|
||||
<keyword>end deftypecv$</keyword>
|
||||
<keyword>deftypef(u)?n(x)?</keyword>
|
||||
<keyword>deftypef(u)?n(x)?\b</keyword>
|
||||
<keyword>end deftypef(u)?n$</keyword>
|
||||
<keyword>deftypeivar(x)?</keyword>
|
||||
<keyword>deftypeivar(x)?\b</keyword>
|
||||
<keyword>end deftypevar$</keyword>
|
||||
<keyword>deftypemethod(x)?</keyword>
|
||||
<keyword>deftypemethod(x)?\b</keyword>
|
||||
<keyword>end deftypemethod$</keyword>
|
||||
<keyword>deftypeop(x)?</keyword>
|
||||
<keyword>deftypeop(x)?\b</keyword>
|
||||
<keyword>end deftypeop$</keyword>
|
||||
<keyword>deftypevar(x)?</keyword>
|
||||
<keyword>deftypevar(x)?\b</keyword>
|
||||
<keyword>end deftypevar$</keyword>
|
||||
<keyword>deftypevr(x)?</keyword>
|
||||
<keyword>deftypevr(x)?\b</keyword>
|
||||
<keyword>end deftypevr$</keyword>
|
||||
<keyword>defv(a)?r(x)?</keyword>
|
||||
<keyword>defv(a)?r(x)?\b</keyword>
|
||||
<keyword>end defv(a)?r$</keyword>
|
||||
<keyword>(end )?display$</keyword>
|
||||
<keyword>enumerate</keyword>
|
||||
<keyword>enumerate\b</keyword>
|
||||
<keyword>end enumerate$</keyword>
|
||||
<keyword>(end )?example$</keyword>
|
||||
<keyword>(end )?exampleindent$</keyword>
|
||||
<keyword>(end )?format$</keyword>
|
||||
<keyword>ftable</keyword>
|
||||
<keyword>ftable\b</keyword>
|
||||
<keyword>end ftable$</keyword>
|
||||
<keyword>item$</keyword>
|
||||
<keyword>itemize</keyword>
|
||||
<keyword>itemize\b</keyword>
|
||||
<keyword>end itemize$</keyword>
|
||||
<keyword>itemx$</keyword>
|
||||
<keyword>(end )?lisp$</keyword>
|
||||
<keyword>multitable</keyword>
|
||||
<keyword>multitable\b</keyword>
|
||||
<keyword>end multitable$</keyword>
|
||||
<keyword>(end )?quotation$</keyword>
|
||||
<keyword>(end )?smalldisplay$</keyword>
|
||||
<keyword>(end )?smallexample$</keyword>
|
||||
<keyword>(end )?smallformat$</keyword>
|
||||
<keyword>(end )?smalllisp$</keyword>
|
||||
<keyword>subtitle</keyword>
|
||||
<keyword>tab</keyword>
|
||||
<keyword>table</keyword>
|
||||
<keyword>subtitle\b</keyword>
|
||||
<keyword>tab\b</keyword>
|
||||
<keyword>table\b</keyword>
|
||||
<keyword>end table$</keyword>
|
||||
<keyword>title</keyword>
|
||||
<keyword>vtable</keyword>
|
||||
<keyword>title\b</keyword>
|
||||
<keyword>vtable\b</keyword>
|
||||
<keyword>end vtable$</keyword>
|
||||
</context>
|
||||
<context id="sectioning" style-ref="keyword">
|
||||
<prefix>^@</prefix>
|
||||
<suffix></suffix>
|
||||
<keyword>appendix</keyword>
|
||||
<keyword>appendixsec(tion)?</keyword>
|
||||
<keyword>appendixsub(sub)?sec</keyword>
|
||||
<keyword>centerchap</keyword>
|
||||
<keyword>chapter</keyword>
|
||||
<keyword>chapheading</keyword>
|
||||
<keyword>appendix\b</keyword>
|
||||
<keyword>appendixsec(tion)?\b</keyword>
|
||||
<keyword>appendixsub(sub)?sec\b</keyword>
|
||||
<keyword>centerchap\b</keyword>
|
||||
<keyword>chapter\b</keyword>
|
||||
<keyword>chapheading\b</keyword>
|
||||
<keyword>(end )?detailmenu$</keyword>
|
||||
<keyword>(end )?group$</keyword>
|
||||
<keyword>heading</keyword>
|
||||
<keyword>majorheading</keyword>
|
||||
<keyword>heading\b</keyword>
|
||||
<keyword>majorheading\b</keyword>
|
||||
<keyword>(end )?menu$</keyword>
|
||||
<keyword>node</keyword>
|
||||
<keyword>section</keyword>
|
||||
<keyword>sub(sub)?heading</keyword>
|
||||
<keyword>sub(sub)?section</keyword>
|
||||
<keyword>node\b</keyword>
|
||||
<keyword>section\b</keyword>
|
||||
<keyword>sub(sub)?heading\b</keyword>
|
||||
<keyword>sub(sub)?section\b</keyword>
|
||||
<keyword>(end )?titlepage$</keyword>
|
||||
<keyword>top</keyword>
|
||||
<keyword>unnumbered</keyword>
|
||||
<keyword>unnumberedsec</keyword>
|
||||
<keyword>unnumberedsub(sub)?sec</keyword>
|
||||
<keyword>top\b</keyword>
|
||||
<keyword>unnumbered\b</keyword>
|
||||
<keyword>unnumberedsec\b</keyword>
|
||||
<keyword>unnumberedsub(sub)?sec\b</keyword>
|
||||
</context>
|
||||
<context id="formatting" style-ref="keyword">
|
||||
<prefix></prefix>
|
||||
|
@ -302,24 +302,24 @@
|
|||
<keyword>^@asis$</keyword>
|
||||
<keyword>@b</keyword>
|
||||
<keyword>^@(end )?cartouche$</keyword>
|
||||
<keyword>^@center</keyword>
|
||||
<keyword>^@exdent</keyword>
|
||||
<keyword>^@center\b</keyword>
|
||||
<keyword>^@exdent\b</keyword>
|
||||
<keyword>^@(end )?float$</keyword>
|
||||
<keyword>^@(end )?flushleft$</keyword>
|
||||
<keyword>^@(end )?flushright$</keyword>
|
||||
<keyword>@hyphenation</keyword>
|
||||
<keyword>@i</keyword>
|
||||
<keyword>^@need</keyword>
|
||||
<keyword>@hyphenation\b</keyword>
|
||||
<keyword>@i\b</keyword>
|
||||
<keyword>^@need\b</keyword>
|
||||
<keyword>^@noindent$</keyword>
|
||||
<keyword>^@page$</keyword>
|
||||
<keyword>@r</keyword>
|
||||
<keyword>@r\b</keyword>
|
||||
<keyword>^@refill$</keyword>
|
||||
<keyword>@sc</keyword>
|
||||
<keyword>^@sp</keyword>
|
||||
<keyword>@t</keyword>
|
||||
<keyword>@tie</keyword>
|
||||
<keyword>^@vskip</keyword>
|
||||
<keyword>@w</keyword>
|
||||
<keyword>@sc\b</keyword>
|
||||
<keyword>^@sp\b</keyword>
|
||||
<keyword>@t\b</keyword>
|
||||
<keyword>@tie\b</keyword>
|
||||
<keyword>^@vskip\b</keyword>
|
||||
<keyword>@w\b</keyword>
|
||||
</context>
|
||||
<context id="characters" style-ref="keyword">
|
||||
<prefix>@</prefix>
|
||||
|
@ -344,14 +344,14 @@
|
|||
<keyword>bullet\{\}</keyword>
|
||||
<keyword>comma\{\}</keyword>
|
||||
<keyword>copyright\{\}</keyword>
|
||||
<keyword>dotaccent</keyword>
|
||||
<keyword>dotaccent\b</keyword>
|
||||
<keyword>dots\{\}</keyword>
|
||||
<keyword>enddots\{\}</keyword>
|
||||
<keyword>equiv\{\}</keyword>
|
||||
<keyword>error\{\}</keyword>
|
||||
<keyword>exclamdown\{\}</keyword>
|
||||
<keyword>expansion\{\}</keyword>
|
||||
<keyword>H</keyword>
|
||||
<keyword>H\b</keyword>
|
||||
<keyword>L\{\}</keyword>
|
||||
<keyword>l\{\}</keyword>
|
||||
<keyword>LaTeX\{\}</keyword>
|
||||
|
@ -369,11 +369,11 @@
|
|||
<keyword>ringaccent\{\}</keyword>
|
||||
<keyword>ss\{\}</keyword>
|
||||
<keyword>TeX\{\}</keyword>
|
||||
<keyword>tieaccent</keyword>
|
||||
<keyword>u</keyword>
|
||||
<keyword>ubaraccent</keyword>
|
||||
<keyword>udotaccent</keyword>
|
||||
<keyword>v</keyword>
|
||||
<keyword>tieaccent\b</keyword>
|
||||
<keyword>u\b</keyword>
|
||||
<keyword>ubaraccent\b</keyword>
|
||||
<keyword>udotaccent\b</keyword>
|
||||
<keyword>v\b</keyword>
|
||||
</context>
|
||||
<context id="keyword" style-ref="others">
|
||||
<match>((^[\\])|([@]))(end )?[a-zA-Z]+(\{\})?</match>
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcecontextengine.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcelanguage-parser-2.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcelanguagemanager.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcestylemanager.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcestylescheme.c
|
||||
|
||||
moo/mooedit/language-specs/R.lang
|
||||
moo/mooedit/language-specs/ada.lang
|
||||
moo/mooedit/language-specs/awk.lang
|
||||
moo/mooedit/language-specs/boo.lang
|
||||
moo/mooedit/language-specs/c.lang
|
||||
moo/mooedit/language-specs/changelog.lang
|
||||
moo/mooedit/language-specs/chdr.lang
|
||||
moo/mooedit/language-specs/cil.lang
|
||||
moo/mooedit/language-specs/c.lang
|
||||
moo/mooedit/language-specs/cpp.lang
|
||||
moo/mooedit/language-specs/csharp.lang
|
||||
moo/mooedit/language-specs/css.lang
|
||||
moo/mooedit/language-specs/d.lang
|
||||
moo/mooedit/language-specs/def.lang
|
||||
moo/mooedit/language-specs/desktop.lang
|
||||
moo/mooedit/language-specs/diff.lang
|
||||
moo/mooedit/language-specs/d.lang
|
||||
moo/mooedit/language-specs/docbook.lang
|
||||
moo/mooedit/language-specs/dpatch.lang
|
||||
moo/mooedit/language-specs/dtd.lang
|
||||
|
@ -24,23 +25,24 @@ moo/mooedit/language-specs/fortran.lang
|
|||
moo/mooedit/language-specs/gap.lang
|
||||
moo/mooedit/language-specs/gtk-doc.lang
|
||||
moo/mooedit/language-specs/gtkrc.lang
|
||||
moo/mooedit/language-specs/gvim.xml
|
||||
moo/mooedit/language-specs/haddock.lang
|
||||
moo/mooedit/language-specs/haskell.lang
|
||||
moo/mooedit/language-specs/haskell-literate.lang
|
||||
moo/mooedit/language-specs/html.lang
|
||||
moo/mooedit/language-specs/idl.lang
|
||||
moo/mooedit/language-specs/ini.lang
|
||||
moo/mooedit/language-specs/java.lang
|
||||
moo/mooedit/language-specs/javascript.lang
|
||||
moo/mooedit/language-specs/kate.xml
|
||||
moo/mooedit/language-specs/latex.lang
|
||||
moo/mooedit/language-specs/libtool.lang
|
||||
moo/mooedit/language-specs/lua.lang
|
||||
moo/mooedit/language-specs/m4.lang
|
||||
moo/mooedit/language-specs/makefile.lang
|
||||
moo/mooedit/language-specs/ms.lang
|
||||
moo/mooedit/language-specs/msil.lang
|
||||
moo/mooedit/language-specs/nemerle.lang
|
||||
moo/mooedit/language-specs/objc.lang
|
||||
moo/mooedit/language-specs/ocaml.lang
|
||||
moo/mooedit/language-specs/ocl.lang
|
||||
moo/mooedit/language-specs/octave.lang
|
||||
moo/mooedit/language-specs/pascal.lang
|
||||
moo/mooedit/language-specs/perl.lang
|
||||
|
@ -48,6 +50,7 @@ moo/mooedit/language-specs/php.lang
|
|||
moo/mooedit/language-specs/pkgconfig.lang
|
||||
moo/mooedit/language-specs/po.lang
|
||||
moo/mooedit/language-specs/python.lang
|
||||
moo/mooedit/language-specs/R.lang
|
||||
moo/mooedit/language-specs/ruby.lang
|
||||
moo/mooedit/language-specs/scheme.lang
|
||||
moo/mooedit/language-specs/sh.lang
|
||||
|
@ -60,3 +63,7 @@ moo/mooedit/language-specs/verilog.lang
|
|||
moo/mooedit/language-specs/vhdl.lang
|
||||
moo/mooedit/language-specs/xml.lang
|
||||
moo/mooedit/language-specs/yacc.lang
|
||||
|
||||
moo/mooedit/language-specs/gvim.xml
|
||||
moo/mooedit/language-specs/kate.xml
|
||||
moo/mooedit/language-specs/tango.xml
|
||||
|
|
|
@ -98,3 +98,20 @@ moo/mooedit/gtksourceview/gtksourcestyle-mangled.c
|
|||
moo/mooedit/gtksourceview/gtksourcestylemanager-mangled.c
|
||||
moo/mooedit/gtksourceview/gtksourcestylescheme-mangled.c
|
||||
moo/mooedit/gtksourceview/gtksourcestylescheme-noxml-mangled.c
|
||||
moo/mooedit/glade/mooeditprefs-file.glade
|
||||
moo/mooedit/glade/mooeditprefs-general.glade
|
||||
moo/mooedit/glade/mooeditprefs-langs.glade
|
||||
moo/mooedit/glade/mooeditprefs-view.glade
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcestyle.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcestylescheme-noxml.c
|
||||
moo/mooedit/mooeditprefspage.c
|
||||
moo/mooedit/plugins/moofileselector-prefs.c
|
||||
moo/mooedit/plugins/moofileselector-prefs.glade
|
||||
moo/mooedit/plugins/moofileselector.c
|
||||
moo/mooedit/plugins/moofileselector.glade
|
||||
moo/moofileview/glade/moobookmark-editor.glade
|
||||
moo/moofileview/glade/moofileview-drop.glade
|
||||
moo/mooutils/glade/mooaccelprefs.glade
|
||||
moo/mooutils/moocompat.c
|
||||
moo/mooutils/newgtk/glib-2.14/glib/gregex.c
|
||||
moo/mooutils/newgtk/glib-2.8/glib/gmappedfile.c
|
||||
|
|
|
@ -13,6 +13,7 @@ moo/mooscript/mooscript-yacc.c
|
|||
moo/mooedit/plugins/completion/completion.glade
|
||||
moo/mooedit/plugins/completion/completion-plugin.c
|
||||
|
||||
moo/mooedit/language-specs/cil.lang
|
||||
moo/mooedit/language-specs/R.lang
|
||||
moo/mooedit/language-specs/ada.lang
|
||||
moo/mooedit/language-specs/c.lang
|
||||
|
|
Loading…
Reference in New Issue