Skip to content

Commit

Permalink
removes identifier regex and simplifies dds regex
Browse files Browse the repository at this point in the history
  • Loading branch information
barrettotte committed Aug 13, 2024
1 parent 1618671 commit f1f5e0c
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 101 deletions.
37 changes: 13 additions & 24 deletions syntaxes/dds.dspf.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
{
"include": "#gutter"
},
{
"include": "#identifiers"
},
{
"include": "#strings"
}
Expand All @@ -42,55 +39,55 @@
"patterns": [
{
"name": "constant.language.dds.dspf",
"match": "[*][a-zA-Z][a-zA-Z0-9]*"
"match": "(\\*)[a-zA-Z][a-zA-Z0-9]*"
},
{
"name": "constant.language.dds.dspf.andor",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{0}))(A|O)"
"match": "(?i)(?<=^.{5}(A|\\s).{0})(A|O)"
},
{
"name": "constant.language.dds.dspf.n01",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{1}))(N|\\s)[0-9]{2}"
"match": "(?i)(?<=^.{5}(A|\\s).{1})(N|\\s)[0-9]{2}"
},
{
"name": "constant.language.dds.dspf.n02",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{4}))(N|\\s)[0-9]{2}"
"match": "(?i)(?<=^.{5}(A|\\s).{4})(N|\\s)[0-9]{2}"
},
{
"name": "constant.language.dds.dspf.n03",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{7}))(N|\\s)[0-9]{2}"
"match": "(?i)(?<=^.{5}(A|\\s).{7})(N|\\s)[0-9]{2}"
},
{
"name": "constant.language.dds.dspf.nameType",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{10}))(R|H)"
"match": "(?i)(?<=^.{5}(A|\\s).{10})(R|H)"
},
{
"name": "constant.language.dds.dspf.ref",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{22}))(R)"
"match": "(?i)(?<=^.{5}(A|\\s).{22})(R)"
},
{
"name": "constant.language.dds.dspf.len",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{23}))[0-9|\\s]{5}"
"match": "(?i)(?<=^.{5}(A|\\s).{23})[0-9|\\s]{5}"
},
{
"name": "constant.language.dds.dspf.dataType",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{28}))(A|D|E|F|G|I|J|L|M|N|O|S|T|W|X|Y|Z)"
"match": "(?i)(?<=^.{5}(A|\\s).{28})(A|D|E|F|G|I|J|L|M|N|O|S|T|W|X|Y|Z)"
},
{
"name": "constant.language.dds.dspf.decpos",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{29}))[0-9|\\s]{2}"
"match": "(?i)(?<=^.{5}(A|\\s).{29})[0-9|\\s]{2}"
},
{
"name": "constant.language.dds.dspf.usage",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{31}))(O|I|B|H|M|P)"
"match": "(?i)(?<=^.{5}(A|\\s).{31})(O|I|B|H|M|P)"
},
{
"name": "constant.language.dds.dspf.locline",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{32}))([0-9]|\\s){3}"
"match": "(?i)(?<=^.{5}(A|\\s).{32})([0-9]|\\s){3}"
},
{
"name": "constant.language.dds.dspf.locpos",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{35}))([0-9]|\\s){3}"
"match": "(?i)(?<=^.{5}(A|\\s).{35})([0-9]|\\s){3}"
},
{
"name": "constant.numeric.dds.dspf",
Expand Down Expand Up @@ -170,14 +167,6 @@
}
]
},
"identifiers": {
"patterns": [
{
"name": "identifier.other.dds.dspf.identifiers",
"match": "[a-zA-Z_#$][a-zA-Z0-9_.#$]*"
}
]
},
"strings": {
"name": "string.quoted.single.dds.dspf",
"begin": "'",
Expand Down
35 changes: 12 additions & 23 deletions syntaxes/dds.icff.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
{
"include": "#gutter"
},
{
"include": "#identifiers"
},
{
"include": "#strings"
}
Expand All @@ -42,51 +39,51 @@
"patterns": [
{
"name": "constant.language.dds.icff",
"match": "[*][a-zA-Z][a-zA-Z0-9]*"
"match": "(\\*)[a-zA-Z][a-zA-Z0-9]*"
},
{
"name": "constant.language.dds.icff.andor",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{0}))(A|O)"
"match": "(?i)(?<=^.{5}(A|\\s).{0})(A|O)"
},
{
"name": "constant.language.dds.icff.n01",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{1}))(N|\\s)[0-9]{2}"
"match": "(?i)(?<=^.{5}(A|\\s).{1})(N|\\s)[0-9]{2}"
},
{
"name": "constant.language.dds.icff.n02",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{4}))(N|\\s)[0-9]{2}"
"match": "(?i)(?<=^.{5}(A|\\s).{4})(N|\\s)[0-9]{2}"
},
{
"name": "constant.language.dds.icff.n03",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{7}))(N|\\s)[0-9]{2}"
"match": "(?i)(?<=^.{5}(A|\\s).{7})(N|\\s)[0-9]{2}"
},
{
"name": "constant.language.dds.icff.nameType",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{10}))(R|H)"
"match": "(?i)(?<=^.{5}(A|\\s).{10})(R|H)"
},
{
"name": "constant.language.dds.icff.ref",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{22}))R"
"match": "(?i)(?<=^.{5}(A|\\s).{22})(R)"
},
{
"name": "constant.language.dds.icff.len",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{23}))[0-9|\\s]{5}"
"match": "(?i)(?<=^.{5}(A|\\s).{23})[0-9|\\s]{5}"
},
{
"name": "constant.language.dds.icff.dataType",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{28}))(P|S|B|F|A|O)"
"match": "(?i)(?<=^.{5}(A|\\s).{28})(P|S|B|F|A|O)"
},
{
"name": "constant.language.dds.icff.decpos",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{29}))[0-9|\\s]{2}"
"match": "(?i)(?<=^.{5}(A|\\s).{29})[0-9|\\s]{2}"
},
{
"name": "constant.language.dds.icff.usage",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{31}))(B|P)"
"match": "(?i)(?<=^.{5}(A|\\s).{31})(B|P)"
},
{
"name": "constant.language.dds.icff.locline",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{32}))([0-9]|\\s){3}"
"match": "(?i)(?<=^.{5}(A|\\s).{32})([0-9]|\\s){3}"
},
{
"name": "constant.numeric.dds.icff",
Expand Down Expand Up @@ -118,14 +115,6 @@
}
]
},
"identifiers": {
"patterns": [
{
"name": "identifier.other.dds.icff.identifiers",
"match": "[a-zA-Z_#$][a-zA-Z0-9_.#$]*"
}
]
},
"strings": {
"name": "string.quoted.single.dds.icff",
"begin": "'",
Expand Down
25 changes: 7 additions & 18 deletions syntaxes/dds.lf.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
{
"include": "#gutter"
},
{
"include": "#identifiers"
},
{
"include": "#strings"
}
Expand All @@ -42,31 +39,31 @@
"patterns": [
{
"name": "constant.language.dds.lf",
"match": "[*][a-zA-Z][a-zA-Z0-9]*"
"match": "(\\*)[a-zA-Z][a-zA-Z0-9]*"
},
{
"name": "constant.language.dds.lf.nametype",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{10}))(R|K|J|S|O)"
"match": "(?i)(?<=^.{5}(A|\\s).{10})(R|K|J|S|O)"
},
{
"name": "constant.language.dds.lf.ref",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{22}))R"
"match": "(?i)(?<=^.{5}(A|\\s).{22})R"
},
{
"name": "constant.language.dds.lf.len",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{23}))[0-9|\\s]{5}"
"match": "(?i)(?<=^.{5}(A|\\s).{23})[0-9|\\s]{5}"
},
{
"name": "constant.language.dds.lf.datatype",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{28}))(P|S|B|F|A|L|T|Z|H|J|E|O|G|5)"
"match": "(?i)(?<=^.{5}(A|\\s).{28})(P|S|B|F|A|L|T|Z|H|J|E|O|G|5)"
},
{
"name": "constant.language.dds.lf.decpos",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{29}))[0-9|\\s]{2}"
"match": "(?i)(?<=^.{5}(A|\\s).{29})[0-9|\\s]{2}"
},
{
"name": "constant.language.dds.lf.use",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{31}))(B|I|N)"
"match": "(?i)(?<=^.{5}(A|\\s).{31})(B|I|N)"
},
{
"name": "constant.numeric.dds.lf",
Expand Down Expand Up @@ -105,14 +102,6 @@
}
]
},
"identifiers": {
"patterns": [
{
"name": "identifier.other.dds.lf.identifiers",
"match": "[a-zA-Z_#$][a-zA-Z0-9_.#$]*"
}
]
},
"strings": {
"name": "string.quoted.single.dds.lf",
"begin": "'",
Expand Down
21 changes: 9 additions & 12 deletions syntaxes/dds.pf.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
{
"include": "#gutter"
},
{
"include": "#identifiers"
},
{
"include": "#strings"
}
Expand All @@ -42,31 +39,31 @@
"patterns": [
{
"name": "constant.language.dds.pf",
"match": "[*][a-zA-Z][a-zA-Z0-9]*"
"match": "(\\*)[a-zA-Z][a-zA-Z0-9]*"
},
{
"name": "constant.language.dds.pf.nametype",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{10}))(R|K)"
"match": "(?i)(?<=^.{5}(A|\\s).{10})(R|K)"
},
{
"name": "constant.language.dds.pf.ref",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{22}))(R)"
"match": "(?i)(?<=^.{5}(A|\\s).{22})R"
},
{
"name": "constant.language.dds.pf.len",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{23}))[0-9|\\s]{5}"
"match": "(?i)(?<=^.{5}(A|\\s).{23})[0-9|\\s]{5}"
},
{
"name": "constant.language.dds.pf.datatype",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{28}))(P|S|B|F|A|L|T|Z|H|J|E|O|G|5)"
"match": "(?i)(?<=^.{5}(A|\\s).{28})(P|S|B|F|A|L|T|Z|H|J|E|O|G|5)"
},
{
"name": "constant.language.dds.pf.decpos",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{29}))[0-9|\\s]{2}"
"match": "(?i)(?<=^.{5}(A|\\s).{29})([0-9]|\\s){2}"
},
{
"name": "constant.language.dds.pf.use",
"match": "(?i)(?<=((?<=^.{5}[A|\\s]).{31}))B"
"match": "(?i)(?<=^.{5}(A|\\s).{31})(B)"
},
{
"name": "constant.numeric.dds.pf",
Expand All @@ -78,7 +75,7 @@
"patterns": [
{
"name": "keyword.other.dds.pf.spec",
"match": "(?i)(?<=^.{5})[A]"
"match": "(?i)(?<=^.{5})(A)"
},
{
"name": "keyword.other.dds.pf",
Expand All @@ -105,7 +102,7 @@
"patterns": [
{
"name": "keyword.other.dds.pf.spec",
"match": "(?i)(?<=^.{5})[A]"
"match": "(?i)(?<=^.{5})(A)"
}
]
}
Expand Down
Loading

0 comments on commit f1f5e0c

Please sign in to comment.