Damson/assets/syntax/bnf.xml
astar76 11c1a7808b Build the syntax definitions into the app
Highlighting relied on the syntax-highlighting package, so removing it
left every file uncoloured. The 462 definitions now live in assets/syntax
and are compressed into the binary at build time, unpacked per language
when used. User .xml files still add to or replace them, and the licence
each file declares is recorded in assets/syntax/LICENSES.md.

Also moves files to the trash without needing gio.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 20:35:27 -06:00

1 line
No EOL
5.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="BNF" alternativeNames="EBNF;WBNF;PEG" section="Sources" version="5" kateversion="5.62" extensions="*.bnf;*.ebnf;*.peg" mimetype="text/x-bnf;text/x-ebnf;text/x-peg" author="Igor Zhuravlov ([email protected]); Jonathan Poelen ([email protected])" indenter="normal" license="GPL"><highlighting><contexts><context name="Normal" attribute="Normal Text"><DetectSpaces/><StringDetect String="(/" attribute="Repeater"/><StringDetect String="/)" attribute="Repeater"/><StringDetect String="(:" attribute="Repeater"/><StringDetect String=":)" attribute="Repeater"/><StringDetect String=":≡" attribute="Copulae"/><StringDetect String="&lt;-" attribute="Copulae"/><StringDetect String="&lt;=" attribute="Copulae"/><StringDetect String="->" attribute="Copulae"/><StringDetect String="=>" attribute="Copulae"/><AnyChar String=":=←→⇐⇒≜" attribute="Copulae"/><StringDetect String="//" attribute="Comment" context="comment inline"/><StringDetect String="%%" attribute="Comment" context="comment inline"/><StringDetect String="/*" attribute="Comment" context="comment block C" beginRegion="CommentBlockC"/><StringDetect String="(*" attribute="Comment" context="comment EBNF" beginRegion="CommentBlock"/><AnyChar String="|/-," attribute="Combinator"/><AnyChar String="!#$&amp;*+?@^~%" attribute="Operator"/><AnyChar String=";" attribute="Semicolon Terminator" context="comment inline"/><AnyChar String="." attribute="Terminator"/><DetectChar char="\" context="escaped" lookAhead="1"/><DetectChar char="'" attribute="String" context="sq-terminal"/><DetectChar char='"' attribute="String" context="dq-terminal"/><DetectChar char="`" attribute="Special" context="special block" beginRegion="QBlock"/><DetectChar char="(" attribute="Parenthese" beginRegion="PBlock"/><DetectChar char=")" attribute="Parenthese" endRegion="PBlock"/><DetectChar char="&lt;" attribute="Parenthese" beginRegion="ABlock"/><DetectChar char=">" attribute="Parenthese" endRegion="ABlock"/><DetectChar char="[" attribute="Parenthese" beginRegion="SBlock"/><DetectChar char="]" attribute="Parenthese" endRegion="SBlock"/><DetectChar char="{" attribute="Parenthese" beginRegion="CBlock"/><DetectChar char="}" attribute="Parenthese" endRegion="CBlock"/><RegExpr String="[[:alpha:]_][-\w]*([.]+[-\w]+)*:" attribute="Label"/><RegExpr String="&lt;[[:alpha:]_][-\w]*([.]+[-\w]+)*>|[[:alpha:]_][-\w]*([.]+[-\w]+)*" attribute="Nonterminal"/><RegExpr String="0|-?[1-9][0-9]*" attribute="Integer"/></context><context name="comment inline" attribute="Comment" lineEndContext="#pop"><DetectSpaces/><IncludeRules context="##Comments"/><DetectIdentifier/></context><context name="find escape" attribute="String"><HlCStringChar attribute="String Char" context="#pop"/><RegExpr String="\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|\\[a-zA-Z]\b" attribute="String Char" context="#pop"/></context><context name="q-escaped" attribute="String"><IncludeRules context="find escape"/><DetectChar char="\" attribute="String" context="#pop"/></context><context name="comment EBNF" attribute="Comment"><DetectSpaces/><StringDetect String="*)" attribute="Comment" context="#pop" endRegion="CommentBlock"/><IncludeRules context="##Comments"/><DetectIdentifier/></context><context name="comment block C" attribute="Comment"><DetectSpaces/><StringDetect String="*/" attribute="Comment" context="#pop" endRegion="CommentBlockC"/><IncludeRules context="##Comments"/><DetectIdentifier/></context><context name="dq-terminal" attribute="String"><DetectChar char='"' attribute="String" context="#pop"/><DetectChar char="\" context="q-escaped" lookAhead="1"/></context><context name="escaped" attribute="String"><IncludeRules context="find escape"/><DetectChar char="\" attribute="Combinator" context="#pop"/></context><context name="special block" attribute="Special"><StringDetect String="\`" attribute="Special Char"/><DetectChar char="`" attribute="Special" context="#pop" endRegion="QBlock"/></context><context name="sq-terminal" attribute="String" lineEndContext="#pop"><DetectChar char="'" attribute="String" context="#pop"/><DetectChar char="\" context="q-escaped" lookAhead="1"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Combinator" defStyleNum="dsOperator" bold="1" spellChecking="0"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Copulae" defStyleNum="dsOperator" bold="1" spellChecking="0"/><itemData name="Integer" defStyleNum="dsDecVal" spellChecking="0"/><itemData name="Label" defStyleNum="dsDataType" spellChecking="0"/><itemData name="Nonterminal" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Operator" defStyleNum="dsOperator" bold="1" spellChecking="0"/><itemData name="Parenthese" defStyleNum="dsRegionMarker" spellChecking="0"/><itemData name="Repeater" defStyleNum="dsRegionMarker" spellChecking="0"/><itemData name="Terminator" defStyleNum="dsOperator" bold="1" spellChecking="0"/><itemData name="Semicolon Terminator" defStyleNum="dsOperator" bold="1" spellChecking="0"/><itemData name="Special" defStyleNum="dsExtension" spellChecking="0"/><itemData name="Special Char" defStyleNum="dsSpecialChar" spellChecking="0"/><itemData name="String" defStyleNum="dsString" spellChecking="0"/><itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="0"/></itemDatas></highlighting><general><comments><comment name="singleLine" start="//"/><comment name="multiLine" start="(*" end="*)" region="CommentBlock"/></comments><folding indentationsensitive="1"/></general></language>