Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions assets/KNP.sublime-syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
%YAML 1.2
---
name: KNP
file_extensions: [knp, bertknp]
scope: source.knp

contexts:
main:
- match: '^[^+*\#\"<> ]+'
scope: variablel
- match: '(?<=\s)[^+\#\"<> ]+'
scope: variable
- match: "<"
scope: keyword
push: feature
- match: ^\+
scope: keyword
push: tag_bnst
- match: ^\*
scope: keyword
push: tag_bnst
- match: ^EOS$
scope: constant
- match: \"
scope: string
push: string
- match: ^\#
scope: comment
push: comment
string:
- match: '[^\"]+'
scope: string
- match: \"
scope: string
pop: true
tag_bnst:
- match: (-1|\d+)[DP]
scope: constant.language
- match: "<"
scope: keyword
push: feature
- match: $
pop: true
feature:
- match: \"
scope: string
push: string
- match: ">"
scope: keyword
pop: true
- match: ":"
scope: keyword
push: feature_value
- match: "="
scope: keyword
- match: '[^ :><\"=]+'
scope: storage.type
feature_value:
- match: "[^><]+(?=>)"
scope: variable.parameter
pop: true
comment:
- match: "S-ID:"
scope: comment
push: sid
- match: \S+
scope: comment
- match: $
pop: true
sid:
- match: \S+
scope: constant.numeric
pop: true