Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %YAML 1.2
- ---
- name: FullProf PCR
- scope: source.pcr
- file_extensions: [pcr]
- variables:
- number: '-?\d+(\.\d+)?([eE][+-]\d+)?'
- null-number: '-?0+(\.0+)?([eE][+-]\d+)?'
- contexts:
- main:
- - match: '(?i)^(?=\!\s*Atom)'
- push: atomic-content-block
- - match: '^(?=\!)'
- push: generic-block
- end-block:
- - match: '^(?=\!)'
- pop: true
- inline-comment:
- - match: '!'
- scope: punctuation.definition.comment.pcr
- push:
- - meta_scope: comment.line.pcr
- - match: '$\n'
- pop: true
- # Generic lines :
- # - comment
- # - values
- # - codewords (optional)
- generic-block:
- - meta_scope: meta.generic-block.pcr
- - match: '^!'
- scope: punctuation.definition.comment.pcr
- push: generic-comment
- generic-comment:
- - meta_scope: comment.line.pcr
- - match: '$\n'
- set: generic-line-values
- generic-line-values:
- - meta_content_scope: meta.generic-line-values.pcr
- - include: end-block
- - match: '{{number}}'
- scope: constant.other.pcr
- - include: inline-comment
- - match: '$\n'
- set: generic-line-codewords
- generic-line-codewords:
- - meta_content_scope: meta.generic-line-codewords.pcr
- - include: end-block
- - match: '{{null-number}}'
- scope: comment.line.pcr
- - match: '{{number}}'
- scope: keyword.control.pcr
- - include: inline-comment
- - match: '$\n'
- pop: true
- # Atomic content lines :
- # - comment
- # - values
- # - codewords
- # - values
- # - codewords
- # - etc.
- atomic-content-block:
- - meta_scope: meta.atomic-content-block.pcr
- - match: '^!'
- scope: punctuation.definition.comment.pcr
- push: atomic-content-comment
- atomic-content-comment:
- - meta_scope: comment.line.pcr
- - match: '$\n'
- set: atomic-content-line-values
- atomic-content-line-values:
- - meta_content_scope: meta.atomic-content-line-values.pcr
- - include: end-block
- - match: '\b[A-Z][A-Za-z0-9+\-]*\b'
- scope: string.unquoted
- - match: '{{number}}'
- scope: constant.other.pcr
- - include: inline-comment
- - match: '$\n'
- set: atomic-content-line-codewords
- atomic-content-line-codewords:
- - meta_content_scope: meta.atomic-content-line-codewords.pcr
- - include: end-block
- - match: '{{null-number}}'
- scope: comment.line.pcr
- - match: '{{number}}'
- scope: keyword.control.pcr
- - include: inline-comment
- - match: '$\n'
- set: atomic-content-line-values
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement