Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/pygments/lexers/macaulay2.py: 100%

13 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-06-07 06:16 +0000

1""" 

2 pygments.lexers.macaulay2 

3 ~~~~~~~~~~~~~~~~~~~~~~~~~ 

4 

5 Lexer for Macaulay2. 

6 

7 :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. 

8 :license: BSD, see LICENSE for details. 

9""" 

10 

11from pygments.lexer import RegexLexer, words 

12from pygments.token import Comment, Keyword, Name, String, Text 

13 

14__all__ = ['Macaulay2Lexer'] 

15 

16# Auto-generated for Macaulay2-1.21. Do not modify this file manually. 

17 

18M2KEYWORDS = ( 

19 "and", 

20 "break", 

21 "catch", 

22 "continue", 

23 "do", 

24 "elapsedTime", 

25 "elapsedTiming", 

26 "else", 

27 "for", 

28 "from", 

29 "global", 

30 "if", 

31 "in", 

32 "list", 

33 "local", 

34 "new", 

35 "not", 

36 "of", 

37 "or", 

38 "return", 

39 "shield", 

40 "SPACE", 

41 "step", 

42 "symbol", 

43 "then", 

44 "threadVariable", 

45 "throw", 

46 "time", 

47 "timing", 

48 "to", 

49 "try", 

50 "when", 

51 "while", 

52 "xor" 

53 ) 

54 

55M2DATATYPES = ( 

56 "Adjacent", 

57 "AffineVariety", 

58 "Analyzer", 

59 "ANCHOR", 

60 "AngleBarList", 

61 "Array", 

62 "AssociativeExpression", 

63 "Bag", 

64 "BasicList", 

65 "BettiTally", 

66 "BinaryOperation", 

67 "BLOCKQUOTE", 

68 "BODY", 

69 "BOLD", 

70 "Boolean", 

71 "BR", 

72 "CacheFunction", 

73 "CacheTable", 

74 "CC", 

75 "CDATA", 

76 "ChainComplex", 

77 "ChainComplexMap", 

78 "CODE", 

79 "CoherentSheaf", 

80 "Command", 

81 "COMMENT", 

82 "CompiledFunction", 

83 "CompiledFunctionBody", 

84 "CompiledFunctionClosure", 

85 "ComplexField", 

86 "Constant", 

87 "Database", 

88 "DD", 

89 "Descent", 

90 "Describe", 

91 "Dictionary", 

92 "DIV", 

93 "Divide", 

94 "DL", 

95 "DocumentTag", 

96 "DT", 

97 "Eliminate", 

98 "EM", 

99 "EngineRing", 

100 "Equation", 

101 "ExampleItem", 

102 "Expression", 

103 "File", 

104 "FilePosition", 

105 "FractionField", 

106 "Function", 

107 "FunctionApplication", 

108 "FunctionBody", 

109 "FunctionClosure", 

110 "GaloisField", 

111 "GeneralOrderedMonoid", 

112 "GlobalDictionary", 

113 "GradedModule", 

114 "GradedModuleMap", 

115 "GroebnerBasis", 

116 "GroebnerBasisOptions", 

117 "HashTable", 

118 "HEAD", 

119 "HEADER1", 

120 "HEADER2", 

121 "HEADER3", 

122 "HEADER4", 

123 "HEADER5", 

124 "HEADER6", 

125 "HeaderType", 

126 "Holder", 

127 "HR", 

128 "HREF", 

129 "HTML", 

130 "Hybrid", 

131 "Hypertext", 

132 "HypertextContainer", 

133 "HypertextParagraph", 

134 "Ideal", 

135 "IMG", 

136 "ImmutableType", 

137 "IndeterminateNumber", 

138 "IndexedVariable", 

139 "IndexedVariableTable", 

140 "InexactField", 

141 "InexactFieldFamily", 

142 "InexactNumber", 

143 "InfiniteNumber", 

144 "IntermediateMarkUpType", 

145 "ITALIC", 

146 "Iterator", 

147 "Keyword", 

148 "LABEL", 

149 "LATER", 

150 "LI", 

151 "LINK", 

152 "List", 

153 "LITERAL", 

154 "LocalDictionary", 

155 "LowerBound", 

156 "Manipulator", 

157 "MapExpression", 

158 "MarkUpType", 

159 "Matrix", 

160 "MatrixExpression", 

161 "MENU", 

162 "META", 

163 "MethodFunction", 

164 "MethodFunctionBinary", 

165 "MethodFunctionSingle", 

166 "MethodFunctionWithOptions", 

167 "Minus", 

168 "Module", 

169 "Monoid", 

170 "MonoidElement", 

171 "MonomialIdeal", 

172 "MultigradedBettiTally", 

173 "MutableHashTable", 

174 "MutableList", 

175 "MutableMatrix", 

176 "Net", 

177 "NetFile", 

178 "NonAssociativeProduct", 

179 "Nothing", 

180 "Number", 

181 "NumberedVerticalList", 

182 "OL", 

183 "OneExpression", 

184 "Option", 

185 "OptionTable", 

186 "OrderedMonoid", 

187 "Package", 

188 "PARA", 

189 "Parenthesize", 

190 "Parser", 

191 "Partition", 

192 "PolynomialRing", 

193 "Power", 

194 "PRE", 

195 "Product", 

196 "ProductOrder", 

197 "Program", 

198 "ProgramRun", 

199 "ProjectiveHilbertPolynomial", 

200 "ProjectiveVariety", 

201 "Pseudocode", 

202 "QQ", 

203 "QuotientRing", 

204 "RealField", 

205 "Resolution", 

206 "Ring", 

207 "RingElement", 

208 "RingFamily", 

209 "RingMap", 

210 "RowExpression", 

211 "RR", 

212 "RRi", 

213 "SCRIPT", 

214 "ScriptedFunctor", 

215 "SelfInitializingType", 

216 "Sequence", 

217 "Set", 

218 "SheafExpression", 

219 "SheafOfRings", 

220 "SMALL", 

221 "SPAN", 

222 "SparseMonomialVectorExpression", 

223 "SparseVectorExpression", 

224 "String", 

225 "STRONG", 

226 "STYLE", 

227 "SUB", 

228 "Subscript", 

229 "SUBSECTION", 

230 "Sum", 

231 "SumOfTwists", 

232 "SUP", 

233 "Superscript", 

234 "Symbol", 

235 "SymbolBody", 

236 "TABLE", 

237 "Table", 

238 "Tally", 

239 "Task", 

240 "TD", 

241 "TestInput", 

242 "TEX", 

243 "TH", 

244 "Thing", 

245 "Time", 

246 "TITLE", 

247 "TO", 

248 "TO2", 

249 "TOH", 

250 "TR", 

251 "TT", 

252 "Type", 

253 "UL", 

254 "URL", 

255 "Variety", 

256 "Vector", 

257 "VectorExpression", 

258 "VerticalList", 

259 "VirtualTally", 

260 "VisibleList", 

261 "WrapperType", 

262 "ZeroExpression", 

263 "ZZ" 

264 ) 

