All work

myRegex

The full grammar of Python’s regex module, wherever patterns appear.

Source on GitLab Sublime Text · MPL-2.0 · v0.7.0
Stock Sublime
Twenty-two regular expressions, one per line, from a wikitext parser's pattern table, under Sublime's stock regex syntax: classes, groups, and quantifiers in teal and green, and every (?P=name) reference marked in red.
myRegex
The same patterns with myRegex: named references like (?P=_hex) in bold gold, named groups like (?P<content>...) in blue, POSIX classes and \p{...} properties set apart, and anchors and quantifiers distinct.

A grammar for the third-party regex module's full syntax: set operations, subroutines, conditional groups, POSIX classes, and control verbs like (*SKIP), with invalid constructs flagged as errors.

Other grammars embed it, so the same highlighting shows up in Python raw strings and inside Sublime grammar files. I think it's a travesty that the full functionality of regex still hasn't been added to the Python standard library!

How the fleet's Sublime syntaxes embed and extend one another. Five syntax repos are drawn as panels: python, myst, regex, metasyntax, and yaml. Cyan arrows are embeds or pushes into another syntax, labelled with the number of sites in the source; violet arrows are extends, and each name carries the stock package it extends. myPython pushes into myRegex at 12 sites and embeds MystDocstrings at 3; the MyST Typst grammar embeds myPython and myRegex, MystMarkdown pushes into myRegex at 3 sites, and HTML (Jinja) embeds the TOML_Jinja grammar from the python repo. Metasyntax pushes into the double-brace variant of myRegex at 3 sites. myRegex is extended by a templates variant, which a double-brace variant extends. In the yaml repo BashYAML embeds EmbeddedBash at 2 sites and EmbeddedFlowBash at 1, EmbeddedFlowBash and myZsh both extend EmbeddedBash, and nothing else in the fleet references the yaml syntaxes. The project this copy belongs to is drawn in amber. sublime-python-syntax sublime-myst-syntax sublime-regex-syntax sublime-meta-syntax sublime-yaml-syntax TOML_Jinja extends TOML myPython extends Python HTML (Jinja) extends HTML MystDocstrings extends MystMarkdown Typst no extends MystMarkdown extends Markdown myRegex no extends _MyRegexTemplates extends myRegex _MyRegexDoubleBraces extends _MyRegexTemplates Metasyntax extends YAML BashYAML extends YAML EmbeddedFlowBash extends EmbeddedBash EmbeddedBash extends Bash myZsh extends Zsh, EmbeddedBash extends ×1 ×3 ×1 ×12 ×1 ×3 ×3 ×1 ×2 embeds or pushes into another syntax, ×N sites extends a parent syntax