Add files using upload-large-folder tool
Browse files- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/_postgres_builtins.py +739 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/_sql_builtins.py +106 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/archetype.py +315 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/css.py +632 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/fift.py +68 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/floscript.py +81 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/func.py +110 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/graphviz.py +58 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/html.py +670 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/inferno.py +95 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/macaulay2.py +1847 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/math.py +21 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/mime.py +210 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/ml.py +958 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/pddl.py +82 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/phix.py +363 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/rnc.py +66 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/sieve.py +78 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/smv.py +78 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/webidl.py +298 -0
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/_postgres_builtins.py
ADDED
|
@@ -0,0 +1,739 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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to update itself.
|
| 8 |
+
|
| 9 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 10 |
+
:license: BSD, see LICENSE for details.
|
| 11 |
+
"""
|
| 12 |
+
|
| 13 |
+
# Autogenerated: please edit them if you like wasting your time.
|
| 14 |
+
|
| 15 |
+
KEYWORDS = (
|
| 16 |
+
'ABORT',
|
| 17 |
+
'ABSOLUTE',
|
| 18 |
+
'ACCESS',
|
| 19 |
+
'ACTION',
|
| 20 |
+
'ADD',
|
| 21 |
+
'ADMIN',
|
| 22 |
+
'AFTER',
|
| 23 |
+
'AGGREGATE',
|
| 24 |
+
'ALL',
|
| 25 |
+
'ALSO',
|
| 26 |
+
'ALTER',
|
| 27 |
+
'ALWAYS',
|
| 28 |
+
'ANALYSE',
|
| 29 |
+
'ANALYZE',
|
| 30 |
+
'AND',
|
| 31 |
+
'ANY',
|
| 32 |
+
'ARRAY',
|
| 33 |
+
'AS',
|
| 34 |
+
'ASC',
|
| 35 |
+
'ASENSITIVE',
|
| 36 |
+
'ASSERTION',
|
| 37 |
+
'ASSIGNMENT',
|
| 38 |
+
'ASYMMETRIC',
|
| 39 |
+
'AT',
|
| 40 |
+
'ATOMIC',
|
| 41 |
+
'ATTACH',
|
| 42 |
+
'ATTRIBUTE',
|
| 43 |
+
'AUTHORIZATION',
|
| 44 |
+
'BACKWARD',
|
| 45 |
+
'BEFORE',
|
| 46 |
+
'BEGIN',
|
| 47 |
+
'BETWEEN',
|
| 48 |
+
'BIGINT',
|
| 49 |
+
'BINARY',
|
| 50 |
+
'BIT',
|
| 51 |
+
'BOOLEAN',
|
| 52 |
+
'BOTH',
|
| 53 |
+
'BREADTH',
|
| 54 |
+
'BY',
|
| 55 |
+
'CACHE',
|
| 56 |
+
'CALL',
|
| 57 |
+
'CALLED',
|
| 58 |
+
'CASCADE',
|
| 59 |
+
'CASCADED',
|
| 60 |
+
'CASE',
|
| 61 |
+
'CAST',
|
| 62 |
+
'CATALOG',
|
| 63 |
+
'CHAIN',
|
| 64 |
+
'CHAR',
|
| 65 |
+
'CHARACTER',
|
| 66 |
+
'CHARACTERISTICS',
|
| 67 |
+
'CHECK',
|
| 68 |
+
'CHECKPOINT',
|
| 69 |
+
'CLASS',
|
| 70 |
+
'CLOSE',
|
| 71 |
+
'CLUSTER',
|
| 72 |
+
'COALESCE',
|
| 73 |
+
'COLLATE',
|
| 74 |
+
'COLLATION',
|
| 75 |
+
'COLUMN',
|
| 76 |
+
'COLUMNS',
|
| 77 |
+
'COMMENT',
|
| 78 |
+
'COMMENTS',
|
| 79 |
+
'COMMIT',
|
| 80 |
+
'COMMITTED',
|
| 81 |
+
'COMPRESSION',
|
| 82 |
+
'CONCURRENTLY',
|
| 83 |
+
'CONFIGURATION',
|
| 84 |
+
'CONFLICT',
|
| 85 |
+
'CONNECTION',
|
| 86 |
+
'CONSTRAINT',
|
| 87 |
+
'CONSTRAINTS',
|
| 88 |
+
'CONTENT',
|
| 89 |
+
'CONTINUE',
|
| 90 |
+
'CONVERSION',
|
| 91 |
+
'COPY',
|
| 92 |
+
'COST',
|
| 93 |
+
'CREATE',
|
| 94 |
+
'CROSS',
|
| 95 |
+
'CSV',
|
| 96 |
+
'CUBE',
|
| 97 |
+
'CURRENT',
|
| 98 |
+
'CURRENT_CATALOG',
|
| 99 |
+
'CURRENT_DATE',
|
| 100 |
+
'CURRENT_ROLE',
|
| 101 |
+
'CURRENT_SCHEMA',
|
| 102 |
+
'CURRENT_TIME',
|
| 103 |
+
'CURRENT_TIMESTAMP',
|
| 104 |
+
'CURRENT_USER',
|
| 105 |
+
'CURSOR',
|
| 106 |
+
'CYCLE',
|
| 107 |
+
'DATA',
|
| 108 |
+
'DATABASE',
|
| 109 |
+
'DAY',
|
| 110 |
+
'DEALLOCATE',
|
| 111 |
+
'DEC',
|
| 112 |
+
'DECIMAL',
|
| 113 |
+
'DECLARE',
|
| 114 |
+
'DEFAULT',
|
| 115 |
+
'DEFAULTS',
|
| 116 |
+
'DEFERRABLE',
|
| 117 |
+
'DEFERRED',
|
| 118 |
+
'DEFINER',
|
| 119 |
+
'DELETE',
|
| 120 |
+
'DELIMITER',
|
| 121 |
+
'DELIMITERS',
|
| 122 |
+
'DEPENDS',
|
| 123 |
+
'DEPTH',
|
| 124 |
+
'DESC',
|
| 125 |
+
'DETACH',
|
| 126 |
+
'DICTIONARY',
|
| 127 |
+
'DISABLE',
|
| 128 |
+
'DISCARD',
|
| 129 |
+
'DISTINCT',
|
| 130 |
+
'DO',
|
| 131 |
+
'DOCUMENT',
|
| 132 |
+
'DOMAIN',
|
| 133 |
+
'DOUBLE',
|
| 134 |
+
'DROP',
|
| 135 |
+
'EACH',
|
| 136 |
+
'ELSE',
|
| 137 |
+
'ENABLE',
|
| 138 |
+
'ENCODING',
|
| 139 |
+
'ENCRYPTED',
|
| 140 |
+
'END',
|
| 141 |
+
'ENUM',
|
| 142 |
+
'ESCAPE',
|
| 143 |
+
'EVENT',
|
| 144 |
+
'EXCEPT',
|
| 145 |
+
'EXCLUDE',
|
| 146 |
+
'EXCLUDING',
|
| 147 |
+
'EXCLUSIVE',
|
| 148 |
+
'EXECUTE',
|
| 149 |
+
'EXISTS',
|
| 150 |
+
'EXPLAIN',
|
| 151 |
+
'EXPRESSION',
|
| 152 |
+
'EXTENSION',
|
| 153 |
+
'EXTERNAL',
|
| 154 |
+
'EXTRACT',
|
| 155 |
+
'FALSE',
|
| 156 |
+
'FAMILY',
|
| 157 |
+
'FETCH',
|
| 158 |
+
'FILTER',
|
| 159 |
+
'FINALIZE',
|
| 160 |
+
'FIRST',
|
| 161 |
+
'FLOAT',
|
| 162 |
+
'FOLLOWING',
|
| 163 |
+
'FOR',
|
| 164 |
+
'FORCE',
|
| 165 |
+
'FOREIGN',
|
| 166 |
+
'FORWARD',
|
| 167 |
+
'FREEZE',
|
| 168 |
+
'FROM',
|
| 169 |
+
'FULL',
|
| 170 |
+
'FUNCTION',
|
| 171 |
+
'FUNCTIONS',
|
| 172 |
+
'GENERATED',
|
| 173 |
+
'GLOBAL',
|
| 174 |
+
'GRANT',
|
| 175 |
+
'GRANTED',
|
| 176 |
+
'GREATEST',
|
| 177 |
+
'GROUP',
|
| 178 |
+
'GROUPING',
|
| 179 |
+
'GROUPS',
|
| 180 |
+
'HANDLER',
|
| 181 |
+
'HAVING',
|
| 182 |
+
'HEADER',
|
| 183 |
+
'HOLD',
|
| 184 |
+
'HOUR',
|
| 185 |
+
'IDENTITY',
|
| 186 |
+
'IF',
|
| 187 |
+
'ILIKE',
|
| 188 |
+
'IMMEDIATE',
|
| 189 |
+
'IMMUTABLE',
|
| 190 |
+
'IMPLICIT',
|
| 191 |
+
'IMPORT',
|
| 192 |
+
'IN',
|
| 193 |
+
'INCLUDE',
|
| 194 |
+
'INCLUDING',
|
| 195 |
+
'INCREMENT',
|
| 196 |
+
'INDEX',
|
| 197 |
+
'INDEXES',
|
| 198 |
+
'INHERIT',
|
| 199 |
+
'INHERITS',
|
| 200 |
+
'INITIALLY',
|
| 201 |
+
'INLINE',
|
| 202 |
+
'INNER',
|
| 203 |
+
'INOUT',
|
| 204 |
+
'INPUT',
|
| 205 |
+
'INSENSITIVE',
|
| 206 |
+
'INSERT',
|
| 207 |
+
'INSTEAD',
|
| 208 |
+
'INT',
|
| 209 |
+
'INTEGER',
|
| 210 |
+
'INTERSECT',
|
| 211 |
+
'INTERVAL',
|
| 212 |
+
'INTO',
|
| 213 |
+
'INVOKER',
|
| 214 |
+
'IS',
|
| 215 |
+
'ISNULL',
|
| 216 |
+
'ISOLATION',
|
| 217 |
+
'JOIN',
|
| 218 |
+
'KEY',
|
| 219 |
+
'LABEL',
|
| 220 |
+
'LANGUAGE',
|
| 221 |
+
'LARGE',
|
| 222 |
+
'LAST',
|
| 223 |
+
'LATERAL',
|
| 224 |
+
'LEADING',
|
| 225 |
+
'LEAKPROOF',
|
| 226 |
+
'LEAST',
|
| 227 |
+
'LEFT',
|
| 228 |
+
'LEVEL',
|
| 229 |
+
'LIKE',
|
| 230 |
+
'LIMIT',
|
| 231 |
+
'LISTEN',
|
| 232 |
+
'LOAD',
|
| 233 |
+
'LOCAL',
|
| 234 |
+
'LOCALTIME',
|
| 235 |
+
'LOCALTIMESTAMP',
|
| 236 |
+
'LOCATION',
|
| 237 |
+
'LOCK',
|
| 238 |
+
'LOCKED',
|
| 239 |
+
'LOGGED',
|
| 240 |
+
'MAPPING',
|
| 241 |
+
'MATCH',
|
| 242 |
+
'MATERIALIZED',
|
| 243 |
+
'MAXVALUE',
|
| 244 |
+
'METHOD',
|
| 245 |
+
'MINUTE',
|
| 246 |
+
'MINVALUE',
|
| 247 |
+
'MODE',
|
| 248 |
+
'MONTH',
|
| 249 |
+
'MOVE',
|
| 250 |
+
'NAME',
|
| 251 |
+
'NAMES',
|
| 252 |
+
'NATIONAL',
|
| 253 |
+
'NATURAL',
|
| 254 |
+
'NCHAR',
|
| 255 |
+
'NEW',
|
| 256 |
+
'NEXT',
|
| 257 |
+
'NFC',
|
| 258 |
+
'NFD',
|
| 259 |
+
'NFKC',
|
| 260 |
+
'NFKD',
|
| 261 |
+
'NO',
|
| 262 |
+
'NONE',
|
| 263 |
+
'NORMALIZE',
|
| 264 |
+
'NORMALIZED',
|
| 265 |
+
'NOT',
|
| 266 |
+
'NOTHING',
|
| 267 |
+
'NOTIFY',
|
| 268 |
+
'NOTNULL',
|
| 269 |
+
'NOWAIT',
|
| 270 |
+
'NULL',
|
| 271 |
+
'NULLIF',
|
| 272 |
+
'NULLS',
|
| 273 |
+
'NUMERIC',
|
| 274 |
+
'OBJECT',
|
| 275 |
+
'OF',
|
| 276 |
+
'OFF',
|
| 277 |
+
'OFFSET',
|
| 278 |
+
'OIDS',
|
| 279 |
+
'OLD',
|
| 280 |
+
'ON',
|
| 281 |
+
'ONLY',
|
| 282 |
+
'OPERATOR',
|
| 283 |
+
'OPTION',
|
| 284 |
+
'OPTIONS',
|
| 285 |
+
'OR',
|
| 286 |
+
'ORDER',
|
| 287 |
+
'ORDINALITY',
|
| 288 |
+
'OTHERS',
|
| 289 |
+
'OUT',
|
| 290 |
+
'OUTER',
|
| 291 |
+
'OVER',
|
| 292 |
+
'OVERLAPS',
|
| 293 |
+
'OVERLAY',
|
| 294 |
+
'OVERRIDING',
|
| 295 |
+
'OWNED',
|
| 296 |
+
'OWNER',
|
| 297 |
+
'PARALLEL',
|
| 298 |
+
'PARSER',
|
| 299 |
+
'PARTIAL',
|
| 300 |
+
'PARTITION',
|
| 301 |
+
'PASSING',
|
| 302 |
+
'PASSWORD',
|
| 303 |
+
'PLACING',
|
| 304 |
+
'PLANS',
|
| 305 |
+
'POLICY',
|
| 306 |
+
'POSITION',
|
| 307 |
+
'PRECEDING',
|
| 308 |
+
'PRECISION',
|
| 309 |
+
'PREPARE',
|
| 310 |
+
'PREPARED',
|
| 311 |
+
'PRESERVE',
|
| 312 |
+
'PRIMARY',
|
| 313 |
+
'PRIOR',
|
| 314 |
+
'PRIVILEGES',
|
| 315 |
+
'PROCEDURAL',
|
| 316 |
+
'PROCEDURE',
|
| 317 |
+
'PROCEDURES',
|
| 318 |
+
'PROGRAM',
|
| 319 |
+
'PUBLICATION',
|
| 320 |
+
'QUOTE',
|
| 321 |
+
'RANGE',
|
| 322 |
+
'READ',
|
| 323 |
+
'REAL',
|
| 324 |
+
'REASSIGN',
|
| 325 |
+
'RECHECK',
|
| 326 |
+
'RECURSIVE',
|
| 327 |
+
'REF',
|
| 328 |
+
'REFERENCES',
|
| 329 |
+
'REFERENCING',
|
| 330 |
+
'REFRESH',
|
| 331 |
+
'REINDEX',
|
| 332 |
+
'RELATIVE',
|
| 333 |
+
'RELEASE',
|
| 334 |
+
'RENAME',
|
| 335 |
+
'REPEATABLE',
|
| 336 |
+
'REPLACE',
|
| 337 |
+
'REPLICA',
|
| 338 |
+
'RESET',
|
| 339 |
+
'RESTART',
|
| 340 |
+
'RESTRICT',
|
| 341 |
+
'RETURN',
|
| 342 |
+
'RETURNING',
|
| 343 |
+
'RETURNS',
|
| 344 |
+
'REVOKE',
|
| 345 |
+
'RIGHT',
|
| 346 |
+
'ROLE',
|
| 347 |
+
'ROLLBACK',
|
| 348 |
+
'ROLLUP',
|
| 349 |
+
'ROUTINE',
|
| 350 |
+
'ROUTINES',
|
| 351 |
+
'ROW',
|
| 352 |
+
'ROWS',
|
| 353 |
+
'RULE',
|
| 354 |
+
'SAVEPOINT',
|
| 355 |
+
'SCHEMA',
|
| 356 |
+
'SCHEMAS',
|
| 357 |
+
'SCROLL',
|
| 358 |
+
'SEARCH',
|
| 359 |
+
'SECOND',
|
| 360 |
+
'SECURITY',
|
| 361 |
+
'SELECT',
|
| 362 |
+
'SEQUENCE',
|
| 363 |
+
'SEQUENCES',
|
| 364 |
+
'SERIALIZABLE',
|
| 365 |
+
'SERVER',
|
| 366 |
+
'SESSION',
|
| 367 |
+
'SESSION_USER',
|
| 368 |
+
'SET',
|
| 369 |
+
'SETOF',
|
| 370 |
+
'SETS',
|
| 371 |
+
'SHARE',
|
| 372 |
+
'SHOW',
|
| 373 |
+
'SIMILAR',
|
| 374 |
+
'SIMPLE',
|
| 375 |
+
'SKIP',
|
| 376 |
+
'SMALLINT',
|
| 377 |
+
'SNAPSHOT',
|
| 378 |
+
'SOME',
|
| 379 |
+
'SQL',
|
| 380 |
+
'STABLE',
|
| 381 |
+
'STANDALONE',
|
| 382 |
+
'START',
|
| 383 |
+
'STATEMENT',
|
| 384 |
+
'STATISTICS',
|
| 385 |
+
'STDIN',
|
| 386 |
+
'STDOUT',
|
| 387 |
+
'STORAGE',
|
| 388 |
+
'STORED',
|
| 389 |
+
'STRICT',
|
| 390 |
+
'STRIP',
|
| 391 |
+
'SUBSCRIPTION',
|
| 392 |
+
'SUBSTRING',
|
| 393 |
+
'SUPPORT',
|
| 394 |
+
'SYMMETRIC',
|
| 395 |
+
'SYSID',
|
| 396 |
+
'SYSTEM',
|
| 397 |
+
'TABLE',
|
| 398 |
+
'TABLES',
|
| 399 |
+
'TABLESAMPLE',
|
| 400 |
+
'TABLESPACE',
|
| 401 |
+
'TEMP',
|
| 402 |
+
'TEMPLATE',
|
| 403 |
+
'TEMPORARY',
|
| 404 |
+
'TEXT',
|
| 405 |
+
'THEN',
|
| 406 |
+
'TIES',
|
| 407 |
+
'TIME',
|
| 408 |
+
'TIMESTAMP',
|
| 409 |
+
'TO',
|
| 410 |
+
'TRAILING',
|
| 411 |
+
'TRANSACTION',
|
| 412 |
+
'TRANSFORM',
|
| 413 |
+
'TREAT',
|
| 414 |
+
'TRIGGER',
|
| 415 |
+
'TRIM',
|
| 416 |
+
'TRUE',
|
| 417 |
+
'TRUNCATE',
|
| 418 |
+
'TRUSTED',
|
| 419 |
+
'TYPE',
|
| 420 |
+
'TYPES',
|
| 421 |
+
'UESCAPE',
|
| 422 |
+
'UNBOUNDED',
|
| 423 |
+
'UNCOMMITTED',
|
| 424 |
+
'UNENCRYPTED',
|
| 425 |
+
'UNION',
|
| 426 |
+
'UNIQUE',
|
| 427 |
+
'UNKNOWN',
|
| 428 |
+
'UNLISTEN',
|
| 429 |
+
'UNLOGGED',
|
| 430 |
+
'UNTIL',
|
| 431 |
+
'UPDATE',
|
| 432 |
+
'USER',
|
| 433 |
+
'USING',
|
| 434 |
+
'VACUUM',
|
| 435 |
+
'VALID',
|
| 436 |
+
'VALIDATE',
|
| 437 |
+
'VALIDATOR',
|
| 438 |
+
'VALUE',
|
| 439 |
+
'VALUES',
|
| 440 |
+
'VARCHAR',
|
| 441 |
+
'VARIADIC',
|
| 442 |
+
'VARYING',
|
| 443 |
+
'VERBOSE',
|
| 444 |
+
'VERSION',
|
| 445 |
+
'VIEW',
|
| 446 |
+
'VIEWS',
|
| 447 |
+
'VOLATILE',
|
| 448 |
+
'WHEN',
|
| 449 |
+
'WHERE',
|
| 450 |
+
'WHITESPACE',
|
| 451 |
+
'WINDOW',
|
| 452 |
+
'WITH',
|
| 453 |
+
'WITHIN',
|
| 454 |
+
'WITHOUT',
|
| 455 |
+
'WORK',
|
| 456 |
+
'WRAPPER',
|
| 457 |
+
'WRITE',
|
| 458 |
+
'XML',
|
| 459 |
+
'XMLATTRIBUTES',
|
| 460 |
+
'XMLCONCAT',
|
| 461 |
+
'XMLELEMENT',
|
| 462 |
+
'XMLEXISTS',
|
| 463 |
+
'XMLFOREST',
|
| 464 |
+
'XMLNAMESPACES',
|
| 465 |
+
'XMLPARSE',
|
| 466 |
+
'XMLPI',
|
| 467 |
+
'XMLROOT',
|
| 468 |
+
'XMLSERIALIZE',
|
| 469 |
+
'XMLTABLE',
|
| 470 |
+
'YEAR',
|
| 471 |
+
'YES',
|
| 472 |
+
'ZONE',
|
| 473 |
+
)
|
| 474 |
+
|
| 475 |
+
DATATYPES = (
|
| 476 |
+
'bigint',
|
| 477 |
+
'bigserial',
|
| 478 |
+
'bit',
|
| 479 |
+
'bit varying',
|
| 480 |
+
'bool',
|
| 481 |
+
'boolean',
|
| 482 |
+
'box',
|
| 483 |
+
'bytea',
|
| 484 |
+
'char',
|
| 485 |
+
'character',
|
| 486 |
+
'character varying',
|
| 487 |
+
'cidr',
|
| 488 |
+
'circle',
|
| 489 |
+
'date',
|
| 490 |
+
'decimal',
|
| 491 |
+
'double precision',
|
| 492 |
+
'float4',
|
| 493 |
+
'float8',
|
| 494 |
+
'inet',
|
| 495 |
+
'int',
|
| 496 |
+
'int2',
|
| 497 |
+
'int4',
|
| 498 |
+
'int8',
|
| 499 |
+
'integer',
|
| 500 |
+
'interval',
|
| 501 |
+
'json',
|
| 502 |
+
'jsonb',
|
| 503 |
+
'line',
|
| 504 |
+
'lseg',
|
| 505 |
+
'macaddr',
|
| 506 |
+
'macaddr8',
|
| 507 |
+
'money',
|
| 508 |
+
'numeric',
|
| 509 |
+
'path',
|
| 510 |
+
'pg_lsn',
|
| 511 |
+
'pg_snapshot',
|
| 512 |
+
'point',
|
| 513 |
+
'polygon',
|
| 514 |
+
'real',
|
| 515 |
+
'serial',
|
| 516 |
+
'serial2',
|
| 517 |
+
'serial4',
|
| 518 |
+
'serial8',
|
| 519 |
+
'smallint',
|
| 520 |
+
'smallserial',
|
| 521 |
+
'text',
|
| 522 |
+
'time',
|
| 523 |
+
'timestamp',
|
| 524 |
+
'timestamptz',
|
| 525 |
+
'timetz',
|
| 526 |
+
'tsquery',
|
| 527 |
+
'tsvector',
|
| 528 |
+
'txid_snapshot',
|
| 529 |
+
'uuid',
|
| 530 |
+
'varbit',
|
| 531 |
+
'varchar',
|
| 532 |
+
'with time zone',
|
| 533 |
+
'without time zone',
|
| 534 |
+
'xml',
|
| 535 |
+
)
|
| 536 |
+
|
| 537 |
+
PSEUDO_TYPES = (
|
| 538 |
+
'any',
|
| 539 |
+
'anyarray',
|
| 540 |
+
'anycompatible',
|
| 541 |
+
'anycompatiblearray',
|
| 542 |
+
'anycompatiblemultirange',
|
| 543 |
+
'anycompatiblenonarray',
|
| 544 |
+
'anycompatiblerange',
|
| 545 |
+
'anyelement',
|
| 546 |
+
'anyenum',
|
| 547 |
+
'anymultirange',
|
| 548 |
+
'anynonarray',
|
| 549 |
+
'anyrange',
|
| 550 |
+
'cstring',
|
| 551 |
+
'event_trigger',
|
| 552 |
+
'fdw_handler',
|
| 553 |
+
'index_am_handler',
|
| 554 |
+
'internal',
|
| 555 |
+
'language_handler',
|
| 556 |
+
'pg_ddl_command',
|
| 557 |
+
'record',
|
| 558 |
+
'table_am_handler',
|
| 559 |
+
'trigger',
|
| 560 |
+
'tsm_handler',
|
| 561 |
+
'unknown',
|
| 562 |
+
'void',
|
| 563 |
+
)
|
| 564 |
+
|
| 565 |
+
# Remove 'trigger' from types
|
| 566 |
+
PSEUDO_TYPES = tuple(sorted(set(PSEUDO_TYPES) - set(map(str.lower, KEYWORDS))))
|
| 567 |
+
|
| 568 |
+
PLPGSQL_KEYWORDS = (
|
| 569 |
+
'ALIAS', 'CONSTANT', 'DIAGNOSTICS', 'ELSIF', 'EXCEPTION', 'EXIT',
|
| 570 |
+
'FOREACH', 'GET', 'LOOP', 'NOTICE', 'OPEN', 'PERFORM', 'QUERY', 'RAISE',
|
| 571 |
+
'RETURN', 'REVERSE', 'SQLSTATE', 'WHILE',
|
| 572 |
+
)
|
| 573 |
+
|
| 574 |
+
# Most of these keywords are from ExplainNode function
|
| 575 |
+
# in src/backend/commands/explain.c
|
| 576 |
+
|
| 577 |
+
EXPLAIN_KEYWORDS = (
|
| 578 |
+
'Aggregate',
|
| 579 |
+
'Append',
|
| 580 |
+
'Bitmap Heap Scan',
|
| 581 |
+
'Bitmap Index Scan',
|
| 582 |
+
'BitmapAnd',
|
| 583 |
+
'BitmapOr',
|
| 584 |
+
'CTE Scan',
|
| 585 |
+
'Custom Scan',
|
| 586 |
+
'Delete',
|
| 587 |
+
'Foreign Scan',
|
| 588 |
+
'Function Scan',
|
| 589 |
+
'Gather Merge',
|
| 590 |
+
'Gather',
|
| 591 |
+
'Group',
|
| 592 |
+
'GroupAggregate',
|
| 593 |
+
'Hash Join',
|
| 594 |
+
'Hash',
|
| 595 |
+
'HashAggregate',
|
| 596 |
+
'Incremental Sort',
|
| 597 |
+
'Index Only Scan',
|
| 598 |
+
'Index Scan',
|
| 599 |
+
'Insert',
|
| 600 |
+
'Limit',
|
| 601 |
+
'LockRows',
|
| 602 |
+
'Materialize',
|
| 603 |
+
'Memoize',
|
| 604 |
+
'Merge Append',
|
| 605 |
+
'Merge Join',
|
| 606 |
+
'Merge',
|
| 607 |
+
'MixedAggregate',
|
| 608 |
+
'Named Tuplestore Scan',
|
| 609 |
+
'Nested Loop',
|
| 610 |
+
'ProjectSet',
|
| 611 |
+
'Recursive Union',
|
| 612 |
+
'Result',
|
| 613 |
+
'Sample Scan',
|
| 614 |
+
'Seq Scan',
|
| 615 |
+
'SetOp',
|
| 616 |
+
'Sort',
|
| 617 |
+
'SubPlan',
|
| 618 |
+
'Subquery Scan',
|
| 619 |
+
'Table Function Scan',
|
| 620 |
+
'Tid Range Scan',
|
| 621 |
+
'Tid Scan',
|
| 622 |
+
'Unique',
|
| 623 |
+
'Update',
|
| 624 |
+
'Values Scan',
|
| 625 |
+
'WindowAgg',
|
| 626 |
+
'WorkTable Scan',
|
| 627 |
+
)
|
| 628 |
+
|
| 629 |
+
|
| 630 |
+
if __name__ == '__main__': # pragma: no cover
|
| 631 |
+
import re
|
| 632 |
+
from urllib.request import urlopen
|
| 633 |
+
|
| 634 |
+
from pygments.util import format_lines
|
| 635 |
+
|
| 636 |
+
# One man's constant is another man's variable.
|
| 637 |
+
SOURCE_URL = 'https://github.com/postgres/postgres/raw/master'
|
| 638 |
+
KEYWORDS_URL = SOURCE_URL + '/src/include/parser/kwlist.h'
|
| 639 |
+
DATATYPES_URL = SOURCE_URL + '/doc/src/sgml/datatype.sgml'
|
| 640 |
+
|
| 641 |
+
def update_myself():
|
| 642 |
+
content = urlopen(DATATYPES_URL).read().decode('utf-8', errors='ignore')
|
| 643 |
+
data_file = list(content.splitlines())
|
| 644 |
+
datatypes = parse_datatypes(data_file)
|
| 645 |
+
pseudos = parse_pseudos(data_file)
|
| 646 |
+
|
| 647 |
+
content = urlopen(KEYWORDS_URL).read().decode('utf-8', errors='ignore')
|
| 648 |
+
keywords = parse_keywords(content)
|
| 649 |
+
|
| 650 |
+
update_consts(__file__, 'DATATYPES', datatypes)
|
| 651 |
+
update_consts(__file__, 'PSEUDO_TYPES', pseudos)
|
| 652 |
+
update_consts(__file__, 'KEYWORDS', keywords)
|
| 653 |
+
|
| 654 |
+
def parse_keywords(f):
|
| 655 |
+
kw = []
|
| 656 |
+
for m in re.finditer(r'PG_KEYWORD\("(.+?)"', f):
|
| 657 |
+
kw.append(m.group(1).upper())
|
| 658 |
+
|
| 659 |
+
if not kw:
|
| 660 |
+
raise ValueError('no keyword found')
|
| 661 |
+
|
| 662 |
+
kw.sort()
|
| 663 |
+
return kw
|
| 664 |
+
|
| 665 |
+
def parse_datatypes(f):
|
| 666 |
+
dt = set()
|
| 667 |
+
for line in f:
|
| 668 |
+
if '<sect1' in line:
|
| 669 |
+
break
|
| 670 |
+
if '<entry><type>' not in line:
|
| 671 |
+
continue
|
| 672 |
+
|
| 673 |
+
# Parse a string such as
|
| 674 |
+
# time [ (<replaceable>p</replaceable>) ] [ without time zone ]
|
| 675 |
+
# into types "time" and "without time zone"
|
| 676 |
+
|
| 677 |
+
# remove all the tags
|
| 678 |
+
line = re.sub("<replaceable>[^<]+</replaceable>", "", line)
|
| 679 |
+
line = re.sub("<[^>]+>", "", line)
|
| 680 |
+
|
| 681 |
+
# Drop the parts containing braces
|
| 682 |
+
for tmp in [t for tmp in line.split('[')
|
| 683 |
+
for t in tmp.split(']') if "(" not in t]:
|
| 684 |
+
for t in tmp.split(','):
|
| 685 |
+
t = t.strip()
|
| 686 |
+
if not t:
|
| 687 |
+
continue
|
| 688 |
+
dt.add(" ".join(t.split()))
|
| 689 |
+
|
| 690 |
+
dt = list(dt)
|
| 691 |
+
dt.sort()
|
| 692 |
+
return dt
|
| 693 |
+
|
| 694 |
+
def parse_pseudos(f):
|
| 695 |
+
dt = []
|
| 696 |
+
re_start = re.compile(r'\s*<table id="datatype-pseudotypes-table">')
|
| 697 |
+
re_entry = re.compile(r'\s*<entry><type>(.+?)</type></entry>')
|
| 698 |
+
re_end = re.compile(r'\s*</table>')
|
| 699 |
+
|
| 700 |
+
f = iter(f)
|
| 701 |
+
for line in f:
|
| 702 |
+
if re_start.match(line) is not None:
|
| 703 |
+
break
|
| 704 |
+
else:
|
| 705 |
+
raise ValueError('pseudo datatypes table not found')
|
| 706 |
+
|
| 707 |
+
for line in f:
|
| 708 |
+
m = re_entry.match(line)
|
| 709 |
+
if m is not None:
|
| 710 |
+
dt.append(m.group(1))
|
| 711 |
+
|
| 712 |
+
if re_end.match(line) is not None:
|
| 713 |
+
break
|
| 714 |
+
else:
|
| 715 |
+
raise ValueError('end of pseudo datatypes table not found')
|
| 716 |
+
|
| 717 |
+
if not dt:
|
| 718 |
+
raise ValueError('pseudo datatypes not found')
|
| 719 |
+
|
| 720 |
+
dt.sort()
|
| 721 |
+
return dt
|
| 722 |
+
|
| 723 |
+
def update_consts(filename, constname, content):
|
| 724 |
+
with open(filename, encoding='utf-8') as f:
|
| 725 |
+
data = f.read()
|
| 726 |
+
|
| 727 |
+
# Line to start/end inserting
|
| 728 |
+
re_match = re.compile(rf'^{constname}\s*=\s*\($.*?^\s*\)$', re.M | re.S)
|
| 729 |
+
m = re_match.search(data)
|
| 730 |
+
if not m:
|
| 731 |
+
raise ValueError(f'Could not find existing definition for {constname}')
|
| 732 |
+
|
| 733 |
+
new_block = format_lines(constname, content)
|
| 734 |
+
data = data[:m.start()] + new_block + data[m.end():]
|
| 735 |
+
|
| 736 |
+
with open(filename, 'w', encoding='utf-8', newline='\n') as f:
|
| 737 |
+
f.write(data)
|
| 738 |
+
|
| 739 |
+
update_myself()
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/_sql_builtins.py
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers._sql_builtins
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Data files for the SQL lexer.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
KEYWORDS = (
|
| 12 |
+
'ABORT', 'ABS', 'ABSOLUTE', 'ACCESS', 'ADA', 'ADD', 'ADMIN', 'AFTER',
|
| 13 |
+
'AGGREGATE', 'ALIAS', 'ALL', 'ALLOCATE', 'ALTER', 'ANALYSE', 'ANALYZE',
|
| 14 |
+
'AND', 'ANY', 'ARE', 'AS', 'ASC', 'ASENSITIVE', 'ASSERTION', 'ASSIGNMENT',
|
| 15 |
+
'ASYMMETRIC', 'AT', 'ATOMIC', 'AUTHORIZATION', 'AVG', 'BACKWARD',
|
| 16 |
+
'BEFORE', 'BEGIN', 'BETWEEN', 'BITVAR', 'BIT_LENGTH', 'BOTH', 'BREADTH',
|
| 17 |
+
'BY', 'C', 'CACHE', 'CALL', 'CALLED', 'CARDINALITY', 'CASCADE',
|
| 18 |
+
'CASCADED', 'CASE', 'CAST', 'CATALOG', 'CATALOG_NAME', 'CHAIN',
|
| 19 |
+
'CHARACTERISTICS', 'CHARACTER_LENGTH', 'CHARACTER_SET_CATALOG',
|
| 20 |
+
'CHARACTER_SET_NAME', 'CHARACTER_SET_SCHEMA', 'CHAR_LENGTH', 'CHECK',
|
| 21 |
+
'CHECKED', 'CHECKPOINT', 'CLASS', 'CLASS_ORIGIN', 'CLOB', 'CLOSE',
|
| 22 |
+
'CLUSTER', 'COALESCE', 'COBOL', 'COLLATE', 'COLLATION',
|
| 23 |
+
'COLLATION_CATALOG', 'COLLATION_NAME', 'COLLATION_SCHEMA', 'COLUMN',
|
| 24 |
+
'COLUMN_NAME', 'COMMAND_FUNCTION', 'COMMAND_FUNCTION_CODE', 'COMMENT',
|
| 25 |
+
'COMMIT', 'COMMITTED', 'COMPLETION', 'CONDITION_NUMBER', 'CONNECT',
|
| 26 |
+
'CONNECTION', 'CONNECTION_NAME', 'CONSTRAINT', 'CONSTRAINTS',
|
| 27 |
+
'CONSTRAINT_CATALOG', 'CONSTRAINT_NAME', 'CONSTRAINT_SCHEMA',
|
| 28 |
+
'CONSTRUCTOR', 'CONTAINS', 'CONTINUE', 'CONVERSION', 'CONVERT',
|
| 29 |
+
'COPY', 'CORRESPONDING', 'COUNT', 'CREATE', 'CREATEDB', 'CREATEUSER',
|
| 30 |
+
'CROSS', 'CUBE', 'CURRENT', 'CURRENT_DATE', 'CURRENT_PATH',
|
| 31 |
+
'CURRENT_ROLE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER',
|
| 32 |
+
'CURSOR', 'CURSOR_NAME', 'CYCLE', 'DATA', 'DATABASE',
|
| 33 |
+
'DATETIME_INTERVAL_CODE', 'DATETIME_INTERVAL_PRECISION', 'DAY',
|
| 34 |
+
'DEALLOCATE', 'DECLARE', 'DEFAULT', 'DEFAULTS', 'DEFERRABLE',
|
| 35 |
+
'DEFERRED', 'DEFINED', 'DEFINER', 'DELETE', 'DELIMITER', 'DELIMITERS',
|
| 36 |
+
'DEREF', 'DESC', 'DESCRIBE', 'DESCRIPTOR', 'DESTROY', 'DESTRUCTOR',
|
| 37 |
+
'DETERMINISTIC', 'DIAGNOSTICS', 'DICTIONARY', 'DISCONNECT', 'DISPATCH',
|
| 38 |
+
'DISTINCT', 'DO', 'DOMAIN', 'DROP', 'DYNAMIC', 'DYNAMIC_FUNCTION',
|
| 39 |
+
'DYNAMIC_FUNCTION_CODE', 'EACH', 'ELSE', 'ELSIF', 'ENCODING',
|
| 40 |
+
'ENCRYPTED', 'END', 'END-EXEC', 'EQUALS', 'ESCAPE', 'EVERY', 'EXCEPTION',
|
| 41 |
+
'EXCEPT', 'EXCLUDING', 'EXCLUSIVE', 'EXEC', 'EXECUTE', 'EXISTING',
|
| 42 |
+
'EXISTS', 'EXPLAIN', 'EXTERNAL', 'EXTRACT', 'FALSE', 'FETCH', 'FINAL',
|
| 43 |
+
'FIRST', 'FOR', 'FORCE', 'FOREIGN', 'FORTRAN', 'FORWARD', 'FOUND', 'FREE',
|
| 44 |
+
'FREEZE', 'FROM', 'FULL', 'FUNCTION', 'G', 'GENERAL', 'GENERATED', 'GET',
|
| 45 |
+
'GLOBAL', 'GO', 'GOTO', 'GRANT', 'GRANTED', 'GROUP', 'GROUPING',
|
| 46 |
+
'HANDLER', 'HAVING', 'HIERARCHY', 'HOLD', 'HOST', 'IDENTITY', 'IF',
|
| 47 |
+
'IGNORE', 'ILIKE', 'IMMEDIATE', 'IMMEDIATELY', 'IMMUTABLE', 'IMPLEMENTATION', 'IMPLICIT',
|
| 48 |
+
'IN', 'INCLUDING', 'INCREMENT', 'INDEX', 'INDITCATOR', 'INFIX',
|
| 49 |
+
'INHERITS', 'INITIALIZE', 'INITIALLY', 'INNER', 'INOUT', 'INPUT',
|
| 50 |
+
'INSENSITIVE', 'INSERT', 'INSTANTIABLE', 'INSTEAD', 'INTERSECT', 'INTO',
|
| 51 |
+
'INVOKER', 'IS', 'ISNULL', 'ISOLATION', 'ITERATE', 'JOIN', 'KEY',
|
| 52 |
+
'KEY_MEMBER', 'KEY_TYPE', 'LANCOMPILER', 'LANGUAGE', 'LARGE', 'LAST',
|
| 53 |
+
'LATERAL', 'LEADING', 'LEFT', 'LENGTH', 'LESS', 'LEVEL', 'LIKE', 'LIMIT',
|
| 54 |
+
'LISTEN', 'LOAD', 'LOCAL', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATION',
|
| 55 |
+
'LOCATOR', 'LOCK', 'LOWER', 'MAP', 'MATCH', 'MAX', 'MAXVALUE',
|
| 56 |
+
'MESSAGE_LENGTH', 'MESSAGE_OCTET_LENGTH', 'MESSAGE_TEXT', 'METHOD', 'MIN',
|
| 57 |
+
'MINUTE', 'MINVALUE', 'MOD', 'MODE', 'MODIFIES', 'MODIFY', 'MONTH',
|
| 58 |
+
'MORE', 'MOVE', 'MUMPS', 'NAMES', 'NATIONAL', 'NATURAL', 'NCHAR', 'NCLOB',
|
| 59 |
+
'NEW', 'NEXT', 'NO', 'NOCREATEDB', 'NOCREATEUSER', 'NONE', 'NOT',
|
| 60 |
+
'NOTHING', 'NOTIFY', 'NOTNULL', 'NULL', 'NULLABLE', 'NULLIF', 'OBJECT',
|
| 61 |
+
'OCTET_LENGTH', 'OF', 'OFF', 'OFFSET', 'OIDS', 'OLD', 'ON', 'ONLY',
|
| 62 |
+
'OPEN', 'OPERATION', 'OPERATOR', 'OPTION', 'OPTIONS', 'OR', 'ORDER',
|
| 63 |
+
'ORDINALITY', 'OUT', 'OUTER', 'OUTPUT', 'OVERLAPS', 'OVERLAY',
|
| 64 |
+
'OVERRIDING', 'OWNER', 'PAD', 'PARAMETER', 'PARAMETERS', 'PARAMETER_MODE',
|
| 65 |
+
'PARAMETER_NAME', 'PARAMETER_ORDINAL_POSITION',
|
| 66 |
+
'PARAMETER_SPECIFIC_CATALOG', 'PARAMETER_SPECIFIC_NAME',
|
| 67 |
+
'PARAMETER_SPECIFIC_SCHEMA', 'PARTIAL', 'PASCAL', 'PENDANT', 'PERIOD', 'PLACING',
|
| 68 |
+
'PLI', 'POSITION', 'POSTFIX', 'PRECEEDS', 'PRECISION', 'PREFIX', 'PREORDER',
|
| 69 |
+
'PREPARE', 'PRESERVE', 'PRIMARY', 'PRIOR', 'PRIVILEGES', 'PROCEDURAL',
|
| 70 |
+
'PROCEDURE', 'PUBLIC', 'READ', 'READS', 'RECHECK', 'RECURSIVE', 'REF',
|
| 71 |
+
'REFERENCES', 'REFERENCING', 'REINDEX', 'RELATIVE', 'RENAME',
|
| 72 |
+
'REPEATABLE', 'REPLACE', 'RESET', 'RESTART', 'RESTRICT', 'RESULT',
|
| 73 |
+
'RETURN', 'RETURNED_LENGTH', 'RETURNED_OCTET_LENGTH', 'RETURNED_SQLSTATE',
|
| 74 |
+
'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUTINE',
|
| 75 |
+
'ROUTINE_CATALOG', 'ROUTINE_NAME', 'ROUTINE_SCHEMA', 'ROW', 'ROWS',
|
| 76 |
+
'ROW_COUNT', 'RULE', 'SAVE_POINT', 'SCALE', 'SCHEMA', 'SCHEMA_NAME',
|
| 77 |
+
'SCOPE', 'SCROLL', 'SEARCH', 'SECOND', 'SECURITY', 'SELECT', 'SELF',
|
| 78 |
+
'SENSITIVE', 'SERIALIZABLE', 'SERVER_NAME', 'SESSION', 'SESSION_USER',
|
| 79 |
+
'SET', 'SETOF', 'SETS', 'SHARE', 'SHOW', 'SIMILAR', 'SIMPLE', 'SIZE',
|
| 80 |
+
'SOME', 'SOURCE', 'SPACE', 'SPECIFIC', 'SPECIFICTYPE', 'SPECIFIC_NAME',
|
| 81 |
+
'SQL', 'SQLCODE', 'SQLERROR', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNINIG',
|
| 82 |
+
'STABLE', 'START', 'STATE', 'STATEMENT', 'STATIC', 'STATISTICS', 'STDIN',
|
| 83 |
+
'STDOUT', 'STORAGE', 'STRICT', 'STRUCTURE', 'STYPE', 'SUBCLASS_ORIGIN',
|
| 84 |
+
'SUBLIST', 'SUBSTRING', 'SUCCEEDS', 'SUM', 'SYMMETRIC', 'SYSID', 'SYSTEM',
|
| 85 |
+
'SYSTEM_USER', 'TABLE', 'TABLE_NAME', ' TEMP', 'TEMPLATE', 'TEMPORARY',
|
| 86 |
+
'TERMINATE', 'THAN', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_HOUR',
|
| 87 |
+
'TIMEZONE_MINUTE', 'TO', 'TOAST', 'TRAILING', 'TRANSACTION',
|
| 88 |
+
'TRANSACTIONS_COMMITTED', 'TRANSACTIONS_ROLLED_BACK', 'TRANSACTION_ACTIVE',
|
| 89 |
+
'TRANSFORM', 'TRANSFORMS', 'TRANSLATE', 'TRANSLATION', 'TREAT', 'TRIGGER',
|
| 90 |
+
'TRIGGER_CATALOG', 'TRIGGER_NAME', 'TRIGGER_SCHEMA', 'TRIM', 'TRUE',
|
| 91 |
+
'TRUNCATE', 'TRUSTED', 'TYPE', 'UNCOMMITTED', 'UNDER', 'UNENCRYPTED',
|
| 92 |
+
'UNION', 'UNIQUE', 'UNKNOWN', 'UNLISTEN', 'UNNAMED', 'UNNEST', 'UNTIL',
|
| 93 |
+
'UPDATE', 'UPPER', 'USAGE', 'USER', 'USER_DEFINED_TYPE_CATALOG',
|
| 94 |
+
'USER_DEFINED_TYPE_NAME', 'USER_DEFINED_TYPE_SCHEMA', 'USING', 'VACUUM',
|
| 95 |
+
'VALID', 'VALIDATOR', 'VALUES', 'VARIABLE', 'VERBOSE',
|
| 96 |
+
'VERSION', 'VERSIONS', 'VERSIONING', 'VIEW',
|
| 97 |
+
'VOLATILE', 'WHEN', 'WHENEVER', 'WHERE', 'WITH', 'WITHOUT', 'WORK',
|
| 98 |
+
'WRITE', 'YEAR', 'ZONE'
|
| 99 |
+
)
|
| 100 |
+
|
| 101 |
+
DATATYPES = (
|
| 102 |
+
'ARRAY', 'BIGINT', 'BINARY', 'BIT', 'BLOB', 'BOOLEAN', 'CHAR',
|
| 103 |
+
'CHARACTER', 'DATE', 'DEC', 'DECIMAL', 'FLOAT', 'INT', 'INTEGER',
|
| 104 |
+
'INTERVAL', 'NUMBER', 'NUMERIC', 'REAL', 'SERIAL', 'SMALLINT',
|
| 105 |
+
'VARCHAR', 'VARYING', 'INT8', 'SERIAL8', 'TEXT'
|
| 106 |
+
)
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/archetype.py
ADDED
|
@@ -0,0 +1,315 @@
|
|
|
|
|
|
|
|
|
|
|
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ckm>
|
| 8 |
+
|
| 9 |
+
Contributed by Thomas Beale <https://github.com/wolandscat>,
|
| 10 |
+
<https://bitbucket.org/thomas_beale>.
|
| 11 |
+
|
| 12 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 13 |
+
:license: BSD, see LICENSE for details.
|
| 14 |
+
"""
|
| 15 |
+
|
| 16 |
+
from pygments.lexer import RegexLexer, include, bygroups, using, default
|
| 17 |
+
from pygments.token import Text, Comment, Name, Literal, Number, String, \
|
| 18 |
+
Punctuation, Keyword, Operator, Generic, Whitespace
|
| 19 |
+
|
| 20 |
+
__all__ = ['OdinLexer', 'CadlLexer', 'AdlLexer']
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
class AtomsLexer(RegexLexer):
|
| 24 |
+
"""
|
| 25 |
+
Lexer for Values used in ADL and ODIN.
|
| 26 |
+
|
| 27 |
+
.. versionadded:: 2.1
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
tokens = {
|
| 31 |
+
# ----- pseudo-states for inclusion -----
|
| 32 |
+
'whitespace': [
|
| 33 |
+
(r'\n', Whitespace),
|
| 34 |
+
(r'\s+', Whitespace),
|
| 35 |
+
(r'([ \t]*)(--.*)$', bygroups(Whitespace, Comment)),
|
| 36 |
+
],
|
| 37 |
+
'archetype_id': [
|
| 38 |
+
(r'([ \t]*)(([a-zA-Z]\w{1,100}(\.[a-zA-Z]\w{1,100})*::)?[a-zA-Z]\w{1,100}(-[a-zA-Z]\w{1,100}){2}'
|
| 39 |
+
r'\.\w{1,100}[\w-]*\.v\d+(\.\d+){,2}((-[a-z]+)(\.\d+)?)?)',
|
| 40 |
+
bygroups(Whitespace, Name.Decorator)),
|
| 41 |
+
],
|
| 42 |
+
'date_constraints': [
|
| 43 |
+
# ISO 8601-based date/time constraints
|
| 44 |
+
(r'[Xx?YyMmDdHhSs\d]{2,4}([:-][Xx?YyMmDdHhSs\d]{2}){2}', Literal.Date),
|
| 45 |
+
# ISO 8601-based duration constraints + optional trailing slash
|
| 46 |
+
(r'(P[YyMmWwDd]+(T[HhMmSs]+)?|PT[HhMmSs]+)/?', Literal.Date),
|
| 47 |
+
],
|
| 48 |
+
'ordered_values': [
|
| 49 |
+
# ISO 8601 date with optional 'T' ligature
|
| 50 |
+
(r'\d{4}-\d{2}-\d{2}T?', Literal.Date),
|
| 51 |
+
# ISO 8601 time
|
| 52 |
+
(r'\d{2}:\d{2}:\d{2}(\.\d+)?([+-]\d{4}|Z)?', Literal.Date),
|
| 53 |
+
# ISO 8601 duration
|
| 54 |
+
(r'P((\d*(\.\d+)?[YyMmWwDd]){1,3}(T(\d*(\.\d+)?[HhMmSs]){,3})?|'
|
| 55 |
+
r'T(\d*(\.\d+)?[HhMmSs]){,3})', Literal.Date),
|
| 56 |
+
(r'[+-]?(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float),
|
| 57 |
+
(r'[+-]?\d*\.\d+%?', Number.Float),
|
| 58 |
+
(r'0x[0-9a-fA-F]+', Number.Hex),
|
| 59 |
+
(r'[+-]?\d+%?', Number.Integer),
|
| 60 |
+
],
|
| 61 |
+
'values': [
|
| 62 |
+
include('ordered_values'),
|
| 63 |
+
(r'([Tt]rue|[Ff]alse)', Literal),
|
| 64 |
+
(r'"', String, 'string'),
|
| 65 |
+
(r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char),
|
| 66 |
+
(r'[a-z][a-z0-9+.-]*:', Literal, 'uri'),
|
| 67 |
+
# term code
|
| 68 |
+
(r'(\[)(\w[\w-]*(?:\([^)\n]+\))?)(::)(\w[\w-]*)(\])',
|
| 69 |
+
bygroups(Punctuation, Name.Decorator, Punctuation, Name.Decorator,
|
| 70 |
+
Punctuation)),
|
| 71 |
+
(r'\|', Punctuation, 'interval'),
|
| 72 |
+
# list continuation
|
| 73 |
+
(r'\.\.\.', Punctuation),
|
| 74 |
+
],
|
| 75 |
+
'constraint_values': [
|
| 76 |
+
(r'(\[)(\w[\w-]*(?:\([^)\n]+\))?)(::)',
|
| 77 |
+
bygroups(Punctuation, Name.Decorator, Punctuation), 'adl14_code_constraint'),
|
| 78 |
+
# ADL 1.4 ordinal constraint
|
| 79 |
+
(r'(\d*)(\|)(\[\w[\w-]*::\w[\w-]*\])((?:[,;])?)',
|
| 80 |
+
bygroups(Number, Punctuation, Name.Decorator, Punctuation)),
|
| 81 |
+
include('date_constraints'),
|
| 82 |
+
include('values'),
|
| 83 |
+
],
|
| 84 |
+
|
| 85 |
+
# ----- real states -----
|
| 86 |
+
'string': [
|
| 87 |
+
('"', String, '#pop'),
|
| 88 |
+
(r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|'
|
| 89 |
+
r'u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})', String.Escape),
|
| 90 |
+
# all other characters
|
| 91 |
+
(r'[^\\"]+', String),
|
| 92 |
+
# stray backslash
|
| 93 |
+
(r'\\', String),
|
| 94 |
+
],
|
| 95 |
+
'uri': [
|
| 96 |
+
# effective URI terminators
|
| 97 |
+
(r'[,>\s]', Punctuation, '#pop'),
|
| 98 |
+
(r'[^>\s,]+', Literal),
|
| 99 |
+
],
|
| 100 |
+
'interval': [
|
| 101 |
+
(r'\|', Punctuation, '#pop'),
|
| 102 |
+
include('ordered_values'),
|
| 103 |
+
(r'\.\.', Punctuation),
|
| 104 |
+
(r'[<>=] *', Punctuation),
|
| 105 |
+
# handle +/-
|
| 106 |
+
(r'\+/-', Punctuation),
|
| 107 |
+
(r'\s+', Whitespace),
|
| 108 |
+
],
|
| 109 |
+
'any_code': [
|
| 110 |
+
include('archetype_id'),
|
| 111 |
+
# if it is a code
|
| 112 |
+
(r'[a-z_]\w*[0-9.]+(@[^\]]+)?', Name.Decorator),
|
| 113 |
+
# if it is tuple with attribute names
|
| 114 |
+
(r'[a-z_]\w*', Name.Class),
|
| 115 |
+
# if it is an integer, i.e. Xpath child index
|
| 116 |
+
(r'[0-9]+', Text),
|
| 117 |
+
(r'\|', Punctuation, 'code_rubric'),
|
| 118 |
+
(r'\]', Punctuation, '#pop'),
|
| 119 |
+
# handle use_archetype statement
|
| 120 |
+
(r'(\s*)(,)(\s*)', bygroups(Whitespace, Punctuation, Whitespace)),
|
| 121 |
+
],
|
| 122 |
+
'code_rubric': [
|
| 123 |
+
(r'\|', Punctuation, '#pop'),
|
| 124 |
+
(r'[^|]+', String),
|
| 125 |
+
],
|
| 126 |
+
'adl14_code_constraint': [
|
| 127 |
+
(r'\]', Punctuation, '#pop'),
|
| 128 |
+
(r'\|', Punctuation, 'code_rubric'),
|
| 129 |
+
(r'(\w[\w-]*)([;,]?)', bygroups(Name.Decorator, Punctuation)),
|
| 130 |
+
include('whitespace'),
|
| 131 |
+
],
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
class OdinLexer(AtomsLexer):
|
| 136 |
+
"""
|
| 137 |
+
Lexer for ODIN syntax.
|
| 138 |
+
"""
|
| 139 |
+
name = 'ODIN'
|
| 140 |
+
aliases = ['odin']
|
| 141 |
+
filenames = ['*.odin']
|
| 142 |
+
mimetypes = ['text/odin']
|
| 143 |
+
url = 'https://github.com/openEHR/odin'
|
| 144 |
+
version_added = '2.1'
|
| 145 |
+
|
| 146 |
+
tokens = {
|
| 147 |
+
'path': [
|
| 148 |
+
(r'>', Punctuation, '#pop'),
|
| 149 |
+
# attribute name
|
| 150 |
+
(r'[a-z_]\w*', Name.Class),
|
| 151 |
+
(r'/', Punctuation),
|
| 152 |
+
(r'\[', Punctuation, 'key'),
|
| 153 |
+
(r'(\s*)(,)(\s*)', bygroups(Whitespace, Punctuation, Whitespace), '#pop'),
|
| 154 |
+
(r'\s+', Whitespace, '#pop'),
|
| 155 |
+
],
|
| 156 |
+
'key': [
|
| 157 |
+
include('values'),
|
| 158 |
+
(r'\]', Punctuation, '#pop'),
|
| 159 |
+
],
|
| 160 |
+
'type_cast': [
|
| 161 |
+
(r'\)', Punctuation, '#pop'),
|
| 162 |
+
(r'[^)]+', Name.Class),
|
| 163 |
+
],
|
| 164 |
+
'root': [
|
| 165 |
+
include('whitespace'),
|
| 166 |
+
(r'([Tt]rue|[Ff]alse)', Literal),
|
| 167 |
+
include('values'),
|
| 168 |
+
# x-ref path
|
| 169 |
+
(r'/', Punctuation, 'path'),
|
| 170 |
+
# x-ref path starting with key
|
| 171 |
+
(r'\[', Punctuation, 'key'),
|
| 172 |
+
# attribute name
|
| 173 |
+
(r'[a-z_]\w*', Name.Class),
|
| 174 |
+
(r'=', Operator),
|
| 175 |
+
(r'\(', Punctuation, 'type_cast'),
|
| 176 |
+
(r',', Punctuation),
|
| 177 |
+
(r'<', Punctuation),
|
| 178 |
+
(r'>', Punctuation),
|
| 179 |
+
(r';', Punctuation),
|
| 180 |
+
],
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
|
| 184 |
+
class CadlLexer(AtomsLexer):
|
| 185 |
+
"""
|
| 186 |
+
Lexer for cADL syntax.
|
| 187 |
+
"""
|
| 188 |
+
name = 'cADL'
|
| 189 |
+
aliases = ['cadl']
|
| 190 |
+
filenames = ['*.cadl']
|
| 191 |
+
url = 'https://specifications.openehr.org/releases/AM/latest/ADL2.html#_cadl_constraint_adl'
|
| 192 |
+
version_added = '2.1'
|
| 193 |
+
|
| 194 |
+
tokens = {
|
| 195 |
+
'path': [
|
| 196 |
+
# attribute name
|
| 197 |
+
(r'[a-z_]\w*', Name.Class),
|
| 198 |
+
(r'/', Punctuation),
|
| 199 |
+
(r'\[', Punctuation, 'any_code'),
|
| 200 |
+
(r'\s+', Punctuation, '#pop'),
|
| 201 |
+
],
|
| 202 |
+
'root': [
|
| 203 |
+
include('whitespace'),
|
| 204 |
+
(r'(cardinality|existence|occurrences|group|include|exclude|'
|
| 205 |
+
r'allow_archetype|use_archetype|use_node)\W', Keyword.Type),
|
| 206 |
+
(r'(and|or|not|there_exists|xor|implies|for_all)\W', Keyword.Type),
|
| 207 |
+
(r'(after|before|closed)\W', Keyword.Type),
|
| 208 |
+
(r'(not)\W', Operator),
|
| 209 |
+
(r'(matches|is_in)\W', Operator),
|
| 210 |
+
# is_in / not is_in char
|
| 211 |
+
('(\u2208|\u2209)', Operator),
|
| 212 |
+
# there_exists / not there_exists / for_all / and / or
|
| 213 |
+
('(\u2203|\u2204|\u2200|\u2227|\u2228|\u22BB|\223C)',
|
| 214 |
+
Operator),
|
| 215 |
+
# regex in slot or as string constraint
|
| 216 |
+
(r'(\{)(\s*)(/[^}]+/)(\s*)(\})',
|
| 217 |
+
bygroups(Punctuation, Whitespace, String.Regex, Whitespace, Punctuation)),
|
| 218 |
+
# regex in slot or as string constraint
|
| 219 |
+
(r'(\{)(\s*)(\^[^}]+\^)(\s*)(\})',
|
| 220 |
+
bygroups(Punctuation, Whitespace, String.Regex, Whitespace, Punctuation)),
|
| 221 |
+
(r'/', Punctuation, 'path'),
|
| 222 |
+
# for cardinality etc
|
| 223 |
+
(r'(\{)((?:\d+\.\.)?(?:\d+|\*))'
|
| 224 |
+
r'((?:\s*;\s*(?:ordered|unordered|unique)){,2})(\})',
|
| 225 |
+
bygroups(Punctuation, Number, Number, Punctuation)),
|
| 226 |
+
# [{ is start of a tuple value
|
| 227 |
+
(r'\[\{', Punctuation),
|
| 228 |
+
(r'\}\]', Punctuation),
|
| 229 |
+
(r'\{', Punctuation),
|
| 230 |
+
(r'\}', Punctuation),
|
| 231 |
+
include('constraint_values'),
|
| 232 |
+
# type name
|
| 233 |
+
(r'[A-Z]\w+(<[A-Z]\w+([A-Za-z_<>]*)>)?', Name.Class),
|
| 234 |
+
# attribute name
|
| 235 |
+
(r'[a-z_]\w*', Name.Class),
|
| 236 |
+
(r'\[', Punctuation, 'any_code'),
|
| 237 |
+
(r'(~|//|\\\\|\+|-|/|\*|\^|!=|=|<=|>=|<|>]?)', Operator),
|
| 238 |
+
(r'\(', Punctuation),
|
| 239 |
+
(r'\)', Punctuation),
|
| 240 |
+
# for lists of values
|
| 241 |
+
(r',', Punctuation),
|
| 242 |
+
(r'"', String, 'string'),
|
| 243 |
+
# for assumed value
|
| 244 |
+
(r';', Punctuation),
|
| 245 |
+
],
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
class AdlLexer(AtomsLexer):
|
| 250 |
+
"""
|
| 251 |
+
Lexer for ADL syntax.
|
| 252 |
+
"""
|
| 253 |
+
|
| 254 |
+
name = 'ADL'
|
| 255 |
+
aliases = ['adl']
|
| 256 |
+
filenames = ['*.adl', '*.adls', '*.adlf', '*.adlx']
|
| 257 |
+
url = 'https://specifications.openehr.org/releases/AM/latest/ADL2.html'
|
| 258 |
+
version_added = '2.1'
|
| 259 |
+
|
| 260 |
+
tokens = {
|
| 261 |
+
'whitespace': [
|
| 262 |
+
# blank line ends
|
| 263 |
+
(r'\s*\n', Whitespace),
|
| 264 |
+
# comment-only line
|
| 265 |
+
(r'^([ \t]*)(--.*)$', bygroups(Whitespace, Comment)),
|
| 266 |
+
],
|
| 267 |
+
'odin_section': [
|
| 268 |
+
# repeating the following two rules from the root state enable multi-line
|
| 269 |
+
# strings that start in the first column to be dealt with
|
| 270 |
+
(r'^(language|description|ontology|terminology|annotations|'
|
| 271 |
+
r'component_terminologies|revision_history)([ \t]*\n)',
|
| 272 |
+
bygroups(Generic.Heading, Whitespace)),
|
| 273 |
+
(r'^(definition)([ \t]*\n)', bygroups(Generic.Heading, Whitespace), 'cadl_section'),
|
| 274 |
+
(r'^([ \t]*|[ \t]+.*)\n', using(OdinLexer)),
|
| 275 |
+
(r'^([^"]*")(>[ \t]*\n)', bygroups(String, Punctuation)),
|
| 276 |
+
# template overlay delimiter
|
| 277 |
+
(r'^----------*\n', Text, '#pop'),
|
| 278 |
+
(r'^.*\n', String),
|
| 279 |
+
default('#pop'),
|
| 280 |
+
],
|
| 281 |
+
'cadl_section': [
|
| 282 |
+
(r'^([ \t]*|[ \t]+.*)\n', using(CadlLexer)),
|
| 283 |
+
default('#pop'),
|
| 284 |
+
],
|
| 285 |
+
'rules_section': [
|
| 286 |
+
(r'^[ \t]+.*\n', using(CadlLexer)),
|
| 287 |
+
default('#pop'),
|
| 288 |
+
],
|
| 289 |
+
'metadata': [
|
| 290 |
+
(r'\)', Punctuation, '#pop'),
|
| 291 |
+
(r';', Punctuation),
|
| 292 |
+
(r'([Tt]rue|[Ff]alse)', Literal),
|
| 293 |
+
# numbers and version ids
|
| 294 |
+
(r'\d+(\.\d+)*', Literal),
|
| 295 |
+
# Guids
|
| 296 |
+
(r'[0-9a-fA-F]{1,36}(-[0-9a-fA-F]{1,36}){3,}', Literal),
|
| 297 |
+
(r'\w+', Name.Class),
|
| 298 |
+
(r'"', String, 'string'),
|
| 299 |
+
(r'=', Operator),
|
| 300 |
+
(r'[ \t]+', Whitespace),
|
| 301 |
+
default('#pop'),
|
| 302 |
+
],
|
| 303 |
+
'root': [
|
| 304 |
+
(r'^(archetype|template_overlay|operational_template|template|'
|
| 305 |
+
r'speciali[sz]e)', Generic.Heading),
|
| 306 |
+
(r'^(language|description|ontology|terminology|annotations|'
|
| 307 |
+
r'component_terminologies|revision_history)[ \t]*\n',
|
| 308 |
+
Generic.Heading, 'odin_section'),
|
| 309 |
+
(r'^(definition)[ \t]*\n', Generic.Heading, 'cadl_section'),
|
| 310 |
+
(r'^(rules)[ \t]*\n', Generic.Heading, 'rules_section'),
|
| 311 |
+
include('archetype_id'),
|
| 312 |
+
(r'([ \t]*)(\()', bygroups(Whitespace, Punctuation), 'metadata'),
|
| 313 |
+
include('whitespace'),
|
| 314 |
+
],
|
| 315 |
+
}
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/css.py
ADDED
|
@@ -0,0 +1,632 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.css
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexers for CSS and related stylesheet formats.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
import re
|
| 12 |
+
import copy
|
| 13 |
+
|
| 14 |
+
from pygments.lexer import ExtendedRegexLexer, RegexLexer, include, bygroups, \
|
| 15 |
+
default, words, inherit
|
| 16 |
+
from pygments.token import Comment, Operator, Keyword, Name, String, Number, \
|
| 17 |
+
Punctuation, Whitespace
|
| 18 |
+
from pygments.lexers._css_builtins import _css_properties
|
| 19 |
+
|
| 20 |
+
__all__ = ['CssLexer', 'SassLexer', 'ScssLexer', 'LessCssLexer']
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
# List of vendor prefixes obtained from:
|
| 24 |
+
# https://www.w3.org/TR/CSS21/syndata.html#vendor-keyword-history
|
| 25 |
+
_vendor_prefixes = (
|
| 26 |
+
'-ms-', 'mso-', '-moz-', '-o-', '-xv-', '-atsc-', '-wap-', '-khtml-',
|
| 27 |
+
'-webkit-', 'prince-', '-ah-', '-hp-', '-ro-', '-rim-', '-tc-',
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
# List of extended color keywords obtained from:
|
| 31 |
+
# https://drafts.csswg.org/css-color/#named-colors
|
| 32 |
+
_color_keywords = (
|
| 33 |
+
'aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige',
|
| 34 |
+
'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown',
|
| 35 |
+
'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral',
|
| 36 |
+
'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan',
|
| 37 |
+
'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki',
|
| 38 |
+
'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred',
|
| 39 |
+
'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray',
|
| 40 |
+
'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue',
|
| 41 |
+
'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite',
|
| 42 |
+
'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod',
|
| 43 |
+
'gray', 'green', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred',
|
| 44 |
+
'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen',
|
| 45 |
+
'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan',
|
| 46 |
+
'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey',
|
| 47 |
+
'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue',
|
| 48 |
+
'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow',
|
| 49 |
+
'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine',
|
| 50 |
+
'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen',
|
| 51 |
+
'mediumslateblue', 'mediumspringgreen', 'mediumturquoise',
|
| 52 |
+
'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin',
|
| 53 |
+
'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab', 'orange',
|
| 54 |
+
'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise',
|
| 55 |
+
'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum',
|
| 56 |
+
'powderblue', 'purple', 'rebeccapurple', 'red', 'rosybrown', 'royalblue',
|
| 57 |
+
'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna',
|
| 58 |
+
'silver', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow',
|
| 59 |
+
'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise',
|
| 60 |
+
'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen',
|
| 61 |
+
) + ('transparent',)
|
| 62 |
+
|
| 63 |
+
# List of keyword values obtained from:
|
| 64 |
+
# http://cssvalues.com/
|
| 65 |
+
_keyword_values = (
|
| 66 |
+
'absolute', 'alias', 'all', 'all-petite-caps', 'all-scroll',
|
| 67 |
+
'all-small-caps', 'allow-end', 'alpha', 'alternate', 'alternate-reverse',
|
| 68 |
+
'always', 'armenian', 'auto', 'avoid', 'avoid-column', 'avoid-page',
|
| 69 |
+
'backwards', 'balance', 'baseline', 'below', 'blink', 'block', 'bold',
|
| 70 |
+
'bolder', 'border-box', 'both', 'bottom', 'box-decoration', 'break-word',
|
| 71 |
+
'capitalize', 'cell', 'center', 'circle', 'clip', 'clone', 'close-quote',
|
| 72 |
+
'col-resize', 'collapse', 'color', 'color-burn', 'color-dodge', 'column',
|
| 73 |
+
'column-reverse', 'compact', 'condensed', 'contain', 'container',
|
| 74 |
+
'content-box', 'context-menu', 'copy', 'cover', 'crisp-edges', 'crosshair',
|
| 75 |
+
'currentColor', 'cursive', 'darken', 'dashed', 'decimal',
|
| 76 |
+
'decimal-leading-zero', 'default', 'descendants', 'difference', 'digits',
|
| 77 |
+
'disc', 'distribute', 'dot', 'dotted', 'double', 'double-circle', 'e-resize',
|
| 78 |
+
'each-line', 'ease', 'ease-in', 'ease-in-out', 'ease-out', 'edges',
|
| 79 |
+
'ellipsis', 'end', 'ew-resize', 'exclusion', 'expanded', 'extra-condensed',
|
| 80 |
+
'extra-expanded', 'fantasy', 'fill', 'fill-box', 'filled', 'first', 'fixed',
|
| 81 |
+
'flat', 'flex', 'flex-end', 'flex-start', 'flip', 'force-end', 'forwards',
|
| 82 |
+
'from-image', 'full-width', 'geometricPrecision', 'georgian', 'groove',
|
| 83 |
+
'hanging', 'hard-light', 'help', 'hidden', 'hide', 'horizontal', 'hue',
|
| 84 |
+
'icon', 'infinite', 'inherit', 'initial', 'ink', 'inline', 'inline-block',
|
| 85 |
+
'inline-flex', 'inline-table', 'inset', 'inside', 'inter-word', 'invert',
|
| 86 |
+
'isolate', 'italic', 'justify', 'large', 'larger', 'last', 'left',
|
| 87 |
+
'lighten', 'lighter', 'line-through', 'linear', 'list-item', 'local',
|
| 88 |
+
'loose', 'lower-alpha', 'lower-greek', 'lower-latin', 'lower-roman',
|
| 89 |
+
'lowercase', 'ltr', 'luminance', 'luminosity', 'mandatory', 'manipulation',
|
| 90 |
+
'manual', 'margin-box', 'match-parent', 'medium', 'mixed', 'monospace',
|
| 91 |
+
'move', 'multiply', 'n-resize', 'ne-resize', 'nesw-resize',
|
| 92 |
+
'no-close-quote', 'no-drop', 'no-open-quote', 'no-repeat', 'none', 'normal',
|
| 93 |
+
'not-allowed', 'nowrap', 'ns-resize', 'nw-resize', 'nwse-resize', 'objects',
|
| 94 |
+
'oblique', 'off', 'on', 'open', 'open-quote', 'optimizeLegibility',
|
| 95 |
+
'optimizeSpeed', 'outset', 'outside', 'over', 'overlay', 'overline',
|
| 96 |
+
'padding-box', 'page', 'pan-down', 'pan-left', 'pan-right', 'pan-up',
|
| 97 |
+
'pan-x', 'pan-y', 'paused', 'petite-caps', 'pixelated', 'pointer',
|
| 98 |
+
'preserve-3d', 'progress', 'proximity', 'relative', 'repeat',
|
| 99 |
+
'repeat no-repeat', 'repeat-x', 'repeat-y', 'reverse', 'revert', 'ridge', 'right',
|
| 100 |
+
'round', 'row', 'row-resize', 'row-reverse', 'rtl', 'ruby', 'ruby-base',
|
| 101 |
+
'ruby-base-container', 'ruby-text', 'ruby-text-container', 'run-in',
|
| 102 |
+
'running', 's-resize', 'sans-serif', 'saturation', 'scale-down', 'screen',
|
| 103 |
+
'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate',
|
| 104 |
+
'serif', 'sesame', 'show', 'sideways', 'sideways-left', 'sideways-right',
|
| 105 |
+
'slice', 'small', 'small-caps', 'smaller', 'smooth', 'snap', 'soft-light',
|
| 106 |
+
'solid', 'space', 'space-around', 'space-between', 'spaces', 'square',
|
| 107 |
+
'start', 'static', 'step-end', 'step-start', 'sticky', 'stretch', 'strict',
|
| 108 |
+
'stroke-box', 'style', 'sw-resize', 'table', 'table-caption', 'table-cell',
|
| 109 |
+
'table-column', 'table-column-group', 'table-footer-group',
|
| 110 |
+
'table-header-group', 'table-row', 'table-row-group', 'text', 'thick',
|
| 111 |
+
'thin', 'titling-caps', 'to', 'top', 'triangle', 'ultra-condensed',
|
| 112 |
+
'ultra-expanded', 'under', 'underline', 'unicase', 'unset', 'upper-alpha',
|
| 113 |
+
'upper-latin', 'upper-roman', 'uppercase', 'upright', 'use-glyph-orientation',
|
| 114 |
+
'vertical', 'vertical-text', 'view-box', 'visible', 'w-resize', 'wait',
|
| 115 |
+
'wavy', 'weight', 'weight style', 'wrap', 'wrap-reverse', 'x-large',
|
| 116 |
+
'x-small', 'xx-large', 'xx-small', 'zoom-in', 'zoom-out',
|
| 117 |
+
)
|
| 118 |
+
|
| 119 |
+
# List of other keyword values from other sources:
|
| 120 |
+
_other_keyword_values = (
|
| 121 |
+
'above', 'aural', 'behind', 'bidi-override', 'center-left', 'center-right',
|
| 122 |
+
'cjk-ideographic', 'continuous', 'crop', 'cross', 'embed', 'far-left',
|
| 123 |
+
'far-right', 'fast', 'faster', 'hebrew', 'high', 'higher', 'hiragana',
|
| 124 |
+
'hiragana-iroha', 'katakana', 'katakana-iroha', 'landscape', 'left-side',
|
| 125 |
+
'leftwards', 'level', 'loud', 'low', 'lower', 'message-box', 'middle',
|
| 126 |
+
'mix', 'narrower', 'once', 'portrait', 'right-side', 'rightwards', 'silent',
|
| 127 |
+
'slow', 'slower', 'small-caption', 'soft', 'spell-out', 'status-bar',
|
| 128 |
+
'super', 'text-bottom', 'text-top', 'wider', 'x-fast', 'x-high', 'x-loud',
|
| 129 |
+
'x-low', 'x-soft', 'yes', 'pre', 'pre-wrap', 'pre-line',
|
| 130 |
+
)
|
| 131 |
+
|
| 132 |
+
# List of functional notation and function keyword values:
|
| 133 |
+
_functional_notation_keyword_values = (
|
| 134 |
+
'attr', 'blackness', 'blend', 'blenda', 'blur', 'brightness', 'calc',
|
| 135 |
+
'circle', 'color-mod', 'contrast', 'counter', 'cubic-bezier', 'device-cmyk',
|
| 136 |
+
'drop-shadow', 'ellipse', 'gray', 'grayscale', 'hsl', 'hsla', 'hue',
|
| 137 |
+
'hue-rotate', 'hwb', 'image', 'inset', 'invert', 'lightness',
|
| 138 |
+
'linear-gradient', 'matrix', 'matrix3d', 'opacity', 'perspective',
|
| 139 |
+
'polygon', 'radial-gradient', 'rect', 'repeating-linear-gradient',
|
| 140 |
+
'repeating-radial-gradient', 'rgb', 'rgba', 'rotate', 'rotate3d', 'rotateX',
|
| 141 |
+
'rotateY', 'rotateZ', 'saturate', 'saturation', 'scale', 'scale3d',
|
| 142 |
+
'scaleX', 'scaleY', 'scaleZ', 'sepia', 'shade', 'skewX', 'skewY', 'steps',
|
| 143 |
+
'tint', 'toggle', 'translate', 'translate3d', 'translateX', 'translateY',
|
| 144 |
+
'translateZ', 'whiteness',
|
| 145 |
+
)
|
| 146 |
+
# Note! Handle url(...) separately.
|
| 147 |
+
|
| 148 |
+
# List of units obtained from:
|
| 149 |
+
# https://www.w3.org/TR/css3-values/
|
| 150 |
+
_angle_units = (
|
| 151 |
+
'deg', 'grad', 'rad', 'turn',
|
| 152 |
+
)
|
| 153 |
+
_frequency_units = (
|
| 154 |
+
'Hz', 'kHz',
|
| 155 |
+
)
|
| 156 |
+
_length_units = (
|
| 157 |
+
'em', 'ex', 'ch', 'rem',
|
| 158 |
+
'vh', 'vw', 'vmin', 'vmax',
|
| 159 |
+
'px', 'mm', 'cm', 'in', 'pt', 'pc', 'q',
|
| 160 |
+
)
|
| 161 |
+
_resolution_units = (
|
| 162 |
+
'dpi', 'dpcm', 'dppx',
|
| 163 |
+
)
|
| 164 |
+
_time_units = (
|
| 165 |
+
's', 'ms',
|
| 166 |
+
)
|
| 167 |
+
_all_units = _angle_units + _frequency_units + _length_units + \
|
| 168 |
+
_resolution_units + _time_units
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
class CssLexer(RegexLexer):
|
| 172 |
+
"""
|
| 173 |
+
For CSS (Cascading Style Sheets).
|
| 174 |
+
"""
|
| 175 |
+
|
| 176 |
+
name = 'CSS'
|
| 177 |
+
url = 'https://www.w3.org/TR/CSS/#css'
|
| 178 |
+
aliases = ['css']
|
| 179 |
+
filenames = ['*.css']
|
| 180 |
+
mimetypes = ['text/css']
|
| 181 |
+
version_added = ''
|
| 182 |
+
|
| 183 |
+
tokens = {
|
| 184 |
+
'root': [
|
| 185 |
+
include('basics'),
|
| 186 |
+
],
|
| 187 |
+
'basics': [
|
| 188 |
+
(r'\s+', Whitespace),
|
| 189 |
+
(r'/\*(?:.|\n)*?\*/', Comment),
|
| 190 |
+
(r'\{', Punctuation, 'content'),
|
| 191 |
+
(r'(\:{1,2})([\w-]+)', bygroups(Punctuation, Name.Decorator)),
|
| 192 |
+
(r'(\.)([\w-]+)', bygroups(Punctuation, Name.Class)),
|
| 193 |
+
(r'(\#)([\w-]+)', bygroups(Punctuation, Name.Namespace)),
|
| 194 |
+
(r'(@)([\w-]+)', bygroups(Punctuation, Keyword), 'atrule'),
|
| 195 |
+
(r'[\w-]+', Name.Tag),
|
| 196 |
+
(r'[~^*!%&$\[\]()<>|+=@:;,./?-]', Operator),
|
| 197 |
+
(r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
|
| 198 |
+
(r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single),
|
| 199 |
+
],
|
| 200 |
+
'atrule': [
|
| 201 |
+
(r'\{', Punctuation, 'atcontent'),
|
| 202 |
+
(r';', Punctuation, '#pop'),
|
| 203 |
+
include('basics'),
|
| 204 |
+
],
|
| 205 |
+
'atcontent': [
|
| 206 |
+
include('basics'),
|
| 207 |
+
(r'\}', Punctuation, '#pop:2'),
|
| 208 |
+
],
|
| 209 |
+
'content': [
|
| 210 |
+
(r'\s+', Whitespace),
|
| 211 |
+
(r'\}', Punctuation, '#pop'),
|
| 212 |
+
(r';', Punctuation),
|
| 213 |
+
(r'^@.*?$', Comment.Preproc),
|
| 214 |
+
|
| 215 |
+
(words(_vendor_prefixes,), Keyword.Pseudo),
|
| 216 |
+
(r'('+r'|'.join(_css_properties)+r')(\s*)(\:)',
|
| 217 |
+
bygroups(Keyword, Whitespace, Punctuation), 'value-start'),
|
| 218 |
+
(r'([-]+[a-zA-Z_][\w-]*)(\s*)(\:)', bygroups(Name.Variable, Whitespace, Punctuation),
|
| 219 |
+
'value-start'),
|
| 220 |
+
(r'([a-zA-Z_][\w-]*)(\s*)(\:)', bygroups(Name, Whitespace, Punctuation),
|
| 221 |
+
'value-start'),
|
| 222 |
+
|
| 223 |
+
(r'/\*(?:.|\n)*?\*/', Comment),
|
| 224 |
+
],
|
| 225 |
+
'value-start': [
|
| 226 |
+
(r'\s+', Whitespace),
|
| 227 |
+
(words(_vendor_prefixes,), Name.Builtin.Pseudo),
|
| 228 |
+
include('urls'),
|
| 229 |
+
(r'('+r'|'.join(_functional_notation_keyword_values)+r')(\()',
|
| 230 |
+
bygroups(Name.Builtin, Punctuation), 'function-start'),
|
| 231 |
+
(r'([a-zA-Z_][\w-]+)(\()',
|
| 232 |
+
bygroups(Name.Function, Punctuation), 'function-start'),
|
| 233 |
+
(words(_keyword_values, suffix=r'\b'), Keyword.Constant),
|
| 234 |
+
(words(_other_keyword_values, suffix=r'\b'), Keyword.Constant),
|
| 235 |
+
(words(_color_keywords, suffix=r'\b'), Keyword.Constant),
|
| 236 |
+
# for transition-property etc.
|
| 237 |
+
(words(_css_properties, suffix=r'\b'), Keyword),
|
| 238 |
+
(r'\!important', Comment.Preproc),
|
| 239 |
+
(r'/\*(?:.|\n)*?\*/', Comment),
|
| 240 |
+
|
| 241 |
+
include('numeric-values'),
|
| 242 |
+
|
| 243 |
+
(r'[~^*!%&<>|+=@:./?-]+', Operator),
|
| 244 |
+
(r'[\[\](),]+', Punctuation),
|
| 245 |
+
(r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
|
| 246 |
+
(r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single),
|
| 247 |
+
(r'[a-zA-Z_][\w-]*', Name),
|
| 248 |
+
(r';', Punctuation, '#pop'),
|
| 249 |
+
(r'\}', Punctuation, '#pop:2'),
|
| 250 |
+
],
|
| 251 |
+
'function-start': [
|
| 252 |
+
(r'\s+', Whitespace),
|
| 253 |
+
(r'[-]+([A-Za-z][\w+]*[-]*)+', Name.Variable),
|
| 254 |
+
include('urls'),
|
| 255 |
+
(words(_vendor_prefixes,), Keyword.Pseudo),
|
| 256 |
+
(words(_keyword_values, suffix=r'\b'), Keyword.Constant),
|
| 257 |
+
(words(_other_keyword_values, suffix=r'\b'), Keyword.Constant),
|
| 258 |
+
(words(_color_keywords, suffix=r'\b'), Keyword.Constant),
|
| 259 |
+
|
| 260 |
+
# function-start may be entered recursively
|
| 261 |
+
(r'(' + r'|'.join(_functional_notation_keyword_values) + r')(\()',
|
| 262 |
+
bygroups(Name.Builtin, Punctuation), 'function-start'),
|
| 263 |
+
(r'([a-zA-Z_][\w-]+)(\()',
|
| 264 |
+
bygroups(Name.Function, Punctuation), 'function-start'),
|
| 265 |
+
|
| 266 |
+
(r'/\*(?:.|\n)*?\*/', Comment),
|
| 267 |
+
include('numeric-values'),
|
| 268 |
+
(r'[*+/-]', Operator),
|
| 269 |
+
(r',', Punctuation),
|
| 270 |
+
(r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
|
| 271 |
+
(r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single),
|
| 272 |
+
(r'[a-zA-Z_-]\w*', Name),
|
| 273 |
+
(r'\)', Punctuation, '#pop'),
|
| 274 |
+
],
|
| 275 |
+
'urls': [
|
| 276 |
+
(r'(url)(\()(".*?")(\))', bygroups(Name.Builtin, Punctuation,
|
| 277 |
+
String.Double, Punctuation)),
|
| 278 |
+
(r"(url)(\()('.*?')(\))", bygroups(Name.Builtin, Punctuation,
|
| 279 |
+
String.Single, Punctuation)),
|
| 280 |
+
(r'(url)(\()(.*?)(\))', bygroups(Name.Builtin, Punctuation,
|
| 281 |
+
String.Other, Punctuation)),
|
| 282 |
+
],
|
| 283 |
+
'numeric-values': [
|
| 284 |
+
(r'\#[a-zA-Z0-9]{1,6}', Number.Hex),
|
| 285 |
+
(r'[+\-]?[0-9]*[.][0-9]+', Number.Float, 'numeric-end'),
|
| 286 |
+
(r'[+\-]?[0-9]+', Number.Integer, 'numeric-end'),
|
| 287 |
+
],
|
| 288 |
+
'numeric-end': [
|
| 289 |
+
(words(_all_units, suffix=r'\b'), Keyword.Type),
|
| 290 |
+
(r'%', Keyword.Type),
|
| 291 |
+
default('#pop'),
|
| 292 |
+
],
|
| 293 |
+
}
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
common_sass_tokens = {
|
| 297 |
+
'value': [
|
| 298 |
+
(r'[ \t]+', Whitespace),
|
| 299 |
+
(r'[!$][\w-]+', Name.Variable),
|
| 300 |
+
(r'url\(', String.Other, 'string-url'),
|
| 301 |
+
(r'[a-z_-][\w-]*(?=\()', Name.Function),
|
| 302 |
+
(words(_css_properties + (
|
| 303 |
+
'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid', 'baseline',
|
| 304 |
+
'behind', 'below', 'bidi-override', 'blink', 'block', 'bold', 'bolder', 'both',
|
| 305 |
+
'capitalize', 'center-left', 'center-right', 'center', 'circle',
|
| 306 |
+
'cjk-ideographic', 'close-quote', 'collapse', 'condensed', 'continuous',
|
| 307 |
+
'crosshair', 'cross', 'cursive', 'dashed', 'decimal-leading-zero',
|
| 308 |
+
'decimal', 'default', 'digits', 'disc', 'dotted', 'double', 'e-resize', 'embed',
|
| 309 |
+
'extra-condensed', 'extra-expanded', 'expanded', 'fantasy', 'far-left',
|
| 310 |
+
'far-right', 'faster', 'fast', 'fixed', 'georgian', 'groove', 'hebrew', 'help',
|
| 311 |
+
'hidden', 'hide', 'higher', 'high', 'hiragana-iroha', 'hiragana', 'icon',
|
| 312 |
+
'inherit', 'inline-table', 'inline', 'inset', 'inside', 'invert', 'italic',
|
| 313 |
+
'justify', 'katakana-iroha', 'katakana', 'landscape', 'larger', 'large',
|
| 314 |
+
'left-side', 'leftwards', 'level', 'lighter', 'line-through', 'list-item',
|
| 315 |
+
'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr',
|
| 316 |
+
'lower', 'low', 'medium', 'message-box', 'middle', 'mix', 'monospace',
|
| 317 |
+
'n-resize', 'narrower', 'ne-resize', 'no-close-quote', 'no-open-quote',
|
| 318 |
+
'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize', 'oblique', 'once',
|
| 319 |
+
'open-quote', 'outset', 'outside', 'overline', 'pointer', 'portrait', 'px',
|
| 320 |
+
'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side',
|
| 321 |
+
'rightwards', 's-resize', 'sans-serif', 'scroll', 'se-resize',
|
| 322 |
+
'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent',
|
| 323 |
+
'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid',
|
| 324 |
+
'spell-out', 'square', 'static', 'status-bar', 'super', 'sw-resize',
|
| 325 |
+
'table-caption', 'table-cell', 'table-column', 'table-column-group',
|
| 326 |
+
'table-footer-group', 'table-header-group', 'table-row',
|
| 327 |
+
'table-row-group', 'text', 'text-bottom', 'text-top', 'thick', 'thin',
|
| 328 |
+
'transparent', 'ultra-condensed', 'ultra-expanded', 'underline',
|
| 329 |
+
'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url',
|
| 330 |
+
'visible', 'w-resize', 'wait', 'wider', 'x-fast', 'x-high', 'x-large', 'x-loud',
|
| 331 |
+
'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', 'yes'), suffix=r'\b'),
|
| 332 |
+
Name.Constant),
|
| 333 |
+
(words(_color_keywords, suffix=r'\b'), Name.Entity),
|
| 334 |
+
(words((
|
| 335 |
+
'black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green',
|
| 336 |
+
'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua'), suffix=r'\b'),
|
| 337 |
+
Name.Builtin),
|
| 338 |
+
(r'\!(important|default)', Name.Exception),
|
| 339 |
+
(r'(true|false)', Name.Pseudo),
|
| 340 |
+
(r'(and|or|not)', Operator.Word),
|
| 341 |
+
(r'/\*', Comment.Multiline, 'inline-comment'),
|
| 342 |
+
(r'//[^\n]*', Comment.Single),
|
| 343 |
+
(r'\#[a-z0-9]{1,6}', Number.Hex),
|
| 344 |
+
(r'(-?\d+)(\%|[a-z]+)?', bygroups(Number.Integer, Keyword.Type)),
|
| 345 |
+
(r'(-?\d*\.\d+)(\%|[a-z]+)?', bygroups(Number.Float, Keyword.Type)),
|
| 346 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 347 |
+
(r'[~^*!&%<>|+=@:,./?-]+', Operator),
|
| 348 |
+
(r'[\[\]()]+', Punctuation),
|
| 349 |
+
(r'"', String.Double, 'string-double'),
|
| 350 |
+
(r"'", String.Single, 'string-single'),
|
| 351 |
+
(r'[a-z_-][\w-]*', Name),
|
| 352 |
+
],
|
| 353 |
+
|
| 354 |
+
'interpolation': [
|
| 355 |
+
(r'\}', String.Interpol, '#pop'),
|
| 356 |
+
include('value'),
|
| 357 |
+
],
|
| 358 |
+
|
| 359 |
+
'selector': [
|
| 360 |
+
(r'[ \t]+', Whitespace),
|
| 361 |
+
(r'\:', Name.Decorator, 'pseudo-class'),
|
| 362 |
+
(r'\.', Name.Class, 'class'),
|
| 363 |
+
(r'\#', Name.Namespace, 'id'),
|
| 364 |
+
(r'[\w-]+', Name.Tag),
|
| 365 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 366 |
+
(r'&', Keyword),
|
| 367 |
+
(r'[~^*!&\[\]()<>|+=@:;,./?-]', Operator),
|
| 368 |
+
(r'"', String.Double, 'string-double'),
|
| 369 |
+
(r"'", String.Single, 'string-single'),
|
| 370 |
+
],
|
| 371 |
+
|
| 372 |
+
'string-double': [
|
| 373 |
+
(r'(\\.|#(?=[^\n{])|[^\n"#])+', String.Double),
|
| 374 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 375 |
+
(r'"', String.Double, '#pop'),
|
| 376 |
+
],
|
| 377 |
+
|
| 378 |
+
'string-single': [
|
| 379 |
+
(r"(\\.|#(?=[^\n{])|[^\n'#])+", String.Single),
|
| 380 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 381 |
+
(r"'", String.Single, '#pop'),
|
| 382 |
+
],
|
| 383 |
+
|
| 384 |
+
'string-url': [
|
| 385 |
+
(r'(\\#|#(?=[^\n{])|[^\n#)])+', String.Other),
|
| 386 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 387 |
+
(r'\)', String.Other, '#pop'),
|
| 388 |
+
],
|
| 389 |
+
|
| 390 |
+
'pseudo-class': [
|
| 391 |
+
(r'[\w-]+', Name.Decorator),
|
| 392 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 393 |
+
default('#pop'),
|
| 394 |
+
],
|
| 395 |
+
|
| 396 |
+
'class': [
|
| 397 |
+
(r'[\w-]+', Name.Class),
|
| 398 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 399 |
+
default('#pop'),
|
| 400 |
+
],
|
| 401 |
+
|
| 402 |
+
'id': [
|
| 403 |
+
(r'[\w-]+', Name.Namespace),
|
| 404 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 405 |
+
default('#pop'),
|
| 406 |
+
],
|
| 407 |
+
|
| 408 |
+
'for': [
|
| 409 |
+
(r'(from|to|through)', Operator.Word),
|
| 410 |
+
include('value'),
|
| 411 |
+
],
|
| 412 |
+
}
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
def _indentation(lexer, match, ctx):
|
| 416 |
+
indentation = match.group(0)
|
| 417 |
+
yield match.start(), Whitespace, indentation
|
| 418 |
+
ctx.last_indentation = indentation
|
| 419 |
+
ctx.pos = match.end()
|
| 420 |
+
|
| 421 |
+
if hasattr(ctx, 'block_state') and ctx.block_state and \
|
| 422 |
+
indentation.startswith(ctx.block_indentation) and \
|
| 423 |
+
indentation != ctx.block_indentation:
|
| 424 |
+
ctx.stack.append(ctx.block_state)
|
| 425 |
+
else:
|
| 426 |
+
ctx.block_state = None
|
| 427 |
+
ctx.block_indentation = None
|
| 428 |
+
ctx.stack.append('content')
|
| 429 |
+
|
| 430 |
+
|
| 431 |
+
def _starts_block(token, state):
|
| 432 |
+
def callback(lexer, match, ctx):
|
| 433 |
+
yield match.start(), token, match.group(0)
|
| 434 |
+
|
| 435 |
+
if hasattr(ctx, 'last_indentation'):
|
| 436 |
+
ctx.block_indentation = ctx.last_indentation
|
| 437 |
+
else:
|
| 438 |
+
ctx.block_indentation = ''
|
| 439 |
+
|
| 440 |
+
ctx.block_state = state
|
| 441 |
+
ctx.pos = match.end()
|
| 442 |
+
|
| 443 |
+
return callback
|
| 444 |
+
|
| 445 |
+
|
| 446 |
+
class SassLexer(ExtendedRegexLexer):
|
| 447 |
+
"""
|
| 448 |
+
For Sass stylesheets.
|
| 449 |
+
"""
|
| 450 |
+
|
| 451 |
+
name = 'Sass'
|
| 452 |
+
url = 'https://sass-lang.com/'
|
| 453 |
+
aliases = ['sass']
|
| 454 |
+
filenames = ['*.sass']
|
| 455 |
+
mimetypes = ['text/x-sass']
|
| 456 |
+
version_added = '1.3'
|
| 457 |
+
|
| 458 |
+
flags = re.IGNORECASE | re.MULTILINE
|
| 459 |
+
|
| 460 |
+
tokens = {
|
| 461 |
+
'root': [
|
| 462 |
+
(r'[ \t]*\n', Whitespace),
|
| 463 |
+
(r'[ \t]*', _indentation),
|
| 464 |
+
],
|
| 465 |
+
|
| 466 |
+
'content': [
|
| 467 |
+
(r'//[^\n]*', _starts_block(Comment.Single, 'single-comment'),
|
| 468 |
+
'root'),
|
| 469 |
+
(r'/\*[^\n]*', _starts_block(Comment.Multiline, 'multi-comment'),
|
| 470 |
+
'root'),
|
| 471 |
+
(r'@import', Keyword, 'import'),
|
| 472 |
+
(r'@for', Keyword, 'for'),
|
| 473 |
+
(r'@(debug|warn|if|while)', Keyword, 'value'),
|
| 474 |
+
(r'(@mixin)( )([\w-]+)', bygroups(Keyword, Whitespace, Name.Function), 'value'),
|
| 475 |
+
(r'(@include)( )([\w-]+)', bygroups(Keyword, Whitespace, Name.Decorator), 'value'),
|
| 476 |
+
(r'@extend', Keyword, 'selector'),
|
| 477 |
+
(r'@[\w-]+', Keyword, 'selector'),
|
| 478 |
+
(r'=[\w-]+', Name.Function, 'value'),
|
| 479 |
+
(r'\+[\w-]+', Name.Decorator, 'value'),
|
| 480 |
+
(r'([!$][\w-]\w*)([ \t]*(?:(?:\|\|)?=|:))',
|
| 481 |
+
bygroups(Name.Variable, Operator), 'value'),
|
| 482 |
+
(r':', Name.Attribute, 'old-style-attr'),
|
| 483 |
+
(r'(?=.+?[=:]([^a-z]|$))', Name.Attribute, 'new-style-attr'),
|
| 484 |
+
default('selector'),
|
| 485 |
+
],
|
| 486 |
+
|
| 487 |
+
'single-comment': [
|
| 488 |
+
(r'.+', Comment.Single),
|
| 489 |
+
(r'\n', Whitespace, 'root'),
|
| 490 |
+
],
|
| 491 |
+
|
| 492 |
+
'multi-comment': [
|
| 493 |
+
(r'.+', Comment.Multiline),
|
| 494 |
+
(r'\n', Whitespace, 'root'),
|
| 495 |
+
],
|
| 496 |
+
|
| 497 |
+
'import': [
|
| 498 |
+
(r'[ \t]+', Whitespace),
|
| 499 |
+
(r'\S+', String),
|
| 500 |
+
(r'\n', Whitespace, 'root'),
|
| 501 |
+
],
|
| 502 |
+
|
| 503 |
+
'old-style-attr': [
|
| 504 |
+
(r'[^\s:="\[]+', Name.Attribute),
|
| 505 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 506 |
+
(r'([ \t]*)(=)', bygroups(Whitespace, Operator), 'value'),
|
| 507 |
+
default('value'),
|
| 508 |
+
],
|
| 509 |
+
|
| 510 |
+
'new-style-attr': [
|
| 511 |
+
(r'[^\s:="\[]+', Name.Attribute),
|
| 512 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 513 |
+
(r'([ \t]*)([=:])', bygroups(Whitespace, Operator), 'value'),
|
| 514 |
+
],
|
| 515 |
+
|
| 516 |
+
'inline-comment': [
|
| 517 |
+
(r"(\\#|#(?=[^\n{])|\*(?=[^\n/])|[^\n#*])+", Comment.Multiline),
|
| 518 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 519 |
+
(r"\*/", Comment, '#pop'),
|
| 520 |
+
],
|
| 521 |
+
}
|
| 522 |
+
for group, common in common_sass_tokens.items():
|
| 523 |
+
tokens[group] = copy.copy(common)
|
| 524 |
+
tokens['value'].append((r'\n', Whitespace, 'root'))
|
| 525 |
+
tokens['selector'].append((r'\n', Whitespace, 'root'))
|
| 526 |
+
|
| 527 |
+
|
| 528 |
+
class ScssLexer(RegexLexer):
|
| 529 |
+
"""
|
| 530 |
+
For SCSS stylesheets.
|
| 531 |
+
"""
|
| 532 |
+
|
| 533 |
+
name = 'SCSS'
|
| 534 |
+
url = 'https://sass-lang.com/'
|
| 535 |
+
aliases = ['scss']
|
| 536 |
+
filenames = ['*.scss']
|
| 537 |
+
mimetypes = ['text/x-scss']
|
| 538 |
+
version_added = ''
|
| 539 |
+
|
| 540 |
+
flags = re.IGNORECASE | re.DOTALL
|
| 541 |
+
tokens = {
|
| 542 |
+
'root': [
|
| 543 |
+
(r'\s+', Whitespace),
|
| 544 |
+
(r'//.*?\n', Comment.Single),
|
| 545 |
+
(r'/\*.*?\*/', Comment.Multiline),
|
| 546 |
+
(r'@import', Keyword, 'value'),
|
| 547 |
+
(r'@for', Keyword, 'for'),
|
| 548 |
+
(r'@(debug|warn|if|while)', Keyword, 'value'),
|
| 549 |
+
(r'(@mixin)( [\w-]+)', bygroups(Keyword, Name.Function), 'value'),
|
| 550 |
+
(r'(@include)( [\w-]+)', bygroups(Keyword, Name.Decorator), 'value'),
|
| 551 |
+
(r'@extend', Keyword, 'selector'),
|
| 552 |
+
(r'(@media)(\s+)', bygroups(Keyword, Whitespace), 'value'),
|
| 553 |
+
(r'@[\w-]+', Keyword, 'selector'),
|
| 554 |
+
(r'(\$[\w-]*\w)([ \t]*:)', bygroups(Name.Variable, Operator), 'value'),
|
| 555 |
+
# TODO: broken, and prone to infinite loops.
|
| 556 |
+
# (r'(?=[^;{}][;}])', Name.Attribute, 'attr'),
|
| 557 |
+
# (r'(?=[^;{}:]+:[^a-z])', Name.Attribute, 'attr'),
|
| 558 |
+
default('selector'),
|
| 559 |
+
],
|
| 560 |
+
|
| 561 |
+
'attr': [
|
| 562 |
+
(r'[^\s:="\[]+', Name.Attribute),
|
| 563 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 564 |
+
(r'[ \t]*:', Operator, 'value'),
|
| 565 |
+
default('#pop'),
|
| 566 |
+
],
|
| 567 |
+
|
| 568 |
+
'inline-comment': [
|
| 569 |
+
(r"(\\#|#(?=[^{])|\*(?=[^/])|[^#*])+", Comment.Multiline),
|
| 570 |
+
(r'#\{', String.Interpol, 'interpolation'),
|
| 571 |
+
(r"\*/", Comment, '#pop'),
|
| 572 |
+
],
|
| 573 |
+
}
|
| 574 |
+
for group, common in common_sass_tokens.items():
|
| 575 |
+
tokens[group] = copy.copy(common)
|
| 576 |
+
tokens['value'].extend([(r'\n', Whitespace), (r'[;{}]', Punctuation, '#pop')])
|
| 577 |
+
tokens['selector'].extend([(r'\n', Whitespace), (r'[;{}]', Punctuation, '#pop')])
|
| 578 |
+
|
| 579 |
+
|
| 580 |
+
class LessCssLexer(CssLexer):
|
| 581 |
+
"""
|
| 582 |
+
For LESS styleshets.
|
| 583 |
+
"""
|
| 584 |
+
|
| 585 |
+
name = 'LessCss'
|
| 586 |
+
url = 'http://lesscss.org/'
|
| 587 |
+
aliases = ['less']
|
| 588 |
+
filenames = ['*.less']
|
| 589 |
+
mimetypes = ['text/x-less-css']
|
| 590 |
+
version_added = '2.1'
|
| 591 |
+
|
| 592 |
+
tokens = {
|
| 593 |
+
# FIXME: It's not currently possible to simply do the following,
|
| 594 |
+
# as `include('basics')` doesn't take overrides into account:
|
| 595 |
+
# 'basics': [
|
| 596 |
+
# (r'//.*\n', Comment.Single),
|
| 597 |
+
# (r'/\*(?:.|\n)*?\*/', Comment.Multiline),
|
| 598 |
+
# inherit,
|
| 599 |
+
# ],
|
| 600 |
+
'root': [
|
| 601 |
+
(r'@\w+', Name.Variable),
|
| 602 |
+
(r'//.*\n', Comment.Single),
|
| 603 |
+
(r'/\*(?:.|\n)*?\*/', Comment.Multiline),
|
| 604 |
+
inherit,
|
| 605 |
+
],
|
| 606 |
+
'atcontent': [
|
| 607 |
+
(r'//.*\n', Comment.Single),
|
| 608 |
+
(r'/\*(?:.|\n)*?\*/', Comment.Multiline),
|
| 609 |
+
inherit,
|
| 610 |
+
],
|
| 611 |
+
'atrule': [
|
| 612 |
+
(r'//.*\n', Comment.Single),
|
| 613 |
+
(r'/\*(?:.|\n)*?\*/', Comment.Multiline),
|
| 614 |
+
inherit,
|
| 615 |
+
],
|
| 616 |
+
'content': [
|
| 617 |
+
(r'\{', Punctuation, '#push'),
|
| 618 |
+
(r'//.*\n', Comment.Single),
|
| 619 |
+
(r'/\*(?:.|\n)*?\*/', Comment.Multiline),
|
| 620 |
+
inherit,
|
| 621 |
+
],
|
| 622 |
+
'value-start': [
|
| 623 |
+
(r'//.*\n', Comment.Single),
|
| 624 |
+
(r'/\*(?:.|\n)*?\*/', Comment.Multiline),
|
| 625 |
+
inherit,
|
| 626 |
+
],
|
| 627 |
+
'function-start': [
|
| 628 |
+
(r'//.*\n', Comment.Single),
|
| 629 |
+
(r'/\*(?:.|\n)*?\*/', Comment.Multiline),
|
| 630 |
+
inherit,
|
| 631 |
+
],
|
| 632 |
+
}
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/fift.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.fift
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexers for fift.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
from pygments.lexer import RegexLexer, include
|
| 12 |
+
from pygments.token import Literal, Comment, Name, String, Number, Whitespace
|
| 13 |
+
|
| 14 |
+
__all__ = ['FiftLexer']
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
class FiftLexer(RegexLexer):
|
| 18 |
+
"""
|
| 19 |
+
For Fift source code.
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
name = 'Fift'
|
| 23 |
+
aliases = ['fift', 'fif']
|
| 24 |
+
filenames = ['*.fif']
|
| 25 |
+
url = 'https://ton-blockchain.github.io/docs/fiftbase.pdf'
|
| 26 |
+
version_added = ''
|
| 27 |
+
|
| 28 |
+
tokens = {
|
| 29 |
+
'root': [
|
| 30 |
+
(r'\s+', Whitespace),
|
| 31 |
+
|
| 32 |
+
include('comments'),
|
| 33 |
+
|
| 34 |
+
(r'[\.+]?\"', String, 'string'),
|
| 35 |
+
|
| 36 |
+
# numbers
|
| 37 |
+
(r'0x[0-9a-fA-F]+', Number.Hex),
|
| 38 |
+
(r'0b[01]+', Number.Bin),
|
| 39 |
+
(r'-?[0-9]+("/"-?[0-9]+)?', Number.Decimal),
|
| 40 |
+
|
| 41 |
+
# slices
|
| 42 |
+
(r'b\{[01]+\}', Literal),
|
| 43 |
+
(r'x\{[0-9a-fA-F_]+\}', Literal),
|
| 44 |
+
|
| 45 |
+
# byte literal
|
| 46 |
+
(r'B\{[0-9a-fA-F_]+\}', Literal),
|
| 47 |
+
|
| 48 |
+
# treat anything as word
|
| 49 |
+
(r'\S+', Name)
|
| 50 |
+
],
|
| 51 |
+
|
| 52 |
+
'string': [
|
| 53 |
+
(r'\\.', String.Escape),
|
| 54 |
+
(r'\"', String, '#pop'),
|
| 55 |
+
(r'[^\"\r\n\\]+', String)
|
| 56 |
+
],
|
| 57 |
+
|
| 58 |
+
'comments': [
|
| 59 |
+
(r'//.*', Comment.Singleline),
|
| 60 |
+
(r'/\*', Comment.Multiline, 'comment'),
|
| 61 |
+
],
|
| 62 |
+
'comment': [
|
| 63 |
+
(r'[^/*]+', Comment.Multiline),
|
| 64 |
+
(r'/\*', Comment.Multiline, '#push'),
|
| 65 |
+
(r'\*/', Comment.Multiline, '#pop'),
|
| 66 |
+
(r'[*/]', Comment.Multiline),
|
| 67 |
+
],
|
| 68 |
+
}
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/floscript.py
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.floscript
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexer for FloScript
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
from pygments.lexer import RegexLexer, include, bygroups
|
| 12 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 13 |
+
Number, Punctuation, Whitespace
|
| 14 |
+
|
| 15 |
+
__all__ = ['FloScriptLexer']
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
class FloScriptLexer(RegexLexer):
|
| 19 |
+
"""
|
| 20 |
+
For FloScript configuration language source code.
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
name = 'FloScript'
|
| 24 |
+
url = 'https://github.com/ioflo/ioflo'
|
| 25 |
+
aliases = ['floscript', 'flo']
|
| 26 |
+
filenames = ['*.flo']
|
| 27 |
+
version_added = '2.4'
|
| 28 |
+
|
| 29 |
+
def innerstring_rules(ttype):
|
| 30 |
+
return [
|
| 31 |
+
# the old style '%s' % (...) string formatting
|
| 32 |
+
(r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?'
|
| 33 |
+
'[hlL]?[E-GXc-giorsux%]', String.Interpol),
|
| 34 |
+
# backslashes, quotes and formatting signs must be parsed one at a time
|
| 35 |
+
(r'[^\\\'"%\n]+', ttype),
|
| 36 |
+
(r'[\'"\\]', ttype),
|
| 37 |
+
# unhandled string formatting sign
|
| 38 |
+
(r'%', ttype),
|
| 39 |
+
# newlines are an error (use "nl" state)
|
| 40 |
+
]
|
| 41 |
+
|
| 42 |
+
tokens = {
|
| 43 |
+
'root': [
|
| 44 |
+
(r'\s+', Whitespace),
|
| 45 |
+
|
| 46 |
+
(r'[]{}:(),;[]', Punctuation),
|
| 47 |
+
(r'(\\)(\n)', bygroups(Text, Whitespace)),
|
| 48 |
+
(r'\\', Text),
|
| 49 |
+
(r'(to|by|with|from|per|for|cum|qua|via|as|at|in|of|on|re|is|if|be|into|'
|
| 50 |
+
r'and|not)\b', Operator.Word),
|
| 51 |
+
(r'!=|==|<<|>>|[-~+/*%=<>&^|.]', Operator),
|
| 52 |
+
(r'(load|init|server|logger|log|loggee|first|over|under|next|done|timeout|'
|
| 53 |
+
r'repeat|native|benter|enter|recur|exit|precur|renter|rexit|print|put|inc|'
|
| 54 |
+
r'copy|set|aux|rear|raze|go|let|do|bid|ready|start|stop|run|abort|use|flo|'
|
| 55 |
+
r'give|take)\b', Name.Builtin),
|
| 56 |
+
(r'(frame|framer|house)\b', Keyword),
|
| 57 |
+
('"', String, 'string'),
|
| 58 |
+
|
| 59 |
+
include('name'),
|
| 60 |
+
include('numbers'),
|
| 61 |
+
(r'#.+$', Comment.Single),
|
| 62 |
+
],
|
| 63 |
+
'string': [
|
| 64 |
+
('[^"]+', String),
|
| 65 |
+
('"', String, '#pop'),
|
| 66 |
+
],
|
| 67 |
+
'numbers': [
|
| 68 |
+
(r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?', Number.Float),
|
| 69 |
+
(r'\d+[eE][+-]?[0-9]+j?', Number.Float),
|
| 70 |
+
(r'0[0-7]+j?', Number.Oct),
|
| 71 |
+
(r'0[bB][01]+', Number.Bin),
|
| 72 |
+
(r'0[xX][a-fA-F0-9]+', Number.Hex),
|
| 73 |
+
(r'\d+L', Number.Integer.Long),
|
| 74 |
+
(r'\d+j?', Number.Integer)
|
| 75 |
+
],
|
| 76 |
+
|
| 77 |
+
'name': [
|
| 78 |
+
(r'@[\w.]+', Name.Decorator),
|
| 79 |
+
(r'[a-zA-Z_]\w*', Name),
|
| 80 |
+
],
|
| 81 |
+
}
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/func.py
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.func
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexers for FunC.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
from pygments.lexer import RegexLexer, include, words
|
| 12 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 13 |
+
Number, Whitespace, Punctuation
|
| 14 |
+
|
| 15 |
+
__all__ = ['FuncLexer']
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
class FuncLexer(RegexLexer):
|
| 19 |
+
"""
|
| 20 |
+
For FunC source code.
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
name = 'FunC'
|
| 24 |
+
aliases = ['func', 'fc']
|
| 25 |
+
filenames = ['*.fc', '*.func']
|
| 26 |
+
url = 'https://docs.ton.org/develop/func/overview'
|
| 27 |
+
version_added = ''
|
| 28 |
+
|
| 29 |
+
# 1. Does not start from "
|
| 30 |
+
# 2. Can start from ` and end with `, containing any character
|
| 31 |
+
# 3. Starts with underscore or { or } and have more than 1 character after it
|
| 32 |
+
# 4. Starts with letter, contains letters, numbers and underscores
|
| 33 |
+
identifier = r'(?!")(`([^`]+)`|((?=_)_|(?=\{)\{|(?=\})\}|(?![_`{}]))([^;,\[\]\(\)\s~.]+))'
|
| 34 |
+
|
| 35 |
+
tokens = {
|
| 36 |
+
'root': [
|
| 37 |
+
(r'\n', Whitespace),
|
| 38 |
+
(r'\s+', Whitespace),
|
| 39 |
+
|
| 40 |
+
include('keywords'),
|
| 41 |
+
include('strings'),
|
| 42 |
+
include('directives'),
|
| 43 |
+
include('numeric'),
|
| 44 |
+
include('comments'),
|
| 45 |
+
include('storage'),
|
| 46 |
+
include('functions'),
|
| 47 |
+
include('variables'),
|
| 48 |
+
|
| 49 |
+
(r'[.;(),\[\]~{}]', Punctuation)
|
| 50 |
+
],
|
| 51 |
+
'keywords': [
|
| 52 |
+
(words((
|
| 53 |
+
'<=>', '>=', '<=', '!=', '==', '^>>', '~>>',
|
| 54 |
+
'>>', '<<', '/%', '^%', '~%', '^/', '~/', '+=',
|
| 55 |
+
'-=', '*=', '/=', '~/=', '^/=', '%=', '^%=', '<<=',
|
| 56 |
+
'>>=', '~>>=', '^>>=', '&=', '|=', '^=', '^', '=',
|
| 57 |
+
'~', '/', '%', '-', '*', '+','>',
|
| 58 |
+
'<', '&', '|', ':', '?'), prefix=r'(?<=\s)', suffix=r'(?=\s)'),
|
| 59 |
+
Operator),
|
| 60 |
+
(words((
|
| 61 |
+
'if', 'ifnot',
|
| 62 |
+
'else', 'elseif', 'elseifnot',
|
| 63 |
+
'while', 'do', 'until', 'repeat',
|
| 64 |
+
'return', 'impure', 'method_id',
|
| 65 |
+
'forall', 'asm', 'inline', 'inline_ref'), prefix=r'\b', suffix=r'\b'),
|
| 66 |
+
Keyword),
|
| 67 |
+
(words(('true', 'false'), prefix=r'\b', suffix=r'\b'), Keyword.Constant),
|
| 68 |
+
],
|
| 69 |
+
'directives': [
|
| 70 |
+
(r'#include|#pragma', Keyword, 'directive'),
|
| 71 |
+
],
|
| 72 |
+
'directive': [
|
| 73 |
+
include('strings'),
|
| 74 |
+
(r'\s+', Whitespace),
|
| 75 |
+
(r'version|not-version', Keyword),
|
| 76 |
+
(r'(>=|<=|=|>|<|\^)?([0-9]+)(.[0-9]+)?(.[0-9]+)?', Number), # version
|
| 77 |
+
(r';', Text, '#pop')
|
| 78 |
+
],
|
| 79 |
+
'strings': [
|
| 80 |
+
(r'\"([^\n\"]+)\"[Hhcusa]?', String),
|
| 81 |
+
],
|
| 82 |
+
'numeric': [
|
| 83 |
+
(r'\b(-?(?!_)([\d_]+|0x[\d_a-fA-F]+)|0b[1_0]+)(?<!_)(?=[\s\)\],;])', Number)
|
| 84 |
+
],
|
| 85 |
+
'comments': [
|
| 86 |
+
(r';;([^\n]*)', Comment.Singleline),
|
| 87 |
+
(r'\{-', Comment.Multiline, 'comment'),
|
| 88 |
+
],
|
| 89 |
+
'comment': [
|
| 90 |
+
(r'[^-}{]+', Comment.Multiline),
|
| 91 |
+
(r'\{-', Comment.Multiline, '#push'),
|
| 92 |
+
(r'-\}', Comment.Multiline, '#pop'),
|
| 93 |
+
(r'[-}{]', Comment.Multiline),
|
| 94 |
+
],
|
| 95 |
+
'storage': [
|
| 96 |
+
(words((
|
| 97 |
+
'var', 'int', 'slice', 'tuple',
|
| 98 |
+
'cell', 'builder', 'cont', '_'),
|
| 99 |
+
prefix=r'\b', suffix=r'(?=[\s\(\),\[\]])'),
|
| 100 |
+
Keyword.Type),
|
| 101 |
+
(words(('global', 'const'), prefix=r'\b', suffix=r'\b'), Keyword.Constant),
|
| 102 |
+
],
|
| 103 |
+
'variables': [
|
| 104 |
+
(identifier, Name.Variable),
|
| 105 |
+
],
|
| 106 |
+
'functions': [
|
| 107 |
+
# identifier followed by (
|
| 108 |
+
(identifier + r'(?=[\(])', Name.Function),
|
| 109 |
+
]
|
| 110 |
+
}
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/graphviz.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.graphviz
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexer for the DOT language (graphviz).
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
from pygments.lexer import RegexLexer, bygroups
|
| 12 |
+
from pygments.token import Comment, Keyword, Operator, Name, String, Number, \
|
| 13 |
+
Punctuation, Whitespace
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
__all__ = ['GraphvizLexer']
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class GraphvizLexer(RegexLexer):
|
| 20 |
+
"""
|
| 21 |
+
For graphviz DOT graph description language.
|
| 22 |
+
"""
|
| 23 |
+
name = 'Graphviz'
|
| 24 |
+
url = 'https://www.graphviz.org/doc/info/lang.html'
|
| 25 |
+
aliases = ['graphviz', 'dot']
|
| 26 |
+
filenames = ['*.gv', '*.dot']
|
| 27 |
+
mimetypes = ['text/x-graphviz', 'text/vnd.graphviz']
|
| 28 |
+
version_added = '2.8'
|
| 29 |
+
tokens = {
|
| 30 |
+
'root': [
|
| 31 |
+
(r'\s+', Whitespace),
|
| 32 |
+
(r'(#|//).*?$', Comment.Single),
|
| 33 |
+
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
|
| 34 |
+
(r'(?i)(node|edge|graph|digraph|subgraph|strict)\b', Keyword),
|
| 35 |
+
(r'--|->', Operator),
|
| 36 |
+
(r'[{}[\]:;,]', Punctuation),
|
| 37 |
+
(r'(\b\D\w*)(\s*)(=)(\s*)',
|
| 38 |
+
bygroups(Name.Attribute, Whitespace, Punctuation, Whitespace),
|
| 39 |
+
'attr_id'),
|
| 40 |
+
(r'\b(n|ne|e|se|s|sw|w|nw|c|_)\b', Name.Builtin),
|
| 41 |
+
(r'\b\D\w*', Name.Tag), # node
|
| 42 |
+
(r'[-]?((\.[0-9]+)|([0-9]+(\.[0-9]*)?))', Number),
|
| 43 |
+
(r'"(\\"|[^"])*?"', Name.Tag), # quoted node
|
| 44 |
+
(r'<', Punctuation, 'xml'),
|
| 45 |
+
],
|
| 46 |
+
'attr_id': [
|
| 47 |
+
(r'\b\D\w*', String, '#pop'),
|
| 48 |
+
(r'[-]?((\.[0-9]+)|([0-9]+(\.[0-9]*)?))', Number, '#pop'),
|
| 49 |
+
(r'"(\\"|[^"])*?"', String.Double, '#pop'),
|
| 50 |
+
(r'<', Punctuation, ('#pop', 'xml')),
|
| 51 |
+
],
|
| 52 |
+
'xml': [
|
| 53 |
+
(r'<', Punctuation, '#push'),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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.html
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexers for HTML, XML and related markup.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
import re
|
| 12 |
+
|
| 13 |
+
from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, bygroups, \
|
| 14 |
+
default, using, inherit, this
|
| 15 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 16 |
+
Punctuation, Whitespace
|
| 17 |
+
from pygments.util import looks_like_xml, html_doctype_matches
|
| 18 |
+
|
| 19 |
+
from pygments.lexers.javascript import JavascriptLexer
|
| 20 |
+
from pygments.lexers.jvm import ScalaLexer
|
| 21 |
+
from pygments.lexers.css import CssLexer, _indentation, _starts_block
|
| 22 |
+
from pygments.lexers.ruby import RubyLexer
|
| 23 |
+
|
| 24 |
+
__all__ = ['HtmlLexer', 'DtdLexer', 'XmlLexer', 'XsltLexer', 'HamlLexer',
|
| 25 |
+
'ScamlLexer', 'PugLexer', 'VueLexer', 'UrlEncodedLexer']
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class HtmlLexer(RegexLexer):
|
| 29 |
+
"""
|
| 30 |
+
For HTML 4 and XHTML 1 markup. Nested JavaScript and CSS is highlighted
|
| 31 |
+
by the appropriate lexer.
|
| 32 |
+
"""
|
| 33 |
+
|
| 34 |
+
name = 'HTML'
|
| 35 |
+
url = 'https://html.spec.whatwg.org/'
|
| 36 |
+
aliases = ['html']
|
| 37 |
+
filenames = ['*.html', '*.htm', '*.xhtml', '*.xslt']
|
| 38 |
+
mimetypes = ['text/html', 'application/xhtml+xml']
|
| 39 |
+
version_added = ''
|
| 40 |
+
|
| 41 |
+
flags = re.IGNORECASE | re.DOTALL
|
| 42 |
+
tokens = {
|
| 43 |
+
'root': [
|
| 44 |
+
('[^<&]+', Text),
|
| 45 |
+
(r'&\S*?;', Name.Entity),
|
| 46 |
+
(r'\<\!\[CDATA\[.*?\]\]\>', Comment.Preproc),
|
| 47 |
+
(r'<!--.*?-->', Comment.Multiline),
|
| 48 |
+
(r'<\?.*?\?>', Comment.Preproc),
|
| 49 |
+
('<![^>]*>', Comment.Preproc),
|
| 50 |
+
(r'(<)(\s*)(script)(\s*)',
|
| 51 |
+
bygroups(Punctuation, Text, Name.Tag, Text),
|
| 52 |
+
('script-content', 'tag')),
|
| 53 |
+
(r'(<)(\s*)(style)(\s*)',
|
| 54 |
+
bygroups(Punctuation, Text, Name.Tag, Text),
|
| 55 |
+
('style-content', 'tag')),
|
| 56 |
+
# note: this allows tag names not used in HTML like <x:with-dash>,
|
| 57 |
+
# this is to support yet-unknown template engines and the like
|
| 58 |
+
(r'(<)(\s*)([\w:.-]+)',
|
| 59 |
+
bygroups(Punctuation, Text, Name.Tag), 'tag'),
|
| 60 |
+
(r'(<)(\s*)(/)(\s*)([\w:.-]+)(\s*)(>)',
|
| 61 |
+
bygroups(Punctuation, Text, Punctuation, Text, Name.Tag, Text,
|
| 62 |
+
Punctuation)),
|
| 63 |
+
],
|
| 64 |
+
'tag': [
|
| 65 |
+
(r'\s+', Text),
|
| 66 |
+
(r'([\w:-]+\s*)(=)(\s*)', bygroups(Name.Attribute, Operator, Text),
|
| 67 |
+
'attr'),
|
| 68 |
+
(r'[\w:-]+', Name.Attribute),
|
| 69 |
+
(r'(/?)(\s*)(>)', bygroups(Punctuation, Text, Punctuation), '#pop'),
|
| 70 |
+
],
|
| 71 |
+
'script-content': [
|
| 72 |
+
(r'(<)(\s*)(/)(\s*)(script)(\s*)(>)',
|
| 73 |
+
bygroups(Punctuation, Text, Punctuation, Text, Name.Tag, Text,
|
| 74 |
+
Punctuation), '#pop'),
|
| 75 |
+
(r'.+?(?=<\s*/\s*script\s*>)', using(JavascriptLexer)),
|
| 76 |
+
# fallback cases for when there is no closing script tag
|
| 77 |
+
# first look for newline and then go back into root state
|
| 78 |
+
# if that fails just read the rest of the file
|
| 79 |
+
# this is similar to the error handling logic in lexer.py
|
| 80 |
+
(r'.+?\n', using(JavascriptLexer), '#pop'),
|
| 81 |
+
(r'.+', using(JavascriptLexer), '#pop'),
|
| 82 |
+
],
|
| 83 |
+
'style-content': [
|
| 84 |
+
(r'(<)(\s*)(/)(\s*)(style)(\s*)(>)',
|
| 85 |
+
bygroups(Punctuation, Text, Punctuation, Text, Name.Tag, Text,
|
| 86 |
+
Punctuation),'#pop'),
|
| 87 |
+
(r'.+?(?=<\s*/\s*style\s*>)', using(CssLexer)),
|
| 88 |
+
# fallback cases for when there is no closing style tag
|
| 89 |
+
# first look for newline and then go back into root state
|
| 90 |
+
# if that fails just read the rest of the file
|
| 91 |
+
# this is similar to the error handling logic in lexer.py
|
| 92 |
+
(r'.+?\n', using(CssLexer), '#pop'),
|
| 93 |
+
(r'.+', using(CssLexer), '#pop'),
|
| 94 |
+
],
|
| 95 |
+
'attr': [
|
| 96 |
+
('".*?"', String, '#pop'),
|
| 97 |
+
("'.*?'", String, '#pop'),
|
| 98 |
+
(r'[^\s>]+', String, '#pop'),
|
| 99 |
+
],
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
def analyse_text(text):
|
| 103 |
+
if html_doctype_matches(text):
|
| 104 |
+
return 0.5
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
class DtdLexer(RegexLexer):
|
| 108 |
+
"""
|
| 109 |
+
A lexer for DTDs (Document Type Definitions).
|
| 110 |
+
"""
|
| 111 |
+
|
| 112 |
+
flags = re.MULTILINE | re.DOTALL
|
| 113 |
+
|
| 114 |
+
name = 'DTD'
|
| 115 |
+
aliases = ['dtd']
|
| 116 |
+
filenames = ['*.dtd']
|
| 117 |
+
mimetypes = ['application/xml-dtd']
|
| 118 |
+
url = 'https://en.wikipedia.org/wiki/Document_type_definition'
|
| 119 |
+
version_added = '1.5'
|
| 120 |
+
|
| 121 |
+
tokens = {
|
| 122 |
+
'root': [
|
| 123 |
+
include('common'),
|
| 124 |
+
|
| 125 |
+
(r'(<!ELEMENT)(\s+)(\S+)',
|
| 126 |
+
bygroups(Keyword, Text, Name.Tag), 'element'),
|
| 127 |
+
(r'(<!ATTLIST)(\s+)(\S+)',
|
| 128 |
+
bygroups(Keyword, Text, Name.Tag), 'attlist'),
|
| 129 |
+
(r'(<!ENTITY)(\s+)(\S+)',
|
| 130 |
+
bygroups(Keyword, Text, Name.Entity), 'entity'),
|
| 131 |
+
(r'(<!NOTATION)(\s+)(\S+)',
|
| 132 |
+
bygroups(Keyword, Text, Name.Tag), 'notation'),
|
| 133 |
+
(r'(<!\[)([^\[\s]+)(\s*)(\[)', # conditional sections
|
| 134 |
+
bygroups(Keyword, Name.Entity, Text, Keyword)),
|
| 135 |
+
|
| 136 |
+
(r'(<!DOCTYPE)(\s+)([^>\s]+)',
|
| 137 |
+
bygroups(Keyword, Text, Name.Tag)),
|
| 138 |
+
(r'PUBLIC|SYSTEM', Keyword.Constant),
|
| 139 |
+
(r'[\[\]>]', Keyword),
|
| 140 |
+
],
|
| 141 |
+
|
| 142 |
+
'common': [
|
| 143 |
+
(r'\s+', Text),
|
| 144 |
+
(r'(%|&)[^;]*;', Name.Entity),
|
| 145 |
+
('<!--', Comment, 'comment'),
|
| 146 |
+
(r'[(|)*,?+]', Operator),
|
| 147 |
+
(r'"[^"]*"', String.Double),
|
| 148 |
+
(r'\'[^\']*\'', String.Single),
|
| 149 |
+
],
|
| 150 |
+
|
| 151 |
+
'comment': [
|
| 152 |
+
('[^-]+', Comment),
|
| 153 |
+
('-->', Comment, '#pop'),
|
| 154 |
+
('-', Comment),
|
| 155 |
+
],
|
| 156 |
+
|
| 157 |
+
'element': [
|
| 158 |
+
include('common'),
|
| 159 |
+
(r'EMPTY|ANY|#PCDATA', Keyword.Constant),
|
| 160 |
+
(r'[^>\s|()?+*,]+', Name.Tag),
|
| 161 |
+
(r'>', Keyword, '#pop'),
|
| 162 |
+
],
|
| 163 |
+
|
| 164 |
+
'attlist': [
|
| 165 |
+
include('common'),
|
| 166 |
+
(r'CDATA|IDREFS|IDREF|ID|NMTOKENS|NMTOKEN|ENTITIES|ENTITY|NOTATION',
|
| 167 |
+
Keyword.Constant),
|
| 168 |
+
(r'#REQUIRED|#IMPLIED|#FIXED', Keyword.Constant),
|
| 169 |
+
(r'xml:space|xml:lang', Keyword.Reserved),
|
| 170 |
+
(r'[^>\s|()?+*,]+', Name.Attribute),
|
| 171 |
+
(r'>', Keyword, '#pop'),
|
| 172 |
+
],
|
| 173 |
+
|
| 174 |
+
'entity': [
|
| 175 |
+
include('common'),
|
| 176 |
+
(r'SYSTEM|PUBLIC|NDATA', Keyword.Constant),
|
| 177 |
+
(r'[^>\s|()?+*,]+', Name.Entity),
|
| 178 |
+
(r'>', Keyword, '#pop'),
|
| 179 |
+
],
|
| 180 |
+
|
| 181 |
+
'notation': [
|
| 182 |
+
include('common'),
|
| 183 |
+
(r'SYSTEM|PUBLIC', Keyword.Constant),
|
| 184 |
+
(r'[^>\s|()?+*,]+', Name.Attribute),
|
| 185 |
+
(r'>', Keyword, '#pop'),
|
| 186 |
+
],
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
def analyse_text(text):
|
| 190 |
+
if not looks_like_xml(text) and \
|
| 191 |
+
('<!ELEMENT' in text or '<!ATTLIST' in text or '<!ENTITY' in text):
|
| 192 |
+
return 0.8
|
| 193 |
+
|
| 194 |
+
|
| 195 |
+
class XmlLexer(RegexLexer):
|
| 196 |
+
"""
|
| 197 |
+
Generic lexer for XML (eXtensible Markup Language).
|
| 198 |
+
"""
|
| 199 |
+
|
| 200 |
+
flags = re.MULTILINE | re.DOTALL
|
| 201 |
+
|
| 202 |
+
name = 'XML'
|
| 203 |
+
aliases = ['xml']
|
| 204 |
+
filenames = ['*.xml', '*.xsl', '*.rss', '*.xslt', '*.xsd',
|
| 205 |
+
'*.wsdl', '*.wsf', '*.xbrl', '*.pom']
|
| 206 |
+
mimetypes = ['text/xml', 'application/xml', 'image/svg+xml',
|
| 207 |
+
'application/rss+xml', 'application/atom+xml']
|
| 208 |
+
url = 'https://www.w3.org/XML'
|
| 209 |
+
version_added = ''
|
| 210 |
+
|
| 211 |
+
tokens = {
|
| 212 |
+
'root': [
|
| 213 |
+
(r'[^<&\s]+', Text),
|
| 214 |
+
(r'[^<&\S]+', Whitespace),
|
| 215 |
+
(r'&\S*?;', Name.Entity),
|
| 216 |
+
(r'\<\!\[CDATA\[.*?\]\]\>', Comment.Preproc),
|
| 217 |
+
(r'<!--.*?-->', Comment.Multiline),
|
| 218 |
+
(r'<\?.*?\?>', Comment.Preproc),
|
| 219 |
+
('<![^>]*>', Comment.Preproc),
|
| 220 |
+
(r'<\s*[\w:.-]+', Name.Tag, 'tag'),
|
| 221 |
+
(r'<\s*/\s*[\w:.-]+\s*>', Name.Tag),
|
| 222 |
+
],
|
| 223 |
+
'tag': [
|
| 224 |
+
(r'\s+', Whitespace),
|
| 225 |
+
(r'[\w.:-]+\s*=', Name.Attribute, 'attr'),
|
| 226 |
+
(r'/?\s*>', Name.Tag, '#pop'),
|
| 227 |
+
],
|
| 228 |
+
'attr': [
|
| 229 |
+
(r'\s+', Whitespace),
|
| 230 |
+
('".*?"', String, '#pop'),
|
| 231 |
+
("'.*?'", String, '#pop'),
|
| 232 |
+
(r'[^\s>]+', String, '#pop'),
|
| 233 |
+
],
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
def analyse_text(text):
|
| 237 |
+
if looks_like_xml(text):
|
| 238 |
+
return 0.45 # less than HTML
|
| 239 |
+
|
| 240 |
+
|
| 241 |
+
class XsltLexer(XmlLexer):
|
| 242 |
+
"""
|
| 243 |
+
A lexer for XSLT.
|
| 244 |
+
"""
|
| 245 |
+
|
| 246 |
+
name = 'XSLT'
|
| 247 |
+
aliases = ['xslt']
|
| 248 |
+
filenames = ['*.xsl', '*.xslt', '*.xpl'] # xpl is XProc
|
| 249 |
+
mimetypes = ['application/xsl+xml', 'application/xslt+xml']
|
| 250 |
+
url = 'https://www.w3.org/TR/xslt-30'
|
| 251 |
+
version_added = '0.10'
|
| 252 |
+
|
| 253 |
+
EXTRA_KEYWORDS = {
|
| 254 |
+
'apply-imports', 'apply-templates', 'attribute',
|
| 255 |
+
'attribute-set', 'call-template', 'choose', 'comment',
|
| 256 |
+
'copy', 'copy-of', 'decimal-format', 'element', 'fallback',
|
| 257 |
+
'for-each', 'if', 'import', 'include', 'key', 'message',
|
| 258 |
+
'namespace-alias', 'number', 'otherwise', 'output', 'param',
|
| 259 |
+
'preserve-space', 'processing-instruction', 'sort',
|
| 260 |
+
'strip-space', 'stylesheet', 'template', 'text', 'transform',
|
| 261 |
+
'value-of', 'variable', 'when', 'with-param'
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
def get_tokens_unprocessed(self, text):
|
| 265 |
+
for index, token, value in XmlLexer.get_tokens_unprocessed(self, text):
|
| 266 |
+
m = re.match('</?xsl:([^>]*)/?>?', value)
|
| 267 |
+
|
| 268 |
+
if token is Name.Tag and m and m.group(1) in self.EXTRA_KEYWORDS:
|
| 269 |
+
yield index, Keyword, value
|
| 270 |
+
else:
|
| 271 |
+
yield index, token, value
|
| 272 |
+
|
| 273 |
+
def analyse_text(text):
|
| 274 |
+
if looks_like_xml(text) and '<xsl' in text:
|
| 275 |
+
return 0.8
|
| 276 |
+
|
| 277 |
+
|
| 278 |
+
class HamlLexer(ExtendedRegexLexer):
|
| 279 |
+
"""
|
| 280 |
+
For Haml markup.
|
| 281 |
+
"""
|
| 282 |
+
|
| 283 |
+
name = 'Haml'
|
| 284 |
+
aliases = ['haml']
|
| 285 |
+
filenames = ['*.haml']
|
| 286 |
+
mimetypes = ['text/x-haml']
|
| 287 |
+
url = 'https://haml.info'
|
| 288 |
+
version_added = '1.3'
|
| 289 |
+
|
| 290 |
+
flags = re.IGNORECASE
|
| 291 |
+
# Haml can include " |\n" anywhere,
|
| 292 |
+
# which is ignored and used to wrap long lines.
|
| 293 |
+
# To accommodate this, use this custom faux dot instead.
|
| 294 |
+
_dot = r'(?: \|\n(?=.* \|)|.)'
|
| 295 |
+
|
| 296 |
+
# In certain places, a comma at the end of the line
|
| 297 |
+
# allows line wrapping as well.
|
| 298 |
+
_comma_dot = r'(?:,\s*\n|' + _dot + ')'
|
| 299 |
+
tokens = {
|
| 300 |
+
'root': [
|
| 301 |
+
(r'[ \t]*\n', Text),
|
| 302 |
+
(r'[ \t]*', _indentation),
|
| 303 |
+
],
|
| 304 |
+
|
| 305 |
+
'css': [
|
| 306 |
+
(r'\.[\w:-]+', Name.Class, 'tag'),
|
| 307 |
+
(r'\#[\w:-]+', Name.Function, 'tag'),
|
| 308 |
+
],
|
| 309 |
+
|
| 310 |
+
'eval-or-plain': [
|
| 311 |
+
(r'[&!]?==', Punctuation, 'plain'),
|
| 312 |
+
(r'([&!]?[=~])(' + _comma_dot + r'*\n)',
|
| 313 |
+
bygroups(Punctuation, using(RubyLexer)),
|
| 314 |
+
'root'),
|
| 315 |
+
default('plain'),
|
| 316 |
+
],
|
| 317 |
+
|
| 318 |
+
'content': [
|
| 319 |
+
include('css'),
|
| 320 |
+
(r'%[\w:-]+', Name.Tag, 'tag'),
|
| 321 |
+
(r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'),
|
| 322 |
+
(r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)',
|
| 323 |
+
bygroups(Comment, Comment.Special, Comment),
|
| 324 |
+
'#pop'),
|
| 325 |
+
(r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'),
|
| 326 |
+
'#pop'),
|
| 327 |
+
(r'-#' + _dot + r'*\n', _starts_block(Comment.Preproc,
|
| 328 |
+
'haml-comment-block'), '#pop'),
|
| 329 |
+
(r'(-)(' + _comma_dot + r'*\n)',
|
| 330 |
+
bygroups(Punctuation, using(RubyLexer)),
|
| 331 |
+
'#pop'),
|
| 332 |
+
(r':' + _dot + r'*\n', _starts_block(Name.Decorator, 'filter-block'),
|
| 333 |
+
'#pop'),
|
| 334 |
+
include('eval-or-plain'),
|
| 335 |
+
],
|
| 336 |
+
|
| 337 |
+
'tag': [
|
| 338 |
+
include('css'),
|
| 339 |
+
(r'\{(,\n|' + _dot + r')*?\}', using(RubyLexer)),
|
| 340 |
+
(r'\[' + _dot + r'*?\]', using(RubyLexer)),
|
| 341 |
+
(r'\(', Text, 'html-attributes'),
|
| 342 |
+
(r'/[ \t]*\n', Punctuation, '#pop:2'),
|
| 343 |
+
(r'[<>]{1,2}(?=[ \t=])', Punctuation),
|
| 344 |
+
include('eval-or-plain'),
|
| 345 |
+
],
|
| 346 |
+
|
| 347 |
+
'plain': [
|
| 348 |
+
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text),
|
| 349 |
+
(r'(#\{)(' + _dot + r'*?)(\})',
|
| 350 |
+
bygroups(String.Interpol, using(RubyLexer), String.Interpol)),
|
| 351 |
+
(r'\n', Text, 'root'),
|
| 352 |
+
],
|
| 353 |
+
|
| 354 |
+
'html-attributes': [
|
| 355 |
+
(r'\s+', Text),
|
| 356 |
+
(r'[\w:-]+[ \t]*=', Name.Attribute, 'html-attribute-value'),
|
| 357 |
+
(r'[\w:-]+', Name.Attribute),
|
| 358 |
+
(r'\)', Text, '#pop'),
|
| 359 |
+
],
|
| 360 |
+
|
| 361 |
+
'html-attribute-value': [
|
| 362 |
+
(r'[ \t]+', Text),
|
| 363 |
+
(r'\w+', Name.Variable, '#pop'),
|
| 364 |
+
(r'@\w+', Name.Variable.Instance, '#pop'),
|
| 365 |
+
(r'\$\w+', Name.Variable.Global, '#pop'),
|
| 366 |
+
(r"'(\\\\|\\[^\\]|[^'\\\n])*'", String, '#pop'),
|
| 367 |
+
(r'"(\\\\|\\[^\\]|[^"\\\n])*"', String, '#pop'),
|
| 368 |
+
],
|
| 369 |
+
|
| 370 |
+
'html-comment-block': [
|
| 371 |
+
(_dot + '+', Comment),
|
| 372 |
+
(r'\n', Text, 'root'),
|
| 373 |
+
],
|
| 374 |
+
|
| 375 |
+
'haml-comment-block': [
|
| 376 |
+
(_dot + '+', Comment.Preproc),
|
| 377 |
+
(r'\n', Text, 'root'),
|
| 378 |
+
],
|
| 379 |
+
|
| 380 |
+
'filter-block': [
|
| 381 |
+
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator),
|
| 382 |
+
(r'(#\{)(' + _dot + r'*?)(\})',
|
| 383 |
+
bygroups(String.Interpol, using(RubyLexer), String.Interpol)),
|
| 384 |
+
(r'\n', Text, 'root'),
|
| 385 |
+
],
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
|
| 389 |
+
class ScamlLexer(ExtendedRegexLexer):
|
| 390 |
+
"""
|
| 391 |
+
For Scaml markup. Scaml is Haml for Scala.
|
| 392 |
+
"""
|
| 393 |
+
|
| 394 |
+
name = 'Scaml'
|
| 395 |
+
aliases = ['scaml']
|
| 396 |
+
filenames = ['*.scaml']
|
| 397 |
+
mimetypes = ['text/x-scaml']
|
| 398 |
+
url = 'https://scalate.github.io/scalate/'
|
| 399 |
+
version_added = '1.4'
|
| 400 |
+
|
| 401 |
+
flags = re.IGNORECASE
|
| 402 |
+
# Scaml does not yet support the " |\n" notation to
|
| 403 |
+
# wrap long lines. Once it does, use the custom faux
|
| 404 |
+
# dot instead.
|
| 405 |
+
# _dot = r'(?: \|\n(?=.* \|)|.)'
|
| 406 |
+
_dot = r'.'
|
| 407 |
+
|
| 408 |
+
tokens = {
|
| 409 |
+
'root': [
|
| 410 |
+
(r'[ \t]*\n', Text),
|
| 411 |
+
(r'[ \t]*', _indentation),
|
| 412 |
+
],
|
| 413 |
+
|
| 414 |
+
'css': [
|
| 415 |
+
(r'\.[\w:-]+', Name.Class, 'tag'),
|
| 416 |
+
(r'\#[\w:-]+', Name.Function, 'tag'),
|
| 417 |
+
],
|
| 418 |
+
|
| 419 |
+
'eval-or-plain': [
|
| 420 |
+
(r'[&!]?==', Punctuation, 'plain'),
|
| 421 |
+
(r'([&!]?[=~])(' + _dot + r'*\n)',
|
| 422 |
+
bygroups(Punctuation, using(ScalaLexer)),
|
| 423 |
+
'root'),
|
| 424 |
+
default('plain'),
|
| 425 |
+
],
|
| 426 |
+
|
| 427 |
+
'content': [
|
| 428 |
+
include('css'),
|
| 429 |
+
(r'%[\w:-]+', Name.Tag, 'tag'),
|
| 430 |
+
(r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'),
|
| 431 |
+
(r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)',
|
| 432 |
+
bygroups(Comment, Comment.Special, Comment),
|
| 433 |
+
'#pop'),
|
| 434 |
+
(r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'),
|
| 435 |
+
'#pop'),
|
| 436 |
+
(r'-#' + _dot + r'*\n', _starts_block(Comment.Preproc,
|
| 437 |
+
'scaml-comment-block'), '#pop'),
|
| 438 |
+
(r'(-@\s*)(import)?(' + _dot + r'*\n)',
|
| 439 |
+
bygroups(Punctuation, Keyword, using(ScalaLexer)),
|
| 440 |
+
'#pop'),
|
| 441 |
+
(r'(-)(' + _dot + r'*\n)',
|
| 442 |
+
bygroups(Punctuation, using(ScalaLexer)),
|
| 443 |
+
'#pop'),
|
| 444 |
+
(r':' + _dot + r'*\n', _starts_block(Name.Decorator, 'filter-block'),
|
| 445 |
+
'#pop'),
|
| 446 |
+
include('eval-or-plain'),
|
| 447 |
+
],
|
| 448 |
+
|
| 449 |
+
'tag': [
|
| 450 |
+
include('css'),
|
| 451 |
+
(r'\{(,\n|' + _dot + r')*?\}', using(ScalaLexer)),
|
| 452 |
+
(r'\[' + _dot + r'*?\]', using(ScalaLexer)),
|
| 453 |
+
(r'\(', Text, 'html-attributes'),
|
| 454 |
+
(r'/[ \t]*\n', Punctuation, '#pop:2'),
|
| 455 |
+
(r'[<>]{1,2}(?=[ \t=])', Punctuation),
|
| 456 |
+
include('eval-or-plain'),
|
| 457 |
+
],
|
| 458 |
+
|
| 459 |
+
'plain': [
|
| 460 |
+
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text),
|
| 461 |
+
(r'(#\{)(' + _dot + r'*?)(\})',
|
| 462 |
+
bygroups(String.Interpol, using(ScalaLexer), String.Interpol)),
|
| 463 |
+
(r'\n', Text, 'root'),
|
| 464 |
+
],
|
| 465 |
+
|
| 466 |
+
'html-attributes': [
|
| 467 |
+
(r'\s+', Text),
|
| 468 |
+
(r'[\w:-]+[ \t]*=', Name.Attribute, 'html-attribute-value'),
|
| 469 |
+
(r'[\w:-]+', Name.Attribute),
|
| 470 |
+
(r'\)', Text, '#pop'),
|
| 471 |
+
],
|
| 472 |
+
|
| 473 |
+
'html-attribute-value': [
|
| 474 |
+
(r'[ \t]+', Text),
|
| 475 |
+
(r'\w+', Name.Variable, '#pop'),
|
| 476 |
+
(r'@\w+', Name.Variable.Instance, '#pop'),
|
| 477 |
+
(r'\$\w+', Name.Variable.Global, '#pop'),
|
| 478 |
+
(r"'(\\\\|\\[^\\]|[^'\\\n])*'", String, '#pop'),
|
| 479 |
+
(r'"(\\\\|\\[^\\]|[^"\\\n])*"', String, '#pop'),
|
| 480 |
+
],
|
| 481 |
+
|
| 482 |
+
'html-comment-block': [
|
| 483 |
+
(_dot + '+', Comment),
|
| 484 |
+
(r'\n', Text, 'root'),
|
| 485 |
+
],
|
| 486 |
+
|
| 487 |
+
'scaml-comment-block': [
|
| 488 |
+
(_dot + '+', Comment.Preproc),
|
| 489 |
+
(r'\n', Text, 'root'),
|
| 490 |
+
],
|
| 491 |
+
|
| 492 |
+
'filter-block': [
|
| 493 |
+
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator),
|
| 494 |
+
(r'(#\{)(' + _dot + r'*?)(\})',
|
| 495 |
+
bygroups(String.Interpol, using(ScalaLexer), String.Interpol)),
|
| 496 |
+
(r'\n', Text, 'root'),
|
| 497 |
+
],
|
| 498 |
+
}
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
class PugLexer(ExtendedRegexLexer):
|
| 502 |
+
"""
|
| 503 |
+
For Pug markup.
|
| 504 |
+
Pug is a variant of Scaml, see:
|
| 505 |
+
http://scalate.fusesource.org/documentation/scaml-reference.html
|
| 506 |
+
"""
|
| 507 |
+
|
| 508 |
+
name = 'Pug'
|
| 509 |
+
aliases = ['pug', 'jade']
|
| 510 |
+
filenames = ['*.pug', '*.jade']
|
| 511 |
+
mimetypes = ['text/x-pug', 'text/x-jade']
|
| 512 |
+
url = 'https://pugjs.org'
|
| 513 |
+
version_added = '1.4'
|
| 514 |
+
|
| 515 |
+
flags = re.IGNORECASE
|
| 516 |
+
_dot = r'.'
|
| 517 |
+
|
| 518 |
+
tokens = {
|
| 519 |
+
'root': [
|
| 520 |
+
(r'[ \t]*\n', Text),
|
| 521 |
+
(r'[ \t]*', _indentation),
|
| 522 |
+
],
|
| 523 |
+
|
| 524 |
+
'css': [
|
| 525 |
+
(r'\.[\w:-]+', Name.Class, 'tag'),
|
| 526 |
+
(r'\#[\w:-]+', Name.Function, 'tag'),
|
| 527 |
+
],
|
| 528 |
+
|
| 529 |
+
'eval-or-plain': [
|
| 530 |
+
(r'[&!]?==', Punctuation, 'plain'),
|
| 531 |
+
(r'([&!]?[=~])(' + _dot + r'*\n)',
|
| 532 |
+
bygroups(Punctuation, using(ScalaLexer)), 'root'),
|
| 533 |
+
default('plain'),
|
| 534 |
+
],
|
| 535 |
+
|
| 536 |
+
'content': [
|
| 537 |
+
include('css'),
|
| 538 |
+
(r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'),
|
| 539 |
+
(r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)',
|
| 540 |
+
bygroups(Comment, Comment.Special, Comment),
|
| 541 |
+
'#pop'),
|
| 542 |
+
(r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'),
|
| 543 |
+
'#pop'),
|
| 544 |
+
(r'-#' + _dot + r'*\n', _starts_block(Comment.Preproc,
|
| 545 |
+
'scaml-comment-block'), '#pop'),
|
| 546 |
+
(r'(-@\s*)(import)?(' + _dot + r'*\n)',
|
| 547 |
+
bygroups(Punctuation, Keyword, using(ScalaLexer)),
|
| 548 |
+
'#pop'),
|
| 549 |
+
(r'(-)(' + _dot + r'*\n)',
|
| 550 |
+
bygroups(Punctuation, using(ScalaLexer)),
|
| 551 |
+
'#pop'),
|
| 552 |
+
(r':' + _dot + r'*\n', _starts_block(Name.Decorator, 'filter-block'),
|
| 553 |
+
'#pop'),
|
| 554 |
+
(r'[\w:-]+', Name.Tag, 'tag'),
|
| 555 |
+
(r'\|', Text, 'eval-or-plain'),
|
| 556 |
+
],
|
| 557 |
+
|
| 558 |
+
'tag': [
|
| 559 |
+
include('css'),
|
| 560 |
+
(r'\{(,\n|' + _dot + r')*?\}', using(ScalaLexer)),
|
| 561 |
+
(r'\[' + _dot + r'*?\]', using(ScalaLexer)),
|
| 562 |
+
(r'\(', Text, 'html-attributes'),
|
| 563 |
+
(r'/[ \t]*\n', Punctuation, '#pop:2'),
|
| 564 |
+
(r'[<>]{1,2}(?=[ \t=])', Punctuation),
|
| 565 |
+
include('eval-or-plain'),
|
| 566 |
+
],
|
| 567 |
+
|
| 568 |
+
'plain': [
|
| 569 |
+
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text),
|
| 570 |
+
(r'(#\{)(' + _dot + r'*?)(\})',
|
| 571 |
+
bygroups(String.Interpol, using(ScalaLexer), String.Interpol)),
|
| 572 |
+
(r'\n', Text, 'root'),
|
| 573 |
+
],
|
| 574 |
+
|
| 575 |
+
'html-attributes': [
|
| 576 |
+
(r'\s+', Text),
|
| 577 |
+
(r'[\w:-]+[ \t]*=', Name.Attribute, 'html-attribute-value'),
|
| 578 |
+
(r'[\w:-]+', Name.Attribute),
|
| 579 |
+
(r'\)', Text, '#pop'),
|
| 580 |
+
],
|
| 581 |
+
|
| 582 |
+
'html-attribute-value': [
|
| 583 |
+
(r'[ \t]+', Text),
|
| 584 |
+
(r'\w+', Name.Variable, '#pop'),
|
| 585 |
+
(r'@\w+', Name.Variable.Instance, '#pop'),
|
| 586 |
+
(r'\$\w+', Name.Variable.Global, '#pop'),
|
| 587 |
+
(r"'(\\\\|\\[^\\]|[^'\\\n])*'", String, '#pop'),
|
| 588 |
+
(r'"(\\\\|\\[^\\]|[^"\\\n])*"', String, '#pop'),
|
| 589 |
+
],
|
| 590 |
+
|
| 591 |
+
'html-comment-block': [
|
| 592 |
+
(_dot + '+', Comment),
|
| 593 |
+
(r'\n', Text, 'root'),
|
| 594 |
+
],
|
| 595 |
+
|
| 596 |
+
'scaml-comment-block': [
|
| 597 |
+
(_dot + '+', Comment.Preproc),
|
| 598 |
+
(r'\n', Text, 'root'),
|
| 599 |
+
],
|
| 600 |
+
|
| 601 |
+
'filter-block': [
|
| 602 |
+
(r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator),
|
| 603 |
+
(r'(#\{)(' + _dot + r'*?)(\})',
|
| 604 |
+
bygroups(String.Interpol, using(ScalaLexer), String.Interpol)),
|
| 605 |
+
(r'\n', Text, 'root'),
|
| 606 |
+
],
|
| 607 |
+
}
|
| 608 |
+
JadeLexer = PugLexer # compat
|
| 609 |
+
|
| 610 |
+
|
| 611 |
+
class UrlEncodedLexer(RegexLexer):
|
| 612 |
+
"""
|
| 613 |
+
Lexer for urlencoded data
|
| 614 |
+
"""
|
| 615 |
+
|
| 616 |
+
name = 'urlencoded'
|
| 617 |
+
aliases = ['urlencoded']
|
| 618 |
+
mimetypes = ['application/x-www-form-urlencoded']
|
| 619 |
+
url = 'https://en.wikipedia.org/wiki/Percent-encoding'
|
| 620 |
+
version_added = '2.16'
|
| 621 |
+
|
| 622 |
+
tokens = {
|
| 623 |
+
'root': [
|
| 624 |
+
('([^&=]*)(=)([^=&]*)(&?)', bygroups(Name.Tag, Operator, String, Punctuation)),
|
| 625 |
+
],
|
| 626 |
+
}
|
| 627 |
+
|
| 628 |
+
|
| 629 |
+
class VueLexer(HtmlLexer):
|
| 630 |
+
"""
|
| 631 |
+
For Vue Single-File Component.
|
| 632 |
+
"""
|
| 633 |
+
|
| 634 |
+
name = 'Vue'
|
| 635 |
+
url = 'https://vuejs.org/api/sfc-spec.html'
|
| 636 |
+
aliases = ['vue']
|
| 637 |
+
filenames = ['*.vue']
|
| 638 |
+
mimetypes = []
|
| 639 |
+
version_added = '2.19'
|
| 640 |
+
|
| 641 |
+
flags = re.IGNORECASE | re.DOTALL
|
| 642 |
+
tokens = {
|
| 643 |
+
'root': [
|
| 644 |
+
(r'(\{\{)(.*?)(\}\})', bygroups(Comment.Preproc,
|
| 645 |
+
using(JavascriptLexer), Comment.Preproc)),
|
| 646 |
+
('[^<&{]+', Text),
|
| 647 |
+
inherit,
|
| 648 |
+
],
|
| 649 |
+
'tag': [
|
| 650 |
+
(r'\s+', Text),
|
| 651 |
+
(r'((?:[@:]|v-)(?:[.\w:-]|\[[^\]]*?\])+\s*)(=)(\s*)',
|
| 652 |
+
bygroups(using(this, state=['name']), Operator, Text),
|
| 653 |
+
'attr-directive'),
|
| 654 |
+
(r'([\w:-]+\s*)(=)(\s*)', bygroups(Name.Attribute, Operator, Text),
|
| 655 |
+
'attr'),
|
| 656 |
+
(r'[\w:-]+', Name.Attribute),
|
| 657 |
+
(r'(/?)(\s*)(>)', bygroups(Punctuation, Text, Punctuation), '#pop'),
|
| 658 |
+
],
|
| 659 |
+
'name': [
|
| 660 |
+
(r'[\w-]+', Name.Attribute),
|
| 661 |
+
(r'[:@.]', Punctuation),
|
| 662 |
+
(r'(\[)([^\]]*?)(\])', bygroups(Comment.Preproc,
|
| 663 |
+
using(JavascriptLexer), Comment.Preproc)),
|
| 664 |
+
],
|
| 665 |
+
'attr-directive': [
|
| 666 |
+
(r'(["\'])(.*?)(\1)', bygroups(String,
|
| 667 |
+
using(JavascriptLexer), String), '#pop'),
|
| 668 |
+
(r'[^\s>]+', using(JavascriptLexer), '#pop'),
|
| 669 |
+
],
|
| 670 |
+
}
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/inferno.py
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.inferno
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexers for Inferno os and all the related stuff.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
import re
|
| 12 |
+
|
| 13 |
+
from pygments.lexer import RegexLexer, include, bygroups, default
|
| 14 |
+
from pygments.token import Punctuation, Comment, Operator, Keyword, \
|
| 15 |
+
Name, String, Number, Whitespace
|
| 16 |
+
|
| 17 |
+
__all__ = ['LimboLexer']
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class LimboLexer(RegexLexer):
|
| 21 |
+
"""
|
| 22 |
+
Lexer for Limbo programming language
|
| 23 |
+
|
| 24 |
+
TODO:
|
| 25 |
+
- maybe implement better var declaration highlighting
|
| 26 |
+
- some simple syntax error highlighting
|
| 27 |
+
"""
|
| 28 |
+
name = 'Limbo'
|
| 29 |
+
url = 'http://www.vitanuova.com/inferno/limbo.html'
|
| 30 |
+
aliases = ['limbo']
|
| 31 |
+
filenames = ['*.b']
|
| 32 |
+
mimetypes = ['text/limbo']
|
| 33 |
+
version_added = '2.0'
|
| 34 |
+
|
| 35 |
+
tokens = {
|
| 36 |
+
'whitespace': [
|
| 37 |
+
(r'^(\s*)([a-zA-Z_]\w*:)(\s*\n)',
|
| 38 |
+
bygroups(Whitespace, Name.Label, Whitespace)),
|
| 39 |
+
(r'\n', Whitespace),
|
| 40 |
+
(r'\s+', Whitespace),
|
| 41 |
+
(r'#(\n|(.|\n)*?[^\\]\n)', Comment.Single),
|
| 42 |
+
],
|
| 43 |
+
'string': [
|
| 44 |
+
(r'"', String, '#pop'),
|
| 45 |
+
(r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|'
|
| 46 |
+
r'u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})', String.Escape),
|
| 47 |
+
(r'[^\\"\n]+', String), # all other characters
|
| 48 |
+
(r'\\', String), # stray backslash
|
| 49 |
+
],
|
| 50 |
+
'statements': [
|
| 51 |
+
(r'"', String, 'string'),
|
| 52 |
+
(r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char),
|
| 53 |
+
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float),
|
| 54 |
+
(r'(\d+\.\d*|\.\d+|\d+[fF])', Number.Float),
|
| 55 |
+
(r'16r[0-9a-fA-F]+', Number.Hex),
|
| 56 |
+
(r'8r[0-7]+', Number.Oct),
|
| 57 |
+
(r'((([1-3]\d)|([2-9]))r)?(\d+)', Number.Integer),
|
| 58 |
+
(r'[()\[\],.]', Punctuation),
|
| 59 |
+
(r'[~!%^&*+=|?:<>/-]|(->)|(<-)|(=>)|(::)', Operator),
|
| 60 |
+
(r'(alt|break|case|continue|cyclic|do|else|exit'
|
| 61 |
+
r'for|hd|if|implement|import|include|len|load|or'
|
| 62 |
+
r'pick|return|spawn|tagof|tl|to|while)\b', Keyword),
|
| 63 |
+
(r'(byte|int|big|real|string|array|chan|list|adt'
|
| 64 |
+
r'|fn|ref|of|module|self|type)\b', Keyword.Type),
|
| 65 |
+
(r'(con|iota|nil)\b', Keyword.Constant),
|
| 66 |
+
(r'[a-zA-Z_]\w*', Name),
|
| 67 |
+
],
|
| 68 |
+
'statement' : [
|
| 69 |
+
include('whitespace'),
|
| 70 |
+
include('statements'),
|
| 71 |
+
('[{}]', Punctuation),
|
| 72 |
+
(';', Punctuation, '#pop'),
|
| 73 |
+
],
|
| 74 |
+
'root': [
|
| 75 |
+
include('whitespace'),
|
| 76 |
+
default('statement'),
|
| 77 |
+
],
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
def analyse_text(text):
|
| 81 |
+
# Any limbo module implements something
|
| 82 |
+
if re.search(r'^implement \w+;', text, re.MULTILINE):
|
| 83 |
+
return 0.7
|
| 84 |
+
|
| 85 |
+
# TODO:
|
| 86 |
+
# - Make lexers for:
|
| 87 |
+
# - asm sources
|
| 88 |
+
# - man pages
|
| 89 |
+
# - mkfiles
|
| 90 |
+
# - module definitions
|
| 91 |
+
# - namespace definitions
|
| 92 |
+
# - shell scripts
|
| 93 |
+
# - maybe keyfiles and fonts
|
| 94 |
+
# they all seem to be quite similar to their equivalents
|
| 95 |
+
# from unix world, so there should not be a lot of problems
|
LTA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5 |
+
Lexer for Macaulay2.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
from pygments.lexer import RegexLexer, words
|
| 12 |
+
from pygments.token import Comment, Keyword, Name, String, Text
|
| 13 |
+
|
| 14 |
+
__all__ = ['Macaulay2Lexer']
|
| 15 |
+
|
| 16 |
+
# Auto-generated for Macaulay2-1.25.11. Do not modify this file manually.
|
| 17 |
+
|
| 18 |
+
M2KEYWORDS = (
|
| 19 |
+
"SPACE",
|
| 20 |
+
"TEST",
|
| 21 |
+
"and",
|
| 22 |
+
"break",
|
| 23 |
+
"breakpoint",
|
| 24 |
+
"catch",
|
| 25 |
+
"continue",
|
| 26 |
+
"do",
|
| 27 |
+
"elapsedTime",
|
| 28 |
+
"elapsedTiming",
|
| 29 |
+
"else",
|
| 30 |
+
"for",
|
| 31 |
+
"from",
|
| 32 |
+
"global",
|
| 33 |
+
"if",
|
| 34 |
+
"in",
|
| 35 |
+
"list",
|
| 36 |
+
"local",
|
| 37 |
+
"new",
|
| 38 |
+
"not",
|
| 39 |
+
"of",
|
| 40 |
+
"or",
|
| 41 |
+
"profile",
|
| 42 |
+
"return",
|
| 43 |
+
"shield",
|
| 44 |
+
"step",
|
| 45 |
+
"symbol",
|
| 46 |
+
"then",
|
| 47 |
+
"threadLocal",
|
| 48 |
+
"threadVariable",
|
| 49 |
+
"throw",
|
| 50 |
+
"time",
|
| 51 |
+
"timing",
|
| 52 |
+
"to",
|
| 53 |
+
"try",
|
| 54 |
+
"when",
|
| 55 |
+
"while",
|
| 56 |
+
"xor"
|
| 57 |
+
)
|
| 58 |
+
|
| 59 |
+
M2DATATYPES = (
|
| 60 |
+
"ANCHOR",
|
| 61 |
+
"Adjacent",
|
| 62 |
+
"AffineVariety",
|
| 63 |
+
"Analyzer",
|
| 64 |
+
"AngleBarList",
|
| 65 |
+
"Array",
|
| 66 |
+
"AssociativeExpression",
|
| 67 |
+
"AtomicInt",
|
| 68 |
+
"BLOCKQUOTE",
|
| 69 |
+
"BODY",
|
| 70 |
+
"BOLD",
|
| 71 |
+
"BR",
|
| 72 |
+
"BUTTON",
|
| 73 |
+
"Bag",
|
| 74 |
+
"BasicList",
|
| 75 |
+
"BettiTally",
|
| 76 |
+
"BinaryOperation",
|
| 77 |
+
"Boolean",
|
| 78 |
+
"CC",
|
| 79 |
+
"CDATA",
|
| 80 |
+
"CODE",
|
| 81 |
+
"COMMENT",
|
| 82 |
+
"CacheTable",
|
| 83 |
+
"ChainComplex",
|
| 84 |
+
"ChainComplexMap",
|
| 85 |
+
"CoherentSheaf",
|
| 86 |
+
"Command",
|
| 87 |
+
"CompiledFunction",
|
| 88 |
+
"CompiledFunctionBody",
|
| 89 |
+
"CompiledFunctionClosure",
|
| 90 |
+
"ComplexField",
|
| 91 |
+
"Constant",
|
| 92 |
+
"DD",
|
| 93 |
+
"DIV",
|
| 94 |
+
"DL",
|
| 95 |
+
"DT",
|
| 96 |
+
"Database",
|
| 97 |
+
"Descent",
|
| 98 |
+
"Describe",
|
| 99 |
+
"Dictionary",
|
| 100 |
+
"DirectSum",
|
| 101 |
+
"Divide",
|
| 102 |
+
"DocumentTag",
|
| 103 |
+
"EM",
|
| 104 |
+
"Eliminate",
|
| 105 |
+
"EngineRing",
|
| 106 |
+
"Equation",
|
| 107 |
+
"ExampleItem",
|
| 108 |
+
"Expression",
|
| 109 |
+
"File",
|
| 110 |
+
"FilePosition",
|
| 111 |
+
"FractionField",
|
| 112 |
+
"Function",
|
| 113 |
+
"FunctionApplication",
|
| 114 |
+
"FunctionBody",
|
| 115 |
+
"FunctionClosure",
|
| 116 |
+
"GaloisField",
|
| 117 |
+
"GeneralOrderedMonoid",
|
| 118 |
+
"GlobalDictionary",
|
| 119 |
+
"GradedModule",
|
| 120 |
+
"GradedModuleMap",
|
| 121 |
+
"GroebnerBasis",
|
| 122 |
+
"GroebnerBasisOptions",
|
| 123 |
+
"HEAD",
|
| 124 |
+
"HEADER1",
|
| 125 |
+
"HEADER2",
|
| 126 |
+
"HEADER3",
|
| 127 |
+
"HEADER4",
|
| 128 |
+
"HEADER5",
|
| 129 |
+
"HEADER6",
|
| 130 |
+
"HR",
|
| 131 |
+
"HREF",
|
| 132 |
+
"HTML",
|
| 133 |
+
"HashTable",
|
| 134 |
+
"HeaderType",
|
| 135 |
+
"Holder",
|
| 136 |
+
"Hybrid",
|
| 137 |
+
"Hypertext",
|
| 138 |
+
"HypertextContainer",
|
| 139 |
+
"HypertextParagraph",
|
| 140 |
+
"HypertextVoid",
|
| 141 |
+
"IFRAME",
|
| 142 |
+
"IMG",
|
| 143 |
+
"INDENT",
|
| 144 |
+
"INPUT",
|
| 145 |
+
"ITALIC",
|
| 146 |
+
"Ideal",
|
| 147 |
+
"ImmutableType",
|
| 148 |
+
"IndeterminateNumber",
|
| 149 |
+
"IndexedVariable",
|
| 150 |
+
"IndexedVariableTable",
|
| 151 |
+
"InexactField",
|
| 152 |
+
"InexactFieldFamily",
|
| 153 |
+
"InexactNumber",
|
| 154 |
+
"InfiniteNumber",
|
| 155 |
+
"IntermediateMarkUpType",
|
| 156 |
+
"Iterator",
|
| 157 |
+
"KBD",
|
| 158 |
+
"Keyword",
|
| 159 |
+
"LABEL",
|
| 160 |
+
"LATER",
|
| 161 |
+
"LI",
|
| 162 |
+
"LINK",
|
| 163 |
+
"LITERAL",
|
| 164 |
+
"List",
|
| 165 |
+
"LocalDictionary",
|
| 166 |
+
"LowerBound",
|
| 167 |
+
"MENU",
|
| 168 |
+
"META",
|
| 169 |
+
"Manipulator",
|
| 170 |
+
"MapExpression",
|
| 171 |
+
"MarkUpType",
|
| 172 |
+
"Matrix",
|
| 173 |
+
"MatrixExpression",
|
| 174 |
+
"MethodFunction",
|
| 175 |
+
"MethodFunctionBinary",
|
| 176 |
+
"MethodFunctionSingle",
|
| 177 |
+
"MethodFunctionWithOptions",
|
| 178 |
+
"Minus",
|
| 179 |
+
"Module",
|
| 180 |
+
"Monoid",
|
| 181 |
+
"MonoidElement",
|
| 182 |
+
"MonomialIdeal",
|
| 183 |
+
"MultigradedBettiTally",
|
| 184 |
+
"MutableHashTable",
|
| 185 |
+
"MutableList",
|
| 186 |
+
"MutableMatrix",
|
| 187 |
+
"Net",
|
| 188 |
+
"NetFile",
|
| 189 |
+
"Nothing",
|
| 190 |
+
"Number",
|
| 191 |
+
"NumberedVerticalList",
|
| 192 |
+
"OL",
|
| 193 |
+
"OneExpression",
|
| 194 |
+
"Option",
|
| 195 |
+
"OptionTable",
|
| 196 |
+
"OrderedMonoid",
|
| 197 |
+
"PARA",
|
| 198 |
+
"PRE",
|
| 199 |
+
"Package",
|
| 200 |
+
"Parenthesize",
|
| 201 |
+
"Parser",
|
| 202 |
+
"Partition",
|
| 203 |
+
"PolynomialRing",
|
| 204 |
+
"Power",
|
| 205 |
+
"Product",
|
| 206 |
+
"ProductOrder",
|
| 207 |
+
"Program",
|
| 208 |
+
"ProgramRun",
|
| 209 |
+
"ProjectiveHilbertPolynomial",
|
| 210 |
+
"ProjectiveVariety",
|
| 211 |
+
"Pseudocode",
|
| 212 |
+
"PseudocodeClosure",
|
| 213 |
+
"QQ",
|
| 214 |
+
"QuotientRing",
|
| 215 |
+
"RR",
|
| 216 |
+
"RRi",
|
| 217 |
+
"RealField",
|
| 218 |
+
"Resolution",
|
| 219 |
+
"Ring",
|
| 220 |
+
"RingElement",
|
| 221 |
+
"RingFamily",
|
| 222 |
+
"RingMap",
|
| 223 |
+
"RowExpression",
|
| 224 |
+
"SAMP",
|
| 225 |
+
"SCRIPT",
|
| 226 |
+
"SMALL",
|
| 227 |
+
"SPAN",
|
| 228 |
+
"STRONG",
|
| 229 |
+
"STYLE",
|
| 230 |
+
"SUB",
|
| 231 |
+
"SUBSECTION",
|
| 232 |
+
"SUP",
|
| 233 |
+
"ScriptedFunctor",
|
| 234 |
+
"SelfInitializingType",
|
| 235 |
+
"Sequence",
|
| 236 |
+
"Set",
|
| 237 |
+
"SheafExpression",
|
| 238 |
+
"SheafMap",
|
| 239 |
+
"SheafOfRings",
|
| 240 |
+
"SparseMonomialVectorExpression",
|
| 241 |
+
"SparseVectorExpression",
|
| 242 |
+
"String",
|
| 243 |
+
"Subscript",
|
| 244 |
+
"Sum",
|
| 245 |
+
"SumOfTwists",
|
| 246 |
+
"Superscript",
|
| 247 |
+
"Symbol",
|
| 248 |
+
"SymbolBody",
|
| 249 |
+
"TABLE",
|
| 250 |
+
"TD",
|
| 251 |
+
"TEX",
|
| 252 |
+
"TH",
|
| 253 |
+
"TITLE",
|
| 254 |
+
"TO",
|
| 255 |
+
"TO2",
|
| 256 |
+
"TOH",
|
| 257 |
+
"TR",
|
| 258 |
+
"TT",
|
| 259 |
+
"Table",
|
| 260 |
+
"Tally",
|
| 261 |
+
"Task",
|
| 262 |
+
"TensorProduct",
|
| 263 |
+
"TestInput",
|
| 264 |
+
"Thing",
|
| 265 |
+
"Time",
|
| 266 |
+
"Type",
|
| 267 |
+
"UL",
|
| 268 |
+
"URL",
|
| 269 |
+
"VAR",
|
| 270 |
+
"Variety",
|
| 271 |
+
"Vector",
|
| 272 |
+
"VectorExpression",
|
| 273 |
+
"VerticalList",
|
| 274 |
+
"VirtualTally",
|
| 275 |
+
"VisibleList",
|
| 276 |
+
"WrapperType",
|
| 277 |
+
"ZZ",
|
| 278 |
+
"ZeroExpression"
|
| 279 |
+
)
|
| 280 |
+
|
| 281 |
+
M2FUNCTIONS = (
|
| 282 |
+
"BesselJ",
|
| 283 |
+
"BesselY",
|
| 284 |
+
"Beta",
|
| 285 |
+
"Digamma",
|
| 286 |
+
"EXAMPLE",
|
| 287 |
+
"End",
|
| 288 |
+
"Fano",
|
| 289 |
+
"GCstats",
|
| 290 |
+
"GF",
|
| 291 |
+
"Gamma",
|
| 292 |
+
"Grassmannian",
|
| 293 |
+
"Hom",
|
| 294 |
+
"LLL",
|
| 295 |
+
"LUdecomposition",
|
| 296 |
+
"M2CODE",
|
| 297 |
+
"NNParser",
|
| 298 |
+
"Proj",
|
| 299 |
+
"QQParser",
|
| 300 |
+
"QRDecomposition",
|
| 301 |
+
"SVD",
|
| 302 |
+
"SYNOPSIS",
|
| 303 |
+
"Schubert",
|
| 304 |
+
"Spec",
|
| 305 |
+
"ZZParser",
|
| 306 |
+
"about",
|
| 307 |
+
"abs",
|
| 308 |
+
"accumulate",
|
| 309 |
+
"acos",
|
| 310 |
+
"acosh",
|
| 311 |
+
"acot",
|
| 312 |
+
"acoth",
|
| 313 |
+
"addCancelTask",
|
| 314 |
+
"addDependencyTask",
|
| 315 |
+
"addEndFunction",
|
| 316 |
+
"addHook",
|
| 317 |
+
"addStartTask",
|
| 318 |
+
"adjoint",
|
| 319 |
+
"agm",
|
| 320 |
+
"alarm",
|
| 321 |
+
"all",
|
| 322 |
+
"ambient",
|
| 323 |
+
"analyticSpread",
|
| 324 |
+
"ancestor",
|
| 325 |
+
"ancestors",
|
| 326 |
+
"andP",
|
| 327 |
+
"ann",
|
| 328 |
+
"annihilator",
|
| 329 |
+
"antipode",
|
| 330 |
+
"any",
|
| 331 |
+
"append",
|
| 332 |
+
"applicationDirectory",
|
| 333 |
+
"apply",
|
| 334 |
+
"applyKeys",
|
| 335 |
+
"applyPairs",
|
| 336 |
+
"applyTable",
|
| 337 |
+
"applyValues",
|
| 338 |
+
"apropos",
|
| 339 |
+
"arXiv",
|
| 340 |
+
"ascii",
|
| 341 |
+
"asin",
|
| 342 |
+
"asinh",
|
| 343 |
+
"ass",
|
| 344 |
+
"assert",
|
| 345 |
+
"associatedGradedRing",
|
| 346 |
+
"associatedPrimes",
|
| 347 |
+
"atEndOfFile",
|
| 348 |
+
"atan",
|
| 349 |
+
"atan2",
|
| 350 |
+
"atanh",
|
| 351 |
+
"autoload",
|
| 352 |
+
"baseFilename",
|
| 353 |
+
"baseName",
|
| 354 |
+
"baseRing",
|
| 355 |
+
"basis",
|
| 356 |
+
"beginDocumentation",
|
| 357 |
+
"benchmark",
|
| 358 |
+
"betti",
|
| 359 |
+
"between",
|
| 360 |
+
"binomial",
|
| 361 |
+
"borel",
|
| 362 |
+
"cacheValue",
|
| 363 |
+
"cancelTask",
|
| 364 |
+
"canonicalBundle",
|
| 365 |
+
"capture",
|
| 366 |
+
"ceiling",
|
| 367 |
+
"centerString",
|
| 368 |
+
"chainComplex",
|
| 369 |
+
"changeBase",
|
| 370 |
+
"changeDirectory",
|
| 371 |
+
"char",
|
| 372 |
+
"charAnalyzer",
|
| 373 |
+
"characters",
|
| 374 |
+
"check",
|
| 375 |
+
"checkDegrees",
|
| 376 |
+
"chi",
|
| 377 |
+
"class",
|
| 378 |
+
"clean",
|
| 379 |
+
"clearEcho",
|
| 380 |
+
"code",
|
| 381 |
+
"codim",
|
| 382 |
+
"coefficient",
|
| 383 |
+
"coefficientRing",
|
| 384 |
+
"coefficients",
|
| 385 |
+
"cohomology",
|
| 386 |
+
"coimage",
|
| 387 |
+
"coker",
|
| 388 |
+
"cokernel",
|
| 389 |
+
"collectGarbage",
|
| 390 |
+
"columnAdd",
|
| 391 |
+
"columnMult",
|
| 392 |
+
"columnPermute",
|
| 393 |
+
"columnRankProfile",
|
| 394 |
+
"columnSwap",
|
| 395 |
+
"columnate",
|
| 396 |
+
"combine",
|
| 397 |
+
"commandInterpreter",
|
| 398 |
+
"commonRing",
|
| 399 |
+
"commonest",
|
| 400 |
+
"comodule",
|
| 401 |
+
"compareExchange",
|
| 402 |
+
"complement",
|
| 403 |
+
"complete",
|
| 404 |
+
"components",
|
| 405 |
+
"compose",
|
| 406 |
+
"compositions",
|
| 407 |
+
"compress",
|
| 408 |
+
"concatenate",
|
| 409 |
+
"conductor",
|
| 410 |
+
"cone",
|
| 411 |
+
"conjugate",
|
| 412 |
+
"connectionCount",
|
| 413 |
+
"constParser",
|
| 414 |
+
"content",
|
| 415 |
+
"contract",
|
| 416 |
+
"conwayPolynomial",
|
| 417 |
+
"copy",
|
| 418 |
+
"copyDirectory",
|
| 419 |
+
"copyFile",
|
| 420 |
+
"cos",
|
| 421 |
+
"cosh",
|
| 422 |
+
"cot",
|
| 423 |
+
"cotangentSheaf",
|
| 424 |
+
"coth",
|
| 425 |
+
"cover",
|
| 426 |
+
"coverMap",
|
| 427 |
+
"cpuTime",
|
| 428 |
+
"createTask",
|
| 429 |
+
"csc",
|
| 430 |
+
"csch",
|
| 431 |
+
"currentColumnNumber",
|
| 432 |
+
"currentDirectory",
|
| 433 |
+
"currentPosition",
|
| 434 |
+
"currentRowNumber",
|
| 435 |
+
"currentTime",
|
| 436 |
+
"deadParser",
|
| 437 |
+
"debug",
|
| 438 |
+
"debugError",
|
| 439 |
+
"decompose",
|
| 440 |
+
"deepSplice",
|
| 441 |
+
"default",
|
| 442 |
+
"degree",
|
| 443 |
+
"degreeGroup",
|
| 444 |
+
"degreeLength",
|
| 445 |
+
"degrees",
|
| 446 |
+
"degreesMonoid",
|
| 447 |
+
"degreesRing",
|
| 448 |
+
"delete",
|
| 449 |
+
"demark",
|
| 450 |
+
"denominator",
|
| 451 |
+
"depth",
|
| 452 |
+
"describe",
|
| 453 |
+
"det",
|
| 454 |
+
"determinant",
|
| 455 |
+
"diagonalMatrix",
|
| 456 |
+
"diameter",
|
| 457 |
+
"dictionary",
|
| 458 |
+
"diff",
|
| 459 |
+
"difference",
|
| 460 |
+
"dim",
|
| 461 |
+
"directProduct",
|
| 462 |
+
"directSum",
|
| 463 |
+
"disassemble",
|
| 464 |
+
"discriminant",
|
| 465 |
+
"dismiss",
|
| 466 |
+
"distinguished",
|
| 467 |
+
"divideByVariable",
|
| 468 |
+
"doc",
|
| 469 |
+
"document",
|
| 470 |
+
"drop",
|
| 471 |
+
"dual",
|
| 472 |
+
"eagonNorthcott",
|
| 473 |
+
"echoOff",
|
| 474 |
+
"echoOn",
|
| 475 |
+
"eigenvalues",
|
| 476 |
+
"eigenvectors",
|
| 477 |
+
"eint",
|
| 478 |
+
"elements",
|
| 479 |
+
"eliminate",
|
| 480 |
+
"endPackage",
|
| 481 |
+
"entries",
|
| 482 |
+
"erase",
|
| 483 |
+
"erf",
|
| 484 |
+
"erfc",
|
| 485 |
+
"error",
|
| 486 |
+
"euler",
|
| 487 |
+
"eulers",
|
| 488 |
+
"even",
|
| 489 |
+
"examples",
|
| 490 |
+
"exchange",
|
| 491 |
+
"exec",
|
| 492 |
+
"exp",
|
| 493 |
+
"expectedReesIdeal",
|
| 494 |
+
"expm1",
|
| 495 |
+
"exponents",
|
| 496 |
+
"export",
|
| 497 |
+
"exportFrom",
|
| 498 |
+
"exportMutable",
|
| 499 |
+
"expression",
|
| 500 |
+
"extend",
|
| 501 |
+
"exteriorPower",
|
| 502 |
+
"factor",
|
| 503 |
+
"fileExecutable",
|
| 504 |
+
"fileExists",
|
| 505 |
+
"fileLength",
|
| 506 |
+
"fileMode",
|
| 507 |
+
"fileReadable",
|
| 508 |
+
"fileTime",
|
| 509 |
+
"fileWritable",
|
| 510 |
+
"fillMatrix",
|
| 511 |
+
"findFiles",
|
| 512 |
+
"findHeft",
|
| 513 |
+
"findProgram",
|
| 514 |
+
"findSynonyms",
|
| 515 |
+
"first",
|
| 516 |
+
"firstkey",
|
| 517 |
+
"fittingIdeal",
|
| 518 |
+
"flagLookup",
|
| 519 |
+
"flatten",
|
| 520 |
+
"flattenRing",
|
| 521 |
+
"flip",
|
| 522 |
+
"floor",
|
| 523 |
+
"fold",
|
| 524 |
+
"forceGB",
|
| 525 |
+
"fork",
|
| 526 |
+
"format",
|
| 527 |
+
"formation",
|
| 528 |
+
"frac",
|
| 529 |
+
"fraction",
|
| 530 |
+
"frames",
|
| 531 |
+
"fromDividedPowers",
|
| 532 |
+
"fromDual",
|
| 533 |
+
"functionBody",
|
| 534 |
+
"futureParser",
|
| 535 |
+
"gb",
|
| 536 |
+
"gbRemove",
|
| 537 |
+
"gbSnapshot",
|
| 538 |
+
"gcd",
|
| 539 |
+
"gcdCoefficients",
|
| 540 |
+
"gcdLLL",
|
| 541 |
+
"genera",
|
| 542 |
+
"generateAssertions",
|
| 543 |
+
"generator",
|
| 544 |
+
"generators",
|
| 545 |
+
"genericMatrix",
|
| 546 |
+
"genericSkewMatrix",
|
| 547 |
+
"genericSymmetricMatrix",
|
| 548 |
+
"gens",
|
| 549 |
+
"genus",
|
| 550 |
+
"get",
|
| 551 |
+
"getChangeMatrix",
|
| 552 |
+
"getGlobalSymbol",
|
| 553 |
+
"getIOThreadMode",
|
| 554 |
+
"getNetFile",
|
| 555 |
+
"getNonUnit",
|
| 556 |
+
"getPrimeWithRootOfUnity",
|
| 557 |
+
"getSymbol",
|
| 558 |
+
"getWWW",
|
| 559 |
+
"getc",
|
| 560 |
+
"getenv",
|
| 561 |
+
"globalAssign",
|
| 562 |
+
"globalAssignFunction",
|
| 563 |
+
"globalAssignment",
|
| 564 |
+
"globalReleaseFunction",
|
| 565 |
+
"gradedModule",
|
| 566 |
+
"gradedModuleMap",
|
| 567 |
+
"gramm",
|
| 568 |
+
"graphIdeal",
|
| 569 |
+
"graphRing",
|
| 570 |
+
"groebnerBasis",
|
| 571 |
+
"groupID",
|
| 572 |
+
"hash",
|
| 573 |
+
"hashTable",
|
| 574 |
+
"headlines",
|
| 575 |
+
"heft",
|
| 576 |
+
"height",
|
| 577 |
+
"hermite",
|
| 578 |
+
"hilbertFunction",
|
| 579 |
+
"hilbertPolynomial",
|
| 580 |
+
"hilbertSeries",
|
| 581 |
+
"hold",
|
| 582 |
+
"homogenize",
|
| 583 |
+
"homology",
|
| 584 |
+
"homomorphism",
|
| 585 |
+
"hooks",
|
| 586 |
+
"horizontalJoin",
|
| 587 |
+
"html",
|
| 588 |
+
"httpHeaders",
|
| 589 |
+
"hypertext",
|
| 590 |
+
"icFracP",
|
| 591 |
+
"icFractions",
|
| 592 |
+
"icMap",
|
| 593 |
+
"icPIdeal",
|
| 594 |
+
"ideal",
|
| 595 |
+
"idealSheaf",
|
| 596 |
+
"idealizer",
|
| 597 |
+
"identity",
|
| 598 |
+
"image",
|
| 599 |
+
"imaginaryPart",
|
| 600 |
+
"importFrom",
|
| 601 |
+
"independentSets",
|
| 602 |
+
"index",
|
| 603 |
+
"indices",
|
| 604 |
+
"inducedMap",
|
| 605 |
+
"inducesWellDefinedMap",
|
| 606 |
+
"info",
|
| 607 |
+
"input",
|
| 608 |
+
"insert",
|
| 609 |
+
"installAssignmentMethod",
|
| 610 |
+
"installHilbertFunction",
|
| 611 |
+
"installMethod",
|
| 612 |
+
"installMinprimes",
|
| 613 |
+
"installPackage",
|
| 614 |
+
"installedPackages",
|
| 615 |
+
"instance",
|
| 616 |
+
"instances",
|
| 617 |
+
"integralClosure",
|
| 618 |
+
"integrate",
|
| 619 |
+
"intersect",
|
| 620 |
+
"intersectInP",
|
| 621 |
+
"intersection",
|
| 622 |
+
"interval",
|
| 623 |
+
"inverse",
|
| 624 |
+
"inverseErf",
|
| 625 |
+
"inversePermutation",
|
| 626 |
+
"inverseRegularizedBeta",
|
| 627 |
+
"inverseRegularizedGamma",
|
| 628 |
+
"inverseSystem",
|
| 629 |
+
"irreducibleCharacteristicSeries",
|
| 630 |
+
"irreducibleDecomposition",
|
| 631 |
+
"isANumber",
|
| 632 |
+
"isAffineRing",
|
| 633 |
+
"isBorel",
|
| 634 |
+
"isCanceled",
|
| 635 |
+
"isCommutative",
|
| 636 |
+
"isConstant",
|
| 637 |
+
"isDirectSum",
|
| 638 |
+
"isDirectory",
|
| 639 |
+
"isEmpty",
|
| 640 |
+
"isExact",
|
| 641 |
+
"isField",
|
| 642 |
+
"isFinite",
|
| 643 |
+
"isFinitePrimeField",
|
| 644 |
+
"isFreeModule",
|
| 645 |
+
"isGlobalSymbol",
|
| 646 |
+
"isHomogeneous",
|
| 647 |
+
"isIdeal",
|
| 648 |
+
"isInfinite",
|
| 649 |
+
"isInjective",
|
| 650 |
+
"isInputFile",
|
| 651 |
+
"isIsomorphic",
|
| 652 |
+
"isIsomorphism",
|
| 653 |
+
"isLLL",
|
| 654 |
+
"isLinearType",
|
| 655 |
+
"isListener",
|
| 656 |
+
"isLocallyFree",
|
| 657 |
+
"isMember",
|
| 658 |
+
"isModule",
|
| 659 |
+
"isMonomialIdeal",
|
| 660 |
+
"isMutable",
|
| 661 |
+
"isNormal",
|
| 662 |
+
"isOpen",
|
| 663 |
+
"isOutputFile",
|
| 664 |
+
"isPolynomialRing",
|
| 665 |
+
"isPrimary",
|
| 666 |
+
"isPrime",
|
| 667 |
+
"isPrimitive",
|
| 668 |
+
"isProjective",
|
| 669 |
+
"isPseudoprime",
|
| 670 |
+
"isQuotientModule",
|
| 671 |
+
"isQuotientOf",
|
| 672 |
+
"isQuotientRing",
|
| 673 |
+
"isReady",
|
| 674 |
+
"isReal",
|
| 675 |
+
"isReduction",
|
| 676 |
+
"isRegularFile",
|
| 677 |
+
"isRing",
|
| 678 |
+
"isSkewCommutative",
|
| 679 |
+
"isSmooth",
|
| 680 |
+
"isSorted",
|
| 681 |
+
"isSquareFree",
|
| 682 |
+
"isStandardGradedPolynomialRing",
|
| 683 |
+
"isSubmodule",
|
| 684 |
+
"isSubquotient",
|
| 685 |
+
"isSubset",
|
| 686 |
+
"isSupportedInZeroLocus",
|
| 687 |
+
"isSurjective",
|
| 688 |
+
"isTable",
|
| 689 |
+
"isUnit",
|
| 690 |
+
"isVeryAmple",
|
| 691 |
+
"isWellDefined",
|
| 692 |
+
"isWeylAlgebra",
|
| 693 |
+
"isc",
|
| 694 |
+
"isomorphism",
|
| 695 |
+
"iterator",
|
| 696 |
+
"jacobian",
|
| 697 |
+
"jacobianDual",
|
| 698 |
+
"join",
|
| 699 |
+
"ker",
|
| 700 |
+
"kernel",
|
| 701 |
+
"kernelLLL",
|
| 702 |
+
"kernelOfLocalization",
|
| 703 |
+
"keys",
|
| 704 |
+
"kill",
|
| 705 |
+
"koszul",
|
| 706 |
+
"last",
|
| 707 |
+
"lcm",
|
| 708 |
+
"leadCoefficient",
|
| 709 |
+
"leadComponent",
|
| 710 |
+
"leadMonomial",
|
| 711 |
+
"leadTerm",
|
| 712 |
+
"left",
|
| 713 |
+
"length",
|
| 714 |
+
"letterParser",
|
| 715 |
+
"lift",
|
| 716 |
+
"liftable",
|
| 717 |
+
"limitFiles",
|
| 718 |
+
"limitProcesses",
|
| 719 |
+
"lines",
|
| 720 |
+
"linkFile",
|
| 721 |
+
"listForm",
|
| 722 |
+
"listSymbols",
|
| 723 |
+
"lngamma",
|
| 724 |
+
"load",
|
| 725 |
+
"loadPackage",
|
| 726 |
+
"localDictionaries",
|
| 727 |
+
"localize",
|
| 728 |
+
"locate",
|
| 729 |
+
"log",
|
| 730 |
+
"log1p",
|
| 731 |
+
"lookup",
|
| 732 |
+
"lookupCount",
|
| 733 |
+
"makeDirectory",
|
| 734 |
+
"makeDocumentTag",
|
| 735 |
+
"makePackageIndex",
|
| 736 |
+
"makeS2",
|
| 737 |
+
"map",
|
| 738 |
+
"markedGB",
|
| 739 |
+
"match",
|
| 740 |
+
"mathML",
|
| 741 |
+
"matrix",
|
| 742 |
+
"max",
|
| 743 |
+
"maxPosition",
|
| 744 |
+
"member",
|
| 745 |
+
"memoize",
|
| 746 |
+
"memoizeClear",
|
| 747 |
+
"memoizeValues",
|
| 748 |
+
"merge",
|
| 749 |
+
"mergePairs",
|
| 750 |
+
"method",
|
| 751 |
+
"methodOptions",
|
| 752 |
+
"methods",
|
| 753 |
+
"midpoint",
|
| 754 |
+
"min",
|
| 755 |
+
"minPosition",
|
| 756 |
+
"minPres",
|
| 757 |
+
"mingens",
|
| 758 |
+
"mingle",
|
| 759 |
+
"minimalBetti",
|
| 760 |
+
"minimalPresentation",
|
| 761 |
+
"minimalPrimes",
|
| 762 |
+
"minimalReduction",
|
| 763 |
+
"minimize",
|
| 764 |
+
"minimizeFilename",
|
| 765 |
+
"minors",
|
| 766 |
+
"minprimes",
|
| 767 |
+
"minus",
|
| 768 |
+
"mkdir",
|
| 769 |
+
"mod",
|
| 770 |
+
"module",
|
| 771 |
+
"modulo",
|
| 772 |
+
"monoid",
|
| 773 |
+
"monomialCurveIdeal",
|
| 774 |
+
"monomialIdeal",
|
| 775 |
+
"monomialSubideal",
|
| 776 |
+
"monomials",
|
| 777 |
+
"moveFile",
|
| 778 |
+
"multidegree",
|
| 779 |
+
"multidoc",
|
| 780 |
+
"multigraded",
|
| 781 |
+
"multiplicity",
|
| 782 |
+
"mutable",
|
| 783 |
+
"mutableIdentity",
|
| 784 |
+
"mutableMatrix",
|
| 785 |
+
"nanosleep",
|
| 786 |
+
"needs",
|
| 787 |
+
"needsPackage",
|
| 788 |
+
"net",
|
| 789 |
+
"netList",
|
| 790 |
+
"newClass",
|
| 791 |
+
"newCoordinateSystem",
|
| 792 |
+
"newNetFile",
|
| 793 |
+
"newPackage",
|
| 794 |
+
"newRing",
|
| 795 |
+
"next",
|
| 796 |
+
"nextPrime",
|
| 797 |
+
"nextkey",
|
| 798 |
+
"nonspaceAnalyzer",
|
| 799 |
+
"norm",
|
| 800 |
+
"normalCone",
|
| 801 |
+
"notImplemented",
|
| 802 |
+
"nullParser",
|
| 803 |
+
"nullSpace",
|
| 804 |
+
"nullhomotopy",
|
| 805 |
+
"numColumns",
|
| 806 |
+
"numRows",
|
| 807 |
+
"number",
|
| 808 |
+
"numcols",
|
| 809 |
+
"numerator",
|
| 810 |
+
"numeric",
|
| 811 |
+
"numericInterval",
|
| 812 |
+
"numgens",
|
| 813 |
+
"numrows",
|
| 814 |
+
"odd",
|
| 815 |
+
"oeis",
|
| 816 |
+
"ofClass",
|
| 817 |
+
"on",
|
| 818 |
+
"openDatabase",
|
| 819 |
+
"openDatabaseOut",
|
| 820 |
+
"openFiles",
|
| 821 |
+
"openIn",
|
| 822 |
+
"openInOut",
|
| 823 |
+
"openListener",
|
| 824 |
+
"openOut",
|
| 825 |
+
"openOutAppend",
|
| 826 |
+
"optP",
|
| 827 |
+
"optionalSignParser",
|
| 828 |
+
"options",
|
| 829 |
+
"orP",
|
| 830 |
+
"override",
|
| 831 |
+
"pack",
|
| 832 |
+
"package",
|
| 833 |
+
"packageTemplate",
|
| 834 |
+
"pad",
|
| 835 |
+
"pager",
|
| 836 |
+
"pairs",
|
| 837 |
+
"parallelApply",
|
| 838 |
+
"parent",
|
| 839 |
+
"part",
|
| 840 |
+
"partition",
|
| 841 |
+
"partitions",
|
| 842 |
+
"parts",
|
| 843 |
+
"pdim",
|
| 844 |
+
"peek",
|
| 845 |
+
"permanents",
|
| 846 |
+
"permutations",
|
| 847 |
+
"pfaffian",
|
| 848 |
+
"pfaffians",
|
| 849 |
+
"pivots",
|
| 850 |
+
"plus",
|
| 851 |
+
"poincare",
|
| 852 |
+
"poincareN",
|
| 853 |
+
"polarize",
|
| 854 |
+
"poly",
|
| 855 |
+
"position",
|
| 856 |
+
"positions",
|
| 857 |
+
"power",
|
| 858 |
+
"powermod",
|
| 859 |
+
"precision",
|
| 860 |
+
"preimage",
|
| 861 |
+
"prepend",
|
| 862 |
+
"presentation",
|
| 863 |
+
"pretty",
|
| 864 |
+
"primaryComponent",
|
| 865 |
+
"primaryDecomposition",
|
| 866 |
+
"print",
|
| 867 |
+
"printString",
|
| 868 |
+
"printerr",
|
| 869 |
+
"processID",
|
| 870 |
+
"product",
|
| 871 |
+
"projectiveHilbertPolynomial",
|
| 872 |
+
"promote",
|
| 873 |
+
"protect",
|
| 874 |
+
"prune",
|
| 875 |
+
"pseudoRemainder",
|
| 876 |
+
"pseudocode",
|
| 877 |
+
"pullback",
|
| 878 |
+
"pushForward",
|
| 879 |
+
"pushout",
|
| 880 |
+
"quotient",
|
| 881 |
+
"quotientRemainder",
|
| 882 |
+
"radical",
|
| 883 |
+
"radicalContainment",
|
| 884 |
+
"random",
|
| 885 |
+
"randomKRationalPoint",
|
| 886 |
+
"randomMutableMatrix",
|
| 887 |
+
"randomSubset",
|
| 888 |
+
"rank",
|
| 889 |
+
"rays",
|
| 890 |
+
"read",
|
| 891 |
+
"readDirectory",
|
| 892 |
+
"readPackage",
|
| 893 |
+
"readlink",
|
| 894 |
+
"realPart",
|
| 895 |
+
"realpath",
|
| 896 |
+
"recursionDepth",
|
| 897 |
+
"reduceHilbert",
|
| 898 |
+
"reducedRowEchelonForm",
|
| 899 |
+
"reductionNumber",
|
| 900 |
+
"reesAlgebra",
|
| 901 |
+
"reesAlgebraIdeal",
|
| 902 |
+
"reesIdeal",
|
| 903 |
+
"regSeqInIdeal",
|
| 904 |
+
"regex",
|
| 905 |
+
"regexQuote",
|
| 906 |
+
"registerFinalizer",
|
| 907 |
+
"regularity",
|
| 908 |
+
"regularizedBeta",
|
| 909 |
+
"regularizedGamma",
|
| 910 |
+
"relations",
|
| 911 |
+
"relativizeFilename",
|
| 912 |
+
"remainder",
|
| 913 |
+
"remove",
|
| 914 |
+
"removeDirectory",
|
| 915 |
+
"removeFile",
|
| 916 |
+
"removeLowestDimension",
|
| 917 |
+
"reorganize",
|
| 918 |
+
"replace",
|
| 919 |
+
"res",
|
| 920 |
+
"reshape",
|
| 921 |
+
"resolution",
|
| 922 |
+
"resultant",
|
| 923 |
+
"reverse",
|
| 924 |
+
"right",
|
| 925 |
+
"ring",
|
| 926 |
+
"ringFromFractions",
|
| 927 |
+
"roots",
|
| 928 |
+
"rotate",
|
| 929 |
+
"round",
|
| 930 |
+
"rowAdd",
|
| 931 |
+
"rowMult",
|
| 932 |
+
"rowPermute",
|
| 933 |
+
"rowRankProfile",
|
| 934 |
+
"rowSwap",
|
| 935 |
+
"rsort",
|
| 936 |
+
"run",
|
| 937 |
+
"runHooks",
|
| 938 |
+
"runLengthEncode",
|
| 939 |
+
"runProgram",
|
| 940 |
+
"same",
|
| 941 |
+
"saturate",
|
| 942 |
+
"scan",
|
| 943 |
+
"scanKeys",
|
| 944 |
+
"scanLines",
|
| 945 |
+
"scanPairs",
|
| 946 |
+
"scanValues",
|
| 947 |
+
"schedule",
|
| 948 |
+
"schreyerOrder",
|
| 949 |
+
"searchPath",
|
| 950 |
+
"sec",
|
| 951 |
+
"sech",
|
| 952 |
+
"seeParsing",
|
| 953 |
+
"select",
|
| 954 |
+
"selectInSubring",
|
| 955 |
+
"selectKeys",
|
| 956 |
+
"selectPairs",
|
| 957 |
+
"selectValues",
|
| 958 |
+
"selectVariables",
|
| 959 |
+
"separate",
|
| 960 |
+
"separateRegexp",
|
| 961 |
+
"sequence",
|
| 962 |
+
"serialNumber",
|
| 963 |
+
"set",
|
| 964 |
+
"setEcho",
|
| 965 |
+
"setGroupID",
|
| 966 |
+
"setIOExclusive",
|
| 967 |
+
"setIOSynchronized",
|
| 968 |
+
"setIOUnSynchronized",
|
| 969 |
+
"setRandomSeed",
|
| 970 |
+
"setup",
|
| 971 |
+
"setupEmacs",
|
| 972 |
+
"setupLift",
|
| 973 |
+
"setupPromote",
|
| 974 |
+
"sheaf",
|
| 975 |
+
"sheafHom",
|
| 976 |
+
"sheafMap",
|
| 977 |
+
"show",
|
| 978 |
+
"showHtml",
|
| 979 |
+
"showTex",
|
| 980 |
+
"sign",
|
| 981 |
+
"simpleDocFrob",
|
| 982 |
+
"sin",
|
| 983 |
+
"singularLocus",
|
| 984 |
+
"sinh",
|
| 985 |
+
"size",
|
| 986 |
+
"size2",
|
| 987 |
+
"sleep",
|
| 988 |
+
"smithNormalForm",
|
| 989 |
+
"solve",
|
| 990 |
+
"someTerms",
|
| 991 |
+
"sort",
|
| 992 |
+
"sortColumns",
|
| 993 |
+
"source",
|
| 994 |
+
"span",
|
| 995 |
+
"specialFiber",
|
| 996 |
+
"specialFiberIdeal",
|
| 997 |
+
"splice",
|
| 998 |
+
"splitWWW",
|
| 999 |
+
"sqrt",
|
| 1000 |
+
"stack",
|
| 1001 |
+
"stacksProject",
|
| 1002 |
+
"stacktrace",
|
| 1003 |
+
"standardForm",
|
| 1004 |
+
"standardPairs",
|
| 1005 |
+
"stashValue",
|
| 1006 |
+
"status",
|
| 1007 |
+
"store",
|
| 1008 |
+
"style",
|
| 1009 |
+
"sub",
|
| 1010 |
+
"sublists",
|
| 1011 |
+
"submatrix",
|
| 1012 |
+
"submatrixByDegrees",
|
| 1013 |
+
"subquotient",
|
| 1014 |
+
"subsets",
|
| 1015 |
+
"substitute",
|
| 1016 |
+
"substring",
|
| 1017 |
+
"subtable",
|
| 1018 |
+
"sum",
|
| 1019 |
+
"super",
|
| 1020 |
+
"support",
|
| 1021 |
+
"switch",
|
| 1022 |
+
"sylvesterMatrix",
|
| 1023 |
+
"symbolBody",
|
| 1024 |
+
"symlinkDirectory",
|
| 1025 |
+
"symlinkFile",
|
| 1026 |
+
"symmetricAlgebra",
|
| 1027 |
+
"symmetricAlgebraIdeal",
|
| 1028 |
+
"symmetricKernel",
|
| 1029 |
+
"symmetricPower",
|
| 1030 |
+
"synonym",
|
| 1031 |
+
"syz",
|
| 1032 |
+
"syzygyScheme",
|
| 1033 |
+
"table",
|
| 1034 |
+
"take",
|
| 1035 |
+
"tally",
|
| 1036 |
+
"tan",
|
| 1037 |
+
"tangentCone",
|
| 1038 |
+
"tangentSheaf",
|
| 1039 |
+
"tanh",
|
| 1040 |
+
"target",
|
| 1041 |
+
"taskResult",
|
| 1042 |
+
"temporaryFileName",
|
| 1043 |
+
"tensor",
|
| 1044 |
+
"tensorAssociativity",
|
| 1045 |
+
"terminalParser",
|
| 1046 |
+
"terms",
|
| 1047 |
+
"testHunekeQuestion",
|
| 1048 |
+
"tests",
|
| 1049 |
+
"tex",
|
| 1050 |
+
"texMath",
|
| 1051 |
+
"times",
|
| 1052 |
+
"toAbsolutePath",
|
| 1053 |
+
"toCC",
|
| 1054 |
+
"toDividedPowers",
|
| 1055 |
+
"toDual",
|
| 1056 |
+
"toExternalString",
|
| 1057 |
+
"toField",
|
| 1058 |
+
"toList",
|
| 1059 |
+
"toLower",
|
| 1060 |
+
"toRR",
|
| 1061 |
+
"toRRi",
|
| 1062 |
+
"toSequence",
|
| 1063 |
+
"toString",
|
| 1064 |
+
"toUpper",
|
| 1065 |
+
"top",
|
| 1066 |
+
"topCoefficients",
|
| 1067 |
+
"topComponents",
|
| 1068 |
+
"trace",
|
| 1069 |
+
"transpose",
|
| 1070 |
+
"trim",
|
| 1071 |
+
"truncate",
|
| 1072 |
+
"truncateOutput",
|
| 1073 |
+
"tutorial",
|
| 1074 |
+
"ultimate",
|
| 1075 |
+
"unbag",
|
| 1076 |
+
"uncurry",
|
| 1077 |
+
"undocumented",
|
| 1078 |
+
"uniform",
|
| 1079 |
+
"uninstallAllPackages",
|
| 1080 |
+
"uninstallPackage",
|
| 1081 |
+
"union",
|
| 1082 |
+
"unique",
|
| 1083 |
+
"uniquePermutations",
|
| 1084 |
+
"unsequence",
|
| 1085 |
+
"unstack",
|
| 1086 |
+
"urlEncode",
|
| 1087 |
+
"use",
|
| 1088 |
+
"userSymbols",
|
| 1089 |
+
"utf8",
|
| 1090 |
+
"utf8check",
|
| 1091 |
+
"utf8substring",
|
| 1092 |
+
"validate",
|
| 1093 |
+
"value",
|
| 1094 |
+
"values",
|
| 1095 |
+
"variety",
|
| 1096 |
+
"vars",
|
| 1097 |
+
"vector",
|
| 1098 |
+
"versalEmbedding",
|
| 1099 |
+
"wait",
|
| 1100 |
+
"wedgeProduct",
|
| 1101 |
+
"weightRange",
|
| 1102 |
+
"whichGm",
|
| 1103 |
+
"width",
|
| 1104 |
+
"wikipedia",
|
| 1105 |
+
"wrap",
|
| 1106 |
+
"youngest",
|
| 1107 |
+
"zero",
|
| 1108 |
+
"zeta"
|
| 1109 |
+
)
|
| 1110 |
+
|
| 1111 |
+
M2CONSTANTS = (
|
| 1112 |
+
"A1BrouwerDegrees",
|
| 1113 |
+
"AbstractSimplicialComplexes",
|
| 1114 |
+
"AbstractToricVarieties",
|
| 1115 |
+
"Acknowledgement",
|
| 1116 |
+
"AdditionalPaths",
|
| 1117 |
+
"AdjointIdeal",
|
| 1118 |
+
"AdjunctionForSurfaces",
|
| 1119 |
+
"AfterEval",
|
| 1120 |
+
"AfterNoPrint",
|
| 1121 |
+
"AfterPrint",
|
| 1122 |
+
"AInfinity",
|
| 1123 |
+
"AlgebraicSplines",
|
| 1124 |
+
"Algorithm",
|
| 1125 |
+
"Alignment",
|
| 1126 |
+
"AllCodimensions",
|
| 1127 |
+
"AllMarkovBases",
|
| 1128 |
+
"allowableThreads",
|
| 1129 |
+
"AnalyzeSheafOnP1",
|
| 1130 |
+
"applicationDirectorySuffix",
|
| 1131 |
+
"argument",
|
| 1132 |
+
"Ascending",
|
| 1133 |
+
"AssociativeAlgebras",
|
| 1134 |
+
"Authors",
|
| 1135 |
+
"AuxiliaryFiles",
|
| 1136 |
+
"backtrace",
|
| 1137 |
+
"Bareiss",
|
| 1138 |
+
"Base",
|
| 1139 |
+
"BaseFunction",
|
| 1140 |
+
"baseRings",
|
| 1141 |
+
"BaseRow",
|
| 1142 |
+
"BasisElementLimit",
|
| 1143 |
+
"Bayer",
|
| 1144 |
+
"BeforePrint",
|
| 1145 |
+
"BeginningMacaulay2",
|
| 1146 |
+
"Benchmark",
|
| 1147 |
+
"BernsteinSato",
|
| 1148 |
+
"Bertini",
|
| 1149 |
+
"BettiCharacters",
|
| 1150 |
+
"BGG",
|
| 1151 |
+
"BIBasis",
|
| 1152 |
+
"Binary",
|
| 1153 |
+
"Binomial",
|
| 1154 |
+
"BinomialEdgeIdeals",
|
| 1155 |
+
"Binomials",
|
| 1156 |
+
"BKZ",
|
| 1157 |
+
"blockMatrixForm",
|
| 1158 |
+
"Body",
|
| 1159 |
+
"BoijSoederberg",
|
| 1160 |
+
"Book3264Examples",
|
| 1161 |
+
"BooleanGB",
|
| 1162 |
+
"Boxes",
|
| 1163 |
+
"Brackets",
|
| 1164 |
+
"Browse",
|
| 1165 |
+
"Bruns",
|
| 1166 |
+
"cache",
|
| 1167 |
+
"CacheExampleOutput",
|
| 1168 |
+
"CallLimit",
|
| 1169 |
+
"CannedExample",
|
| 1170 |
+
"CatalanConstant",
|
| 1171 |
+
"Caveat",
|
| 1172 |
+
"CellularResolutions",
|
| 1173 |
+
"Center",
|
| 1174 |
+
"Certification",
|
| 1175 |
+
"ChainComplexExtras",
|
| 1176 |
+
"ChainComplexOperations",
|
| 1177 |
+
"ChangeMatrix",
|
| 1178 |
+
"CharacteristicClasses",
|
| 1179 |
+
"CheckDocumentation",
|
| 1180 |
+
"Chordal",
|
| 1181 |
+
"Citation",
|
| 1182 |
+
"cite",
|
| 1183 |
+
"Classic",
|
| 1184 |
+
"clearAll",
|
| 1185 |
+
"clearOutput",
|
| 1186 |
+
"close",
|
| 1187 |
+
"closeIn",
|
| 1188 |
+
"closeOut",
|
| 1189 |
+
"ClosestFit",
|
| 1190 |
+
"Code",
|
| 1191 |
+
"CodimensionLimit",
|
| 1192 |
+
"CodingTheory",
|
| 1193 |
+
"CoefficientRing",
|
| 1194 |
+
"Cofactor",
|
| 1195 |
+
"CohenEngine",
|
| 1196 |
+
"CohenTopLevel",
|
| 1197 |
+
"CohomCalg",
|
| 1198 |
+
"CoincidentRootLoci",
|
| 1199 |
+
"commandLine",
|
| 1200 |
+
"compactMatrixForm",
|
| 1201 |
+
"Complement",
|
| 1202 |
+
"CompleteIntersection",
|
| 1203 |
+
"CompleteIntersectionResolutions",
|
| 1204 |
+
"Complexes",
|
| 1205 |
+
"ConductorElement",
|
| 1206 |
+
"Configuration",
|
| 1207 |
+
"ConformalBlocks",
|
| 1208 |
+
"ConnectionMatrices",
|
| 1209 |
+
"Consequences",
|
| 1210 |
+
"Constants",
|
| 1211 |
+
"Contributors",
|
| 1212 |
+
"ConvexInterface",
|
| 1213 |
+
"ConwayPolynomials",
|
| 1214 |
+
"copyright",
|
| 1215 |
+
"Core",
|
| 1216 |
+
"CorrespondenceScrolls",
|
| 1217 |
+
"CotangentSchubert",
|
| 1218 |
+
"cotangentSurjection",
|
| 1219 |
+
"coverageSummary",
|
| 1220 |
+
"CpMackeyFunctors",
|
| 1221 |
+
"Cremona",
|
| 1222 |
+
"currentFileDirectory",
|
| 1223 |
+
"currentFileName",
|
| 1224 |
+
"currentLayout",
|
| 1225 |
+
"currentPackage",
|
| 1226 |
+
"Cyclotomic",
|
| 1227 |
+
"Date",
|
| 1228 |
+
"dd",
|
| 1229 |
+
"DebuggingMode",
|
| 1230 |
+
"debuggingMode",
|
| 1231 |
+
"debugLevel",
|
| 1232 |
+
"DecomposableSparseSystems",
|
| 1233 |
+
"Decompose",
|
| 1234 |
+
"Default",
|
| 1235 |
+
"defaultPrecision",
|
| 1236 |
+
"Degree",
|
| 1237 |
+
"DegreeGroup",
|
| 1238 |
+
"DegreeLift",
|
| 1239 |
+
"DegreeLimit",
|
| 1240 |
+
"DegreeMap",
|
| 1241 |
+
"DegreeOrder",
|
| 1242 |
+
"DegreeRank",
|
| 1243 |
+
"Degrees",
|
| 1244 |
+
"Dense",
|
| 1245 |
+
"Density",
|
| 1246 |
+
"Depth",
|
| 1247 |
+
"Descending",
|
| 1248 |
+
"Description",
|
| 1249 |
+
"DeterminantalRepresentations",
|
| 1250 |
+
"DGAlgebras",
|
| 1251 |
+
"dictionaryPath",
|
| 1252 |
+
"DiffAlg",
|
| 1253 |
+
"Dispatch",
|
| 1254 |
+
"DivideConquer",
|
| 1255 |
+
"DividedPowers",
|
| 1256 |
+
"Dmodules",
|
| 1257 |
+
"docExample",
|
| 1258 |
+
"docTemplate",
|
| 1259 |
+
"Down",
|
| 1260 |
+
"Dynamic",
|
| 1261 |
+
"EagonResolution",
|
| 1262 |
+
"EdgeIdeals",
|
| 1263 |
+
"edit",
|
| 1264 |
+
"EigenSolver",
|
| 1265 |
+
"EisenbudHunekeVasconcelos",
|
| 1266 |
+
"Elimination",
|
| 1267 |
+
"EliminationMatrices",
|
| 1268 |
+
"EllipticCurves",
|
| 1269 |
+
"EllipticIntegrals",
|
| 1270 |
+
"Email",
|
| 1271 |
+
"embeddedToAbstract",
|
| 1272 |
+
"end",
|
| 1273 |
+
"endl",
|
| 1274 |
+
"Engine",
|
| 1275 |
+
"engineDebugLevel",
|
| 1276 |
+
"EngineTests",
|
| 1277 |
+
"EnumerationCurves",
|
| 1278 |
+
"environment",
|
| 1279 |
+
"EquivariantGB",
|
| 1280 |
+
"errorDepth",
|
| 1281 |
+
"EulerConstant",
|
| 1282 |
+
"eulerSequence",
|
| 1283 |
+
"Example",
|
| 1284 |
+
"ExampleFiles",
|
| 1285 |
+
"ExampleSystems",
|
| 1286 |
+
"Exclude",
|
| 1287 |
+
"exit",
|
| 1288 |
+
"Ext",
|
| 1289 |
+
"ExteriorExtensions",
|
| 1290 |
+
"ExteriorIdeals",
|
| 1291 |
+
"ExteriorModules",
|
| 1292 |
+
"ExtLongExactSequence",
|
| 1293 |
+
"false",
|
| 1294 |
+
"FastMinors",
|
| 1295 |
+
"FastNonminimal",
|
| 1296 |
+
"FGLM",
|
| 1297 |
+
"fileDictionaries",
|
| 1298 |
+
"fileExitHooks",
|
| 1299 |
+
"FileName",
|
| 1300 |
+
"FindOne",
|
| 1301 |
+
"FiniteFittingIdeals",
|
| 1302 |
+
"First",
|
| 1303 |
+
"FirstPackage",
|
| 1304 |
+
"FlatMonoid",
|
| 1305 |
+
"Flexible",
|
| 1306 |
+
"flush",
|
| 1307 |
+
"FollowLinks",
|
| 1308 |
+
"ForeignFunctions",
|
| 1309 |
+
"FormalGroupLaws",
|
| 1310 |
+
"Format",
|
| 1311 |
+
"FourierMotzkin",
|
| 1312 |
+
"FourTiTwo",
|
| 1313 |
+
"fpLLL",
|
| 1314 |
+
"FrobeniusThresholds",
|
| 1315 |
+
"FunctionFieldDesingularization",
|
| 1316 |
+
"GameTheory",
|
| 1317 |
+
"GBDegrees",
|
| 1318 |
+
"gbTrace",
|
| 1319 |
+
"GenerateAssertions",
|
| 1320 |
+
"Generic",
|
| 1321 |
+
"GenericInitialIdeal",
|
| 1322 |
+
"GeometricDecomposability",
|
| 1323 |
+
"gfanInterface",
|
| 1324 |
+
"Givens",
|
| 1325 |
+
"GKMVarieties",
|
| 1326 |
+
"GLex",
|
| 1327 |
+
"Global",
|
| 1328 |
+
"GlobalAssignHook",
|
| 1329 |
+
"globalAssignmentHooks",
|
| 1330 |
+
"GlobalHookStore",
|
| 1331 |
+
"GlobalReleaseHook",
|
| 1332 |
+
"GlobalSectionLimit",
|
| 1333 |
+
"Gorenstein",
|
| 1334 |
+
"GradedLieAlgebras",
|
| 1335 |
+
"GraphicalModels",
|
| 1336 |
+
"GraphicalModelsMLE",
|
| 1337 |
+
"Graphics",
|
| 1338 |
+
"Graphs",
|
| 1339 |
+
"GRevLex",
|
| 1340 |
+
"GroebnerStrata",
|
| 1341 |
+
"GroebnerWalk",
|
| 1342 |
+
"GroupLex",
|
| 1343 |
+
"GroupRevLex",
|
| 1344 |
+
"GTZ",
|
| 1345 |
+
"Hadamard",
|
| 1346 |
+
"handleInterrupts",
|
| 1347 |
+
"HardDegreeLimit",
|
| 1348 |
+
"Heading",
|
| 1349 |
+
"Headline",
|
| 1350 |
+
"Heft",
|
| 1351 |
+
"Height",
|
| 1352 |
+
"help",
|
| 1353 |
+
"Hermite",
|
| 1354 |
+
"Hermitian",
|
| 1355 |
+
"HH",
|
| 1356 |
+
"hh",
|
| 1357 |
+
"HigherCIOperators",
|
| 1358 |
+
"HighestWeights",
|
| 1359 |
+
"Hilbert",
|
| 1360 |
+
"HodgeIntegrals",
|
| 1361 |
+
"HolonomicSystems",
|
| 1362 |
+
"homeDirectory",
|
| 1363 |
+
"HomePage",
|
| 1364 |
+
"Homogeneous",
|
| 1365 |
+
"Homogeneous2",
|
| 1366 |
+
"HomologicalAlgebraPackage",
|
| 1367 |
+
"HomotopyLieAlgebra",
|
| 1368 |
+
"HorizontalSpace",
|
| 1369 |
+
"HyperplaneArrangements",
|
| 1370 |
+
"id",
|
| 1371 |
+
"idealSheafSequence",
|
| 1372 |
+
"IgnoreExampleErrors",
|
| 1373 |
+
"ii",
|
| 1374 |
+
"IncidenceCorrespondenceCohomology",
|
| 1375 |
+
"incomparable",
|
| 1376 |
+
"Increment",
|
| 1377 |
+
"indeterminate",
|
| 1378 |
+
"Index",
|
| 1379 |
+
"indexComponents",
|
| 1380 |
+
"infinity",
|
| 1381 |
+
"InfoDirSection",
|
| 1382 |
+
"infoHelp",
|
| 1383 |
+
"Inhomogeneous",
|
| 1384 |
+
"Inputs",
|
| 1385 |
+
"InstallPrefix",
|
| 1386 |
+
"IntegerProgramming",
|
| 1387 |
+
"IntegralClosure",
|
| 1388 |
+
"interpreterDepth",
|
| 1389 |
+
"Intersection",
|
| 1390 |
+
"InvariantRing",
|
| 1391 |
+
"InverseMethod",
|
| 1392 |
+
"Inverses",
|
| 1393 |
+
"InverseSystems",
|
| 1394 |
+
"Invertible",
|
| 1395 |
+
"InvolutiveBases",
|
| 1396 |
+
"Isomorphism",
|
| 1397 |
+
"Item",
|
| 1398 |
+
"Iterate",
|
| 1399 |
+
"Jacobian",
|
| 1400 |
+
"Jets",
|
| 1401 |
+
"Join",
|
| 1402 |
+
"JSON",
|
| 1403 |
+
"JSONRPC",
|
| 1404 |
+
"K3Carpets",
|
| 1405 |
+
"K3Surfaces",
|
| 1406 |
+
"Keep",
|
| 1407 |
+
"KeepFiles",
|
| 1408 |
+
"KeepZeroes",
|
| 1409 |
+
"Key",
|
| 1410 |
+
"Keywords",
|
| 1411 |
+
"Kronecker",
|
| 1412 |
+
"KustinMiller",
|
| 1413 |
+
"lastMatch",
|
| 1414 |
+
"LatticePolytopes",
|
| 1415 |
+
"Layout",
|
| 1416 |
+
"Left",
|
| 1417 |
+
"LengthLimit",
|
| 1418 |
+
"Lex",
|
| 1419 |
+
"LexIdeals",
|
| 1420 |
+
"LieAlgebraRepresentations",
|
| 1421 |
+
"Limit",
|
| 1422 |
+
"Linear",
|
| 1423 |
+
"LinearAlgebra",
|
| 1424 |
+
"LinearTruncations",
|
| 1425 |
+
"lineNumber",
|
| 1426 |
+
"listLocalSymbols",
|
| 1427 |
+
"listUserSymbols",
|
| 1428 |
+
"LLLBases",
|
| 1429 |
+
"loadDepth",
|
| 1430 |
+
"LoadDocumentation",
|
| 1431 |
+
"loadedFiles",
|
| 1432 |
+
"loadedPackages",
|
| 1433 |
+
"Local",
|
| 1434 |
+
"LocalRings",
|
| 1435 |
+
"LongPolynomial",
|
| 1436 |
+
"M0nbar",
|
| 1437 |
+
"Macaulay2Doc",
|
| 1438 |
+
"Maintainer",
|
| 1439 |
+
"MakeDocumentation",
|
| 1440 |
+
"MakeHTML",
|
| 1441 |
+
"MakeInfo",
|
| 1442 |
+
"MakePDF",
|
| 1443 |
+
"MapleInterface",
|
| 1444 |
+
"Markov",
|
| 1445 |
+
"MatchingFields",
|
| 1446 |
+
"MatrixFactorizations",
|
| 1447 |
+
"MatrixSchubert",
|
| 1448 |
+
"Matroids",
|
| 1449 |
+
"maxAllowableThreads",
|
| 1450 |
+
"maxExponent",
|
| 1451 |
+
"MaximalRank",
|
| 1452 |
+
"MaxReductionCount",
|
| 1453 |
+
"MCMApproximations",
|
| 1454 |
+
"MergeTeX",
|
| 1455 |
+
"minExponent",
|
| 1456 |
+
"MinimalGenerators",
|
| 1457 |
+
"MinimalMatrix",
|
| 1458 |
+
"minimalPresentationMap",
|
| 1459 |
+
"minimalPresentationMapInv",
|
| 1460 |
+
"MinimalPrimes",
|
| 1461 |
+
"Minimize",
|
| 1462 |
+
"MinimumVersion",
|
| 1463 |
+
"Miura",
|
| 1464 |
+
"MixedMultiplicity",
|
| 1465 |
+
"ModuleDeformations",
|
| 1466 |
+
"MonodromySolver",
|
| 1467 |
+
"Monomial",
|
| 1468 |
+
"MonomialAlgebras",
|
| 1469 |
+
"MonomialIntegerPrograms",
|
| 1470 |
+
"MonomialOrbits",
|
| 1471 |
+
"MonomialOrder",
|
| 1472 |
+
"Monomials",
|
| 1473 |
+
"MonomialSize",
|
| 1474 |
+
"Msolve",
|
| 1475 |
+
"MultigradedBGG",
|
| 1476 |
+
"MultigradedImplicitization",
|
| 1477 |
+
"MultiGradedRationalMap",
|
| 1478 |
+
"MultiplicitySequence",
|
| 1479 |
+
"MultiplierIdeals",
|
| 1480 |
+
"MultiplierIdealsDim2",
|
| 1481 |
+
"MultiprojectiveVarieties",
|
| 1482 |
+
"NAGtypes",
|
| 1483 |
+
"Name",
|
| 1484 |
+
"Nauty",
|
| 1485 |
+
"NautyGraphs",
|
| 1486 |
+
"NCAlgebra",
|
| 1487 |
+
"NCLex",
|
| 1488 |
+
"NewFromMethod",
|
| 1489 |
+
"newline",
|
| 1490 |
+
"NewMethod",
|
| 1491 |
+
"NewOfFromMethod",
|
| 1492 |
+
"NewOfMethod",
|
| 1493 |
+
"nil",
|
| 1494 |
+
"Node",
|
| 1495 |
+
"NoetherianOperators",
|
| 1496 |
+
"NoetherNormalization",
|
| 1497 |
+
"NonminimalComplexes",
|
| 1498 |
+
"NonPrincipalTestIdeals",
|
| 1499 |
+
"NoPrint",
|
| 1500 |
+
"Normaliz",
|
| 1501 |
+
"NormalToricVarieties",
|
| 1502 |
+
"NotANumber",
|
| 1503 |
+
"notify",
|
| 1504 |
+
"NTL",
|
| 1505 |
+
"null",
|
| 1506 |
+
"nullaryMethods",
|
| 1507 |
+
"NumericalAlgebraicGeometry",
|
| 1508 |
+
"NumericalCertification",
|
| 1509 |
+
"NumericalImplicitization",
|
| 1510 |
+
"NumericalLinearAlgebra",
|
| 1511 |
+
"NumericalSchubertCalculus",
|
| 1512 |
+
"NumericalSemigroups",
|
| 1513 |
+
"NumericSolutions",
|
| 1514 |
+
"numTBBThreads",
|
| 1515 |
+
"OIGroebnerBases",
|
| 1516 |
+
"OldChainComplexes",
|
| 1517 |
+
"OldPolyhedra",
|
| 1518 |
+
"OldToricVectorBundles",
|
| 1519 |
+
"OnlineLookup",
|
| 1520 |
+
"OO",
|
| 1521 |
+
"oo",
|
| 1522 |
+
"ooo",
|
| 1523 |
+
"oooo",
|
| 1524 |
+
"OpenMath",
|
| 1525 |
+
"operatorAttributes",
|
| 1526 |
+
"OptionalComponentsPresent",
|
| 1527 |
+
"Options",
|
| 1528 |
+
"Order",
|
| 1529 |
+
"order",
|
| 1530 |
+
"Oscillators",
|
| 1531 |
+
"OutputDictionary",
|
| 1532 |
+
"Outputs",
|
| 1533 |
+
"PackageCitations",
|
| 1534 |
+
"PackageDictionary",
|
| 1535 |
+
"PackageExports",
|
| 1536 |
+
"PackageImports",
|
| 1537 |
+
"PackageTemplate",
|
| 1538 |
+
"PairLimit",
|
| 1539 |
+
"PairsRemaining",
|
| 1540 |
+
"ParallelF4",
|
| 1541 |
+
"ParallelizeByDegree",
|
| 1542 |
+
"Parametrization",
|
| 1543 |
+
"Parsing",
|
| 1544 |
+
"path",
|
| 1545 |
+
"PathSignatures",
|
| 1546 |
+
"PencilsOfQuadrics",
|
| 1547 |
+
"Permanents",
|
| 1548 |
+
"Permutations",
|
| 1549 |
+
"PHCpack",
|
| 1550 |
+
"PhylogeneticTrees",
|
| 1551 |
+
"pi",
|
| 1552 |
+
"PieriMaps",
|
| 1553 |
+
"PlaneCurveLinearSeries",
|
| 1554 |
+
"PlaneCurveSingularities",
|
| 1555 |
+
"Points",
|
| 1556 |
+
"Polyhedra",
|
| 1557 |
+
"Polymake",
|
| 1558 |
+
"PolyominoIdeals",
|
| 1559 |
+
"Posets",
|
| 1560 |
+
"Position",
|
| 1561 |
+
"PositivityToricBundles",
|
| 1562 |
+
"POSIX",
|
| 1563 |
+
"Postfix",
|
| 1564 |
+
"Pre",
|
| 1565 |
+
"Precision",
|
| 1566 |
+
"Prefix",
|
| 1567 |
+
"prefixDirectory",
|
| 1568 |
+
"prefixPath",
|
| 1569 |
+
"PrimaryDecomposition",
|
| 1570 |
+
"PrimaryTag",
|
| 1571 |
+
"PrimitiveElement",
|
| 1572 |
+
"Print",
|
| 1573 |
+
"printingAccuracy",
|
| 1574 |
+
"printingLeadLimit",
|
| 1575 |
+
"printingPrecision",
|
| 1576 |
+
"printingSeparator",
|
| 1577 |
+
"printingTimeLimit",
|
| 1578 |
+
"printingTrailLimit",
|
| 1579 |
+
"printWidth",
|
| 1580 |
+
"Probability",
|
| 1581 |
+
"profileSummary",
|
| 1582 |
+
"programPaths",
|
| 1583 |
+
"Projective",
|
| 1584 |
+
"Prune",
|
| 1585 |
+
"PruneComplex",
|
| 1586 |
+
"pruningMap",
|
| 1587 |
+
"PseudomonomialPrimaryDecomposition",
|
| 1588 |
+
"Pullback",
|
| 1589 |
+
"pullbackMaps",
|
| 1590 |
+
"PushForward",
|
| 1591 |
+
"pushoutMaps",
|
| 1592 |
+
"Python",
|
| 1593 |
+
"QthPower",
|
| 1594 |
+
"QuadraticIdealExamplesByRoos",
|
| 1595 |
+
"Quasidegrees",
|
| 1596 |
+
"QuaternaryQuartics",
|
| 1597 |
+
"QuillenSuslin",
|
| 1598 |
+
"quit",
|
| 1599 |
+
"Quotient",
|
| 1600 |
+
"Radical",
|
| 1601 |
+
"RadicalCodim1",
|
| 1602 |
+
"RaiseError",
|
| 1603 |
+
"RandomCanonicalCurves",
|
| 1604 |
+
"RandomComplexes",
|
| 1605 |
+
"RandomCurves",
|
| 1606 |
+
"RandomCurvesOverVerySmallFiniteFields",
|
| 1607 |
+
"RandomGenus14Curves",
|
| 1608 |
+
"RandomIdeals",
|
| 1609 |
+
"RandomMonomialIdeals",
|
| 1610 |
+
"RandomObjects",
|
| 1611 |
+
"RandomPlaneCurves",
|
| 1612 |
+
"RandomPoints",
|
| 1613 |
+
"RandomSpaceCurves",
|
| 1614 |
+
"Range",
|
| 1615 |
+
"RationalMaps",
|
| 1616 |
+
"RationalPoints",
|
| 1617 |
+
"RationalPoints2",
|
| 1618 |
+
"ReactionNetworks",
|
| 1619 |
+
"RealFP",
|
| 1620 |
+
"RealQP",
|
| 1621 |
+
"RealQP1",
|
| 1622 |
+
"RealRoots",
|
| 1623 |
+
"RealRR",
|
| 1624 |
+
"RealXD",
|
| 1625 |
+
"recursionLimit",
|
| 1626 |
+
"Reduce",
|
| 1627 |
+
"ReesAlgebra",
|
| 1628 |
+
"References",
|
| 1629 |
+
"ReflexivePolytopesDB",
|
| 1630 |
+
"Regularity",
|
| 1631 |
+
"RelativeCanonicalResolution",
|
| 1632 |
+
"Reload",
|
| 1633 |
+
"RemakeAllDocumentation",
|
| 1634 |
+
"RerunExamples",
|
| 1635 |
+
"ResidualIntersections",
|
| 1636 |
+
"ResLengthThree",
|
| 1637 |
+
"ResolutionsOfStanleyReisnerRings",
|
| 1638 |
+
"restart",
|
| 1639 |
+
"Result",
|
| 1640 |
+
"Resultants",
|
| 1641 |
+
"returnCode",
|
| 1642 |
+
"Reverse",
|
| 1643 |
+
"RevLex",
|
| 1644 |
+
"RHom",
|
| 1645 |
+
"Right",
|
| 1646 |
+
"RInterface",
|
| 1647 |
+
"rootPath",
|
| 1648 |
+
"rootURI",
|
| 1649 |
+
"RunDirectory",
|
| 1650 |
+
"RunExamples",
|
| 1651 |
+
"RunExternalM2",
|
| 1652 |
+
"SagbiGbDetection",
|
| 1653 |
+
"Saturation",
|
| 1654 |
+
"SaturationMap",
|
| 1655 |
+
"Schubert2",
|
| 1656 |
+
"SchurComplexes",
|
| 1657 |
+
"SchurFunctors",
|
| 1658 |
+
"SchurRings",
|
| 1659 |
+
"SchurVeronese",
|
| 1660 |
+
"SCMAlgebras",
|
| 1661 |
+
"scriptCommandLine",
|
| 1662 |
+
"SCSCP",
|
| 1663 |
+
"SectionRing",
|
| 1664 |
+
"SeeAlso",
|
| 1665 |
+
"SegreClasses",
|
| 1666 |
+
"SemidefiniteProgramming",
|
| 1667 |
+
"Seminormalization",
|
| 1668 |
+
"SeparateExec",
|
| 1669 |
+
"Serialization",
|
| 1670 |
+
"sheafExt",
|
| 1671 |
+
"ShimoyamaYokoyama",
|
| 1672 |
+
"showClassStructure",
|
| 1673 |
+
"showStructure",
|
| 1674 |
+
"showUserStructure",
|
| 1675 |
+
"SimpleDoc",
|
| 1676 |
+
"SimplicialComplexes",
|
| 1677 |
+
"SimplicialDecomposability",
|
| 1678 |
+
"SimplicialPosets",
|
| 1679 |
+
"SimplifyFractions",
|
| 1680 |
+
"SizeLimit",
|
| 1681 |
+
"SkewCommutative",
|
| 1682 |
+
"SlackIdeals",
|
| 1683 |
+
"SLnEquivariantMatrices",
|
| 1684 |
+
"SLPexpressions",
|
| 1685 |
+
"Sort",
|
| 1686 |
+
"SortStrategy",
|
| 1687 |
+
"SourceCode",
|
| 1688 |
+
"SourceRing",
|
| 1689 |
+
"SpaceCurves",
|
| 1690 |
+
"SparseResultants",
|
| 1691 |
+
"SpechtModule",
|
| 1692 |
+
"SpecialFanoFourfolds",
|
| 1693 |
+
"SpectralSequences",
|
| 1694 |
+
"SRdeformations",
|
| 1695 |
+
"Standard",
|
| 1696 |
+
"StartWithOneMinor",
|
| 1697 |
+
"StatePolytope",
|
| 1698 |
+
"StatGraphs",
|
| 1699 |
+
"stderr",
|
| 1700 |
+
"stdio",
|
| 1701 |
+
"StopBeforeComputation",
|
| 1702 |
+
"stopIfError",
|
| 1703 |
+
"StopIteration",
|
| 1704 |
+
"StopWithMinimalGenerators",
|
| 1705 |
+
"Strategy",
|
| 1706 |
+
"Strict",
|
| 1707 |
+
"StronglyStableIdeals",
|
| 1708 |
+
"Style",
|
| 1709 |
+
"SubalgebraBases",
|
| 1710 |
+
"Subnodes",
|
| 1711 |
+
"SubringLimit",
|
| 1712 |
+
"subscript",
|
| 1713 |
+
"Sugarless",
|
| 1714 |
+
"SumsOfSquares",
|
| 1715 |
+
"SuperLinearAlgebra",
|
| 1716 |
+
"superscript",
|
| 1717 |
+
"SVDComplexes",
|
| 1718 |
+
"SwitchingFields",
|
| 1719 |
+
"SymbolicPowers",
|
| 1720 |
+
"SymmetricPolynomials",
|
| 1721 |
+
"Synopsis",
|
| 1722 |
+
"Syzygies",
|
| 1723 |
+
"SyzygyLimit",
|
| 1724 |
+
"SyzygyMatrix",
|
| 1725 |
+
"SyzygyRows",
|
| 1726 |
+
"Tableaux",
|
| 1727 |
+
"TangentCone",
|
| 1728 |
+
"TateOnProducts",
|
| 1729 |
+
"TensorComplexes",
|
| 1730 |
+
"TerraciniLoci",
|
| 1731 |
+
"Test",
|
| 1732 |
+
"testExample",
|
| 1733 |
+
"TestIdeals",
|
| 1734 |
+
"TeXmacs",
|
| 1735 |
+
"Text",
|
| 1736 |
+
"ThinSincereQuivers",
|
| 1737 |
+
"ThreadedGB",
|
| 1738 |
+
"Threads",
|
| 1739 |
+
"Threshold",
|
| 1740 |
+
"Topcom",
|
| 1741 |
+
"topLevelMode",
|
| 1742 |
+
"Tor",
|
| 1743 |
+
"TorAlgebra",
|
| 1744 |
+
"Toric",
|
| 1745 |
+
"ToricHigherDirectImages",
|
| 1746 |
+
"ToricInvariants",
|
| 1747 |
+
"ToricTopology",
|
| 1748 |
+
"ToricVectorBundles",
|
| 1749 |
+
"Torsion",
|
| 1750 |
+
"TorsionFree",
|
| 1751 |
+
"TotalPairs",
|
| 1752 |
+
"Tree",
|
| 1753 |
+
"TriangularSets",
|
| 1754 |
+
"Triangulations",
|
| 1755 |
+
"Tries",
|
| 1756 |
+
"Trim",
|
| 1757 |
+
"Triplets",
|
| 1758 |
+
"Tropical",
|
| 1759 |
+
"TropicalToric",
|
| 1760 |
+
"true",
|
| 1761 |
+
"Truncate",
|
| 1762 |
+
"Truncations",
|
| 1763 |
+
"TSpreadIdeals",
|
| 1764 |
+
"TypicalValue",
|
| 1765 |
+
"typicalValues",
|
| 1766 |
+
"Undo",
|
| 1767 |
+
"Unique",
|
| 1768 |
+
"Units",
|
| 1769 |
+
"Unmixed",
|
| 1770 |
+
"Up",
|
| 1771 |
+
"UpdateOnly",
|
| 1772 |
+
"UpperTriangular",
|
| 1773 |
+
"Usage",
|
| 1774 |
+
"UseCachedExampleOutput",
|
| 1775 |
+
"UseHilbertFunction",
|
| 1776 |
+
"UserMode",
|
| 1777 |
+
"UseSyzygies",
|
| 1778 |
+
"Valuations",
|
| 1779 |
+
"Variable",
|
| 1780 |
+
"VariableBaseName",
|
| 1781 |
+
"Variables",
|
| 1782 |
+
"Varieties",
|
| 1783 |
+
"Vasconcelos",
|
| 1784 |
+
"VectorFields",
|
| 1785 |
+
"VectorGraphics",
|
| 1786 |
+
"Verbose",
|
| 1787 |
+
"Verbosity",
|
| 1788 |
+
"Verify",
|
| 1789 |
+
"VersalDeformations",
|
| 1790 |
+
"Version",
|
| 1791 |
+
"version",
|
| 1792 |
+
"VerticalSpace",
|
| 1793 |
+
"viewHelp",
|
| 1794 |
+
"VirtualResolutions",
|
| 1795 |
+
"Visualize",
|
| 1796 |
+
"VNumber",
|
| 1797 |
+
"WebApp",
|
| 1798 |
+
"Weights",
|
| 1799 |
+
"WeilDivisors",
|
| 1800 |
+
"WeylAlgebra",
|
| 1801 |
+
"WeylAlgebras",
|
| 1802 |
+
"WeylGroups",
|
| 1803 |
+
"WhitneyStratifications",
|
| 1804 |
+
"Wrap",
|
| 1805 |
+
"XML",
|
| 1806 |
+
"yonedaSheafExtension"
|
| 1807 |
+
)
|
| 1808 |
+
|
| 1809 |
+
class Macaulay2Lexer(RegexLexer):
|
| 1810 |
+
"""Lexer for Macaulay2, a software system for research in algebraic geometry."""
|
| 1811 |
+
|
| 1812 |
+
name = 'Macaulay2'
|
| 1813 |
+
url = 'https://macaulay2.com/'
|
| 1814 |
+
aliases = ['macaulay2']
|
| 1815 |
+
filenames = ['*.m2']
|
| 1816 |
+
version_added = '2.12'
|
| 1817 |
+
|
| 1818 |
+
tokens = {
|
| 1819 |
+
'root': [
|
| 1820 |
+
(r'--.*$', Comment.Single),
|
| 1821 |
+
(r'-\*', Comment.Multiline, 'block comment'),
|
| 1822 |
+
(r'"', String, 'quote string'),
|
| 1823 |
+
(r'///', String, 'slash string'),
|
| 1824 |
+
(words(M2KEYWORDS, prefix=r'\b', suffix=r'\b'), Keyword),
|
| 1825 |
+
(words(M2DATATYPES, prefix=r'\b', suffix=r'\b'), Name.Builtin),
|
| 1826 |
+
(words(M2FUNCTIONS, prefix=r'\b', suffix=r'\b'), Name.Function),
|
| 1827 |
+
(words(M2CONSTANTS, prefix=r'\b', suffix=r'\b'), Name.Constant),
|
| 1828 |
+
(r'\s+', Text.Whitespace),
|
| 1829 |
+
(r'.', Text)
|
| 1830 |
+
],
|
| 1831 |
+
'block comment' : [
|
| 1832 |
+
(r'[^*-]+', Comment.Multiline),
|
| 1833 |
+
(r'\*-', Comment.Multiline, '#pop'),
|
| 1834 |
+
(r'[*-]', Comment.Multiline)
|
| 1835 |
+
],
|
| 1836 |
+
'quote string' : [
|
| 1837 |
+
(r'[^\\"]+', String),
|
| 1838 |
+
(r'"', String, '#pop'),
|
| 1839 |
+
(r'\\"?', String),
|
| 1840 |
+
],
|
| 1841 |
+
'slash string' : [
|
| 1842 |
+
(r'[^/]+', String),
|
| 1843 |
+
(r'(//)+(?!/)', String),
|
| 1844 |
+
(r'/(//)+(?!/)', String, '#pop'),
|
| 1845 |
+
(r'/', String)
|
| 1846 |
+
]
|
| 1847 |
+
}
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/math.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.math
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Just export lexers that were contained in this module.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
# ruff: noqa: F401
|
| 12 |
+
from pygments.lexers.python import NumPyLexer
|
| 13 |
+
from pygments.lexers.matlab import MatlabLexer, MatlabSessionLexer, \
|
| 14 |
+
OctaveLexer, ScilabLexer
|
| 15 |
+
from pygments.lexers.julia import JuliaLexer, JuliaConsoleLexer
|
| 16 |
+
from pygments.lexers.r import RConsoleLexer, SLexer, RdLexer
|
| 17 |
+
from pygments.lexers.modeling import BugsLexer, JagsLexer, StanLexer
|
| 18 |
+
from pygments.lexers.idl import IDLLexer
|
| 19 |
+
from pygments.lexers.algebra import MuPADLexer
|
| 20 |
+
|
| 21 |
+
__all__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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.mime
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexer for Multipurpose Internet Mail Extensions (MIME) data.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
import re
|
| 12 |
+
|
| 13 |
+
from pygments.lexer import RegexLexer, include
|
| 14 |
+
from pygments.lexers import get_lexer_for_mimetype
|
| 15 |
+
from pygments.token import Text, Name, String, Operator, Comment, Other
|
| 16 |
+
from pygments.util import get_int_opt, ClassNotFound
|
| 17 |
+
|
| 18 |
+
__all__ = ["MIMELexer"]
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class MIMELexer(RegexLexer):
|
| 22 |
+
"""
|
| 23 |
+
Lexer for Multipurpose Internet Mail Extensions (MIME) data. This lexer is
|
| 24 |
+
designed to process nested multipart data.
|
| 25 |
+
|
| 26 |
+
It assumes that the given data contains both header and body (and is
|
| 27 |
+
split at an empty line). If no valid header is found, then the entire data
|
| 28 |
+
will be treated as body.
|
| 29 |
+
|
| 30 |
+
Additional options accepted:
|
| 31 |
+
|
| 32 |
+
`MIME-max-level`
|
| 33 |
+
Max recursion level for nested MIME structure. Any negative number
|
| 34 |
+
would treated as unlimited. (default: -1)
|
| 35 |
+
|
| 36 |
+
`Content-Type`
|
| 37 |
+
Treat the data as a specific content type. Useful when header is
|
| 38 |
+
missing, or this lexer would try to parse from header. (default:
|
| 39 |
+
`text/plain`)
|
| 40 |
+
|
| 41 |
+
`Multipart-Boundary`
|
| 42 |
+
Set the default multipart boundary delimiter. This option is only used
|
| 43 |
+
when `Content-Type` is `multipart` and header is missing. This lexer
|
| 44 |
+
would try to parse from header by default. (default: None)
|
| 45 |
+
|
| 46 |
+
`Content-Transfer-Encoding`
|
| 47 |
+
Treat the data as a specific encoding. Or this lexer would try to parse
|
| 48 |
+
from header by default. (default: None)
|
| 49 |
+
"""
|
| 50 |
+
|
| 51 |
+
name = "MIME"
|
| 52 |
+
aliases = ["mime"]
|
| 53 |
+
mimetypes = ["multipart/mixed",
|
| 54 |
+
"multipart/related",
|
| 55 |
+
"multipart/alternative"]
|
| 56 |
+
url = 'https://en.wikipedia.org/wiki/MIME'
|
| 57 |
+
version_added = '2.5'
|
| 58 |
+
|
| 59 |
+
def __init__(self, **options):
|
| 60 |
+
super().__init__(**options)
|
| 61 |
+
self.boundary = options.get("Multipart-Boundary")
|
| 62 |
+
self.content_transfer_encoding = options.get("Content_Transfer_Encoding")
|
| 63 |
+
self.content_type = options.get("Content_Type", "text/plain")
|
| 64 |
+
self.max_nested_level = get_int_opt(options, "MIME-max-level", -1)
|
| 65 |
+
|
| 66 |
+
def get_header_tokens(self, match):
|
| 67 |
+
field = match.group(1)
|
| 68 |
+
|
| 69 |
+
if field.lower() in self.attention_headers:
|
| 70 |
+
yield match.start(1), Name.Tag, field + ":"
|
| 71 |
+
yield match.start(2), Text.Whitespace, match.group(2)
|
| 72 |
+
|
| 73 |
+
pos = match.end(2)
|
| 74 |
+
body = match.group(3)
|
| 75 |
+
for i, t, v in self.get_tokens_unprocessed(body, ("root", field.lower())):
|
| 76 |
+
yield pos + i, t, v
|
| 77 |
+
|
| 78 |
+
else:
|
| 79 |
+
yield match.start(), Comment, match.group()
|
| 80 |
+
|
| 81 |
+
def get_body_tokens(self, match):
|
| 82 |
+
pos_body_start = match.start()
|
| 83 |
+
entire_body = match.group()
|
| 84 |
+
|
| 85 |
+
# skip first newline
|
| 86 |
+
if entire_body[0] == '\n':
|
| 87 |
+
yield pos_body_start, Text.Whitespace, '\n'
|
| 88 |
+
pos_body_start = pos_body_start + 1
|
| 89 |
+
entire_body = entire_body[1:]
|
| 90 |
+
|
| 91 |
+
# if it is not a multipart
|
| 92 |
+
if not self.content_type.startswith("multipart") or not self.boundary:
|
| 93 |
+
for i, t, v in self.get_bodypart_tokens(entire_body):
|
| 94 |
+
yield pos_body_start + i, t, v
|
| 95 |
+
return
|
| 96 |
+
|
| 97 |
+
# find boundary
|
| 98 |
+
bdry_pattern = rf"^--{re.escape(self.boundary)}(--)?\n"
|
| 99 |
+
bdry_matcher = re.compile(bdry_pattern, re.MULTILINE)
|
| 100 |
+
|
| 101 |
+
# some data has prefix text before first boundary
|
| 102 |
+
m = bdry_matcher.search(entire_body)
|
| 103 |
+
if m:
|
| 104 |
+
pos_part_start = pos_body_start + m.end()
|
| 105 |
+
pos_iter_start = lpos_end = m.end()
|
| 106 |
+
yield pos_body_start, Text, entire_body[:m.start()]
|
| 107 |
+
yield pos_body_start + lpos_end, String.Delimiter, m.group()
|
| 108 |
+
else:
|
| 109 |
+
pos_part_start = pos_body_start
|
| 110 |
+
pos_iter_start = 0
|
| 111 |
+
|
| 112 |
+
# process tokens of each body part
|
| 113 |
+
for m in bdry_matcher.finditer(entire_body, pos_iter_start):
|
| 114 |
+
# bodypart
|
| 115 |
+
lpos_start = pos_part_start - pos_body_start
|
| 116 |
+
lpos_end = m.start()
|
| 117 |
+
part = entire_body[lpos_start:lpos_end]
|
| 118 |
+
for i, t, v in self.get_bodypart_tokens(part):
|
| 119 |
+
yield pos_part_start + i, t, v
|
| 120 |
+
|
| 121 |
+
# boundary
|
| 122 |
+
yield pos_body_start + lpos_end, String.Delimiter, m.group()
|
| 123 |
+
pos_part_start = pos_body_start + m.end()
|
| 124 |
+
|
| 125 |
+
# some data has suffix text after last boundary
|
| 126 |
+
lpos_start = pos_part_start - pos_body_start
|
| 127 |
+
if lpos_start != len(entire_body):
|
| 128 |
+
yield pos_part_start, Text, entire_body[lpos_start:]
|
| 129 |
+
|
| 130 |
+
def get_bodypart_tokens(self, text):
|
| 131 |
+
# return if:
|
| 132 |
+
# * no content
|
| 133 |
+
# * no content type specific
|
| 134 |
+
# * content encoding is not readable
|
| 135 |
+
# * max recurrsion exceed
|
| 136 |
+
if not text.strip() or not self.content_type:
|
| 137 |
+
return [(0, Other, text)]
|
| 138 |
+
|
| 139 |
+
cte = self.content_transfer_encoding
|
| 140 |
+
if cte and cte not in {"8bit", "7bit", "quoted-printable"}:
|
| 141 |
+
return [(0, Other, text)]
|
| 142 |
+
|
| 143 |
+
if self.max_nested_level == 0:
|
| 144 |
+
return [(0, Other, text)]
|
| 145 |
+
|
| 146 |
+
# get lexer
|
| 147 |
+
try:
|
| 148 |
+
lexer = get_lexer_for_mimetype(self.content_type)
|
| 149 |
+
except ClassNotFound:
|
| 150 |
+
return [(0, Other, text)]
|
| 151 |
+
|
| 152 |
+
if isinstance(lexer, type(self)):
|
| 153 |
+
lexer.max_nested_level = self.max_nested_level - 1
|
| 154 |
+
|
| 155 |
+
return lexer.get_tokens_unprocessed(text)
|
| 156 |
+
|
| 157 |
+
def store_content_type(self, match):
|
| 158 |
+
self.content_type = match.group(1)
|
| 159 |
+
|
| 160 |
+
prefix_len = match.start(1) - match.start(0)
|
| 161 |
+
yield match.start(0), Text.Whitespace, match.group(0)[:prefix_len]
|
| 162 |
+
yield match.start(1), Name.Label, match.group(2)
|
| 163 |
+
yield match.end(2), String.Delimiter, '/'
|
| 164 |
+
yield match.start(3), Name.Label, match.group(3)
|
| 165 |
+
|
| 166 |
+
def get_content_type_subtokens(self, match):
|
| 167 |
+
yield match.start(1), Text, match.group(1)
|
| 168 |
+
yield match.start(2), Text.Whitespace, match.group(2)
|
| 169 |
+
yield match.start(3), Name.Attribute, match.group(3)
|
| 170 |
+
yield match.start(4), Operator, match.group(4)
|
| 171 |
+
yield match.start(5), String, match.group(5)
|
| 172 |
+
|
| 173 |
+
if match.group(3).lower() == "boundary":
|
| 174 |
+
boundary = match.group(5).strip()
|
| 175 |
+
if boundary[0] == '"' and boundary[-1] == '"':
|
| 176 |
+
boundary = boundary[1:-1]
|
| 177 |
+
self.boundary = boundary
|
| 178 |
+
|
| 179 |
+
def store_content_transfer_encoding(self, match):
|
| 180 |
+
self.content_transfer_encoding = match.group(0).lower()
|
| 181 |
+
yield match.start(0), Name.Constant, match.group(0)
|
| 182 |
+
|
| 183 |
+
attention_headers = {"content-type", "content-transfer-encoding"}
|
| 184 |
+
|
| 185 |
+
tokens = {
|
| 186 |
+
"root": [
|
| 187 |
+
(r"^([\w-]+):( *)([\s\S]*?\n)(?![ \t])", get_header_tokens),
|
| 188 |
+
(r"^$[\s\S]+", get_body_tokens),
|
| 189 |
+
],
|
| 190 |
+
"header": [
|
| 191 |
+
# folding
|
| 192 |
+
(r"\n[ \t]", Text.Whitespace),
|
| 193 |
+
(r"\n(?![ \t])", Text.Whitespace, "#pop"),
|
| 194 |
+
],
|
| 195 |
+
"content-type": [
|
| 196 |
+
include("header"),
|
| 197 |
+
(
|
| 198 |
+
r"^\s*((multipart|application|audio|font|image|model|text|video"
|
| 199 |
+
r"|message)/([\w-]+))",
|
| 200 |
+
store_content_type,
|
| 201 |
+
),
|
| 202 |
+
(r'(;)((?:[ \t]|\n[ \t])*)([\w:-]+)(=)([\s\S]*?)(?=;|\n(?![ \t]))',
|
| 203 |
+
get_content_type_subtokens),
|
| 204 |
+
(r';[ \t]*\n(?![ \t])', Text, '#pop'),
|
| 205 |
+
],
|
| 206 |
+
"content-transfer-encoding": [
|
| 207 |
+
include("header"),
|
| 208 |
+
(r"([\w-]+)", store_content_transfer_encoding),
|
| 209 |
+
],
|
| 210 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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.ml
|
| 3 |
+
~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexers for ML family languages.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
import re
|
| 12 |
+
|
| 13 |
+
from pygments.lexer import RegexLexer, include, bygroups, default, words
|
| 14 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 15 |
+
Number, Punctuation, Error
|
| 16 |
+
|
| 17 |
+
__all__ = ['SMLLexer', 'OcamlLexer', 'OpaLexer', 'ReasonLexer', 'FStarLexer']
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class SMLLexer(RegexLexer):
|
| 21 |
+
"""
|
| 22 |
+
For the Standard ML language.
|
| 23 |
+
"""
|
| 24 |
+
|
| 25 |
+
name = 'Standard ML'
|
| 26 |
+
aliases = ['sml']
|
| 27 |
+
filenames = ['*.sml', '*.sig', '*.fun']
|
| 28 |
+
mimetypes = ['text/x-standardml', 'application/x-standardml']
|
| 29 |
+
url = 'https://en.wikipedia.org/wiki/Standard_ML'
|
| 30 |
+
version_added = '1.5'
|
| 31 |
+
|
| 32 |
+
alphanumid_reserved = {
|
| 33 |
+
# Core
|
| 34 |
+
'abstype', 'and', 'andalso', 'as', 'case', 'datatype', 'do', 'else',
|
| 35 |
+
'end', 'exception', 'fn', 'fun', 'handle', 'if', 'in', 'infix',
|
| 36 |
+
'infixr', 'let', 'local', 'nonfix', 'of', 'op', 'open', 'orelse',
|
| 37 |
+
'raise', 'rec', 'then', 'type', 'val', 'with', 'withtype', 'while',
|
| 38 |
+
# Modules
|
| 39 |
+
'eqtype', 'functor', 'include', 'sharing', 'sig', 'signature',
|
| 40 |
+
'struct', 'structure', 'where',
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
symbolicid_reserved = {
|
| 44 |
+
# Core
|
| 45 |
+
':', r'\|', '=', '=>', '->', '#',
|
| 46 |
+
# Modules
|
| 47 |
+
':>',
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
nonid_reserved = {'(', ')', '[', ']', '{', '}', ',', ';', '...', '_'}
|
| 51 |
+
|
| 52 |
+
alphanumid_re = r"[a-zA-Z][\w']*"
|
| 53 |
+
symbolicid_re = r"[!%&$#+\-/:<=>?@\\~`^|*]+"
|
| 54 |
+
|
| 55 |
+
# A character constant is a sequence of the form #s, where s is a string
|
| 56 |
+
# constant denoting a string of size one character. This setup just parses
|
| 57 |
+
# the entire string as either a String.Double or a String.Char (depending
|
| 58 |
+
# on the argument), even if the String.Char is an erroneous
|
| 59 |
+
# multiple-character string.
|
| 60 |
+
def stringy(whatkind):
|
| 61 |
+
return [
|
| 62 |
+
(r'[^"\\]', whatkind),
|
| 63 |
+
(r'\\[\\"abtnvfr]', String.Escape),
|
| 64 |
+
# Control-character notation is used for codes < 32,
|
| 65 |
+
# where \^@ == \000
|
| 66 |
+
(r'\\\^[\x40-\x5e]', String.Escape),
|
| 67 |
+
# Docs say 'decimal digits'
|
| 68 |
+
(r'\\[0-9]{3}', String.Escape),
|
| 69 |
+
(r'\\u[0-9a-fA-F]{4}', String.Escape),
|
| 70 |
+
(r'\\\s+\\', String.Interpol),
|
| 71 |
+
(r'"', whatkind, '#pop'),
|
| 72 |
+
]
|
| 73 |
+
|
| 74 |
+
# Callbacks for distinguishing tokens and reserved words
|
| 75 |
+
def long_id_callback(self, match):
|
| 76 |
+
if match.group(1) in self.alphanumid_reserved:
|
| 77 |
+
token = Error
|
| 78 |
+
else:
|
| 79 |
+
token = Name.Namespace
|
| 80 |
+
yield match.start(1), token, match.group(1)
|
| 81 |
+
yield match.start(2), Punctuation, match.group(2)
|
| 82 |
+
|
| 83 |
+
def end_id_callback(self, match):
|
| 84 |
+
if match.group(1) in self.alphanumid_reserved:
|
| 85 |
+
token = Error
|
| 86 |
+
elif match.group(1) in self.symbolicid_reserved:
|
| 87 |
+
token = Error
|
| 88 |
+
else:
|
| 89 |
+
token = Name
|
| 90 |
+
yield match.start(1), token, match.group(1)
|
| 91 |
+
|
| 92 |
+
def id_callback(self, match):
|
| 93 |
+
str = match.group(1)
|
| 94 |
+
if str in self.alphanumid_reserved:
|
| 95 |
+
token = Keyword.Reserved
|
| 96 |
+
elif str in self.symbolicid_reserved:
|
| 97 |
+
token = Punctuation
|
| 98 |
+
else:
|
| 99 |
+
token = Name
|
| 100 |
+
yield match.start(1), token, str
|
| 101 |
+
|
| 102 |
+
tokens = {
|
| 103 |
+
# Whitespace and comments are (almost) everywhere
|
| 104 |
+
'whitespace': [
|
| 105 |
+
(r'\s+', Text),
|
| 106 |
+
(r'\(\*', Comment.Multiline, 'comment'),
|
| 107 |
+
],
|
| 108 |
+
|
| 109 |
+
'delimiters': [
|
| 110 |
+
# This lexer treats these delimiters specially:
|
| 111 |
+
# Delimiters define scopes, and the scope is how the meaning of
|
| 112 |
+
# the `|' is resolved - is it a case/handle expression, or function
|
| 113 |
+
# definition by cases? (This is not how the Definition works, but
|
| 114 |
+
# it's how MLton behaves, see http://mlton.org/SMLNJDeviations)
|
| 115 |
+
(r'\(|\[|\{', Punctuation, 'main'),
|
| 116 |
+
(r'\)|\]|\}', Punctuation, '#pop'),
|
| 117 |
+
(r'\b(let|if|local)\b(?!\')', Keyword.Reserved, ('main', 'main')),
|
| 118 |
+
(r'\b(struct|sig|while)\b(?!\')', Keyword.Reserved, 'main'),
|
| 119 |
+
(r'\b(do|else|end|in|then)\b(?!\')', Keyword.Reserved, '#pop'),
|
| 120 |
+
],
|
| 121 |
+
|
| 122 |
+
'core': [
|
| 123 |
+
# Punctuation that doesn't overlap symbolic identifiers
|
| 124 |
+
(r'({})'.format('|'.join(re.escape(z) for z in nonid_reserved)),
|
| 125 |
+
Punctuation),
|
| 126 |
+
|
| 127 |
+
# Special constants: strings, floats, numbers in decimal and hex
|
| 128 |
+
(r'#"', String.Char, 'char'),
|
| 129 |
+
(r'"', String.Double, 'string'),
|
| 130 |
+
(r'~?0x[0-9a-fA-F]+', Number.Hex),
|
| 131 |
+
(r'0wx[0-9a-fA-F]+', Number.Hex),
|
| 132 |
+
(r'0w\d+', Number.Integer),
|
| 133 |
+
(r'~?\d+\.\d+[eE]~?\d+', Number.Float),
|
| 134 |
+
(r'~?\d+\.\d+', Number.Float),
|
| 135 |
+
(r'~?\d+[eE]~?\d+', Number.Float),
|
| 136 |
+
(r'~?\d+', Number.Integer),
|
| 137 |
+
|
| 138 |
+
# Labels
|
| 139 |
+
(r'#\s*[1-9][0-9]*', Name.Label),
|
| 140 |
+
(rf'#\s*({alphanumid_re})', Name.Label),
|
| 141 |
+
(rf'#\s+({symbolicid_re})', Name.Label),
|
| 142 |
+
# Some reserved words trigger a special, local lexer state change
|
| 143 |
+
(r'\b(datatype|abstype)\b(?!\')', Keyword.Reserved, 'dname'),
|
| 144 |
+
(r'\b(exception)\b(?!\')', Keyword.Reserved, 'ename'),
|
| 145 |
+
(r'\b(functor|include|open|signature|structure)\b(?!\')',
|
| 146 |
+
Keyword.Reserved, 'sname'),
|
| 147 |
+
(r'\b(type|eqtype)\b(?!\')', Keyword.Reserved, 'tname'),
|
| 148 |
+
|
| 149 |
+
# Regular identifiers, long and otherwise
|
| 150 |
+
(r'\'[\w\']*', Name.Decorator),
|
| 151 |
+
(rf'({alphanumid_re})(\.)', long_id_callback, "dotted"),
|
| 152 |
+
(rf'({alphanumid_re})', id_callback),
|
| 153 |
+
(rf'({symbolicid_re})', id_callback),
|
| 154 |
+
],
|
| 155 |
+
'dotted': [
|
| 156 |
+
(rf'({alphanumid_re})(\.)', long_id_callback),
|
| 157 |
+
(rf'({alphanumid_re})', end_id_callback, "#pop"),
|
| 158 |
+
(rf'({symbolicid_re})', end_id_callback, "#pop"),
|
| 159 |
+
(r'\s+', Error),
|
| 160 |
+
(r'\S+', Error),
|
| 161 |
+
],
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
# Main parser (prevents errors in files that have scoping errors)
|
| 165 |
+
'root': [
|
| 166 |
+
default('main')
|
| 167 |
+
],
|
| 168 |
+
|
| 169 |
+
# In this scope, I expect '|' to not be followed by a function name,
|
| 170 |
+
# and I expect 'and' to be followed by a binding site
|
| 171 |
+
'main': [
|
| 172 |
+
include('whitespace'),
|
| 173 |
+
|
| 174 |
+
# Special behavior of val/and/fun
|
| 175 |
+
(r'\b(val|and)\b(?!\')', Keyword.Reserved, 'vname'),
|
| 176 |
+
(r'\b(fun)\b(?!\')', Keyword.Reserved,
|
| 177 |
+
('#pop', 'main-fun', 'fname')),
|
| 178 |
+
|
| 179 |
+
include('delimiters'),
|
| 180 |
+
include('core'),
|
| 181 |
+
(r'\S+', Error),
|
| 182 |
+
],
|
| 183 |
+
|
| 184 |
+
# In this scope, I expect '|' and 'and' to be followed by a function
|
| 185 |
+
'main-fun': [
|
| 186 |
+
include('whitespace'),
|
| 187 |
+
|
| 188 |
+
(r'\s', Text),
|
| 189 |
+
(r'\(\*', Comment.Multiline, 'comment'),
|
| 190 |
+
|
| 191 |
+
# Special behavior of val/and/fun
|
| 192 |
+
(r'\b(fun|and)\b(?!\')', Keyword.Reserved, 'fname'),
|
| 193 |
+
(r'\b(val)\b(?!\')', Keyword.Reserved,
|
| 194 |
+
('#pop', 'main', 'vname')),
|
| 195 |
+
|
| 196 |
+
# Special behavior of '|' and '|'-manipulating keywords
|
| 197 |
+
(r'\|', Punctuation, 'fname'),
|
| 198 |
+
(r'\b(case|handle)\b(?!\')', Keyword.Reserved,
|
| 199 |
+
('#pop', 'main')),
|
| 200 |
+
|
| 201 |
+
include('delimiters'),
|
| 202 |
+
include('core'),
|
| 203 |
+
(r'\S+', Error),
|
| 204 |
+
],
|
| 205 |
+
|
| 206 |
+
# Character and string parsers
|
| 207 |
+
'char': stringy(String.Char),
|
| 208 |
+
'string': stringy(String.Double),
|
| 209 |
+
|
| 210 |
+
'breakout': [
|
| 211 |
+
(r'(?=\b({})\b(?!\'))'.format('|'.join(alphanumid_reserved)), Text, '#pop'),
|
| 212 |
+
],
|
| 213 |
+
|
| 214 |
+
# Dealing with what comes after module system keywords
|
| 215 |
+
'sname': [
|
| 216 |
+
include('whitespace'),
|
| 217 |
+
include('breakout'),
|
| 218 |
+
|
| 219 |
+
(rf'({alphanumid_re})', Name.Namespace),
|
| 220 |
+
default('#pop'),
|
| 221 |
+
],
|
| 222 |
+
|
| 223 |
+
# Dealing with what comes after the 'fun' (or 'and' or '|') keyword
|
| 224 |
+
'fname': [
|
| 225 |
+
include('whitespace'),
|
| 226 |
+
(r'\'[\w\']*', Name.Decorator),
|
| 227 |
+
(r'\(', Punctuation, 'tyvarseq'),
|
| 228 |
+
|
| 229 |
+
(rf'({alphanumid_re})', Name.Function, '#pop'),
|
| 230 |
+
(rf'({symbolicid_re})', Name.Function, '#pop'),
|
| 231 |
+
|
| 232 |
+
# Ignore interesting function declarations like "fun (x + y) = ..."
|
| 233 |
+
default('#pop'),
|
| 234 |
+
],
|
| 235 |
+
|
| 236 |
+
# Dealing with what comes after the 'val' (or 'and') keyword
|
| 237 |
+
'vname': [
|
| 238 |
+
include('whitespace'),
|
| 239 |
+
(r'\'[\w\']*', Name.Decorator),
|
| 240 |
+
(r'\(', Punctuation, 'tyvarseq'),
|
| 241 |
+
|
| 242 |
+
(rf'({alphanumid_re})(\s*)(=(?!{symbolicid_re}))',
|
| 243 |
+
bygroups(Name.Variable, Text, Punctuation), '#pop'),
|
| 244 |
+
(rf'({symbolicid_re})(\s*)(=(?!{symbolicid_re}))',
|
| 245 |
+
bygroups(Name.Variable, Text, Punctuation), '#pop'),
|
| 246 |
+
(rf'({alphanumid_re})', Name.Variable, '#pop'),
|
| 247 |
+
(rf'({symbolicid_re})', Name.Variable, '#pop'),
|
| 248 |
+
|
| 249 |
+
# Ignore interesting patterns like 'val (x, y)'
|
| 250 |
+
default('#pop'),
|
| 251 |
+
],
|
| 252 |
+
|
| 253 |
+
# Dealing with what comes after the 'type' (or 'and') keyword
|
| 254 |
+
'tname': [
|
| 255 |
+
include('whitespace'),
|
| 256 |
+
include('breakout'),
|
| 257 |
+
|
| 258 |
+
(r'\'[\w\']*', Name.Decorator),
|
| 259 |
+
(r'\(', Punctuation, 'tyvarseq'),
|
| 260 |
+
(rf'=(?!{symbolicid_re})', Punctuation, ('#pop', 'typbind')),
|
| 261 |
+
|
| 262 |
+
(rf'({alphanumid_re})', Keyword.Type),
|
| 263 |
+
(rf'({symbolicid_re})', Keyword.Type),
|
| 264 |
+
(r'\S+', Error, '#pop'),
|
| 265 |
+
],
|
| 266 |
+
|
| 267 |
+
# A type binding includes most identifiers
|
| 268 |
+
'typbind': [
|
| 269 |
+
include('whitespace'),
|
| 270 |
+
|
| 271 |
+
(r'\b(and)\b(?!\')', Keyword.Reserved, ('#pop', 'tname')),
|
| 272 |
+
|
| 273 |
+
include('breakout'),
|
| 274 |
+
include('core'),
|
| 275 |
+
(r'\S+', Error, '#pop'),
|
| 276 |
+
],
|
| 277 |
+
|
| 278 |
+
# Dealing with what comes after the 'datatype' (or 'and') keyword
|
| 279 |
+
'dname': [
|
| 280 |
+
include('whitespace'),
|
| 281 |
+
include('breakout'),
|
| 282 |
+
|
| 283 |
+
(r'\'[\w\']*', Name.Decorator),
|
| 284 |
+
(r'\(', Punctuation, 'tyvarseq'),
|
| 285 |
+
(r'(=)(\s*)(datatype)',
|
| 286 |
+
bygroups(Punctuation, Text, Keyword.Reserved), '#pop'),
|
| 287 |
+
(rf'=(?!{symbolicid_re})', Punctuation,
|
| 288 |
+
('#pop', 'datbind', 'datcon')),
|
| 289 |
+
|
| 290 |
+
(rf'({alphanumid_re})', Keyword.Type),
|
| 291 |
+
(rf'({symbolicid_re})', Keyword.Type),
|
| 292 |
+
(r'\S+', Error, '#pop'),
|
| 293 |
+
],
|
| 294 |
+
|
| 295 |
+
# common case - A | B | C of int
|
| 296 |
+
'datbind': [
|
| 297 |
+
include('whitespace'),
|
| 298 |
+
|
| 299 |
+
(r'\b(and)\b(?!\')', Keyword.Reserved, ('#pop', 'dname')),
|
| 300 |
+
(r'\b(withtype)\b(?!\')', Keyword.Reserved, ('#pop', 'tname')),
|
| 301 |
+
(r'\b(of)\b(?!\')', Keyword.Reserved),
|
| 302 |
+
|
| 303 |
+
(rf'(\|)(\s*)({alphanumid_re})',
|
| 304 |
+
bygroups(Punctuation, Text, Name.Class)),
|
| 305 |
+
(rf'(\|)(\s+)({symbolicid_re})',
|
| 306 |
+
bygroups(Punctuation, Text, Name.Class)),
|
| 307 |
+
|
| 308 |
+
include('breakout'),
|
| 309 |
+
include('core'),
|
| 310 |
+
(r'\S+', Error),
|
| 311 |
+
],
|
| 312 |
+
|
| 313 |
+
# Dealing with what comes after an exception
|
| 314 |
+
'ename': [
|
| 315 |
+
include('whitespace'),
|
| 316 |
+
|
| 317 |
+
(rf'(and\b)(\s+)({alphanumid_re})',
|
| 318 |
+
bygroups(Keyword.Reserved, Text, Name.Class)),
|
| 319 |
+
(rf'(and\b)(\s*)({symbolicid_re})',
|
| 320 |
+
bygroups(Keyword.Reserved, Text, Name.Class)),
|
| 321 |
+
(r'\b(of)\b(?!\')', Keyword.Reserved),
|
| 322 |
+
(rf'({alphanumid_re})|({symbolicid_re})', Name.Class),
|
| 323 |
+
|
| 324 |
+
default('#pop'),
|
| 325 |
+
],
|
| 326 |
+
|
| 327 |
+
'datcon': [
|
| 328 |
+
include('whitespace'),
|
| 329 |
+
(rf'({alphanumid_re})', Name.Class, '#pop'),
|
| 330 |
+
(rf'({symbolicid_re})', Name.Class, '#pop'),
|
| 331 |
+
(r'\S+', Error, '#pop'),
|
| 332 |
+
],
|
| 333 |
+
|
| 334 |
+
# Series of type variables
|
| 335 |
+
'tyvarseq': [
|
| 336 |
+
(r'\s', Text),
|
| 337 |
+
(r'\(\*', Comment.Multiline, 'comment'),
|
| 338 |
+
|
| 339 |
+
(r'\'[\w\']*', Name.Decorator),
|
| 340 |
+
(alphanumid_re, Name),
|
| 341 |
+
(r',', Punctuation),
|
| 342 |
+
(r'\)', Punctuation, '#pop'),
|
| 343 |
+
(symbolicid_re, Name),
|
| 344 |
+
],
|
| 345 |
+
|
| 346 |
+
'comment': [
|
| 347 |
+
(r'[^(*)]', Comment.Multiline),
|
| 348 |
+
(r'\(\*', Comment.Multiline, '#push'),
|
| 349 |
+
(r'\*\)', Comment.Multiline, '#pop'),
|
| 350 |
+
(r'[(*)]', Comment.Multiline),
|
| 351 |
+
],
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
|
| 355 |
+
class OcamlLexer(RegexLexer):
|
| 356 |
+
"""
|
| 357 |
+
For the OCaml language.
|
| 358 |
+
"""
|
| 359 |
+
|
| 360 |
+
name = 'OCaml'
|
| 361 |
+
url = 'https://ocaml.org/'
|
| 362 |
+
aliases = ['ocaml']
|
| 363 |
+
filenames = ['*.ml', '*.mli', '*.mll', '*.mly']
|
| 364 |
+
mimetypes = ['text/x-ocaml']
|
| 365 |
+
version_added = '0.7'
|
| 366 |
+
|
| 367 |
+
keywords = (
|
| 368 |
+
'and', 'as', 'assert', 'begin', 'class', 'constraint', 'do', 'done',
|
| 369 |
+
'downto', 'else', 'end', 'exception', 'external', 'false',
|
| 370 |
+
'for', 'fun', 'function', 'functor', 'if', 'in', 'include',
|
| 371 |
+
'inherit', 'initializer', 'lazy', 'let', 'match', 'method',
|
| 372 |
+
'module', 'mutable', 'new', 'object', 'of', 'open', 'private',
|
| 373 |
+
'raise', 'rec', 'sig', 'struct', 'then', 'to', 'true', 'try',
|
| 374 |
+
'type', 'val', 'virtual', 'when', 'while', 'with',
|
| 375 |
+
)
|
| 376 |
+
keyopts = (
|
| 377 |
+
'!=', '#', '&', '&&', r'\(', r'\)', r'\*', r'\+', ',', '-',
|
| 378 |
+
r'-\.', '->', r'\.', r'\.\.', ':', '::', ':=', ':>', ';', ';;', '<',
|
| 379 |
+
'<-', '=', '>', '>]', r'>\}', r'\?', r'\?\?', r'\[', r'\[<', r'\[>',
|
| 380 |
+
r'\[\|', ']', '_', '`', r'\{', r'\{<', r'\|', r'\|]', r'\}', '~'
|
| 381 |
+
)
|
| 382 |
+
|
| 383 |
+
operators = r'[!$%&*+\./:<=>?@^|~-]'
|
| 384 |
+
word_operators = ('asr', 'land', 'lor', 'lsl', 'lxor', 'mod', 'or')
|
| 385 |
+
prefix_syms = r'[!?~]'
|
| 386 |
+
infix_syms = r'[=<>@^|&+\*/$%-]'
|
| 387 |
+
primitives = ('unit', 'int', 'float', 'bool', 'string', 'char', 'list', 'array')
|
| 388 |
+
|
| 389 |
+
tokens = {
|
| 390 |
+
'escape-sequence': [
|
| 391 |
+
(r'\\[\\"\'ntbr]', String.Escape),
|
| 392 |
+
(r'\\[0-9]{3}', String.Escape),
|
| 393 |
+
(r'\\x[0-9a-fA-F]{2}', String.Escape),
|
| 394 |
+
],
|
| 395 |
+
'root': [
|
| 396 |
+
(r'\s+', Text),
|
| 397 |
+
(r'false|true|\(\)|\[\]', Name.Builtin.Pseudo),
|
| 398 |
+
(r'\b([A-Z][\w\']*)(?=\s*\.)', Name.Namespace, 'dotted'),
|
| 399 |
+
(r'\b([A-Z][\w\']*)', Name.Class),
|
| 400 |
+
(r'\(\*(?![)])', Comment, 'comment'),
|
| 401 |
+
(r'\b({})\b'.format('|'.join(keywords)), Keyword),
|
| 402 |
+
(r'({})'.format('|'.join(keyopts[::-1])), Operator),
|
| 403 |
+
(rf'({infix_syms}|{prefix_syms})?{operators}', Operator),
|
| 404 |
+
(r'\b({})\b'.format('|'.join(word_operators)), Operator.Word),
|
| 405 |
+
(r'\b({})\b'.format('|'.join(primitives)), Keyword.Type),
|
| 406 |
+
|
| 407 |
+
(r"[^\W\d][\w']*", Name),
|
| 408 |
+
|
| 409 |
+
(r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float),
|
| 410 |
+
(r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex),
|
| 411 |
+
(r'0[oO][0-7][0-7_]*', Number.Oct),
|
| 412 |
+
(r'0[bB][01][01_]*', Number.Bin),
|
| 413 |
+
(r'\d[\d_]*', Number.Integer),
|
| 414 |
+
|
| 415 |
+
(r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'",
|
| 416 |
+
String.Char),
|
| 417 |
+
(r"'.'", String.Char),
|
| 418 |
+
(r"'", Keyword), # a stray quote is another syntax element
|
| 419 |
+
|
| 420 |
+
(r'"', String.Double, 'string'),
|
| 421 |
+
|
| 422 |
+
(r'[~?][a-z][\w\']*:', Name.Variable),
|
| 423 |
+
],
|
| 424 |
+
'comment': [
|
| 425 |
+
(r'[^(*)]+', Comment),
|
| 426 |
+
(r'\(\*', Comment, '#push'),
|
| 427 |
+
(r'\*\)', Comment, '#pop'),
|
| 428 |
+
(r'[(*)]', Comment),
|
| 429 |
+
],
|
| 430 |
+
'string': [
|
| 431 |
+
(r'[^\\"]+', String.Double),
|
| 432 |
+
include('escape-sequence'),
|
| 433 |
+
(r'\\\n', String.Double),
|
| 434 |
+
(r'"', String.Double, '#pop'),
|
| 435 |
+
],
|
| 436 |
+
'dotted': [
|
| 437 |
+
(r'\s+', Text),
|
| 438 |
+
(r'\.', Punctuation),
|
| 439 |
+
(r'[A-Z][\w\']*(?=\s*\.)', Name.Namespace),
|
| 440 |
+
(r'[A-Z][\w\']*', Name.Class, '#pop'),
|
| 441 |
+
(r'[a-z_][\w\']*', Name, '#pop'),
|
| 442 |
+
default('#pop'),
|
| 443 |
+
],
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
|
| 447 |
+
class OpaLexer(RegexLexer):
|
| 448 |
+
"""
|
| 449 |
+
Lexer for the Opa language.
|
| 450 |
+
"""
|
| 451 |
+
|
| 452 |
+
name = 'Opa'
|
| 453 |
+
aliases = ['opa']
|
| 454 |
+
filenames = ['*.opa']
|
| 455 |
+
mimetypes = ['text/x-opa']
|
| 456 |
+
url = 'http://opalang.org'
|
| 457 |
+
version_added = '1.5'
|
| 458 |
+
|
| 459 |
+
# most of these aren't strictly keywords
|
| 460 |
+
# but if you color only real keywords, you might just
|
| 461 |
+
# as well not color anything
|
| 462 |
+
keywords = (
|
| 463 |
+
'and', 'as', 'begin', 'case', 'client', 'css', 'database', 'db', 'do',
|
| 464 |
+
'else', 'end', 'external', 'forall', 'function', 'if', 'import',
|
| 465 |
+
'match', 'module', 'or', 'package', 'parser', 'rec', 'server', 'then',
|
| 466 |
+
'type', 'val', 'with', 'xml_parser',
|
| 467 |
+
)
|
| 468 |
+
|
| 469 |
+
# matches both stuff and `stuff`
|
| 470 |
+
ident_re = r'(([a-zA-Z_]\w*)|(`[^`]*`))'
|
| 471 |
+
|
| 472 |
+
op_re = r'[.=\-<>,@~%/+?*&^!]'
|
| 473 |
+
punc_re = r'[()\[\],;|]' # '{' and '}' are treated elsewhere
|
| 474 |
+
# because they are also used for inserts
|
| 475 |
+
|
| 476 |
+
tokens = {
|
| 477 |
+
# copied from the caml lexer, should be adapted
|
| 478 |
+
'escape-sequence': [
|
| 479 |
+
(r'\\[\\"\'ntr}]', String.Escape),
|
| 480 |
+
(r'\\[0-9]{3}', String.Escape),
|
| 481 |
+
(r'\\x[0-9a-fA-F]{2}', String.Escape),
|
| 482 |
+
],
|
| 483 |
+
|
| 484 |
+
# factorizing these rules, because they are inserted many times
|
| 485 |
+
'comments': [
|
| 486 |
+
(r'/\*', Comment, 'nested-comment'),
|
| 487 |
+
(r'//.*?$', Comment),
|
| 488 |
+
],
|
| 489 |
+
'comments-and-spaces': [
|
| 490 |
+
include('comments'),
|
| 491 |
+
(r'\s+', Text),
|
| 492 |
+
],
|
| 493 |
+
|
| 494 |
+
'root': [
|
| 495 |
+
include('comments-and-spaces'),
|
| 496 |
+
# keywords
|
| 497 |
+
(words(keywords, prefix=r'\b', suffix=r'\b'), Keyword),
|
| 498 |
+
# directives
|
| 499 |
+
# we could parse the actual set of directives instead of anything
|
| 500 |
+
# starting with @, but this is troublesome
|
| 501 |
+
# because it needs to be adjusted all the time
|
| 502 |
+
# and assuming we parse only sources that compile, it is useless
|
| 503 |
+
(r'@' + ident_re + r'\b', Name.Builtin.Pseudo),
|
| 504 |
+
|
| 505 |
+
# number literals
|
| 506 |
+
(r'-?.[\d]+([eE][+\-]?\d+)', Number.Float),
|
| 507 |
+
(r'-?\d+.\d*([eE][+\-]?\d+)', Number.Float),
|
| 508 |
+
(r'-?\d+[eE][+\-]?\d+', Number.Float),
|
| 509 |
+
(r'0[xX][\da-fA-F]+', Number.Hex),
|
| 510 |
+
(r'0[oO][0-7]+', Number.Oct),
|
| 511 |
+
(r'0[bB][01]+', Number.Bin),
|
| 512 |
+
(r'\d+', Number.Integer),
|
| 513 |
+
# color literals
|
| 514 |
+
(r'#[\da-fA-F]{3,6}', Number.Integer),
|
| 515 |
+
|
| 516 |
+
# string literals
|
| 517 |
+
(r'"', String.Double, 'string'),
|
| 518 |
+
# char literal, should be checked because this is the regexp from
|
| 519 |
+
# the caml lexer
|
| 520 |
+
(r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2})|.)'",
|
| 521 |
+
String.Char),
|
| 522 |
+
|
| 523 |
+
# this is meant to deal with embedded exprs in strings
|
| 524 |
+
# every time we find a '}' we pop a state so that if we were
|
| 525 |
+
# inside a string, we are back in the string state
|
| 526 |
+
# as a consequence, we must also push a state every time we find a
|
| 527 |
+
# '{' or else we will have errors when parsing {} for instance
|
| 528 |
+
(r'\{', Operator, '#push'),
|
| 529 |
+
(r'\}', Operator, '#pop'),
|
| 530 |
+
|
| 531 |
+
# html literals
|
| 532 |
+
# this is a much more strict that the actual parser,
|
| 533 |
+
# since a<b would not be parsed as html
|
| 534 |
+
# but then again, the parser is way too lax, and we can't hope
|
| 535 |
+
# to have something as tolerant
|
| 536 |
+
(r'<(?=[a-zA-Z>])', String.Single, 'html-open-tag'),
|
| 537 |
+
|
| 538 |
+
# db path
|
| 539 |
+
# matching the '[_]' in '/a[_]' because it is a part
|
| 540 |
+
# of the syntax of the db path definition
|
| 541 |
+
# unfortunately, i don't know how to match the ']' in
|
| 542 |
+
# /a[1], so this is somewhat inconsistent
|
| 543 |
+
(r'[@?!]?(/\w+)+(\[_\])?', Name.Variable),
|
| 544 |
+
# putting the same color on <- as on db path, since
|
| 545 |
+
# it can be used only to mean Db.write
|
| 546 |
+
(r'<-(?!'+op_re+r')', Name.Variable),
|
| 547 |
+
|
| 548 |
+
# 'modules'
|
| 549 |
+
# although modules are not distinguished by their names as in caml
|
| 550 |
+
# the standard library seems to follow the convention that modules
|
| 551 |
+
# only area capitalized
|
| 552 |
+
(r'\b([A-Z]\w*)(?=\.)', Name.Namespace),
|
| 553 |
+
|
| 554 |
+
# operators
|
| 555 |
+
# = has a special role because this is the only
|
| 556 |
+
# way to syntactic distinguish binding constructions
|
| 557 |
+
# unfortunately, this colors the equal in {x=2} too
|
| 558 |
+
(r'=(?!'+op_re+r')', Keyword),
|
| 559 |
+
(rf'({op_re})+', Operator),
|
| 560 |
+
(rf'({punc_re})+', Operator),
|
| 561 |
+
|
| 562 |
+
# coercions
|
| 563 |
+
(r':', Operator, 'type'),
|
| 564 |
+
# type variables
|
| 565 |
+
# we need this rule because we don't parse specially type
|
| 566 |
+
# definitions so in "type t('a) = ...", "'a" is parsed by 'root'
|
| 567 |
+
("'"+ident_re, Keyword.Type),
|
| 568 |
+
|
| 569 |
+
# id literal, #something, or #{expr}
|
| 570 |
+
(r'#'+ident_re, String.Single),
|
| 571 |
+
(r'#(?=\{)', String.Single),
|
| 572 |
+
|
| 573 |
+
# identifiers
|
| 574 |
+
# this avoids to color '2' in 'a2' as an integer
|
| 575 |
+
(ident_re, Text),
|
| 576 |
+
|
| 577 |
+
# default, not sure if that is needed or not
|
| 578 |
+
# (r'.', Text),
|
| 579 |
+
],
|
| 580 |
+
|
| 581 |
+
# it is quite painful to have to parse types to know where they end
|
| 582 |
+
# this is the general rule for a type
|
| 583 |
+
# a type is either:
|
| 584 |
+
# * -> ty
|
| 585 |
+
# * type-with-slash
|
| 586 |
+
# * type-with-slash -> ty
|
| 587 |
+
# * type-with-slash (, type-with-slash)+ -> ty
|
| 588 |
+
#
|
| 589 |
+
# the code is pretty funky in here, but this code would roughly
|
| 590 |
+
# translate in caml to:
|
| 591 |
+
# let rec type stream =
|
| 592 |
+
# match stream with
|
| 593 |
+
# | [< "->"; stream >] -> type stream
|
| 594 |
+
# | [< ""; stream >] ->
|
| 595 |
+
# type_with_slash stream
|
| 596 |
+
# type_lhs_1 stream;
|
| 597 |
+
# and type_1 stream = ...
|
| 598 |
+
'type': [
|
| 599 |
+
include('comments-and-spaces'),
|
| 600 |
+
(r'->', Keyword.Type),
|
| 601 |
+
default(('#pop', 'type-lhs-1', 'type-with-slash')),
|
| 602 |
+
],
|
| 603 |
+
|
| 604 |
+
# parses all the atomic or closed constructions in the syntax of type
|
| 605 |
+
# expressions: record types, tuple types, type constructors, basic type
|
| 606 |
+
# and type variables
|
| 607 |
+
'type-1': [
|
| 608 |
+
include('comments-and-spaces'),
|
| 609 |
+
(r'\(', Keyword.Type, ('#pop', 'type-tuple')),
|
| 610 |
+
(r'~?\{', Keyword.Type, ('#pop', 'type-record')),
|
| 611 |
+
(ident_re+r'\(', Keyword.Type, ('#pop', 'type-tuple')),
|
| 612 |
+
(ident_re, Keyword.Type, '#pop'),
|
| 613 |
+
("'"+ident_re, Keyword.Type),
|
| 614 |
+
# this case is not in the syntax but sometimes
|
| 615 |
+
# we think we are parsing types when in fact we are parsing
|
| 616 |
+
# some css, so we just pop the states until we get back into
|
| 617 |
+
# the root state
|
| 618 |
+
default('#pop'),
|
| 619 |
+
],
|
| 620 |
+
|
| 621 |
+
# type-with-slash is either:
|
| 622 |
+
# * type-1
|
| 623 |
+
# * type-1 (/ type-1)+
|
| 624 |
+
'type-with-slash': [
|
| 625 |
+
include('comments-and-spaces'),
|
| 626 |
+
default(('#pop', 'slash-type-1', 'type-1')),
|
| 627 |
+
],
|
| 628 |
+
'slash-type-1': [
|
| 629 |
+
include('comments-and-spaces'),
|
| 630 |
+
('/', Keyword.Type, ('#pop', 'type-1')),
|
| 631 |
+
# same remark as above
|
| 632 |
+
default('#pop'),
|
| 633 |
+
],
|
| 634 |
+
|
| 635 |
+
# we go in this state after having parsed a type-with-slash
|
| 636 |
+
# while trying to parse a type
|
| 637 |
+
# and at this point we must determine if we are parsing an arrow
|
| 638 |
+
# type (in which case we must continue parsing) or not (in which
|
| 639 |
+
# case we stop)
|
| 640 |
+
'type-lhs-1': [
|
| 641 |
+
include('comments-and-spaces'),
|
| 642 |
+
(r'->', Keyword.Type, ('#pop', 'type')),
|
| 643 |
+
(r'(?=,)', Keyword.Type, ('#pop', 'type-arrow')),
|
| 644 |
+
default('#pop'),
|
| 645 |
+
],
|
| 646 |
+
'type-arrow': [
|
| 647 |
+
include('comments-and-spaces'),
|
| 648 |
+
# the look ahead here allows to parse f(x : int, y : float -> truc)
|
| 649 |
+
# correctly
|
| 650 |
+
(r',(?=[^:]*?->)', Keyword.Type, 'type-with-slash'),
|
| 651 |
+
(r'->', Keyword.Type, ('#pop', 'type')),
|
| 652 |
+
# same remark as above
|
| 653 |
+
default('#pop'),
|
| 654 |
+
],
|
| 655 |
+
|
| 656 |
+
# no need to do precise parsing for tuples and records
|
| 657 |
+
# because they are closed constructions, so we can simply
|
| 658 |
+
# find the closing delimiter
|
| 659 |
+
# note that this function would be not work if the source
|
| 660 |
+
# contained identifiers like `{)` (although it could be patched
|
| 661 |
+
# to support it)
|
| 662 |
+
'type-tuple': [
|
| 663 |
+
include('comments-and-spaces'),
|
| 664 |
+
(r'[^()/*]+', Keyword.Type),
|
| 665 |
+
(r'[/*]', Keyword.Type),
|
| 666 |
+
(r'\(', Keyword.Type, '#push'),
|
| 667 |
+
(r'\)', Keyword.Type, '#pop'),
|
| 668 |
+
],
|
| 669 |
+
'type-record': [
|
| 670 |
+
include('comments-and-spaces'),
|
| 671 |
+
(r'[^{}/*]+', Keyword.Type),
|
| 672 |
+
(r'[/*]', Keyword.Type),
|
| 673 |
+
(r'\{', Keyword.Type, '#push'),
|
| 674 |
+
(r'\}', Keyword.Type, '#pop'),
|
| 675 |
+
],
|
| 676 |
+
|
| 677 |
+
# 'type-tuple': [
|
| 678 |
+
# include('comments-and-spaces'),
|
| 679 |
+
# (r'\)', Keyword.Type, '#pop'),
|
| 680 |
+
# default(('#pop', 'type-tuple-1', 'type-1')),
|
| 681 |
+
# ],
|
| 682 |
+
# 'type-tuple-1': [
|
| 683 |
+
# include('comments-and-spaces'),
|
| 684 |
+
# (r',?\s*\)', Keyword.Type, '#pop'), # ,) is a valid end of tuple, in (1,)
|
| 685 |
+
# (r',', Keyword.Type, 'type-1'),
|
| 686 |
+
# ],
|
| 687 |
+
# 'type-record':[
|
| 688 |
+
# include('comments-and-spaces'),
|
| 689 |
+
# (r'\}', Keyword.Type, '#pop'),
|
| 690 |
+
# (r'~?(?:\w+|`[^`]*`)', Keyword.Type, 'type-record-field-expr'),
|
| 691 |
+
# ],
|
| 692 |
+
# 'type-record-field-expr': [
|
| 693 |
+
#
|
| 694 |
+
# ],
|
| 695 |
+
|
| 696 |
+
'nested-comment': [
|
| 697 |
+
(r'[^/*]+', Comment),
|
| 698 |
+
(r'/\*', Comment, '#push'),
|
| 699 |
+
(r'\*/', Comment, '#pop'),
|
| 700 |
+
(r'[/*]', Comment),
|
| 701 |
+
],
|
| 702 |
+
|
| 703 |
+
# the copy pasting between string and single-string
|
| 704 |
+
# is kinda sad. Is there a way to avoid that??
|
| 705 |
+
'string': [
|
| 706 |
+
(r'[^\\"{]+', String.Double),
|
| 707 |
+
(r'"', String.Double, '#pop'),
|
| 708 |
+
(r'\{', Operator, 'root'),
|
| 709 |
+
include('escape-sequence'),
|
| 710 |
+
],
|
| 711 |
+
'single-string': [
|
| 712 |
+
(r'[^\\\'{]+', String.Double),
|
| 713 |
+
(r'\'', String.Double, '#pop'),
|
| 714 |
+
(r'\{', Operator, 'root'),
|
| 715 |
+
include('escape-sequence'),
|
| 716 |
+
],
|
| 717 |
+
|
| 718 |
+
# all the html stuff
|
| 719 |
+
# can't really reuse some existing html parser
|
| 720 |
+
# because we must be able to parse embedded expressions
|
| 721 |
+
|
| 722 |
+
# we are in this state after someone parsed the '<' that
|
| 723 |
+
# started the html literal
|
| 724 |
+
'html-open-tag': [
|
| 725 |
+
(r'[\w\-:]+', String.Single, ('#pop', 'html-attr')),
|
| 726 |
+
(r'>', String.Single, ('#pop', 'html-content')),
|
| 727 |
+
],
|
| 728 |
+
|
| 729 |
+
# we are in this state after someone parsed the '</' that
|
| 730 |
+
# started the end of the closing tag
|
| 731 |
+
'html-end-tag': [
|
| 732 |
+
# this is a star, because </> is allowed
|
| 733 |
+
(r'[\w\-:]*>', String.Single, '#pop'),
|
| 734 |
+
],
|
| 735 |
+
|
| 736 |
+
# we are in this state after having parsed '<ident(:ident)?'
|
| 737 |
+
# we thus parse a possibly empty list of attributes
|
| 738 |
+
'html-attr': [
|
| 739 |
+
(r'\s+', Text),
|
| 740 |
+
(r'[\w\-:]+=', String.Single, 'html-attr-value'),
|
| 741 |
+
(r'/>', String.Single, '#pop'),
|
| 742 |
+
(r'>', String.Single, ('#pop', 'html-content')),
|
| 743 |
+
],
|
| 744 |
+
|
| 745 |
+
'html-attr-value': [
|
| 746 |
+
(r"'", String.Single, ('#pop', 'single-string')),
|
| 747 |
+
(r'"', String.Single, ('#pop', 'string')),
|
| 748 |
+
(r'#'+ident_re, String.Single, '#pop'),
|
| 749 |
+
(r'#(?=\{)', String.Single, ('#pop', 'root')),
|
| 750 |
+
(r'[^"\'{`=<>]+', String.Single, '#pop'),
|
| 751 |
+
(r'\{', Operator, ('#pop', 'root')), # this is a tail call!
|
| 752 |
+
],
|
| 753 |
+
|
| 754 |
+
# we should probably deal with '\' escapes here
|
| 755 |
+
'html-content': [
|
| 756 |
+
(r'<!--', Comment, 'html-comment'),
|
| 757 |
+
(r'</', String.Single, ('#pop', 'html-end-tag')),
|
| 758 |
+
(r'<', String.Single, 'html-open-tag'),
|
| 759 |
+
(r'\{', Operator, 'root'),
|
| 760 |
+
(r'[^<{]+', String.Single),
|
| 761 |
+
],
|
| 762 |
+
|
| 763 |
+
'html-comment': [
|
| 764 |
+
(r'-->', Comment, '#pop'),
|
| 765 |
+
(r'[^\-]+|-', Comment),
|
| 766 |
+
],
|
| 767 |
+
}
|
| 768 |
+
|
| 769 |
+
|
| 770 |
+
class ReasonLexer(RegexLexer):
|
| 771 |
+
"""
|
| 772 |
+
For the ReasonML language.
|
| 773 |
+
"""
|
| 774 |
+
|
| 775 |
+
name = 'ReasonML'
|
| 776 |
+
url = 'https://reasonml.github.io/'
|
| 777 |
+
aliases = ['reasonml', 'reason']
|
| 778 |
+
filenames = ['*.re', '*.rei']
|
| 779 |
+
mimetypes = ['text/x-reasonml']
|
| 780 |
+
version_added = '2.6'
|
| 781 |
+
|
| 782 |
+
keywords = (
|
| 783 |
+
'as', 'assert', 'begin', 'class', 'constraint', 'do', 'done', 'downto',
|
| 784 |
+
'else', 'end', 'exception', 'external', 'false', 'for', 'fun', 'esfun',
|
| 785 |
+
'function', 'functor', 'if', 'in', 'include', 'inherit', 'initializer', 'lazy',
|
| 786 |
+
'let', 'switch', 'module', 'pub', 'mutable', 'new', 'nonrec', 'object', 'of',
|
| 787 |
+
'open', 'pri', 'rec', 'sig', 'struct', 'then', 'to', 'true', 'try',
|
| 788 |
+
'type', 'val', 'virtual', 'when', 'while', 'with',
|
| 789 |
+
)
|
| 790 |
+
keyopts = (
|
| 791 |
+
'!=', '#', '&', '&&', r'\(', r'\)', r'\*', r'\+', ',', '-',
|
| 792 |
+
r'-\.', '=>', r'\.', r'\.\.', r'\.\.\.', ':', '::', ':=', ':>', ';', ';;', '<',
|
| 793 |
+
'<-', '=', '>', '>]', r'>\}', r'\?', r'\?\?', r'\[', r'\[<', r'\[>',
|
| 794 |
+
r'\[\|', ']', '_', '`', r'\{', r'\{<', r'\|', r'\|\|', r'\|]', r'\}', '~'
|
| 795 |
+
)
|
| 796 |
+
|
| 797 |
+
operators = r'[!$%&*+\./:<=>?@^|~-]'
|
| 798 |
+
word_operators = ('and', 'asr', 'land', 'lor', 'lsl', 'lsr', 'lxor', 'mod', 'or')
|
| 799 |
+
prefix_syms = r'[!?~]'
|
| 800 |
+
infix_syms = r'[=<>@^|&+\*/$%-]'
|
| 801 |
+
primitives = ('unit', 'int', 'float', 'bool', 'string', 'char', 'list', 'array')
|
| 802 |
+
|
| 803 |
+
tokens = {
|
| 804 |
+
'escape-sequence': [
|
| 805 |
+
(r'\\[\\"\'ntbr]', String.Escape),
|
| 806 |
+
(r'\\[0-9]{3}', String.Escape),
|
| 807 |
+
(r'\\x[0-9a-fA-F]{2}', String.Escape),
|
| 808 |
+
],
|
| 809 |
+
'root': [
|
| 810 |
+
(r'\s+', Text),
|
| 811 |
+
(r'false|true|\(\)|\[\]', Name.Builtin.Pseudo),
|
| 812 |
+
(r'\b([A-Z][\w\']*)(?=\s*\.)', Name.Namespace, 'dotted'),
|
| 813 |
+
(r'\b([A-Z][\w\']*)', Name.Class),
|
| 814 |
+
(r'//.*?\n', Comment.Single),
|
| 815 |
+
(r'\/\*(?!/)', Comment.Multiline, 'comment'),
|
| 816 |
+
(r'\b({})\b'.format('|'.join(keywords)), Keyword),
|
| 817 |
+
(r'({})'.format('|'.join(keyopts[::-1])), Operator.Word),
|
| 818 |
+
(rf'({infix_syms}|{prefix_syms})?{operators}', Operator),
|
| 819 |
+
(r'\b({})\b'.format('|'.join(word_operators)), Operator.Word),
|
| 820 |
+
(r'\b({})\b'.format('|'.join(primitives)), Keyword.Type),
|
| 821 |
+
|
| 822 |
+
(r"[^\W\d][\w']*", Name),
|
| 823 |
+
|
| 824 |
+
(r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float),
|
| 825 |
+
(r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex),
|
| 826 |
+
(r'0[oO][0-7][0-7_]*', Number.Oct),
|
| 827 |
+
(r'0[bB][01][01_]*', Number.Bin),
|
| 828 |
+
(r'\d[\d_]*', Number.Integer),
|
| 829 |
+
|
| 830 |
+
(r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'",
|
| 831 |
+
String.Char),
|
| 832 |
+
(r"'.'", String.Char),
|
| 833 |
+
(r"'", Keyword),
|
| 834 |
+
|
| 835 |
+
(r'"', String.Double, 'string'),
|
| 836 |
+
|
| 837 |
+
(r'[~?][a-z][\w\']*:', Name.Variable),
|
| 838 |
+
],
|
| 839 |
+
'comment': [
|
| 840 |
+
(r'[^/*]+', Comment.Multiline),
|
| 841 |
+
(r'\/\*', Comment.Multiline, '#push'),
|
| 842 |
+
(r'\*\/', Comment.Multiline, '#pop'),
|
| 843 |
+
(r'\*', Comment.Multiline),
|
| 844 |
+
],
|
| 845 |
+
'string': [
|
| 846 |
+
(r'[^\\"]+', String.Double),
|
| 847 |
+
include('escape-sequence'),
|
| 848 |
+
(r'\\\n', String.Double),
|
| 849 |
+
(r'"', String.Double, '#pop'),
|
| 850 |
+
],
|
| 851 |
+
'dotted': [
|
| 852 |
+
(r'\s+', Text),
|
| 853 |
+
(r'\.', Punctuation),
|
| 854 |
+
(r'[A-Z][\w\']*(?=\s*\.)', Name.Namespace),
|
| 855 |
+
(r'[A-Z][\w\']*', Name.Class, '#pop'),
|
| 856 |
+
(r'[a-z_][\w\']*', Name, '#pop'),
|
| 857 |
+
default('#pop'),
|
| 858 |
+
],
|
| 859 |
+
}
|
| 860 |
+
|
| 861 |
+
|
| 862 |
+
class FStarLexer(RegexLexer):
|
| 863 |
+
"""
|
| 864 |
+
For the F* language.
|
| 865 |
+
"""
|
| 866 |
+
|
| 867 |
+
name = 'FStar'
|
| 868 |
+
url = 'https://www.fstar-lang.org/'
|
| 869 |
+
aliases = ['fstar']
|
| 870 |
+
filenames = ['*.fst', '*.fsti']
|
| 871 |
+
mimetypes = ['text/x-fstar']
|
| 872 |
+
version_added = '2.7'
|
| 873 |
+
|
| 874 |
+
keywords = (
|
| 875 |
+
'abstract', 'attributes', 'noeq', 'unopteq', 'and'
|
| 876 |
+
'begin', 'by', 'default', 'effect', 'else', 'end', 'ensures',
|
| 877 |
+
'exception', 'exists', 'false', 'forall', 'fun', 'function', 'if',
|
| 878 |
+
'in', 'include', 'inline', 'inline_for_extraction', 'irreducible',
|
| 879 |
+
'logic', 'match', 'module', 'mutable', 'new', 'new_effect', 'noextract',
|
| 880 |
+
'of', 'open', 'opaque', 'private', 'range_of', 'reifiable',
|
| 881 |
+
'reify', 'reflectable', 'requires', 'set_range_of', 'sub_effect',
|
| 882 |
+
'synth', 'then', 'total', 'true', 'try', 'type', 'unfold', 'unfoldable',
|
| 883 |
+
'val', 'when', 'with', 'not'
|
| 884 |
+
)
|
| 885 |
+
decl_keywords = ('let', 'rec')
|
| 886 |
+
assume_keywords = ('assume', 'admit', 'assert', 'calc')
|
| 887 |
+
keyopts = (
|
| 888 |
+
r'~', r'-', r'/\\', r'\\/', r'<:', r'<@', r'\(\|', r'\|\)', r'#', r'u#',
|
| 889 |
+
r'&', r'\(', r'\)', r'\(\)', r',', r'~>', r'->', r'<-', r'<--', r'<==>',
|
| 890 |
+
r'==>', r'\.', r'\?', r'\?\.', r'\.\[', r'\.\(', r'\.\(\|', r'\.\[\|',
|
| 891 |
+
r'\{:pattern', r':', r'::', r':=', r';', r';;', r'=', r'%\[', r'!\{',
|
| 892 |
+
r'\[', r'\[@', r'\[\|', r'\|>', r'\]', r'\|\]', r'\{', r'\|', r'\}', r'\$'
|
| 893 |
+
)
|
| 894 |
+
|
| 895 |
+
operators = r'[!$%&*+\./:<=>?@^|~-]'
|
| 896 |
+
prefix_syms = r'[!?~]'
|
| 897 |
+
infix_syms = r'[=<>@^|&+\*/$%-]'
|
| 898 |
+
primitives = ('unit', 'int', 'float', 'bool', 'string', 'char', 'list', 'array')
|
| 899 |
+
|
| 900 |
+
tokens = {
|
| 901 |
+
'escape-sequence': [
|
| 902 |
+
(r'\\[\\"\'ntbr]', String.Escape),
|
| 903 |
+
(r'\\[0-9]{3}', String.Escape),
|
| 904 |
+
(r'\\x[0-9a-fA-F]{2}', String.Escape),
|
| 905 |
+
],
|
| 906 |
+
'root': [
|
| 907 |
+
(r'\s+', Text),
|
| 908 |
+
(r'false|true|False|True|\(\)|\[\]', Name.Builtin.Pseudo),
|
| 909 |
+
(r'\b([A-Z][\w\']*)(?=\s*\.)', Name.Namespace, 'dotted'),
|
| 910 |
+
(r'\b([A-Z][\w\']*)', Name.Class),
|
| 911 |
+
(r'\(\*(?![)])', Comment, 'comment'),
|
| 912 |
+
(r'\/\/.+$', Comment),
|
| 913 |
+
(r'\b({})\b'.format('|'.join(keywords)), Keyword),
|
| 914 |
+
(r'\b({})\b'.format('|'.join(assume_keywords)), Name.Exception),
|
| 915 |
+
(r'\b({})\b'.format('|'.join(decl_keywords)), Keyword.Declaration),
|
| 916 |
+
(r'({})'.format('|'.join(keyopts[::-1])), Operator),
|
| 917 |
+
(rf'({infix_syms}|{prefix_syms})?{operators}', Operator),
|
| 918 |
+
(r'\b({})\b'.format('|'.join(primitives)), Keyword.Type),
|
| 919 |
+
|
| 920 |
+
(r"[^\W\d][\w']*", Name),
|
| 921 |
+
|
| 922 |
+
(r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float),
|
| 923 |
+
(r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex),
|
| 924 |
+
(r'0[oO][0-7][0-7_]*', Number.Oct),
|
| 925 |
+
(r'0[bB][01][01_]*', Number.Bin),
|
| 926 |
+
(r'\d[\d_]*', Number.Integer),
|
| 927 |
+
|
| 928 |
+
(r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'",
|
| 929 |
+
String.Char),
|
| 930 |
+
(r"'.'", String.Char),
|
| 931 |
+
(r"'", Keyword), # a stray quote is another syntax element
|
| 932 |
+
(r"\`([\w\'.]+)\`", Operator.Word), # for infix applications
|
| 933 |
+
(r"\`", Keyword), # for quoting
|
| 934 |
+
(r'"', String.Double, 'string'),
|
| 935 |
+
|
| 936 |
+
(r'[~?][a-z][\w\']*:', Name.Variable),
|
| 937 |
+
],
|
| 938 |
+
'comment': [
|
| 939 |
+
(r'[^(*)]+', Comment),
|
| 940 |
+
(r'\(\*', Comment, '#push'),
|
| 941 |
+
(r'\*\)', Comment, '#pop'),
|
| 942 |
+
(r'[(*)]', Comment),
|
| 943 |
+
],
|
| 944 |
+
'string': [
|
| 945 |
+
(r'[^\\"]+', String.Double),
|
| 946 |
+
include('escape-sequence'),
|
| 947 |
+
(r'\\\n', String.Double),
|
| 948 |
+
(r'"', String.Double, '#pop'),
|
| 949 |
+
],
|
| 950 |
+
'dotted': [
|
| 951 |
+
(r'\s+', Text),
|
| 952 |
+
(r'\.', Punctuation),
|
| 953 |
+
(r'[A-Z][\w\']*(?=\s*\.)', Name.Namespace),
|
| 954 |
+
(r'[A-Z][\w\']*', Name.Class, '#pop'),
|
| 955 |
+
(r'[a-z_][\w\']*', Name, '#pop'),
|
| 956 |
+
default('#pop'),
|
| 957 |
+
],
|
| 958 |
+
}
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/pddl.py
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.pddl
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexer for the Planning Domain Definition Language.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
from pygments.lexer import RegexLexer, words, include
|
| 13 |
+
from pygments.token import Punctuation, Keyword, Whitespace, Name, Comment, \
|
| 14 |
+
Operator, Number
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
__all__ = ['PddlLexer']
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class PddlLexer(RegexLexer):
|
| 21 |
+
"""
|
| 22 |
+
A PDDL lexer.
|
| 23 |
+
|
| 24 |
+
It should support up to PDDL 3.1.
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
name = 'PDDL'
|
| 28 |
+
aliases = ['pddl']
|
| 29 |
+
filenames = ['*.pddl']
|
| 30 |
+
# there doesn't really seem to be a PDDL homepage.
|
| 31 |
+
url = 'https://en.wikipedia.org/wiki/Planning_Domain_Definition_Language'
|
| 32 |
+
version_added = '2.19'
|
| 33 |
+
|
| 34 |
+
tokens = {
|
| 35 |
+
'root': [
|
| 36 |
+
(r'\s+', Whitespace),
|
| 37 |
+
(r';.*$', Comment.Singleline),
|
| 38 |
+
include('keywords'),
|
| 39 |
+
include('builtins'),
|
| 40 |
+
(r'[()]', Punctuation),
|
| 41 |
+
(r'[=/*+><-]', Operator),
|
| 42 |
+
(r'[a-zA-Z][a-zA-Z0-9_-]*', Name),
|
| 43 |
+
(r'\?[a-zA-Z][a-zA-Z0-9_-]*', Name.Variable),
|
| 44 |
+
(r'[0-9]+\.[0-9]+', Number.Float),
|
| 45 |
+
(r'[0-9]+', Number.Integer),
|
| 46 |
+
],
|
| 47 |
+
'keywords': [
|
| 48 |
+
(words((
|
| 49 |
+
':requirements', ':types', ':constants',
|
| 50 |
+
':predicates', ':functions', ':action', ':agent',
|
| 51 |
+
':parameters', ':precondition', ':effect',
|
| 52 |
+
':durative-action', ':duration', ':condition',
|
| 53 |
+
':derived', ':domain', ':objects', ':init',
|
| 54 |
+
':goal', ':metric', ':length', ':serial', ':parallel',
|
| 55 |
+
# the following are requirements
|
| 56 |
+
':strips', ':typing', ':negative-preconditions',
|
| 57 |
+
':disjunctive-preconditions', ':equality',
|
| 58 |
+
':existential-preconditions', ':universal-preconditions',
|
| 59 |
+
':conditional-effects', ':fluents', ':numeric-fluents',
|
| 60 |
+
':object-fluents', ':adl', ':durative-actions',
|
| 61 |
+
':continuous-effects', ':derived-predicates',
|
| 62 |
+
':time-intial-literals', ':preferences',
|
| 63 |
+
':constraints', ':action-costs', ':multi-agent',
|
| 64 |
+
':unfactored-privacy', ':factored-privacy',
|
| 65 |
+
':non-deterministic'
|
| 66 |
+
), suffix=r'\b'), Keyword)
|
| 67 |
+
],
|
| 68 |
+
'builtins': [
|
| 69 |
+
(words((
|
| 70 |
+
'define', 'domain', 'object', 'either', 'and',
|
| 71 |
+
'forall', 'preference', 'imply', 'or', 'exists',
|
| 72 |
+
'not', 'when', 'assign', 'scale-up', 'scale-down',
|
| 73 |
+
'increase', 'decrease', 'at', 'over', 'start',
|
| 74 |
+
'end', 'all', 'problem', 'always', 'sometime',
|
| 75 |
+
'within', 'at-most-once', 'sometime-after',
|
| 76 |
+
'sometime-before', 'always-within', 'hold-during',
|
| 77 |
+
'hold-after', 'minimize', 'maximize',
|
| 78 |
+
'total-time', 'is-violated'), suffix=r'\b'),
|
| 79 |
+
Name.Builtin)
|
| 80 |
+
]
|
| 81 |
+
}
|
| 82 |
+
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/phix.py
ADDED
|
@@ -0,0 +1,363 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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| 5 |
+
Lexers for Phix.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
import re
|
| 12 |
+
|
| 13 |
+
from pygments.lexer import RegexLexer, words
|
| 14 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 15 |
+
Whitespace
|
| 16 |
+
|
| 17 |
+
__all__ = ['PhixLexer']
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class PhixLexer(RegexLexer):
|
| 21 |
+
"""
|
| 22 |
+
Pygments Lexer for Phix files (.exw).
|
| 23 |
+
See http://phix.x10.mx
|
| 24 |
+
"""
|
| 25 |
+
|
| 26 |
+
name = 'Phix'
|
| 27 |
+
url = 'http://phix.x10.mx'
|
| 28 |
+
aliases = ['phix']
|
| 29 |
+
filenames = ['*.exw']
|
| 30 |
+
mimetypes = ['text/x-phix']
|
| 31 |
+
version_added = '2.14'
|
| 32 |
+
|
| 33 |
+
flags = re.MULTILINE # nb: **NOT** re.DOTALL! (totally spanners comment handling)
|
| 34 |
+
|
| 35 |
+
preproc = (
|
| 36 |
+
'ifdef', 'elsifdef', 'elsedef'
|
| 37 |
+
)
|
| 38 |
+
# Note these lists are auto-generated by pwa/p2js.exw, when pwa\src\p2js_keywords.e (etc)
|
| 39 |
+
# change, though of course subsequent copy/commit/pull requests are all manual steps.
|
| 40 |
+
types = (
|
| 41 |
+
'string', 'nullable_string', 'atom_string', 'atom', 'bool', 'boolean',
|
| 42 |
+
'cdCanvan', 'cdCanvas', 'complex', 'CURLcode', 'dictionary', 'int',
|
| 43 |
+
'integer', 'Ihandle', 'Ihandles', 'Ihandln', 'mpfr', 'mpq', 'mpz',
|
| 44 |
+
'mpz_or_string', 'number', 'rid_string', 'seq', 'sequence', 'timedate',
|
| 45 |
+
'object'
|
| 46 |
+
)
|
| 47 |
+
keywords = (
|
| 48 |
+
'abstract', 'class', 'continue', 'export', 'extends', 'nullable',
|
| 49 |
+
'private', 'public', 'static', 'struct', 'trace',
|
| 50 |
+
'and', 'break', 'by', 'case', 'catch', 'const', 'constant', 'debug',
|
| 51 |
+
'default', 'do', 'else', 'elsif', 'end', 'enum', 'exit', 'fallthru',
|
| 52 |
+
'fallthrough', 'for', 'forward', 'function', 'global', 'if', 'in',
|
| 53 |
+
'include', 'js', 'javascript', 'javascript_semantics', 'let', 'not',
|
| 54 |
+
'or', 'procedure', 'profile', 'profile_time', 'return', 'safe_mode',
|
| 55 |
+
'switch', 'then', 'to', 'try', 'type', 'type_check', 'until', 'warning',
|
| 56 |
+
'while', 'with', 'without', 'xor'
|
| 57 |
+
)
|
| 58 |
+
routines = (
|
| 59 |
+
'abort', 'abs', 'adjust_timedate', 'and_bits', 'and_bitsu', 'apply',
|
| 60 |
+
'append', 'arccos', 'arcsin', 'arctan', 'assert', 'atan2',
|
| 61 |
+
'atom_to_float32', 'atom_to_float64', 'bankers_rounding', 'beep',
|
| 62 |
+
'begins', 'binary_search', 'bits_to_int', 'bk_color', 'bytes_to_int',
|
| 63 |
+
'call_func', 'call_proc', 'cdCanvasActivate', 'cdCanvasArc',
|
| 64 |
+
'cdCanvasBegin', 'cdCanvasBox', 'cdCanvasChord', 'cdCanvasCircle',
|
| 65 |
+
'cdCanvasClear', 'cdCanvasEnd', 'cdCanvasFlush', 'cdCanvasFont',
|
| 66 |
+
'cdCanvasGetImageRGB', 'cdCanvasGetSize', 'cdCanvasGetTextAlignment',
|
| 67 |
+
'cdCanvasGetTextSize', 'cdCanvasLine', 'cdCanvasMark',
|
| 68 |
+
'cdCanvasMarkSize', 'cdCanvasMultiLineVectorText', 'cdCanvasPixel',
|
| 69 |
+
'cdCanvasRect', 'cdCanvasRoundedBox', 'cdCanvasRoundedRect',
|
| 70 |
+
'cdCanvasSector', 'cdCanvasSetAttribute', 'cdCanvasSetBackground',
|
| 71 |
+
'cdCanvasSetFillMode', 'cdCanvasSetForeground',
|
| 72 |
+
'cdCanvasSetInteriorStyle', 'cdCanvasSetLineStyle',
|
| 73 |
+
'cdCanvasSetLineWidth', 'cdCanvasSetTextAlignment', 'cdCanvasText',
|
| 74 |
+
'cdCanvasSetTextOrientation', 'cdCanvasGetTextOrientation',
|
| 75 |
+
'cdCanvasVectorText', 'cdCanvasVectorTextDirection',
|
| 76 |
+
'cdCanvasVectorTextSize', 'cdCanvasVertex', 'cdCreateCanvas',
|
| 77 |
+
'cdDecodeAlpha', 'cdDecodeColor', 'cdDecodeColorAlpha', 'cdEncodeAlpha',
|
| 78 |
+
'cdEncodeColor', 'cdEncodeColorAlpha', 'cdKillCanvas', 'cdVersion',
|
| 79 |
+
'cdVersionDate', 'ceil', 'change_timezone', 'choose', 'clear_screen',
|
| 80 |
+
'columnize', 'command_line', 'compare', 'complex_abs', 'complex_add',
|
| 81 |
+
'complex_arg', 'complex_conjugate', 'complex_cos', 'complex_cosh',
|
| 82 |
+
'complex_div', 'complex_exp', 'complex_imag', 'complex_inv',
|
| 83 |
+
'complex_log', 'complex_mul', 'complex_neg', 'complex_new',
|
| 84 |
+
'complex_norm', 'complex_power', 'complex_rho', 'complex_real',
|
| 85 |
+
'complex_round', 'complex_sin', 'complex_sinh', 'complex_sprint',
|
| 86 |
+
'complex_sqrt', 'complex_sub', 'complex_theta', 'concat', 'cos',
|
| 87 |
+
'crash', 'custom_sort', 'date', 'day_of_week', 'day_of_year',
|
| 88 |
+
'days_in_month', 'decode_base64', 'decode_flags', 'deep_copy', 'deld',
|
| 89 |
+
'deserialize', 'destroy_dict', 'destroy_queue', 'destroy_stack',
|
| 90 |
+
'dict_name', 'dict_size', 'elapsed', 'elapsed_short', 'encode_base64',
|
| 91 |
+
'equal', 'even', 'exp', 'extract', 'factorial', 'factors',
|
| 92 |
+
'file_size_k', 'find', 'find_all', 'find_any', 'find_replace', 'filter',
|
| 93 |
+
'flatten', 'float32_to_atom', 'float64_to_atom', 'floor',
|
| 94 |
+
'format_timedate', 'free_console', 'from_polar', 'gcd', 'get_file_base',
|
| 95 |
+
'get_file_extension', 'get_file_name', 'get_file_name_and_path',
|
| 96 |
+
'get_file_path', 'get_file_path_and_name', 'get_maxprime', 'get_prime',
|
| 97 |
+
'get_primes', 'get_primes_le', 'get_proper_dir', 'get_proper_path',
|
| 98 |
+
'get_rand', 'get_routine_info', 'get_test_abort', 'get_test_logfile',
|
| 99 |
+
'get_test_pause', 'get_test_verbosity', 'get_tzid', 'getd', 'getdd',
|
| 100 |
+
'getd_all_keys', 'getd_by_index', 'getd_index', 'getd_partial_key',
|
| 101 |
+
'glAttachShader', 'glBindBuffer', 'glBindTexture', 'glBufferData',
|
| 102 |
+
'glCanvasSpecialText', 'glClear', 'glClearColor', 'glColor',
|
| 103 |
+
'glCompileShader', 'glCreateBuffer', 'glCreateProgram',
|
| 104 |
+
'glCreateShader', 'glCreateTexture', 'glDeleteProgram',
|
| 105 |
+
'glDeleteShader', 'glDrawArrays', 'glEnable',
|
| 106 |
+
'glEnableVertexAttribArray', 'glFloat32Array', 'glInt32Array',
|
| 107 |
+
'glFlush', 'glGetAttribLocation', 'glGetError', 'glGetProgramInfoLog',
|
| 108 |
+
'glGetProgramParameter', 'glGetShaderInfoLog', 'glGetShaderParameter',
|
| 109 |
+
'glGetUniformLocation', 'glLinkProgram', 'glLoadIdentity',
|
| 110 |
+
'glMatrixMode', 'glOrtho', 'glRotatef', 'glShadeModel',
|
| 111 |
+
'glShaderSource', 'glSimpleA7texcoords', 'glTexImage2Dc',
|
| 112 |
+
'glTexParameteri', 'glTranslate', 'glUniform1f', 'glUniform1i',
|
| 113 |
+
'glUniformMatrix4fv', 'glUseProgram', 'glVertex',
|
| 114 |
+
'glVertexAttribPointer', 'glViewport', 'head', 'hsv_to_rgb', 'iff',
|
| 115 |
+
'iif', 'include_file', 'incl0de_file', 'insert', 'instance',
|
| 116 |
+
'int_to_bits', 'int_to_bytes', 'is_dict', 'is_integer', 's_leap_year',
|
| 117 |
+
'is_prime', 'is_prime2', 'islower', 'isupper', 'Icallback',
|
| 118 |
+
'iup_isdouble', 'iup_isprint', 'iup_XkeyBase', 'IupAppend', 'IupAlarm',
|
| 119 |
+
'IupBackgroundBox', 'IupButton', 'IupCalendar', 'IupCanvas',
|
| 120 |
+
'IupClipboard', 'IupClose', 'IupCloseOnEscape', 'IupControlsOpen',
|
| 121 |
+
'IupDatePick', 'IupDestroy', 'IupDialog', 'IupDrawArc', 'IupDrawBegin',
|
| 122 |
+
'IupDrawEnd', 'IupDrawGetSize', 'IupDrawGetTextSize', 'IupDrawLine',
|
| 123 |
+
'IupDrawRectangle', 'IupDrawText', 'IupExpander', 'IupFill',
|
| 124 |
+
'IupFlatLabel', 'IupFlatList', 'IupFlatTree', 'IupFlush', 'IupFrame',
|
| 125 |
+
'IupGetAttribute', 'IupGetAttributeId', 'IupGetAttributePtr',
|
| 126 |
+
'IupGetBrother', 'IupGetChild', 'IupGetChildCount', 'IupGetClassName',
|
| 127 |
+
'IupGetDialog', 'IupGetDialogChild', 'IupGetDouble', 'IupGetFocus',
|
| 128 |
+
'IupGetGlobal', 'IupGetGlobalInt', 'IupGetGlobalIntInt', 'IupGetInt',
|
| 129 |
+
'IupGetInt2', 'IupGetIntId', 'IupGetIntInt', 'IupGetParent',
|
| 130 |
+
'IupGLCanvas', 'IupGLCanvasOpen', 'IupGLMakeCurrent', 'IupGraph',
|
| 131 |
+
'IupHbox', 'IupHide', 'IupImage', 'IupImageRGBA', 'IupItem',
|
| 132 |
+
'iupKeyCodeToName', 'IupLabel', 'IupLink', 'IupList', 'IupMap',
|
| 133 |
+
'IupMenu', 'IupMenuItem', 'IupMessage', 'IupMessageDlg', 'IupMultiBox',
|
| 134 |
+
'IupMultiLine', 'IupNextField', 'IupNormaliser', 'IupOpen',
|
| 135 |
+
'IupPlayInput', 'IupPopup', 'IupPreviousField', 'IupProgressBar',
|
| 136 |
+
'IupRadio', 'IupRecordInput', 'IupRedraw', 'IupRefresh',
|
| 137 |
+
'IupRefreshChildren', 'IupSeparator', 'IupSetAttribute',
|
| 138 |
+
'IupSetAttributes', 'IupSetAttributeHandle', 'IupSetAttributeId',
|
| 139 |
+
'IupSetAttributePtr', 'IupSetCallback', 'IupSetCallbacks',
|
| 140 |
+
'IupSetDouble', 'IupSetFocus', 'IupSetGlobal', 'IupSetGlobalInt',
|
| 141 |
+
'IupSetGlobalFunction', 'IupSetHandle', 'IupSetInt',
|
| 142 |
+
'IupSetStrAttribute', 'IupSetStrGlobal', 'IupShow', 'IupShowXY',
|
| 143 |
+
'IupSplit', 'IupStoreAttribute', 'IupSubmenu', 'IupTable',
|
| 144 |
+
'IupTableClearSelected', 'IupTableClick_cb', 'IupTableGetSelected',
|
| 145 |
+
'IupTableResize_cb', 'IupTableSetData', 'IupTabs', 'IupText',
|
| 146 |
+
'IupTimer', 'IupToggle', 'IupTreeAddNodes', 'IupTreeView', 'IupUpdate',
|
| 147 |
+
'IupValuator', 'IupVbox', 'join', 'join_by', 'join_path', 'k_perm',
|
| 148 |
+
'largest', 'lcm', 'length', 'log', 'log10', 'log2', 'lower',
|
| 149 |
+
'm4_crossProduct', 'm4_inverse', 'm4_lookAt', 'm4_multiply',
|
| 150 |
+
'm4_normalize', 'm4_perspective', 'm4_subtractVectors', 'm4_xRotate',
|
| 151 |
+
'm4_yRotate', 'machine_bits', 'machine_word', 'match', 'match_all',
|
| 152 |
+
'match_replace', 'max', 'maxsq', 'min', 'minsq', 'mod', 'mpfr_add',
|
| 153 |
+
'mpfr_ceil', 'mpfr_cmp', 'mpfr_cmp_si', 'mpfr_const_pi', 'mpfr_div',
|
| 154 |
+
'mpfr_div_si', 'mpfr_div_z', 'mpfr_floor', 'mpfr_free', 'mpfr_get_d',
|
| 155 |
+
'mpfr_get_default_precision', 'mpfr_get_default_rounding_mode',
|
| 156 |
+
'mpfr_get_fixed', 'mpfr_get_precision', 'mpfr_get_si', 'mpfr_init',
|
| 157 |
+
'mpfr_inits', 'mpfr_init_set', 'mpfr_init_set_q', 'mpfr_init_set_z',
|
| 158 |
+
'mpfr_mul', 'mpfr_mul_si', 'mpfr_pow_si', 'mpfr_set', 'mpfr_set_d',
|
| 159 |
+
'mpfr_set_default_precision', 'mpfr_set_default_rounding_mode',
|
| 160 |
+
'mpfr_set_precision', 'mpfr_set_q', 'mpfr_set_si', 'mpfr_set_str',
|
| 161 |
+
'mpfr_set_z', 'mpfr_si_div', 'mpfr_si_sub', 'mpfr_sqrt', 'mpfr_sub',
|
| 162 |
+
'mpfr_sub_si', 'mpq_abs', 'mpq_add', 'mpq_add_si', 'mpq_canonicalize',
|
| 163 |
+
'mpq_cmp', 'mpq_cmp_si', 'mpq_div', 'mpq_div_2exp', 'mpq_free',
|
| 164 |
+
'mpq_get_den', 'mpq_get_num', 'mpq_get_str', 'mpq_init', 'mpq_init_set',
|
| 165 |
+
'mpq_init_set_si', 'mpq_init_set_str', 'mpq_init_set_z', 'mpq_inits',
|
| 166 |
+
'mpq_inv', 'mpq_mul', 'mpq_neg', 'mpq_set', 'mpq_set_si', 'mpq_set_str',
|
| 167 |
+
'mpq_set_z', 'mpq_sub', 'mpz_abs', 'mpz_add', 'mpz_addmul',
|
| 168 |
+
'mpz_addmul_ui', 'mpz_addmul_si', 'mpz_add_si', 'mpz_add_ui', 'mpz_and',
|
| 169 |
+
'mpz_bin_uiui', 'mpz_cdiv_q', 'mpz_cmp', 'mpz_cmp_si', 'mpz_divexact',
|
| 170 |
+
'mpz_divexact_ui', 'mpz_divisible_p', 'mpz_divisible_ui_p', 'mpz_even',
|
| 171 |
+
'mpz_fac_ui', 'mpz_factorstring', 'mpz_fdiv_q', 'mpz_fdiv_q_2exp',
|
| 172 |
+
'mpz_fdiv_q_ui', 'mpz_fdiv_qr', 'mpz_fdiv_r', 'mpz_fdiv_ui',
|
| 173 |
+
'mpz_fib_ui', 'mpz_fib2_ui', 'mpz_fits_atom', 'mpz_fits_integer',
|
| 174 |
+
'mpz_free', 'mpz_gcd', 'mpz_gcd_ui', 'mpz_get_atom', 'mpz_get_integer',
|
| 175 |
+
'mpz_get_short_str', 'mpz_get_str', 'mpz_init', 'mpz_init_set',
|
| 176 |
+
'mpz_inits', 'mpz_invert', 'mpz_lcm', 'mpz_lcm_ui', 'mpz_max',
|
| 177 |
+
'mpz_min', 'mpz_mod', 'mpz_mod_ui', 'mpz_mul', 'mpz_mul_2exp',
|
| 178 |
+
'mpz_mul_d', 'mpz_mul_si', 'mpz_neg', 'mpz_nthroot', 'mpz_odd',
|
| 179 |
+
'mpz_pollard_rho', 'mpz_pow_ui', 'mpz_powm', 'mpz_powm_ui', 'mpz_prime',
|
| 180 |
+
'mpz_prime_factors', 'mpz_prime_mr', 'mpz_rand', 'mpz_rand_ui',
|
| 181 |
+
'mpz_re_compose', 'mpz_remove', 'mpz_scan0', 'mpz_scan1', 'mpz_set',
|
| 182 |
+
'mpz_set_d', 'mpz_set_si', 'mpz_set_str', 'mpz_set_v', 'mpz_sign',
|
| 183 |
+
'mpz_sizeinbase', 'mpz_sqrt', 'mpz_sub', 'mpz_sub_si', 'mpz_sub_ui',
|
| 184 |
+
'mpz_si_sub', 'mpz_tdiv_q_2exp', 'mpz_tdiv_r_2exp', 'mpz_tstbit',
|
| 185 |
+
'mpz_ui_pow_ui', 'mpz_xor', 'named_dict', 'new_dict', 'new_queue',
|
| 186 |
+
'new_stack', 'not_bits', 'not_bitsu', 'odd', 'or_all', 'or_allu',
|
| 187 |
+
'or_bits', 'or_bitsu', 'ord', 'ordinal', 'ordinant',
|
| 188 |
+
'override_timezone', 'pad', 'pad_head', 'pad_tail', 'parse_date_string',
|
| 189 |
+
'papply', 'peep', 'peepn', 'peep_dict', 'permute', 'permutes',
|
| 190 |
+
'platform', 'pop', 'popn', 'pop_dict', 'power', 'pp', 'ppEx', 'ppExf',
|
| 191 |
+
'ppf', 'ppOpt', 'pq_add', 'pq_destroy', 'pq_empty', 'pq_new', 'pq_peek',
|
| 192 |
+
'pq_pop', 'pq_pop_data', 'pq_size', 'prepend', 'prime_factors',
|
| 193 |
+
'printf', 'product', 'proper', 'push', 'pushn', 'putd', 'puts',
|
| 194 |
+
'queue_empty', 'queue_size', 'rand', 'rand_range', 'reinstate',
|
| 195 |
+
'remainder', 'remove', 'remove_all', 'repeat', 'repeatch', 'replace',
|
| 196 |
+
'requires', 'reverse', 'rfind', 'rgb', 'rmatch', 'rmdr', 'rnd', 'round',
|
| 197 |
+
'routine_id', 'scanf', 'serialize', 'series', 'set_rand',
|
| 198 |
+
'set_test_abort', 'set_test_logfile', 'set_test_module',
|
| 199 |
+
'set_test_pause', 'set_test_verbosity', 'set_timedate_formats',
|
| 200 |
+
'set_timezone', 'setd', 'setd_default', 'shorten', 'sha256',
|
| 201 |
+
'shift_bits', 'shuffle', 'sign', 'sin', 'smallest', 'sort',
|
| 202 |
+
'sort_columns', 'speak', 'splice', 'split', 'split_any', 'split_by',
|
| 203 |
+
'sprint', 'sprintf', 'sq_abs', 'sq_add', 'sq_and', 'sq_and_bits',
|
| 204 |
+
'sq_arccos', 'sq_arcsin', 'sq_arctan', 'sq_atom', 'sq_ceil', 'sq_cmp',
|
| 205 |
+
'sq_cos', 'sq_div', 'sq_even', 'sq_eq', 'sq_floor', 'sq_floor_div',
|
| 206 |
+
'sq_ge', 'sq_gt', 'sq_int', 'sq_le', 'sq_log', 'sq_log10', 'sq_log2',
|
| 207 |
+
'sq_lt', 'sq_max', 'sq_min', 'sq_mod', 'sq_mul', 'sq_ne', 'sq_not',
|
| 208 |
+
'sq_not_bits', 'sq_odd', 'sq_or', 'sq_or_bits', 'sq_power', 'sq_rand',
|
| 209 |
+
'sq_remainder', 'sq_rmdr', 'sq_rnd', 'sq_round', 'sq_seq', 'sq_sign',
|
| 210 |
+
'sq_sin', 'sq_sqrt', 'sq_str', 'sq_sub', 'sq_tan', 'sq_trunc',
|
| 211 |
+
'sq_uminus', 'sq_xor', 'sq_xor_bits', 'sqrt', 'square_free',
|
| 212 |
+
'stack_empty', 'stack_size', 'substitute', 'substitute_all', 'sum',
|
| 213 |
+
'tail', 'tan', 'test_equal', 'test_fail', 'test_false',
|
| 214 |
+
'test_not_equal', 'test_pass', 'test_summary', 'test_true',
|
| 215 |
+
'text_color', 'throw', 'time', 'timedate_diff', 'timedelta',
|
| 216 |
+
'to_integer', 'to_number', 'to_rgb', 'to_string', 'traverse_dict',
|
| 217 |
+
'traverse_dict_partial_key', 'trim', 'trim_head', 'trim_tail', 'trunc',
|
| 218 |
+
'tagset', 'tagstart', 'typeof', 'unique', 'unix_dict', 'upper',
|
| 219 |
+
'utf8_to_utf32', 'utf32_to_utf8', 'version', 'vlookup', 'vslice',
|
| 220 |
+
'wglGetProcAddress', 'wildcard_file', 'wildcard_match', 'with_rho',
|
| 221 |
+
'with_theta', 'xml_new_doc', 'xml_new_element', 'xml_set_attribute',
|
| 222 |
+
'xml_sprint', 'xor_bits', 'xor_bitsu',
|
| 223 |
+
'accept', 'allocate', 'allocate_string', 'allow_break', 'ARM',
|
| 224 |
+
'atom_to_float80', 'c_func', 'c_proc', 'call_back', 'chdir',
|
| 225 |
+
'check_break', 'clearDib', 'close', 'closesocket', 'console',
|
| 226 |
+
'copy_file', 'create', 'create_directory', 'create_thread',
|
| 227 |
+
'curl_easy_cleanup', 'curl_easy_get_file', 'curl_easy_init',
|
| 228 |
+
'curl_easy_perform', 'curl_easy_perform_ex', 'curl_easy_setopt',
|
| 229 |
+
'curl_easy_strerror', 'curl_global_cleanup', 'curl_global_init',
|
| 230 |
+
'curl_slist_append', 'curl_slist_free_all', 'current_dir', 'cursor',
|
| 231 |
+
'define_c_func', 'define_c_proc', 'delete', 'delete_cs', 'delete_file',
|
| 232 |
+
'dir', 'DLL', 'drawDib', 'drawShadedPolygonToDib', 'ELF32', 'ELF64',
|
| 233 |
+
'enter_cs', 'eval', 'exit_thread', 'free', 'file_exists', 'final',
|
| 234 |
+
'float80_to_atom', 'format', 'get_bytes', 'get_file_date',
|
| 235 |
+
'get_file_size', 'get_file_type', 'get_interpreter', 'get_key',
|
| 236 |
+
'get_socket_error', 'get_text', 'get_thread_exitcode', 'get_thread_id',
|
| 237 |
+
'getc', 'getenv', 'gets', 'getsockaddr', 'glBegin', 'glCallList',
|
| 238 |
+
'glFrustum', 'glGenLists', 'glGetString', 'glLight', 'glMaterial',
|
| 239 |
+
'glNewList', 'glNormal', 'glPopMatrix', 'glPushMatrix', 'glRotate',
|
| 240 |
+
'glEnd', 'glEndList', 'glTexImage2D', 'goto', 'GUI', 'icons', 'ilASM',
|
| 241 |
+
'include_files', 'include_paths', 'init_cs', 'ip_to_string',
|
| 242 |
+
'IupConfig', 'IupConfigDialogClosed', 'IupConfigDialogShow',
|
| 243 |
+
'IupConfigGetVariableInt', 'IupConfigLoad', 'IupConfigSave',
|
| 244 |
+
'IupConfigSetVariableInt', 'IupExitLoop', 'IupFileDlg', 'IupFileList',
|
| 245 |
+
'IupGLSwapBuffers', 'IupHelp', 'IupLoopStep', 'IupMainLoop',
|
| 246 |
+
'IupNormalizer', 'IupPlot', 'IupPlotAdd', 'IupPlotBegin', 'IupPlotEnd',
|
| 247 |
+
'IupPlotInsert', 'IupSaveImage', 'IupTreeGetUserId', 'IupUser',
|
| 248 |
+
'IupVersion', 'IupVersionDate', 'IupVersionNumber', 'IupVersionShow',
|
| 249 |
+
'killDib', 'leave_cs', 'listen', 'manifest', 'mem_copy', 'mem_set',
|
| 250 |
+
'mpfr_gamma', 'mpfr_printf', 'mpfr_sprintf', 'mpz_export', 'mpz_import',
|
| 251 |
+
'namespace', 'new', 'newDib', 'open', 'open_dll', 'PE32', 'PE64',
|
| 252 |
+
'peek', 'peek_string', 'peek1s', 'peek1u', 'peek2s', 'peek2u', 'peek4s',
|
| 253 |
+
'peek4u', 'peek8s', 'peek8u', 'peekNS', 'peekns', 'peeknu', 'poke',
|
| 254 |
+
'poke2', 'poke4', 'poke8', 'pokeN', 'poke_string', 'poke_wstring',
|
| 255 |
+
'position', 'progress', 'prompt_number', 'prompt_string', 'read_file',
|
| 256 |
+
'read_lines', 'recv', 'resume_thread', 'seek', 'select', 'send',
|
| 257 |
+
'setHandler', 'shutdown', 'sleep', 'SO', 'sockaddr_in', 'socket',
|
| 258 |
+
'split_path', 'suspend_thread', 'system', 'system_exec', 'system_open',
|
| 259 |
+
'system_wait', 'task_clock_start', 'task_clock_stop', 'task_create',
|
| 260 |
+
'task_delay', 'task_list', 'task_schedule', 'task_self', 'task_status',
|
| 261 |
+
'task_suspend', 'task_yield', 'thread_safe_string', 'try_cs',
|
| 262 |
+
'utf8_to_utf16', 'utf16_to_utf8', 'utf16_to_utf32', 'utf32_to_utf16',
|
| 263 |
+
'video_config', 'WSACleanup', 'wait_thread', 'walk_dir', 'where',
|
| 264 |
+
'write_lines', 'wait_key'
|
| 265 |
+
)
|
| 266 |
+
constants = (
|
| 267 |
+
'ANY_QUEUE', 'ASCENDING', 'BLACK', 'BLOCK_CURSOR', 'BLUE',
|
| 268 |
+
'BRIGHT_CYAN', 'BRIGHT_BLUE', 'BRIGHT_GREEN', 'BRIGHT_MAGENTA',
|
| 269 |
+
'BRIGHT_RED', 'BRIGHT_WHITE', 'BROWN', 'C_DWORD', 'C_INT', 'C_POINTER',
|
| 270 |
+
'C_USHORT', 'C_WORD', 'CD_AMBER', 'CD_BLACK', 'CD_BLUE', 'CD_BOLD',
|
| 271 |
+
'CD_BOLD_ITALIC', 'CD_BOX', 'CD_CENTER', 'CD_CIRCLE', 'CD_CLOSED_LINES',
|
| 272 |
+
'CD_CONTINUOUS', 'CD_CUSTOM', 'CD_CYAN', 'CD_DARK_BLUE', 'CD_DARK_CYAN',
|
| 273 |
+
'CD_DARK_GRAY', 'CD_DARK_GREY', 'CD_DARK_GREEN', 'CD_DARK_MAGENTA',
|
| 274 |
+
'CD_DARK_RED', 'CD_DARK_YELLOW', 'CD_DASH_DOT', 'CD_DASH_DOT_DOT',
|
| 275 |
+
'CD_DASHED', 'CD_DBUFFER', 'CD_DEG2RAD', 'CD_DIAMOND', 'CD_DOTTED',
|
| 276 |
+
'CD_EAST', 'CD_EVENODD', 'CD_FILL', 'CD_GL', 'CD_GRAY', 'CD_GREY',
|
| 277 |
+
'CD_GREEN', 'CD_HATCH', 'CD_HOLLOW', 'CD_HOLLOW_BOX',
|
| 278 |
+
'CD_HOLLOW_CIRCLE', 'CD_HOLLOW_DIAMOND', 'CD_INDIGO', 'CD_ITALIC',
|
| 279 |
+
'CD_IUP', 'CD_IUPDBUFFER', 'CD_LIGHT_BLUE', 'CD_LIGHT_GRAY',
|
| 280 |
+
'CD_LIGHT_GREY', 'CD_LIGHT_GREEN', 'CD_LIGHT_PARCHMENT', 'CD_MAGENTA',
|
| 281 |
+
'CD_NAVY', 'CD_NORTH', 'CD_NORTH_EAST', 'CD_NORTH_WEST', 'CD_OLIVE',
|
| 282 |
+
'CD_OPEN_LINES', 'CD_ORANGE', 'CD_PARCHMENT', 'CD_PATTERN',
|
| 283 |
+
'CD_PRINTER', 'CD_PURPLE', 'CD_PLAIN', 'CD_PLUS', 'CD_QUERY',
|
| 284 |
+
'CD_RAD2DEG', 'CD_RED', 'CD_SILVER', 'CD_SOLID', 'CD_SOUTH_EAST',
|
| 285 |
+
'CD_SOUTH_WEST', 'CD_STAR', 'CD_STIPPLE', 'CD_STRIKEOUT',
|
| 286 |
+
'CD_UNDERLINE', 'CD_WEST', 'CD_WHITE', 'CD_WINDING', 'CD_VIOLET',
|
| 287 |
+
'CD_X', 'CD_YELLOW', 'CURLE_OK', 'CURLOPT_MAIL_FROM',
|
| 288 |
+
'CURLOPT_MAIL_RCPT', 'CURLOPT_PASSWORD', 'CURLOPT_READDATA',
|
| 289 |
+
'CURLOPT_READFUNCTION', 'CURLOPT_SSL_VERIFYPEER',
|
| 290 |
+
'CURLOPT_SSL_VERIFYHOST', 'CURLOPT_UPLOAD', 'CURLOPT_URL',
|
| 291 |
+
'CURLOPT_USE_SSL', 'CURLOPT_USERNAME', 'CURLOPT_VERBOSE',
|
| 292 |
+
'CURLOPT_WRITEFUNCTION', 'CURLUSESSL_ALL', 'CYAN', 'D_NAME',
|
| 293 |
+
'D_ATTRIBUTES', 'D_SIZE', 'D_YEAR', 'D_MONTH', 'D_DAY', 'D_HOUR',
|
| 294 |
+
'D_MINUTE', 'D_SECOND', 'D_CREATION', 'D_LASTACCESS', 'D_MODIFICATION',
|
| 295 |
+
'DT_YEAR', 'DT_MONTH', 'DT_DAY', 'DT_HOUR', 'DT_MINUTE', 'DT_SECOND',
|
| 296 |
+
'DT_DOW', 'DT_MSEC', 'DT_DOY', 'DT_GMT', 'EULER', 'E_CODE', 'E_ADDR',
|
| 297 |
+
'E_LINE', 'E_RTN', 'E_NAME', 'E_FILE', 'E_PATH', 'E_USER', 'false',
|
| 298 |
+
'False', 'FALSE', 'FIFO_QUEUE', 'FILETYPE_DIRECTORY', 'FILETYPE_FILE',
|
| 299 |
+
'GET_EOF', 'GET_FAIL', 'GET_IGNORE', 'GET_SUCCESS',
|
| 300 |
+
'GL_AMBIENT_AND_DIFFUSE', 'GL_ARRAY_BUFFER', 'GL_CLAMP',
|
| 301 |
+
'GL_CLAMP_TO_BORDER', 'GL_CLAMP_TO_EDGE', 'GL_COLOR_BUFFER_BIT',
|
| 302 |
+
'GL_COMPILE', 'GL_COMPILE_STATUS', 'GL_CULL_FACE',
|
| 303 |
+
'GL_DEPTH_BUFFER_BIT', 'GL_DEPTH_TEST', 'GL_EXTENSIONS', 'GL_FLAT',
|
| 304 |
+
'GL_FLOAT', 'GL_FRAGMENT_SHADER', 'GL_FRONT', 'GL_LIGHT0',
|
| 305 |
+
'GL_LIGHTING', 'GL_LINEAR', 'GL_LINK_STATUS', 'GL_MODELVIEW',
|
| 306 |
+
'GL_NEAREST', 'GL_NO_ERROR', 'GL_NORMALIZE', 'GL_POSITION',
|
| 307 |
+
'GL_PROJECTION', 'GL_QUAD_STRIP', 'GL_QUADS', 'GL_RENDERER',
|
| 308 |
+
'GL_REPEAT', 'GL_RGB', 'GL_RGBA', 'GL_SMOOTH', 'GL_STATIC_DRAW',
|
| 309 |
+
'GL_TEXTURE_2D', 'GL_TEXTURE_MAG_FILTER', 'GL_TEXTURE_MIN_FILTER',
|
| 310 |
+
'GL_TEXTURE_WRAP_S', 'GL_TEXTURE_WRAP_T', 'GL_TRIANGLES',
|
| 311 |
+
'GL_UNSIGNED_BYTE', 'GL_VENDOR', 'GL_VERSION', 'GL_VERTEX_SHADER',
|
| 312 |
+
'GRAY', 'GREEN', 'GT_LF_STRIPPED', 'GT_WHOLE_FILE', 'INVLN10',
|
| 313 |
+
'IUP_CLOSE', 'IUP_CONTINUE', 'IUP_DEFAULT', 'IUP_BLACK', 'IUP_BLUE',
|
| 314 |
+
'IUP_BUTTON1', 'IUP_BUTTON3', 'IUP_CENTER', 'IUP_CYAN', 'IUP_DARK_BLUE',
|
| 315 |
+
'IUP_DARK_CYAN', 'IUP_DARK_GRAY', 'IUP_DARK_GREY', 'IUP_DARK_GREEN',
|
| 316 |
+
'IUP_DARK_MAGENTA', 'IUP_DARK_RED', 'IUP_GRAY', 'IUP_GREY', 'IUP_GREEN',
|
| 317 |
+
'IUP_IGNORE', 'IUP_INDIGO', 'IUP_MAGENTA', 'IUP_MASK_INT',
|
| 318 |
+
'IUP_MASK_UINT', 'IUP_MOUSEPOS', 'IUP_NAVY', 'IUP_OLIVE', 'IUP_RECTEXT',
|
| 319 |
+
'IUP_RED', 'IUP_LIGHT_BLUE', 'IUP_LIGHT_GRAY', 'IUP_LIGHT_GREY',
|
| 320 |
+
'IUP_LIGHT_GREEN', 'IUP_ORANGE', 'IUP_PARCHMENT', 'IUP_PURPLE',
|
| 321 |
+
'IUP_SILVER', 'IUP_TEAL', 'IUP_VIOLET', 'IUP_WHITE', 'IUP_YELLOW',
|
| 322 |
+
'K_BS', 'K_cA', 'K_cC', 'K_cD', 'K_cF5', 'K_cK', 'K_cM', 'K_cN', 'K_cO',
|
| 323 |
+
'K_cP', 'K_cR', 'K_cS', 'K_cT', 'K_cW', 'K_CR', 'K_DEL', 'K_DOWN',
|
| 324 |
+
'K_END', 'K_ESC', 'K_F1', 'K_F2', 'K_F3', 'K_F4', 'K_F5', 'K_F6',
|
| 325 |
+
'K_F7', 'K_F8', 'K_F9', 'K_F10', 'K_F11', 'K_F12', 'K_HOME', 'K_INS',
|
| 326 |
+
'K_LEFT', 'K_MIDDLE', 'K_PGDN', 'K_PGUP', 'K_RIGHT', 'K_SP', 'K_TAB',
|
| 327 |
+
'K_UP', 'K_h', 'K_i', 'K_j', 'K_p', 'K_r', 'K_s', 'JS', 'LIFO_QUEUE',
|
| 328 |
+
'LINUX', 'MAX_HEAP', 'MAGENTA', 'MIN_HEAP', 'Nan', 'NO_CURSOR', 'null',
|
| 329 |
+
'NULL', 'PI', 'pp_Ascii', 'pp_Brkt', 'pp_Date', 'pp_File', 'pp_FltFmt',
|
| 330 |
+
'pp_Indent', 'pp_IntCh', 'pp_IntFmt', 'pp_Maxlen', 'pp_Nest',
|
| 331 |
+
'pp_Pause', 'pp_Q22', 'pp_StrFmt', 'RED', 'SEEK_OK', 'SLASH',
|
| 332 |
+
'TEST_ABORT', 'TEST_CRASH', 'TEST_PAUSE', 'TEST_PAUSE_FAIL',
|
| 333 |
+
'TEST_QUIET', 'TEST_SHOW_ALL', 'TEST_SHOW_FAILED', 'TEST_SUMMARY',
|
| 334 |
+
'true', 'True', 'TRUE', 'VC_SCRNLINES', 'WHITE', 'WINDOWS', 'YELLOW'
|
| 335 |
+
)
|
| 336 |
+
|
| 337 |
+
tokens = {
|
| 338 |
+
'root': [
|
| 339 |
+
(r"\s+", Whitespace),
|
| 340 |
+
(r'/\*|--/\*|#\[', Comment.Multiline, 'comment'),
|
| 341 |
+
(r'(?://|--|#!).*$', Comment.Single),
|
| 342 |
+
#Alt:
|
| 343 |
+
# (r'//.*$|--.*$|#!.*$', Comment.Single),
|
| 344 |
+
(r'"([^"\\]|\\.)*"', String.Other),
|
| 345 |
+
(r'\'[^\']*\'', String.Other),
|
| 346 |
+
(r'`[^`]*`', String.Other),
|
| 347 |
+
|
| 348 |
+
(words(types, prefix=r'\b', suffix=r'\b'), Name.Function),
|
| 349 |
+
(words(routines, prefix=r'\b', suffix=r'\b'), Name.Function),
|
| 350 |
+
(words(preproc, prefix=r'\b', suffix=r'\b'), Keyword.Declaration),
|
| 351 |
+
(words(keywords, prefix=r'\b', suffix=r'\b'), Keyword.Declaration),
|
| 352 |
+
(words(constants, prefix=r'\b', suffix=r'\b'), Name.Constant),
|
| 353 |
+
# Aside: Phix only supports/uses the ascii/non-unicode tilde
|
| 354 |
+
(r'!=|==|<<|>>|:=|[-~+/*%=<>&^|\.(){},?:\[\]$\\;#]', Operator),
|
| 355 |
+
(r'[\w-]+', Text)
|
| 356 |
+
],
|
| 357 |
+
'comment': [
|
| 358 |
+
(r'[^*/#]+', Comment.Multiline),
|
| 359 |
+
(r'/\*|#\[', Comment.Multiline, '#push'),
|
| 360 |
+
(r'\*/|#\]', Comment.Multiline, '#pop'),
|
| 361 |
+
(r'[*/#]', Comment.Multiline)
|
| 362 |
+
]
|
| 363 |
+
}
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/rnc.py
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.rnc
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexer for Relax-NG Compact syntax
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
from pygments.lexer import RegexLexer
|
| 12 |
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
| 13 |
+
Punctuation
|
| 14 |
+
|
| 15 |
+
__all__ = ['RNCCompactLexer']
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
class RNCCompactLexer(RegexLexer):
|
| 19 |
+
"""
|
| 20 |
+
For RelaxNG-compact syntax.
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
name = 'Relax-NG Compact'
|
| 24 |
+
url = 'http://relaxng.org'
|
| 25 |
+
aliases = ['rng-compact', 'rnc']
|
| 26 |
+
filenames = ['*.rnc']
|
| 27 |
+
version_added = '2.2'
|
| 28 |
+
|
| 29 |
+
tokens = {
|
| 30 |
+
'root': [
|
| 31 |
+
(r'namespace\b', Keyword.Namespace),
|
| 32 |
+
(r'(?:default|datatypes)\b', Keyword.Declaration),
|
| 33 |
+
(r'##.*$', Comment.Preproc),
|
| 34 |
+
(r'#.*$', Comment.Single),
|
| 35 |
+
(r'"[^"]*"', String.Double),
|
| 36 |
+
# TODO single quoted strings and escape sequences outside of
|
| 37 |
+
# double-quoted strings
|
| 38 |
+
(r'(?:element|attribute|mixed)\b', Keyword.Declaration, 'variable'),
|
| 39 |
+
(r'(text\b|xsd:[^ ]+)', Keyword.Type, 'maybe_xsdattributes'),
|
| 40 |
+
(r'[,?&*=|~]|>>', Operator),
|
| 41 |
+
(r'[(){}]', Punctuation),
|
| 42 |
+
(r'.', Text),
|
| 43 |
+
],
|
| 44 |
+
|
| 45 |
+
# a variable has been declared using `element` or `attribute`
|
| 46 |
+
'variable': [
|
| 47 |
+
(r'[^{]+', Name.Variable),
|
| 48 |
+
(r'\{', Punctuation, '#pop'),
|
| 49 |
+
],
|
| 50 |
+
|
| 51 |
+
# after an xsd:<datatype> declaration there may be attributes
|
| 52 |
+
'maybe_xsdattributes': [
|
| 53 |
+
(r'\{', Punctuation, 'xsdattributes'),
|
| 54 |
+
(r'\}', Punctuation, '#pop'),
|
| 55 |
+
(r'.', Text),
|
| 56 |
+
],
|
| 57 |
+
|
| 58 |
+
# attributes take the form { key1 = value1 key2 = value2 ... }
|
| 59 |
+
'xsdattributes': [
|
| 60 |
+
(r'[^ =}]', Name.Attribute),
|
| 61 |
+
(r'=', Operator),
|
| 62 |
+
(r'"[^"]*"', String.Double),
|
| 63 |
+
(r'\}', Punctuation, '#pop'),
|
| 64 |
+
(r'.', Text),
|
| 65 |
+
],
|
| 66 |
+
}
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/sieve.py
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.sieve
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexer for Sieve file format.
|
| 6 |
+
|
| 7 |
+
https://tools.ietf.org/html/rfc5228
|
| 8 |
+
https://tools.ietf.org/html/rfc5173
|
| 9 |
+
https://tools.ietf.org/html/rfc5229
|
| 10 |
+
https://tools.ietf.org/html/rfc5230
|
| 11 |
+
https://tools.ietf.org/html/rfc5232
|
| 12 |
+
https://tools.ietf.org/html/rfc5235
|
| 13 |
+
https://tools.ietf.org/html/rfc5429
|
| 14 |
+
https://tools.ietf.org/html/rfc8580
|
| 15 |
+
|
| 16 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 17 |
+
:license: BSD, see LICENSE for details.
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
from pygments.lexer import RegexLexer, bygroups
|
| 21 |
+
from pygments.token import Comment, Name, Literal, String, Text, Punctuation, \
|
| 22 |
+
Keyword
|
| 23 |
+
|
| 24 |
+
__all__ = ["SieveLexer"]
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class SieveLexer(RegexLexer):
|
| 28 |
+
"""
|
| 29 |
+
Lexer for sieve format.
|
| 30 |
+
"""
|
| 31 |
+
name = 'Sieve'
|
| 32 |
+
filenames = ['*.siv', '*.sieve']
|
| 33 |
+
aliases = ['sieve']
|
| 34 |
+
url = 'https://en.wikipedia.org/wiki/Sieve_(mail_filtering_language)'
|
| 35 |
+
version_added = '2.6'
|
| 36 |
+
|
| 37 |
+
tokens = {
|
| 38 |
+
'root': [
|
| 39 |
+
(r'\s+', Text),
|
| 40 |
+
(r'[();,{}\[\]]', Punctuation),
|
| 41 |
+
# import:
|
| 42 |
+
(r'(?i)require',
|
| 43 |
+
Keyword.Namespace),
|
| 44 |
+
# tags:
|
| 45 |
+
(r'(?i)(:)(addresses|all|contains|content|create|copy|comparator|'
|
| 46 |
+
r'count|days|detail|domain|fcc|flags|from|handle|importance|is|'
|
| 47 |
+
r'localpart|length|lowerfirst|lower|matches|message|mime|options|'
|
| 48 |
+
r'over|percent|quotewildcard|raw|regex|specialuse|subject|text|'
|
| 49 |
+
r'under|upperfirst|upper|value)',
|
| 50 |
+
bygroups(Name.Tag, Name.Tag)),
|
| 51 |
+
# tokens:
|
| 52 |
+
(r'(?i)(address|addflag|allof|anyof|body|discard|elsif|else|envelope|'
|
| 53 |
+
r'ereject|exists|false|fileinto|if|hasflag|header|keep|'
|
| 54 |
+
r'notify_method_capability|notify|not|redirect|reject|removeflag|'
|
| 55 |
+
r'setflag|size|spamtest|stop|string|true|vacation|virustest)',
|
| 56 |
+
Name.Builtin),
|
| 57 |
+
(r'(?i)set',
|
| 58 |
+
Keyword.Declaration),
|
| 59 |
+
# number:
|
| 60 |
+
(r'([0-9.]+)([kmgKMG])?',
|
| 61 |
+
bygroups(Literal.Number, Literal.Number)),
|
| 62 |
+
# comment:
|
| 63 |
+
(r'#.*$',
|
| 64 |
+
Comment.Single),
|
| 65 |
+
(r'/\*.*\*/',
|
| 66 |
+
Comment.Multiline),
|
| 67 |
+
# string:
|
| 68 |
+
(r'"[^"]*?"',
|
| 69 |
+
String),
|
| 70 |
+
# text block:
|
| 71 |
+
(r'text:',
|
| 72 |
+
Name.Tag, 'text'),
|
| 73 |
+
],
|
| 74 |
+
'text': [
|
| 75 |
+
(r'[^.].*?\n', String),
|
| 76 |
+
(r'^\.', Punctuation, "#pop"),
|
| 77 |
+
]
|
| 78 |
+
}
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/smv.py
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.smv
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexers for the SMV languages.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
from pygments.lexer import RegexLexer, words
|
| 12 |
+
from pygments.token import Comment, Keyword, Name, Number, Operator, \
|
| 13 |
+
Punctuation, Text
|
| 14 |
+
|
| 15 |
+
__all__ = ['NuSMVLexer']
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
class NuSMVLexer(RegexLexer):
|
| 19 |
+
"""
|
| 20 |
+
Lexer for the NuSMV language.
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
name = 'NuSMV'
|
| 24 |
+
aliases = ['nusmv']
|
| 25 |
+
filenames = ['*.smv']
|
| 26 |
+
mimetypes = []
|
| 27 |
+
url = 'https://nusmv.fbk.eu'
|
| 28 |
+
version_added = '2.2'
|
| 29 |
+
|
| 30 |
+
tokens = {
|
| 31 |
+
'root': [
|
| 32 |
+
# Comments
|
| 33 |
+
(r'(?s)\/\-\-.*?\-\-/', Comment),
|
| 34 |
+
(r'--.*\n', Comment),
|
| 35 |
+
|
| 36 |
+
# Reserved
|
| 37 |
+
(words(('MODULE', 'DEFINE', 'MDEFINE', 'CONSTANTS', 'VAR', 'IVAR',
|
| 38 |
+
'FROZENVAR', 'INIT', 'TRANS', 'INVAR', 'SPEC', 'CTLSPEC',
|
| 39 |
+
'LTLSPEC', 'PSLSPEC', 'COMPUTE', 'NAME', 'INVARSPEC',
|
| 40 |
+
'FAIRNESS', 'JUSTICE', 'COMPASSION', 'ISA', 'ASSIGN',
|
| 41 |
+
'CONSTRAINT', 'SIMPWFF', 'CTLWFF', 'LTLWFF', 'PSLWFF',
|
| 42 |
+
'COMPWFF', 'IN', 'MIN', 'MAX', 'MIRROR', 'PRED',
|
| 43 |
+
'PREDICATES'), suffix=r'(?![\w$#-])'),
|
| 44 |
+
Keyword.Declaration),
|
| 45 |
+
(r'process(?![\w$#-])', Keyword),
|
| 46 |
+
(words(('array', 'of', 'boolean', 'integer', 'real', 'word'),
|
| 47 |
+
suffix=r'(?![\w$#-])'), Keyword.Type),
|
| 48 |
+
(words(('case', 'esac'), suffix=r'(?![\w$#-])'), Keyword),
|
| 49 |
+
(words(('word1', 'bool', 'signed', 'unsigned', 'extend', 'resize',
|
| 50 |
+
'sizeof', 'uwconst', 'swconst', 'init', 'self', 'count',
|
| 51 |
+
'abs', 'max', 'min'), suffix=r'(?![\w$#-])'),
|
| 52 |
+
Name.Builtin),
|
| 53 |
+
(words(('EX', 'AX', 'EF', 'AF', 'EG', 'AG', 'E', 'F', 'O', 'G',
|
| 54 |
+
'H', 'X', 'Y', 'Z', 'A', 'U', 'S', 'V', 'T', 'BU', 'EBF',
|
| 55 |
+
'ABF', 'EBG', 'ABG', 'next', 'mod', 'union', 'in', 'xor',
|
| 56 |
+
'xnor'), suffix=r'(?![\w$#-])'),
|
| 57 |
+
Operator.Word),
|
| 58 |
+
(words(('TRUE', 'FALSE'), suffix=r'(?![\w$#-])'), Keyword.Constant),
|
| 59 |
+
|
| 60 |
+
# Names
|
| 61 |
+
(r'[a-zA-Z_][\w$#-]*', Name.Variable),
|
| 62 |
+
|
| 63 |
+
# Operators
|
| 64 |
+
(r':=', Operator),
|
| 65 |
+
(r'[-&|+*/<>!=]', Operator),
|
| 66 |
+
|
| 67 |
+
# Literals
|
| 68 |
+
(r'\-?\d+\b', Number.Integer),
|
| 69 |
+
(r'0[su][bB]\d*_[01_]+', Number.Bin),
|
| 70 |
+
(r'0[su][oO]\d*_[0-7_]+', Number.Oct),
|
| 71 |
+
(r'0[su][dD]\d*_[\d_]+', Number.Decimal),
|
| 72 |
+
(r'0[su][hH]\d*_[\da-fA-F_]+', Number.Hex),
|
| 73 |
+
|
| 74 |
+
# Whitespace, punctuation and the rest
|
| 75 |
+
(r'\s+', Text.Whitespace),
|
| 76 |
+
(r'[()\[\]{};?:.,]', Punctuation),
|
| 77 |
+
],
|
| 78 |
+
}
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/pygments/lexers/webidl.py
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
pygments.lexers.webidl
|
| 3 |
+
~~~~~~~~~~~~~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
Lexers for Web IDL, including some extensions.
|
| 6 |
+
|
| 7 |
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
| 8 |
+
:license: BSD, see LICENSE for details.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
from pygments.lexer import RegexLexer, default, include, words
|
| 12 |
+
from pygments.token import Comment, Keyword, Name, Number, Punctuation, \
|
| 13 |
+
String, Text
|
| 14 |
+
|
| 15 |
+
__all__ = ['WebIDLLexer']
|
| 16 |
+
|
| 17 |
+
_builtin_types = (
|
| 18 |
+
# primitive types
|
| 19 |
+
'byte', 'octet', 'boolean',
|
| 20 |
+
r'(?:unsigned\s+)?(?:short|long(?:\s+long)?)',
|
| 21 |
+
r'(?:unrestricted\s+)?(?:float|double)',
|
| 22 |
+
# string types
|
| 23 |
+
'DOMString', 'ByteString', 'USVString',
|
| 24 |
+
# exception types
|
| 25 |
+
'Error', 'DOMException',
|
| 26 |
+
# typed array types
|
| 27 |
+
'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray',
|
| 28 |
+
'Float32Array', 'Float64Array',
|
| 29 |
+
# buffer source types
|
| 30 |
+
'ArrayBuffer', 'DataView', 'Int8Array', 'Int16Array', 'Int32Array',
|
| 31 |
+
# other
|
| 32 |
+
'any', 'void', 'object', 'RegExp',
|
| 33 |
+
)
|
| 34 |
+
_identifier = r'_?[A-Za-z][a-zA-Z0-9_-]*'
|
| 35 |
+
_keyword_suffix = r'(?![\w-])'
|
| 36 |
+
_string = r'"[^"]*"'
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
class WebIDLLexer(RegexLexer):
|
| 40 |
+
"""
|
| 41 |
+
For Web IDL.
|
| 42 |
+
"""
|
| 43 |
+
|
| 44 |
+
name = 'Web IDL'
|
| 45 |
+
url = 'https://www.w3.org/wiki/Web_IDL'
|
| 46 |
+
aliases = ['webidl']
|
| 47 |
+
filenames = ['*.webidl']
|
| 48 |
+
version_added = '2.6'
|
| 49 |
+
|
| 50 |
+
tokens = {
|
| 51 |
+
'common': [
|
| 52 |
+
(r'\s+', Text),
|
| 53 |
+
(r'(?s)/\*.*?\*/', Comment.Multiline),
|
| 54 |
+
(r'//.*', Comment.Single),
|
| 55 |
+
(r'^#.*', Comment.Preproc),
|
| 56 |
+
],
|
| 57 |
+
'root': [
|
| 58 |
+
include('common'),
|
| 59 |
+
(r'\[', Punctuation, 'extended_attributes'),
|
| 60 |
+
(r'partial' + _keyword_suffix, Keyword),
|
| 61 |
+
(r'typedef' + _keyword_suffix, Keyword, ('typedef', 'type')),
|
| 62 |
+
(r'interface' + _keyword_suffix, Keyword, 'interface_rest'),
|
| 63 |
+
(r'enum' + _keyword_suffix, Keyword, 'enum_rest'),
|
| 64 |
+
(r'callback' + _keyword_suffix, Keyword, 'callback_rest'),
|
| 65 |
+
(r'dictionary' + _keyword_suffix, Keyword, 'dictionary_rest'),
|
| 66 |
+
(r'namespace' + _keyword_suffix, Keyword, 'namespace_rest'),
|
| 67 |
+
(_identifier, Name.Class, 'implements_rest'),
|
| 68 |
+
],
|
| 69 |
+
'extended_attributes': [
|
| 70 |
+
include('common'),
|
| 71 |
+
(r',', Punctuation),
|
| 72 |
+
(_identifier, Name.Decorator),
|
| 73 |
+
(r'=', Punctuation, 'extended_attribute_rest'),
|
| 74 |
+
(r'\(', Punctuation, 'argument_list'),
|
| 75 |
+
(r'\]', Punctuation, '#pop'),
|
| 76 |
+
],
|
| 77 |
+
'extended_attribute_rest': [
|
| 78 |
+
include('common'),
|
| 79 |
+
(_identifier, Name, 'extended_attribute_named_rest'),
|
| 80 |
+
(_string, String),
|
| 81 |
+
(r'\(', Punctuation, 'identifier_list'),
|
| 82 |
+
default('#pop'),
|
| 83 |
+
],
|
| 84 |
+
'extended_attribute_named_rest': [
|
| 85 |
+
include('common'),
|
| 86 |
+
(r'\(', Punctuation, 'argument_list'),
|
| 87 |
+
default('#pop'),
|
| 88 |
+
],
|
| 89 |
+
'argument_list': [
|
| 90 |
+
include('common'),
|
| 91 |
+
(r'\)', Punctuation, '#pop'),
|
| 92 |
+
default('argument'),
|
| 93 |
+
],
|
| 94 |
+
'argument': [
|
| 95 |
+
include('common'),
|
| 96 |
+
(r'optional' + _keyword_suffix, Keyword),
|
| 97 |
+
(r'\[', Punctuation, 'extended_attributes'),
|
| 98 |
+
(r',', Punctuation, '#pop'),
|
| 99 |
+
(r'\)', Punctuation, '#pop:2'),
|
| 100 |
+
default(('argument_rest', 'type'))
|
| 101 |
+
],
|
| 102 |
+
'argument_rest': [
|
| 103 |
+
include('common'),
|
| 104 |
+
(_identifier, Name.Variable),
|
| 105 |
+
(r'\.\.\.', Punctuation),
|
| 106 |
+
(r'=', Punctuation, 'default_value'),
|
| 107 |
+
default('#pop'),
|
| 108 |
+
],
|
| 109 |
+
'identifier_list': [
|
| 110 |
+
include('common'),
|
| 111 |
+
(_identifier, Name.Class),
|
| 112 |
+
(r',', Punctuation),
|
| 113 |
+
(r'\)', Punctuation, '#pop'),
|
| 114 |
+
],
|
| 115 |
+
'type': [
|
| 116 |
+
include('common'),
|
| 117 |
+
(r'(?:' + r'|'.join(_builtin_types) + r')' + _keyword_suffix,
|
| 118 |
+
Keyword.Type, 'type_null'),
|
| 119 |
+
(words(('sequence', 'Promise', 'FrozenArray'),
|
| 120 |
+
suffix=_keyword_suffix), Keyword.Type, 'type_identifier'),
|
| 121 |
+
(_identifier, Name.Class, 'type_identifier'),
|
| 122 |
+
(r'\(', Punctuation, 'union_type'),
|
| 123 |
+
],
|
| 124 |
+
'union_type': [
|
| 125 |
+
include('common'),
|
| 126 |
+
(r'or' + _keyword_suffix, Keyword),
|
| 127 |
+
(r'\)', Punctuation, ('#pop', 'type_null')),
|
| 128 |
+
default('type'),
|
| 129 |
+
],
|
| 130 |
+
'type_identifier': [
|
| 131 |
+
(r'<', Punctuation, 'type_list'),
|
| 132 |
+
default(('#pop', 'type_null'))
|
| 133 |
+
],
|
| 134 |
+
'type_null': [
|
| 135 |
+
(r'\?', Punctuation),
|
| 136 |
+
default('#pop:2'),
|
| 137 |
+
],
|
| 138 |
+
'default_value': [
|
| 139 |
+
include('common'),
|
| 140 |
+
include('const_value'),
|
| 141 |
+
(_string, String, '#pop'),
|
| 142 |
+
(r'\[\s*\]', Punctuation, '#pop'),
|
| 143 |
+
],
|
| 144 |
+
'const_value': [
|
| 145 |
+
include('common'),
|
| 146 |
+
(words(('true', 'false', '-Infinity', 'Infinity', 'NaN', 'null'),
|
| 147 |
+
suffix=_keyword_suffix), Keyword.Constant, '#pop'),
|
| 148 |
+
(r'-?(?:(?:[0-9]+\.[0-9]*|[0-9]*\.[0-9]+)(?:[Ee][+-]?[0-9]+)?' +
|
| 149 |
+
r'|[0-9]+[Ee][+-]?[0-9]+)', Number.Float, '#pop'),
|
| 150 |
+
(r'-?[1-9][0-9]*', Number.Integer, '#pop'),
|
| 151 |
+
(r'-?0[Xx][0-9A-Fa-f]+', Number.Hex, '#pop'),
|
| 152 |
+
(r'-?0[0-7]*', Number.Oct, '#pop'),
|
| 153 |
+
],
|
| 154 |
+
'typedef': [
|
| 155 |
+
include('common'),
|
| 156 |
+
(_identifier, Name.Class),
|
| 157 |
+
(r';', Punctuation, '#pop'),
|
| 158 |
+
],
|
| 159 |
+
'namespace_rest': [
|
| 160 |
+
include('common'),
|
| 161 |
+
(_identifier, Name.Namespace),
|
| 162 |
+
(r'\{', Punctuation, 'namespace_body'),
|
| 163 |
+
(r';', Punctuation, '#pop'),
|
| 164 |
+
],
|
| 165 |
+
'namespace_body': [
|
| 166 |
+
include('common'),
|
| 167 |
+
(r'\[', Punctuation, 'extended_attributes'),
|
| 168 |
+
(r'readonly' + _keyword_suffix, Keyword),
|
| 169 |
+
(r'attribute' + _keyword_suffix,
|
| 170 |
+
Keyword, ('attribute_rest', 'type')),
|
| 171 |
+
(r'const' + _keyword_suffix, Keyword, ('const_rest', 'type')),
|
| 172 |
+
(r'\}', Punctuation, '#pop'),
|
| 173 |
+
default(('operation_rest', 'type')),
|
| 174 |
+
],
|
| 175 |
+
'interface_rest': [
|
| 176 |
+
include('common'),
|
| 177 |
+
(_identifier, Name.Class),
|
| 178 |
+
(r':', Punctuation),
|
| 179 |
+
(r'\{', Punctuation, 'interface_body'),
|
| 180 |
+
(r';', Punctuation, '#pop'),
|
| 181 |
+
],
|
| 182 |
+
'interface_body': [
|
| 183 |
+
(words(('iterable', 'maplike', 'setlike'), suffix=_keyword_suffix),
|
| 184 |
+
Keyword, 'iterable_maplike_setlike_rest'),
|
| 185 |
+
(words(('setter', 'getter', 'creator', 'deleter', 'legacycaller',
|
| 186 |
+
'inherit', 'static', 'stringifier', 'jsonifier'),
|
| 187 |
+
suffix=_keyword_suffix), Keyword),
|
| 188 |
+
(r'serializer' + _keyword_suffix, Keyword, 'serializer_rest'),
|
| 189 |
+
(r';', Punctuation),
|
| 190 |
+
include('namespace_body'),
|
| 191 |
+
],
|
| 192 |
+
'attribute_rest': [
|
| 193 |
+
include('common'),
|
| 194 |
+
(_identifier, Name.Variable),
|
| 195 |
+
(r';', Punctuation, '#pop'),
|
| 196 |
+
],
|
| 197 |
+
'const_rest': [
|
| 198 |
+
include('common'),
|
| 199 |
+
(_identifier, Name.Constant),
|
| 200 |
+
(r'=', Punctuation, 'const_value'),
|
| 201 |
+
(r';', Punctuation, '#pop'),
|
| 202 |
+
],
|
| 203 |
+
'operation_rest': [
|
| 204 |
+
include('common'),
|
| 205 |
+
(r';', Punctuation, '#pop'),
|
| 206 |
+
default('operation'),
|
| 207 |
+
],
|
| 208 |
+
'operation': [
|
| 209 |
+
include('common'),
|
| 210 |
+
(_identifier, Name.Function),
|
| 211 |
+
(r'\(', Punctuation, 'argument_list'),
|
| 212 |
+
(r';', Punctuation, '#pop:2'),
|
| 213 |
+
],
|
| 214 |
+
'iterable_maplike_setlike_rest': [
|
| 215 |
+
include('common'),
|
| 216 |
+
(r'<', Punctuation, 'type_list'),
|
| 217 |
+
(r';', Punctuation, '#pop'),
|
| 218 |
+
],
|
| 219 |
+
'type_list': [
|
| 220 |
+
include('common'),
|
| 221 |
+
(r',', Punctuation),
|
| 222 |
+
(r'>', Punctuation, '#pop'),
|
| 223 |
+
default('type'),
|
| 224 |
+
],
|
| 225 |
+
'serializer_rest': [
|
| 226 |
+
include('common'),
|
| 227 |
+
(r'=', Punctuation, 'serialization_pattern'),
|
| 228 |
+
(r';', Punctuation, '#pop'),
|
| 229 |
+
default('operation'),
|
| 230 |
+
],
|
| 231 |
+
'serialization_pattern': [
|
| 232 |
+
include('common'),
|
| 233 |
+
(_identifier, Name.Variable, '#pop'),
|
| 234 |
+
(r'\{', Punctuation, 'serialization_pattern_map'),
|
| 235 |
+
(r'\[', Punctuation, 'serialization_pattern_list'),
|
| 236 |
+
],
|
| 237 |
+
'serialization_pattern_map': [
|
| 238 |
+
include('common'),
|
| 239 |
+
(words(('getter', 'inherit', 'attribute'),
|
| 240 |
+
suffix=_keyword_suffix), Keyword),
|
| 241 |
+
(r',', Punctuation),
|
| 242 |
+
(_identifier, Name.Variable),
|
| 243 |
+
(r'\}', Punctuation, '#pop:2'),
|
| 244 |
+
],
|
| 245 |
+
'serialization_pattern_list': [
|
| 246 |
+
include('common'),
|
| 247 |
+
(words(('getter', 'attribute'), suffix=_keyword_suffix), Keyword),
|
| 248 |
+
(r',', Punctuation),
|
| 249 |
+
(_identifier, Name.Variable),
|
| 250 |
+
(r']', Punctuation, '#pop:2'),
|
| 251 |
+
],
|
| 252 |
+
'enum_rest': [
|
| 253 |
+
include('common'),
|
| 254 |
+
(_identifier, Name.Class),
|
| 255 |
+
(r'\{', Punctuation, 'enum_body'),
|
| 256 |
+
(r';', Punctuation, '#pop'),
|
| 257 |
+
],
|
| 258 |
+
'enum_body': [
|
| 259 |
+
include('common'),
|
| 260 |
+
(_string, String),
|
| 261 |
+
(r',', Punctuation),
|
| 262 |
+
(r'\}', Punctuation, '#pop'),
|
| 263 |
+
],
|
| 264 |
+
'callback_rest': [
|
| 265 |
+
include('common'),
|
| 266 |
+
(r'interface' + _keyword_suffix,
|
| 267 |
+
Keyword, ('#pop', 'interface_rest')),
|
| 268 |
+
(_identifier, Name.Class),
|
| 269 |
+
(r'=', Punctuation, ('operation', 'type')),
|
| 270 |
+
(r';', Punctuation, '#pop'),
|
| 271 |
+
],
|
| 272 |
+
'dictionary_rest': [
|
| 273 |
+
include('common'),
|
| 274 |
+
(_identifier, Name.Class),
|
| 275 |
+
(r':', Punctuation),
|
| 276 |
+
(r'\{', Punctuation, 'dictionary_body'),
|
| 277 |
+
(r';', Punctuation, '#pop'),
|
| 278 |
+
],
|
| 279 |
+
'dictionary_body': [
|
| 280 |
+
include('common'),
|
| 281 |
+
(r'\[', Punctuation, 'extended_attributes'),
|
| 282 |
+
(r'required' + _keyword_suffix, Keyword),
|
| 283 |
+
(r'\}', Punctuation, '#pop'),
|
| 284 |
+
default(('dictionary_item', 'type')),
|
| 285 |
+
],
|
| 286 |
+
'dictionary_item': [
|
| 287 |
+
include('common'),
|
| 288 |
+
(_identifier, Name.Variable),
|
| 289 |
+
(r'=', Punctuation, 'default_value'),
|
| 290 |
+
(r';', Punctuation, '#pop'),
|
| 291 |
+
],
|
| 292 |
+
'implements_rest': [
|
| 293 |
+
include('common'),
|
| 294 |
+
(r'implements' + _keyword_suffix, Keyword),
|
| 295 |
+
(_identifier, Name.Class),
|
| 296 |
+
(r';', Punctuation, '#pop'),
|
| 297 |
+
],
|
| 298 |
+
}
|