{ "name": "Unicode Database", "scopeName": "source.ucd.unidata", "patterns": [ { "begin": "\\A(?=#?\\s*$)", "end": "(?=^\\s*\\S)(?!^#\\s*$)", "patterns": [ { "include": "#comment" } ] }, { "include": "#main" } ], "repository": { "BidiMirroring": { "name": "meta.bidi-mirroring.ucd.unidata", "begin": "(?:\\G|\\A|(?:^|(?\u003c=\\n)))(?=# BidiMirroring(?:-\\d+(?:\\.\\d+)*+)?\\.txt\\s*$)", "end": "(?=A)B", "patterns": [ { "match": "(?\u003c=;)\\s*([0-9A-F]{4,})(?:\\s+(#.*))?$", "captures": { "1": { "patterns": [ { "include": "#codePoint" } ] }, "2": { "patterns": [ { "include": "#comment" } ] } } }, { "include": "#PropertyAssignment" } ] }, "Properties": { "name": "meta.${1:/downcase}.ucd.unidata", "begin": "(?:\\G|\\A|(?:^|(?\u003c=\\n)))(?=# (DerivedAge|Blocks|PropList)(?:-\\d+(?:\\.\\d+)*+)?\\.txt\\s*$)", "end": "(?=A)B", "patterns": [ { "include": "#PropertyAssignment" } ] }, "PropertyAssignment": { "patterns": [ { "match": "(?:^|\\G)([0-9A-F]{4,}(?:\\.\\.[0-9A-F]{4,})?)\\s*(;)", "captures": { "1": { "patterns": [ { "include": "#codePoint" } ] }, "2": { "patterns": [ { "include": "etc#semi" } ] } } }, { "match": "(?\u003c=;)\\s*((?!#)\\S.*?)(?:\\s+(#.*))?$", "captures": { "1": { "name": "entity.name.tag.ucd.unidata" }, "2": { "patterns": [ { "include": "#comment" } ] } } }, { "include": "#comment" } ] }, "Scripts": { "name": "meta.scripts.ucd.unidata", "begin": "(?:\\G|\\A|(?:^|(?\u003c=\\n)))(?=# Scripts(?:-\\d+(?:\\.\\d+)*+)?\\.txt\\s*$)", "end": "(?=A)B", "patterns": [ { "match": "^([0-9A-F]{4,}(?:\\.\\.[0-9A-F]{4,})?)\\s*(;)\\s*(\\w+)\\s*(#.*)", "captures": { "1": { "patterns": [ { "include": "#codePoint" } ] }, "2": { "patterns": [ { "include": "etc#semi" } ] }, "3": { "name": "entity.name.tag.script.ucd.unidata" }, "4": { "patterns": [ { "include": "#comment" } ] } } }, { "include": "#comment" } ] }, "SpecialCasing": { "name": "meta.special-casing.ucd.unidata", "begin": "(?:\\G|\\A|(?:^|(?\u003c=\\n)))(?=# SpecialCasing(?:-\\d+(?:\\.\\d+)*+)?\\.txt\\s*$)", "end": "(?=A)B", "patterns": [ { "name": "meta.casing-data.ucd.unidata", "match": "(?x) ^ \\s*\n((?:\\s+(?=;)|\\s*[0-9A-F]{4,}\\s*)*+) (;) # Subject's codepoint\n((?:\\s+(?=;)|\\s*[0-9A-F]{4,}\\s*)*+) (;) # Lowercase mapping\n((?:\\s+(?=;)|\\s*[0-9A-F]{4,}\\s*)*+) (;) # Titlecase mapping\n((?:\\s+(?=;)|\\s*[0-9A-F]{4,}\\s*)*+) (;) # Uppercase mapping\n\n# Optional condition list\n(\n\t\\s* (?!\\#)\n\t((?: \\s* [a-z][a-z-]+ \\s*)*+) # BCP 47 IDs\n\t((?: \\s* [A-Z]\\w+ \\s*)*+) # Casing contexts (?)\n\t(;)\n)? \\s*\n\n# Trailing comment\n(\\#.*)?", "captures": { "1": { "name": "meta.subject-codepoint.ucd.unidata", "patterns": [ { "include": "#codePoint" } ] }, "10": { "patterns": [ { "name": "entity.name.tag.language.ucd.unidata", "match": "[a-z]+" } ] }, "11": { "patterns": [ { "name": "support.constant.casing-context.ucd.unidata", "match": "\\w+" } ] }, "12": { "patterns": [ { "include": "etc#semi" } ] }, "13": { "patterns": [ { "include": "#comment" } ] }, "2": { "patterns": [ { "include": "etc#semi" } ] }, "3": { "name": "meta.lowercase-mapping.ucd.unidata", "patterns": [ { "include": "#codePoint" } ] }, "4": { "patterns": [ { "include": "etc#semi" } ] }, "5": { "name": "meta.titlecase-mapping.ucd.unidata", "patterns": [ { "include": "#codePoint" } ] }, "6": { "patterns": [ { "include": "etc#semi" } ] }, "7": { "name": "meta.uppercase-mapping.ucd.unidata", "patterns": [ { "include": "#codePoint" } ] }, "8": { "patterns": [ { "include": "etc#semi" } ] }, "9": { "name": "meta.condition-list.ucd.unidata" } } }, { "include": "#comment" } ] }, "UnicodeData": { "name": "meta.unicode-data.ucd.unidata", "begin": "\\G|(?:^|(?\u003c=\\n))(?=[0-9A-F]{4,};(?:[^;]*;){13}$)", "end": "(?=A)B", "patterns": [ { "name": "meta.record.character-data.ucd.unidata", "match": "(?x) ^\n([0-9A-F]{4,}) # Hexadecimal codepoint\n(;) ([^;]*) # Official name\n(;) ([^;]*) # General category\n(;) ([^;]*) # Combining class\n(;) ([^;]*) # BIDI category\n(;) ([^;]*) # Decomposition\n(;) ([^;]*) # Decimal digit value\n(;) ([^;]*) # Digit value\n(;) ([^;]*) # Numeric value\n(;) ([^;]*) # Mirrored\n(;) ([^;]*) # Unicode v1 name\n(;) ([^;]*) # ISO 10646 comment\n(;) ([^;]*) # Uppercase mapping\n(;) ([^;]*) # Lowercase mapping\n(;) ([^;]*) # Titlecase mapping\n$ ", "captures": { "1": { "patterns": [ { "include": "#codePoint" } ] }, "10": { "patterns": [ { "include": "etc#semi" } ] }, "11": { "name": "meta.decomposition.ucd.unidata", "patterns": [ { "include": "#decomp" } ] }, "12": { "patterns": [ { "include": "etc#semi" } ] }, "13": { "name": "constant.numeric.value.decimal.ucd.unidata" }, "14": { "patterns": [ { "include": "etc#semi" } ] }, "15": { "name": "constant.numeric.value.digit.ucd.unidata" }, "16": { "patterns": [ { "include": "etc#semi" } ] }, "17": { "name": "constant.numeric.value.number.ucd.unidata" }, "18": { "patterns": [ { "include": "etc#semi" } ] }, "19": { "name": "constant.language.boolean.is-mirrored.ucd.unidata" }, "2": { "patterns": [ { "include": "etc#semi" } ] }, "20": { "patterns": [ { "include": "etc#semi" } ] }, "21": { "name": "entity.name.character.unicode1-name.ucd.unidata" }, "22": { "patterns": [ { "include": "etc#semi" } ] }, "23": { "name": "string.unquoted.iso10646-comment.ucd.unidata" }, "24": { "patterns": [ { "include": "etc#semi" } ] }, "25": { "name": "constant.numeric.mapping.uppercase.ucd.unidata" }, "26": { "patterns": [ { "include": "etc#semi" } ] }, "27": { "name": "constant.numeric.mapping.lowercase.ucd.unidata" }, "28": { "patterns": [ { "include": "etc#semi" } ] }, "29": { "name": "constant.numeric.mapping.titlecase.ucd.unidata" }, "3": { "name": "entity.name.character.official.ucd.unidata" }, "4": { "patterns": [ { "include": "etc#semi" } ] }, "5": { "name": "constant.other.general-category.ucd.unidata" }, "6": { "patterns": [ { "include": "etc#semi" } ] }, "7": { "name": "constant.other.combining-class.ucd.unidata" }, "8": { "patterns": [ { "include": "etc#semi" } ] }, "9": { "name": "constant.other.bidi-category.ucd.unidata" } } } ] }, "codePoint": { "patterns": [ { "include": "#codePointRange" }, { "include": "#codePointSingle" } ] }, "codePointRange": { "name": "meta.range.ucd.unidata", "match": "((?:U\\+)?[0-9A-Fa-f]+)(\\.\\.)((?:U\\+)?[0-9A-Fa-f]+)", "captures": { "1": { "name": "meta.range-start.ucd.unidata", "patterns": [ { "include": "#codePointSingle" } ] }, "2": { "patterns": [ { "include": "etc#dotPair" } ] }, "3": { "name": "meta.range-end.ucd.unidata", "patterns": [ { "include": "#codePointSingle" } ] } } }, "codePointSingle": { "name": "constant.numeric.codepoint.hexadecimal.integer.hex.int.ucd.unidata", "match": "(?:U\\+)?[0-9A-Fa-f]+" }, "comment": { "name": "comment.line.number-sign.ucd.unidata", "begin": "(?:^|\\G)(#)", "end": "$", "patterns": [ { "name": "meta.elided-range.ucd.unidata", "match": "\\G\\s*((@)missing)(:)\\s*([A-F0-9]{4,}(?:\\.\\.[A-F0-9]{4,})?)\\s*(;)\\s*(\\S.*)", "captures": { "1": { "name": "storage.type.class.missing.ucd.unidata" }, "2": { "name": "punctuation.definition.block.tag.ucd.unidata" }, "3": { "patterns": [ { "include": "etc#kolon" } ] }, "4": { "patterns": [ { "include": "#codePoint" } ] }, "5": { "patterns": [ { "include": "etc#semi" } ] }, "6": { "name": "entity.name.type.default-value.ucd.unidata" } } }, { "match": "\\G\\s+((\\[)BEST FIT(\\]))\\s+", "captures": { "1": { "name": "storage.modifier.best-fit.ucd.unidata" }, "2": { "patterns": [ { "include": "etc#bracket" } ] }, "3": { "patterns": [ { "include": "etc#bracket" } ] } } }, { "match": "\\b(QUESTION|TODO)\\b" } ], "beginCaptures": { "1": { "name": "punctuation.definition.comment.ucd.unidata" } } }, "decomp": { "patterns": [ { "name": "storage.modifier.$2.ucd.unidata", "match": "(?:\\G|^|(?\u003c=\\n))(\u003c)([^\u003e;]+)(\u003e)", "captures": { "1": { "name": "punctuation.definition.bracket.angle.begin.unidata" }, "3": { "name": "punctuation.definition.bracket.angle.end.unidata" } } }, { "include": "#codePoint" } ] }, "main": { "patterns": [ { "include": "#Properties" }, { "include": "#Scripts" }, { "include": "#SpecialCasing" }, { "include": "#BidiMirroring" }, { "include": "#UnicodeData" }, { "include": "#comment" } ] } } }