vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit cb3d37a98ca093d7fb32361bbd1241d5bc35fb28 parent 369bda31c017319398d1799accbed9b415c93d1f Author: David B. Lamkins <dlamkins@galois.com> Date: Thu, 6 Aug 2015 09:36:05 -0700 Add APL syntax highlighting. Diffstat:
| M | config.def.h | | | 35 | +++++++++++++++++++++++++++++++++++ |
1 file changed, 35 insertions(+), 0 deletions(-)
diff --git 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 */ }};