medit/moo/mooedit/syntax/make.lang

87 lines
3.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!-- kate: space-indent on; indent-width 2; strip on; -->
<!DOCTYPE language SYSTEM "language.dtd">
<!-- Makefile syntaxfile v0.9 by Per Wigren <wigren@home.se> -->
<!-- Modified by Joseph Wenninger <jowenn@kde.org> -->
<language name="Makefile" version="1.06" kateversion="2.4" section="Others"
extensions="*makefile*;*Makefile*" mimetypes="text/x-makefile"
author="Per Wigren (wigren@home.se)" license="">
<syntax>
<keyword-list name = "keywords">
<keyword>include</keyword>
<keyword>define</keyword>
<keyword>else</keyword>
<keyword>endef</keyword>
<keyword>endif</keyword>
<keyword>if</keyword>
<keyword>ifdef</keyword>
<keyword>ifeq</keyword>
<keyword>ifndef</keyword>
<keyword>ifneq</keyword>
</keyword-list>
<context name="Normal" style="Normal Text" eol-context="#stay">
<Keyword style="Keyword" context="#stay" keyword="keywords"/>
<Regex style="Variable" context="Value" pattern="[_\w\d]*\s*(?=:=|=)"/>
<Regex style="Target" context="#stay" pattern="[_\w\d-]*\s*:" first-non-blank-only="true"/>
<Regex style="Section" context="#stay" pattern="^[.].*:"/>
<Char style="String" context="String" char="&quot;"/>
<Regex style="Operator" context="VarFromNormal" pattern="[$][\({]"/>
<AnyChar style="Operator" context="#stay" chars="+*=%$():\\&#059;" />
<Regex style="Operator" context="Commands" pattern="[@-]" first-non-blank-only="true"/>
<Char style="Comment" context="Comment" include-into-next="true" char="#"/>
</context>
<context style="Comment" eol-context="#pop" name="Comment">
<IncludeRules from="##Misc##AlertRules"/>
</context>
<context style="String" eol-context="#pop" name="String">
<LineContinue style="String" context="#stay"/>
<Char style="String" context="#pop" char="&quot;"/>
</context>
<context name="Value" style="String" eol-context="#stay">
<Regex style="Operator" pattern="\\$" context="#stay"/>
<Regex style="String" pattern="[^\\]?$" context="#pop"/>
<Regex style="Operator" pattern="[$][\({]" context="VarFromValue"/>
<Regex style="Special" context="#pop" pattern="@[-_\d\w]*@" />
<Char style="Operator" char="&#059;" context="#pop"/>
</context>
<context name="VarFromValue" style="Variable" eol-context="#stay">
<Regex style="Operator" pattern="[\)}](?=/)" context="#pop"/>
<Regex style="Operator" pattern="[\)}][^$]" context="#pop"/>
<Regex style="Operator" pattern="[\)}]$" context="#pop#pop"/>
</context>
<context name="VarFromNormal" style="Variable" eol-context="#stay">
<Regex style="Operator" pattern="[\)}]" context="#pop"/>
</context>
<context name="Commands" style="Normal Text" eol-context="#pop">
<Regex style="Operator" context="VarFromNormal" pattern="[$][\({]"/>
<Regex style="Commands" context="#pop" pattern="[_\w-]*\b"/>
</context>
</syntax>
<styles>
<style name="Normal Text" default-style="Normal"/>
<style name="Keyword" default-style="Keyword"/>
<style name="Comment" default-style="Comment"/>
<style name="String" default-style="String"/>
<style name="Variable" default-style="DataType"/>
<style name="Target" default-style="Decimal"/>
<style name="Section" default-style="Others"/>
<style name="Operator" default-style="Char"/>
<style name="Commands" default-style="BaseN"/>
<style name="Special" default-style="Float"/>
</styles>
<general>
<comments>
<single-line start="#"/>
</comments>
</general>
</language>