265 

266M2FUNCTIONS = ( 

267 "about", 

268 "abs", 

269 "accumulate", 

270 "acos", 

271 "acosh", 

272 "acot", 

273 "acoth", 

274 "addCancelTask", 

275 "addDependencyTask", 

276 "addEndFunction", 

277 "addHook", 

278 "addStartFunction", 

279 "addStartTask", 

280 "adjoint", 

281 "agm", 

282 "alarm", 

283 "all", 

284 "ambient", 

285 "analyticSpread", 

286 "ancestor", 

287 "ancestors", 

288 "andP", 

289 "ann", 

290 "annihilator", 

291 "antipode", 

292 "any", 

293 "append", 

294 "applicationDirectory", 

295 "apply", 

296 "applyKeys", 

297 "applyPairs", 

298 "applyTable", 

299 "applyValues", 

300 "apropos", 

301 "arXiv", 

302 "ascii", 

303 "asin", 

304 "asinh", 

305 "ass", 

306 "assert", 

307 "associatedGradedRing", 

308 "associatedPrimes", 

309 "atan", 

310 "atan2", 

311 "atanh", 

312 "atEndOfFile", 

313 "autoload", 

314 "baseFilename", 

315 "baseName", 

316 "baseRing", 

317 "basis", 

318 "beginDocumentation", 

319 "benchmark", 

320 "BesselJ", 

321 "BesselY", 

322 "Beta", 

323 "betti", 

324 "between", 

325 "binomial", 

326 "borel", 

327 "cacheValue", 

328 "cancelTask", 

329 "capture", 

330 "ceiling", 

331 "centerString", 

332 "chainComplex", 

333 "changeBase", 

334 "char", 

335 "characters", 

336 "charAnalyzer", 

337 "check", 

338 "checkDegrees", 

339 "chi", 

340 "class", 

341 "clean", 

342 "clearEcho", 

343 "code", 

344 "codim", 

345 "coefficient", 

346 "coefficientRing", 

347 "coefficients", 

348 "cohomology", 

349 "coimage", 

350 "coker", 

351 "cokernel", 

352 "collectGarbage", 

353 "columnAdd", 

354 "columnate", 

355 "columnMult", 

356 "columnPermute", 

357 "columnRankProfile", 

358 "columnSwap", 

359 "combine", 

360 "commandInterpreter", 

361 "commonest", 

362 "commonRing", 

363 "comodule", 

364 "complement", 

365 "complete", 

366 "components", 

367 "compose", 

368 "compositions", 

369 "compress", 

370 "concatenate", 

371 "conductor", 

372 "cone", 

373 "conjugate", 

374 "connectionCount", 

375 "constParser", 

376 "content", 

377 "contract", 

378 "conwayPolynomial", 

379 "copy", 

380 "copyDirectory", 

381 "copyFile", 

382 "cos", 

383 "cosh", 

384 "cot", 

385 "cotangentSheaf", 

386 "coth", 

387 "cover", 

388 "coverMap", 

389 "cpuTime", 

390 "createTask", 

391 "csc", 

392 "csch", 

393 "currentColumnNumber", 

394 "currentDirectory", 

395 "currentPosition", 

396 "currentRowNumber", 

397 "currentTime", 

398 "deadParser", 

399 "debug", 

400 "debugError", 

401 "decompose", 

402 "deepSplice", 

403 "default", 

404 "degree", 

405 "degreeGroup", 

406 "degreeLength", 

407 "degrees", 

408 "degreesMonoid", 

409 "degreesRing", 

410 "delete", 

411 "demark", 

412 "denominator", 

413 "depth", 

414 "describe", 

415 "det", 

416 "determinant", 

417 "diagonalMatrix", 

418 "diameter", 

419 "dictionary", 

420 "diff", 

421 "difference", 

422 "Digamma", 

423 "dim", 

424 "directSum", 

425 "disassemble", 

426 "discriminant", 

427 "dismiss", 

428 "distinguished", 

429 "divideByVariable", 

430 "doc", 

431 "document", 

432 "drop", 

433 "dual", 

434 "eagonNorthcott", 

435 "echoOff", 

436 "echoOn", 

437 "eigenvalues", 

438 "eigenvectors", 

439 "eint", 

440 "elements", 

441 "eliminate", 

442 "End", 

443 "endPackage", 

444 "entries", 

445 "erase", 

446 "erf", 

447 "erfc", 

448 "error", 

449 "euler", 

450 "eulers", 

451 "even", 

452 "EXAMPLE", 

453 "examples", 

454 "exec", 

455 "exp", 

456 "expectedReesIdeal", 

457 "expm1", 

458 "exponents", 

459 "export", 

460 "exportFrom", 

461 "exportMutable", 

462 "expression", 

463 "extend", 

464 "exteriorPower", 

465 "factor", 

466 "Fano", 

467 "fileExecutable", 

468 "fileExists", 

469 "fileLength", 

470 "fileMode", 

471 "fileReadable", 

472 "fileTime", 

473 "fileWritable", 

474 "fillMatrix", 

475 "findFiles", 

476 "findHeft", 

477 "findProgram", 

478 "findSynonyms", 

479 "first", 

480 "firstkey", 

481 "fittingIdeal", 

482 "flagLookup", 

483 "flatten", 

484 "flattenRing", 

485 "flip", 

486 "floor", 

487 "fold", 

488 "forceGB", 

489 "fork", 

490 "format", 

491 "formation", 

492 "frac", 

493 "fraction", 

494 "frames", 

495 "fromDividedPowers", 

496 "fromDual", 

497 "functionBody", 

498 "futureParser", 

499 "Gamma", 

500 "gb", 

501 "gbRemove", 

502 "gbSnapshot", 

503 "gcd", 

504 "gcdCoefficients", 

505 "gcdLLL", 

506 "GCstats", 

507 "genera", 

508 "generateAssertions", 

509 "generator", 

510 "generators", 

511 "genericMatrix", 

512 "genericSkewMatrix", 

513 "genericSymmetricMatrix", 

514 "gens", 

515 "genus", 

516 "get", 

517 "getc", 

518 "getChangeMatrix", 

519 "getenv", 

520 "getGlobalSymbol", 

521 "getNetFile", 

522 "getNonUnit", 

523 "getPrimeWithRootOfUnity", 

524 "getSymbol", 

525 "getWWW", 

526 "GF", 

527 "globalAssign", 

528 "globalAssignFunction", 

529 "globalAssignment", 

530 "globalReleaseFunction", 

531 "gradedModule", 

532 "gradedModuleMap", 

533 "gramm", 

534 "graphIdeal", 

535 "graphRing", 

536 "Grassmannian", 

537 "groebnerBasis", 

538 "groupID", 

539 "hash", 

540 "hashTable", 

541 "heft", 

542 "height", 

543 "hermite", 

544 "hilbertFunction", 

545 "hilbertPolynomial", 

546 "hilbertSeries", 

547 "hold", 

548 "Hom", 

549 "homogenize", 

550 "homology", 

551 "homomorphism", 

552 "hooks", 

553 "horizontalJoin", 

554 "html", 

555 "httpHeaders", 

556 "hypertext", 

557 "icFracP", 

558 "icFractions", 

559 "icMap", 

560 "icPIdeal", 

561 "ideal", 

562 "idealizer", 

563 "identity", 

564 "image", 

565 "imaginaryPart", 

566 "importFrom", 

567 "independentSets", 

568 "index", 

569 "indices", 

570 "inducedMap", 

571 "inducesWellDefinedMap", 

572 "info", 

573 "input", 

574 "insert", 

575 "installAssignmentMethod", 

576 "installedPackages", 

577 "installHilbertFunction", 

578 "installMethod", 

579 "installMinprimes", 

580 "installPackage", 

581 "instance", 

582 "instances", 

583 "integralClosure", 

584 "integrate", 

585 "intersect", 

586 "intersectInP", 

587 "intersection", 

588 "interval", 

589 "inverse", 

590 "inverseErf", 

591 "inversePermutation", 

592 "inverseRegularizedBeta", 

593 "inverseRegularizedGamma", 

594 "inverseSystem", 

595 "irreducibleCharacteristicSeries", 

596 "irreducibleDecomposition", 

597 "isAffineRing", 

598 "isANumber", 

599 "isBorel", 

600 "isc", 

601 "isCanceled", 

602 "isCommutative", 

603 "isConstant", 

604 "isDirectory", 

605 "isDirectSum", 

606 "isEmpty", 

607 "isField", 

608 "isFinite", 

609 "isFinitePrimeField", 

610 "isFreeModule", 

611 "isGlobalSymbol", 

612 "isHomogeneous", 

613 "isIdeal", 

614 "isInfinite", 

615 "isInjective", 

616 "isInputFile", 

617 "isIsomorphic", 

618 "isIsomorphism", 

619 "isLinearType", 

620 "isListener", 

621 "isLLL", 

622 "isMember", 

623 "isModule", 

624 "isMonomialIdeal", 

625 "isNormal", 

626 "isOpen", 

627 "isOutputFile", 

628 "isPolynomialRing", 

629 "isPrimary", 

630 "isPrime", 

631 "isPrimitive", 

632 "isPseudoprime", 

633 "isQuotientModule", 

634 "isQuotientOf", 

635 "isQuotientRing", 

636 "isReady", 

637 "isReal", 

638 "isReduction", 

639 "isRegularFile", 

640 "isRing", 

641 "isSkewCommutative", 

642 "isSorted", 

643 "isSquareFree", 

644 "isStandardGradedPolynomialRing", 

645 "isSubmodule", 

646 "isSubquotient", 

647 "isSubset", 

648 "isSupportedInZeroLocus", 

649 "isSurjective", 

650 "isTable", 

651 "isUnit", 

652 "isWellDefined", 

653 "isWeylAlgebra", 

654 "iterator", 

655 "jacobian", 

656 "jacobianDual", 

657 "join", 

658 "ker", 

659 "kernel", 

660 "kernelLLL", 

661 "kernelOfLocalization", 

662 "keys", 

663 "kill", 

664 "koszul", 

665 "last", 

666 "lcm", 

667 "leadCoefficient", 

668 "leadComponent", 

669 "leadMonomial", 

670 "leadTerm", 

671 "left", 

672 "length", 

673 "letterParser", 

674 "lift", 

675 "liftable", 

676 "limitFiles", 

677 "limitProcesses", 

678 "lines", 

679 "linkFile", 

680 "listForm", 

681 "listSymbols", 

682 "LLL", 

683 "lngamma", 

684 "load", 

685 "loadPackage", 

686 "localDictionaries", 

687 "localize", 

688 "locate", 

689 "log", 

690 "log1p", 

691 "lookup", 

692 "lookupCount", 

693 "LUdecomposition", 

694 "M2CODE", 

695 "makeDirectory", 

696 "makeDocumentTag", 

697 "makePackageIndex", 

698 "makeS2", 

699 "map", 

700 "markedGB", 

701 "match", 

702 "mathML", 

703 "matrix", 

704 "max", 

705 "maxPosition", 

706 "member", 

707 "memoize", 

708 "memoizeClear", 

709 "memoizeValues", 

710 "merge", 

711 "mergePairs", 

712 "method", 

713 "methodOptions", 

714 "methods", 

715 "midpoint", 

716 "min", 

717 "mingens", 

718 "mingle", 

719 "minimalBetti", 

720 "minimalPresentation", 

721 "minimalPrimes", 

722 "minimalReduction", 

723 "minimizeFilename", 

724 "minors", 

725 "minPosition", 

726 "minPres", 

727 "minprimes", 

728 "minus", 

729 "mkdir", 

730 "mod", 

731 "module", 

732 "modulo", 

733 "monoid", 

734 "monomialCurveIdeal", 

735 "monomialIdeal", 

736 "monomials", 

737 "monomialSubideal", 

738 "moveFile", 

739 "multidegree", 

740 "multidoc", 

741 "multigraded", 

742 "multiplicity", 

743 "mutable", 

744 "mutableIdentity", 

745 "mutableMatrix", 

746 "nanosleep", 

747 "needs", 

748 "needsPackage", 

749 "net", 

750 "netList", 

751 "newClass", 

752 "newCoordinateSystem", 

753 "newNetFile", 

754 "newPackage", 

755 "newRing", 

756 "next", 

757 "nextkey", 

758 "nextPrime", 

759 "NNParser", 

760 "nonspaceAnalyzer", 

761 "norm", 

762 "normalCone", 

763 "notImplemented", 

764 "nullhomotopy", 

765 "nullParser", 

766 "nullSpace", 

767 "number", 

768 "numcols", 

769 "numColumns", 

770 "numerator", 

771 "numeric", 

772 "numericInterval", 

773 "numgens", 

774 "numRows", 

775 "numrows", 

776 "odd", 

777 "oeis", 

778 "ofClass", 

779 "on", 

780 "openDatabase", 

781 "openDatabaseOut", 

782 "openFiles", 

783 "openIn", 

784 "openInOut", 

785 "openListener", 

786 "openOut", 

787 "openOutAppend", 

788 "optionalSignParser", 

789 "options", 

790 "optP", 

791 "orP", 

792 "override", 

793 "pack", 

794 "package", 

795 "packageTemplate", 

796 "pad", 

797 "pager", 

798 "pairs", 

799 "parent", 

800 "part", 

801 "partition", 

802 "partitions", 

803 "parts", 

804 "pdim", 

805 "peek", 

806 "permanents", 

807 "permutations", 

808 "pfaffians", 

809 "pivots", 

810 "plus", 

811 "poincare", 

812 "poincareN", 

813 "polarize", 

814 "poly", 

815 "position", 

816 "positions", 

817 "power", 

818 "powermod", 

819 "precision", 

820 "preimage", 

821 "prepend", 

822 "presentation", 

823 "pretty", 

824 "primaryComponent", 

825 "primaryDecomposition", 

826 "print", 

827 "printerr", 

828 "printString", 

829 "processID", 

830 "product", 

831 "profile", 

832 "Proj", 

833 "projectiveHilbertPolynomial", 

834 "promote", 

835 "protect", 

836 "prune", 

837 "pseudocode", 

838 "pseudoRemainder", 

839 "pushForward", 

840 "QQParser", 

841 "QRDecomposition", 

842 "quotient", 

843 "quotientRemainder", 

844 "radical", 

845 "radicalContainment", 

846 "random", 

847 "randomKRationalPoint", 

848 "randomMutableMatrix", 

849 "rank", 

850 "read", 

851 "readDirectory", 

852 "readlink", 

853 "readPackage", 

854 "realPart", 

855 "realpath", 

856 "recursionDepth", 

857 "reducedRowEchelonForm", 

858 "reduceHilbert", 

859 "reductionNumber", 

860 "reesAlgebra", 

861 "reesAlgebraIdeal", 

862 "reesIdeal", 

863 "regex", 

864 "regexQuote", 

865 "registerFinalizer", 

866 "regSeqInIdeal", 

867 "regularity", 

868 "regularizedBeta", 

869 "regularizedGamma", 

870 "relations", 

871 "relativizeFilename", 

872 "remainder", 

873 "remove", 

874 "removeDirectory", 

875 "removeFile", 

876 "removeLowestDimension", 

877 "reorganize", 

878 "replace", 

879 "res", 

880 "reshape", 

881 "resolution", 

882 "resultant", 

883 "reverse", 

884 "right", 

885 "ring", 

886 "ringFromFractions", 

887 "roots", 

888 "rotate", 

889 "round", 

890 "rowAdd", 

891 "rowMult", 

892 "rowPermute", 

893 "rowRankProfile", 

894 "rowSwap", 

895 "rsort", 

896 "run", 

897 "runHooks", 

898 "runLengthEncode", 

899 "runProgram", 

900 "same", 

901 "saturate", 

902 "scan", 

903 "scanKeys", 

904 "scanLines", 

905 "scanPairs", 

906 "scanValues", 

907 "schedule", 

908 "schreyerOrder", 

909 "Schubert", 

910 "searchPath", 

911 "sec", 

912 "sech", 

913 "seeParsing", 

914 "select", 

915 "selectInSubring", 

916 "selectVariables", 

917 "separate", 

918 "separateRegexp", 

919 "sequence", 

920 "serialNumber", 

921 "set", 

922 "setEcho", 

923 "setGroupID", 

924 "setIOExclusive", 

925 "setIOSynchronized", 

926 "setIOUnSynchronized", 

927 "setRandomSeed", 

928 "setup", 

929 "setupEmacs", 

930 "sheaf", 

931 "sheafHom", 

932 "show", 

933 "showHtml", 

934 "showTex", 

935 "simpleDocFrob", 

936 "sin", 

937 "singularLocus", 

938 "sinh", 

939 "size", 

940 "size2", 

941 "sleep", 

942 "smithNormalForm", 

943 "solve", 

944 "someTerms", 

945 "sort", 

946 "sortColumns", 

947 "source", 

948 "span", 

949 "Spec", 

950 "specialFiber", 

951 "specialFiberIdeal", 

952 "splice", 

953 "splitWWW", 

954 "sqrt", 

955 "stack", 

956 "stacksProject", 

957 "standardForm", 

958 "standardPairs", 

959 "stashValue", 

960 "status", 

961 "style", 

962 "sub", 

963 "sublists", 

964 "submatrix", 

965 "submatrixByDegrees", 

966 "subquotient", 

967 "subsets", 

968 "substitute", 

969 "substring", 

970 "subtable", 

971 "sum", 

972 "super", 

973 "support", 

974 "SVD", 

975 "switch", 

976 "sylvesterMatrix", 

977 "symbolBody", 

978 "symlinkDirectory", 

979 "symlinkFile", 

980 "symmetricAlgebra", 

981 "symmetricAlgebraIdeal", 

982 "symmetricKernel", 

983 "symmetricPower", 

984 "synonym", 

985 "SYNOPSIS", 

986 "syz", 

987 "syzygyScheme", 

988 "table", 

989 "take", 

990 "tally", 

991 "tan", 

992 "tangentCone", 

993 "tangentSheaf", 

994 "tanh", 

995 "target", 

996 "taskResult", 

997 "temporaryFileName", 

998 "tensor", 

999 "tensorAssociativity", 

1000 "terminalParser", 

1001 "terms", 

1002 "TEST", 

1003 "testHunekeQuestion", 

1004 "tests", 

1005 "tex", 

1006 "texMath", 

1007 "times", 

1008 "toAbsolutePath", 

1009 "toCC", 

1010 "toDividedPowers", 

1011 "toDual", 

1012 "toExternalString", 

1013 "toField", 

1014 "toList", 

1015 "toLower", 

1016 "top", 

1017 "topCoefficients", 

1018 "topComponents", 

1019 "toRR", 

1020 "toRRi", 

1021 "toSequence", 

1022 "toString", 

1023 "toUpper", 

1024 "trace", 

1025 "transpose", 

1026 "trim", 

1027 "truncate", 

1028 "truncateOutput", 

1029 "tutorial", 

1030 "ultimate", 

1031 "unbag", 

1032 "uncurry", 

1033 "undocumented", 

1034 "uniform", 

1035 "uninstallAllPackages", 

1036 "uninstallPackage", 

1037 "unique", 

1038 "uniquePermutations", 

1039 "unsequence", 

1040 "unstack", 

1041 "urlEncode", 

1042 "use", 

1043 "userSymbols", 

1044 "utf8", 

1045 "utf8check", 

1046 "utf8substring", 

1047 "validate", 

1048 "value", 

1049 "values", 

1050 "variety", 

1051 "vars", 

1052 "vector", 

1053 "versalEmbedding", 

1054 "wait", 

1055 "wedgeProduct", 

1056 "weightRange", 

1057 "whichGm", 

1058 "width", 

1059 "wikipedia", 

1060 "wrap", 

1061 "youngest", 

1062 "zero", 

1063 "zeta", 

1064 "ZZParser" 

1065 ) 

