Damson/assets/syntax/yacc.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
11 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="Yacc/Bison" version="9" kateversion="5.79" section="Sources" extensions="*.y;*.yy;*.ypp;*.y++" mimetype="text/x-yacc;text/x-bison" priority="5" author="Jan Villat ([email protected])" license="LGPL"><highlighting><contexts><context name="Pre Start" attribute="Normal Text"><IncludeRules context="Comment"/><DetectSpaces/><StringDetect String="%{" attribute="Content-Type Delimiter" context="C Declarations" beginRegion="cdeclarations" column="0"/><RegExpr String="." attribute="Normal Text" context="Declarations" beginRegion="declarations" lookAhead="1"/></context><context name="Percent Command In" attribute="Normal Text"><DetectChar char=";" attribute="Normal Text" context="#pop" lookAhead="1"/><DetectChar char="%" attribute="Normal Text" context="#pop" firstNonSpace="1" lookAhead="1"/><StringDetect String="%%" attribute="Normal Text" context="#pop" lookAhead="1"/><IncludeRules context="StringOrChar"/><DetectChar char="&lt;" attribute="Data Type" context="PC type"/><IncludeRules context="Comment"/></context><context name="Comment" attribute="Comment"><StringDetect String="/*" attribute="Comment" context="CommentStar" beginRegion="comment"/><StringDetect String="//" attribute="Comment" context="CommentSlash"/></context><context name="Code-Symbols Start" attribute="Normal Text"><IncludeRules context="Comment"/><DetectSpaces/><DetectChar char="{" attribute="Normal Text" context="Code-Symbols In" beginRegion="code-symbols"/><RegExpr String="." attribute="Alert" context="#pop"/></context><context name="Symbol-Variable" attribute="Normal Text"><DetectChar char="$" attribute="Directive" context="Dol"/><RegExpr String="@\$?(?:\d+|[A-Za-z_]\w*)?" attribute="Directive"/></context><context name="C Declarations" attribute="Normal Text"><IncludeRules context="Comment"/><StringDetect String="%}" attribute="Content-Type Delimiter" context="#pop" endRegion="cdeclarations" column="0"/><IncludeRules context="##C++"/></context><context name="Code-Symbols In" attribute="Normal Text"><DetectChar char="}" attribute="Normal Text" context="#pop#pop!Code-Symbols End" endRegion="code-symbols"/><DetectChar char="{" attribute="Normal Text" context="Code-Symbols InIn"/><IncludeRules context="Symbol-Variable"/><IncludeRules context="##C++"/></context><context name="Code-Symbols InIn" attribute="Normal Text"><DetectChar char="{" attribute="Normal Text" context="Code-Symbols InIn"/><DetectChar char="}" attribute="Normal Text" context="#pop"/><IncludeRules context="Symbol-Variable"/><IncludeRules context="##C++"/></context><context name="DolEnd" attribute="Normal Text" fallthroughContext="#pop#pop"><RegExpr String="@?\d+" attribute="Directive" context="#pop#pop"/><DetectChar char="$" attribute="Directive" context="#pop#pop"/><DetectIdentifier attribute="Directive" context="#pop#pop"/></context><context name="Grammar Declarations" attribute="Normal Text"><WordDetect String="%union" attribute="Directive" context="Union Start"/><WordDetect String="%code" attribute="Directive" context="Union Start"/><WordDetect String="%destructor" attribute="Directive" context="Code-Symbols Start"/><WordDetect String="%printer" attribute="Directive" context="Code-Symbols Start"/></context><context name="Normal C Bloc" attribute="Normal Text"><DetectChar char="{" attribute="Normal Text" context="Normal C Bloc" beginRegion="bloc"/><DetectChar char="}" attribute="Normal Text" context="#pop" endRegion="bloc"/><IncludeRules context="Symbol-Variable"/><IncludeRules context="##C++"/></context><context name="StringOrChar" attribute="Normal Text"><DetectChar char="'" attribute="String Char" context="Char"/><DetectChar char='"' attribute="String" context="String"/></context><context name="Union In" attribute="Normal Text"><DetectChar char="{" attribute="Normal Text" context="Union InIn"/><DetectChar char="}" attribute="Normal Text" context="#pop#pop" endRegion="union"/><IncludeRules context="##C++"/></context><context name="Union InIn" attribute="Normal Text"><DetectChar char="{" attribute="Normal Text" context="Union InIn"/><DetectChar char="}" attribute="Normal Text" context="#pop"/><IncludeRules context="##C++"/></context><context name="Union Start" attribute="Normal Text"><IncludeRules context="Comment"/><DetectSpaces/><DetectChar char="{" attribute="Normal Text" context="Union In" beginRegion="union"/><RegExpr String="[^\s\{](?=\s|$|//)" attribute="Normal Text" context="#pop!Union Tag"/></context><context name="Char" attribute="String Char" lineEndContext="#pop"><RegExpr String="\\." attribute="Backslash Code"/><DetectChar char="'" attribute="String Char" context="#pop"/></context><context name="Code-Symbols End" attribute="Normal Text" fallthroughContext="#pop!Percent Command In"><IncludeRules context="Comment"/><DetectSpaces/><DetectChar char=";" attribute="Normal Text" context="#pop" lookAhead="1"/><DetectChar char="{" attribute="Normal Text" context="Code-Symbols In" beginRegion="code-symbols"/></context><context name="CommentSlash" attribute="Comment" lineEndContext="#pop"><DetectSpaces/><IncludeRules context="##Comments"/></context><context name="CommentStar" attribute="Comment"><DetectSpaces/><StringDetect String="*/" attribute="Comment" context="#pop" endRegion="comment"/><IncludeRules context="##Comments"/></context><context name="Declarations" attribute="Normal Text"><IncludeRules context="Comment"/><StringDetect String="%%" attribute="Content-Type Delimiter" context="Rules" beginRegion="rules" endRegion="declarations"/><StringDetect String="%{" attribute="Content-Type Delimiter" context="C Declarations" beginRegion="cdeclarations" column="0"/><IncludeRules context="Grammar Declarations"/><WordDetect String="%initial-action" attribute="Directive" context="Code-Symbols Start"/><WordDetect String="%param" attribute="Directive" context="Code-Symbols Start"/><WordDetect String="%lex-param" attribute="Directive" context="Code-Symbols Start"/><WordDetect String="%parse-param" attribute="Directive" context="Code-Symbols Start"/><WordDetect String="%&lt;flag>" attribute="Directive" context="Percent Command In"/><DetectChar char="%" attribute="Directive" context="Percent Command"/></context><context name="Dol" attribute="Normal Text" fallthroughContext="DolEnd"><RegExpr String="&lt;[^>]+>" attribute="Data Type" context="DolEnd"/></context><context name="Grammar Declaration Start" attribute="Normal Text"><IncludeRules context="Grammar Declarations"/><WordDetect String="%start" attribute="Directive" context="Percent Command In"/><WordDetect String="%default-prec" attribute="Directive" context="Percent Command In"/><WordDetect String="%no-default-prec" attribute="Directive" context="Percent Command In"/><WordDetect String="%nterm" attribute="Directive" context="Percent Command In"/><WordDetect String="%token" attribute="Directive" context="Percent Command In"/><WordDetect String="%type" attribute="Directive" context="Percent Command In"/><WordDetect String="%left" attribute="Directive" context="Percent Command In"/><WordDetect String="%right" attribute="Directive" context="Percent Command In"/><WordDetect String="%nonassoc" attribute="Directive" context="Percent Command In"/><WordDetect String="%precedence" attribute="Directive" context="Percent Command In"/><DetectChar char="%" attribute="Rule" context="#pop"/><DetectChar char=";" attribute="Normal Text" context="#pop"/><IncludeRules context="Comment"/><DetectSpaces/><RegExpr String=".+" attribute="Alert" context="#pop"/></context><context name="PC type" attribute="Data Type" lineEndContext="#pop#pop"><DetectChar char=">" attribute="Data Type" context="#pop"/></context><context name="Percent Command" attribute="Directive" lineEndContext="#pop!Percent Command In"><IncludeRules context="Comment"/><RegExpr String="[^\w\-]" attribute="Normal Text" context="#pop!Percent Command In" lookAhead="1"/></context><context name="Rule End" attribute="Normal Text" fallthroughContext="#pop#pop"><DetectSpaces/><DetectChar char=";" attribute="Normal Text"/><DetectChar char="|" attribute="Normal Text" context="#pop"/><IncludeRules context="Comment"/></context><context name="Rule In" attribute="Definition"><IncludeRules context="Comment"/><DetectChar char=";" attribute="Normal Text" context="Rule End" endRegion="rule"/><DetectChar char="{" attribute="Normal Text" context="Normal C Bloc" beginRegion="bloc"/><DetectChar char="|" attribute="Normal Text"/><IncludeRules context="StringOrChar"/><RegExpr String="%\?(?=\{)" attribute="Directive"/><WordDetect String="%empty" attribute="Directive"/><WordDetect String="%prec" attribute="Directive"/><WordDetect String="%dprec" attribute="Directive"/><WordDetect String="%merge" attribute="Directive"/><RegExpr String="^[\w\-\.](?=[\w\-\.]*:)" attribute="Open Rule" context="#pop" endRegion="rule" column="0"/><StringDetect String="%%" attribute="Content-Type Delimiter" context="#pop" endRegion="rule" firstNonSpace="1" lookAhead="1"/><RegExpr String="^%(?:union|code|destructor|printer|start|(?:no\-)?default\-prec|nterm|token|type|left|right|nonassoc|precedence)\b" attribute="Directive" context="#pop" endRegion="rule" column="0" lookAhead="1"/></context><context name="Rules" attribute="Rule"><IncludeRules context="Comment"/><StringDetect String="%%" attribute="Content-Type Delimiter" context="User Code" beginRegion="code" endRegion="rules"/><DetectChar char=":" attribute="Normal Text" context="Rule In" beginRegion="rule"/><DetectChar char="%" attribute="Rule" context="Grammar Declaration Start" lookAhead="1"/></context><context name="String" attribute="String" lineEndContext="#pop"><RegExpr String="\\." attribute="Backslash Code"/><DetectChar char='"' attribute="String" context="#pop"/></context><context name="Union Tag" attribute="Normal Text"><IncludeRules context="Comment"/><DetectSpaces/><DetectChar char="{" attribute="Normal Text" context="Union In" beginRegion="union"/><RegExpr String="." attribute="Alert" context="#pop"/></context><context name="User Code" attribute="Normal Text"><IncludeRules context="##C++"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal"/><itemData name="Definition" defStyleNum="dsNormal"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Content-Type Delimiter" defStyleNum="dsBaseN" bold="1"/><itemData name="Directive" defStyleNum="dsKeyword"/><itemData name="Rule" defStyleNum="dsString"/><itemData name="Open Rule" defStyleNum="dsString" bold="1"/><itemData name="Backslash Code" defStyleNum="dsString" bold="1"/><itemData name="Alert" defStyleNum="dsAlert"/><itemData name="String" defStyleNum="dsString"/><itemData name="String Char" defStyleNum="dsChar"/><itemData name="Data Type" defStyleNum="dsDataType"/></itemDatas></highlighting><general><comments><comment name="multiLine" start="/*" end="*/" region="comment"/><comment name="singleLine" start="//"/></comments></general></language>