Skip to content

Commit

Permalink
refactor: Remove identifier prefix to simplify grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
famoser committed Mar 2, 2024
1 parent 6732ee5 commit 59e6d19
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions syntaxes/pv.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
},
{
"//comment" : "Declaration of def",
"begin": "(def)\\s+([a-zA-Z][a-zA-Z'0-9_]*)",
"begin": "(def)\\s+([a-zA-Z'0-9_]*)",
"end": "(?={)",
"beginCaptures": {
"1": { "name": "keyword.control.proverif" },
Expand All @@ -244,19 +244,19 @@
],
"repository": {
"type_ident": {
"match" : "([a-zA-Z][a-zA-Z'0-9_]*)",
"match" : "([a-zA-Z'0-9_]*)",
"captures": {
"1": { "name": "entity.name.type.proverif" }
}
},
"fun_ident": {
"match" : "([a-zA-Z][a-zA-Z'0-9_]*)",
"match" : "([a-zA-Z'0-9_]*)",
"captures": {
"1": { "name": "entity.name.function.proverif" }
}
},
"variable_ident": {
"match" : "([a-zA-Z][a-zA-Z'0-9_]*)",
"match" : "([a-zA-Z'0-9_]*)",
"captures": {
"1": { "name": "variable.other.proverif" }
}
Expand Down Expand Up @@ -300,7 +300,7 @@
"patterns": [
{ "include": "#comments"},
{
"match": "[a-zA-Z][a-zA-Z'0-9_]*",
"match": "[a-zA-Z'0-9_]*",
"name": "entity.name.tag.proverif"
}
]
Expand All @@ -311,7 +311,7 @@
"patterns": [
{ "include": "#comments"},
{
"match": "[a-zA-Z][a-zA-Z'0-9_]*",
"match": "[a-zA-Z'0-9_]*",
"name": "variable.other.proverif"
}
]
Expand Down Expand Up @@ -363,12 +363,12 @@
]
},
"nevartype": {
"match": "([a-zA-Z][\\s,a-zA-Z0-9'_]*)(:)\\s*([a-zA-Z][a-zA-Z0-9'_]*)",
"match": "([\\s,a-zA-Z0-9'_]*)(:)\\s*([a-zA-Z0-9'_]*)",
"captures":{
"1": {
"patterns": [
{
"match": "[a-zA-Z][a-zA-Z0-9'_]*",
"match": "[a-zA-Z0-9'_]*",
"name": "variable.other.proverif"
}
]
Expand All @@ -390,12 +390,12 @@
]
},
"nevartypeorfail": {
"match": "([a-zA-Z][\\s,a-zA-Z0-9'_]*)(:)\\s*([a-zA-Z][a-zA-Z0-9'_]*)(\\s+or\\s+fail)?",
"match": "([\\s,a-zA-Z0-9'_]*)(:)\\s*([a-zA-Z0-9'_]*)(\\s+or\\s+fail)?",
"captures":{
"1": {
"patterns": [
{
"match": "[a-zA-Z][a-zA-Z0-9'_]*",
"match": "[a-zA-Z0-9'_]*",
"name": "variable.other.proverif"
}
]
Expand All @@ -413,12 +413,12 @@
"patterns": [
{ "include": "#comments" },
{
"match": "([a-zA-Z][\\s,a-zA-Z0-9'_]*)(:)\\s*([a-zA-Z][a-zA-Z'0-9_]*)(\\s+(or)\\s+(fail))?",
"match": "([\\s,a-zA-Z0-9'_]*)(:)\\s*([a-zA-Z'0-9_]*)(\\s+(or)\\s+(fail))?",
"captures":{
"1": {
"patterns": [
{
"match": "[a-zA-Z][a-zA-Z'0-9_]*",
"match": "[a-zA-Z'0-9_]*",
"name": "variable.other.proverif"
}
]
Expand Down Expand Up @@ -492,7 +492,7 @@
]
},
"letinsimple": {
"begin": "(let)\\s+([a-zA-Z][a-zA-Z'0-9_]*)\\s+(=)",
"begin": "(let)\\s+([a-zA-Z'0-9_]*)\\s+(=)",
"end": "(\\s|^)(in)(\\s|\\n)",
"beginCaptures": {
"1": { "name": "keyword.control.proverif" },
Expand All @@ -511,7 +511,7 @@
]
},
"letinsimple_query": {
"begin": "(let)\\s+([a-zA-Z][a-zA-Z'0-9_]*)\\s+(=)",
"begin": "(let)\\s+([a-zA-Z'0-9_]*)\\s+(=)",
"end": "(\\s|^)(in)(\\s|\\n)",
"beginCaptures": {
"1": { "name": "keyword.control.proverif" },
Expand All @@ -528,7 +528,7 @@
]
},
"one_var_decl": {
"match": "([a-zA-Z_][a-zA-Z0-9'_]*)(:)\\s*([a-zA-Z][a-zA-Z0-9'_]*)",
"match": "([a-zA-Z_][a-zA-Z0-9'_]*)(:)\\s*([a-zA-Z0-9'_]*)",
"captures":{
"1": { "name": "variable.other.proverif" },
"2": { "name": "keyword.control.proverif" },
Expand Down

0 comments on commit 59e6d19

Please sign in to comment.