1066 

1067M2CONSTANTS = ( 

1068 "AbstractToricVarieties", 

1069 "Acknowledgement", 

1070 "AdditionalPaths", 

1071 "AdjointIdeal", 

1072 "AfterEval", 

1073 "AfterNoPrint", 

1074 "AfterPrint", 

1075 "AInfinity", 

1076 "AlgebraicSplines", 

1077 "Algorithm", 

1078 "Alignment", 

1079 "AllCodimensions", 

1080 "allowableThreads", 

1081 "AnalyzeSheafOnP1", 

1082 "applicationDirectorySuffix", 

1083 "argument", 

1084 "Ascending", 

1085 "AssociativeAlgebras", 

1086 "Authors", 

1087 "AuxiliaryFiles", 

1088 "backtrace", 

1089 "Bareiss", 

1090 "BaseFunction", 

1091 "baseRings", 

1092 "BaseRow", 

1093 "BasisElementLimit", 

1094 "Bayer", 

1095 "BeforePrint", 

1096 "BeginningMacaulay2", 

1097 "Benchmark", 

1098 "Bertini", 

1099 "BettiCharacters", 

1100 "BGG", 

1101 "BIBasis", 

1102 "Binary", 

1103 "Binomial", 

1104 "BinomialEdgeIdeals", 

1105 "Binomials", 

1106 "BKZ", 

1107 "blockMatrixForm", 

1108 "Body", 

1109 "BoijSoederberg", 

1110 "Book3264Examples", 

1111 "BooleanGB", 

1112 "Boxes", 

1113 "Browse", 

1114 "Bruns", 

1115 "cache", 

1116 "CacheExampleOutput", 

1117 "CallLimit", 

1118 "CannedExample", 

1119 "CatalanConstant", 

1120 "Caveat", 

1121 "Center", 

1122 "Certification", 

1123 "ChainComplexExtras", 

1124 "ChainComplexOperations", 

1125 "ChangeMatrix", 

1126 "CharacteristicClasses", 

1127 "CheckDocumentation", 

1128 "Chordal", 

1129 "Classic", 

1130 "clearAll", 

1131 "clearOutput", 

1132 "close", 

1133 "closeIn", 

1134 "closeOut", 

1135 "ClosestFit", 

1136 "Code", 

1137 "CodimensionLimit", 

1138 "CodingTheory", 

1139 "CoefficientRing", 

1140 "Cofactor", 

1141 "CohenEngine", 

1142 "CohenTopLevel", 

1143 "CohomCalg", 

1144 "CoincidentRootLoci", 

1145 "commandLine", 

1146 "compactMatrixForm", 

1147 "Complement", 

1148 "CompleteIntersection", 

1149 "CompleteIntersectionResolutions", 

1150 "Complexes", 

1151 "ConductorElement", 

1152 "Configuration", 

1153 "ConformalBlocks", 

1154 "Consequences", 

1155 "Constants", 

1156 "Contributors", 

1157 "ConvexInterface", 

1158 "ConwayPolynomials", 

1159 "copyright", 

1160 "Core", 

1161 "CorrespondenceScrolls", 

1162 "CotangentSchubert", 

1163 "Cremona", 

1164 "currentFileDirectory", 

1165 "currentFileName", 

1166 "currentLayout", 

1167 "currentPackage", 

1168 "Cyclotomic", 

1169 "Date", 

1170 "dd", 

1171 "DebuggingMode", 

1172 "debuggingMode", 

1173 "debugLevel", 

1174 "DecomposableSparseSystems", 

1175 "Decompose", 

1176 "Default", 

1177 "defaultPrecision", 

1178 "Degree", 

1179 "DegreeGroup", 

1180 "DegreeLift", 

1181 "DegreeLimit", 

1182 "DegreeMap", 

1183 "DegreeOrder", 

1184 "DegreeRank", 

1185 "Degrees", 

1186 "Dense", 

1187 "Density", 

1188 "Depth", 

1189 "Descending", 

1190 "Description", 

1191 "DeterminantalRepresentations", 

1192 "DGAlgebras", 

1193 "dictionaryPath", 

1194 "DiffAlg", 

1195 "Dispatch", 

1196 "DivideConquer", 

1197 "DividedPowers", 

1198 "Divisor", 

1199 "Dmodules", 

1200 "docExample", 

1201 "docTemplate", 

1202 "Down", 

1203 "Dynamic", 

1204 "EagonResolution", 

1205 "EdgeIdeals", 

1206 "edit", 

1207 "EigenSolver", 

1208 "EisenbudHunekeVasconcelos", 

1209 "Elimination", 

1210 "EliminationMatrices", 

1211 "EllipticCurves", 

1212 "EllipticIntegrals", 

1213 "Email", 

1214 "end", 

1215 "endl", 

1216 "Engine", 

1217 "engineDebugLevel", 

1218 "EngineTests", 

1219 "EnumerationCurves", 

1220 "environment", 

1221 "EquivariantGB", 

1222 "errorDepth", 

1223 "EulerConstant", 

1224 "Example", 

1225 "ExampleFiles", 

1226 "ExampleSystems", 

1227 "Exclude", 

1228 "exit", 

1229 "Ext", 

1230 "ExteriorIdeals", 

1231 "ExteriorModules", 

1232 "false", 

1233 "FastMinors", 

1234 "FastNonminimal", 

1235 "FGLM", 

1236 "fileDictionaries", 

1237 "fileExitHooks", 

1238 "FileName", 

1239 "FindOne", 

1240 "FiniteFittingIdeals", 

1241 "First", 

1242 "FirstPackage", 

1243 "FlatMonoid", 

1244 "Flexible", 

1245 "flush", 

1246 "FollowLinks", 

1247 "ForeignFunctions", 

1248 "FormalGroupLaws", 

1249 "Format", 

1250 "FourierMotzkin", 

1251 "FourTiTwo", 

1252 "fpLLL", 

1253 "FrobeniusThresholds", 

1254 "FunctionFieldDesingularization", 

1255 "GBDegrees", 

1256 "gbTrace", 

1257 "GenerateAssertions", 

1258 "Generic", 

1259 "GenericInitialIdeal", 

1260 "GeometricDecomposability", 

1261 "gfanInterface", 

1262 "Givens", 

1263 "GKMVarieties", 

1264 "GLex", 

1265 "Global", 

1266 "GlobalAssignHook", 

1267 "globalAssignmentHooks", 

1268 "GlobalHookStore", 

1269 "GlobalReleaseHook", 

1270 "Gorenstein", 

1271 "GradedLieAlgebras", 

1272 "GraphicalModels", 

1273 "GraphicalModelsMLE", 

1274 "Graphics", 

1275 "Graphs", 

1276 "GRevLex", 

1277 "GroebnerStrata", 

1278 "GroebnerWalk", 

1279 "GroupLex", 

1280 "GroupRevLex", 

1281 "GTZ", 

1282 "Hadamard", 

1283 "handleInterrupts", 

1284 "HardDegreeLimit", 

1285 "Heading", 

1286 "Headline", 

1287 "Heft", 

1288 "Height", 

1289 "help", 

1290 "Hermite", 

1291 "Hermitian", 

1292 "HH", 

1293 "hh", 

1294 "HigherCIOperators", 

1295 "HighestWeights", 

1296 "Hilbert", 

1297 "HodgeIntegrals", 

1298 "homeDirectory", 

1299 "HomePage", 

1300 "Homogeneous", 

1301 "Homogeneous2", 

1302 "HomotopyLieAlgebra", 

1303 "HorizontalSpace", 

1304 "HyperplaneArrangements", 

1305 "id", 

1306 "IgnoreExampleErrors", 

1307 "ii", 

1308 "incomparable", 

1309 "Increment", 

1310 "indeterminate", 

1311 "Index", 

1312 "indexComponents", 

1313 "infinity", 

1314 "InfoDirSection", 

1315 "infoHelp", 

1316 "Inhomogeneous", 

1317 "Inputs", 

1318 "InstallPrefix", 

1319 "IntegralClosure", 

1320 "interpreterDepth", 

1321 "Intersection", 

1322 "InvariantRing", 

1323 "InverseMethod", 

1324 "Inverses", 

1325 "InverseSystems", 

1326 "Invertible", 

1327 "InvolutiveBases", 

1328 "Isomorphism", 

1329 "Item", 

1330 "Iterate", 

1331 "Jacobian", 

1332 "Jets", 

1333 "Join", 

1334 "JSON", 

1335 "Jupyter", 

1336 "K3Carpets", 

1337 "K3Surfaces", 

1338 "Keep", 

1339 "KeepFiles", 

1340 "KeepZeroes", 

1341 "Key", 

1342 "Keywords", 

1343 "Kronecker", 

1344 "KustinMiller", 

1345 "lastMatch", 

1346 "LatticePolytopes", 

1347 "Layout", 

1348 "Left", 

1349 "LengthLimit", 

1350 "Lex", 

1351 "LexIdeals", 

1352 "Licenses", 

1353 "LieTypes", 

1354 "Limit", 

1355 "Linear", 

1356 "LinearAlgebra", 

1357 "LinearTruncations", 

1358 "lineNumber", 

1359 "listLocalSymbols", 

1360 "listUserSymbols", 

1361 "LLLBases", 

1362 "loadDepth", 

1363 "LoadDocumentation", 

1364 "loadedFiles", 

1365 "loadedPackages", 

1366 "Local", 

1367 "LocalRings", 

1368 "LongPolynomial", 

1369 "M0nbar", 

1370 "Macaulay2Doc", 

1371 "MakeDocumentation", 

1372 "MakeHTML", 

1373 "MakeInfo", 

1374 "MakeLinks", 

1375 "MakePDF", 

1376 "MapleInterface", 

1377 "Markov", 

1378 "Matroids", 

1379 "maxAllowableThreads", 

1380 "maxExponent", 

1381 "MaximalRank", 

1382 "MaxReductionCount", 

1383 "MCMApproximations", 

1384 "MergeTeX", 

1385 "minExponent", 

1386 "MinimalGenerators", 

1387 "MinimalMatrix", 

1388 "minimalPresentationMap", 

1389 "minimalPresentationMapInv", 

1390 "MinimalPrimes", 

1391 "Minimize", 

1392 "MinimumVersion", 

1393 "Miura", 

1394 "MixedMultiplicity", 

1395 "ModuleDeformations", 

1396 "MonodromySolver", 

1397 "Monomial", 

1398 "MonomialAlgebras", 

1399 "MonomialIntegerPrograms", 

1400 "MonomialOrbits", 

1401 "MonomialOrder", 

1402 "Monomials", 

1403 "MonomialSize", 

1404 "MultiGradedRationalMap", 

1405 "MultiplicitySequence", 

1406 "MultiplierIdeals", 

1407 "MultiplierIdealsDim2", 

1408 "MultiprojectiveVarieties", 

1409 "NAGtypes", 

1410 "Name", 

1411 "Nauty", 

1412 "NautyGraphs", 

1413 "NCAlgebra", 

1414 "NCLex", 

1415 "NewFromMethod", 

1416 "newline", 

1417 "NewMethod", 

1418 "NewOfFromMethod", 

1419 "NewOfMethod", 

1420 "nil", 

1421 "Node", 

1422 "NoetherianOperators", 

1423 "NoetherNormalization", 

1424 "NonminimalComplexes", 

1425 "NoPrint", 

1426 "Normaliz", 

1427 "NormalToricVarieties", 

1428 "notify", 

1429 "NTL", 

1430 "null", 

1431 "nullaryMethods", 

1432 "NumericalAlgebraicGeometry", 

1433 "NumericalCertification", 

1434 "NumericalImplicitization", 

1435 "NumericalLinearAlgebra", 

1436 "NumericalSchubertCalculus", 

1437 "NumericSolutions", 

1438 "OldPolyhedra", 

1439 "OldToricVectorBundles", 

1440 "OnlineLookup", 

1441 "OO", 

1442 "oo", 

1443 "ooo", 

1444 "oooo", 

1445 "OpenMath", 

1446 "operatorAttributes", 

1447 "OptionalComponentsPresent", 

1448 "Options", 

1449 "Order", 

1450 "order", 

1451 "OutputDictionary", 

1452 "Outputs", 

1453 "PackageCitations", 

1454 "PackageDictionary", 

1455 "PackageExports", 

1456 "PackageImports", 

1457 "PackageTemplate", 

1458 "PairLimit", 

1459 "PairsRemaining", 

1460 "Parametrization", 

1461 "Parsing", 

1462 "path", 

1463 "PencilsOfQuadrics", 

1464 "Permanents", 

1465 "PHCpack", 

1466 "PhylogeneticTrees", 

1467 "pi", 

1468 "PieriMaps", 

1469 "PlaneCurveSingularities", 

1470 "Points", 

1471 "Polyhedra", 

1472 "Polymake", 

1473 "Posets", 

1474 "Position", 

1475 "PositivityToricBundles", 

1476 "POSIX", 

1477 "Postfix", 

1478 "Pre", 

1479 "Precision", 

1480 "Prefix", 

1481 "prefixDirectory", 

1482 "prefixPath", 

1483 "PrimaryDecomposition", 

1484 "PrimaryTag", 

1485 "PrimitiveElement", 

1486 "Print", 

1487 "printingAccuracy", 

1488 "printingLeadLimit", 

1489 "printingPrecision", 

1490 "printingSeparator", 

1491 "printingTimeLimit", 

1492 "printingTrailLimit", 

1493 "printWidth", 

1494 "Probability", 

1495 "profileSummary", 

1496 "programPaths", 

1497 "Projective", 

1498 "Prune", 

1499 "PruneComplex", 

1500 "pruningMap", 

1501 "PseudomonomialPrimaryDecomposition", 

1502 "Pullback", 

1503 "PushForward", 

1504 "Python", 

1505 "QthPower", 

1506 "Quasidegrees", 

1507 "QuaternaryQuartics", 

1508 "QuillenSuslin", 

1509 "quit", 

1510 "Quotient", 

1511 "Radical", 

1512 "RadicalCodim1", 

1513 "RaiseError", 

1514 "RandomCanonicalCurves", 

1515 "RandomComplexes", 

1516 "RandomCurves", 

1517 "RandomCurvesOverVerySmallFiniteFields", 

1518 "RandomGenus14Curves", 

1519 "RandomIdeals", 

1520 "RandomMonomialIdeals", 

1521 "RandomObjects", 

1522 "RandomPlaneCurves", 

1523 "RandomPoints", 

1524 "RandomSpaceCurves", 

1525 "Range", 

1526 "RationalMaps", 

1527 "RationalPoints", 

1528 "RationalPoints2", 

1529 "ReactionNetworks", 

1530 "RealFP", 

1531 "RealQP", 

1532 "RealQP1", 

1533 "RealRoots", 

1534 "RealRR", 

1535 "RealXD", 

1536 "recursionLimit", 

1537 "Reduce", 

1538 "ReesAlgebra", 

1539 "References", 

1540 "ReflexivePolytopesDB", 

1541 "Regularity", 

1542 "RelativeCanonicalResolution", 

1543 "Reload", 

1544 "RemakeAllDocumentation", 

1545 "RerunExamples", 

1546 "ResidualIntersections", 

1547 "ResLengthThree", 

1548 "ResolutionsOfStanleyReisnerRings", 

1549 "restart", 

1550 "Result", 

1551 "Resultants", 

1552 "returnCode", 

1553 "Reverse", 

1554 "RevLex", 

1555 "Right", 

1556 "rootPath", 

1557 "rootURI", 

1558 "RunDirectory", 

1559 "RunExamples", 

1560 "RunExternalM2", 

1561 "Saturation", 

1562 "Schubert2", 

1563 "SchurComplexes", 

1564 "SchurFunctors", 

1565 "SchurRings", 

1566 "scriptCommandLine", 

1567 "SCSCP", 

1568 "SectionRing", 

1569 "SeeAlso", 

1570 "SegreClasses", 

1571 "SemidefiniteProgramming", 

1572 "Seminormalization", 

1573 "SeparateExec", 

1574 "Serialization", 

1575 "sheafExt", 

1576 "ShimoyamaYokoyama", 

1577 "showClassStructure", 

1578 "showStructure", 

1579 "showUserStructure", 

1580 "SimpleDoc", 

1581 "SimplicialComplexes", 

1582 "SimplicialDecomposability", 

1583 "SimplicialPosets", 

1584 "SimplifyFractions", 

1585 "SizeLimit", 

1586 "SkewCommutative", 

1587 "SlackIdeals", 

1588 "SLnEquivariantMatrices", 

1589 "SLPexpressions", 

1590 "Sort", 

1591 "SortStrategy", 

1592 "SourceCode", 

1593 "SourceRing", 

1594 "SpaceCurves", 

1595 "SparseResultants", 

1596 "SpechtModule", 

1597 "SpecialFanoFourfolds", 

1598 "SpectralSequences", 

1599 "SRdeformations", 

1600 "Standard", 

1601 "StartWithOneMinor", 

1602 "StatePolytope", 

1603 "StatGraphs", 

1604 "stderr", 

1605 "stdio", 

1606 "StopBeforeComputation", 

1607 "stopIfError", 

1608 "StopIteration", 

1609 "StopWithMinimalGenerators", 

1610 "Strategy", 

1611 "Strict", 

1612 "StronglyStableIdeals", 

1613 "Style", 

1614 "SubalgebraBases", 

1615 "Subnodes", 

1616 "SubringLimit", 

1617 "subscript", 

1618 "Sugarless", 

1619 "SumsOfSquares", 

1620 "SuperLinearAlgebra", 

1621 "superscript", 

1622 "SVDComplexes", 

1623 "SwitchingFields", 

1624 "SymbolicPowers", 

1625 "SymmetricPolynomials", 

1626 "Synopsis", 

1627 "Syzygies", 

1628 "SyzygyLimit", 

1629 "SyzygyMatrix", 

1630 "SyzygyRows", 

1631 "TangentCone", 

1632 "TateOnProducts", 

1633 "TensorComplexes", 

1634 "Test", 

1635 "testExample", 

1636 "TestIdeals", 

1637 "TeXmacs", 

1638 "Text", 

1639 "ThinSincereQuivers", 

1640 "ThreadedGB", 

1641 "Threshold", 

1642 "Topcom", 

1643 "topLevelMode", 

1644 "Tor", 

1645 "TorAlgebra", 

1646 "Toric", 

1647 "ToricInvariants", 

1648 "ToricTopology", 

1649 "ToricVectorBundles", 

1650 "Torsion", 

1651 "TotalPairs", 

1652 "Tree", 

1653 "TriangularSets", 

1654 "Triangulations", 

1655 "Tries", 

1656 "Trim", 

1657 "Triplets", 

1658 "Tropical", 

1659 "true", 

1660 "Truncate", 

1661 "Truncations", 

1662 "TSpreadIdeals", 

1663 "TypicalValue", 

1664 "typicalValues", 

1665 "Undo", 

1666 "Unique", 

1667 "Units", 

1668 "Unmixed", 

1669 "Up", 

1670 "UpdateOnly", 

1671 "UpperTriangular", 

1672 "Usage", 

1673 "UseCachedExampleOutput", 

1674 "UseHilbertFunction", 

1675 "UserMode", 

1676 "UseSyzygies", 

1677 "Variable", 

1678 "VariableBaseName", 

1679 "Variables", 

1680 "Vasconcelos", 

1681 "VectorFields", 

1682 "VectorGraphics", 

1683 "Verbose", 

1684 "Verbosity", 

1685 "Verify", 

1686 "VersalDeformations", 

1687 "Version", 

1688 "version", 

1689 "VerticalSpace", 

1690 "viewHelp", 

1691 "VirtualResolutions", 

1692 "Visualize", 

1693 "WebApp", 

1694 "Weights", 

1695 "WeylAlgebra", 

1696 "WeylGroups", 

1697 "WhitneyStratifications", 

1698 "Wrap", 

1699 "XML" 

1700 ) 

