Index: misc/grammalecte.sublime-syntax
==================================================================
--- misc/grammalecte.sublime-syntax
+++ misc/grammalecte.sublime-syntax
@@ -29,16 +29,16 @@
# Bookmarks
- match: '^GRAPH_NAME:.*'
scope: bookmark
# Graph
- - match: '^@@@@GRAPH: *(\w+) *'
+ - match: '^@@@@GRAPH: *(\w+) .*$'
scope: graphline
captures:
1: string.graphname
- - match: '^@@@@(?:END_GRAPH *| *)'
+ - match: '^@@@@(?:END_GRAPH .*$| *)'
scope: graphline
# Keywords are if, else.
# Note that blackslashes don't need to be escaped within single quoted
# strings in YAML. When using single quoted strings, only single quotes
@@ -47,12 +47,12 @@
- match: '\b(?:if|else|and|or|not|in)\b'
scope: keyword.python
- match: '\b(?:True|False|None)\b'
scope: constant.language
-
- - match: '\b(?:spell|morph|morphex|stem|textarea0?\w*|before0?\w*|after0?\w*|word|option|define|select|exclude|analysex?|tag_|apposition|is[A-Z]\w+|rewriteSubject|checkD\w+|getD\w+|has[A-Z]\w+|sugg[A-Z]\w+|switch[A-Z]\w+|ceOrCet|formatN\w+|mbUnit)\b'
+
+ - match: '\b(?:spell|morph|morphex|morphVC|stem|value|space_after|textarea0?\w*|before0?\w*|after0?\w*|word|option|define|define_from|select|exclude|analyse\w+|tag_\w+|apposition|is[A-Z]\w+|rewriteSubject|checkD\w+|getD\w+|has[A-Z]\w+|sugg[A-Z]\w+|switch[A-Z]\w+|ceOrCet|formatN\w+|mbUnit)\b'
scope: entity.name.function
- match: '\b(?:replace|endswith|startswith|search|upper|lower|capitalize|strip|rstrip|is(?:upper|lower|digit|title))\b'
scope: support.function
@@ -77,11 +77,11 @@
captures:
1: rule.rulename2
2: rule.priority
- match: '/(\w+)/'
- scope: rule.options
+ scope: rule.actionoption
captures:
1: rule.optionname
# Definitions and options
- match: '^OPT(?:GROUP|LANG|PRIORITY)/|^OPTSOFTWARE:'
@@ -109,48 +109,68 @@
scope: keyword.action
- match: '__also__'
scope: keyword.condition.green
- match: '__else__'
scope: keyword.condition.red
- - match: '-(\d*(?::\d+|))>>'
+ - match: '-(\d*\.?(?::\.?\d+|))>>'
scope: keyword.error
captures:
1: keyword.error.group
- match: '~(\d*(?::\d+|))>>'
scope: keyword.textprocessor
captures:
1: keyword.textprocessor.group
- match: '=>>'
scope: keyword.disambiguator
- - match: '/(\d*)>>'
+ - match: '/(\d*(?::\d+|))>>'
scope: keyword.tag
captures:
1: keyword.tag.group
-
+ - match: '%(\d*)>>'
+ scope: keyword.tag
+ captures:
+ 1: keyword.tag.group
# Tokens
- match: '(>)\w+'
scope: string.lemma
captures:
1: keyword.valid
- - match: '(~)(?!(?:\d+(?::\d+|)|)>>)[^\s]+'
+ - match: '(~)(?!(?:\d+(?::\d+|)|)>>)[^\s¬]*'
scope: string.regex
captures:
1: keyword.valid
- - match: '(@)([^@][^\s¬]+)'
+ - match: '(@)([^@\s¬]*)'
scope: string.morph
captures:
1: keyword.valid
2: string.morph.pattern
+
+ - match: '(/)[\w-]+'
+ scope: string.tag
+ captures:
+ 1: keyword.valid
+
+ - match: '(?<=[\[ |])([*])([^\s¬]+)'
+ scope: string.morph
+ captures:
+ 1: keyword.valid
+ 2: string.meta
- match: '(¬)(\S+)'
scope: string.morph
captures:
1: keyword.invalid
- 2: string.morph.antipattern
+ 2: string.morph.antipattern
+
+ - match: '<(?:start|end)>'
+ scope: string.token
+
+ - match: '<>'
+ scope: string.jumptoken
# Escaped chars
- match: '\\(?:\d+|w|d|b|n|s|t)'
scope: constant.character.escape
Index: misc/grammalecte.tmTheme
==================================================================
--- misc/grammalecte.tmTheme
+++ misc/grammalecte.tmTheme
@@ -394,10 +394,25 @@
bold
foreground
#30C0F0
+
+ name
+ Rule action option
+ scope
+ rule.actionoption
+ settings
+
+ fontStyle
+ bold
+ foreground
+ hsl(0, 50%, 50%)
+ background
+ hsl(330, 50%, 20%)
+
+
name
Rule option name
scope
rule.optionname
@@ -404,11 +419,13 @@
settings
fontStyle
bold
foreground
- #90E010
+ hsl(330, 80%, 80%)
+ background
+ hsl(330, 60%, 20%)
name
Rule name
@@ -442,11 +459,50 @@
foreground
#F06060
-
+
+
+ name
+ String meta
+ scope
+ string.meta
+ settings
+
+ foreground
+ hsl(270, 100%, 90%)
+ background
+ hsl(270, 100%, 40%)
+
+
+
+ name
+ String token
+ scope
+ string.token
+ settings
+
+ foreground
+ hsl(240, 50%, 90%)
+ background
+ hsl(240, 50%, 40%)
+
+
+
+ name
+ String Jumptoken
+ scope
+ string.jumptoken
+ settings
+
+ foreground
+ hsl(0, 50%, 90%)
+ background
+ hsl(10, 50%, 40%)
+
+
name
String lemma
scope
string.lemma
@@ -456,10 +512,23 @@
hsl(210, 100%, 80%)
background
hsl(210, 100%, 15%)
+
+ name
+ String tag
+ scope
+ string.tag
+ settings
+
+ foreground
+ hsl(30, 100%, 90%)
+ background
+ hsl(30, 100%, 20%)
+
+
name
String regex
scope
string.regex