aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid B. Lamkins <dlamkins@galois.com>2015-08-06 09:36:05 -0700
committerDavid B. Lamkins <dlamkins@galois.com>2015-08-06 09:36:05 -0700
commitfd89e4dd1418d1474894d09c0ea8418f32dba490 (patch)
tree5da4da27fa280d3e281b896a5d0706dbd2876ede
parent73f33b7f6b57e3e6848f159b5f9a543326548116 (diff)
downloadvis-fd89e4dd1418d1474894d09c0ea8418f32dba490.tar.gz
vis-fd89e4dd1418d1474894d09c0ea8418f32dba490.tar.xz
Add APL syntax highlighting.
-rw-r--r--config.def.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index 5da2ec3..78b2ccb 100644
--- a/config.def.h
+++ b/config.def.h
@@ -1379,5 +1379,40 @@ static Syntax syntaxes[] = {{
&colors[COLOR_DATATYPE],
}}
},{
+ .name = "apl",
+ .file = "\\.apl$",
+ .settings = (const char*[]){
+ "set number",
+ NULL
+ },
+ .rules = {{
+ "(⍝|#).*$",
+ &colors[COLOR_COMMENT],
+ },{
+ "('([^']|'')*')|(\"([^\"]|\"\")*\")",
+ &colors[COLOR_STRING],
+ },{
+ "^ *(∇|⍫)",
+ &colors[COLOR_SYNTAX9],
+ },{
+ "(⎕[a-zA-Z]*)|[⍞χ⍺⍶⍵⍹]",
+ &colors[COLOR_KEYWORD],
+ },{
+ "[∆⍙_a-zA-Z][∆⍙_¯a-zA-Z0-9]* *:",
+ &colors[COLOR_SYNTAX2],
+ },{
+ "[∆⍙_a-zA-Z][∆⍙_¯a-zA-Z0-9]*",
+ &colors[COLOR_IDENTIFIER],
+ },{
+ "¯?(([0-9]+(\\.[0-9]+)?)|\\.[0-9]+)([eE]¯?[0-9]+)?([jJ]¯?(([0-9]+(\\.[0-9]+)?)|\\.[0-9]+)([eE]¯?[0-9]+)?)?",
+ &colors[COLOR_CONSTANT],
+ },{
+ "[][(){}]",
+ &colors[COLOR_BRACKETS],
+ },{
+ "[←→◊]",
+ &colors[COLOR_SYNTAX3],
+ }}
+},{
/* empty last element, array terminator */
}};