1701 

1702class Macaulay2Lexer(RegexLexer): 

1703 """Lexer for Macaulay2, a software system for research in algebraic geometry.""" 

1704 

1705 name = 'Macaulay2' 

1706 url = 'https://faculty.math.illinois.edu/Macaulay2/' 

1707 aliases = ['macaulay2'] 

1708 filenames = ['*.m2'] 

1709 

1710 tokens = { 

1711 'root': [ 

1712 (r'--.*$', Comment.Single), 

1713 (r'-\*', Comment.Multiline, 'block comment'), 

1714 (r'"', String, 'quote string'), 

1715 (r'///', String, 'slash string'), 

1716 (words(M2KEYWORDS, prefix=r'\b', suffix=r'\b'), Keyword), 

1717 (words(M2DATATYPES, prefix=r'\b', suffix=r'\b'), Name.Builtin), 

1718 (words(M2FUNCTIONS, prefix=r'\b', suffix=r'\b'), Name.Function), 

1719 (words(M2CONSTANTS, prefix=r'\b', suffix=r'\b'), Name.Constant), 

1720 (r'\s+', Text.Whitespace), 

1721 (r'.', Text) 

1722 ], 

1723 'block comment' : [ 

1724 (r'[^*-]+', Comment.Multiline), 

1725 (r'\*-', Comment.Multiline, '#pop'), 

1726 (r'[*-]', Comment.Multiline) 

1727 ], 

1728 'quote string' : [ 

1729 (r'[^\\"]+', String), 

1730 (r'"', String, '#pop'), 

1731 (r'\\"?', String), 

1732 ], 

1733 'slash string' : [ 

1734 (r'[^/]+', String), 

1735 (r'(//)+(?!/)', String), 

1736 (r'/(//)+(?!/)', String, '#pop'), 

1737 (r'/', String) 

1738 ] 

1739 }