--- 
name: Property List
fileTypes: 
- plist
- dict
- tmCommand
- tmDelta
- tmDragCommand
- tmLanguage
- tmMacro
- tmPreferences
- tmSnippet
- tmTheme
- scriptSuite
- scriptTerminology
- savedSearch
scopeName: "text.plist"
repository: 
  openstep_comment: 
    patterns: 
    - name: comment.block.plist
      captures: 
        "0": 
          name: punctuation.definition.comment.plist
      begin: /\*
      end: \*/
    - name: comment.line.double-slash.plist
      captures: 
        "1": 
          name: punctuation.definition.comment.plist
      match: (//).*$\n?
  openstep: 
    patterns: 
    - include: "#openstep_comment"
    - include: "#openstep_dictionary"
    - include: "#openstep_array"
    - include: "#openstep_stray-char"
  xml_tags: 
    patterns: 
    - captures: 
        "6": 
          name: meta.tag.dict.xml.plist
        "11": 
          name: punctuation.definition.tag.xml.plist
        "7": 
          name: punctuation.definition.tag.xml.plist
        "8": 
          name: meta.scope.between-tag-pair.xml.plist
        "9": 
          name: entity.name.tag.xml.plist
        "1": 
          name: meta.tag.dict.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "10": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      match: ((<)((dict))(>))(((<)/)((dict))(>))
      comment: "Empty tag: Dictionary"
    - captures: 
        "6": 
          name: meta.tag.array.xml.plist
        "11": 
          name: punctuation.definition.tag.xml.plist
        "7": 
          name: punctuation.definition.tag.xml.plist
        "8": 
          name: meta.scope.between-tag-pair.xml.plist
        "9": 
          name: entity.name.tag.xml.plist
        "1": 
          name: meta.tag.array.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "10": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      match: ((<)((array))(>))(((<)/)((array))(>))
      comment: "Empty tag: Array"
    - captures: 
        "6": 
          name: meta.tag.string.xml.plist
        "11": 
          name: punctuation.definition.tag.xml.plist
        "7": 
          name: punctuation.definition.tag.xml.plist
        "8": 
          name: meta.scope.between-tag-pair.xml.plist
        "9": 
          name: entity.name.tag.xml.plist
        "1": 
          name: meta.tag.string.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "10": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      match: ((<)((string))(>))(((<)/)((string))(>))
      comment: "Empty tag: String"
    - captures: 
        "1": 
          name: meta.tag.key.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      begin: ((<)((key))(>))
      contentName: constant.other.name.xml.plist
      end: ((</)((key))(>))
      patterns: 
      - captures: 
          "0": 
            name: punctuation.definition.constant.xml
        begin: <!\[CDATA\[
        end: "]]>"
      comment: the extra captures are required to duplicate the effect of the namespace parsing in the XML syntax
    - captures: 
        "1": 
          name: meta.tag.dict.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      match: ((<)((dict))\s*?/(>))
      comment: Self-closing Dictionary
    - captures: 
        "1": 
          name: meta.tag.array.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      match: ((<)((array))\s*?/(>))
      comment: Self-closing Array
    - captures: 
        "1": 
          name: meta.tag.string.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      match: ((<)((string))\s*?/(>))
      comment: Self-closing String
    - captures: 
        "1": 
          name: meta.tag.key.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      match: ((<)((key))\s*?/(>))
      comment: Self-closing Key
    - captures: 
        "1": 
          name: meta.tag.dict.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      begin: ((<)((dict))(>))
      end: ((</)((dict))(>))
      patterns: 
      - include: "#xml_tags"
      comment: Dictionary
    - captures: 
        "1": 
          name: meta.tag.array.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      begin: ((<)((array))(>))
      end: ((</)((array))(>))
      patterns: 
      - include: "#xml_tags"
      comment: Array
    - captures: 
        "1": 
          name: meta.tag.string.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      begin: ((<)((string))(>))
      contentName: string.quoted.other.xml.plist
      end: ((</)((string))(>))
      patterns: 
      - include: "#xml_innertag"
      - name: string.unquoted.cdata.xml
        captures: 
          "0": 
            name: punctuation.definition.string.xml
        begin: <!\[CDATA\[
        end: "]]>"
      comment: Strings
    - captures: 
        "1": 
          name: meta.tag.real.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      begin: ((<)((real))(>))
      end: ((</)((real))(>))
      patterns: 
      - captures: 
          "0": 
            name: punctuation.definition.constant.xml
          "1": 
            name: constant.numeric.real.xml.plist
        begin: (<!\[CDATA\[)
        end: (]]>)
        patterns: 
        - name: constant.numeric.real.xml.plist
          match: "[-+]?\\d+(\\.\\d*)?(E[-+]\\d+)?"
        - name: invalid.illegal.not-a-number.xml.plist
          match: .
      - name: constant.numeric.real.xml.plist
        match: "[-+]?\\d+(\\.\\d*)?(E[-+]\\d+)?"
      - name: invalid.illegal.not-a-number.xml.plist
        match: .
      comment: Numeric
    - captures: 
        "1": 
          name: meta.tag.integer.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      begin: ((<)((integer))(>))
      end: ((</)((integer))(>))
      patterns: 
      - name: constant.numeric.integer.xml.plist
        match: "[-+]?\\d+"
      - name: invalid.illegal.not-a-number.xml.plist
        match: .
      comment: Integer
    - captures: 
        "1": 
          name: meta.tag.boolean.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      match: ((<)((true|false))\s*?(/>))
      comment: Boolean
    - captures: 
        "1": 
          name: meta.tag.data.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      begin: ((<)((data))(>))
      end: ((</)((data))(>))
      patterns: 
      - name: constant.numeric.base64.xml.plist
        match: "[A-Za-z0-9+/]"
      - name: constant.numeric.base64.xml.plist
        match: "="
      - name: invalid.illegal.invalid-character.xml.plist
        match: "[^ \\n\\t]"
      comment: Data
    - captures: 
        "1": 
          name: meta.tag.date.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      begin: ((<)((date))(>))
      end: ((</)((date))(>))
      patterns: 
      - name: constant.other.date.xml.plist
        match: "(?x)\n\
          \t\t\t\t\t\t\t\t\t\t[0-9]{4}\t\t\t\t\t\t# Year\n\
          \t\t\t\t\t\t\t\t\t\t-\t\t\t\t\t\t\t\t# Divider\n\
          \t\t\t\t\t\t\t\t\t\t(0[1-9]|1[012])\t\t\t\t\t# Month\n\
          \t\t\t\t\t\t\t\t\t\t-\t\t\t\t\t\t\t\t# Divider\n\
          \t\t\t\t\t\t\t\t\t\t(?!00|3[2-9])[0-3][0-9]\t\t\t# Day\n\
          \t\t\t\t\t\t\t\t\t\tT\t\t\t\t\t\t\t\t# Separator\n\
          \t\t\t\t\t\t\t\t\t\t(?!2[5-9])[0-2][0-9]\t\t\t# Hour\n\
          \t\t\t\t\t\t\t\t\t\t:\t\t\t\t\t\t\t\t# Divider\n\
          \t\t\t\t\t\t\t\t\t\t[0-5][0-9]\t\t\t\t\t\t# Minute\n\
          \t\t\t\t\t\t\t\t\t\t:\t\t\t\t\t\t\t\t# Divider\n\
          \t\t\t\t\t\t\t\t\t\t(?!6[1-9])[0-6][0-9]\t\t\t# Second\n\
          \t\t\t\t\t\t\t\t\t\tZ\t\t\t\t\t\t\t\t# Zulu\n\
          \t\t\t\t\t\t\t\t\t"
      comment: Date
    - include: "#xml_invalid"
    - include: "#xml_comment"
    - include: "#xml_stray-char"
  xml_innertag: 
    patterns: 
    - name: constant.character.entity.xml.plist
      match: "&([a-zA-Z0-9_-]+|#[0-9]+|#x[0-9a-fA-F]+);"
    - name: invalid.illegal.bad-ampersand.xml.plist
      match: "&"
  xml: 
    patterns: 
    - captures: 
        "1": 
          name: meta.tag.plist.xml.plist
        "2": 
          name: punctuation.definition.tag.xml.plist
        "3": 
          name: entity.name.tag.xml.plist
        "4": 
          name: entity.name.tag.localname.xml.plist
        "5": 
          name: punctuation.definition.tag.xml.plist
      begin: ((<)((plist\b)))
      end: ((/)((plist))(>))
      patterns: 
      - name: meta.tag.plist.xml.plist
        begin: (?<=<plist)(?!>)\s*(?:(version)(=)(?:((").*?("))|((').*?('))))?
        beginCaptures: 
          "6": 
            name: string.quoted.single.xml.plist
          "7": 
            name: punctuation.definition.string.begin.xml.plist
          "8": 
            name: punctuation.definition.string.end.xml.plist
          "1": 
            name: entity.other.attribute-name.version.xml.plist
          "2": 
            name: punctuation.separator.key-value.xml.plist
          "3": 
            name: string.quoted.double.xml.plist
          "4": 
            name: punctuation.definition.string.begin.xml.plist
          "5": 
            name: punctuation.definition.string.end.xml.plist
        end: (?=>)
      - captures: 
          "1": 
            name: meta.tag.plist.xml.plist
          "2": 
            name: punctuation.definition.tag.xml.plist
          "3": 
            name: meta.scope.between-tag-pair.xml.plist
        match: ((>(<)))(?=/plist)
        comment: Tag with no content
      - endCaptures: 
          "0": 
            name: meta.tag.plist.xml.plist
          "1": 
            name: punctuation.definition.tag.xml.plist
        begin: ((>))(?!</plist)
        beginCaptures: 
          "1": 
            name: meta.tag.plist.xml.plist
          "2": 
            name: punctuation.definition.tag.xml.plist
        end: (<)(?=/plist)
        patterns: 
        - include: "#xml_tags"
    - include: "#xml_invalid"
    - include: "#xml_comment"
    - include: text.xml
    - include: "#xml_stray-char"
  openstep_data: 
    name: meta.binary-data.plist
    endCaptures: 
      "1": 
        name: punctuation.terminator.data.plist
      "2": 
        name: punctuation.definition.data.plist
    begin: (<)
    beginCaptures: 
      "1": 
        name: punctuation.definition.data.plist
    end: (=?)\s*?(>)
    patterns: 
    - name: constant.numeric.base64.plist
      match: "[A-Za-z0-9+/]"
    - name: invalid.illegal.invalid-character.plist
      match: "[^ \\n]"
  xml_stray-char: 
    name: invalid.illegal.character-data-not-allowed-here.xml.plist
    match: \S
  openstep_post-value: 
    begin: (?<='|"|\}|\)|>|[-a-zA-Z0-9_.])(?!;)
    end: (?=;)
    patterns: 
    - include: "#openstep_stray-char"
  openstep_dictionary: 
    name: meta.group.dictionary.plist
    captures: 
      "1": 
        name: punctuation.section.dictionary.plist
    begin: (\{)
    end: (\})
    patterns: 
    - include: "#openstep_name"
    - include: "#openstep_comment"
    - include: "#openstep_stray-char"
  xml_comment: 
    name: comment.block.xml.plist
    captures: 
      "0": 
        name: punctuation.definition.comment.xml.plist
    begin: <!--
    end: (?<!-)-->
    patterns: 
    - name: invalid.illegal.double-dash-not-allowed.xml.plist
      match: -(?=-->)|--
  openstep_string-contents: 
    name: constant.character.escape.plist
    match: \\([uU](\h{4}|\h{2})|\d{1,3}|.)
  openstep_stray-char: 
    name: invalid.illegal.character-not-allowed-here.plist
    match: "[^\\s\\n]"
  xml_invalid: 
    captures: 
      "1": 
        name: meta.tag.boolean.xml.plist
      "2": 
        name: punctuation.definition.tag.xml.plist
      "3": 
        name: invalid.illegal.tag-not-recognized.xml.plist
      "4": 
        name: punctuation.definition.tag.xml.plist
    match: ((<)/?(\w+).*?(>))
    comment: Invalid tag
  openstep_string: 
    patterns: 
    - name: string.quoted.single.plist
      endCaptures: 
        "0": 
          name: punctuation.definition.string.end.plist
      begin: "'"
      beginCaptures: 
        "0": 
          name: punctuation.definition.string.begin.plist
      end: "'"
      patterns: 
      - include: "#openstep_string-contents"
    - name: string.quoted.double.plist
      endCaptures: 
        "0": 
          name: punctuation.definition.string.end.plist
      begin: "\""
      beginCaptures: 
        "0": 
          name: punctuation.definition.string.begin.plist
      end: "\""
      patterns: 
      - include: "#openstep_string-contents"
    - name: constant.numeric.plist
      match: "[-+]?\\d+(\\.\\d*)?(E[-+]\\d+)?(?!\\w)"
    - name: string.unquoted.plist
      match: "[-a-zA-Z0-9_.]+"
  openstep_name: 
    patterns: 
    - name: meta.rule.named.plist
      endCaptures: 
        "1": 
          name: punctuation.terminator.array.plist
        "2": 
          name: punctuation.terminator.dictionary.plist
        "3": 
          name: punctuation.terminator.rule.plist
      begin: (?=([-a-zA-Z0-9_.]+)|("|'))
      end: ((?<=\));)|((?<=\});)|(;)
      patterns: 
      - name: constant.other.key.plist
        match: "[-a-zA-Z0-9_.]+"
      - begin: (?<=('|"|[-a-zA-Z0-9_.]))(?!=)|\s
        end: (?==)
        patterns: 
        - include: "#openstep_stray-char"
        comment: |-
          Mark anything between the name and the =
          										as invalid.
      - name: constant.other.key.plist
        endCaptures: 
          "0": 
            name: punctuation.definition.string.end.plist
        begin: ("|')
        beginCaptures: 
          "0": 
            name: punctuation.definition.string.begin.plist
        end: (\1)
        patterns: 
        - include: "#openstep_string-contents"
      - begin: (=)(?!;)
        beginCaptures: 
          "1": 
            name: punctuation.separator.key-value.plist
        end: (?=;)
        patterns: 
        - include: "#openstep_post-value"
        - include: "#openstep_string"
        - include: "#openstep_data"
        - include: "#openstep_array"
        - include: "#openstep_dictionary"
  openstep_array-item: 
    endCaptures: 
      "1": 
        name: punctuation.separator.array.plist
    begin: (?={|\(|"|'|[-a-zA-Z0-9_.]|<)
    end: (,)|(?=\))
    patterns: 
    - include: "#openstep_string"
    - include: "#openstep_data"
    - include: "#openstep_dictionary"
    - include: "#openstep_array"
    - begin: (?<="|'|\}|\))
      end: (?=,|\))
      patterns: 
      - include: "#openstep_comment"
      - include: "#openstep_stray-char"
      comment: Catch stray chars
  openstep_array: 
    name: meta.group.array.plist
    captures: 
      "1": 
        name: punctuation.section.array.plist
    begin: (\()
    end: (\))
    patterns: 
    - include: "#openstep_array-item"
    - include: "#openstep_comment"
    - include: "#openstep_stray-char"
uuid: E62B2729-6B1C-11D9-AE35-000D93589AF6
foldingStartMarker: "(?x)\n\
  \t\t\t\t\t\t\t(\n\
  \t\t\t\t\t\t\t\t(^|=|=[ ]|\\s\\s|\\t)\t\t\t\t# Openstep foldings\n\
  \t\t\t\t\t\t\t\t(\\{|\\()(?!.*(\\)|\\}))\t\t\t# spaces before them to \n\
  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# limit false positives\n\
  \t\t\t\t\t\t\t  | (\n\
  \t\t\t\t\t\t\t\t\t^\\s*\n\
  \t\t\t\t\t\t\t\t\t(\n\
  \t\t\t\t\t\t\t\t\t\t<[^!?%/](?!.+?(/>\n\
  \t\t\t\t\t\t\t\t\t  | </.+?>))\n\
  \t\t\t\t\t\t\t\t\t  | <[!%]--(?!.+?--%?>)\n\
  \t\t\t\t\t\t\t\t\t)\n\
  \t\t\t\t\t\t\t\t)\n\
  \t\t\t\t\t\t\t)\n\
  \t\t\t\t\t\t "
patterns: 
- name: text.xml.plist
  begin: xml|plist
  end: \Z(?!\n)
  comment: This gives us the proper scope for the xml or plist snippet.
- name: source.plist.binary
  begin: ^bplist00
  end: \Z(?!\n)
  comment: This gives us the proper scope for the convert plist command.
- name: text.xml.plist
  begin: (?=\s*(<\?xml|<!DOCTYPE\s*plist))
  end: \Z(?!\n)
  patterns: 
  - include: "#xml"
- name: source.plist
  begin: (?=\s*({|\(|//|/\*))
  end: \Z(?!\n)
  patterns: 
  - include: "#openstep"
foldingStopMarker: "(?x)\n\
  \t\t\t\t\t\t\t(\n\
  \t\t\t\t\t\t\t\t(\\}|\\))(,|;)?\t\t\t\t\t# Openstep foldings\n\
  \t\t\t\t\t\t\t\t.*$\t\t\t\t\t\t\t\t# limit false positives\n\
  \t\t\t\t\t\t\t  | (^\\s*(</[^>]+>|/>|-->)\\s*$)\t\t# XML\t\t\t\t\t\t\n\
  \t\t\t\t\t\t\t)\n\
  \t\t\t\t\t\t"
keyEquivalent: ^~P
