Advertisement
Guest User

Updated PCR Syntax File

a guest
Aug 25th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.63 KB | None | 0 0
  1. %YAML 1.2
  2. ---
  3. # See http://www.sublimetext.com/docs/3/syntax.html
  4. file_extensions:
  5.  - pcr
  6. scope: source.fullprof
  7.  
  8. variables:
  9.   number: '\b[0-9E\-\.]+\b'
  10.  
  11. contexts:
  12.   main:
  13.     - include: commands
  14.     - include: special-cards
  15.     - include: comments
  16.  
  17.   commands:
  18.     - match: '^(COMM)\s(.*)$'
  19.       captures:
  20.         1: keyword.other.pcr
  21.         2: entity.name.control-file.pcr
  22.     - match: '^(Name)(:)\s*(\w+)'
  23.       captures:
  24.         1: keyword.other.pcr
  25.         2: punctuation.separator.pcr
  26.         3: entity.name.phase-name.pcr
  27.  
  28.   special-cards:
  29.     - include: scale-card-start
  30.  
  31.   scale-card-start:
  32.     - match: |-
  33.         (?xi)
  34.           ^(!)\s*
  35.           (Scale)\s*
  36.           (Shape1)\s*
  37.           (Bov)\s*
  38.           (Str1)\s*
  39.           (Str2)\s*
  40.           (Str3)\s*
  41.           (Strain-Model)\s*$
  42.       captures:
  43.         1: punctuation.definition.comment.pcr
  44.         2: keyword.other.pcr
  45.         3: keyword.other.pcr
  46.         4: keyword.other.pcr
  47.         5: keyword.other.pcr
  48.         6: keyword.other.pcr
  49.         7: keyword.other.pcr
  50.         8: keyword.other.pcr
  51.       scope: comment.line.pcr
  52.       push: scale-card-1
  53.  
  54.   scale-card-1:
  55.     - meta_content_scope: meta.block.scale-card-1.pcr
  56.     - match: |-
  57.         (?xi)
  58.           ({{number}})\s*
  59.           ({{number}})\s*
  60.           ({{number}})\s*
  61.           ({{number}})\s*
  62.           ({{number}})\s*
  63.           ({{number}})\s*
  64.           ({{number}})\s*
  65.       captures:
  66.         1: constant.numeric.pcr
  67.         2: constant.numeric.pcr
  68.         3: constant.numeric.pcr
  69.         4: constant.numeric.pcr
  70.         5: constant.numeric.pcr
  71.         6: constant.numeric.pcr
  72.         7: constant.numeric.pcr
  73.       set: scale-card-2
  74.  
  75.   scale-card-2:
  76.     - meta_content_scope: meta.block.scale-card-2.pcr
  77.     - match: |-
  78.         (?xi)
  79.           ({{number}})\s*
  80.           ({{number}})\s*
  81.           ({{number}})\s*
  82.           ({{number}})\s*
  83.           ({{number}})\s*
  84.           ({{number}})\s*
  85.       captures:
  86.           1: constant.numeric.pcr
  87.           2: keyword.other.pcr
  88.           3: constant.numeric.pcr
  89.           4: constant.numeric.pcr
  90.           5: constant.numeric.pcr
  91.           6: constant.numeric.pcr
  92.       scope: meta.block.scale-card-2.pcr
  93.       pop: true
  94.  
  95.   comments:
  96.    # Generic in-line comment
  97.     - match: '#'
  98.       scope: punctuation.definition.comment.pcr
  99.       push:
  100.         - meta_scope: comment.line.pcr
  101.         - match: \n
  102.           pop: true
  103.     # Generic card comment
  104.     - match: '!'
  105.       scope: punctuation.definition.comment.pcr
  106.       push:
  107.         - meta_scope: comment.line.pcr
  108.         - match: \n
  109.           pop: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement