medit/moo/mooedit/syntax/language.dtd

191 lines
4.6 KiB
DTD

<!-- kate: space-indent on; indent-width 2; strip on; -->
<!-- boolean
Boolean attributes are case-insensitive and may be the following:
"TRUE", "YES", "1" mean true,
"FALSE", "NO", "0" mean false.
-->
<!ENTITY % boolean "true|false|TRUE|FALSE|0|1">
<!ENTITY % def_styles "Normal|Keyword|DataType|Decimal|BaseN|Float|Char|String|Comment|Others|Alert|Function|RegionMarker|Error">
<!-- rule_type -->
<!ENTITY % simple_rule_type "Int|Float|Hex|Octal|CChar|EscapedChar|Whitespace|Identifier">
<!ENTITY % rule_type "String|Regex|Char|TwoChars|AnyChar|Keyword|LineContinue|(%simple_rule_type;)">
<!ELEMENT language (syntax, styles?, general?, sample-code?)>
<!ATTLIST language
name CDATA #REQUIRED
hidden (%boolean;) #IMPLIED
section CDATA #IMPLIED
extensions CDATA #IMPLIED
mimetypes CDATA #IMPLIED
version CDATA #IMPLIED
author CDATA #IMPLIED
license CDATA #IMPLIED
priority CDATA #IMPLIED
kateversion CDATA #IMPLIED
>
<!-- Syntax -->
<!ELEMENT syntax (keyword-list*, context+, keyword-list*)>
<!ATTLIST syntax>
<!-- Context -->
<!ELEMENT context (%rule_type;|IncludeRules)*>
<!ATTLIST context
name CDATA #REQUIRED
style CDATA #IMPLIED
eol-context CDATA #IMPLIED
>
<!-- Keywords list -->
<!ELEMENT keyword-list (keyword+)>
<!ATTLIST keyword-list
name CDATA #REQUIRED
>
<!-- keyword -->
<!ELEMENT keyword (#PCDATA)>
<!-- Common rule attributes -->
<!ENTITY % common_rule_attrs
" style CDATA #IMPLIED
context CDATA #IMPLIED
include-eol CDATA #IMPLIED
include-into-next (%boolean;) #IMPLIED
caseless (%boolean;) #IMPLIED
bol-only (%boolean;) #IMPLIED
first-non-blank-only (%boolean;) #IMPLIED
first-line-only (%boolean;) #IMPLIED
endRegion CDATA #IMPLIED
beginRegion CDATA #IMPLIED"
>
<!-- Single character -->
<!ELEMENT Char (%rule_type;)*>
<!ATTLIST Char
%common_rule_attrs;
char CDATA #REQUIRED
>
<!-- Two characters -->
<!ELEMENT TwoChars (%rule_type;)*>
<!ATTLIST TwoChars
%common_rule_attrs;
char1 CDATA #REQUIRED
char2 CDATA #REQUIRED
>
<!-- Set of characters -->
<!ELEMENT AnyChar (%rule_type;)*>
<!ATTLIST AnyChar
%common_rule_attrs;
chars CDATA #REQUIRED
>
<!-- String -->
<!ELEMENT String (%rule_type;)*>
<!ATTLIST String
%common_rule_attrs;
string CDATA #REQUIRED
>
<!-- Regular expression -->
<!ELEMENT Regex (%rule_type;)*>
<!ATTLIST Regex
%common_rule_attrs;
pattern CDATA #REQUIRED
non-empty (%boolean;) #IMPLIED
>
<!-- Keyword -->
<!ELEMENT Keyword (%rule_type;)*>
<!ATTLIST Keyword
%common_rule_attrs;
keyword CDATA #REQUIRED
>
<!ELEMENT Int (%rule_type;)*>
<!ATTLIST Int %common_rule_attrs;>
<!ELEMENT Float (%rule_type;)*>
<!ATTLIST Float %common_rule_attrs;>
<!ELEMENT Hex (%rule_type;)*>
<!ATTLIST Hex %common_rule_attrs;>
<!ELEMENT Octal (%rule_type;)*>
<!ATTLIST Octal %common_rule_attrs;>
<!ELEMENT CChar (%rule_type;)*>
<!ATTLIST CChar %common_rule_attrs;>
<!ELEMENT EscapedChar (%rule_type;)*>
<!ATTLIST EscapedChar %common_rule_attrs;>
<!ELEMENT Whitespace (%rule_type;)*>
<!ATTLIST Whitespace %common_rule_attrs;>
<!ELEMENT Identifier (%rule_type;)*>
<!ATTLIST Identifier %common_rule_attrs;>
<!ELEMENT LineContinue (%rule_type;)*>
<!ATTLIST LineContinue %common_rule_attrs;>
<!-- IncludeRules -->
<!ELEMENT IncludeRules EMPTY>
<!ATTLIST IncludeRules
from CDATA #REQUIRED
>
<!-- General -->
<!ELEMENT general (brackets?,comments?)>
<!ATTLIST general>
<!-- brackets -->
<!ELEMENT brackets (#PCDATA)>
<!-- comments -->
<!ELEMENT comments (single-line?,multi-line?)>
<!ATTLIST comments>
<!-- single-line comment -->
<!ELEMENT single-line (#PCDATA)>
<!ATTLIST single-line
start CDATA #REQUIRED
>
<!-- multi-line comment -->
<!ELEMENT multi-line (#PCDATA)>
<!ATTLIST multi-line
start CDATA #REQUIRED
end CDATA #REQUIRED
>
<!-- Styles list -->
<!ELEMENT styles (style+)>
<!ATTLIST styles
>
<!-- Style -->
<!ELEMENT style EMPTY>
<!ATTLIST style
name CDATA #REQUIRED
default-style (%def_styles;) #IMPLIED
foreground CDATA #IMPLIED
background CDATA #IMPLIED
italic (%boolean;) #IMPLIED
bold (%boolean;) #IMPLIED
underline (%boolean;) #IMPLIED
strikethrough (%boolean;) #IMPLIED
>
<!-- Sample code -->
<!ELEMENT sample-code (#PCDATA)>