sequence"]),e.languages.factor=i}(Prism);
\ No newline at end of file
diff --git a/examples/prism-factor.html b/examples/prism-factor.html
new file mode 100644
index 0000000000..6bde0a221f
--- /dev/null
+++ b/examples/prism-factor.html
@@ -0,0 +1,128 @@
+Comments
+! FIXME: a comment
+
+USE: multiline
+
+![[ comment ]]
+/* comment */
+
+Strings
+"a string" "\"" "\x8" "%s"
+
+SBUF" asbdef"
+
+USE: multiline
+
+STRING: name
+content
+;
+
+HEREDOC: marker
+text
+marker
+
+[==[
+ str
+ ing
+]==]
+
+
+Numbers
+5 1/5 +9 -9 +1/5 -1/5 -1/5. 23+1/5 -23-1/5 23-1/5 ! NOTE: last one = word
+
++12.13 0.01 0e0 3E4 3e-4 3E-4 030 0xd 0o30 0b1100
+-12.13 -0 -0.01 -0e0 -3E4 -3E-4 -030 -0xd -0o30 -0b1100
+
+348756424956392657834385437598743583648756332457
+-348756424956392657834385437598743583648756332457
+
+NAN: a
+NAN: 80000deadbeef
+
+0b1.010p2 0x1.0p3 0x1.p1 0b1.111111p1111 ...
+
+Sequences
+{ 1 2 3 4 }
+{ a b c d e t f }
+{ "a" "b" "c" }
+
+{ { a b } { c d } }
+H{ { a b } { c d } }
+H{ { "a" "b" } { "c" "d" } }
+V{ 1 2 3 4 }
+V{ "1" "2" "3" "4" }
+BV{ 1 2 3 4 }
+
+Regular Expressions
+USE: regexp
+R/ abcde?.*+\?\.\*\+\/\\\/idmsr-idmsr/idmsr-idmsr
+
+
+Colon parsing words
+: a ( -- ) ;
+:: ; ! ; is not a word name
+:: ;a ! ;a is a word name
+USING: a b c ;
+USE: a
+IN: a.b
+CHAR: a
+GENERIC#: x 1 ( x: integer quot: ( x -- y ) -- )
+
+Special words (builtins, conventions)
+and not with map filter
+
+new last-index + - neg
+
+<array> <=> SYNTAX: x $[ xyz ]
+
+set-x change-x with-variable ?of if* (gensym) hex. $description reader>> >>setter writer<<
+
+string>number >hex base> mutater!
+
+
+Full example
+USING: accessors arrays assocs combinators
+combinators.short-circuit effects io kernel sequences
+sequences.deep splitting strings vocabs words ;
+IN: prism
+
+: make-prism-syntax ( syntax-vocab -- seq )
+ vocab-words [
+ dup name>> ">>" = [ drop t ] [
+ {
+ [ "delimiter" word-prop ]
+ [ name>> last { CHAR: : CHAR: { CHAR: [ CHAR: ( CHAR: ) CHAR: ? CHAR: " } member? ]
+ [ name>> { "t" "f" } member? ]
+ } 1|| not
+ ] if
+ ] filter ;
+
+: combinator? ( word -- ? )
+ [ "declared-effect" word-prop in>> flatten
+ [
+ [ effect? ] [ { "quots" "quot" } member? ] bi or
+ ] any?
+ ] [
+ "help" word-prop ?first flatten [ dup word? [ name>> ] when "quot" swap subseq? ] any?
+ ] bi or ;
+
+: classify ( vocab-spec -- seq )
+ vocab-words [
+ dup {
+ { [ dup combinator? ] [ drop "combinator" ] }
+ { [ dup "macro" word-prop ] [ drop "macro" ] }
+ [ drop "ordinary" ]
+ } cond 2array
+ ] map ;
+
+: print-strings ( strs -- )
+ [ name>> "'" dup surround ] map ", " join print ; recursive ! WARN: not recursive
+
+: combinators. ( vocab-spec -- )
+ classify [ nip "combinator" = ] assoc-filter keys print-strings ; flushable
+
+: ordinaries. ( vocab-spec -- )
+ classify [ nip "ordinary" = ] assoc-filter keys print-strings ; foldable
+
+: macros. ( vocab-spec -- )
+ classify [ nip "macro" = ] assoc-filter keys print-strings ; inline
diff --git a/tests/languages/factor/builtin_words_feature.test b/tests/languages/factor/builtin_words_feature.test
new file mode 100644
index 0000000000..4464d62210
--- /dev/null
+++ b/tests/languages/factor/builtin_words_feature.test
@@ -0,0 +1,15 @@
+and not with map filter
+
+----------------------------------------------------
+
+[
+ [ "kernel-builtin", "and" ],
+ [ "kernel-builtin", "not" ],
+ [ "combinators", "with" ],
+ [ "combinators", "map" ],
+ [ "combinators", "filter" ]
+]
+
+----------------------------------------------------
+
+some builtins
diff --git a/tests/languages/factor/colon_words_feature.test b/tests/languages/factor/colon_words_feature.test
new file mode 100644
index 0000000000..1a01652865
--- /dev/null
+++ b/tests/languages/factor/colon_words_feature.test
@@ -0,0 +1,47 @@
+: a ( -- ) ;
+:: ; ! ; is not a word name
+:: ;a ! ;a is a word name
+USING: a b c ;
+USE: a
+IN: a.b
+CHAR: a
+#: a
+GENERIC#: a
+
+----------------------------------------------------
+
+[
+ [ "colon-syntax", ": a" ],
+
+ [ "stack-effect-delimiter", "(" ],
+ [ "stack-effect-delimiter", "--" ],
+ [ "stack-effect-delimiter", ")" ],
+
+ [ "semicolon-or-setlocal", ";" ],
+
+ [ "normal-word", "::" ],
+ [ "semicolon-or-setlocal", ";" ],
+ [ "comment", [ "! ; is not a word name" ] ],
+
+ [ "colon-syntax", ":: ;a" ],
+ [ "comment", [ "! ;a is a word name" ] ],
+
+ [ "special-using",
+ [ "USING: ",
+ [ "string", "a" ],
+ [ "string", "b" ],
+ [ "string", "c" ]
+ ]
+ ],
+ [ "semicolon-or-setlocal", ";" ],
+ [ "colon-syntax", "USE: a" ],
+ [ "colon-syntax", "IN: a.b" ],
+ [ "colon-syntax", "CHAR: a" ],
+ [ "normal-word", "#:" ],
+ [ "normal-word", "a" ],
+ [ "colon-syntax", "GENERIC#: a" ]
+]
+
+----------------------------------------------------
+
+colon-ended parsing words
diff --git a/tests/languages/factor/comments_feature.test b/tests/languages/factor/comments_feature.test
new file mode 100644
index 0000000000..5dc45765ea
--- /dev/null
+++ b/tests/languages/factor/comments_feature.test
@@ -0,0 +1,74 @@
+a! ! word
+!a ! word
+! comment
+! bad
+! fine
+! "also a comment"
+! : ( -- ) ;
+! ! leading comment-like token
+ ! whitespace before
+words blah ! comment after code on a line
+
+![[ comment ]]
+"![[ string ]]"
+![[ "comment" ]]
+
+![[ comment]]
+![==[ comment ]==]
+![==[ comment]==]
+![=[word ]=]
+![=======[ words ]=======]
+
+/* com
+ment */
+/* com
+ment*/
+/*word */
+
+/* "comment" */
+"/* "strings" */"
+
+
+----------------------------------------------------
+
+[
+ [ "conventionally-named-word", "a!"],
+ [ "comment", [ "! word" ] ],
+ [ "normal-word", "!a"],
+ [ "comment", [ "! word" ] ],
+ [ "comment", [ "! comment" ] ],
+
+ [ "normal-word", "!" ], [ "normal-word", "bad" ],
+ [ "comment", [ "! \tfine" ] ],
+
+ [ "comment", [ "! \"also a comment\"" ] ],
+ [ "comment", [ "! : ( -- ) ;" ] ],
+ [ "comment", [ "! ! leading comment-like token" ] ],
+ [ "comment", [ "! whitespace before" ] ],
+ [ "normal-word", "words" ],
+ [ "normal-word", "blah" ],
+ [ "comment", [ "! comment after code on a line" ] ],
+
+ [ "comment", [ "![[ comment ]]" ] ],
+ [ "string", [ "\"![[ string ]]\"" ] ],
+ [ "comment", [ "![[ \"comment\" ]]" ] ],
+ [ "comment", [ "![[ comment]]" ] ],
+ [ "comment", [ "![==[ comment ]==]" ] ],
+ [ "comment", [ "![==[ comment]==]" ] ],
+
+ [ "normal-word", "![=[word" ],
+ [ "normal-word", "]=]" ],
+ [ "normal-word", "![=======[" ],
+ [ "normal-word", "words" ],
+ [ "normal-word", "]=======]" ],
+ [ "comment", [ "/* com\r\nment */" ] ],
+ [ "comment", [ "/* com\r\nment*/" ] ],
+ [ "normal-word", "/*word" ],
+ [ "normal-word", "*/" ],
+ [ "comment", ["/* \"comment\" */"] ],
+ [ "string", ["\"/* \""] ],
+ "strings",
+ [ "string", ["\" */\""] ]
+]
+
+----------------------------------------------------
diff --git a/tests/languages/factor/constructors_feature.test b/tests/languages/factor/constructors_feature.test
new file mode 100644
index 0000000000..375e870c8f
--- /dev/null
+++ b/tests/languages/factor/constructors_feature.test
@@ -0,0 +1,18 @@
+
+
+<=> <-->
+
+----------------------------------------------------
+
+[
+ [ "constructor-word", "" ],
+ [ "constructor-word", "" ],
+ [ "constructor-word", "" ],
+
+ [ "conventionally-named-word", "<=>" ],
+ [ "conventionally-named-word", "<-->" ]
+]
+
+----------------------------------------------------
+
+ctors
diff --git a/tests/languages/factor/normal_words_feature.test b/tests/languages/factor/normal_words_feature.test
new file mode 100644
index 0000000000..fc26561350
--- /dev/null
+++ b/tests/languages/factor/normal_words_feature.test
@@ -0,0 +1,56 @@
+commas, primes'
+set-x
+change-x
+with-x
+new-x
+>string
+base>
+string>number
++symbol+
+que?
+?of
+?of*
+reader>>
+>>setter
+writer<<
+(detail)
+mutater!
+variant*
+prettyprint.
+$help
+
+"no
+
+----------------------------------------------------
+
+[
+ [ "normal-word", "commas," ],
+ [ "normal-word", "primes'" ],
+ [ "conventionally-named-word", "set-x" ],
+ [ "conventionally-named-word", "change-x" ],
+ [ "conventionally-named-word", "with-x" ],
+ [ "conventionally-named-word", "new-x" ],
+ [ "conventionally-named-word", ">string" ],
+ [ "conventionally-named-word", "base>" ],
+ [ "conventionally-named-word", "string>number" ],
+ [ "conventionally-named-word", "+symbol+" ],
+ [ "conventionally-named-word", "que?" ],
+ [ "conventionally-named-word", "?of" ],
+ [ "conventionally-named-word", "?of*" ],
+ [ "conventionally-named-word", "reader>>" ],
+ [ "conventionally-named-word", ">>setter" ],
+ [ "conventionally-named-word", "writer<<" ],
+ [ "conventionally-named-word", "(detail)" ],
+ [ "conventionally-named-word", "mutater!" ],
+ [ "conventionally-named-word", "variant*" ],
+ [ "conventionally-named-word", "prettyprint." ],
+ [ "conventionally-named-word", "$help" ],
+ "\r\n\r\n\"no"
+]
+
+----------------------------------------------------
+
+"Normal" words are not builtin well-known ones like "not", "and", "<=>", though they may be in the standard library or user-defined.
+They may start with any character except `"` (double-quote), but may contain or end with double-quotes or any other non-whitespace character.
+
+Conventionally named words follow the conventions outlined in prism-factor.js.
diff --git a/tests/languages/factor/numbers_feature.test b/tests/languages/factor/numbers_feature.test
new file mode 100644
index 0000000000..3526183d87
--- /dev/null
+++ b/tests/languages/factor/numbers_feature.test
@@ -0,0 +1,49 @@
+5 1/5 +9 -9 +1/5 -1/5 23+1/5 -23-1/5 23-1/5 ! last one = word
+
+0.01 0e0 3E4 3e-4 3E-4 030 0xd 0o30 0b1100
+-0 -0.01 -0e0 -3E4 -3E-4 -030 -0xd -0o30 -0b1100
+
+348756424956392657834385437598743583648756332457
+-348756424956392657834385437598743583648756332457
+
+NAN: 80000deadbeef
+
+---------------------------------------------------
+
+[
+ [ "number", "5" ],
+ [ "number", "1/5" ],
+ [ "number", "+9" ],
+ [ "number", "-9" ],
+ [ "number", "+1/5" ],
+ [ "number", "-1/5" ],
+ [ "number", "23+1/5" ],
+ [ "number", "-23-1/5" ],
+ [ "normal-word", "23-1/5" ],
+ [ "comment", [ "! last one = word" ] ],
+ [ "number", "0.01" ],
+ [ "number", "0e0" ],
+ [ "number", "3E4" ],
+ [ "number", "3e-4" ],
+ [ "number", "3E-4" ],
+ [ "number", "030" ],
+ [ "number", "0xd" ],
+ [ "number", "0o30" ],
+ [ "number", "0b1100" ],
+ [ "number", "-0" ],
+ [ "number", "-0.01" ],
+ [ "number", "-0e0" ],
+ [ "number", "-3E4" ],
+ [ "number", "-3E-4" ],
+ [ "number", "-030" ],
+ [ "number", "-0xd" ],
+ [ "number", "-0o30" ],
+ [ "number", "-0b1100" ],
+ [ "number", "348756424956392657834385437598743583648756332457" ],
+ [ "number", "-348756424956392657834385437598743583648756332457" ],
+ [ "number", "NAN: 80000deadbeef" ]
+]
+
+---------------------------------------------------
+
+numbers
diff --git a/tests/languages/factor/other_builtin_parsing_words_feature.test b/tests/languages/factor/other_builtin_parsing_words_feature.test
new file mode 100644
index 0000000000..acaf41492d
--- /dev/null
+++ b/tests/languages/factor/other_builtin_parsing_words_feature.test
@@ -0,0 +1,29 @@
+
+PRIVATE>
+$[ some code ]
+<< some code >>
+\ M\
+
+--------------------------------------------------
+
+[
+ [ "other-builtin-syntax", "" ],
+ [ "other-builtin-syntax", "PRIVATE>" ],
+ [ "other-builtin-syntax", "$[" ],
+ [ "normal-word", "some" ],
+ [ "normal-word", "code" ],
+ [ "quotation-delimiter", "]" ],
+ [ "other-builtin-syntax", "<<" ],
+ [ "normal-word", "some" ],
+ [ "normal-word", "code" ],
+ [ "other-builtin-syntax", ">>" ],
+ [ "other-builtin-syntax", "\\" ],
+ [ "other-builtin-syntax", "M\\" ]
+]
+
+
+--------------------------------------------------
+
+various builtin parsing words from the syntax and kernel vocabs
diff --git a/tests/languages/factor/quotations_feature.test b/tests/languages/factor/quotations_feature.test
new file mode 100644
index 0000000000..dfaeedae6a
--- /dev/null
+++ b/tests/languages/factor/quotations_feature.test
@@ -0,0 +1,19 @@
+] [ x y z and ] [
+
+----------------------------------------------------
+
+[
+ ["normal-word", "]"],
+ ["quotation-delimiter", "["],
+ ["normal-word", "x" ],
+ ["normal-word", "y"],
+ ["normal-word", "z"],
+ ["kernel-builtin", "and"],
+ ["quotation-delimiter", "]"],
+ ["normal-word", "["]
+]
+
+----------------------------------------------------
+
+quotation syntax
+] at the beginning, and [ at the end of the file should not be highlighted as delimiters
diff --git a/tests/languages/factor/regexps_feature.test b/tests/languages/factor/regexps_feature.test
new file mode 100644
index 0000000000..2d79d09642
--- /dev/null
+++ b/tests/languages/factor/regexps_feature.test
@@ -0,0 +1,27 @@
+R/ abcde/i-r
+R/
+abcde?.+\?\*\+/
+R/ \\/
+R/ \//idmsr
+R/ \/idmsr/
+
+-----------------------------
+
+[
+ [ "regexp", [ "R/ abcde/", [ "operator", "i-r" ] ] ],
+ [ "regexp", [
+ "R/\r\nabcde",
+ [ "keyword", "?" ],
+ [ "keyword", "." ],
+ [ "keyword", "+" ],
+ [ "variable", "\\?" ],
+ [ "variable", "\\*" ],
+ [ "variable", "\\+" ],
+ "/"
+ ] ],
+ [ "regexp", [ "R/ ", [ "variable", "\\\\"], "/"] ],
+ [ "regexp", [ "R/ ", [ "variable", "\\/" ], "/", [ "operator", "idmsr" ] ] ],
+ [ "regexp", [ "R/ ", [ "variable", "\\/" ], "idmsr/" ] ]
+]
+
+-----------------------------
diff --git a/tests/languages/factor/sequences_feature.test b/tests/languages/factor/sequences_feature.test
new file mode 100644
index 0000000000..041dc78518
--- /dev/null
+++ b/tests/languages/factor/sequences_feature.test
@@ -0,0 +1,98 @@
+}
+{ 1 2 3 4 }
+{ a b c d e f }
+{ "a" "b" "c" }
+
+{ { a b } { c d } }
+H{ { a b } { c d } }
+H{ { "a" "b" } { "c" "d" } }
+V{ 1 2 3 4 }
+V{ "1" "2" "3" "4" }
+BV{ 1 2 3 4 }
+{
+
+----------------------------------------------------
+
+[
+ ["normal-word", "}"],
+ ["curly-brace-literal-delimiter", "{"],
+ ["number", "1"],
+ ["number", "2"],
+ ["number", "3"],
+ ["number", "4"],
+ ["curly-brace-literal-delimiter", "}"],
+
+ ["curly-brace-literal-delimiter", "{"],
+ ["normal-word", "a"],
+ ["normal-word", "b"],
+ ["normal-word", "c"],
+ ["normal-word", "d"],
+ ["normal-word", "e"],
+ ["boolean", "f"],
+ ["curly-brace-literal-delimiter", "}"],
+
+ ["curly-brace-literal-delimiter", "{"],
+ ["string", ["\"a\""] ],
+ ["string", ["\"b\""] ],
+ ["string", ["\"c\""] ],
+ ["curly-brace-literal-delimiter", "}"],
+
+ ["curly-brace-literal-delimiter", "{"],
+ ["curly-brace-literal-delimiter", "{"],
+ ["normal-word", "a"],
+ ["normal-word", "b"],
+ ["curly-brace-literal-delimiter", "}"],
+ ["curly-brace-literal-delimiter", "{"],
+ ["normal-word", "c"],
+ ["normal-word", "d"],
+ ["curly-brace-literal-delimiter", "}"],
+ ["curly-brace-literal-delimiter", "}"],
+
+ ["curly-brace-literal-delimiter", "H{"],
+ ["curly-brace-literal-delimiter", "{"],
+ ["normal-word", "a"],
+ ["normal-word", "b"],
+ ["curly-brace-literal-delimiter", "}"],
+ ["curly-brace-literal-delimiter", "{"],
+ ["normal-word", "c"],
+ ["normal-word", "d"],
+ ["curly-brace-literal-delimiter", "}"],
+ ["curly-brace-literal-delimiter", "}"],
+
+ ["curly-brace-literal-delimiter", "H{"],
+ ["curly-brace-literal-delimiter", "{"],
+ ["string", ["\"a\""]],
+ ["string", ["\"b\""]],
+ ["curly-brace-literal-delimiter", "}"],
+ ["curly-brace-literal-delimiter", "{"],
+ ["string", ["\"c\""]],
+ ["string", ["\"d\""]],
+ ["curly-brace-literal-delimiter", "}"],
+ ["curly-brace-literal-delimiter", "}"],
+
+ ["curly-brace-literal-delimiter", "V{"],
+ ["number", "1"],
+ ["number", "2"],
+ ["number", "3"],
+ ["number", "4"],
+ ["curly-brace-literal-delimiter", "}"],
+
+ ["curly-brace-literal-delimiter", "V{"],
+ ["string", ["\"1\""]],
+ ["string", ["\"2\""]],
+ ["string", ["\"3\""]],
+ ["string", ["\"4\""]],
+ ["curly-brace-literal-delimiter", "}"],
+
+ ["curly-brace-literal-delimiter", "BV{"],
+ ["number", "1"],
+ ["number", "2"],
+ ["number", "3"],
+ ["number", "4"],
+ ["curly-brace-literal-delimiter", "}"],
+ ["normal-word", "{"]
+]
+
+----------------------------------------------------
+
+} / { at the front / EOF are not delimiters
diff --git a/tests/languages/factor/stack_effects_feature.test b/tests/languages/factor/stack_effects_feature.test
new file mode 100644
index 0000000000..1513e2a5d2
--- /dev/null
+++ b/tests/languages/factor/stack_effects_feature.test
@@ -0,0 +1,74 @@
+( -- )
+( a b -- c )
+( a: integer b: string -- c: word )
+( x y quot: ( ..a -- ..a ) -- ..a )
+call( -- )
+call( x -- y )
+execute( x -- y )
+eval( x -- y )
+
+----------------------------------------------------
+
+[
+ [ "stack-effect-delimiter", "(" ],
+ [ "stack-effect-delimiter", "--" ],
+ [ "stack-effect-delimiter", ")" ],
+
+ [ "stack-effect-delimiter", "(" ],
+ [ "normal-word", "a" ],
+ [ "normal-word", "b" ],
+ [ "stack-effect-delimiter", "--" ],
+ [ "normal-word", "c" ],
+ [ "stack-effect-delimiter", ")" ],
+
+ [ "stack-effect-delimiter", "(" ],
+ [ "normal-word", "a:" ],
+ [ "math-builtin", "integer" ],
+ [ "normal-word", "b:" ],
+ [ "normal-word", "string" ],
+ [ "stack-effect-delimiter", "--" ],
+ [ "normal-word", "c:" ],
+ [ "normal-word", "word" ],
+ [ "stack-effect-delimiter", ")" ],
+
+ [ "stack-effect-delimiter", "(" ],
+ [ "normal-word", "x" ],
+ [ "normal-word", "y" ],
+ [ "normal-word", "quot:" ],
+
+ [ "stack-effect-delimiter", "(" ],
+ [ "normal-word", "..a" ],
+ [ "stack-effect-delimiter", "--" ],
+ [ "normal-word", "..a" ],
+ [ "stack-effect-delimiter", ")" ],
+
+ [ "stack-effect-delimiter", "--" ],
+ [ "normal-word", "..a" ],
+ [ "stack-effect-delimiter", ")" ],
+
+ [ "stack-effect-delimiter", "call(" ],
+ [ "stack-effect-delimiter", "--" ],
+ [ "stack-effect-delimiter", ")" ],
+
+ [ "stack-effect-delimiter", "call(" ],
+ [ "normal-word", "x" ],
+ [ "stack-effect-delimiter", "--" ],
+ [ "normal-word", "y" ],
+ [ "stack-effect-delimiter", ")" ],
+
+ [ "stack-effect-delimiter", "execute(" ],
+ [ "normal-word", "x" ],
+ [ "stack-effect-delimiter", "--" ],
+ [ "normal-word", "y" ],
+ [ "stack-effect-delimiter", ")" ],
+
+ [ "stack-effect-delimiter", "eval(" ],
+ [ "normal-word", "x" ],
+ [ "stack-effect-delimiter", "--" ],
+ [ "normal-word", "y" ],
+ [ "stack-effect-delimiter", ")" ]
+]
+
+----------------------------------------------------
+
+stack effect syntax
diff --git a/tests/languages/factor/strings_feature.test b/tests/languages/factor/strings_feature.test
new file mode 100644
index 0000000000..94e77b0c3f
--- /dev/null
+++ b/tests/languages/factor/strings_feature.test
@@ -0,0 +1,127 @@
+"s" word"word" ! word: word"word"
+"adjacent""strings"
+" ! str not comment" ! comment
+"!"
+" ! "
+"! "
+
+"\""
+"'"
+"\n"
+"\\"
+
+"str"5
+"str"[ ]
+"str"{ }
+{ "a"}
+"5"
+"1/5"
+"+5"
+"-5"
+
+HEREDOC: marker
+text \n
+marker
+
+STRING: name
+text \n
+;
+
+[[ string ]]
+[[ string]]
+[==[ string ]==]
+[==[ string]==]
+
+[[word ]]
+
+URL" " URL""
+SBUF" " SBUF""
+P" " P""
+
+P" as\\""
+
+----------------------------------------------------------
+
+[
+ [ "string", ["\"s\""] ],
+ [ "normal-word", "word\"word\"" ],
+ [ "comment", ["! word: word\"word\""] ],
+ [ "string", ["\"adjacent\""] ],
+ [ "string", ["\"strings\""] ],
+ [ "string", ["\" ! str not comment\""] ],
+ [ "comment", ["! comment"] ],
+
+ [ "string", ["\"!\""] ],
+ [ "string", ["\" ! \""] ],
+ [ "string", ["\"! \""] ],
+
+ [ "string", [
+ "\"",
+ [ "number", "\\\"" ],
+ "\""
+ ] ],
+ [ "string", ["\"'\""] ],
+ [ "string", [
+ "\"",
+ ["number", "\\n"],
+ "\""
+ ] ],
+ [ "string", ["\"", ["number", "\\\\"], "\""] ],
+
+ [ "string", ["\"str\""] ],
+ "5\r\n",
+
+ ["string", ["\"str\""] ],
+ "[ ",
+ [ "quotation-delimiter", "]" ],
+
+ [ "string", ["\"str\""] ],
+ "{ ",
+ [ "curly-brace-literal-delimiter", "}" ],
+
+ [ "curly-brace-literal-delimiter", "{" ],
+ [ "string", ["\"a\""] ],
+ "}\r\n",
+
+ [ "string", ["\"5\""] ],
+ [ "string", ["\"1/5\""] ],
+ [ "string", ["\"+5\""] ],
+ [ "string", ["\"-5\""] ],
+
+ [ "multiline-string", [
+ "HEREDOC: marker\r\ntext ",
+ [ "number", "\\n" ],
+ "\r\nmarker"
+ ] ],
+
+ [ "multiline-string", [
+ "STRING: name\r\ntext ",
+ [ "number", "\\n" ],
+ [ "semicolon-or-setlocal", ";" ]
+ ] ],
+
+ [ "multiline-string", [ "[[ string ]]" ] ],
+ [ "multiline-string", [ "[[ string]]" ] ],
+ [ "multiline-string", [ "[==[ string ]==]" ] ],
+ [ "multiline-string", [ "[==[ string]==]" ] ],
+ [ "normal-word", "[[word" ],
+ [ "normal-word", "]]" ],
+ [ "custom-string", ["URL\" \""] ],
+ [ "normal-word", "URL\"\"" ],
+
+ [ "custom-string", ["SBUF\" \""] ],
+ [ "normal-word", "SBUF\"\"" ],
+
+ [ "custom-string", ["P\" \""] ],
+ [ "normal-word", "P\"\"" ],
+ [ "custom-string", [
+ "P\" as",
+ [ "number", "\\\\" ],
+ "\""
+ ] ],
+ "\""
+]
+
+----------------------------------------------------------
+
+string kinds