Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit dd1a8d0d1a
)
pull/16/head
parent
48c3adf7bd
commit
36e8000863
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE language SYSTEM "language.dtd">
|
||||||
|
<language name="Meson" section="Other"
|
||||||
|
version="1.0" kateversion="2.4"
|
||||||
|
extensions="meson.build;meson_options.txt"
|
||||||
|
mimetype="text/x-meson"
|
||||||
|
priority="5"
|
||||||
|
license="LGPL">
|
||||||
|
|
||||||
|
<highlighting>
|
||||||
|
<list name = "flowControl">
|
||||||
|
<item> if </item>
|
||||||
|
<item> else </item>
|
||||||
|
<item> endif </item>
|
||||||
|
<item> foreach </item>
|
||||||
|
<item> endforeach </item>
|
||||||
|
</list>
|
||||||
|
<list name = "builtinfuncs">
|
||||||
|
<item> add_global_arguments </item>
|
||||||
|
<item> build_target </item>
|
||||||
|
<item> configuration_data </item>
|
||||||
|
<item> configure_file </item>
|
||||||
|
<item> custom_target </item>
|
||||||
|
<item> declare_dependency </item>
|
||||||
|
<item> dependency </item>
|
||||||
|
<item> error </item>
|
||||||
|
<item> executable </item>
|
||||||
|
<item> find_program </item>
|
||||||
|
<item> find_library </item>
|
||||||
|
<item> files </item>
|
||||||
|
<item> generator </item>
|
||||||
|
<item> get_option </item>
|
||||||
|
<item> gettext </item>
|
||||||
|
<item> import </item>
|
||||||
|
<item> include_directories </item>
|
||||||
|
<item> install_data </item>
|
||||||
|
<item> install_headers </item>
|
||||||
|
<item> install_man </item>
|
||||||
|
<item> install_subdir </item>
|
||||||
|
<item> is_subproject </item>
|
||||||
|
<item> jar </item>
|
||||||
|
<item> message </item>
|
||||||
|
<item> pkgconfig_gen </item>
|
||||||
|
<item> project </item>
|
||||||
|
<item> run_command </item>
|
||||||
|
<item> run_target </item>
|
||||||
|
<item> set_variable </item>
|
||||||
|
<item> shared_library </item>
|
||||||
|
<item> static_library </item>
|
||||||
|
<item> subdir </item>
|
||||||
|
<item> subproject </item>
|
||||||
|
<item> test </item>
|
||||||
|
<item> vcs_tag </item>
|
||||||
|
</list>
|
||||||
|
<list name = "logicalOperations">
|
||||||
|
<item> and </item>
|
||||||
|
<item> or </item>
|
||||||
|
<item> not </item>
|
||||||
|
</list>
|
||||||
|
<list name="booleans">
|
||||||
|
<item> true </item>
|
||||||
|
<item> false </item>
|
||||||
|
</list>
|
||||||
|
|
||||||
|
<contexts>
|
||||||
|
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
|
||||||
|
<keyword attribute="Flow Control Keyword" String="flowControl" context="#stay"/>
|
||||||
|
<keyword attribute="Operator" String="logicalOperations" context="#stay"/>
|
||||||
|
<keyword attribute="Builtin Function" String="builtinfuncs" context="#stay"/>
|
||||||
|
<keyword attribute="Boolean Values" String="booleans" context="#stay"/>
|
||||||
|
<Int attribute="Int" context="#stay"/>
|
||||||
|
<DetectChar attribute="Comment" char="#" context="comment"/>
|
||||||
|
<AnyChar attribute="Operator" String="+-*/=<>" context="#stay"/>
|
||||||
|
<DetectChar attribute="Normal Text" char="[" context="List" beginRegion="List"/>
|
||||||
|
<IncludeRules context="StringVariants" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<context name="List" attribute="Normal Text" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
|
<DetectSpaces/>
|
||||||
|
<DetectChar attribute="Normal Text" char="]" context="#pop" endRegion="List"/>
|
||||||
|
<IncludeRules context="Normal" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<context name="comment" attribute="Comment" lineEndContext="#pop">
|
||||||
|
<IncludeRules context="##Alerts" />
|
||||||
|
<IncludeRules context="##Modelines" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<!--strings-->
|
||||||
|
<context name="StringVariants" attribute="Normal Text" lineEndContext="#stay">
|
||||||
|
<DetectSpaces/>
|
||||||
|
<StringDetect attribute="String" String="'''" context="Triple A-string" beginRegion="Triple A-region"/>
|
||||||
|
<DetectChar attribute="String" char="'" context="Single A-string"/>
|
||||||
|
</context>
|
||||||
|
<context name="Single A-string" attribute="String" lineEndContext="#stay">
|
||||||
|
<HlCStringChar attribute="String Char" context="#stay"/>
|
||||||
|
<DetectChar attribute="String" char="'" context="#pop"/>
|
||||||
|
</context>
|
||||||
|
<context name="Triple A-string" attribute="String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
|
<HlCStringChar attribute="String Char" context="#stay"/>
|
||||||
|
<StringDetect attribute="String" String="'''" context="#pop" endRegion="Triple A-region"/>
|
||||||
|
</context>
|
||||||
|
</contexts>
|
||||||
|
|
||||||
|
<itemDatas>
|
||||||
|
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
|
||||||
|
<itemData name="Operator" defStyleNum="dsNormal" spellChecking="false" bold="1"/>
|
||||||
|
<itemData name="Int" defStyleNum="dsDecVal" spellChecking="false"/>
|
||||||
|
<itemData name="Flow Control Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
|
||||||
|
<itemData name="Builtin Function" defStyleNum="dsDataType" spellChecking="false"/>
|
||||||
|
<itemData name="Boolean Values" defStyleNum="dsKeyword" spellChecking="false"/>
|
||||||
|
<itemData name="String Char" defStyleNum="dsChar" spellChecking="false"/>
|
||||||
|
<itemData name="String" defStyleNum="dsString"/>
|
||||||
|
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||||
|
</itemDatas>
|
||||||
|
</highlighting>
|
||||||
|
</language>
|
@ -0,0 +1,81 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Kate syntax highlighting for the Objective Caml 'Ocamlllex' -->
|
||||||
|
<!DOCTYPE language SYSTEM "language.dtd"
|
||||||
|
[
|
||||||
|
<!-- Regular expresion constants: -->
|
||||||
|
<!ENTITY LETTER "A-Za-z\300-\326\330-\366\370-\377"> <!-- Latin-1 letters. -->
|
||||||
|
<!ENTITY IDENT "`?[&LETTER;_][&LETTER;0-9_']*"> <!-- OCaml identifiers. -->
|
||||||
|
<!ENTITY ESC "(\\[ntbr'"\\]|\\[0-9]{3}|\\x[0-9A-Fa-f]{2})"> <!-- OCaml character code escapes. -->
|
||||||
|
]>
|
||||||
|
<language name="Objective Caml Ocamllex"
|
||||||
|
section="Sources"
|
||||||
|
extensions="*.mll"
|
||||||
|
mimetype=""
|
||||||
|
version="2.02"
|
||||||
|
kateversion="2.4"
|
||||||
|
priority="10"
|
||||||
|
author="Glyn Webster (glynwebster@orcon.net.nz) and Vincent Hugot (vincent.hugot@gmail.com)"
|
||||||
|
license="LGPL" >
|
||||||
|
|
||||||
|
<highlighting>
|
||||||
|
|
||||||
|
<list name="keywords">
|
||||||
|
<item> and </item>
|
||||||
|
<item> as </item>
|
||||||
|
<item> eof </item>
|
||||||
|
<item> let </item>
|
||||||
|
<item> parse </item>
|
||||||
|
<item> rule </item>
|
||||||
|
<item> shortest </item>
|
||||||
|
</list>
|
||||||
|
|
||||||
|
<contexts>
|
||||||
|
<context name="Rules" lineEndContext="#stay" attribute="Normal">
|
||||||
|
<Detect2Chars char="(" char1="*" context="Comment" attribute="Comment" beginRegion="comment" />
|
||||||
|
<DetectChar char="{" context="Ocaml" attribute="Normal" beginRegion="code" />
|
||||||
|
<DetectChar char=""" context="String" attribute="String" />
|
||||||
|
<RegExpr String="'(&ESC;|[^'])'" context="#stay" attribute="Character" />
|
||||||
|
<keyword String="keywords" context="#stay" attribute="Keyword" />
|
||||||
|
<RegExpr String="&IDENT;" context="#stay" attribute="Identifier" />
|
||||||
|
<DetectChar char="}" context="#stay" attribute="Mismatched Brackets" />
|
||||||
|
<Detect2Chars char="*" char1=")" context="#stay" attribute="Mismatched Brackets" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<context name="Comment" lineEndContext="#stay" attribute="Comment">
|
||||||
|
<Detect2Chars char="*" char1=")" context="#pop" attribute="Comment" endRegion="comment" />
|
||||||
|
<Detect2Chars char="(" char1="*" context="Comment" attribute="Comment" beginRegion="comment" />
|
||||||
|
<DetectChar char=""" context="String" attribute="String" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<context name="Ocaml" lineEndContext="#stay" attribute="Normal">
|
||||||
|
<DetectChar char="}" context="#pop" attribute="Normal" endRegion="code" />
|
||||||
|
<IncludeRules context="##Objective Caml" includeAttrib="true" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<context name="String" lineEndContext="#stay" attribute="String">
|
||||||
|
<DetectChar char=""" context="#pop" attribute="String" />
|
||||||
|
<RegExpr String="&ESC;" context="#stay" attribute="Escaped Characters" />
|
||||||
|
<RegExpr String="\\$" context="#stay" attribute="Escaped Characters" />
|
||||||
|
</context>
|
||||||
|
</contexts>
|
||||||
|
|
||||||
|
<itemDatas>
|
||||||
|
<itemData name="Normal" defStyleNum="dsOthers" />
|
||||||
|
<itemData name="Identifier" defStyleNum="dsNormal" />
|
||||||
|
<itemData name="Keyword" defStyleNum="dsOthers" bold="true" />
|
||||||
|
<itemData name="Character" defStyleNum="dsChar" />
|
||||||
|
<itemData name="String" defStyleNum="dsString" />
|
||||||
|
<itemData name="Escaped Characters" defStyleNum="dsChar" />
|
||||||
|
<itemData name="Comment" defStyleNum="dsComment" />
|
||||||
|
<itemData name="Mismatched Brackets" defStyleNum="dsError" />
|
||||||
|
</itemDatas>
|
||||||
|
</highlighting>
|
||||||
|
|
||||||
|
<general>
|
||||||
|
<keywords casesensitive="true" />
|
||||||
|
<comments>
|
||||||
|
<comment name="multiLine" start="(*" end="*)" />
|
||||||
|
</comments>
|
||||||
|
</general>
|
||||||
|
</language>
|
||||||
|
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
|
@ -0,0 +1,160 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Kate syntax highlighting for the Objective Caml 'Ocamlllex' -->
|
||||||
|
<!DOCTYPE language SYSTEM "language.dtd"
|
||||||
|
[
|
||||||
|
<!-- Regular expresion constants: -->
|
||||||
|
<!ENTITY LOWER "a-z\300-\326\330-\337"> <!-- Lowercase Latin-1 letters. -->
|
||||||
|
<!ENTITY UPPER "A-Z\340-\366\370-\377"> <!-- Uppercase Latin-1 letters. -->
|
||||||
|
<!ENTITY LETTER "&LOWER;&UPPER;"> <!-- All Latin-1 letters. -->
|
||||||
|
<!ENTITY LIDENT "[&LOWER;_][&LETTER;0-9_']*"> <!-- Lowercase OCaml identifiers. -->
|
||||||
|
<!ENTITY UIDENT "`?[&UPPER;][&LETTER;0-9_']*"> <!-- Uppercase OCaml identifiers. -->
|
||||||
|
<!ENTITY IDENT "`?[&LETTER;][&LETTER;0-9_']*"> <!-- All OCaml identifiers. -->
|
||||||
|
]>
|
||||||
|
<language name="Objective Caml Ocamlyacc"
|
||||||
|
section="Sources"
|
||||||
|
extensions="*.mly"
|
||||||
|
mimetype=""
|
||||||
|
version="2.02"
|
||||||
|
kateversion="2.4"
|
||||||
|
priority="10"
|
||||||
|
author="Glyn Webster (glynwebster@orcon.net.nz) and Vincent Hugot (vincent.hugot@gmail.com)"
|
||||||
|
license="LGPL" >
|
||||||
|
|
||||||
|
<highlighting>
|
||||||
|
<list name="typed symbol list keywords">
|
||||||
|
<item> %token </item>
|
||||||
|
<item> %type </item>
|
||||||
|
</list>
|
||||||
|
|
||||||
|
<list name="symbol list keywords">
|
||||||
|
<item> %left </item>
|
||||||
|
<item> %right </item>
|
||||||
|
<item> %nonassoc </item>
|
||||||
|
<item> %start </item>
|
||||||
|
</list>
|
||||||
|
|
||||||
|
<list name="rule keywords">
|
||||||
|
<item> %prec </item>
|
||||||
|
<item> error </item>
|
||||||
|
</list>
|
||||||
|
|
||||||
|
<contexts>
|
||||||
|
<!-- Note: Because the Yacc grammar is so simple I've written this so that any symbol
|
||||||
|
that has not been specifically dealt with by a highlighting rule is an error. -->
|
||||||
|
|
||||||
|
<!-- Declaration section: Header sections and Yacc symbol declararations. -->
|
||||||
|
<!-- A %% marks the end of the Declaration section and the start of the rules section. -->
|
||||||
|
<context name="Declarations" lineEndContext="#stay" attribute="Error">
|
||||||
|
<Detect2Chars char="%" char1="{" context="Header" attribute="Normal" beginRegion="header" />
|
||||||
|
<keyword String="typed symbol list keywords" context="Typed Symbol List" attribute="Keyword" />
|
||||||
|
<keyword String="symbol list keywords" context="Symbol List" attribute="Keyword" />
|
||||||
|
<Detect2Chars char="%" char1="%" context="Rules" attribute="Normal" />
|
||||||
|
<IncludeRules context="General" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<!-- Header section: Ocaml code in the declarations between %{ %} brackets -->
|
||||||
|
<context name="Header" lineEndContext="#stay" attribute="Normal">
|
||||||
|
<Detect2Chars char="%" char1="}" context="#pop" attribute="Normal" endRegion="header" />
|
||||||
|
<IncludeRules context="##Objective Caml" includeAttrib="true" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<!-- A typed symbol list: an optional Ocaml type declaration between < > brackets, followed by a symbol list. -->
|
||||||
|
<context name="Typed Symbol List" lineEndContext="#pop" attribute="Error">
|
||||||
|
<DetectChar char="<" context="Type" attribute="Normal" />
|
||||||
|
<RegExpr String="&UIDENT;" context="Symbol List" attribute="Uppercase Name (Token)" />
|
||||||
|
<RegExpr String="&LIDENT;" context="Symbol List" attribute="Lowercase Name (Rule)" />
|
||||||
|
<IncludeRules context="General" />
|
||||||
|
</context>
|
||||||
|
<context name="Type" lineEndContext="#stay" attribute="Normal">
|
||||||
|
<DetectChar char=">" context="#pop" attribute="Normal" />
|
||||||
|
<IncludeRules context="##Objective Caml" includeAttrib="true" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<!-- A symbol list: one line of sybmol names and option comments. -->
|
||||||
|
<context name="Symbol List" lineEndContext="#pop" attribute="Error">
|
||||||
|
<RegExpr String="&UIDENT;" context="#stay" attribute="Uppercase Name (Token)" />
|
||||||
|
<RegExpr String="&LIDENT;" context="#stay" attribute="Lowercase Name (Rule)" />
|
||||||
|
<IncludeRules context="General" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<!-- Rules section:. -->
|
||||||
|
<!-- A %% marks the end of the rules section and the start of the trailer section: -->
|
||||||
|
<context name="Rules" lineEndContext="#stay" attribute="Error">
|
||||||
|
<Detect2Chars char="%" char1="%" context="Trailer" attribute="Normal" />
|
||||||
|
<RegExpr String="&IDENT;" context="Rule, Expecting Colon" attribute="Rule Definition Name" beginRegion="rule" />
|
||||||
|
<IncludeRules context="General" />
|
||||||
|
</context>
|
||||||
|
<context name="Rule, Expecting Colon" lineEndContext="#stay" attribute="Error">
|
||||||
|
<DetectChar char=":" context="Rule" attribute="Normal" />
|
||||||
|
<!-- Incomplete rule before the start of the trailer: -->
|
||||||
|
<Detect2Chars char="%" char1="%" context="Trailer" attribute="Error" />
|
||||||
|
<IncludeRules context="General" />
|
||||||
|
</context>
|
||||||
|
<context name="Rule" lineEndContext="#stay" attribute="Error">
|
||||||
|
<DetectChar char=";" context="#pop#pop" attribute="Normal" endRegion="rule" />
|
||||||
|
<DetectChar char="|" context="#stay" attribute="Normal" />
|
||||||
|
<keyword String="rule keywords" context="#stay" attribute="Keyword" />
|
||||||
|
<RegExpr String="&UIDENT;" context="#stay" attribute="Uppercase Name (Token)" />
|
||||||
|
<RegExpr String="&LIDENT;" context="#stay" attribute="Lowercase Name (Rule)" />
|
||||||
|
<DetectChar char="{" context="Action" attribute="Normal" beginRegion="action" />
|
||||||
|
<IncludeRules context="General" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<!-- A rule action: Ocaml code between { } brackets containing $1,$2,$3.. symbols. -->
|
||||||
|
<!-- (The "Nested Action" contexts override the rules for [ ] and { } brackets in the Objective
|
||||||
|
Caml highlighting file. They make make the $1,$2,$3.. symbols show up inside those brackets.) -->
|
||||||
|
<context name="Action" lineEndContext="#stay" attribute="Normal">
|
||||||
|
<DetectChar char="}" context="#pop" attribute="Normal" endRegion="action" />
|
||||||
|
<RegExpr String="[$][0-9]+" context="#stay" attribute="Semantic Attribute" />
|
||||||
|
<DetectChar char="{" context="Nested Action 1" />
|
||||||
|
<DetectChar char="[" context="Nested Action 2" />
|
||||||
|
<IncludeRules context="##Objective Caml" includeAttrib="true" />
|
||||||
|
</context>
|
||||||
|
<context name="Nested Action 1" lineEndContext="#stay" attribute="Normal">
|
||||||
|
<DetectChar char="}" context="#pop" />
|
||||||
|
<IncludeRules context="Action" includeAttrib="true" />
|
||||||
|
</context>
|
||||||
|
<context name="Nested Action 2" lineEndContext="#stay" attribute="Normal">
|
||||||
|
<DetectChar char="]" context="#pop" />
|
||||||
|
<IncludeRules context="Action" includeAttrib="true" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<!-- Trailer section: Ocaml code until the end of the file. -->
|
||||||
|
<context name="Trailer" lineEndContext="#stay" attribute="Normal">
|
||||||
|
<IncludeRules context="##Objective Caml" includeAttrib="true" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<!-- General rules for all contexts: -->
|
||||||
|
<!-- 1) Whitespace is expected. -->
|
||||||
|
<!-- 2) Ocamlyacc's comments are in /* */ brackets and are nestable. -->
|
||||||
|
<context name="General" lineEndContext="#stay" attribute="Normal">
|
||||||
|
<DetectSpaces context="#stay" attribute="Normal" />
|
||||||
|
<Detect2Chars char="/" char1="*" context="Comment" attribute="Comment" beginRegion="comment" />
|
||||||
|
</context>
|
||||||
|
<context name="Comment" lineEndContext="#stay" attribute="Comment">
|
||||||
|
<Detect2Chars char="*" char1="/" context="#pop" attribute="Comment" endRegion="comment" />
|
||||||
|
<Detect2Chars char="/" char1="*" context="Comment" attribute="Comment" beginRegion="comment" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
</contexts>
|
||||||
|
|
||||||
|
<itemDatas>
|
||||||
|
<itemData name="Keyword" defStyleNum="dsOthers" bold="true" />
|
||||||
|
<itemData name="Normal" defStyleNum="dsOthers" />
|
||||||
|
<itemData name="Uppercase Name (Token)" defStyleNum="dsOthers" />
|
||||||
|
<itemData name="Lowercase Name (Rule)" defStyleNum="dsOthers" italic="true" />
|
||||||
|
<itemData name="Rule Definition Name" defStyleNum="dsOthers" italic="true" bold="true" />
|
||||||
|
<itemData name="Semantic Attribute" defStyleNum="dsOthers" />
|
||||||
|
<itemData name="Comment" defStyleNum="dsComment" />
|
||||||
|
<itemData name="Error" defStyleNum="dsError" />
|
||||||
|
</itemDatas>
|
||||||
|
</highlighting>
|
||||||
|
|
||||||
|
<general>
|
||||||
|
<keywords casesensitive="true" weakDeliminator="%" />
|
||||||
|
<comments>
|
||||||
|
<comment name="multiLine" start="(*" end="*)" />
|
||||||
|
</comments>
|
||||||
|
</general>
|
||||||
|
</language>
|
||||||
|
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue