Hash :
746a4b1a
Author :
Date :
2021-09-15T12:34:31
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
[* comment [* global *] DEFAULT_MT_MODE *]
notacomment
/* comment
global "a string"
DEFAULT_MT_MODE */
notacomment
# comment global DEFAULT_MT_MODE
notacomment
"a simple string"
"""a
complex
string"""
"DEFAULT_MT_MODE"
"SCRIPTDIR"
"MAINSCRIPTDIR"
"PROGRAMDIR"
"USER_PLUS_PLUGINS"
"MACHINE_PLUS_PLUGINS"
"USER_CLASSIC_PLUGINS"
"MACHINE_CLASSIC_PLUGINS"
"default_mt_mode"
"scriptdir"
"mainscriptdir"
"programdir"
"user_plus_plugins"
"machine_plus_plugins"
"user_classic_plugins"
"machine_classic_plugins"
DEFAULT_MT_MODE
# SCRIPTDIR is also an internal function
MAINSCRIPTDIR
PROGRAMDIR
USER_PLUS_PLUGINS
MACHINE_PLUS_PLUGINS
USER_CLASSIC_PLUGINS
MACHINE_CLASSIC_PLUGINS
----------------------------------------------------
[
["comment", "[* comment [* global *] DEFAULT_MT_MODE *]"],
"\r\n\r\nnotacomment\r\n\r\n",
["comment", "/* comment\r\nglobal \"a string\"\r\nDEFAULT_MT_MODE */"],
"\r\n\r\nnotacomment\r\n\r\n",
["comment", "# comment global DEFAULT_MT_MODE"],
"\r\n\r\nnotacomment\r\n\r\n",
["string", ["\"a simple string\""]],
["string", "\"\"\"a\r\ncomplex\r\nstring\"\"\""],
["string", [
"\"",
["constant", "DEFAULT_MT_MODE"],
"\""
]],
["string", [
"\"",
["constant", "SCRIPTDIR"],
"\""
]],
["string", [
"\"",
["constant", "MAINSCRIPTDIR"],
"\""
]],
["string", [
"\"",
["constant", "PROGRAMDIR"],
"\""
]],
["string", [
"\"",
["constant", "USER_PLUS_PLUGINS"],
"\""
]],
["string", [
"\"",
["constant", "MACHINE_PLUS_PLUGINS"],
"\""
]],
["string", [
"\"",
["constant", "USER_CLASSIC_PLUGINS"],
"\""
]],
["string", [
"\"",
["constant", "MACHINE_CLASSIC_PLUGINS"],
"\""
]],
["string", ["\"default_mt_mode\""]],
["string", ["\"scriptdir\""]],
["string", ["\"mainscriptdir\""]],
["string", ["\"programdir\""]],
["string", ["\"user_plus_plugins\""]],
["string", ["\"machine_plus_plugins\""]],
["string", ["\"user_classic_plugins\""]],
["string", ["\"machine_classic_plugins\""]],
"\r\n\r\nDEFAULT_MT_MODE\r\n",
["comment", "# SCRIPTDIR is also an internal function"],
"\r\nMAINSCRIPTDIR\r\nPROGRAMDIR\r\nUSER_PLUS_PLUGINS\r\nMACHINE_PLUS_PLUGINS\r\nUSER_CLASSIC_PLUGINS\r\nMACHINE_CLASSIC_PLUGINS"
]
----------------------------------------------------
Block comments should not allow any other tokens within them, and should work over multiple lines.
Single line comments are the same, but just one line.
Known issue: square bracket block comments can be nested, but regular languages can't do that.
Single line strings should be surrounded by double quotes, and allow no tokens within them except for predefined symbols.
Triple quote strings can span multiple lines and allow no tokens within them.
Predefined symbols must appear within single line strings. They are case sensitive.