diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/_css_builtins.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/_css_builtins.py new file mode 100644 index 0000000000000000000000000000000000000000..72953195a37042c1965c9adf41f6f41fcd0ddb61 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/_css_builtins.py @@ -0,0 +1,558 @@ +""" + pygments.lexers._css_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + This file is autogenerated by scripts/get_css_properties.py + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +_css_properties = ( + '-webkit-line-clamp', + 'accent-color', + 'align-content', + 'align-items', + 'align-self', + 'alignment-baseline', + 'all', + 'animation', + 'animation-delay', + 'animation-direction', + 'animation-duration', + 'animation-fill-mode', + 'animation-iteration-count', + 'animation-name', + 'animation-play-state', + 'animation-timing-function', + 'appearance', + 'aspect-ratio', + 'azimuth', + 'backface-visibility', + 'background', + 'background-attachment', + 'background-blend-mode', + 'background-clip', + 'background-color', + 'background-image', + 'background-origin', + 'background-position', + 'background-repeat', + 'background-size', + 'baseline-shift', + 'baseline-source', + 'block-ellipsis', + 'block-size', + 'block-step', + 'block-step-align', + 'block-step-insert', + 'block-step-round', + 'block-step-size', + 'bookmark-label', + 'bookmark-level', + 'bookmark-state', + 'border', + 'border-block', + 'border-block-color', + 'border-block-end', + 'border-block-end-color', + 'border-block-end-style', + 'border-block-end-width', + 'border-block-start', + 'border-block-start-color', + 'border-block-start-style', + 'border-block-start-width', + 'border-block-style', + 'border-block-width', + 'border-bottom', + 'border-bottom-color', + 'border-bottom-left-radius', + 'border-bottom-right-radius', + 'border-bottom-style', + 'border-bottom-width', + 'border-boundary', + 'border-collapse', + 'border-color', + 'border-end-end-radius', + 'border-end-start-radius', + 'border-image', + 'border-image-outset', + 'border-image-repeat', + 'border-image-slice', + 'border-image-source', + 'border-image-width', + 'border-inline', + 'border-inline-color', + 'border-inline-end', + 'border-inline-end-color', + 'border-inline-end-style', + 'border-inline-end-width', + 'border-inline-start', + 'border-inline-start-color', + 'border-inline-start-style', + 'border-inline-start-width', + 'border-inline-style', + 'border-inline-width', + 'border-left', + 'border-left-color', + 'border-left-style', + 'border-left-width', + 'border-radius', + 'border-right', + 'border-right-color', + 'border-right-style', + 'border-right-width', + 'border-spacing', + 'border-start-end-radius', + 'border-start-start-radius', + 'border-style', + 'border-top', + 'border-top-color', + 'border-top-left-radius', + 'border-top-right-radius', + 'border-top-style', + 'border-top-width', + 'border-width', + 'bottom', + 'box-decoration-break', + 'box-shadow', + 'box-sizing', + 'box-snap', + 'break-after', + 'break-before', + 'break-inside', + 'caption-side', + 'caret', + 'caret-color', + 'caret-shape', + 'chains', + 'clear', + 'clip', + 'clip-path', + 'clip-rule', + 'color', + 'color-adjust', + 'color-interpolation-filters', + 'color-scheme', + 'column-count', + 'column-fill', + 'column-gap', + 'column-rule', + 'column-rule-color', + 'column-rule-style', + 'column-rule-width', + 'column-span', + 'column-width', + 'columns', + 'contain', + 'contain-intrinsic-block-size', + 'contain-intrinsic-height', + 'contain-intrinsic-inline-size', + 'contain-intrinsic-size', + 'contain-intrinsic-width', + 'container', + 'container-name', + 'container-type', + 'content', + 'content-visibility', + 'continue', + 'counter-increment', + 'counter-reset', + 'counter-set', + 'cue', + 'cue-after', + 'cue-before', + 'cursor', + 'direction', + 'display', + 'dominant-baseline', + 'elevation', + 'empty-cells', + 'fill', + 'fill-break', + 'fill-color', + 'fill-image', + 'fill-opacity', + 'fill-origin', + 'fill-position', + 'fill-repeat', + 'fill-rule', + 'fill-size', + 'filter', + 'flex', + 'flex-basis', + 'flex-direction', + 'flex-flow', + 'flex-grow', + 'flex-shrink', + 'flex-wrap', + 'float', + 'float-defer', + 'float-offset', + 'float-reference', + 'flood-color', + 'flood-opacity', + 'flow', + 'flow-from', + 'flow-into', + 'font', + 'font-family', + 'font-feature-settings', + 'font-kerning', + 'font-language-override', + 'font-optical-sizing', + 'font-palette', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-synthesis', + 'font-synthesis-small-caps', + 'font-synthesis-style', + 'font-synthesis-weight', + 'font-variant', + 'font-variant-alternates', + 'font-variant-caps', + 'font-variant-east-asian', + 'font-variant-emoji', + 'font-variant-ligatures', + 'font-variant-numeric', + 'font-variant-position', + 'font-variation-settings', + 'font-weight', + 'footnote-display', + 'footnote-policy', + 'forced-color-adjust', + 'gap', + 'glyph-orientation-vertical', + 'grid', + 'grid-area', + 'grid-auto-columns', + 'grid-auto-flow', + 'grid-auto-rows', + 'grid-column', + 'grid-column-end', + 'grid-column-start', + 'grid-row', + 'grid-row-end', + 'grid-row-start', + 'grid-template', + 'grid-template-areas', + 'grid-template-columns', + 'grid-template-rows', + 'hanging-punctuation', + 'height', + 'hyphenate-character', + 'hyphenate-limit-chars', + 'hyphenate-limit-last', + 'hyphenate-limit-lines', + 'hyphenate-limit-zone', + 'hyphens', + 'image-orientation', + 'image-rendering', + 'image-resolution', + 'initial-letter', + 'initial-letter-align', + 'initial-letter-wrap', + 'inline-size', + 'inline-sizing', + 'input-security', + 'inset', + 'inset-block', + 'inset-block-end', + 'inset-block-start', + 'inset-inline', + 'inset-inline-end', + 'inset-inline-start', + 'isolation', + 'justify-content', + 'justify-items', + 'justify-self', + 'leading-trim', + 'left', + 'letter-spacing', + 'lighting-color', + 'line-break', + 'line-clamp', + 'line-grid', + 'line-height', + 'line-height-step', + 'line-padding', + 'line-snap', + 'list-style', + 'list-style-image', + 'list-style-position', + 'list-style-type', + 'margin', + 'margin-block', + 'margin-block-end', + 'margin-block-start', + 'margin-bottom', + 'margin-break', + 'margin-inline', + 'margin-inline-end', + 'margin-inline-start', + 'margin-left', + 'margin-right', + 'margin-top', + 'margin-trim', + 'marker', + 'marker-end', + 'marker-knockout-left', + 'marker-knockout-right', + 'marker-mid', + 'marker-pattern', + 'marker-segment', + 'marker-side', + 'marker-start', + 'mask', + 'mask-border', + 'mask-border-mode', + 'mask-border-outset', + 'mask-border-repeat', + 'mask-border-slice', + 'mask-border-source', + 'mask-border-width', + 'mask-clip', + 'mask-composite', + 'mask-image', + 'mask-mode', + 'mask-origin', + 'mask-position', + 'mask-repeat', + 'mask-size', + 'mask-type', + 'max-block-size', + 'max-height', + 'max-inline-size', + 'max-lines', + 'max-width', + 'min-block-size', + 'min-height', + 'min-inline-size', + 'min-intrinsic-sizing', + 'min-width', + 'mix-blend-mode', + 'nav-down', + 'nav-left', + 'nav-right', + 'nav-up', + 'object-fit', + 'object-overflow', + 'object-position', + 'object-view-box', + 'offset', + 'offset-anchor', + 'offset-distance', + 'offset-path', + 'offset-position', + 'offset-rotate', + 'opacity', + 'order', + 'orphans', + 'outline', + 'outline-color', + 'outline-offset', + 'outline-style', + 'outline-width', + 'overflow', + 'overflow-anchor', + 'overflow-block', + 'overflow-clip-margin', + 'overflow-inline', + 'overflow-wrap', + 'overflow-x', + 'overflow-y', + 'overscroll-behavior', + 'overscroll-behavior-block', + 'overscroll-behavior-inline', + 'overscroll-behavior-x', + 'overscroll-behavior-y', + 'padding', + 'padding-block', + 'padding-block-end', + 'padding-block-start', + 'padding-bottom', + 'padding-inline', + 'padding-inline-end', + 'padding-inline-start', + 'padding-left', + 'padding-right', + 'padding-top', + 'page', + 'page-break-after', + 'page-break-before', + 'page-break-inside', + 'pause', + 'pause-after', + 'pause-before', + 'perspective', + 'perspective-origin', + 'pitch', + 'pitch-range', + 'place-content', + 'place-items', + 'place-self', + 'play-during', + 'pointer-events', + 'position', + 'print-color-adjust', + 'property-name', + 'quotes', + 'region-fragment', + 'resize', + 'rest', + 'rest-after', + 'rest-before', + 'richness', + 'right', + 'rotate', + 'row-gap', + 'ruby-align', + 'ruby-merge', + 'ruby-overhang', + 'ruby-position', + 'running', + 'scale', + 'scroll-behavior', + 'scroll-margin', + 'scroll-margin-block', + 'scroll-margin-block-end', + 'scroll-margin-block-start', + 'scroll-margin-bottom', + 'scroll-margin-inline', + 'scroll-margin-inline-end', + 'scroll-margin-inline-start', + 'scroll-margin-left', + 'scroll-margin-right', + 'scroll-margin-top', + 'scroll-padding', + 'scroll-padding-block', + 'scroll-padding-block-end', + 'scroll-padding-block-start', + 'scroll-padding-bottom', + 'scroll-padding-inline', + 'scroll-padding-inline-end', + 'scroll-padding-inline-start', + 'scroll-padding-left', + 'scroll-padding-right', + 'scroll-padding-top', + 'scroll-snap-align', + 'scroll-snap-stop', + 'scroll-snap-type', + 'scrollbar-color', + 'scrollbar-gutter', + 'scrollbar-width', + 'shape-image-threshold', + 'shape-inside', + 'shape-margin', + 'shape-outside', + 'spatial-navigation-action', + 'spatial-navigation-contain', + 'spatial-navigation-function', + 'speak', + 'speak-as', + 'speak-header', + 'speak-numeral', + 'speak-punctuation', + 'speech-rate', + 'stress', + 'string-set', + 'stroke', + 'stroke-align', + 'stroke-alignment', + 'stroke-break', + 'stroke-color', + 'stroke-dash-corner', + 'stroke-dash-justify', + 'stroke-dashadjust', + 'stroke-dasharray', + 'stroke-dashcorner', + 'stroke-dashoffset', + 'stroke-image', + 'stroke-linecap', + 'stroke-linejoin', + 'stroke-miterlimit', + 'stroke-opacity', + 'stroke-origin', + 'stroke-position', + 'stroke-repeat', + 'stroke-size', + 'stroke-width', + 'tab-size', + 'table-layout', + 'text-align', + 'text-align-all', + 'text-align-last', + 'text-combine-upright', + 'text-decoration', + 'text-decoration-color', + 'text-decoration-line', + 'text-decoration-skip', + 'text-decoration-skip-box', + 'text-decoration-skip-ink', + 'text-decoration-skip-inset', + 'text-decoration-skip-self', + 'text-decoration-skip-spaces', + 'text-decoration-style', + 'text-decoration-thickness', + 'text-edge', + 'text-emphasis', + 'text-emphasis-color', + 'text-emphasis-position', + 'text-emphasis-skip', + 'text-emphasis-style', + 'text-group-align', + 'text-indent', + 'text-justify', + 'text-orientation', + 'text-overflow', + 'text-shadow', + 'text-space-collapse', + 'text-space-trim', + 'text-spacing', + 'text-transform', + 'text-underline-offset', + 'text-underline-position', + 'text-wrap', + 'top', + 'transform', + 'transform-box', + 'transform-origin', + 'transform-style', + 'transition', + 'transition-delay', + 'transition-duration', + 'transition-property', + 'transition-timing-function', + 'translate', + 'unicode-bidi', + 'user-select', + 'vertical-align', + 'visibility', + 'voice-balance', + 'voice-duration', + 'voice-family', + 'voice-pitch', + 'voice-range', + 'voice-rate', + 'voice-stress', + 'voice-volume', + 'volume', + 'white-space', + 'widows', + 'width', + 'will-change', + 'word-boundary-detection', + 'word-boundary-expansion', + 'word-break', + 'word-spacing', + 'word-wrap', + 'wrap-after', + 'wrap-before', + 'wrap-flow', + 'wrap-inside', + 'wrap-through', + 'writing-mode', + 'z-index', +) \ No newline at end of file diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/_googlesql_builtins.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/_googlesql_builtins.py new file mode 100644 index 0000000000000000000000000000000000000000..13ef3a2b0c9cd544b8d677d93923a50688d64b4c --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/_googlesql_builtins.py @@ -0,0 +1,918 @@ +""" + pygments.lexers._googlesql_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Autogenerated data files for the GoogleSQL lexer. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +constants = [ + 'FALSE', + 'NULL', + 'TRUE', + 'UNKNOWN', +] + +# Everything below this line is auto-generated from the GoogleSQL source code. +# ---------------------------------------------------------------------------- + +functionnames = [ + 'ABS', + 'ACOS', + 'ACOSH', + 'AEAD.DECRYPT_BYTES', + 'AEAD.DECRYPT_STRING', + 'AEAD.ENCRYPT', + 'AEAD.ENVELOPE_DECRYPT_BYTES', + 'AEAD.ENVELOPE_DECRYPT_STRING', + 'AEAD.ENVELOPE_ENCRYPT', + 'ALL_DIFFERENT', + 'ANON_AVG', + 'ANON_COUNT', + 'ANON_COUNT', + 'ANON_PERCENTILE_CONT', + 'ANON_QUANTILES', + 'ANON_STDDEV_POP', + 'ANON_SUM', + 'ANON_VAR_POP', + 'ANY_VALUE', + 'APPROX_COSINE_DISTANCE', + 'APPROX_COUNT_DISTINCT', + 'APPROX_DOT_PRODUCT', + 'APPROX_EUCLIDEAN_DISTANCE', + 'APPROX_QUANTILES', + 'APPROX_TOP_COUNT', + 'APPROX_TOP_SUM', + 'ARRAY[KEY()]', + 'ARRAY[SAFE_KEY()]', + 'ARRAY_AGG', + 'ARRAY_AVG', + 'ARRAY_CONCAT', + 'ARRAY_CONCAT_AGG', + 'ARRAY_FILTER', + 'ARRAY_FIND', + 'ARRAY_FIND_ALL', + 'ARRAY_FIRST', + 'ARRAY_FIRST_N', + 'ARRAY_INCLUDES', + 'ARRAY_INCLUDES_ALL', + 'ARRAY_INCLUDES_ANY', + 'ARRAY_IS_DISTINCT', + 'ARRAY_LAST', + 'ARRAY_LAST_N', + 'ARRAY_LENGTH', + 'ARRAY_MAX', + 'ARRAY_MIN', + 'ARRAY_OFFSET', + 'ARRAY_OFFSETS', + 'ARRAY_REMOVE_FIRST_N', + 'ARRAY_REMOVE_LAST_N', + 'ARRAY_REVERSE', + 'ARRAY_SLICE', + 'ARRAY_SUM', + 'ARRAY_TO_STRING', + 'ARRAY_TRANSFORM', + 'ARRAY_ZIP', + 'ASCII', + 'ASIN', + 'ASINH', + 'ATAN', + 'ATAN2', + 'ATANH', + 'AVG', + 'BIT_AND', + 'BIT_COUNT', + 'BIT_OR', + 'BIT_XOR', + 'BOOL', + 'BOOL_ARRAY', + 'BYTE_LENGTH', + 'CASE', + 'CAST', + 'CBRT', + 'CEIL', + 'CEILING', + 'CHARACTER_LENGTH', + 'CHAR_LENGTH', + 'CHR', + 'COALESCE', + 'CODE_POINTS_TO_BYTES', + 'CODE_POINTS_TO_STRING', + 'COLLATE', + 'CONCAT', + 'CORR', + 'COS', + 'COSH', + 'COSINE_DISTANCE', + 'COT', + 'COTH', + 'COUNT', + 'COUNT(*)', + 'COUNTIF', + 'COVAR_POP', + 'COVAR_SAMP', + 'CSC', + 'CSCH', + 'CUME_DIST', + 'CURRENT_DATE', + 'CURRENT_DATETIME', + 'CURRENT_TIME', + 'CURRENT_TIMESTAMP', + 'D3A_COUNT.EXTRACT', + 'D3A_COUNT.INIT', + 'D3A_COUNT.MERGE', + 'D3A_COUNT.MERGE_PARTIAL', + 'D3A_COUNT.TO_HLL', + 'DATE', + 'DATETIME', + 'DATETIME_ADD', + 'DATETIME_BUCKET', + 'DATETIME_DIFF', + 'DATETIME_SUB', + 'DATETIME_TRUNC', + 'DATE_ADD', + 'DATE_BUCKET', + 'DATE_DIFF', + 'DATE_FROM_UNIX_DATE', + 'DATE_SUB', + 'DATE_TRUNC', + 'DENSE_RANK', + 'DESTINATION_NODE_ID', + 'DETERMINISTIC_DECRYPT_BYTES', + 'DETERMINISTIC_DECRYPT_STRING', + 'DETERMINISTIC_ENCRYPT', + 'DIV', + 'DOT_PRODUCT', + 'EDGES', + 'EDIT_DISTANCE', + 'ELEMENTWISE_AVG', + 'ELEMENTWISE_SUM', + 'ELEMENT_DEFINITION_NAME', + 'ELEMENT_ID', + 'ENDS_WITH', + 'ENUM_VALUE_DESCRIPTOR_PROTO', + 'ERROR', + 'EUCLIDEAN_DISTANCE', + 'EXP', + 'EXTRACT', + 'EXTRACT_FOR_DP_APPROX_COUNT_DISTINCT', + 'FARM_FINGERPRINT', + 'FILTER_FIELDS', + 'FIRST_VALUE', + 'FLATTEN', + 'FLOAT32', + 'FLOAT32_ARRAY', + 'FLOAT64', + 'FLOAT64_ARRAY', + 'FLOOR', + 'FORMAT', + 'FORMAT_DATE', + 'FORMAT_DATETIME', + 'FORMAT_TIME', + 'FORMAT_TIMESTAMP', + 'FROM_BASE32', + 'FROM_BASE64', + 'FROM_HEX', + 'GENERATE_ARRAY', + 'GENERATE_DATE_ARRAY', + 'GENERATE_RANGE_ARRAY', + 'GENERATE_TIMESTAMP_ARRAY', + 'GENERATE_UUID', + 'GREATEST', + 'GROUPING', + 'HLL_COUNT.EXTRACT', + 'HLL_COUNT.INIT', + 'HLL_COUNT.MERGE', + 'HLL_COUNT.MERGE_PARTIAL', + 'IEEE_DIVIDE', + 'IF', + 'IFERROR', + 'IFNULL', + 'IN UNNEST', + 'INITCAP', + 'INIT_FOR_DP_APPROX_COUNT_DISTINCT', + 'INSTR', + 'INT64', + 'INT64_ARRAY', + 'IS DESTINATION OF', + 'IS DISTINCT FROM', + 'IS NOT DISTINCT FROM', + 'IS SOURCE OF', + 'ISERROR', + 'IS_ACYCLIC', + 'IS_INF', + 'IS_NAN', + 'IS_SIMPLE', + 'IS_TRAIL', + 'JSON_ARRAY', + 'JSON_ARRAY_APPEND', + 'JSON_ARRAY_INSERT', + 'JSON_CONTAINS', + 'JSON_EXTRACT', + 'JSON_EXTRACT_ARRAY', + 'JSON_EXTRACT_SCALAR', + 'JSON_EXTRACT_STRING_ARRAY', + 'JSON_KEYS', + 'JSON_OBJECT', + 'JSON_QUERY', + 'JSON_QUERY_ARRAY', + 'JSON_REMOVE', + 'JSON_SET', + 'JSON_STRIP_NULLS', + 'JSON_TYPE', + 'JSON_VALUE', + 'JSON_VALUE_ARRAY', + 'JUSTIFY_DAYS', + 'JUSTIFY_HOURS', + 'JUSTIFY_INTERVAL', + 'KEYS.ADD_KEY_FROM_RAW_BYTES', + 'KEYS.KEYSET_CHAIN', + 'KEYS.KEYSET_FROM_JSON', + 'KEYS.KEYSET_LENGTH', + 'KEYS.KEYSET_TO_JSON', + 'KEYS.NEW_KEYSET', + 'KEYS.NEW_WRAPPED_KEYSET', + 'KEYS.REWRAP_KEYSET', + 'KEYS.ROTATE_KEYSET', + 'KEYS.ROTATE_WRAPPED_KEYSET', + 'KLL_QUANTILES.EXTRACT_FLOAT64', + 'KLL_QUANTILES.EXTRACT_INT64', + 'KLL_QUANTILES.EXTRACT_POINT_FLOAT64', + 'KLL_QUANTILES.EXTRACT_POINT_INT64', + 'KLL_QUANTILES.INIT_FLOAT64', + 'KLL_QUANTILES.INIT_INT64', + 'KLL_QUANTILES.MERGE_FLOAT64', + 'KLL_QUANTILES.MERGE_INT64', + 'KLL_QUANTILES.MERGE_PARTIAL', + 'KLL_QUANTILES.MERGE_POINT_FLOAT64', + 'KLL_QUANTILES.MERGE_POINT_INT64', + 'L1_NORM', + 'L2_NORM', + 'LABELS', + 'LAG', + 'LAST_DAY', + 'LAST_VALUE', + 'LAX_BOOL', + 'LAX_BOOL_ARRAY', + 'LAX_FLOAT32', + 'LAX_FLOAT32_ARRAY', + 'LAX_FLOAT64', + 'LAX_FLOAT64_ARRAY', + 'LAX_INT64', + 'LAX_INT64_ARRAY', + 'LAX_STRING', + 'LAX_STRING_ARRAY', + 'LEAD', + 'LEAST', + 'LEFT', + 'LENGTH', + 'LIKE ALL', + 'LIKE ALL UNNEST', + 'LIKE ANY', + 'LIKE ANY UNNEST', + 'LN', + 'LOG', + 'LOG10', + 'LOGICAL_AND', + 'LOGICAL_OR', + 'LOWER', + 'LPAD', + 'LTRIM', + 'MAKE_INTERVAL', + 'MANHATTAN_DISTANCE', + 'MAP_CARDINALITY', + 'MAP_CONTAINS_KEY', + 'MAP_DELETE', + 'MAP_EMPTY', + 'MAP_ENTRIES_SORTED', + 'MAP_ENTRIES_UNSORTED', + 'MAP_FILTER', + 'MAP_FROM_ARRAY', + 'MAP_GET', + 'MAP_INSERT', + 'MAP_INSERT_OR_REPLACE', + 'MAP_KEYS_SORTED', + 'MAP_KEYS_UNSORTED', + 'MAP_REPLACE', + 'MAP_VALUES_SORTED', + 'MAP_VALUES_SORTED_BY_KEY', + 'MAP_VALUES_UNSORTED', + 'MAX', + 'MD5', + 'MERGE_PARTIAL_FOR_DP_APPROX_COUNT_DISTINCT', + 'MIN', + 'MOD', + 'NET.HOST', + 'NET.IPV4_FROM_INT64', + 'NET.IPV4_TO_INT64', + 'NET.IP_FROM_STRING', + 'NET.IP_NET_MASK', + 'NET.IP_TO_STRING', + 'NET.IP_TRUNC', + 'NET.PUBLIC_SUFFIX', + 'NET.REG_DOMAIN', + 'NET.SAFE_IP_FROM_STRING', + 'NEW_UUID', + 'NODES', + 'NORMALIZE', + 'NORMALIZE_AND_CASEFOLD', + 'NOT LIKE ALL', + 'NOT LIKE ALL UNNEST', + 'NOT LIKE ANY', + 'NOT LIKE ANY UNNEST', + 'NTH_VALUE', + 'NTILE', + 'NULLIF', + 'NULLIFERROR', + 'NULLIFZERO', + 'OCTET_LENGTH', + 'OFFSET', + 'ORDINAL', + 'PARSE_BIGNUMERIC', + 'PARSE_DATE', + 'PARSE_DATETIME', + 'PARSE_JSON', + 'PARSE_NUMERIC', + 'PARSE_TIME', + 'PARSE_TIMESTAMP', + 'PATH', + 'PATH_FIRST', + 'PATH_LAST', + 'PATH_LENGTH', + 'PERCENTILE_CONT', + 'PERCENTILE_DISC', + 'PERCENT_RANK', + 'PI', + 'PIVOT', + 'PI_BIGNUMERIC', + 'PI_NUMERIC', + 'POW', + 'POWER', + 'PROPERTY_EXISTS', + 'PROPERTY_NAMES', + 'PROTO_MAP_CONTAINS_KEY', + 'PROTO_MODIFY_MAP', + 'RAND', + 'RANGE', + 'RANGE_BUCKET', + 'RANGE_CONTAINS', + 'RANGE_END', + 'RANGE_INTERSECT', + 'RANGE_IS_END_UNBOUNDED', + 'RANGE_IS_START_UNBOUNDED', + 'RANGE_OVERLAPS', + 'RANGE_START', + 'RANK', + 'REGEXP_CONTAINS', + 'REGEXP_EXTRACT', + 'REGEXP_EXTRACT_ALL', + 'REGEXP_INSTR', + 'REGEXP_REPLACE', + 'REGEXP_SUBSTR', + 'REPEAT', + 'REPLACE', + 'REVERSE', + 'RIGHT', + 'ROUND', + 'ROW_NUMBER', + 'RPAD', + 'RTRIM', + 'S2_CELLIDFROMPOINT', + 'S2_COVERINGCELLIDS', + 'SAFE_ADD', + 'SAFE_CONVERT_BYTES_TO_STRING', + 'SAFE_DIVIDE', + 'SAFE_MULTIPLY', + 'SAFE_NEGATE', + 'SAFE_OFFSET', + 'SAFE_ORDINAL', + 'SAFE_SUBTRACT', + 'SAFE_TO_JSON', + 'SAME', + 'SEC', + 'SECH', + 'SESSION_USER', + 'SHA1', + 'SHA256', + 'SHA512', + 'SIGN', + 'SIN', + 'SINH', + 'SOUNDEX', + 'SOURCE_NODE_ID', + 'SPLIT', + 'SPLIT_SUBSTR', + 'SQRT', + 'STARTS_WITH', + 'STDDEV', + 'STDDEV_POP', + 'STDDEV_SAMP', + 'STRING', + 'STRING_AGG', + 'STRING_ARRAY', + 'STRPOS', + 'ST_ANGLE', + 'ST_AREA', + 'ST_ASBINARY', + 'ST_ASGEOJSON', + 'ST_ASKML', + 'ST_ASTEXT', + 'ST_AZIMUTH', + 'ST_BOUNDARY', + 'ST_BOUNDINGBOX', + 'ST_BUFFER', + 'ST_BUFFERWITHTOLERANCE', + 'ST_CENTROID', + 'ST_CENTROID_AGG', + 'ST_CLOSESTPOINT', + 'ST_CLUSTERDBSCAN', + 'ST_CONTAINS', + 'ST_CONVEXHULL', + 'ST_COVEREDBY', + 'ST_COVERS', + 'ST_DIFFERENCE', + 'ST_DIMENSION', + 'ST_DISJOINT', + 'ST_DISTANCE', + 'ST_DUMP', + 'ST_DUMPPOINTS', + 'ST_DWITHIN', + 'ST_ENDPOINT', + 'ST_EQUALS', + 'ST_EXTENT', + 'ST_EXTERIORRING', + 'ST_GEOGFROM', + 'ST_GEOGFROMGEOJSON', + 'ST_GEOGFROMKML', + 'ST_GEOGFROMTEXT', + 'ST_GEOGFROMWKB', + 'ST_GEOGPOINT', + 'ST_GEOGPOINTFROMGEOHASH', + 'ST_GEOHASH', + 'ST_GEOMETRYTYPE', + 'ST_HAUSDORFFDISTANCE', + 'ST_HAUSDORFFDWITHIN', + 'ST_INTERIORRINGS', + 'ST_INTERSECTION', + 'ST_INTERSECTS', + 'ST_INTERSECTSBOX', + 'ST_ISCLOSED', + 'ST_ISCOLLECTION', + 'ST_ISEMPTY', + 'ST_ISRING', + 'ST_LENGTH', + 'ST_LINEINTERPOLATEPOINT', + 'ST_LINELOCATEPOINT', + 'ST_LINESUBSTRING', + 'ST_MAKELINE', + 'ST_MAKEPOLYGON', + 'ST_MAKEPOLYGONORIENTED', + 'ST_MAXDISTANCE', + 'ST_NEAREST_NEIGHBORS', + 'ST_NPOINTS', + 'ST_NUMGEOMETRIES', + 'ST_NUMPOINTS', + 'ST_PERIMETER', + 'ST_POINTN', + 'ST_SIMPLIFY', + 'ST_SNAPTOGRID', + 'ST_STARTPOINT', + 'ST_TOUCHES', + 'ST_UNARYUNION', + 'ST_UNION', + 'ST_UNION_AGG', + 'ST_WITHIN', + 'ST_X', + 'ST_Y', + 'SUBSTR', + 'SUBSTRING', + 'SUM', + 'TAN', + 'TANH', + 'TIME', + 'TIMESTAMP', + 'TIMESTAMP_ADD', + 'TIMESTAMP_BUCKET', + 'TIMESTAMP_DIFF', + 'TIMESTAMP_FROM_UNIX_MICROS', + 'TIMESTAMP_FROM_UNIX_MILLIS', + 'TIMESTAMP_FROM_UNIX_SECONDS', + 'TIMESTAMP_MICROS', + 'TIMESTAMP_MILLIS', + 'TIMESTAMP_SECONDS', + 'TIMESTAMP_SUB', + 'TIMESTAMP_TRUNC', + 'TIME_ADD', + 'TIME_DIFF', + 'TIME_SUB', + 'TIME_TRUNC', + 'TO_BASE32', + 'TO_BASE64', + 'TO_CODE_POINTS', + 'TO_HEX', + 'TO_JSON', + 'TO_JSON_STRING', + 'TRANSLATE', + 'TRIM', + 'TRUNC', + 'TYPEOF', + 'UNICODE', + 'UNIX_DATE', + 'UNIX_MICROS', + 'UNIX_MILLIS', + 'UNIX_SECONDS', + 'UNNEST', + 'UNPIVOT', + 'UPPER', + 'VARIANCE', + 'VAR_POP', + 'VAR_SAMP', + 'ZEROIFNULL', +] + +keywords = [ + 'ABORT', + 'ACCESS', + 'ACTION', + 'ACYCLIC', + 'ADD', + 'AFTER', + 'AGGREGATE', + 'ALL', + 'ALTER', + 'ALWAYS', + 'ANALYZE', + 'AND', + 'ANY', + 'APPROX', + 'ARE', + 'AS', + 'ASC', + 'ASCENDING', + 'ASSERT', + 'ASSERT_ROWS_MODIFIED', + 'AT', + 'BATCH', + 'BEGIN', + 'BETWEEN', + 'BIGDECIMAL', + 'BREAK', + 'BY', + 'CALL', + 'CASCADE', + 'CASE', + 'CAST', + 'CHECK', + 'CLAMPED', + 'CLONE', + 'CLUSTER', + 'COLLATE', + 'COLUMN', + 'COLUMNS', + 'COMMIT', + 'CONFLICT', + 'CONNECTION', + 'CONSTANT', + 'CONSTRAINT', + 'CONTAINS', + 'CONTINUE', + 'COPY', + 'CORRESPONDING', + 'CREATE', + 'CROSS', + 'CUBE', + 'CURRENT', + 'CYCLE', + 'DATA', + 'DATABASE', + 'DAY', + 'DAYOFWEEK', + 'DAYOFYEAR', + 'DECIMAL', + 'DECLARE', + 'DEFAULT', + 'DEFINE', + 'DEFINER', + 'DELETE', + 'DELETION', + 'DEPTH', + 'DESC', + 'DESCENDING', + 'DESCRIBE', + 'DESCRIPTOR', + 'DESTINATION', + 'DETERMINISTIC', + 'DISTINCT', + 'DO', + 'DROP', + 'EDGE', + 'ELSE', + 'ELSEIF', + 'END', + 'ENFORCED', + 'ERROR', + 'ESCAPE', + 'EXCEPT', + 'EXCEPTION', + 'EXCLUDE', + 'EXECUTE', + 'EXISTS', + 'EXPLAIN', + 'EXPORT', + 'EXTEND', + 'EXTERNAL', + 'EXTRACT', + 'FALSE', + 'FETCH', + 'FIELD', + 'FILES', + 'FILL', + 'FILTER', + 'FIRST', + 'FOLLOWING', + 'FOR', + 'FOREIGN', + 'FORK', + 'FORMAT', + 'FRIDAY', + 'FROM', + 'FULL', + 'FUNCTION', + 'GENERATED', + 'GRANT', + 'GRAPH', + 'GRAPH_TABLE', + 'GROUP', + 'GROUPING', + 'GROUPS', + 'GROUP_ROWS', + 'HAS', + 'HASH', + 'HAVING', + 'HIDDEN', + 'HOUR', + 'IDENTITY', + 'IF', + 'IGNORE', + 'IMMEDIATE', + 'IMMUTABLE', + 'IMPORT', + 'IN', + 'INCLUDE', + 'INCREMENT', + 'INDEX', + 'INNER', + 'INOUT', + 'INPUT', + 'INSERT', + 'INTERLEAVE', + 'INTERSECT', + 'INTO', + 'INVOKER', + 'IS', + 'ISOLATION', + 'ISOWEEK ', + 'ISOYEAR', + 'ITERATE', + 'JOIN', + 'KEY', + 'LABEL', + 'LABELED', + 'LANGUAGE', + 'LAST', + 'LATERAL', + 'LEAVE', + 'LEFT', + 'LET', + 'LEVEL', + 'LIKE', + 'LIMIT', + 'LOAD', + 'LOG', + 'LOOKUP', + 'LOOP', + 'MACRO', + 'MATCH', + 'MATCHED', + 'MATCH_RECOGNIZE', + 'MATERIALIZED', + 'MAX', + 'MAXVALUE', + 'MEASURES', + 'MERGE', + 'MESSAGE', + 'METADATA', + 'MICROSECOND', + 'MILLISECOND', + 'MIN', + 'MINUTE', + 'MINVALUE', + 'MODEL', + 'MODULE', + 'MONDAY', + 'MONTH', + 'NAME', + 'NANOSECOND', + 'NATURAL', + 'NEW', + 'NEXT', + 'NO', + 'NODE', + 'NOT', + 'NOTHING', + 'NULL', + 'NULLS', + 'NULL_FILTERED', + 'OF', + 'OFFSET', + 'ON', + 'ONEOF_CASE', + 'ONLY', + 'OPTIONAL', + 'OPTIONS', + 'OR', + 'ORDER', + 'OUT', + 'OUTER', + 'OUTPUT', + 'OVER', + 'OVERWRITE', + 'PARENT', + 'PARTITION', + 'PARTITIONS', + 'PAST', + 'PATH', + 'PATHS', + 'PATTERN', + 'PERCENT', + 'PIVOT', + 'POLICIES', + 'POLICY', + 'PRECEDING', + 'PRIMARY', + 'PRIVATE', + 'PRIVILEGE', + 'PRIVILEGES', + 'PROCEDURE', + 'PROJECT', + 'PROPERTIES', + 'PROPERTY', + 'PUBLIC', + 'QUALIFY', + 'QUARTER', + 'RAISE', + 'RAW', + 'READ', + 'RECURSIVE', + 'REFERENCES', + 'REMOTE', + 'REMOVE', + 'RENAME', + 'REPEAT', + 'REPEATABLE', + 'REPLACE', + 'REPLACE_FIELDS', + 'REPLICA', + 'REPORT', + 'RESPECT', + 'RESTRICT', + 'RESTRICTION', + 'RETURN', + 'RETURNS', + 'REVOKE', + 'RIGHT', + 'ROLLBACK', + 'ROLLUP', + 'ROW', + 'ROWS', + 'RUN', + 'SAFE_CAST', + 'SATURDAY', + 'SCHEMA', + 'SEARCH', + 'SECOND ', + 'SECURITY', + 'SELECT', + 'SEQUENCE', + 'SET', + 'SETS', + 'SHORTEST', + 'SHOW', + 'SIMPLE', + 'SKIP', + 'SNAPSHOT', + 'SOME', + 'SOURCE', + 'SQL', + 'STABLE', + 'START', + 'STATIC_DESCRIBE', + 'STORED', + 'STORING', + 'STRICT', + 'SUNDAY', + 'SYSTEM', + 'SYSTEM_TIME', + 'TABLE', + 'TABLES', + 'TABLESAMPLE', + 'TARGET', + 'TEMP', + 'TEMPORARY', + 'THEN', + 'THURSDAY', + 'TO', + 'TRAIL', + 'TRANSACTION', + 'TRANSFORM', + 'TREAT', + 'TRUE', + 'TRUNCATE', + 'TUESDAY', + 'TYPE', + 'UNBOUNDED', + 'UNDROP', + 'UNION', + 'UNIQUE', + 'UNKNOWN', + 'UNNEST', + 'UNPIVOT', + 'UNTIL', + 'UPDATE', + 'USING', + 'VALUE', + 'VALUES', + 'VECTOR', + 'VIEW', + 'VIEWS', + 'VOLATILE', + 'WALK', + 'WEDNESDAY', + 'WEEK', + 'WEIGHT', + 'WHEN', + 'WHERE', + 'WHILE', + 'WINDOW', + 'WITH', + 'WITHIN', + 'WRITE', + 'YEAR', + 'ZONE', +] + +operators = [ + '!=', + '&', + '*', + '+', + '-', + '/', + '<', + '<<', + '<=', + '=', + '>', + '>=', + '>>', + '^', + '|', + '||', + '~', +] + +types = [ + 'ARRAY', + 'BIGNUMERIC', + 'BOOL', + 'BYTES', + 'DATE', + 'DATETIME', + 'DOUBLE', + 'ENUM', + 'EXTENDED', + 'FLOAT', + 'GEOGRAPHY', + 'GRAPH_ELEMENT', + 'GRAPH_PATH', + 'INT32', + 'INT64', + 'INTERVAL', + 'JSON', + 'MAP', + 'MEASURE', + 'NUMERIC', + 'PROTO', + 'RANGE', + 'STRING', + 'STRUCT', + 'TIME', + 'TIMESTAMP', + 'TIMESTAMP_PICOS', + 'TOKENLIST', + 'UINT32', + 'UINT64', + 'UUID', +] diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/_lilypond_builtins.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/_lilypond_builtins.py new file mode 100644 index 0000000000000000000000000000000000000000..b00dbbfd47d4e658f2d664ec61c81a9da27b14c5 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/_lilypond_builtins.py @@ -0,0 +1,4932 @@ +""" + pygments.lexers._lilypond_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + LilyPond builtins. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +# Contents generated by the script lilypond-builtins-generator.ly +# found in the external/ directory of the source tree. + +keywords = [ + "accepts", + "addlyrics", + "alias", + "book", + "bookpart", + "chordmode", + "chords", + "consists", + "context", + "defaultchild", + "denies", + "description", + "drummode", + "drums", + "etc", + "figuremode", + "figures", + "header", + "include", + "inherit-acceptability", + "language", + "layout", + "lyricmode", + "lyricsto", + "midi", + "name", + "new", + "notemode", + "paper", + "remove", + "score", + "type", + "version", + "with", +] + +clefs = [ + "C", + "F", + "G", + "G2", + "GG", + "alto", + "altovarC", + "baritone", + "baritonevarC", + "baritonevarF", + "bass", + "blackmensural-c1", + "blackmensural-c2", + "blackmensural-c3", + "blackmensural-c4", + "blackmensural-c5", + "french", + "hufnagel-do-fa", + "hufnagel-do1", + "hufnagel-do2", + "hufnagel-do3", + "hufnagel-fa1", + "hufnagel-fa2", + "kievan-do", + "medicaea-do1", + "medicaea-do2", + "medicaea-do3", + "medicaea-fa1", + "medicaea-fa2", + "mensural-c1", + "mensural-c2", + "mensural-c3", + "mensural-c4", + "mensural-c5", + "mensural-f", + "mensural-g", + "mezzosoprano", + "moderntab", + "neomensural-c1", + "neomensural-c2", + "neomensural-c3", + "neomensural-c4", + "neomensural-c5", + "percussion", + "petrucci-c1", + "petrucci-c2", + "petrucci-c3", + "petrucci-c4", + "petrucci-c5", + "petrucci-f", + "petrucci-f2", + "petrucci-f3", + "petrucci-f4", + "petrucci-f5", + "petrucci-g", + "petrucci-g1", + "petrucci-g2", + "soprano", + "subbass", + "tab", + "tenor", + "tenorG", + "tenorvarC", + "treble", + "varC", + "varbaritone", + "varpercussion", + "vaticana-do1", + "vaticana-do2", + "vaticana-do3", + "vaticana-fa1", + "vaticana-fa2", + "violin", +] + +scales = [ + "aeolian", + "dorian", + "ionian", + "locrian", + "lydian", + "major", + "minor", + "mixolydian", + "phrygian", +] + +repeat_types = [ + "percent", + "segno", + "tremolo", + "unfold", + "volta", +] + +units = [ + "cm", + "in", + "mm", + "pt", + "staff-space", +] + +chord_modifiers = [ + "aug", + "dim", + "m", + "maj", +] + +pitch_language_names = [ + "arabic", + "catalan", + "català", + "deutsch", + "english", + "espanol", + "español", + "français", + "italiano", + "nederlands", + "norsk", + "portugues", + "português", + "suomi", + "svenska", + "vlaams", +] + +pitches = [ + "R", + "a", + "a-flat", + "a-flatflat", + "a-natural", + "a-sharp", + "a-sharpsharp", + "ab", + "acousticbassdrum", + "acousticsnare", + "ad", + "adb", + "add", + "aeh", + "aes", + "aeseh", + "aeses", + "aess", + "aesseh", + "aessess", + "af", + "aff", + "afhb", + "afhd", + "agh", + "agl", + "ah", + "aih", + "ais", + "aisih", + "aisis", + "aiss", + "aissih", + "aississ", + "aqf", + "aqs", + "as", + "asah", + "asas", + "aseh", + "ases", + "ashb", + "ashd", + "ass", + "asseh", + "assess", + "atqb", + "atqd", + "atqf", + "atqs", + "ax", + "b", + "b-flat", + "b-flatflat", + "b-natural", + "b-sharp", + "b-sharpsharp", + "bassdrum", + "bb", + "bd", + "bda", + "bdb", + "bdd", + "beh", + "bes", + "beseh", + "beses", + "bess", + "bf", + "bff", + "bfhb", + "bfhd", + "bih", + "bis", + "bisih", + "bisis", + "boh", + "bohm", + "boho", + "bol", + "bolm", + "bolo", + "bqf", + "bqs", + "bs", + "bshb", + "bshd", + "bss", + "btqb", + "btqd", + "btqf", + "btqs", + "bx", + "c", + "c-flat", + "c-flatflat", + "c-natural", + "c-sharp", + "c-sharpsharp", + "cab", + "cabasa", + "cb", + "cd", + "cdb", + "cdd", + "ceh", + "ces", + "ceseh", + "ceses", + "cess", + "cesseh", + "cessess", + "cf", + "cff", + "cfhb", + "cfhd", + "cgh", + "cghm", + "cgho", + "cgl", + "cglm", + "cglo", + "chinesecymbal", + "cih", + "cis", + "cisih", + "cisis", + "ciss", + "cissih", + "cississ", + "cl", + "claves", + "closedhihat", + "cowbell", + "cqf", + "cqs", + "crashcymbal", + "crashcymbala", + "crashcymbalb", + "cs", + "cshb", + "cshd", + "css", + "ctqb", + "ctqd", + "ctqf", + "ctqs", + "cuim", + "cuio", + "cx", + "cymc", + "cymca", + "cymcb", + "cymch", + "cymr", + "cymra", + "cymrb", + "cyms", + "d", + "d-flat", + "d-flatflat", + "d-natural", + "d-sharp", + "d-sharpsharp", + "db", + "dd", + "ddb", + "ddd", + "deh", + "des", + "deseh", + "deses", + "dess", + "desseh", + "dessess", + "df", + "dff", + "dfhb", + "dfhd", + "dih", + "dis", + "disih", + "disis", + "diss", + "dissih", + "dississ", + "do", + "dob", + "dobb", + "dobhb", + "dobqt", + "dobsb", + "dobtqt", + "docb", + "docs", + "dod", + "dodd", + "dodsd", + "dohb", + "dohk", + "dok", + "dokhk", + "dokk", + "doqb", + "doqd", + "doqs", + "dos", + "dosb", + "dosd", + "dosqt", + "doss", + "dostqt", + "dotcb", + "dotcs", + "dotqb", + "dotqd", + "dotqs", + "dox", + "dqf", + "dqs", + "ds", + "dshb", + "dshd", + "dss", + "dtqb", + "dtqd", + "dtqf", + "dtqs", + "dx", + "e", + "e-flat", + "e-flatflat", + "e-natural", + "e-sharp", + "e-sharpsharp", + "eb", + "ed", + "edb", + "edd", + "eeh", + "ees", + "eeseh", + "eeses", + "eess", + "eesseh", + "eessess", + "ef", + "eff", + "efhb", + "efhd", + "eh", + "eih", + "eis", + "eisih", + "eisis", + "eiss", + "eissih", + "eississ", + "electricsnare", + "eqf", + "eqs", + "es", + "eseh", + "eses", + "eshb", + "eshd", + "ess", + "esseh", + "essess", + "etqb", + "etqd", + "etqf", + "etqs", + "ex", + "f", + "f-flat", + "f-flatflat", + "f-natural", + "f-sharp", + "f-sharpsharp", + "fa", + "fab", + "fabb", + "fabhb", + "fabqt", + "fabsb", + "fabtqt", + "facb", + "facs", + "fad", + "fadd", + "fadsd", + "fahb", + "fahk", + "fak", + "fakhk", + "fakk", + "faqb", + "faqd", + "faqs", + "fas", + "fasb", + "fasd", + "fasqt", + "fass", + "fastqt", + "fatcb", + "fatcs", + "fatqb", + "fatqd", + "fatqs", + "fax", + "fb", + "fd", + "fdb", + "fdd", + "feh", + "fes", + "feseh", + "feses", + "fess", + "fesseh", + "fessess", + "ff", + "fff", + "ffhb", + "ffhd", + "fih", + "fis", + "fisih", + "fisis", + "fiss", + "fissih", + "fississ", + "fqf", + "fqs", + "fs", + "fshb", + "fshd", + "fss", + "ftqb", + "ftqd", + "ftqf", + "ftqs", + "fx", + "g", + "g-flat", + "g-flatflat", + "g-natural", + "g-sharp", + "g-sharpsharp", + "gb", + "gd", + "gdb", + "gdd", + "geh", + "ges", + "geseh", + "geses", + "gess", + "gesseh", + "gessess", + "gf", + "gff", + "gfhb", + "gfhd", + "gih", + "gis", + "gisih", + "gisis", + "giss", + "gissih", + "gississ", + "gqf", + "gqs", + "gs", + "gshb", + "gshd", + "gss", + "gtqb", + "gtqd", + "gtqf", + "gtqs", + "gui", + "guil", + "guiro", + "guis", + "gx", + "h", + "halfopenhihat", + "handclap", + "hc", + "heh", + "heseh", + "heses", + "hesseh", + "hessess", + "hh", + "hhc", + "hhho", + "hho", + "hhp", + "hiagogo", + "hibongo", + "hiconga", + "highfloortom", + "hightom", + "hih", + "hihat", + "himidtom", + "his", + "hisidestick", + "hisih", + "hisis", + "hiss", + "hissih", + "hississ", + "hitimbale", + "hiwoodblock", + "la", + "lab", + "labb", + "labhb", + "labqt", + "labsb", + "labtqt", + "lacb", + "lacs", + "lad", + "ladd", + "ladsd", + "lahb", + "lahk", + "lak", + "lakhk", + "lakk", + "laqb", + "laqd", + "laqs", + "las", + "lasb", + "lasd", + "lasqt", + "lass", + "lastqt", + "latcb", + "latcs", + "latqb", + "latqd", + "latqs", + "lax", + "loagogo", + "lobongo", + "loconga", + "longguiro", + "longwhistle", + "losidestick", + "lotimbale", + "lowfloortom", + "lowmidtom", + "lowoodblock", + "lowtom", + "mar", + "maracas", + "mi", + "mib", + "mibb", + "mibhb", + "mibqt", + "mibsb", + "mibtqt", + "micb", + "mics", + "mid", + "midd", + "midsd", + "mihb", + "mihk", + "mik", + "mikhk", + "mikk", + "miqb", + "miqd", + "miqs", + "mis", + "misb", + "misd", + "misqt", + "miss", + "mistqt", + "mitcb", + "mitcs", + "mitqb", + "mitqd", + "mitqs", + "mix", + "mutecuica", + "mutehibongo", + "mutehiconga", + "mutelobongo", + "muteloconga", + "mutetriangle", + "opencuica", + "openhibongo", + "openhiconga", + "openhihat", + "openlobongo", + "openloconga", + "opentriangle", + "pedalhihat", + "r", + "rb", + "re", + "reb", + "rebb", + "rebhb", + "rebqt", + "rebsb", + "rebtqt", + "recb", + "recs", + "red", + "redd", + "redsd", + "rehb", + "rehk", + "rek", + "rekhk", + "rekk", + "reqb", + "reqd", + "reqs", + "res", + "resb", + "resd", + "resqt", + "ress", + "restqt", + "retcb", + "retcs", + "retqb", + "retqd", + "retqs", + "rex", + "ridebell", + "ridecymbal", + "ridecymbala", + "ridecymbalb", + "ré", + "réb", + "rébb", + "rébsb", + "réd", + "rédd", + "rédsd", + "résb", + "résd", + "réx", + "shortguiro", + "shortwhistle", + "si", + "sib", + "sibb", + "sibhb", + "sibqt", + "sibsb", + "sibtqt", + "sicb", + "sics", + "sid", + "sidd", + "sidestick", + "sidsd", + "sihb", + "sihk", + "sik", + "sikhk", + "sikk", + "siqb", + "siqd", + "siqs", + "sis", + "sisb", + "sisd", + "sisqt", + "siss", + "sistqt", + "sitcb", + "sitcs", + "sitqb", + "sitqd", + "sitqs", + "six", + "sn", + "sna", + "snare", + "sne", + "sol", + "solb", + "solbb", + "solbhb", + "solbqt", + "solbsb", + "solbtqt", + "solcb", + "solcs", + "sold", + "soldd", + "soldsd", + "solhb", + "solhk", + "solk", + "solkhk", + "solkk", + "solqb", + "solqd", + "solqs", + "sols", + "solsb", + "solsd", + "solsqt", + "solss", + "solstqt", + "soltcb", + "soltcs", + "soltqb", + "soltqd", + "soltqs", + "solx", + "splashcymbal", + "ss", + "ssh", + "ssl", + "tamb", + "tambourine", + "timh", + "timl", + "tomfh", + "tomfl", + "tomh", + "toml", + "tommh", + "tomml", + "tri", + "triangle", + "trim", + "trio", + "tt", + "vibraslap", + "vibs", + "wbh", + "wbl", + "whl", + "whs", +] + +music_functions = [ + "=", + "absolute", + "acciaccatura", + "accidentalStyle", + "addChordShape", + "addInstrumentDefinition", + "addQuote", + "after", + "afterGrace", + "allowPageTurn", + "allowVoltaHook", + "alterBroken", + "alternative", + "ambitusAfter", + "appendToTag", + "applyContext", + "applyMusic", + "applyOutput", + "appoggiatura", + "assertBeamQuant", + "assertBeamSlope", + "autoChange", + "balloonGrobText", + "balloonText", + "bar", + "barNumberCheck", + "beamExceptions", + "bendAfter", + "bendHold", + "bendStartLevel", + "bookOutputName", + "bookOutputSuffix", + "breathe", + "caesura", + "change", + "chordRepeats", + "clef", + "codaMark", + "compoundMeter", + "compressMMRests", + "crossStaff", + "cueClef", + "cueClefUnset", + "cueDuring", + "cueDuringWithClef", + "deadNote", + "defineBarLine", + "displayLilyMusic", + "displayMusic", + "displayScheme", + "dropNote", + "enablePolymeter", + "endSpanners", + "eventChords", + "featherDurations", + "finger", + "fixed", + "footnote", + "grace", + "grobdescriptions", + "harmonicByFret", + "harmonicByRatio", + "harmonicNote", + "harmonicsOn", + "hide", + "inStaffSegno", + "incipit", + "inherit-acceptability", + "instrumentSwitch", + "inversion", + "invertChords", + "jump", + "keepWithTag", + "key", + "killCues", + "label", + "language", + "languageRestore", + "languageSaveAndChange", + "magnifyMusic", + "magnifyStaff", + "makeClusters", + "makeDefaultStringTuning", + "mark", + "markupMap", + "modalInversion", + "modalTranspose", + "musicMap", + "noPageBreak", + "noPageTurn", + "octaveCheck", + "offset", + "omit", + "once", + "ottava", + "override", + "overrideProperty", + "overrideTimeSignatureSettings", + "pageBreak", + "pageTurn", + "palmMute", + "palmMuteOn", + "parallelMusic", + "parenthesize", + "partCombine", + "partCombineDown", + "partCombineForce", + "partCombineUp", + "partial", + "phrasingSlurDashPattern", + "pitchedTrill", + "pointAndClickOff", + "pointAndClickOn", + "pointAndClickTypes", + "preBend", + "preBendHold", + "propertyOverride", + "propertyRevert", + "propertySet", + "propertyTweak", + "propertyUnset", + "pushToTag", + "quoteDuring", + "raiseNote", + "reduceChords", + "relative", + "removeWithTag", + "repeat", + "resetRelativeOctave", + "retrograde", + "revert", + "revertTimeSignatureSettings", + "rightHandFinger", + "scaleDurations", + "sectionLabel", + "segnoMark", + "set", + "settingsFrom", + "shape", + "shiftDurations", + "single", + "skip", + "slashedGrace", + "slurDashPattern", + "staffHighlight", + "storePredefinedDiagram", + "stringTuning", + "styledNoteHeads", + "tabChordRepeats", + "tabChordRepetition", + "tag", + "tagGroup", + "tempo", + "temporary", + "textEndMark", + "textMark", + "tieDashPattern", + "time", + "times", + "tocItem", + "transpose", + "transposedCueDuring", + "transposition", + "tuplet", + "tupletSpan", + "tweak", + "undo", + "unfoldRepeats", + "unfolded", + "unset", + "voices", + "void", + "volta", + "vshape", + "withMusicProperty", + "xNote", +] + +dynamics = [ + "!", + "<", + ">", + "cr", + "cresc", + "decr", + "decresc", + "dim", + "endcr", + "endcresc", + "enddecr", + "enddecresc", + "enddim", + "f", + "ff", + "fff", + "ffff", + "fffff", + "fp", + "fz", + "mf", + "mp", + "n", + "p", + "pp", + "ppp", + "pppp", + "ppppp", + "rfz", + "sf", + "sff", + "sfp", + "sfz", + "sp", + "spp", +] + +articulations = [ + "(", + ")", + "-", + "[", + "]", + "^", + "accent", + "arpeggio", + "breakDynamicSpan", + "coda", + "dashBang", + "dashDash", + "dashDot", + "dashHat", + "dashLarger", + "dashPlus", + "dashUnderscore", + "downbow", + "downmordent", + "downprall", + "episemFinis", + "episemInitium", + "espressivo", + "fermata", + "flageolet", + "glide", + "glissando", + "halfopen", + "harmonic", + "haydnturn", + "henzelongfermata", + "henzeshortfermata", + "laissezVibrer", + "lheel", + "lineprall", + "longfermata", + "ltoe", + "marcato", + "mordent", + "noBeam", + "open", + "portato", + "prall", + "pralldown", + "prallmordent", + "prallprall", + "prallup", + "repeatTie", + "reverseturn", + "rheel", + "rtoe", + "segno", + "shortfermata", + "signumcongruentiae", + "slashturn", + "snappizzicato", + "sostenutoOff", + "sostenutoOn", + "staccatissimo", + "staccato", + "startGraceSlur", + "startGroup", + "startTextSpan", + "startTrillSpan", + "stopGraceSlur", + "stopGroup", + "stopTextSpan", + "stopTrillSpan", + "stopped", + "sustainOff", + "sustainOn", + "tenuto", + "thumb", + "treCorde", + "trill", + "turn", + "unaCorda", + "upbow", + "upmordent", + "upprall", + "varcoda", + "verylongfermata", + "veryshortfermata", + "vowelTransition", + "~", +] + +music_commands = [ + "[", + "]", + "aikenHeads", + "aikenHeadsMinor", + "aikenThinHeads", + "aikenThinHeadsMinor", + "allowBreak", + "arabicStringNumbers", + "arpeggioArrowDown", + "arpeggioArrowUp", + "arpeggioBracket", + "arpeggioNormal", + "arpeggioParenthesis", + "arpeggioParenthesisDashed", + "autoBeamOff", + "autoBeamOn", + "autoBreaksOff", + "autoBreaksOn", + "autoLineBreaksOff", + "autoLineBreaksOn", + "autoPageBreaksOff", + "autoPageBreaksOn", + "balloonLengthOff", + "balloonLengthOn", + "bassFigureExtendersOff", + "bassFigureExtendersOn", + "bassFigureStaffAlignmentDown", + "bassFigureStaffAlignmentNeutral", + "bassFigureStaffAlignmentUp", + "break", + "cadenzaOff", + "cadenzaOn", + "compressEmptyMeasures", + "crescHairpin", + "crescTextCresc", + "deadNotesOff", + "deadNotesOn", + "defaultNoteHeads", + "defaultTimeSignature", + "deprecatedcresc", + "deprecateddim", + "deprecatedendcresc", + "deprecatedenddim", + "dimHairpin", + "dimTextDecr", + "dimTextDecresc", + "dimTextDim", + "dotsDown", + "dotsNeutral", + "dotsUp", + "dynamicDown", + "dynamicNeutral", + "dynamicUp", + "easyHeadsOff", + "easyHeadsOn", + "endSkipNCs", + "expandEmptyMeasures", + "fine", + "frenchChords", + "funkHeads", + "funkHeadsMinor", + "germanChords", + "harmonicsOff", + "hideNotes", + "hideSplitTiedTabNotes", + "hideStaffSwitch", + "huge", + "ignatzekExceptionMusic", + "improvisationOff", + "improvisationOn", + "italianChords", + "kievanOff", + "kievanOn", + "large", + "markLengthOff", + "markLengthOn", + "medianChordGridStyle", + "melisma", + "melismaEnd", + "mergeDifferentlyDottedOff", + "mergeDifferentlyDottedOn", + "mergeDifferentlyHeadedOff", + "mergeDifferentlyHeadedOn", + "newSpacingSection", + "noBreak", + "normalsize", + "numericTimeSignature", + "oneVoice", + "palmMuteOff", + "partCombineApart", + "partCombineAutomatic", + "partCombineChords", + "partCombineSoloI", + "partCombineSoloII", + "partCombineUnisono", + "phrasingSlurDashed", + "phrasingSlurDotted", + "phrasingSlurDown", + "phrasingSlurHalfDashed", + "phrasingSlurHalfSolid", + "phrasingSlurNeutral", + "phrasingSlurSolid", + "phrasingSlurUp", + "predefinedFretboardsOff", + "predefinedFretboardsOn", + "romanStringNumbers", + "sacredHarpHeads", + "sacredHarpHeadsMinor", + "section", + "semiGermanChords", + "setDefaultDurationToQuarter", + "shiftOff", + "shiftOn", + "shiftOnn", + "shiftOnnn", + "showSplitTiedTabNotes", + "showStaffSwitch", + "skipNC", + "skipNCs", + "slurDashed", + "slurDotted", + "slurDown", + "slurHalfDashed", + "slurHalfSolid", + "slurNeutral", + "slurSolid", + "slurUp", + "small", + "southernHarmonyHeads", + "southernHarmonyHeadsMinor", + "startAcciaccaturaMusic", + "startAppoggiaturaMusic", + "startGraceMusic", + "startMeasureCount", + "startMeasureSpanner", + "startSlashedGraceMusic", + "startStaff", + "stemDown", + "stemNeutral", + "stemUp", + "stopAcciaccaturaMusic", + "stopAppoggiaturaMusic", + "stopGraceMusic", + "stopMeasureCount", + "stopMeasureSpanner", + "stopSlashedGraceMusic", + "stopStaff", + "stopStaffHighlight", + "tabFullNotation", + "teeny", + "textLengthOff", + "textLengthOn", + "textSpannerDown", + "textSpannerNeutral", + "textSpannerUp", + "tieDashed", + "tieDotted", + "tieDown", + "tieHalfDashed", + "tieHalfSolid", + "tieNeutral", + "tieSolid", + "tieUp", + "tiny", + "tupletDown", + "tupletNeutral", + "tupletUp", + "unHideNotes", + "voiceFour", + "voiceFourStyle", + "voiceNeutralStyle", + "voiceOne", + "voiceOneStyle", + "voiceThree", + "voiceThreeStyle", + "voiceTwo", + "voiceTwoStyle", + "walkerHeads", + "walkerHeadsMinor", + "xNotesOff", + "xNotesOn", + "|", + "~", +] + +markup_commands = [ + "abs-fontsize", + "accidental", + "align-on-other", + "arrow-head", + "auto-footnote", + "backslashed-digit", + "beam", + "bold", + "box", + "bracket", + "caps", + "center-align", + "center-column", + "char", + "circle", + "coda", + "column", + "column-lines", + "combine", + "compound-meter", + "concat", + "conditional-trill-markup", + "customTabClef", + "dir-column", + "discant", + "doubleflat", + "doublesharp", + "draw-circle", + "draw-dashed-line", + "draw-dotted-line", + "draw-hline", + "draw-line", + "draw-squiggle-line", + "dynamic", + "ellipse", + "epsfile", + "eyeglasses", + "fermata", + "figured-bass", + "fill-line", + "fill-with-pattern", + "filled-box", + "finger", + "first-visible", + "flat", + "fontCaps", + "fontsize", + "footnote", + "fraction", + "freeBass", + "fret-diagram", + "fret-diagram-terse", + "fret-diagram-verbose", + "fromproperty", + "general-align", + "halign", + "harp-pedal", + "hbracket", + "hcenter-in", + "hspace", + "huge", + "if", + "italic", + "justified-lines", + "justify", + "justify-field", + "justify-line", + "justify-string", + "large", + "larger", + "left-align", + "left-brace", + "left-column", + "line", + "lookup", + "lower", + "magnify", + "map-markup-commands", + "markalphabet", + "markletter", + "markup", + "markuplist", + "medium", + "multi-measure-rest-by-number", + "musicglyph", + "natural", + "normal-size-sub", + "normal-size-super", + "normal-text", + "normalsize", + "note", + "note-by-number", + "null", + "number", + "on-the-fly", + "oval", + "overlay", + "override", + "override-lines", + "overtie", + "pad-around", + "pad-markup", + "pad-to-box", + "pad-x", + "page-link", + "page-ref", + "parenthesize", + "path", + "pattern", + "polygon", + "postscript", + "property-recursive", + "put-adjacent", + "raise", + "replace", + "rest", + "rest-by-number", + "rhythm", + "right-align", + "right-brace", + "right-column", + "roman", + "rotate", + "rounded-box", + "sans", + "scale", + "score", + "score-lines", + "segno", + "semiflat", + "semisharp", + "sesquiflat", + "sesquisharp", + "sharp", + "simple", + "slashed-digit", + "small", + "smallCaps", + "smaller", + "stdBass", + "stdBassIV", + "stdBassV", + "stdBassVI", + "stencil", + "string-lines", + "strut", + "sub", + "super", + "table", + "table-of-contents", + "teeny", + "text", + "tie", + "tied-lyric", + "tiny", + "translate", + "translate-scaled", + "transparent", + "triangle", + "typewriter", + "underline", + "undertie", + "unless", + "upright", + "varcoda", + "vcenter", + "verbatim-file", + "vspace", + "whiteout", + "with-color", + "with-dimension", + "with-dimension-from", + "with-dimensions", + "with-dimensions-from", + "with-link", + "with-outline", + "with-string-transformer", + "with-true-dimension", + "with-true-dimensions", + "with-url", + "woodwind-diagram", + "wordwrap", + "wordwrap-field", + "wordwrap-internal", + "wordwrap-lines", + "wordwrap-string", + "wordwrap-string-internal", +] + +grobs = [ + "Accidental", + "AccidentalCautionary", + "AccidentalPlacement", + "AccidentalSuggestion", + "Ambitus", + "AmbitusAccidental", + "AmbitusLine", + "AmbitusNoteHead", + "Arpeggio", + "BalloonText", + "BarLine", + "BarNumber", + "BassFigure", + "BassFigureAlignment", + "BassFigureAlignmentPositioning", + "BassFigureBracket", + "BassFigureContinuation", + "BassFigureLine", + "Beam", + "BendAfter", + "BendSpanner", + "BreakAlignGroup", + "BreakAlignment", + "BreathingSign", + "CaesuraScript", + "CenteredBarNumber", + "CenteredBarNumberLineSpanner", + "ChordName", + "ChordSquare", + "Clef", + "ClefModifier", + "ClusterSpanner", + "ClusterSpannerBeacon", + "CodaMark", + "CombineTextScript", + "ControlPoint", + "ControlPolygon", + "CueClef", + "CueEndClef", + "Custos", + "Divisio", + "DotColumn", + "Dots", + "DoublePercentRepeat", + "DoublePercentRepeatCounter", + "DoubleRepeatSlash", + "DurationLine", + "DynamicLineSpanner", + "DynamicText", + "DynamicTextSpanner", + "Episema", + "FingerGlideSpanner", + "Fingering", + "FingeringColumn", + "Flag", + "Footnote", + "FretBoard", + "Glissando", + "GraceSpacing", + "GridChordName", + "GridLine", + "GridPoint", + "Hairpin", + "HorizontalBracket", + "HorizontalBracketText", + "InstrumentName", + "InstrumentSwitch", + "JumpScript", + "KeyCancellation", + "KeySignature", + "KievanLigature", + "LaissezVibrerTie", + "LaissezVibrerTieColumn", + "LedgerLineSpanner", + "LeftEdge", + "LigatureBracket", + "LyricExtender", + "LyricHyphen", + "LyricRepeatCount", + "LyricSpace", + "LyricText", + "MeasureCounter", + "MeasureGrouping", + "MeasureSpanner", + "MelodyItem", + "MensuralLigature", + "MetronomeMark", + "MultiMeasureRest", + "MultiMeasureRestNumber", + "MultiMeasureRestScript", + "MultiMeasureRestText", + "NonMusicalPaperColumn", + "NoteCollision", + "NoteColumn", + "NoteHead", + "NoteName", + "NoteSpacing", + "OttavaBracket", + "PaperColumn", + "Parentheses", + "PercentRepeat", + "PercentRepeatCounter", + "PhrasingSlur", + "PianoPedalBracket", + "RehearsalMark", + "RepeatSlash", + "RepeatTie", + "RepeatTieColumn", + "Rest", + "RestCollision", + "Script", + "ScriptColumn", + "ScriptRow", + "SectionLabel", + "SegnoMark", + "SignumRepetitionis", + "Slur", + "SostenutoPedal", + "SostenutoPedalLineSpanner", + "SpacingSpanner", + "SpanBar", + "SpanBarStub", + "StaffEllipsis", + "StaffGrouper", + "StaffHighlight", + "StaffSpacing", + "StaffSymbol", + "StanzaNumber", + "Stem", + "StemStub", + "StemTremolo", + "StringNumber", + "StrokeFinger", + "SustainPedal", + "SustainPedalLineSpanner", + "System", + "SystemStartBar", + "SystemStartBrace", + "SystemStartBracket", + "SystemStartSquare", + "TabNoteHead", + "TextMark", + "TextScript", + "TextSpanner", + "Tie", + "TieColumn", + "TimeSignature", + "TrillPitchAccidental", + "TrillPitchGroup", + "TrillPitchHead", + "TrillPitchParentheses", + "TrillSpanner", + "TupletBracket", + "TupletNumber", + "UnaCordaPedal", + "UnaCordaPedalLineSpanner", + "VaticanaLigature", + "VerticalAlignment", + "VerticalAxisGroup", + "VoiceFollower", + "VoltaBracket", + "VoltaBracketSpanner", + "VowelTransition", +] + +contexts = [ + "ChoirStaff", + "ChordGrid", + "ChordGridScore", + "ChordNames", + "CueVoice", + "Devnull", + "DrumStaff", + "DrumVoice", + "Dynamics", + "FiguredBass", + "FretBoards", + "Global", + "GrandStaff", + "GregorianTranscriptionLyrics", + "GregorianTranscriptionStaff", + "GregorianTranscriptionVoice", + "InternalGregorianStaff", + "KievanStaff", + "KievanVoice", + "Lyrics", + "MensuralStaff", + "MensuralVoice", + "NoteNames", + "NullVoice", + "OneStaff", + "PetrucciStaff", + "PetrucciVoice", + "PianoStaff", + "RhythmicStaff", + "Score", + "Staff", + "StaffGroup", + "StandaloneRhythmScore", + "StandaloneRhythmStaff", + "StandaloneRhythmVoice", + "TabStaff", + "TabVoice", + "Timing", + "VaticanaLyrics", + "VaticanaStaff", + "VaticanaVoice", + "Voice", +] + +translators = [ + "Accidental_engraver", + "Alteration_glyph_engraver", + "Ambitus_engraver", + "Arpeggio_engraver", + "Auto_beam_engraver", + "Axis_group_engraver", + "Balloon_engraver", + "Bar_engraver", + "Bar_number_engraver", + "Beam_collision_engraver", + "Beam_engraver", + "Beam_performer", + "Beat_engraver", + "Beat_performer", + "Bend_engraver", + "Bend_spanner_engraver", + "Break_align_engraver", + "Breathing_sign_engraver", + "Caesura_engraver", + "Centered_bar_number_align_engraver", + "Chord_name_engraver", + "Chord_square_engraver", + "Chord_tremolo_engraver", + "Clef_engraver", + "Cluster_spanner_engraver", + "Collision_engraver", + "Completion_heads_engraver", + "Completion_rest_engraver", + "Concurrent_hairpin_engraver", + "Control_track_performer", + "Cue_clef_engraver", + "Current_chord_text_engraver", + "Custos_engraver", + "Divisio_engraver", + "Dot_column_engraver", + "Dots_engraver", + "Double_percent_repeat_engraver", + "Drum_note_performer", + "Drum_notes_engraver", + "Duration_line_engraver", + "Dynamic_align_engraver", + "Dynamic_engraver", + "Dynamic_performer", + "Episema_engraver", + "Extender_engraver", + "Figured_bass_engraver", + "Figured_bass_position_engraver", + "Finger_glide_engraver", + "Fingering_column_engraver", + "Fingering_engraver", + "Font_size_engraver", + "Footnote_engraver", + "Forbid_line_break_engraver", + "Fretboard_engraver", + "Glissando_engraver", + "Grace_auto_beam_engraver", + "Grace_beam_engraver", + "Grace_engraver", + "Grace_spacing_engraver", + "Grid_chord_name_engraver", + "Grid_line_span_engraver", + "Grid_point_engraver", + "Grob_pq_engraver", + "Horizontal_bracket_engraver", + "Hyphen_engraver", + "Instrument_name_engraver", + "Instrument_switch_engraver", + "Jump_engraver", + "Keep_alive_together_engraver", + "Key_engraver", + "Key_performer", + "Kievan_ligature_engraver", + "Laissez_vibrer_engraver", + "Ledger_line_engraver", + "Ligature_bracket_engraver", + "Lyric_engraver", + "Lyric_performer", + "Lyric_repeat_count_engraver", + "Mark_engraver", + "Mark_performer", + "Mark_tracking_translator", + "Measure_counter_engraver", + "Measure_grouping_engraver", + "Measure_spanner_engraver", + "Melody_engraver", + "Mensural_ligature_engraver", + "Merge_mmrest_numbers_engraver", + "Merge_rests_engraver", + "Metronome_mark_engraver", + "Midi_control_change_performer", + "Multi_measure_rest_engraver", + "New_fingering_engraver", + "Non_musical_script_column_engraver", + "Note_head_line_engraver", + "Note_heads_engraver", + "Note_name_engraver", + "Note_performer", + "Note_spacing_engraver", + "Ottava_spanner_engraver", + "Output_property_engraver", + "Page_turn_engraver", + "Paper_column_engraver", + "Parenthesis_engraver", + "Part_combine_engraver", + "Percent_repeat_engraver", + "Phrasing_slur_engraver", + "Piano_pedal_align_engraver", + "Piano_pedal_engraver", + "Piano_pedal_performer", + "Pitch_squash_engraver", + "Pitched_trill_engraver", + "Pure_from_neighbor_engraver", + "Repeat_acknowledge_engraver", + "Repeat_tie_engraver", + "Rest_collision_engraver", + "Rest_engraver", + "Rhythmic_column_engraver", + "Script_column_engraver", + "Script_engraver", + "Script_row_engraver", + "Separating_line_group_engraver", + "Show_control_points_engraver", + "Signum_repetitionis_engraver", + "Skip_typesetting_engraver", + "Slash_repeat_engraver", + "Slur_engraver", + "Slur_performer", + "Spacing_engraver", + "Span_arpeggio_engraver", + "Span_bar_engraver", + "Span_bar_stub_engraver", + "Span_stem_engraver", + "Spanner_break_forbid_engraver", + "Spanner_tracking_engraver", + "Staff_collecting_engraver", + "Staff_highlight_engraver", + "Staff_performer", + "Staff_symbol_engraver", + "Stanza_number_align_engraver", + "Stanza_number_engraver", + "Stem_engraver", + "System_start_delimiter_engraver", + "Tab_note_heads_engraver", + "Tab_staff_symbol_engraver", + "Tab_tie_follow_engraver", + "Tempo_performer", + "Text_engraver", + "Text_mark_engraver", + "Text_spanner_engraver", + "Tie_engraver", + "Tie_performer", + "Time_signature_engraver", + "Time_signature_performer", + "Timing_translator", + "Trill_spanner_engraver", + "Tuplet_engraver", + "Tweak_engraver", + "Vaticana_ligature_engraver", + "Vertical_align_engraver", + "Volta_engraver", +] + +scheme_functions = [ + "!=", + "*location*", + "*parser*", + "Alteration_glyph_engraver", + "Beat_performer", + "Bend_spanner_engraver", + "Breathing_sign_engraver", + "Centered_bar_number_align_engraver", + "Chord_name_engraver", + "Chord_square_engraver", + "Current_chord_text_engraver", + "Divisio_engraver", + "Duration_line_engraver", + "Finger_glide_engraver", + "G_", + "Grid_chord_name_engraver", + "Lyric_repeat_count_engraver", + "Measure_counter_engraver", + "Measure_spanner_engraver", + "Merge_mmrest_numbers_engraver", + "Merge_rests_engraver", + "Show_control_points_engraver", + "Signum_repetitionis_engraver", + "Skip_typesetting_engraver", + "Span_stem_engraver", + "Spanner_tracking_engraver", + "Staff_highlight_engraver", + "Text_mark_engraver", + "Trill_spanner_engraver", + "_i", + "abs-fontsize-markup", + "accidental->markup", + "accidental->markup-italian", + "accidental-interface::calc-alteration", + "accidental-interface::calc-glyph-name", + "accidental-invalid?", + "accidental-markup", + "add-bar-glyph-print-procedure", + "add-font", + "add-grace-property", + "add-music", + "add-music-fonts", + "add-new-clef", + "add-pango-fonts", + "add-point", + "add-quotable", + "add-score", + "add-simple-time-signature-style", + "add-stroke-glyph", + "add-stroke-straight", + "add-text", + "adjust-slash-stencil", + "align-on-other-markup", + "aligned-text-stencil-function", + "alist->hash-table", + "alisttext-accidental-markup", + "alterations-in-key", + "ambitus-line::calc-gap", + "ambitus::print", + "analyse-spanner-states", + "ancestor-lookup-initialize", + "angle-0-2pi", + "angle-0-360", + "annotate-spacing-spec", + "annotate-y-interval", + "any-mmrest-events", + "apply-durations", + "apply-group-draw-rule-series", + "arrow-head-markup", + "arrow-stencil", + "arrow-stencil-maker", + "assemble-stencils", + "assoc-get", + "assoc-keys", + "assoc-values", + "at-bar-line-substitute-caesura-type", + "aug-modifier", + "auto-footnote-markup", + "average", + "b", + "backslashed-digit-markup", + "bar-line::bar-y-extent", + "bar-line::calc-blot", + "bar-line::calc-break-visibility", + "bar-line::calc-glyph-name", + "bar-line::calc-glyph-name-for-direction", + "bar-line::compound-bar-line", + "bar-line::draw-filled-box", + "bar-line::widen-bar-extent-on-span", + "base-length", + "bass-clarinet-rh-ees-key-stencil", + "bassoon-bend-info-maker", + "bassoon-cc-six-key-stencil", + "bassoon-lh-a-flick-key-stencil", + "bassoon-lh-c-flick-key-stencil", + "bassoon-lh-cis-key-stencil", + "bassoon-lh-d-flick-key-stencil", + "bassoon-lh-ees-key-stencil", + "bassoon-lh-he-key-stencil", + "bassoon-lh-hees-key-stencil", + "bassoon-lh-lb-key-stencil", + "bassoon-lh-lbes-key-stencil", + "bassoon-lh-lc-key-stencil", + "bassoon-lh-ld-key-stencil", + "bassoon-lh-lhees-key-stencil", + "bassoon-lh-thumb-cis-key-stencil", + "bassoon-lh-whisper-key-stencil", + "bassoon-midline-rule", + "bassoon-rh-bes-key-stencil", + "bassoon-rh-cis-key-stencil", + "bassoon-rh-f-key-stencil", + "bassoon-rh-fis-key-stencil", + "bassoon-rh-gis-key-stencil", + "bassoon-rh-thumb-bes-key-stencil", + "bassoon-rh-thumb-e-key-stencil", + "bassoon-rh-thumb-fis-key-stencil", + "bassoon-rh-thumb-gis-key-stencil", + "bassoon-uber-key-stencil", + "beam-exceptions", + "beam-markup", + "beam::align-with-broken-parts", + "beam::get-kievan-positions", + "beam::get-kievan-quantized-positions", + "beam::place-broken-parts-individually", + "beam::slope-like-broken-parts", + "beat-grouping-internal", + "beat-structure", + "bend-spanner::print", + "bend::arrow-head-stencil", + "bend::calc-bend-x-begin", + "bend::calc-bend-x-end", + "bend::calc-y-coordinates", + "bend::draw-curves", + "bend::make-line-curve-stencil", + "bend::print", + "bend::remove-certain-tab-note-heads", + "bend::target-cautionary", + "bend::text-stencil", + "bend::text-string", + "bezier-head-for-stencil", + "binary-search", + "bold-markup", + "book-first-page", + "boolean-or-number?", + "boolean-or-symbol?", + "bounding-note-heads-pitches", + "box-grob-stencil", + "box-markup", + "box-stencil", + "bracket-markup", + "bracketify-stencil", + "break-alignable-interface::self-alignment-of-anchor", + "break-alignable-interface::self-alignment-opposite-of-anchor", + "break-alignment-list", + "breathe::midi-length", + "buildflag", + "cached-file-contents", + "caesura-script-interface::before-line-breaking", + "caesura-to-bar-line-or-divisio", + "caesura-to-divisio", + "calc-harmonic-pitch", + "calc-line-thickness", + "calc-repeat-slash-count", + "calculate-complex-compound-time", + "calculate-compound-base-beat", + "calculate-compound-base-beat-full", + "calculate-compound-beat-grouping", + "calculate-compound-measure-length", + "calculate-time-fraction", + "call-after-session", + "caps-markup", + "car-or-identity", + "car<", + "car<=", + "cdr-or-identity", + "center-align-markup", + "center-column-markup", + "centered-spanner-interface::calc-x-offset", + "centered-stencil", + "chain-assoc-get", + "change-pitches", + "char-markup", + "cheap-list?", + "cheap-markup?", + "check-beam-quant", + "check-beam-slope-sign", + "check-broken-spanner", + "check-context-path", + "check-division-alist", + "check-for-annotation", + "check-for-replacement", + "check-grob-path", + "check-music-path", + "check-pitch-against-signature", + "check-quant-callbacks", + "check-slope-callbacks", + "chord-name->german-markup", + "chord-name->italian-markup", + "chord-square::height", + "chord-square::print", + "chord-square::width", + "circle-markup", + "circle-stencil", + "clarinet-lh-R-key-stencil", + "clarinet-lh-a-key-stencil", + "clarinet-lh-cis-key-stencil", + "clarinet-lh-d-key-stencil", + "clarinet-lh-e-key-stencil", + "clarinet-lh-ees-key-stencil", + "clarinet-lh-f-key-stencil", + "clarinet-lh-fis-key-stencil", + "clarinet-lh-gis-key-stencil", + "clarinet-lh-thumb-key-stencil", + "clarinet-rh-b-key-stencil", + "clarinet-rh-d-key-stencil", + "clarinet-rh-e-key-stencil", + "clarinet-rh-f-key-stencil", + "clarinet-rh-fis-key-stencil", + "clarinet-rh-four-key-stencil", + "clarinet-rh-gis-key-stencil", + "clarinet-rh-low-c-key-stencil", + "clarinet-rh-low-cis-key-stencil", + "clarinet-rh-low-d-key-stencil", + "clarinet-rh-one-key-stencil", + "clarinet-rh-three-key-stencil", + "clarinet-rh-two-key-stencil", + "clef-transposition-markup", + "clef::print-modern-tab-if-set", + "clip-systems-to-region-stencils", + "clipped-systems-stencils", + "close-enough?", + "close-port-rename", + "coda-markup", + "collect-book-music-for-book", + "collect-bookpart-for-book", + "collect-music-aux", + "collect-music-for-book", + "collect-scores-for-book", + "color?", + "column-circle-stencil", + "column-lines-markup-list", + "column-markup", + "combine-markup", + "comparable-note-events", + "comparator-from-key", + "compile-all-markup-args", + "compile-all-markup-expressions", + "compile-markup-arg", + "compile-markup-expression", + "completize-formats", + "completize-grob-entry", + "compound-meter-markup", + "concat-markup", + "conditional-kern-before", + "conditional-string-capitalize", + "conditional-trill-markup-markup", + "configuration", + "cons-fret", + "constante-hairpin", + "construct-chord-elements", + "context-defs-from-music", + "context-mod-from-music", + "context-spec-music", + "control-point::calc-offset", + "control-polygon::calc-text", + "coord-axis", + "coord-rotate", + "coord-rotated", + "coord-scale", + "coord-translate", + "coord-x", + "coord-y", + "copy-binary-file", + "copy-repeat-chord", + "count-list", + "create-file-exclusive", + "create-fretboard", + "create-glyph-flag", + "cross-staff-connect", + "css-color", + "cue-substitute", + "current-or-previous-voice-states", + "customTabClef-markup", + "cyclic-base-value", + "debugf", + "def-grace-function", + "default-auto-beam-check", + "default-flag", + "default-paren-color", + "define-bar-line", + "define-event-class", + "define-event-function", + "define-fonts", + "define-grob-property", + "define-internal-grob-property", + "define-markup-command", + "define-markup-command-internal", + "define-markup-list-command", + "define-music-function", + "define-scheme-function", + "define-session", + "define-session-public", + "define-syntax-function", + "define-syntax-public", + "define-syntax-rule-public", + "define-tag-group", + "define-void-function", + "degree-first-true", + "degrees->radians", + "descend-to-context", + "determine-frets", + "determine-split-list", + "determine-string-fret-finger", + "dim-modifier", + "dimension-arrows", + "dir-basename", + "dir-column-markup", + "display-lily-music", + "display-music", + "display-scheme-music", + "dodecaphonic-no-repeat-rule", + "done?", + "dot-column-interface::pad-by-one-dot-width", + "dot-has-color", + "dot-is-inverted", + "dot-is-parenthesized", + "dots::calc-dot-count", + "dots::calc-dot-stencil", + "dots::calc-glyph-name", + "dots::calc-staff-position", + "doubleflat-markup", + "doublesharp-markup", + "draw-circle-markup", + "draw-dashed-line-markup", + "draw-dotted-line-markup", + "draw-hline-markup", + "draw-line-markup", + "draw-squiggle-line-markup", + "dump-zombies", + "duration", + "duration-dot-factor", + "duration-length", + "duration-line::calc", + "duration-line::calc-thickness", + "duration-line::print", + "duration-log-factor", + "duration-of-note", + "duration-or-music?", + "duration-visual", + "duration-visual-length", + "dynamic-markup", + "dynamic-text-spanner::before-line-breaking", + "elbowed-hairpin", + "ellipse-markup", + "ellipse-radius", + "ellipse-stencil", + "empty-music", + "end-broken-spanner?", + "entry-greater-than-x?", + "eps-file->stencil", + "epsfile-markup", + "eval-carefully", + "event-cause", + "event-chord-notes", + "event-chord-pitches", + "event-chord-reduce", + "event-chord-wrap!", + "event-class-cons", + "event-has-articulation?", + "events", + "every-nth-bar-number-visible", + "every-nth-repeat-count-visible", + "exact-rational?", + "expand-repeat-chords!", + "expand-repeat-notes!", + "extent-combine", + "extract-alteration", + "extract-beam-exceptions", + "extract-music", + "extract-named-music", + "extract-typed-music", + "eyeglasses-markup", + "fermata-markup", + "figured-bass-markup", + "fill-line-markup", + "fill-with-pattern-markup", + "filled-box-markup", + "find-named-props", + "find-pitch-entry", + "find-value-to-offset", + "finger-glide::print", + "finger-markup", + "fingering::calc-text", + "first-assoc", + "first-bar-number-invisible", + "first-bar-number-invisible-and-no-parenthesized-bar-numbers", + "first-bar-number-invisible-save-broken-bars", + "first-broken-spanner?", + "first-member", + "first-visible-markup", + "flared-hairpin", + "flat-flag", + "flat-markup", + "flatten-alist", + "flatten-list", + "flip-stencil", + "flute-lh-b-key-stencil", + "flute-lh-bes-key-stencil", + "flute-lh-gis-key-stencil", + "flute-lh-gis-rh-bes-key-stencil", + "flute-rh-b-key-stencil", + "flute-rh-bes-key-stencil", + "flute-rh-c-key-stencil", + "flute-rh-cis-key-stencil", + "flute-rh-d-key-stencil", + "flute-rh-dis-key-stencil", + "flute-rh-ees-key-stencil", + "flute-rh-gz-key-stencil", + "fold-some-music", + "font-children", + "font-default", + "font-name-split", + "font-name-style", + "font-qualifier", + "fontCaps-markup", + "fontsize-markup", + "footnote-markup", + "for-some-music", + "forced-configuration", + "format", + "format-bass-figure", + "format-coda-mark", + "format-compound-time", + "format-dal-segno-text", + "format-dal-segno-text-brief", + "format-mark-alphabet", + "format-mark-barnumbers", + "format-mark-box-alphabet", + "format-mark-box-barnumbers", + "format-mark-box-letters", + "format-mark-box-numbers", + "format-mark-circle-alphabet", + "format-mark-circle-barnumbers", + "format-mark-circle-letters", + "format-mark-circle-numbers", + "format-mark-generic", + "format-mark-letters", + "format-mark-numbers", + "format-metronome-markup", + "format-segno-mark", + "format-segno-mark-considering-bar-lines", + "format-sign-with-number", + "format-time-element", + "format-time-fraction", + "format-time-list", + "format-time-numerator", + "format-varcoda-mark", + "fraction->moment", + "fraction-markup", + "fraction?", + "fret->pitch", + "fret-board::calc-stencil", + "fret-count", + "fret-diagram-markup", + "fret-diagram-terse-markup", + "fret-diagram-verbose-markup", + "fret-letter-tablature-format", + "fret-number-tablature-format", + "fret-number-tablature-format-banjo", + "fret-parse-definition-string", + "fret-parse-marking-list", + "fret-parse-terse-definition-string", + "fromproperty-markup", + "function-chain", + "g", + "g-lookup-font", + "general-align-markup", + "general-column", + "generate-bassoon-family-entry", + "generate-clarinet-family-entry", + "generate-crop-stencil", + "generate-flute-family-entry", + "generate-oboe-family-entry", + "generate-preview-stencil", + "generate-saxophone-family-entry", + "generate-system-stencils", + "generate-tin-whistle-family-entry", + "get-bound-note-heads", + "get-chord-shape", + "get-current-filename", + "get-current-suffix", + "get-fill-space", + "get-key", + "get-named-spreadsheet-column", + "get-next-unique-voice-name", + "get-numeric-from-key", + "get-outfile-name", + "get-postscript-bbox", + "get-quarter-diffs", + "get-setting", + "get-slope-offset", + "get-span-glyph", + "get-spreadsheet-column", + "get-step", + "get-sub-list", + "get-top-most-tab-head", + "get-tweakable-music", + "get-woodwind-key-list", + "glissando::calc-tab-extra-dy", + "glissando::draw-tab-glissando", + "glyph->stencil", + "glyph-flag", + "grace-spacing::calc-shortest-duration", + "gray-colorize", + "grid-chord-name::calc-X-offset", + "grid-chord-name::calc-Y-offset", + "grid-chord-name::calc-offset-on-axis", + "grob-interpret-markup", + "grob-list?", + "grob-transformer", + "grob::all-objects", + "grob::calc-property-by-copy", + "grob::compose-function", + "grob::display-objects", + "grob::has-interface", + "grob::inherit-parent-property", + "grob::is-live?", + "grob::name", + "grob::objects-from-interface", + "grob::offset-function", + "grob::relay-other-property", + "grob::rhythmic-location", + "grob::show-skylines-if-debug-skylines-set", + "grob::unpure-Y-extent-from-stencil", + "grob::when", + "group-automate-rule", + "group-draw-rule", + "group-extra-offset-rule", + "gs-cmd-args", + "gs-safe-run", + "hairpin::calc-grow-direction", + "halign-markup", + "harp-pedal-check", + "harp-pedal-info", + "harp-pedal-markup", + "harp-pedals-parse-string", + "has-at-least-two?", + "has-one-or-less?", + "hash-table->alist", + "hbracket-markup", + "hcenter-in-markup", + "header-to-file", + "headers-property-alist-chain", + "hook-stencil", + "horizontal-slash-interval", + "hspace-markup", + "huge-markup", + "if-markup", + "ignatzek-chord-names", + "index-cell", + "index-or-markup?", + "index?", + "insert-markups", + "internal-set-paper-size", + "interpret-markup", + "interpret-markup-list", + "interval-bound", + "interval-center", + "interval-contains?", + "interval-empty?", + "interval-end", + "interval-index", + "interval-intersection", + "interval-length", + "interval-sane?", + "interval-scale", + "interval-start", + "interval-union", + "interval-widen", + "invalidate-alterations", + "inverter-factory", + "is-absolute?", + "is-square?", + "italic-markup", + "item::extra-spacing-height-including-staff", + "justified-lines-markup-list", + "justify-field-markup", + "justify-line-helper", + "justify-line-markup", + "justify-markup", + "justify-string-markup", + "key-crawler", + "key-entry-alteration", + "key-entry-bar-number", + "key-entry-end-mom", + "key-entry-notename", + "key-entry-octave", + "key-fill-translate", + "key-list-or-music?", + "key-list-or-symbol?", + "key-list?", + "key-signature-interface::alteration-position", + "key-signature-interface::alteration-positions", + "key?", + "keyword->make-markup", + "large-markup", + "larger-markup", + "layout-blot-diameter", + "layout-extract-page-properties", + "layout-line-thickness", + "layout-set-absolute-staff-size", + "layout-set-absolute-staff-size-in-module", + "layout-set-staff-size", + "left-align-markup", + "left-brace-markup", + "left-column-markup", + "lexicographic-list-compare?", + "lh-woodwind-text-stencil", + "lilypond-all", + "lilypond-file", + "lilypond-main", + "lilypond-version", + "lilypond-version-outdated?", + "line-markup", + "list-all-possible-keys", + "list-all-possible-keys-verbose", + "list-element-index", + "list-insert-separator", + "list-join", + "listener->once-listener", + "little-elliptical-key-stencil", + "long-midline-stencil", + "lookup-font", + "lookup-markup", + "lookup-markup-command", + "lookup-markup-command-aux", + "lookup-markup-list-command", + "lookup-paper-name", + "low-bass-clarinet-rh-ees-key-stencil", + "lower-markup", + "ly-getcwd", + "ly-type?", + "ly:accidental-interface::height", + "ly:accidental-interface::horizontal-skylines", + "ly:accidental-interface::print", + "ly:accidental-interface::remove-tied", + "ly:accidental-placement::calc-positioning-done", + "ly:add-context-mod", + "ly:add-interface", + "ly:add-listener", + "ly:add-option", + "ly:align-interface::align-to-ideal-distances", + "ly:align-interface::align-to-minimum-distances", + "ly:all-grob-interfaces", + "ly:all-options", + "ly:all-output-backend-commands", + "ly:all-stencil-commands", + "ly:all-stencil-expressions", + "ly:alternative-sequence-iterator::constructor", + "ly:angle", + "ly:apply-context-iterator::constructor", + "ly:arpeggio::brew-chord-bracket", + "ly:arpeggio::brew-chord-slur", + "ly:arpeggio::calc-cross-staff", + "ly:arpeggio::calc-positions", + "ly:arpeggio::print", + "ly:arpeggio::pure-height", + "ly:arpeggio::width", + "ly:assoc-get", + "ly:axis-group-interface::add-element", + "ly:axis-group-interface::adjacent-pure-heights", + "ly:axis-group-interface::calc-pure-relevant-grobs", + "ly:axis-group-interface::calc-pure-staff-staff-spacing", + "ly:axis-group-interface::calc-pure-y-common", + "ly:axis-group-interface::calc-skylines", + "ly:axis-group-interface::calc-staff-staff-spacing", + "ly:axis-group-interface::calc-x-common", + "ly:axis-group-interface::calc-y-common", + "ly:axis-group-interface::combine-skylines", + "ly:axis-group-interface::height", + "ly:axis-group-interface::pure-height", + "ly:axis-group-interface::width", + "ly:balloon-interface::print", + "ly:balloon-interface::pure-height", + "ly:balloon-interface::remove-irrelevant-spanner", + "ly:balloon-interface::width", + "ly:bar-check-iterator::constructor", + "ly:bar-line::calc-anchor", + "ly:bar-line::calc-bar-extent", + "ly:bar-line::print", + "ly:basic-progress", + "ly:beam::calc-beam-segments", + "ly:beam::calc-beaming", + "ly:beam::calc-cross-staff", + "ly:beam::calc-direction", + "ly:beam::calc-normal-stems", + "ly:beam::calc-stem-shorten", + "ly:beam::calc-x-positions", + "ly:beam::print", + "ly:beam::pure-rest-collision-callback", + "ly:beam::quanting", + "ly:beam::rest-collision-callback", + "ly:beam::set-stem-lengths", + "ly:bezier-extent", + "ly:bezier-extract", + "ly:book-add-bookpart!", + "ly:book-add-score!", + "ly:book-book-parts", + "ly:book-header", + "ly:book-paper", + "ly:book-process", + "ly:book-process-to-systems", + "ly:book-scores", + "ly:book-set-header!", + "ly:book?", + "ly:bp", + "ly:bracket", + "ly:break-alignable-interface::find-parent", + "ly:break-alignable-interface::self-align-callback", + "ly:break-aligned-interface::calc-average-anchor", + "ly:break-aligned-interface::calc-break-visibility", + "ly:break-aligned-interface::calc-extent-aligned-anchor", + "ly:break-aligned-interface::calc-joint-anchor-alignment", + "ly:break-alignment-interface::calc-positioning-done", + "ly:break-alignment-interface::find-nonempty-break-align-group", + "ly:breathing-sign::divisio-maior", + "ly:breathing-sign::divisio-maxima", + "ly:breathing-sign::divisio-minima", + "ly:breathing-sign::finalis", + "ly:breathing-sign::offset-callback", + "ly:breathing-sign::set-breath-properties", + "ly:broadcast", + "ly:cairo-output-stencil", + "ly:cairo-output-stencils", + "ly:calculated-sequential-music::length", + "ly:calculated-sequential-music::start", + "ly:camel-case->lisp-identifier", + "ly:chain-assoc-get", + "ly:change-iterator::constructor", + "ly:check-expected-warnings", + "ly:chord-name::after-line-breaking", + "ly:clef-modifier::calc-parent-alignment", + "ly:clef::calc-glyph-name", + "ly:clef::print", + "ly:cluster-beacon::height", + "ly:cluster::calc-cross-staff", + "ly:cluster::print", + "ly:cm", + "ly:command-line-code", + "ly:command-line-options", + "ly:connect-dispatchers", + "ly:context-current-moment", + "ly:context-def-lookup", + "ly:context-def-modify", + "ly:context-def?", + "ly:context-event-source", + "ly:context-events-below", + "ly:context-find", + "ly:context-grob-definition", + "ly:context-id", + "ly:context-matched-pop-property", + "ly:context-mod-apply!", + "ly:context-mod?", + "ly:context-name", + "ly:context-output-def", + "ly:context-parent", + "ly:context-property", + "ly:context-property-where-defined", + "ly:context-pushpop-property", + "ly:context-set-property!", + "ly:context-specced-music-iterator::constructor", + "ly:context-unset-property", + "ly:context?", + "ly:custos::print", + "ly:debug", + "ly:default-scale", + "ly:dimension?", + "ly:dir?", + "ly:directed", + "ly:disconnect-dispatchers", + "ly:dispatcher?", + "ly:dot-column::calc-positioning-done", + "ly:dots::print", + "ly:duration->string", + "ly:duration-compress", + "ly:duration-dot-count", + "ly:duration-factor", + "ly:duration-length", + "ly:duration-log", + "ly:duration-scale", + "ly:duration::less?", + "ly:durationlist", + "ly:grob-array-length", + "ly:grob-array-ref", + "ly:grob-array?", + "ly:grob-basic-properties", + "ly:grob-chain-callback", + "ly:grob-common-refpoint", + "ly:grob-common-refpoint-of-array", + "ly:grob-default-font", + "ly:grob-extent", + "ly:grob-get-vertical-axis-group-index", + "ly:grob-interfaces", + "ly:grob-layout", + "ly:grob-list->grob-array", + "ly:grob-object", + "ly:grob-original", + "ly:grob-parent", + "ly:grob-pqoffsets", + "ly:listened-event-class?", + "ly:listened-event-types", + "ly:listener?", + "ly:load", + "ly:lyric-combine-music-iterator::constructor", + "ly:lyric-combine-music::length-callback", + "ly:lyric-extender::print", + "ly:lyric-hyphen::print", + "ly:lyric-hyphen::set-spacing-rods", + "ly:make-book", + "ly:make-book-part", + "ly:make-context-mod", + "ly:make-dispatcher", + "ly:make-duration", + "ly:make-event-class", + "ly:make-global-context", + "ly:make-global-translator", + "ly:make-grob-properties", + "ly:make-listener", + "ly:make-moment", + "ly:make-music", + "ly:make-music-function", + "ly:make-music-relative!", + "ly:make-output-def", + "ly:make-page-label-marker", + "ly:make-page-permission-marker", + "ly:make-pango-description-string", + "ly:make-paper-outputter", + "ly:make-pitch", + "ly:make-prob", + "ly:make-rotation", + "ly:make-scale", + "ly:make-scaling", + "ly:make-score", + "ly:make-skyline", + "ly:make-spring", + "ly:make-stencil", + "ly:make-stream-event", + "ly:make-transform", + "ly:make-translation", + "ly:make-unpure-pure-container", + "ly:measure-grouping::print", + "ly:measure-spanner::calc-connect-to-neighbors", + "ly:measure-spanner::print", + "ly:melody-spanner::calc-neutral-stem-direction", + "ly:mensural-ligature::brew-ligature-primitive", + "ly:mensural-ligature::print", + "ly:message", + "ly:minimal-breaking", + "ly:mm", + "ly:module->alist", + "ly:module-copy", + "ly:modules-lookup", + "ly:moment-add", + "ly:moment-div", + "ly:moment-grace", + "ly:moment-grace-denominator", + "ly:moment-grace-numerator", + "ly:moment-main", + "ly:moment-main-denominator", + "ly:moment-main-numerator", + "ly:moment-mod", + "ly:moment-mul", + "ly:moment-sub", + "ly:momentstring", + "ly:number-pair->string", + "ly:one-line-auto-height-breaking", + "ly:one-line-breaking", + "ly:one-page-breaking", + "ly:optimal-breaking", + "ly:option-usage", + "ly:otf->cff", + "ly:otf-font-glyph-info", + "ly:otf-font-table-data", + "ly:otf-font?", + "ly:otf-glyph-count", + "ly:otf-glyph-list", + "ly:ottava-bracket::print", + "ly:output-def-clone", + "ly:output-def-lookup", + "ly:output-def-parent", + "ly:output-def-scope", + "ly:output-def-set-variable!", + "ly:output-def?", + "ly:output-description", + "ly:output-find-context-def", + "ly:outputter-close", + "ly:outputter-dump-stencil", + "ly:outputter-dump-string", + "ly:outputter-output-scheme", + "ly:outputter-port", + "ly:page-marker?", + "ly:page-turn-breaking", + "ly:pango-font-physical-fonts", + "ly:pango-font?", + "ly:paper-book-header", + "ly:paper-book-pages", + "ly:paper-book-paper", + "ly:paper-book-performances", + "ly:paper-book-scopes", + "ly:paper-book-systems", + "ly:paper-book?", + "ly:paper-column::break-align-width", + "ly:paper-column::print", + "ly:paper-fonts", + "ly:paper-get-font", + "ly:paper-get-number", + "ly:paper-outputscale", + "ly:paper-score-paper-systems", + "ly:paper-system-minimum-distance", + "ly:paper-system?", + "ly:parse-file", + "ly:parse-init", + "ly:parse-string-expression", + "ly:parsed-undead-list!", + "ly:parser-clear-error", + "ly:parser-clone", + "ly:parser-define!", + "ly:parser-error", + "ly:parser-has-error?", + "ly:parser-include-string", + "ly:parser-lookup", + "ly:parser-output-name", + "ly:parser-parse-string", + "ly:parser-set-note-names", + "ly:part-combine-iterator::constructor", + "ly:partial-iterator::constructor", + "ly:partial-iterator::finalization", + "ly:percent-repeat-interface::beat-slash", + "ly:percent-repeat-interface::double-percent", + "ly:percent-repeat-interface::percent", + "ly:percent-repeat-iterator::constructor", + "ly:perform-text-replacements", + "ly:performance-headers", + "ly:performance-write", + "ly:piano-pedal-bracket::print", + "ly:pitch-alteration", + "ly:pitch-diff", + "ly:pitch-negate", + "ly:pitch-notename", + "ly:pitch-octave", + "ly:pitch-quartertones", + "ly:pitch-semitones", + "ly:pitch-steps", + "ly:pitch-tones", + "ly:pitch-transpose", + "ly:pitch::less?", + "ly:pitchpoints", + "ly:skyline-distance", + "ly:skyline-empty?", + "ly:skyline-height", + "ly:skyline-max-height", + "ly:skyline-max-height-position", + "ly:skyline-merge", + "ly:skyline-pad", + "ly:skyline-pair?", + "ly:skyline-touching-point", + "ly:skyline?", + "ly:skylines-for-stencil", + "ly:slur::calc-control-points", + "ly:slur::calc-cross-staff", + "ly:slur::calc-direction", + "ly:slur::height", + "ly:slur::outside-slur-callback", + "ly:slur::outside-slur-cross-staff", + "ly:slur::print", + "ly:slur::pure-height", + "ly:slur::pure-outside-slur-callback", + "ly:smob-protects", + "ly:solve-spring-rod-problem", + "ly:source-file?", + "ly:source-files", + "ly:spacing-spanner::calc-common-shortest-duration", + "ly:spacing-spanner::set-springs", + "ly:span-bar::before-line-breaking", + "ly:span-bar::calc-anchor", + "ly:span-bar::calc-glyph-name", + "ly:span-bar::choose-model-bar-line", + "ly:span-bar::print", + "ly:span-bar::width", + "ly:spanner-bound", + "ly:spanner-broken-into", + "ly:spanner-set-bound!", + "ly:spanner::bounds-width", + "ly:spanner::calc-normalized-endpoints", + "ly:spanner::kill-zero-spanned-time", + "ly:spanner::set-spacing-rods", + "ly:spanner?", + "ly:spawn", + "ly:spring-set-inverse-compress-strength!", + "ly:spring-set-inverse-stretch-strength!", + "ly:spring?", + "ly:staff-symbol-line-thickness", + "ly:staff-symbol-referencer::callback", + "ly:staff-symbol-staff-radius", + "ly:staff-symbol-staff-space", + "ly:staff-symbol::height", + "ly:staff-symbol::print", + "ly:stderr-redirect", + "ly:stem-tremolo::calc-cross-staff", + "ly:stem-tremolo::calc-direction", + "ly:stem-tremolo::calc-shape", + "ly:stem-tremolo::calc-slope", + "ly:stem-tremolo::calc-width", + "ly:stem-tremolo::calc-y-offset", + "ly:stem-tremolo::print", + "ly:stem-tremolo::pure-calc-y-offset", + "ly:stem-tremolo::pure-height", + "ly:stem-tremolo::width", + "ly:stem::calc-cross-staff", + "ly:stem::calc-default-direction", + "ly:stem::calc-direction", + "ly:stem::calc-length", + "ly:stem::calc-positioning-done", + "ly:stem::calc-stem-begin-position", + "ly:stem::calc-stem-end-position", + "ly:stem::calc-stem-info", + "ly:stem::height", + "ly:stem::offset-callback", + "ly:stem::print", + "ly:stem::pure-calc-length", + "ly:stem::pure-calc-stem-begin-position", + "ly:stem::pure-calc-stem-end-position", + "ly:stem::pure-height", + "ly:stem::width", + "ly:stencil-add", + "ly:stencil-aligned-to", + "ly:stencil-combine-at-edge", + "ly:stencil-empty?", + "ly:stencil-expr", + "ly:stencil-extent", + "ly:stencil-in-color", + "ly:stencil-outline", + "ly:stencil-rotate", + "ly:stencil-rotate-absolute", + "ly:stencil-scale", + "ly:stencil-stack", + "ly:stencil-translate", + "ly:stencil-translate-axis", + "ly:stencil?", + "ly:stream-event?", + "ly:string-percent-encode", + "ly:string-substitute", + "ly:sustain-pedal::print", + "ly:system", + "ly:system-font-load", + "ly:system-start-delimiter::print", + "ly:system::calc-pure-height", + "ly:system::calc-pure-relevant-grobs", + "ly:system::footnotes-after-line-breaking", + "ly:system::footnotes-before-line-breaking", + "ly:system::get-nonspaceable-staves", + "ly:system::get-spaceable-staves", + "ly:system::get-staves", + "ly:system::get-vertical-alignment", + "ly:system::height", + "ly:system::vertical-skyline-elements", + "ly:text-interface::interpret-markup", + "ly:text-interface::interpret-string", + "ly:text-interface::print", + "ly:tie-column::before-line-breaking", + "ly:tie-column::calc-positioning-done", + "ly:tie::calc-control-points", + "ly:tie::calc-direction", + "ly:tie::print", + "ly:time-signature::print", + "ly:transform->list", + "ly:transform?", + "ly:translate-cpp-warning-scheme", + "ly:translator-context", + "ly:translator-description", + "ly:translator-group?", + "ly:translator-name", + "ly:translator?", + "ly:transpose-key-alist", + "ly:ttf->pfa", + "ly:ttf-ps-name", + "ly:tuplet-bracket::calc-connect-to-neighbors", + "ly:tuplet-bracket::calc-cross-staff", + "ly:tuplet-bracket::calc-direction", + "ly:tuplet-bracket::calc-positions", + "ly:tuplet-bracket::calc-x-positions", + "ly:tuplet-bracket::print", + "ly:tuplet-iterator::constructor", + "ly:tuplet-number::calc-cross-staff", + "ly:tuplet-number::calc-x-offset", + "ly:tuplet-number::calc-y-offset", + "ly:tuplet-number::print", + "ly:type1->pfa", + "ly:unit", + "ly:unpure-call", + "ly:unpure-pure-container-pure-part", + "ly:unpure-pure-container-unpure-part", + "ly:unpure-pure-container?", + "ly:usage", + "ly:vaticana-ligature::brew-ligature-primitive", + "ly:vaticana-ligature::print", + "ly:verbose-output?", + "ly:version", + "ly:version?", + "ly:volta-bracket-interface::print", + "ly:volta-bracket::calc-shorten-pair", + "ly:volta-repeat-iterator::constructor", + "ly:volta-specced-music-iterator::constructor", + "ly:vowel-transition::set-spacing-rods", + "ly:warning", + "ly:warning-located", + "ly:wide-char->utf-8", + "lyric-hyphen::vaticana-style", + "lyric-text::print", + "magnification->font-size", + "magnify-markup", + "magnifyStaff-is-set?", + "magstep", + "maj7-modifier", + "make-abs-fontsize-markup", + "make-accidental-dodecaphonic-rule", + "make-accidental-markup", + "make-accidental-rule", + "make-align-on-other-markup", + "make-apply-context", + "make-arrow-head-markup", + "make-articulation", + "make-auto-footnote-markup", + "make-autochange-music", + "make-backslashed-digit-markup", + "make-beam-markup", + "make-bezier-sandwich-stencil", + "make-bold-markup", + "make-bow-stencil", + "make-box-markup", + "make-bracket-bar-line", + "make-bracket-markup", + "make-c-time-signature-markup", + "make-caps-markup", + "make-center-align-markup", + "make-center-column-markup", + "make-central-column-hole-addresses", + "make-char-markup", + "make-chord-elements", + "make-circle-markup", + "make-circle-stencil", + "make-clef-set", + "make-coda-markup", + "make-colon-bar-line", + "make-color-handler", + "make-column-lines-markup-list", + "make-column-markup", + "make-combine-markup", + "make-compound-meter-markup", + "make-concat-markup", + "make-conditional-trill-markup-markup", + "make-connected-line", + "make-connected-path-stencil", + "make-cue-clef-set", + "make-cue-clef-unset", + "make-customTabClef-markup", + "make-dashed-bar-line", + "make-default-fonts-tree", + "make-dir-column-markup", + "make-dotted-bar-line", + "make-doubleflat-markup", + "make-doublesharp-markup", + "make-draw-circle-markup", + "make-draw-dashed-line-markup", + "make-draw-dotted-line-markup", + "make-draw-hline-markup", + "make-draw-line-markup", + "make-draw-squiggle-line-markup", + "make-duration-of-length", + "make-dynamic-markup", + "make-ellipse-markup", + "make-ellipse-stencil", + "make-empty-bar-line", + "make-engraver", + "make-epsfile-markup", + "make-event-chord", + "make-extended-scale", + "make-eyeglasses-markup", + "make-fermata-markup", + "make-figured-bass-markup", + "make-fill-line-markup", + "make-fill-with-pattern-markup", + "make-filled-box-markup", + "make-filled-box-stencil", + "make-finger-markup", + "make-first-visible-markup", + "make-flat-markup", + "make-font-tree-leaf", + "make-font-tree-node", + "make-fontCaps-markup", + "make-fontsize-markup", + "make-footnote-markup", + "make-fraction-markup", + "make-fret-diagram", + "make-fret-diagram-markup", + "make-fret-diagram-terse-markup", + "make-fret-diagram-verbose-markup", + "make-fromproperty-markup", + "make-general-align-markup", + "make-glyph-time-signature-markup", + "make-grace-music", + "make-graceless-rhythmic-location", + "make-grob-property-override", + "make-grob-property-revert", + "make-grob-property-set", + "make-halign-markup", + "make-harmonic", + "make-harp-pedal-markup", + "make-hbracket-markup", + "make-hcenter-in-markup", + "make-hspace-markup", + "make-huge-markup", + "make-if-markup", + "make-italic-markup", + "make-justified-lines-markup-list", + "make-justify-field-markup", + "make-justify-line-markup", + "make-justify-markup", + "make-justify-string-markup", + "make-key-alist", + "make-key-symbols", + "make-kievan-bar-line", + "make-large-markup", + "make-larger-markup", + "make-left-align-markup", + "make-left-brace-markup", + "make-left-column-markup", + "make-left-hand-key-addresses", + "make-line-markup", + "make-line-stencil", + "make-lookup-markup", + "make-lower-markup", + "make-lyric-event", + "make-lyric-repeat-count-formatter", + "make-magnify-markup", + "make-map-markup-commands-markup-list", + "make-markalphabet-markup", + "make-markletter-markup", + "make-markup", + "make-medium-markup", + "make-modal-inverter", + "make-modal-transposer", + "make-multi-measure-rest", + "make-multi-measure-rest-by-number-markup", + "make-music", + "make-musicglyph-markup", + "make-name-keylist", + "make-named-spreadsheet", + "make-natural-markup", + "make-no-bar-line", + "make-non-relative-music", + "make-normal-size-sub-markup", + "make-normal-size-super-markup", + "make-normal-text-markup", + "make-normalsize-markup", + "make-note-by-number-markup", + "make-note-markup", + "make-null-markup", + "make-number-keylist", + "make-number-markup", + "make-on-the-fly-markup", + "make-oval-markup", + "make-oval-stencil", + "make-overlay-markup", + "make-override-lines-markup-list", + "make-override-markup", + "make-overtie-markup", + "make-pad-around-markup", + "make-pad-markup-markup", + "make-pad-to-box-markup", + "make-pad-x-markup", + "make-page-link-markup", + "make-page-ref-markup", + "make-pango-font-tree", + "make-parenthesis-stencil", + "make-parenthesize-markup", + "make-part-combine-context-changes", + "make-part-combine-marks", + "make-partial-ellipse-stencil", + "make-path-markup", + "make-path-stencil", + "make-pattern-markup", + "make-percent-set", + "make-performer", + "make-polygon-markup", + "make-postscript-markup", + "make-property-recursive-markup", + "make-property-set", + "make-property-unset", + "make-put-adjacent-markup", + "make-raise-markup", + "make-relative", + "make-relative::to-relative-callback", + "make-repeat", + "make-replace-markup", + "make-rest-by-number-markup", + "make-rest-markup", + "make-rhythm-markup", + "make-rhythmic-location", + "make-right-align-markup", + "make-right-brace-markup", + "make-right-column-markup", + "make-right-hand-key-addresses", + "make-roman-markup", + "make-rotate-markup", + "make-rounded-box-markup", + "make-sans-markup", + "make-scale", + "make-scale-markup", + "make-score-lines-markup-list", + "make-score-markup", + "make-segno-bar-line", + "make-segno-markup", + "make-semiflat-markup", + "make-semisharp-markup", + "make-semitone->pitch", + "make-sequential-music", + "make-sesquiflat-markup", + "make-sesquisharp-markup", + "make-session-variable", + "make-setting", + "make-sharp-markup", + "make-short-bar-line", + "make-simple-bar-line", + "make-simple-markup", + "make-simultaneous-music", + "make-skip-music", + "make-skipped", + "make-slashed-digit-markup", + "make-small-markup", + "make-smallCaps-markup", + "make-smaller-markup", + "make-spacer-bar-line", + "make-span-event", + "make-split-state", + "make-spreadsheet", + "make-stem-span!", + "make-stem-spans!", + "make-stencil-boxer", + "make-stencil-circler", + "make-stencil-markup", + "make-string-lines-markup-list", + "make-strut-markup", + "make-sub-markup", + "make-super-markup", + "make-symbol-alist", + "make-tab-heads-transparent", + "make-table-markup-list", + "make-teeny-markup", + "make-text-markup", + "make-thick-bar-line", + "make-tick-bar-line", + "make-tie-markup", + "make-tie-stencil", + "make-tied-lyric-markup", + "make-tilted-portion", + "make-time-signature-set", + "make-tiny-markup", + "make-tmpfile", + "make-translate-markup", + "make-translate-scaled-markup", + "make-translator", + "make-translator-component", + "make-translator-internal", + "make-transparent-box-stencil", + "make-transparent-markup", + "make-tremolo-set", + "make-triangle-markup", + "make-type-checker", + "make-typewriter-markup", + "make-underline-markup", + "make-undertie-markup", + "make-unfolded-set", + "make-unless-markup", + "make-upright-markup", + "make-varcoda-markup", + "make-vcenter-markup", + "make-verbatim-file-markup", + "make-voice-props-override", + "make-voice-props-revert", + "make-voice-props-set", + "make-voice-states", + "make-volta-set", + "make-vspace-markup", + "make-whiteout-markup", + "make-with-color-markup", + "make-with-dimension-from-markup", + "make-with-dimension-markup", + "make-with-dimensions-from-markup", + "make-with-dimensions-markup", + "make-with-link-markup", + "make-with-outline-markup", + "make-with-string-transformer-markup", + "make-with-true-dimension-markup", + "make-with-true-dimensions-markup", + "make-with-url-markup", + "make-woodwind-diagram-markup", + "make-wordwrap-field-markup", + "make-wordwrap-internal-markup-list", + "make-wordwrap-lines-markup-list", + "make-wordwrap-markup", + "make-wordwrap-string-internal-markup-list", + "make-wordwrap-string-markup", + "map-alist-keys", + "map-alist-vals", + "map-markup-commands-markup-list", + "map-selected-alist-keys", + "map-some-music", + "markalphabet-markup", + "marked-up-headfoot", + "marked-up-title", + "markgeneric-string", + "markletter-markup", + "markup", + "markup->string", + "markup-argument-list-error", + "markup-argument-list?", + "markup-command-list?", + "markup-command-signature", + "markup-default-to-string-method", + "markup-expression->make-markup", + "markup-function-as-string-method", + "markup-function-category", + "markup-function-properties", + "markup-function?", + "markup-join", + "markup-lambda", + "markup-lambda-listify", + "markup-lambda-worker", + "markup-list-function?", + "markup-list-lambda", + "markup-list?", + "markup-thrower-typecheck", + "markup-typecheck?", + "markup?", + "match-predicate", + "measure-counter::text", + "medium-markup", + "mensural-flag", + "merge-details", + "metronome-markup", + "middle-broken-spanner?", + "midi-program", + "midline-stencil", + "minor-modifier", + "mkdir-if-not-exist", + "mm-rest-child-list", + "mmrest-of-length", + "modern-straight-flag", + "modified-font-metric-font-scaling", + "modulo-bar-number-visible", + "moment", + "moment->fraction", + "moment-min", + "moment-pair?", + "moment<=?", + "move-chord-note", + "multi-fork", + "multi-measure-rest-by-number-markup", + "music->make-music", + "music-check-error", + "music-clone", + "music-filter", + "music-invert", + "music-is-of-type?", + "music-map", + "music-pitches", + "music-property-description", + "music-selective-filter", + "music-selective-map", + "music-separator?", + "music-type-predicate", + "musicglyph-markup", + "n-true-entries", + "narrow-glyph?", + "natural-chord-alteration", + "natural-markup", + "negate-extent", + "neo-modern-accidental-rule", + "no-flag", + "normal-flag", + "normal-size-sub-markup", + "normal-size-super-markup", + "normal-text-markup", + "normalize-fraction", + "normalsize-markup", + "not-first-broken-spanner?", + "not-last-broken-spanner?", + "note-by-number-markup", + "note-events", + "note-head::brew-ez-stencil", + "note-head::calc-duration-log", + "note-head::calc-glyph-name", + "note-head::calc-kievan-duration-log", + "note-markup", + "note-name->german-markup", + "note-name->markup", + "note-name->string", + "note-name-markup", + "note-names-language", + "note-to-cluster", + "notes-to-clusters", + "null-markup", + "number->octal-string", + "number-column-stencil", + "number-format", + "number-list?", + "number-markup", + "number-or-grob?", + "number-or-pair?", + "number-or-string?", + "number-pair-list?", + "number-pair?", + "numbered-footnotes", + "numerify", + "object-type", + "object-type-name", + "oboe-lh-I-key-stencil", + "oboe-lh-II-key-stencil", + "oboe-lh-III-key-stencil", + "oboe-lh-b-key-stencil", + "oboe-lh-bes-key-stencil", + "oboe-lh-cis-key-stencil", + "oboe-lh-d-key-stencil", + "oboe-lh-ees-key-stencil", + "oboe-lh-ees-lh-bes-key-stencil", + "oboe-lh-f-key-stencil", + "oboe-lh-gis-key-stencil", + "oboe-lh-gis-lh-low-b-key-stencil", + "oboe-lh-low-b-key-stencil", + "oboe-lh-octave-key-stencil", + "oboe-rh-a-key-stencil", + "oboe-rh-banana-key-stencil", + "oboe-rh-c-key-stencil", + "oboe-rh-c-rh-ees-key-stencil", + "oboe-rh-cis-key-stencil", + "oboe-rh-d-key-stencil", + "oboe-rh-ees-key-stencil", + "oboe-rh-f-key-stencil", + "oboe-rh-gis-key-stencil", + "octave-woodwind-text-stencil", + "offset-add", + "offset-flip-y", + "offset-fret", + "offset-multiple-types", + "offset-scale", + "offsetter", + "old-straight-flag", + "on-the-fly-markup", + "only-if-beamed", + "ordered-cons", + "other-axis", + "output-module?", + "output-scopes", + "outputproperty-compatibility", + "oval-markup", + "oval-stencil", + "overlay-markup", + "override-head-style", + "override-lines-markup-list", + "override-markup", + "override-property-setting", + "override-time-signature-setting", + "overtie-markup", + "pad-around-markup", + "pad-markup-markup", + "pad-to-box-markup", + "pad-x-markup", + "page-link-markup", + "page-ref-markup", + "pair-map", + "pango-font-name", + "pango-pf-file-name", + "pango-pf-font-name", + "pango-pf-fontindex", + "paper-variable", + "parentheses-interface::calc-angled-bracket-stencils", + "parentheses-interface::calc-parenthesis-stencils", + "parentheses-interface::print", + "parentheses-interface::y-extent", + "parenthesize-elements", + "parenthesize-markup", + "parenthesize-stencil", + "parse-and-check-version", + "parse-lily-version", + "parse-terse-string", + "path-markup", + "pattern-markup", + "percussion?", + "performance-name-from-headers", + "piccolo-rh-x-key-stencil", + "pitch-alteration-semitones", + "pitch-invert", + "pitch-of-note", + "pitch-step", + "polar->rectangular", + "polygon-markup", + "position-true-endpoint", + "postprocess-output", + "postscript->pdf", + "postscript->png", + "postscript->ps", + "postscript-markup", + "precompute-music-length", + "prepend-alist-chain", + "prepend-props", + "pretty-printable?", + "previous-span-state", + "previous-voice-state", + "print-book-with", + "print-book-with-defaults", + "print-book-with-defaults-as-systems", + "print-circled-text-callback", + "print-keys", + "print-keys-verbose", + "process-fill-value", + "property-recursive-markup", + "pure-chain-offset-callback", + "pure-from-neighbor-interface::account-for-span-bar", + "pure-from-neighbor-interface::extra-spacing-height", + "pure-from-neighbor-interface::extra-spacing-height-at-beginning-of-line", + "pure-from-neighbor-interface::extra-spacing-height-including-staff", + "pure-from-neighbor-interface::pure-height", + "put-adjacent-markup", + "quarterdiff->string", + "quote-substitute", + "raise-markup", + "randomize-rand-seed", + "ratio->fret", + "ratio->pitch", + "rational-or-procedure?", + "read-lily-expression", + "read-lily-expression-internal", + "recent-enough?", + "recompute-music-length", + "recording-group-emulate", + "regexp-split", + "relevant-book-systems", + "relevant-dump-systems", + "remove-grace-property", + "remove-step", + "remove-whitespace", + "repeat-tie::handle-tab-note-head", + "replace-markup", + "replace-step", + "replicate-modify", + "reset-stencil-colors", + "rest-by-number-markup", + "rest-markup", + "retrieve-glyph-flag", + "retrograde-music", + "return-1", + "reverse-interval", + "revert-fontSize", + "revert-head-style", + "revert-property-setting", + "revert-props", + "revert-time-signature-setting", + "rgb-color", + "rh-woodwind-text-stencil", + "rhythm-markup", + "rhythmic-location->file-string", + "rhythmic-location->string", + "rhythmic-location-bar-number", + "rhythmic-location-measure-position", + "rhythmic-location<=?", + "rhythmic-location=?", + "rhythmic-location>?", + "rhythmic-location?", + "rich-bassoon-uber-key-stencil", + "rich-e-stencil", + "rich-group-draw-rule", + "rich-group-extra-offset-rule", + "rich-path-stencil", + "rich-pe-stencil", + "right-align-markup", + "right-brace-markup", + "right-column-markup", + "ring-column-circle-stencil", + "robust-bar-number-function", + "roman-markup", + "rotate-markup", + "rounded-box-markup", + "rounded-box-stencil", + "sans-markup", + "sans-serif-stencil", + "saxophone-lh-T-key-stencil", + "saxophone-lh-b-cis-key-stencil", + "saxophone-lh-b-key-stencil", + "saxophone-lh-bes-key-stencil", + "saxophone-lh-cis-key-stencil", + "saxophone-lh-d-key-stencil", + "saxophone-lh-ees-key-stencil", + "saxophone-lh-f-key-stencil", + "saxophone-lh-front-f-key-stencil", + "saxophone-lh-gis-key-stencil", + "saxophone-lh-low-a-key-stencil", + "saxophone-lh-low-bes-key-stencil", + "saxophone-name-passerelle", + "saxophone-rh-bes-key-stencil", + "saxophone-rh-c-key-stencil", + "saxophone-rh-e-key-stencil", + "saxophone-rh-ees-key-stencil", + "saxophone-rh-fis-key-stencil", + "saxophone-rh-high-fis-key-stencil", + "saxophone-rh-low-c-key-stencil", + "saxophone-rh-side-key-stencil", + "scale->factor", + "scale-beam-thickness", + "scale-by-font-size", + "scale-fontSize", + "scale-layout", + "scale-markup", + "scale-props", + "scale?", + "scheme?", + "scm->string", + "score-lines-markup-list", + "score-markup", + "scorify-music", + "script-interface::calc-x-offset", + "script-or-side-position-cross-staff", + "search-executable", + "seconds->moment", + "segno-markup", + "select-head-glyph", + "select-option", + "self-alignment-interface::self-aligned-on-breakable", + "self-evaluating?", + "semi-tie::calc-cross-staff", + "semiflat-markup", + "semisharp-markup", + "sequential-music-to-chord-exceptions", + "sesquiflat-markup", + "sesquisharp-markup", + "session-replay", + "session-save", + "session-start-record", + "session-terminate", + "set-accidental-style", + "set-bar-number-visibility", + "set-counter-text!", + "set-default-paper-size", + "set-global-fonts", + "set-global-staff-size", + "set-mus-properties!", + "set-output-property", + "set-paper-dimension-variables", + "set-paper-dimensions", + "set-paper-size", + "sharp-markup", + "shift-duration-log", + "shift-octave", + "shift-one-duration-log", + "shift-right-at-line-begin", + "shift-semitone->pitch", + "short-glyph?", + "sign", + "silence-events", + "simple-markup", + "simple-stencil-alist", + "skip->rest", + "skip-as-needed", + "skip-of-length", + "skip-of-moment-span", + "skyline-pair-and-non-empty?", + "skyline-pair::empty?", + "slashed-digit-internal", + "slashed-digit-markup", + "slashify", + "small-markup", + "smallCaps-markup", + "smaller-markup", + "space-lines", + "span-bar::compound-bar-line", + "span-state", + "split-at-predicate", + "split-index", + "split-list", + "split-list-by-separator", + "stack-lines", + "stack-stencil-line", + "stack-stencils", + "stack-stencils-padding-list", + "stack-thirds", + "staff-ellipsis::calc-y-extent", + "staff-ellipsis::print", + "staff-highlight::height", + "staff-highlight::print", + "staff-highlight::width", + "staff-magnification-is-changing?", + "staff-symbol-line-count", + "staff-symbol-line-positions", + "staff-symbol-line-span", + "staff-symbol-y-extent-from-line-positions", + "staff-symbol::calc-widened-extent", + "standard-e-stencil", + "standard-path-stencil", + "stderr", + "stem-connectable?", + "stem-is-root?", + "stem-span-stencil", + "stem-stub::do-calculations", + "stem-stub::extra-spacing-height", + "stem-stub::pure-height", + "stem-stub::width", + "stem-tremolo::calc-tab-width", + "stem::calc-duration-log", + "stem::kievan-offset-callback", + "stencil-fretboard-extent", + "stencil-fretboard-offset", + "stencil-markup", + "stencil-true-extent", + "stencil-whiteout", + "stencil-whiteout-box", + "stencil-whiteout-outline", + "stencil-with-color", + "sticky-grob-interface::inherit-property", + "straight-flag", + "string->string-list", + "string-encode-integer", + "string-endswith", + "string-lines-markup-list", + "string-number::calc-text", + "string-or-music?", + "string-or-pair?", + "string-or-symbol?", + "string-regexp-substitute", + "string-startswith", + "string-thickness", + "strip-string-annotation", + "stroke-finger::calc-text", + "strut-markup", + "style-note-heads", + "sub-markup", + "subtract-base-fret", + "suggest-convert-ly-message", + "super-markup", + "sus-modifier", + "symbol-concatenate", + "symbol-footnotes", + "symbol-key-alist?", + "symbol-key>", + "<<", + # Logical operators + # Numeric operators + "+", + "-", + "/", + "*", + # Relational operators + "<", + "<=", + ">", + ">=", + "=", + "<>", + # String operators + "&", + ], +} + +# SCRIPT STATEMENTS +# see https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/Scripting/ +STATEMENT_LIST = [ + # control statements + "for", + "each", + "in", + "next", + "do", + "while", + "until", + "unless", + "loop", + "return", + "switch", + "case", + "default", + "if", + "else", + "endif", + "then", + "end", + "exit", + "script", + "switch", + # prefixes + "Add", + "Buffer", + "Concatenate", + "Crosstable", + "First", + "Generic", + "Hierarchy", + "HierarchyBelongsTo", + "Inner", + "IntervalMatch", + "Join", + "Keep", + "Left", + "Mapping", + "Merge", + "NoConcatenate", + "Outer", + "Partial reload", + "Replace", + "Right", + "Sample", + "Semantic", + "Unless", + "When", + # regular statements + "Alias", # alias ... as ... + "as", + "AutoNumber", + "Binary", + "Comment field", # comment fields ... using ... + "Comment fields", # comment field ... with ... + "using", + "with", + "Comment table", # comment table ... with ... + "Comment tables", # comment tables ... using ... + "Connect", + "ODBC", # ODBC CONNECT TO ... + "OLEBD", # OLEDB CONNECT TO ... + "CUSTOM", # CUSTOM CONNECT TO ... + "LIB", # LIB CONNECT TO ... + "Declare", + "Derive", + "From", + "explicit", + "implicit", + "Direct Query", + "dimension", + "measure", + "Directory", + "Disconnect", + "Drop field", + "Drop fields", + "Drop table", + "Drop tables", + "Execute", + "FlushLog", + "Force", + "capitalization", + "case upper", + "case lower", + "case mixed", + "Load", + "distinct", + "from", + "inline", + "resident", + "from_field", + "autogenerate", + "extension", + "where", + "group by", + "order by", + "asc", + "desc", + "Let", + "Loosen Table", + "Map", + "NullAsNull", + "NullAsValue", + "Qualify", + "Rem", + "Rename field", + "Rename fields", + "Rename table", + "Rename tables", + "Search", + "include", + "exclude", + "Section", + "access", + "application", + "Select", + "Set", + "Sleep", + "SQL", + "SQLColumns", + "SQLTables", + "SQLTypes", + "Star", + "Store", + "Tag", + "Trace", + "Unmap", + "Unqualify", + "Untag", + # Qualifiers + "total", +] + +# Script functions +# see https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/Scripting/functions-in-scripts-chart-expressions.htm +SCRIPT_FUNCTIONS = [ + # Basic aggregation functions in the data load script + "FirstSortedValue", + "Max", + "Min", + "Mode", + "Only", + "Sum", + # Counter aggregation functions in the data load script + "Count", + "MissingCount", + "NullCount", + "NumericCount", + "TextCount", + # Financial aggregation functions in the data load script + "IRR", + "XIRR", + "NPV", + "XNPV", + # Statistical aggregation functions in the data load script + "Avg", + "Correl", + "Fractile", + "FractileExc", + "Kurtosis", + "LINEST_B" "LINEST_df", + "LINEST_f", + "LINEST_m", + "LINEST_r2", + "LINEST_seb", + "LINEST_sem", + "LINEST_sey", + "LINEST_ssreg", + "Linest_ssresid", + "Median", + "Skew", + "Stdev", + "Sterr", + "STEYX", + # Statistical test functions + "Chi2Test_chi2", + "Chi2Test_df", + "Chi2Test_p", + # Two independent samples t-tests + "ttest_conf", + "ttest_df", + "ttest_dif", + "ttest_lower", + "ttest_sig", + "ttest_sterr", + "ttest_t", + "ttest_upper", + # Two independent weighted samples t-tests + "ttestw_conf", + "ttestw_df", + "ttestw_dif", + "ttestw_lower", + "ttestw_sig", + "ttestw_sterr", + "ttestw_t", + "ttestw_upper", + # One sample t-tests + "ttest1_conf", + "ttest1_df", + "ttest1_dif", + "ttest1_lower", + "ttest1_sig", + "ttest1_sterr", + "ttest1_t", + "ttest1_upper", + # One weighted sample t-tests + "ttest1w_conf", + "ttest1w_df", + "ttest1w_dif", + "ttest1w_lower", + "ttest1w_sig", + "ttest1w_sterr", + "ttest1w_t", + "ttest1w_upper", + # One column format functions + "ztest_conf", + "ztest_dif", + "ztest_sig", + "ztest_sterr", + "ztest_z", + "ztest_lower", + "ztest_upper", + # Weighted two-column format functions + "ztestw_conf", + "ztestw_dif", + "ztestw_lower", + "ztestw_sig", + "ztestw_sterr", + "ztestw_upper", + "ztestw_z", + # String aggregation functions in the data load script + "Concat", + "FirstValue", + "LastValue", + "MaxString", + "MinString", + # Synthetic dimension functions + "ValueList", + "ValueLoop", + # Color functions + "ARGB", + "HSL", + "RGB", + "Color", + "Colormix1", + "Colormix2", + "SysColor", + "ColorMapHue", + "ColorMapJet", + "black", + "blue", + "brown", + "cyan", + "darkgray", + "green", + "lightblue", + "lightcyan", + "lightgray", + "lightgreen", + "lightmagenta", + "lightred", + "magenta", + "red", + "white", + "yellow", + # Conditional functions + "alt", + "class", + "coalesce", + "if", + "match", + "mixmatch", + "pick", + "wildmatch", + # Counter functions + "autonumber", + "autonumberhash128", + "autonumberhash256", + "IterNo", + "RecNo", + "RowNo", + # Integer expressions of time + "second", + "minute", + "hour", + "day", + "week", + "month", + "year", + "weekyear", + "weekday", + # Timestamp functions + "now", + "today", + "LocalTime", + # Make functions + "makedate", + "makeweekdate", + "maketime", + # Other date functions + "AddMonths", + "AddYears", + "yeartodate", + # Timezone functions + "timezone", + "GMT", + "UTC", + "daylightsaving", + "converttolocaltime", + # Set time functions + "setdateyear", + "setdateyearmonth", + # In... functions + "inyear", + "inyeartodate", + "inquarter", + "inquartertodate", + "inmonth", + "inmonthtodate", + "inmonths", + "inmonthstodate", + "inweek", + "inweektodate", + "inlunarweek", + "inlunarweektodate", + "inday", + "indaytotime", + # Start ... end functions + "yearstart", + "yearend", + "yearname", + "quarterstart", + "quarterend", + "quartername", + "monthstart", + "monthend", + "monthname", + "monthsstart", + "monthsend", + "monthsname", + "weekstart", + "weekend", + "weekname", + "lunarweekstart", + "lunarweekend", + "lunarweekname", + "daystart", + "dayend", + "dayname", + # Day numbering functions + "age", + "networkdays", + "firstworkdate", + "lastworkdate", + "daynumberofyear", + "daynumberofquarter", + # Exponential and logarithmic + "exp", + "log", + "log10", + "pow", + "sqr", + "sqrt", + # Count functions + "GetAlternativeCount", + "GetExcludedCount", + "GetNotSelectedCount", + "GetPossibleCount", + "GetSelectedCount", + # Field and selection functions + "GetCurrentSelections", + "GetFieldSelections", + "GetObjectDimension", + "GetObjectField", + "GetObjectMeasure", + # File functions + "Attribute", + "ConnectString", + "FileBaseName", + "FileDir", + "FileExtension", + "FileName", + "FilePath", + "FileSize", + "FileTime", + "GetFolderPath", + "QvdCreateTime", + "QvdFieldName", + "QvdNoOfFields", + "QvdNoOfRecords", + "QvdTableName", + # Financial functions + "FV", + "nPer", + "Pmt", + "PV", + "Rate", + # Formatting functions + "ApplyCodepage", + "Date", + "Dual", + "Interval", + "Money", + "Num", + "Time", + "Timestamp", + # General numeric functions + "bitcount", + "div", + "fabs", + "fact", + "frac", + "sign", + # Combination and permutation functions + "combin", + "permut", + # Modulo functions + "fmod", + "mod", + # Parity functions + "even", + "odd", + # Rounding functions + "ceil", + "floor", + "round", + # Geospatial functions + "GeoAggrGeometry", + "GeoBoundingBox", + "GeoCountVertex", + "GeoInvProjectGeometry", + "GeoProjectGeometry", + "GeoReduceGeometry", + "GeoGetBoundingBox", + "GeoGetPolygonCenter", + "GeoMakePoint", + "GeoProject", + # Interpretation functions + "Date#", + "Interval#", + "Money#", + "Num#", + "Text", + "Time#", + "Timestamp#", + # Field functions + "FieldIndex", + "FieldValue", + "FieldValueCount", + # Inter-record functions in the data load script + "Exists", + "LookUp", + "Peek", + "Previous", + # Logical functions + "IsNum", + "IsText", + # Mapping functions + "ApplyMap", + "MapSubstring", + # Mathematical functions + "e", + "false", + "pi", + "rand", + "true", + # NULL functions + "EmptyIsNull", + "IsNull", + "Null", + # Basic range functions + "RangeMax", + "RangeMaxString", + "RangeMin", + "RangeMinString", + "RangeMode", + "RangeOnly", + "RangeSum", + # Counter range functions + "RangeCount", + "RangeMissingCount", + "RangeNullCount", + "RangeNumericCount", + "RangeTextCount", + # Statistical range functions + "RangeAvg", + "RangeCorrel", + "RangeFractile", + "RangeKurtosis", + "RangeSkew", + "RangeStdev", + # Financial range functions + "RangeIRR", + "RangeNPV", + "RangeXIRR", + "RangeXNPV", + # Statistical distribution + "CHIDIST", + "CHIINV", + "NORMDIST", + "NORMINV", + "TDIST", + "TINV", + "FDIST", + "FINV", + # String functions + "Capitalize", + "Chr", + "Evaluate", + "FindOneOf", + "Hash128", + "Hash160", + "Hash256", + "Index", + "KeepChar", + "Left", + "Len", + "LevenshteinDist", + "Lower", + "LTrim", + "Mid", + "Ord", + "PurgeChar", + "Repeat", + "Replace", + "Right", + "RTrim", + "SubField", + "SubStringCount", + "TextBetween", + "Trim", + "Upper", + # System functions + "Author", + "ClientPlatform", + "ComputerName", + "DocumentName", + "DocumentPath", + "DocumentTitle", + "EngineVersion", + "GetCollationLocale", + "GetObjectField", + "GetRegistryString", + "IsPartialReload", + "OSUser", + "ProductVersion", + "ReloadTime", + "StateName", + # Table functions + "FieldName", + "FieldNumber", + "NoOfFields", + "NoOfRows", + "NoOfTables", + "TableName", + "TableNumber", +] + +# System variables and constants +# see https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/Scripting/work-with-variables-in-data-load-editor.htm +CONSTANT_LIST = [ + # System Variables + "floppy", + "cd", + "include", + "must_include", + "hideprefix", + "hidesuffix", + "qvpath", + "qvroot", + "QvWorkPath", + "QvWorkRoot", + "StripComments", + "Verbatim", + "OpenUrlTimeout", + "WinPath", + "WinRoot", + "CollationLocale", + "CreateSearchIndexOnReload", + # value handling variables + "NullDisplay", + "NullInterpret", + "NullValue", + "OtherSymbol", + # Currency formatting + "MoneyDecimalSep", + "MoneyFormat", + "MoneyThousandSep", + # Number formatting + "DecimalSep", + "ThousandSep", + "NumericalAbbreviation", + # Time formatting + "DateFormat", + "TimeFormat", + "TimestampFormat", + "MonthNames", + "LongMonthNames", + "DayNames", + "LongDayNames", + "FirstWeekDay", + "BrokenWeeks", + "ReferenceDay", + "FirstMonthOfYear", + # Error variables + "errormode", + "scripterror", + "scripterrorcount", + "scripterrorlist", + # Other + "null", +] diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/_scilab_builtins.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/_scilab_builtins.py new file mode 100644 index 0000000000000000000000000000000000000000..af49b46a8e3f66d2c87b9f39fd86d1cf4fa1b8b8 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/_scilab_builtins.py @@ -0,0 +1,3093 @@ +""" + pygments.lexers._scilab_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Builtin list for the ScilabLexer. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +# Autogenerated + +commands_kw = ( + 'abort', + 'apropos', + 'break', + 'case', + 'catch', + 'continue', + 'do', + 'else', + 'elseif', + 'end', + 'endfunction', + 'for', + 'function', + 'help', + 'if', + 'pause', + 'quit', + 'select', + 'then', + 'try', + 'while', +) + +functions_kw = ( + '!!_invoke_', + '%H5Object_e', + '%H5Object_fieldnames', + '%H5Object_p', + '%XMLAttr_6', + '%XMLAttr_e', + '%XMLAttr_i_XMLElem', + '%XMLAttr_length', + '%XMLAttr_p', + '%XMLAttr_size', + '%XMLDoc_6', + '%XMLDoc_e', + '%XMLDoc_i_XMLList', + '%XMLDoc_p', + '%XMLElem_6', + '%XMLElem_e', + '%XMLElem_i_XMLDoc', + '%XMLElem_i_XMLElem', + '%XMLElem_i_XMLList', + '%XMLElem_p', + '%XMLList_6', + '%XMLList_e', + '%XMLList_i_XMLElem', + '%XMLList_i_XMLList', + '%XMLList_length', + '%XMLList_p', + '%XMLList_size', + '%XMLNs_6', + '%XMLNs_e', + '%XMLNs_i_XMLElem', + '%XMLNs_p', + '%XMLSet_6', + '%XMLSet_e', + '%XMLSet_length', + '%XMLSet_p', + '%XMLSet_size', + '%XMLValid_p', + '%_EClass_6', + '%_EClass_e', + '%_EClass_p', + '%_EObj_0', + '%_EObj_1__EObj', + '%_EObj_1_b', + '%_EObj_1_c', + '%_EObj_1_i', + '%_EObj_1_s', + '%_EObj_2__EObj', + '%_EObj_2_b', + '%_EObj_2_c', + '%_EObj_2_i', + '%_EObj_2_s', + '%_EObj_3__EObj', + '%_EObj_3_b', + '%_EObj_3_c', + '%_EObj_3_i', + '%_EObj_3_s', + '%_EObj_4__EObj', + '%_EObj_4_b', + '%_EObj_4_c', + '%_EObj_4_i', + '%_EObj_4_s', + '%_EObj_5', + '%_EObj_6', + '%_EObj_a__EObj', + '%_EObj_a_b', + '%_EObj_a_c', + '%_EObj_a_i', + '%_EObj_a_s', + '%_EObj_d__EObj', + '%_EObj_d_b', + '%_EObj_d_c', + '%_EObj_d_i', + '%_EObj_d_s', + '%_EObj_disp', + '%_EObj_e', + '%_EObj_g__EObj', + '%_EObj_g_b', + '%_EObj_g_c', + '%_EObj_g_i', + '%_EObj_g_s', + '%_EObj_h__EObj', + '%_EObj_h_b', + '%_EObj_h_c', + '%_EObj_h_i', + '%_EObj_h_s', + '%_EObj_i__EObj', + '%_EObj_j__EObj', + '%_EObj_j_b', + '%_EObj_j_c', + '%_EObj_j_i', + '%_EObj_j_s', + '%_EObj_k__EObj', + '%_EObj_k_b', + '%_EObj_k_c', + '%_EObj_k_i', + '%_EObj_k_s', + '%_EObj_l__EObj', + '%_EObj_l_b', + '%_EObj_l_c', + '%_EObj_l_i', + '%_EObj_l_s', + '%_EObj_m__EObj', + '%_EObj_m_b', + '%_EObj_m_c', + '%_EObj_m_i', + '%_EObj_m_s', + '%_EObj_n__EObj', + '%_EObj_n_b', + '%_EObj_n_c', + '%_EObj_n_i', + '%_EObj_n_s', + '%_EObj_o__EObj', + '%_EObj_o_b', + '%_EObj_o_c', + '%_EObj_o_i', + '%_EObj_o_s', + '%_EObj_p', + '%_EObj_p__EObj', + '%_EObj_p_b', + '%_EObj_p_c', + '%_EObj_p_i', + '%_EObj_p_s', + '%_EObj_q__EObj', + '%_EObj_q_b', + '%_EObj_q_c', + '%_EObj_q_i', + '%_EObj_q_s', + '%_EObj_r__EObj', + '%_EObj_r_b', + '%_EObj_r_c', + '%_EObj_r_i', + '%_EObj_r_s', + '%_EObj_s__EObj', + '%_EObj_s_b', + '%_EObj_s_c', + '%_EObj_s_i', + '%_EObj_s_s', + '%_EObj_t', + '%_EObj_x__EObj', + '%_EObj_x_b', + '%_EObj_x_c', + '%_EObj_x_i', + '%_EObj_x_s', + '%_EObj_y__EObj', + '%_EObj_y_b', + '%_EObj_y_c', + '%_EObj_y_i', + '%_EObj_y_s', + '%_EObj_z__EObj', + '%_EObj_z_b', + '%_EObj_z_c', + '%_EObj_z_i', + '%_EObj_z_s', + '%_eigs', + '%_load', + '%b_1__EObj', + '%b_2__EObj', + '%b_3__EObj', + '%b_4__EObj', + '%b_a__EObj', + '%b_d__EObj', + '%b_g__EObj', + '%b_h__EObj', + '%b_i_XMLList', + '%b_i__EObj', + '%b_j__EObj', + '%b_k__EObj', + '%b_l__EObj', + '%b_m__EObj', + '%b_n__EObj', + '%b_o__EObj', + '%b_p__EObj', + '%b_q__EObj', + '%b_r__EObj', + '%b_s__EObj', + '%b_x__EObj', + '%b_y__EObj', + '%b_z__EObj', + '%c_1__EObj', + '%c_2__EObj', + '%c_3__EObj', + '%c_4__EObj', + '%c_a__EObj', + '%c_d__EObj', + '%c_g__EObj', + '%c_h__EObj', + '%c_i_XMLAttr', + '%c_i_XMLDoc', + '%c_i_XMLElem', + '%c_i_XMLList', + '%c_i__EObj', + '%c_j__EObj', + '%c_k__EObj', + '%c_l__EObj', + '%c_m__EObj', + '%c_n__EObj', + '%c_o__EObj', + '%c_p__EObj', + '%c_q__EObj', + '%c_r__EObj', + '%c_s__EObj', + '%c_x__EObj', + '%c_y__EObj', + '%c_z__EObj', + '%ce_i_XMLList', + '%fptr_i_XMLList', + '%h_i_XMLList', + '%hm_i_XMLList', + '%i_1__EObj', + '%i_2__EObj', + '%i_3__EObj', + '%i_4__EObj', + '%i_a__EObj', + '%i_abs', + '%i_cumprod', + '%i_cumsum', + '%i_d__EObj', + '%i_diag', + '%i_g__EObj', + '%i_h__EObj', + '%i_i_XMLList', + '%i_i__EObj', + '%i_j__EObj', + '%i_k__EObj', + '%i_l__EObj', + '%i_m__EObj', + '%i_matrix', + '%i_max', + '%i_maxi', + '%i_min', + '%i_mini', + '%i_mput', + '%i_n__EObj', + '%i_o__EObj', + '%i_p', + '%i_p__EObj', + '%i_prod', + '%i_q__EObj', + '%i_r__EObj', + '%i_s__EObj', + '%i_sum', + '%i_tril', + '%i_triu', + '%i_x__EObj', + '%i_y__EObj', + '%i_z__EObj', + '%ip_i_XMLList', + '%l_i_XMLList', + '%l_i__EObj', + '%lss_i_XMLList', + '%mc_i_XMLList', + '%msp_full', + '%msp_i_XMLList', + '%msp_spget', + '%p_i_XMLList', + '%ptr_i_XMLList', + '%r_i_XMLList', + '%s_1__EObj', + '%s_2__EObj', + '%s_3__EObj', + '%s_4__EObj', + '%s_a__EObj', + '%s_d__EObj', + '%s_g__EObj', + '%s_h__EObj', + '%s_i_XMLList', + '%s_i__EObj', + '%s_j__EObj', + '%s_k__EObj', + '%s_l__EObj', + '%s_m__EObj', + '%s_n__EObj', + '%s_o__EObj', + '%s_p__EObj', + '%s_q__EObj', + '%s_r__EObj', + '%s_s__EObj', + '%s_x__EObj', + '%s_y__EObj', + '%s_z__EObj', + '%sp_i_XMLList', + '%spb_i_XMLList', + '%st_i_XMLList', + 'Calendar', + 'ClipBoard', + 'Matplot', + 'Matplot1', + 'PlaySound', + 'TCL_DeleteInterp', + 'TCL_DoOneEvent', + 'TCL_EvalFile', + 'TCL_EvalStr', + 'TCL_ExistArray', + 'TCL_ExistInterp', + 'TCL_ExistVar', + 'TCL_GetVar', + 'TCL_GetVersion', + 'TCL_SetVar', + 'TCL_UnsetVar', + 'TCL_UpVar', + '_', + '_code2str', + '_d', + '_str2code', + 'about', + 'abs', + 'acos', + 'addModulePreferences', + 'addcolor', + 'addf', + 'addhistory', + 'addinter', + 'addlocalizationdomain', + 'amell', + 'and', + 'argn', + 'arl2_ius', + 'ascii', + 'asin', + 'atan', + 'backslash', + 'balanc', + 'banner', + 'base2dec', + 'basename', + 'bdiag', + 'beep', + 'besselh', + 'besseli', + 'besselj', + 'besselk', + 'bessely', + 'beta', + 'bezout', + 'bfinit', + 'blkfc1i', + 'blkslvi', + 'bool2s', + 'browsehistory', + 'browsevar', + 'bsplin3val', + 'buildDoc', + 'buildouttb', + 'bvode', + 'c_link', + 'call', + 'callblk', + 'captions', + 'cd', + 'cdfbet', + 'cdfbin', + 'cdfchi', + 'cdfchn', + 'cdff', + 'cdffnc', + 'cdfgam', + 'cdfnbn', + 'cdfnor', + 'cdfpoi', + 'cdft', + 'ceil', + 'champ', + 'champ1', + 'chdir', + 'chol', + 'clc', + 'clean', + 'clear', + 'clearfun', + 'clearglobal', + 'closeEditor', + 'closeEditvar', + 'closeXcos', + 'code2str', + 'coeff', + 'color', + 'comp', + 'completion', + 'conj', + 'contour2di', + 'contr', + 'conv2', + 'convstr', + 'copy', + 'copyfile', + 'corr', + 'cos', + 'coserror', + 'createdir', + 'cshep2d', + 'csvDefault', + 'csvIsnum', + 'csvRead', + 'csvStringToDouble', + 'csvTextScan', + 'csvWrite', + 'ctree2', + 'ctree3', + 'ctree4', + 'cumprod', + 'cumsum', + 'curblock', + 'curblockc', + 'daskr', + 'dasrt', + 'dassl', + 'data2sig', + 'datatipCreate', + 'datatipManagerMode', + 'datatipMove', + 'datatipRemove', + 'datatipSetDisplay', + 'datatipSetInterp', + 'datatipSetOrientation', + 'datatipSetStyle', + 'datatipToggle', + 'dawson', + 'dct', + 'debug', + 'dec2base', + 'deff', + 'definedfields', + 'degree', + 'delbpt', + 'delete', + 'deletefile', + 'delip', + 'delmenu', + 'det', + 'dgettext', + 'dhinf', + 'diag', + 'diary', + 'diffobjs', + 'disp', + 'dispbpt', + 'displayhistory', + 'disposefftwlibrary', + 'dlgamma', + 'dnaupd', + 'dneupd', + 'double', + 'drawaxis', + 'drawlater', + 'drawnow', + 'driver', + 'dsaupd', + 'dsearch', + 'dseupd', + 'dst', + 'duplicate', + 'editvar', + 'emptystr', + 'end_scicosim', + 'ereduc', + 'erf', + 'erfc', + 'erfcx', + 'erfi', + 'errcatch', + 'errclear', + 'error', + 'eval_cshep2d', + 'exec', + 'execstr', + 'exists', + 'exit', + 'exp', + 'expm', + 'exportUI', + 'export_to_hdf5', + 'eye', + 'fadj2sp', + 'fec', + 'feval', + 'fft', + 'fftw', + 'fftw_flags', + 'fftw_forget_wisdom', + 'fftwlibraryisloaded', + 'figure', + 'file', + 'filebrowser', + 'fileext', + 'fileinfo', + 'fileparts', + 'filesep', + 'find', + 'findBD', + 'findfiles', + 'fire_closing_finished', + 'floor', + 'format', + 'fort', + 'fprintfMat', + 'freq', + 'frexp', + 'fromc', + 'fromjava', + 'fscanfMat', + 'fsolve', + 'fstair', + 'full', + 'fullpath', + 'funcprot', + 'funptr', + 'gamma', + 'gammaln', + 'geom3d', + 'get', + 'getURL', + 'get_absolute_file_path', + 'get_fftw_wisdom', + 'getblocklabel', + 'getcallbackobject', + 'getdate', + 'getdebuginfo', + 'getdefaultlanguage', + 'getdrives', + 'getdynlibext', + 'getenv', + 'getfield', + 'gethistory', + 'gethistoryfile', + 'getinstalledlookandfeels', + 'getio', + 'getlanguage', + 'getlongpathname', + 'getlookandfeel', + 'getmd5', + 'getmemory', + 'getmodules', + 'getos', + 'getpid', + 'getrelativefilename', + 'getscicosvars', + 'getscilabmode', + 'getshortpathname', + 'gettext', + 'getvariablesonstack', + 'getversion', + 'glist', + 'global', + 'glue', + 'grand', + 'graphicfunction', + 'grayplot', + 'grep', + 'gsort', + 'gstacksize', + 'h5attr', + 'h5close', + 'h5cp', + 'h5dataset', + 'h5dump', + 'h5exists', + 'h5flush', + 'h5get', + 'h5group', + 'h5isArray', + 'h5isAttr', + 'h5isCompound', + 'h5isFile', + 'h5isGroup', + 'h5isList', + 'h5isRef', + 'h5isSet', + 'h5isSpace', + 'h5isType', + 'h5isVlen', + 'h5label', + 'h5ln', + 'h5ls', + 'h5mount', + 'h5mv', + 'h5open', + 'h5read', + 'h5readattr', + 'h5rm', + 'h5umount', + 'h5write', + 'h5writeattr', + 'havewindow', + 'helpbrowser', + 'hess', + 'hinf', + 'historymanager', + 'historysize', + 'host', + 'htmlDump', + 'htmlRead', + 'htmlReadStr', + 'htmlWrite', + 'iconvert', + 'ieee', + 'ilib_verbose', + 'imag', + 'impl', + 'import_from_hdf5', + 'imult', + 'inpnvi', + 'int', + 'int16', + 'int2d', + 'int32', + 'int3d', + 'int8', + 'interp', + 'interp2d', + 'interp3d', + 'intg', + 'intppty', + 'inttype', + 'inv', + 'invoke_lu', + 'is_handle_valid', + 'is_hdf5_file', + 'isalphanum', + 'isascii', + 'isdef', + 'isdigit', + 'isdir', + 'isequal', + 'isequalbitwise', + 'iserror', + 'isfile', + 'isglobal', + 'isletter', + 'isnum', + 'isreal', + 'iswaitingforinput', + 'jallowClassReloading', + 'jarray', + 'jautoTranspose', + 'jautoUnwrap', + 'javaclasspath', + 'javalibrarypath', + 'jcast', + 'jcompile', + 'jconvMatrixMethod', + 'jcreatejar', + 'jdeff', + 'jdisableTrace', + 'jenableTrace', + 'jexists', + 'jgetclassname', + 'jgetfield', + 'jgetfields', + 'jgetinfo', + 'jgetmethods', + 'jimport', + 'jinvoke', + 'jinvoke_db', + 'jnewInstance', + 'jremove', + 'jsetfield', + 'junwrap', + 'junwraprem', + 'jwrap', + 'jwrapinfloat', + 'kron', + 'lasterror', + 'ldiv', + 'ldivf', + 'legendre', + 'length', + 'lib', + 'librarieslist', + 'libraryinfo', + 'light', + 'linear_interpn', + 'lines', + 'link', + 'linmeq', + 'list', + 'listvar_in_hdf5', + 'load', + 'loadGui', + 'loadScicos', + 'loadXcos', + 'loadfftwlibrary', + 'loadhistory', + 'log', + 'log1p', + 'lsq', + 'lsq_splin', + 'lsqrsolve', + 'lsslist', + 'lstcat', + 'lstsize', + 'ltitr', + 'lu', + 'ludel', + 'lufact', + 'luget', + 'lusolve', + 'macr2lst', + 'macr2tree', + 'matfile_close', + 'matfile_listvar', + 'matfile_open', + 'matfile_varreadnext', + 'matfile_varwrite', + 'matrix', + 'max', + 'maxfiles', + 'mclearerr', + 'mclose', + 'meof', + 'merror', + 'messagebox', + 'mfprintf', + 'mfscanf', + 'mget', + 'mgeti', + 'mgetl', + 'mgetstr', + 'min', + 'mlist', + 'mode', + 'model2blk', + 'mopen', + 'move', + 'movefile', + 'mprintf', + 'mput', + 'mputl', + 'mputstr', + 'mscanf', + 'mseek', + 'msprintf', + 'msscanf', + 'mtell', + 'mtlb_mode', + 'mtlb_sparse', + 'mucomp', + 'mulf', + 'name2rgb', + 'nearfloat', + 'newaxes', + 'newest', + 'newfun', + 'nnz', + 'norm', + 'notify', + 'number_properties', + 'ode', + 'odedc', + 'ones', + 'openged', + 'opentk', + 'optim', + 'or', + 'ordmmd', + 'parallel_concurrency', + 'parallel_run', + 'param3d', + 'param3d1', + 'part', + 'pathconvert', + 'pathsep', + 'phase_simulation', + 'plot2d', + 'plot2d1', + 'plot2d2', + 'plot2d3', + 'plot2d4', + 'plot3d', + 'plot3d1', + 'plotbrowser', + 'pointer_xproperty', + 'poly', + 'ppol', + 'pppdiv', + 'predef', + 'preferences', + 'print', + 'printf', + 'printfigure', + 'printsetupbox', + 'prod', + 'progressionbar', + 'prompt', + 'pwd', + 'qld', + 'qp_solve', + 'qr', + 'raise_window', + 'rand', + 'rankqr', + 'rat', + 'rcond', + 'rdivf', + 'read', + 'read4b', + 'read_csv', + 'readb', + 'readgateway', + 'readmps', + 'real', + 'realtime', + 'realtimeinit', + 'regexp', + 'relocate_handle', + 'remez', + 'removeModulePreferences', + 'removedir', + 'removelinehistory', + 'res_with_prec', + 'resethistory', + 'residu', + 'resume', + 'return', + 'ricc', + 'rlist', + 'roots', + 'rotate_axes', + 'round', + 'rpem', + 'rtitr', + 'rubberbox', + 'save', + 'saveGui', + 'saveafterncommands', + 'saveconsecutivecommands', + 'savehistory', + 'schur', + 'sci_haltscicos', + 'sci_tree2', + 'sci_tree3', + 'sci_tree4', + 'sciargs', + 'scicos_debug', + 'scicos_debug_count', + 'scicos_time', + 'scicosim', + 'scinotes', + 'sctree', + 'semidef', + 'set', + 'set_blockerror', + 'set_fftw_wisdom', + 'set_xproperty', + 'setbpt', + 'setdefaultlanguage', + 'setenv', + 'setfield', + 'sethistoryfile', + 'setlanguage', + 'setlookandfeel', + 'setmenu', + 'sfact', + 'sfinit', + 'show_window', + 'sident', + 'sig2data', + 'sign', + 'simp', + 'simp_mode', + 'sin', + 'size', + 'slash', + 'sleep', + 'sorder', + 'sparse', + 'spchol', + 'spcompack', + 'spec', + 'spget', + 'splin', + 'splin2d', + 'splin3d', + 'splitURL', + 'spones', + 'sprintf', + 'sqrt', + 'stacksize', + 'str2code', + 'strcat', + 'strchr', + 'strcmp', + 'strcspn', + 'strindex', + 'string', + 'stringbox', + 'stripblanks', + 'strncpy', + 'strrchr', + 'strrev', + 'strsplit', + 'strspn', + 'strstr', + 'strsubst', + 'strtod', + 'strtok', + 'subf', + 'sum', + 'svd', + 'swap_handles', + 'symfcti', + 'syredi', + 'system_getproperty', + 'system_setproperty', + 'ta2lpd', + 'tan', + 'taucs_chdel', + 'taucs_chfact', + 'taucs_chget', + 'taucs_chinfo', + 'taucs_chsolve', + 'tempname', + 'testmatrix', + 'timer', + 'tlist', + 'tohome', + 'tokens', + 'toolbar', + 'toprint', + 'tr_zer', + 'tril', + 'triu', + 'type', + 'typename', + 'uiDisplayTree', + 'uicontextmenu', + 'uicontrol', + 'uigetcolor', + 'uigetdir', + 'uigetfile', + 'uigetfont', + 'uimenu', + 'uint16', + 'uint32', + 'uint8', + 'uipopup', + 'uiputfile', + 'uiwait', + 'ulink', + 'umf_ludel', + 'umf_lufact', + 'umf_luget', + 'umf_luinfo', + 'umf_lusolve', + 'umfpack', + 'unglue', + 'unix', + 'unsetmenu', + 'unzoom', + 'updatebrowsevar', + 'usecanvas', + 'useeditor', + 'user', + 'var2vec', + 'varn', + 'vec2var', + 'waitbar', + 'warnBlockByUID', + 'warning', + 'what', + 'where', + 'whereis', + 'who', + 'winsid', + 'with_module', + 'writb', + 'write', + 'write4b', + 'write_csv', + 'x_choose', + 'x_choose_modeless', + 'x_dialog', + 'x_mdialog', + 'xarc', + 'xarcs', + 'xarrows', + 'xchange', + 'xchoicesi', + 'xclick', + 'xcos', + 'xcosAddToolsMenu', + 'xcosConfigureXmlFile', + 'xcosDiagramToScilab', + 'xcosPalCategoryAdd', + 'xcosPalDelete', + 'xcosPalDisable', + 'xcosPalEnable', + 'xcosPalGenerateIcon', + 'xcosPalGet', + 'xcosPalLoad', + 'xcosPalMove', + 'xcosSimulationStarted', + 'xcosUpdateBlock', + 'xdel', + 'xend', + 'xfarc', + 'xfarcs', + 'xfpoly', + 'xfpolys', + 'xfrect', + 'xget', + 'xgetmouse', + 'xgraduate', + 'xgrid', + 'xinit', + 'xlfont', + 'xls_open', + 'xls_read', + 'xmlAddNs', + 'xmlAppend', + 'xmlAsNumber', + 'xmlAsText', + 'xmlDTD', + 'xmlDelete', + 'xmlDocument', + 'xmlDump', + 'xmlElement', + 'xmlFormat', + 'xmlGetNsByHref', + 'xmlGetNsByPrefix', + 'xmlGetOpenDocs', + 'xmlIsValidObject', + 'xmlName', + 'xmlNs', + 'xmlRead', + 'xmlReadStr', + 'xmlRelaxNG', + 'xmlRemove', + 'xmlSchema', + 'xmlSetAttributes', + 'xmlValidate', + 'xmlWrite', + 'xmlXPath', + 'xname', + 'xpause', + 'xpoly', + 'xpolys', + 'xrect', + 'xrects', + 'xs2bmp', + 'xs2emf', + 'xs2eps', + 'xs2gif', + 'xs2jpg', + 'xs2pdf', + 'xs2png', + 'xs2ppm', + 'xs2ps', + 'xs2svg', + 'xsegs', + 'xset', + 'xstring', + 'xstringb', + 'xtitle', + 'zeros', + 'znaupd', + 'zneupd', + 'zoom_rect', +) + +macros_kw = ( + '!_deff_wrapper', + '%0_i_st', + '%3d_i_h', + '%Block_xcosUpdateBlock', + '%TNELDER_p', + '%TNELDER_string', + '%TNMPLOT_p', + '%TNMPLOT_string', + '%TOPTIM_p', + '%TOPTIM_string', + '%TSIMPLEX_p', + '%TSIMPLEX_string', + '%_EVoid_p', + '%_gsort', + '%_listvarinfile', + '%_rlist', + '%_save', + '%_sodload', + '%_strsplit', + '%_unwrap', + '%ar_p', + '%asn', + '%b_a_b', + '%b_a_s', + '%b_c_s', + '%b_c_spb', + '%b_cumprod', + '%b_cumsum', + '%b_d_s', + '%b_diag', + '%b_e', + '%b_f_s', + '%b_f_spb', + '%b_g_s', + '%b_g_spb', + '%b_grand', + '%b_h_s', + '%b_h_spb', + '%b_i_b', + '%b_i_ce', + '%b_i_h', + '%b_i_hm', + '%b_i_s', + '%b_i_sp', + '%b_i_spb', + '%b_i_st', + '%b_iconvert', + '%b_l_b', + '%b_l_s', + '%b_m_b', + '%b_m_s', + '%b_matrix', + '%b_n_hm', + '%b_o_hm', + '%b_p_s', + '%b_prod', + '%b_r_b', + '%b_r_s', + '%b_s_b', + '%b_s_s', + '%b_string', + '%b_sum', + '%b_tril', + '%b_triu', + '%b_x_b', + '%b_x_s', + '%bicg', + '%bicgstab', + '%c_a_c', + '%c_b_c', + '%c_b_s', + '%c_diag', + '%c_dsearch', + '%c_e', + '%c_eye', + '%c_f_s', + '%c_grand', + '%c_i_c', + '%c_i_ce', + '%c_i_h', + '%c_i_hm', + '%c_i_lss', + '%c_i_r', + '%c_i_s', + '%c_i_st', + '%c_matrix', + '%c_n_l', + '%c_n_st', + '%c_o_l', + '%c_o_st', + '%c_ones', + '%c_rand', + '%c_tril', + '%c_triu', + '%cblock_c_cblock', + '%cblock_c_s', + '%cblock_e', + '%cblock_f_cblock', + '%cblock_p', + '%cblock_size', + '%ce_6', + '%ce_c_ce', + '%ce_e', + '%ce_f_ce', + '%ce_i_ce', + '%ce_i_s', + '%ce_i_st', + '%ce_matrix', + '%ce_p', + '%ce_size', + '%ce_string', + '%ce_t', + '%cgs', + '%champdat_i_h', + '%choose', + '%diagram_xcos', + '%dir_p', + '%fptr_i_st', + '%grand_perm', + '%grayplot_i_h', + '%h_i_st', + '%hmS_k_hmS_generic', + '%hm_1_hm', + '%hm_1_s', + '%hm_2_hm', + '%hm_2_s', + '%hm_3_hm', + '%hm_3_s', + '%hm_4_hm', + '%hm_4_s', + '%hm_5', + '%hm_a_hm', + '%hm_a_r', + '%hm_a_s', + '%hm_abs', + '%hm_and', + '%hm_bool2s', + '%hm_c_hm', + '%hm_ceil', + '%hm_conj', + '%hm_cos', + '%hm_cumprod', + '%hm_cumsum', + '%hm_d_hm', + '%hm_d_s', + '%hm_degree', + '%hm_dsearch', + '%hm_e', + '%hm_exp', + '%hm_eye', + '%hm_f_hm', + '%hm_find', + '%hm_floor', + '%hm_g_hm', + '%hm_grand', + '%hm_gsort', + '%hm_h_hm', + '%hm_i_b', + '%hm_i_ce', + '%hm_i_h', + '%hm_i_hm', + '%hm_i_i', + '%hm_i_p', + '%hm_i_r', + '%hm_i_s', + '%hm_i_st', + '%hm_iconvert', + '%hm_imag', + '%hm_int', + '%hm_isnan', + '%hm_isreal', + '%hm_j_hm', + '%hm_j_s', + '%hm_k_hm', + '%hm_k_s', + '%hm_log', + '%hm_m_p', + '%hm_m_r', + '%hm_m_s', + '%hm_matrix', + '%hm_max', + '%hm_mean', + '%hm_median', + '%hm_min', + '%hm_n_b', + '%hm_n_c', + '%hm_n_hm', + '%hm_n_i', + '%hm_n_p', + '%hm_n_s', + '%hm_o_b', + '%hm_o_c', + '%hm_o_hm', + '%hm_o_i', + '%hm_o_p', + '%hm_o_s', + '%hm_ones', + '%hm_or', + '%hm_p', + '%hm_prod', + '%hm_q_hm', + '%hm_r_s', + '%hm_rand', + '%hm_real', + '%hm_round', + '%hm_s', + '%hm_s_hm', + '%hm_s_r', + '%hm_s_s', + '%hm_sign', + '%hm_sin', + '%hm_size', + '%hm_sqrt', + '%hm_stdev', + '%hm_string', + '%hm_sum', + '%hm_x_hm', + '%hm_x_p', + '%hm_x_s', + '%hm_zeros', + '%i_1_s', + '%i_2_s', + '%i_3_s', + '%i_4_s', + '%i_Matplot', + '%i_a_i', + '%i_a_s', + '%i_and', + '%i_ascii', + '%i_b_s', + '%i_bezout', + '%i_champ', + '%i_champ1', + '%i_contour', + '%i_contour2d', + '%i_d_i', + '%i_d_s', + '%i_dsearch', + '%i_e', + '%i_fft', + '%i_g_i', + '%i_gcd', + '%i_grand', + '%i_h_i', + '%i_i_ce', + '%i_i_h', + '%i_i_hm', + '%i_i_i', + '%i_i_s', + '%i_i_st', + '%i_j_i', + '%i_j_s', + '%i_l_s', + '%i_lcm', + '%i_length', + '%i_m_i', + '%i_m_s', + '%i_mfprintf', + '%i_mprintf', + '%i_msprintf', + '%i_n_s', + '%i_o_s', + '%i_or', + '%i_p_i', + '%i_p_s', + '%i_plot2d', + '%i_plot2d1', + '%i_plot2d2', + '%i_q_s', + '%i_r_i', + '%i_r_s', + '%i_round', + '%i_s_i', + '%i_s_s', + '%i_sign', + '%i_string', + '%i_x_i', + '%i_x_s', + '%ip_a_s', + '%ip_i_st', + '%ip_m_s', + '%ip_n_ip', + '%ip_o_ip', + '%ip_p', + '%ip_part', + '%ip_s_s', + '%ip_string', + '%k', + '%l_i_h', + '%l_i_s', + '%l_i_st', + '%l_isequal', + '%l_n_c', + '%l_n_l', + '%l_n_m', + '%l_n_p', + '%l_n_s', + '%l_n_st', + '%l_o_c', + '%l_o_l', + '%l_o_m', + '%l_o_p', + '%l_o_s', + '%l_o_st', + '%lss_a_lss', + '%lss_a_p', + '%lss_a_r', + '%lss_a_s', + '%lss_c_lss', + '%lss_c_p', + '%lss_c_r', + '%lss_c_s', + '%lss_e', + '%lss_eye', + '%lss_f_lss', + '%lss_f_p', + '%lss_f_r', + '%lss_f_s', + '%lss_i_ce', + '%lss_i_lss', + '%lss_i_p', + '%lss_i_r', + '%lss_i_s', + '%lss_i_st', + '%lss_inv', + '%lss_l_lss', + '%lss_l_p', + '%lss_l_r', + '%lss_l_s', + '%lss_m_lss', + '%lss_m_p', + '%lss_m_r', + '%lss_m_s', + '%lss_n_lss', + '%lss_n_p', + '%lss_n_r', + '%lss_n_s', + '%lss_norm', + '%lss_o_lss', + '%lss_o_p', + '%lss_o_r', + '%lss_o_s', + '%lss_ones', + '%lss_r_lss', + '%lss_r_p', + '%lss_r_r', + '%lss_r_s', + '%lss_rand', + '%lss_s', + '%lss_s_lss', + '%lss_s_p', + '%lss_s_r', + '%lss_s_s', + '%lss_size', + '%lss_t', + '%lss_v_lss', + '%lss_v_p', + '%lss_v_r', + '%lss_v_s', + '%lt_i_s', + '%m_n_l', + '%m_o_l', + '%mc_i_h', + '%mc_i_s', + '%mc_i_st', + '%mc_n_st', + '%mc_o_st', + '%mc_string', + '%mps_p', + '%mps_string', + '%msp_a_s', + '%msp_abs', + '%msp_e', + '%msp_find', + '%msp_i_s', + '%msp_i_st', + '%msp_length', + '%msp_m_s', + '%msp_maxi', + '%msp_n_msp', + '%msp_nnz', + '%msp_o_msp', + '%msp_p', + '%msp_sparse', + '%msp_spones', + '%msp_t', + '%p_a_lss', + '%p_a_r', + '%p_c_lss', + '%p_c_r', + '%p_cumprod', + '%p_cumsum', + '%p_d_p', + '%p_d_r', + '%p_d_s', + '%p_det', + '%p_e', + '%p_f_lss', + '%p_f_r', + '%p_grand', + '%p_i_ce', + '%p_i_h', + '%p_i_hm', + '%p_i_lss', + '%p_i_p', + '%p_i_r', + '%p_i_s', + '%p_i_st', + '%p_inv', + '%p_j_s', + '%p_k_p', + '%p_k_r', + '%p_k_s', + '%p_l_lss', + '%p_l_p', + '%p_l_r', + '%p_l_s', + '%p_m_hm', + '%p_m_lss', + '%p_m_r', + '%p_matrix', + '%p_n_l', + '%p_n_lss', + '%p_n_r', + '%p_o_l', + '%p_o_lss', + '%p_o_r', + '%p_o_sp', + '%p_p_s', + '%p_part', + '%p_prod', + '%p_q_p', + '%p_q_r', + '%p_q_s', + '%p_r_lss', + '%p_r_p', + '%p_r_r', + '%p_r_s', + '%p_s_lss', + '%p_s_r', + '%p_simp', + '%p_string', + '%p_sum', + '%p_v_lss', + '%p_v_p', + '%p_v_r', + '%p_v_s', + '%p_x_hm', + '%p_x_r', + '%p_y_p', + '%p_y_r', + '%p_y_s', + '%p_z_p', + '%p_z_r', + '%p_z_s', + '%pcg', + '%plist_p', + '%plist_string', + '%r_0', + '%r_a_hm', + '%r_a_lss', + '%r_a_p', + '%r_a_r', + '%r_a_s', + '%r_c_lss', + '%r_c_p', + '%r_c_r', + '%r_c_s', + '%r_clean', + '%r_cumprod', + '%r_cumsum', + '%r_d_p', + '%r_d_r', + '%r_d_s', + '%r_det', + '%r_diag', + '%r_e', + '%r_eye', + '%r_f_lss', + '%r_f_p', + '%r_f_r', + '%r_f_s', + '%r_i_ce', + '%r_i_hm', + '%r_i_lss', + '%r_i_p', + '%r_i_r', + '%r_i_s', + '%r_i_st', + '%r_inv', + '%r_j_s', + '%r_k_p', + '%r_k_r', + '%r_k_s', + '%r_l_lss', + '%r_l_p', + '%r_l_r', + '%r_l_s', + '%r_m_hm', + '%r_m_lss', + '%r_m_p', + '%r_m_r', + '%r_m_s', + '%r_matrix', + '%r_n_lss', + '%r_n_p', + '%r_n_r', + '%r_n_s', + '%r_norm', + '%r_o_lss', + '%r_o_p', + '%r_o_r', + '%r_o_s', + '%r_ones', + '%r_p', + '%r_p_s', + '%r_prod', + '%r_q_p', + '%r_q_r', + '%r_q_s', + '%r_r_lss', + '%r_r_p', + '%r_r_r', + '%r_r_s', + '%r_rand', + '%r_s', + '%r_s_hm', + '%r_s_lss', + '%r_s_p', + '%r_s_r', + '%r_s_s', + '%r_simp', + '%r_size', + '%r_string', + '%r_sum', + '%r_t', + '%r_tril', + '%r_triu', + '%r_v_lss', + '%r_v_p', + '%r_v_r', + '%r_v_s', + '%r_varn', + '%r_x_p', + '%r_x_r', + '%r_x_s', + '%r_y_p', + '%r_y_r', + '%r_y_s', + '%r_z_p', + '%r_z_r', + '%r_z_s', + '%s_1_hm', + '%s_1_i', + '%s_2_hm', + '%s_2_i', + '%s_3_hm', + '%s_3_i', + '%s_4_hm', + '%s_4_i', + '%s_5', + '%s_a_b', + '%s_a_hm', + '%s_a_i', + '%s_a_ip', + '%s_a_lss', + '%s_a_msp', + '%s_a_r', + '%s_a_sp', + '%s_and', + '%s_b_i', + '%s_b_s', + '%s_bezout', + '%s_c_b', + '%s_c_cblock', + '%s_c_lss', + '%s_c_r', + '%s_c_sp', + '%s_d_b', + '%s_d_i', + '%s_d_p', + '%s_d_r', + '%s_d_sp', + '%s_e', + '%s_f_b', + '%s_f_cblock', + '%s_f_lss', + '%s_f_r', + '%s_f_sp', + '%s_g_b', + '%s_g_s', + '%s_gcd', + '%s_grand', + '%s_h_b', + '%s_h_s', + '%s_i_b', + '%s_i_c', + '%s_i_ce', + '%s_i_h', + '%s_i_hm', + '%s_i_i', + '%s_i_lss', + '%s_i_p', + '%s_i_r', + '%s_i_s', + '%s_i_sp', + '%s_i_spb', + '%s_i_st', + '%s_j_i', + '%s_k_hm', + '%s_k_p', + '%s_k_r', + '%s_k_sp', + '%s_l_b', + '%s_l_hm', + '%s_l_i', + '%s_l_lss', + '%s_l_p', + '%s_l_r', + '%s_l_s', + '%s_l_sp', + '%s_lcm', + '%s_m_b', + '%s_m_hm', + '%s_m_i', + '%s_m_ip', + '%s_m_lss', + '%s_m_msp', + '%s_m_r', + '%s_matrix', + '%s_n_hm', + '%s_n_i', + '%s_n_l', + '%s_n_lss', + '%s_n_r', + '%s_n_st', + '%s_o_hm', + '%s_o_i', + '%s_o_l', + '%s_o_lss', + '%s_o_r', + '%s_o_st', + '%s_or', + '%s_p_b', + '%s_p_i', + '%s_pow', + '%s_q_hm', + '%s_q_i', + '%s_q_p', + '%s_q_r', + '%s_q_sp', + '%s_r_b', + '%s_r_i', + '%s_r_lss', + '%s_r_p', + '%s_r_r', + '%s_r_s', + '%s_r_sp', + '%s_s_b', + '%s_s_hm', + '%s_s_i', + '%s_s_ip', + '%s_s_lss', + '%s_s_r', + '%s_s_sp', + '%s_simp', + '%s_v_lss', + '%s_v_p', + '%s_v_r', + '%s_v_s', + '%s_x_b', + '%s_x_hm', + '%s_x_i', + '%s_x_r', + '%s_y_p', + '%s_y_r', + '%s_y_sp', + '%s_z_p', + '%s_z_r', + '%s_z_sp', + '%sn', + '%sp_a_s', + '%sp_a_sp', + '%sp_and', + '%sp_c_s', + '%sp_ceil', + '%sp_conj', + '%sp_cos', + '%sp_cumprod', + '%sp_cumsum', + '%sp_d_s', + '%sp_d_sp', + '%sp_det', + '%sp_diag', + '%sp_e', + '%sp_exp', + '%sp_f_s', + '%sp_floor', + '%sp_grand', + '%sp_gsort', + '%sp_i_ce', + '%sp_i_h', + '%sp_i_s', + '%sp_i_sp', + '%sp_i_st', + '%sp_int', + '%sp_inv', + '%sp_k_s', + '%sp_k_sp', + '%sp_l_s', + '%sp_l_sp', + '%sp_length', + '%sp_max', + '%sp_min', + '%sp_norm', + '%sp_or', + '%sp_p_s', + '%sp_prod', + '%sp_q_s', + '%sp_q_sp', + '%sp_r_s', + '%sp_r_sp', + '%sp_round', + '%sp_s_s', + '%sp_s_sp', + '%sp_sin', + '%sp_sqrt', + '%sp_string', + '%sp_sum', + '%sp_tril', + '%sp_triu', + '%sp_y_s', + '%sp_y_sp', + '%sp_z_s', + '%sp_z_sp', + '%spb_and', + '%spb_c_b', + '%spb_cumprod', + '%spb_cumsum', + '%spb_diag', + '%spb_e', + '%spb_f_b', + '%spb_g_b', + '%spb_g_spb', + '%spb_h_b', + '%spb_h_spb', + '%spb_i_b', + '%spb_i_ce', + '%spb_i_h', + '%spb_i_st', + '%spb_or', + '%spb_prod', + '%spb_sum', + '%spb_tril', + '%spb_triu', + '%st_6', + '%st_c_st', + '%st_e', + '%st_f_st', + '%st_i_b', + '%st_i_c', + '%st_i_fptr', + '%st_i_h', + '%st_i_i', + '%st_i_ip', + '%st_i_lss', + '%st_i_msp', + '%st_i_p', + '%st_i_r', + '%st_i_s', + '%st_i_sp', + '%st_i_spb', + '%st_i_st', + '%st_matrix', + '%st_n_c', + '%st_n_l', + '%st_n_mc', + '%st_n_p', + '%st_n_s', + '%st_o_c', + '%st_o_l', + '%st_o_mc', + '%st_o_p', + '%st_o_s', + '%st_o_tl', + '%st_p', + '%st_size', + '%st_string', + '%st_t', + '%ticks_i_h', + '%xls_e', + '%xls_p', + '%xlssheet_e', + '%xlssheet_p', + '%xlssheet_size', + '%xlssheet_string', + 'DominationRank', + 'G_make', + 'IsAScalar', + 'NDcost', + 'OS_Version', + 'PlotSparse', + 'ReadHBSparse', + 'TCL_CreateSlave', + 'abcd', + 'abinv', + 'accept_func_default', + 'accept_func_vfsa', + 'acf', + 'acosd', + 'acosh', + 'acoshm', + 'acosm', + 'acot', + 'acotd', + 'acoth', + 'acsc', + 'acscd', + 'acsch', + 'add_demo', + 'add_help_chapter', + 'add_module_help_chapter', + 'add_param', + 'add_profiling', + 'adj2sp', + 'aff2ab', + 'ana_style', + 'analpf', + 'analyze', + 'aplat', + 'arhnk', + 'arl2', + 'arma2p', + 'arma2ss', + 'armac', + 'armax', + 'armax1', + 'arobasestring2strings', + 'arsimul', + 'ascii2string', + 'asciimat', + 'asec', + 'asecd', + 'asech', + 'asind', + 'asinh', + 'asinhm', + 'asinm', + 'assert_checkalmostequal', + 'assert_checkequal', + 'assert_checkerror', + 'assert_checkfalse', + 'assert_checkfilesequal', + 'assert_checktrue', + 'assert_comparecomplex', + 'assert_computedigits', + 'assert_cond2reltol', + 'assert_cond2reqdigits', + 'assert_generror', + 'atand', + 'atanh', + 'atanhm', + 'atanm', + 'atomsAutoload', + 'atomsAutoloadAdd', + 'atomsAutoloadDel', + 'atomsAutoloadList', + 'atomsCategoryList', + 'atomsCheckModule', + 'atomsDepTreeShow', + 'atomsGetConfig', + 'atomsGetInstalled', + 'atomsGetInstalledPath', + 'atomsGetLoaded', + 'atomsGetLoadedPath', + 'atomsInstall', + 'atomsIsInstalled', + 'atomsIsLoaded', + 'atomsList', + 'atomsLoad', + 'atomsQuit', + 'atomsRemove', + 'atomsRepositoryAdd', + 'atomsRepositoryDel', + 'atomsRepositoryList', + 'atomsRestoreConfig', + 'atomsSaveConfig', + 'atomsSearch', + 'atomsSetConfig', + 'atomsShow', + 'atomsSystemInit', + 'atomsSystemUpdate', + 'atomsTest', + 'atomsUpdate', + 'atomsVersion', + 'augment', + 'auread', + 'auwrite', + 'balreal', + 'bench_run', + 'bilin', + 'bilt', + 'bin2dec', + 'binomial', + 'bitand', + 'bitcmp', + 'bitget', + 'bitor', + 'bitset', + 'bitxor', + 'black', + 'blanks', + 'bloc2exp', + 'bloc2ss', + 'block_parameter_error', + 'bode', + 'bode_asymp', + 'bstap', + 'buttmag', + 'bvodeS', + 'bytecode', + 'bytecodewalk', + 'cainv', + 'calendar', + 'calerf', + 'calfrq', + 'canon', + 'casc', + 'cat', + 'cat_code', + 'cb_m2sci_gui', + 'ccontrg', + 'cell', + 'cell2mat', + 'cellstr', + 'center', + 'cepstrum', + 'cfspec', + 'char', + 'chart', + 'cheb1mag', + 'cheb2mag', + 'check_gateways', + 'check_modules_xml', + 'check_versions', + 'chepol', + 'chfact', + 'chsolve', + 'classmarkov', + 'clean_help', + 'clock', + 'cls2dls', + 'cmb_lin', + 'cmndred', + 'cmoment', + 'coding_ga_binary', + 'coding_ga_identity', + 'coff', + 'coffg', + 'colcomp', + 'colcompr', + 'colinout', + 'colregul', + 'companion', + 'complex', + 'compute_initial_temp', + 'cond', + 'cond2sp', + 'condestsp', + 'configure_msifort', + 'configure_msvc', + 'conjgrad', + 'cont_frm', + 'cont_mat', + 'contrss', + 'conv', + 'convert_to_float', + 'convertindex', + 'convol', + 'convol2d', + 'copfac', + 'correl', + 'cosd', + 'cosh', + 'coshm', + 'cosm', + 'cotd', + 'cotg', + 'coth', + 'cothm', + 'cov', + 'covar', + 'createXConfiguration', + 'createfun', + 'createstruct', + 'cross', + 'crossover_ga_binary', + 'crossover_ga_default', + 'csc', + 'cscd', + 'csch', + 'csgn', + 'csim', + 'cspect', + 'ctr_gram', + 'czt', + 'dae', + 'daeoptions', + 'damp', + 'datafit', + 'date', + 'datenum', + 'datevec', + 'dbphi', + 'dcf', + 'ddp', + 'dec2bin', + 'dec2hex', + 'dec2oct', + 'del_help_chapter', + 'del_module_help_chapter', + 'demo_begin', + 'demo_choose', + 'demo_compiler', + 'demo_end', + 'demo_file_choice', + 'demo_folder_choice', + 'demo_function_choice', + 'demo_gui', + 'demo_run', + 'demo_viewCode', + 'denom', + 'derivat', + 'derivative', + 'des2ss', + 'des2tf', + 'detectmsifort64tools', + 'detectmsvc64tools', + 'determ', + 'detr', + 'detrend', + 'devtools_run_builder', + 'dhnorm', + 'diff', + 'diophant', + 'dir', + 'dirname', + 'dispfiles', + 'dllinfo', + 'dscr', + 'dsimul', + 'dt_ility', + 'dtsi', + 'edit', + 'edit_error', + 'editor', + 'eigenmarkov', + 'eigs', + 'ell1mag', + 'enlarge_shape', + 'entropy', + 'eomday', + 'epred', + 'eqfir', + 'eqiir', + 'equil', + 'equil1', + 'erfinv', + 'etime', + 'eval', + 'evans', + 'evstr', + 'example_run', + 'expression2code', + 'extract_help_examples', + 'factor', + 'factorial', + 'factors', + 'faurre', + 'ffilt', + 'fft2', + 'fftshift', + 'fieldnames', + 'filt_sinc', + 'filter', + 'findABCD', + 'findAC', + 'findBDK', + 'findR', + 'find_freq', + 'find_links', + 'find_scicos_version', + 'findm', + 'findmsifortcompiler', + 'findmsvccompiler', + 'findx0BD', + 'firstnonsingleton', + 'fix', + 'fixedpointgcd', + 'flipdim', + 'flts', + 'fminsearch', + 'formatBlackTip', + 'formatBodeMagTip', + 'formatBodePhaseTip', + 'formatGainplotTip', + 'formatHallModuleTip', + 'formatHallPhaseTip', + 'formatNicholsGainTip', + 'formatNicholsPhaseTip', + 'formatNyquistTip', + 'formatPhaseplotTip', + 'formatSgridDampingTip', + 'formatSgridFreqTip', + 'formatZgridDampingTip', + 'formatZgridFreqTip', + 'format_txt', + 'fourplan', + 'frep2tf', + 'freson', + 'frfit', + 'frmag', + 'fseek_origin', + 'fsfirlin', + 'fspec', + 'fspecg', + 'fstabst', + 'ftest', + 'ftuneq', + 'fullfile', + 'fullrf', + 'fullrfk', + 'fun2string', + 'g_margin', + 'gainplot', + 'gamitg', + 'gcare', + 'gcd', + 'gencompilationflags_unix', + 'generateBlockImage', + 'generateBlockImages', + 'generic_i_ce', + 'generic_i_h', + 'generic_i_hm', + 'generic_i_s', + 'generic_i_st', + 'genlib', + 'genmarkov', + 'geomean', + 'getDiagramVersion', + 'getModelicaPath', + 'getPreferencesValue', + 'get_file_path', + 'get_function_path', + 'get_param', + 'get_profile', + 'get_scicos_version', + 'getd', + 'getscilabkeywords', + 'getshell', + 'gettklib', + 'gfare', + 'gfrancis', + 'givens', + 'glever', + 'gmres', + 'group', + 'gschur', + 'gspec', + 'gtild', + 'h2norm', + 'h_cl', + 'h_inf', + 'h_inf_st', + 'h_norm', + 'hallchart', + 'halt', + 'hank', + 'hankelsv', + 'harmean', + 'haveacompiler', + 'head_comments', + 'help_from_sci', + 'help_skeleton', + 'hermit', + 'hex2dec', + 'hilb', + 'hilbert', + 'histc', + 'horner', + 'householder', + 'hrmt', + 'htrianr', + 'hypermat', + 'idct', + 'idst', + 'ifft', + 'ifftshift', + 'iir', + 'iirgroup', + 'iirlp', + 'iirmod', + 'ilib_build', + 'ilib_build_jar', + 'ilib_compile', + 'ilib_for_link', + 'ilib_gen_Make', + 'ilib_gen_Make_unix', + 'ilib_gen_cleaner', + 'ilib_gen_gateway', + 'ilib_gen_loader', + 'ilib_include_flag', + 'ilib_mex_build', + 'im_inv', + 'importScicosDiagram', + 'importScicosPal', + 'importXcosDiagram', + 'imrep2ss', + 'ind2sub', + 'inistate', + 'init_ga_default', + 'init_param', + 'initial_scicos_tables', + 'input', + 'instruction2code', + 'intc', + 'intdec', + 'integrate', + 'interp1', + 'interpln', + 'intersect', + 'intl', + 'intsplin', + 'inttrap', + 'inv_coeff', + 'invr', + 'invrs', + 'invsyslin', + 'iqr', + 'isLeapYear', + 'is_absolute_path', + 'is_param', + 'iscell', + 'iscellstr', + 'iscolumn', + 'isempty', + 'isfield', + 'isinf', + 'ismatrix', + 'isnan', + 'isrow', + 'isscalar', + 'issparse', + 'issquare', + 'isstruct', + 'isvector', + 'jmat', + 'justify', + 'kalm', + 'karmarkar', + 'kernel', + 'kpure', + 'krac2', + 'kroneck', + 'lattn', + 'lattp', + 'launchtest', + 'lcf', + 'lcm', + 'lcmdiag', + 'leastsq', + 'leqe', + 'leqr', + 'lev', + 'levin', + 'lex_sort', + 'lft', + 'lin', + 'lin2mu', + 'lincos', + 'lindquist', + 'linf', + 'linfn', + 'linsolve', + 'linspace', + 'list2vec', + 'list_param', + 'listfiles', + 'listfunctions', + 'listvarinfile', + 'lmisolver', + 'lmitool', + 'loadXcosLibs', + 'loadmatfile', + 'loadwave', + 'log10', + 'log2', + 'logm', + 'logspace', + 'lqe', + 'lqg', + 'lqg2stan', + 'lqg_ltr', + 'lqr', + 'ls', + 'lyap', + 'm2sci_gui', + 'm_circle', + 'macglov', + 'macrovar', + 'mad', + 'makecell', + 'manedit', + 'mapsound', + 'markp2ss', + 'matfile2sci', + 'mdelete', + 'mean', + 'meanf', + 'median', + 'members', + 'mese', + 'meshgrid', + 'mfft', + 'mfile2sci', + 'minreal', + 'minss', + 'mkdir', + 'modulo', + 'moment', + 'mrfit', + 'msd', + 'mstr2sci', + 'mtlb', + 'mtlb_0', + 'mtlb_a', + 'mtlb_all', + 'mtlb_any', + 'mtlb_axes', + 'mtlb_axis', + 'mtlb_beta', + 'mtlb_box', + 'mtlb_choices', + 'mtlb_close', + 'mtlb_colordef', + 'mtlb_cond', + 'mtlb_cov', + 'mtlb_cumprod', + 'mtlb_cumsum', + 'mtlb_dec2hex', + 'mtlb_delete', + 'mtlb_diag', + 'mtlb_diff', + 'mtlb_dir', + 'mtlb_double', + 'mtlb_e', + 'mtlb_echo', + 'mtlb_error', + 'mtlb_eval', + 'mtlb_exist', + 'mtlb_eye', + 'mtlb_false', + 'mtlb_fft', + 'mtlb_fftshift', + 'mtlb_filter', + 'mtlb_find', + 'mtlb_findstr', + 'mtlb_fliplr', + 'mtlb_fopen', + 'mtlb_format', + 'mtlb_fprintf', + 'mtlb_fread', + 'mtlb_fscanf', + 'mtlb_full', + 'mtlb_fwrite', + 'mtlb_get', + 'mtlb_grid', + 'mtlb_hold', + 'mtlb_i', + 'mtlb_ifft', + 'mtlb_image', + 'mtlb_imp', + 'mtlb_int16', + 'mtlb_int32', + 'mtlb_int8', + 'mtlb_is', + 'mtlb_isa', + 'mtlb_isfield', + 'mtlb_isletter', + 'mtlb_isspace', + 'mtlb_l', + 'mtlb_legendre', + 'mtlb_linspace', + 'mtlb_logic', + 'mtlb_logical', + 'mtlb_loglog', + 'mtlb_lower', + 'mtlb_max', + 'mtlb_mean', + 'mtlb_median', + 'mtlb_mesh', + 'mtlb_meshdom', + 'mtlb_min', + 'mtlb_more', + 'mtlb_num2str', + 'mtlb_ones', + 'mtlb_pcolor', + 'mtlb_plot', + 'mtlb_prod', + 'mtlb_qr', + 'mtlb_qz', + 'mtlb_rand', + 'mtlb_randn', + 'mtlb_rcond', + 'mtlb_realmax', + 'mtlb_realmin', + 'mtlb_s', + 'mtlb_semilogx', + 'mtlb_semilogy', + 'mtlb_setstr', + 'mtlb_size', + 'mtlb_sort', + 'mtlb_sortrows', + 'mtlb_sprintf', + 'mtlb_sscanf', + 'mtlb_std', + 'mtlb_strcmp', + 'mtlb_strcmpi', + 'mtlb_strfind', + 'mtlb_strrep', + 'mtlb_subplot', + 'mtlb_sum', + 'mtlb_t', + 'mtlb_toeplitz', + 'mtlb_tril', + 'mtlb_triu', + 'mtlb_true', + 'mtlb_type', + 'mtlb_uint16', + 'mtlb_uint32', + 'mtlb_uint8', + 'mtlb_upper', + 'mtlb_var', + 'mtlb_zeros', + 'mu2lin', + 'mutation_ga_binary', + 'mutation_ga_default', + 'mvcorrel', + 'mvvacov', + 'nancumsum', + 'nand2mean', + 'nanmax', + 'nanmean', + 'nanmeanf', + 'nanmedian', + 'nanmin', + 'nanreglin', + 'nanstdev', + 'nansum', + 'narsimul', + 'ndgrid', + 'ndims', + 'nehari', + 'neigh_func_csa', + 'neigh_func_default', + 'neigh_func_fsa', + 'neigh_func_vfsa', + 'neldermead_cget', + 'neldermead_configure', + 'neldermead_costf', + 'neldermead_defaultoutput', + 'neldermead_destroy', + 'neldermead_function', + 'neldermead_get', + 'neldermead_log', + 'neldermead_new', + 'neldermead_restart', + 'neldermead_search', + 'neldermead_updatesimp', + 'nextpow2', + 'nfreq', + 'nicholschart', + 'nlev', + 'nmplot_cget', + 'nmplot_configure', + 'nmplot_contour', + 'nmplot_destroy', + 'nmplot_function', + 'nmplot_get', + 'nmplot_historyplot', + 'nmplot_log', + 'nmplot_new', + 'nmplot_outputcmd', + 'nmplot_restart', + 'nmplot_search', + 'nmplot_simplexhistory', + 'noisegen', + 'nonreg_test_run', + 'now', + 'nthroot', + 'null', + 'num2cell', + 'numderivative', + 'numdiff', + 'numer', + 'nyquist', + 'nyquistfrequencybounds', + 'obs_gram', + 'obscont', + 'observer', + 'obsv_mat', + 'obsvss', + 'oct2dec', + 'odeoptions', + 'optim_ga', + 'optim_moga', + 'optim_nsga', + 'optim_nsga2', + 'optim_sa', + 'optimbase_cget', + 'optimbase_checkbounds', + 'optimbase_checkcostfun', + 'optimbase_checkx0', + 'optimbase_configure', + 'optimbase_destroy', + 'optimbase_function', + 'optimbase_get', + 'optimbase_hasbounds', + 'optimbase_hasconstraints', + 'optimbase_hasnlcons', + 'optimbase_histget', + 'optimbase_histset', + 'optimbase_incriter', + 'optimbase_isfeasible', + 'optimbase_isinbounds', + 'optimbase_isinnonlincons', + 'optimbase_log', + 'optimbase_logshutdown', + 'optimbase_logstartup', + 'optimbase_new', + 'optimbase_outputcmd', + 'optimbase_outstruct', + 'optimbase_proj2bnds', + 'optimbase_set', + 'optimbase_stoplog', + 'optimbase_terminate', + 'optimget', + 'optimplotfunccount', + 'optimplotfval', + 'optimplotx', + 'optimset', + 'optimsimplex_center', + 'optimsimplex_check', + 'optimsimplex_compsomefv', + 'optimsimplex_computefv', + 'optimsimplex_deltafv', + 'optimsimplex_deltafvmax', + 'optimsimplex_destroy', + 'optimsimplex_dirmat', + 'optimsimplex_fvmean', + 'optimsimplex_fvstdev', + 'optimsimplex_fvvariance', + 'optimsimplex_getall', + 'optimsimplex_getallfv', + 'optimsimplex_getallx', + 'optimsimplex_getfv', + 'optimsimplex_getn', + 'optimsimplex_getnbve', + 'optimsimplex_getve', + 'optimsimplex_getx', + 'optimsimplex_gradientfv', + 'optimsimplex_log', + 'optimsimplex_new', + 'optimsimplex_reflect', + 'optimsimplex_setall', + 'optimsimplex_setallfv', + 'optimsimplex_setallx', + 'optimsimplex_setfv', + 'optimsimplex_setn', + 'optimsimplex_setnbve', + 'optimsimplex_setve', + 'optimsimplex_setx', + 'optimsimplex_shrink', + 'optimsimplex_size', + 'optimsimplex_sort', + 'optimsimplex_xbar', + 'orth', + 'output_ga_default', + 'output_moga_default', + 'output_nsga2_default', + 'output_nsga_default', + 'p_margin', + 'pack', + 'pareto_filter', + 'parrot', + 'pbig', + 'pca', + 'pcg', + 'pdiv', + 'pen2ea', + 'pencan', + 'pencost', + 'penlaur', + 'perctl', + 'perl', + 'perms', + 'permute', + 'pertrans', + 'pfactors', + 'pfss', + 'phasemag', + 'phaseplot', + 'phc', + 'pinv', + 'playsnd', + 'plotprofile', + 'plzr', + 'pmodulo', + 'pol2des', + 'pol2str', + 'polar', + 'polfact', + 'prbs_a', + 'prettyprint', + 'primes', + 'princomp', + 'profile', + 'proj', + 'projsl', + 'projspec', + 'psmall', + 'pspect', + 'qmr', + 'qpsolve', + 'quart', + 'quaskro', + 'rafiter', + 'randpencil', + 'range', + 'rank', + 'readxls', + 'recompilefunction', + 'recons', + 'reglin', + 'regress', + 'remezb', + 'remove_param', + 'remove_profiling', + 'repfreq', + 'replace_Ix_by_Fx', + 'repmat', + 'reset_profiling', + 'resize_matrix', + 'returntoscilab', + 'rhs2code', + 'ric_desc', + 'riccati', + 'rmdir', + 'routh_t', + 'rowcomp', + 'rowcompr', + 'rowinout', + 'rowregul', + 'rowshuff', + 'rref', + 'sample', + 'samplef', + 'samwr', + 'savematfile', + 'savewave', + 'scanf', + 'sci2exp', + 'sciGUI_init', + 'sci_sparse', + 'scicos_getvalue', + 'scicos_simulate', + 'scicos_workspace_init', + 'scisptdemo', + 'scitest', + 'sdiff', + 'sec', + 'secd', + 'sech', + 'selection_ga_elitist', + 'selection_ga_random', + 'sensi', + 'setPreferencesValue', + 'set_param', + 'setdiff', + 'sgrid', + 'show_margins', + 'show_pca', + 'showprofile', + 'signm', + 'sinc', + 'sincd', + 'sind', + 'sinh', + 'sinhm', + 'sinm', + 'sm2des', + 'sm2ss', + 'smga', + 'smooth', + 'solve', + 'sound', + 'soundsec', + 'sp2adj', + 'spaninter', + 'spanplus', + 'spantwo', + 'specfact', + 'speye', + 'sprand', + 'spzeros', + 'sqroot', + 'sqrtm', + 'squarewave', + 'squeeze', + 'srfaur', + 'srkf', + 'ss2des', + 'ss2ss', + 'ss2tf', + 'sskf', + 'ssprint', + 'ssrand', + 'st_deviation', + 'st_i_generic', + 'st_ility', + 'stabil', + 'statgain', + 'stdev', + 'stdevf', + 'steadycos', + 'strange', + 'strcmpi', + 'struct', + 'sub2ind', + 'sva', + 'svplot', + 'sylm', + 'sylv', + 'sysconv', + 'sysdiag', + 'sysfact', + 'syslin', + 'syssize', + 'system', + 'systmat', + 'tabul', + 'tand', + 'tanh', + 'tanhm', + 'tanm', + 'tbx_build_blocks', + 'tbx_build_cleaner', + 'tbx_build_gateway', + 'tbx_build_gateway_clean', + 'tbx_build_gateway_loader', + 'tbx_build_help', + 'tbx_build_help_loader', + 'tbx_build_loader', + 'tbx_build_localization', + 'tbx_build_macros', + 'tbx_build_pal_loader', + 'tbx_build_src', + 'tbx_builder', + 'tbx_builder_gateway', + 'tbx_builder_gateway_lang', + 'tbx_builder_help', + 'tbx_builder_help_lang', + 'tbx_builder_macros', + 'tbx_builder_src', + 'tbx_builder_src_lang', + 'tbx_generate_pofile', + 'temp_law_csa', + 'temp_law_default', + 'temp_law_fsa', + 'temp_law_huang', + 'temp_law_vfsa', + 'test_clean', + 'test_on_columns', + 'test_run', + 'test_run_level', + 'testexamples', + 'tf2des', + 'tf2ss', + 'thrownan', + 'tic', + 'time_id', + 'toc', + 'toeplitz', + 'tokenpos', + 'toolboxes', + 'trace', + 'trans', + 'translatepaths', + 'tree2code', + 'trfmod', + 'trianfml', + 'trimmean', + 'trisolve', + 'trzeros', + 'typeof', + 'ui_observer', + 'union', + 'unique', + 'unit_test_run', + 'unix_g', + 'unix_s', + 'unix_w', + 'unix_x', + 'unobs', + 'unpack', + 'unwrap', + 'variance', + 'variancef', + 'vec2list', + 'vectorfind', + 'ver', + 'warnobsolete', + 'wavread', + 'wavwrite', + 'wcenter', + 'weekday', + 'wfir', + 'wfir_gui', + 'whereami', + 'who_user', + 'whos', + 'wiener', + 'wigner', + 'window', + 'winlist', + 'with_javasci', + 'with_macros_source', + 'with_modelica_compiler', + 'with_tk', + 'xcorr', + 'xcosBlockEval', + 'xcosBlockInterface', + 'xcosCodeGeneration', + 'xcosConfigureModelica', + 'xcosPal', + 'xcosPalAdd', + 'xcosPalAddBlock', + 'xcosPalExport', + 'xcosPalGenerateAllIcons', + 'xcosShowBlockWarning', + 'xcosValidateBlockSet', + 'xcosValidateCompareBlock', + 'xcos_compile', + 'xcos_debug_gui', + 'xcos_run', + 'xcos_simulate', + 'xcov', + 'xmltochm', + 'xmltoformat', + 'xmltohtml', + 'xmltojar', + 'xmltopdf', + 'xmltops', + 'xmltoweb', + 'yulewalk', + 'zeropen', + 'zgrid', + 'zpbutt', + 'zpch1', + 'zpch2', + 'zpell', +) + +variables_kw = ( + '$', + '%F', + '%T', + '%e', + '%eps', + '%f', + '%fftw', + '%gui', + '%i', + '%inf', + '%io', + '%modalWarning', + '%nan', + '%pi', + '%s', + '%t', + '%tk', + '%toolboxes', + '%toolboxes_dir', + '%z', + 'PWD', + 'SCI', + 'SCIHOME', + 'TMPDIR', + 'arnoldilib', + 'assertlib', + 'atomslib', + 'cacsdlib', + 'compatibility_functilib', + 'corelib', + 'data_structureslib', + 'demo_toolslib', + 'development_toolslib', + 'differential_equationlib', + 'dynamic_linklib', + 'elementary_functionslib', + 'enull', + 'evoid', + 'external_objectslib', + 'fd', + 'fileiolib', + 'functionslib', + 'genetic_algorithmslib', + 'helptoolslib', + 'home', + 'integerlib', + 'interpolationlib', + 'iolib', + 'jnull', + 'jvoid', + 'linear_algebralib', + 'm2scilib', + 'matiolib', + 'modules_managerlib', + 'neldermeadlib', + 'optimbaselib', + 'optimizationlib', + 'optimsimplexlib', + 'output_streamlib', + 'overloadinglib', + 'parameterslib', + 'polynomialslib', + 'preferenceslib', + 'randliblib', + 'scicos_autolib', + 'scicos_utilslib', + 'scinoteslib', + 'signal_processinglib', + 'simulated_annealinglib', + 'soundlib', + 'sparselib', + 'special_functionslib', + 'spreadsheetlib', + 'statisticslib', + 'stringlib', + 'tclscilib', + 'timelib', + 'umfpacklib', + 'xcoslib', +) + + +if __name__ == '__main__': # pragma: no cover + import subprocess + from pygments.util import format_lines, duplicates_removed + + mapping = {'variables': 'builtin'} + + def extract_completion(var_type): + s = subprocess.Popen(['scilab', '-nwni'], stdin=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = s.communicate(f'''\ +fd = mopen("/dev/stderr", "wt"); +mputl(strcat(completion("", "{var_type}"), "||"), fd); +mclose(fd)\n''') + if '||' not in output[1]: + raise Exception(output[0]) + # Invalid DISPLAY causes this to be output: + text = output[1].strip() + if text.startswith('Error: unable to open display \n'): + text = text[len('Error: unable to open display \n'):] + return text.split('||') + + new_data = {} + seen = set() # only keep first type for a given word + for t in ('functions', 'commands', 'macros', 'variables'): + new_data[t] = duplicates_removed(extract_completion(t), seen) + seen.update(set(new_data[t])) + + + with open(__file__, encoding='utf-8') as f: + content = f.read() + + header = content[:content.find('# Autogenerated')] + footer = content[content.find("if __name__ == '__main__':"):] + + with open(__file__, 'w', encoding='utf-8') as f: + f.write(header) + f.write('# Autogenerated\n\n') + for k, v in sorted(new_data.items()): + f.write(format_lines(k + '_kw', v) + '\n\n') + f.write(footer) diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/_sourcemod_builtins.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/_sourcemod_builtins.py new file mode 100644 index 0000000000000000000000000000000000000000..c98478c6f9ebf32547010598a90d7dcb7565592d --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/_sourcemod_builtins.py @@ -0,0 +1,1151 @@ +""" + pygments.lexers._sourcemod_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + This file contains the names of SourceMod functions. + + Do not edit the FUNCTIONS list by hand. + + Run with `python -I` to regenerate. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +FUNCTIONS = ( + 'OnEntityCreated', + 'OnEntityDestroyed', + 'OnGetGameDescription', + 'OnLevelInit', + 'SDKHook', + 'SDKHookEx', + 'SDKUnhook', + 'SDKHooks_TakeDamage', + 'SDKHooks_DropWeapon', + 'TopMenuHandler', + 'CreateTopMenu', + 'LoadTopMenuConfig', + 'AddToTopMenu', + 'GetTopMenuInfoString', + 'GetTopMenuObjName', + 'RemoveFromTopMenu', + 'DisplayTopMenu', + 'DisplayTopMenuCategory', + 'FindTopMenuCategory', + 'SetTopMenuTitleCaching', + 'OnAdminMenuCreated', + 'OnAdminMenuReady', + 'GetAdminTopMenu', + 'AddTargetsToMenu', + 'AddTargetsToMenu2', + 'RedisplayAdminMenu', + 'TEHook', + 'AddTempEntHook', + 'RemoveTempEntHook', + 'TE_Start', + 'TE_IsValidProp', + 'TE_WriteNum', + 'TE_ReadNum', + 'TE_WriteFloat', + 'TE_ReadFloat', + 'TE_WriteVector', + 'TE_ReadVector', + 'TE_WriteAngles', + 'TE_WriteFloatArray', + 'TE_Send', + 'TE_WriteEncodedEnt', + 'TE_SendToAll', + 'TE_SendToClient', + 'CreateKeyValues', + 'KvSetString', + 'KvSetNum', + 'KvSetUInt64', + 'KvSetFloat', + 'KvSetColor', + 'KvSetVector', + 'KvGetString', + 'KvGetNum', + 'KvGetFloat', + 'KvGetColor', + 'KvGetUInt64', + 'KvGetVector', + 'KvJumpToKey', + 'KvJumpToKeySymbol', + 'KvGotoFirstSubKey', + 'KvGotoNextKey', + 'KvSavePosition', + 'KvDeleteKey', + 'KvDeleteThis', + 'KvGoBack', + 'KvRewind', + 'KvGetSectionName', + 'KvSetSectionName', + 'KvGetDataType', + 'KeyValuesToFile', + 'FileToKeyValues', + 'StringToKeyValues', + 'KvSetEscapeSequences', + 'KvNodesInStack', + 'KvCopySubkeys', + 'KvFindKeyById', + 'KvGetNameSymbol', + 'KvGetSectionSymbol', + 'TE_SetupSparks', + 'TE_SetupSmoke', + 'TE_SetupDust', + 'TE_SetupMuzzleFlash', + 'TE_SetupMetalSparks', + 'TE_SetupEnergySplash', + 'TE_SetupArmorRicochet', + 'TE_SetupGlowSprite', + 'TE_SetupExplosion', + 'TE_SetupBloodSprite', + 'TE_SetupBeamRingPoint', + 'TE_SetupBeamPoints', + 'TE_SetupBeamLaser', + 'TE_SetupBeamRing', + 'TE_SetupBeamFollow', + 'HookEvent', + 'HookEventEx', + 'UnhookEvent', + 'CreateEvent', + 'FireEvent', + 'CancelCreatedEvent', + 'GetEventBool', + 'SetEventBool', + 'GetEventInt', + 'SetEventInt', + 'GetEventFloat', + 'SetEventFloat', + 'GetEventString', + 'SetEventString', + 'GetEventName', + 'SetEventBroadcast', + 'GetUserMessageType', + 'GetUserMessageId', + 'GetUserMessageName', + 'StartMessage', + 'StartMessageEx', + 'EndMessage', + 'MsgHook', + 'MsgPostHook', + 'HookUserMessage', + 'UnhookUserMessage', + 'StartMessageAll', + 'StartMessageOne', + 'InactivateClient', + 'ReconnectClient', + 'GetMaxEntities', + 'GetEntityCount', + 'IsValidEntity', + 'IsValidEdict', + 'IsEntNetworkable', + 'CreateEdict', + 'RemoveEdict', + 'GetEdictFlags', + 'SetEdictFlags', + 'GetEdictClassname', + 'GetEntityNetClass', + 'ChangeEdictState', + 'GetEntData', + 'SetEntData', + 'GetEntDataFloat', + 'SetEntDataFloat', + 'GetEntDataEnt2', + 'SetEntDataEnt2', + 'GetEntDataVector', + 'SetEntDataVector', + 'GetEntDataString', + 'SetEntDataString', + 'FindSendPropOffs', + 'FindSendPropInfo', + 'FindDataMapOffs', + 'FindDataMapInfo', + 'GetEntSendPropOffs', + 'GetEntProp', + 'SetEntProp', + 'GetEntPropFloat', + 'SetEntPropFloat', + 'GetEntPropEnt', + 'SetEntPropEnt', + 'GetEntPropVector', + 'SetEntPropVector', + 'GetEntPropString', + 'SetEntPropString', + 'GetEntPropArraySize', + 'GetEntDataArray', + 'SetEntDataArray', + 'GetEntityAddress', + 'GetEntityClassname', + 'float', + 'FloatMul', + 'FloatDiv', + 'FloatAdd', + 'FloatSub', + 'FloatFraction', + 'RoundToZero', + 'RoundToCeil', + 'RoundToFloor', + 'RoundToNearest', + 'FloatCompare', + 'SquareRoot', + 'Pow', + 'Exponential', + 'Logarithm', + 'Sine', + 'Cosine', + 'Tangent', + 'FloatAbs', + 'ArcTangent', + 'ArcCosine', + 'ArcSine', + 'ArcTangent2', + 'RoundFloat', + 'operator%', + 'DegToRad', + 'RadToDeg', + 'GetURandomInt', + 'GetURandomFloat', + 'SetURandomSeed', + 'SetURandomSeedSimple', + 'RemovePlayerItem', + 'GivePlayerItem', + 'GetPlayerWeaponSlot', + 'IgniteEntity', + 'ExtinguishEntity', + 'TeleportEntity', + 'ForcePlayerSuicide', + 'SlapPlayer', + 'FindEntityByClassname', + 'GetClientEyeAngles', + 'CreateEntityByName', + 'DispatchSpawn', + 'DispatchKeyValue', + 'DispatchKeyValueFloat', + 'DispatchKeyValueVector', + 'GetClientAimTarget', + 'GetTeamCount', + 'GetTeamName', + 'GetTeamScore', + 'SetTeamScore', + 'GetTeamClientCount', + 'SetEntityModel', + 'GetPlayerDecalFile', + 'GetPlayerJingleFile', + 'GetServerNetStats', + 'EquipPlayerWeapon', + 'ActivateEntity', + 'SetClientInfo', + 'GivePlayerAmmo', + 'SetClientListeningFlags', + 'GetClientListeningFlags', + 'SetListenOverride', + 'GetListenOverride', + 'IsClientMuted', + 'TR_GetPointContents', + 'TR_GetPointContentsEnt', + 'TR_TraceRay', + 'TR_TraceHull', + 'TR_TraceRayFilter', + 'TR_TraceHullFilter', + 'TR_TraceRayEx', + 'TR_TraceHullEx', + 'TR_TraceRayFilterEx', + 'TR_TraceHullFilterEx', + 'TR_GetFraction', + 'TR_GetEndPosition', + 'TR_GetEntityIndex', + 'TR_DidHit', + 'TR_GetHitGroup', + 'TR_GetPlaneNormal', + 'TR_PointOutsideWorld', + 'SortIntegers', + 'SortFloats', + 'SortStrings', + 'SortFunc1D', + 'SortCustom1D', + 'SortCustom2D', + 'SortADTArray', + 'SortFuncADTArray', + 'SortADTArrayCustom', + 'CompileRegex', + 'MatchRegex', + 'GetRegexSubString', + 'SimpleRegexMatch', + 'TF2_GetPlayerClass', + 'TF2_SetPlayerClass', + 'TF2_RemoveWeaponSlot', + 'TF2_RemoveAllWeapons', + 'TF2_IsPlayerInCondition', + 'TF2_GetObjectType', + 'TF2_GetObjectMode', + 'NominateMap', + 'RemoveNominationByMap', + 'RemoveNominationByOwner', + 'GetExcludeMapList', + 'GetNominatedMapList', + 'CanMapChooserStartVote', + 'InitiateMapChooserVote', + 'HasEndOfMapVoteFinished', + 'EndOfMapVoteEnabled', + 'OnNominationRemoved', + 'OnMapVoteStarted', + 'CreateTimer', + 'KillTimer', + 'TriggerTimer', + 'GetTickedTime', + 'GetMapTimeLeft', + 'GetMapTimeLimit', + 'ExtendMapTimeLimit', + 'GetTickInterval', + 'OnMapTimeLeftChanged', + 'IsServerProcessing', + 'CreateDataTimer', + 'ByteCountToCells', + 'CreateArray', + 'ClearArray', + 'CloneArray', + 'ResizeArray', + 'GetArraySize', + 'PushArrayCell', + 'PushArrayString', + 'PushArrayArray', + 'GetArrayCell', + 'GetArrayString', + 'GetArrayArray', + 'SetArrayCell', + 'SetArrayString', + 'SetArrayArray', + 'ShiftArrayUp', + 'RemoveFromArray', + 'SwapArrayItems', + 'FindStringInArray', + 'FindValueInArray', + 'ProcessTargetString', + 'ReplyToTargetError', + 'MultiTargetFilter', + 'AddMultiTargetFilter', + 'RemoveMultiTargetFilter', + 'OnBanClient', + 'OnBanIdentity', + 'OnRemoveBan', + 'BanClient', + 'BanIdentity', + 'RemoveBan', + 'CreateTrie', + 'SetTrieValue', + 'SetTrieArray', + 'SetTrieString', + 'GetTrieValue', + 'GetTrieArray', + 'GetTrieString', + 'RemoveFromTrie', + 'ClearTrie', + 'GetTrieSize', + 'GetFunctionByName', + 'CreateGlobalForward', + 'CreateForward', + 'GetForwardFunctionCount', + 'AddToForward', + 'RemoveFromForward', + 'RemoveAllFromForward', + 'Call_StartForward', + 'Call_StartFunction', + 'Call_PushCell', + 'Call_PushCellRef', + 'Call_PushFloat', + 'Call_PushFloatRef', + 'Call_PushArray', + 'Call_PushArrayEx', + 'Call_PushString', + 'Call_PushStringEx', + 'Call_Finish', + 'Call_Cancel', + 'NativeCall', + 'CreateNative', + 'ThrowNativeError', + 'GetNativeStringLength', + 'GetNativeString', + 'SetNativeString', + 'GetNativeCell', + 'GetNativeCellRef', + 'SetNativeCellRef', + 'GetNativeArray', + 'SetNativeArray', + 'FormatNativeString', + 'RequestFrameCallback', + 'RequestFrame', + 'OnRebuildAdminCache', + 'DumpAdminCache', + 'AddCommandOverride', + 'GetCommandOverride', + 'UnsetCommandOverride', + 'CreateAdmGroup', + 'FindAdmGroup', + 'SetAdmGroupAddFlag', + 'GetAdmGroupAddFlag', + 'GetAdmGroupAddFlags', + 'SetAdmGroupImmuneFrom', + 'GetAdmGroupImmuneCount', + 'GetAdmGroupImmuneFrom', + 'AddAdmGroupCmdOverride', + 'GetAdmGroupCmdOverride', + 'RegisterAuthIdentType', + 'CreateAdmin', + 'GetAdminUsername', + 'BindAdminIdentity', + 'SetAdminFlag', + 'GetAdminFlag', + 'GetAdminFlags', + 'AdminInheritGroup', + 'GetAdminGroupCount', + 'GetAdminGroup', + 'SetAdminPassword', + 'GetAdminPassword', + 'FindAdminByIdentity', + 'RemoveAdmin', + 'FlagBitsToBitArray', + 'FlagBitArrayToBits', + 'FlagArrayToBits', + 'FlagBitsToArray', + 'FindFlagByName', + 'FindFlagByChar', + 'FindFlagChar', + 'ReadFlagString', + 'CanAdminTarget', + 'CreateAuthMethod', + 'SetAdmGroupImmunityLevel', + 'GetAdmGroupImmunityLevel', + 'SetAdminImmunityLevel', + 'GetAdminImmunityLevel', + 'FlagToBit', + 'BitToFlag', + 'ServerCommand', + 'ServerCommandEx', + 'InsertServerCommand', + 'ServerExecute', + 'ClientCommand', + 'FakeClientCommand', + 'FakeClientCommandEx', + 'PrintToServer', + 'PrintToConsole', + 'ReplyToCommand', + 'GetCmdReplySource', + 'SetCmdReplySource', + 'IsChatTrigger', + 'ShowActivity2', + 'ShowActivity', + 'ShowActivityEx', + 'FormatActivitySource', + 'SrvCmd', + 'RegServerCmd', + 'ConCmd', + 'RegConsoleCmd', + 'RegAdminCmd', + 'GetCmdArgs', + 'GetCmdArg', + 'GetCmdArgString', + 'CreateConVar', + 'FindConVar', + 'ConVarChanged', + 'HookConVarChange', + 'UnhookConVarChange', + 'GetConVarBool', + 'SetConVarBool', + 'GetConVarInt', + 'SetConVarInt', + 'GetConVarFloat', + 'SetConVarFloat', + 'GetConVarString', + 'SetConVarString', + 'ResetConVar', + 'GetConVarDefault', + 'GetConVarFlags', + 'SetConVarFlags', + 'GetConVarBounds', + 'SetConVarBounds', + 'GetConVarName', + 'QueryClientConVar', + 'GetCommandIterator', + 'ReadCommandIterator', + 'CheckCommandAccess', + 'CheckAccess', + 'IsValidConVarChar', + 'GetCommandFlags', + 'SetCommandFlags', + 'FindFirstConCommand', + 'FindNextConCommand', + 'SendConVarValue', + 'AddServerTag', + 'RemoveServerTag', + 'CommandListener', + 'AddCommandListener', + 'RemoveCommandListener', + 'CommandExists', + 'OnClientSayCommand', + 'OnClientSayCommand_Post', + 'TF2_IgnitePlayer', + 'TF2_RespawnPlayer', + 'TF2_RegeneratePlayer', + 'TF2_AddCondition', + 'TF2_RemoveCondition', + 'TF2_SetPlayerPowerPlay', + 'TF2_DisguisePlayer', + 'TF2_RemovePlayerDisguise', + 'TF2_StunPlayer', + 'TF2_MakeBleed', + 'TF2_GetClass', + 'TF2_CalcIsAttackCritical', + 'TF2_OnIsHolidayActive', + 'TF2_IsHolidayActive', + 'TF2_IsPlayerInDuel', + 'TF2_RemoveWearable', + 'TF2_OnConditionAdded', + 'TF2_OnConditionRemoved', + 'TF2_OnWaitingForPlayersStart', + 'TF2_OnWaitingForPlayersEnd', + 'TF2_OnPlayerTeleport', + 'SQL_Connect', + 'SQL_DefConnect', + 'SQL_ConnectCustom', + 'SQLite_UseDatabase', + 'SQL_CheckConfig', + 'SQL_GetDriver', + 'SQL_ReadDriver', + 'SQL_GetDriverIdent', + 'SQL_GetDriverProduct', + 'SQL_SetCharset', + 'SQL_GetAffectedRows', + 'SQL_GetInsertId', + 'SQL_GetError', + 'SQL_EscapeString', + 'SQL_QuoteString', + 'SQL_FastQuery', + 'SQL_Query', + 'SQL_PrepareQuery', + 'SQL_FetchMoreResults', + 'SQL_HasResultSet', + 'SQL_GetRowCount', + 'SQL_GetFieldCount', + 'SQL_FieldNumToName', + 'SQL_FieldNameToNum', + 'SQL_FetchRow', + 'SQL_MoreRows', + 'SQL_Rewind', + 'SQL_FetchString', + 'SQL_FetchFloat', + 'SQL_FetchInt', + 'SQL_IsFieldNull', + 'SQL_FetchSize', + 'SQL_BindParamInt', + 'SQL_BindParamFloat', + 'SQL_BindParamString', + 'SQL_Execute', + 'SQL_LockDatabase', + 'SQL_UnlockDatabase', + 'SQLTCallback', + 'SQL_IsSameConnection', + 'SQL_TConnect', + 'SQL_TQuery', + 'SQL_CreateTransaction', + 'SQL_AddQuery', + 'SQLTxnSuccess', + 'SQLTxnFailure', + 'SQL_ExecuteTransaction', + 'CloseHandle', + 'CloneHandle', + 'MenuHandler', + 'CreateMenu', + 'DisplayMenu', + 'DisplayMenuAtItem', + 'AddMenuItem', + 'InsertMenuItem', + 'RemoveMenuItem', + 'RemoveAllMenuItems', + 'GetMenuItem', + 'GetMenuSelectionPosition', + 'GetMenuItemCount', + 'SetMenuPagination', + 'GetMenuPagination', + 'GetMenuStyle', + 'SetMenuTitle', + 'GetMenuTitle', + 'CreatePanelFromMenu', + 'GetMenuExitButton', + 'SetMenuExitButton', + 'GetMenuExitBackButton', + 'SetMenuExitBackButton', + 'SetMenuNoVoteButton', + 'CancelMenu', + 'GetMenuOptionFlags', + 'SetMenuOptionFlags', + 'IsVoteInProgress', + 'CancelVote', + 'VoteMenu', + 'VoteMenuToAll', + 'VoteHandler', + 'SetVoteResultCallback', + 'CheckVoteDelay', + 'IsClientInVotePool', + 'RedrawClientVoteMenu', + 'GetMenuStyleHandle', + 'CreatePanel', + 'CreateMenuEx', + 'GetClientMenu', + 'CancelClientMenu', + 'GetMaxPageItems', + 'GetPanelStyle', + 'SetPanelTitle', + 'DrawPanelItem', + 'DrawPanelText', + 'CanPanelDrawFlags', + 'SetPanelKeys', + 'SendPanelToClient', + 'GetPanelTextRemaining', + 'GetPanelCurrentKey', + 'SetPanelCurrentKey', + 'RedrawMenuItem', + 'InternalShowMenu', + 'GetMenuVoteInfo', + 'IsNewVoteAllowed', + 'PrefetchSound', + 'EmitAmbientSound', + 'FadeClientVolume', + 'StopSound', + 'EmitSound', + 'EmitSentence', + 'GetDistGainFromSoundLevel', + 'AmbientSHook', + 'NormalSHook', + 'AddAmbientSoundHook', + 'AddNormalSoundHook', + 'RemoveAmbientSoundHook', + 'RemoveNormalSoundHook', + 'EmitSoundToClient', + 'EmitSoundToAll', + 'ATTN_TO_SNDLEVEL', + 'GetGameSoundParams', + 'EmitGameSound', + 'EmitAmbientGameSound', + 'EmitGameSoundToClient', + 'EmitGameSoundToAll', + 'PrecacheScriptSound', + 'strlen', + 'StrContains', + 'strcmp', + 'strncmp', + 'StrEqual', + 'strcopy', + 'Format', + 'FormatEx', + 'VFormat', + 'StringToInt', + 'StringToIntEx', + 'IntToString', + 'StringToFloat', + 'StringToFloatEx', + 'FloatToString', + 'BreakString', + 'TrimString', + 'SplitString', + 'ReplaceString', + 'ReplaceStringEx', + 'GetCharBytes', + 'IsCharAlpha', + 'IsCharNumeric', + 'IsCharSpace', + 'IsCharMB', + 'IsCharUpper', + 'IsCharLower', + 'StripQuotes', + 'CharToUpper', + 'CharToLower', + 'FindCharInString', + 'StrCat', + 'ExplodeString', + 'ImplodeStrings', + 'GetVectorLength', + 'GetVectorDistance', + 'GetVectorDotProduct', + 'GetVectorCrossProduct', + 'NormalizeVector', + 'GetAngleVectors', + 'GetVectorAngles', + 'GetVectorVectors', + 'AddVectors', + 'SubtractVectors', + 'ScaleVector', + 'NegateVector', + 'MakeVectorFromPoints', + 'BaseComm_IsClientGagged', + 'BaseComm_IsClientMuted', + 'BaseComm_SetClientGag', + 'BaseComm_SetClientMute', + 'FormatUserLogText', + 'FindPluginByFile', + 'FindTarget', + 'AcceptEntityInput', + 'SetVariantBool', + 'SetVariantString', + 'SetVariantInt', + 'SetVariantFloat', + 'SetVariantVector3D', + 'SetVariantPosVector3D', + 'SetVariantColor', + 'SetVariantEntity', + 'GameRules_GetProp', + 'GameRules_SetProp', + 'GameRules_GetPropFloat', + 'GameRules_SetPropFloat', + 'GameRules_GetPropEnt', + 'GameRules_SetPropEnt', + 'GameRules_GetPropVector', + 'GameRules_SetPropVector', + 'GameRules_GetPropString', + 'GameRules_SetPropString', + 'GameRules_GetRoundState', + 'OnClientConnect', + 'OnClientConnected', + 'OnClientPutInServer', + 'OnClientDisconnect', + 'OnClientDisconnect_Post', + 'OnClientCommand', + 'OnClientSettingsChanged', + 'OnClientAuthorized', + 'OnClientPreAdminCheck', + 'OnClientPostAdminFilter', + 'OnClientPostAdminCheck', + 'GetMaxClients', + 'GetMaxHumanPlayers', + 'GetClientCount', + 'GetClientName', + 'GetClientIP', + 'GetClientAuthString', + 'GetClientAuthId', + 'GetSteamAccountID', + 'GetClientUserId', + 'IsClientConnected', + 'IsClientInGame', + 'IsClientInKickQueue', + 'IsClientAuthorized', + 'IsFakeClient', + 'IsClientSourceTV', + 'IsClientReplay', + 'IsClientObserver', + 'IsPlayerAlive', + 'GetClientInfo', + 'GetClientTeam', + 'SetUserAdmin', + 'GetUserAdmin', + 'AddUserFlags', + 'RemoveUserFlags', + 'SetUserFlagBits', + 'GetUserFlagBits', + 'CanUserTarget', + 'RunAdminCacheChecks', + 'NotifyPostAdminCheck', + 'CreateFakeClient', + 'SetFakeClientConVar', + 'GetClientHealth', + 'GetClientModel', + 'GetClientWeapon', + 'GetClientMaxs', + 'GetClientMins', + 'GetClientAbsAngles', + 'GetClientAbsOrigin', + 'GetClientArmor', + 'GetClientDeaths', + 'GetClientFrags', + 'GetClientDataRate', + 'IsClientTimingOut', + 'GetClientTime', + 'GetClientLatency', + 'GetClientAvgLatency', + 'GetClientAvgLoss', + 'GetClientAvgChoke', + 'GetClientAvgData', + 'GetClientAvgPackets', + 'GetClientOfUserId', + 'KickClient', + 'KickClientEx', + 'ChangeClientTeam', + 'GetClientSerial', + 'GetClientFromSerial', + 'FindStringTable', + 'GetNumStringTables', + 'GetStringTableNumStrings', + 'GetStringTableMaxStrings', + 'GetStringTableName', + 'FindStringIndex', + 'ReadStringTable', + 'GetStringTableDataLength', + 'GetStringTableData', + 'SetStringTableData', + 'AddToStringTable', + 'LockStringTables', + 'AddFileToDownloadsTable', + 'GetEntityFlags', + 'SetEntityFlags', + 'GetEntityMoveType', + 'SetEntityMoveType', + 'GetEntityRenderMode', + 'SetEntityRenderMode', + 'GetEntityRenderFx', + 'SetEntityRenderFx', + 'SetEntityRenderColor', + 'GetEntityGravity', + 'SetEntityGravity', + 'SetEntityHealth', + 'GetClientButtons', + 'EntityOutput', + 'HookEntityOutput', + 'UnhookEntityOutput', + 'HookSingleEntityOutput', + 'UnhookSingleEntityOutput', + 'SMC_CreateParser', + 'SMC_ParseFile', + 'SMC_GetErrorString', + 'SMC_ParseStart', + 'SMC_SetParseStart', + 'SMC_ParseEnd', + 'SMC_SetParseEnd', + 'SMC_NewSection', + 'SMC_KeyValue', + 'SMC_EndSection', + 'SMC_SetReaders', + 'SMC_RawLine', + 'SMC_SetRawLine', + 'BfWriteBool', + 'BfWriteByte', + 'BfWriteChar', + 'BfWriteShort', + 'BfWriteWord', + 'BfWriteNum', + 'BfWriteFloat', + 'BfWriteString', + 'BfWriteEntity', + 'BfWriteAngle', + 'BfWriteCoord', + 'BfWriteVecCoord', + 'BfWriteVecNormal', + 'BfWriteAngles', + 'BfReadBool', + 'BfReadByte', + 'BfReadChar', + 'BfReadShort', + 'BfReadWord', + 'BfReadNum', + 'BfReadFloat', + 'BfReadString', + 'BfReadEntity', + 'BfReadAngle', + 'BfReadCoord', + 'BfReadVecCoord', + 'BfReadVecNormal', + 'BfReadAngles', + 'BfGetNumBytesLeft', + 'CreateProfiler', + 'StartProfiling', + 'StopProfiling', + 'GetProfilerTime', + 'OnPluginStart', + 'AskPluginLoad2', + 'OnPluginEnd', + 'OnPluginPauseChange', + 'OnGameFrame', + 'OnMapStart', + 'OnMapEnd', + 'OnConfigsExecuted', + 'OnAutoConfigsBuffered', + 'OnAllPluginsLoaded', + 'GetMyHandle', + 'GetPluginIterator', + 'MorePlugins', + 'ReadPlugin', + 'GetPluginStatus', + 'GetPluginFilename', + 'IsPluginDebugging', + 'GetPluginInfo', + 'FindPluginByNumber', + 'SetFailState', + 'ThrowError', + 'GetTime', + 'FormatTime', + 'LoadGameConfigFile', + 'GameConfGetOffset', + 'GameConfGetKeyValue', + 'GameConfGetAddress', + 'GetSysTickCount', + 'AutoExecConfig', + 'RegPluginLibrary', + 'LibraryExists', + 'GetExtensionFileStatus', + 'OnLibraryAdded', + 'OnLibraryRemoved', + 'ReadMapList', + 'SetMapListCompatBind', + 'OnClientFloodCheck', + 'OnClientFloodResult', + 'CanTestFeatures', + 'GetFeatureStatus', + 'RequireFeature', + 'LoadFromAddress', + 'StoreToAddress', + 'CreateStack', + 'PushStackCell', + 'PushStackString', + 'PushStackArray', + 'PopStackCell', + 'PopStackString', + 'PopStackArray', + 'IsStackEmpty', + 'PopStack', + 'OnPlayerRunCmd', + 'BuildPath', + 'OpenDirectory', + 'ReadDirEntry', + 'OpenFile', + 'DeleteFile', + 'ReadFileLine', + 'ReadFile', + 'ReadFileString', + 'WriteFile', + 'WriteFileString', + 'WriteFileLine', + 'ReadFileCell', + 'WriteFileCell', + 'IsEndOfFile', + 'FileSeek', + 'FilePosition', + 'FileExists', + 'RenameFile', + 'DirExists', + 'FileSize', + 'FlushFile', + 'RemoveDir', + 'CreateDirectory', + 'GetFileTime', + 'LogToOpenFile', + 'LogToOpenFileEx', + 'PbReadInt', + 'PbReadFloat', + 'PbReadBool', + 'PbReadString', + 'PbReadColor', + 'PbReadAngle', + 'PbReadVector', + 'PbReadVector2D', + 'PbGetRepeatedFieldCount', + 'PbSetInt', + 'PbSetFloat', + 'PbSetBool', + 'PbSetString', + 'PbSetColor', + 'PbSetAngle', + 'PbSetVector', + 'PbSetVector2D', + 'PbAddInt', + 'PbAddFloat', + 'PbAddBool', + 'PbAddString', + 'PbAddColor', + 'PbAddAngle', + 'PbAddVector', + 'PbAddVector2D', + 'PbRemoveRepeatedFieldValue', + 'PbReadMessage', + 'PbReadRepeatedMessage', + 'PbAddMessage', + 'SetNextMap', + 'GetNextMap', + 'ForceChangeLevel', + 'GetMapHistorySize', + 'GetMapHistory', + 'GeoipCode2', + 'GeoipCode3', + 'GeoipCountry', + 'MarkNativeAsOptional', + 'RegClientCookie', + 'FindClientCookie', + 'SetClientCookie', + 'GetClientCookie', + 'SetAuthIdCookie', + 'AreClientCookiesCached', + 'OnClientCookiesCached', + 'CookieMenuHandler', + 'SetCookiePrefabMenu', + 'SetCookieMenuItem', + 'ShowCookieMenu', + 'GetCookieIterator', + 'ReadCookieIterator', + 'GetCookieAccess', + 'GetClientCookieTime', + 'LoadTranslations', + 'SetGlobalTransTarget', + 'GetClientLanguage', + 'GetServerLanguage', + 'GetLanguageCount', + 'GetLanguageInfo', + 'SetClientLanguage', + 'GetLanguageByCode', + 'GetLanguageByName', + 'CS_OnBuyCommand', + 'CS_OnCSWeaponDrop', + 'CS_OnGetWeaponPrice', + 'CS_OnTerminateRound', + 'CS_RespawnPlayer', + 'CS_SwitchTeam', + 'CS_DropWeapon', + 'CS_TerminateRound', + 'CS_GetTranslatedWeaponAlias', + 'CS_GetWeaponPrice', + 'CS_GetClientClanTag', + 'CS_SetClientClanTag', + 'CS_GetTeamScore', + 'CS_SetTeamScore', + 'CS_GetMVPCount', + 'CS_SetMVPCount', + 'CS_GetClientContributionScore', + 'CS_SetClientContributionScore', + 'CS_GetClientAssists', + 'CS_SetClientAssists', + 'CS_AliasToWeaponID', + 'CS_WeaponIDToAlias', + 'CS_IsValidWeaponID', + 'CS_UpdateClientModel', + 'LogToGame', + 'SetRandomSeed', + 'GetRandomFloat', + 'GetRandomInt', + 'IsMapValid', + 'IsDedicatedServer', + 'GetEngineTime', + 'GetGameTime', + 'GetGameTickCount', + 'GetGameDescription', + 'GetGameFolderName', + 'GetCurrentMap', + 'PrecacheModel', + 'PrecacheSentenceFile', + 'PrecacheDecal', + 'PrecacheGeneric', + 'IsModelPrecached', + 'IsDecalPrecached', + 'IsGenericPrecached', + 'PrecacheSound', + 'IsSoundPrecached', + 'CreateDialog', + 'GetEngineVersion', + 'PrintToChat', + 'PrintToChatAll', + 'PrintCenterText', + 'PrintCenterTextAll', + 'PrintHintText', + 'PrintHintTextToAll', + 'ShowVGUIPanel', + 'CreateHudSynchronizer', + 'SetHudTextParams', + 'SetHudTextParamsEx', + 'ShowSyncHudText', + 'ClearSyncHud', + 'ShowHudText', + 'ShowMOTDPanel', + 'DisplayAskConnectBox', + 'EntIndexToEntRef', + 'EntRefToEntIndex', + 'MakeCompatEntRef', + 'SetClientViewEntity', + 'SetLightStyle', + 'GetClientEyePosition', + 'CreateDataPack', + 'WritePackCell', + 'WritePackFloat', + 'WritePackString', + 'ReadPackCell', + 'ReadPackFloat', + 'ReadPackString', + 'ResetPack', + 'GetPackPosition', + 'SetPackPosition', + 'IsPackReadable', + 'LogMessage', + 'LogToFile', + 'LogToFileEx', + 'LogAction', + 'LogError', + 'OnLogAction', + 'GameLogHook', + 'AddGameLogHook', + 'RemoveGameLogHook', + 'FindTeamByName', + 'StartPrepSDKCall', + 'PrepSDKCall_SetVirtual', + 'PrepSDKCall_SetSignature', + 'PrepSDKCall_SetAddress', + 'PrepSDKCall_SetFromConf', + 'PrepSDKCall_SetReturnInfo', + 'PrepSDKCall_AddParameter', + 'EndPrepSDKCall', + 'SDKCall', + 'GetPlayerResourceEntity', +) + + +if __name__ == '__main__': # pragma: no cover + import re + from urllib.request import FancyURLopener + + from pygments.util import format_lines + + class Opener(FancyURLopener): + version = 'Mozilla/5.0 (Pygments Sourcemod Builtins Update)' + + opener = Opener() + + def get_version(): + f = opener.open('http://docs.sourcemod.net/api/index.php') + r = re.compile(r'SourceMod v\.([\d\.]+(?:-\w+)?)') + for line in f: + m = r.search(line.decode()) + if m is not None: + return m.groups()[0] + raise ValueError('No version in api docs') + + def get_sm_functions(): + f = opener.open('http://docs.sourcemod.net/api/SMfuncs.js') + r = re.compile(r'SMfunctions\[\d+\] = Array \("(?:public )?([^,]+)",".+"\);') + functions = [] + for line in f: + m = r.match(line.decode()) + if m is not None: + functions.append(m.groups()[0]) + return functions + + def regenerate(filename, natives): + with open(filename, encoding='utf-8') as fp: + content = fp.read() + + header = content[:content.find('FUNCTIONS = (')] + footer = content[content.find("if __name__ == '__main__':")-1:] + + + with open(filename, 'w', encoding='utf-8') as fp: + fp.write(header) + fp.write(format_lines('FUNCTIONS', natives)) + fp.write('\n\n' + footer) + + def run(): + version = get_version() + print(f'> Downloading function index for SourceMod {version}') + functions = get_sm_functions() + print('> %d functions found:' % len(functions)) + + functionlist = [] + for full_function_name in functions: + print(f'>> {full_function_name}') + functionlist.append(full_function_name) + + regenerate(__file__, functionlist) + + + run() diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/_vbscript_builtins.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/_vbscript_builtins.py new file mode 100644 index 0000000000000000000000000000000000000000..b1ae0ef02655a96109f031842d75a410d960950b --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/_vbscript_builtins.py @@ -0,0 +1,279 @@ +""" + pygments.lexers._vbscript_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + These are manually translated lists from + http://www.indusoft.com/pdf/VBScript%20Reference.pdf. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +KEYWORDS = [ + 'ByRef', + 'ByVal', + # dim: special rule + 'call', + 'case', + 'class', + # const: special rule + 'do', + 'each', + 'else', + 'elseif', + 'end', + 'erase', + 'execute', + 'function', + 'exit', + 'for', + 'function', + 'GetRef', + 'global', + 'if', + 'let', + 'loop', + 'next', + 'new', + # option: special rule + 'private', + 'public', + 'redim', + 'select', + 'set', + 'sub', + 'then', + 'wend', + 'while', + 'with', +] + +BUILTIN_FUNCTIONS = [ + 'Abs', + 'Array', + 'Asc', + 'Atn', + 'CBool', + 'CByte', + 'CCur', + 'CDate', + 'CDbl', + 'Chr', + 'CInt', + 'CLng', + 'Cos', + 'CreateObject', + 'CSng', + 'CStr', + 'Date', + 'DateAdd', + 'DateDiff', + 'DatePart', + 'DateSerial', + 'DateValue', + 'Day', + 'Eval', + 'Exp', + 'Filter', + 'Fix', + 'FormatCurrency', + 'FormatDateTime', + 'FormatNumber', + 'FormatPercent', + 'GetObject', + 'GetLocale', + 'Hex', + 'Hour', + 'InStr', + 'inStrRev', + 'Int', + 'IsArray', + 'IsDate', + 'IsEmpty', + 'IsNull', + 'IsNumeric', + 'IsObject', + 'Join', + 'LBound', + 'LCase', + 'Left', + 'Len', + 'LoadPicture', + 'Log', + 'LTrim', + 'Mid', + 'Minute', + 'Month', + 'MonthName', + 'MsgBox', + 'Now', + 'Oct', + 'Randomize', + 'RegExp', + 'Replace', + 'RGB', + 'Right', + 'Rnd', + 'Round', + 'RTrim', + 'ScriptEngine', + 'ScriptEngineBuildVersion', + 'ScriptEngineMajorVersion', + 'ScriptEngineMinorVersion', + 'Second', + 'SetLocale', + 'Sgn', + 'Space', + 'Split', + 'Sqr', + 'StrComp', + 'String', + 'StrReverse', + 'Tan', + 'Time', + 'Timer', + 'TimeSerial', + 'TimeValue', + 'Trim', + 'TypeName', + 'UBound', + 'UCase', + 'VarType', + 'Weekday', + 'WeekdayName', + 'Year', +] + +BUILTIN_VARIABLES = [ + 'Debug', + 'Dictionary', + 'Drive', + 'Drives', + 'Err', + 'File', + 'Files', + 'FileSystemObject', + 'Folder', + 'Folders', + 'Match', + 'Matches', + 'RegExp', + 'Submatches', + 'TextStream', +] + +OPERATORS = [ + '+', + '-', + '*', + '/', + '\\', + '^', + '|', + '<', + '<=', + '>', + '>=', + '=', + '<>', + '&', + '$', +] + +OPERATOR_WORDS = [ + 'mod', + 'and', + 'or', + 'xor', + 'eqv', + 'imp', + 'is', + 'not', +] + +BUILTIN_CONSTANTS = [ + 'False', + 'True', + 'vbAbort', + 'vbAbortRetryIgnore', + 'vbApplicationModal', + 'vbArray', + 'vbBinaryCompare', + 'vbBlack', + 'vbBlue', + 'vbBoole', + 'vbByte', + 'vbCancel', + 'vbCr', + 'vbCritical', + 'vbCrLf', + 'vbCurrency', + 'vbCyan', + 'vbDataObject', + 'vbDate', + 'vbDefaultButton1', + 'vbDefaultButton2', + 'vbDefaultButton3', + 'vbDefaultButton4', + 'vbDouble', + 'vbEmpty', + 'vbError', + 'vbExclamation', + 'vbFalse', + 'vbFirstFullWeek', + 'vbFirstJan1', + 'vbFormFeed', + 'vbFriday', + 'vbGeneralDate', + 'vbGreen', + 'vbIgnore', + 'vbInformation', + 'vbInteger', + 'vbLf', + 'vbLong', + 'vbLongDate', + 'vbLongTime', + 'vbMagenta', + 'vbMonday', + 'vbMsgBoxHelpButton', + 'vbMsgBoxRight', + 'vbMsgBoxRtlReading', + 'vbMsgBoxSetForeground', + 'vbNewLine', + 'vbNo', + 'vbNull', + 'vbNullChar', + 'vbNullString', + 'vbObject', + 'vbObjectError', + 'vbOK', + 'vbOKCancel', + 'vbOKOnly', + 'vbQuestion', + 'vbRed', + 'vbRetry', + 'vbRetryCancel', + 'vbSaturday', + 'vbShortDate', + 'vbShortTime', + 'vbSingle', + 'vbString', + 'vbSunday', + 'vbSystemModal', + 'vbTab', + 'vbTextCompare', + 'vbThursday', + 'vbTrue', + 'vbTuesday', + 'vbUseDefault', + 'vbUseSystem', + 'vbUseSystem', + 'vbVariant', + 'vbVerticalTab', + 'vbWednesday', + 'vbWhite', + 'vbYellow', + 'vbYes', + 'vbYesNo', + 'vbYesNoCancel', +] diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/amdgpu.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/amdgpu.py new file mode 100644 index 0000000000000000000000000000000000000000..c97ad617ef3784e538334bbc2164282dbebb264a --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/amdgpu.py @@ -0,0 +1,54 @@ +""" + pygments.lexers.amdgpu + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for the AMDGPU ISA assembly. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, words +from pygments.token import Name, Text, Keyword, Whitespace, Number, Comment + +import re + +__all__ = ['AMDGPULexer'] + + +class AMDGPULexer(RegexLexer): + """ + For AMD GPU assembly. + """ + name = 'AMDGPU' + aliases = ['amdgpu'] + filenames = ['*.isa'] + url = 'https://gpuopen.com/amd-isa-documentation' + version_added = '2.8' + + flags = re.IGNORECASE + + tokens = { + 'root': [ + (r'\s+', Whitespace), + (r'[\r\n]+', Text), + (r'(([a-z_0-9])*:([a-z_0-9])*)', Name.Attribute), + (r'(\[|\]|\(|\)|,|\:|\&)', Text), + (r'([;#]|//).*?\n', Comment.Single), + (r'((s_)?(scratch|ds|buffer|flat|image)_[a-z0-9_]+)', Keyword.Reserved), + (r'(_lo|_hi)', Name.Variable), + (r'(vmcnt|lgkmcnt|expcnt)', Name.Attribute), + (r'(attr[0-9].[a-z])', Name.Attribute), + (words(( + 'op', 'vaddr', 'vdata', 'off', 'soffset', 'srsrc', 'format', + 'offset', 'offen', 'idxen', 'glc', 'dlc', 'slc', 'tfe', 'lds', + 'lit', 'unorm'), suffix=r'\b'), Name.Attribute), + (r'(label_[a-z0-9]+)', Keyword), + (r'(_L[0-9]*)', Name.Variable), + (r'(s|v)_[a-z0-9_]+', Keyword), + (r'(v[0-9.]+|vcc|exec|v)', Name.Variable), + (r's[0-9.]+|s', Name.Variable), + (r'[0-9]+\.[^0-9]+', Number.Float), + (r'(0[xX][a-z0-9]+)|([0-9]+)', Number.Integer) + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/apdlexer.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/apdlexer.py new file mode 100644 index 0000000000000000000000000000000000000000..98beedfbe7059098a20ee81ab62ea117ff898de1 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/apdlexer.py @@ -0,0 +1,593 @@ +""" + pygments.lexers.apdlexer + ~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for ANSYS Parametric Design Language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, words, default +from pygments.token import Comment, Keyword, Name, Number, Operator, \ + String, Generic, Punctuation, Whitespace, Escape + +__all__ = ['apdlexer'] + + +class apdlexer(RegexLexer): + """ + For APDL source code. + """ + name = 'ANSYS parametric design language' + aliases = ['ansys', 'apdl'] + filenames = ['*.ans'] + url = 'https://www.ansys.com' + version_added = '2.9' + + flags = re.IGNORECASE + + # list of elements + elafunb = ("SURF152", "SURF153", "SURF154", "SURF156", "SHELL157", + "SURF159", "LINK160", "BEAM161", "PLANE162", + "SHELL163", "SOLID164", "COMBI165", "MASS166", + "LINK167", "SOLID168", "TARGE169", "TARGE170", + "CONTA171", "CONTA172", "CONTA173", "CONTA174", + "CONTA175", "CONTA176", "CONTA177", "CONTA178", + "PRETS179", "LINK180", "SHELL181", "PLANE182", + "PLANE183", "MPC184", "SOLID185", "SOLID186", + "SOLID187", "BEAM188", "BEAM189", "SOLSH190", + "INTER192", "INTER193", "INTER194", "INTER195", + "MESH200", "FOLLW201", "INTER202", "INTER203", + "INTER204", "INTER205", "SHELL208", "SHELL209", + "CPT212", "CPT213", "COMBI214", "CPT215", "CPT216", + "CPT217", "FLUID220", "FLUID221", "PLANE223", + "SOLID226", "SOLID227", "PLANE230", "SOLID231", + "SOLID232", "PLANE233", "SOLID236", "SOLID237", + "PLANE238", "SOLID239", "SOLID240", "HSFLD241", + "HSFLD242", "SURF251", "SURF252", "REINF263", + "REINF264", "REINF265", "SOLID272", "SOLID273", + "SOLID278", "SOLID279", "SHELL281", "SOLID285", + "PIPE288", "PIPE289", "ELBOW290", "USER300", "BEAM3", + "BEAM4", "BEAM23", "BEAM24", "BEAM44", "BEAM54", + "COMBIN7", "FLUID79", "FLUID80", "FLUID81", "FLUID141", + "FLUID142", "INFIN9", "INFIN47", "PLANE13", "PLANE25", + "PLANE42", "PLANE53", "PLANE67", "PLANE82", "PLANE83", + "PLANE145", "PLANE146", "CONTAC12", "CONTAC52", + "LINK1", "LINK8", "LINK10", "LINK32", "PIPE16", + "PIPE17", "PIPE18", "PIPE20", "PIPE59", "PIPE60", + "SHELL41", "SHELL43", "SHELL57", "SHELL63", "SHELL91", + "SHELL93", "SHELL99", "SHELL150", "SOLID5", "SOLID45", + "SOLID46", "SOLID65", "SOLID69", "SOLID92", "SOLID95", + "SOLID117", "SOLID127", "SOLID128", "SOLID147", + "SOLID148", "SOLID191", "VISCO88", "VISCO89", + "VISCO106", "VISCO107", "VISCO108", "TRANS109") + + elafunc = ("PGRAPH", "/VT", "VTIN", "VTRFIL", "VTTEMP", "PGRSET", + "VTCLR", "VTMETH", "VTRSLT", "VTVMOD", "PGSELE", + "VTDISC", "VTMP", "VTSEC", "PGWRITE", "VTEVAL", "VTOP", + "VTSFE", "POUTRES", "VTFREQ", "VTPOST", "VTSL", + "FLDATA1-40", "HFPCSWP", "MSDATA", "MSVARY", "QFACT", + "FLOCHECK", "HFPOWER", "MSMASS", "PERI", "SPADP", + "FLREAD", "HFPORT", "MSMETH", "PLFSS", "SPARM", + "FLOTRAN", "HFSCAT", "MSMIR", "PLSCH", "SPFSS", + "HFADP", "ICE", "MSNOMF", "PLSYZ", "SPICE", "HFARRAY", + "ICEDELE", "MSPROP", "PLTD", "SPSCAN", "HFDEEM", + "ICELIST", "MSQUAD", "PLTLINE", "SPSWP", "HFEIGOPT", + "ICVFRC", "MSRELAX", "PLVFRC", "HFEREFINE", "LPRT", + "MSSOLU", "/PICE", "HFMODPRT", "MSADV", "MSSPEC", + "PLWAVE", "HFPA", "MSCAP", "MSTERM", "PRSYZ") + + elafund = ("*VOPER", "VOVLAP", "*VPLOT", "VPLOT", "VPTN", "*VPUT", + "VPUT", "*VREAD", "VROTAT", "VSBA", "VSBV", "VSBW", + "/VSCALE", "*VSCFUN", "VSEL", "VSLA", "*VSTAT", "VSUM", + "VSWEEP", "VSYMM", "VTRAN", "VTYPE", "/VUP", "*VWRITE", + "/WAIT", "WAVES", "WERASE", "WFRONT", "/WINDOW", + "WMID", "WMORE", "WPAVE", "WPCSYS", "WPLANE", "WPOFFS", + "WPROTA", "WPSTYL", "WRFULL", "WRITE", "WRITEMAP", + "*WRK", "WSORT", "WSPRINGS", "WSTART", "WTBCREATE", + "XFDATA", "XFENRICH", "XFLIST", "/XFRM", "/XRANGE", + "XVAR", "/YRANGE", "/ZOOM", "/WB", "XMLO", "/XML", + "CNTR", "EBLOCK", "CMBLOCK", "NBLOCK", "/TRACK", + "CWZPLOT", "~EUI", "NELE", "EALL", "NALL", "FLITEM", + "LSLN", "PSOLVE", "ASLN", "/VERIFY", "/SSS", "~CFIN", + "*EVAL", "*MOONEY", "/RUNSTAT", "ALPFILL", + "ARCOLLAPSE", "ARDETACH", "ARFILL", "ARMERGE", + "ARSPLIT", "FIPLOT", "GAPFINISH", "GAPLIST", + "GAPMERGE", "GAPOPT", "GAPPLOT", "LNCOLLAPSE", + "LNDETACH", "LNFILL", "LNMERGE", "LNSPLIT", "PCONV", + "PLCONV", "PEMOPTS", "PEXCLUDE", "PINCLUDE", "PMETH", + "/PMETH", "PMOPTS", "PPLOT", "PPRANGE", "PRCONV", + "PRECISION", "RALL", "RFILSZ", "RITER", "RMEMRY", + "RSPEED", "RSTAT", "RTIMST", "/RUNST", "RWFRNT", + "SARPLOT", "SHSD", "SLPPLOT", "SLSPLOT", "VCVFILL", + "/OPT", "OPEQN", "OPFACT", "OPFRST", "OPGRAD", + "OPKEEP", "OPLOOP", "OPPRNT", "OPRAND", "OPSUBP", + "OPSWEEP", "OPTYPE", "OPUSER", "OPVAR", "OPADD", + "OPCLR", "OPDEL", "OPMAKE", "OPSEL", "OPANL", "OPDATA", + "OPRESU", "OPSAVE", "OPEXE", "OPLFA", "OPLGR", + "OPLIST", "OPLSW", "OPRFA", "OPRGR", "OPRSW", + "PILECALC", "PILEDISPSET", "PILEGEN", "PILELOAD", + "PILEMASS", "PILERUN", "PILESEL", "PILESTIF", + "PLVAROPT", "PRVAROPT", "TOCOMP", "TODEF", "TOFREQ", + "TOTYPE", "TOVAR", "TOEXE", "TOLOOP", "TOGRAPH", + "TOLIST", "TOPLOT", "TOPRINT", "TOSTAT", "TZAMESH", + "TZDELE", "TZEGEN", "XVAROPT", "PGSAVE", "SOLCONTROL", + "TOTAL", "VTGEOM", "VTREAL", "VTSTAT") + + elafune = ("/ANUM", "AOFFST", "AOVLAP", "APLOT", "APPEND", "APTN", + "ARCLEN", "ARCTRM", "AREAS", "AREFINE", "AREMESH", + "AREVERSE", "AROTAT", "ARSCALE", "ARSYM", "ASBA", + "ASBL", "ASBV", "ASBW", "ASCRES", "ASEL", "ASIFILE", + "*ASK", "ASKIN", "ASLL", "ASLV", "ASOL", "/ASSIGN", + "ASUB", "ASUM", "ATAN", "ATRAN", "ATYPE", "/AUTO", + "AUTOTS", "/AUX2", "/AUX3", "/AUX12", "/AUX15", + "AVPRIN", "AVRES", "AWAVE", "/AXLAB", "*AXPY", + "/BATCH", "BCSOPTION", "BETAD", "BF", "BFA", "BFADELE", + "BFALIST", "BFCUM", "BFDELE", "BFE", "BFECUM", + "BFEDELE", "BFELIST", "BFESCAL", "BFINT", "BFK", + "BFKDELE", "BFKLIST", "BFL", "BFLDELE", "BFLIST", + "BFLLIST", "BFSCALE", "BFTRAN", "BFUNIF", "BFV", + "BFVDELE", "BFVLIST", "BIOOPT", "BIOT", "BLC4", "BLC5", + "BLOCK", "BOOL", "BOPTN", "BSAX", "BSMD", "BSM1", + "BSM2", "BSPLIN", "BSS1", "BSS2", "BSTE", "BSTQ", + "BTOL", "BUCOPT", "C", "CALC", "CAMPBELL", "CBDOF", + "CBMD", "CBMX", "CBTE", "CBTMP", "CDOPT", "CDREAD", + "CDWRITE", "CE", "CECHECK", "CECMOD", "CECYC", + "CEDELE", "CEINTF", "CELIST", "CENTER", "CEQN", + "CERIG", "CESGEN", "CFACT", "*CFCLOS", "*CFOPEN", + "*CFWRITE", "/CFORMAT", "CGLOC", "CGOMGA", "CGROW", + "CHECK", "CHKMSH", "CINT", "CIRCLE", "CISOL", + "/CLABEL", "/CLEAR", "CLOCAL", "CLOG", "/CLOG", + "CLRMSHLN", "CM", "CMACEL", "/CMAP", "CMATRIX", + "CMDELE", "CMDOMEGA", "CMEDIT", "CMGRP", "CMLIST", + "CMMOD", "CMOMEGA", "CMPLOT", "CMROTATE", "CMSEL", + "CMSFILE", "CMSOPT", "CMWRITE", "CNCHECK", "CNKMOD", + "CNTR", "CNVTOL", "/COLOR", "*COMP", "COMBINE", + "COMPRESS", "CON4", "CONE", "/CONFIG", "CONJUG", + "/CONTOUR", "/COPY", "CORIOLIS", "COUPLE", "COVAL", + "CP", "CPCYC", "CPDELE", "CPINTF", "/CPLANE", "CPLGEN", + "CPLIST", "CPMERGE", "CPNGEN", "CPSGEN", "CQC", + "*CREATE", "CRPLIM", "CS", "CSCIR", "CSDELE", "CSKP", + "CSLIST", "CSWPLA", "CSYS", "/CTYPE", "CURR2D", + "CUTCONTROL", "/CVAL", "CVAR", "/CWD", "CYCCALC", + "/CYCEXPAND", "CYCFILES", "CYCFREQ", "*CYCLE", + "CYCLIC", "CYCOPT", "CYCPHASE", "CYCSPEC", "CYL4", + "CYL5", "CYLIND", "CZDEL", "CZMESH", "D", "DA", + "DADELE", "DALIST", "DAMORPH", "DATA", "DATADEF", + "DCGOMG", "DCUM", "DCVSWP", "DDASPEC", "DDELE", + "DDOPTION", "DEACT", "DEFINE", "*DEL", "DELETE", + "/DELETE", "DELTIM", "DELTIME", "DEMORPH", "DERIV", "DESIZE", + "DESOL", "DETAB", "/DEVDISP", "/DEVICE", "/DFLAB", + "DFLX", "DFSWAVE", "DIG", "DIGIT", "*DIM", + "/DIRECTORY", "DISPLAY", "/DIST", "DJ", "DJDELE", + "DJLIST", "DK", "DKDELE", "DKLIST", "DL", "DLDELE", + "DLIST", "DLLIST", "*DMAT", "DMOVE", "DMPEXT", + "DMPOPTION", "DMPRAT", "DMPSTR", "DNSOL", "*DO", "DOF", + "DOFSEL", "DOMEGA", "*DOT", "*DOWHILE", "DSCALE", + "/DSCALE", "DSET", "DSPOPTION", "DSUM", "DSURF", + "DSYM", "DSYS", "DTRAN", "DUMP", "/DV3D", "DVAL", + "DVMORPH", "DYNOPT", "E", "EALIVE", "EDADAPT", "EDALE", + "EDASMP", "EDBOUND", "EDBX", "EDBVIS", "EDCADAPT", + "EDCGEN", "EDCLIST", "EDCMORE", "EDCNSTR", "EDCONTACT", + "EDCPU", "EDCRB", "EDCSC", "EDCTS", "EDCURVE", + "EDDAMP", "EDDBL", "EDDC", "EDDRELAX", "EDDUMP", + "EDELE", "EDENERGY", "EDFPLOT", "EDGCALE", "/EDGE", + "EDHGLS", "EDHIST", "EDHTIME", "EDINT", "EDIPART", + "EDIS", "EDLCS", "EDLOAD", "EDMP", "EDNB", "EDNDTSD", + "EDNROT", "EDOPT", "EDOUT", "EDPART", "EDPC", "EDPL", + "EDPVEL", "EDRC", "EDRD", "EDREAD", "EDRI", "EDRST", + "EDRUN", "EDSHELL", "EDSOLV", "EDSP", "EDSTART", + "EDTERM", "EDTP", "EDVEL", "EDWELD", "EDWRITE", + "EEXTRUDE", "/EFACET", "EGEN", "*EIGEN", "EINFIN", + "EINTF", "EKILL", "ELBOW", "ELEM", "ELIST", "*ELSE", + "*ELSEIF", "EMAGERR", "EMATWRITE", "EMF", "EMFT", + "EMID", "EMIS", "EMODIF", "EMORE", "EMSYM", "EMTGEN", + "EMUNIT", "EN", "*END", "*ENDDO", "*ENDIF", + "ENDRELEASE", "ENERSOL", "ENGEN", "ENORM", "ENSYM", + "EORIENT", "EPLOT", "EQSLV", "ERASE", "/ERASE", + "EREAD", "EREFINE", "EREINF", "ERESX", "ERNORM", + "ERRANG", "ESCHECK", "ESEL", "/ESHAPE", "ESIZE", + "ESLA", "ESLL", "ESLN", "ESLV", "ESOL", "ESORT", + "ESSOLV", "ESTIF", "ESURF", "ESYM", "ESYS", "ET", + "ETABLE", "ETCHG", "ETCONTROL", "ETDELE", "ETLIST", + "ETYPE", "EUSORT", "EWRITE", "*EXIT", "/EXIT", "EXP", + "EXPAND", "/EXPAND", "EXPASS", "*EXPORT", "EXPROFILE", + "EXPSOL", "EXTOPT", "EXTREM", "EXUNIT", "F", "/FACET", + "FATIGUE", "FC", "FCCHECK", "FCDELE", "FCLIST", "FCUM", + "FCTYP", "FDELE", "/FDELE", "FE", "FEBODY", "FECONS", + "FEFOR", "FELIST", "FESURF", "*FFT", "FILE", + "FILEAUX2", "FILEAUX3", "FILEDISP", "FILL", "FILLDATA", + "/FILNAME", "FINISH", "FITEM", "FJ", "FJDELE", + "FJLIST", "FK", "FKDELE", "FKLIST", "FL", "FLIST", + "FLLIST", "FLST", "FLUXV", "FLUREAD", "FMAGBC", + "FMAGSUM", "/FOCUS", "FOR2D", "FORCE", "FORM", + "/FORMAT", "FP", "FPLIST", "*FREE", "FREQ", "FRQSCL", + "FS", "FSCALE", "FSDELE", "FSLIST", "FSNODE", "FSPLOT", + "FSSECT", "FSSPARM", "FSUM", "FTCALC", "FTRAN", + "FTSIZE", "FTWRITE", "FTYPE", "FVMESH", "GAP", "GAPF", + "GAUGE", "GCDEF", "GCGEN", "/GCMD", "/GCOLUMN", + "GENOPT", "GEOM", "GEOMETRY", "*GET", "/GFILE", + "/GFORMAT", "/GLINE", "/GMARKER", "GMATRIX", "GMFACE", + "*GO", "/GO", "/GOLIST", "/GOPR", "GP", "GPDELE", + "GPLIST", "GPLOT", "/GRAPHICS", "/GRESUME", "/GRID", + "/GROPT", "GRP", "/GRTYP", "/GSAVE", "GSBDATA", + "GSGDATA", "GSLIST", "GSSOL", "/GST", "GSUM", "/GTHK", + "/GTYPE", "HARFRQ", "/HBC", "HBMAT", "/HEADER", "HELP", + "HELPDISP", "HEMIOPT", "HFANG", "HFSYM", "HMAGSOLV", + "HPGL", "HPTCREATE", "HPTDELETE", "HRCPLX", "HREXP", + "HROPT", "HROCEAN", "HROUT", "IC", "ICDELE", "ICLIST", + "/ICLWID", "/ICSCALE", "*IF", "IGESIN", "IGESOUT", + "/IMAGE", "IMAGIN", "IMESH", "IMMED", "IMPD", + "INISTATE", "*INIT", "/INPUT", "/INQUIRE", "INRES", + "INRTIA", "INT1", "INTSRF", "IOPTN", "IRLF", "IRLIST", + "*ITENGINE", "JPEG", "JSOL", "K", "KATT", "KBC", + "KBETW", "KCALC", "KCENTER", "KCLEAR", "KDELE", + "KDIST", "KEEP", "KESIZE", "KEYOPT", "KEYPTS", "KEYW", + "KFILL", "KGEN", "KL", "KLIST", "KMESH", "KMODIF", + "KMOVE", "KNODE", "KPLOT", "KPSCALE", "KREFINE", + "KSCALE", "KSCON", "KSEL", "KSLL", "KSLN", "KSUM", + "KSYMM", "KTRAN", "KUSE", "KWPAVE", "KWPLAN", "L", + "L2ANG", "L2TAN", "LANG", "LARC", "/LARC", "LAREA", + "LARGE", "LATT", "LAYER", "LAYERP26", "LAYLIST", + "LAYPLOT", "LCABS", "LCASE", "LCCALC", "LCCAT", + "LCDEF", "LCFACT", "LCFILE", "LCLEAR", "LCOMB", + "LCOPER", "LCSEL", "LCSL", "LCSUM", "LCWRITE", + "LCZERO", "LDELE", "LDIV", "LDRAG", "LDREAD", "LESIZE", + "LEXTND", "LFILLT", "LFSURF", "LGEN", "LGLUE", + "LGWRITE", "/LIGHT", "LINA", "LINE", "/LINE", "LINES", + "LINL", "LINP", "LINV", "LIST", "*LIST", "LLIST", + "LMATRIX", "LMESH", "LNSRCH", "LOCAL", "LOVLAP", + "LPLOT", "LPTN", "LREFINE", "LREVERSE", "LROTAT", + "LSBA", "*LSBAC", "LSBL", "LSBV", "LSBW", "LSCLEAR", + "LSDELE", "*LSDUMP", "LSEL", "*LSENGINE", "*LSFACTOR", + "LSLA", "LSLK", "LSOPER", "/LSPEC", "LSREAD", + "*LSRESTORE", "LSSCALE", "LSSOLVE", "LSTR", "LSUM", + "LSWRITE", "/LSYMBOL", "LSYMM", "LTAN", "LTRAN", + "LUMPM", "LVSCALE", "LWPLAN", "M", "MADAPT", "MAGOPT", + "MAGSOLV", "/MAIL", "MAP", "/MAP", "MAP2DTO3D", + "MAPSOLVE", "MAPVAR", "MASTER", "MAT", "MATER", + "MCHECK", "MDAMP", "MDELE", "MDPLOT", "MEMM", "/MENU", + "MESHING", "MFANALYSIS", "MFBUCKET", "MFCALC", "MFCI", + "MFCLEAR", "MFCMMAND", "MFCONV", "MFDTIME", "MFELEM", + "MFEM", "MFEXTER", "MFFNAME", "MFFR", "MFIMPORT", + "MFINTER", "MFITER", "MFLCOMM", "MFLIST", "MFMAP", + "MFORDER", "MFOUTPUT", "*MFOURI", "MFPSIMUL", "MFRC", + "MFRELAX", "MFRSTART", "MFSORDER", "MFSURFACE", + "MFTIME", "MFTOL", "*MFUN", "MFVOLUME", "MFWRITE", + "MGEN", "MIDTOL", "/MKDIR", "MLIST", "MMASS", "MMF", + "MODCONT", "MODE", "MODIFY", "MODMSH", "MODSELOPTION", + "MODOPT", "MONITOR", "*MOPER", "MOPT", "MORPH", "MOVE", + "MP", "MPAMOD", "MPCHG", "MPCOPY", "MPDATA", "MPDELE", + "MPDRES", "/MPLIB", "MPLIST", "MPPLOT", "MPREAD", + "MPRINT", "MPTEMP", "MPTGEN", "MPTRES", "MPWRITE", + "/MREP", "MSAVE", "*MSG", "MSHAPE", "MSHCOPY", + "MSHKEY", "MSHMID", "MSHPATTERN", "MSOLVE", "/MSTART", + "MSTOLE", "*MULT", "*MWRITE", "MXPAND", "N", "NANG", + "NAXIS", "NCNV", "NDELE", "NDIST", "NDSURF", "NEQIT", + "/NERR", "NFORCE", "NGEN", "NKPT", "NLADAPTIVE", + "NLDIAG", "NLDPOST", "NLGEOM", "NLHIST", "NLIST", + "NLMESH", "NLOG", "NLOPT", "NMODIF", "NOCOLOR", + "NODES", "/NOERASE", "/NOLIST", "NOOFFSET", "NOORDER", + "/NOPR", "NORA", "NORL", "/NORMAL", "NPLOT", "NPRINT", + "NREAD", "NREFINE", "NRLSUM", "*NRM", "NROPT", + "NROTAT", "NRRANG", "NSCALE", "NSEL", "NSLA", "NSLE", + "NSLK", "NSLL", "NSLV", "NSMOOTH", "NSOL", "NSORT", + "NSTORE", "NSUBST", "NSVR", "NSYM", "/NUMBER", + "NUMCMP", "NUMEXP", "NUMMRG", "NUMOFF", "NUMSTR", + "NUMVAR", "NUSORT", "NWPAVE", "NWPLAN", "NWRITE", + "OCDATA", "OCDELETE", "OCLIST", "OCREAD", "OCTABLE", + "OCTYPE", "OCZONE", "OMEGA", "OPERATE", "OPNCONTROL", + "OUTAERO", "OUTOPT", "OUTPR", "/OUTPUT", "OUTRES", + "OVCHECK", "PADELE", "/PAGE", "PAGET", "PAPUT", + "PARESU", "PARTSEL", "PARRES", "PARSAV", "PASAVE", + "PATH", "PAUSE", "/PBC", "/PBF", "PCALC", "PCGOPT", + "PCIRC", "/PCIRCLE", "/PCOPY", "PCROSS", "PDANL", + "PDCDF", "PDCFLD", "PDCLR", "PDCMAT", "PDCORR", + "PDDMCS", "PDDOEL", "PDEF", "PDEXE", "PDHIST", + "PDINQR", "PDLHS", "PDMETH", "PDOT", "PDPINV", + "PDPLOT", "PDPROB", "PDRESU", "PDROPT", "/PDS", + "PDSAVE", "PDSCAT", "PDSENS", "PDSHIS", "PDUSER", + "PDVAR", "PDWRITE", "PERBC2D", "PERTURB", "PFACT", + "PHYSICS", "PIVCHECK", "PLCAMP", "PLCFREQ", "PLCHIST", + "PLCINT", "PLCPLX", "PLCRACK", "PLDISP", "PLESOL", + "PLETAB", "PLFAR", "PLF2D", "PLGEOM", "PLLS", "PLMAP", + "PLMC", "PLNEAR", "PLNSOL", "/PLOPTS", "PLORB", "PLOT", + "PLOTTING", "PLPAGM", "PLPATH", "PLSECT", "PLST", + "PLTIME", "PLTRAC", "PLVAR", "PLVECT", "PLZZ", + "/PMACRO", "PMAP", "PMGTRAN", "PMLOPT", "PMLSIZE", + "/PMORE", "PNGR", "/PNUM", "POINT", "POLY", "/POLYGON", + "/POST1", "/POST26", "POWERH", "PPATH", "PRANGE", + "PRAS", "PRCAMP", "PRCINT", "PRCPLX", "PRED", + "PRENERGY", "/PREP7", "PRERR", "PRESOL", "PRETAB", + "PRFAR", "PRI2", "PRIM", "PRINT", "*PRINT", "PRISM", + "PRITER", "PRJSOL", "PRNEAR", "PRNLD", "PRNSOL", + "PROD", "PRORB", "PRPATH", "PRRFOR", "PRRSOL", + "PRSCONTROL", "PRSECT", "PRTIME", "PRVAR", "PRVECT", + "PSCONTROL", "PSCR", "PSDCOM", "PSDFRQ", "PSDGRAPH", + "PSDRES", "PSDSPL", "PSDUNIT", "PSDVAL", "PSDWAV", + "/PSEARCH", "PSEL", "/PSF", "PSMAT", "PSMESH", + "/PSPEC", "/PSTATUS", "PSTRES", "/PSYMB", "PTR", + "PTXY", "PVECT", "/PWEDGE", "QDVAL", "QRDOPT", "QSOPT", + "QUAD", "/QUIT", "QUOT", "R", "RACE", "RADOPT", + "RAPPND", "RATE", "/RATIO", "RBE3", "RCON", "RCYC", + "RDEC", "RDELE", "READ", "REAL", "REALVAR", "RECTNG", + "REMESH", "/RENAME", "REORDER", "*REPEAT", "/REPLOT", + "RESCOMBINE", "RESCONTROL", "RESET", "/RESET", "RESP", + "RESUME", "RESVEC", "RESWRITE", "*RETURN", "REXPORT", + "REZONE", "RFORCE", "/RGB", "RIGID", "RIGRESP", + "RIMPORT", "RLIST", "RMALIST", "RMANL", "RMASTER", + "RMCAP", "RMCLIST", "/RMDIR", "RMFLVEC", "RMLVSCALE", + "RMMLIST", "RMMRANGE", "RMMSELECT", "RMNDISP", + "RMNEVEC", "RMODIF", "RMORE", "RMPORDER", "RMRESUME", + "RMRGENERATE", "RMROPTIONS", "RMRPLOT", "RMRSTATUS", + "RMSAVE", "RMSMPLE", "RMUSE", "RMXPORT", "ROCK", + "ROSE", "RPOLY", "RPR4", "RPRISM", "RPSD", "RSFIT", + "RSOPT", "RSPLIT", "RSPLOT", "RSPRNT", "RSSIMS", + "RSTMAC", "RSTOFF", "RSURF", "RSYMM", "RSYS", "RTHICK", + "SABS", "SADD", "SALLOW", "SAVE", "SBCLIST", "SBCTRAN", + "SDELETE", "SE", "SECCONTROL", "SECDATA", + "SECFUNCTION", "SECJOINT", "/SECLIB", "SECLOCK", + "SECMODIF", "SECNUM", "SECOFFSET", "SECPLOT", + "SECREAD", "SECSTOP", "SECTYPE", "SECWRITE", "SED", + "SEDLIST", "SEEXP", "/SEG", "SEGEN", "SELIST", "SELM", + "SELTOL", "SENERGY", "SEOPT", "SESYMM", "*SET", "SET", + "SETFGAP", "SETRAN", "SEXP", "SF", "SFA", "SFACT", + "SFADELE", "SFALIST", "SFBEAM", "SFCALC", "SFCUM", + "SFDELE", "SFE", "SFEDELE", "SFELIST", "SFFUN", + "SFGRAD", "SFL", "SFLDELE", "SFLEX", "SFLIST", + "SFLLIST", "SFSCALE", "SFTRAN", "/SHADE", "SHELL", + "/SHOW", "/SHOWDISP", "SHPP", "/SHRINK", "SLIST", + "SLOAD", "SMALL", "*SMAT", "SMAX", "/SMBC", "SMBODY", + "SMCONS", "SMFOR", "SMIN", "SMOOTH", "SMRTSIZE", + "SMSURF", "SMULT", "SNOPTION", "SOLU", "/SOLU", + "SOLUOPT", "SOLVE", "SORT", "SOURCE", "SPACE", + "SPCNOD", "SPCTEMP", "SPDAMP", "SPEC", "SPFREQ", + "SPGRAPH", "SPH4", "SPH5", "SPHERE", "SPLINE", "SPLOT", + "SPMWRITE", "SPOINT", "SPOPT", "SPREAD", "SPTOPT", + "SPOWER", "SPUNIT", "SPVAL", "SQRT", "*SREAD", "SRSS", + "SSBT", "/SSCALE", "SSLN", "SSMT", "SSPA", "SSPB", + "SSPD", "SSPE", "SSPM", "SSUM", "SSTATE", "STABILIZE", + "STAOPT", "STAT", "*STATUS", "/STATUS", "STEF", + "STORE", "SUBOPT", "SUBSET", "SUCALC", + "SUCR", "SUDEL", "SUEVAL", "SUGET", "SUMAP", "SUMTYPE", + "SUPL", "SUPR", "SURESU", "SUSAVE", "SUSEL", "SUVECT", + "SV", "SVPLOT", "SVTYP", "SWADD", "SWDEL", "SWGEN", + "SWLIST", "SYNCHRO", "/SYP", "/SYS", "TALLOW", + "TARGET", "*TAXIS", "TB", "TBCOPY", "TBDATA", "TBDELE", + "TBEO", "TBIN", "TBFIELD", "TBFT", "TBLE", "TBLIST", + "TBMODIF", "TBPLOT", "TBPT", "TBTEMP", "TCHG", "/TEE", + "TERM", "THEXPAND", "THOPT", "TIFF", "TIME", + "TIMERANGE", "TIMINT", "TIMP", "TINTP", + "/TLABEL", "TOFFST", "*TOPER", "TORQ2D", "TORQC2D", + "TORQSUM", "TORUS", "TRANS", "TRANSFER", "*TREAD", + "TREF", "/TRIAD", "/TRLCY", "TRNOPT", "TRPDEL", + "TRPLIS", "TRPOIN", "TRTIME", "TSHAP", "/TSPEC", + "TSRES", "TUNIF", "TVAR", "/TXTRE", "/TYPE", "TYPE", + "/UCMD", "/UDOC", "/UI", "UIMP", "/UIS", "*ULIB", "/UPF", + "UNDELETE", "UNDO", "/UNITS", "UNPAUSE", "UPCOORD", + "UPGEOM", "*USE", "/USER", "USRCAL", "USRDOF", + "USRELEM", "V", "V2DOPT", "VA", "*VABS", "VADD", + "VARDEL", "VARNAM", "VATT", "VCLEAR", "*VCOL", + "/VCONE", "VCROSS", "*VCUM", "VDDAM", "VDELE", "VDGL", + "VDOT", "VDRAG", "*VEC", "*VEDIT", "VEORIENT", "VEXT", + "*VFACT", "*VFILL", "VFOPT", "VFQUERY", "VFSM", + "*VFUN", "VGEN", "*VGET", "VGET", "VGLUE", "/VIEW", + "VIMP", "VINP", "VINV", "*VITRP", "*VLEN", "VLIST", + "VLSCALE", "*VMASK", "VMESH", "VOFFST", "VOLUMES") + + # list of in-built () functions + elafunf = ("NX()", "NY()", "NZ()", "KX()", "KY()", "KZ()", "LX()", + "LY()", "LZ()", "LSX()", "LSY()", "LSZ()", "NODE()", + "KP()", "DISTND()", "DISTKP()", "DISTEN()", "ANGLEN()", + "ANGLEK()", "NNEAR()", "KNEAR()", "ENEARN()", + "AREAND()", "AREAKP()", "ARNODE()", "NORMNX()", + "NORMNY()", "NORMNZ()", "NORMKX()", "NORMKY()", + "NORMKZ()", "ENEXTN()", "NELEM()", "NODEDOF()", + "ELADJ()", "NDFACE()", "NMFACE()", "ARFACE()", "UX()", + "UY()", "UZ()", "ROTX()", "ROTY()", "ROTZ()", "TEMP()", + "PRES()", "VX()", "VY()", "VZ()", "ENKE()", "ENDS()", + "VOLT()", "MAG()", "AX()", "AY()", "AZ()", + "VIRTINQR()", "KWGET()", "VALCHR()", "VALHEX()", + "CHRHEX()", "STRFILL()", "STRCOMP()", "STRPOS()", + "STRLENG()", "UPCASE()", "LWCASE()", "JOIN()", + "SPLIT()", "ABS()", "SIGN()", "CXABS()", "EXP()", + "LOG()", "LOG10()", "SQRT()", "NINT()", "MOD()", + "RAND()", "GDIS()", "SIN()", "COS()", "TAN()", + "SINH()", "COSH()", "TANH()", "ASIN()", "ACOS()", + "ATAN()", "ATAN2()") + + elafung = ("NSEL()", "ESEL()", "KSEL()", "LSEL()", "ASEL()", + "VSEL()", "NDNEXT()", "ELNEXT()", "KPNEXT()", + "LSNEXT()", "ARNEXT()", "VLNEXT()", "CENTRX()", + "CENTRY()", "CENTRZ()") + + elafunh = ("~CAT5IN", "~CATIAIN", "~PARAIN", "~PROEIN", "~SATIN", + "~UGIN", "A", "AADD", "AATT", "ABEXTRACT", "*ABBR", + "ABBRES", "ABBSAV", "ABS", "ACCAT", "ACCOPTION", + "ACEL", "ACLEAR", "ADAMS", "ADAPT", "ADD", "ADDAM", + "ADELE", "ADGL", "ADRAG", "AESIZE", "AFILLT", "AFLIST", + "AFSURF", "*AFUN", "AGEN", "AGLUE", "AINA", "AINP", + "AINV", "AL", "ALIST", "ALLSEL", "ALPHAD", "AMAP", + "AMESH", "/AN3D", "ANCNTR", "ANCUT", "ANCYC", "ANDATA", + "ANDSCL", "ANDYNA", "/ANFILE", "ANFLOW", "/ANGLE", + "ANHARM", "ANIM", "ANISOS", "ANMODE", "ANMRES", + "/ANNOT", "ANORM", "ANPRES", "ANSOL", "ANSTOAQWA", + "ANSTOASAS", "ANTIME", "ANTYPE") + + special = ("/COM", "/TITLE", "STITLE") + + elements = ("SOLID5", + "LINK11", + "PLANE13", + "COMBIN14", + "MASS2", + "PLANE25", + "MATRIX27", + "FLUID29", + "FLUID30", + "LINK31", + "LINK33", + "LINK34", + "PLANE35", + "SOURC36", + "COMBIN37", + "FLUID38", + "COMBIN39", + "COMBIN40", + "INFIN47", + "MATRIX50", + "PLANE55", + "SHELL61", + "LINK68", + "SOLID70", + "MASS71", + "PLANE75", + "PLANE77", + "PLANE78", + "PLANE83", + "SOLID87", + "SOLID90", + "CIRCU94", + "SOLID96", + "SOLID98", + "INFIN110", + "INFIN111", + "FLUID116", + "PLANE121", + "SOLID122", + "SOLID123", + "CIRCU124", + "CIRCU125", + "TRANS126", + "FLUID129", + "FLUID130", + "SHELL131", + "SHELL132", + "FLUID136", + "FLUID138", + "FLUID139", + "SURF151", + "SURF152", + "SURF153", + "SURF154", + "SURF155", + "SURF156", + "SHELL157", + "SURF159", + "TARGE169", + "TARGE170", + "CONTA172", + "CONTA174", + "CONTA175", + "CONTA177", + "CONTA178", + "PRETS179", + "LINK180", + "SHELL181", + "PLANE182", + "PLANE183", + "MPC184", + "SOLID185", + "SOLID186", + "SOLID187", + "BEAM188", + "BEAM189", + "SOLSH190", + "INTER192", + "INTER193", + "INTER194", + "INTER195", + "MESH200", + "FOLLW201", + "INTER202", + "INTER203", + "INTER204", + "INTER205", + "SHELL208", + "SHELL209", + "CPT212", + "CPT213", + "COMBI214", + "CPT215", + "CPT216", + "CPT217", + "FLUID218", + "FLUID220", + "FLUID221", + "PLANE222", + "PLANE223", + "SOLID225", + "SOLID226", + "SOLID227", + "PLANE230", + "SOLID231", + "SOLID232", + "PLANE233", + "SOLID236", + "SOLID237", + "PLANE238", + "SOLID239", + "SOLID240", + "HSFLD241", + "HSFLD242", + "COMBI250", + "SURF251", + "SURF252", + "INFIN257", + "REINF263", + "REINF264", + "REINF265", + "SOLID272", + "SOLID273", + "SOLID278", + "SOLID279", + "CABLE280", + "SHELL281", + "SOLID285", + "PIPE288", + "PIPE289", + "ELBOW290", + "SOLID291", + "PLANE292", + "PLANE293", + "USER300") + + tokens = { + 'root': [ + (r'[^\S\n]+', Whitespace), + (words((elafunb+elafunc+elafund+elafune+elafunh+special), suffix=r'\b'), Keyword, 'non-keyword'), + default('non-keyword'), + ], + 'non-keyword': [ + (r'!.*\n', Comment, '#pop'), + (r'%.*?%', Escape), + include('strings'), + include('nums'), + (words((elafunf+elafung), suffix=r'\b'), Name.Builtin), + (words((elements), suffix=r'\b'), Name.Property), + include('core'), + (r'AR[0-9]+', Name.Variable.Instance), + (r'[a-z_][a-z0-9_]*', Name.Variable), + (r'\n+', Whitespace, '#pop'), + (r'[^\S\n]+', Whitespace), + ], + 'core': [ + # Operators + (r'(\*\*|\*|\+|-|\/|<|>|<=|>=|==|\/=|=|\(|\))', Operator), + (r'/EOF', Generic.Emph), + (r'[\.(),:&;]', Punctuation), + ], + 'strings': [ + (r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double), + (r"(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single), + (r'[$%]', String.Symbol), + ], + 'nums': [ + (r'[+-]?\d*\.\d+([efEF][-+]?\d+)?', Number.Float), # with dot + (r'([+-]?\d+([efEF][-+]?\d+))', Number.Float), # With scientific notation + (r'\b\d+(?![.ef])', Number.Integer), # integer simple + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/blueprint.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/blueprint.py new file mode 100644 index 0000000000000000000000000000000000000000..59f9c42a46849ade66c118f9967a5080ec4a5250 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/blueprint.py @@ -0,0 +1,173 @@ +""" + pygments.lexers.blueprint + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the Blueprint UI markup language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, bygroups, words +from pygments.token import ( + Comment, + Operator, + Keyword, + Name, + String, + Number, + Punctuation, + Whitespace, +) + +__all__ = ["BlueprintLexer"] + + +class BlueprintLexer(RegexLexer): + """ + For Blueprint UI markup. + """ + + name = "Blueprint" + aliases = ["blueprint"] + filenames = ["*.blp"] + mimetypes = ["text/x-blueprint"] + url = "https://gitlab.gnome.org/jwestman/blueprint-compiler" + version_added = '2.16' + + flags = re.IGNORECASE + tokens = { + "root": [ + include("block-content"), + ], + "type": [ + (r"\$\s*[a-z_][a-z0-9_\-]*", Name.Class), + (r"(?:([a-z_][a-z0-9_\-]*)(\s*)(\.)(\s*))?([a-z_][a-z0-9_\-]*)", + bygroups(Name.Namespace, Whitespace, Punctuation, Whitespace, Name.Class)), + ], + "whitespace": [ + (r"\s+", Whitespace), + (r"//.*?\n", Comment.Single), + (r"/\*", Comment.Multiline, "comment-multiline"), + ], + "comment-multiline": [ + (r"\*/", Comment.Multiline, "#pop"), + (r"[^*]+", Comment.Multiline), + (r"\*", Comment.Multiline), + ], + "value": [ + (r"(typeof)(\s*)(<)", bygroups(Keyword, Whitespace, Punctuation), "typeof"), + (words(("true", "false", "null")), Keyword.Constant), + (r"[a-z_][a-z0-9_\-]*", Name.Variable), + (r"\|", Operator), + (r'".*?"', String.Double), + (r"\'.*?\'", String.Single), + (r"0x[\d_]*", Number.Hex), + (r"[0-9_]+", Number.Integer), + (r"\d[\d\.a-z_]*", Number), + ], + "typeof": [ + include("whitespace"), + include("type"), + (r">", Punctuation, "#pop"), + ], + "content": [ + include("whitespace"), + # Keywords + (words(("after", "bidirectional", "bind-property", "bind", "default", + "destructive", "disabled", "inverted", "no-sync-create", + "suggested", "swapped", "sync-create", "template")), + Keyword), + # Translated strings + (r"(C?_)(\s*)(\()", + bygroups(Name.Function.Builtin, Whitespace, Punctuation), + "paren-content"), + # Cast expressions + (r"(as)(\s*)(<)", bygroups(Keyword, Whitespace, Punctuation), "typeof"), + # Closures + (r"(\$?[a-z_][a-z0-9_\-]*)(\s*)(\()", + bygroups(Name.Function, Whitespace, Punctuation), + "paren-content"), + # Objects + (r"(?:(\$\s*[a-z_][a-z0-9_\-]+)|(?:([a-z_][a-z0-9_\-]*)(\s*)(\.)(\s*))?([a-z_][a-z0-9_\-]*))(?:(\s+)([a-z_][a-z0-9_\-]*))?(\s*)(\{)", + bygroups(Name.Class, Name.Namespace, Whitespace, Punctuation, Whitespace, + Name.Class, Whitespace, Name.Variable, Whitespace, Punctuation), + "brace-block"), + # Misc + include("value"), + (r",|\.", Punctuation), + ], + "block-content": [ + # Import statements + (r"(using)(\s+)([a-z_][a-z0-9_\-]*)(\s+)(\d[\d\.]*)(;)", + bygroups(Keyword, Whitespace, Name.Namespace, Whitespace, + Name.Namespace, Punctuation)), + # Menus + (r"(menu|section|submenu)(?:(\s+)([a-z_][a-z0-9_\-]*))?(\s*)(\{)", + bygroups(Keyword, Whitespace, Name.Variable, Whitespace, Punctuation), + "brace-block"), + (r"(item)(\s*)(\{)", + bygroups(Keyword, Whitespace, Punctuation), + "brace-block"), + (r"(item)(\s*)(\()", + bygroups(Keyword, Whitespace, Punctuation), + "paren-block"), + # Templates + (r"template", Keyword.Declaration, "template"), + # Nested blocks. When extensions are added, this is where they go. + (r"(responses|items|mime-types|patterns|suffixes|marks|widgets|strings|styles)(\s*)(\[)", + bygroups(Keyword, Whitespace, Punctuation), + "bracket-block"), + (r"(accessibility|setters|layout|item)(\s*)(\{)", + bygroups(Keyword, Whitespace, Punctuation), + "brace-block"), + (r"(condition|mark|item)(\s*)(\()", + bygroups(Keyword, Whitespace, Punctuation), + "paren-content"), + (r"\[", Punctuation, "child-type"), + # Properties and signals + (r"([a-z_][a-z0-9_\-]*(?:::[a-z0-9_]+)?)(\s*)(:|=>)", + bygroups(Name.Property, Whitespace, Punctuation), + "statement"), + include("content"), + ], + "paren-block": [ + include("block-content"), + (r"\)", Punctuation, "#pop"), + ], + "paren-content": [ + include("content"), + (r"\)", Punctuation, "#pop"), + ], + "bracket-block": [ + include("block-content"), + (r"\]", Punctuation, "#pop"), + ], + "brace-block": [ + include("block-content"), + (r"\}", Punctuation, "#pop"), + ], + "statement": [ + include("content"), + (r";", Punctuation, "#pop"), + ], + "child-type": [ + include("whitespace"), + (r"(action)(\s+)(response)(\s*)(=)(\s*)", + bygroups(Keyword, Whitespace, Name.Attribute, Whitespace, + Punctuation, Whitespace)), + (words(("default", "internal-child", "response")), Keyword), + (r"[a-z_][a-z0-9_\-]*", Name.Decorator), + include("value"), + (r"=", Punctuation), + (r"\]", Punctuation, "#pop"), + ], + "template": [ + include("whitespace"), + include("type"), + (r":", Punctuation), + (r"\{", Punctuation, ("#pop", "brace-block")), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/boa.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/boa.py new file mode 100644 index 0000000000000000000000000000000000000000..6f4e8cdaf788ed51481b481eaf6edfade5453747 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/boa.py @@ -0,0 +1,97 @@ +""" + pygments.lexers.boa + ~~~~~~~~~~~~~~~~~~~ + + Lexers for the Boa language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, words +from pygments.token import String, Comment, Keyword, Name, Number, Operator, \ + Punctuation, Whitespace + +__all__ = ['BoaLexer'] + + +class BoaLexer(RegexLexer): + """ + Lexer for the Boa language. + """ + name = 'Boa' + aliases = ['boa'] + filenames = ['*.boa'] + url = 'https://boa.cs.iastate.edu/docs' + version_added = '2.4' + + reserved = words( + ('input', 'output', 'of', 'weight', 'before', 'after', 'stop', + 'ifall', 'foreach', 'exists', 'function', 'break', 'switch', 'case', + 'visitor', 'default', 'return', 'visit', 'while', 'if', 'else'), + suffix=r'\b', prefix=r'\b') + keywords = words( + ('bottom', 'collection', 'maximum', 'mean', 'minimum', 'set', 'sum', + 'top', 'string', 'int', 'bool', 'float', 'time', 'false', 'true', + 'array', 'map', 'stack', 'enum', 'type'), suffix=r'\b', prefix=r'\b') + classes = words( + ('Project', 'ForgeKind', 'CodeRepository', 'Revision', 'RepositoryKind', + 'ChangedFile', 'FileKind', 'ASTRoot', 'Namespace', 'Declaration', 'Type', + 'Method', 'Variable', 'Statement', 'Expression', 'Modifier', + 'StatementKind', 'ExpressionKind', 'ModifierKind', 'Visibility', + 'TypeKind', 'Person', 'ChangeKind'), + suffix=r'\b', prefix=r'\b') + operators = ('->', ':=', ':', '=', '<<', '!', '++', '||', + '&&', '+', '-', '*', ">", "<") + string_sep = ('`', '\"') + built_in_functions = words( + ( + # Array functions + 'new', 'sort', + # Date & Time functions + 'yearof', 'dayofyear', 'hourof', 'minuteof', 'secondof', 'now', + 'addday', 'addmonth', 'addweek', 'addyear', 'dayofmonth', 'dayofweek', + 'dayofyear', 'formattime', 'trunctoday', 'trunctohour', 'trunctominute', + 'trunctomonth', 'trunctosecond', 'trunctoyear', + # Map functions + 'clear', 'haskey', 'keys', 'lookup', 'remove', 'values', + # Math functions + 'abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', + 'ceil', 'cos', 'cosh', 'exp', 'floor', 'highbit', 'isfinite', 'isinf', + 'isnan', 'isnormal', 'log', 'log10', 'max', 'min', 'nrand', 'pow', + 'rand', 'round', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', + # Other functions + 'def', 'hash', 'len', + # Set functions + 'add', 'contains', 'remove', + # String functions + 'format', 'lowercase', 'match', 'matchposns', 'matchstrs', 'regex', + 'split', 'splitall', 'splitn', 'strfind', 'strreplace', 'strrfind', + 'substring', 'trim', 'uppercase', + # Type Conversion functions + 'bool', 'float', 'int', 'string', 'time', + # Domain-Specific functions + 'getast', 'getsnapshot', 'hasfiletype', 'isfixingrevision', 'iskind', + 'isliteral', + ), + prefix=r'\b', + suffix=r'\(') + + tokens = { + 'root': [ + (r'#.*?$', Comment.Single), + (r'/\*.*?\*/', Comment.Multiline), + (reserved, Keyword.Reserved), + (built_in_functions, Name.Function), + (keywords, Keyword.Type), + (classes, Name.Classes), + (words(operators), Operator), + (r'[][(),;{}\\.]', Punctuation), + (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), + (r"`(\\\\|\\[^\\]|[^`\\])*`", String.Backtick), + (words(string_sep), String.Delimiter), + (r'[a-zA-Z_]+', Name.Variable), + (r'[0-9]+', Number.Integer), + (r'\s+', Whitespace), # Whitespace + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/c_cpp.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/c_cpp.py new file mode 100644 index 0000000000000000000000000000000000000000..399f2bc4f2207455e3deb3fd7967e1ee8c88e25b --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/c_cpp.py @@ -0,0 +1,414 @@ +""" + pygments.lexers.c_cpp + ~~~~~~~~~~~~~~~~~~~~~ + + Lexers for C/C++ languages. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, bygroups, using, \ + this, inherit, default, words +from pygments.util import get_bool_opt +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace + +__all__ = ['CLexer', 'CppLexer'] + + +class CFamilyLexer(RegexLexer): + """ + For C family source code. This is used as a base class to avoid repetitious + definitions. + """ + + # The trailing ?, rather than *, avoids a geometric performance drop here. + #: only one /* */ style comment + _ws1 = r'\s*(?:/[*].*?[*]/\s*)?' + + # Hexadecimal part in an hexadecimal integer/floating-point literal. + # This includes decimal separators matching. + _hexpart = r'[0-9a-fA-F](\'?[0-9a-fA-F])*' + # Decimal part in an decimal integer/floating-point literal. + # This includes decimal separators matching. + _decpart = r'\d(\'?\d)*' + # Integer literal suffix (e.g. 'ull' or 'll'). + _intsuffix = r'(([uU][lL]{0,2})|[lL]{1,2}[uU]?)?' + + # Identifier regex with C and C++ Universal Character Name (UCN) support. + _ident = r'(?!\d)(?:[\w$]|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8})+' + _namespaced_ident = r'(?!\d)(?:[\w$]|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|::)+' + + # Single and multiline comment regexes + # Beware not to use *? for the inner content! When these regexes + # are embedded in larger regexes, that can cause the stuff*? to + # match more than it would have if the regex had been used in + # a standalone way ... + _comment_single = r'//(?:.|(?<=\\)\n)*\n' + _comment_multiline = r'/(?:\\\n)?[*](?:[^*]|[*](?!(?:\\\n)?/))*[*](?:\\\n)?/' + + # Regex to match optional comments + _possible_comments = rf'\s*(?:(?:(?:{_comment_single})|(?:{_comment_multiline}))\s*)*' + + tokens = { + 'whitespace': [ + # preprocessor directives: without whitespace + (r'^#if\s+0', Comment.Preproc, 'if0'), + ('^#', Comment.Preproc, 'macro'), + # or with whitespace + ('^(' + _ws1 + r')(#if\s+0)', + bygroups(using(this), Comment.Preproc), 'if0'), + ('^(' + _ws1 + ')(#)', + bygroups(using(this), Comment.Preproc), 'macro'), + # Labels: + # Line start and possible indentation. + (r'(^[ \t]*)' + # Not followed by keywords which can be mistaken as labels. + r'(?!(?:public|private|protected|default)\b)' + # Actual label, followed by a single colon. + r'(' + _ident + r')(\s*)(:)(?!:)', + bygroups(Whitespace, Name.Label, Whitespace, Punctuation)), + (r'\n', Whitespace), + (r'[^\S\n]+', Whitespace), + (r'\\\n', Text), # line continuation + (_comment_single, Comment.Single), + (_comment_multiline, Comment.Multiline), + # Open until EOF, so no ending delimiter + (r'/(\\\n)?[*][\w\W]*', Comment.Multiline), + ], + 'statements': [ + include('keywords'), + include('types'), + (r'([LuU]|u8)?(")', bygroups(String.Affix, String), 'string'), + (r"([LuU]|u8)?(')(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])(')", + bygroups(String.Affix, String.Char, String.Char, String.Char)), + + # Hexadecimal floating-point literals (C11, C++17) + (r'0[xX](' + _hexpart + r'\.' + _hexpart + r'|\.' + _hexpart + + r'|' + _hexpart + r')[pP][+-]?' + _hexpart + r'[lL]?', Number.Float), + + (r'(-)?(' + _decpart + r'\.' + _decpart + r'|\.' + _decpart + r'|' + + _decpart + r')[eE][+-]?' + _decpart + r'[fFlL]?', Number.Float), + (r'(-)?((' + _decpart + r'\.(' + _decpart + r')?|\.' + + _decpart + r')[fFlL]?)|(' + _decpart + r'[fFlL])', Number.Float), + (r'(-)?0[xX]' + _hexpart + _intsuffix, Number.Hex), + (r'(-)?0[bB][01](\'?[01])*' + _intsuffix, Number.Bin), + (r'(-)?0(\'?[0-7])+' + _intsuffix, Number.Oct), + (r'(-)?' + _decpart + _intsuffix, Number.Integer), + (r'[~!%^&*+=|?:<>/-]', Operator), + (r'[()\[\],.]', Punctuation), + (r'(true|false|NULL)\b', Name.Builtin), + (_ident, Name) + ], + 'types': [ + (words(('int8', 'int16', 'int32', 'int64', 'wchar_t'), prefix=r'__', + suffix=r'\b'), Keyword.Reserved), + (words(('bool', 'int', 'long', 'float', 'short', 'double', 'char', + 'unsigned', 'signed', 'void', '_BitInt', + '__int128'), suffix=r'\b'), Keyword.Type) + ], + 'keywords': [ + (r'(struct|union)(\s+)', bygroups(Keyword, Whitespace), 'classname'), + (r'case\b', Keyword, 'case-value'), + (words(('asm', 'auto', 'break', 'const', 'continue', 'default', + 'do', 'else', 'enum', 'extern', 'for', 'goto', 'if', + 'register', 'restricted', 'return', 'sizeof', 'struct', + 'static', 'switch', 'typedef', 'volatile', 'while', 'union', + 'thread_local', 'alignas', 'alignof', 'static_assert', '_Pragma'), + suffix=r'\b'), Keyword), + (words(('inline', '_inline', '__inline', 'naked', 'restrict', + 'thread'), suffix=r'\b'), Keyword.Reserved), + # Vector intrinsics + (r'(__m(128i|128d|128|64))\b', Keyword.Reserved), + # Microsoft-isms + (words(( + 'asm', 'based', 'except', 'stdcall', 'cdecl', + 'fastcall', 'declspec', 'finally', 'try', + 'leave', 'w64', 'unaligned', 'raise', 'noop', + 'identifier', 'forceinline', 'assume'), + prefix=r'__', suffix=r'\b'), Keyword.Reserved) + ], + 'root': [ + include('whitespace'), + include('keywords'), + # functions + (r'(' + _namespaced_ident + r'(?:[&*\s])+)' # return arguments + r'(' + _possible_comments + r')' + r'(' + _namespaced_ident + r')' # method name + r'(' + _possible_comments + r')' + r'(\([^;"\')]*?\))' # signature + r'(' + _possible_comments + r')' + r'([^;{/"\']*)(\{)', + bygroups(using(this), using(this, state='whitespace'), + Name.Function, using(this, state='whitespace'), + using(this), using(this, state='whitespace'), + using(this), Punctuation), + 'function'), + # function declarations + (r'(' + _namespaced_ident + r'(?:[&*\s])+)' # return arguments + r'(' + _possible_comments + r')' + r'(' + _namespaced_ident + r')' # method name + r'(' + _possible_comments + r')' + r'(\([^;"\')]*?\))' # signature + r'(' + _possible_comments + r')' + r'([^;/"\']*)(;)', + bygroups(using(this), using(this, state='whitespace'), + Name.Function, using(this, state='whitespace'), + using(this), using(this, state='whitespace'), + using(this), Punctuation)), + include('types'), + default('statement'), + ], + 'statement': [ + include('whitespace'), + include('statements'), + (r'\}', Punctuation), + (r'[{;]', Punctuation, '#pop'), + ], + 'function': [ + include('whitespace'), + include('statements'), + (';', Punctuation), + (r'\{', Punctuation, '#push'), + (r'\}', Punctuation, '#pop'), + ], + 'string': [ + (r'"', String, '#pop'), + (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|' + r'u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})', String.Escape), + (r'[^\\"\n]+', String), # all other characters + (r'\\\n', String), # line continuation + (r'\\', String), # stray backslash + ], + 'macro': [ + (r'('+_ws1+r')(include)('+_ws1+r')("[^"]+")([^\n]*)', + bygroups(using(this), Comment.Preproc, using(this), + Comment.PreprocFile, Comment.Single)), + (r'('+_ws1+r')(include)('+_ws1+r')(<[^>]+>)([^\n]*)', + bygroups(using(this), Comment.Preproc, using(this), + Comment.PreprocFile, Comment.Single)), + (r'[^/\n]+', Comment.Preproc), + (r'/[*](.|\n)*?[*]/', Comment.Multiline), + (r'//.*?\n', Comment.Single, '#pop'), + (r'/', Comment.Preproc), + (r'(?<=\\)\n', Comment.Preproc), + (r'\n', Comment.Preproc, '#pop'), + ], + 'if0': [ + (r'^\s*#if.*?(?)', Text, '#pop'), + default('#pop') + ], + # Mark identifiers preceded by `case` keyword as constants. + 'case-value': [ + (r'(?)', Text, '#pop'), + default('#pop') + ], + 'keywords': [ + (r'(class|concept|typename)(\s+)', bygroups(Keyword, Whitespace), 'classname'), + (words(( + 'catch', 'const_cast', 'delete', 'dynamic_cast', 'explicit', + 'export', 'friend', 'mutable', 'new', 'operator', + 'private', 'protected', 'public', 'reinterpret_cast', 'class', + '__restrict', 'static_cast', 'template', 'this', 'throw', 'throws', + 'try', 'typeid', 'using', 'virtual', 'constexpr', 'nullptr', 'concept', + 'decltype', 'noexcept', 'override', 'final', 'constinit', 'consteval', + 'co_await', 'co_return', 'co_yield', 'requires', 'import', 'module', + 'typename', 'and', 'and_eq', 'bitand', 'bitor', 'compl', 'not', + 'not_eq', 'or', 'or_eq', 'xor', 'xor_eq'), + suffix=r'\b'), Keyword), + (r'namespace\b', Keyword, 'namespace'), + (r'(enum)(\s+)', bygroups(Keyword, Whitespace), 'enumname'), + inherit + ], + 'types': [ + (r'char(16_t|32_t|8_t)\b', Keyword.Type), + inherit + ], + 'namespace': [ + (r'[;{]', Punctuation, ('#pop', 'root')), + (r'inline\b', Keyword.Reserved), + (CFamilyLexer._ident, Name.Namespace), + include('statement') + ] + } + + def analyse_text(text): + if re.search('#include <[a-z_]+>', text): + return 0.2 + if re.search('using namespace ', text): + return 0.4 diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/capnproto.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/capnproto.py new file mode 100644 index 0000000000000000000000000000000000000000..333760e15d7ca15018515bbbb41617bd04383f26 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/capnproto.py @@ -0,0 +1,74 @@ +""" + pygments.lexers.capnproto + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for the Cap'n Proto schema language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, default +from pygments.token import Text, Comment, Keyword, Name, Literal, Whitespace + +__all__ = ['CapnProtoLexer'] + + +class CapnProtoLexer(RegexLexer): + """ + For Cap'n Proto source. + """ + name = 'Cap\'n Proto' + url = 'https://capnproto.org' + filenames = ['*.capnp'] + aliases = ['capnp'] + version_added = '2.2' + + tokens = { + 'root': [ + (r'#.*?$', Comment.Single), + (r'@[0-9a-zA-Z]*', Name.Decorator), + (r'=', Literal, 'expression'), + (r':', Name.Class, 'type'), + (r'\$', Name.Attribute, 'annotation'), + (r'(struct|enum|interface|union|import|using|const|annotation|' + r'extends|in|of|on|as|with|from|fixed)\b', + Keyword), + (r'[\w.]+', Name), + (r'[^#@=:$\w\s]+', Text), + (r'\s+', Whitespace), + ], + 'type': [ + (r'[^][=;,(){}$]+', Name.Class), + (r'[\[(]', Name.Class, 'parentype'), + default('#pop'), + ], + 'parentype': [ + (r'[^][;()]+', Name.Class), + (r'[\[(]', Name.Class, '#push'), + (r'[])]', Name.Class, '#pop'), + default('#pop'), + ], + 'expression': [ + (r'[^][;,(){}$]+', Literal), + (r'[\[(]', Literal, 'parenexp'), + default('#pop'), + ], + 'parenexp': [ + (r'[^][;()]+', Literal), + (r'[\[(]', Literal, '#push'), + (r'[])]', Literal, '#pop'), + default('#pop'), + ], + 'annotation': [ + (r'[^][;,(){}=:]+', Name.Attribute), + (r'[\[(]', Name.Attribute, 'annexp'), + default('#pop'), + ], + 'annexp': [ + (r'[^][;()]+', Name.Attribute), + (r'[\[(]', Name.Attribute, '#push'), + (r'[])]', Name.Attribute, '#pop'), + default('#pop'), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/chapel.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/chapel.py new file mode 100644 index 0000000000000000000000000000000000000000..955a1579a963cf49618aedc0176003382761b953 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/chapel.py @@ -0,0 +1,139 @@ +""" + pygments.lexers.chapel + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the Chapel language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups, words +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace + +__all__ = ['ChapelLexer'] + + +class ChapelLexer(RegexLexer): + """ + For Chapel source. + """ + name = 'Chapel' + url = 'https://chapel-lang.org/' + filenames = ['*.chpl'] + aliases = ['chapel', 'chpl'] + version_added = '2.0' + # mimetypes = ['text/x-chapel'] + + known_types = ('bool', 'bytes', 'complex', 'imag', 'int', 'locale', + 'nothing', 'opaque', 'range', 'real', 'string', 'uint', + 'void') + + type_modifiers_par = ('atomic', 'single', 'sync') + type_modifiers_mem = ('borrowed', 'owned', 'shared', 'unmanaged') + type_modifiers = (*type_modifiers_par, *type_modifiers_mem) + + declarations = ('config', 'const', 'in', 'inout', 'out', 'param', 'ref', + 'type', 'var') + + constants = ('false', 'nil', 'none', 'true') + + other_keywords = ('align', 'as', + 'begin', 'break', 'by', + 'catch', 'cobegin', 'coforall', 'continue', + 'defer', 'delete', 'dmapped', 'do', 'domain', + 'else', 'enum', 'except', 'export', 'extern', + 'for', 'forall', 'foreach', 'forwarding', + 'if', 'implements', 'import', 'index', 'init', 'inline', + 'label', 'lambda', 'let', 'lifetime', 'local', + 'new', 'noinit', + 'on', 'only', 'otherwise', 'override', + 'pragma', 'primitive', 'private', 'prototype', 'public', + 'reduce', 'require', 'return', + 'scan', 'select', 'serial', 'sparse', 'subdomain', + 'then', 'this', 'throw', 'throws', 'try', + 'use', + 'when', 'where', 'while', 'with', + 'yield', + 'zip') + + tokens = { + 'root': [ + (r'\n', Whitespace), + (r'\s+', Whitespace), + (r'\\\n', Text), + + (r'//(.*?)\n', Comment.Single), + (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), + + (words(declarations, suffix=r'\b'), Keyword.Declaration), + (words(constants, suffix=r'\b'), Keyword.Constant), + (words(known_types, suffix=r'\b'), Keyword.Type), + (words((*type_modifiers, *other_keywords), suffix=r'\b'), Keyword), + + (r'@', Keyword, 'attributename'), + (r'(iter)(\s+)', bygroups(Keyword, Whitespace), 'procname'), + (r'(proc)(\s+)', bygroups(Keyword, Whitespace), 'procname'), + (r'(operator)(\s+)', bygroups(Keyword, Whitespace), 'procname'), + (r'(class|interface|module|record|union)(\s+)', bygroups(Keyword, Whitespace), + 'classname'), + + # imaginary integers + (r'\d+i', Number), + (r'\d+\.\d*([Ee][-+]\d+)?i', Number), + (r'\.\d+([Ee][-+]\d+)?i', Number), + (r'\d+[Ee][-+]\d+i', Number), + + # reals cannot end with a period due to lexical ambiguity with + # .. operator. See reference for rationale. + (r'(\d*\.\d+)([eE][+-]?[0-9]+)?i?', Number.Float), + (r'\d+[eE][+-]?[0-9]+i?', Number.Float), + + # integer literals + # -- binary + (r'0[bB][01]+', Number.Bin), + # -- hex + (r'0[xX][0-9a-fA-F]+', Number.Hex), + # -- octal + (r'0[oO][0-7]+', Number.Oct), + # -- decimal + (r'[0-9]+', Number.Integer), + + # strings + (r'"(\\\\|\\"|[^"])*"', String), + (r"'(\\\\|\\'|[^'])*'", String), + + # tokens + (r'(=|\+=|-=|\*=|/=|\*\*=|%=|&=|\|=|\^=|&&=|\|\|=|<<=|>>=|' + r'<=>|<~>|\.\.|by|#|\.\.\.|' + r'&&|\|\||!|&|\||\^|~|<<|>>|' + r'==|!=|<=|>=|<|>|' + r'[+\-*/%]|\*\*)', Operator), + (r'[:;,.?()\[\]{}]', Punctuation), + + # identifiers + (r'[a-zA-Z_][\w$]*', Name.Other), + ], + 'classname': [ + (r'[a-zA-Z_][\w$]*', Name.Class, '#pop'), + ], + 'procname': [ + (r'([a-zA-Z_][.\w$]*|' # regular function name, including secondary + r'\~[a-zA-Z_][.\w$]*|' # support for legacy destructors + r'[+*/!~%<>=&^|\-:]{1,2})', # operators + Name.Function, '#pop'), + + # allow `proc (atomic T).foo` + (r'\(', Punctuation, "receivertype"), + (r'\)+\.', Punctuation), + ], + 'receivertype': [ + (words(type_modifiers, suffix=r'\b'), Keyword), + (words(known_types, suffix=r'\b'), Keyword.Type), + (r'[^()]*', Name.Other, '#pop'), + ], + 'attributename': [ + (r'[a-zA-Z_][.\w$]*', Name.Decorator, '#pop'), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/clean.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/clean.py new file mode 100644 index 0000000000000000000000000000000000000000..f96e74373763d0126c33004ec47a75cd80655604 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/clean.py @@ -0,0 +1,180 @@ +""" + pygments.lexers.clean + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the Clean language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import ExtendedRegexLexer, words, default, include, bygroups +from pygments.token import Comment, Error, Keyword, Literal, Name, Number, \ + Operator, Punctuation, String, Whitespace + +__all__ = ['CleanLexer'] + + +class CleanLexer(ExtendedRegexLexer): + """ + Lexer for the general purpose, state-of-the-art, pure and lazy functional + programming language Clean. + + .. versionadded: 2.2 + """ + name = 'Clean' + url = 'http://clean.cs.ru.nl/Clean' + aliases = ['clean'] + filenames = ['*.icl', '*.dcl'] + version_added = '' + + keywords = ( + 'case', 'ccall', 'class', 'code', 'code inline', 'derive', 'export', + 'foreign', 'generic', 'if', 'in', 'infix', 'infixl', 'infixr', + 'instance', 'let', 'of', 'otherwise', 'special', 'stdcall', 'where', + 'with') + + modulewords = ('implementation', 'definition', 'system') + + lowerId = r'[a-z`][\w`]*' + upperId = r'[A-Z`][\w`]*' + funnyId = r'[~@#$%\^?!+\-*<>\\/|&=:]+' + scoreUpperId = r'_' + upperId + scoreLowerId = r'_' + lowerId + moduleId = r'[a-zA-Z_][a-zA-Z0-9_.`]+' + classId = '|'.join([lowerId, upperId, funnyId]) + + tokens = { + 'root': [ + include('comments'), + include('keywords'), + include('module'), + include('import'), + include('whitespace'), + include('literals'), + include('operators'), + include('delimiters'), + include('names'), + ], + 'whitespace': [ + (r'\s+', Whitespace), + ], + 'comments': [ + (r'//.*\n', Comment.Single), + (r'/\*', Comment.Multiline, 'comments.in'), + (r'/\*\*', Comment.Special, 'comments.in'), + ], + 'comments.in': [ + (r'\*\/', Comment.Multiline, '#pop'), + (r'/\*', Comment.Multiline, '#push'), + (r'[^*/]+', Comment.Multiline), + (r'\*(?!/)', Comment.Multiline), + (r'/', Comment.Multiline), + ], + 'keywords': [ + (words(keywords, prefix=r'\b', suffix=r'\b'), Keyword), + ], + 'module': [ + (words(modulewords, prefix=r'\b', suffix=r'\b'), Keyword.Namespace), + (r'\bmodule\b', Keyword.Namespace, 'module.name'), + ], + 'module.name': [ + include('whitespace'), + (moduleId, Name.Class, '#pop'), + ], + 'import': [ + (r'\b(import)\b(\s*)', bygroups(Keyword, Whitespace), 'import.module'), + (r'\b(from)\b(\s*)\b(' + moduleId + r')\b(\s*)\b(import)\b', + bygroups(Keyword, Whitespace, Name.Class, Whitespace, Keyword), + 'import.what'), + ], + 'import.module': [ + (r'\b(qualified)\b(\s*)', bygroups(Keyword, Whitespace)), + (r'(\s*)\b(as)\b', bygroups(Whitespace, Keyword), ('#pop', 'import.module.as')), + (moduleId, Name.Class), + (r'(\s*)(,)(\s*)', bygroups(Whitespace, Punctuation, Whitespace)), + (r'\s+', Whitespace), + default('#pop'), + ], + 'import.module.as': [ + include('whitespace'), + (lowerId, Name.Class, '#pop'), + (upperId, Name.Class, '#pop'), + ], + 'import.what': [ + (r'\b(class)\b(\s+)(' + classId + r')', + bygroups(Keyword, Whitespace, Name.Class), 'import.what.class'), + (r'\b(instance)(\s+)(' + classId + r')(\s+)', + bygroups(Keyword, Whitespace, Name.Class, Whitespace), 'import.what.instance'), + (r'(::)(\s*)\b(' + upperId + r')\b', + bygroups(Punctuation, Whitespace, Name.Class), 'import.what.type'), + (r'\b(generic)\b(\s+)\b(' + lowerId + '|' + upperId + r')\b', + bygroups(Keyword, Whitespace, Name)), + include('names'), + (r'(,)(\s+)', bygroups(Punctuation, Whitespace)), + (r'$', Whitespace, '#pop'), + include('whitespace'), + ], + 'import.what.class': [ + (r',', Punctuation, '#pop'), + (r'\(', Punctuation, 'import.what.class.members'), + (r'$', Whitespace, '#pop:2'), + include('whitespace'), + ], + 'import.what.class.members': [ + (r',', Punctuation), + (r'\.\.', Punctuation), + (r'\)', Punctuation, '#pop'), + include('names'), + ], + 'import.what.instance': [ + (r'[,)]', Punctuation, '#pop'), + (r'\(', Punctuation, 'import.what.instance'), + (r'$', Whitespace, '#pop:2'), + include('whitespace'), + include('names'), + ], + 'import.what.type': [ + (r',', Punctuation, '#pop'), + (r'[({]', Punctuation, 'import.what.type.consesandfields'), + (r'$', Whitespace, '#pop:2'), + include('whitespace'), + ], + 'import.what.type.consesandfields': [ + (r',', Punctuation), + (r'\.\.', Punctuation), + (r'[)}]', Punctuation, '#pop'), + include('names'), + ], + 'literals': [ + (r'\'([^\'\\]|\\(x[\da-fA-F]+|\d+|.))\'', Literal.Char), + (r'[+~-]?0[0-7]+\b', Number.Oct), + (r'[+~-]?\d+\.\d+(E[+-]?\d+)?', Number.Float), + (r'[+~-]?\d+\b', Number.Integer), + (r'[+~-]?0x[\da-fA-F]+\b', Number.Hex), + (r'True|False', Literal), + (r'"', String.Double, 'literals.stringd'), + ], + 'literals.stringd': [ + (r'[^\\"\n]+', String.Double), + (r'"', String.Double, '#pop'), + (r'\\.', String.Double), + (r'[$\n]', Error, '#pop'), + ], + 'operators': [ + (r'[-~@#$%\^?!+*<>\\/|&=:.]+', Operator), + (r'\b_+\b', Operator), + ], + 'delimiters': [ + (r'[,;(){}\[\]]', Punctuation), + (r'(\')([\w`.]+)(\')', + bygroups(Punctuation, Name.Class, Punctuation)), + ], + 'names': [ + (lowerId, Name), + (scoreLowerId, Name), + (funnyId, Name.Function), + (upperId, Name.Class), + (scoreUpperId, Name.Class), + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/comal.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/comal.py new file mode 100644 index 0000000000000000000000000000000000000000..3c89a59eaa94e55ea4e2814e966b5bcd3afba585 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/comal.py @@ -0,0 +1,81 @@ +""" + pygments.lexers.comal + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for COMAL-80. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, words +from pygments.token import Comment, Whitespace, Operator, Keyword, String, \ + Number, Name, Punctuation + +__all__ = ["Comal80Lexer"] + + +class Comal80Lexer(RegexLexer): + """ + For COMAL-80 source code. + """ + + name = 'COMAL-80' + url = 'https://en.wikipedia.org/wiki/COMAL' + aliases = ['comal', 'comal80'] + filenames = ['*.cml', '*.comal'] + version_added = '' + flags = re.IGNORECASE + # + # COMAL allows for some strange characters in names which we list here so + # keywords and word operators will not be recognized at the start of an + # identifier. + # + _suffix = r"\b(?!['\[\]←£\\])" + _identifier = r"[a-z]['\[\]←£\\\w]*" + + tokens = { + 'root': [ + (r'//.*\n', Comment.Single), + (r'\s+', Whitespace), + (r':[=+-]|\<\>|[-+*/^↑<>=]', Operator), + (r'(and +then|or +else)' + _suffix, Operator.Word), + (words([ + 'and', 'bitand', 'bitor', 'bitxor', 'div', 'in', 'mod', 'not', + 'or'], suffix=_suffix,), Operator.Word), + (words([ + 'append', 'at', 'case', 'chain', 'close', 'copy', 'create', 'cursor', + 'data', 'delete', 'dir', 'do', 'elif', 'else', 'end', 'endcase', 'endif', + 'endfor', 'endloop', 'endtrap', 'endwhile', 'exec', 'exit', 'file', + 'for', 'goto', 'handler', 'if', 'input', 'let', 'loop', 'mount', 'null', + 'of', 'open', 'otherwise', 'output', 'page', 'pass', 'poke', 'print', + 'random', 'read', 'repeat', 'report', 'return', 'rename', 'restore', + 'select', 'step', 'stop', 'sys', 'then', 'to', 'trap', 'unit', 'unit$', + 'until', 'using', 'when', 'while', 'write', 'zone'], suffix=_suffix), + Keyword.Reserved), + (words([ + 'closed', 'dim', 'endfunc', 'endproc', 'external', 'func', 'import', + 'proc', 'ref', 'use'], suffix=_suffix), Keyword.Declaration), + (words([ + 'abs', 'atn', 'chr$', 'cos', 'eod', 'eof', 'err', 'errfile', 'errtext', + 'esc', 'exp', 'int', 'key$', 'len', 'log', 'ord', 'peek', 'randomize', + 'rnd', 'sgn', 'sin', 'spc$', 'sqr', 'status$', 'str$', 'tab', 'tan', + 'time', 'val'], suffix=_suffix), Name.Builtin), + (words(['false', 'pi', 'true'], suffix=_suffix), Keyword.Constant), + (r'"', String, 'string'), + (_identifier + r":(?=[ \n/])", Name.Label), + (_identifier + r"[$#]?", Name), + (r'%[01]+', Number.Bin), + (r'\$[0-9a-f]+', Number.Hex), + (r'\d*\.\d*(e[-+]?\d+)?', Number.Float), + (r'\d+', Number.Integer), + (r'[(),:;]', Punctuation), + ], + 'string': [ + (r'[^"]+', String), + (r'"[0-9]*"', String.Escape), + (r'"', String, '#pop'), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/configs.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/configs.py new file mode 100644 index 0000000000000000000000000000000000000000..5e7f47b6dda035b95b3db2cf3655733393d092d3 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/configs.py @@ -0,0 +1,1433 @@ +""" + pygments.lexers.configs + ~~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for configuration file formats. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import ExtendedRegexLexer, RegexLexer, default, words, \ + bygroups, include, using, line_re +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace, Literal, Error, Generic +from pygments.lexers.shell import BashLexer +from pygments.lexers.data import JsonLexer + +__all__ = ['IniLexer', 'SystemdLexer', 'DesktopLexer', 'RegeditLexer', 'PropertiesLexer', + 'KconfigLexer', 'Cfengine3Lexer', 'ApacheConfLexer', 'SquidConfLexer', + 'NginxConfLexer', 'LighttpdConfLexer', 'DockerLexer', + 'TerraformLexer', 'TermcapLexer', 'TerminfoLexer', + 'PkgConfigLexer', 'PacmanConfLexer', 'AugeasLexer', 'TOMLLexer', + 'NestedTextLexer', 'SingularityLexer', 'UnixConfigLexer'] + + +class IniLexer(RegexLexer): + """ + Lexer for configuration files in INI style. + """ + + name = 'INI' + aliases = ['ini', 'cfg', 'dosini'] + filenames = [ + '*.ini', '*.cfg', '*.inf', '.editorconfig', + ] + mimetypes = ['text/x-ini', 'text/inf'] + url = 'https://en.wikipedia.org/wiki/INI_file' + version_added = '' + + tokens = { + 'root': [ + (r'\s+', Whitespace), + (r'[;#].*', Comment.Single), + (r'(\[.*?\])([ \t]*)$', bygroups(Keyword, Whitespace)), + (r'''(.*?)([ \t]*)([=:])([ \t]*)(["'])''', + bygroups(Name.Attribute, Whitespace, Operator, Whitespace, String), + "quoted_value"), + (r'(.*?)([ \t]*)([=:])([ \t]*)([^;#\n]*)(\\)(\s+)', + bygroups(Name.Attribute, Whitespace, Operator, Whitespace, String, + Text, Whitespace), + "value"), + (r'(.*?)([ \t]*)([=:])([ \t]*)([^ ;#\n]*(?: +[^ ;#\n]+)*)', + bygroups(Name.Attribute, Whitespace, Operator, Whitespace, String)), + # standalone option, supported by some INI parsers + (r'(.+?)$', Name.Attribute), + ], + 'quoted_value': [ + (r'''([^"'\n]*)(["'])(\s*)''', + bygroups(String, String, Whitespace), "#pop"), + (r'[;#].*', Comment.Single), + (r'$', String, "#pop"), + ], + 'value': [ # line continuation + (r'\s+', Whitespace), + (r'(\s*)(.*)(\\)([ \t]*)', + bygroups(Whitespace, String, Text, Whitespace)), + (r'.*$', String, "#pop"), + ], + } + + def analyse_text(text): + npos = text.find('\n') + if npos < 3: + return False + if text[0] == '[' and text[npos-1] == ']': + return 0.8 + return False + + +class DesktopLexer(RegexLexer): + """ + Lexer for .desktop files. + """ + + name = 'Desktop file' + url = "https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html" + aliases = ['desktop'] + filenames = ['*.desktop'] + mimetypes = ['application/x-desktop'] + version_added = '2.16' + + tokens = { + 'root': [ + (r'^[ \t]*\n', Whitespace), + (r'^(#.*)(\n)', bygroups(Comment.Single, Whitespace)), + (r'(\[[^\]\n]+\])(\n)', bygroups(Keyword, Whitespace)), + (r'([-A-Za-z0-9]+)(\[[^\] \t=]+\])?([ \t]*)(=)([ \t]*)([^\n]*)([ \t\n]*\n)', + bygroups(Name.Attribute, Name.Namespace, Whitespace, Operator, Whitespace, String, Whitespace)), + ], + } + + def analyse_text(text): + if text.startswith("[Desktop Entry]"): + return 1.0 + if re.search(r"^\[Desktop Entry\][ \t]*$", text[:500], re.MULTILINE) is not None: + return 0.9 + return 0.0 + + +class SystemdLexer(RegexLexer): + """ + Lexer for systemd unit files. + """ + + name = 'Systemd' + url = "https://www.freedesktop.org/software/systemd/man/systemd.syntax.html" + aliases = ['systemd'] + filenames = [ + '*.service', '*.socket', '*.device', '*.mount', '*.automount', + '*.swap', '*.target', '*.path', '*.timer', '*.slice', '*.scope', + ] + version_added = '2.16' + + tokens = { + 'root': [ + (r'^[ \t]*\n', Whitespace), + (r'^([;#].*)(\n)', bygroups(Comment.Single, Whitespace)), + (r'(\[[^\]\n]+\])(\n)', bygroups(Keyword, Whitespace)), + (r'([^=]+)([ \t]*)(=)([ \t]*)([^\n]*)(\\)(\n)', + bygroups(Name.Attribute, Whitespace, Operator, Whitespace, String, + Text, Whitespace), + "value"), + (r'([^=]+)([ \t]*)(=)([ \t]*)([^\n]*)(\n)', + bygroups(Name.Attribute, Whitespace, Operator, Whitespace, String, Whitespace)), + ], + 'value': [ + # line continuation + (r'^([;#].*)(\n)', bygroups(Comment.Single, Whitespace)), + (r'([ \t]*)([^\n]*)(\\)(\n)', + bygroups(Whitespace, String, Text, Whitespace)), + (r'([ \t]*)([^\n]*)(\n)', + bygroups(Whitespace, String, Whitespace), "#pop"), + ], + } + + def analyse_text(text): + if text.startswith("[Unit]"): + return 1.0 + if re.search(r"^\[Unit\][ \t]*$", text[:500], re.MULTILINE) is not None: + return 0.9 + return 0.0 + + +class RegeditLexer(RegexLexer): + """ + Lexer for Windows Registry files produced by regedit. + """ + + name = 'reg' + url = 'http://en.wikipedia.org/wiki/Windows_Registry#.REG_files' + aliases = ['registry'] + filenames = ['*.reg'] + mimetypes = ['text/x-windows-registry'] + version_added = '1.6' + + tokens = { + 'root': [ + (r'Windows Registry Editor.*', Text), + (r'\s+', Whitespace), + (r'[;#].*', Comment.Single), + (r'(\[)(-?)(HKEY_[A-Z_]+)(.*?\])$', + bygroups(Keyword, Operator, Name.Builtin, Keyword)), + # String keys, which obey somewhat normal escaping + (r'("(?:\\"|\\\\|[^"])+")([ \t]*)(=)([ \t]*)', + bygroups(Name.Attribute, Whitespace, Operator, Whitespace), + 'value'), + # Bare keys (includes @) + (r'(.*?)([ \t]*)(=)([ \t]*)', + bygroups(Name.Attribute, Whitespace, Operator, Whitespace), + 'value'), + ], + 'value': [ + (r'-', Operator, '#pop'), # delete value + (r'(dword|hex(?:\([0-9a-fA-F]\))?)(:)([0-9a-fA-F,]+)', + bygroups(Name.Variable, Punctuation, Number), '#pop'), + # As far as I know, .reg files do not support line continuation. + (r'.+', String, '#pop'), + default('#pop'), + ] + } + + def analyse_text(text): + return text.startswith('Windows Registry Editor') + + +class PropertiesLexer(RegexLexer): + """ + Lexer for configuration files in Java's properties format. + + Note: trailing whitespace counts as part of the value as per spec + """ + + name = 'Properties' + aliases = ['properties', 'jproperties'] + filenames = ['*.properties'] + mimetypes = ['text/x-java-properties'] + url = 'https://en.wikipedia.org/wiki/.properties' + version_added = '1.4' + + tokens = { + 'root': [ + # comments + (r'[!#].*|/{2}.*', Comment.Single), + # ending a comment or whitespace-only line + (r'\n', Whitespace), + # eat whitespace at the beginning of a line + (r'^[^\S\n]+', Whitespace), + # start lexing a key + default('key'), + ], + 'key': [ + # non-escaped key characters + (r'[^\\:=\s]+', Name.Attribute), + # escapes + include('escapes'), + # separator is the first non-escaped whitespace or colon or '=' on the line; + # if it's whitespace, = and : are gobbled after it + (r'([^\S\n]*)([:=])([^\S\n]*)', + bygroups(Whitespace, Operator, Whitespace), + ('#pop', 'value')), + (r'[^\S\n]+', Whitespace, ('#pop', 'value')), + # maybe we got no value after all + (r'\n', Whitespace, '#pop'), + ], + 'value': [ + # non-escaped value characters + (r'[^\\\n]+', String), + # escapes + include('escapes'), + # end the value on an unescaped newline + (r'\n', Whitespace, '#pop'), + ], + 'escapes': [ + # line continuations; these gobble whitespace at the beginning of the next line + (r'(\\\n)([^\S\n]*)', bygroups(String.Escape, Whitespace)), + # other escapes + (r'\\(.|\n)', String.Escape), + ], + } + + +def _rx_indent(level): + # Kconfig *always* interprets a tab as 8 spaces, so this is the default. + # Edit this if you are in an environment where KconfigLexer gets expanded + # input (tabs expanded to spaces) and the expansion tab width is != 8, + # e.g. in connection with Trac (trac.ini, [mimeviewer], tab_width). + # Value range here is 2 <= {tab_width} <= 8. + tab_width = 8 + # Regex matching a given indentation {level}, assuming that indentation is + # a multiple of {tab_width}. In other cases there might be problems. + if tab_width == 2: + space_repeat = '+' + else: + space_repeat = '{1,%d}' % (tab_width - 1) + if level == 1: + level_repeat = '' + else: + level_repeat = f'{{{level}}}' + return rf'(?:\t| {space_repeat}\t| {{{tab_width}}}){level_repeat}.*\n' + + +class KconfigLexer(RegexLexer): + """ + For Linux-style Kconfig files. + """ + + name = 'Kconfig' + aliases = ['kconfig', 'menuconfig', 'linux-config', 'kernel-config'] + version_added = '1.6' + # Adjust this if new kconfig file names appear in your environment + filenames = ['Kconfig*', '*Config.in*', 'external.in*', + 'standard-modules.in'] + mimetypes = ['text/x-kconfig'] + url = 'https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html' + + # No re.MULTILINE, indentation-aware help text needs line-by-line handling + flags = 0 + + def call_indent(level): + # If indentation >= {level} is detected, enter state 'indent{level}' + return (_rx_indent(level), String.Doc, f'indent{level}') + + def do_indent(level): + # Print paragraphs of indentation level >= {level} as String.Doc, + # ignoring blank lines. Then return to 'root' state. + return [ + (_rx_indent(level), String.Doc), + (r'\s*\n', Text), + default('#pop:2') + ] + + tokens = { + 'root': [ + (r'\s+', Whitespace), + (r'#.*?\n', Comment.Single), + (words(( + 'mainmenu', 'config', 'menuconfig', 'choice', 'endchoice', + 'comment', 'menu', 'endmenu', 'visible if', 'if', 'endif', + 'source', 'prompt', 'select', 'depends on', 'default', + 'range', 'option'), suffix=r'\b'), + Keyword), + (r'(---help---|help)[\t ]*\n', Keyword, 'help'), + (r'(bool|tristate|string|hex|int|defconfig_list|modules|env)\b', + Name.Builtin), + (r'[!=&|]', Operator), + (r'[()]', Punctuation), + (r'[0-9]+', Number.Integer), + (r"'(''|[^'])*'", String.Single), + (r'"(""|[^"])*"', String.Double), + (r'\S+', Text), + ], + # Help text is indented, multi-line and ends when a lower indentation + # level is detected. + 'help': [ + # Skip blank lines after help token, if any + (r'\s*\n', Text), + # Determine the first help line's indentation level heuristically(!). + # Attention: this is not perfect, but works for 99% of "normal" + # indentation schemes up to a max. indentation level of 7. + call_indent(7), + call_indent(6), + call_indent(5), + call_indent(4), + call_indent(3), + call_indent(2), + call_indent(1), + default('#pop'), # for incomplete help sections without text + ], + # Handle text for indentation levels 7 to 1 + 'indent7': do_indent(7), + 'indent6': do_indent(6), + 'indent5': do_indent(5), + 'indent4': do_indent(4), + 'indent3': do_indent(3), + 'indent2': do_indent(2), + 'indent1': do_indent(1), + } + + +class Cfengine3Lexer(RegexLexer): + """ + Lexer for CFEngine3 policy files. + """ + + name = 'CFEngine3' + url = 'http://cfengine.org' + aliases = ['cfengine3', 'cf3'] + filenames = ['*.cf'] + mimetypes = [] + version_added = '1.5' + + tokens = { + 'root': [ + (r'#.*?\n', Comment), + (r'(body)(\s+)(\S+)(\s+)(control)', + bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword)), + (r'(body|bundle)(\s+)(\S+)(\s+)(\w+)(\()', + bygroups(Keyword, Whitespace, Keyword, Whitespace, Name.Function, Punctuation), + 'arglist'), + (r'(body|bundle)(\s+)(\S+)(\s+)(\w+)', + bygroups(Keyword, Whitespace, Keyword, Whitespace, Name.Function)), + (r'(")([^"]+)(")(\s+)(string|slist|int|real)(\s*)(=>)(\s*)', + bygroups(Punctuation, Name.Variable, Punctuation, + Whitespace, Keyword.Type, Whitespace, Operator, Whitespace)), + (r'(\S+)(\s*)(=>)(\s*)', + bygroups(Keyword.Reserved, Whitespace, Operator, Text)), + (r'"', String, 'string'), + (r'(\w+)(\()', bygroups(Name.Function, Punctuation)), + (r'([\w.!&|()]+)(::)', bygroups(Name.Class, Punctuation)), + (r'(\w+)(:)', bygroups(Keyword.Declaration, Punctuation)), + (r'@[{(][^)}]+[})]', Name.Variable), + (r'[(){},;]', Punctuation), + (r'=>', Operator), + (r'->', Operator), + (r'\d+\.\d+', Number.Float), + (r'\d+', Number.Integer), + (r'\w+', Name.Function), + (r'\s+', Whitespace), + ], + 'string': [ + (r'\$[{(]', String.Interpol, 'interpol'), + (r'\\.', String.Escape), + (r'"', String, '#pop'), + (r'\n', String), + (r'.', String), + ], + 'interpol': [ + (r'\$[{(]', String.Interpol, '#push'), + (r'[})]', String.Interpol, '#pop'), + (r'[^${()}]+', String.Interpol), + ], + 'arglist': [ + (r'\)', Punctuation, '#pop'), + (r',', Punctuation), + (r'\w+', Name.Variable), + (r'\s+', Whitespace), + ], + } + + +class ApacheConfLexer(RegexLexer): + """ + Lexer for configuration files following the Apache config file + format. + """ + + name = 'ApacheConf' + aliases = ['apacheconf', 'aconf', 'apache'] + filenames = ['.htaccess', 'apache.conf', 'apache2.conf'] + mimetypes = ['text/x-apacheconf'] + url = 'https://httpd.apache.org/docs/current/configuring.html' + version_added = '0.6' + flags = re.MULTILINE | re.IGNORECASE + + tokens = { + 'root': [ + (r'\s+', Whitespace), + (r'#(.*\\\n)+.*$|(#.*?)$', Comment), + (r'(<[^\s>/][^\s>]*)(?:(\s+)(.*))?(>)', + bygroups(Name.Tag, Whitespace, String, Name.Tag)), + (r'(]+)(>)', + bygroups(Name.Tag, Name.Tag)), + (r'[a-z]\w*', Name.Builtin, 'value'), + (r'\.+', Text), + ], + 'value': [ + (r'\\\n', Text), + (r'\n+', Whitespace, '#pop'), + (r'\\', Text), + (r'[^\S\n]+', Whitespace), + (r'\d+\.\d+\.\d+\.\d+(?:/\d+)?', Number), + (r'\d+', Number), + (r'/([*a-z0-9][*\w./-]+)', String.Other), + (r'(on|off|none|any|all|double|email|dns|min|minimal|' + r'os|productonly|full|emerg|alert|crit|error|warn|' + r'notice|info|debug|registry|script|inetd|standalone|' + r'user|group)\b', Keyword), + (r'"([^"\\]*(?:\\(.|\n)[^"\\]*)*)"', String.Double), + (r'[^\s"\\]+', Text) + ], + } + + +class SquidConfLexer(RegexLexer): + """ + Lexer for squid configuration files. + """ + + name = 'SquidConf' + url = 'http://www.squid-cache.org/' + aliases = ['squidconf', 'squid.conf', 'squid'] + filenames = ['squid.conf'] + mimetypes = ['text/x-squidconf'] + version_added = '0.9' + flags = re.IGNORECASE + + keywords = ( + "access_log", "acl", "always_direct", "announce_host", + "announce_period", "announce_port", "announce_to", "anonymize_headers", + "append_domain", "as_whois_server", "auth_param_basic", + "authenticate_children", "authenticate_program", "authenticate_ttl", + "broken_posts", "buffered_logs", "cache_access_log", "cache_announce", + "cache_dir", "cache_dns_program", "cache_effective_group", + "cache_effective_user", "cache_host", "cache_host_acl", + "cache_host_domain", "cache_log", "cache_mem", "cache_mem_high", + "cache_mem_low", "cache_mgr", "cachemgr_passwd", "cache_peer", + "cache_peer_access", "cache_replacement_policy", "cache_stoplist", + "cache_stoplist_pattern", "cache_store_log", "cache_swap", + "cache_swap_high", "cache_swap_log", "cache_swap_low", "client_db", + "client_lifetime", "client_netmask", "connect_timeout", "coredump_dir", + "dead_peer_timeout", "debug_options", "delay_access", "delay_class", + "delay_initial_bucket_level", "delay_parameters", "delay_pools", + "deny_info", "dns_children", "dns_defnames", "dns_nameservers", + "dns_testnames", "emulate_httpd_log", "err_html_text", + "fake_user_agent", "firewall_ip", "forwarded_for", "forward_snmpd_port", + "fqdncache_size", "ftpget_options", "ftpget_program", "ftp_list_width", + "ftp_passive", "ftp_user", "half_closed_clients", "header_access", + "header_replace", "hierarchy_stoplist", "high_response_time_warning", + "high_page_fault_warning", "hosts_file", "htcp_port", "http_access", + "http_anonymizer", "httpd_accel", "httpd_accel_host", + "httpd_accel_port", "httpd_accel_uses_host_header", + "httpd_accel_with_proxy", "http_port", "http_reply_access", + "icp_access", "icp_hit_stale", "icp_port", "icp_query_timeout", + "ident_lookup", "ident_lookup_access", "ident_timeout", + "incoming_http_average", "incoming_icp_average", "inside_firewall", + "ipcache_high", "ipcache_low", "ipcache_size", "local_domain", + "local_ip", "logfile_rotate", "log_fqdn", "log_icp_queries", + "log_mime_hdrs", "maximum_object_size", "maximum_single_addr_tries", + "mcast_groups", "mcast_icp_query_timeout", "mcast_miss_addr", + "mcast_miss_encode_key", "mcast_miss_port", "memory_pools", + "memory_pools_limit", "memory_replacement_policy", "mime_table", + "min_http_poll_cnt", "min_icp_poll_cnt", "minimum_direct_hops", + "minimum_object_size", "minimum_retry_timeout", "miss_access", + "negative_dns_ttl", "negative_ttl", "neighbor_timeout", + "neighbor_type_domain", "netdb_high", "netdb_low", "netdb_ping_period", + "netdb_ping_rate", "never_direct", "no_cache", "passthrough_proxy", + "pconn_timeout", "pid_filename", "pinger_program", "positive_dns_ttl", + "prefer_direct", "proxy_auth", "proxy_auth_realm", "query_icmp", + "quick_abort", "quick_abort_max", "quick_abort_min", + "quick_abort_pct", "range_offset_limit", "read_timeout", + "redirect_children", "redirect_program", + "redirect_rewrites_host_header", "reference_age", + "refresh_pattern", "reload_into_ims", "request_body_max_size", + "request_size", "request_timeout", "shutdown_lifetime", + "single_parent_bypass", "siteselect_timeout", "snmp_access", + "snmp_incoming_address", "snmp_port", "source_ping", "ssl_proxy", + "store_avg_object_size", "store_objects_per_bucket", + "strip_query_terms", "swap_level1_dirs", "swap_level2_dirs", + "tcp_incoming_address", "tcp_outgoing_address", "tcp_recv_bufsize", + "test_reachability", "udp_hit_obj", "udp_hit_obj_size", + "udp_incoming_address", "udp_outgoing_address", "unique_hostname", + "unlinkd_program", "uri_whitespace", "useragent_log", + "visible_hostname", "wais_relay", "wais_relay_host", "wais_relay_port", + ) + + opts = ( + "proxy-only", "weight", "ttl", "no-query", "default", "round-robin", + "multicast-responder", "on", "off", "all", "deny", "allow", "via", + "parent", "no-digest", "heap", "lru", "realm", "children", "q1", "q2", + "credentialsttl", "none", "disable", "offline_toggle", "diskd", + ) + + actions = ( + "shutdown", "info", "parameter", "server_list", "client_list", + r'squid.conf', + ) + + actions_stats = ( + "objects", "vm_objects", "utilization", "ipcache", "fqdncache", "dns", + "redirector", "io", "reply_headers", "filedescriptors", "netdb", + ) + + actions_log = ("status", "enable", "disable", "clear") + + acls = ( + "url_regex", "urlpath_regex", "referer_regex", "port", "proto", + "req_mime_type", "rep_mime_type", "method", "browser", "user", "src", + "dst", "time", "dstdomain", "ident", "snmp_community", + ) + + ipv4_group = r'(\d+|0x[0-9a-f]+)' + ipv4 = rf'({ipv4_group}(\.{ipv4_group}){{3}})' + ipv6_group = r'([0-9a-f]{0,4})' + ipv6 = rf'({ipv6_group}(:{ipv6_group}){{1,7}})' + bare_ip = rf'({ipv4}|{ipv6})' + # XXX: /integer is a subnet mark, but what is /IP ? + # There is no test where it is used. + ip = rf'{bare_ip}(/({bare_ip}|\d+))?' + + tokens = { + 'root': [ + (r'\s+', Whitespace), + (r'#', Comment, 'comment'), + (words(keywords, prefix=r'\b', suffix=r'\b'), Keyword), + (words(opts, prefix=r'\b', suffix=r'\b'), Name.Constant), + # Actions + (words(actions, prefix=r'\b', suffix=r'\b'), String), + (words(actions_stats, prefix=r'stats/', suffix=r'\b'), String), + (words(actions_log, prefix=r'log/', suffix=r'='), String), + (words(acls, prefix=r'\b', suffix=r'\b'), Keyword), + (ip, Number.Float), + (r'(?:\b\d+\b(?:-\b\d+|%)?)', Number), + (r'\S+', Text), + ], + 'comment': [ + (r'\s*TAG:.*', String.Escape, '#pop'), + (r'.+', Comment, '#pop'), + default('#pop'), + ], + } + + +class NginxConfLexer(RegexLexer): + """ + Lexer for Nginx configuration files. + """ + name = 'Nginx configuration file' + url = 'http://nginx.net/' + aliases = ['nginx'] + filenames = ['nginx.conf'] + mimetypes = ['text/x-nginx-conf'] + version_added = '0.11' + + tokens = { + 'root': [ + (r'(include)(\s+)([^\s;]+)', bygroups(Keyword, Whitespace, Name)), + (r'[^\s;#]+', Keyword, 'stmt'), + include('base'), + ], + 'block': [ + (r'\}', Punctuation, '#pop:2'), + (r'[^\s;#]+', Keyword.Namespace, 'stmt'), + include('base'), + ], + 'stmt': [ + (r'\{', Punctuation, 'block'), + (r';', Punctuation, '#pop'), + include('base'), + ], + 'base': [ + (r'#.*\n', Comment.Single), + (r'on|off', Name.Constant), + (r'\$[^\s;#()]+', Name.Variable), + (r'([a-z0-9.-]+)(:)([0-9]+)', + bygroups(Name, Punctuation, Number.Integer)), + (r'[a-z-]+/[a-z-+]+', String), # mimetype + # (r'[a-zA-Z._-]+', Keyword), + (r'[0-9]+[km]?\b', Number.Integer), + (r'(~)(\s*)([^\s{]+)', bygroups(Punctuation, Whitespace, String.Regex)), + (r'[:=~]', Punctuation), + (r'[^\s;#{}$]+', String), # catch all + (r'/[^\s;#]*', Name), # pathname + (r'\s+', Whitespace), + (r'[$;]', Text), # leftover characters + ], + } + + +class LighttpdConfLexer(RegexLexer): + """ + Lexer for Lighttpd configuration files. + """ + name = 'Lighttpd configuration file' + url = 'http://lighttpd.net/' + aliases = ['lighttpd', 'lighty'] + filenames = ['lighttpd.conf'] + mimetypes = ['text/x-lighttpd-conf'] + version_added = '0.11' + + tokens = { + 'root': [ + (r'#.*\n', Comment.Single), + (r'/\S*', Name), # pathname + (r'[a-zA-Z._-]+', Keyword), + (r'\d+\.\d+\.\d+\.\d+(?:/\d+)?', Number), + (r'[0-9]+', Number), + (r'=>|=~|\+=|==|=|\+', Operator), + (r'\$[A-Z]+', Name.Builtin), + (r'[(){}\[\],]', Punctuation), + (r'"([^"\\]*(?:\\.[^"\\]*)*)"', String.Double), + (r'\s+', Whitespace), + ], + + } + + +class DockerLexer(RegexLexer): + """ + Lexer for Docker configuration files. + """ + name = 'Docker' + url = 'http://docker.io' + aliases = ['docker', 'dockerfile'] + filenames = ['Dockerfile', '*.docker'] + mimetypes = ['text/x-dockerfile-config'] + version_added = '2.0' + + _keywords = (r'(?:MAINTAINER|EXPOSE|WORKDIR|USER|STOPSIGNAL)') + _bash_keywords = (r'(?:RUN|CMD|ENTRYPOINT|ENV|ARG|LABEL|ADD|COPY)') + _lb = r'(?:\s*\\?\s*)' # dockerfile line break regex + flags = re.IGNORECASE | re.MULTILINE + + tokens = { + 'root': [ + (r'#.*', Comment), + (r'(FROM)([ \t]*)(\S*)([ \t]*)(?:(AS)([ \t]*)(\S*))?', + bygroups(Keyword, Whitespace, String, Whitespace, Keyword, Whitespace, String)), + (rf'(ONBUILD)(\s+)({_lb})', bygroups(Keyword, Whitespace, using(BashLexer))), + (rf'(HEALTHCHECK)(\s+)(({_lb}--\w+=\w+{_lb})*)', + bygroups(Keyword, Whitespace, using(BashLexer))), + (rf'(VOLUME|ENTRYPOINT|CMD|SHELL)(\s+)({_lb})(\[.*?\])', + bygroups(Keyword, Whitespace, using(BashLexer), using(JsonLexer))), + (rf'(LABEL|ENV|ARG)(\s+)(({_lb}\w+=\w+{_lb})*)', + bygroups(Keyword, Whitespace, using(BashLexer))), + (rf'({_keywords}|VOLUME)\b(\s+)(.*)', bygroups(Keyword, Whitespace, String)), + (rf'({_bash_keywords})(\s+)', bygroups(Keyword, Whitespace)), + (r'(.*\\\n)*.+', using(BashLexer)), + ] + } + + +class TerraformLexer(ExtendedRegexLexer): + """ + Lexer for terraformi ``.tf`` files. + """ + + name = 'Terraform' + url = 'https://www.terraform.io/' + aliases = ['terraform', 'tf', 'hcl'] + filenames = ['*.tf', '*.hcl'] + mimetypes = ['application/x-tf', 'application/x-terraform'] + version_added = '2.1' + + classes = ('backend', 'data', 'module', 'output', 'provider', + 'provisioner', 'resource', 'variable') + classes_re = "({})".format(('|').join(classes)) + + types = ('string', 'number', 'bool', 'list', 'tuple', 'map', 'set', 'object', 'null') + + numeric_functions = ('abs', 'ceil', 'floor', 'log', 'max', + 'mix', 'parseint', 'pow', 'signum') + + string_functions = ('chomp', 'format', 'formatlist', 'indent', + 'join', 'lower', 'regex', 'regexall', 'replace', + 'split', 'strrev', 'substr', 'title', 'trim', + 'trimprefix', 'trimsuffix', 'trimspace', 'upper' + ) + + collection_functions = ('alltrue', 'anytrue', 'chunklist', 'coalesce', + 'coalescelist', 'compact', 'concat', 'contains', + 'distinct', 'element', 'flatten', 'index', 'keys', + 'length', 'list', 'lookup', 'map', 'matchkeys', + 'merge', 'range', 'reverse', 'setintersection', + 'setproduct', 'setsubtract', 'setunion', 'slice', + 'sort', 'sum', 'transpose', 'values', 'zipmap' + ) + + encoding_functions = ('base64decode', 'base64encode', 'base64gzip', + 'csvdecode', 'jsondecode', 'jsonencode', 'textdecodebase64', + 'textencodebase64', 'urlencode', 'yamldecode', 'yamlencode') + + filesystem_functions = ('abspath', 'dirname', 'pathexpand', 'basename', + 'file', 'fileexists', 'fileset', 'filebase64', 'templatefile') + + date_time_functions = ('formatdate', 'timeadd', 'timestamp') + + hash_crypto_functions = ('base64sha256', 'base64sha512', 'bcrypt', 'filebase64sha256', + 'filebase64sha512', 'filemd5', 'filesha1', 'filesha256', 'filesha512', + 'md5', 'rsadecrypt', 'sha1', 'sha256', 'sha512', 'uuid', 'uuidv5') + + ip_network_functions = ('cidrhost', 'cidrnetmask', 'cidrsubnet', 'cidrsubnets') + + type_conversion_functions = ('can', 'defaults', 'tobool', 'tolist', 'tomap', + 'tonumber', 'toset', 'tostring', 'try') + + builtins = numeric_functions + string_functions + collection_functions + encoding_functions +\ + filesystem_functions + date_time_functions + hash_crypto_functions + ip_network_functions +\ + type_conversion_functions + builtins_re = "({})".format(('|').join(builtins)) + + def heredoc_callback(self, match, ctx): + # Parse a terraform heredoc + # match: 1 = <<[-]?, 2 = name 3 = rest of line + + start = match.start(1) + yield start, Operator, match.group(1) # <<[-]? + yield match.start(2), String.Delimiter, match.group(2) # heredoc name + + ctx.pos = match.start(3) + ctx.end = match.end(3) + yield ctx.pos, String.Heredoc, match.group(3) + ctx.pos = match.end() + + hdname = match.group(2) + tolerant = True # leading whitespace is always accepted + + lines = [] + + for match in line_re.finditer(ctx.text, ctx.pos): + if tolerant: + check = match.group().strip() + else: + check = match.group().rstrip() + if check == hdname: + for amatch in lines: + yield amatch.start(), String.Heredoc, amatch.group() + yield match.start(), String.Delimiter, match.group() + ctx.pos = match.end() + break + else: + lines.append(match) + else: + # end of heredoc not found -- error! + for amatch in lines: + yield amatch.start(), Error, amatch.group() + ctx.end = len(ctx.text) + + tokens = { + 'root': [ + include('basic'), + include('whitespace'), + + # Strings + (r'(".*")', bygroups(String.Double)), + + # Constants + (words(('true', 'false'), prefix=r'\b', suffix=r'\b'), Name.Constant), + + # Types + (words(types, prefix=r'\b', suffix=r'\b'), Keyword.Type), + + include('identifier'), + include('punctuation'), + (r'[0-9]+', Number), + ], + 'basic': [ + (r'\s*/\*', Comment.Multiline, 'comment'), + (r'\s*(#|//).*\n', Comment.Single), + include('whitespace'), + + # e.g. terraform { + # e.g. egress { + (r'(\s*)([0-9a-zA-Z-_]+)(\s*)(=?)(\s*)(\{)', + bygroups(Whitespace, Name.Builtin, Whitespace, Operator, Whitespace, Punctuation)), + + # Assignment with attributes, e.g. something = ... + (r'(\s*)([0-9a-zA-Z-_]+)(\s*)(=)(\s*)', + bygroups(Whitespace, Name.Attribute, Whitespace, Operator, Whitespace)), + + # Assignment with environment variables and similar, e.g. "something" = ... + # or key value assignment, e.g. "SlotName" : ... + (r'(\s*)("\S+")(\s*)([=:])(\s*)', + bygroups(Whitespace, Literal.String.Double, Whitespace, Operator, Whitespace)), + + # Functions, e.g. jsonencode(element("value")) + (builtins_re + r'(\()', bygroups(Name.Function, Punctuation)), + + # List of attributes, e.g. ignore_changes = [last_modified, filename] + (r'(\[)([a-z_,\s]+)(\])', bygroups(Punctuation, Name.Builtin, Punctuation)), + + # e.g. resource "aws_security_group" "allow_tls" { + # e.g. backend "consul" { + (classes_re + r'(\s+)("[0-9a-zA-Z-_]+")?(\s*)("[0-9a-zA-Z-_]+")(\s+)(\{)', + bygroups(Keyword.Reserved, Whitespace, Name.Class, Whitespace, Name.Variable, Whitespace, Punctuation)), + + # here-doc style delimited strings + (r'(<<-?)\s*([a-zA-Z_]\w*)(.*?\n)', heredoc_callback), + ], + 'identifier': [ + (r'\b(var\.[0-9a-zA-Z-_\.\[\]]+)\b', bygroups(Name.Variable)), + (r'\b([0-9a-zA-Z-_\[\]]+\.[0-9a-zA-Z-_\.\[\]]+)\b', + bygroups(Name.Variable)), + ], + 'punctuation': [ + (r'[\[\]()\{\},.?:!=]', Punctuation), + ], + 'comment': [ + (r'[^*/]', Comment.Multiline), + (r'/\*', Comment.Multiline, '#push'), + (r'\*/', Comment.Multiline, '#pop'), + (r'[*/]', Comment.Multiline) + ], + 'whitespace': [ + (r'\n', Whitespace), + (r'\s+', Whitespace), + (r'(\\)(\n)', bygroups(Text, Whitespace)), + ], + } + + +class TermcapLexer(RegexLexer): + """ + Lexer for termcap database source. + + This is very simple and minimal. + """ + name = 'Termcap' + aliases = ['termcap'] + filenames = ['termcap', 'termcap.src'] + mimetypes = [] + url = 'https://en.wikipedia.org/wiki/Termcap' + version_added = '2.1' + + # NOTE: + # * multiline with trailing backslash + # * separator is ':' + # * to embed colon as data, we must use \072 + # * space after separator is not allowed (mayve) + tokens = { + 'root': [ + (r'^#.*', Comment), + (r'^[^\s#:|]+', Name.Tag, 'names'), + (r'\s+', Whitespace), + ], + 'names': [ + (r'\n', Whitespace, '#pop'), + (r':', Punctuation, 'defs'), + (r'\|', Punctuation), + (r'[^:|]+', Name.Attribute), + ], + 'defs': [ + (r'(\\)(\n[ \t]*)', bygroups(Text, Whitespace)), + (r'\n[ \t]*', Whitespace, '#pop:2'), + (r'(#)([0-9]+)', bygroups(Operator, Number)), + (r'=', Operator, 'data'), + (r':', Punctuation), + (r'[^\s:=#]+', Name.Class), + ], + 'data': [ + (r'\\072', Literal), + (r':', Punctuation, '#pop'), + (r'[^:\\]+', Literal), # for performance + (r'.', Literal), + ], + } + + +class TerminfoLexer(RegexLexer): + """ + Lexer for terminfo database source. + + This is very simple and minimal. + """ + name = 'Terminfo' + aliases = ['terminfo'] + filenames = ['terminfo', 'terminfo.src'] + mimetypes = [] + url = 'https://en.wikipedia.org/wiki/Terminfo' + version_added = '2.1' + + # NOTE: + # * multiline with leading whitespace + # * separator is ',' + # * to embed comma as data, we can use \, + # * space after separator is allowed + tokens = { + 'root': [ + (r'^#.*$', Comment), + (r'^[^\s#,|]+', Name.Tag, 'names'), + (r'\s+', Whitespace), + ], + 'names': [ + (r'\n', Whitespace, '#pop'), + (r'(,)([ \t]*)', bygroups(Punctuation, Whitespace), 'defs'), + (r'\|', Punctuation), + (r'[^,|]+', Name.Attribute), + ], + 'defs': [ + (r'\n[ \t]+', Whitespace), + (r'\n', Whitespace, '#pop:2'), + (r'(#)([0-9]+)', bygroups(Operator, Number)), + (r'=', Operator, 'data'), + (r'(,)([ \t]*)', bygroups(Punctuation, Whitespace)), + (r'[^\s,=#]+', Name.Class), + ], + 'data': [ + (r'\\[,\\]', Literal), + (r'(,)([ \t]*)', bygroups(Punctuation, Whitespace), '#pop'), + (r'[^\\,]+', Literal), # for performance + (r'.', Literal), + ], + } + + +class PkgConfigLexer(RegexLexer): + """ + Lexer for pkg-config + (see also `manual page `_). + """ + + name = 'PkgConfig' + url = 'http://www.freedesktop.org/wiki/Software/pkg-config/' + aliases = ['pkgconfig'] + filenames = ['*.pc'] + mimetypes = [] + version_added = '2.1' + + tokens = { + 'root': [ + (r'#.*$', Comment.Single), + + # variable definitions + (r'^(\w+)(=)', bygroups(Name.Attribute, Operator)), + + # keyword lines + (r'^([\w.]+)(:)', + bygroups(Name.Tag, Punctuation), 'spvalue'), + + # variable references + include('interp'), + + # fallback + (r'\s+', Whitespace), + (r'[^${}#=:\n.]+', Text), + (r'.', Text), + ], + 'interp': [ + # you can escape literal "$" as "$$" + (r'\$\$', Text), + + # variable references + (r'\$\{', String.Interpol, 'curly'), + ], + 'curly': [ + (r'\}', String.Interpol, '#pop'), + (r'\w+', Name.Attribute), + ], + 'spvalue': [ + include('interp'), + + (r'#.*$', Comment.Single, '#pop'), + (r'\n', Whitespace, '#pop'), + + # fallback + (r'\s+', Whitespace), + (r'[^${}#\n\s]+', Text), + (r'.', Text), + ], + } + + +class PacmanConfLexer(RegexLexer): + """ + Lexer for pacman.conf. + + Actually, IniLexer works almost fine for this format, + but it yield error token. It is because pacman.conf has + a form without assignment like: + + UseSyslog + Color + TotalDownload + CheckSpace + VerbosePkgLists + + These are flags to switch on. + """ + + name = 'PacmanConf' + url = 'https://www.archlinux.org/pacman/pacman.conf.5.html' + aliases = ['pacmanconf'] + filenames = ['pacman.conf'] + mimetypes = [] + version_added = '2.1' + + tokens = { + 'root': [ + # comment + (r'#.*$', Comment.Single), + + # section header + (r'^(\s*)(\[.*?\])(\s*)$', bygroups(Whitespace, Keyword, Whitespace)), + + # variable definitions + # (Leading space is allowed...) + (r'(\w+)(\s*)(=)', + bygroups(Name.Attribute, Whitespace, Operator)), + + # flags to on + (r'^(\s*)(\w+)(\s*)$', + bygroups(Whitespace, Name.Attribute, Whitespace)), + + # built-in special values + (words(( + '$repo', # repository + '$arch', # architecture + '%o', # outfile + '%u', # url + ), suffix=r'\b'), + Name.Variable), + + # fallback + (r'\s+', Whitespace), + (r'.', Text), + ], + } + + +class AugeasLexer(RegexLexer): + """ + Lexer for Augeas. + """ + name = 'Augeas' + url = 'http://augeas.net' + aliases = ['augeas'] + filenames = ['*.aug'] + version_added = '2.4' + + tokens = { + 'root': [ + (r'(module)(\s*)([^\s=]+)', bygroups(Keyword.Namespace, Whitespace, Name.Namespace)), + (r'(let)(\s*)([^\s=]+)', bygroups(Keyword.Declaration, Whitespace, Name.Variable)), + (r'(del|store|value|counter|seq|key|label|autoload|incl|excl|transform|test|get|put)(\s+)', bygroups(Name.Builtin, Whitespace)), + (r'(\()([^:]+)(\:)(unit|string|regexp|lens|tree|filter)(\))', bygroups(Punctuation, Name.Variable, Punctuation, Keyword.Type, Punctuation)), + (r'\(\*', Comment.Multiline, 'comment'), + (r'[*+\-.;=?|]', Operator), + (r'[()\[\]{}]', Operator), + (r'"', String.Double, 'string'), + (r'\/', String.Regex, 'regex'), + (r'([A-Z]\w*)(\.)(\w+)', bygroups(Name.Namespace, Punctuation, Name.Variable)), + (r'.', Name.Variable), + (r'\s+', Whitespace), + ], + 'string': [ + (r'\\.', String.Escape), + (r'[^"]', String.Double), + (r'"', String.Double, '#pop'), + ], + 'regex': [ + (r'\\.', String.Escape), + (r'[^/]', String.Regex), + (r'\/', String.Regex, '#pop'), + ], + 'comment': [ + (r'[^*)]', Comment.Multiline), + (r'\(\*', Comment.Multiline, '#push'), + (r'\*\)', Comment.Multiline, '#pop'), + (r'[)*]', Comment.Multiline) + ], + } + + +class TOMLLexer(RegexLexer): + """ + Lexer for TOML, a simple language for config files. + """ + + name = 'TOML' + aliases = ['toml'] + filenames = ['*.toml', 'Pipfile', 'poetry.lock'] + mimetypes = ['application/toml'] + url = 'https://toml.io' + version_added = '2.4' + + # Based on the TOML spec: https://toml.io/en/v1.0.0 + + # The following is adapted from CPython's tomllib: + _time = r"\d\d:\d\d:\d\d(\.\d+)?" + _datetime = rf"""(?x) + \d\d\d\d-\d\d-\d\d # date, e.g., 1988-10-27 + ( + [Tt ] {_time} # optional time + ( + [Zz]|[+-]\d\d:\d\d # optional time offset + )? + )? + """ + + tokens = { + 'root': [ + # Note that we make an effort in order to distinguish + # moments at which we're parsing a key and moments at + # which we're parsing a value. In the TOML code + # + # 1234 = 1234 + # + # the first "1234" should be Name, the second Integer. + + # Whitespace + (r'\s+', Whitespace), + + # Comment + (r'#.*', Comment.Single), + + # Assignment keys + include('key'), + + # After "=", find a value + (r'(=)(\s*)', bygroups(Operator, Whitespace), 'value'), + + # Table header + (r'\[\[?', Keyword, 'table-key'), + ], + 'key': [ + # Start of bare key (only ASCII is allowed here). + (r'[A-Za-z0-9_-]+', Name), + # Quoted key + (r'"', String.Double, 'basic-string'), + (r"'", String.Single, 'literal-string'), + # Dots act as separators in keys + (r'\.', Punctuation), + ], + 'table-key': [ + # This is like 'key', but highlights the name components + # and separating dots as Keyword because it looks better + # when the whole table header is Keyword. We do highlight + # strings as strings though. + # Start of bare key (only ASCII is allowed here). + (r'[A-Za-z0-9_-]+', Keyword), + (r'"', String.Double, 'basic-string'), + (r"'", String.Single, 'literal-string'), + (r'\.', Keyword), + (r'\]\]?', Keyword, '#pop'), + + # Inline whitespace allowed + (r'[ \t]+', Whitespace), + ], + 'value': [ + # Datetime, baretime + (_datetime, Literal.Date, '#pop'), + (_time, Literal.Date, '#pop'), + + # Recognize as float if there is a fractional part + # and/or an exponent. + (r'[+-]?\d[0-9_]*[eE][+-]?\d[0-9_]*', Number.Float, '#pop'), + (r'[+-]?\d[0-9_]*\.\d[0-9_]*([eE][+-]?\d[0-9_]*)?', + Number.Float, '#pop'), + + # Infinities and NaN + (r'[+-]?(inf|nan)', Number.Float, '#pop'), + + # Integers + (r'-?0b[01_]+', Number.Bin, '#pop'), + (r'-?0o[0-7_]+', Number.Oct, '#pop'), + (r'-?0x[0-9a-fA-F_]+', Number.Hex, '#pop'), + (r'[+-]?[0-9_]+', Number.Integer, '#pop'), + + # Strings + (r'"""', String.Double, ('#pop', 'multiline-basic-string')), + (r'"', String.Double, ('#pop', 'basic-string')), + (r"'''", String.Single, ('#pop', 'multiline-literal-string')), + (r"'", String.Single, ('#pop', 'literal-string')), + + # Booleans + (r'true|false', Keyword.Constant, '#pop'), + + # Start of array + (r'\[', Punctuation, ('#pop', 'array')), + + # Start of inline table + (r'\{', Punctuation, ('#pop', 'inline-table')), + ], + 'array': [ + # Whitespace, including newlines, is ignored inside arrays, + # and comments are allowed. + (r'\s+', Whitespace), + (r'#.*', Comment.Single), + + # Delimiters + (r',', Punctuation), + + # End of array + (r'\]', Punctuation, '#pop'), + + # Parse a value and come back + default('value'), + ], + 'inline-table': [ + # Note that unlike inline arrays, inline tables do not + # allow newlines or comments. + (r'[ \t]+', Whitespace), + + # Keys + include('key'), + + # Values + (r'(=)(\s*)', bygroups(Punctuation, Whitespace), 'value'), + + # Delimiters + (r',', Punctuation), + + # End of inline table + (r'\}', Punctuation, '#pop'), + ], + 'basic-string': [ + (r'"', String.Double, '#pop'), + include('escapes'), + (r'[^"\\]+', String.Double), + ], + 'literal-string': [ + (r".*?'", String.Single, '#pop'), + ], + 'multiline-basic-string': [ + (r'"""', String.Double, '#pop'), + (r'(\\)(\n)', bygroups(String.Escape, Whitespace)), + include('escapes'), + (r'[^"\\]+', String.Double), + (r'"', String.Double), + ], + 'multiline-literal-string': [ + (r"'''", String.Single, '#pop'), + (r"[^']+", String.Single), + (r"'", String.Single), + ], + 'escapes': [ + (r'\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}', String.Escape), + (r'\\.', String.Escape), + ], + } + +class NestedTextLexer(RegexLexer): + """ + Lexer for *NextedText*, a human-friendly data format. + + .. versionchanged:: 2.16 + Added support for *NextedText* v3.0. + """ + + name = 'NestedText' + url = 'https://nestedtext.org' + aliases = ['nestedtext', 'nt'] + filenames = ['*.nt'] + version_added = '2.9' + + tokens = { + 'root': [ + # Comment: # ... + (r'^([ ]*)(#.*)$', bygroups(Whitespace, Comment)), + + # Inline dictionary: {...} + (r'^([ ]*)(\{)', bygroups(Whitespace, Punctuation), 'inline_dict'), + + # Inline list: [...] + (r'^([ ]*)(\[)', bygroups(Whitespace, Punctuation), 'inline_list'), + + # empty multiline string item: > + (r'^([ ]*)(>)$', bygroups(Whitespace, Punctuation)), + + # multiline string item: > ... + (r'^([ ]*)(>)( )(.*?)([ \t]*)$', bygroups(Whitespace, Punctuation, Whitespace, Text, Whitespace)), + + # empty list item: - + (r'^([ ]*)(-)$', bygroups(Whitespace, Punctuation)), + + # list item: - ... + (r'^([ ]*)(-)( )(.*?)([ \t]*)$', bygroups(Whitespace, Punctuation, Whitespace, Text, Whitespace)), + + # empty multiline key item: : + (r'^([ ]*)(:)$', bygroups(Whitespace, Punctuation)), + + # multiline key item: : ... + (r'^([ ]*)(:)( )([^\n]*?)([ \t]*)$', bygroups(Whitespace, Punctuation, Whitespace, Name.Tag, Whitespace)), + + # empty dict key item: ...: + (r'^([ ]*)([^\{\[\s].*?)(:)$', bygroups(Whitespace, Name.Tag, Punctuation)), + + # dict key item: ...: ... + (r'^([ ]*)([^\{\[\s].*?)(:)( )(.*?)([ \t]*)$', bygroups(Whitespace, Name.Tag, Punctuation, Whitespace, Text, Whitespace)), + ], + 'inline_list': [ + include('whitespace'), + (r'[^\{\}\[\],\s]+', Text), + include('inline_value'), + (r',', Punctuation), + (r'\]', Punctuation, '#pop'), + (r'\n', Error, '#pop'), + ], + 'inline_dict': [ + include('whitespace'), + (r'[^\{\}\[\],:\s]+', Name.Tag), + (r':', Punctuation, 'inline_dict_value'), + (r'\}', Punctuation, '#pop'), + (r'\n', Error, '#pop'), + ], + 'inline_dict_value': [ + include('whitespace'), + (r'[^\{\}\[\],:\s]+', Text), + include('inline_value'), + (r',', Punctuation, '#pop'), + (r'\}', Punctuation, '#pop:2'), + ], + 'inline_value': [ + include('whitespace'), + (r'\{', Punctuation, 'inline_dict'), + (r'\[', Punctuation, 'inline_list'), + ], + 'whitespace': [ + (r'[ \t]+', Whitespace), + ], + } + + +class SingularityLexer(RegexLexer): + """ + Lexer for Singularity definition files. + """ + + name = 'Singularity' + url = 'https://www.sylabs.io/guides/3.0/user-guide/definition_files.html' + aliases = ['singularity'] + filenames = ['*.def', 'Singularity'] + version_added = '2.6' + flags = re.IGNORECASE | re.MULTILINE | re.DOTALL + + _headers = r'^(\s*)(bootstrap|from|osversion|mirrorurl|include|registry|namespace|includecmd)(:)' + _section = r'^(%(?:pre|post|setup|environment|help|labels|test|runscript|files|startscript))(\s*)' + _appsect = r'^(%app(?:install|help|run|labels|env|test|files))(\s*)' + + tokens = { + 'root': [ + (_section, bygroups(Generic.Heading, Whitespace), 'script'), + (_appsect, bygroups(Generic.Heading, Whitespace), 'script'), + (_headers, bygroups(Whitespace, Keyword, Text)), + (r'\s*#.*?\n', Comment), + (r'\b(([0-9]+\.?[0-9]*)|(\.[0-9]+))\b', Number), + (r'[ \t]+', Whitespace), + (r'(?!^\s*%).', Text), + ], + 'script': [ + (r'(.+?(?=^\s*%))|(.*)', using(BashLexer), '#pop'), + ], + } + + def analyse_text(text): + """This is a quite simple script file, but there are a few keywords + which seem unique to this language.""" + result = 0 + if re.search(r'\b(?:osversion|includecmd|mirrorurl)\b', text, re.IGNORECASE): + result += 0.5 + + if re.search(SingularityLexer._section[1:], text): + result += 0.49 + + return result + + +class UnixConfigLexer(RegexLexer): + """ + Lexer for Unix/Linux config files using colon-separated values, e.g. + + * ``/etc/group`` + * ``/etc/passwd`` + * ``/etc/shadow`` + """ + + name = 'Unix/Linux config files' + aliases = ['unixconfig', 'linuxconfig'] + filenames = [] + url = 'https://en.wikipedia.org/wiki/Configuration_file#Unix_and_Unix-like_operating_systems' + version_added = '2.12' + + tokens = { + 'root': [ + (r'^#.*', Comment), + (r'\n', Whitespace), + (r':', Punctuation), + (r'[0-9]+', Number), + (r'((?!\n)[a-zA-Z0-9\_\-\s\(\),]){2,}', Text), + (r'[^:\n]+', String), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/cplint.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/cplint.py new file mode 100644 index 0000000000000000000000000000000000000000..f8424252e64306dc1453a05132c8533493b4a3ea --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/cplint.py @@ -0,0 +1,43 @@ +""" + pygments.lexers.cplint + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the cplint language + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import bygroups, inherit, words +from pygments.lexers import PrologLexer +from pygments.token import Operator, Keyword, Name, String, Punctuation + +__all__ = ['CplintLexer'] + + +class CplintLexer(PrologLexer): + """ + Lexer for cplint files, including CP-logic, Logic Programs with Annotated + Disjunctions, Distributional Clauses syntax, ProbLog, DTProbLog. + """ + name = 'cplint' + url = 'https://cplint.eu' + aliases = ['cplint'] + filenames = ['*.ecl', '*.prolog', '*.pro', '*.pl', '*.P', '*.lpad', '*.cpl'] + mimetypes = ['text/x-cplint'] + version_added = '2.12' + + tokens = { + 'root': [ + (r'map_query', Keyword), + (words(('gaussian', 'uniform_dens', 'dirichlet', 'gamma', 'beta', + 'poisson', 'binomial', 'geometric', 'exponential', 'pascal', + 'multinomial', 'user', 'val', 'uniform', 'discrete', + 'finite')), Name.Builtin), + # annotations of atoms + (r'([a-z]+)(:)', bygroups(String.Atom, Punctuation)), + (r':(-|=)|::?|~=?|=>', Operator), + (r'\?', Name.Builtin), + inherit, + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/crystal.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/crystal.py new file mode 100644 index 0000000000000000000000000000000000000000..f5da4f84c4962d7e5f300b5c460c067cb93edbac --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/crystal.py @@ -0,0 +1,364 @@ +""" + pygments.lexers.crystal + ~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for Crystal. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import ExtendedRegexLexer, include, bygroups, default, \ + words, line_re +from pygments.token import Comment, Operator, Keyword, Name, String, Number, \ + Punctuation, Error, Whitespace + +__all__ = ['CrystalLexer'] + + +CRYSTAL_OPERATORS = [ + '!=', '!~', '!', '%', '&&', '&', '**', '*', '+', '-', '/', '<=>', '<<', '<=', '<', + '===', '==', '=~', '=', '>=', '>>', '>', '[]=', '[]?', '[]', '^', '||', '|', '~' +] + + +class CrystalLexer(ExtendedRegexLexer): + """ + For Crystal source code. + """ + + name = 'Crystal' + url = 'https://crystal-lang.org' + aliases = ['cr', 'crystal'] + filenames = ['*.cr'] + mimetypes = ['text/x-crystal'] + version_added = '2.2' + + flags = re.DOTALL | re.MULTILINE + + def heredoc_callback(self, match, ctx): + # okay, this is the hardest part of parsing Crystal... + # match: 1 = <<-?, 2 = quote? 3 = name 4 = quote? 5 = rest of line + + start = match.start(1) + yield start, Operator, match.group(1) # <<-? + yield match.start(2), String.Heredoc, match.group(2) # quote ", ', ` + yield match.start(3), String.Delimiter, match.group(3) # heredoc name + yield match.start(4), String.Heredoc, match.group(4) # quote again + + heredocstack = ctx.__dict__.setdefault('heredocstack', []) + outermost = not bool(heredocstack) + heredocstack.append((match.group(1) == '<<-', match.group(3))) + + ctx.pos = match.start(5) + ctx.end = match.end(5) + # this may find other heredocs, so limit the recursion depth + if len(heredocstack) < 100: + yield from self.get_tokens_unprocessed(context=ctx) + else: + yield ctx.pos, String.Heredoc, match.group(5) + ctx.pos = match.end() + + if outermost: + # this is the outer heredoc again, now we can process them all + for tolerant, hdname in heredocstack: + lines = [] + for match in line_re.finditer(ctx.text, ctx.pos): + if tolerant: + check = match.group().strip() + else: + check = match.group().rstrip() + if check == hdname: + for amatch in lines: + yield amatch.start(), String.Heredoc, amatch.group() + yield match.start(), String.Delimiter, match.group() + ctx.pos = match.end() + break + else: + lines.append(match) + else: + # end of heredoc not found -- error! + for amatch in lines: + yield amatch.start(), Error, amatch.group() + ctx.end = len(ctx.text) + del heredocstack[:] + + def gen_crystalstrings_rules(): + states = {} + states['strings'] = [ + (r'\:\w+[!?]?', String.Symbol), + (words(CRYSTAL_OPERATORS, prefix=r'\:'), String.Symbol), + (r":'(\\\\|\\[^\\]|[^'\\])*'", String.Symbol), + # This allows arbitrary text after '\ for simplicity + (r"'(\\\\|\\'|[^']|\\[^'\\]+)'", String.Char), + (r':"', String.Symbol, 'simple-sym'), + # Crystal doesn't have "symbol:"s but this simplifies function args + (r'([a-zA-Z_]\w*)(:)(?!:)', bygroups(String.Symbol, Punctuation)), + (r'"', String.Double, 'simple-string'), + (r'(?', '<>', 'ab'), \ + ('\\|', '\\|', '\\|', 'pi'): + states[name+'-intp-string'] = [ + (r'\\' + lbrace, String.Other), + ] + (lbrace != rbrace) * [ + (lbrace, String.Other, '#push'), + ] + [ + (rbrace, String.Other, '#pop'), + include('string-intp-escaped'), + (r'[\\#' + bracecc + ']', String.Other), + (r'[^\\#' + bracecc + ']+', String.Other), + ] + states['strings'].append((r'%Q?' + lbrace, String.Other, + name+'-intp-string')) + states[name+'-string'] = [ + (r'\\[\\' + bracecc + ']', String.Other), + ] + (lbrace != rbrace) * [ + (lbrace, String.Other, '#push'), + ] + [ + (rbrace, String.Other, '#pop'), + (r'[\\#' + bracecc + ']', String.Other), + (r'[^\\#' + bracecc + ']+', String.Other), + ] + # https://crystal-lang.org/docs/syntax_and_semantics/literals/array.html#percent-array-literals + states['strings'].append((r'%[qwi]' + lbrace, String.Other, + name+'-string')) + states[name+'-regex'] = [ + (r'\\[\\' + bracecc + ']', String.Regex), + ] + (lbrace != rbrace) * [ + (lbrace, String.Regex, '#push'), + ] + [ + (rbrace + '[imsx]*', String.Regex, '#pop'), + include('string-intp'), + (r'[\\#' + bracecc + ']', String.Regex), + (r'[^\\#' + bracecc + ']+', String.Regex), + ] + states['strings'].append((r'%r' + lbrace, String.Regex, + name+'-regex')) + + return states + + tokens = { + 'root': [ + (r'#.*?$', Comment.Single), + # keywords + (words(''' + abstract asm begin break case do else elsif end ensure extend if in + include next of private protected require rescue return select self super + then unless until when while with yield + '''.split(), suffix=r'\b'), Keyword), + (words(''' + previous_def forall out uninitialized __DIR__ __FILE__ __LINE__ + __END_LINE__ + '''.split(), prefix=r'(?=])', Keyword, 'funcname'), + (r'(annotation|class|struct|union|type|alias|enum)(\s+)((?:[a-zA-Z_]\w*::)*)', + bygroups(Keyword, Whitespace, Name.Namespace), 'classname'), + # https://crystal-lang.org/api/toplevel.html + (words(''' + instance_sizeof offsetof pointerof sizeof typeof + '''.split(), prefix=r'(?~!:])|' + r'(?<=(?:\s|;)when\s)|' + r'(?<=(?:\s|;)or\s)|' + r'(?<=(?:\s|;)and\s)|' + r'(?<=\.index\s)|' + r'(?<=\.scan\s)|' + r'(?<=\.sub\s)|' + r'(?<=\.sub!\s)|' + r'(?<=\.gsub\s)|' + r'(?<=\.gsub!\s)|' + r'(?<=\.match\s)|' + r'(?<=(?:\s|;)if\s)|' + r'(?<=(?:\s|;)elsif\s)|' + r'(?<=^when\s)|' + r'(?<=^index\s)|' + r'(?<=^scan\s)|' + r'(?<=^sub\s)|' + r'(?<=^gsub\s)|' + r'(?<=^sub!\s)|' + r'(?<=^gsub!\s)|' + r'(?<=^match\s)|' + r'(?<=^if\s)|' + r'(?<=^elsif\s)' + r')(\s*)(/)', bygroups(Whitespace, String.Regex), 'multiline-regex'), + # multiline regex (in method calls or subscripts) + (r'(?<=\(|,|\[)/', String.Regex, 'multiline-regex'), + # multiline regex (this time the funny no whitespace rule) + (r'(\s+)(/)(?![\s=])', bygroups(Whitespace, String.Regex), + 'multiline-regex'), + # lex numbers and ignore following regular expressions which + # are division operators in fact (grrrr. i hate that. any + # better ideas?) + # since pygments 0.7 we also eat a "?" operator after numbers + # so that the char operator does not work. Chars are not allowed + # there so that you can use the ternary operator. + # stupid example: + # x>=0?n[x]:"" + (r'(0o[0-7]+(?:_[0-7]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?', + bygroups(Number.Oct, Whitespace, Operator)), + (r'(0x[0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?', + bygroups(Number.Hex, Whitespace, Operator)), + (r'(0b[01]+(?:_[01]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?', + bygroups(Number.Bin, Whitespace, Operator)), + # 3 separate expressions for floats because any of the 3 optional + # parts makes it a float + (r'((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)(?:e[+-]?[0-9]+)?' + r'(?:_?f[0-9]+)?)(\s*)([/?])?', + bygroups(Number.Float, Whitespace, Operator)), + (r'((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)?(?:e[+-]?[0-9]+)' + r'(?:_?f[0-9]+)?)(\s*)([/?])?', + bygroups(Number.Float, Whitespace, Operator)), + (r'((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)?(?:e[+-]?[0-9]+)?' + r'(?:_?f[0-9]+))(\s*)([/?])?', + bygroups(Number.Float, Whitespace, Operator)), + (r'(0\b|[1-9][\d]*(?:_\d+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?', + bygroups(Number.Integer, Whitespace, Operator)), + # Names + (r'@@[a-zA-Z_]\w*', Name.Variable.Class), + (r'@[a-zA-Z_]\w*', Name.Variable.Instance), + (r'\$\w+', Name.Variable.Global), + (r'\$[!@&`\'+~=/\\,;.<>_*$?:"^-]', Name.Variable.Global), + (r'\$-[0adFiIlpvw]', Name.Variable.Global), + (r'::', Operator), + include('strings'), + # https://crystal-lang.org/reference/syntax_and_semantics/literals/char.html + (r'\?(\\[MC]-)*' # modifiers + r'(\\([\\abefnrtv#"\']|[0-7]{1,3}|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|u\{[a-fA-F0-9 ]+\})|\S)' + r'(?!\w)', + String.Char), + (r'[A-Z][A-Z_]+\b(?!::|\.)', Name.Constant), + # macro expansion + (r'\{%', String.Interpol, 'in-macro-control'), + (r'\{\{', String.Interpol, 'in-macro-expr'), + # annotations + (r'(@\[)(\s*)([A-Z]\w*(::[A-Z]\w*)*)', + bygroups(Operator, Whitespace, Name.Decorator), 'in-annot'), + # this is needed because Crystal attributes can look + # like keywords (class) or like this: ` ?!? + (words(CRYSTAL_OPERATORS, prefix=r'(\.|::)'), + bygroups(Operator, Name.Operator)), + (r'(\.|::)([a-zA-Z_]\w*[!?]?|[*%&^`~+\-/\[<>=])', + bygroups(Operator, Name)), + # Names can end with [!?] unless it's "!=" + (r'[a-zA-Z_]\w*(?:[!?](?!=))?', Name), + (r'(\[|\]\??|\*\*|<=>?|>=|<>?|=~|===|' + r'!~|&&?|\|\||\.{1,3})', Operator), + (r'[-+/*%=<>&!^|~]=?', Operator), + (r'[(){};,/?:\\]', Punctuation), + (r'\s+', Whitespace) + ], + 'funcname': [ + (r'(?:([a-zA-Z_]\w*)(\.))?' + r'([a-zA-Z_]\w*[!?]?|\*\*?|[-+]@?|' + r'[/%&|^`~]|\[\]=?|<<|>>|<=?>|>=?|===?)', + bygroups(Name.Class, Operator, Name.Function), '#pop'), + default('#pop') + ], + 'classname': [ + (r'[A-Z_]\w*', Name.Class), + (r'(\()(\s*)([A-Z_]\w*)(\s*)(\))', + bygroups(Punctuation, Whitespace, Name.Class, Whitespace, Punctuation)), + default('#pop') + ], + 'in-intp': [ + (r'\{', String.Interpol, '#push'), + (r'\}', String.Interpol, '#pop'), + include('root'), + ], + 'string-intp': [ + (r'#\{', String.Interpol, 'in-intp'), + ], + 'string-escaped': [ + # https://crystal-lang.org/reference/syntax_and_semantics/literals/string.html + (r'\\([\\abefnrtv#"\']|[0-7]{1,3}|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|u\{[a-fA-F0-9 ]+\})', + String.Escape) + ], + 'string-intp-escaped': [ + include('string-intp'), + include('string-escaped'), + ], + 'interpolated-regex': [ + include('string-intp'), + (r'[\\#]', String.Regex), + (r'[^\\#]+', String.Regex), + ], + 'interpolated-string': [ + include('string-intp'), + (r'[\\#]', String.Other), + (r'[^\\#]+', String.Other), + ], + 'multiline-regex': [ + include('string-intp'), + (r'\\\\', String.Regex), + (r'\\/', String.Regex), + (r'[\\#]', String.Regex), + (r'[^\\/#]+', String.Regex), + (r'/[imsx]*', String.Regex, '#pop'), + ], + 'end-part': [ + (r'.+', Comment.Preproc, '#pop') + ], + 'in-macro-control': [ + (r'\{%', String.Interpol, '#push'), + (r'%\}', String.Interpol, '#pop'), + (r'(for|verbatim)\b', Keyword), + include('root'), + ], + 'in-macro-expr': [ + (r'\{\{', String.Interpol, '#push'), + (r'\}\}', String.Interpol, '#pop'), + include('root'), + ], + 'in-annot': [ + (r'\[', Operator, '#push'), + (r'\]', Operator, '#pop'), + include('root'), + ], + } + tokens.update(gen_crystalstrings_rules()) diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/dns.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/dns.py new file mode 100644 index 0000000000000000000000000000000000000000..3fb91f571fb3d0a08522ae2d72e79595590a2cbc --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/dns.py @@ -0,0 +1,109 @@ +""" + pygments.lexers.dns + ~~~~~~~~~~~~~~~~~~~ + + Pygments lexers for DNS + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.token import Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace, Literal +from pygments.lexer import RegexLexer, bygroups, include + +__all__ = ['DnsZoneLexer'] + + +CLASSES = [ + "IN", + "CS", + "CH", + "HS", +] + +CLASSES_RE = "(" + "|".join(CLASSES) + ')' + + +class DnsZoneLexer(RegexLexer): + + """ + Lexer for DNS zone file + """ + + flags = re.MULTILINE + + name = 'Zone' + aliases = ['zone'] + filenames = [ "*.zone" ] + url = "https://datatracker.ietf.org/doc/html/rfc1035" + mimetypes = ['text/dns'] + version_added = '2.16' + + tokens = { + 'root': [ + # Empty/comment line: + (r'([ \t]*)(;.*)(\n)', bygroups(Whitespace, Comment.Single, Whitespace)), + # Special directives: + (r'^\$ORIGIN\b', Keyword, 'values'), + (r'^\$TTL\b', Keyword, 'values'), + (r'^\$INCLUDE\b', Comment.Preproc, 'include'), + # TODO, $GENERATE https://bind9.readthedocs.io/en/v9.18.14/chapter3.html#soa-rr + (r'^\$[A-Z]+\b', Keyword, 'values'), + # Records: + # [] [] [] + (r'^(@)([ \t]+)(?:([0-9]+[smhdw]?)([ \t]+))?(?:' + CLASSES_RE + "([ \t]+))?([A-Z]+)([ \t]+)", + bygroups(Operator, Whitespace, Number.Integer, Whitespace, Name.Class, Whitespace, Keyword.Type, Whitespace), + "values"), + (r'^([^ \t\n]*)([ \t]+)(?:([0-9]+[smhdw]?)([ \t]+))?(?:' + CLASSES_RE + "([ \t]+))?([A-Z]+)([ \t]+)", + bygroups(Name, Whitespace, Number.Integer, Whitespace, Name.Class, Whitespace, Keyword.Type, Whitespace), + "values"), + # [] [] [] + (r'^(Operator)([ \t]+)(?:' + CLASSES_RE + "([ \t]+))?(?:([0-9]+[smhdw]?)([ \t]+))?([A-Z]+)([ \t]+)", + bygroups(Name, Whitespace, Number.Integer, Whitespace, Name.Class, Whitespace, Keyword.Type, Whitespace), + "values"), + (r'^([^ \t\n]*)([ \t]+)(?:' + CLASSES_RE + "([ \t]+))?(?:([0-9]+[smhdw]?)([ \t]+))?([A-Z]+)([ \t]+)", + bygroups(Name, Whitespace, Number.Integer, Whitespace, Name.Class, Whitespace, Keyword.Type, Whitespace), + "values"), + ], + # Parsing values: + 'values': [ + (r'\n', Whitespace, "#pop"), + (r'\(', Punctuation, 'nested'), + include('simple-value'), + ], + # Parsing nested values (...): + 'nested': [ + (r'\)', Punctuation, "#pop"), + include('multiple-simple-values'), + ], + # Parsing values: + 'simple-value': [ + (r'(;.*)', bygroups(Comment.Single)), + (r'[ \t]+', Whitespace), + (r"@\b", Operator), + ('"', String, 'string'), + (r'[0-9]+[smhdw]?$', Number.Integer), + (r'([0-9]+[smhdw]?)([ \t]+)', bygroups(Number.Integer, Whitespace)), + (r'\S+', Literal), + ], + 'multiple-simple-values': [ + include('simple-value'), + (r'[\n]+', Whitespace), + ], + 'include': [ + (r'([ \t]+)([^ \t\n]+)([ \t]+)([-\._a-zA-Z]+)([ \t]+)(;.*)?$', + bygroups(Whitespace, Comment.PreprocFile, Whitespace, Name, Whitespace, Comment.Single), '#pop'), + (r'([ \t]+)([^ \t\n]+)([ \t\n]+)$', bygroups(Whitespace, Comment.PreprocFile, Whitespace), '#pop'), + ], + "string": [ + (r'\\"', String), + (r'"', String, "#pop"), + (r'[^"]+', String), + ] + } + + def analyse_text(text): + return text.startswith("$ORIGIN") diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/dsls.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/dsls.py new file mode 100644 index 0000000000000000000000000000000000000000..d30c11249ef4da74a6da56e1c5122dc7c58fa707 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/dsls.py @@ -0,0 +1,970 @@ +""" + pygments.lexers.dsls + ~~~~~~~~~~~~~~~~~~~~ + + Lexers for various domain-specific languages. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import ExtendedRegexLexer, RegexLexer, bygroups, words, \ + include, default, this, using, combined +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace + +__all__ = ['ProtoBufLexer', 'ZeekLexer', 'PuppetLexer', 'RslLexer', + 'MscgenLexer', 'VGLLexer', 'AlloyLexer', 'PanLexer', + 'CrmshLexer', 'ThriftLexer', 'FlatlineLexer', 'SnowballLexer'] + + +class ProtoBufLexer(RegexLexer): + """ + Lexer for Protocol Buffer definition files. + """ + + name = 'Protocol Buffer' + url = 'https://developers.google.com/protocol-buffers/' + aliases = ['protobuf', 'proto'] + filenames = ['*.proto'] + version_added = '1.4' + + tokens = { + 'root': [ + (r'[ \t]+', Whitespace), + (r'[,;{}\[\]()<>]', Punctuation), + (r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single), + (r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment.Multiline), + (words(( + 'import', 'option', 'optional', 'required', 'repeated', + 'reserved', 'default', 'packed', 'ctype', 'extensions', 'to', + 'max', 'rpc', 'returns', 'oneof', 'syntax'), prefix=r'\b', suffix=r'\b'), + Keyword), + (words(( + 'int32', 'int64', 'uint32', 'uint64', 'sint32', 'sint64', + 'fixed32', 'fixed64', 'sfixed32', 'sfixed64', + 'float', 'double', 'bool', 'string', 'bytes'), suffix=r'\b'), + Keyword.Type), + (r'(true|false)\b', Keyword.Constant), + (r'(package)(\s+)', bygroups(Keyword.Namespace, Whitespace), 'package'), + (r'(message|extend)(\s+)', + bygroups(Keyword.Declaration, Whitespace), 'message'), + (r'(enum|group|service)(\s+)', + bygroups(Keyword.Declaration, Whitespace), 'type'), + (r'\".*?\"', String), + (r'\'.*?\'', String), + (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float), + (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float), + (r'(\-?(inf|nan))\b', Number.Float), + (r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex), + (r'0[0-7]+[LlUu]*', Number.Oct), + (r'\d+[LlUu]*', Number.Integer), + (r'[+-=]', Operator), + (r'([a-zA-Z_][\w.]*)([ \t]*)(=)', + bygroups(Name.Attribute, Whitespace, Operator)), + (r'[a-zA-Z_][\w.]*', Name), + ], + 'package': [ + (r'[a-zA-Z_]\w*', Name.Namespace, '#pop'), + default('#pop'), + ], + 'message': [ + (r'[a-zA-Z_]\w*', Name.Class, '#pop'), + default('#pop'), + ], + 'type': [ + (r'[a-zA-Z_]\w*', Name, '#pop'), + default('#pop'), + ], + } + + +class ThriftLexer(RegexLexer): + """ + For Thrift interface definitions. + """ + name = 'Thrift' + url = 'https://thrift.apache.org/' + aliases = ['thrift'] + filenames = ['*.thrift'] + mimetypes = ['application/x-thrift'] + version_added = '2.1' + + tokens = { + 'root': [ + include('whitespace'), + include('comments'), + (r'"', String.Double, combined('stringescape', 'dqs')), + (r'\'', String.Single, combined('stringescape', 'sqs')), + (r'(namespace)(\s+)', + bygroups(Keyword.Namespace, Whitespace), 'namespace'), + (r'(enum|union|struct|service|exception)(\s+)', + bygroups(Keyword.Declaration, Whitespace), 'class'), + (r'((?:(?:[^\W\d]|\$)[\w.\[\]$<>]*\s+)+?)' # return arguments + r'((?:[^\W\d]|\$)[\w$]*)' # method name + r'(\s*)(\()', # signature start + bygroups(using(this), Name.Function, Whitespace, Operator)), + include('keywords'), + include('numbers'), + (r'[&=]', Operator), + (r'[:;,{}()<>\[\]]', Punctuation), + (r'[a-zA-Z_](\.\w|\w)*', Name), + ], + 'whitespace': [ + (r'\n', Whitespace), + (r'\s+', Whitespace), + ], + 'comments': [ + (r'#.*$', Comment), + (r'//.*?\n', Comment), + (r'/\*[\w\W]*?\*/', Comment.Multiline), + ], + 'stringescape': [ + (r'\\([\\nrt"\'])', String.Escape), + ], + 'dqs': [ + (r'"', String.Double, '#pop'), + (r'[^\\"\n]+', String.Double), + ], + 'sqs': [ + (r"'", String.Single, '#pop'), + (r'[^\\\'\n]+', String.Single), + ], + 'namespace': [ + (r'[a-z*](\.\w|\w)*', Name.Namespace, '#pop'), + default('#pop'), + ], + 'class': [ + (r'[a-zA-Z_]\w*', Name.Class, '#pop'), + default('#pop'), + ], + 'keywords': [ + (r'(async|oneway|extends|throws|required|optional)\b', Keyword), + (r'(true|false)\b', Keyword.Constant), + (r'(const|typedef)\b', Keyword.Declaration), + (words(( + 'cpp_namespace', 'cpp_include', 'cpp_type', 'java_package', + 'cocoa_prefix', 'csharp_namespace', 'delphi_namespace', + 'php_namespace', 'py_module', 'perl_package', + 'ruby_namespace', 'smalltalk_category', 'smalltalk_prefix', + 'xsd_all', 'xsd_optional', 'xsd_nillable', 'xsd_namespace', + 'xsd_attrs', 'include'), suffix=r'\b'), + Keyword.Namespace), + (words(( + 'void', 'bool', 'byte', 'i16', 'i32', 'i64', 'double', + 'string', 'binary', 'map', 'list', 'set', 'slist', + 'senum'), suffix=r'\b'), + Keyword.Type), + (words(( + 'BEGIN', 'END', '__CLASS__', '__DIR__', '__FILE__', + '__FUNCTION__', '__LINE__', '__METHOD__', '__NAMESPACE__', + 'abstract', 'alias', 'and', 'args', 'as', 'assert', 'begin', + 'break', 'case', 'catch', 'class', 'clone', 'continue', + 'declare', 'def', 'default', 'del', 'delete', 'do', 'dynamic', + 'elif', 'else', 'elseif', 'elsif', 'end', 'enddeclare', + 'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile', + 'ensure', 'except', 'exec', 'finally', 'float', 'for', + 'foreach', 'function', 'global', 'goto', 'if', 'implements', + 'import', 'in', 'inline', 'instanceof', 'interface', 'is', + 'lambda', 'module', 'native', 'new', 'next', 'nil', 'not', + 'or', 'pass', 'public', 'print', 'private', 'protected', + 'raise', 'redo', 'rescue', 'retry', 'register', 'return', + 'self', 'sizeof', 'static', 'super', 'switch', 'synchronized', + 'then', 'this', 'throw', 'transient', 'try', 'undef', + 'unless', 'unsigned', 'until', 'use', 'var', 'virtual', + 'volatile', 'when', 'while', 'with', 'xor', 'yield'), + prefix=r'\b', suffix=r'\b'), + Keyword.Reserved), + ], + 'numbers': [ + (r'[+-]?(\d+\.\d+([eE][+-]?\d+)?|\.?\d+[eE][+-]?\d+)', Number.Float), + (r'[+-]?0x[0-9A-Fa-f]+', Number.Hex), + (r'[+-]?[0-9]+', Number.Integer), + ], + } + + +class ZeekLexer(RegexLexer): + """ + For Zeek scripts. + """ + name = 'Zeek' + url = 'https://www.zeek.org/' + aliases = ['zeek', 'bro'] + filenames = ['*.zeek', '*.bro'] + version_added = '2.5' + + _hex = r'[0-9a-fA-F]' + _float = r'((\d*\.?\d+)|(\d+\.?\d*))([eE][-+]?\d+)?' + _h = r'[A-Za-z0-9][-A-Za-z0-9]*' + + tokens = { + 'root': [ + include('whitespace'), + include('comments'), + include('directives'), + include('attributes'), + include('types'), + include('keywords'), + include('literals'), + include('operators'), + include('punctuation'), + (r'((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(?=\s*\()', + Name.Function), + include('identifiers'), + ], + + 'whitespace': [ + (r'\n', Whitespace), + (r'\s+', Whitespace), + (r'(\\)(\n)', bygroups(Text, Whitespace)), + ], + + 'comments': [ + (r'#.*$', Comment), + ], + + 'directives': [ + (r'@(load-plugin|load-sigs|load|unload)\b.*$', Comment.Preproc), + (r'@(DEBUG|DIR|FILENAME|deprecated|if|ifdef|ifndef|else|endif)\b', Comment.Preproc), + (r'(@prefixes)(\s*)((\+?=).*)$', bygroups(Comment.Preproc, + Whitespace, Comment.Preproc)), + ], + + 'attributes': [ + (words(('redef', 'priority', 'log', 'optional', 'default', 'add_func', + 'delete_func', 'expire_func', 'read_expire', 'write_expire', + 'create_expire', 'synchronized', 'persistent', 'rotate_interval', + 'rotate_size', 'encrypt', 'raw_output', 'mergeable', 'error_handler', + 'type_column', 'deprecated'), + prefix=r'&', suffix=r'\b'), + Keyword.Pseudo), + ], + + 'types': [ + (words(('any', + 'enum', 'record', 'set', 'table', 'vector', + 'function', 'hook', 'event', + 'addr', 'bool', 'count', 'double', 'file', 'int', 'interval', + 'pattern', 'port', 'string', 'subnet', 'time'), + suffix=r'\b'), + Keyword.Type), + + (r'(opaque)(\s+)(of)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)\b', + bygroups(Keyword.Type, Whitespace, Operator.Word, Whitespace, Keyword.Type)), + + (r'(type)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(\s*)(:)(\s*)\b(record|enum)\b', + bygroups(Keyword, Whitespace, Name.Class, Whitespace, Operator, Whitespace, Keyword.Type)), + + (r'(type)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(\s*)(:)', + bygroups(Keyword, Whitespace, Name, Whitespace, Operator)), + + (r'(redef)(\s+)(record|enum)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)\b', + bygroups(Keyword, Whitespace, Keyword.Type, Whitespace, Name.Class)), + ], + + 'keywords': [ + (words(('redef', 'export', 'if', 'else', 'for', 'while', + 'return', 'break', 'next', 'continue', 'fallthrough', + 'switch', 'default', 'case', + 'add', 'delete', + 'when', 'timeout', 'schedule'), + suffix=r'\b'), + Keyword), + (r'(print)\b', Keyword), + (r'(global|local|const|option)\b', Keyword.Declaration), + (r'(module)(\s+)(([A-Za-z_]\w*)(?:::([A-Za-z_]\w*))*)\b', + bygroups(Keyword.Namespace, Whitespace, Name.Namespace)), + ], + + 'literals': [ + (r'"', String, 'string'), + + # Not the greatest match for patterns, but generally helps + # disambiguate between start of a pattern and just a division + # operator. + (r'/(?=.*/)', String.Regex, 'regex'), + + (r'(T|F)\b', Keyword.Constant), + + # Port + (r'\d{1,5}/(udp|tcp|icmp|unknown)\b', Number), + + # IPv4 Address + (r'(\d{1,3}.){3}(\d{1,3})\b', Number), + + # IPv6 Address + (r'\[([0-9a-fA-F]{0,4}:){2,7}([0-9a-fA-F]{0,4})?((\d{1,3}.){3}(\d{1,3}))?\]', Number), + + # Numeric + (r'0[xX]' + _hex + r'+\b', Number.Hex), + (_float + r'\s*(day|hr|min|sec|msec|usec)s?\b', Number.Float), + (_float + r'\b', Number.Float), + (r'(\d+)\b', Number.Integer), + + # Hostnames + (_h + r'(\.' + _h + r')+', String), + ], + + 'operators': [ + (r'[!%*/+<=>~|&^-]', Operator), + (r'([-+=&|]{2}|[+=!><-]=)', Operator), + (r'(in|as|is|of)\b', Operator.Word), + (r'\??\$', Operator), + ], + + 'punctuation': [ + (r'[{}()\[\],;.]', Punctuation), + # The "ternary if", which uses '?' and ':', could instead be + # treated as an Operator, but colons are more frequently used to + # separate field/identifier names from their types, so the (often) + # less-prominent Punctuation is used even with '?' for consistency. + (r'[?:]', Punctuation), + ], + + 'identifiers': [ + (r'([a-zA-Z_]\w*)(::)', bygroups(Name, Punctuation)), + (r'[a-zA-Z_]\w*', Name) + ], + + 'string': [ + (r'\\.', String.Escape), + (r'%-?[0-9]*(\.[0-9]+)?[DTd-gsx]', String.Escape), + (r'"', String, '#pop'), + (r'.', String), + ], + + 'regex': [ + (r'\\.', String.Escape), + (r'/', String.Regex, '#pop'), + (r'.', String.Regex), + ], + } + + +BroLexer = ZeekLexer + + +class PuppetLexer(RegexLexer): + """ + For Puppet configuration DSL. + """ + name = 'Puppet' + url = 'https://puppet.com/' + aliases = ['puppet'] + filenames = ['*.pp'] + version_added = '1.6' + + tokens = { + 'root': [ + include('comments'), + include('keywords'), + include('names'), + include('numbers'), + include('operators'), + include('strings'), + + (r'[]{}:(),;[]', Punctuation), + (r'\s+', Whitespace), + ], + + 'comments': [ + (r'(\s*)(#.*)$', bygroups(Whitespace, Comment)), + (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), + ], + + 'operators': [ + (r'(=>|\?|<|>|=|\+|-|/|\*|~|!|\|)', Operator), + (r'(in|and|or|not)\b', Operator.Word), + ], + + 'names': [ + (r'[a-zA-Z_]\w*', Name.Attribute), + (r'(\$\S+)(\[)(\S+)(\])', bygroups(Name.Variable, Punctuation, + String, Punctuation)), + (r'\$\S+', Name.Variable), + ], + + 'numbers': [ + # Copypasta from the Python lexer + (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?', Number.Float), + (r'\d+[eE][+-]?[0-9]+j?', Number.Float), + (r'0[0-7]+j?', Number.Oct), + (r'0[xX][a-fA-F0-9]+', Number.Hex), + (r'\d+L', Number.Integer.Long), + (r'\d+j?', Number.Integer) + ], + + 'keywords': [ + # Left out 'group' and 'require' + # Since they're often used as attributes + (words(( + 'absent', 'alert', 'alias', 'audit', 'augeas', 'before', 'case', + 'check', 'class', 'computer', 'configured', 'contained', + 'create_resources', 'crit', 'cron', 'debug', 'default', + 'define', 'defined', 'directory', 'else', 'elsif', 'emerg', + 'err', 'exec', 'extlookup', 'fail', 'false', 'file', + 'filebucket', 'fqdn_rand', 'generate', 'host', 'if', 'import', + 'include', 'info', 'inherits', 'inline_template', 'installed', + 'interface', 'k5login', 'latest', 'link', 'loglevel', + 'macauthorization', 'mailalias', 'maillist', 'mcx', 'md5', + 'mount', 'mounted', 'nagios_command', 'nagios_contact', + 'nagios_contactgroup', 'nagios_host', 'nagios_hostdependency', + 'nagios_hostescalation', 'nagios_hostextinfo', 'nagios_hostgroup', + 'nagios_service', 'nagios_servicedependency', 'nagios_serviceescalation', + 'nagios_serviceextinfo', 'nagios_servicegroup', 'nagios_timeperiod', + 'node', 'noop', 'notice', 'notify', 'package', 'present', 'purged', + 'realize', 'regsubst', 'resources', 'role', 'router', 'running', + 'schedule', 'scheduled_task', 'search', 'selboolean', 'selmodule', + 'service', 'sha1', 'shellquote', 'split', 'sprintf', + 'ssh_authorized_key', 'sshkey', 'stage', 'stopped', 'subscribe', + 'tag', 'tagged', 'template', 'tidy', 'true', 'undef', 'unmounted', + 'user', 'versioncmp', 'vlan', 'warning', 'yumrepo', 'zfs', 'zone', + 'zpool'), prefix='(?i)', suffix=r'\b'), + Keyword), + ], + + 'strings': [ + (r'"([^"])*"', String), + (r"'(\\'|[^'])*'", String), + ], + + } + + +class RslLexer(RegexLexer): + """ + RSL is the formal specification + language used in RAISE (Rigorous Approach to Industrial Software Engineering) + method. + """ + name = 'RSL' + url = 'http://en.wikipedia.org/wiki/RAISE' + aliases = ['rsl'] + filenames = ['*.rsl'] + mimetypes = ['text/rsl'] + version_added = '2.0' + + flags = re.MULTILINE | re.DOTALL + + tokens = { + 'root': [ + (words(( + 'Bool', 'Char', 'Int', 'Nat', 'Real', 'Text', 'Unit', 'abs', + 'all', 'always', 'any', 'as', 'axiom', 'card', 'case', 'channel', + 'chaos', 'class', 'devt_relation', 'dom', 'elems', 'else', 'elif', + 'end', 'exists', 'extend', 'false', 'for', 'hd', 'hide', 'if', + 'in', 'is', 'inds', 'initialise', 'int', 'inter', 'isin', 'len', + 'let', 'local', 'ltl_assertion', 'object', 'of', 'out', 'post', + 'pre', 'read', 'real', 'rng', 'scheme', 'skip', 'stop', 'swap', + 'then', 'theory', 'test_case', 'tl', 'transition_system', 'true', + 'type', 'union', 'until', 'use', 'value', 'variable', 'while', + 'with', 'write', '~isin', '-inflist', '-infset', '-list', + '-set'), prefix=r'\b', suffix=r'\b'), + Keyword), + (r'(variable|value)\b', Keyword.Declaration), + (r'--.*?\n', Comment), + (r'<:.*?:>', Comment), + (r'\{!.*?!\}', Comment), + (r'/\*.*?\*/', Comment), + (r'^([ \t]*)([\w]+)([ \t]*)(:[^:])', bygroups(Whitespace, + Name.Function, Whitespace, Name.Function)), + (r'(^[ \t]*)([\w]+)([ \t]*)(\([\w\s,]*\))([ \t]*)(is|as)', + bygroups(Whitespace, Name.Function, Whitespace, Text, + Whitespace, Keyword)), + (r'\b[A-Z]\w*\b', Keyword.Type), + (r'(true|false)\b', Keyword.Constant), + (r'".*"', String), + (r'\'.\'', String.Char), + (r'(><|->|-m->|/\\|<=|<<=|<\.|\|\||\|\^\||-~->|-~m->|\\/|>=|>>|' + r'\.>|\+\+|-\\|<->|=>|:-|~=|\*\*|<<|>>=|\+>|!!|\|=\||#)', + Operator), + (r'[0-9]+\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), + (r'0x[0-9a-f]+', Number.Hex), + (r'[0-9]+', Number.Integer), + (r'\s+', Whitespace), + (r'.', Text), + ], + } + + def analyse_text(text): + """ + Check for the most common text in the beginning of a RSL file. + """ + if re.search(r'scheme\s*.*?=\s*class\s*type', text, re.I) is not None: + return 1.0 + + +class MscgenLexer(RegexLexer): + """ + For Mscgen files. + """ + name = 'Mscgen' + url = 'http://www.mcternan.me.uk/mscgen/' + aliases = ['mscgen', 'msc'] + filenames = ['*.msc'] + version_added = '1.6' + + _var = r'(\w+|"(?:\\"|[^"])*")' + + tokens = { + 'root': [ + (r'msc\b', Keyword.Type), + # Options + (r'(hscale|HSCALE|width|WIDTH|wordwraparcs|WORDWRAPARCS' + r'|arcgradient|ARCGRADIENT)\b', Name.Property), + # Operators + (r'(abox|ABOX|rbox|RBOX|box|BOX|note|NOTE)\b', Operator.Word), + (r'(\.|-|\|){3}', Keyword), + (r'(?:-|=|\.|:){2}' + r'|<<=>>|<->|<=>|<<>>|<:>' + r'|->|=>>|>>|=>|:>|-x|-X' + r'|<-|<<=|<<|<=|<:|x-|X-|=', Operator), + # Names + (r'\*', Name.Builtin), + (_var, Name.Variable), + # Other + (r'\[', Punctuation, 'attrs'), + (r'\{|\}|,|;', Punctuation), + include('comments') + ], + 'attrs': [ + (r'\]', Punctuation, '#pop'), + (_var + r'(\s*)(=)(\s*)' + _var, + bygroups(Name.Attribute, Whitespace, Operator, Whitespace, + String)), + (r',', Punctuation), + include('comments') + ], + 'comments': [ + (r'(?://|#).*?\n', Comment.Single), + (r'/\*(?:.|\n)*?\*/', Comment.Multiline), + (r'[ \t\r\n]+', Whitespace) + ] + } + + +class VGLLexer(RegexLexer): + """ + For SampleManager VGL source code. + """ + name = 'VGL' + url = 'http://www.thermoscientific.com/samplemanager' + aliases = ['vgl'] + filenames = ['*.rpf'] + version_added = '1.6' + + flags = re.MULTILINE | re.DOTALL | re.IGNORECASE + + tokens = { + 'root': [ + (r'\{[^}]*\}', Comment.Multiline), + (r'declare', Keyword.Constant), + (r'(if|then|else|endif|while|do|endwhile|and|or|prompt|object' + r'|create|on|line|with|global|routine|value|endroutine|constant' + r'|global|set|join|library|compile_option|file|exists|create|copy' + r'|delete|enable|windows|name|notprotected)(?! *[=<>.,()])', + Keyword), + (r'(true|false|null|empty|error|locked)', Keyword.Constant), + (r'[~^*#!%&\[\]()<>|+=:;,./?-]', Operator), + (r'"[^"]*"', String), + (r'(\.)([a-z_$][\w$]*)', bygroups(Operator, Name.Attribute)), + (r'[0-9][0-9]*(\.[0-9]+(e[+\-]?[0-9]+)?)?', Number), + (r'[a-z_$][\w$]*', Name), + (r'[\r\n]+', Whitespace), + (r'\s+', Whitespace) + ] + } + + +class AlloyLexer(RegexLexer): + """ + For Alloy source code. + """ + + name = 'Alloy' + url = 'http://alloy.mit.edu' + aliases = ['alloy'] + filenames = ['*.als'] + mimetypes = ['text/x-alloy'] + version_added = '2.0' + + flags = re.MULTILINE | re.DOTALL + + iden_rex = r'[a-zA-Z_][\w]*"*' + string_rex = r'"\b(\\\\|\\[^\\]|[^"\\])*"' + text_tuple = (r'[^\S\n]+', Whitespace) + + tokens = { + 'sig': [ + (r'(extends)\b', Keyword, '#pop'), + (iden_rex, Name), + text_tuple, + (r',', Punctuation), + (r'\{', Operator, '#pop'), + ], + 'module': [ + text_tuple, + (iden_rex, Name, '#pop'), + ], + 'fun': [ + text_tuple, + (r'\{', Operator, '#pop'), + (iden_rex, Name, '#pop'), + ], + 'fact': [ + include('fun'), + (string_rex, String, '#pop'), + ], + 'root': [ + (r'--.*?$', Comment.Single), + (r'//.*?$', Comment.Single), + (r'/\*.*?\*/', Comment.Multiline), + text_tuple, + (r'(module|open)(\s+)', bygroups(Keyword.Namespace, Whitespace), + 'module'), + (r'(sig|enum)(\s+)', bygroups(Keyword.Declaration, Whitespace), 'sig'), + (r'(iden|univ|none)\b', Keyword.Constant), + (r'(int|Int)\b', Keyword.Type), + (r'(var|this|abstract|extends|set|seq|one|lone|let)\b', Keyword), + (r'(all|some|no|sum|disj|when|else)\b', Keyword), + (r'(run|check|for|but|exactly|expect|as|steps)\b', Keyword), + (r'(always|after|eventually|until|release)\b', Keyword), # future time operators + (r'(historically|before|once|since|triggered)\b', Keyword), # past time operators + (r'(and|or|implies|iff|in)\b', Operator.Word), + (r'(fun|pred|assert)(\s+)', bygroups(Keyword, Whitespace), 'fun'), + (r'(fact)(\s+)', bygroups(Keyword, Whitespace), 'fact'), + (r'!|#|&&|\+\+|<<|>>|>=|<=>|<=|\.\.|\.|->', Operator), + (r'[-+/*%=<>&!^|~{}\[\]().\';]', Operator), + (iden_rex, Name), + (r'[:,]', Punctuation), + (r'[0-9]+', Number.Integer), + (string_rex, String), + (r'\n', Whitespace), + ] + } + + +class PanLexer(RegexLexer): + """ + Lexer for pan source files. + + Based on tcsh lexer. + """ + + name = 'Pan' + url = 'https://github.com/quattor/pan/' + aliases = ['pan'] + filenames = ['*.pan'] + version_added = '2.0' + + tokens = { + 'root': [ + include('basic'), + (r'\(', Keyword, 'paren'), + (r'\{', Keyword, 'curly'), + include('data'), + ], + 'basic': [ + (words(( + 'if', 'for', 'with', 'else', 'type', 'bind', 'while', 'valid', 'final', + 'prefix', 'unique', 'object', 'foreach', 'include', 'template', + 'function', 'variable', 'structure', 'extensible', 'declaration'), + prefix=r'\b', suffix=r'\b'), + Keyword), + (words(( + 'file_contents', 'format', 'index', 'length', 'match', 'matches', + 'replace', 'splice', 'split', 'substr', 'to_lowercase', 'to_uppercase', + 'debug', 'error', 'traceback', 'deprecated', 'base64_decode', + 'base64_encode', 'digest', 'escape', 'unescape', 'append', 'create', + 'first', 'nlist', 'key', 'list', 'merge', 'next', 'prepend', 'is_boolean', + 'is_defined', 'is_double', 'is_list', 'is_long', 'is_nlist', 'is_null', + 'is_number', 'is_property', 'is_resource', 'is_string', 'to_boolean', + 'to_double', 'to_long', 'to_string', 'clone', 'delete', 'exists', + 'path_exists', 'if_exists', 'return', 'value'), + prefix=r'\b', suffix=r'\b'), + Name.Builtin), + (r'#.*', Comment), + (r'\\[\w\W]', String.Escape), + (r'(\b\w+)(\s*)(=)', bygroups(Name.Variable, Whitespace, Operator)), + (r'[\[\]{}()=]+', Operator), + (r'<<\s*(\'?)\\?(\w+)[\w\W]+?\2', String), + (r';', Punctuation), + ], + 'data': [ + (r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double), + (r"(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single), + (r'\s+', Whitespace), + (r'[^=\s\[\]{}()$"\'`\\;#]+', Text), + (r'\d+(?= |\Z)', Number), + ], + 'curly': [ + (r'\}', Keyword, '#pop'), + (r':-', Keyword), + (r'\w+', Name.Variable), + (r'[^}:"\'`$]+', Punctuation), + (r':', Punctuation), + include('root'), + ], + 'paren': [ + (r'\)', Keyword, '#pop'), + include('root'), + ], + } + + +class CrmshLexer(RegexLexer): + """ + Lexer for crmsh configuration files for Pacemaker clusters. + """ + name = 'Crmsh' + url = 'http://crmsh.github.io/' + aliases = ['crmsh', 'pcmk'] + filenames = ['*.crmsh', '*.pcmk'] + mimetypes = [] + version_added = '2.1' + + elem = words(( + 'node', 'primitive', 'group', 'clone', 'ms', 'location', + 'colocation', 'order', 'fencing_topology', 'rsc_ticket', + 'rsc_template', 'property', 'rsc_defaults', + 'op_defaults', 'acl_target', 'acl_group', 'user', 'role', + 'tag'), suffix=r'(?![\w#$-])') + sub = words(( + 'params', 'meta', 'operations', 'op', 'rule', + 'attributes', 'utilization'), suffix=r'(?![\w#$-])') + acl = words(('read', 'write', 'deny'), suffix=r'(?![\w#$-])') + bin_rel = words(('and', 'or'), suffix=r'(?![\w#$-])') + un_ops = words(('defined', 'not_defined'), suffix=r'(?![\w#$-])') + date_exp = words(('in_range', 'date', 'spec', 'in'), suffix=r'(?![\w#$-])') + acl_mod = (r'(?:tag|ref|reference|attribute|type|xpath)') + bin_ops = (r'(?:lt|gt|lte|gte|eq|ne)') + val_qual = (r'(?:string|version|number)') + rsc_role_action = (r'(?:Master|Started|Slave|Stopped|' + r'start|promote|demote|stop)') + + tokens = { + 'root': [ + (r'^(#.*)(\n)?', bygroups(Comment, Whitespace)), + # attr=value (nvpair) + (r'([\w#$-]+)(=)("(?:""|[^"])*"|\S+)', + bygroups(Name.Attribute, Punctuation, String)), + # need this construct, otherwise numeric node ids + # are matched as scores + # elem id: + (r'(node)(\s+)([\w#$-]+)(:)', + bygroups(Keyword, Whitespace, Name, Punctuation)), + # scores + (r'([+-]?([0-9]+|inf)):', Number), + # keywords (elements and other) + (elem, Keyword), + (sub, Keyword), + (acl, Keyword), + # binary operators + (rf'(?:{val_qual}:)?({bin_ops})(?![\w#$-])', Operator.Word), + # other operators + (bin_rel, Operator.Word), + (un_ops, Operator.Word), + (date_exp, Operator.Word), + # builtin attributes (e.g. #uname) + (r'#[a-z]+(?![\w#$-])', Name.Builtin), + # acl_mod:blah + (rf'({acl_mod})(:)("(?:""|[^"])*"|\S+)', + bygroups(Keyword, Punctuation, Name)), + # rsc_id[:(role|action)] + # NB: this matches all other identifiers + (rf'([\w#$-]+)(?:(:)({rsc_role_action}))?(?![\w#$-])', + bygroups(Name, Punctuation, Operator.Word)), + # punctuation + (r'(\\(?=\n)|[\[\](){}/:@])', Punctuation), + (r'\s+|\n', Whitespace), + ], + } + + +class FlatlineLexer(RegexLexer): + """ + Lexer for Flatline expressions. + """ + name = 'Flatline' + url = 'https://github.com/bigmlcom/flatline' + aliases = ['flatline'] + filenames = [] + mimetypes = ['text/x-flatline'] + version_added = '2.2' + + special_forms = ('let',) + + builtins = ( + "!=", "*", "+", "-", "<", "<=", "=", ">", ">=", "abs", "acos", "all", + "all-but", "all-with-defaults", "all-with-numeric-default", "and", + "asin", "atan", "avg", "avg-window", "bin-center", "bin-count", "call", + "category-count", "ceil", "cond", "cond-window", "cons", "cos", "cosh", + "count", "diff-window", "div", "ensure-value", "ensure-weighted-value", + "epoch", "epoch-day", "epoch-fields", "epoch-hour", "epoch-millisecond", + "epoch-minute", "epoch-month", "epoch-second", "epoch-weekday", + "epoch-year", "exp", "f", "field", "field-prop", "fields", "filter", + "first", "floor", "head", "if", "in", "integer", "language", "length", + "levenshtein", "linear-regression", "list", "ln", "log", "log10", "map", + "matches", "matches?", "max", "maximum", "md5", "mean", "median", "min", + "minimum", "missing", "missing-count", "missing?", "missing_count", + "mod", "mode", "normalize", "not", "nth", "occurrences", "or", + "percentile", "percentile-label", "population", "population-fraction", + "pow", "preferred", "preferred?", "quantile-label", "rand", "rand-int", + "random-value", "re-quote", "real", "replace", "replace-first", "rest", + "round", "row-number", "segment-label", "sha1", "sha256", "sin", "sinh", + "sqrt", "square", "standard-deviation", "standard_deviation", "str", + "subs", "sum", "sum-squares", "sum-window", "sum_squares", "summary", + "summary-no", "summary-str", "tail", "tan", "tanh", "to-degrees", + "to-radians", "variance", "vectorize", "weighted-random-value", "window", + "winnow", "within-percentiles?", "z-score", + ) + + valid_name = r'(?!#)[\w!$%*+<=>?/.#-]+' + + tokens = { + 'root': [ + # whitespaces - usually not relevant + (r'[,]+', Text), + (r'\s+', Whitespace), + + # numbers + (r'-?\d+\.\d+', Number.Float), + (r'-?\d+', Number.Integer), + (r'0x-?[a-f\d]+', Number.Hex), + + # strings, symbols and characters + (r'"(\\\\|\\[^\\]|[^"\\])*"', String), + (r"\\(.|[a-z]+)", String.Char), + + # expression template placeholder + (r'_', String.Symbol), + + # highlight the special forms + (words(special_forms, suffix=' '), Keyword), + + # highlight the builtins + (words(builtins, suffix=' '), Name.Builtin), + + # the remaining functions + (r'(?<=\()' + valid_name, Name.Function), + + # find the remaining variables + (valid_name, Name.Variable), + + # parentheses + (r'(\(|\))', Punctuation), + ], + } + + +class SnowballLexer(ExtendedRegexLexer): + """ + Lexer for Snowball source code. + """ + + name = 'Snowball' + url = 'https://snowballstem.org/' + aliases = ['snowball'] + filenames = ['*.sbl'] + version_added = '2.2' + + _ws = r'\n\r\t ' + + def __init__(self, **options): + self._reset_stringescapes() + ExtendedRegexLexer.__init__(self, **options) + + def _reset_stringescapes(self): + self._start = "'" + self._end = "'" + + def _string(do_string_first): + def callback(lexer, match, ctx): + s = match.start() + text = match.group() + string = re.compile(rf'([^{re.escape(lexer._start)}]*)(.)').match + escape = re.compile(rf'([^{re.escape(lexer._end)}]*)(.)').match + pos = 0 + do_string = do_string_first + while pos < len(text): + if do_string: + match = string(text, pos) + yield s + match.start(1), String.Single, match.group(1) + if match.group(2) == "'": + yield s + match.start(2), String.Single, match.group(2) + ctx.stack.pop() + break + yield s + match.start(2), String.Escape, match.group(2) + pos = match.end() + match = escape(text, pos) + yield s + match.start(), String.Escape, match.group() + if match.group(2) != lexer._end: + ctx.stack[-1] = 'escape' + break + pos = match.end() + do_string = True + ctx.pos = s + match.end() + return callback + + def _stringescapes(lexer, match, ctx): + lexer._start = match.group(3) + lexer._end = match.group(5) + return bygroups(Keyword.Reserved, Whitespace, String.Escape, Whitespace, + String.Escape)(lexer, match, ctx) + + tokens = { + 'root': [ + (r'len\b', Name.Builtin), + (r'lenof\b', Operator.Word), + include('root1'), + ], + 'root1': [ + (rf'[{_ws}]+', Whitespace), + (r'\d+', Number.Integer), + (r"'", String.Single, 'string'), + (r'[()]', Punctuation), + (r'/\*[\w\W]*?\*/', Comment.Multiline), + (r'//.*', Comment.Single), + (r'[!*+\-/<=>]=|[-=]>|<[+-]|[$*+\-/<=>?\[\]]', Operator), + (words(('as', 'get', 'hex', 'among', 'define', 'decimal', + 'backwardmode'), suffix=r'\b'), + Keyword.Reserved), + (words(('strings', 'booleans', 'integers', 'routines', 'externals', + 'groupings'), suffix=r'\b'), + Keyword.Reserved, 'declaration'), + (words(('do', 'or', 'and', 'for', 'hop', 'non', 'not', 'set', 'try', + 'fail', 'goto', 'loop', 'next', 'test', 'true', + 'false', 'unset', 'atmark', 'attach', 'delete', 'gopast', + 'insert', 'repeat', 'sizeof', 'tomark', 'atleast', + 'atlimit', 'reverse', 'setmark', 'tolimit', 'setlimit', + 'backwards', 'substring'), suffix=r'\b'), + Operator.Word), + (words(('size', 'limit', 'cursor', 'maxint', 'minint'), + suffix=r'\b'), + Name.Builtin), + (rf'(stringdef\b)([{_ws}]*)([^{_ws}]+)', + bygroups(Keyword.Reserved, Whitespace, String.Escape)), + (rf'(stringescapes\b)([{_ws}]*)(.)([{_ws}]*)(.)', + _stringescapes), + (r'[A-Za-z]\w*', Name), + ], + 'declaration': [ + (r'\)', Punctuation, '#pop'), + (words(('len', 'lenof'), suffix=r'\b'), Name, + ('root1', 'declaration')), + include('root1'), + ], + 'string': [ + (r"[^']*'", _string(True)), + ], + 'escape': [ + (r"[^']*'", _string(False)), + ], + } + + def get_tokens_unprocessed(self, text=None, context=None): + self._reset_stringescapes() + return ExtendedRegexLexer.get_tokens_unprocessed(self, text, context) diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/elpi.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/elpi.py new file mode 100644 index 0000000000000000000000000000000000000000..5e4b1e5a0ed446a613413c01661d3016dc9c9412 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/elpi.py @@ -0,0 +1,175 @@ +""" + pygments.lexers.elpi + ~~~~~~~~~~~~~~~~~~~~ + + Lexer for the `Elpi `_ programming language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups, include, using +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation + +__all__ = ['ElpiLexer'] + +from pygments.lexers.theorem import CoqLexer + +class ElpiLexer(RegexLexer): + """ + Lexer for the Elpi programming language. + """ + + name = 'Elpi' + url = 'http://github.com/LPCIC/elpi' + aliases = ['elpi'] + filenames = ['*.elpi'] + mimetypes = ['text/x-elpi'] + version_added = '2.11' + + lcase_re = r"[a-z]" + ucase_re = r"[A-Z]" + digit_re = r"[0-9]" + schar2_re = r"([+*^?/<>`'@#~=&!])" + schar_re = rf"({schar2_re}|-|\$|_)" + idchar_re = rf"({lcase_re}|{ucase_re}|{digit_re}|{schar_re})" + idcharstarns_re = rf"({idchar_re}*(\.({lcase_re}|{ucase_re}){idchar_re}*)*)" + symbchar_re = rf"({lcase_re}|{ucase_re}|{digit_re}|{schar_re}|:)" + constant_re = rf"({ucase_re}{idchar_re}*|{lcase_re}{idcharstarns_re}|{schar2_re}{symbchar_re}*|_{idchar_re}+)" + symbol_re = r"(,|<=>|->|:-|;|\?-|->|&|=>|\bas\b|\buvar\b|<|=<|=|==|>=|>|\bi<|\bi=<|\bi>=|\bi>|\bis\b|\br<|\br=<|\br>=|\br>|\bs<|\bs=<|\bs>=|\bs>|@|::|\[\]|`->|`:|`:=|\^|-|\+|\bi-|\bi\+|r-|r\+|/|\*|\bdiv\b|\bi\*|\bmod\b|\br\*|~|\bi~|\br~)" + escape_re = rf"\(({constant_re}|{symbol_re})\)" + const_sym_re = rf"({constant_re}|{symbol_re}|{escape_re})" + + tokens = { + 'root': [ + include('elpi') + ], + + 'elpi': [ + include('_elpi-comment'), + + (r"(:before|:after|:if|:name)(\s*)(\")", + bygroups(Keyword.Mode, Text.Whitespace, String.Double), + 'elpi-string'), + (r"(:index)(\s*)(\()", bygroups(Keyword.Mode, Text.Whitespace, Punctuation), + 'elpi-indexing-expr'), + (rf"\b(external pred|pred)(\s+)({const_sym_re})", + bygroups(Keyword.Declaration, Text.Whitespace, Name.Function), + 'elpi-pred-item'), + (rf"\b(external type|type)(\s+)(({const_sym_re}(,\s*)?)+)", + bygroups(Keyword.Declaration, Text.Whitespace, Name.Function), + 'elpi-type'), + (rf"\b(kind)(\s+)(({const_sym_re}|,)+)", + bygroups(Keyword.Declaration, Text.Whitespace, Name.Function), + 'elpi-type'), + (rf"\b(typeabbrev)(\s+)({const_sym_re})", + bygroups(Keyword.Declaration, Text.Whitespace, Name.Function), + 'elpi-type'), + (r"\b(typeabbrev)(\s+)(\([^)]+\))", + bygroups(Keyword.Declaration, Text.Whitespace, Name.Function), + 'elpi-type'), + (r"\b(accumulate)(\s+)(\")", + bygroups(Keyword.Declaration, Text.Whitespace, String.Double), + 'elpi-string'), + (rf"\b(accumulate|namespace|local)(\s+)({constant_re})", + bygroups(Keyword.Declaration, Text.Whitespace, Text)), + (rf"\b(shorten)(\s+)({constant_re}\.)", + bygroups(Keyword.Declaration, Text.Whitespace, Text)), + (r"\b(pi|sigma)(\s+)([a-zA-Z][A-Za-z0-9_ ]*)(\\)", + bygroups(Keyword.Declaration, Text.Whitespace, Name.Variable, Text)), + (rf"\b(constraint)(\s+)(({const_sym_re}(\s+)?)+)", + bygroups(Keyword.Declaration, Text.Whitespace, Name.Function), + 'elpi-chr-rule-start'), + + (rf"(?=[A-Z_]){constant_re}", Name.Variable), + (rf"(?=[a-z_])({constant_re}|_)\\", Name.Variable), + (r"_", Name.Variable), + (rf"({symbol_re}|!|=>|;)", Keyword.Declaration), + (constant_re, Text), + (r"\[|\]|\||=>", Keyword.Declaration), + (r'"', String.Double, 'elpi-string'), + (r'`', String.Double, 'elpi-btick'), + (r'\'', String.Double, 'elpi-tick'), + (r'\{\{', Punctuation, 'elpi-quote'), + (r'\{[^\{]', Text, 'elpi-spill'), + (r"\(", Punctuation, 'elpi-in-parens'), + (r'\d[\d_]*', Number.Integer), + (r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float), + (r"[\+\*\-/\^\.]", Operator), + ], + '_elpi-comment': [ + (r'%[^\n]*\n', Comment), + (r'/(?:\\\n)?[*](?:[^*]|[*](?!(?:\\\n)?/))*[*](?:\\\n)?/', Comment), + (r"\s+", Text.Whitespace), + ], + 'elpi-indexing-expr':[ + (r'[0-9 _]+', Number.Integer), + (r'\)', Punctuation, '#pop'), + ], + 'elpi-type': [ + (r"(ctype\s+)(\")", bygroups(Keyword.Type, String.Double), 'elpi-string'), + (r'->', Keyword.Type), + (constant_re, Keyword.Type), + (r"\(|\)", Keyword.Type), + (r"\.", Text, '#pop'), + include('_elpi-comment'), + ], + 'elpi-chr-rule-start': [ + (r"\{", Punctuation, 'elpi-chr-rule'), + include('_elpi-comment'), + ], + 'elpi-chr-rule': [ + (r"\brule\b", Keyword.Declaration), + (r"\\", Keyword.Declaration), + (r"\}", Punctuation, '#pop:2'), + include('elpi'), + ], + 'elpi-pred-item': [ + (r"[io]:", Keyword.Mode, 'elpi-ctype'), + (r"\.", Text, '#pop'), + include('_elpi-comment'), + ], + 'elpi-ctype': [ + (r"(ctype\s+)(\")", bygroups(Keyword.Type, String.Double), 'elpi-string'), + (r'->', Keyword.Type), + (constant_re, Keyword.Type), + (r"\(|\)", Keyword.Type), + (r",", Text, '#pop'), + (r"\.", Text, '#pop:2'), + include('_elpi-comment'), + ], + 'elpi-btick': [ + (r'[^` ]+', String.Double), + (r'`', String.Double, '#pop'), + ], + 'elpi-tick': [ + (r'[^\' ]+', String.Double), + (r'\'', String.Double, '#pop'), + ], + 'elpi-string': [ + (r'[^\"]+', String.Double), + (r'"', String.Double, '#pop'), + ], + 'elpi-quote': [ + (r'\}\}', Punctuation, '#pop'), + (r"\s+", Text.Whitespace), + (r"(lp:)(\{\{)", bygroups(Number, Punctuation), 'elpi-quote-exit'), + (rf"(lp:)((?=[A-Z_]){constant_re})", bygroups(Number, Name.Variable)), + (r"((?!lp:|\}\}).)+", using(CoqLexer)), + ], + 'elpi-quote-exit': [ + include('elpi'), + (r'\}\}', Punctuation, '#pop'), + ], + 'elpi-spill': [ + (r'\{[^\{]', Text, '#push'), + (r'\}[^\}]', Text, '#pop'), + include('elpi'), + ], + 'elpi-in-parens': [ + (r"\(", Punctuation, '#push'), + include('elpi'), + (r"\)", Punctuation, '#pop'), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/erlang.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/erlang.py new file mode 100644 index 0000000000000000000000000000000000000000..120f5049fdc3942173710950c3fbebf7a36ef6cd --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/erlang.py @@ -0,0 +1,526 @@ +""" + pygments.lexers.erlang + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for Erlang. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import Lexer, RegexLexer, bygroups, words, do_insertions, \ + include, default, line_re +from pygments.token import Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Generic, Whitespace + +__all__ = ['ErlangLexer', 'ErlangShellLexer', 'ElixirConsoleLexer', + 'ElixirLexer'] + + +class ErlangLexer(RegexLexer): + """ + For the Erlang functional programming language. + """ + + name = 'Erlang' + url = 'https://www.erlang.org/' + aliases = ['erlang'] + filenames = ['*.erl', '*.hrl', '*.es', '*.escript'] + mimetypes = ['text/x-erlang'] + version_added = '0.9' + + keywords = ( + 'after', 'begin', 'case', 'catch', 'cond', 'end', 'fun', 'if', + 'let', 'of', 'query', 'receive', 'try', 'when', + ) + + builtins = ( # See erlang(3) man page + 'abs', 'append_element', 'apply', 'atom_to_list', 'binary_to_list', + 'bitstring_to_list', 'binary_to_term', 'bit_size', 'bump_reductions', + 'byte_size', 'cancel_timer', 'check_process_code', 'delete_module', + 'demonitor', 'disconnect_node', 'display', 'element', 'erase', 'exit', + 'float', 'float_to_list', 'fun_info', 'fun_to_list', + 'function_exported', 'garbage_collect', 'get', 'get_keys', + 'group_leader', 'hash', 'hd', 'integer_to_list', 'iolist_to_binary', + 'iolist_size', 'is_atom', 'is_binary', 'is_bitstring', 'is_boolean', + 'is_builtin', 'is_float', 'is_function', 'is_integer', 'is_list', + 'is_number', 'is_pid', 'is_port', 'is_process_alive', 'is_record', + 'is_reference', 'is_tuple', 'length', 'link', 'list_to_atom', + 'list_to_binary', 'list_to_bitstring', 'list_to_existing_atom', + 'list_to_float', 'list_to_integer', 'list_to_pid', 'list_to_tuple', + 'load_module', 'localtime_to_universaltime', 'make_tuple', 'md5', + 'md5_final', 'md5_update', 'memory', 'module_loaded', 'monitor', + 'monitor_node', 'node', 'nodes', 'open_port', 'phash', 'phash2', + 'pid_to_list', 'port_close', 'port_command', 'port_connect', + 'port_control', 'port_call', 'port_info', 'port_to_list', + 'process_display', 'process_flag', 'process_info', 'purge_module', + 'put', 'read_timer', 'ref_to_list', 'register', 'resume_process', + 'round', 'send', 'send_after', 'send_nosuspend', 'set_cookie', + 'setelement', 'size', 'spawn', 'spawn_link', 'spawn_monitor', + 'spawn_opt', 'split_binary', 'start_timer', 'statistics', + 'suspend_process', 'system_flag', 'system_info', 'system_monitor', + 'system_profile', 'term_to_binary', 'tl', 'trace', 'trace_delivered', + 'trace_info', 'trace_pattern', 'trunc', 'tuple_size', 'tuple_to_list', + 'universaltime_to_localtime', 'unlink', 'unregister', 'whereis' + ) + + operators = r'(\+\+?|--?|\*|/|<|>|/=|=:=|=/=|=<|>=|==?|<-|!|\?)' + word_operators = ( + 'and', 'andalso', 'band', 'bnot', 'bor', 'bsl', 'bsr', 'bxor', + 'div', 'not', 'or', 'orelse', 'rem', 'xor' + ) + + atom_re = r"(?:[a-z]\w*|'[^\n']*[^\\]')" + + variable_re = r'(?:[A-Z_]\w*)' + + esc_char_re = r'[bdefnrstv\'"\\]' + esc_octal_re = r'[0-7][0-7]?[0-7]?' + esc_hex_re = r'(?:x[0-9a-fA-F]{2}|x\{[0-9a-fA-F]+\})' + esc_ctrl_re = r'\^[a-zA-Z]' + escape_re = r'(?:\\(?:'+esc_char_re+r'|'+esc_octal_re+r'|'+esc_hex_re+r'|'+esc_ctrl_re+r'))' + + macro_re = r'(?:'+variable_re+r'|'+atom_re+r')' + + base_re = r'(?:[2-9]|[12][0-9]|3[0-6])' + + tokens = { + 'root': [ + (r'\s+', Whitespace), + (r'(%.*)(\n)', bygroups(Comment, Whitespace)), + (words(keywords, suffix=r'\b'), Keyword), + (words(builtins, suffix=r'\b'), Name.Builtin), + (words(word_operators, suffix=r'\b'), Operator.Word), + (r'^-', Punctuation, 'directive'), + (operators, Operator), + (r'"', String, 'string'), + (r'<<', Name.Label), + (r'>>', Name.Label), + ('(' + atom_re + ')(:)', bygroups(Name.Namespace, Punctuation)), + ('(?:^|(?<=:))(' + atom_re + r')(\s*)(\()', + bygroups(Name.Function, Whitespace, Punctuation)), + (r'[+-]?' + base_re + r'#[0-9a-zA-Z]+', Number.Integer), + (r'[+-]?\d+', Number.Integer), + (r'[+-]?\d+.\d+', Number.Float), + (r'[]\[:_@\".{}()|;,]', Punctuation), + (variable_re, Name.Variable), + (atom_re, Name), + (r'\?'+macro_re, Name.Constant), + (r'\$(?:'+escape_re+r'|\\[ %]|[^\\])', String.Char), + (r'#'+atom_re+r'(:?\.'+atom_re+r')?', Name.Label), + + # Erlang script shebang + (r'\A#!.+\n', Comment.Hashbang), + + # EEP 43: Maps + # http://www.erlang.org/eeps/eep-0043.html + (r'#\{', Punctuation, 'map_key'), + ], + 'string': [ + (escape_re, String.Escape), + (r'"', String, '#pop'), + (r'~[0-9.*]*[~#+BPWXb-ginpswx]', String.Interpol), + (r'[^"\\~]+', String), + (r'~', String), + ], + 'directive': [ + (r'(define)(\s*)(\()('+macro_re+r')', + bygroups(Name.Entity, Whitespace, Punctuation, Name.Constant), '#pop'), + (r'(record)(\s*)(\()('+macro_re+r')', + bygroups(Name.Entity, Whitespace, Punctuation, Name.Label), '#pop'), + (atom_re, Name.Entity, '#pop'), + ], + 'map_key': [ + include('root'), + (r'=>', Punctuation, 'map_val'), + (r':=', Punctuation, 'map_val'), + (r'\}', Punctuation, '#pop'), + ], + 'map_val': [ + include('root'), + (r',', Punctuation, '#pop'), + (r'(?=\})', Punctuation, '#pop'), + ], + } + + +class ErlangShellLexer(Lexer): + """ + Shell sessions in erl (for Erlang code). + """ + name = 'Erlang erl session' + aliases = ['erl'] + filenames = ['*.erl-sh'] + mimetypes = ['text/x-erl-shellsession'] + url = 'https://www.erlang.org/' + version_added = '1.1' + + _prompt_re = re.compile(r'(?:\([\w@_.]+\))?\d+>(?=\s|\Z)') + + def get_tokens_unprocessed(self, text): + erlexer = ErlangLexer(**self.options) + + curcode = '' + insertions = [] + for match in line_re.finditer(text): + line = match.group() + m = self._prompt_re.match(line) + if m is not None: + end = m.end() + insertions.append((len(curcode), + [(0, Generic.Prompt, line[:end])])) + curcode += line[end:] + else: + if curcode: + yield from do_insertions(insertions, + erlexer.get_tokens_unprocessed(curcode)) + curcode = '' + insertions = [] + if line.startswith('*'): + yield match.start(), Generic.Traceback, line + else: + yield match.start(), Generic.Output, line + if curcode: + yield from do_insertions(insertions, + erlexer.get_tokens_unprocessed(curcode)) + + +def gen_elixir_string_rules(name, symbol, token): + states = {} + states['string_' + name] = [ + (rf'[^#{symbol}\\]+', token), + include('escapes'), + (r'\\.', token), + (rf'({symbol})', bygroups(token), "#pop"), + include('interpol') + ] + return states + + +def gen_elixir_sigstr_rules(term, term_class, token, interpol=True): + if interpol: + return [ + (rf'[^#{term_class}\\]+', token), + include('escapes'), + (r'\\.', token), + (rf'{term}[a-zA-Z]*', token, '#pop'), + include('interpol') + ] + else: + return [ + (rf'[^{term_class}\\]+', token), + (r'\\.', token), + (rf'{term}[a-zA-Z]*', token, '#pop'), + ] + + +class ElixirLexer(RegexLexer): + """ + For the Elixir language. + """ + + name = 'Elixir' + url = 'https://elixir-lang.org' + aliases = ['elixir', 'ex', 'exs'] + filenames = ['*.ex', '*.eex', '*.exs', '*.leex'] + mimetypes = ['text/x-elixir'] + version_added = '1.5' + + KEYWORD = ('fn', 'do', 'end', 'after', 'else', 'rescue', 'catch') + KEYWORD_OPERATOR = ('not', 'and', 'or', 'when', 'in') + BUILTIN = ( + 'case', 'cond', 'for', 'if', 'unless', 'try', 'receive', 'raise', + 'quote', 'unquote', 'unquote_splicing', 'throw', 'super', + ) + BUILTIN_DECLARATION = ( + 'def', 'defp', 'defmodule', 'defprotocol', 'defmacro', 'defmacrop', + 'defdelegate', 'defexception', 'defstruct', 'defimpl', 'defcallback', + ) + + BUILTIN_NAMESPACE = ('import', 'require', 'use', 'alias') + CONSTANT = ('nil', 'true', 'false') + + PSEUDO_VAR = ('_', '__MODULE__', '__DIR__', '__ENV__', '__CALLER__') + + OPERATORS3 = ( + '<<<', '>>>', '|||', '&&&', '^^^', '~~~', '===', '!==', + '~>>', '<~>', '|~>', '<|>', + ) + OPERATORS2 = ( + '==', '!=', '<=', '>=', '&&', '||', '<>', '++', '--', '|>', '=~', + '->', '<-', '|', '.', '=', '~>', '<~', + ) + OPERATORS1 = ('<', '>', '+', '-', '*', '/', '!', '^', '&') + + PUNCTUATION = ( + '\\\\', '<<', '>>', '=>', '(', ')', ':', ';', ',', '[', ']', + ) + + def get_tokens_unprocessed(self, text): + for index, token, value in RegexLexer.get_tokens_unprocessed(self, text): + if token is Name: + if value in self.KEYWORD: + yield index, Keyword, value + elif value in self.KEYWORD_OPERATOR: + yield index, Operator.Word, value + elif value in self.BUILTIN: + yield index, Keyword, value + elif value in self.BUILTIN_DECLARATION: + yield index, Keyword.Declaration, value + elif value in self.BUILTIN_NAMESPACE: + yield index, Keyword.Namespace, value + elif value in self.CONSTANT: + yield index, Name.Constant, value + elif value in self.PSEUDO_VAR: + yield index, Name.Builtin.Pseudo, value + else: + yield index, token, value + else: + yield index, token, value + + def gen_elixir_sigil_rules(): + # all valid sigil terminators (excluding heredocs) + terminators = [ + (r'\{', r'\}', '}', 'cb'), + (r'\[', r'\]', r'\]', 'sb'), + (r'\(', r'\)', ')', 'pa'), + ('<', '>', '>', 'ab'), + ('/', '/', '/', 'slas'), + (r'\|', r'\|', '|', 'pipe'), + ('"', '"', '"', 'quot'), + ("'", "'", "'", 'apos'), + ] + + # heredocs have slightly different rules + triquotes = [(r'"""', 'triquot'), (r"'''", 'triapos')] + + token = String.Other + states = {'sigils': []} + + for term, name in triquotes: + states['sigils'] += [ + (rf'(~[a-z])({term})', bygroups(token, String.Heredoc), + (name + '-end', name + '-intp')), + (rf'(~[A-Z])({term})', bygroups(token, String.Heredoc), + (name + '-end', name + '-no-intp')), + ] + + states[name + '-end'] = [ + (r'[a-zA-Z]+', token, '#pop'), + default('#pop'), + ] + states[name + '-intp'] = [ + (r'^(\s*)(' + term + ')', bygroups(Whitespace, String.Heredoc), '#pop'), + include('heredoc_interpol'), + ] + states[name + '-no-intp'] = [ + (r'^(\s*)(' + term +')', bygroups(Whitespace, String.Heredoc), '#pop'), + include('heredoc_no_interpol'), + ] + + for lterm, rterm, rterm_class, name in terminators: + states['sigils'] += [ + (r'~[a-z]' + lterm, token, name + '-intp'), + (r'~[A-Z]' + lterm, token, name + '-no-intp'), + ] + states[name + '-intp'] = \ + gen_elixir_sigstr_rules(rterm, rterm_class, token) + states[name + '-no-intp'] = \ + gen_elixir_sigstr_rules(rterm, rterm_class, token, interpol=False) + + return states + + op3_re = "|".join(re.escape(s) for s in OPERATORS3) + op2_re = "|".join(re.escape(s) for s in OPERATORS2) + op1_re = "|".join(re.escape(s) for s in OPERATORS1) + ops_re = rf'(?:{op3_re}|{op2_re}|{op1_re})' + punctuation_re = "|".join(re.escape(s) for s in PUNCTUATION) + alnum = r'\w' + name_re = rf'(?:\.\.\.|[a-z_]{alnum}*[!?]?)' + modname_re = rf'[A-Z]{alnum}*(?:\.[A-Z]{alnum}*)*' + complex_name_re = rf'(?:{name_re}|{modname_re}|{ops_re})' + special_atom_re = r'(?:\.\.\.|<<>>|%\{\}|%|\{\})' + + long_hex_char_re = r'(\\x\{)([\da-fA-F]+)(\})' + hex_char_re = r'(\\x[\da-fA-F]{1,2})' + escape_char_re = r'(\\[abdefnrstv])' + + tokens = { + 'root': [ + (r'\s+', Whitespace), + (r'#.*$', Comment.Single), + + # Various kinds of characters + (r'(\?)' + long_hex_char_re, + bygroups(String.Char, + String.Escape, Number.Hex, String.Escape)), + (r'(\?)' + hex_char_re, + bygroups(String.Char, String.Escape)), + (r'(\?)' + escape_char_re, + bygroups(String.Char, String.Escape)), + (r'\?\\?.', String.Char), + + # '::' has to go before atoms + (r':::', String.Symbol), + (r'::', Operator), + + # atoms + (r':' + special_atom_re, String.Symbol), + (r':' + complex_name_re, String.Symbol), + (r':"', String.Symbol, 'string_double_atom'), + (r":'", String.Symbol, 'string_single_atom'), + + # [keywords: ...] + (rf'({special_atom_re}|{complex_name_re})(:)(?=\s|\n)', + bygroups(String.Symbol, Punctuation)), + + # @attributes + (r'@' + name_re, Name.Attribute), + + # identifiers + (name_re, Name), + (rf'(%?)({modname_re})', bygroups(Punctuation, Name.Class)), + + # operators and punctuation + (op3_re, Operator), + (op2_re, Operator), + (punctuation_re, Punctuation), + (r'&\d', Name.Entity), # anon func arguments + (op1_re, Operator), + + # numbers + (r'0b[01]+', Number.Bin), + (r'0o[0-7]+', Number.Oct), + (r'0x[\da-fA-F]+', Number.Hex), + (r'\d(_?\d)*\.\d(_?\d)*([eE][-+]?\d(_?\d)*)?', Number.Float), + (r'\d(_?\d)*', Number.Integer), + + # strings and heredocs + (r'(""")(\s*)', bygroups(String.Heredoc, Whitespace), + 'heredoc_double'), + (r"(''')(\s*)$", bygroups(String.Heredoc, Whitespace), + 'heredoc_single'), + (r'"', String.Double, 'string_double'), + (r"'", String.Single, 'string_single'), + + include('sigils'), + + (r'%\{', Punctuation, 'map_key'), + (r'\{', Punctuation, 'tuple'), + ], + 'heredoc_double': [ + (r'^(\s*)(""")', bygroups(Whitespace, String.Heredoc), '#pop'), + include('heredoc_interpol'), + ], + 'heredoc_single': [ + (r"^\s*'''", String.Heredoc, '#pop'), + include('heredoc_interpol'), + ], + 'heredoc_interpol': [ + (r'[^#\\\n]+', String.Heredoc), + include('escapes'), + (r'\\.', String.Heredoc), + (r'\n+', String.Heredoc), + include('interpol'), + ], + 'heredoc_no_interpol': [ + (r'[^\\\n]+', String.Heredoc), + (r'\\.', String.Heredoc), + (r'\n+', Whitespace), + ], + 'escapes': [ + (long_hex_char_re, + bygroups(String.Escape, Number.Hex, String.Escape)), + (hex_char_re, String.Escape), + (escape_char_re, String.Escape), + ], + 'interpol': [ + (r'#\{', String.Interpol, 'interpol_string'), + ], + 'interpol_string': [ + (r'\}', String.Interpol, "#pop"), + include('root') + ], + 'map_key': [ + include('root'), + (r':', Punctuation, 'map_val'), + (r'=>', Punctuation, 'map_val'), + (r'\}', Punctuation, '#pop'), + ], + 'map_val': [ + include('root'), + (r',', Punctuation, '#pop'), + (r'(?=\})', Punctuation, '#pop'), + ], + 'tuple': [ + include('root'), + (r'\}', Punctuation, '#pop'), + ], + } + tokens.update(gen_elixir_string_rules('double', '"', String.Double)) + tokens.update(gen_elixir_string_rules('single', "'", String.Single)) + tokens.update(gen_elixir_string_rules('double_atom', '"', String.Symbol)) + tokens.update(gen_elixir_string_rules('single_atom', "'", String.Symbol)) + tokens.update(gen_elixir_sigil_rules()) + + +class ElixirConsoleLexer(Lexer): + """ + For Elixir interactive console (iex) output like: + + .. sourcecode:: iex + + iex> [head | tail] = [1,2,3] + [1,2,3] + iex> head + 1 + iex> tail + [2,3] + iex> [head | tail] + [1,2,3] + iex> length [head | tail] + 3 + """ + + name = 'Elixir iex session' + aliases = ['iex'] + mimetypes = ['text/x-elixir-shellsession'] + url = 'https://elixir-lang.org' + version_added = '1.5' + + _prompt_re = re.compile(r'(iex|\.{3})((?:\([\w@_.]+\))?\d+|\(\d+\))?> ') + + def get_tokens_unprocessed(self, text): + exlexer = ElixirLexer(**self.options) + + curcode = '' + in_error = False + insertions = [] + for match in line_re.finditer(text): + line = match.group() + if line.startswith('** '): + in_error = True + insertions.append((len(curcode), + [(0, Generic.Error, line[:-1])])) + curcode += line[-1:] + else: + m = self._prompt_re.match(line) + if m is not None: + in_error = False + end = m.end() + insertions.append((len(curcode), + [(0, Generic.Prompt, line[:end])])) + curcode += line[end:] + else: + if curcode: + yield from do_insertions( + insertions, exlexer.get_tokens_unprocessed(curcode)) + curcode = '' + insertions = [] + token = Generic.Error if in_error else Generic.Output + yield match.start(), token, line + if curcode: + yield from do_insertions( + insertions, exlexer.get_tokens_unprocessed(curcode)) diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/graphql.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/graphql.py new file mode 100644 index 0000000000000000000000000000000000000000..7de5b6e7cf41d8e4337319f2847d967be56cf80f --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/graphql.py @@ -0,0 +1,176 @@ +""" + pygments.lexers.graphql + ~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for GraphQL, an open-source data query and manipulation + language for APIs. + + More information: + https://graphql.org/ + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, words, include, bygroups, default +from pygments.token import (Comment, Keyword, Name, Number, Punctuation, String, + Whitespace) + + +__all__ = ["GraphQLLexer"] + +OPERATION_TYPES = ("query", "mutation", "subscription") +BUILTIN_TYPES = ("Int", "Float", "String", "Boolean", "ID") +BOOLEAN_VALUES = ("true", "false", "null") +KEYWORDS = ( + "type", + "schema", + "extend", + "enum", + "scalar", + "implements", + "interface", + "union", + "input", + "directive", + "QUERY", + "MUTATION", + "SUBSCRIPTION", + "FIELD", + "FRAGMENT_DEFINITION", + "FRAGMENT_SPREAD", + "INLINE_FRAGMENT", + "SCHEMA", + "SCALAR", + "OBJECT", + "FIELD_DEFINITION", + "ARGUMENT_DEFINITION", + "INTERFACE", + "UNION", + "ENUM", + "ENUM_VALUE", + "INPUT_OBJECT", + "INPUT_FIELD_DEFINITION", +) + + +class GraphQLLexer(RegexLexer): + """ + Lexer for GraphQL syntax + """ + name = "GraphQL" + aliases = ["graphql"] + filenames = ["*.graphql"] + url = "https://graphql.org" + version_added = '2.16' + + tokens = { + "ignored_tokens": [ + (r"\s+", Whitespace), # Whitespaces + (r"#.*$", Comment), + (",", Punctuation), # Insignificant commas + ], + "value": [ + include("ignored_tokens"), + (r"-?\d+(?![.eE])", Number.Integer, "#pop"), + ( + r"-?\d+(\.\d+)?([eE][+-]?\d+)?", + Number.Float, + "#pop", + ), + (r'"', String, ("#pop", "string")), + (words(BOOLEAN_VALUES, suffix=r"\b"), Name.Builtin, "#pop"), + (r"\$[a-zA-Z_]\w*", Name.Variable, "#pop"), + (r"[a-zA-Z_]\w*", Name.Constant, "#pop"), + (r"\[", Punctuation, ("#pop", "list_value")), + (r"\{", Punctuation, ("#pop", "object_value")), + ], + "list_value": [ + include("ignored_tokens"), + ("]", Punctuation, "#pop"), + default("value"), + ], + "object_value": [ + include("ignored_tokens"), + (r"[a-zA-Z_]\w*", Name), + (r":", Punctuation, "value"), + (r"\}", Punctuation, "#pop"), + ], + "string": [ + (r'\\(["\\/bfnrt]|u[a-fA-F0-9]{4})', String.Escape), + (r'[^\\"\n]+', String), # all other characters + (r'"', String, "#pop"), + ], + "root": [ + include("ignored_tokens"), + (words(OPERATION_TYPES, suffix=r"\b"), Keyword, "operation"), + (words(KEYWORDS, suffix=r"\b"), Keyword), + (r"\{", Punctuation, "selection_set"), + (r"fragment\b", Keyword, "fragment_definition"), + ], + "operation": [ + include("ignored_tokens"), + (r"[a-zA-Z_]\w*", Name.Function), + (r"\(", Punctuation, "variable_definition"), + (r"\{", Punctuation, ("#pop", "selection_set")), + ], + "variable_definition": [ + include("ignored_tokens"), + (r"\$[a-zA-Z_]\w*", Name.Variable), + (r"[\]!]", Punctuation), + (r":", Punctuation, "type"), + (r"=", Punctuation, "value"), + (r"\)", Punctuation, "#pop"), + ], + "type": [ + include("ignored_tokens"), + (r"\[", Punctuation), + (words(BUILTIN_TYPES, suffix=r"\b"), Name.Builtin, "#pop"), + (r"[a-zA-Z_]\w*", Name.Class, "#pop"), + ], + "selection_set": [ + include("ignored_tokens"), + (r"([a-zA-Z_]\w*)(\s*)(:)", bygroups(Name.Label, Whitespace, Punctuation)), + (r"[a-zA-Z_]\w*", Name), # Field + ( + r"(\.\.\.)(\s+)(on)\b", + bygroups(Punctuation, Whitespace, Keyword), + "inline_fragment", + ), + (r"\.\.\.", Punctuation, "fragment_spread"), + (r"\(", Punctuation, "arguments"), + (r"@[a-zA-Z_]\w*", Name.Decorator, "directive"), + (r"\{", Punctuation, "selection_set"), + (r"\}", Punctuation, "#pop"), + ], + "directive": [ + include("ignored_tokens"), + (r"\(", Punctuation, ("#pop", "arguments")), + ], + "arguments": [ + include("ignored_tokens"), + (r"[a-zA-Z_]\w*", Name), + (r":", Punctuation, "value"), + (r"\)", Punctuation, "#pop"), + ], + # Fragments + "fragment_definition": [ + include("ignored_tokens"), + (r"[\]!]", Punctuation), # For NamedType + (r"on\b", Keyword, "type"), + (r"[a-zA-Z_]\w*", Name.Function), + (r"@[a-zA-Z_]\w*", Name.Decorator, "directive"), + (r"\{", Punctuation, ("#pop", "selection_set")), + ], + "fragment_spread": [ + include("ignored_tokens"), + (r"@[a-zA-Z_]\w*", Name.Decorator, "directive"), + (r"[a-zA-Z_]\w*", Name, "#pop"), # Fragment name + ], + "inline_fragment": [ + include("ignored_tokens"), + (r"[a-zA-Z_]\w*", Name.Class), # Type condition + (r"@[a-zA-Z_]\w*", Name.Decorator, "directive"), + (r"\{", Punctuation, ("#pop", "selection_set")), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/graphviz.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/graphviz.py new file mode 100644 index 0000000000000000000000000000000000000000..6b4841554f4acb570faa5896e0e5042bbfedc225 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/graphviz.py @@ -0,0 +1,58 @@ +""" + pygments.lexers.graphviz + ~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the DOT language (graphviz). + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups +from pygments.token import Comment, Keyword, Operator, Name, String, Number, \ + Punctuation, Whitespace + + +__all__ = ['GraphvizLexer'] + + +class GraphvizLexer(RegexLexer): + """ + For graphviz DOT graph description language. + """ + name = 'Graphviz' + url = 'https://www.graphviz.org/doc/info/lang.html' + aliases = ['graphviz', 'dot'] + filenames = ['*.gv', '*.dot'] + mimetypes = ['text/x-graphviz', 'text/vnd.graphviz'] + version_added = '2.8' + tokens = { + 'root': [ + (r'\s+', Whitespace), + (r'(#|//).*?$', Comment.Single), + (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), + (r'(?i)(node|edge|graph|digraph|subgraph|strict)\b', Keyword), + (r'--|->', Operator), + (r'[{}[\]:;,]', Punctuation), + (r'(\b\D\w*)(\s*)(=)(\s*)', + bygroups(Name.Attribute, Whitespace, Punctuation, Whitespace), + 'attr_id'), + (r'\b(n|ne|e|se|s|sw|w|nw|c|_)\b', Name.Builtin), + (r'\b\D\w*', Name.Tag), # node + (r'[-]?((\.[0-9]+)|([0-9]+(\.[0-9]*)?))', Number), + (r'"(\\"|[^"])*?"', Name.Tag), # quoted node + (r'<', Punctuation, 'xml'), + ], + 'attr_id': [ + (r'\b\D\w*', String, '#pop'), + (r'[-]?((\.[0-9]+)|([0-9]+(\.[0-9]*)?))', Number, '#pop'), + (r'"(\\"|[^"])*?"', String.Double, '#pop'), + (r'<', Punctuation, ('#pop', 'xml')), + ], + 'xml': [ + (r'<', Punctuation, '#push'), + (r'>', Punctuation, '#pop'), + (r'\s+', Whitespace), + (r'[^<>\s]', Name.Tag), + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/hare.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/hare.py new file mode 100644 index 0000000000000000000000000000000000000000..56548d5e59f3ca0968d79f7e76cb67dc4ac817fd --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/hare.py @@ -0,0 +1,73 @@ +""" + pygments.lexers.hare + ~~~~~~~~~~~~~~~~~~~~ + + Lexers for the Hare language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, include, words +from pygments.token import Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace + +__all__ = ['HareLexer'] + +class HareLexer(RegexLexer): + """ + Lexer for the Hare programming language. + """ + name = 'Hare' + url = 'https://harelang.org/' + aliases = ['hare'] + filenames = ['*.ha'] + mimetypes = ['text/x-hare'] + version_added = '2.19' + + _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+' + _ws1 = r'\s*(?:/[*].*?[*]/\s*)?' + + tokens = { + 'whitespace': [ + (r'^use.*;', Comment.Preproc), + (r'@[a-z]+', Comment.Preproc), + (r'\n', Whitespace), + (r'\s+', Whitespace), + (r'//.*?$', Comment.Single), + ], + 'statements': [ + (r'"', String, 'string'), + (r'`[^`]*`', String), + (r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char), + (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float), + (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float), + (r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex), + (r'0o[0-7]+[LlUu]*', Number.Oct), + (r'\d+[zui]?(\d+)?', Number.Integer), + (r'[~!%^&*+=|?:<>/-]', Operator), + (words(('as', 'is', '=>', '..', '...')), Operator), + (r'[()\[\],.{};]+', Punctuation), + (words(('abort', 'align', 'alloc', 'append', 'assert', 'case', + 'const', 'def', 'defer', 'delete', 'else', 'enum', 'export', + 'fn', 'for', 'free', 'if', 'let', 'len', 'match', 'offset', + 'return', 'static', 'struct', 'switch', 'type', 'union', + 'yield', 'vastart', 'vaarg', 'vaend'), + suffix=r'\b'), Keyword), + (r'(bool|int|uint|uintptr|u8|u16|u32|u64|i8|i16|i32|i64|f32|f64|null|done|never|void|nullable|rune|size|valist)\b', + Keyword.Type), + (r'(true|false|null)\b', Name.Builtin), + (r'[a-zA-Z_]\w*', Name), + ], + 'string': [ + (r'"', String, '#pop'), + (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|' + r'u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})', String.Escape), + (r'[^\\"\n]+', String), # all other characters + (r'\\', String), # stray backslash + ], + 'root': [ + include('whitespace'), + include('statements'), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/idl.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/idl.py new file mode 100644 index 0000000000000000000000000000000000000000..21b8d3130c75de770ae13908b65618973c979b69 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/idl.py @@ -0,0 +1,284 @@ +""" + pygments.lexers.idl + ~~~~~~~~~~~~~~~~~~~ + + Lexers for IDL. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, words, bygroups +from pygments.token import Text, Comment, Operator, Keyword, Name, Number, \ + String, Whitespace + +__all__ = ['IDLLexer'] + + +class IDLLexer(RegexLexer): + """ + Pygments Lexer for IDL (Interactive Data Language). + """ + name = 'IDL' + url = 'https://www.l3harrisgeospatial.com/Software-Technology/IDL' + aliases = ['idl'] + filenames = ['*.pro'] + mimetypes = ['text/idl'] + version_added = '1.6' + + flags = re.IGNORECASE | re.MULTILINE + + _RESERVED = ( + 'and', 'begin', 'break', 'case', 'common', 'compile_opt', + 'continue', 'do', 'else', 'end', 'endcase', 'endelse', + 'endfor', 'endforeach', 'endif', 'endrep', 'endswitch', + 'endwhile', 'eq', 'for', 'foreach', 'forward_function', + 'function', 'ge', 'goto', 'gt', 'if', 'inherits', 'le', + 'lt', 'mod', 'ne', 'not', 'of', 'on_ioerror', 'or', 'pro', + 'repeat', 'switch', 'then', 'until', 'while', 'xor') + """Reserved words from: http://www.exelisvis.com/docs/reswords.html""" + + _BUILTIN_LIB = ( + 'abs', 'acos', 'adapt_hist_equal', 'alog', 'alog10', + 'amoeba', 'annotate', 'app_user_dir', 'app_user_dir_query', + 'arg_present', 'array_equal', 'array_indices', 'arrow', + 'ascii_template', 'asin', 'assoc', 'atan', 'axis', + 'a_correlate', 'bandpass_filter', 'bandreject_filter', + 'barplot', 'bar_plot', 'beseli', 'beselj', 'beselk', + 'besely', 'beta', 'bilinear', 'binary_template', 'bindgen', + 'binomial', 'bin_date', 'bit_ffs', 'bit_population', + 'blas_axpy', 'blk_con', 'box_cursor', 'breakpoint', + 'broyden', 'butterworth', 'bytarr', 'byte', 'byteorder', + 'bytscl', 'caldat', 'calendar', 'call_external', + 'call_function', 'call_method', 'call_procedure', 'canny', + 'catch', 'cd', r'cdf_\w*', 'ceil', 'chebyshev', + 'check_math', + 'chisqr_cvf', 'chisqr_pdf', 'choldc', 'cholsol', 'cindgen', + 'cir_3pnt', 'close', 'cluster', 'cluster_tree', 'clust_wts', + 'cmyk_convert', 'colorbar', 'colorize_sample', + 'colormap_applicable', 'colormap_gradient', + 'colormap_rotation', 'colortable', 'color_convert', + 'color_exchange', 'color_quan', 'color_range_map', 'comfit', + 'command_line_args', 'complex', 'complexarr', 'complexround', + 'compute_mesh_normals', 'cond', 'congrid', 'conj', + 'constrained_min', 'contour', 'convert_coord', 'convol', + 'convol_fft', 'coord2to3', 'copy_lun', 'correlate', 'cos', + 'cosh', 'cpu', 'cramer', 'create_cursor', 'create_struct', + 'create_view', 'crossp', 'crvlength', 'cti_test', + 'ct_luminance', 'cursor', 'curvefit', 'cvttobm', 'cv_coord', + 'cw_animate', 'cw_animate_getp', 'cw_animate_load', + 'cw_animate_run', 'cw_arcball', 'cw_bgroup', 'cw_clr_index', + 'cw_colorsel', 'cw_defroi', 'cw_field', 'cw_filesel', + 'cw_form', 'cw_fslider', 'cw_light_editor', + 'cw_light_editor_get', 'cw_light_editor_set', 'cw_orient', + 'cw_palette_editor', 'cw_palette_editor_get', + 'cw_palette_editor_set', 'cw_pdmenu', 'cw_rgbslider', + 'cw_tmpl', 'cw_zoom', 'c_correlate', 'dblarr', 'db_exists', + 'dcindgen', 'dcomplex', 'dcomplexarr', 'define_key', + 'define_msgblk', 'define_msgblk_from_file', 'defroi', + 'defsysv', 'delvar', 'dendrogram', 'dendro_plot', 'deriv', + 'derivsig', 'determ', 'device', 'dfpmin', 'diag_matrix', + 'dialog_dbconnect', 'dialog_message', 'dialog_pickfile', + 'dialog_printersetup', 'dialog_printjob', + 'dialog_read_image', 'dialog_write_image', 'digital_filter', + 'dilate', 'dindgen', 'dissolve', 'dist', 'distance_measure', + 'dlm_load', 'dlm_register', 'doc_library', 'double', + 'draw_roi', 'edge_dog', 'efont', 'eigenql', 'eigenvec', + 'ellipse', 'elmhes', 'emboss', 'empty', 'enable_sysrtn', + 'eof', r'eos_\w*', 'erase', 'erf', 'erfc', 'erfcx', + 'erode', 'errorplot', 'errplot', 'estimator_filter', + 'execute', 'exit', 'exp', 'expand', 'expand_path', 'expint', + 'extrac', 'extract_slice', 'factorial', 'fft', 'filepath', + 'file_basename', 'file_chmod', 'file_copy', 'file_delete', + 'file_dirname', 'file_expand_path', 'file_info', + 'file_lines', 'file_link', 'file_mkdir', 'file_move', + 'file_poll_input', 'file_readlink', 'file_same', + 'file_search', 'file_test', 'file_which', 'findgen', + 'finite', 'fix', 'flick', 'float', 'floor', 'flow3', + 'fltarr', 'flush', 'format_axis_values', 'free_lun', + 'fstat', 'fulstr', 'funct', 'fv_test', 'fx_root', + 'fz_roots', 'f_cvf', 'f_pdf', 'gamma', 'gamma_ct', + 'gauss2dfit', 'gaussfit', 'gaussian_function', 'gaussint', + 'gauss_cvf', 'gauss_pdf', 'gauss_smooth', 'getenv', + 'getwindows', 'get_drive_list', 'get_dxf_objects', + 'get_kbrd', 'get_login_info', 'get_lun', 'get_screen_size', + 'greg2jul', r'grib_\w*', 'grid3', 'griddata', + 'grid_input', 'grid_tps', 'gs_iter', + r'h5[adfgirst]_\w*', 'h5_browser', 'h5_close', + 'h5_create', 'h5_get_libversion', 'h5_open', 'h5_parse', + 'hanning', 'hash', r'hdf_\w*', 'heap_free', + 'heap_gc', 'heap_nosave', 'heap_refcount', 'heap_save', + 'help', 'hilbert', 'histogram', 'hist_2d', 'hist_equal', + 'hls', 'hough', 'hqr', 'hsv', 'h_eq_ct', 'h_eq_int', + 'i18n_multibytetoutf8', 'i18n_multibytetowidechar', + 'i18n_utf8tomultibyte', 'i18n_widechartomultibyte', + 'ibeta', 'icontour', 'iconvertcoord', 'idelete', 'identity', + 'idlexbr_assistant', 'idlitsys_createtool', 'idl_base64', + 'idl_validname', 'iellipse', 'igamma', 'igetcurrent', + 'igetdata', 'igetid', 'igetproperty', 'iimage', 'image', + 'image_cont', 'image_statistics', 'imaginary', 'imap', + 'indgen', 'intarr', 'interpol', 'interpolate', + 'interval_volume', 'int_2d', 'int_3d', 'int_tabulated', + 'invert', 'ioctl', 'iopen', 'iplot', 'ipolygon', + 'ipolyline', 'iputdata', 'iregister', 'ireset', 'iresolve', + 'irotate', 'ir_filter', 'isa', 'isave', 'iscale', + 'isetcurrent', 'isetproperty', 'ishft', 'isocontour', + 'isosurface', 'isurface', 'itext', 'itranslate', 'ivector', + 'ivolume', 'izoom', 'i_beta', 'journal', 'json_parse', + 'json_serialize', 'jul2greg', 'julday', 'keyword_set', + 'krig2d', 'kurtosis', 'kw_test', 'l64indgen', 'label_date', + 'label_region', 'ladfit', 'laguerre', 'laplacian', + 'la_choldc', 'la_cholmprove', 'la_cholsol', 'la_determ', + 'la_eigenproblem', 'la_eigenql', 'la_eigenvec', 'la_elmhes', + 'la_gm_linear_model', 'la_hqr', 'la_invert', + 'la_least_squares', 'la_least_square_equality', + 'la_linear_equation', 'la_ludc', 'la_lumprove', 'la_lusol', + 'la_svd', 'la_tridc', 'la_trimprove', 'la_triql', + 'la_trired', 'la_trisol', 'least_squares_filter', 'leefilt', + 'legend', 'legendre', 'linbcg', 'lindgen', 'linfit', + 'linkimage', 'list', 'll_arc_distance', 'lmfit', 'lmgr', + 'lngamma', 'lnp_test', 'loadct', 'locale_get', + 'logical_and', 'logical_or', 'logical_true', 'lon64arr', + 'lonarr', 'long', 'long64', 'lsode', 'ludc', 'lumprove', + 'lusol', 'lu_complex', 'machar', 'make_array', 'make_dll', + 'make_rt', 'map', 'mapcontinents', 'mapgrid', 'map_2points', + 'map_continents', 'map_grid', 'map_image', 'map_patch', + 'map_proj_forward', 'map_proj_image', 'map_proj_info', + 'map_proj_init', 'map_proj_inverse', 'map_set', + 'matrix_multiply', 'matrix_power', 'max', 'md_test', + 'mean', 'meanabsdev', 'mean_filter', 'median', 'memory', + 'mesh_clip', 'mesh_decimate', 'mesh_issolid', 'mesh_merge', + 'mesh_numtriangles', 'mesh_obj', 'mesh_smooth', + 'mesh_surfacearea', 'mesh_validate', 'mesh_volume', + 'message', 'min', 'min_curve_surf', 'mk_html_help', + 'modifyct', 'moment', 'morph_close', 'morph_distance', + 'morph_gradient', 'morph_hitormiss', 'morph_open', + 'morph_thin', 'morph_tophat', 'multi', 'm_correlate', + r'ncdf_\w*', 'newton', 'noise_hurl', 'noise_pick', + 'noise_scatter', 'noise_slur', 'norm', 'n_elements', + 'n_params', 'n_tags', 'objarr', 'obj_class', 'obj_destroy', + 'obj_hasmethod', 'obj_isa', 'obj_new', 'obj_valid', + 'online_help', 'on_error', 'open', 'oplot', 'oploterr', + 'parse_url', 'particle_trace', 'path_cache', 'path_sep', + 'pcomp', 'plot', 'plot3d', 'ploterr', 'plots', 'plot_3dbox', + 'plot_field', 'pnt_line', 'point_lun', 'polarplot', + 'polar_contour', 'polar_surface', 'poly', 'polyfill', + 'polyfillv', 'polygon', 'polyline', 'polyshade', 'polywarp', + 'poly_2d', 'poly_area', 'poly_fit', 'popd', 'powell', + 'pref_commit', 'pref_get', 'pref_set', 'prewitt', 'primes', + 'print', 'printd', 'product', 'profile', 'profiler', + 'profiles', 'project_vol', 'psafm', 'pseudo', + 'ps_show_fonts', 'ptrarr', 'ptr_free', 'ptr_new', + 'ptr_valid', 'pushd', 'p_correlate', 'qgrid3', 'qhull', + 'qromb', 'qromo', 'qsimp', 'query_ascii', 'query_bmp', + 'query_csv', 'query_dicom', 'query_gif', 'query_image', + 'query_jpeg', 'query_jpeg2000', 'query_mrsid', 'query_pict', + 'query_png', 'query_ppm', 'query_srf', 'query_tiff', + 'query_wav', 'radon', 'randomn', 'randomu', 'ranks', + 'rdpix', 'read', 'reads', 'readu', 'read_ascii', + 'read_binary', 'read_bmp', 'read_csv', 'read_dicom', + 'read_gif', 'read_image', 'read_interfile', 'read_jpeg', + 'read_jpeg2000', 'read_mrsid', 'read_pict', 'read_png', + 'read_ppm', 'read_spr', 'read_srf', 'read_sylk', + 'read_tiff', 'read_wav', 'read_wave', 'read_x11_bitmap', + 'read_xwd', 'real_part', 'rebin', 'recall_commands', + 'recon3', 'reduce_colors', 'reform', 'region_grow', + 'register_cursor', 'regress', 'replicate', + 'replicate_inplace', 'resolve_all', 'resolve_routine', + 'restore', 'retall', 'return', 'reverse', 'rk4', 'roberts', + 'rot', 'rotate', 'round', 'routine_filepath', + 'routine_info', 'rs_test', 'r_correlate', 'r_test', + 'save', 'savgol', 'scale3', 'scale3d', 'scope_level', + 'scope_traceback', 'scope_varfetch', 'scope_varname', + 'search2d', 'search3d', 'sem_create', 'sem_delete', + 'sem_lock', 'sem_release', 'setenv', 'set_plot', + 'set_shading', 'sfit', 'shade_surf', 'shade_surf_irr', + 'shade_volume', 'shift', 'shift_diff', 'shmdebug', 'shmmap', + 'shmunmap', 'shmvar', 'show3', 'showfont', 'simplex', 'sin', + 'sindgen', 'sinh', 'size', 'skewness', 'skip_lun', + 'slicer3', 'slide_image', 'smooth', 'sobel', 'socket', + 'sort', 'spawn', 'spher_harm', 'sph_4pnt', 'sph_scat', + 'spline', 'spline_p', 'spl_init', 'spl_interp', 'sprsab', + 'sprsax', 'sprsin', 'sprstp', 'sqrt', 'standardize', + 'stddev', 'stop', 'strarr', 'strcmp', 'strcompress', + 'streamline', 'stregex', 'stretch', 'string', 'strjoin', + 'strlen', 'strlowcase', 'strmatch', 'strmessage', 'strmid', + 'strpos', 'strput', 'strsplit', 'strtrim', 'struct_assign', + 'struct_hide', 'strupcase', 'surface', 'surfr', 'svdc', + 'svdfit', 'svsol', 'swap_endian', 'swap_endian_inplace', + 'symbol', 'systime', 's_test', 't3d', 'tag_names', 'tan', + 'tanh', 'tek_color', 'temporary', 'tetra_clip', + 'tetra_surface', 'tetra_volume', 'text', 'thin', 'threed', + 'timegen', 'time_test2', 'tm_test', 'total', 'trace', + 'transpose', 'triangulate', 'trigrid', 'triql', 'trired', + 'trisol', 'tri_surf', 'truncate_lun', 'ts_coef', 'ts_diff', + 'ts_fcast', 'ts_smooth', 'tv', 'tvcrs', 'tvlct', 'tvrd', + 'tvscl', 'typename', 't_cvt', 't_pdf', 'uindgen', 'uint', + 'uintarr', 'ul64indgen', 'ulindgen', 'ulon64arr', 'ulonarr', + 'ulong', 'ulong64', 'uniq', 'unsharp_mask', 'usersym', + 'value_locate', 'variance', 'vector', 'vector_field', 'vel', + 'velovect', 'vert_t3d', 'voigt', 'voronoi', 'voxel_proj', + 'wait', 'warp_tri', 'watershed', 'wdelete', 'wf_draw', + 'where', 'widget_base', 'widget_button', 'widget_combobox', + 'widget_control', 'widget_displaycontextmen', 'widget_draw', + 'widget_droplist', 'widget_event', 'widget_info', + 'widget_label', 'widget_list', 'widget_propertysheet', + 'widget_slider', 'widget_tab', 'widget_table', + 'widget_text', 'widget_tree', 'widget_tree_move', + 'widget_window', 'wiener_filter', 'window', 'writeu', + 'write_bmp', 'write_csv', 'write_gif', 'write_image', + 'write_jpeg', 'write_jpeg2000', 'write_nrif', 'write_pict', + 'write_png', 'write_ppm', 'write_spr', 'write_srf', + 'write_sylk', 'write_tiff', 'write_wav', 'write_wave', + 'wset', 'wshow', 'wtn', 'wv_applet', 'wv_cwt', + 'wv_cw_wavelet', 'wv_denoise', 'wv_dwt', 'wv_fn_coiflet', + 'wv_fn_daubechies', 'wv_fn_gaussian', 'wv_fn_haar', + 'wv_fn_morlet', 'wv_fn_paul', 'wv_fn_symlet', + 'wv_import_data', 'wv_import_wavelet', 'wv_plot3d_wps', + 'wv_plot_multires', 'wv_pwt', 'wv_tool_denoise', + 'xbm_edit', 'xdisplayfile', 'xdxf', 'xfont', + 'xinteranimate', 'xloadct', 'xmanager', 'xmng_tmpl', + 'xmtool', 'xobjview', 'xobjview_rotate', + 'xobjview_write_image', 'xpalette', 'xpcolor', 'xplot3d', + 'xregistered', 'xroi', 'xsq_test', 'xsurface', 'xvaredit', + 'xvolume', 'xvolume_rotate', 'xvolume_write_image', + 'xyouts', 'zoom', 'zoom_24') + """Functions from: http://www.exelisvis.com/docs/routines-1.html""" + + tokens = { + 'root': [ + (r'(^\s*)(;.*?)(\n)', bygroups(Whitespace, Comment.Single, + Whitespace)), + (words(_RESERVED, prefix=r'\b', suffix=r'\b'), Keyword), + (words(_BUILTIN_LIB, prefix=r'\b', suffix=r'\b'), Name.Builtin), + (r'\+=|-=|\^=|\*=|/=|#=|##=|<=|>=|=', Operator), + (r'\+\+|--|->|\+|-|##|#|\*|/|<|>|&&|\^|~|\|\|\?|:', Operator), + (r'\b(mod=|lt=|le=|eq=|ne=|ge=|gt=|not=|and=|or=|xor=)', Operator), + (r'\b(mod|lt|le|eq|ne|ge|gt|not|and|or|xor)\b', Operator), + (r'"[^\"]*"', String.Double), + (r"'[^\']*'", String.Single), + (r'\b[+\-]?([0-9]*\.[0-9]+|[0-9]+\.[0-9]*)(D|E)?([+\-]?[0-9]+)?\b', + Number.Float), + (r'\b\'[+\-]?[0-9A-F]+\'X(U?(S?|L{1,2})|B)\b', Number.Hex), + (r'\b\'[+\-]?[0-7]+\'O(U?(S?|L{1,2})|B)\b', Number.Oct), + (r'\b[+\-]?[0-9]+U?L{1,2}\b', Number.Integer.Long), + (r'\b[+\-]?[0-9]+U?S?\b', Number.Integer), + (r'\b[+\-]?[0-9]+B\b', Number), + (r'[ \t]+', Whitespace), + (r'\n', Whitespace), + (r'.', Text), + ] + } + + def analyse_text(text): + """endelse seems to be unique to IDL, endswitch is rare at least.""" + result = 0 + + if 'endelse' in text: + result += 0.2 + if 'endswitch' in text: + result += 0.01 + + return result diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/inferno.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/inferno.py new file mode 100644 index 0000000000000000000000000000000000000000..b5caf55a002d4b1131731c54c1c44bdd64f1b471 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/inferno.py @@ -0,0 +1,95 @@ +""" + pygments.lexers.inferno + ~~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for Inferno os and all the related stuff. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, bygroups, default +from pygments.token import Punctuation, Comment, Operator, Keyword, \ + Name, String, Number, Whitespace + +__all__ = ['LimboLexer'] + + +class LimboLexer(RegexLexer): + """ + Lexer for Limbo programming language + + TODO: + - maybe implement better var declaration highlighting + - some simple syntax error highlighting + """ + name = 'Limbo' + url = 'http://www.vitanuova.com/inferno/limbo.html' + aliases = ['limbo'] + filenames = ['*.b'] + mimetypes = ['text/limbo'] + version_added = '2.0' + + tokens = { + 'whitespace': [ + (r'^(\s*)([a-zA-Z_]\w*:)(\s*\n)', + bygroups(Whitespace, Name.Label, Whitespace)), + (r'\n', Whitespace), + (r'\s+', Whitespace), + (r'#(\n|(.|\n)*?[^\\]\n)', Comment.Single), + ], + 'string': [ + (r'"', String, '#pop'), + (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|' + r'u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})', String.Escape), + (r'[^\\"\n]+', String), # all other characters + (r'\\', String), # stray backslash + ], + 'statements': [ + (r'"', String, 'string'), + (r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char), + (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float), + (r'(\d+\.\d*|\.\d+|\d+[fF])', Number.Float), + (r'16r[0-9a-fA-F]+', Number.Hex), + (r'8r[0-7]+', Number.Oct), + (r'((([1-3]\d)|([2-9]))r)?(\d+)', Number.Integer), + (r'[()\[\],.]', Punctuation), + (r'[~!%^&*+=|?:<>/-]|(->)|(<-)|(=>)|(::)', Operator), + (r'(alt|break|case|continue|cyclic|do|else|exit' + r'for|hd|if|implement|import|include|len|load|or' + r'pick|return|spawn|tagof|tl|to|while)\b', Keyword), + (r'(byte|int|big|real|string|array|chan|list|adt' + r'|fn|ref|of|module|self|type)\b', Keyword.Type), + (r'(con|iota|nil)\b', Keyword.Constant), + (r'[a-zA-Z_]\w*', Name), + ], + 'statement' : [ + include('whitespace'), + include('statements'), + ('[{}]', Punctuation), + (';', Punctuation, '#pop'), + ], + 'root': [ + include('whitespace'), + default('statement'), + ], + } + + def analyse_text(text): + # Any limbo module implements something + if re.search(r'^implement \w+;', text, re.MULTILINE): + return 0.7 + +# TODO: +# - Make lexers for: +# - asm sources +# - man pages +# - mkfiles +# - module definitions +# - namespace definitions +# - shell scripts +# - maybe keyfiles and fonts +# they all seem to be quite similar to their equivalents +# from unix world, so there should not be a lot of problems diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/iolang.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/iolang.py new file mode 100644 index 0000000000000000000000000000000000000000..0269384fac1ac51eb6c0fff6c0d2a380a7b3b887 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/iolang.py @@ -0,0 +1,61 @@ +""" + pygments.lexers.iolang + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for the Io language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer +from pygments.token import Comment, Operator, Keyword, Name, String, Number, \ + Whitespace + +__all__ = ['IoLexer'] + + +class IoLexer(RegexLexer): + """ + For Io (a small, prototype-based programming language) source. + """ + name = 'Io' + url = 'http://iolanguage.com/' + filenames = ['*.io'] + aliases = ['io'] + mimetypes = ['text/x-iosrc'] + version_added = '0.10' + tokens = { + 'root': [ + (r'\n', Whitespace), + (r'\s+', Whitespace), + # Comments + (r'//(.*?)$', Comment.Single), + (r'#(.*?)$', Comment.Single), + (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), + (r'/\+', Comment.Multiline, 'nestedcomment'), + # DoubleQuotedString + (r'"(\\\\|\\[^\\]|[^"\\])*"', String), + # Operators + (r'::=|:=|=|\(|\)|;|,|\*|-|\+|>|<|@|!|/|\||\^|\.|%|&|\[|\]|\{|\}', + Operator), + # keywords + (r'(clone|do|doFile|doString|method|for|if|else|elseif|then)\b', + Keyword), + # constants + (r'(nil|false|true)\b', Name.Constant), + # names + (r'(Object|list|List|Map|args|Sequence|Coroutine|File)\b', + Name.Builtin), + (r'[a-zA-Z_]\w*', Name), + # numbers + (r'(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float), + (r'\d+', Number.Integer) + ], + 'nestedcomment': [ + (r'[^+/]+', Comment.Multiline), + (r'/\+', Comment.Multiline, '#push'), + (r'\+/', Comment.Multiline, '#pop'), + (r'[+/]', Comment.Multiline), + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/j.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/j.py new file mode 100644 index 0000000000000000000000000000000000000000..1eb418e1c386eac1e6be2d833ba11ae8134ca31e --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/j.py @@ -0,0 +1,151 @@ +""" + pygments.lexers.j + ~~~~~~~~~~~~~~~~~ + + Lexer for the J programming language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, words, include, bygroups +from pygments.token import Comment, Keyword, Name, Number, Operator, \ + Punctuation, String, Whitespace + +__all__ = ['JLexer'] + + +class JLexer(RegexLexer): + """ + For J source code. + """ + + name = 'J' + url = 'http://jsoftware.com/' + aliases = ['j'] + filenames = ['*.ijs'] + mimetypes = ['text/x-j'] + version_added = '2.1' + + validName = r'\b[a-zA-Z]\w*' + + tokens = { + 'root': [ + # Shebang script + (r'#!.*$', Comment.Preproc), + + # Comments + (r'NB\..*', Comment.Single), + (r'(\n+\s*)(Note)', bygroups(Whitespace, Comment.Multiline), + 'comment'), + (r'(\s*)(Note.*)', bygroups(Whitespace, Comment.Single)), + + # Whitespace + (r'\s+', Whitespace), + + # Strings + (r"'", String, 'singlequote'), + + # Definitions + (r'0\s+:\s*0', Name.Entity, 'nounDefinition'), + (r'(noun)(\s+)(define)(\s*)$', bygroups(Name.Entity, Whitespace, + Name.Entity, Whitespace), 'nounDefinition'), + (r'([1-4]|13)\s+:\s*0\b', + Name.Function, 'explicitDefinition'), + (r'(adverb|conjunction|dyad|monad|verb)(\s+)(define)\b', + bygroups(Name.Function, Whitespace, Name.Function), + 'explicitDefinition'), + + # Flow Control + (words(('for_', 'goto_', 'label_'), suffix=validName+r'\.'), Name.Label), + (words(( + 'assert', 'break', 'case', 'catch', 'catchd', + 'catcht', 'continue', 'do', 'else', 'elseif', + 'end', 'fcase', 'for', 'if', 'return', + 'select', 'throw', 'try', 'while', 'whilst', + ), suffix=r'\.'), Name.Label), + + # Variable Names + (validName, Name.Variable), + + # Standard Library + (words(( + 'ARGV', 'CR', 'CRLF', 'DEL', 'Debug', + 'EAV', 'EMPTY', 'FF', 'JVERSION', 'LF', + 'LF2', 'Note', 'TAB', 'alpha17', 'alpha27', + 'apply', 'bind', 'boxopen', 'boxxopen', 'bx', + 'clear', 'cutLF', 'cutopen', 'datatype', 'def', + 'dfh', 'drop', 'each', 'echo', 'empty', + 'erase', 'every', 'evtloop', 'exit', 'expand', + 'fetch', 'file2url', 'fixdotdot', 'fliprgb', 'getargs', + 'getenv', 'hfd', 'inv', 'inverse', 'iospath', + 'isatty', 'isutf8', 'items', 'leaf', 'list', + 'nameclass', 'namelist', 'names', 'nc', + 'nl', 'on', 'pick', 'rows', + 'script', 'scriptd', 'sign', 'sminfo', 'smoutput', + 'sort', 'split', 'stderr', 'stdin', 'stdout', + 'table', 'take', 'timespacex', 'timex', 'tmoutput', + 'toCRLF', 'toHOST', 'toJ', 'tolower', 'toupper', + 'type', 'ucp', 'ucpcount', 'usleep', 'utf8', + 'uucp', + )), Name.Function), + + # Copula + (r'=[.:]', Operator), + + # Builtins + (r'[-=+*#$%@!~`^&";:.,<>{}\[\]\\|/?]', Operator), + + # Short Keywords + (r'[abCdDeEfHiIjLMoprtT]\.', Keyword.Reserved), + (r'[aDiLpqsStux]\:', Keyword.Reserved), + (r'(_[0-9])\:', Keyword.Constant), + + # Parens + (r'\(', Punctuation, 'parentheses'), + + # Numbers + include('numbers'), + ], + + 'comment': [ + (r'[^)]', Comment.Multiline), + (r'^\)', Comment.Multiline, '#pop'), + (r'[)]', Comment.Multiline), + ], + + 'explicitDefinition': [ + (r'\b[nmuvxy]\b', Name.Decorator), + include('root'), + (r'[^)]', Name), + (r'^\)', Name.Label, '#pop'), + (r'[)]', Name), + ], + + 'numbers': [ + (r'\b_{1,2}\b', Number), + (r'_?\d+(\.\d+)?(\s*[ejr]\s*)_?\d+(\.?=\d+)?', Number), + (r'_?\d+\.(?=\d+)', Number.Float), + (r'_?\d+x', Number.Integer.Long), + (r'_?\d+', Number.Integer), + ], + + 'nounDefinition': [ + (r'[^)]+', String), + (r'^\)', Name.Label, '#pop'), + (r'[)]', String), + ], + + 'parentheses': [ + (r'\)', Punctuation, '#pop'), + # include('nounDefinition'), + include('explicitDefinition'), + include('root'), + ], + + 'singlequote': [ + (r"[^']+", String), + (r"''", String), + (r"'", String, '#pop'), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/jslt.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/jslt.py new file mode 100644 index 0000000000000000000000000000000000000000..f2cc5df5fa62c6014575608cb65fb43aa540c310 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/jslt.py @@ -0,0 +1,94 @@ +""" + pygments.lexers.jslt + ~~~~~~~~~~~~~~~~~~~~ + + Lexers for the JSLT language + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, combined, words +from pygments.token import Comment, Keyword, Name, Number, Operator, \ + Punctuation, String, Whitespace + + +__all__ = ['JSLTLexer'] + + +_WORD_END = r'(?=[^0-9A-Z_a-z-])' + + +class JSLTLexer(RegexLexer): + """ + For JSLT source. + """ + name = 'JSLT' + url = 'https://github.com/schibsted/jslt' + filenames = ['*.jslt'] + aliases = ['jslt'] + mimetypes = ['text/x-jslt'] + version_added = '2.10' + + tokens = { + 'root': [ + (r'[\t\n\f\r ]+', Whitespace), + (r'//.*(\n|\Z)', Comment.Single), + (r'-?(0|[1-9][0-9]*)', Number.Integer), + (r'-?(0|[1-9][0-9]*)(.[0-9]+a)?([Ee][+-]?[0-9]+)', Number.Float), + (r'"([^"\\]|\\.)*"', String.Double), + (r'[(),:\[\]{}]', Punctuation), + (r'(!=|[<=>]=?)', Operator), + (r'[*+/|-]', Operator), + (r'\.', Operator), + (words(('import',), suffix=_WORD_END), Keyword.Namespace, combined('import-path', 'whitespace')), + (words(('as',), suffix=_WORD_END), Keyword.Namespace, combined('import-alias', 'whitespace')), + (words(('let',), suffix=_WORD_END), Keyword.Declaration, combined('constant', 'whitespace')), + (words(('def',), suffix=_WORD_END), Keyword.Declaration, combined('function', 'whitespace')), + (words(('false', 'null', 'true'), suffix=_WORD_END), Keyword.Constant), + (words(('else', 'for', 'if'), suffix=_WORD_END), Keyword), + (words(('and', 'or'), suffix=_WORD_END), Operator.Word), + (words(( + 'all', 'any', 'array', 'boolean', 'capture', 'ceiling', + 'contains', 'ends-with', 'error', 'flatten', 'floor', + 'format-time', 'from-json', 'get-key', 'hash-int', 'index-of', + 'is-array', 'is-boolean', 'is-decimal', 'is-integer', + 'is-number', 'is-object', 'is-string', 'join', 'lowercase', + 'max', 'min', 'mod', 'not', 'now', 'number', 'parse-time', + 'parse-url', 'random', 'replace', 'round', 'sha256-hex', 'size', + 'split', 'starts-with', 'string', 'sum', 'test', 'to-json', + 'trim', 'uppercase', 'zip', 'zip-with-index', 'fallback'), suffix=_WORD_END), + Name.Builtin), + (r'[A-Z_a-z][0-9A-Z_a-z-]*:[A-Z_a-z][0-9A-Z_a-z-]*', Name.Function), + (r'[A-Z_a-z][0-9A-Z_a-z-]*', Name), + (r'\$[A-Z_a-z][0-9A-Z_a-z-]*', Name.Variable), + ], + 'constant': [ + (r'[A-Z_a-z][0-9A-Z_a-z-]*', Name.Variable, 'root'), + ], + 'function': [ + (r'[A-Z_a-z][0-9A-Z_a-z-]*', Name.Function, combined('function-parameter-list', 'whitespace')), + ], + 'function-parameter-list': [ + (r'\(', Punctuation, combined('function-parameters', 'whitespace')), + ], + 'function-parameters': [ + (r',', Punctuation), + (r'\)', Punctuation, 'root'), + (r'[A-Z_a-z][0-9A-Z_a-z-]*', Name.Variable), + ], + 'import-path': [ + (r'"([^"]|\\.)*"', String.Symbol, 'root'), + ], + 'import-alias': [ + (r'[A-Z_a-z][0-9A-Z_a-z-]*', Name.Namespace, 'root'), + ], + 'string': [ + (r'"', String.Double, '#pop'), + (r'\\.', String.Escape), + ], + 'whitespace': [ + (r'[\t\n\f\r ]+', Whitespace), + (r'//.*(\n|\Z)', Comment.Single), + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/jsonnet.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/jsonnet.py new file mode 100644 index 0000000000000000000000000000000000000000..f9aa5953f0ed95a3f8ff214e054ff30dff9285e3 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/jsonnet.py @@ -0,0 +1,169 @@ +""" + pygments.lexers.jsonnet + ~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for Jsonnet data templating language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import include, RegexLexer, words +from pygments.token import Comment, Keyword, Name, Number, Operator, \ + Punctuation, String, Text, Whitespace + +__all__ = ['JsonnetLexer'] + +jsonnet_token = r'[^\W\d]\w*' +jsonnet_function_token = jsonnet_token + r'(?=\()' + + +def string_rules(quote_mark): + return [ + (rf"[^{quote_mark}\\]", String), + (r"\\.", String.Escape), + (quote_mark, String, '#pop'), + ] + + +def quoted_field_name(quote_mark): + return [ + (rf'([^{quote_mark}\\]|\\.)*{quote_mark}', + Name.Variable, 'field_separator') + ] + + +class JsonnetLexer(RegexLexer): + """Lexer for Jsonnet source code.""" + + name = 'Jsonnet' + aliases = ['jsonnet'] + filenames = ['*.jsonnet', '*.libsonnet'] + url = "https://jsonnet.org" + version_added = '' + tokens = { + # Not used by itself + '_comments': [ + (r'(//|#).*\n', Comment.Single), + (r'/\*\*([^/]|/(?!\*))*\*/', String.Doc), + (r'/\*([^/]|/(?!\*))*\*/', Comment), + ], + 'root': [ + include('_comments'), + (r"@'.*'", String), + (r'@".*"', String), + (r"'", String, 'singlestring'), + (r'"', String, 'doublestring'), + (r'\|\|\|(.|\n)*\|\|\|', String), + # Jsonnet has no integers, only an IEEE754 64-bit float + (r'[+-]?[0-9]+(.[0-9])?', Number.Float), + # Omit : despite spec because it appears to be used as a field + # separator + (r'[!$~+\-&|^=<>*/%]', Operator), + (r'\{', Punctuation, 'object'), + (r'\[', Punctuation, 'array'), + (r'local\b', Keyword, ('local_name')), + (r'assert\b', Keyword, 'assert'), + (words([ + 'assert', 'else', 'error', 'false', 'for', 'if', 'import', + 'importstr', 'in', 'null', 'tailstrict', 'then', 'self', + 'super', 'true', + ], suffix=r'\b'), Keyword), + (r'\s+', Whitespace), + (r'function(?=\()', Keyword, 'function_params'), + (r'std\.' + jsonnet_function_token, Name.Builtin, 'function_args'), + (jsonnet_function_token, Name.Function, 'function_args'), + (jsonnet_token, Name.Variable), + (r'[\.()]', Punctuation), + ], + 'singlestring': string_rules("'"), + 'doublestring': string_rules('"'), + 'array': [ + (r',', Punctuation), + (r'\]', Punctuation, '#pop'), + include('root'), + ], + 'local_name': [ + (jsonnet_function_token, Name.Function, 'function_params'), + (jsonnet_token, Name.Variable), + (r'\s+', Whitespace), + ('(?==)', Whitespace, ('#pop', 'local_value')), + ], + 'local_value': [ + (r'=', Operator), + (r';', Punctuation, '#pop'), + include('root'), + ], + 'assert': [ + (r':', Punctuation), + (r';', Punctuation, '#pop'), + include('root'), + ], + 'function_params': [ + (jsonnet_token, Name.Variable), + (r'\(', Punctuation), + (r'\)', Punctuation, '#pop'), + (r',', Punctuation), + (r'\s+', Whitespace), + (r'=', Operator, 'function_param_default'), + ], + 'function_args': [ + (r'\(', Punctuation), + (r'\)', Punctuation, '#pop'), + (r',', Punctuation), + (r'\s+', Whitespace), + include('root'), + ], + 'object': [ + (r'\s+', Whitespace), + (r'local\b', Keyword, 'object_local_name'), + (r'assert\b', Keyword, 'object_assert'), + (r'\[', Operator, 'field_name_expr'), + (fr'(?={jsonnet_token})', Text, 'field_name'), + (r'\}', Punctuation, '#pop'), + (r'"', Name.Variable, 'double_field_name'), + (r"'", Name.Variable, 'single_field_name'), + include('_comments'), + ], + 'field_name': [ + (jsonnet_function_token, Name.Function, + ('field_separator', 'function_params') + ), + (jsonnet_token, Name.Variable, 'field_separator'), + ], + 'double_field_name': quoted_field_name('"'), + 'single_field_name': quoted_field_name("'"), + 'field_name_expr': [ + (r'\]', Operator, 'field_separator'), + include('root'), + ], + 'function_param_default': [ + (r'(?=[,\)])', Whitespace, '#pop'), + include('root'), + ], + 'field_separator': [ + (r'\s+', Whitespace), + (r'\+?::?:?', Punctuation, ('#pop', '#pop', 'field_value')), + include('_comments'), + ], + 'field_value': [ + (r',', Punctuation, '#pop'), + (r'\}', Punctuation, '#pop:2'), + include('root'), + ], + 'object_assert': [ + (r':', Punctuation), + (r',', Punctuation, '#pop'), + include('root'), + ], + 'object_local_name': [ + (jsonnet_token, Name.Variable, ('#pop', 'object_local_value')), + (r'\s+', Whitespace), + ], + 'object_local_value': [ + (r'=', Operator), + (r',', Punctuation, '#pop'), + (r'\}', Punctuation, '#pop:2'), + include('root'), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/jsx.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/jsx.py new file mode 100644 index 0000000000000000000000000000000000000000..6124d8c00ec6313a08c511aa60f636e502e0774d --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/jsx.py @@ -0,0 +1,100 @@ +""" + pygments.lexers.jsx + ~~~~~~~~~~~~~~~~~~~ + + Lexers for JSX (React) and TSX (TypeScript flavor). + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import bygroups, default, include, inherit +from pygments.lexers.javascript import JavascriptLexer, TypeScriptLexer +from pygments.token import Name, Operator, Punctuation, String, Text, \ + Whitespace + +__all__ = ['JsxLexer', 'TsxLexer'] + +_JSX_RULES = { + "jsx": [ + (r"", Punctuation), # JSXFragment <>| + (r"(<)(\w+)(\.?)", bygroups(Punctuation, Name.Tag, Punctuation), "tag"), + ( + r"()", + bygroups(Punctuation, Name.Tag, Punctuation), + ), + ( + r"()", bygroups(Punctuation, Text, Punctuation), "#pop"), + ], + "fragment": [ + (r"(.)(\w+)", bygroups(Punctuation, Name.Attribute)), + (r"(>)", bygroups(Punctuation), "#pop"), + ], + "attr": [ + (r"\{", Punctuation, "expression"), + (r'".*?"', String, "#pop"), + (r"'.*?'", String, "#pop"), + default("#pop"), + ], + "expression": [ + (r"\{", Punctuation, "#push"), + (r"\}", Punctuation, "#pop"), + include("root"), + ], +} + + +class JsxLexer(JavascriptLexer): + """For JavaScript Syntax Extension (JSX). + """ + + name = "JSX" + aliases = ["jsx", "react"] + filenames = ["*.jsx", "*.react"] + mimetypes = ["text/jsx", "text/typescript-jsx"] + url = "https://facebook.github.io/jsx/" + version_added = '2.17' + + flags = re.MULTILINE | re.DOTALL + + # Use same tokens as `JavascriptLexer`, but with tags and attributes support + tokens = { + "root": [ + include("jsx"), + inherit, + ], + **_JSX_RULES} + + +class TsxLexer(TypeScriptLexer): + """For TypeScript with embedded JSX + """ + + name = "TSX" + aliases = ["tsx"] + filenames = ["*.tsx"] + mimetypes = ["text/typescript-tsx"] + url = "https://www.typescriptlang.org/docs/handbook/jsx.html" + version_added = '2.19' + + flags = re.MULTILINE | re.DOTALL + + # Use same tokens as `TypescriptLexer`, but with tags and attributes support + tokens = { + "root": [ + include("jsx"), + inherit, + ], + **_JSX_RULES} diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/ldap.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/ldap.py new file mode 100644 index 0000000000000000000000000000000000000000..65473da67b40c498e8909a243f130a700af98354 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/ldap.py @@ -0,0 +1,155 @@ +""" + pygments.lexers.ldap + ~~~~~~~~~~~~~~~~~~~~ + + Pygments lexers for LDAP. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + + +from pygments.lexer import RegexLexer, bygroups, default +from pygments.token import Operator, Comment, Keyword, Literal, Name, String, \ + Number, Punctuation, Whitespace, Escape + +__all__ = ['LdifLexer', 'LdaprcLexer'] + + +class LdifLexer(RegexLexer): + + """ + Lexer for LDIF + """ + + name = 'LDIF' + aliases = ['ldif'] + filenames = ['*.ldif'] + mimetypes = ["text/x-ldif"] + url = "https://datatracker.ietf.org/doc/html/rfc2849" + version_added = '2.17' + + tokens = { + 'root': [ + (r'\s*\n', Whitespace), + (r'(-)(\n)', bygroups(Punctuation, Whitespace)), + (r'(#.*)(\n)', bygroups(Comment.Single, Whitespace)), + (r'(version)(:)([ \t]*)(.*)([ \t]*\n)', bygroups(Keyword, + Punctuation, Whitespace, Number.Integer, Whitespace)), + (r'(control)(:)([ \t]*)([\.0-9]+)([ \t]+)((?:true|false)?)([ \t]*)', + bygroups(Keyword, Punctuation, Whitespace, Name.Other, Whitespace, Keyword, Whitespace), "after-control"), + (r'(deleteoldrdn)(:)([ \n]*)([0-1]+)([ \t]*\n)', + bygroups(Keyword, Punctuation, Whitespace, Number, Whitespace)), + (r'(add|delete|replace)(::?)(\s*)(.*)([ \t]*\n)', bygroups( + Keyword, Punctuation, Whitespace, Name.Attribute, Whitespace)), + (r'(changetype)(:)([ \t]*)([a-z]*)([ \t]*\n)', + bygroups(Keyword, Punctuation, Whitespace, Keyword, Whitespace)), + (r'(dn|newrdn)(::)', bygroups(Keyword, Punctuation), "base64-dn"), + (r'(dn|newrdn)(:)', bygroups(Keyword, Punctuation), "dn"), + (r'(objectclass)(:)([ \t]*)([^ \t\n]*)([ \t]*\n)', bygroups( + Keyword, Punctuation, Whitespace, Name.Class, Whitespace)), + (r'([a-zA-Z]*|[0-9][0-9\.]*[0-9])(;)', + bygroups(Name.Attribute, Punctuation), "property"), + (r'([a-zA-Z]*|[0-9][0-9\.]*[0-9])(:<)', + bygroups(Name.Attribute, Punctuation), "url"), + (r'([a-zA-Z]*|[0-9][0-9\.]*[0-9])(::?)', + bygroups(Name.Attribute, Punctuation), "value"), + ], + "after-control": [ + (r":<", Punctuation, ("#pop", "url")), + (r"::?", Punctuation, ("#pop", "value")), + default("#pop"), + ], + 'property': [ + (r'([-a-zA-Z0-9]*)(;)', bygroups(Name.Property, Punctuation)), + (r'([-a-zA-Z0-9]*)(:<)', + bygroups(Name.Property, Punctuation), ("#pop", "url")), + (r'([-a-zA-Z0-9]*)(::?)', + bygroups(Name.Property, Punctuation), ("#pop", "value")), + ], + 'value': [ + (r'(\s*)([^\n]+\S)(\n )', + bygroups(Whitespace, String, Whitespace)), + (r'(\s*)([^\n]+\S)(\n)', + bygroups(Whitespace, String, Whitespace), "#pop"), + ], + 'url': [ + (r'([ \t]*)(\S*)([ \t]*\n )', + bygroups(Whitespace, Comment.PreprocFile, Whitespace)), + (r'([ \t]*)(\S*)([ \t]*\n)', bygroups(Whitespace, + Comment.PreprocFile, Whitespace), "#pop"), + ], + "dn": [ + (r'([ \t]*)([-a-zA-Z0-9\.]+)(=)', bygroups(Whitespace, + Name.Attribute, Operator), ("#pop", "dn-value")), + ], + "dn-value": [ + (r'\\[^\n]', Escape), + (r',', Punctuation, ("#pop", "dn")), + (r'\+', Operator, ("#pop", "dn")), + (r'[^,\+\n]+', String), + (r'\n ', Whitespace), + (r'\n', Whitespace, "#pop"), + ], + "base64-dn": [ + (r'([ \t]*)([^ \t\n][^ \t\n]*[^\n])([ \t]*\n )', + bygroups(Whitespace, Name, Whitespace)), + (r'([ \t]*)([^ \t\n][^ \t\n]*[^\n])([ \t]*\n)', + bygroups(Whitespace, Name, Whitespace), "#pop"), + ] + } + + +class LdaprcLexer(RegexLexer): + """ + Lexer for OpenLDAP configuration files. + """ + + name = 'LDAP configuration file' + aliases = ['ldapconf', 'ldaprc'] + filenames = ['.ldaprc', 'ldaprc', 'ldap.conf'] + mimetypes = ["text/x-ldapconf"] + url = 'https://www.openldap.org/software//man.cgi?query=ldap.conf&sektion=5&apropos=0&manpath=OpenLDAP+2.4-Release' + version_added = '2.17' + + _sasl_keywords = r'SASL_(?:MECH|REALM|AUTHCID|AUTHZID|CBINDING)' + _tls_keywords = r'TLS_(?:CACERT|CACERTDIR|CERT|ECNAME|KEY|CIPHER_SUITE|PROTOCOL_MIN|RANDFILE|CRLFILE)' + _literal_keywords = rf'(?:URI|SOCKET_BIND_ADDRESSES|{_sasl_keywords}|{_tls_keywords})' + _boolean_keywords = r'GSSAPI_(?:ALLOW_REMOTE_PRINCIPAL|ENCRYPT|SIGN)|REFERRALS|SASL_NOCANON' + _integer_keywords = r'KEEPALIVE_(?:IDLE|PROBES|INTERVAL)|NETWORK_TIMEOUT|PORT|SIZELIMIT|TIMELIMIT|TIMEOUT' + _secprops = r'none|noanonymous|noplain|noactive|nodict|forwardsec|passcred|(?:minssf|maxssf|maxbufsize)=\d+' + + flags = re.IGNORECASE | re.MULTILINE + + tokens = { + 'root': [ + (r'#.*', Comment.Single), + (r'\s+', Whitespace), + (rf'({_boolean_keywords})(\s+)(on|true|yes|off|false|no)$', + bygroups(Keyword, Whitespace, Keyword.Constant)), + (rf'({_integer_keywords})(\s+)(\d+)', + bygroups(Keyword, Whitespace, Number.Integer)), + (r'(VERSION)(\s+)(2|3)', bygroups(Keyword, Whitespace, Number.Integer)), + # Constants + (r'(DEREF)(\s+)(never|searching|finding|always)', + bygroups(Keyword, Whitespace, Keyword.Constant)), + (rf'(SASL_SECPROPS)(\s+)((?:{_secprops})(?:,{_secprops})*)', + bygroups(Keyword, Whitespace, Keyword.Constant)), + (r'(SASL_CBINDING)(\s+)(none|tls-unique|tls-endpoint)', + bygroups(Keyword, Whitespace, Keyword.Constant)), + (r'(TLS_REQ(?:CERT|SAN))(\s+)(allow|demand|hard|never|try)', + bygroups(Keyword, Whitespace, Keyword.Constant)), + (r'(TLS_CRLCHECK)(\s+)(none|peer|all)', + bygroups(Keyword, Whitespace, Keyword.Constant)), + # Literals + (r'(BASE|BINDDN)(\s+)(\S+)$', + bygroups(Keyword, Whitespace, Literal)), + # Accepts hostname with or without port. + (r'(HOST)(\s+)([a-z0-9]+)((?::(\d+))?)', + bygroups(Keyword, Whitespace, Literal, Number.Integer)), + (rf'({_literal_keywords})(\s+)(\S+)$', + bygroups(Keyword, Whitespace, Literal)), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/lisp.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/lisp.py new file mode 100644 index 0000000000000000000000000000000000000000..2c970d9395b0591a6f31cd2c082c14b15cb408f6 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/lisp.py @@ -0,0 +1,3146 @@ +""" + pygments.lexers.lisp + ~~~~~~~~~~~~~~~~~~~~ + + Lexers for Lispy languages. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, bygroups, words, default +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Literal, Error, Whitespace + +from pygments.lexers.python import PythonLexer + +from pygments.lexers._scheme_builtins import scheme_keywords, scheme_builtins + +__all__ = ['SchemeLexer', 'CommonLispLexer', 'HyLexer', 'RacketLexer', + 'NewLispLexer', 'EmacsLispLexer', 'ShenLexer', 'CPSALexer', + 'XtlangLexer', 'FennelLexer', 'JanetLexer'] + + +class SchemeLexer(RegexLexer): + """ + A Scheme lexer. + + This parser is checked with pastes from the LISP pastebin + at http://paste.lisp.org/ to cover as much syntax as possible. + + It supports the full Scheme syntax as defined in R5RS. + """ + name = 'Scheme' + url = 'http://www.scheme-reports.org/' + aliases = ['scheme', 'scm'] + filenames = ['*.scm', '*.ss'] + mimetypes = ['text/x-scheme', 'application/x-scheme'] + version_added = '0.6' + + flags = re.DOTALL | re.MULTILINE + + # valid names for identifiers + # well, names can only not consist fully of numbers + # but this should be good enough for now + valid_name = r'[\w!$%&*+,/:<=>?@^~|-]+' + + # Use within verbose regexes + token_end = r''' + (?= + \s # whitespace + | ; # comment + | \#[;|!] # fancy comments + | [)\]] # end delimiters + | $ # end of file + ) + ''' + + # Recognizing builtins. + def get_tokens_unprocessed(self, text): + for index, token, value in super().get_tokens_unprocessed(text): + if token is Name.Function or token is Name.Variable: + if value in scheme_keywords: + yield index, Keyword, value + elif value in scheme_builtins: + yield index, Name.Builtin, value + else: + yield index, token, value + else: + yield index, token, value + + # Scheme has funky syntactic rules for numbers. These are all + # valid number literals: 5.0e55|14, 14/13, -1+5j, +1@5, #b110, + # #o#Iinf.0-nan.0i. This is adapted from the formal grammar given + # in http://www.r6rs.org/final/r6rs.pdf, section 4.2.1. Take a + # deep breath ... + + # It would be simpler if we could just not bother about invalid + # numbers like #b35. But we cannot parse 'abcdef' without #x as a + # number. + + number_rules = {} + for base in (2, 8, 10, 16): + if base == 2: + digit = r'[01]' + radix = r'( \#[bB] )' + elif base == 8: + digit = r'[0-7]' + radix = r'( \#[oO] )' + elif base == 10: + digit = r'[0-9]' + radix = r'( (\#[dD])? )' + elif base == 16: + digit = r'[0-9a-fA-F]' + radix = r'( \#[xX] )' + + # Radix, optional exactness indicator. + prefix = rf''' + ( + {radix} (\#[iIeE])? + | \#[iIeE] {radix} + ) + ''' + + # Simple unsigned number or fraction. + ureal = rf''' + ( + {digit}+ + ( / {digit}+ )? + ) + ''' + + # Add decimal numbers. + if base == 10: + decimal = r''' + ( + # Decimal part + ( + [0-9]+ ([.][0-9]*)? + | [.][0-9]+ + ) + + # Optional exponent + ( + [eEsSfFdDlL] [+-]? [0-9]+ + )? + + # Optional mantissa width + ( + \|[0-9]+ + )? + ) + ''' + ureal = rf''' + ( + {decimal} (?!/) + | {ureal} + ) + ''' + + naninf = r'(nan.0|inf.0)' + + real = rf''' + ( + [+-] {naninf} # Sign mandatory + | [+-]? {ureal} # Sign optional + ) + ''' + + complex_ = rf''' + ( + {real}? [+-] ({naninf}|{ureal})? i + | {real} (@ {real})? + + ) + ''' + + num = rf'''(?x) + ( + {prefix} + {complex_} + ) + # Need to ensure we have a full token. 1+ is not a + # number followed by something else, but a function + # name. + {token_end} + ''' + + number_rules[base] = num + + # If you have a headache now, say thanks to RnRS editors. + + # Doing it this way is simpler than splitting the number(10) + # regex in a floating-point and a no-floating-point version. + def decimal_cb(self, match): + if '.' in match.group(): + token_type = Number.Float # includes [+-](inf|nan).0 + else: + token_type = Number.Integer + yield match.start(), token_type, match.group() + + # -- + + # The 'scheme-root' state parses as many expressions as needed, always + # delegating to the 'scheme-value' state. The latter parses one complete + # expression and immediately pops back. This is needed for the LilyPondLexer. + # When LilyPond encounters a #, it starts parsing embedded Scheme code, and + # returns to normal syntax after one expression. We implement this + # by letting the LilyPondLexer subclass the SchemeLexer. When it finds + # the #, the LilyPondLexer goes to the 'value' state, which then pops back + # to LilyPondLexer. The 'root' state of the SchemeLexer merely delegates the + # work to 'scheme-root'; this is so that LilyPondLexer can inherit + # 'scheme-root' and redefine 'root'. + + tokens = { + 'root': [ + default('scheme-root'), + ], + 'scheme-root': [ + default('value'), + ], + 'value': [ + # the comments + # and going to the end of the line + (r';.*?$', Comment.Single), + # multi-line comment + (r'#\|', Comment.Multiline, 'multiline-comment'), + # commented form (entire sexpr following) + (r'#;[([]', Comment, 'commented-form'), + # commented datum + (r'#;', Comment, 'commented-datum'), + # signifies that the program text that follows is written with the + # lexical and datum syntax described in r6rs + (r'#!r6rs', Comment), + + # whitespaces - usually not relevant + (r'\s+', Whitespace), + + # numbers + (number_rules[2], Number.Bin, '#pop'), + (number_rules[8], Number.Oct, '#pop'), + (number_rules[10], decimal_cb, '#pop'), + (number_rules[16], Number.Hex, '#pop'), + + # strings, symbols, keywords and characters + (r'"', String, 'string'), + (r"'" + valid_name, String.Symbol, "#pop"), + (r'#:' + valid_name, Keyword.Declaration, '#pop'), + (r"#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)", String.Char, "#pop"), + + # constants + (r'(#t|#f)', Name.Constant, '#pop'), + + # special operators + (r"('|#|`|,@|,|\.)", Operator), + + # first variable in a quoted string like + # '(this is syntactic sugar) + (r"(?<='\()" + valid_name, Name.Variable, '#pop'), + (r"(?<=#\()" + valid_name, Name.Variable, '#pop'), + + # Functions -- note that this also catches variables + # defined in let/let*, but there is little that can + # be done about it. + (r'(?<=\()' + valid_name, Name.Function, '#pop'), + + # find the remaining variables + (valid_name, Name.Variable, '#pop'), + + # the famous parentheses! + + # Push scheme-root to enter a state that will parse as many things + # as needed in the parentheses. + (r'[([]', Punctuation, 'scheme-root'), + # Pop one 'value', one 'scheme-root', and yet another 'value', so + # we get back to a state parsing expressions as needed in the + # enclosing context. + (r'[)\]]', Punctuation, '#pop:3'), + ], + 'multiline-comment': [ + (r'#\|', Comment.Multiline, '#push'), + (r'\|#', Comment.Multiline, '#pop'), + (r'[^|#]+', Comment.Multiline), + (r'[|#]', Comment.Multiline), + ], + 'commented-form': [ + (r'[([]', Comment, '#push'), + (r'[)\]]', Comment, '#pop'), + (r'[^()[\]]+', Comment), + ], + 'commented-datum': [ + (rf'(?x).*?{token_end}', Comment, '#pop'), + ], + 'string': [ + # Pops back from 'string', and pops 'value' as well. + ('"', String, '#pop:2'), + # Hex escape sequences, R6RS-style. + (r'\\x[0-9a-fA-F]+;', String.Escape), + # We try R6RS style first, but fall back to Guile-style. + (r'\\x[0-9a-fA-F]{2}', String.Escape), + # Other special escape sequences implemented by Guile. + (r'\\u[0-9a-fA-F]{4}', String.Escape), + (r'\\U[0-9a-fA-F]{6}', String.Escape), + # Escape sequences are not overly standardized. Recognizing + # a single character after the backslash should be good enough. + # NB: we have DOTALL. + (r'\\.', String.Escape), + # The rest + (r'[^\\"]+', String), + ] + } + + +class CommonLispLexer(RegexLexer): + """ + A Common Lisp lexer. + """ + name = 'Common Lisp' + url = 'https://lisp-lang.org/' + aliases = ['common-lisp', 'cl', 'lisp'] + filenames = ['*.cl', '*.lisp'] + mimetypes = ['text/x-common-lisp'] + version_added = '0.9' + + flags = re.IGNORECASE | re.MULTILINE + + # couple of useful regexes + + # characters that are not macro-characters and can be used to begin a symbol + nonmacro = r'\\.|[\w!$%&*+-/<=>?@\[\]^{}~]' + constituent = nonmacro + '|[#.:]' + terminated = r'(?=[ "()\'\n,;`])' # whitespace or terminating macro characters + + # symbol token, reverse-engineered from hyperspec + # Take a deep breath... + symbol = rf'(\|[^|]+\||(?:{nonmacro})(?:{constituent})*)' + + def __init__(self, **options): + from pygments.lexers._cl_builtins import BUILTIN_FUNCTIONS, \ + SPECIAL_FORMS, MACROS, LAMBDA_LIST_KEYWORDS, DECLARATIONS, \ + BUILTIN_TYPES, BUILTIN_CLASSES + self.builtin_function = BUILTIN_FUNCTIONS + self.special_forms = SPECIAL_FORMS + self.macros = MACROS + self.lambda_list_keywords = LAMBDA_LIST_KEYWORDS + self.declarations = DECLARATIONS + self.builtin_types = BUILTIN_TYPES + self.builtin_classes = BUILTIN_CLASSES + RegexLexer.__init__(self, **options) + + def get_tokens_unprocessed(self, text): + stack = ['root'] + for index, token, value in RegexLexer.get_tokens_unprocessed(self, text, stack): + if token is Name.Variable: + if value in self.builtin_function: + yield index, Name.Builtin, value + continue + if value in self.special_forms: + yield index, Keyword, value + continue + if value in self.macros: + yield index, Name.Builtin, value + continue + if value in self.lambda_list_keywords: + yield index, Keyword, value + continue + if value in self.declarations: + yield index, Keyword, value + continue + if value in self.builtin_types: + yield index, Keyword.Type, value + continue + if value in self.builtin_classes: + yield index, Name.Class, value + continue + yield index, token, value + + tokens = { + 'root': [ + default('body'), + ], + 'multiline-comment': [ + (r'#\|', Comment.Multiline, '#push'), # (cf. Hyperspec 2.4.8.19) + (r'\|#', Comment.Multiline, '#pop'), + (r'[^|#]+', Comment.Multiline), + (r'[|#]', Comment.Multiline), + ], + 'commented-form': [ + (r'\(', Comment.Preproc, '#push'), + (r'\)', Comment.Preproc, '#pop'), + (r'[^()]+', Comment.Preproc), + ], + 'body': [ + # whitespace + (r'\s+', Whitespace), + + # single-line comment + (r';.*$', Comment.Single), + + # multi-line comment + (r'#\|', Comment.Multiline, 'multiline-comment'), + + # encoding comment (?) + (r'#\d*Y.*$', Comment.Special), + + # strings and characters + (r'"(\\.|\\\n|[^"\\])*"', String), + # quoting + (r":" + symbol, String.Symbol), + (r"::" + symbol, String.Symbol), + (r":#" + symbol, String.Symbol), + (r"'" + symbol, String.Symbol), + (r"'", Operator), + (r"`", Operator), + + # decimal numbers + (r'[-+]?\d+\.?' + terminated, Number.Integer), + (r'[-+]?\d+/\d+' + terminated, Number), + (r'[-+]?(\d*\.\d+([defls][-+]?\d+)?|\d+(\.\d*)?[defls][-+]?\d+)' + + terminated, Number.Float), + + # sharpsign strings and characters + (r"#\\." + terminated, String.Char), + (r"#\\" + symbol, String.Char), + + # vector + (r'#\(', Operator, 'body'), + + # bitstring + (r'#\d*\*[01]*', Literal.Other), + + # uninterned symbol + (r'#:' + symbol, String.Symbol), + + # read-time and load-time evaluation + (r'#[.,]', Operator), + + # function shorthand + (r'#\'', Name.Function), + + # binary rational + (r'#b[+-]?[01]+(/[01]+)?', Number.Bin), + + # octal rational + (r'#o[+-]?[0-7]+(/[0-7]+)?', Number.Oct), + + # hex rational + (r'#x[+-]?[0-9a-f]+(/[0-9a-f]+)?', Number.Hex), + + # radix rational + (r'#\d+r[+-]?[0-9a-z]+(/[0-9a-z]+)?', Number), + + # complex + (r'(#c)(\()', bygroups(Number, Punctuation), 'body'), + + # array + (r'(#\d+a)(\()', bygroups(Literal.Other, Punctuation), 'body'), + + # structure + (r'(#s)(\()', bygroups(Literal.Other, Punctuation), 'body'), + + # path + (r'#p?"(\\.|[^"])*"', Literal.Other), + + # reference + (r'#\d+=', Operator), + (r'#\d+#', Operator), + + # read-time comment + (r'#+nil' + terminated + r'\s*\(', Comment.Preproc, 'commented-form'), + + # read-time conditional + (r'#[+-]', Operator), + + # special operators that should have been parsed already + (r'(,@|,|\.)', Operator), + + # special constants + (r'(t|nil)' + terminated, Name.Constant), + + # functions and variables + (r'\*' + symbol + r'\*', Name.Variable.Global), + (symbol, Name.Variable), + + # parentheses + (r'\(', Punctuation, 'body'), + (r'\)', Punctuation, '#pop'), + ], + } + + def analyse_text(text): + """Competes with Visual Prolog on *.cl""" + # This is a *really* good indicator (and not conflicting with Visual Prolog) + # '(defun ' first on a line + # section keyword alone on line e.g. 'clauses' + if re.search(r'^\s*\(defun\s', text): + return 0.8 + else: + return 0 + + +class HyLexer(RegexLexer): + """ + Lexer for Hy source code. + """ + name = 'Hy' + url = 'http://hylang.org/' + aliases = ['hylang', 'hy'] + filenames = ['*.hy'] + mimetypes = ['text/x-hy', 'application/x-hy'] + version_added = '2.0' + + special_forms = ( + 'cond', 'for', '->', '->>', 'car', + 'cdr', 'first', 'rest', 'let', 'when', 'unless', + 'import', 'do', 'progn', 'get', 'slice', 'assoc', 'with-decorator', + ',', 'list_comp', 'kwapply', '~', 'is', 'in', 'is-not', 'not-in', + 'quasiquote', 'unquote', 'unquote-splice', 'quote', '|', '<<=', '>>=', + 'foreach', 'while', + 'eval-and-compile', 'eval-when-compile' + ) + + declarations = ( + 'def', 'defn', 'defun', 'defmacro', 'defclass', 'lambda', 'fn', 'setv' + ) + + hy_builtins = () + + hy_core = ( + 'cycle', 'dec', 'distinct', 'drop', 'even?', 'filter', 'inc', + 'instance?', 'iterable?', 'iterate', 'iterator?', 'neg?', + 'none?', 'nth', 'numeric?', 'odd?', 'pos?', 'remove', 'repeat', + 'repeatedly', 'take', 'take_nth', 'take_while', 'zero?' + ) + + builtins = hy_builtins + hy_core + + # valid names for identifiers + # well, names can only not consist fully of numbers + # but this should be good enough for now + valid_name = r"[^ \t\n\r\f\v()[\]{};\"'`~]+" + + def _multi_escape(entries): + return words(entries, suffix=' ') + + tokens = { + 'root': [ + # the comments - always starting with semicolon + # and going to the end of the line + (r';.*$', Comment.Single), + + # whitespaces - usually not relevant + (r'[ \t\n\r\f\v]+', Whitespace), + + # numbers + (r'-?\d+\.\d+', Number.Float), + (r'-?\d+', Number.Integer), + (r'0[0-7]+j?', Number.Oct), + (r'0[xX][a-fA-F0-9]+', Number.Hex), + + # strings, symbols and characters + (r'"(\\\\|\\[^\\]|[^"\\])*"', String), + (r"'" + valid_name, String.Symbol), + (r"\\(.|[a-z]+)", String.Char), + (r'^(\s*)([rRuU]{,2}"""(?:.|\n)*?""")', bygroups(Text, String.Doc)), + (r"^(\s*)([rRuU]{,2}'''(?:.|\n)*?''')", bygroups(Text, String.Doc)), + + # keywords + (r'::?' + valid_name, String.Symbol), + + # special operators + (r'~@|[`\'#^~&@]', Operator), + + include('py-keywords'), + include('py-builtins'), + + # highlight the special forms + (_multi_escape(special_forms), Keyword), + + # Technically, only the special forms are 'keywords'. The problem + # is that only treating them as keywords means that things like + # 'defn' and 'ns' need to be highlighted as builtins. This is ugly + # and weird for most styles. So, as a compromise we're going to + # highlight them as Keyword.Declarations. + (_multi_escape(declarations), Keyword.Declaration), + + # highlight the builtins + (_multi_escape(builtins), Name.Builtin), + + # the remaining functions + (r'(?<=\()' + valid_name, Name.Function), + + # find the remaining variables + (valid_name, Name.Variable), + + # Hy accepts vector notation + (r'(\[|\])', Punctuation), + + # Hy accepts map notation + (r'(\{|\})', Punctuation), + + # the famous parentheses! + (r'(\(|\))', Punctuation), + + ], + 'py-keywords': PythonLexer.tokens['keywords'], + 'py-builtins': PythonLexer.tokens['builtins'], + } + + def analyse_text(text): + if '(import ' in text or '(defn ' in text: + return 0.9 + + +class RacketLexer(RegexLexer): + """ + Lexer for Racket source code (formerly + known as PLT Scheme). + """ + + name = 'Racket' + url = 'http://racket-lang.org/' + aliases = ['racket', 'rkt'] + filenames = ['*.rkt', '*.rktd', '*.rktl'] + mimetypes = ['text/x-racket', 'application/x-racket'] + version_added = '1.6' + + # Generated by example.rkt + _keywords = ( + '#%app', '#%datum', '#%declare', '#%expression', '#%module-begin', + '#%plain-app', '#%plain-lambda', '#%plain-module-begin', + '#%printing-module-begin', '#%provide', '#%require', + '#%stratified-body', '#%top', '#%top-interaction', + '#%variable-reference', '->', '->*', '->*m', '->d', '->dm', '->i', + '->m', '...', ':do-in', '==', '=>', '_', 'absent', 'abstract', + 'all-defined-out', 'all-from-out', 'and', 'any', 'augment', 'augment*', + 'augment-final', 'augment-final*', 'augride', 'augride*', 'begin', + 'begin-for-syntax', 'begin0', 'case', 'case->', 'case->m', + 'case-lambda', 'class', 'class*', 'class-field-accessor', + 'class-field-mutator', 'class/c', 'class/derived', 'combine-in', + 'combine-out', 'command-line', 'compound-unit', 'compound-unit/infer', + 'cond', 'cons/dc', 'contract', 'contract-out', 'contract-struct', + 'contracted', 'define', 'define-compound-unit', + 'define-compound-unit/infer', 'define-contract-struct', + 'define-custom-hash-types', 'define-custom-set-types', + 'define-for-syntax', 'define-local-member-name', 'define-logger', + 'define-match-expander', 'define-member-name', + 'define-module-boundary-contract', 'define-namespace-anchor', + 'define-opt/c', 'define-sequence-syntax', 'define-serializable-class', + 'define-serializable-class*', 'define-signature', + 'define-signature-form', 'define-struct', 'define-struct/contract', + 'define-struct/derived', 'define-syntax', 'define-syntax-rule', + 'define-syntaxes', 'define-unit', 'define-unit-binding', + 'define-unit-from-context', 'define-unit/contract', + 'define-unit/new-import-export', 'define-unit/s', 'define-values', + 'define-values-for-export', 'define-values-for-syntax', + 'define-values/invoke-unit', 'define-values/invoke-unit/infer', + 'define/augment', 'define/augment-final', 'define/augride', + 'define/contract', 'define/final-prop', 'define/match', + 'define/overment', 'define/override', 'define/override-final', + 'define/private', 'define/public', 'define/public-final', + 'define/pubment', 'define/subexpression-pos-prop', + 'define/subexpression-pos-prop/name', 'delay', 'delay/idle', + 'delay/name', 'delay/strict', 'delay/sync', 'delay/thread', 'do', + 'else', 'except', 'except-in', 'except-out', 'export', 'extends', + 'failure-cont', 'false', 'false/c', 'field', 'field-bound?', 'file', + 'flat-murec-contract', 'flat-rec-contract', 'for', 'for*', 'for*/and', + 'for*/async', 'for*/first', 'for*/fold', 'for*/fold/derived', + 'for*/hash', 'for*/hasheq', 'for*/hasheqv', 'for*/last', 'for*/list', + 'for*/lists', 'for*/mutable-set', 'for*/mutable-seteq', + 'for*/mutable-seteqv', 'for*/or', 'for*/product', 'for*/set', + 'for*/seteq', 'for*/seteqv', 'for*/stream', 'for*/sum', 'for*/vector', + 'for*/weak-set', 'for*/weak-seteq', 'for*/weak-seteqv', 'for-label', + 'for-meta', 'for-syntax', 'for-template', 'for/and', 'for/async', + 'for/first', 'for/fold', 'for/fold/derived', 'for/hash', 'for/hasheq', + 'for/hasheqv', 'for/last', 'for/list', 'for/lists', 'for/mutable-set', + 'for/mutable-seteq', 'for/mutable-seteqv', 'for/or', 'for/product', + 'for/set', 'for/seteq', 'for/seteqv', 'for/stream', 'for/sum', + 'for/vector', 'for/weak-set', 'for/weak-seteq', 'for/weak-seteqv', + 'gen:custom-write', 'gen:dict', 'gen:equal+hash', 'gen:set', + 'gen:stream', 'generic', 'get-field', 'hash/dc', 'if', 'implies', + 'import', 'include', 'include-at/relative-to', + 'include-at/relative-to/reader', 'include/reader', 'inherit', + 'inherit-field', 'inherit/inner', 'inherit/super', 'init', + 'init-depend', 'init-field', 'init-rest', 'inner', 'inspect', + 'instantiate', 'interface', 'interface*', 'invariant-assertion', + 'invoke-unit', 'invoke-unit/infer', 'lambda', 'lazy', 'let', 'let*', + 'let*-values', 'let-syntax', 'let-syntaxes', 'let-values', 'let/cc', + 'let/ec', 'letrec', 'letrec-syntax', 'letrec-syntaxes', + 'letrec-syntaxes+values', 'letrec-values', 'lib', 'link', 'local', + 'local-require', 'log-debug', 'log-error', 'log-fatal', 'log-info', + 'log-warning', 'match', 'match*', 'match*/derived', 'match-define', + 'match-define-values', 'match-lambda', 'match-lambda*', + 'match-lambda**', 'match-let', 'match-let*', 'match-let*-values', + 'match-let-values', 'match-letrec', 'match-letrec-values', + 'match/derived', 'match/values', 'member-name-key', 'mixin', 'module', + 'module*', 'module+', 'nand', 'new', 'nor', 'object-contract', + 'object/c', 'only', 'only-in', 'only-meta-in', 'open', 'opt/c', 'or', + 'overment', 'overment*', 'override', 'override*', 'override-final', + 'override-final*', 'parameterize', 'parameterize*', + 'parameterize-break', 'parametric->/c', 'place', 'place*', + 'place/context', 'planet', 'prefix', 'prefix-in', 'prefix-out', + 'private', 'private*', 'prompt-tag/c', 'protect-out', 'provide', + 'provide-signature-elements', 'provide/contract', 'public', 'public*', + 'public-final', 'public-final*', 'pubment', 'pubment*', 'quasiquote', + 'quasisyntax', 'quasisyntax/loc', 'quote', 'quote-syntax', + 'quote-syntax/prune', 'recontract-out', 'recursive-contract', + 'relative-in', 'rename', 'rename-in', 'rename-inner', 'rename-out', + 'rename-super', 'require', 'send', 'send*', 'send+', 'send-generic', + 'send/apply', 'send/keyword-apply', 'set!', 'set!-values', + 'set-field!', 'shared', 'stream', 'stream*', 'stream-cons', 'struct', + 'struct*', 'struct-copy', 'struct-field-index', 'struct-out', + 'struct/c', 'struct/ctc', 'struct/dc', 'submod', 'super', + 'super-instantiate', 'super-make-object', 'super-new', 'syntax', + 'syntax-case', 'syntax-case*', 'syntax-id-rules', 'syntax-rules', + 'syntax/loc', 'tag', 'this', 'this%', 'thunk', 'thunk*', 'time', + 'unconstrained-domain->', 'unit', 'unit-from-context', 'unit/c', + 'unit/new-import-export', 'unit/s', 'unless', 'unquote', + 'unquote-splicing', 'unsyntax', 'unsyntax-splicing', 'values/drop', + 'when', 'with-continuation-mark', 'with-contract', + 'with-contract-continuation-mark', 'with-handlers', 'with-handlers*', + 'with-method', 'with-syntax', 'λ' + ) + + # Generated by example.rkt + _builtins = ( + '*', '*list/c', '+', '-', '/', '<', '', '>/c', '>=', '>=/c', 'abort-current-continuation', 'abs', + 'absolute-path?', 'acos', 'add-between', 'add1', 'alarm-evt', + 'always-evt', 'and/c', 'andmap', 'angle', 'any/c', 'append', 'append*', + 'append-map', 'apply', 'argmax', 'argmin', 'arithmetic-shift', + 'arity-at-least', 'arity-at-least-value', 'arity-at-least?', + 'arity-checking-wrapper', 'arity-includes?', 'arity=?', + 'arrow-contract-info', 'arrow-contract-info-accepts-arglist', + 'arrow-contract-info-chaperone-procedure', + 'arrow-contract-info-check-first-order', 'arrow-contract-info?', + 'asin', 'assf', 'assoc', 'assq', 'assv', 'atan', + 'bad-number-of-results', 'banner', 'base->-doms/c', 'base->-rngs/c', + 'base->?', 'between/c', 'bitwise-and', 'bitwise-bit-field', + 'bitwise-bit-set?', 'bitwise-ior', 'bitwise-not', 'bitwise-xor', + 'blame-add-car-context', 'blame-add-cdr-context', 'blame-add-context', + 'blame-add-missing-party', 'blame-add-nth-arg-context', + 'blame-add-range-context', 'blame-add-unknown-context', + 'blame-context', 'blame-contract', 'blame-fmt->-string', + 'blame-missing-party?', 'blame-negative', 'blame-original?', + 'blame-positive', 'blame-replace-negative', 'blame-source', + 'blame-swap', 'blame-swapped?', 'blame-update', 'blame-value', + 'blame?', 'boolean=?', 'boolean?', 'bound-identifier=?', 'box', + 'box-cas!', 'box-immutable', 'box-immutable/c', 'box/c', 'box?', + 'break-enabled', 'break-parameterization?', 'break-thread', + 'build-chaperone-contract-property', 'build-compound-type-name', + 'build-contract-property', 'build-flat-contract-property', + 'build-list', 'build-path', 'build-path/convention-type', + 'build-string', 'build-vector', 'byte-pregexp', 'byte-pregexp?', + 'byte-ready?', 'byte-regexp', 'byte-regexp?', 'byte?', 'bytes', + 'bytes->immutable-bytes', 'bytes->list', 'bytes->path', + 'bytes->path-element', 'bytes->string/latin-1', 'bytes->string/locale', + 'bytes->string/utf-8', 'bytes-append', 'bytes-append*', + 'bytes-close-converter', 'bytes-convert', 'bytes-convert-end', + 'bytes-converter?', 'bytes-copy', 'bytes-copy!', + 'bytes-environment-variable-name?', 'bytes-fill!', 'bytes-join', + 'bytes-length', 'bytes-no-nuls?', 'bytes-open-converter', 'bytes-ref', + 'bytes-set!', 'bytes-utf-8-index', 'bytes-utf-8-length', + 'bytes-utf-8-ref', 'bytes?', 'bytes?', 'caaaar', + 'caaadr', 'caaar', 'caadar', 'caaddr', 'caadr', 'caar', 'cadaar', + 'cadadr', 'cadar', 'caddar', 'cadddr', 'caddr', 'cadr', + 'call-in-nested-thread', 'call-with-atomic-output-file', + 'call-with-break-parameterization', + 'call-with-composable-continuation', 'call-with-continuation-barrier', + 'call-with-continuation-prompt', 'call-with-current-continuation', + 'call-with-default-reading-parameterization', + 'call-with-escape-continuation', 'call-with-exception-handler', + 'call-with-file-lock/timeout', 'call-with-immediate-continuation-mark', + 'call-with-input-bytes', 'call-with-input-file', + 'call-with-input-file*', 'call-with-input-string', + 'call-with-output-bytes', 'call-with-output-file', + 'call-with-output-file*', 'call-with-output-string', + 'call-with-parameterization', 'call-with-semaphore', + 'call-with-semaphore/enable-break', 'call-with-values', 'call/cc', + 'call/ec', 'car', 'cartesian-product', 'cdaaar', 'cdaadr', 'cdaar', + 'cdadar', 'cdaddr', 'cdadr', 'cdar', 'cddaar', 'cddadr', 'cddar', + 'cdddar', 'cddddr', 'cdddr', 'cddr', 'cdr', 'ceiling', 'channel-get', + 'channel-put', 'channel-put-evt', 'channel-put-evt?', + 'channel-try-get', 'channel/c', 'channel?', 'chaperone-box', + 'chaperone-channel', 'chaperone-continuation-mark-key', + 'chaperone-contract-property?', 'chaperone-contract?', 'chaperone-evt', + 'chaperone-hash', 'chaperone-hash-set', 'chaperone-of?', + 'chaperone-procedure', 'chaperone-procedure*', 'chaperone-prompt-tag', + 'chaperone-struct', 'chaperone-struct-type', 'chaperone-vector', + 'chaperone?', 'char->integer', 'char-alphabetic?', 'char-blank?', + 'char-ci<=?', 'char-ci=?', 'char-ci>?', + 'char-downcase', 'char-foldcase', 'char-general-category', + 'char-graphic?', 'char-in', 'char-in/c', 'char-iso-control?', + 'char-lower-case?', 'char-numeric?', 'char-punctuation?', + 'char-ready?', 'char-symbolic?', 'char-title-case?', 'char-titlecase', + 'char-upcase', 'char-upper-case?', 'char-utf-8-length', + 'char-whitespace?', 'char<=?', 'char=?', 'char>?', + 'char?', 'check-duplicate-identifier', 'check-duplicates', + 'checked-procedure-check-and-extract', 'choice-evt', + 'class->interface', 'class-info', 'class-seal', 'class-unseal', + 'class?', 'cleanse-path', 'close-input-port', 'close-output-port', + 'coerce-chaperone-contract', 'coerce-chaperone-contracts', + 'coerce-contract', 'coerce-contract/f', 'coerce-contracts', + 'coerce-flat-contract', 'coerce-flat-contracts', 'collect-garbage', + 'collection-file-path', 'collection-path', 'combinations', 'compile', + 'compile-allow-set!-undefined', 'compile-context-preservation-enabled', + 'compile-enforce-module-constants', 'compile-syntax', + 'compiled-expression-recompile', 'compiled-expression?', + 'compiled-module-expression?', 'complete-path?', 'complex?', 'compose', + 'compose1', 'conjoin', 'conjugate', 'cons', 'cons/c', 'cons?', 'const', + 'continuation-mark-key/c', 'continuation-mark-key?', + 'continuation-mark-set->context', 'continuation-mark-set->list', + 'continuation-mark-set->list*', 'continuation-mark-set-first', + 'continuation-mark-set?', 'continuation-marks', + 'continuation-prompt-available?', 'continuation-prompt-tag?', + 'continuation?', 'contract-continuation-mark-key', + 'contract-custom-write-property-proc', 'contract-exercise', + 'contract-first-order', 'contract-first-order-passes?', + 'contract-late-neg-projection', 'contract-name', 'contract-proc', + 'contract-projection', 'contract-property?', + 'contract-random-generate', 'contract-random-generate-fail', + 'contract-random-generate-fail?', + 'contract-random-generate-get-current-environment', + 'contract-random-generate-stash', 'contract-random-generate/choose', + 'contract-stronger?', 'contract-struct-exercise', + 'contract-struct-generate', 'contract-struct-late-neg-projection', + 'contract-struct-list-contract?', 'contract-val-first-projection', + 'contract?', 'convert-stream', 'copy-directory/files', 'copy-file', + 'copy-port', 'cos', 'cosh', 'count', 'current-blame-format', + 'current-break-parameterization', 'current-code-inspector', + 'current-command-line-arguments', 'current-compile', + 'current-compiled-file-roots', 'current-continuation-marks', + 'current-contract-region', 'current-custodian', 'current-directory', + 'current-directory-for-user', 'current-drive', + 'current-environment-variables', 'current-error-port', 'current-eval', + 'current-evt-pseudo-random-generator', + 'current-force-delete-permissions', 'current-future', + 'current-gc-milliseconds', 'current-get-interaction-input-port', + 'current-inexact-milliseconds', 'current-input-port', + 'current-inspector', 'current-library-collection-links', + 'current-library-collection-paths', 'current-load', + 'current-load-extension', 'current-load-relative-directory', + 'current-load/use-compiled', 'current-locale', 'current-logger', + 'current-memory-use', 'current-milliseconds', + 'current-module-declare-name', 'current-module-declare-source', + 'current-module-name-resolver', 'current-module-path-for-load', + 'current-namespace', 'current-output-port', 'current-parameterization', + 'current-plumber', 'current-preserved-thread-cell-values', + 'current-print', 'current-process-milliseconds', 'current-prompt-read', + 'current-pseudo-random-generator', 'current-read-interaction', + 'current-reader-guard', 'current-readtable', 'current-seconds', + 'current-security-guard', 'current-subprocess-custodian-mode', + 'current-thread', 'current-thread-group', + 'current-thread-initial-stack-size', + 'current-write-relative-directory', 'curry', 'curryr', + 'custodian-box-value', 'custodian-box?', 'custodian-limit-memory', + 'custodian-managed-list', 'custodian-memory-accounting-available?', + 'custodian-require-memory', 'custodian-shutdown-all', 'custodian?', + 'custom-print-quotable-accessor', 'custom-print-quotable?', + 'custom-write-accessor', 'custom-write-property-proc', 'custom-write?', + 'date', 'date*', 'date*-nanosecond', 'date*-time-zone-name', 'date*?', + 'date-day', 'date-dst?', 'date-hour', 'date-minute', 'date-month', + 'date-second', 'date-time-zone-offset', 'date-week-day', 'date-year', + 'date-year-day', 'date?', 'datum->syntax', 'datum-intern-literal', + 'default-continuation-prompt-tag', 'degrees->radians', + 'delete-directory', 'delete-directory/files', 'delete-file', + 'denominator', 'dict->list', 'dict-can-functional-set?', + 'dict-can-remove-keys?', 'dict-clear', 'dict-clear!', 'dict-copy', + 'dict-count', 'dict-empty?', 'dict-for-each', 'dict-has-key?', + 'dict-implements/c', 'dict-implements?', 'dict-iter-contract', + 'dict-iterate-first', 'dict-iterate-key', 'dict-iterate-next', + 'dict-iterate-value', 'dict-key-contract', 'dict-keys', 'dict-map', + 'dict-mutable?', 'dict-ref', 'dict-ref!', 'dict-remove', + 'dict-remove!', 'dict-set', 'dict-set!', 'dict-set*', 'dict-set*!', + 'dict-update', 'dict-update!', 'dict-value-contract', 'dict-values', + 'dict?', 'directory-exists?', 'directory-list', 'disjoin', 'display', + 'display-lines', 'display-lines-to-file', 'display-to-file', + 'displayln', 'double-flonum?', 'drop', 'drop-common-prefix', + 'drop-right', 'dropf', 'dropf-right', 'dump-memory-stats', + 'dup-input-port', 'dup-output-port', 'dynamic->*', 'dynamic-get-field', + 'dynamic-object/c', 'dynamic-place', 'dynamic-place*', + 'dynamic-require', 'dynamic-require-for-syntax', 'dynamic-send', + 'dynamic-set-field!', 'dynamic-wind', 'eighth', 'empty', + 'empty-sequence', 'empty-stream', 'empty?', + 'environment-variables-copy', 'environment-variables-names', + 'environment-variables-ref', 'environment-variables-set!', + 'environment-variables?', 'eof', 'eof-evt', 'eof-object?', + 'ephemeron-value', 'ephemeron?', 'eprintf', 'eq-contract-val', + 'eq-contract?', 'eq-hash-code', 'eq?', 'equal-contract-val', + 'equal-contract?', 'equal-hash-code', 'equal-secondary-hash-code', + 'equal<%>', 'equal?', 'equal?/recur', 'eqv-hash-code', 'eqv?', 'error', + 'error-display-handler', 'error-escape-handler', + 'error-print-context-length', 'error-print-source-location', + 'error-print-width', 'error-value->string-handler', 'eval', + 'eval-jit-enabled', 'eval-syntax', 'even?', 'evt/c', 'evt?', + 'exact->inexact', 'exact-ceiling', 'exact-floor', 'exact-integer?', + 'exact-nonnegative-integer?', 'exact-positive-integer?', 'exact-round', + 'exact-truncate', 'exact?', 'executable-yield-handler', 'exit', + 'exit-handler', 'exn', 'exn-continuation-marks', 'exn-message', + 'exn:break', 'exn:break-continuation', 'exn:break:hang-up', + 'exn:break:hang-up?', 'exn:break:terminate', 'exn:break:terminate?', + 'exn:break?', 'exn:fail', 'exn:fail:contract', + 'exn:fail:contract:arity', 'exn:fail:contract:arity?', + 'exn:fail:contract:blame', 'exn:fail:contract:blame-object', + 'exn:fail:contract:blame?', 'exn:fail:contract:continuation', + 'exn:fail:contract:continuation?', 'exn:fail:contract:divide-by-zero', + 'exn:fail:contract:divide-by-zero?', + 'exn:fail:contract:non-fixnum-result', + 'exn:fail:contract:non-fixnum-result?', 'exn:fail:contract:variable', + 'exn:fail:contract:variable-id', 'exn:fail:contract:variable?', + 'exn:fail:contract?', 'exn:fail:filesystem', + 'exn:fail:filesystem:errno', 'exn:fail:filesystem:errno-errno', + 'exn:fail:filesystem:errno?', 'exn:fail:filesystem:exists', + 'exn:fail:filesystem:exists?', 'exn:fail:filesystem:missing-module', + 'exn:fail:filesystem:missing-module-path', + 'exn:fail:filesystem:missing-module?', 'exn:fail:filesystem:version', + 'exn:fail:filesystem:version?', 'exn:fail:filesystem?', + 'exn:fail:network', 'exn:fail:network:errno', + 'exn:fail:network:errno-errno', 'exn:fail:network:errno?', + 'exn:fail:network?', 'exn:fail:object', 'exn:fail:object?', + 'exn:fail:out-of-memory', 'exn:fail:out-of-memory?', 'exn:fail:read', + 'exn:fail:read-srclocs', 'exn:fail:read:eof', 'exn:fail:read:eof?', + 'exn:fail:read:non-char', 'exn:fail:read:non-char?', 'exn:fail:read?', + 'exn:fail:syntax', 'exn:fail:syntax-exprs', + 'exn:fail:syntax:missing-module', + 'exn:fail:syntax:missing-module-path', + 'exn:fail:syntax:missing-module?', 'exn:fail:syntax:unbound', + 'exn:fail:syntax:unbound?', 'exn:fail:syntax?', 'exn:fail:unsupported', + 'exn:fail:unsupported?', 'exn:fail:user', 'exn:fail:user?', + 'exn:fail?', 'exn:misc:match?', 'exn:missing-module-accessor', + 'exn:missing-module?', 'exn:srclocs-accessor', 'exn:srclocs?', 'exn?', + 'exp', 'expand', 'expand-once', 'expand-syntax', 'expand-syntax-once', + 'expand-syntax-to-top-form', 'expand-to-top-form', 'expand-user-path', + 'explode-path', 'expt', 'externalizable<%>', 'failure-result/c', + 'false?', 'field-names', 'fifth', 'file->bytes', 'file->bytes-lines', + 'file->lines', 'file->list', 'file->string', 'file->value', + 'file-exists?', 'file-name-from-path', 'file-or-directory-identity', + 'file-or-directory-modify-seconds', 'file-or-directory-permissions', + 'file-position', 'file-position*', 'file-size', + 'file-stream-buffer-mode', 'file-stream-port?', 'file-truncate', + 'filename-extension', 'filesystem-change-evt', + 'filesystem-change-evt-cancel', 'filesystem-change-evt?', + 'filesystem-root-list', 'filter', 'filter-map', 'filter-not', + 'filter-read-input-port', 'find-executable-path', 'find-files', + 'find-library-collection-links', 'find-library-collection-paths', + 'find-relative-path', 'find-system-path', 'findf', 'first', + 'first-or/c', 'fixnum?', 'flat-contract', 'flat-contract-predicate', + 'flat-contract-property?', 'flat-contract?', 'flat-named-contract', + 'flatten', 'floating-point-bytes->real', 'flonum?', 'floor', + 'flush-output', 'fold-files', 'foldl', 'foldr', 'for-each', 'force', + 'format', 'fourth', 'fprintf', 'free-identifier=?', + 'free-label-identifier=?', 'free-template-identifier=?', + 'free-transformer-identifier=?', 'fsemaphore-count', 'fsemaphore-post', + 'fsemaphore-try-wait?', 'fsemaphore-wait', 'fsemaphore?', 'future', + 'future?', 'futures-enabled?', 'gcd', 'generate-member-key', + 'generate-temporaries', 'generic-set?', 'generic?', 'gensym', + 'get-output-bytes', 'get-output-string', 'get-preference', + 'get/build-late-neg-projection', 'get/build-val-first-projection', + 'getenv', 'global-port-print-handler', 'group-by', 'group-execute-bit', + 'group-read-bit', 'group-write-bit', 'guard-evt', 'handle-evt', + 'handle-evt?', 'has-blame?', 'has-contract?', 'hash', 'hash->list', + 'hash-clear', 'hash-clear!', 'hash-copy', 'hash-copy-clear', + 'hash-count', 'hash-empty?', 'hash-eq?', 'hash-equal?', 'hash-eqv?', + 'hash-for-each', 'hash-has-key?', 'hash-iterate-first', + 'hash-iterate-key', 'hash-iterate-key+value', 'hash-iterate-next', + 'hash-iterate-pair', 'hash-iterate-value', 'hash-keys', 'hash-map', + 'hash-placeholder?', 'hash-ref', 'hash-ref!', 'hash-remove', + 'hash-remove!', 'hash-set', 'hash-set!', 'hash-set*', 'hash-set*!', + 'hash-update', 'hash-update!', 'hash-values', 'hash-weak?', 'hash/c', + 'hash?', 'hasheq', 'hasheqv', 'identifier-binding', + 'identifier-binding-symbol', 'identifier-label-binding', + 'identifier-prune-lexical-context', + 'identifier-prune-to-source-module', + 'identifier-remove-from-definition-context', + 'identifier-template-binding', 'identifier-transformer-binding', + 'identifier?', 'identity', 'if/c', 'imag-part', 'immutable?', + 'impersonate-box', 'impersonate-channel', + 'impersonate-continuation-mark-key', 'impersonate-hash', + 'impersonate-hash-set', 'impersonate-procedure', + 'impersonate-procedure*', 'impersonate-prompt-tag', + 'impersonate-struct', 'impersonate-vector', 'impersonator-contract?', + 'impersonator-ephemeron', 'impersonator-of?', + 'impersonator-prop:application-mark', 'impersonator-prop:blame', + 'impersonator-prop:contracted', + 'impersonator-property-accessor-procedure?', 'impersonator-property?', + 'impersonator?', 'implementation?', 'implementation?/c', 'in-bytes', + 'in-bytes-lines', 'in-combinations', 'in-cycle', 'in-dict', + 'in-dict-keys', 'in-dict-pairs', 'in-dict-values', 'in-directory', + 'in-hash', 'in-hash-keys', 'in-hash-pairs', 'in-hash-values', + 'in-immutable-hash', 'in-immutable-hash-keys', + 'in-immutable-hash-pairs', 'in-immutable-hash-values', + 'in-immutable-set', 'in-indexed', 'in-input-port-bytes', + 'in-input-port-chars', 'in-lines', 'in-list', 'in-mlist', + 'in-mutable-hash', 'in-mutable-hash-keys', 'in-mutable-hash-pairs', + 'in-mutable-hash-values', 'in-mutable-set', 'in-naturals', + 'in-parallel', 'in-permutations', 'in-port', 'in-producer', 'in-range', + 'in-sequences', 'in-set', 'in-slice', 'in-stream', 'in-string', + 'in-syntax', 'in-value', 'in-values*-sequence', 'in-values-sequence', + 'in-vector', 'in-weak-hash', 'in-weak-hash-keys', 'in-weak-hash-pairs', + 'in-weak-hash-values', 'in-weak-set', 'inexact->exact', + 'inexact-real?', 'inexact?', 'infinite?', 'input-port-append', + 'input-port?', 'inspector?', 'instanceof/c', 'integer->char', + 'integer->integer-bytes', 'integer-bytes->integer', 'integer-in', + 'integer-length', 'integer-sqrt', 'integer-sqrt/remainder', 'integer?', + 'interface->method-names', 'interface-extension?', 'interface?', + 'internal-definition-context-binding-identifiers', + 'internal-definition-context-introduce', + 'internal-definition-context-seal', 'internal-definition-context?', + 'is-a?', 'is-a?/c', 'keyword->string', 'keyword-apply', 'keywordbytes', 'list->mutable-set', + 'list->mutable-seteq', 'list->mutable-seteqv', 'list->set', + 'list->seteq', 'list->seteqv', 'list->string', 'list->vector', + 'list->weak-set', 'list->weak-seteq', 'list->weak-seteqv', + 'list-contract?', 'list-prefix?', 'list-ref', 'list-set', 'list-tail', + 'list-update', 'list/c', 'list?', 'listen-port-number?', 'listof', + 'load', 'load-extension', 'load-on-demand-enabled', 'load-relative', + 'load-relative-extension', 'load/cd', 'load/use-compiled', + 'local-expand', 'local-expand/capture-lifts', + 'local-transformer-expand', 'local-transformer-expand/capture-lifts', + 'locale-string-encoding', 'log', 'log-all-levels', 'log-level-evt', + 'log-level?', 'log-max-level', 'log-message', 'log-receiver?', + 'logger-name', 'logger?', 'magnitude', 'make-arity-at-least', + 'make-base-empty-namespace', 'make-base-namespace', 'make-bytes', + 'make-channel', 'make-chaperone-contract', + 'make-continuation-mark-key', 'make-continuation-prompt-tag', + 'make-contract', 'make-custodian', 'make-custodian-box', + 'make-custom-hash', 'make-custom-hash-types', 'make-custom-set', + 'make-custom-set-types', 'make-date', 'make-date*', + 'make-derived-parameter', 'make-directory', 'make-directory*', + 'make-do-sequence', 'make-empty-namespace', + 'make-environment-variables', 'make-ephemeron', 'make-exn', + 'make-exn:break', 'make-exn:break:hang-up', 'make-exn:break:terminate', + 'make-exn:fail', 'make-exn:fail:contract', + 'make-exn:fail:contract:arity', 'make-exn:fail:contract:blame', + 'make-exn:fail:contract:continuation', + 'make-exn:fail:contract:divide-by-zero', + 'make-exn:fail:contract:non-fixnum-result', + 'make-exn:fail:contract:variable', 'make-exn:fail:filesystem', + 'make-exn:fail:filesystem:errno', 'make-exn:fail:filesystem:exists', + 'make-exn:fail:filesystem:missing-module', + 'make-exn:fail:filesystem:version', 'make-exn:fail:network', + 'make-exn:fail:network:errno', 'make-exn:fail:object', + 'make-exn:fail:out-of-memory', 'make-exn:fail:read', + 'make-exn:fail:read:eof', 'make-exn:fail:read:non-char', + 'make-exn:fail:syntax', 'make-exn:fail:syntax:missing-module', + 'make-exn:fail:syntax:unbound', 'make-exn:fail:unsupported', + 'make-exn:fail:user', 'make-file-or-directory-link', + 'make-flat-contract', 'make-fsemaphore', 'make-generic', + 'make-handle-get-preference-locked', 'make-hash', + 'make-hash-placeholder', 'make-hasheq', 'make-hasheq-placeholder', + 'make-hasheqv', 'make-hasheqv-placeholder', + 'make-immutable-custom-hash', 'make-immutable-hash', + 'make-immutable-hasheq', 'make-immutable-hasheqv', + 'make-impersonator-property', 'make-input-port', + 'make-input-port/read-to-peek', 'make-inspector', + 'make-keyword-procedure', 'make-known-char-range-list', + 'make-limited-input-port', 'make-list', 'make-lock-file-name', + 'make-log-receiver', 'make-logger', 'make-mixin-contract', + 'make-mutable-custom-set', 'make-none/c', 'make-object', + 'make-output-port', 'make-parameter', 'make-parent-directory*', + 'make-phantom-bytes', 'make-pipe', 'make-pipe-with-specials', + 'make-placeholder', 'make-plumber', 'make-polar', 'make-prefab-struct', + 'make-primitive-class', 'make-proj-contract', + 'make-pseudo-random-generator', 'make-reader-graph', 'make-readtable', + 'make-rectangular', 'make-rename-transformer', + 'make-resolved-module-path', 'make-security-guard', 'make-semaphore', + 'make-set!-transformer', 'make-shared-bytes', 'make-sibling-inspector', + 'make-special-comment', 'make-srcloc', 'make-string', + 'make-struct-field-accessor', 'make-struct-field-mutator', + 'make-struct-type', 'make-struct-type-property', + 'make-syntax-delta-introducer', 'make-syntax-introducer', + 'make-temporary-file', 'make-tentative-pretty-print-output-port', + 'make-thread-cell', 'make-thread-group', 'make-vector', + 'make-weak-box', 'make-weak-custom-hash', 'make-weak-custom-set', + 'make-weak-hash', 'make-weak-hasheq', 'make-weak-hasheqv', + 'make-will-executor', 'map', 'match-equality-test', + 'matches-arity-exactly?', 'max', 'mcar', 'mcdr', 'mcons', 'member', + 'member-name-key-hash-code', 'member-name-key=?', 'member-name-key?', + 'memf', 'memq', 'memv', 'merge-input', 'method-in-interface?', 'min', + 'mixin-contract', 'module->exports', 'module->imports', + 'module->language-info', 'module->namespace', + 'module-compiled-cross-phase-persistent?', 'module-compiled-exports', + 'module-compiled-imports', 'module-compiled-language-info', + 'module-compiled-name', 'module-compiled-submodules', + 'module-declared?', 'module-path-index-join', + 'module-path-index-resolve', 'module-path-index-split', + 'module-path-index-submodule', 'module-path-index?', 'module-path?', + 'module-predefined?', 'module-provide-protected?', 'modulo', 'mpair?', + 'mutable-set', 'mutable-seteq', 'mutable-seteqv', 'n->th', + 'nack-guard-evt', 'namespace-anchor->empty-namespace', + 'namespace-anchor->namespace', 'namespace-anchor?', + 'namespace-attach-module', 'namespace-attach-module-declaration', + 'namespace-base-phase', 'namespace-mapped-symbols', + 'namespace-module-identifier', 'namespace-module-registry', + 'namespace-require', 'namespace-require/constant', + 'namespace-require/copy', 'namespace-require/expansion-time', + 'namespace-set-variable-value!', 'namespace-symbol->identifier', + 'namespace-syntax-introduce', 'namespace-undefine-variable!', + 'namespace-unprotect-module', 'namespace-variable-value', 'namespace?', + 'nan?', 'natural-number/c', 'negate', 'negative?', 'never-evt', + 'new-∀/c', 'new-∃/c', 'newline', 'ninth', 'non-empty-listof', + 'non-empty-string?', 'none/c', 'normal-case-path', 'normalize-arity', + 'normalize-path', 'normalized-arity?', 'not', 'not/c', 'null', 'null?', + 'number->string', 'number?', 'numerator', 'object%', 'object->vector', + 'object-info', 'object-interface', 'object-method-arity-includes?', + 'object-name', 'object-or-false=?', 'object=?', 'object?', 'odd?', + 'one-of/c', 'open-input-bytes', 'open-input-file', + 'open-input-output-file', 'open-input-string', 'open-output-bytes', + 'open-output-file', 'open-output-nowhere', 'open-output-string', + 'or/c', 'order-of-magnitude', 'ormap', 'other-execute-bit', + 'other-read-bit', 'other-write-bit', 'output-port?', 'pair?', + 'parameter-procedure=?', 'parameter/c', 'parameter?', + 'parameterization?', 'parse-command-line', 'partition', 'path->bytes', + 'path->complete-path', 'path->directory-path', 'path->string', + 'path-add-suffix', 'path-convention-type', 'path-element->bytes', + 'path-element->string', 'path-element?', 'path-for-some-system?', + 'path-list-string->path-list', 'path-only', 'path-replace-suffix', + 'path-string?', 'pathbytes', 'port->bytes-lines', 'port->lines', + 'port->list', 'port->string', 'port-closed-evt', 'port-closed?', + 'port-commit-peeked', 'port-count-lines!', 'port-count-lines-enabled', + 'port-counts-lines?', 'port-display-handler', 'port-file-identity', + 'port-file-unlock', 'port-next-location', 'port-number?', + 'port-print-handler', 'port-progress-evt', + 'port-provides-progress-evts?', 'port-read-handler', + 'port-try-file-lock?', 'port-write-handler', 'port-writes-atomic?', + 'port-writes-special?', 'port?', 'positive?', 'predicate/c', + 'prefab-key->struct-type', 'prefab-key?', 'prefab-struct-key', + 'preferences-lock-file-mode', 'pregexp', 'pregexp?', 'pretty-display', + 'pretty-format', 'pretty-print', 'pretty-print-.-symbol-without-bars', + 'pretty-print-abbreviate-read-macros', 'pretty-print-columns', + 'pretty-print-current-style-table', 'pretty-print-depth', + 'pretty-print-exact-as-decimal', 'pretty-print-extend-style-table', + 'pretty-print-handler', 'pretty-print-newline', + 'pretty-print-post-print-hook', 'pretty-print-pre-print-hook', + 'pretty-print-print-hook', 'pretty-print-print-line', + 'pretty-print-remap-stylable', 'pretty-print-show-inexactness', + 'pretty-print-size-hook', 'pretty-print-style-table?', + 'pretty-printing', 'pretty-write', 'primitive-closure?', + 'primitive-result-arity', 'primitive?', 'print', 'print-as-expression', + 'print-boolean-long-form', 'print-box', 'print-graph', + 'print-hash-table', 'print-mpair-curly-braces', + 'print-pair-curly-braces', 'print-reader-abbreviations', + 'print-struct', 'print-syntax-width', 'print-unreadable', + 'print-vector-length', 'printable/c', 'printable<%>', 'printf', + 'println', 'procedure->method', 'procedure-arity', + 'procedure-arity-includes/c', 'procedure-arity-includes?', + 'procedure-arity?', 'procedure-closure-contents-eq?', + 'procedure-extract-target', 'procedure-keywords', + 'procedure-reduce-arity', 'procedure-reduce-keyword-arity', + 'procedure-rename', 'procedure-result-arity', 'procedure-specialize', + 'procedure-struct-type?', 'procedure?', 'process', 'process*', + 'process*/ports', 'process/ports', 'processor-count', 'progress-evt?', + 'promise-forced?', 'promise-running?', 'promise/c', 'promise/name?', + 'promise?', 'prop:arity-string', 'prop:arrow-contract', + 'prop:arrow-contract-get-info', 'prop:arrow-contract?', 'prop:blame', + 'prop:chaperone-contract', 'prop:checked-procedure', 'prop:contract', + 'prop:contracted', 'prop:custom-print-quotable', 'prop:custom-write', + 'prop:dict', 'prop:dict/contract', 'prop:equal+hash', 'prop:evt', + 'prop:exn:missing-module', 'prop:exn:srclocs', + 'prop:expansion-contexts', 'prop:flat-contract', + 'prop:impersonator-of', 'prop:input-port', + 'prop:liberal-define-context', 'prop:object-name', + 'prop:opt-chaperone-contract', 'prop:opt-chaperone-contract-get-test', + 'prop:opt-chaperone-contract?', 'prop:orc-contract', + 'prop:orc-contract-get-subcontracts', 'prop:orc-contract?', + 'prop:output-port', 'prop:place-location', 'prop:procedure', + 'prop:recursive-contract', 'prop:recursive-contract-unroll', + 'prop:recursive-contract?', 'prop:rename-transformer', 'prop:sequence', + 'prop:set!-transformer', 'prop:stream', 'proper-subset?', + 'pseudo-random-generator->vector', 'pseudo-random-generator-vector?', + 'pseudo-random-generator?', 'put-preferences', 'putenv', 'quotient', + 'quotient/remainder', 'radians->degrees', 'raise', + 'raise-argument-error', 'raise-arguments-error', 'raise-arity-error', + 'raise-blame-error', 'raise-contract-error', 'raise-mismatch-error', + 'raise-not-cons-blame-error', 'raise-range-error', + 'raise-result-error', 'raise-syntax-error', 'raise-type-error', + 'raise-user-error', 'random', 'random-seed', 'range', 'rational?', + 'rationalize', 'read', 'read-accept-bar-quote', 'read-accept-box', + 'read-accept-compiled', 'read-accept-dot', 'read-accept-graph', + 'read-accept-infix-dot', 'read-accept-lang', 'read-accept-quasiquote', + 'read-accept-reader', 'read-byte', 'read-byte-or-special', + 'read-bytes', 'read-bytes!', 'read-bytes!-evt', 'read-bytes-avail!', + 'read-bytes-avail!*', 'read-bytes-avail!-evt', + 'read-bytes-avail!/enable-break', 'read-bytes-evt', 'read-bytes-line', + 'read-bytes-line-evt', 'read-case-sensitive', 'read-cdot', 'read-char', + 'read-char-or-special', 'read-curly-brace-as-paren', + 'read-curly-brace-with-tag', 'read-decimal-as-inexact', + 'read-eval-print-loop', 'read-language', 'read-line', 'read-line-evt', + 'read-on-demand-source', 'read-square-bracket-as-paren', + 'read-square-bracket-with-tag', 'read-string', 'read-string!', + 'read-string!-evt', 'read-string-evt', 'read-syntax', + 'read-syntax/recursive', 'read/recursive', 'readtable-mapping', + 'readtable?', 'real->decimal-string', 'real->double-flonum', + 'real->floating-point-bytes', 'real->single-flonum', 'real-in', + 'real-part', 'real?', 'reencode-input-port', 'reencode-output-port', + 'regexp', 'regexp-match', 'regexp-match*', 'regexp-match-evt', + 'regexp-match-exact?', 'regexp-match-peek', + 'regexp-match-peek-immediate', 'regexp-match-peek-positions', + 'regexp-match-peek-positions*', + 'regexp-match-peek-positions-immediate', + 'regexp-match-peek-positions-immediate/end', + 'regexp-match-peek-positions/end', 'regexp-match-positions', + 'regexp-match-positions*', 'regexp-match-positions/end', + 'regexp-match/end', 'regexp-match?', 'regexp-max-lookbehind', + 'regexp-quote', 'regexp-replace', 'regexp-replace*', + 'regexp-replace-quote', 'regexp-replaces', 'regexp-split', + 'regexp-try-match', 'regexp?', 'relative-path?', 'relocate-input-port', + 'relocate-output-port', 'remainder', 'remf', 'remf*', 'remove', + 'remove*', 'remove-duplicates', 'remq', 'remq*', 'remv', 'remv*', + 'rename-contract', 'rename-file-or-directory', + 'rename-transformer-target', 'rename-transformer?', 'replace-evt', + 'reroot-path', 'resolve-path', 'resolved-module-path-name', + 'resolved-module-path?', 'rest', 'reverse', 'round', 'second', + 'seconds->date', 'security-guard?', 'semaphore-peek-evt', + 'semaphore-peek-evt?', 'semaphore-post', 'semaphore-try-wait?', + 'semaphore-wait', 'semaphore-wait/enable-break', 'semaphore?', + 'sequence->list', 'sequence->stream', 'sequence-add-between', + 'sequence-andmap', 'sequence-append', 'sequence-count', + 'sequence-filter', 'sequence-fold', 'sequence-for-each', + 'sequence-generate', 'sequence-generate*', 'sequence-length', + 'sequence-map', 'sequence-ormap', 'sequence-ref', 'sequence-tail', + 'sequence/c', 'sequence?', 'set', 'set!-transformer-procedure', + 'set!-transformer?', 'set->list', 'set->stream', 'set-add', 'set-add!', + 'set-box!', 'set-clear', 'set-clear!', 'set-copy', 'set-copy-clear', + 'set-count', 'set-empty?', 'set-eq?', 'set-equal?', 'set-eqv?', + 'set-first', 'set-for-each', 'set-implements/c', 'set-implements?', + 'set-intersect', 'set-intersect!', 'set-map', 'set-mcar!', 'set-mcdr!', + 'set-member?', 'set-mutable?', 'set-phantom-bytes!', + 'set-port-next-location!', 'set-remove', 'set-remove!', 'set-rest', + 'set-some-basic-contracts!', 'set-subtract', 'set-subtract!', + 'set-symmetric-difference', 'set-symmetric-difference!', 'set-union', + 'set-union!', 'set-weak?', 'set/c', 'set=?', 'set?', 'seteq', 'seteqv', + 'seventh', 'sgn', 'shared-bytes', 'shell-execute', 'shrink-path-wrt', + 'shuffle', 'simple-form-path', 'simplify-path', 'sin', + 'single-flonum?', 'sinh', 'sixth', 'skip-projection-wrapper?', 'sleep', + 'some-system-path->string', 'sort', 'special-comment-value', + 'special-comment?', 'special-filter-input-port', 'split-at', + 'split-at-right', 'split-common-prefix', 'split-path', 'splitf-at', + 'splitf-at-right', 'sqr', 'sqrt', 'srcloc', 'srcloc->string', + 'srcloc-column', 'srcloc-line', 'srcloc-position', 'srcloc-source', + 'srcloc-span', 'srcloc?', 'stop-after', 'stop-before', 'stream->list', + 'stream-add-between', 'stream-andmap', 'stream-append', 'stream-count', + 'stream-empty?', 'stream-filter', 'stream-first', 'stream-fold', + 'stream-for-each', 'stream-length', 'stream-map', 'stream-ormap', + 'stream-ref', 'stream-rest', 'stream-tail', 'stream/c', 'stream?', + 'string', 'string->bytes/latin-1', 'string->bytes/locale', + 'string->bytes/utf-8', 'string->immutable-string', 'string->keyword', + 'string->list', 'string->number', 'string->path', + 'string->path-element', 'string->some-system-path', 'string->symbol', + 'string->uninterned-symbol', 'string->unreadable-symbol', + 'string-append', 'string-append*', 'string-ci<=?', 'string-ci=?', 'string-ci>?', 'string-contains?', + 'string-copy', 'string-copy!', 'string-downcase', + 'string-environment-variable-name?', 'string-fill!', 'string-foldcase', + 'string-join', 'string-len/c', 'string-length', 'string-locale-ci?', 'string-locale-downcase', + 'string-locale-upcase', 'string-locale?', 'string-no-nuls?', 'string-normalize-nfc', + 'string-normalize-nfd', 'string-normalize-nfkc', + 'string-normalize-nfkd', 'string-normalize-spaces', 'string-port?', + 'string-prefix?', 'string-ref', 'string-replace', 'string-set!', + 'string-split', 'string-suffix?', 'string-titlecase', 'string-trim', + 'string-upcase', 'string-utf-8-length', 'string<=?', 'string=?', 'string>?', 'string?', 'struct->vector', + 'struct-accessor-procedure?', 'struct-constructor-procedure?', + 'struct-info', 'struct-mutator-procedure?', + 'struct-predicate-procedure?', 'struct-type-info', + 'struct-type-make-constructor', 'struct-type-make-predicate', + 'struct-type-property-accessor-procedure?', 'struct-type-property/c', + 'struct-type-property?', 'struct-type?', 'struct:arity-at-least', + 'struct:arrow-contract-info', 'struct:date', 'struct:date*', + 'struct:exn', 'struct:exn:break', 'struct:exn:break:hang-up', + 'struct:exn:break:terminate', 'struct:exn:fail', + 'struct:exn:fail:contract', 'struct:exn:fail:contract:arity', + 'struct:exn:fail:contract:blame', + 'struct:exn:fail:contract:continuation', + 'struct:exn:fail:contract:divide-by-zero', + 'struct:exn:fail:contract:non-fixnum-result', + 'struct:exn:fail:contract:variable', 'struct:exn:fail:filesystem', + 'struct:exn:fail:filesystem:errno', + 'struct:exn:fail:filesystem:exists', + 'struct:exn:fail:filesystem:missing-module', + 'struct:exn:fail:filesystem:version', 'struct:exn:fail:network', + 'struct:exn:fail:network:errno', 'struct:exn:fail:object', + 'struct:exn:fail:out-of-memory', 'struct:exn:fail:read', + 'struct:exn:fail:read:eof', 'struct:exn:fail:read:non-char', + 'struct:exn:fail:syntax', 'struct:exn:fail:syntax:missing-module', + 'struct:exn:fail:syntax:unbound', 'struct:exn:fail:unsupported', + 'struct:exn:fail:user', 'struct:srcloc', + 'struct:wrapped-extra-arg-arrow', 'struct?', 'sub1', 'subbytes', + 'subclass?', 'subclass?/c', 'subprocess', 'subprocess-group-enabled', + 'subprocess-kill', 'subprocess-pid', 'subprocess-status', + 'subprocess-wait', 'subprocess?', 'subset?', 'substring', 'suggest/c', + 'symbol->string', 'symbol-interned?', 'symbol-unreadable?', 'symboldatum', + 'syntax->list', 'syntax-arm', 'syntax-column', 'syntax-debug-info', + 'syntax-disarm', 'syntax-e', 'syntax-line', + 'syntax-local-bind-syntaxes', 'syntax-local-certifier', + 'syntax-local-context', 'syntax-local-expand-expression', + 'syntax-local-get-shadower', 'syntax-local-identifier-as-binding', + 'syntax-local-introduce', 'syntax-local-lift-context', + 'syntax-local-lift-expression', 'syntax-local-lift-module', + 'syntax-local-lift-module-end-declaration', + 'syntax-local-lift-provide', 'syntax-local-lift-require', + 'syntax-local-lift-values-expression', + 'syntax-local-make-definition-context', + 'syntax-local-make-delta-introducer', + 'syntax-local-module-defined-identifiers', + 'syntax-local-module-exports', + 'syntax-local-module-required-identifiers', 'syntax-local-name', + 'syntax-local-phase-level', 'syntax-local-submodules', + 'syntax-local-transforming-module-provides?', 'syntax-local-value', + 'syntax-local-value/immediate', 'syntax-original?', 'syntax-position', + 'syntax-property', 'syntax-property-preserved?', + 'syntax-property-symbol-keys', 'syntax-protect', 'syntax-rearm', + 'syntax-recertify', 'syntax-shift-phase-level', 'syntax-source', + 'syntax-source-module', 'syntax-span', 'syntax-taint', + 'syntax-tainted?', 'syntax-track-origin', + 'syntax-transforming-module-expression?', + 'syntax-transforming-with-lifts?', 'syntax-transforming?', 'syntax/c', + 'syntax?', 'system', 'system*', 'system*/exit-code', + 'system-big-endian?', 'system-idle-evt', 'system-language+country', + 'system-library-subpath', 'system-path-convention-type', 'system-type', + 'system/exit-code', 'tail-marks-match?', 'take', 'take-common-prefix', + 'take-right', 'takef', 'takef-right', 'tan', 'tanh', + 'tcp-abandon-port', 'tcp-accept', 'tcp-accept-evt', + 'tcp-accept-ready?', 'tcp-accept/enable-break', 'tcp-addresses', + 'tcp-close', 'tcp-connect', 'tcp-connect/enable-break', 'tcp-listen', + 'tcp-listener?', 'tcp-port?', 'tentative-pretty-print-port-cancel', + 'tentative-pretty-print-port-transfer', 'tenth', 'terminal-port?', + 'the-unsupplied-arg', 'third', 'thread', 'thread-cell-ref', + 'thread-cell-set!', 'thread-cell-values?', 'thread-cell?', + 'thread-dead-evt', 'thread-dead?', 'thread-group?', 'thread-receive', + 'thread-receive-evt', 'thread-resume', 'thread-resume-evt', + 'thread-rewind-receive', 'thread-running?', 'thread-send', + 'thread-suspend', 'thread-suspend-evt', 'thread-try-receive', + 'thread-wait', 'thread/suspend-to-kill', 'thread?', 'time-apply', + 'touch', 'transplant-input-port', 'transplant-output-port', 'true', + 'truncate', 'udp-addresses', 'udp-bind!', 'udp-bound?', 'udp-close', + 'udp-connect!', 'udp-connected?', 'udp-multicast-interface', + 'udp-multicast-join-group!', 'udp-multicast-leave-group!', + 'udp-multicast-loopback?', 'udp-multicast-set-interface!', + 'udp-multicast-set-loopback!', 'udp-multicast-set-ttl!', + 'udp-multicast-ttl', 'udp-open-socket', 'udp-receive!', + 'udp-receive!*', 'udp-receive!-evt', 'udp-receive!/enable-break', + 'udp-receive-ready-evt', 'udp-send', 'udp-send*', 'udp-send-evt', + 'udp-send-ready-evt', 'udp-send-to', 'udp-send-to*', 'udp-send-to-evt', + 'udp-send-to/enable-break', 'udp-send/enable-break', 'udp?', 'unbox', + 'uncaught-exception-handler', 'unit?', 'unspecified-dom', + 'unsupplied-arg?', 'use-collection-link-paths', + 'use-compiled-file-paths', 'use-user-specific-search-paths', + 'user-execute-bit', 'user-read-bit', 'user-write-bit', 'value-blame', + 'value-contract', 'values', 'variable-reference->empty-namespace', + 'variable-reference->module-base-phase', + 'variable-reference->module-declaration-inspector', + 'variable-reference->module-path-index', + 'variable-reference->module-source', 'variable-reference->namespace', + 'variable-reference->phase', + 'variable-reference->resolved-module-path', + 'variable-reference-constant?', 'variable-reference?', 'vector', + 'vector->immutable-vector', 'vector->list', + 'vector->pseudo-random-generator', 'vector->pseudo-random-generator!', + 'vector->values', 'vector-append', 'vector-argmax', 'vector-argmin', + 'vector-copy', 'vector-copy!', 'vector-count', 'vector-drop', + 'vector-drop-right', 'vector-fill!', 'vector-filter', + 'vector-filter-not', 'vector-immutable', 'vector-immutable/c', + 'vector-immutableof', 'vector-length', 'vector-map', 'vector-map!', + 'vector-member', 'vector-memq', 'vector-memv', 'vector-ref', + 'vector-set!', 'vector-set*!', 'vector-set-performance-stats!', + 'vector-split-at', 'vector-split-at-right', 'vector-take', + 'vector-take-right', 'vector/c', 'vector?', 'vectorof', 'version', + 'void', 'void?', 'weak-box-value', 'weak-box?', 'weak-set', + 'weak-seteq', 'weak-seteqv', 'will-execute', 'will-executor?', + 'will-register', 'will-try-execute', 'with-input-from-bytes', + 'with-input-from-file', 'with-input-from-string', + 'with-output-to-bytes', 'with-output-to-file', 'with-output-to-string', + 'would-be-future', 'wrap-evt', 'wrapped-extra-arg-arrow', + 'wrapped-extra-arg-arrow-extra-neg-party-argument', + 'wrapped-extra-arg-arrow-real-func', 'wrapped-extra-arg-arrow?', + 'writable<%>', 'write', 'write-byte', 'write-bytes', + 'write-bytes-avail', 'write-bytes-avail*', 'write-bytes-avail-evt', + 'write-bytes-avail/enable-break', 'write-char', 'write-special', + 'write-special-avail*', 'write-special-evt', 'write-string', + 'write-to-file', 'writeln', 'xor', 'zero?', '~.a', '~.s', '~.v', '~a', + '~e', '~r', '~s', '~v' + ) + + _opening_parenthesis = r'[([{]' + _closing_parenthesis = r'[)\]}]' + _delimiters = r'()[\]{}",\'`;\s' + _symbol = rf'(?:\|[^|]*\||\\[\w\W]|[^|\\{_delimiters}]+)+' + _exact_decimal_prefix = r'(?:#e)?(?:#d)?(?:#e)?' + _exponent = r'(?:[defls][-+]?\d+)' + _inexact_simple_no_hashes = r'(?:\d+(?:/\d+|\.\d*)?|\.\d+)' + _inexact_simple = (rf'(?:{_inexact_simple_no_hashes}|(?:\d+#+(?:\.#*|/\d+#*)?|\.\d+#+|' + r'\d+(?:\.\d*#+|/\d+#+)))') + _inexact_normal_no_hashes = rf'(?:{_inexact_simple_no_hashes}{_exponent}?)' + _inexact_normal = rf'(?:{_inexact_simple}{_exponent}?)' + _inexact_special = r'(?:(?:inf|nan)\.[0f])' + _inexact_real = rf'(?:[-+]?{_inexact_normal}|[-+]{_inexact_special})' + _inexact_unsigned = rf'(?:{_inexact_normal}|{_inexact_special})' + + tokens = { + 'root': [ + (_closing_parenthesis, Error), + (r'(?!\Z)', Text, 'unquoted-datum') + ], + 'datum': [ + (r'(?s)#;|#![ /]([^\\\n]|\\.)*', Comment), + (r';[^\n\r\x85\u2028\u2029]*', Comment.Single), + (r'#\|', Comment.Multiline, 'block-comment'), + + # Whitespaces + (r'(?u)\s+', Whitespace), + + # Numbers: Keep in mind Racket reader hash prefixes, which + # can denote the base or the type. These don't map neatly + # onto Pygments token types; some judgment calls here. + + # #d or no prefix + (rf'(?i){_exact_decimal_prefix}[-+]?\d+(?=[{_delimiters}])', + Number.Integer, '#pop'), + (rf'(?i){_exact_decimal_prefix}[-+]?(\d+(\.\d*)?|\.\d+)([deflst][-+]?\d+)?(?=[{_delimiters}])', Number.Float, '#pop'), + (rf'(?i){_exact_decimal_prefix}[-+]?({_inexact_normal_no_hashes}([-+]{_inexact_normal_no_hashes}?i)?|[-+]{_inexact_normal_no_hashes}?i)(?=[{_delimiters}])', Number, '#pop'), + + # Inexact without explicit #i + (rf'(?i)(#d)?({_inexact_real}([-+]{_inexact_unsigned}?i)?|[-+]{_inexact_unsigned}?i|{_inexact_real}@{_inexact_real})(?=[{_delimiters}])', Number.Float, + '#pop'), + + # The remaining extflonums + (rf'(?i)(([-+]?{_inexact_simple}t[-+]?\d+)|[-+](inf|nan)\.t)(?=[{_delimiters}])', Number.Float, '#pop'), + + # #b + (rf'(?iu)(#[ei])?#b{_symbol}', Number.Bin, '#pop'), + + # #o + (rf'(?iu)(#[ei])?#o{_symbol}', Number.Oct, '#pop'), + + # #x + (rf'(?iu)(#[ei])?#x{_symbol}', Number.Hex, '#pop'), + + # #i is always inexact, i.e. float + (rf'(?iu)(#d)?#i{_symbol}', Number.Float, '#pop'), + + # Strings and characters + (r'#?"', String.Double, ('#pop', 'string')), + (r'#<<(.+)\n(^(?!\1$).*$\n)*^\1$', String.Heredoc, '#pop'), + (r'#\\(u[\da-fA-F]{1,4}|U[\da-fA-F]{1,8})', String.Char, '#pop'), + (r'(?is)#\\([0-7]{3}|[a-z]+|.)', String.Char, '#pop'), + (r'(?s)#[pr]x#?"(\\?.)*?"', String.Regex, '#pop'), + + # Constants + (r'#(true|false|[tTfF])', Name.Constant, '#pop'), + + # Keyword argument names (e.g. #:keyword) + (rf'#:{_symbol}', Keyword.Declaration, '#pop'), + + # Reader extensions + (r'(#lang |#!)(\S+)', + bygroups(Keyword.Namespace, Name.Namespace)), + (r'#reader', Keyword.Namespace, 'quoted-datum'), + + # Other syntax + (rf"(?i)\.(?=[{_delimiters}])|#c[is]|#['`]|#,@?", Operator), + (rf"'|#[s&]|#hash(eqv?)?|#\d*(?={_opening_parenthesis})", + Operator, ('#pop', 'quoted-datum')) + ], + 'datum*': [ + (r'`|,@?', Operator), + (_symbol, String.Symbol, '#pop'), + (r'[|\\]', Error), + default('#pop') + ], + 'list': [ + (_closing_parenthesis, Punctuation, '#pop') + ], + 'unquoted-datum': [ + include('datum'), + (rf'quote(?=[{_delimiters}])', Keyword, + ('#pop', 'quoted-datum')), + (r'`', Operator, ('#pop', 'quasiquoted-datum')), + (rf'quasiquote(?=[{_delimiters}])', Keyword, + ('#pop', 'quasiquoted-datum')), + (_opening_parenthesis, Punctuation, ('#pop', 'unquoted-list')), + (words(_keywords, suffix=f'(?=[{_delimiters}])'), + Keyword, '#pop'), + (words(_builtins, suffix=f'(?=[{_delimiters}])'), + Name.Builtin, '#pop'), + (_symbol, Name, '#pop'), + include('datum*') + ], + 'unquoted-list': [ + include('list'), + (r'(?!\Z)', Text, 'unquoted-datum') + ], + 'quasiquoted-datum': [ + include('datum'), + (r',@?', Operator, ('#pop', 'unquoted-datum')), + (rf'unquote(-splicing)?(?=[{_delimiters}])', Keyword, + ('#pop', 'unquoted-datum')), + (_opening_parenthesis, Punctuation, ('#pop', 'quasiquoted-list')), + include('datum*') + ], + 'quasiquoted-list': [ + include('list'), + (r'(?!\Z)', Text, 'quasiquoted-datum') + ], + 'quoted-datum': [ + include('datum'), + (_opening_parenthesis, Punctuation, ('#pop', 'quoted-list')), + include('datum*') + ], + 'quoted-list': [ + include('list'), + (r'(?!\Z)', Text, 'quoted-datum') + ], + 'block-comment': [ + (r'#\|', Comment.Multiline, '#push'), + (r'\|#', Comment.Multiline, '#pop'), + (r'[^#|]+|.', Comment.Multiline) + ], + 'string': [ + (r'"', String.Double, '#pop'), + (r'(?s)\\([0-7]{1,3}|x[\da-fA-F]{1,2}|u[\da-fA-F]{1,4}|' + r'U[\da-fA-F]{1,8}|.)', String.Escape), + (r'[^\\"]+', String.Double) + ] + } + + +class NewLispLexer(RegexLexer): + """ + For newLISP source code (version 10.3.0). + """ + + name = 'NewLisp' + url = 'http://www.newlisp.org/' + aliases = ['newlisp'] + filenames = ['*.lsp', '*.nl', '*.kif'] + mimetypes = ['text/x-newlisp', 'application/x-newlisp'] + version_added = '1.5' + + flags = re.IGNORECASE | re.MULTILINE + + # list of built-in functions for newLISP version 10.3 + builtins = ( + '^', '--', '-', ':', '!', '!=', '?', '@', '*', '/', '&', '%', '+', '++', + '<', '<<', '<=', '=', '>', '>=', '>>', '|', '~', '$', '$0', '$1', '$10', + '$11', '$12', '$13', '$14', '$15', '$2', '$3', '$4', '$5', '$6', '$7', + '$8', '$9', '$args', '$idx', '$it', '$main-args', 'abort', 'abs', + 'acos', 'acosh', 'add', 'address', 'amb', 'and', 'append-file', + 'append', 'apply', 'args', 'array-list', 'array?', 'array', 'asin', + 'asinh', 'assoc', 'atan', 'atan2', 'atanh', 'atom?', 'base64-dec', + 'base64-enc', 'bayes-query', 'bayes-train', 'begin', + 'beta', 'betai', 'bind', 'binomial', 'bits', 'callback', + 'case', 'catch', 'ceil', 'change-dir', 'char', 'chop', 'Class', 'clean', + 'close', 'command-event', 'cond', 'cons', 'constant', + 'context?', 'context', 'copy-file', 'copy', 'cos', 'cosh', 'count', + 'cpymem', 'crc32', 'crit-chi2', 'crit-z', 'current-line', 'curry', + 'date-list', 'date-parse', 'date-value', 'date', 'debug', 'dec', + 'def-new', 'default', 'define-macro', 'define', + 'delete-file', 'delete-url', 'delete', 'destroy', 'det', 'device', + 'difference', 'directory?', 'directory', 'div', 'do-until', 'do-while', + 'doargs', 'dolist', 'dostring', 'dotimes', 'dotree', 'dump', 'dup', + 'empty?', 'encrypt', 'ends-with', 'env', 'erf', 'error-event', + 'eval-string', 'eval', 'exec', 'exists', 'exit', 'exp', 'expand', + 'explode', 'extend', 'factor', 'fft', 'file-info', 'file?', 'filter', + 'find-all', 'find', 'first', 'flat', 'float?', 'float', 'floor', 'flt', + 'fn', 'for-all', 'for', 'fork', 'format', 'fv', 'gammai', 'gammaln', + 'gcd', 'get-char', 'get-float', 'get-int', 'get-long', 'get-string', + 'get-url', 'global?', 'global', 'if-not', 'if', 'ifft', 'import', 'inc', + 'index', 'inf?', 'int', 'integer?', 'integer', 'intersect', 'invert', + 'irr', 'join', 'lambda-macro', 'lambda?', 'lambda', 'last-error', + 'last', 'legal?', 'length', 'let', 'letex', 'letn', + 'list?', 'list', 'load', 'local', 'log', 'lookup', + 'lower-case', 'macro?', 'main-args', 'MAIN', 'make-dir', 'map', 'mat', + 'match', 'max', 'member', 'min', 'mod', 'module', 'mul', 'multiply', + 'NaN?', 'net-accept', 'net-close', 'net-connect', 'net-error', + 'net-eval', 'net-interface', 'net-ipv', 'net-listen', 'net-local', + 'net-lookup', 'net-packet', 'net-peek', 'net-peer', 'net-ping', + 'net-receive-from', 'net-receive-udp', 'net-receive', 'net-select', + 'net-send-to', 'net-send-udp', 'net-send', 'net-service', + 'net-sessions', 'new', 'nil?', 'nil', 'normal', 'not', 'now', 'nper', + 'npv', 'nth', 'null?', 'number?', 'open', 'or', 'ostype', 'pack', + 'parse-date', 'parse', 'peek', 'pipe', 'pmt', 'pop-assoc', 'pop', + 'post-url', 'pow', 'prefix', 'pretty-print', 'primitive?', 'print', + 'println', 'prob-chi2', 'prob-z', 'process', 'prompt-event', + 'protected?', 'push', 'put-url', 'pv', 'quote?', 'quote', 'rand', + 'random', 'randomize', 'read', 'read-char', 'read-expr', 'read-file', + 'read-key', 'read-line', 'read-utf8', 'reader-event', + 'real-path', 'receive', 'ref-all', 'ref', 'regex-comp', 'regex', + 'remove-dir', 'rename-file', 'replace', 'reset', 'rest', 'reverse', + 'rotate', 'round', 'save', 'search', 'seed', 'seek', 'select', 'self', + 'semaphore', 'send', 'sequence', 'series', 'set-locale', 'set-ref-all', + 'set-ref', 'set', 'setf', 'setq', 'sgn', 'share', 'signal', 'silent', + 'sin', 'sinh', 'sleep', 'slice', 'sort', 'source', 'spawn', 'sqrt', + 'starts-with', 'string?', 'string', 'sub', 'swap', 'sym', 'symbol?', + 'symbols', 'sync', 'sys-error', 'sys-info', 'tan', 'tanh', 'term', + 'throw-error', 'throw', 'time-of-day', 'time', 'timer', 'title-case', + 'trace-highlight', 'trace', 'transpose', 'Tree', 'trim', 'true?', + 'true', 'unicode', 'unify', 'unique', 'unless', 'unpack', 'until', + 'upper-case', 'utf8', 'utf8len', 'uuid', 'wait-pid', 'when', 'while', + 'write', 'write-char', 'write-file', 'write-line', + 'xfer-event', 'xml-error', 'xml-parse', 'xml-type-tags', 'zero?', + ) + + # valid names + valid_name = r'([\w!$%&*+.,/<=>?@^~|-])+|(\[.*?\])+' + + tokens = { + 'root': [ + # shebang + (r'#!(.*?)$', Comment.Preproc), + # comments starting with semicolon + (r';.*$', Comment.Single), + # comments starting with # + (r'#.*$', Comment.Single), + + # whitespace + (r'\s+', Whitespace), + + # strings, symbols and characters + (r'"(\\\\|\\[^\\]|[^"\\])*"', String), + + # braces + (r'\{', String, "bracestring"), + + # [text] ... [/text] delimited strings + (r'\[text\]*', String, "tagstring"), + + # 'special' operators... + (r"('|:)", Operator), + + # highlight the builtins + (words(builtins, suffix=r'\b'), + Keyword), + + # the remaining functions + (r'(?<=\()' + valid_name, Name.Variable), + + # the remaining variables + (valid_name, String.Symbol), + + # parentheses + (r'(\(|\))', Punctuation), + ], + + # braced strings... + 'bracestring': [ + (r'\{', String, "#push"), + (r'\}', String, "#pop"), + ('[^{}]+', String), + ], + + # tagged [text]...[/text] delimited strings... + 'tagstring': [ + (r'(?s)(.*?)(\[/text\])', String, '#pop'), + ], + } + + +class EmacsLispLexer(RegexLexer): + """ + An ELisp lexer, parsing a stream and outputting the tokens + needed to highlight elisp code. + """ + name = 'EmacsLisp' + aliases = ['emacs-lisp', 'elisp', 'emacs'] + filenames = ['*.el'] + mimetypes = ['text/x-elisp', 'application/x-elisp'] + url = 'https://www.gnu.org/software/emacs' + version_added = '2.1' + + flags = re.MULTILINE + + # couple of useful regexes + + # characters that are not macro-characters and can be used to begin a symbol + nonmacro = r'\\.|[\w!$%&*+-/<=>?@^{}~|]' + constituent = nonmacro + '|[#.:]' + terminated = r'(?=[ "()\]\'\n,;`])' # whitespace or terminating macro characters + + # symbol token, reverse-engineered from hyperspec + # Take a deep breath... + symbol = rf'((?:{nonmacro})(?:{constituent})*)' + + macros = { + 'atomic-change-group', 'case', 'block', 'cl-block', 'cl-callf', 'cl-callf2', + 'cl-case', 'cl-decf', 'cl-declaim', 'cl-declare', + 'cl-define-compiler-macro', 'cl-defmacro', 'cl-defstruct', + 'cl-defsubst', 'cl-deftype', 'cl-defun', 'cl-destructuring-bind', + 'cl-do', 'cl-do*', 'cl-do-all-symbols', 'cl-do-symbols', 'cl-dolist', + 'cl-dotimes', 'cl-ecase', 'cl-etypecase', 'eval-when', 'cl-eval-when', 'cl-flet', + 'cl-flet*', 'cl-function', 'cl-incf', 'cl-labels', 'cl-letf', + 'cl-letf*', 'cl-load-time-value', 'cl-locally', 'cl-loop', + 'cl-macrolet', 'cl-multiple-value-bind', 'cl-multiple-value-setq', + 'cl-progv', 'cl-psetf', 'cl-psetq', 'cl-pushnew', 'cl-remf', + 'cl-return', 'cl-return-from', 'cl-rotatef', 'cl-shiftf', + 'cl-symbol-macrolet', 'cl-tagbody', 'cl-the', 'cl-typecase', + 'combine-after-change-calls', 'condition-case-unless-debug', 'decf', + 'declaim', 'declare', 'declare-function', 'def-edebug-spec', + 'defadvice', 'defclass', 'defcustom', 'defface', 'defgeneric', + 'defgroup', 'define-advice', 'define-alternatives', + 'define-compiler-macro', 'define-derived-mode', 'define-generic-mode', + 'define-global-minor-mode', 'define-globalized-minor-mode', + 'define-minor-mode', 'define-modify-macro', + 'define-obsolete-face-alias', 'define-obsolete-function-alias', + 'define-obsolete-variable-alias', 'define-setf-expander', + 'define-skeleton', 'defmacro', 'defmethod', 'defsetf', 'defstruct', + 'defsubst', 'deftheme', 'deftype', 'defun', 'defvar-local', + 'delay-mode-hooks', 'destructuring-bind', 'do', 'do*', + 'do-all-symbols', 'do-symbols', 'dolist', 'dont-compile', 'dotimes', + 'dotimes-with-progress-reporter', 'ecase', 'ert-deftest', 'etypecase', + 'eval-and-compile', 'eval-when-compile', 'flet', 'ignore-errors', + 'incf', 'labels', 'lambda', 'letrec', 'lexical-let', 'lexical-let*', + 'loop', 'multiple-value-bind', 'multiple-value-setq', 'noreturn', + 'oref', 'oref-default', 'oset', 'oset-default', 'pcase', + 'pcase-defmacro', 'pcase-dolist', 'pcase-exhaustive', 'pcase-let', + 'pcase-let*', 'pop', 'psetf', 'psetq', 'push', 'pushnew', 'remf', + 'return', 'rotatef', 'rx', 'save-match-data', 'save-selected-window', + 'save-window-excursion', 'setf', 'setq-local', 'shiftf', + 'track-mouse', 'typecase', 'unless', 'use-package', 'when', + 'while-no-input', 'with-case-table', 'with-category-table', + 'with-coding-priority', 'with-current-buffer', 'with-demoted-errors', + 'with-eval-after-load', 'with-file-modes', 'with-local-quit', + 'with-output-to-string', 'with-output-to-temp-buffer', + 'with-parsed-tramp-file-name', 'with-selected-frame', + 'with-selected-window', 'with-silent-modifications', 'with-slots', + 'with-syntax-table', 'with-temp-buffer', 'with-temp-file', + 'with-temp-message', 'with-timeout', 'with-tramp-connection-property', + 'with-tramp-file-property', 'with-tramp-progress-reporter', + 'with-wrapper-hook', 'load-time-value', 'locally', 'macrolet', 'progv', + 'return-from', + } + + special_forms = { + 'and', 'catch', 'cond', 'condition-case', 'defconst', 'defvar', + 'function', 'if', 'interactive', 'let', 'let*', 'or', 'prog1', + 'prog2', 'progn', 'quote', 'save-current-buffer', 'save-excursion', + 'save-restriction', 'setq', 'setq-default', 'subr-arity', + 'unwind-protect', 'while', + } + + builtin_function = { + '%', '*', '+', '-', '/', '/=', '1+', '1-', '<', '<=', '=', '>', '>=', + 'Snarf-documentation', 'abort-recursive-edit', 'abs', + 'accept-process-output', 'access-file', 'accessible-keymaps', 'acos', + 'active-minibuffer-window', 'add-face-text-property', + 'add-name-to-file', 'add-text-properties', 'all-completions', + 'append', 'apply', 'apropos-internal', 'aref', 'arrayp', 'aset', + 'ash', 'asin', 'assoc', 'assoc-string', 'assq', 'atan', 'atom', + 'autoload', 'autoload-do-load', 'backtrace', 'backtrace--locals', + 'backtrace-debug', 'backtrace-eval', 'backtrace-frame', + 'backward-char', 'backward-prefix-chars', 'barf-if-buffer-read-only', + 'base64-decode-region', 'base64-decode-string', + 'base64-encode-region', 'base64-encode-string', 'beginning-of-line', + 'bidi-find-overridden-directionality', 'bidi-resolved-levels', + 'bitmap-spec-p', 'bobp', 'bolp', 'bool-vector', + 'bool-vector-count-consecutive', 'bool-vector-count-population', + 'bool-vector-exclusive-or', 'bool-vector-intersection', + 'bool-vector-not', 'bool-vector-p', 'bool-vector-set-difference', + 'bool-vector-subsetp', 'bool-vector-union', 'boundp', + 'buffer-base-buffer', 'buffer-chars-modified-tick', + 'buffer-enable-undo', 'buffer-file-name', 'buffer-has-markers-at', + 'buffer-list', 'buffer-live-p', 'buffer-local-value', + 'buffer-local-variables', 'buffer-modified-p', 'buffer-modified-tick', + 'buffer-name', 'buffer-size', 'buffer-string', 'buffer-substring', + 'buffer-substring-no-properties', 'buffer-swap-text', 'bufferp', + 'bury-buffer-internal', 'byte-code', 'byte-code-function-p', + 'byte-to-position', 'byte-to-string', 'byteorder', + 'call-interactively', 'call-last-kbd-macro', 'call-process', + 'call-process-region', 'cancel-kbd-macro-events', 'capitalize', + 'capitalize-region', 'capitalize-word', 'car', 'car-less-than-car', + 'car-safe', 'case-table-p', 'category-docstring', + 'category-set-mnemonics', 'category-table', 'category-table-p', + 'ccl-execute', 'ccl-execute-on-string', 'ccl-program-p', 'cdr', + 'cdr-safe', 'ceiling', 'char-after', 'char-before', + 'char-category-set', 'char-charset', 'char-equal', 'char-or-string-p', + 'char-resolve-modifiers', 'char-syntax', 'char-table-extra-slot', + 'char-table-p', 'char-table-parent', 'char-table-range', + 'char-table-subtype', 'char-to-string', 'char-width', 'characterp', + 'charset-after', 'charset-id-internal', 'charset-plist', + 'charset-priority-list', 'charsetp', 'check-coding-system', + 'check-coding-systems-region', 'clear-buffer-auto-save-failure', + 'clear-charset-maps', 'clear-face-cache', 'clear-font-cache', + 'clear-image-cache', 'clear-string', 'clear-this-command-keys', + 'close-font', 'clrhash', 'coding-system-aliases', + 'coding-system-base', 'coding-system-eol-type', 'coding-system-p', + 'coding-system-plist', 'coding-system-priority-list', + 'coding-system-put', 'color-distance', 'color-gray-p', + 'color-supported-p', 'combine-after-change-execute', + 'command-error-default-function', 'command-remapping', 'commandp', + 'compare-buffer-substrings', 'compare-strings', + 'compare-window-configurations', 'completing-read', + 'compose-region-internal', 'compose-string-internal', + 'composition-get-gstring', 'compute-motion', 'concat', 'cons', + 'consp', 'constrain-to-field', 'continue-process', + 'controlling-tty-p', 'coordinates-in-window-p', 'copy-alist', + 'copy-category-table', 'copy-file', 'copy-hash-table', 'copy-keymap', + 'copy-marker', 'copy-sequence', 'copy-syntax-table', 'copysign', + 'cos', 'current-active-maps', 'current-bidi-paragraph-direction', + 'current-buffer', 'current-case-table', 'current-column', + 'current-global-map', 'current-idle-time', 'current-indentation', + 'current-input-mode', 'current-local-map', 'current-message', + 'current-minor-mode-maps', 'current-time', 'current-time-string', + 'current-time-zone', 'current-window-configuration', + 'cygwin-convert-file-name-from-windows', + 'cygwin-convert-file-name-to-windows', 'daemon-initialized', + 'daemonp', 'dbus--init-bus', 'dbus-get-unique-name', + 'dbus-message-internal', 'debug-timer-check', 'declare-equiv-charset', + 'decode-big5-char', 'decode-char', 'decode-coding-region', + 'decode-coding-string', 'decode-sjis-char', 'decode-time', + 'default-boundp', 'default-file-modes', 'default-printer-name', + 'default-toplevel-value', 'default-value', 'define-category', + 'define-charset-alias', 'define-charset-internal', + 'define-coding-system-alias', 'define-coding-system-internal', + 'define-fringe-bitmap', 'define-hash-table-test', 'define-key', + 'define-prefix-command', 'delete', + 'delete-all-overlays', 'delete-and-extract-region', 'delete-char', + 'delete-directory-internal', 'delete-field', 'delete-file', + 'delete-frame', 'delete-other-windows-internal', 'delete-overlay', + 'delete-process', 'delete-region', 'delete-terminal', + 'delete-window-internal', 'delq', 'describe-buffer-bindings', + 'describe-vector', 'destroy-fringe-bitmap', 'detect-coding-region', + 'detect-coding-string', 'ding', 'directory-file-name', + 'directory-files', 'directory-files-and-attributes', 'discard-input', + 'display-supports-face-attributes-p', 'do-auto-save', 'documentation', + 'documentation-property', 'downcase', 'downcase-region', + 'downcase-word', 'draw-string', 'dump-colors', 'dump-emacs', + 'dump-face', 'dump-frame-glyph-matrix', 'dump-glyph-matrix', + 'dump-glyph-row', 'dump-redisplay-history', 'dump-tool-bar-row', + 'elt', 'emacs-pid', 'encode-big5-char', 'encode-char', + 'encode-coding-region', 'encode-coding-string', 'encode-sjis-char', + 'encode-time', 'end-kbd-macro', 'end-of-line', 'eobp', 'eolp', 'eq', + 'eql', 'equal', 'equal-including-properties', 'erase-buffer', + 'error-message-string', 'eval', 'eval-buffer', 'eval-region', + 'event-convert-list', 'execute-kbd-macro', 'exit-recursive-edit', + 'exp', 'expand-file-name', 'expt', 'external-debugging-output', + 'face-attribute-relative-p', 'face-attributes-as-vector', 'face-font', + 'fboundp', 'fceiling', 'fetch-bytecode', 'ffloor', + 'field-beginning', 'field-end', 'field-string', + 'field-string-no-properties', 'file-accessible-directory-p', + 'file-acl', 'file-attributes', 'file-attributes-lessp', + 'file-directory-p', 'file-executable-p', 'file-exists-p', + 'file-locked-p', 'file-modes', 'file-name-absolute-p', + 'file-name-all-completions', 'file-name-as-directory', + 'file-name-completion', 'file-name-directory', + 'file-name-nondirectory', 'file-newer-than-file-p', 'file-readable-p', + 'file-regular-p', 'file-selinux-context', 'file-symlink-p', + 'file-system-info', 'file-system-info', 'file-writable-p', + 'fillarray', 'find-charset-region', 'find-charset-string', + 'find-coding-systems-region-internal', 'find-composition-internal', + 'find-file-name-handler', 'find-font', 'find-operation-coding-system', + 'float', 'float-time', 'floatp', 'floor', 'fmakunbound', + 'following-char', 'font-at', 'font-drive-otf', 'font-face-attributes', + 'font-family-list', 'font-get', 'font-get-glyphs', + 'font-get-system-font', 'font-get-system-normal-font', 'font-info', + 'font-match-p', 'font-otf-alternates', 'font-put', + 'font-shape-gstring', 'font-spec', 'font-variation-glyphs', + 'font-xlfd-name', 'fontp', 'fontset-font', 'fontset-info', + 'fontset-list', 'fontset-list-all', 'force-mode-line-update', + 'force-window-update', 'format', 'format-mode-line', + 'format-network-address', 'format-time-string', 'forward-char', + 'forward-comment', 'forward-line', 'forward-word', + 'frame-border-width', 'frame-bottom-divider-width', + 'frame-can-run-window-configuration-change-hook', 'frame-char-height', + 'frame-char-width', 'frame-face-alist', 'frame-first-window', + 'frame-focus', 'frame-font-cache', 'frame-fringe-width', 'frame-list', + 'frame-live-p', 'frame-or-buffer-changed-p', 'frame-parameter', + 'frame-parameters', 'frame-pixel-height', 'frame-pixel-width', + 'frame-pointer-visible-p', 'frame-right-divider-width', + 'frame-root-window', 'frame-scroll-bar-height', + 'frame-scroll-bar-width', 'frame-selected-window', 'frame-terminal', + 'frame-text-cols', 'frame-text-height', 'frame-text-lines', + 'frame-text-width', 'frame-total-cols', 'frame-total-lines', + 'frame-visible-p', 'framep', 'frexp', 'fringe-bitmaps-at-pos', + 'fround', 'fset', 'ftruncate', 'funcall', 'funcall-interactively', + 'function-equal', 'functionp', 'gap-position', 'gap-size', + 'garbage-collect', 'gc-status', 'generate-new-buffer-name', 'get', + 'get-buffer', 'get-buffer-create', 'get-buffer-process', + 'get-buffer-window', 'get-byte', 'get-char-property', + 'get-char-property-and-overlay', 'get-file-buffer', 'get-file-char', + 'get-internal-run-time', 'get-load-suffixes', 'get-pos-property', + 'get-process', 'get-screen-color', 'get-text-property', + 'get-unicode-property-internal', 'get-unused-category', + 'get-unused-iso-final-char', 'getenv-internal', 'gethash', + 'gfile-add-watch', 'gfile-rm-watch', 'global-key-binding', + 'gnutls-available-p', 'gnutls-boot', 'gnutls-bye', 'gnutls-deinit', + 'gnutls-error-fatalp', 'gnutls-error-string', 'gnutls-errorp', + 'gnutls-get-initstage', 'gnutls-peer-status', + 'gnutls-peer-status-warning-describe', 'goto-char', 'gpm-mouse-start', + 'gpm-mouse-stop', 'group-gid', 'group-real-gid', + 'handle-save-session', 'handle-switch-frame', 'hash-table-count', + 'hash-table-p', 'hash-table-rehash-size', + 'hash-table-rehash-threshold', 'hash-table-size', 'hash-table-test', + 'hash-table-weakness', 'iconify-frame', 'identity', 'image-flush', + 'image-mask-p', 'image-metadata', 'image-size', 'imagemagick-types', + 'imagep', 'indent-to', 'indirect-function', 'indirect-variable', + 'init-image-library', 'inotify-add-watch', 'inotify-rm-watch', + 'input-pending-p', 'insert', 'insert-and-inherit', + 'insert-before-markers', 'insert-before-markers-and-inherit', + 'insert-buffer-substring', 'insert-byte', 'insert-char', + 'insert-file-contents', 'insert-startup-screen', 'int86', + 'integer-or-marker-p', 'integerp', 'interactive-form', 'intern', + 'intern-soft', 'internal--track-mouse', 'internal-char-font', + 'internal-complete-buffer', 'internal-copy-lisp-face', + 'internal-default-process-filter', + 'internal-default-process-sentinel', 'internal-describe-syntax-value', + 'internal-event-symbol-parse-modifiers', + 'internal-face-x-get-resource', 'internal-get-lisp-face-attribute', + 'internal-lisp-face-attribute-values', 'internal-lisp-face-empty-p', + 'internal-lisp-face-equal-p', 'internal-lisp-face-p', + 'internal-make-lisp-face', 'internal-make-var-non-special', + 'internal-merge-in-global-face', + 'internal-set-alternative-font-family-alist', + 'internal-set-alternative-font-registry-alist', + 'internal-set-font-selection-order', + 'internal-set-lisp-face-attribute', + 'internal-set-lisp-face-attribute-from-resource', + 'internal-show-cursor', 'internal-show-cursor-p', 'interrupt-process', + 'invisible-p', 'invocation-directory', 'invocation-name', 'isnan', + 'iso-charset', 'key-binding', 'key-description', + 'keyboard-coding-system', 'keymap-parent', 'keymap-prompt', 'keymapp', + 'keywordp', 'kill-all-local-variables', 'kill-buffer', 'kill-emacs', + 'kill-local-variable', 'kill-process', 'last-nonminibuffer-frame', + 'lax-plist-get', 'lax-plist-put', 'ldexp', 'length', + 'libxml-parse-html-region', 'libxml-parse-xml-region', + 'line-beginning-position', 'line-end-position', 'line-pixel-height', + 'list', 'list-fonts', 'list-system-processes', 'listp', 'load', + 'load-average', 'local-key-binding', 'local-variable-if-set-p', + 'local-variable-p', 'locale-info', 'locate-file-internal', + 'lock-buffer', 'log', 'logand', 'logb', 'logior', 'lognot', 'logxor', + 'looking-at', 'lookup-image', 'lookup-image-map', 'lookup-key', + 'lower-frame', 'lsh', 'macroexpand', 'make-bool-vector', + 'make-byte-code', 'make-category-set', 'make-category-table', + 'make-char', 'make-char-table', 'make-directory-internal', + 'make-frame-invisible', 'make-frame-visible', 'make-hash-table', + 'make-indirect-buffer', 'make-keymap', 'make-list', + 'make-local-variable', 'make-marker', 'make-network-process', + 'make-overlay', 'make-serial-process', 'make-sparse-keymap', + 'make-string', 'make-symbol', 'make-symbolic-link', 'make-temp-name', + 'make-terminal-frame', 'make-variable-buffer-local', + 'make-variable-frame-local', 'make-vector', 'makunbound', + 'map-char-table', 'map-charset-chars', 'map-keymap', + 'map-keymap-internal', 'mapatoms', 'mapc', 'mapcar', 'mapconcat', + 'maphash', 'mark-marker', 'marker-buffer', 'marker-insertion-type', + 'marker-position', 'markerp', 'match-beginning', 'match-data', + 'match-end', 'matching-paren', 'max', 'max-char', 'md5', 'member', + 'memory-info', 'memory-limit', 'memory-use-counts', 'memq', 'memql', + 'menu-bar-menu-at-x-y', 'menu-or-popup-active-p', + 'menu-or-popup-active-p', 'merge-face-attribute', 'message', + 'message-box', 'message-or-box', 'min', + 'minibuffer-completion-contents', 'minibuffer-contents', + 'minibuffer-contents-no-properties', 'minibuffer-depth', + 'minibuffer-prompt', 'minibuffer-prompt-end', + 'minibuffer-selected-window', 'minibuffer-window', 'minibufferp', + 'minor-mode-key-binding', 'mod', 'modify-category-entry', + 'modify-frame-parameters', 'modify-syntax-entry', + 'mouse-pixel-position', 'mouse-position', 'move-overlay', + 'move-point-visually', 'move-to-column', 'move-to-window-line', + 'msdos-downcase-filename', 'msdos-long-file-names', 'msdos-memget', + 'msdos-memput', 'msdos-mouse-disable', 'msdos-mouse-enable', + 'msdos-mouse-init', 'msdos-mouse-p', 'msdos-remember-default-colors', + 'msdos-set-keyboard', 'msdos-set-mouse-buttons', + 'multibyte-char-to-unibyte', 'multibyte-string-p', 'narrow-to-region', + 'natnump', 'nconc', 'network-interface-info', + 'network-interface-list', 'new-fontset', 'newline-cache-check', + 'next-char-property-change', 'next-frame', 'next-overlay-change', + 'next-property-change', 'next-read-file-uses-dialog-p', + 'next-single-char-property-change', 'next-single-property-change', + 'next-window', 'nlistp', 'nreverse', 'nth', 'nthcdr', 'null', + 'number-or-marker-p', 'number-to-string', 'numberp', + 'open-dribble-file', 'open-font', 'open-termscript', + 'optimize-char-table', 'other-buffer', 'other-window-for-scrolling', + 'overlay-buffer', 'overlay-end', 'overlay-get', 'overlay-lists', + 'overlay-properties', 'overlay-put', 'overlay-recenter', + 'overlay-start', 'overlayp', 'overlays-at', 'overlays-in', + 'parse-partial-sexp', 'play-sound-internal', 'plist-get', + 'plist-member', 'plist-put', 'point', 'point-marker', 'point-max', + 'point-max-marker', 'point-min', 'point-min-marker', + 'pos-visible-in-window-p', 'position-bytes', 'posix-looking-at', + 'posix-search-backward', 'posix-search-forward', 'posix-string-match', + 'posn-at-point', 'posn-at-x-y', 'preceding-char', + 'prefix-numeric-value', 'previous-char-property-change', + 'previous-frame', 'previous-overlay-change', + 'previous-property-change', 'previous-single-char-property-change', + 'previous-single-property-change', 'previous-window', 'prin1', + 'prin1-to-string', 'princ', 'print', 'process-attributes', + 'process-buffer', 'process-coding-system', 'process-command', + 'process-connection', 'process-contact', 'process-datagram-address', + 'process-exit-status', 'process-filter', 'process-filter-multibyte-p', + 'process-id', 'process-inherit-coding-system-flag', 'process-list', + 'process-mark', 'process-name', 'process-plist', + 'process-query-on-exit-flag', 'process-running-child-p', + 'process-send-eof', 'process-send-region', 'process-send-string', + 'process-sentinel', 'process-status', 'process-tty-name', + 'process-type', 'processp', 'profiler-cpu-log', + 'profiler-cpu-running-p', 'profiler-cpu-start', 'profiler-cpu-stop', + 'profiler-memory-log', 'profiler-memory-running-p', + 'profiler-memory-start', 'profiler-memory-stop', 'propertize', + 'purecopy', 'put', 'put-text-property', + 'put-unicode-property-internal', 'puthash', 'query-font', + 'query-fontset', 'quit-process', 'raise-frame', 'random', 'rassoc', + 'rassq', 're-search-backward', 're-search-forward', 'read', + 'read-buffer', 'read-char', 'read-char-exclusive', + 'read-coding-system', 'read-command', 'read-event', + 'read-from-minibuffer', 'read-from-string', 'read-function', + 'read-key-sequence', 'read-key-sequence-vector', + 'read-no-blanks-input', 'read-non-nil-coding-system', 'read-string', + 'read-variable', 'recent-auto-save-p', 'recent-doskeys', + 'recent-keys', 'recenter', 'recursion-depth', 'recursive-edit', + 'redirect-debugging-output', 'redirect-frame-focus', 'redisplay', + 'redraw-display', 'redraw-frame', 'regexp-quote', 'region-beginning', + 'region-end', 'register-ccl-program', 'register-code-conversion-map', + 'remhash', 'remove-list-of-text-properties', 'remove-text-properties', + 'rename-buffer', 'rename-file', 'replace-match', + 'reset-this-command-lengths', 'resize-mini-window-internal', + 'restore-buffer-modified-p', 'resume-tty', 'reverse', 'round', + 'run-hook-with-args', 'run-hook-with-args-until-failure', + 'run-hook-with-args-until-success', 'run-hook-wrapped', 'run-hooks', + 'run-window-configuration-change-hook', 'run-window-scroll-functions', + 'safe-length', 'scan-lists', 'scan-sexps', 'scroll-down', + 'scroll-left', 'scroll-other-window', 'scroll-right', 'scroll-up', + 'search-backward', 'search-forward', 'secure-hash', 'select-frame', + 'select-window', 'selected-frame', 'selected-window', + 'self-insert-command', 'send-string-to-terminal', 'sequencep', + 'serial-process-configure', 'set', 'set-buffer', + 'set-buffer-auto-saved', 'set-buffer-major-mode', + 'set-buffer-modified-p', 'set-buffer-multibyte', 'set-case-table', + 'set-category-table', 'set-char-table-extra-slot', + 'set-char-table-parent', 'set-char-table-range', 'set-charset-plist', + 'set-charset-priority', 'set-coding-system-priority', + 'set-cursor-size', 'set-default', 'set-default-file-modes', + 'set-default-toplevel-value', 'set-file-acl', 'set-file-modes', + 'set-file-selinux-context', 'set-file-times', 'set-fontset-font', + 'set-frame-height', 'set-frame-position', 'set-frame-selected-window', + 'set-frame-size', 'set-frame-width', 'set-fringe-bitmap-face', + 'set-input-interrupt-mode', 'set-input-meta-mode', 'set-input-mode', + 'set-keyboard-coding-system-internal', 'set-keymap-parent', + 'set-marker', 'set-marker-insertion-type', 'set-match-data', + 'set-message-beep', 'set-minibuffer-window', + 'set-mouse-pixel-position', 'set-mouse-position', + 'set-network-process-option', 'set-output-flow-control', + 'set-process-buffer', 'set-process-coding-system', + 'set-process-datagram-address', 'set-process-filter', + 'set-process-filter-multibyte', + 'set-process-inherit-coding-system-flag', 'set-process-plist', + 'set-process-query-on-exit-flag', 'set-process-sentinel', + 'set-process-window-size', 'set-quit-char', + 'set-safe-terminal-coding-system-internal', 'set-screen-color', + 'set-standard-case-table', 'set-syntax-table', + 'set-terminal-coding-system-internal', 'set-terminal-local-value', + 'set-terminal-parameter', 'set-text-properties', 'set-time-zone-rule', + 'set-visited-file-modtime', 'set-window-buffer', + 'set-window-combination-limit', 'set-window-configuration', + 'set-window-dedicated-p', 'set-window-display-table', + 'set-window-fringes', 'set-window-hscroll', 'set-window-margins', + 'set-window-new-normal', 'set-window-new-pixel', + 'set-window-new-total', 'set-window-next-buffers', + 'set-window-parameter', 'set-window-point', 'set-window-prev-buffers', + 'set-window-redisplay-end-trigger', 'set-window-scroll-bars', + 'set-window-start', 'set-window-vscroll', 'setcar', 'setcdr', + 'setplist', 'show-face-resources', 'signal', 'signal-process', 'sin', + 'single-key-description', 'skip-chars-backward', 'skip-chars-forward', + 'skip-syntax-backward', 'skip-syntax-forward', 'sleep-for', 'sort', + 'sort-charsets', 'special-variable-p', 'split-char', + 'split-window-internal', 'sqrt', 'standard-case-table', + 'standard-category-table', 'standard-syntax-table', 'start-kbd-macro', + 'start-process', 'stop-process', 'store-kbd-macro-event', 'string', + 'string=', 'string<', 'string>', 'string-as-multibyte', + 'string-as-unibyte', 'string-bytes', 'string-collate-equalp', + 'string-collate-lessp', 'string-equal', 'string-greaterp', + 'string-lessp', 'string-make-multibyte', 'string-make-unibyte', + 'string-match', 'string-to-char', 'string-to-multibyte', + 'string-to-number', 'string-to-syntax', 'string-to-unibyte', + 'string-width', 'stringp', 'subr-name', 'subrp', + 'subst-char-in-region', 'substitute-command-keys', + 'substitute-in-file-name', 'substring', 'substring-no-properties', + 'suspend-emacs', 'suspend-tty', 'suspicious-object', 'sxhash', + 'symbol-function', 'symbol-name', 'symbol-plist', 'symbol-value', + 'symbolp', 'syntax-table', 'syntax-table-p', 'system-groups', + 'system-move-file-to-trash', 'system-name', 'system-users', 'tan', + 'terminal-coding-system', 'terminal-list', 'terminal-live-p', + 'terminal-local-value', 'terminal-name', 'terminal-parameter', + 'terminal-parameters', 'terpri', 'test-completion', + 'text-char-description', 'text-properties-at', 'text-property-any', + 'text-property-not-all', 'this-command-keys', + 'this-command-keys-vector', 'this-single-command-keys', + 'this-single-command-raw-keys', 'time-add', 'time-less-p', + 'time-subtract', 'tool-bar-get-system-style', 'tool-bar-height', + 'tool-bar-pixel-width', 'top-level', 'trace-redisplay', + 'trace-to-stderr', 'translate-region-internal', 'transpose-regions', + 'truncate', 'try-completion', 'tty-display-color-cells', + 'tty-display-color-p', 'tty-no-underline', + 'tty-suppress-bold-inverse-default-colors', 'tty-top-frame', + 'tty-type', 'type-of', 'undo-boundary', 'unencodable-char-position', + 'unhandled-file-name-directory', 'unibyte-char-to-multibyte', + 'unibyte-string', 'unicode-property-table-internal', 'unify-charset', + 'unintern', 'unix-sync', 'unlock-buffer', 'upcase', 'upcase-initials', + 'upcase-initials-region', 'upcase-region', 'upcase-word', + 'use-global-map', 'use-local-map', 'user-full-name', + 'user-login-name', 'user-real-login-name', 'user-real-uid', + 'user-uid', 'variable-binding-locus', 'vconcat', 'vector', + 'vector-or-char-table-p', 'vectorp', 'verify-visited-file-modtime', + 'vertical-motion', 'visible-frame-list', 'visited-file-modtime', + 'w16-get-clipboard-data', 'w16-selection-exists-p', + 'w16-set-clipboard-data', 'w32-battery-status', + 'w32-default-color-map', 'w32-define-rgb-color', + 'w32-display-monitor-attributes-list', 'w32-frame-menu-bar-size', + 'w32-frame-rect', 'w32-get-clipboard-data', + 'w32-get-codepage-charset', 'w32-get-console-codepage', + 'w32-get-console-output-codepage', 'w32-get-current-locale-id', + 'w32-get-default-locale-id', 'w32-get-keyboard-layout', + 'w32-get-locale-info', 'w32-get-valid-codepages', + 'w32-get-valid-keyboard-layouts', 'w32-get-valid-locale-ids', + 'w32-has-winsock', 'w32-long-file-name', 'w32-reconstruct-hot-key', + 'w32-register-hot-key', 'w32-registered-hot-keys', + 'w32-selection-exists-p', 'w32-send-sys-command', + 'w32-set-clipboard-data', 'w32-set-console-codepage', + 'w32-set-console-output-codepage', 'w32-set-current-locale', + 'w32-set-keyboard-layout', 'w32-set-process-priority', + 'w32-shell-execute', 'w32-short-file-name', 'w32-toggle-lock-key', + 'w32-unload-winsock', 'w32-unregister-hot-key', 'w32-window-exists-p', + 'w32notify-add-watch', 'w32notify-rm-watch', + 'waiting-for-user-input-p', 'where-is-internal', 'widen', + 'widget-apply', 'widget-get', 'widget-put', + 'window-absolute-pixel-edges', 'window-at', 'window-body-height', + 'window-body-width', 'window-bottom-divider-width', 'window-buffer', + 'window-combination-limit', 'window-configuration-frame', + 'window-configuration-p', 'window-dedicated-p', + 'window-display-table', 'window-edges', 'window-end', 'window-frame', + 'window-fringes', 'window-header-line-height', 'window-hscroll', + 'window-inside-absolute-pixel-edges', 'window-inside-edges', + 'window-inside-pixel-edges', 'window-left-child', + 'window-left-column', 'window-line-height', 'window-list', + 'window-list-1', 'window-live-p', 'window-margins', + 'window-minibuffer-p', 'window-mode-line-height', 'window-new-normal', + 'window-new-pixel', 'window-new-total', 'window-next-buffers', + 'window-next-sibling', 'window-normal-size', 'window-old-point', + 'window-parameter', 'window-parameters', 'window-parent', + 'window-pixel-edges', 'window-pixel-height', 'window-pixel-left', + 'window-pixel-top', 'window-pixel-width', 'window-point', + 'window-prev-buffers', 'window-prev-sibling', + 'window-redisplay-end-trigger', 'window-resize-apply', + 'window-resize-apply-total', 'window-right-divider-width', + 'window-scroll-bar-height', 'window-scroll-bar-width', + 'window-scroll-bars', 'window-start', 'window-system', + 'window-text-height', 'window-text-pixel-size', 'window-text-width', + 'window-top-child', 'window-top-line', 'window-total-height', + 'window-total-width', 'window-use-time', 'window-valid-p', + 'window-vscroll', 'windowp', 'write-char', 'write-region', + 'x-backspace-delete-keys-p', 'x-change-window-property', + 'x-change-window-property', 'x-close-connection', + 'x-close-connection', 'x-create-frame', 'x-create-frame', + 'x-delete-window-property', 'x-delete-window-property', + 'x-disown-selection-internal', 'x-display-backing-store', + 'x-display-backing-store', 'x-display-color-cells', + 'x-display-color-cells', 'x-display-grayscale-p', + 'x-display-grayscale-p', 'x-display-list', 'x-display-list', + 'x-display-mm-height', 'x-display-mm-height', 'x-display-mm-width', + 'x-display-mm-width', 'x-display-monitor-attributes-list', + 'x-display-pixel-height', 'x-display-pixel-height', + 'x-display-pixel-width', 'x-display-pixel-width', 'x-display-planes', + 'x-display-planes', 'x-display-save-under', 'x-display-save-under', + 'x-display-screens', 'x-display-screens', 'x-display-visual-class', + 'x-display-visual-class', 'x-family-fonts', 'x-file-dialog', + 'x-file-dialog', 'x-file-dialog', 'x-focus-frame', 'x-frame-geometry', + 'x-frame-geometry', 'x-get-atom-name', 'x-get-resource', + 'x-get-selection-internal', 'x-hide-tip', 'x-hide-tip', + 'x-list-fonts', 'x-load-color-file', 'x-menu-bar-open-internal', + 'x-menu-bar-open-internal', 'x-open-connection', 'x-open-connection', + 'x-own-selection-internal', 'x-parse-geometry', 'x-popup-dialog', + 'x-popup-menu', 'x-register-dnd-atom', 'x-select-font', + 'x-select-font', 'x-selection-exists-p', 'x-selection-owner-p', + 'x-send-client-message', 'x-server-max-request-size', + 'x-server-max-request-size', 'x-server-vendor', 'x-server-vendor', + 'x-server-version', 'x-server-version', 'x-show-tip', 'x-show-tip', + 'x-synchronize', 'x-synchronize', 'x-uses-old-gtk-dialog', + 'x-window-property', 'x-window-property', 'x-wm-set-size-hint', + 'xw-color-defined-p', 'xw-color-defined-p', 'xw-color-values', + 'xw-color-values', 'xw-display-color-p', 'xw-display-color-p', + 'yes-or-no-p', 'zlib-available-p', 'zlib-decompress-region', + 'forward-point', + } + + builtin_function_highlighted = { + 'defvaralias', 'provide', 'require', + 'with-no-warnings', 'define-widget', 'with-electric-help', + 'throw', 'defalias', 'featurep' + } + + lambda_list_keywords = { + '&allow-other-keys', '&aux', '&body', '&environment', '&key', '&optional', + '&rest', '&whole', + } + + error_keywords = { + 'cl-assert', 'cl-check-type', 'error', 'signal', + 'user-error', 'warn', + } + + def get_tokens_unprocessed(self, text): + stack = ['root'] + for index, token, value in RegexLexer.get_tokens_unprocessed(self, text, stack): + if token is Name.Variable: + if value in EmacsLispLexer.builtin_function: + yield index, Name.Function, value + continue + if value in EmacsLispLexer.special_forms: + yield index, Keyword, value + continue + if value in EmacsLispLexer.error_keywords: + yield index, Name.Exception, value + continue + if value in EmacsLispLexer.builtin_function_highlighted: + yield index, Name.Builtin, value + continue + if value in EmacsLispLexer.macros: + yield index, Name.Builtin, value + continue + if value in EmacsLispLexer.lambda_list_keywords: + yield index, Keyword.Pseudo, value + continue + yield index, token, value + + tokens = { + 'root': [ + default('body'), + ], + 'body': [ + # whitespace + (r'\s+', Whitespace), + + # single-line comment + (r';.*$', Comment.Single), + + # strings and characters + (r'"', String, 'string'), + (r'\?([^\\]|\\.)', String.Char), + # quoting + (r":" + symbol, Name.Builtin), + (r"::" + symbol, String.Symbol), + (r"'" + symbol, String.Symbol), + (r"'", Operator), + (r"`", Operator), + + # decimal numbers + (r'[-+]?\d+\.?' + terminated, Number.Integer), + (r'[-+]?\d+/\d+' + terminated, Number), + (r'[-+]?(\d*\.\d+([defls][-+]?\d+)?|\d+(\.\d*)?[defls][-+]?\d+)' + + terminated, Number.Float), + + # vectors + (r'\[|\]', Punctuation), + + # uninterned symbol + (r'#:' + symbol, String.Symbol), + + # read syntax for char tables + (r'#\^\^?', Operator), + + # function shorthand + (r'#\'', Name.Function), + + # binary rational + (r'#[bB][+-]?[01]+(/[01]+)?', Number.Bin), + + # octal rational + (r'#[oO][+-]?[0-7]+(/[0-7]+)?', Number.Oct), + + # hex rational + (r'#[xX][+-]?[0-9a-fA-F]+(/[0-9a-fA-F]+)?', Number.Hex), + + # radix rational + (r'#\d+r[+-]?[0-9a-zA-Z]+(/[0-9a-zA-Z]+)?', Number), + + # reference + (r'#\d+=', Operator), + (r'#\d+#', Operator), + + # special operators that should have been parsed already + (r'(,@|,|\.|:)', Operator), + + # special constants + (r'(t|nil)' + terminated, Name.Constant), + + # functions and variables + (r'\*' + symbol + r'\*', Name.Variable.Global), + (symbol, Name.Variable), + + # parentheses + (r'#\(', Operator, 'body'), + (r'\(', Punctuation, 'body'), + (r'\)', Punctuation, '#pop'), + ], + 'string': [ + (r'[^"\\`]+', String), + (rf'`{symbol}\'', String.Symbol), + (r'`', String), + (r'\\.', String), + (r'\\\n', String), + (r'"', String, '#pop'), + ], + } + + +class ShenLexer(RegexLexer): + """ + Lexer for Shen source code. + """ + name = 'Shen' + url = 'http://shenlanguage.org/' + aliases = ['shen'] + filenames = ['*.shen'] + mimetypes = ['text/x-shen', 'application/x-shen'] + version_added = '2.1' + + DECLARATIONS = ( + 'datatype', 'define', 'defmacro', 'defprolog', 'defcc', + 'synonyms', 'declare', 'package', 'type', 'function', + ) + + SPECIAL_FORMS = ( + 'lambda', 'get', 'let', 'if', 'cases', 'cond', 'put', 'time', 'freeze', + 'value', 'load', '$', 'protect', 'or', 'and', 'not', 'do', 'output', + 'prolog?', 'trap-error', 'error', 'make-string', '/.', 'set', '@p', + '@s', '@v', + ) + + BUILTINS = ( + '==', '=', '*', '+', '-', '/', '<', '>', '>=', '<=', '<-address', + '<-vector', 'abort', 'absvector', 'absvector?', 'address->', 'adjoin', + 'append', 'arity', 'assoc', 'bind', 'boolean?', 'bound?', 'call', 'cd', + 'close', 'cn', 'compile', 'concat', 'cons', 'cons?', 'cut', 'destroy', + 'difference', 'element?', 'empty?', 'enable-type-theory', + 'error-to-string', 'eval', 'eval-kl', 'exception', 'explode', 'external', + 'fail', 'fail-if', 'file', 'findall', 'fix', 'fst', 'fwhen', 'gensym', + 'get-time', 'hash', 'hd', 'hdstr', 'hdv', 'head', 'identical', + 'implementation', 'in', 'include', 'include-all-but', 'inferences', + 'input', 'input+', 'integer?', 'intern', 'intersection', 'is', 'kill', + 'language', 'length', 'limit', 'lineread', 'loaded', 'macro', 'macroexpand', + 'map', 'mapcan', 'maxinferences', 'mode', 'n->string', 'nl', 'nth', 'null', + 'number?', 'occurrences', 'occurs-check', 'open', 'os', 'out', 'port', + 'porters', 'pos', 'pr', 'preclude', 'preclude-all-but', 'print', 'profile', + 'profile-results', 'ps', 'quit', 'read', 'read+', 'read-byte', 'read-file', + 'read-file-as-bytelist', 'read-file-as-string', 'read-from-string', + 'release', 'remove', 'return', 'reverse', 'run', 'save', 'set', + 'simple-error', 'snd', 'specialise', 'spy', 'step', 'stinput', 'stoutput', + 'str', 'string->n', 'string->symbol', 'string?', 'subst', 'symbol?', + 'systemf', 'tail', 'tc', 'tc?', 'thaw', 'tl', 'tlstr', 'tlv', 'track', + 'tuple?', 'undefmacro', 'unify', 'unify!', 'union', 'unprofile', + 'unspecialise', 'untrack', 'variable?', 'vector', 'vector->', 'vector?', + 'verified', 'version', 'warn', 'when', 'write-byte', 'write-to-file', + 'y-or-n?', + ) + + BUILTINS_ANYWHERE = ('where', 'skip', '>>', '_', '!', '', '') + + MAPPINGS = {s: Keyword for s in DECLARATIONS} + MAPPINGS.update((s, Name.Builtin) for s in BUILTINS) + MAPPINGS.update((s, Keyword) for s in SPECIAL_FORMS) + + valid_symbol_chars = r'[\w!$%*+,<=>?/.\'@&#:-]' + valid_name = f'{valid_symbol_chars}+' + symbol_name = rf'[a-z!$%*+,<=>?/.\'@&#_-]{valid_symbol_chars}*' + variable = rf'[A-Z]{valid_symbol_chars}*' + + tokens = { + 'string': [ + (r'"', String, '#pop'), + (r'c#\d{1,3};', String.Escape), + (r'~[ARS%]', String.Interpol), + (r'(?s).', String), + ], + + 'root': [ + (r'(?s)\\\*.*?\*\\', Comment.Multiline), # \* ... *\ + (r'\\\\.*', Comment.Single), # \\ ... + (r'\s+', Whitespace), + (r'_{5,}', Punctuation), + (r'={5,}', Punctuation), + (r'(;|:=|\||--?>|<--?)', Punctuation), + (r'(:-|:|\{|\})', Literal), + (r'[+-]*\d*\.\d+(e[+-]?\d+)?', Number.Float), + (r'[+-]*\d+', Number.Integer), + (r'"', String, 'string'), + (variable, Name.Variable), + (r'(true|false|<>|\[\])', Keyword.Pseudo), + (symbol_name, Literal), + (r'(\[|\]|\(|\))', Punctuation), + ], + } + + def get_tokens_unprocessed(self, text): + tokens = RegexLexer.get_tokens_unprocessed(self, text) + tokens = self._process_symbols(tokens) + tokens = self._process_declarations(tokens) + return tokens + + def _relevant(self, token): + return token not in (Text, Whitespace, Comment.Single, Comment.Multiline) + + def _process_declarations(self, tokens): + opening_paren = False + for index, token, value in tokens: + yield index, token, value + if self._relevant(token): + if opening_paren and token == Keyword and value in self.DECLARATIONS: + declaration = value + yield from self._process_declaration(declaration, tokens) + opening_paren = value == '(' and token == Punctuation + + def _process_symbols(self, tokens): + opening_paren = False + for index, token, value in tokens: + if opening_paren and token in (Literal, Name.Variable): + token = self.MAPPINGS.get(value, Name.Function) + elif token == Literal and value in self.BUILTINS_ANYWHERE: + token = Name.Builtin + opening_paren = value == '(' and token == Punctuation + yield index, token, value + + def _process_declaration(self, declaration, tokens): + for index, token, value in tokens: + if self._relevant(token): + break + yield index, token, value + + if declaration == 'datatype': + prev_was_colon = False + token = Keyword.Type if token == Literal else token + yield index, token, value + for index, token, value in tokens: + if prev_was_colon and token == Literal: + token = Keyword.Type + yield index, token, value + if self._relevant(token): + prev_was_colon = token == Literal and value == ':' + elif declaration == 'package': + token = Name.Namespace if token == Literal else token + yield index, token, value + elif declaration == 'define': + token = Name.Function if token == Literal else token + yield index, token, value + for index, token, value in tokens: + if self._relevant(token): + break + yield index, token, value + if value == '{' and token == Literal: + yield index, Punctuation, value + for index, token, value in self._process_signature(tokens): + yield index, token, value + else: + yield index, token, value + else: + token = Name.Function if token == Literal else token + yield index, token, value + + return + + def _process_signature(self, tokens): + for index, token, value in tokens: + if token == Literal and value == '}': + yield index, Punctuation, value + return + elif token in (Literal, Name.Function): + token = Name.Variable if value.istitle() else Keyword.Type + yield index, token, value + + +class CPSALexer(RegexLexer): + """ + A CPSA lexer based on the CPSA language as of version 2.2.12 + """ + name = 'CPSA' + aliases = ['cpsa'] + filenames = ['*.cpsa'] + mimetypes = [] + url = 'https://web.cs.wpi.edu/~guttman/cs564/cpsauser.html' + version_added = '2.1' + + # list of known keywords and builtins taken form vim 6.4 scheme.vim + # syntax file. + _keywords = ( + 'herald', 'vars', 'defmacro', 'include', 'defprotocol', 'defrole', + 'defskeleton', 'defstrand', 'deflistener', 'non-orig', 'uniq-orig', + 'pen-non-orig', 'precedes', 'trace', 'send', 'recv', 'name', 'text', + 'skey', 'akey', 'data', 'mesg', + ) + _builtins = ( + 'cat', 'enc', 'hash', 'privk', 'pubk', 'invk', 'ltk', 'gen', 'exp', + ) + + # valid names for identifiers + # well, names can only not consist fully of numbers + # but this should be good enough for now + valid_name = r'[\w!$%&*+,/:<=>?@^~|-]+' + + tokens = { + 'root': [ + # the comments - always starting with semicolon + # and going to the end of the line + (r';.*$', Comment.Single), + + # whitespaces - usually not relevant + (r'\s+', Whitespace), + + # numbers + (r'-?\d+\.\d+', Number.Float), + (r'-?\d+', Number.Integer), + # support for uncommon kinds of numbers - + # have to figure out what the characters mean + # (r'(#e|#i|#b|#o|#d|#x)[\d.]+', Number), + + # strings, symbols and characters + (r'"(\\\\|\\[^\\]|[^"\\])*"', String), + (r"'" + valid_name, String.Symbol), + (r"#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)", String.Char), + + # constants + (r'(#t|#f)', Name.Constant), + + # special operators + (r"('|#|`|,@|,|\.)", Operator), + + # highlight the keywords + (words(_keywords, suffix=r'\b'), Keyword), + + # first variable in a quoted string like + # '(this is syntactic sugar) + (r"(?<='\()" + valid_name, Name.Variable), + (r"(?<=#\()" + valid_name, Name.Variable), + + # highlight the builtins + (words(_builtins, prefix=r'(?<=\()', suffix=r'\b'), Name.Builtin), + + # the remaining functions + (r'(?<=\()' + valid_name, Name.Function), + # find the remaining variables + (valid_name, Name.Variable), + + # the famous parentheses! + (r'(\(|\))', Punctuation), + (r'(\[|\])', Punctuation), + ], + } + + +class XtlangLexer(RegexLexer): + """An xtlang lexer for the Extempore programming environment. + + This is a mixture of Scheme and xtlang, really. Keyword lists are + taken from the Extempore Emacs mode + (https://github.com/extemporelang/extempore-emacs-mode) + """ + name = 'xtlang' + url = 'http://extempore.moso.com.au' + aliases = ['extempore'] + filenames = ['*.xtm'] + mimetypes = [] + version_added = '2.2' + + common_keywords = ( + 'lambda', 'define', 'if', 'else', 'cond', 'and', + 'or', 'let', 'begin', 'set!', 'map', 'for-each', + ) + scheme_keywords = ( + 'do', 'delay', 'quasiquote', 'unquote', 'unquote-splicing', 'eval', + 'case', 'let*', 'letrec', 'quote', + ) + xtlang_bind_keywords = ( + 'bind-func', 'bind-val', 'bind-lib', 'bind-type', 'bind-alias', + 'bind-poly', 'bind-dylib', 'bind-lib-func', 'bind-lib-val', + ) + xtlang_keywords = ( + 'letz', 'memzone', 'cast', 'convert', 'dotimes', 'doloop', + ) + common_functions = ( + '*', '+', '-', '/', '<', '<=', '=', '>', '>=', '%', 'abs', 'acos', + 'angle', 'append', 'apply', 'asin', 'assoc', 'assq', 'assv', + 'atan', 'boolean?', 'caaaar', 'caaadr', 'caaar', 'caadar', + 'caaddr', 'caadr', 'caar', 'cadaar', 'cadadr', 'cadar', + 'caddar', 'cadddr', 'caddr', 'cadr', 'car', 'cdaaar', + 'cdaadr', 'cdaar', 'cdadar', 'cdaddr', 'cdadr', 'cdar', + 'cddaar', 'cddadr', 'cddar', 'cdddar', 'cddddr', 'cdddr', + 'cddr', 'cdr', 'ceiling', 'cons', 'cos', 'floor', 'length', + 'list', 'log', 'max', 'member', 'min', 'modulo', 'not', + 'reverse', 'round', 'sin', 'sqrt', 'substring', 'tan', + 'println', 'random', 'null?', 'callback', 'now', + ) + scheme_functions = ( + 'call-with-current-continuation', 'call-with-input-file', + 'call-with-output-file', 'call-with-values', 'call/cc', + 'char->integer', 'char-alphabetic?', 'char-ci<=?', 'char-ci=?', 'char-ci>?', 'char-downcase', + 'char-lower-case?', 'char-numeric?', 'char-ready?', + 'char-upcase', 'char-upper-case?', 'char-whitespace?', + 'char<=?', 'char=?', 'char>?', 'char?', + 'close-input-port', 'close-output-port', 'complex?', + 'current-input-port', 'current-output-port', 'denominator', + 'display', 'dynamic-wind', 'eof-object?', 'eq?', 'equal?', + 'eqv?', 'even?', 'exact->inexact', 'exact?', 'exp', 'expt', + 'force', 'gcd', 'imag-part', 'inexact->exact', 'inexact?', + 'input-port?', 'integer->char', 'integer?', + 'interaction-environment', 'lcm', 'list->string', + 'list->vector', 'list-ref', 'list-tail', 'list?', 'load', + 'magnitude', 'make-polar', 'make-rectangular', 'make-string', + 'make-vector', 'memq', 'memv', 'negative?', 'newline', + 'null-environment', 'number->string', 'number?', + 'numerator', 'odd?', 'open-input-file', 'open-output-file', + 'output-port?', 'pair?', 'peek-char', 'port?', 'positive?', + 'procedure?', 'quotient', 'rational?', 'rationalize', 'read', + 'read-char', 'real-part', 'real?', + 'remainder', 'scheme-report-environment', 'set-car!', 'set-cdr!', + 'string', 'string->list', 'string->number', 'string->symbol', + 'string-append', 'string-ci<=?', 'string-ci=?', 'string-ci>?', 'string-copy', 'string-fill!', + 'string-length', 'string-ref', 'string-set!', 'string<=?', + 'string=?', 'string>?', 'string?', + 'symbol->string', 'symbol?', 'transcript-off', 'transcript-on', + 'truncate', 'values', 'vector', 'vector->list', 'vector-fill!', + 'vector-length', 'vector?', + 'with-input-from-file', 'with-output-to-file', 'write', + 'write-char', 'zero?', + ) + xtlang_functions = ( + 'toString', 'afill!', 'pfill!', 'tfill!', 'tbind', 'vfill!', + 'array-fill!', 'pointer-fill!', 'tuple-fill!', 'vector-fill!', 'free', + 'array', 'tuple', 'list', '~', 'cset!', 'cref', '&', 'bor', + 'ang-names', '<<', '>>', 'nil', 'printf', 'sprintf', 'null', 'now', + 'pset!', 'pref-ptr', 'vset!', 'vref', 'aset!', 'aref', 'aref-ptr', + 'tset!', 'tref', 'tref-ptr', 'salloc', 'halloc', 'zalloc', 'alloc', + 'schedule', 'exp', 'log', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', + 'sqrt', 'expt', 'floor', 'ceiling', 'truncate', 'round', + 'llvm_printf', 'push_zone', 'pop_zone', 'memzone', 'callback', + 'llvm_sprintf', 'make-array', 'array-set!', 'array-ref', + 'array-ref-ptr', 'pointer-set!', 'pointer-ref', 'pointer-ref-ptr', + 'stack-alloc', 'heap-alloc', 'zone-alloc', 'make-tuple', 'tuple-set!', + 'tuple-ref', 'tuple-ref-ptr', 'closure-set!', 'closure-ref', 'pref', + 'pdref', 'impc_null', 'bitcast', 'void', 'ifret', 'ret->', 'clrun->', + 'make-env-zone', 'make-env', '<>', 'dtof', 'ftod', 'i1tof', + 'i1tod', 'i1toi8', 'i1toi32', 'i1toi64', 'i8tof', 'i8tod', + 'i8toi1', 'i8toi32', 'i8toi64', 'i32tof', 'i32tod', 'i32toi1', + 'i32toi8', 'i32toi64', 'i64tof', 'i64tod', 'i64toi1', + 'i64toi8', 'i64toi32', + ) + + # valid names for Scheme identifiers (names cannot consist fully + # of numbers, but this should be good enough for now) + valid_scheme_name = r'[\w!$%&*+,/:<=>?@^~|-]+' + + # valid characters in xtlang names & types + valid_xtlang_name = r'[\w.!-]+' + valid_xtlang_type = r'[]{}[\w<>,*/|!-]+' + + tokens = { + # keep track of when we're exiting the xtlang form + 'xtlang': [ + (r'\(', Punctuation, '#push'), + (r'\)', Punctuation, '#pop'), + + (r'(?<=bind-func\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-val\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-type\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-alias\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-poly\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-lib\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-dylib\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-lib-func\s)' + valid_xtlang_name, Name.Function), + (r'(?<=bind-lib-val\s)' + valid_xtlang_name, Name.Function), + + # type annotations + (r':' + valid_xtlang_type, Keyword.Type), + + # types + (r'(<' + valid_xtlang_type + r'>|\|' + valid_xtlang_type + r'\||/' + + valid_xtlang_type + r'/|' + valid_xtlang_type + r'\*)\**', + Keyword.Type), + + # keywords + (words(xtlang_keywords, prefix=r'(?<=\()'), Keyword), + + # builtins + (words(xtlang_functions, prefix=r'(?<=\()'), Name.Function), + + include('common'), + + # variables + (valid_xtlang_name, Name.Variable), + ], + 'scheme': [ + # quoted symbols + (r"'" + valid_scheme_name, String.Symbol), + + # char literals + (r"#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)", String.Char), + + # special operators + (r"('|#|`|,@|,|\.)", Operator), + + # keywords + (words(scheme_keywords, prefix=r'(?<=\()'), Keyword), + + # builtins + (words(scheme_functions, prefix=r'(?<=\()'), Name.Function), + + include('common'), + + # variables + (valid_scheme_name, Name.Variable), + ], + # common to both xtlang and Scheme + 'common': [ + # comments + (r';.*$', Comment.Single), + + # whitespaces - usually not relevant + (r'\s+', Whitespace), + + # numbers + (r'-?\d+\.\d+', Number.Float), + (r'-?\d+', Number.Integer), + + # binary/oct/hex literals + (r'(#b|#o|#x)[\d.]+', Number), + + # strings + (r'"(\\\\|\\[^\\]|[^"\\])*"', String), + + # true/false constants + (r'(#t|#f)', Name.Constant), + + # keywords + (words(common_keywords, prefix=r'(?<=\()'), Keyword), + + # builtins + (words(common_functions, prefix=r'(?<=\()'), Name.Function), + + # the famous parentheses! + (r'(\(|\))', Punctuation), + ], + 'root': [ + # go into xtlang mode + (words(xtlang_bind_keywords, prefix=r'(?<=\()', suffix=r'\b'), + Keyword, 'xtlang'), + + include('scheme') + ], + } + + +class FennelLexer(RegexLexer): + """A lexer for the Fennel programming language. + + Fennel compiles to Lua, so all the Lua builtins are recognized as well + as the special forms that are particular to the Fennel compiler. + """ + name = 'Fennel' + url = 'https://fennel-lang.org' + aliases = ['fennel', 'fnl'] + filenames = ['*.fnl'] + version_added = '2.3' + + # this list is current as of Fennel version 0.10.0. + special_forms = ( + '#', '%', '*', '+', '-', '->', '->>', '-?>', '-?>>', '.', '..', + '/', '//', ':', '<', '<=', '=', '>', '>=', '?.', '^', 'accumulate', + 'and', 'band', 'bnot', 'bor', 'bxor', 'collect', 'comment', 'do', 'doc', + 'doto', 'each', 'eval-compiler', 'for', 'hashfn', 'icollect', 'if', + 'import-macros', 'include', 'length', 'let', 'lshift', 'lua', + 'macrodebug', 'match', 'not', 'not=', 'or', 'partial', 'pick-args', + 'pick-values', 'quote', 'require-macros', 'rshift', 'set', + 'set-forcibly!', 'tset', 'values', 'when', 'while', 'with-open', '~=' + ) + + declarations = ( + 'fn', 'global', 'lambda', 'local', 'macro', 'macros', 'var', 'λ' + ) + + builtins = ( + '_G', '_VERSION', 'arg', 'assert', 'bit32', 'collectgarbage', + 'coroutine', 'debug', 'dofile', 'error', 'getfenv', + 'getmetatable', 'io', 'ipairs', 'load', 'loadfile', 'loadstring', + 'math', 'next', 'os', 'package', 'pairs', 'pcall', 'print', + 'rawequal', 'rawget', 'rawlen', 'rawset', 'require', 'select', + 'setfenv', 'setmetatable', 'string', 'table', 'tonumber', + 'tostring', 'type', 'unpack', 'xpcall' + ) + + # based on the scheme definition, but disallowing leading digits and + # commas, and @ is not allowed. + valid_name = r'[a-zA-Z_!$%&*+/:<=>?^~|-][\w!$%&*+/:<=>?^~|\.-]*' + + tokens = { + 'root': [ + # the only comment form is a semicolon; goes to the end of the line + (r';.*$', Comment.Single), + + (r',+', Text), + (r'\s+', Whitespace), + (r'-?\d+\.\d+', Number.Float), + (r'-?\d+', Number.Integer), + + (r'"(\\\\|\\[^\\]|[^"\\])*"', String), + + (r'(true|false|nil)', Name.Constant), + + # these are technically strings, but it's worth visually + # distinguishing them because their intent is different + # from regular strings. + (r':' + valid_name, String.Symbol), + + # special forms are keywords + (words(special_forms, suffix=' '), Keyword), + # these are ... even more special! + (words(declarations, suffix=' '), Keyword.Declaration), + # lua standard library are builtins + (words(builtins, suffix=' '), Name.Builtin), + # special-case the vararg symbol + (r'\.\.\.', Name.Variable), + # regular identifiers + (valid_name, Name.Variable), + + # all your normal paired delimiters for your programming enjoyment + (r'(\(|\))', Punctuation), + (r'(\[|\])', Punctuation), + (r'(\{|\})', Punctuation), + + # the # symbol is shorthand for a lambda function + (r'#', Punctuation), + ] + } + + +class JanetLexer(RegexLexer): + """A lexer for the Janet programming language. + """ + name = 'Janet' + url = 'https://janet-lang.org/' + aliases = ['janet'] + filenames = ['*.janet', '*.jdn'] + mimetypes = ['text/x-janet', 'application/x-janet'] + version_added = '2.18' + + # XXX: gets too slow + #flags = re.MULTILINE | re.VERBOSE + + special_forms = ( + 'break', 'def', 'do', 'fn', 'if', 'quote', 'quasiquote', 'splice', + 'set', 'unquote', 'upscope', 'var', 'while' + ) + + builtin_macros = ( + '%=', '*=', '++', '+=', '--', '-=', '->', '->>', '-?>', + '-?>>', '/=', 'and', 'as->', 'as-macro', 'as?->', + 'assert', 'case', 'catseq', 'chr', 'comment', 'compif', + 'comptime', 'compwhen', 'cond', 'coro', 'def-', + 'default', 'defdyn', 'defer', 'defmacro', 'defmacro-', + 'defn', 'defn-', 'delay', 'doc', 'each', 'eachk', + 'eachp', 'edefer', 'ev/do-thread', 'ev/gather', + 'ev/spawn', 'ev/spawn-thread', 'ev/with-deadline', + 'ffi/defbind', 'fiber-fn', 'for', 'forever', 'forv', + 'generate', 'if-let', 'if-not', 'if-with', 'import', + 'juxt', 'label', 'let', 'loop', 'match', 'or', 'prompt', + 'protect', 'repeat', 'seq', 'short-fn', 'tabseq', + 'toggle', 'tracev', 'try', 'unless', 'use', 'var-', + 'varfn', 'when', 'when-let', 'when-with', 'with', + 'with-dyns', 'with-syms', 'with-vars', + # obsolete builtin macros + 'eachy' + ) + + builtin_functions = ( + '%', '*', '+', '-', '/', '<', '<=', '=', '>', '>=', + 'abstract?', 'accumulate', 'accumulate2', 'all', + 'all-bindings', 'all-dynamics', 'any?', 'apply', + 'array', 'array/clear', 'array/concat', 'array/ensure', + 'array/fill', 'array/insert', 'array/new', + 'array/new-filled', 'array/peek', 'array/pop', + 'array/push', 'array/remove', 'array/slice', + 'array/trim', 'array/weak', 'array?', 'asm', + 'bad-compile', 'bad-parse', 'band', 'blshift', 'bnot', + 'boolean?', 'bor', 'brshift', 'brushift', 'buffer', + 'buffer/bit', 'buffer/bit-clear', 'buffer/bit-set', + 'buffer/bit-toggle', 'buffer/blit', 'buffer/clear', + 'buffer/fill', 'buffer/format', 'buffer/from-bytes', + 'buffer/new', 'buffer/new-filled', 'buffer/popn', + 'buffer/push', 'buffer/push-at', 'buffer/push-byte', + 'buffer/push-string', 'buffer/push-word', + 'buffer/slice', 'buffer/trim', 'buffer?', 'bxor', + 'bytes?', 'cancel', 'cfunction?', 'cli-main', 'cmp', + 'comp', 'compare', 'compare<', 'compare<=', 'compare=', + 'compare>', 'compare>=', 'compile', 'complement', + 'count', 'curenv', 'debug', 'debug/arg-stack', + 'debug/break', 'debug/fbreak', 'debug/lineage', + 'debug/stack', 'debug/stacktrace', 'debug/step', + 'debug/unbreak', 'debug/unfbreak', 'debugger', + 'debugger-on-status', 'dec', 'deep-not=', 'deep=', + 'defglobal', 'describe', 'dictionary?', 'disasm', + 'distinct', 'div', 'doc*', 'doc-format', 'doc-of', + 'dofile', 'drop', 'drop-until', 'drop-while', 'dyn', + 'eflush', 'empty?', 'env-lookup', 'eprin', 'eprinf', + 'eprint', 'eprintf', 'error', 'errorf', + 'ev/acquire-lock', 'ev/acquire-rlock', + 'ev/acquire-wlock', 'ev/all-tasks', 'ev/call', + 'ev/cancel', 'ev/capacity', 'ev/chan', 'ev/chan-close', + 'ev/chunk', 'ev/close', 'ev/count', 'ev/deadline', + 'ev/full', 'ev/give', 'ev/give-supervisor', 'ev/go', + 'ev/lock', 'ev/read', 'ev/release-lock', + 'ev/release-rlock', 'ev/release-wlock', 'ev/rselect', + 'ev/rwlock', 'ev/select', 'ev/sleep', 'ev/take', + 'ev/thread', 'ev/thread-chan', 'ev/write', 'eval', + 'eval-string', 'even?', 'every?', 'extreme', 'false?', + 'ffi/align', 'ffi/call', 'ffi/calling-conventions', + 'ffi/close', 'ffi/context', 'ffi/free', 'ffi/jitfn', + 'ffi/lookup', 'ffi/malloc', 'ffi/native', + 'ffi/pointer-buffer', 'ffi/pointer-cfunction', + 'ffi/read', 'ffi/signature', 'ffi/size', 'ffi/struct', + 'ffi/trampoline', 'ffi/write', 'fiber/can-resume?', + 'fiber/current', 'fiber/getenv', 'fiber/last-value', + 'fiber/maxstack', 'fiber/new', 'fiber/root', + 'fiber/setenv', 'fiber/setmaxstack', 'fiber/status', + 'fiber?', 'file/close', 'file/flush', 'file/lines', + 'file/open', 'file/read', 'file/seek', 'file/tell', + 'file/temp', 'file/write', 'filter', 'find', + 'find-index', 'first', 'flatten', 'flatten-into', + 'flush', 'flycheck', 'freeze', 'frequencies', + 'from-pairs', 'function?', 'gccollect', 'gcinterval', + 'gcsetinterval', 'gensym', 'get', 'get-in', 'getline', + 'getproto', 'group-by', 'has-key?', 'has-value?', + 'hash', 'idempotent?', 'identity', 'import*', 'in', + 'inc', 'index-of', 'indexed?', 'int/s64', + 'int/to-bytes', 'int/to-number', 'int/u64', 'int?', + 'interleave', 'interpose', 'invert', 'juxt*', 'keep', + 'keep-syntax', 'keep-syntax!', 'keys', 'keyword', + 'keyword/slice', 'keyword?', 'kvs', 'last', 'length', + 'lengthable?', 'load-image', 'macex', 'macex1', + 'maclintf', 'make-env', 'make-image', 'map', 'mapcat', + 'marshal', 'math/abs', 'math/acos', 'math/acosh', + 'math/asin', 'math/asinh', 'math/atan', 'math/atan2', + 'math/atanh', 'math/cbrt', 'math/ceil', 'math/cos', + 'math/cosh', 'math/erf', 'math/erfc', 'math/exp', + 'math/exp2', 'math/expm1', 'math/floor', 'math/gamma', + 'math/gcd', 'math/hypot', 'math/lcm', 'math/log', + 'math/log-gamma', 'math/log10', 'math/log1p', + 'math/log2', 'math/next', 'math/pow', 'math/random', + 'math/rng', 'math/rng-buffer', 'math/rng-int', + 'math/rng-uniform', 'math/round', 'math/seedrandom', + 'math/sin', 'math/sinh', 'math/sqrt', 'math/tan', + 'math/tanh', 'math/trunc', 'max', 'max-of', 'mean', + 'memcmp', 'merge', 'merge-into', 'merge-module', 'min', + 'min-of', 'mod', 'module/add-paths', + 'module/expand-path', 'module/find', 'module/value', + 'nan?', 'nat?', 'native', 'neg?', 'net/accept', + 'net/accept-loop', 'net/address', 'net/address-unpack', + 'net/chunk', 'net/close', 'net/connect', 'net/flush', + 'net/listen', 'net/localname', 'net/peername', + 'net/read', 'net/recv-from', 'net/send-to', + 'net/server', 'net/setsockopt', 'net/shutdown', + 'net/write', 'next', 'nil?', 'not', 'not=', 'number?', + 'odd?', 'one?', 'os/arch', 'os/cd', 'os/chmod', + 'os/clock', 'os/compiler', 'os/cpu-count', + 'os/cryptorand', 'os/cwd', 'os/date', 'os/dir', + 'os/environ', 'os/execute', 'os/exit', 'os/getenv', + 'os/isatty', 'os/link', 'os/lstat', 'os/mkdir', + 'os/mktime', 'os/open', 'os/perm-int', 'os/perm-string', + 'os/pipe', 'os/posix-exec', 'os/posix-fork', + 'os/proc-close', 'os/proc-kill', 'os/proc-wait', + 'os/readlink', 'os/realpath', 'os/rename', 'os/rm', + 'os/rmdir', 'os/setenv', 'os/shell', 'os/sigaction', + 'os/sleep', 'os/spawn', 'os/stat', 'os/strftime', + 'os/symlink', 'os/time', 'os/touch', 'os/umask', + 'os/which', 'pairs', 'parse', 'parse-all', + 'parser/byte', 'parser/clone', 'parser/consume', + 'parser/eof', 'parser/error', 'parser/flush', + 'parser/has-more', 'parser/insert', 'parser/new', + 'parser/produce', 'parser/state', 'parser/status', + 'parser/where', 'partial', 'partition', 'partition-by', + 'peg/compile', 'peg/find', 'peg/find-all', 'peg/match', + 'peg/replace', 'peg/replace-all', 'pos?', 'postwalk', + 'pp', 'prewalk', 'prin', 'prinf', 'print', 'printf', + 'product', 'propagate', 'put', 'put-in', 'quit', + 'range', 'reduce', 'reduce2', 'repl', 'require', + 'resume', 'return', 'reverse', 'reverse!', + 'run-context', 'sandbox', 'scan-number', 'setdyn', + 'signal', 'slice', 'slurp', 'some', 'sort', 'sort-by', + 'sorted', 'sorted-by', 'spit', 'string', + 'string/ascii-lower', 'string/ascii-upper', + 'string/bytes', 'string/check-set', 'string/find', + 'string/find-all', 'string/format', 'string/from-bytes', + 'string/has-prefix?', 'string/has-suffix?', + 'string/join', 'string/repeat', 'string/replace', + 'string/replace-all', 'string/reverse', 'string/slice', + 'string/split', 'string/trim', 'string/triml', + 'string/trimr', 'string?', 'struct', 'struct/getproto', + 'struct/proto-flatten', 'struct/to-table', + 'struct/with-proto', 'struct?', 'sum', 'symbol', + 'symbol/slice', 'symbol?', 'table', 'table/clear', + 'table/clone', 'table/getproto', 'table/new', + 'table/proto-flatten', 'table/rawget', 'table/setproto', + 'table/to-struct', 'table/weak', 'table/weak-keys', + 'table/weak-values', 'table?', 'take', 'take-until', + 'take-while', 'thaw', 'trace', 'true?', 'truthy?', + 'tuple', 'tuple/brackets', 'tuple/setmap', + 'tuple/slice', 'tuple/sourcemap', 'tuple/type', + 'tuple?', 'type', 'unmarshal', 'untrace', 'update', + 'update-in', 'values', 'varglobal', 'walk', + 'warn-compile', 'xprin', 'xprinf', 'xprint', 'xprintf', + 'yield', 'zero?', 'zipcoll', + # obsolete builtin functions + 'tarray/buffer', 'tarray/copy-bytes', 'tarray/length', + 'tarray/new', 'tarray/properties', 'tarray/slice', + 'tarray/swap-bytes', 'thread/close', 'thread/current', + 'thread/exit', 'thread/new', 'thread/receive', + 'thread/send' + ) + + builtin_variables = ( + 'debugger-env', 'default-peg-grammar', 'janet/build', + 'janet/config-bits', 'janet/version', 'load-image-dict', + 'make-image-dict', 'math/-inf', 'math/e', 'math/inf', + 'math/int-max', 'math/int-min', 'math/int32-max', + 'math/int32-min', 'math/nan', 'math/pi', 'module/cache', + 'module/loaders', 'module/loading', 'module/paths', + 'root-env', 'stderr', 'stdin', 'stdout' + ) + + constants = ( + 'false', 'nil', 'true' + ) + + # XXX: this form not usable to pass to `suffix=` + #_token_end = r''' + # (?= # followed by one of: + # \s # whitespace + # | \# # comment + # | [)\]] # end delimiters + # | $ # end of file + # ) + #''' + + # ...so, express it like this + _token_end = r'(?=\s|#|[)\]]|$)' + + _first_char = r'[a-zA-Z!$%&*+\-./<=>?@^_]' + _rest_char = rf'([0-9:]|{_first_char})' + + valid_name = rf'{_first_char}({_rest_char})*' + + _radix_unit = r'[0-9a-zA-Z][0-9a-zA-Z_]*' + + # exponent marker, optional sign, one or more alphanumeric + _radix_exp = r'&[+-]?[0-9a-zA-Z]+' + + # 2af3__bee_ + _hex_unit = r'[0-9a-fA-F][0-9a-fA-F_]*' + + # 12_000__ + _dec_unit = r'[0-9][0-9_]*' + + # E-23 + # lower or uppercase e, optional sign, one or more digits + _dec_exp = r'[eE][+-]?[0-9]+' + + tokens = { + 'root': [ + (r'#.*$', Comment.Single), + + (r'\s+', Whitespace), + + # radix number + (rf'''(?x) + [+-]? [0-9]{{1,2}} r {_radix_unit} \. ({_radix_unit})? + ({_radix_exp})? + ''', + Number), + + (rf'''(?x) + [+-]? [0-9]{{1,2}} r (\.)? {_radix_unit} + ({_radix_exp})? + ''', + Number), + + # hex number + (rf'(?x) [+-]? 0x {_hex_unit} \. ({_hex_unit})?', + Number.Hex), + + (rf'(?x) [+-]? 0x (\.)? {_hex_unit}', + Number.Hex), + + # decimal number + (rf'(?x) [+-]? {_dec_unit} \. ({_dec_unit})? ({_dec_exp})?', + Number.Float), + + (rf'(?x) [+-]? (\.)? {_dec_unit} ({_dec_exp})?', + Number.Float), + + # strings and buffers + (r'@?"', String, 'string'), + + # long-strings and long-buffers + # + # non-empty content enclosed by a pair of n-backticks + # with optional leading @ + (r'@?(`+)(.|\n)+?\1', String), + + # things that hang out on front + # + # ' ~ , ; | + (r"['~,;|]", Operator), + + # collection delimiters + # + # @( ( ) + # @[ [ ] + # @{ { } + (r'@?[(\[{]|[)\]}]', Punctuation), + + # constants + (words(constants, suffix=_token_end), Keyword.Constants), + + # keywords + (rf'(:({_rest_char})+|:)', Name.Constant), + + # symbols + (words(builtin_variables, suffix=_token_end), + Name.Variable.Global), + + (words(special_forms, prefix=r'(?<=\()', suffix=_token_end), + Keyword.Reserved), + + (words(builtin_macros, prefix=r'(?<=\()', suffix=_token_end), + Name.Builtin), + + (words(builtin_functions, prefix=r'(?<=\()', suffix=_token_end), + Name.Function), + + # other symbols + (valid_name, Name.Variable), + ], + 'string': [ + (r'\\(u[0-9a-fA-F]{4}|U[0-9a-fA-F]{6})', String.Escape), + (r'\\x[0-9a-fA-F]{2}', String.Escape), + (r'\\.', String.Escape), + (r'"', String, '#pop'), + (r'[^\\"]+', String), + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/maple.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/maple.py new file mode 100644 index 0000000000000000000000000000000000000000..c744e7e1ad56398b8c91a3fedb94bac0b1ab803d --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/maple.py @@ -0,0 +1,291 @@ +""" + pygments.lexers.maple + ~~~~~~~~~~~~~~~~~~~~~ + + Lexers for Maple. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import words, bygroups, ExtendedRegexLexer +from pygments.token import Comment, Name, String, Whitespace, Operator, Punctuation, Number, Keyword + +__all__ = ['MapleLexer'] + + +class MapleLexer(ExtendedRegexLexer): + """ + Lexer for Maple. + """ + + name = 'Maple' + aliases = ['maple'] + filenames = ['*.mpl', '*.mi', '*.mm'] + mimetypes = ['text/x-maple'] + url = 'https://www.maplesoft.com/products/Maple/' + version_added = '2.19' + + keywords = ('and', + 'assuming', + 'break', + 'by', + 'catch', + 'description', + 'do', + 'done', + 'elif', + 'else', + 'end', + 'error', + 'export', + 'fi', + 'finally', + 'for', + 'from', + 'global', + 'if', + 'implies', + 'in', + 'intersect', + 'local', + 'minus', + 'mod', + 'module', + 'next', + 'not', + 'od', + 'option', + 'options', + 'or', + 'proc', + 'quit', + 'read', + 'return', + 'save', + 'stop', + 'subset', + 'then', + 'to', + 'try', + 'union', + 'use', + 'uses', + 'while', + 'xor') + + builtins = ('abs', + 'add', + 'addressof', + 'anames', + 'and', + 'andmap', + 'andseq', + 'appendto', + 'Array', + 'array', + 'ArrayOptions', + 'assemble', + 'ASSERT', + 'assign', + 'assigned', + 'attributes', + 'cat', + 'ceil', + 'coeff', + 'coeffs', + 'conjugate', + 'convert', + 'CopySign', + 'DEBUG', + 'debugopts', + 'Default0', + 'DefaultOverflow', + 'DefaultUnderflow', + 'degree', + 'denom', + 'diff', + 'disassemble', + 'divide', + 'done', + 'entries', + 'EqualEntries', + 'eval', + 'evalb', + 'evalf', + 'evalhf', + 'evalindets', + 'evaln', + 'expand', + 'exports', + 'factorial', + 'floor', + 'frac', + 'frem', + 'FromInert', + 'frontend', + 'gc', + 'genpoly', + 'has', + 'hastype', + 'hfarray', + 'icontent', + 'igcd', + 'ilcm', + 'ilog10', + 'Im', + 'implies', + 'indets', + 'indices', + 'intersect', + 'iolib', + 'iquo', + 'irem', + 'iroot', + 'iroot', + 'isqrt', + 'kernelopts', + 'lcoeff', + 'ldegree', + 'length', + 'lexorder', + 'lhs', + 'lowerbound', + 'lprint', + 'macro', + 'map', + 'max', + 'maxnorm', + 'member', + 'membertype', + 'min', + 'minus', + 'mod', + 'modp', + 'modp1', + 'modp2', + 'mods', + 'mul', + 'NextAfter', + 'nops', + 'normal', + 'not', + 'numboccur', + 'numelems', + 'numer', + 'NumericClass', + 'NumericEvent', + 'NumericEventHandler', + 'NumericStatus', + 'op', + 'or', + 'order', + 'OrderedNE', + 'ormap', + 'orseq', + 'parse', + 'piecewise', + 'pointto', + 'print', + 'quit', + 'Re', + 'readlib', + 'Record', + 'remove', + 'rhs', + 'round', + 'rtable', + 'rtable_elems', + 'rtable_eval', + 'rtable_indfns', + 'rtable_num_elems', + 'rtable_options', + 'rtable_redim', + 'rtable_scanblock', + 'rtable_set_indfn', + 'rtable_split_unit', + 'savelib', + 'Scale10', + 'Scale2', + 'SDMPolynom', + 'searchtext', + 'SearchText', + 'select', + 'selectremove', + 'seq', + 'series', + 'setattribute', + 'SFloatExponent', + 'SFloatMantissa', + 'sign', + 'sort', + 'ssystem', + 'stop', + 'String', + 'subs', + 'subset', + 'subsindets', + 'subsop', + 'substring', + 'system', + 'table', + 'taylor', + 'tcoeff', + 'time', + 'timelimit', + 'ToInert', + 'traperror', + 'trunc', + 'type', + 'typematch', + 'unames', + 'unassign', + 'union', + 'Unordered', + 'upperbound', + 'userinfo', + 'writeto', + 'xor', + 'xormap', + 'xorseq') + + def delayed_callback(self, match, ctx): + yield match.start(1), Punctuation, match.group(1) # quote + + ctx.pos = match.start(2) + orig_end = ctx.end + ctx.end = match.end(2) + + yield from self.get_tokens_unprocessed(context=ctx) + yield match.end(2), Punctuation, match.group(1) # quote + + ctx.pos = match.end() + ctx.end = orig_end + + tokens = { + 'root': [ + (r'#.*\n', Comment.Single), + (r'\(\*', Comment.Multiline, 'comment'), + (r'"(\\.|.|\s)*?"', String), + (r"('+)((.|\n)*?)\1", delayed_callback), + (r'`(\\`|.)*?`', Name), + (words(keywords, prefix=r'\b', suffix=r'\b'), Keyword), + (words(builtins, prefix=r'\b', suffix=r'\b'), Name.Builtin), + (r'[a-zA-Z_][a-zA-Z0-9_]*', Name), + (r'(:=|\*\*|@@|<=|>=|<>|->|::|\.\.|&\+|[\+\-\*\.\^\$/@&,:=<>%~])', Operator), + (r'[;^!@$\(\)\[\]{}|_\\#?]+', Punctuation), + (r'(\d+)(\.\.)', bygroups(Number.Integer, Punctuation)), + (r'(\d*\.\d+|\d+\.\d*)([eE][+-]?\d+)?', Number.Float), + (r'\d+', Number.Integer), + (r'\s+', Whitespace), + ], + 'comment': [ + (r'.*\(\*', Comment.Multiline, '#push'), + (r'.*\*\)', Comment.Multiline, '#pop'), + (r'.*\n', Comment.Multiline), + ] + } + + def analyse_text(text): + if ':=' in text: + return 0.1 \ No newline at end of file diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/maxima.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/maxima.py new file mode 100644 index 0000000000000000000000000000000000000000..a983088373218849cd91b469bd5e52950cbba173 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/maxima.py @@ -0,0 +1,84 @@ +""" + pygments.lexers.maxima + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the computer algebra system Maxima. + + Derived from pygments/lexers/algebra.py. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, bygroups, words +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation + +__all__ = ['MaximaLexer'] + +class MaximaLexer(RegexLexer): + """ + A Maxima lexer. + Derived from pygments.lexers.MuPADLexer. + """ + name = 'Maxima' + url = 'http://maxima.sourceforge.net' + aliases = ['maxima', 'macsyma'] + filenames = ['*.mac', '*.max'] + version_added = '2.11' + + keywords = ('if', 'then', 'else', 'elseif', + 'do', 'while', 'repeat', 'until', + 'for', 'from', 'to', 'downto', 'step', 'thru') + + constants = ('%pi', '%e', '%phi', '%gamma', '%i', + 'und', 'ind', 'infinity', 'inf', 'minf', + 'true', 'false', 'unknown', 'done') + + operators = (r'.', r':', r'=', r'#', + r'+', r'-', r'*', r'/', r'^', + r'@', r'>', r'<', r'|', r'!', r"'") + + operator_words = ('and', 'or', 'not') + + tokens = { + 'root': [ + (r'/\*', Comment.Multiline, 'comment'), + (r'"(?:[^"\\]|\\.)*"', String), + (r'\(|\)|\[|\]|\{|\}', Punctuation), + (r'[,;$]', Punctuation), + (words (constants), Name.Constant), + (words (keywords), Keyword), + (words (operators), Operator), + (words (operator_words), Operator.Word), + (r'''(?x) + ((?:[a-zA-Z_#][\w#]*|`[^`]*`) + (?:::[a-zA-Z_#][\w#]*|`[^`]*`)*)(\s*)([(])''', + bygroups(Name.Function, Text.Whitespace, Punctuation)), + (r'''(?x) + (?:[a-zA-Z_#%][\w#%]*|`[^`]*`) + (?:::[a-zA-Z_#%][\w#%]*|`[^`]*`)*''', Name.Variable), + (r'[-+]?(\d*\.\d+([bdefls][-+]?\d+)?|\d+(\.\d*)?[bdefls][-+]?\d+)', Number.Float), + (r'[-+]?\d+', Number.Integer), + (r'\s+', Text.Whitespace), + (r'.', Text) + ], + 'comment': [ + (r'[^*/]+', Comment.Multiline), + (r'/\*', Comment.Multiline, '#push'), + (r'\*/', Comment.Multiline, '#pop'), + (r'[*/]', Comment.Multiline) + ] + } + + def analyse_text (text): + strength = 0.0 + # Input expression terminator. + if re.search (r'\$\s*$', text, re.MULTILINE): + strength += 0.05 + # Function definition operator. + if ':=' in text: + strength += 0.02 + return strength diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/mojo.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/mojo.py new file mode 100644 index 0000000000000000000000000000000000000000..4df18c4f9c94520ab852ba2f66bb50518eb64be7 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/mojo.py @@ -0,0 +1,707 @@ +""" + pygments.lexers.mojo + ~~~~~~~~~~~~~~~~~~~~ + + Lexers for Mojo and related languages. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import keyword + +from pygments import unistring as uni +from pygments.lexer import ( + RegexLexer, + bygroups, + combined, + default, + include, + this, + using, + words, +) +from pygments.token import ( + Comment, + # Error, + Keyword, + Name, + Number, + Operator, + Punctuation, + String, + Text, + Whitespace, +) +from pygments.util import shebang_matches + +__all__ = ["MojoLexer"] + + +class MojoLexer(RegexLexer): + """ + For Mojo source code (version 24.2.1). + """ + + name = "Mojo" + url = "https://docs.modular.com/mojo/" + aliases = ["mojo", "🔥"] + filenames = [ + "*.mojo", + "*.🔥", + ] + mimetypes = [ + "text/x-mojo", + "application/x-mojo", + ] + version_added = "2.18" + + uni_name = f"[{uni.xid_start}][{uni.xid_continue}]*" + + def innerstring_rules(ttype): + return [ + # the old style '%s' % (...) string formatting (still valid in Py3) + ( + r"%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?" + "[hlL]?[E-GXc-giorsaux%]", + String.Interpol, + ), + # the new style '{}'.format(...) string formatting + ( + r"\{" + r"((\w+)((\.\w+)|(\[[^\]]+\]))*)?" # field name + r"(\![sra])?" # conversion + r"(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?" + r"\}", + String.Interpol, + ), + # backslashes, quotes and formatting signs must be parsed one at a time + (r'[^\\\'"%{\n]+', ttype), + (r'[\'"\\]', ttype), + # unhandled string formatting sign + (r"%|(\{{1,2})", ttype), + # newlines are an error (use "nl" state) + ] + + def fstring_rules(ttype): + return [ + # Assuming that a '}' is the closing brace after format specifier. + # Sadly, this means that we won't detect syntax error. But it's + # more important to parse correct syntax correctly, than to + # highlight invalid syntax. + (r"\}", String.Interpol), + (r"\{", String.Interpol, "expr-inside-fstring"), + # backslashes, quotes and formatting signs must be parsed one at a time + (r'[^\\\'"{}\n]+', ttype), + (r'[\'"\\]', ttype), + # newlines are an error (use "nl" state) + ] + + tokens = { + "root": [ + (r"\s+", Whitespace), + ( + r'^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")', + bygroups(Whitespace, String.Affix, String.Doc), + ), + ( + r"^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')", + bygroups(Whitespace, String.Affix, String.Doc), + ), + (r"\A#!.+$", Comment.Hashbang), + (r"#.*$", Comment.Single), + (r"\\\n", Whitespace), + (r"\\", Whitespace), + include("keywords"), + include("soft-keywords"), + # In the original PR, all the below here used ((?:\s|\\\s)+) to + # designate whitespace, but I can't find any example of this being + # needed in the example file, so we're replacing it with `\s+`. + ( + r"(alias)(\s+)", + bygroups(Keyword, Whitespace), + "varname", # TODO varname the right fit? + ), + (r"(var)(\s+)", bygroups(Keyword, Whitespace), "varname"), + (r"(def)(\s+)", bygroups(Keyword, Whitespace), "funcname"), + (r"(fn)(\s+)", bygroups(Keyword, Whitespace), "funcname"), + ( + r"(class)(\s+)", + bygroups(Keyword, Whitespace), + "classname", + ), # not implemented yet + (r"(struct)(\s+)", bygroups(Keyword, Whitespace), "structname"), + (r"(trait)(\s+)", bygroups(Keyword, Whitespace), "structname"), + (r"(from)(\s+)", bygroups(Keyword.Namespace, Whitespace), "fromimport"), + (r"(import)(\s+)", bygroups(Keyword.Namespace, Whitespace), "import"), + include("expr"), + ], + "expr": [ + # raw f-strings + ( + '(?i)(rf|fr)(""")', + bygroups(String.Affix, String.Double), + combined("rfstringescape", "tdqf"), + ), + ( + "(?i)(rf|fr)(''')", + bygroups(String.Affix, String.Single), + combined("rfstringescape", "tsqf"), + ), + ( + '(?i)(rf|fr)(")', + bygroups(String.Affix, String.Double), + combined("rfstringescape", "dqf"), + ), + ( + "(?i)(rf|fr)(')", + bygroups(String.Affix, String.Single), + combined("rfstringescape", "sqf"), + ), + # non-raw f-strings + ( + '([fF])(""")', + bygroups(String.Affix, String.Double), + combined("fstringescape", "tdqf"), + ), + ( + "([fF])(''')", + bygroups(String.Affix, String.Single), + combined("fstringescape", "tsqf"), + ), + ( + '([fF])(")', + bygroups(String.Affix, String.Double), + combined("fstringescape", "dqf"), + ), + ( + "([fF])(')", + bygroups(String.Affix, String.Single), + combined("fstringescape", "sqf"), + ), + # raw bytes and strings + ('(?i)(rb|br|r)(""")', bygroups(String.Affix, String.Double), "tdqs"), + ("(?i)(rb|br|r)(''')", bygroups(String.Affix, String.Single), "tsqs"), + ('(?i)(rb|br|r)(")', bygroups(String.Affix, String.Double), "dqs"), + ("(?i)(rb|br|r)(')", bygroups(String.Affix, String.Single), "sqs"), + # non-raw strings + ( + '([uU]?)(""")', + bygroups(String.Affix, String.Double), + combined("stringescape", "tdqs"), + ), + ( + "([uU]?)(''')", + bygroups(String.Affix, String.Single), + combined("stringescape", "tsqs"), + ), + ( + '([uU]?)(")', + bygroups(String.Affix, String.Double), + combined("stringescape", "dqs"), + ), + ( + "([uU]?)(')", + bygroups(String.Affix, String.Single), + combined("stringescape", "sqs"), + ), + # non-raw bytes + ( + '([bB])(""")', + bygroups(String.Affix, String.Double), + combined("bytesescape", "tdqs"), + ), + ( + "([bB])(''')", + bygroups(String.Affix, String.Single), + combined("bytesescape", "tsqs"), + ), + ( + '([bB])(")', + bygroups(String.Affix, String.Double), + combined("bytesescape", "dqs"), + ), + ( + "([bB])(')", + bygroups(String.Affix, String.Single), + combined("bytesescape", "sqs"), + ), + (r"[^\S\n]+", Text), + include("numbers"), + (r"!=|==|<<|>>|:=|[-~+/*%=<>&^|.]", Operator), + (r"([]{}:\(\),;[])+", Punctuation), + (r"(in|is|and|or|not)\b", Operator.Word), + include("expr-keywords"), + include("builtins"), + include("magicfuncs"), + include("magicvars"), + include("name"), + ], + "expr-inside-fstring": [ + (r"[{([]", Punctuation, "expr-inside-fstring-inner"), + # without format specifier + ( + r"(=\s*)?" # debug (https://bugs.python.org/issue36817) + r"(\![sraf])?" # conversion + r"\}", + String.Interpol, + "#pop", + ), + # with format specifier + # we'll catch the remaining '}' in the outer scope + ( + r"(=\s*)?" # debug (https://bugs.python.org/issue36817) + r"(\![sraf])?" # conversion + r":", + String.Interpol, + "#pop", + ), + (r"\s+", Whitespace), # allow new lines + include("expr"), + ], + "expr-inside-fstring-inner": [ + (r"[{([]", Punctuation, "expr-inside-fstring-inner"), + (r"[])}]", Punctuation, "#pop"), + (r"\s+", Whitespace), # allow new lines + include("expr"), + ], + "expr-keywords": [ + # Based on https://docs.python.org/3/reference/expressions.html + ( + words( + ( + "async for", # TODO https://docs.modular.com/mojo/roadmap#no-async-for-or-async-with + "async with", # TODO https://docs.modular.com/mojo/roadmap#no-async-for-or-async-with + "await", + "else", + "for", + "if", + "lambda", + "yield", + "yield from", + ), + suffix=r"\b", + ), + Keyword, + ), + (words(("True", "False", "None"), suffix=r"\b"), Keyword.Constant), + ], + "keywords": [ + ( + words( + ( + "assert", + "async", + "await", + "borrowed", + "break", + "continue", + "del", + "elif", + "else", + "except", + "finally", + "for", + "global", + "if", + "lambda", + "pass", + "raise", + "nonlocal", + "return", + "try", + "while", + "yield", + "yield from", + "as", + "with", + ), + suffix=r"\b", + ), + Keyword, + ), + (words(("True", "False", "None"), suffix=r"\b"), Keyword.Constant), + ], + "soft-keywords": [ + # `match`, `case` and `_` soft keywords + ( + r"(^[ \t]*)" # at beginning of line + possible indentation + r"(match|case)\b" # a possible keyword + r"(?![ \t]*(?:" # not followed by... + r"[:,;=^&|@~)\]}]|(?:" + # characters and keywords that mean this isn't + # pattern matching (but None/True/False is ok) + r"|".join(k for k in keyword.kwlist if k[0].islower()) + + r")\b))", + bygroups(Whitespace, Keyword), + "soft-keywords-inner", + ), + ], + "soft-keywords-inner": [ + # optional `_` keyword + (r"(\s+)([^\n_]*)(_\b)", bygroups(Whitespace, using(this), Keyword)), + default("#pop"), + ], + "builtins": [ + ( + words( + ( + "__import__", + "abs", + "aiter", + "all", + "any", + "bin", + "bool", + "bytearray", + "breakpoint", + "bytes", + "callable", + "chr", + "classmethod", + "compile", + "complex", + "delattr", + "dict", + "dir", + "divmod", + "enumerate", + "eval", + "filter", + "float", + "format", + "frozenset", + "getattr", + "globals", + "hasattr", + "hash", + "hex", + "id", + "input", + "int", + "isinstance", + "issubclass", + "iter", + "len", + "list", + "locals", + "map", + "max", + "memoryview", + "min", + "next", + "object", + "oct", + "open", + "ord", + "pow", + "print", + "property", + "range", + "repr", + "reversed", + "round", + "set", + "setattr", + "slice", + "sorted", + "staticmethod", + "str", + "sum", + "super", + "tuple", + "type", + "vars", + "zip", + # Mojo builtin types: https://docs.modular.com/mojo/stdlib/builtin/ + "AnyType", + "Coroutine", + "DType", + "Error", + "Int", + "List", + "ListLiteral", + "Scalar", + "Int8", + "UInt8", + "Int16", + "UInt16", + "Int32", + "UInt32", + "Int64", + "UInt64", + "BFloat16", + "Float16", + "Float32", + "Float64", + "SIMD", + "String", + "Tensor", + "Tuple", + "Movable", + "Copyable", + "CollectionElement", + ), + prefix=r"(?>', + # Binary augmented + '+=', '-=', '*=', '/=', '%=', '**=', '&=', '|=', '^=', '<<=', '>>=', + # Comparison + '==', '!=', '<', '<=', '>', '>=', '<=>', + # Patterns and assignment + ':=', '?', '=~', '!~', '=>', + # Calls and sends + '.', '<-', '->', +] +_escape_pattern = ( + r'(?:\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|' + r'\\["\'\\bftnr])') +# _char = _escape_chars + [('.', String.Char)] +_identifier = r'[_a-zA-Z]\w*' + +_constants = [ + # Void constants + 'null', + # Bool constants + 'false', 'true', + # Double constants + 'Infinity', 'NaN', + # Special objects + 'M', 'Ref', 'throw', 'traceln', +] + +_guards = [ + 'Any', 'Binding', 'Bool', 'Bytes', 'Char', 'DeepFrozen', 'Double', + 'Empty', 'Int', 'List', 'Map', 'Near', 'NullOk', 'Same', 'Selfless', + 'Set', 'Str', 'SubrangeGuard', 'Transparent', 'Void', +] + +_safeScope = [ + '_accumulateList', '_accumulateMap', '_auditedBy', '_bind', + '_booleanFlow', '_comparer', '_equalizer', '_iterForever', '_loop', + '_makeBytes', '_makeDouble', '_makeFinalSlot', '_makeInt', '_makeList', + '_makeMap', '_makeMessageDesc', '_makeOrderedSpace', '_makeParamDesc', + '_makeProtocolDesc', '_makeSourceSpan', '_makeString', '_makeVarSlot', + '_makeVerbFacet', '_mapExtract', '_matchSame', '_quasiMatcher', + '_slotToBinding', '_splitList', '_suchThat', '_switchFailed', + '_validateFor', 'b__quasiParser', 'eval', 'import', 'm__quasiParser', + 'makeBrandPair', 'makeLazySlot', 'safeScope', 'simple__quasiParser', +] + + +class MonteLexer(RegexLexer): + """ + Lexer for the Monte programming language. + """ + name = 'Monte' + url = 'https://monte.readthedocs.io/' + aliases = ['monte'] + filenames = ['*.mt'] + version_added = '2.2' + + tokens = { + 'root': [ + # Comments + (r'#[^\n]*\n', Comment), + + # Docstrings + # Apologies for the non-greedy matcher here. + (r'/\*\*.*?\*/', String.Doc), + + # `var` declarations + (r'\bvar\b', Keyword.Declaration, 'var'), + + # `interface` declarations + (r'\binterface\b', Keyword.Declaration, 'interface'), + + # method declarations + (words(_methods, prefix='\\b', suffix='\\b'), + Keyword, 'method'), + + # All other declarations + (words(_declarations, prefix='\\b', suffix='\\b'), + Keyword.Declaration), + + # Keywords + (words(_keywords, prefix='\\b', suffix='\\b'), Keyword), + + # Literals + ('[+-]?0x[_0-9a-fA-F]+', Number.Hex), + (r'[+-]?[_0-9]+\.[_0-9]*([eE][+-]?[_0-9]+)?', Number.Float), + ('[+-]?[_0-9]+', Number.Integer), + ("'", String.Double, 'char'), + ('"', String.Double, 'string'), + + # Quasiliterals + ('`', String.Backtick, 'ql'), + + # Operators + (words(_operators), Operator), + + # Verb operators + (_identifier + '=', Operator.Word), + + # Safe scope constants + (words(_constants, prefix='\\b', suffix='\\b'), + Keyword.Pseudo), + + # Safe scope guards + (words(_guards, prefix='\\b', suffix='\\b'), Keyword.Type), + + # All other safe scope names + (words(_safeScope, prefix='\\b', suffix='\\b'), + Name.Builtin), + + # Identifiers + (_identifier, Name), + + # Punctuation + (r'\(|\)|\{|\}|\[|\]|:|,', Punctuation), + + # Whitespace + (' +', Whitespace), + + # Definite lexer errors + ('=', Error), + ], + 'char': [ + # It is definitely an error to have a char of width == 0. + ("'", Error, 'root'), + (_escape_pattern, String.Escape, 'charEnd'), + ('.', String.Char, 'charEnd'), + ], + 'charEnd': [ + ("'", String.Char, '#pop:2'), + # It is definitely an error to have a char of width > 1. + ('.', Error), + ], + # The state of things coming into an interface. + 'interface': [ + (' +', Whitespace), + (_identifier, Name.Class, '#pop'), + include('root'), + ], + # The state of things coming into a method. + 'method': [ + (' +', Whitespace), + (_identifier, Name.Function, '#pop'), + include('root'), + ], + 'string': [ + ('"', String.Double, 'root'), + (_escape_pattern, String.Escape), + (r'\n', String.Double), + ('.', String.Double), + ], + 'ql': [ + ('`', String.Backtick, 'root'), + (r'\$' + _escape_pattern, String.Escape), + (r'\$\$', String.Escape), + (r'@@', String.Escape), + (r'\$\{', String.Interpol, 'qlNest'), + (r'@\{', String.Interpol, 'qlNest'), + (r'\$' + _identifier, Name), + ('@' + _identifier, Name), + ('.', String.Backtick), + ], + 'qlNest': [ + (r'\}', String.Interpol, '#pop'), + include('root'), + ], + # The state of things immediately following `var`. + 'var': [ + (' +', Whitespace), + (_identifier, Name.Variable, '#pop'), + include('root'), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/mosel.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/mosel.py new file mode 100644 index 0000000000000000000000000000000000000000..426c9a145261af10f25c2f6e5f16fdccf665b065 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/mosel.py @@ -0,0 +1,447 @@ +""" + pygments.lexers.mosel + ~~~~~~~~~~~~~~~~~~~~~ + + Lexers for the mosel language. + http://www.fico.com/en/products/fico-xpress-optimization + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, words +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation + +__all__ = ['MoselLexer'] + +FUNCTIONS = ( + # core functions + '_', + 'abs', + 'arctan', + 'asproc', + 'assert', + 'bitflip', + 'bitneg', + 'bitset', + 'bitshift', + 'bittest', + 'bitval', + 'ceil', + 'cos', + 'create', + 'currentdate', + 'currenttime', + 'cutelt', + 'cutfirst', + 'cuthead', + 'cutlast', + 'cuttail', + 'datablock', + 'delcell', + 'exists', + 'exit', + 'exp', + 'exportprob', + 'fclose', + 'fflush', + 'finalize', + 'findfirst', + 'findlast', + 'floor', + 'fopen', + 'fselect', + 'fskipline', + 'fwrite', + 'fwrite_', + 'fwriteln', + 'fwriteln_', + 'getact', + 'getcoeff', + 'getcoeffs', + 'getdual', + 'getelt', + 'getfid', + 'getfirst', + 'getfname', + 'gethead', + 'getlast', + 'getobjval', + 'getparam', + 'getrcost', + 'getreadcnt', + 'getreverse', + 'getsize', + 'getslack', + 'getsol', + 'gettail', + 'gettype', + 'getvars', + 'isdynamic', + 'iseof', + 'isfinite', + 'ishidden', + 'isinf', + 'isnan', + 'isodd', + 'ln', + 'localsetparam', + 'log', + 'makesos1', + 'makesos2', + 'maxlist', + 'memoryuse', + 'minlist', + 'newmuid', + 'publish', + 'random', + 'read', + 'readln', + 'reset', + 'restoreparam', + 'reverse', + 'round', + 'setcoeff', + 'sethidden', + 'setioerr', + 'setmatherr', + 'setname', + 'setparam', + 'setrandseed', + 'setrange', + 'settype', + 'sin', + 'splithead', + 'splittail', + 'sqrt', + 'strfmt', + 'substr', + 'timestamp', + 'unpublish', + 'versionnum', + 'versionstr', + 'write', + 'write_', + 'writeln', + 'writeln_', + + # mosel exam mmxprs | sed -n -e "s/ [pf][a-z]* \([a-zA-Z0-9_]*\).*/'\1',/p" | sort -u + 'addcut', + 'addcuts', + 'addmipsol', + 'basisstability', + 'calcsolinfo', + 'clearmipdir', + 'clearmodcut', + 'command', + 'copysoltoinit', + 'crossoverlpsol', + 'defdelayedrows', + 'defsecurevecs', + 'delcuts', + 'dropcuts', + 'estimatemarginals', + 'fixglobal', + 'flushmsgq', + 'getbstat', + 'getcnlist', + 'getcplist', + 'getdualray', + 'getiis', + 'getiissense', + 'getiistype', + 'getinfcause', + 'getinfeas', + 'getlb', + 'getlct', + 'getleft', + 'getloadedlinctrs', + 'getloadedmpvars', + 'getname', + 'getprimalray', + 'getprobstat', + 'getrange', + 'getright', + 'getsensrng', + 'getsize', + 'getsol', + 'gettype', + 'getub', + 'getvars', + 'gety', + 'hasfeature', + 'implies', + 'indicator', + 'initglobal', + 'ishidden', + 'isiisvalid', + 'isintegral', + 'loadbasis', + 'loadcuts', + 'loadlpsol', + 'loadmipsol', + 'loadprob', + 'maximise', + 'maximize', + 'minimise', + 'minimize', + 'postsolve', + 'readbasis', + 'readdirs', + 'readsol', + 'refinemipsol', + 'rejectintsol', + 'repairinfeas', + 'repairinfeas_deprec', + 'resetbasis', + 'resetiis', + 'resetsol', + 'savebasis', + 'savemipsol', + 'savesol', + 'savestate', + 'selectsol', + 'setarchconsistency', + 'setbstat', + 'setcallback', + 'setcbcutoff', + 'setgndata', + 'sethidden', + 'setlb', + 'setmipdir', + 'setmodcut', + 'setsol', + 'setub', + 'setucbdata', + 'stopoptimise', + 'stopoptimize', + 'storecut', + 'storecuts', + 'unloadprob', + 'uselastbarsol', + 'writebasis', + 'writedirs', + 'writeprob', + 'writesol', + 'xor', + 'xprs_addctr', + 'xprs_addindic', + + # mosel exam mmsystem | sed -n -e "s/ [pf][a-z]* \([a-zA-Z0-9_]*\).*/'\1',/p" | sort -u + 'addmonths', + 'copytext', + 'cuttext', + 'deltext', + 'endswith', + 'erase', + 'expandpath', + 'fcopy', + 'fdelete', + 'findfiles', + 'findtext', + 'fmove', + 'formattext', + 'getasnumber', + 'getchar', + 'getcwd', + 'getdate', + 'getday', + 'getdaynum', + 'getdays', + 'getdirsep', + 'getdsoparam', + 'getendparse', + 'getenv', + 'getfsize', + 'getfstat', + 'getftime', + 'gethour', + 'getminute', + 'getmonth', + 'getmsec', + 'getoserrmsg', + 'getoserror', + 'getpathsep', + 'getqtype', + 'getsecond', + 'getsepchar', + 'getsize', + 'getstart', + 'getsucc', + 'getsysinfo', + 'getsysstat', + 'gettime', + 'gettmpdir', + 'gettrim', + 'getweekday', + 'getyear', + 'inserttext', + 'isvalid', + 'jointext', + 'makedir', + 'makepath', + 'newtar', + 'newzip', + 'nextfield', + 'openpipe', + 'parseextn', + 'parseint', + 'parsereal', + 'parsetext', + 'pastetext', + 'pathmatch', + 'pathsplit', + 'qsort', + 'quote', + 'readtextline', + 'regmatch', + 'regreplace', + 'removedir', + 'removefiles', + 'setchar', + 'setdate', + 'setday', + 'setdsoparam', + 'setendparse', + 'setenv', + 'sethour', + 'setminute', + 'setmonth', + 'setmsec', + 'setoserror', + 'setqtype', + 'setsecond', + 'setsepchar', + 'setstart', + 'setsucc', + 'settime', + 'settrim', + 'setyear', + 'sleep', + 'splittext', + 'startswith', + 'system', + 'tarlist', + 'textfmt', + 'tolower', + 'toupper', + 'trim', + 'untar', + 'unzip', + 'ziplist', + + # mosel exam mmjobs | sed -n -e "s/ [pf][a-z]* \([a-zA-Z0-9_]*\).*/'\1',/p" | sort -u + 'canceltimer', + 'clearaliases', + 'compile', + 'connect', + 'detach', + 'disconnect', + 'dropnextevent', + 'findxsrvs', + 'getaliases', + 'getannidents', + 'getannotations', + 'getbanner', + 'getclass', + 'getdsoprop', + 'getdsopropnum', + 'getexitcode', + 'getfromgid', + 'getfromid', + 'getfromuid', + 'getgid', + 'gethostalias', + 'getid', + 'getmodprop', + 'getmodpropnum', + 'getnextevent', + 'getnode', + 'getrmtid', + 'getstatus', + 'getsysinfo', + 'gettimer', + 'getuid', + 'getvalue', + 'isqueueempty', + 'load', + 'nullevent', + 'peeknextevent', + 'resetmodpar', + 'run', + 'send', + 'setcontrol', + 'setdefstream', + 'setgid', + 'sethostalias', + 'setmodpar', + 'settimer', + 'setuid', + 'setworkdir', + 'stop', + 'unload', + 'wait', + 'waitexpired', + 'waitfor', + 'waitforend', +) + + +class MoselLexer(RegexLexer): + """ + For the Mosel optimization language. + """ + name = 'Mosel' + aliases = ['mosel'] + filenames = ['*.mos'] + url = 'https://www.fico.com/fico-xpress-optimization/docs/latest/mosel/mosel_lang/dhtml/moselreflang.html' + version_added = '2.6' + + tokens = { + 'root': [ + (r'\n', Text), + (r'\s+', Text.Whitespace), + (r'!.*?\n', Comment.Single), + (r'\(!(.|\n)*?!\)', Comment.Multiline), + (words(( + 'and', 'as', 'break', 'case', 'count', 'declarations', 'do', + 'dynamic', 'elif', 'else', 'end-', 'end', 'evaluation', 'false', + 'forall', 'forward', 'from', 'function', 'hashmap', 'if', + 'imports', 'include', 'initialisations', 'initializations', 'inter', + 'max', 'min', 'model', 'namespace', 'next', 'not', 'nsgroup', + 'nssearch', 'of', 'options', 'or', 'package', 'parameters', + 'procedure', 'public', 'prod', 'record', 'repeat', 'requirements', + 'return', 'sum', 'then', 'to', 'true', 'union', 'until', 'uses', + 'version', 'while', 'with'), prefix=r'\b', suffix=r'\b'), + Keyword.Builtin), + (words(( + 'range', 'array', 'set', 'list', 'mpvar', 'mpproblem', 'linctr', + 'nlctr', 'integer', 'string', 'real', 'boolean', 'text', 'time', + 'date', 'datetime', 'returned', 'Model', 'Mosel', 'counter', + 'xmldoc', 'is_sos1', 'is_sos2', 'is_integer', 'is_binary', + 'is_continuous', 'is_free', 'is_semcont', 'is_semint', + 'is_partint'), prefix=r'\b', suffix=r'\b'), + Keyword.Type), + (r'(\+|\-|\*|/|=|<=|>=|\||\^|<|>|<>|\.\.|\.|:=|::|:|in|mod|div)', + Operator), + (r'[()\[\]{},;]+', Punctuation), + (words(FUNCTIONS, prefix=r'\b', suffix=r'\b'), Name.Function), + (r'(\d+\.(?!\.)\d*|\.(?!.)\d+)([eE][+-]?\d+)?', Number.Float), + (r'\d+([eE][+-]?\d+)?', Number.Integer), + (r'[+-]?Infinity', Number.Integer), + (r'0[xX][0-9a-fA-F]+', Number), + (r'"', String.Double, 'double_quote'), + (r'\'', String.Single, 'single_quote'), + (r'(\w+|(\.(?!\.)))', Text), + ], + 'single_quote': [ + (r'\'', String.Single, '#pop'), + (r'[^\']+', String.Single), + ], + 'double_quote': [ + (r'(\\"|\\[0-7]{1,3}\D|\\[abfnrtv]|\\\\)', String.Escape), + (r'\"', String.Double, '#pop'), + (r'[^"\\]+', String.Double), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/nimrod.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/nimrod.py new file mode 100644 index 0000000000000000000000000000000000000000..365a8dcca961a8b1934b02d33cfaa181ed97736f --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/nimrod.py @@ -0,0 +1,199 @@ +""" + pygments.lexers.nimrod + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the Nim language (formerly known as Nimrod). + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, default, bygroups +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Error + +__all__ = ['NimrodLexer'] + + +class NimrodLexer(RegexLexer): + """ + For Nim source code. + """ + + name = 'Nimrod' + url = 'http://nim-lang.org/' + aliases = ['nimrod', 'nim'] + filenames = ['*.nim', '*.nimrod'] + mimetypes = ['text/x-nim'] + version_added = '1.5' + + flags = re.MULTILINE | re.IGNORECASE + + def underscorize(words): + newWords = [] + new = [] + for word in words: + for ch in word: + new.append(ch) + new.append("_?") + newWords.append(''.join(new)) + new = [] + return "|".join(newWords) + + keywords = [ + 'addr', 'and', 'as', 'asm', 'bind', 'block', 'break', 'case', + 'cast', 'concept', 'const', 'continue', 'converter', 'defer', 'discard', + 'distinct', 'div', 'do', 'elif', 'else', 'end', 'enum', 'except', + 'export', 'finally', 'for', 'if', 'in', 'yield', 'interface', + 'is', 'isnot', 'iterator', 'let', 'mixin', 'mod', + 'not', 'notin', 'object', 'of', 'or', 'out', 'ptr', 'raise', + 'ref', 'return', 'shl', 'shr', 'static', 'try', + 'tuple', 'type', 'using', 'when', 'while', 'xor' + ] + + keywordsPseudo = [ + 'nil', 'true', 'false' + ] + + opWords = [ + 'and', 'or', 'not', 'xor', 'shl', 'shr', 'div', 'mod', 'in', + 'notin', 'is', 'isnot' + ] + + types = [ + 'int', 'int8', 'int16', 'int32', 'int64', 'float', 'float32', 'float64', + 'bool', 'char', 'range', 'array', 'seq', 'set', 'string' + ] + + tokens = { + 'root': [ + # Comments + (r'##\[', String.Doc, 'doccomment'), + (r'##.*$', String.Doc), + (r'#\[', Comment.Multiline, 'comment'), + (r'#.*$', Comment), + + # Pragmas + (r'\{\.', String.Other, 'pragma'), + + # Operators + (r'[*=><+\-/@$~&%!?|\\\[\]]', Operator), + (r'\.\.|\.|,|\[\.|\.\]|\{\.|\.\}|\(\.|\.\)|\{|\}|\(|\)|:|\^|`|;', + Punctuation), + + # Case statement branch + (r'(\n\s*)(of)(\s)', bygroups(Text.Whitespace, Keyword, + Text.Whitespace), 'casebranch'), + + # Strings + (r'(?:[\w]+)"', String, 'rdqs'), + (r'"""', String.Double, 'tdqs'), + ('"', String, 'dqs'), + + # Char + ("'", String.Char, 'chars'), + + # Keywords + (rf'({underscorize(opWords)})\b', Operator.Word), + (r'(proc|func|method|macro|template)(\s)(?![(\[\]])', + bygroups(Keyword, Text.Whitespace), 'funcname'), + (rf'({underscorize(keywords)})\b', Keyword), + (r'({})\b'.format(underscorize(['from', 'import', 'include', 'export'])), + Keyword.Namespace), + (r'(v_?a_?r)\b', Keyword.Declaration), + (rf'({underscorize(types)})\b', Name.Builtin), + (rf'({underscorize(keywordsPseudo)})\b', Keyword.Pseudo), + + # Identifiers + (r'\b((?![_\d])\w)(((?!_)\w)|(_(?!_)\w))*', Name), + + # Numbers + (r'[0-9][0-9_]*(?=([e.]|\'f(32|64)))', + Number.Float, ('float-suffix', 'float-number')), + (r'0x[a-f0-9][a-f0-9_]*', Number.Hex, 'int-suffix'), + (r'0b[01][01_]*', Number.Bin, 'int-suffix'), + (r'0o[0-7][0-7_]*', Number.Oct, 'int-suffix'), + (r'[0-9][0-9_]*', Number.Integer, 'int-suffix'), + + # Whitespace + (r'\s+', Text.Whitespace), + (r'.+$', Error), + ], + 'chars': [ + (r'\\([\\abcefnrtvl"\']|x[a-f0-9]{2}|[0-9]{1,3})', String.Escape), + (r"'", String.Char, '#pop'), + (r".", String.Char) + ], + 'strings': [ + (r'(?', '=', '<', '>', '*', '-'] + + punctuations = ["(", ")", "[", "]", ";", "{", "}", ":", ",", "@"] + + tokens = { + 'root': [ + # comments starting with # + (r'#.*$', Comment.Single), + + # multiline comments + (r'/\*', Comment.Multiline, 'comment'), + + # whitespace + (r'\s+', Text), + + # keywords + ('({})'.format('|'.join(re.escape(entry) + '\\b' for entry in keywords)), Keyword), + + # highlight the builtins + ('({})'.format('|'.join(re.escape(entry) + '\\b' for entry in builtins)), + Name.Builtin), + + (r'\b(true|false|null)\b', Name.Constant), + + # floats + (r'-?(\d+\.\d*|\.\d+)([eE][-+]?\d+)?', Number.Float), + + # integers + (r'-?[0-9]+', Number.Integer), + + # paths + (r'[\w.+-]*(\/[\w.+-]+)+', Literal), + (r'~(\/[\w.+-]+)+', Literal), + (r'\<[\w.+-]+(\/[\w.+-]+)*\>', Literal), + + # operators + ('({})'.format('|'.join(re.escape(entry) for entry in operators)), + Operator), + + # word operators + (r'\b(or|and)\b', Operator.Word), + + (r'\{', Punctuation, 'block'), + + # punctuations + ('({})'.format('|'.join(re.escape(entry) for entry in punctuations)), Punctuation), + + # strings + (r'"', String.Double, 'doublequote'), + (r"''", String.Multiline, 'multiline'), + + # urls + (r'[a-zA-Z][a-zA-Z0-9\+\-\.]*\:[\w%/?:@&=+$,\\.!~*\'-]+', Literal), + + # names of variables + (r'[\w-]+(?=\s*=)', String.Symbol), + (r'[a-zA-Z_][\w\'-]*', Text), + + (r"\$\{", String.Interpol, 'antiquote'), + ], + 'comment': [ + (r'[^/*]+', Comment.Multiline), + (r'/\*', Comment.Multiline, '#push'), + (r'\*/', Comment.Multiline, '#pop'), + (r'[*/]', Comment.Multiline), + ], + 'multiline': [ + (r"''(\$|'|\\n|\\r|\\t|\\)", String.Escape), + (r"''", String.Multiline, '#pop'), + (r'\$\{', String.Interpol, 'antiquote'), + (r"[^'\$]+", String.Multiline), + (r"\$[^\{']", String.Multiline), + (r"'[^']", String.Multiline), + (r"\$(?=')", String.Multiline), + ], + 'doublequote': [ + (r'\\(\\|"|\$|n)', String.Escape), + (r'"', String.Double, '#pop'), + (r'\$\{', String.Interpol, 'antiquote'), + (r'[^"\\\$]+', String.Double), + (r'\$[^\{"]', String.Double), + (r'\$(?=")', String.Double), + (r'\\', String.Double), + ], + 'antiquote': [ + (r"\}", String.Interpol, '#pop'), + # TODO: we should probably escape also here ''${ \${ + (r"\$\{", String.Interpol, '#push'), + include('root'), + ], + 'block': [ + (r"\}", Punctuation, '#pop'), + include('root'), + ], + } + + def analyse_text(text): + rv = 0.0 + # TODO: let/in + if re.search(r'import.+?<[^>]+>', text): + rv += 0.4 + if re.search(r'mkDerivation\s+(\(|\{|rec)', text): + rv += 0.4 + if re.search(r'=\s+mkIf\s+', text): + rv += 0.4 + if re.search(r'\{[a-zA-Z,\s]+\}:', text): + rv += 0.1 + return rv diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/numbair.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/numbair.py new file mode 100644 index 0000000000000000000000000000000000000000..435863e132afcff16c70ed81bb51739848c1ecc0 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/numbair.py @@ -0,0 +1,63 @@ +""" + pygments.lexers.numbair + ~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for other Numba Intermediate Representation. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, include, bygroups, words +from pygments.token import Whitespace, Name, String, Punctuation, Keyword, \ + Operator, Number + +__all__ = ["NumbaIRLexer"] + +class NumbaIRLexer(RegexLexer): + """ + Lexer for Numba IR + """ + name = 'Numba_IR' + url = "https://numba.readthedocs.io/en/stable/developer/architecture.html#stage-2-generate-the-numba-ir" + aliases = ['numba_ir', 'numbair'] + filenames = ['*.numba_ir'] + mimetypes = ['text/x-numba_ir', 'text/x-numbair'] + version_added = '2.19' + + identifier = r'\$[a-zA-Z0-9._]+' + fun_or_var = r'([a-zA-Z_]+[a-zA-Z0-9]*)' + + tokens = { + 'root' : [ + (r'(label)(\ [0-9]+)(:)$', + bygroups(Keyword, Name.Label, Punctuation)), + + (r'=', Operator), + include('whitespace'), + include('keyword'), + + (identifier, Name.Variable), + (fun_or_var + r'(\()', + bygroups(Name.Function, Punctuation)), + (fun_or_var + r'(\=)', + bygroups(Name.Attribute, Punctuation)), + (fun_or_var, Name.Constant), + (r'[0-9]+', Number), + + # + (r'<[^>\n]*>', String), + + (r'[=<>{}\[\]()*.,!\':]|x\b', Punctuation) + ], + + 'keyword':[ + (words(( + 'del', 'jump', 'call', 'branch', + ), suffix=' '), Keyword), + ], + + 'whitespace': [ + (r'(\n|\s)+', Whitespace), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/objective.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/objective.py new file mode 100644 index 0000000000000000000000000000000000000000..899c2c44c965248e98a705d9bb330d4e8158b9ac --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/objective.py @@ -0,0 +1,513 @@ +""" + pygments.lexers.objective + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for Objective-C family languages. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, bygroups, using, this, words, \ + inherit, default +from pygments.token import Text, Keyword, Name, String, Operator, \ + Number, Punctuation, Literal, Comment, Whitespace + +from pygments.lexers.c_cpp import CLexer, CppLexer + +__all__ = ['ObjectiveCLexer', 'ObjectiveCppLexer', 'LogosLexer', 'SwiftLexer'] + + +def objective(baselexer): + """ + Generate a subclass of baselexer that accepts the Objective-C syntax + extensions. + """ + + # Have to be careful not to accidentally match JavaDoc/Doxygen syntax here, + # since that's quite common in ordinary C/C++ files. It's OK to match + # JavaDoc/Doxygen keywords that only apply to Objective-C, mind. + # + # The upshot of this is that we CANNOT match @class or @interface + _oc_keywords = re.compile(r'@(?:end|implementation|protocol)') + + # Matches [ ? identifier ( identifier ? ] | identifier? : ) + # (note the identifier is *optional* when there is a ':'!) + _oc_message = re.compile(r'\[\s*[a-zA-Z_]\w*\s+' + r'(?:[a-zA-Z_]\w*\s*\]|' + r'(?:[a-zA-Z_]\w*)?:)') + + class GeneratedObjectiveCVariant(baselexer): + """ + Implements Objective-C syntax on top of an existing C family lexer. + """ + + tokens = { + 'statements': [ + (r'@"', String, 'string'), + (r'@(YES|NO)', Number), + (r"@'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char), + (r'@(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float), + (r'@(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float), + (r'@0x[0-9a-fA-F]+[Ll]?', Number.Hex), + (r'@0[0-7]+[Ll]?', Number.Oct), + (r'@\d+[Ll]?', Number.Integer), + (r'@\(', Literal, 'literal_number'), + (r'@\[', Literal, 'literal_array'), + (r'@\{', Literal, 'literal_dictionary'), + (words(( + '@selector', '@private', '@protected', '@public', '@encode', + '@synchronized', '@try', '@throw', '@catch', '@finally', + '@end', '@property', '@synthesize', '__bridge', '__bridge_transfer', + '__autoreleasing', '__block', '__weak', '__strong', 'weak', 'strong', + 'copy', 'retain', 'assign', 'unsafe_unretained', 'atomic', 'nonatomic', + 'readonly', 'readwrite', 'setter', 'getter', 'typeof', 'in', + 'out', 'inout', 'release', 'class', '@dynamic', '@optional', + '@required', '@autoreleasepool', '@import'), suffix=r'\b'), + Keyword), + (words(('id', 'instancetype', 'Class', 'IMP', 'SEL', 'BOOL', + 'IBOutlet', 'IBAction', 'unichar'), suffix=r'\b'), + Keyword.Type), + (r'@(true|false|YES|NO)\n', Name.Builtin), + (r'(YES|NO|nil|self|super)\b', Name.Builtin), + # Carbon types + (r'(Boolean|UInt8|SInt8|UInt16|SInt16|UInt32|SInt32)\b', Keyword.Type), + # Carbon built-ins + (r'(TRUE|FALSE)\b', Name.Builtin), + (r'(@interface|@implementation)(\s+)', bygroups(Keyword, Text), + ('#pop', 'oc_classname')), + (r'(@class|@protocol)(\s+)', bygroups(Keyword, Text), + ('#pop', 'oc_forward_classname')), + # @ can also prefix other expressions like @{...} or @(...) + (r'@', Punctuation), + inherit, + ], + 'oc_classname': [ + # interface definition that inherits + (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?(\s*)(\{)', + bygroups(Name.Class, Text, Name.Class, Text, Punctuation), + ('#pop', 'oc_ivars')), + (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?', + bygroups(Name.Class, Text, Name.Class), '#pop'), + # interface definition for a category + (r'([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))(\s*)(\{)', + bygroups(Name.Class, Text, Name.Label, Text, Punctuation), + ('#pop', 'oc_ivars')), + (r'([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))', + bygroups(Name.Class, Text, Name.Label), '#pop'), + # simple interface / implementation + (r'([a-zA-Z$_][\w$]*)(\s*)(\{)', + bygroups(Name.Class, Text, Punctuation), ('#pop', 'oc_ivars')), + (r'([a-zA-Z$_][\w$]*)', Name.Class, '#pop') + ], + 'oc_forward_classname': [ + (r'([a-zA-Z$_][\w$]*)(\s*,\s*)', + bygroups(Name.Class, Text), 'oc_forward_classname'), + (r'([a-zA-Z$_][\w$]*)(\s*;?)', + bygroups(Name.Class, Text), '#pop') + ], + 'oc_ivars': [ + include('whitespace'), + include('statements'), + (';', Punctuation), + (r'\{', Punctuation, '#push'), + (r'\}', Punctuation, '#pop'), + ], + 'root': [ + # methods + (r'^([-+])(\s*)' # method marker + r'(\(.*?\))?(\s*)' # return type + r'([a-zA-Z$_][\w$]*:?)', # begin of method name + bygroups(Punctuation, Text, using(this), + Text, Name.Function), + 'method'), + inherit, + ], + 'method': [ + include('whitespace'), + # TODO unsure if ellipses are allowed elsewhere, see + # discussion in Issue 789 + (r',', Punctuation), + (r'\.\.\.', Punctuation), + (r'(\(.*?\))(\s*)([a-zA-Z$_][\w$]*)', + bygroups(using(this), Text, Name.Variable)), + (r'[a-zA-Z$_][\w$]*:', Name.Function), + (';', Punctuation, '#pop'), + (r'\{', Punctuation, 'function'), + default('#pop'), + ], + 'literal_number': [ + (r'\(', Punctuation, 'literal_number_inner'), + (r'\)', Literal, '#pop'), + include('statement'), + ], + 'literal_number_inner': [ + (r'\(', Punctuation, '#push'), + (r'\)', Punctuation, '#pop'), + include('statement'), + ], + 'literal_array': [ + (r'\[', Punctuation, 'literal_array_inner'), + (r'\]', Literal, '#pop'), + include('statement'), + ], + 'literal_array_inner': [ + (r'\[', Punctuation, '#push'), + (r'\]', Punctuation, '#pop'), + include('statement'), + ], + 'literal_dictionary': [ + (r'\}', Literal, '#pop'), + include('statement'), + ], + } + + def analyse_text(text): + if _oc_keywords.search(text): + return 1.0 + elif '@"' in text: # strings + return 0.8 + elif re.search('@[0-9]+', text): + return 0.7 + elif _oc_message.search(text): + return 0.8 + return 0 + + def get_tokens_unprocessed(self, text, stack=('root',)): + from pygments.lexers._cocoa_builtins import COCOA_INTERFACES, \ + COCOA_PROTOCOLS, COCOA_PRIMITIVES + + for index, token, value in \ + baselexer.get_tokens_unprocessed(self, text, stack): + if token is Name or token is Name.Class: + if value in COCOA_INTERFACES or value in COCOA_PROTOCOLS \ + or value in COCOA_PRIMITIVES: + token = Name.Builtin.Pseudo + + yield index, token, value + + return GeneratedObjectiveCVariant + + +class ObjectiveCLexer(objective(CLexer)): + """ + For Objective-C source code with preprocessor directives. + """ + + name = 'Objective-C' + url = 'https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html' + aliases = ['objective-c', 'objectivec', 'obj-c', 'objc'] + filenames = ['*.m', '*.h'] + mimetypes = ['text/x-objective-c'] + version_added = '' + priority = 0.05 # Lower than C + + +class ObjectiveCppLexer(objective(CppLexer)): + """ + For Objective-C++ source code with preprocessor directives. + """ + + name = 'Objective-C++' + aliases = ['objective-c++', 'objectivec++', 'obj-c++', 'objc++'] + filenames = ['*.mm', '*.hh'] + mimetypes = ['text/x-objective-c++'] + version_added = '' + priority = 0.05 # Lower than C++ + + +class LogosLexer(ObjectiveCppLexer): + """ + For Logos + Objective-C source code with preprocessor directives. + """ + + name = 'Logos' + aliases = ['logos'] + filenames = ['*.x', '*.xi', '*.xm', '*.xmi'] + mimetypes = ['text/x-logos'] + version_added = '1.6' + priority = 0.25 + + tokens = { + 'statements': [ + (r'(%orig|%log)\b', Keyword), + (r'(%c)\b(\()(\s*)([a-zA-Z$_][\w$]*)(\s*)(\))', + bygroups(Keyword, Punctuation, Text, Name.Class, Text, Punctuation)), + (r'(%init)\b(\()', + bygroups(Keyword, Punctuation), 'logos_init_directive'), + (r'(%init)(?=\s*;)', bygroups(Keyword)), + (r'(%hook|%group)(\s+)([a-zA-Z$_][\w$]+)', + bygroups(Keyword, Text, Name.Class), '#pop'), + (r'(%subclass)(\s+)', bygroups(Keyword, Text), + ('#pop', 'logos_classname')), + inherit, + ], + 'logos_init_directive': [ + (r'\s+', Text), + (',', Punctuation, ('logos_init_directive', '#pop')), + (r'([a-zA-Z$_][\w$]*)(\s*)(=)(\s*)([^);]*)', + bygroups(Name.Class, Text, Punctuation, Text, Text)), + (r'([a-zA-Z$_][\w$]*)', Name.Class), + (r'\)', Punctuation, '#pop'), + ], + 'logos_classname': [ + (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?', + bygroups(Name.Class, Text, Name.Class), '#pop'), + (r'([a-zA-Z$_][\w$]*)', Name.Class, '#pop') + ], + 'root': [ + (r'(%subclass)(\s+)', bygroups(Keyword, Text), + 'logos_classname'), + (r'(%hook|%group)(\s+)([a-zA-Z$_][\w$]+)', + bygroups(Keyword, Text, Name.Class)), + (r'(%config)(\s*\(\s*)(\w+)(\s*=)(.*?)(\)\s*)', + bygroups(Keyword, Text, Name.Variable, Text, String, Text)), + (r'(%ctor)(\s*)(\{)', bygroups(Keyword, Text, Punctuation), + 'function'), + (r'(%new)(\s*)(\()(.*?)(\))', + bygroups(Keyword, Text, Keyword, String, Keyword)), + (r'(\s*)(%end)(\s*)', bygroups(Text, Keyword, Text)), + inherit, + ], + } + + _logos_keywords = re.compile(r'%(?:hook|ctor|init|c\()') + + def analyse_text(text): + if LogosLexer._logos_keywords.search(text): + return 1.0 + return 0 + + +class SwiftLexer(RegexLexer): + """ + For Swift source. + """ + name = 'Swift' + url = 'https://www.swift.org/' + filenames = ['*.swift'] + aliases = ['swift'] + mimetypes = ['text/x-swift'] + version_added = '2.0' + + tokens = { + 'root': [ + # Whitespace and Comments + (r'\n', Text), + (r'\s+', Whitespace), + (r'//', Comment.Single, 'comment-single'), + (r'/\*', Comment.Multiline, 'comment-multi'), + (r'#(if|elseif|else|endif|available)\b', Comment.Preproc, 'preproc'), + + # Keywords + include('keywords'), + + # Global Types + (words(( + 'Array', 'AutoreleasingUnsafeMutablePointer', 'BidirectionalReverseView', + 'Bit', 'Bool', 'CFunctionPointer', 'COpaquePointer', 'CVaListPointer', + 'Character', 'ClosedInterval', 'CollectionOfOne', 'ContiguousArray', + 'Dictionary', 'DictionaryGenerator', 'DictionaryIndex', 'Double', + 'EmptyCollection', 'EmptyGenerator', 'EnumerateGenerator', + 'EnumerateSequence', 'FilterCollectionView', + 'FilterCollectionViewIndex', 'FilterGenerator', 'FilterSequenceView', + 'Float', 'Float80', 'FloatingPointClassification', 'GeneratorOf', + 'GeneratorOfOne', 'GeneratorSequence', 'HalfOpenInterval', 'HeapBuffer', + 'HeapBufferStorage', 'ImplicitlyUnwrappedOptional', 'IndexingGenerator', + 'Int', 'Int16', 'Int32', 'Int64', 'Int8', 'LazyBidirectionalCollection', + 'LazyForwardCollection', 'LazyRandomAccessCollection', + 'LazySequence', 'MapCollectionView', 'MapSequenceGenerator', + 'MapSequenceView', 'MirrorDisposition', 'ObjectIdentifier', 'OnHeap', + 'Optional', 'PermutationGenerator', 'QuickLookObject', + 'RandomAccessReverseView', 'Range', 'RangeGenerator', 'RawByte', 'Repeat', + 'ReverseBidirectionalIndex', 'ReverseRandomAccessIndex', 'SequenceOf', + 'SinkOf', 'Slice', 'StaticString', 'StrideThrough', 'StrideThroughGenerator', + 'StrideTo', 'StrideToGenerator', 'String', 'UInt', 'UInt16', 'UInt32', + 'UInt64', 'UInt8', 'UTF16', 'UTF32', 'UTF8', 'UnicodeDecodingResult', + 'UnicodeScalar', 'Unmanaged', 'UnsafeBufferPointer', + 'UnsafeBufferPointerGenerator', 'UnsafeMutableBufferPointer', + 'UnsafeMutablePointer', 'UnsafePointer', 'Zip2', 'ZipGenerator2', + # Protocols + 'AbsoluteValuable', 'AnyObject', 'ArrayLiteralConvertible', + 'BidirectionalIndexType', 'BitwiseOperationsType', + 'BooleanLiteralConvertible', 'BooleanType', 'CVarArgType', + 'CollectionType', 'Comparable', 'DebugPrintable', + 'DictionaryLiteralConvertible', 'Equatable', + 'ExtendedGraphemeClusterLiteralConvertible', + 'ExtensibleCollectionType', 'FloatLiteralConvertible', + 'FloatingPointType', 'ForwardIndexType', 'GeneratorType', 'Hashable', + 'IntegerArithmeticType', 'IntegerLiteralConvertible', 'IntegerType', + 'IntervalType', 'MirrorType', 'MutableCollectionType', 'MutableSliceable', + 'NilLiteralConvertible', 'OutputStreamType', 'Printable', + 'RandomAccessIndexType', 'RangeReplaceableCollectionType', + 'RawOptionSetType', 'RawRepresentable', 'Reflectable', 'SequenceType', + 'SignedIntegerType', 'SignedNumberType', 'SinkType', 'Sliceable', + 'Streamable', 'Strideable', 'StringInterpolationConvertible', + 'StringLiteralConvertible', 'UnicodeCodecType', + 'UnicodeScalarLiteralConvertible', 'UnsignedIntegerType', + '_ArrayBufferType', '_BidirectionalIndexType', '_CocoaStringType', + '_CollectionType', '_Comparable', '_ExtensibleCollectionType', + '_ForwardIndexType', '_Incrementable', '_IntegerArithmeticType', + '_IntegerType', '_ObjectiveCBridgeable', '_RandomAccessIndexType', + '_RawOptionSetType', '_SequenceType', '_Sequence_Type', + '_SignedIntegerType', '_SignedNumberType', '_Sliceable', '_Strideable', + '_SwiftNSArrayRequiredOverridesType', '_SwiftNSArrayType', + '_SwiftNSCopyingType', '_SwiftNSDictionaryRequiredOverridesType', + '_SwiftNSDictionaryType', '_SwiftNSEnumeratorType', + '_SwiftNSFastEnumerationType', '_SwiftNSStringRequiredOverridesType', + '_SwiftNSStringType', '_UnsignedIntegerType', + # Variables + 'C_ARGC', 'C_ARGV', 'Process', + # Typealiases + 'Any', 'AnyClass', 'BooleanLiteralType', 'CBool', 'CChar', 'CChar16', + 'CChar32', 'CDouble', 'CFloat', 'CInt', 'CLong', 'CLongLong', 'CShort', + 'CSignedChar', 'CUnsignedInt', 'CUnsignedLong', 'CUnsignedShort', + 'CWideChar', 'ExtendedGraphemeClusterType', 'Float32', 'Float64', + 'FloatLiteralType', 'IntMax', 'IntegerLiteralType', 'StringLiteralType', + 'UIntMax', 'UWord', 'UnicodeScalarType', 'Void', 'Word', + # Foundation/Cocoa + 'NSErrorPointer', 'NSObjectProtocol', 'Selector'), suffix=r'\b'), + Name.Builtin), + # Functions + (words(( + 'abs', 'advance', 'alignof', 'alignofValue', 'assert', 'assertionFailure', + 'contains', 'count', 'countElements', 'debugPrint', 'debugPrintln', + 'distance', 'dropFirst', 'dropLast', 'dump', 'enumerate', 'equal', + 'extend', 'fatalError', 'filter', 'find', 'first', 'getVaList', 'indices', + 'insert', 'isEmpty', 'join', 'last', 'lazy', 'lexicographicalCompare', + 'map', 'max', 'maxElement', 'min', 'minElement', 'numericCast', 'overlaps', + 'partition', 'precondition', 'preconditionFailure', 'prefix', 'print', + 'println', 'reduce', 'reflect', 'removeAll', 'removeAtIndex', 'removeLast', + 'removeRange', 'reverse', 'sizeof', 'sizeofValue', 'sort', 'sorted', + 'splice', 'split', 'startsWith', 'stride', 'strideof', 'strideofValue', + 'suffix', 'swap', 'toDebugString', 'toString', 'transcode', + 'underestimateCount', 'unsafeAddressOf', 'unsafeBitCast', 'unsafeDowncast', + 'withExtendedLifetime', 'withUnsafeMutablePointer', + 'withUnsafeMutablePointers', 'withUnsafePointer', 'withUnsafePointers', + 'withVaList'), suffix=r'\b'), + Name.Builtin.Pseudo), + + # Implicit Block Variables + (r'\$\d+', Name.Variable), + + # Binary Literal + (r'0b[01_]+', Number.Bin), + # Octal Literal + (r'0o[0-7_]+', Number.Oct), + # Hexadecimal Literal + (r'0x[0-9a-fA-F_]+', Number.Hex), + # Decimal Literal + (r'[0-9][0-9_]*(\.[0-9_]+[eE][+\-]?[0-9_]+|' + r'\.[0-9_]*|[eE][+\-]?[0-9_]+)', Number.Float), + (r'[0-9][0-9_]*', Number.Integer), + # String Literal + (r'"""', String, 'string-multi'), + (r'"', String, 'string'), + + # Operators and Punctuation + (r'[(){}\[\].,:;=@#`?]|->|[<&?](?=\w)|(?<=\w)[>!?]', Punctuation), + (r'[/=\-+!*%<>&|^?~]+', Operator), + + # Identifier + (r'[a-zA-Z_]\w*', Name) + ], + 'keywords': [ + (words(( + 'as', 'async', 'await', 'break', 'case', 'catch', 'continue', 'default', 'defer', + 'do', 'else', 'fallthrough', 'for', 'guard', 'if', 'in', 'is', + 'repeat', 'return', '#selector', 'switch', 'throw', 'try', + 'where', 'while'), suffix=r'\b'), + Keyword), + (r'@availability\([^)]+\)', Keyword.Reserved), + (words(( + 'associativity', 'convenience', 'dynamic', 'didSet', 'final', + 'get', 'indirect', 'infix', 'inout', 'lazy', 'left', 'mutating', + 'none', 'nonmutating', 'optional', 'override', 'postfix', + 'precedence', 'prefix', 'Protocol', 'required', 'rethrows', + 'right', 'set', 'throws', 'Type', 'unowned', 'weak', 'willSet', + '@availability', '@autoclosure', '@noreturn', + '@NSApplicationMain', '@NSCopying', '@NSManaged', '@objc', + '@UIApplicationMain', '@IBAction', '@IBDesignable', + '@IBInspectable', '@IBOutlet'), suffix=r'\b'), + Keyword.Reserved), + (r'(as|dynamicType|false|is|nil|self|Self|super|true|__COLUMN__' + r'|__FILE__|__FUNCTION__|__LINE__|_' + r'|#(?:file|line|column|function))\b', Keyword.Constant), + (r'import\b', Keyword.Declaration, 'module'), + (r'(class|enum|extension|struct|protocol)(\s+)([a-zA-Z_]\w*)', + bygroups(Keyword.Declaration, Whitespace, Name.Class)), + (r'(func)(\s+)([a-zA-Z_]\w*)', + bygroups(Keyword.Declaration, Whitespace, Name.Function)), + (r'(var|let)(\s+)([a-zA-Z_]\w*)', bygroups(Keyword.Declaration, + Whitespace, Name.Variable)), + (words(( + 'actor', 'associatedtype', 'class', 'deinit', 'enum', 'extension', 'func', 'import', + 'init', 'internal', 'let', 'operator', 'private', 'protocol', 'public', + 'static', 'struct', 'subscript', 'typealias', 'var'), suffix=r'\b'), + Keyword.Declaration) + ], + 'comment': [ + (r':param: [a-zA-Z_]\w*|:returns?:|(FIXME|MARK|TODO):', + Comment.Special) + ], + + # Nested + 'comment-single': [ + (r'\n', Whitespace, '#pop'), + include('comment'), + (r'[^\n]+', Comment.Single) + ], + 'comment-multi': [ + include('comment'), + (r'[^*/]+', Comment.Multiline), + (r'/\*', Comment.Multiline, '#push'), + (r'\*/', Comment.Multiline, '#pop'), + (r'[*/]+', Comment.Multiline) + ], + 'module': [ + (r'\n', Whitespace, '#pop'), + (r'[a-zA-Z_]\w*', Name.Class), + include('root') + ], + 'preproc': [ + (r'\n', Whitespace, '#pop'), + include('keywords'), + (r'[A-Za-z]\w*', Comment.Preproc), + include('root') + ], + 'string': [ + (r'"', String, '#pop'), + include("string-common"), + ], + 'string-multi': [ + (r'"""', String, '#pop'), + include("string-common"), + ], + 'string-common': [ + (r'\\\(', String.Interpol, 'string-intp'), + (r"""\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}""" + r"""|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}""", String.Escape), + (r'[^\\"]+', String), + (r'\\', String) + ], + 'string-intp': [ + (r'\(', String.Interpol, '#push'), + (r'\)', String.Interpol, '#pop'), + include('root') + ] + } + + def get_tokens_unprocessed(self, text): + from pygments.lexers._cocoa_builtins import COCOA_INTERFACES, \ + COCOA_PROTOCOLS, COCOA_PRIMITIVES + + for index, token, value in \ + RegexLexer.get_tokens_unprocessed(self, text): + if token is Name or token is Name.Class: + if value in COCOA_INTERFACES or value in COCOA_PROTOCOLS \ + or value in COCOA_PRIMITIVES: + token = Name.Builtin.Pseudo + + yield index, token, value diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/parasail.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/parasail.py new file mode 100644 index 0000000000000000000000000000000000000000..150d6a9c48213856c423f4ceb28fb1ab7400f137 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/parasail.py @@ -0,0 +1,78 @@ +""" + pygments.lexers.parasail + ~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for ParaSail. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Literal + +__all__ = ['ParaSailLexer'] + + +class ParaSailLexer(RegexLexer): + """ + For ParaSail source code. + """ + + name = 'ParaSail' + url = 'http://www.parasail-lang.org' + aliases = ['parasail'] + filenames = ['*.psi', '*.psl'] + mimetypes = ['text/x-parasail'] + version_added = '2.1' + + flags = re.MULTILINE + + tokens = { + 'root': [ + (r'[^\S\n]+', Text), + (r'//.*?\n', Comment.Single), + (r'\b(and|or|xor)=', Operator.Word), + (r'\b(and(\s+then)?|or(\s+else)?|xor|rem|mod|' + r'(is|not)\s+null)\b', + Operator.Word), + # Keywords + (r'\b(abs|abstract|all|block|class|concurrent|const|continue|' + r'each|end|exit|extends|exports|forward|func|global|implements|' + r'import|in|interface|is|lambda|locked|new|not|null|of|op|' + r'optional|private|queued|ref|return|reverse|separate|some|' + r'type|until|var|with|' + # Control flow + r'if|then|else|elsif|case|for|while|loop)\b', + Keyword.Reserved), + (r'(abstract\s+)?(interface|class|op|func|type)', + Keyword.Declaration), + # Literals + (r'"[^"]*"', String), + (r'\\[\'ntrf"0]', String.Escape), + (r'#[a-zA-Z]\w*', Literal), # Enumeration + include('numbers'), + (r"'[^']'", String.Char), + (r'[a-zA-Z]\w*', Name), + # Operators and Punctuation + (r'(<==|==>|<=>|\*\*=|<\|=|<<=|>>=|==|!=|=\?|<=|>=|' + r'\*\*|<<|>>|=>|:=|\+=|-=|\*=|\|=|\||/=|\+|-|\*|/|' + r'\.\.|<\.\.|\.\.<|<\.\.<)', + Operator), + (r'(<|>|\[|\]|\(|\)|\||:|;|,|.|\{|\}|->)', + Punctuation), + (r'\n+', Text), + ], + 'numbers': [ + (r'\d[0-9_]*#[0-9a-fA-F][0-9a-fA-F_]*#', Number.Hex), # any base + (r'0[xX][0-9a-fA-F][0-9a-fA-F_]*', Number.Hex), # C-like hex + (r'0[bB][01][01_]*', Number.Bin), # C-like bin + (r'\d[0-9_]*\.\d[0-9_]*[eE][+-]\d[0-9_]*', # float exp + Number.Float), + (r'\d[0-9_]*\.\d[0-9_]*', Number.Float), # float + (r'\d[0-9_]*', Number.Integer), # integer + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/pawn.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/pawn.py new file mode 100644 index 0000000000000000000000000000000000000000..99d9c963d1473206ca68c389b068ba783783ce92 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/pawn.py @@ -0,0 +1,202 @@ +""" + pygments.lexers.pawn + ~~~~~~~~~~~~~~~~~~~~ + + Lexers for the Pawn languages. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation +from pygments.util import get_bool_opt + +__all__ = ['SourcePawnLexer', 'PawnLexer'] + + +class SourcePawnLexer(RegexLexer): + """ + For SourcePawn source code with preprocessor directives. + """ + name = 'SourcePawn' + aliases = ['sp'] + filenames = ['*.sp'] + mimetypes = ['text/x-sourcepawn'] + url = 'https://github.com/alliedmodders/sourcepawn' + version_added = '1.6' + + #: optional Comment or Whitespace + _ws = r'(?:\s|//.*?\n|/\*.*?\*/)+' + #: only one /* */ style comment + _ws1 = r'\s*(?:/[*].*?[*]/\s*)*' + + tokens = { + 'root': [ + # preprocessor directives: without whitespace + (r'^#if\s+0', Comment.Preproc, 'if0'), + ('^#', Comment.Preproc, 'macro'), + # or with whitespace + ('^' + _ws1 + r'#if\s+0', Comment.Preproc, 'if0'), + ('^' + _ws1 + '#', Comment.Preproc, 'macro'), + (r'\n', Text), + (r'\s+', Text), + (r'\\\n', Text), # line continuation + (r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single), + (r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment.Multiline), + (r'[{}]', Punctuation), + (r'L?"', String, 'string'), + (r"L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char), + (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float), + (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float), + (r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex), + (r'0[0-7]+[LlUu]*', Number.Oct), + (r'\d+[LlUu]*', Number.Integer), + (r'[~!%^&*+=|?:<>/-]', Operator), + (r'[()\[\],.;]', Punctuation), + (r'(case|const|continue|native|' + r'default|else|enum|for|if|new|operator|' + r'public|return|sizeof|static|decl|struct|switch)\b', Keyword), + (r'(bool|Float)\b', Keyword.Type), + (r'(true|false)\b', Keyword.Constant), + (r'[a-zA-Z_]\w*', Name), + ], + 'string': [ + (r'"', String, '#pop'), + (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape), + (r'[^\\"\n]+', String), # all other characters + (r'\\\n', String), # line continuation + (r'\\', String), # stray backslash + ], + 'macro': [ + (r'[^/\n]+', Comment.Preproc), + (r'/\*(.|\n)*?\*/', Comment.Multiline), + (r'//.*?\n', Comment.Single, '#pop'), + (r'/', Comment.Preproc), + (r'(?<=\\)\n', Comment.Preproc), + (r'\n', Comment.Preproc, '#pop'), + ], + 'if0': [ + (r'^\s*#if.*?(?/-]', Operator), + (r'[()\[\],.;]', Punctuation), + (r'(switch|case|default|const|new|static|char|continue|break|' + r'if|else|for|while|do|operator|enum|' + r'public|return|sizeof|tagof|state|goto)\b', Keyword), + (r'(bool|Float)\b', Keyword.Type), + (r'(true|false)\b', Keyword.Constant), + (r'[a-zA-Z_]\w*', Name), + ], + 'string': [ + (r'"', String, '#pop'), + (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape), + (r'[^\\"\n]+', String), # all other characters + (r'\\\n', String), # line continuation + (r'\\', String), # stray backslash + ], + 'macro': [ + (r'[^/\n]+', Comment.Preproc), + (r'/\*(.|\n)*?\*/', Comment.Multiline), + (r'//.*?\n', Comment.Single, '#pop'), + (r'/', Comment.Preproc), + (r'(?<=\\)\n', Comment.Preproc), + (r'\n', Comment.Preproc, '#pop'), + ], + 'if0': [ + (r'^\s*#if.*?(?])*>[egimosx]*', String.Regex, '#pop'), + (r'\[(\\\\|\\[^\\]|[^\\\]])*\][egimosx]*', String.Regex, '#pop'), + (r'\((\\\\|\\[^\\]|[^\\)])*\)[egimosx]*', String.Regex, '#pop'), + (r'@(\\\\|\\[^\\]|[^\\@])*@[egimosx]*', String.Regex, '#pop'), + (r'%(\\\\|\\[^\\]|[^\\%])*%[egimosx]*', String.Regex, '#pop'), + (r'\$(\\\\|\\[^\\]|[^\\$])*\$[egimosx]*', String.Regex, '#pop'), + ], + 'root': [ + (r'\A\#!.+?$', Comment.Hashbang), + (r'\#.*?$', Comment.Single), + (r'^=[a-zA-Z0-9]+\s+.*?\n=cut', Comment.Multiline), + (words(( + 'case', 'continue', 'do', 'else', 'elsif', 'for', 'foreach', + 'if', 'last', 'my', 'next', 'our', 'redo', 'reset', 'then', + 'unless', 'until', 'while', 'print', 'new', 'BEGIN', + 'CHECK', 'INIT', 'END', 'return'), suffix=r'\b'), + Keyword), + (r'(format)(\s+)(\w+)(\s*)(=)(\s*\n)', + bygroups(Keyword, Whitespace, Name, Whitespace, Punctuation, Whitespace), 'format'), + (r'(eq|lt|gt|le|ge|ne|not|and|or|cmp)\b', Operator.Word), + # common delimiters + (r's/(\\\\|\\[^\\]|[^\\/])*/(\\\\|\\[^\\]|[^\\/])*/[egimosx]*', + String.Regex), + (r's!(\\\\|\\!|[^!])*!(\\\\|\\!|[^!])*![egimosx]*', String.Regex), + (r's\\(\\\\|[^\\])*\\(\\\\|[^\\])*\\[egimosx]*', String.Regex), + (r's@(\\\\|\\[^\\]|[^\\@])*@(\\\\|\\[^\\]|[^\\@])*@[egimosx]*', + String.Regex), + (r's%(\\\\|\\[^\\]|[^\\%])*%(\\\\|\\[^\\]|[^\\%])*%[egimosx]*', + String.Regex), + # balanced delimiters + (r's\{(\\\\|\\[^\\]|[^\\}])*\}\s*', String.Regex, 'balanced-regex'), + (r's<(\\\\|\\[^\\]|[^\\>])*>\s*', String.Regex, 'balanced-regex'), + (r's\[(\\\\|\\[^\\]|[^\\\]])*\]\s*', String.Regex, + 'balanced-regex'), + (r's\((\\\\|\\[^\\]|[^\\)])*\)\s*', String.Regex, + 'balanced-regex'), + + (r'm?/(\\\\|\\[^\\]|[^\\/\n])*/[gcimosx]*', String.Regex), + (r'm(?=[/!\\{<\[(@%$])', String.Regex, 'balanced-regex'), + (r'((?<==~)|(?<=\())\s*/(\\\\|\\[^\\]|[^\\/])*/[gcimosx]*', + String.Regex), + (r'\s+', Whitespace), + (words(( + 'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless', 'caller', 'chdir', + 'chmod', 'chomp', 'chop', 'chown', 'chr', 'chroot', 'close', 'closedir', 'connect', + 'continue', 'cos', 'crypt', 'dbmclose', 'dbmopen', 'defined', 'delete', 'die', + 'dump', 'each', 'endgrent', 'endhostent', 'endnetent', 'endprotoent', + 'endpwent', 'endservent', 'eof', 'eval', 'exec', 'exists', 'exit', 'exp', 'fcntl', + 'fileno', 'flock', 'fork', 'format', 'formline', 'getc', 'getgrent', 'getgrgid', + 'getgrnam', 'gethostbyaddr', 'gethostbyname', 'gethostent', 'getlogin', + 'getnetbyaddr', 'getnetbyname', 'getnetent', 'getpeername', 'getpgrp', + 'getppid', 'getpriority', 'getprotobyname', 'getprotobynumber', + 'getprotoent', 'getpwent', 'getpwnam', 'getpwuid', 'getservbyname', + 'getservbyport', 'getservent', 'getsockname', 'getsockopt', 'glob', 'gmtime', + 'goto', 'grep', 'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill', 'last', + 'lc', 'lcfirst', 'length', 'link', 'listen', 'local', 'localtime', 'log', 'lstat', + 'map', 'mkdir', 'msgctl', 'msgget', 'msgrcv', 'msgsnd', 'my', 'next', 'oct', 'open', + 'opendir', 'ord', 'our', 'pack', 'pipe', 'pop', 'pos', 'printf', + 'prototype', 'push', 'quotemeta', 'rand', 'read', 'readdir', + 'readline', 'readlink', 'readpipe', 'recv', 'redo', 'ref', 'rename', + 'reverse', 'rewinddir', 'rindex', 'rmdir', 'scalar', 'seek', 'seekdir', + 'select', 'semctl', 'semget', 'semop', 'send', 'setgrent', 'sethostent', 'setnetent', + 'setpgrp', 'setpriority', 'setprotoent', 'setpwent', 'setservent', + 'setsockopt', 'shift', 'shmctl', 'shmget', 'shmread', 'shmwrite', 'shutdown', + 'sin', 'sleep', 'socket', 'socketpair', 'sort', 'splice', 'split', 'sprintf', 'sqrt', + 'srand', 'stat', 'study', 'substr', 'symlink', 'syscall', 'sysopen', 'sysread', + 'sysseek', 'system', 'syswrite', 'tell', 'telldir', 'tie', 'tied', 'time', 'times', 'tr', + 'truncate', 'uc', 'ucfirst', 'umask', 'undef', 'unlink', 'unpack', 'unshift', 'untie', + 'utime', 'values', 'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write'), suffix=r'\b'), + Name.Builtin), + (r'((__(DATA|DIE|WARN)__)|(STD(IN|OUT|ERR)))\b', Name.Builtin.Pseudo), + (r'(<<)([\'"]?)([a-zA-Z_]\w*)(\2;?\n.*?\n)(\3)(\n)', + bygroups(String, String, String.Delimiter, String, String.Delimiter, Whitespace)), + (r'__END__', Comment.Preproc, 'end-part'), + (r'\$\^[ADEFHILMOPSTWX]', Name.Variable.Global), + (r"\$[\\\"\[\]'&`+*.,;=%~?@$!<>(^|/-](?!\w)", Name.Variable.Global), + (r'[$@%#]+', Name.Variable, 'varname'), + (r'0_?[0-7]+(_[0-7]+)*', Number.Oct), + (r'0x[0-9A-Fa-f]+(_[0-9A-Fa-f]+)*', Number.Hex), + (r'0b[01]+(_[01]+)*', Number.Bin), + (r'(?i)(\d*(_\d*)*\.\d+(_\d*)*|\d+(_\d*)*\.\d+(_\d*)*)(e[+-]?\d+)?', + Number.Float), + (r'(?i)\d+(_\d*)*e[+-]?\d+(_\d*)*', Number.Float), + (r'\d+(_\d+)*', Number.Integer), + (r"'(\\\\|\\[^\\]|[^'\\])*'", String), + (r'"(\\\\|\\[^\\]|[^"\\])*"', String), + (r'`(\\\\|\\[^\\]|[^`\\])*`', String.Backtick), + (r'<([^\s>]+)>', String.Regex), + (r'(q|qq|qw|qr|qx)\{', String.Other, 'cb-string'), + (r'(q|qq|qw|qr|qx)\(', String.Other, 'rb-string'), + (r'(q|qq|qw|qr|qx)\[', String.Other, 'sb-string'), + (r'(q|qq|qw|qr|qx)\<', String.Other, 'lt-string'), + (r'(q|qq|qw|qr|qx)([\W_])(.|\n)*?\2', String.Other), + (r'(package)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)', + bygroups(Keyword, Whitespace, Name.Namespace)), + (r'(use|require|no)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)', + bygroups(Keyword, Whitespace, Name.Namespace)), + (r'(sub)(\s+)', bygroups(Keyword, Whitespace), 'funcname'), + (words(( + 'no', 'package', 'require', 'use'), suffix=r'\b'), + Keyword), + (r'(\[\]|\*\*|::|<<|>>|>=|<=>|<=|={3}|!=|=~|' + r'!~|&&?|\|\||\.{1,3})', Operator), + (r'[-+/*%=<>&^|!\\~]=?', Operator), + (r'[()\[\]:;,<>/?{}]', Punctuation), # yes, there's no shortage + # of punctuation in Perl! + (r'(?=\w)', Name, 'name'), + ], + 'format': [ + (r'\.\n', String.Interpol, '#pop'), + (r'[^\n]*\n', String.Interpol), + ], + 'varname': [ + (r'\s+', Whitespace), + (r'\{', Punctuation, '#pop'), # hash syntax? + (r'\)|,', Punctuation, '#pop'), # argument specifier + (r'\w+::', Name.Namespace), + (r'[\w:]+', Name.Variable, '#pop'), + ], + 'name': [ + (r'[a-zA-Z_]\w*(::[a-zA-Z_]\w*)*(::)?(?=\s*->)', Name.Namespace, '#pop'), + (r'[a-zA-Z_]\w*(::[a-zA-Z_]\w*)*::', Name.Namespace, '#pop'), + (r'[\w:]+', Name, '#pop'), + (r'[A-Z_]+(?=\W)', Name.Constant, '#pop'), + (r'(?=\W)', Text, '#pop'), + ], + 'funcname': [ + (r'[a-zA-Z_]\w*[!?]?', Name.Function), + (r'\s+', Whitespace), + # argument declaration + (r'(\([$@%]*\))(\s*)', bygroups(Punctuation, Whitespace)), + (r';', Punctuation, '#pop'), + (r'.*?\{', Punctuation, '#pop'), + ], + 'cb-string': [ + (r'\\[{}\\]', String.Other), + (r'\\', String.Other), + (r'\{', String.Other, 'cb-string'), + (r'\}', String.Other, '#pop'), + (r'[^{}\\]+', String.Other) + ], + 'rb-string': [ + (r'\\[()\\]', String.Other), + (r'\\', String.Other), + (r'\(', String.Other, 'rb-string'), + (r'\)', String.Other, '#pop'), + (r'[^()]+', String.Other) + ], + 'sb-string': [ + (r'\\[\[\]\\]', String.Other), + (r'\\', String.Other), + (r'\[', String.Other, 'sb-string'), + (r'\]', String.Other, '#pop'), + (r'[^\[\]]+', String.Other) + ], + 'lt-string': [ + (r'\\[<>\\]', String.Other), + (r'\\', String.Other), + (r'\<', String.Other, 'lt-string'), + (r'\>', String.Other, '#pop'), + (r'[^<>]+', String.Other) + ], + 'end-part': [ + (r'.+', Comment.Preproc, '#pop') + ] + } + + def analyse_text(text): + if shebang_matches(text, r'perl'): + return True + + result = 0 + + if re.search(r'(?:my|our)\s+[$@%(]', text): + result += 0.9 + + if ':=' in text: + # := is not valid Perl, but it appears in unicon, so we should + # become less confident if we think we found Perl with := + result /= 2 + + return result + + +class Perl6Lexer(ExtendedRegexLexer): + """ + For Raku (a.k.a. Perl 6) source code. + """ + + name = 'Perl6' + url = 'https://www.raku.org' + aliases = ['perl6', 'pl6', 'raku'] + filenames = ['*.pl', '*.pm', '*.nqp', '*.p6', '*.6pl', '*.p6l', '*.pl6', + '*.6pm', '*.p6m', '*.pm6', '*.t', '*.raku', '*.rakumod', + '*.rakutest', '*.rakudoc'] + mimetypes = ['text/x-perl6', 'application/x-perl6'] + version_added = '2.0' + flags = re.MULTILINE | re.DOTALL + + PERL6_IDENTIFIER_RANGE = r"['\w:-]" + + PERL6_KEYWORDS = ( + #Phasers + 'BEGIN','CATCH','CHECK','CLOSE','CONTROL','DOC','END','ENTER','FIRST', + 'INIT','KEEP','LAST','LEAVE','NEXT','POST','PRE','QUIT','UNDO', + #Keywords + 'anon','augment','but','class','constant','default','does','else', + 'elsif','enum','for','gather','given','grammar','has','if','import', + 'is','let','loop','made','make','method','module','multi','my','need', + 'orwith','our','proceed','proto','repeat','require','return', + 'return-rw','returns','role','rule','state','sub','submethod','subset', + 'succeed','supersede','token','try','unit','unless','until','use', + 'when','while','with','without', + #Traits + 'export','native','repr','required','rw','symbol', + ) + + PERL6_BUILTINS = ( + 'ACCEPTS','abs','abs2rel','absolute','accept','accessed','acos', + 'acosec','acosech','acosh','acotan','acotanh','acquire','act','action', + 'actions','add','add_attribute','add_enum_value','add_fallback', + 'add_method','add_parent','add_private_method','add_role','add_trustee', + 'adverb','after','all','allocate','allof','allowed','alternative-names', + 'annotations','antipair','antipairs','any','anyof','app_lifetime', + 'append','arch','archname','args','arity','Array','asec','asech','asin', + 'asinh','ASSIGN-KEY','ASSIGN-POS','assuming','ast','at','atan','atan2', + 'atanh','AT-KEY','atomic-assign','atomic-dec-fetch','atomic-fetch', + 'atomic-fetch-add','atomic-fetch-dec','atomic-fetch-inc', + 'atomic-fetch-sub','atomic-inc-fetch','AT-POS','attributes','auth', + 'await','backtrace','Bag','BagHash','bail-out','base','basename', + 'base-repeating','batch','BIND-KEY','BIND-POS','bind-stderr', + 'bind-stdin','bind-stdout','bind-udp','bits','bless','block','Bool', + 'bool-only','bounds','break','Bridge','broken','BUILD','build-date', + 'bytes','cache','callframe','calling-package','CALL-ME','callsame', + 'callwith','can','cancel','candidates','cando','can-ok','canonpath', + 'caps','caption','Capture','cas','catdir','categorize','categorize-list', + 'catfile','catpath','cause','ceiling','cglobal','changed','Channel', + 'chars','chdir','child','child-name','child-typename','chmod','chomp', + 'chop','chr','chrs','chunks','cis','classify','classify-list','cleanup', + 'clone','close','closed','close-stdin','cmp-ok','code','codes','collate', + 'column','comb','combinations','command','comment','compiler','Complex', + 'compose','compose_type','composer','condition','config', + 'configure_destroy','configure_type_checking','conj','connect', + 'constraints','construct','contains','contents','copy','cos','cosec', + 'cosech','cosh','cotan','cotanh','count','count-only','cpu-cores', + 'cpu-usage','CREATE','create_type','cross','cue','curdir','curupdir','d', + 'Date','DateTime','day','daycount','day-of-month','day-of-week', + 'day-of-year','days-in-month','declaration','decode','decoder','deepmap', + 'default','defined','DEFINITE','delayed','DELETE-KEY','DELETE-POS', + 'denominator','desc','DESTROY','destroyers','devnull','diag', + 'did-you-mean','die','dies-ok','dir','dirname','dir-sep','DISTROnames', + 'do','does','does-ok','done','done-testing','duckmap','dynamic','e', + 'eager','earlier','elems','emit','enclosing','encode','encoder', + 'encoding','end','ends-with','enum_from_value','enum_value_list', + 'enum_values','enums','eof','EVAL','eval-dies-ok','EVALFILE', + 'eval-lives-ok','exception','excludes-max','excludes-min','EXISTS-KEY', + 'EXISTS-POS','exit','exitcode','exp','expected','explicitly-manage', + 'expmod','extension','f','fail','fails-like','fc','feature','file', + 'filename','find_method','find_method_qualified','finish','first','flat', + 'flatmap','flip','floor','flunk','flush','fmt','format','formatter', + 'freeze','from','from-list','from-loop','from-posix','full', + 'full-barrier','get','get_value','getc','gist','got','grab','grabpairs', + 'grep','handle','handled','handles','hardware','has_accessor','Hash', + 'head','headers','hh-mm-ss','hidden','hides','hour','how','hyper','id', + 'illegal','im','in','indent','index','indices','indir','infinite', + 'infix','infix:<+>','infix:<->','install_method_cache','Instant', + 'instead','Int','int-bounds','interval','in-timezone','invalid-str', + 'invert','invocant','IO','IO::Notification.watch-path','is_trusted', + 'is_type','isa','is-absolute','isa-ok','is-approx','is-deeply', + 'is-hidden','is-initial-thread','is-int','is-lazy','is-leap-year', + 'isNaN','isnt','is-prime','is-relative','is-routine','is-setting', + 'is-win','item','iterator','join','keep','kept','KERNELnames','key', + 'keyof','keys','kill','kv','kxxv','l','lang','last','lastcall','later', + 'lazy','lc','leading','level','like','line','lines','link','List', + 'listen','live','lives-ok','local','lock','log','log10','lookup','lsb', + 'made','MAIN','make','Map','match','max','maxpairs','merge','message', + 'method','method_table','methods','migrate','min','minmax','minpairs', + 'minute','misplaced','Mix','MixHash','mkdir','mode','modified','month', + 'move','mro','msb','multi','multiness','my','name','named','named_names', + 'narrow','nativecast','native-descriptor','nativesizeof','new','new_type', + 'new-from-daycount','new-from-pairs','next','nextcallee','next-handle', + 'nextsame','nextwith','NFC','NFD','NFKC','NFKD','nl-in','nl-out', + 'nodemap','nok','none','norm','not','note','now','nude','Num', + 'numerator','Numeric','of','offset','offset-in-hours','offset-in-minutes', + 'ok','old','on-close','one','on-switch','open','opened','operation', + 'optional','ord','ords','orig','os-error','osname','out-buffer','pack', + 'package','package-kind','package-name','packages','pair','pairs', + 'pairup','parameter','params','parent','parent-name','parents','parse', + 'parse-base','parsefile','parse-names','parts','pass','path','path-sep', + 'payload','peer-host','peer-port','periods','perl','permutations','phaser', + 'pick','pickpairs','pid','placeholder','plan','plus','polar','poll', + 'polymod','pop','pos','positional','posix','postfix','postmatch', + 'precomp-ext','precomp-target','pred','prefix','prematch','prepend', + 'print','printf','print-nl','print-to','private','private_method_table', + 'proc','produce','Promise','prompt','protect','pull-one','push', + 'push-all','push-at-least','push-exactly','push-until-lazy','put', + 'qualifier-type','quit','r','race','radix','rand','range','Rat','raw', + 're','read','readchars','readonly','ready','Real','reallocate','reals', + 'reason','rebless','receive','recv','redispatcher','redo','reduce', + 'rel2abs','relative','release','rename','repeated','replacement', + 'report','reserved','resolve','restore','result','resume','rethrow', + 'reverse','right','rindex','rmdir','role','roles_to_compose','rolish', + 'roll','rootdir','roots','rotate','rotor','round','roundrobin', + 'routine-type','run','rwx','s','samecase','samemark','samewith','say', + 'schedule-on','scheduler','scope','sec','sech','second','seek','self', + 'send','Set','set_hidden','set_name','set_package','set_rw','set_value', + 'SetHash','set-instruments','setup_finalization','shape','share','shell', + 'shift','sibling','sigil','sign','signal','signals','signature','sin', + 'sinh','sink','sink-all','skip','skip-at-least','skip-at-least-pull-one', + 'skip-one','skip-rest','sleep','sleep-timer','sleep-until','Slip','slurp', + 'slurp-rest','slurpy','snap','snapper','so','socket-host','socket-port', + 'sort','source','source-package','spawn','SPEC','splice','split', + 'splitdir','splitpath','sprintf','spurt','sqrt','squish','srand','stable', + 'start','started','starts-with','status','stderr','stdout','Str', + 'sub_signature','subbuf','subbuf-rw','subname','subparse','subst', + 'subst-mutate','substr','substr-eq','substr-rw','subtest','succ','sum', + 'Supply','symlink','t','tail','take','take-rw','tan','tanh','tap', + 'target','target-name','tc','tclc','tell','then','throttle','throw', + 'throws-like','timezone','tmpdir','to','today','todo','toggle','to-posix', + 'total','trailing','trans','tree','trim','trim-leading','trim-trailing', + 'truncate','truncated-to','trusts','try_acquire','trying','twigil','type', + 'type_captures','typename','uc','udp','uncaught_handler','unimatch', + 'uniname','uninames','uniparse','uniprop','uniprops','unique','unival', + 'univals','unlike','unlink','unlock','unpack','unpolar','unshift', + 'unwrap','updir','USAGE','use-ok','utc','val','value','values','VAR', + 'variable','verbose-config','version','VMnames','volume','vow','w','wait', + 'warn','watch','watch-path','week','weekday-of-month','week-number', + 'week-year','WHAT','when','WHERE','WHEREFORE','WHICH','WHO', + 'whole-second','WHY','wordcase','words','workaround','wrap','write', + 'write-to','x','yada','year','yield','yyyy-mm-dd','z','zip','zip-latest', + + ) + + PERL6_BUILTIN_CLASSES = ( + #Booleans + 'False','True', + #Classes + 'Any','Array','Associative','AST','atomicint','Attribute','Backtrace', + 'Backtrace::Frame','Bag','Baggy','BagHash','Blob','Block','Bool','Buf', + 'Callable','CallFrame','Cancellation','Capture','CArray','Channel','Code', + 'compiler','Complex','ComplexStr','Cool','CurrentThreadScheduler', + 'Cursor','Date','Dateish','DateTime','Distro','Duration','Encoding', + 'Exception','Failure','FatRat','Grammar','Hash','HyperWhatever','Instant', + 'Int','int16','int32','int64','int8','IntStr','IO','IO::ArgFiles', + 'IO::CatHandle','IO::Handle','IO::Notification','IO::Path', + 'IO::Path::Cygwin','IO::Path::QNX','IO::Path::Unix','IO::Path::Win32', + 'IO::Pipe','IO::Socket','IO::Socket::Async','IO::Socket::INET','IO::Spec', + 'IO::Spec::Cygwin','IO::Spec::QNX','IO::Spec::Unix','IO::Spec::Win32', + 'IO::Special','Iterable','Iterator','Junction','Kernel','Label','List', + 'Lock','Lock::Async','long','longlong','Macro','Map','Match', + 'Metamodel::AttributeContainer','Metamodel::C3MRO','Metamodel::ClassHOW', + 'Metamodel::EnumHOW','Metamodel::Finalization','Metamodel::MethodContainer', + 'Metamodel::MROBasedMethodDispatch','Metamodel::MultipleInheritance', + 'Metamodel::Naming','Metamodel::Primitives','Metamodel::PrivateMethodContainer', + 'Metamodel::RoleContainer','Metamodel::Trusting','Method','Mix','MixHash', + 'Mixy','Mu','NFC','NFD','NFKC','NFKD','Nil','Num','num32','num64', + 'Numeric','NumStr','ObjAt','Order','Pair','Parameter','Perl','Pod::Block', + 'Pod::Block::Code','Pod::Block::Comment','Pod::Block::Declarator', + 'Pod::Block::Named','Pod::Block::Para','Pod::Block::Table','Pod::Heading', + 'Pod::Item','Pointer','Positional','PositionalBindFailover','Proc', + 'Proc::Async','Promise','Proxy','PseudoStash','QuantHash','Range','Rat', + 'Rational','RatStr','Real','Regex','Routine','Scalar','Scheduler', + 'Semaphore','Seq','Set','SetHash','Setty','Signature','size_t','Slip', + 'Stash','Str','StrDistance','Stringy','Sub','Submethod','Supplier', + 'Supplier::Preserving','Supply','Systemic','Tap','Telemetry', + 'Telemetry::Instrument::Thread','Telemetry::Instrument::Usage', + 'Telemetry::Period','Telemetry::Sampler','Thread','ThreadPoolScheduler', + 'UInt','uint16','uint32','uint64','uint8','Uni','utf8','Variable', + 'Version','VM','Whatever','WhateverCode','WrapHandle' + ) + + PERL6_OPERATORS = ( + 'X', 'Z', 'after', 'also', 'and', 'andthen', 'before', 'cmp', 'div', + 'eq', 'eqv', 'extra', 'ff', 'fff', 'ge', 'gt', 'le', 'leg', 'lt', 'm', + 'mm', 'mod', 'ne', 'or', 'orelse', 'rx', 's', 'tr', 'x', 'xor', 'xx', + '++', '--', '**', '!', '+', '-', '~', '?', '|', '||', '+^', '~^', '?^', + '^', '*', '/', '%', '%%', '+&', '+<', '+>', '~&', '~<', '~>', '?&', + 'gcd', 'lcm', '+', '-', '+|', '+^', '~|', '~^', '?|', '?^', + '~', '&', '^', 'but', 'does', '<=>', '..', '..^', '^..', '^..^', + '!=', '==', '<', '<=', '>', '>=', '~~', '===', '!eqv', + '&&', '||', '^^', '//', 'min', 'max', '??', '!!', 'ff', 'fff', 'so', + 'not', '<==', '==>', '<<==', '==>>','unicmp', + ) + + # Perl 6 has a *lot* of possible bracketing characters + # this list was lifted from STD.pm6 (https://github.com/perl6/std) + PERL6_BRACKETS = { + '\u0028': '\u0029', '\u003c': '\u003e', '\u005b': '\u005d', + '\u007b': '\u007d', '\u00ab': '\u00bb', '\u0f3a': '\u0f3b', + '\u0f3c': '\u0f3d', '\u169b': '\u169c', '\u2018': '\u2019', + '\u201a': '\u2019', '\u201b': '\u2019', '\u201c': '\u201d', + '\u201e': '\u201d', '\u201f': '\u201d', '\u2039': '\u203a', + '\u2045': '\u2046', '\u207d': '\u207e', '\u208d': '\u208e', + '\u2208': '\u220b', '\u2209': '\u220c', '\u220a': '\u220d', + '\u2215': '\u29f5', '\u223c': '\u223d', '\u2243': '\u22cd', + '\u2252': '\u2253', '\u2254': '\u2255', '\u2264': '\u2265', + '\u2266': '\u2267', '\u2268': '\u2269', '\u226a': '\u226b', + '\u226e': '\u226f', '\u2270': '\u2271', '\u2272': '\u2273', + '\u2274': '\u2275', '\u2276': '\u2277', '\u2278': '\u2279', + '\u227a': '\u227b', '\u227c': '\u227d', '\u227e': '\u227f', + '\u2280': '\u2281', '\u2282': '\u2283', '\u2284': '\u2285', + '\u2286': '\u2287', '\u2288': '\u2289', '\u228a': '\u228b', + '\u228f': '\u2290', '\u2291': '\u2292', '\u2298': '\u29b8', + '\u22a2': '\u22a3', '\u22a6': '\u2ade', '\u22a8': '\u2ae4', + '\u22a9': '\u2ae3', '\u22ab': '\u2ae5', '\u22b0': '\u22b1', + '\u22b2': '\u22b3', '\u22b4': '\u22b5', '\u22b6': '\u22b7', + '\u22c9': '\u22ca', '\u22cb': '\u22cc', '\u22d0': '\u22d1', + '\u22d6': '\u22d7', '\u22d8': '\u22d9', '\u22da': '\u22db', + '\u22dc': '\u22dd', '\u22de': '\u22df', '\u22e0': '\u22e1', + '\u22e2': '\u22e3', '\u22e4': '\u22e5', '\u22e6': '\u22e7', + '\u22e8': '\u22e9', '\u22ea': '\u22eb', '\u22ec': '\u22ed', + '\u22f0': '\u22f1', '\u22f2': '\u22fa', '\u22f3': '\u22fb', + '\u22f4': '\u22fc', '\u22f6': '\u22fd', '\u22f7': '\u22fe', + '\u2308': '\u2309', '\u230a': '\u230b', '\u2329': '\u232a', + '\u23b4': '\u23b5', '\u2768': '\u2769', '\u276a': '\u276b', + '\u276c': '\u276d', '\u276e': '\u276f', '\u2770': '\u2771', + '\u2772': '\u2773', '\u2774': '\u2775', '\u27c3': '\u27c4', + '\u27c5': '\u27c6', '\u27d5': '\u27d6', '\u27dd': '\u27de', + '\u27e2': '\u27e3', '\u27e4': '\u27e5', '\u27e6': '\u27e7', + '\u27e8': '\u27e9', '\u27ea': '\u27eb', '\u2983': '\u2984', + '\u2985': '\u2986', '\u2987': '\u2988', '\u2989': '\u298a', + '\u298b': '\u298c', '\u298d': '\u298e', '\u298f': '\u2990', + '\u2991': '\u2992', '\u2993': '\u2994', '\u2995': '\u2996', + '\u2997': '\u2998', '\u29c0': '\u29c1', '\u29c4': '\u29c5', + '\u29cf': '\u29d0', '\u29d1': '\u29d2', '\u29d4': '\u29d5', + '\u29d8': '\u29d9', '\u29da': '\u29db', '\u29f8': '\u29f9', + '\u29fc': '\u29fd', '\u2a2b': '\u2a2c', '\u2a2d': '\u2a2e', + '\u2a34': '\u2a35', '\u2a3c': '\u2a3d', '\u2a64': '\u2a65', + '\u2a79': '\u2a7a', '\u2a7d': '\u2a7e', '\u2a7f': '\u2a80', + '\u2a81': '\u2a82', '\u2a83': '\u2a84', '\u2a8b': '\u2a8c', + '\u2a91': '\u2a92', '\u2a93': '\u2a94', '\u2a95': '\u2a96', + '\u2a97': '\u2a98', '\u2a99': '\u2a9a', '\u2a9b': '\u2a9c', + '\u2aa1': '\u2aa2', '\u2aa6': '\u2aa7', '\u2aa8': '\u2aa9', + '\u2aaa': '\u2aab', '\u2aac': '\u2aad', '\u2aaf': '\u2ab0', + '\u2ab3': '\u2ab4', '\u2abb': '\u2abc', '\u2abd': '\u2abe', + '\u2abf': '\u2ac0', '\u2ac1': '\u2ac2', '\u2ac3': '\u2ac4', + '\u2ac5': '\u2ac6', '\u2acd': '\u2ace', '\u2acf': '\u2ad0', + '\u2ad1': '\u2ad2', '\u2ad3': '\u2ad4', '\u2ad5': '\u2ad6', + '\u2aec': '\u2aed', '\u2af7': '\u2af8', '\u2af9': '\u2afa', + '\u2e02': '\u2e03', '\u2e04': '\u2e05', '\u2e09': '\u2e0a', + '\u2e0c': '\u2e0d', '\u2e1c': '\u2e1d', '\u2e20': '\u2e21', + '\u3008': '\u3009', '\u300a': '\u300b', '\u300c': '\u300d', + '\u300e': '\u300f', '\u3010': '\u3011', '\u3014': '\u3015', + '\u3016': '\u3017', '\u3018': '\u3019', '\u301a': '\u301b', + '\u301d': '\u301e', '\ufd3e': '\ufd3f', '\ufe17': '\ufe18', + '\ufe35': '\ufe36', '\ufe37': '\ufe38', '\ufe39': '\ufe3a', + '\ufe3b': '\ufe3c', '\ufe3d': '\ufe3e', '\ufe3f': '\ufe40', + '\ufe41': '\ufe42', '\ufe43': '\ufe44', '\ufe47': '\ufe48', + '\ufe59': '\ufe5a', '\ufe5b': '\ufe5c', '\ufe5d': '\ufe5e', + '\uff08': '\uff09', '\uff1c': '\uff1e', '\uff3b': '\uff3d', + '\uff5b': '\uff5d', '\uff5f': '\uff60', '\uff62': '\uff63', + } + + def _build_word_match(words, boundary_regex_fragment=None, prefix='', suffix=''): + if boundary_regex_fragment is None: + return r'\b(' + prefix + r'|'.join(re.escape(x) for x in words) + \ + suffix + r')\b' + else: + return r'(? 0: + next_open_pos = text.find(opening_chars, search_pos + n_chars) + next_close_pos = text.find(closing_chars, search_pos + n_chars) + + if next_close_pos == -1: + next_close_pos = len(text) + nesting_level = 0 + elif next_open_pos != -1 and next_open_pos < next_close_pos: + nesting_level += 1 + search_pos = next_open_pos + else: # next_close_pos < next_open_pos + nesting_level -= 1 + search_pos = next_close_pos + + end_pos = next_close_pos + + if end_pos < 0: # if we didn't find a closer, just highlight the + # rest of the text in this class + end_pos = len(text) + + if adverbs is not None and re.search(r':to\b', adverbs): + heredoc_terminator = text[match.start('delimiter') + n_chars:end_pos] + end_heredoc = re.search(r'^\s*' + re.escape(heredoc_terminator) + + r'\s*$', text[end_pos:], re.MULTILINE) + + if end_heredoc: + end_pos += end_heredoc.end() + else: + end_pos = len(text) + + yield match.start(), token_class, text[match.start():end_pos + n_chars] + context.pos = end_pos + n_chars + + return callback + + def opening_brace_callback(lexer, match, context): + stack = context.stack + + yield match.start(), Text, context.text[match.start():match.end()] + context.pos = match.end() + + # if we encounter an opening brace and we're one level + # below a token state, it means we need to increment + # the nesting level for braces so we know later when + # we should return to the token rules. + if len(stack) > 2 and stack[-2] == 'token': + context.perl6_token_nesting_level += 1 + + def closing_brace_callback(lexer, match, context): + stack = context.stack + + yield match.start(), Text, context.text[match.start():match.end()] + context.pos = match.end() + + # if we encounter a free closing brace and we're one level + # below a token state, it means we need to check the nesting + # level to see if we need to return to the token state. + if len(stack) > 2 and stack[-2] == 'token': + context.perl6_token_nesting_level -= 1 + if context.perl6_token_nesting_level == 0: + stack.pop() + + def embedded_perl6_callback(lexer, match, context): + context.perl6_token_nesting_level = 1 + yield match.start(), Text, context.text[match.start():match.end()] + context.pos = match.end() + context.stack.append('root') + + # If you're modifying these rules, be careful if you need to process '{' or '}' + # characters. We have special logic for processing these characters (due to the fact + # that you can nest Perl 6 code in regex blocks), so if you need to process one of + # them, make sure you also process the corresponding one! + tokens = { + 'common': [ + (r'#[`|=](?P(?P[' + ''.join(PERL6_BRACKETS) + r'])(?P=first_char)*)', + brackets_callback(Comment.Multiline)), + (r'#[^\n]*$', Comment.Single), + (r'^(\s*)=begin\s+(\w+)\b.*?^\1=end\s+\2', Comment.Multiline), + (r'^(\s*)=for.*?\n\s*?\n', Comment.Multiline), + (r'^=.*?\n\s*?\n', Comment.Multiline), + (r'(regex|token|rule)(\s*' + PERL6_IDENTIFIER_RANGE + '+:sym)', + bygroups(Keyword, Name), 'token-sym-brackets'), + (r'(regex|token|rule)(?!' + PERL6_IDENTIFIER_RANGE + r')(\s*' + PERL6_IDENTIFIER_RANGE + '+)?', + bygroups(Keyword, Name), 'pre-token'), + # deal with a special case in the Perl 6 grammar (role q { ... }) + (r'(role)(\s+)(q)(\s*)', bygroups(Keyword, Whitespace, Name, Whitespace)), + (_build_word_match(PERL6_KEYWORDS, PERL6_IDENTIFIER_RANGE), Keyword), + (_build_word_match(PERL6_BUILTIN_CLASSES, PERL6_IDENTIFIER_RANGE, suffix='(?::[UD])?'), + Name.Builtin), + (_build_word_match(PERL6_BUILTINS, PERL6_IDENTIFIER_RANGE), Name.Builtin), + # copied from PerlLexer + (r'[$@%&][.^:?=!~]?' + PERL6_IDENTIFIER_RANGE + '+(?:<<.*?>>|<.*?>|«.*?»)*', + Name.Variable), + (r'\$[!/](?:<<.*?>>|<.*?>|«.*?»)*', Name.Variable.Global), + (r'::\?\w+', Name.Variable.Global), + (r'[$@%&]\*' + PERL6_IDENTIFIER_RANGE + '+(?:<<.*?>>|<.*?>|«.*?»)*', + Name.Variable.Global), + (r'\$(?:<.*?>)+', Name.Variable), + (r'(?:q|qq|Q)[a-zA-Z]?\s*(?P:[\w\s:]+)?\s*(?P(?P[^0-9a-zA-Z:\s])' + r'(?P=first_char)*)', brackets_callback(String)), + # copied from PerlLexer + (r'0_?[0-7]+(_[0-7]+)*', Number.Oct), + (r'0x[0-9A-Fa-f]+(_[0-9A-Fa-f]+)*', Number.Hex), + (r'0b[01]+(_[01]+)*', Number.Bin), + (r'(?i)(\d*(_\d*)*\.\d+(_\d*)*|\d+(_\d*)*\.\d+(_\d*)*)(e[+-]?\d+)?', + Number.Float), + (r'(?i)\d+(_\d*)*e[+-]?\d+(_\d*)*', Number.Float), + (r'\d+(_\d+)*', Number.Integer), + (r'(?<=~~)\s*/(?:\\\\|\\/|.)*?/', String.Regex), + (r'(?<=[=(,])\s*/(?:\\\\|\\/|.)*?/', String.Regex), + (r'm\w+(?=\()', Name), + (r'(?:m|ms|rx)\s*(?P:[\w\s:]+)?\s*(?P(?P[^\w:\s])' + r'(?P=first_char)*)', brackets_callback(String.Regex)), + (r'(?:s|ss|tr)\s*(?::[\w\s:]+)?\s*/(?:\\\\|\\/|.)*?/(?:\\\\|\\/|.)*?/', + String.Regex), + (r'<[^\s=].*?\S>', String), + (_build_word_match(PERL6_OPERATORS), Operator), + (r'\w' + PERL6_IDENTIFIER_RANGE + '*', Name), + (r"'(\\\\|\\[^\\]|[^'\\])*'", String), + (r'"(\\\\|\\[^\\]|[^"\\])*"', String), + ], + 'root': [ + include('common'), + (r'\{', opening_brace_callback), + (r'\}', closing_brace_callback), + (r'.+?', Text), + ], + 'pre-token': [ + include('common'), + (r'\{', Text, ('#pop', 'token')), + (r'.+?', Text), + ], + 'token-sym-brackets': [ + (r'(?P(?P[' + ''.join(PERL6_BRACKETS) + '])(?P=first_char)*)', + brackets_callback(Name), ('#pop', 'pre-token')), + default(('#pop', 'pre-token')), + ], + 'token': [ + (r'\}', Text, '#pop'), + (r'(?<=:)(?:my|our|state|constant|temp|let).*?;', using(this)), + # make sure that quotes in character classes aren't treated as strings + (r'<(?:[-!?+.]\s*)?\[.*?\]>', String.Regex), + # make sure that '#' characters in quotes aren't treated as comments + (r"(?my|our)\s+)?(?:module|class|role|enum|grammar)', line) + if class_decl: + if saw_perl_decl or class_decl.group('scope') is not None: + return True + rating = 0.05 + continue + break + + if ':=' in text: + # Same logic as above for PerlLexer + rating /= 2 + + return rating + + def __init__(self, **options): + super().__init__(**options) + self.encoding = options.get('encoding', 'utf-8') diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/phix.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/phix.py new file mode 100644 index 0000000000000000000000000000000000000000..f0b03775e27efedbcd60b6f8ef0df0c93bb1eebc --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/phix.py @@ -0,0 +1,363 @@ +""" + pygments.lexers.phix + ~~~~~~~~~~~~~~~~~~~~ + + Lexers for Phix. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, words +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Whitespace + +__all__ = ['PhixLexer'] + + +class PhixLexer(RegexLexer): + """ + Pygments Lexer for Phix files (.exw). + See http://phix.x10.mx + """ + + name = 'Phix' + url = 'http://phix.x10.mx' + aliases = ['phix'] + filenames = ['*.exw'] + mimetypes = ['text/x-phix'] + version_added = '2.14' + + flags = re.MULTILINE # nb: **NOT** re.DOTALL! (totally spanners comment handling) + + preproc = ( + 'ifdef', 'elsifdef', 'elsedef' + ) + # Note these lists are auto-generated by pwa/p2js.exw, when pwa\src\p2js_keywords.e (etc) + # change, though of course subsequent copy/commit/pull requests are all manual steps. + types = ( + 'string', 'nullable_string', 'atom_string', 'atom', 'bool', 'boolean', + 'cdCanvan', 'cdCanvas', 'complex', 'CURLcode', 'dictionary', 'int', + 'integer', 'Ihandle', 'Ihandles', 'Ihandln', 'mpfr', 'mpq', 'mpz', + 'mpz_or_string', 'number', 'rid_string', 'seq', 'sequence', 'timedate', + 'object' + ) + keywords = ( + 'abstract', 'class', 'continue', 'export', 'extends', 'nullable', + 'private', 'public', 'static', 'struct', 'trace', + 'and', 'break', 'by', 'case', 'catch', 'const', 'constant', 'debug', + 'default', 'do', 'else', 'elsif', 'end', 'enum', 'exit', 'fallthru', + 'fallthrough', 'for', 'forward', 'function', 'global', 'if', 'in', + 'include', 'js', 'javascript', 'javascript_semantics', 'let', 'not', + 'or', 'procedure', 'profile', 'profile_time', 'return', 'safe_mode', + 'switch', 'then', 'to', 'try', 'type', 'type_check', 'until', 'warning', + 'while', 'with', 'without', 'xor' + ) + routines = ( + 'abort', 'abs', 'adjust_timedate', 'and_bits', 'and_bitsu', 'apply', + 'append', 'arccos', 'arcsin', 'arctan', 'assert', 'atan2', + 'atom_to_float32', 'atom_to_float64', 'bankers_rounding', 'beep', + 'begins', 'binary_search', 'bits_to_int', 'bk_color', 'bytes_to_int', + 'call_func', 'call_proc', 'cdCanvasActivate', 'cdCanvasArc', + 'cdCanvasBegin', 'cdCanvasBox', 'cdCanvasChord', 'cdCanvasCircle', + 'cdCanvasClear', 'cdCanvasEnd', 'cdCanvasFlush', 'cdCanvasFont', + 'cdCanvasGetImageRGB', 'cdCanvasGetSize', 'cdCanvasGetTextAlignment', + 'cdCanvasGetTextSize', 'cdCanvasLine', 'cdCanvasMark', + 'cdCanvasMarkSize', 'cdCanvasMultiLineVectorText', 'cdCanvasPixel', + 'cdCanvasRect', 'cdCanvasRoundedBox', 'cdCanvasRoundedRect', + 'cdCanvasSector', 'cdCanvasSetAttribute', 'cdCanvasSetBackground', + 'cdCanvasSetFillMode', 'cdCanvasSetForeground', + 'cdCanvasSetInteriorStyle', 'cdCanvasSetLineStyle', + 'cdCanvasSetLineWidth', 'cdCanvasSetTextAlignment', 'cdCanvasText', + 'cdCanvasSetTextOrientation', 'cdCanvasGetTextOrientation', + 'cdCanvasVectorText', 'cdCanvasVectorTextDirection', + 'cdCanvasVectorTextSize', 'cdCanvasVertex', 'cdCreateCanvas', + 'cdDecodeAlpha', 'cdDecodeColor', 'cdDecodeColorAlpha', 'cdEncodeAlpha', + 'cdEncodeColor', 'cdEncodeColorAlpha', 'cdKillCanvas', 'cdVersion', + 'cdVersionDate', 'ceil', 'change_timezone', 'choose', 'clear_screen', + 'columnize', 'command_line', 'compare', 'complex_abs', 'complex_add', + 'complex_arg', 'complex_conjugate', 'complex_cos', 'complex_cosh', + 'complex_div', 'complex_exp', 'complex_imag', 'complex_inv', + 'complex_log', 'complex_mul', 'complex_neg', 'complex_new', + 'complex_norm', 'complex_power', 'complex_rho', 'complex_real', + 'complex_round', 'complex_sin', 'complex_sinh', 'complex_sprint', + 'complex_sqrt', 'complex_sub', 'complex_theta', 'concat', 'cos', + 'crash', 'custom_sort', 'date', 'day_of_week', 'day_of_year', + 'days_in_month', 'decode_base64', 'decode_flags', 'deep_copy', 'deld', + 'deserialize', 'destroy_dict', 'destroy_queue', 'destroy_stack', + 'dict_name', 'dict_size', 'elapsed', 'elapsed_short', 'encode_base64', + 'equal', 'even', 'exp', 'extract', 'factorial', 'factors', + 'file_size_k', 'find', 'find_all', 'find_any', 'find_replace', 'filter', + 'flatten', 'float32_to_atom', 'float64_to_atom', 'floor', + 'format_timedate', 'free_console', 'from_polar', 'gcd', 'get_file_base', + 'get_file_extension', 'get_file_name', 'get_file_name_and_path', + 'get_file_path', 'get_file_path_and_name', 'get_maxprime', 'get_prime', + 'get_primes', 'get_primes_le', 'get_proper_dir', 'get_proper_path', + 'get_rand', 'get_routine_info', 'get_test_abort', 'get_test_logfile', + 'get_test_pause', 'get_test_verbosity', 'get_tzid', 'getd', 'getdd', + 'getd_all_keys', 'getd_by_index', 'getd_index', 'getd_partial_key', + 'glAttachShader', 'glBindBuffer', 'glBindTexture', 'glBufferData', + 'glCanvasSpecialText', 'glClear', 'glClearColor', 'glColor', + 'glCompileShader', 'glCreateBuffer', 'glCreateProgram', + 'glCreateShader', 'glCreateTexture', 'glDeleteProgram', + 'glDeleteShader', 'glDrawArrays', 'glEnable', + 'glEnableVertexAttribArray', 'glFloat32Array', 'glInt32Array', + 'glFlush', 'glGetAttribLocation', 'glGetError', 'glGetProgramInfoLog', + 'glGetProgramParameter', 'glGetShaderInfoLog', 'glGetShaderParameter', + 'glGetUniformLocation', 'glLinkProgram', 'glLoadIdentity', + 'glMatrixMode', 'glOrtho', 'glRotatef', 'glShadeModel', + 'glShaderSource', 'glSimpleA7texcoords', 'glTexImage2Dc', + 'glTexParameteri', 'glTranslate', 'glUniform1f', 'glUniform1i', + 'glUniformMatrix4fv', 'glUseProgram', 'glVertex', + 'glVertexAttribPointer', 'glViewport', 'head', 'hsv_to_rgb', 'iff', + 'iif', 'include_file', 'incl0de_file', 'insert', 'instance', + 'int_to_bits', 'int_to_bytes', 'is_dict', 'is_integer', 's_leap_year', + 'is_prime', 'is_prime2', 'islower', 'isupper', 'Icallback', + 'iup_isdouble', 'iup_isprint', 'iup_XkeyBase', 'IupAppend', 'IupAlarm', + 'IupBackgroundBox', 'IupButton', 'IupCalendar', 'IupCanvas', + 'IupClipboard', 'IupClose', 'IupCloseOnEscape', 'IupControlsOpen', + 'IupDatePick', 'IupDestroy', 'IupDialog', 'IupDrawArc', 'IupDrawBegin', + 'IupDrawEnd', 'IupDrawGetSize', 'IupDrawGetTextSize', 'IupDrawLine', + 'IupDrawRectangle', 'IupDrawText', 'IupExpander', 'IupFill', + 'IupFlatLabel', 'IupFlatList', 'IupFlatTree', 'IupFlush', 'IupFrame', + 'IupGetAttribute', 'IupGetAttributeId', 'IupGetAttributePtr', + 'IupGetBrother', 'IupGetChild', 'IupGetChildCount', 'IupGetClassName', + 'IupGetDialog', 'IupGetDialogChild', 'IupGetDouble', 'IupGetFocus', + 'IupGetGlobal', 'IupGetGlobalInt', 'IupGetGlobalIntInt', 'IupGetInt', + 'IupGetInt2', 'IupGetIntId', 'IupGetIntInt', 'IupGetParent', + 'IupGLCanvas', 'IupGLCanvasOpen', 'IupGLMakeCurrent', 'IupGraph', + 'IupHbox', 'IupHide', 'IupImage', 'IupImageRGBA', 'IupItem', + 'iupKeyCodeToName', 'IupLabel', 'IupLink', 'IupList', 'IupMap', + 'IupMenu', 'IupMenuItem', 'IupMessage', 'IupMessageDlg', 'IupMultiBox', + 'IupMultiLine', 'IupNextField', 'IupNormaliser', 'IupOpen', + 'IupPlayInput', 'IupPopup', 'IupPreviousField', 'IupProgressBar', + 'IupRadio', 'IupRecordInput', 'IupRedraw', 'IupRefresh', + 'IupRefreshChildren', 'IupSeparator', 'IupSetAttribute', + 'IupSetAttributes', 'IupSetAttributeHandle', 'IupSetAttributeId', + 'IupSetAttributePtr', 'IupSetCallback', 'IupSetCallbacks', + 'IupSetDouble', 'IupSetFocus', 'IupSetGlobal', 'IupSetGlobalInt', + 'IupSetGlobalFunction', 'IupSetHandle', 'IupSetInt', + 'IupSetStrAttribute', 'IupSetStrGlobal', 'IupShow', 'IupShowXY', + 'IupSplit', 'IupStoreAttribute', 'IupSubmenu', 'IupTable', + 'IupTableClearSelected', 'IupTableClick_cb', 'IupTableGetSelected', + 'IupTableResize_cb', 'IupTableSetData', 'IupTabs', 'IupText', + 'IupTimer', 'IupToggle', 'IupTreeAddNodes', 'IupTreeView', 'IupUpdate', + 'IupValuator', 'IupVbox', 'join', 'join_by', 'join_path', 'k_perm', + 'largest', 'lcm', 'length', 'log', 'log10', 'log2', 'lower', + 'm4_crossProduct', 'm4_inverse', 'm4_lookAt', 'm4_multiply', + 'm4_normalize', 'm4_perspective', 'm4_subtractVectors', 'm4_xRotate', + 'm4_yRotate', 'machine_bits', 'machine_word', 'match', 'match_all', + 'match_replace', 'max', 'maxsq', 'min', 'minsq', 'mod', 'mpfr_add', + 'mpfr_ceil', 'mpfr_cmp', 'mpfr_cmp_si', 'mpfr_const_pi', 'mpfr_div', + 'mpfr_div_si', 'mpfr_div_z', 'mpfr_floor', 'mpfr_free', 'mpfr_get_d', + 'mpfr_get_default_precision', 'mpfr_get_default_rounding_mode', + 'mpfr_get_fixed', 'mpfr_get_precision', 'mpfr_get_si', 'mpfr_init', + 'mpfr_inits', 'mpfr_init_set', 'mpfr_init_set_q', 'mpfr_init_set_z', + 'mpfr_mul', 'mpfr_mul_si', 'mpfr_pow_si', 'mpfr_set', 'mpfr_set_d', + 'mpfr_set_default_precision', 'mpfr_set_default_rounding_mode', + 'mpfr_set_precision', 'mpfr_set_q', 'mpfr_set_si', 'mpfr_set_str', + 'mpfr_set_z', 'mpfr_si_div', 'mpfr_si_sub', 'mpfr_sqrt', 'mpfr_sub', + 'mpfr_sub_si', 'mpq_abs', 'mpq_add', 'mpq_add_si', 'mpq_canonicalize', + 'mpq_cmp', 'mpq_cmp_si', 'mpq_div', 'mpq_div_2exp', 'mpq_free', + 'mpq_get_den', 'mpq_get_num', 'mpq_get_str', 'mpq_init', 'mpq_init_set', + 'mpq_init_set_si', 'mpq_init_set_str', 'mpq_init_set_z', 'mpq_inits', + 'mpq_inv', 'mpq_mul', 'mpq_neg', 'mpq_set', 'mpq_set_si', 'mpq_set_str', + 'mpq_set_z', 'mpq_sub', 'mpz_abs', 'mpz_add', 'mpz_addmul', + 'mpz_addmul_ui', 'mpz_addmul_si', 'mpz_add_si', 'mpz_add_ui', 'mpz_and', + 'mpz_bin_uiui', 'mpz_cdiv_q', 'mpz_cmp', 'mpz_cmp_si', 'mpz_divexact', + 'mpz_divexact_ui', 'mpz_divisible_p', 'mpz_divisible_ui_p', 'mpz_even', + 'mpz_fac_ui', 'mpz_factorstring', 'mpz_fdiv_q', 'mpz_fdiv_q_2exp', + 'mpz_fdiv_q_ui', 'mpz_fdiv_qr', 'mpz_fdiv_r', 'mpz_fdiv_ui', + 'mpz_fib_ui', 'mpz_fib2_ui', 'mpz_fits_atom', 'mpz_fits_integer', + 'mpz_free', 'mpz_gcd', 'mpz_gcd_ui', 'mpz_get_atom', 'mpz_get_integer', + 'mpz_get_short_str', 'mpz_get_str', 'mpz_init', 'mpz_init_set', + 'mpz_inits', 'mpz_invert', 'mpz_lcm', 'mpz_lcm_ui', 'mpz_max', + 'mpz_min', 'mpz_mod', 'mpz_mod_ui', 'mpz_mul', 'mpz_mul_2exp', + 'mpz_mul_d', 'mpz_mul_si', 'mpz_neg', 'mpz_nthroot', 'mpz_odd', + 'mpz_pollard_rho', 'mpz_pow_ui', 'mpz_powm', 'mpz_powm_ui', 'mpz_prime', + 'mpz_prime_factors', 'mpz_prime_mr', 'mpz_rand', 'mpz_rand_ui', + 'mpz_re_compose', 'mpz_remove', 'mpz_scan0', 'mpz_scan1', 'mpz_set', + 'mpz_set_d', 'mpz_set_si', 'mpz_set_str', 'mpz_set_v', 'mpz_sign', + 'mpz_sizeinbase', 'mpz_sqrt', 'mpz_sub', 'mpz_sub_si', 'mpz_sub_ui', + 'mpz_si_sub', 'mpz_tdiv_q_2exp', 'mpz_tdiv_r_2exp', 'mpz_tstbit', + 'mpz_ui_pow_ui', 'mpz_xor', 'named_dict', 'new_dict', 'new_queue', + 'new_stack', 'not_bits', 'not_bitsu', 'odd', 'or_all', 'or_allu', + 'or_bits', 'or_bitsu', 'ord', 'ordinal', 'ordinant', + 'override_timezone', 'pad', 'pad_head', 'pad_tail', 'parse_date_string', + 'papply', 'peep', 'peepn', 'peep_dict', 'permute', 'permutes', + 'platform', 'pop', 'popn', 'pop_dict', 'power', 'pp', 'ppEx', 'ppExf', + 'ppf', 'ppOpt', 'pq_add', 'pq_destroy', 'pq_empty', 'pq_new', 'pq_peek', + 'pq_pop', 'pq_pop_data', 'pq_size', 'prepend', 'prime_factors', + 'printf', 'product', 'proper', 'push', 'pushn', 'putd', 'puts', + 'queue_empty', 'queue_size', 'rand', 'rand_range', 'reinstate', + 'remainder', 'remove', 'remove_all', 'repeat', 'repeatch', 'replace', + 'requires', 'reverse', 'rfind', 'rgb', 'rmatch', 'rmdr', 'rnd', 'round', + 'routine_id', 'scanf', 'serialize', 'series', 'set_rand', + 'set_test_abort', 'set_test_logfile', 'set_test_module', + 'set_test_pause', 'set_test_verbosity', 'set_timedate_formats', + 'set_timezone', 'setd', 'setd_default', 'shorten', 'sha256', + 'shift_bits', 'shuffle', 'sign', 'sin', 'smallest', 'sort', + 'sort_columns', 'speak', 'splice', 'split', 'split_any', 'split_by', + 'sprint', 'sprintf', 'sq_abs', 'sq_add', 'sq_and', 'sq_and_bits', + 'sq_arccos', 'sq_arcsin', 'sq_arctan', 'sq_atom', 'sq_ceil', 'sq_cmp', + 'sq_cos', 'sq_div', 'sq_even', 'sq_eq', 'sq_floor', 'sq_floor_div', + 'sq_ge', 'sq_gt', 'sq_int', 'sq_le', 'sq_log', 'sq_log10', 'sq_log2', + 'sq_lt', 'sq_max', 'sq_min', 'sq_mod', 'sq_mul', 'sq_ne', 'sq_not', + 'sq_not_bits', 'sq_odd', 'sq_or', 'sq_or_bits', 'sq_power', 'sq_rand', + 'sq_remainder', 'sq_rmdr', 'sq_rnd', 'sq_round', 'sq_seq', 'sq_sign', + 'sq_sin', 'sq_sqrt', 'sq_str', 'sq_sub', 'sq_tan', 'sq_trunc', + 'sq_uminus', 'sq_xor', 'sq_xor_bits', 'sqrt', 'square_free', + 'stack_empty', 'stack_size', 'substitute', 'substitute_all', 'sum', + 'tail', 'tan', 'test_equal', 'test_fail', 'test_false', + 'test_not_equal', 'test_pass', 'test_summary', 'test_true', + 'text_color', 'throw', 'time', 'timedate_diff', 'timedelta', + 'to_integer', 'to_number', 'to_rgb', 'to_string', 'traverse_dict', + 'traverse_dict_partial_key', 'trim', 'trim_head', 'trim_tail', 'trunc', + 'tagset', 'tagstart', 'typeof', 'unique', 'unix_dict', 'upper', + 'utf8_to_utf32', 'utf32_to_utf8', 'version', 'vlookup', 'vslice', + 'wglGetProcAddress', 'wildcard_file', 'wildcard_match', 'with_rho', + 'with_theta', 'xml_new_doc', 'xml_new_element', 'xml_set_attribute', + 'xml_sprint', 'xor_bits', 'xor_bitsu', + 'accept', 'allocate', 'allocate_string', 'allow_break', 'ARM', + 'atom_to_float80', 'c_func', 'c_proc', 'call_back', 'chdir', + 'check_break', 'clearDib', 'close', 'closesocket', 'console', + 'copy_file', 'create', 'create_directory', 'create_thread', + 'curl_easy_cleanup', 'curl_easy_get_file', 'curl_easy_init', + 'curl_easy_perform', 'curl_easy_perform_ex', 'curl_easy_setopt', + 'curl_easy_strerror', 'curl_global_cleanup', 'curl_global_init', + 'curl_slist_append', 'curl_slist_free_all', 'current_dir', 'cursor', + 'define_c_func', 'define_c_proc', 'delete', 'delete_cs', 'delete_file', + 'dir', 'DLL', 'drawDib', 'drawShadedPolygonToDib', 'ELF32', 'ELF64', + 'enter_cs', 'eval', 'exit_thread', 'free', 'file_exists', 'final', + 'float80_to_atom', 'format', 'get_bytes', 'get_file_date', + 'get_file_size', 'get_file_type', 'get_interpreter', 'get_key', + 'get_socket_error', 'get_text', 'get_thread_exitcode', 'get_thread_id', + 'getc', 'getenv', 'gets', 'getsockaddr', 'glBegin', 'glCallList', + 'glFrustum', 'glGenLists', 'glGetString', 'glLight', 'glMaterial', + 'glNewList', 'glNormal', 'glPopMatrix', 'glPushMatrix', 'glRotate', + 'glEnd', 'glEndList', 'glTexImage2D', 'goto', 'GUI', 'icons', 'ilASM', + 'include_files', 'include_paths', 'init_cs', 'ip_to_string', + 'IupConfig', 'IupConfigDialogClosed', 'IupConfigDialogShow', + 'IupConfigGetVariableInt', 'IupConfigLoad', 'IupConfigSave', + 'IupConfigSetVariableInt', 'IupExitLoop', 'IupFileDlg', 'IupFileList', + 'IupGLSwapBuffers', 'IupHelp', 'IupLoopStep', 'IupMainLoop', + 'IupNormalizer', 'IupPlot', 'IupPlotAdd', 'IupPlotBegin', 'IupPlotEnd', + 'IupPlotInsert', 'IupSaveImage', 'IupTreeGetUserId', 'IupUser', + 'IupVersion', 'IupVersionDate', 'IupVersionNumber', 'IupVersionShow', + 'killDib', 'leave_cs', 'listen', 'manifest', 'mem_copy', 'mem_set', + 'mpfr_gamma', 'mpfr_printf', 'mpfr_sprintf', 'mpz_export', 'mpz_import', + 'namespace', 'new', 'newDib', 'open', 'open_dll', 'PE32', 'PE64', + 'peek', 'peek_string', 'peek1s', 'peek1u', 'peek2s', 'peek2u', 'peek4s', + 'peek4u', 'peek8s', 'peek8u', 'peekNS', 'peekns', 'peeknu', 'poke', + 'poke2', 'poke4', 'poke8', 'pokeN', 'poke_string', 'poke_wstring', + 'position', 'progress', 'prompt_number', 'prompt_string', 'read_file', + 'read_lines', 'recv', 'resume_thread', 'seek', 'select', 'send', + 'setHandler', 'shutdown', 'sleep', 'SO', 'sockaddr_in', 'socket', + 'split_path', 'suspend_thread', 'system', 'system_exec', 'system_open', + 'system_wait', 'task_clock_start', 'task_clock_stop', 'task_create', + 'task_delay', 'task_list', 'task_schedule', 'task_self', 'task_status', + 'task_suspend', 'task_yield', 'thread_safe_string', 'try_cs', + 'utf8_to_utf16', 'utf16_to_utf8', 'utf16_to_utf32', 'utf32_to_utf16', + 'video_config', 'WSACleanup', 'wait_thread', 'walk_dir', 'where', + 'write_lines', 'wait_key' + ) + constants = ( + 'ANY_QUEUE', 'ASCENDING', 'BLACK', 'BLOCK_CURSOR', 'BLUE', + 'BRIGHT_CYAN', 'BRIGHT_BLUE', 'BRIGHT_GREEN', 'BRIGHT_MAGENTA', + 'BRIGHT_RED', 'BRIGHT_WHITE', 'BROWN', 'C_DWORD', 'C_INT', 'C_POINTER', + 'C_USHORT', 'C_WORD', 'CD_AMBER', 'CD_BLACK', 'CD_BLUE', 'CD_BOLD', + 'CD_BOLD_ITALIC', 'CD_BOX', 'CD_CENTER', 'CD_CIRCLE', 'CD_CLOSED_LINES', + 'CD_CONTINUOUS', 'CD_CUSTOM', 'CD_CYAN', 'CD_DARK_BLUE', 'CD_DARK_CYAN', + 'CD_DARK_GRAY', 'CD_DARK_GREY', 'CD_DARK_GREEN', 'CD_DARK_MAGENTA', + 'CD_DARK_RED', 'CD_DARK_YELLOW', 'CD_DASH_DOT', 'CD_DASH_DOT_DOT', + 'CD_DASHED', 'CD_DBUFFER', 'CD_DEG2RAD', 'CD_DIAMOND', 'CD_DOTTED', + 'CD_EAST', 'CD_EVENODD', 'CD_FILL', 'CD_GL', 'CD_GRAY', 'CD_GREY', + 'CD_GREEN', 'CD_HATCH', 'CD_HOLLOW', 'CD_HOLLOW_BOX', + 'CD_HOLLOW_CIRCLE', 'CD_HOLLOW_DIAMOND', 'CD_INDIGO', 'CD_ITALIC', + 'CD_IUP', 'CD_IUPDBUFFER', 'CD_LIGHT_BLUE', 'CD_LIGHT_GRAY', + 'CD_LIGHT_GREY', 'CD_LIGHT_GREEN', 'CD_LIGHT_PARCHMENT', 'CD_MAGENTA', + 'CD_NAVY', 'CD_NORTH', 'CD_NORTH_EAST', 'CD_NORTH_WEST', 'CD_OLIVE', + 'CD_OPEN_LINES', 'CD_ORANGE', 'CD_PARCHMENT', 'CD_PATTERN', + 'CD_PRINTER', 'CD_PURPLE', 'CD_PLAIN', 'CD_PLUS', 'CD_QUERY', + 'CD_RAD2DEG', 'CD_RED', 'CD_SILVER', 'CD_SOLID', 'CD_SOUTH_EAST', + 'CD_SOUTH_WEST', 'CD_STAR', 'CD_STIPPLE', 'CD_STRIKEOUT', + 'CD_UNDERLINE', 'CD_WEST', 'CD_WHITE', 'CD_WINDING', 'CD_VIOLET', + 'CD_X', 'CD_YELLOW', 'CURLE_OK', 'CURLOPT_MAIL_FROM', + 'CURLOPT_MAIL_RCPT', 'CURLOPT_PASSWORD', 'CURLOPT_READDATA', + 'CURLOPT_READFUNCTION', 'CURLOPT_SSL_VERIFYPEER', + 'CURLOPT_SSL_VERIFYHOST', 'CURLOPT_UPLOAD', 'CURLOPT_URL', + 'CURLOPT_USE_SSL', 'CURLOPT_USERNAME', 'CURLOPT_VERBOSE', + 'CURLOPT_WRITEFUNCTION', 'CURLUSESSL_ALL', 'CYAN', 'D_NAME', + 'D_ATTRIBUTES', 'D_SIZE', 'D_YEAR', 'D_MONTH', 'D_DAY', 'D_HOUR', + 'D_MINUTE', 'D_SECOND', 'D_CREATION', 'D_LASTACCESS', 'D_MODIFICATION', + 'DT_YEAR', 'DT_MONTH', 'DT_DAY', 'DT_HOUR', 'DT_MINUTE', 'DT_SECOND', + 'DT_DOW', 'DT_MSEC', 'DT_DOY', 'DT_GMT', 'EULER', 'E_CODE', 'E_ADDR', + 'E_LINE', 'E_RTN', 'E_NAME', 'E_FILE', 'E_PATH', 'E_USER', 'false', + 'False', 'FALSE', 'FIFO_QUEUE', 'FILETYPE_DIRECTORY', 'FILETYPE_FILE', + 'GET_EOF', 'GET_FAIL', 'GET_IGNORE', 'GET_SUCCESS', + 'GL_AMBIENT_AND_DIFFUSE', 'GL_ARRAY_BUFFER', 'GL_CLAMP', + 'GL_CLAMP_TO_BORDER', 'GL_CLAMP_TO_EDGE', 'GL_COLOR_BUFFER_BIT', + 'GL_COMPILE', 'GL_COMPILE_STATUS', 'GL_CULL_FACE', + 'GL_DEPTH_BUFFER_BIT', 'GL_DEPTH_TEST', 'GL_EXTENSIONS', 'GL_FLAT', + 'GL_FLOAT', 'GL_FRAGMENT_SHADER', 'GL_FRONT', 'GL_LIGHT0', + 'GL_LIGHTING', 'GL_LINEAR', 'GL_LINK_STATUS', 'GL_MODELVIEW', + 'GL_NEAREST', 'GL_NO_ERROR', 'GL_NORMALIZE', 'GL_POSITION', + 'GL_PROJECTION', 'GL_QUAD_STRIP', 'GL_QUADS', 'GL_RENDERER', + 'GL_REPEAT', 'GL_RGB', 'GL_RGBA', 'GL_SMOOTH', 'GL_STATIC_DRAW', + 'GL_TEXTURE_2D', 'GL_TEXTURE_MAG_FILTER', 'GL_TEXTURE_MIN_FILTER', + 'GL_TEXTURE_WRAP_S', 'GL_TEXTURE_WRAP_T', 'GL_TRIANGLES', + 'GL_UNSIGNED_BYTE', 'GL_VENDOR', 'GL_VERSION', 'GL_VERTEX_SHADER', + 'GRAY', 'GREEN', 'GT_LF_STRIPPED', 'GT_WHOLE_FILE', 'INVLN10', + 'IUP_CLOSE', 'IUP_CONTINUE', 'IUP_DEFAULT', 'IUP_BLACK', 'IUP_BLUE', + 'IUP_BUTTON1', 'IUP_BUTTON3', 'IUP_CENTER', 'IUP_CYAN', 'IUP_DARK_BLUE', + 'IUP_DARK_CYAN', 'IUP_DARK_GRAY', 'IUP_DARK_GREY', 'IUP_DARK_GREEN', + 'IUP_DARK_MAGENTA', 'IUP_DARK_RED', 'IUP_GRAY', 'IUP_GREY', 'IUP_GREEN', + 'IUP_IGNORE', 'IUP_INDIGO', 'IUP_MAGENTA', 'IUP_MASK_INT', + 'IUP_MASK_UINT', 'IUP_MOUSEPOS', 'IUP_NAVY', 'IUP_OLIVE', 'IUP_RECTEXT', + 'IUP_RED', 'IUP_LIGHT_BLUE', 'IUP_LIGHT_GRAY', 'IUP_LIGHT_GREY', + 'IUP_LIGHT_GREEN', 'IUP_ORANGE', 'IUP_PARCHMENT', 'IUP_PURPLE', + 'IUP_SILVER', 'IUP_TEAL', 'IUP_VIOLET', 'IUP_WHITE', 'IUP_YELLOW', + 'K_BS', 'K_cA', 'K_cC', 'K_cD', 'K_cF5', 'K_cK', 'K_cM', 'K_cN', 'K_cO', + 'K_cP', 'K_cR', 'K_cS', 'K_cT', 'K_cW', 'K_CR', 'K_DEL', 'K_DOWN', + 'K_END', 'K_ESC', 'K_F1', 'K_F2', 'K_F3', 'K_F4', 'K_F5', 'K_F6', + 'K_F7', 'K_F8', 'K_F9', 'K_F10', 'K_F11', 'K_F12', 'K_HOME', 'K_INS', + 'K_LEFT', 'K_MIDDLE', 'K_PGDN', 'K_PGUP', 'K_RIGHT', 'K_SP', 'K_TAB', + 'K_UP', 'K_h', 'K_i', 'K_j', 'K_p', 'K_r', 'K_s', 'JS', 'LIFO_QUEUE', + 'LINUX', 'MAX_HEAP', 'MAGENTA', 'MIN_HEAP', 'Nan', 'NO_CURSOR', 'null', + 'NULL', 'PI', 'pp_Ascii', 'pp_Brkt', 'pp_Date', 'pp_File', 'pp_FltFmt', + 'pp_Indent', 'pp_IntCh', 'pp_IntFmt', 'pp_Maxlen', 'pp_Nest', + 'pp_Pause', 'pp_Q22', 'pp_StrFmt', 'RED', 'SEEK_OK', 'SLASH', + 'TEST_ABORT', 'TEST_CRASH', 'TEST_PAUSE', 'TEST_PAUSE_FAIL', + 'TEST_QUIET', 'TEST_SHOW_ALL', 'TEST_SHOW_FAILED', 'TEST_SUMMARY', + 'true', 'True', 'TRUE', 'VC_SCRNLINES', 'WHITE', 'WINDOWS', 'YELLOW' + ) + + tokens = { + 'root': [ + (r"\s+", Whitespace), + (r'/\*|--/\*|#\[', Comment.Multiline, 'comment'), + (r'(?://|--|#!).*$', Comment.Single), +#Alt: +# (r'//.*$|--.*$|#!.*$', Comment.Single), + (r'"([^"\\]|\\.)*"', String.Other), + (r'\'[^\']*\'', String.Other), + (r'`[^`]*`', String.Other), + + (words(types, prefix=r'\b', suffix=r'\b'), Name.Function), + (words(routines, prefix=r'\b', suffix=r'\b'), Name.Function), + (words(preproc, prefix=r'\b', suffix=r'\b'), Keyword.Declaration), + (words(keywords, prefix=r'\b', suffix=r'\b'), Keyword.Declaration), + (words(constants, prefix=r'\b', suffix=r'\b'), Name.Constant), + # Aside: Phix only supports/uses the ascii/non-unicode tilde + (r'!=|==|<<|>>|:=|[-~+/*%=<>&^|\.(){},?:\[\]$\\;#]', Operator), + (r'[\w-]+', Text) + ], + 'comment': [ + (r'[^*/#]+', Comment.Multiline), + (r'/\*|#\[', Comment.Multiline, '#push'), + (r'\*/|#\]', Comment.Multiline, '#pop'), + (r'[*/#]', Comment.Multiline) + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/prolog.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/prolog.py new file mode 100644 index 0000000000000000000000000000000000000000..7bf951c1c4fdc68c5748ef7eba807b41ea5f8847 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/prolog.py @@ -0,0 +1,318 @@ +""" + pygments.lexers.prolog + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for Prolog and Prolog-like languages. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, bygroups +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation + +__all__ = ['PrologLexer', 'LogtalkLexer'] + + +class PrologLexer(RegexLexer): + """ + Lexer for Prolog files. + """ + name = 'Prolog' + aliases = ['prolog'] + filenames = ['*.ecl', '*.prolog', '*.pro', '*.pl'] + mimetypes = ['text/x-prolog'] + url = 'https://en.wikipedia.org/wiki/Prolog' + version_added = '' + + tokens = { + 'root': [ + (r'/\*', Comment.Multiline, 'nested-comment'), + (r'%.*', Comment.Single), + # character literal + (r'0\'.', String.Char), + (r'0b[01]+', Number.Bin), + (r'0o[0-7]+', Number.Oct), + (r'0x[0-9a-fA-F]+', Number.Hex), + # literal with prepended base + (r'\d\d?\'[a-zA-Z0-9]+', Number.Integer), + (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float), + (r'\d+', Number.Integer), + (r'[\[\](){}|.,;!]', Punctuation), + (r':-|-->', Punctuation), + (r'"(?:\\x[0-9a-fA-F]+\\|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|' + r'\\[0-7]+\\|\\["\\abcefnrstv]|[^\\"])*"', String.Double), + (r"'(?:''|[^'])*'", String.Atom), # quoted atom + # Needs to not be followed by an atom. + # (r'=(?=\s|[a-zA-Z\[])', Operator), + (r'is\b', Operator), + (r'(<|>|=<|>=|==|=:=|=|/|//|\*|\+|-)(?=\s|[a-zA-Z0-9\[])', + Operator), + (r'(mod|div|not)\b', Operator), + (r'_', Keyword), # The don't-care variable + (r'([a-z]+)(:)', bygroups(Name.Namespace, Punctuation)), + (r'([a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]' + r'[\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)' + r'(\s*)(:-|-->)', + bygroups(Name.Function, Text, Operator)), # function defn + (r'([a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]' + r'[\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)' + r'(\s*)(\()', + bygroups(Name.Function, Text, Punctuation)), + (r'[a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]' + r'[\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*', + String.Atom), # atom, characters + # This one includes ! + (r'[#&*+\-./:<=>?@\\^~\u00a1-\u00bf\u2010-\u303f]+', + String.Atom), # atom, graphics + (r'[A-Z_]\w*', Name.Variable), + (r'\s+|[\u2000-\u200f\ufff0-\ufffe\uffef]', Text), + ], + 'nested-comment': [ + (r'\*/', Comment.Multiline, '#pop'), + (r'/\*', Comment.Multiline, '#push'), + (r'[^*/]+', Comment.Multiline), + (r'[*/]', Comment.Multiline), + ], + } + + def analyse_text(text): + """Competes with IDL and Visual Prolog on *.pro""" + if ':-' in text: + # Visual Prolog also uses :- + return 0.5 + else: + return 0 + + +class LogtalkLexer(RegexLexer): + """ + For Logtalk source code. + """ + + name = 'Logtalk' + url = 'http://logtalk.org/' + aliases = ['logtalk'] + filenames = ['*.lgt', '*.logtalk'] + mimetypes = ['text/x-logtalk'] + version_added = '0.10' + + tokens = { + 'root': [ + # Directives + (r'^\s*:-\s', Punctuation, 'directive'), + # Comments + (r'%.*?\n', Comment), + (r'/\*(.|\n)*?\*/', Comment), + # Whitespace + (r'\n', Text), + (r'\s+', Text), + # Numbers + (r"0'[\\]?.", Number), + (r'0b[01]+', Number.Bin), + (r'0o[0-7]+', Number.Oct), + (r'0x[0-9a-fA-F]+', Number.Hex), + (r'\d+\.?\d*((e|E)(\+|-)?\d+)?', Number), + # Variables + (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable), + # Event handlers + (r'(after|before)(?=[(])', Keyword), + # Message forwarding handler + (r'forward(?=[(])', Keyword), + # Execution-context methods + (r'(context|parameter|this|se(lf|nder))(?=[(])', Keyword), + # Reflection + (r'(current_predicate|predicate_property)(?=[(])', Keyword), + # DCGs and term expansion + (r'(expand_(goal|term)|(goal|term)_expansion|phrase)(?=[(])', Keyword), + # Entity + (r'(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])', Keyword), + (r'(object|protocol|category)_property(?=[(])', Keyword), + # Entity relations + (r'co(mplements_object|nforms_to_protocol)(?=[(])', Keyword), + (r'extends_(object|protocol|category)(?=[(])', Keyword), + (r'imp(lements_protocol|orts_category)(?=[(])', Keyword), + (r'(instantiat|specializ)es_class(?=[(])', Keyword), + # Events + (r'(current_event|(abolish|define)_events)(?=[(])', Keyword), + # Flags + (r'(create|current|set)_logtalk_flag(?=[(])', Keyword), + # Compiling, loading, and library paths + (r'logtalk_(compile|l(ibrary_path|oad|oad_context)|make(_target_action)?)(?=[(])', Keyword), + (r'\blogtalk_make\b', Keyword), + # Database + (r'(clause|retract(all)?)(?=[(])', Keyword), + (r'a(bolish|ssert(a|z))(?=[(])', Keyword), + # Control constructs + (r'(ca(ll|tch)|throw)(?=[(])', Keyword), + (r'(fa(il|lse)|true|(instantiation|system)_error)\b', Keyword), + (r'(uninstantiation|type|domain|existence|permission|representation|evaluation|resource|syntax)_error(?=[(])', Keyword), + # All solutions + (r'((bag|set)of|f(ind|or)all)(?=[(])', Keyword), + # Multi-threading predicates + (r'threaded(_(ca(ll|ncel)|once|ignore|exit|peek|wait|notify))?(?=[(])', Keyword), + # Engine predicates + (r'threaded_engine(_(create|destroy|self|next|next_reified|yield|post|fetch))?(?=[(])', Keyword), + # Term unification + (r'(subsumes_term|unify_with_occurs_check)(?=[(])', Keyword), + # Term creation and decomposition + (r'(functor|arg|copy_term|numbervars|term_variables)(?=[(])', Keyword), + # Evaluable functors + (r'(div|rem|m(ax|in|od)|abs|sign)(?=[(])', Keyword), + (r'float(_(integer|fractional)_part)?(?=[(])', Keyword), + (r'(floor|t(an|runcate)|round|ceiling)(?=[(])', Keyword), + # Other arithmetic functors + (r'(cos|a(cos|sin|tan|tan2)|exp|log|s(in|qrt)|xor)(?=[(])', Keyword), + # Term testing + (r'(var|atom(ic)?|integer|float|c(allable|ompound)|n(onvar|umber)|ground|acyclic_term)(?=[(])', Keyword), + # Term comparison + (r'compare(?=[(])', Keyword), + # Stream selection and control + (r'(curren|se)t_(in|out)put(?=[(])', Keyword), + (r'(open|close)(?=[(])', Keyword), + (r'flush_output(?=[(])', Keyword), + (r'(at_end_of_stream|flush_output)\b', Keyword), + (r'(stream_property|at_end_of_stream|set_stream_position)(?=[(])', Keyword), + # Character and byte input/output + (r'(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])', Keyword), + (r'\bnl\b', Keyword), + # Term input/output + (r'read(_term)?(?=[(])', Keyword), + (r'write(q|_(canonical|term))?(?=[(])', Keyword), + (r'(current_)?op(?=[(])', Keyword), + (r'(current_)?char_conversion(?=[(])', Keyword), + # Atomic term processing + (r'atom_(length|c(hars|o(ncat|des)))(?=[(])', Keyword), + (r'(char_code|sub_atom)(?=[(])', Keyword), + (r'number_c(har|ode)s(?=[(])', Keyword), + # Implementation defined hooks functions + (r'(se|curren)t_prolog_flag(?=[(])', Keyword), + (r'\bhalt\b', Keyword), + (r'halt(?=[(])', Keyword), + # Message sending operators + (r'(::|:|\^\^)', Operator), + # External call + (r'[{}]', Keyword), + # Logic and control + (r'(ignore|once)(?=[(])', Keyword), + (r'\brepeat\b', Keyword), + # Sorting + (r'(key)?sort(?=[(])', Keyword), + # Bitwise functors + (r'(>>|<<|/\\|\\\\|\\)', Operator), + # Predicate aliases + (r'\bas\b', Operator), + # Arithmetic evaluation + (r'\bis\b', Keyword), + # Arithmetic comparison + (r'(=:=|=\\=|<|=<|>=|>)', Operator), + # Term creation and decomposition + (r'=\.\.', Operator), + # Term unification + (r'(=|\\=)', Operator), + # Term comparison + (r'(==|\\==|@=<|@<|@>=|@>)', Operator), + # Evaluable functors + (r'(//|[-+*/])', Operator), + (r'\b(e|pi|div|mod|rem)\b', Operator), + # Other arithmetic functors + (r'\b\*\*\b', Operator), + # DCG rules + (r'-->', Operator), + # Control constructs + (r'([!;]|->)', Operator), + # Logic and control + (r'\\+', Operator), + # Mode operators + (r'[?@]', Operator), + # Existential quantifier + (r'\^', Operator), + # Punctuation + (r'[()\[\],.|]', Text), + # Atoms + (r"[a-z][a-zA-Z0-9_]*", Text), + (r"'", String, 'quoted_atom'), + # Double-quoted terms + (r'"', String, 'double_quoted_term'), + ], + + 'quoted_atom': [ + (r"''", String), + (r"'", String, '#pop'), + (r'\\([\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\)', String.Escape), + (r"[^\\'\n]+", String), + (r'\\', String), + ], + + 'double_quoted_term': [ + (r'""', String), + (r'"', String, '#pop'), + (r'\\([\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\)', String.Escape), + (r'[^\\"\n]+', String), + (r'\\', String), + ], + + 'directive': [ + # Conditional compilation directives + (r'(el)?if(?=[(])', Keyword, 'root'), + (r'(e(lse|ndif))(?=[.])', Keyword, 'root'), + # Entity directives + (r'(category|object|protocol)(?=[(])', Keyword, 'entityrelations'), + (r'(end_(category|object|protocol))(?=[.])', Keyword, 'root'), + # Predicate scope directives + (r'(public|protected|private)(?=[(])', Keyword, 'root'), + # Other directives + (r'e(n(coding|sure_loaded)|xport)(?=[(])', Keyword, 'root'), + (r'in(clude|itialization|fo)(?=[(])', Keyword, 'root'), + (r'(built_in|dynamic|synchronized|threaded)(?=[.])', Keyword, 'root'), + (r'(alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|ode|ultifile)|s(et_(logtalk|prolog)_flag|ynchronized))(?=[(])', Keyword, 'root'), + (r'op(?=[(])', Keyword, 'root'), + (r'(c(alls|oinductive)|module|reexport|use(s|_module))(?=[(])', Keyword, 'root'), + (r'[a-z][a-zA-Z0-9_]*(?=[(])', Text, 'root'), + (r'[a-z][a-zA-Z0-9_]*(?=[.])', Text, 'root'), + ], + + 'entityrelations': [ + (r'(complements|extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])', Keyword), + # Numbers + (r"0'[\\]?.", Number), + (r'0b[01]+', Number.Bin), + (r'0o[0-7]+', Number.Oct), + (r'0x[0-9a-fA-F]+', Number.Hex), + (r'\d+\.?\d*((e|E)(\+|-)?\d+)?', Number), + # Variables + (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable), + # Atoms + (r"[a-z][a-zA-Z0-9_]*", Text), + (r"'", String, 'quoted_atom'), + # Double-quoted terms + (r'"', String, 'double_quoted_term'), + # End of entity-opening directive + (r'([)]\.)', Text, 'root'), + # Scope operator + (r'(::)', Operator), + # Punctuation + (r'[()\[\],.|]', Text), + # Comments + (r'%.*?\n', Comment), + (r'/\*(.|\n)*?\*/', Comment), + # Whitespace + (r'\n', Text), + (r'\s+', Text), + ] + } + + def analyse_text(text): + if ':- object(' in text: + return 1.0 + elif ':- protocol(' in text: + return 1.0 + elif ':- category(' in text: + return 1.0 + elif re.search(r'^:-\s[a-z]', text, re.M): + return 0.9 + else: + return 0.0 diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/qvt.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/qvt.py new file mode 100644 index 0000000000000000000000000000000000000000..302d1b6ed894ef6a928fd09ba7b679791d4ddaa7 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/qvt.py @@ -0,0 +1,153 @@ +""" + pygments.lexers.qvt + ~~~~~~~~~~~~~~~~~~~ + + Lexer for QVT Operational language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups, include, combined, default, \ + words +from pygments.token import Text, Comment, Operator, Keyword, Punctuation, \ + Name, String, Number + +__all__ = ['QVToLexer'] + + +class QVToLexer(RegexLexer): + """ + For the QVT Operational Mapping language. + + Reference for implementing this: «Meta Object Facility (MOF) 2.0 + Query/View/Transformation Specification», Version 1.1 - January 2011 + (https://www.omg.org/spec/QVT/1.1/), see §8.4, «Concrete Syntax» in + particular. + + Notable tokens assignments: + + - Name.Class is assigned to the identifier following any of the following + keywords: metamodel, class, exception, primitive, enum, transformation + or library + + - Name.Function is assigned to the names of mappings and queries + + - Name.Builtin.Pseudo is assigned to the pre-defined variables 'this', + 'self' and 'result'. + """ + # With obvious borrowings & inspiration from the Java, Python and C lexers + + name = 'QVTO' + aliases = ['qvto', 'qvt'] + filenames = ['*.qvto'] + url = 'https://www.omg.org/spec/QVT/1.1' + version_added = '' + + tokens = { + 'root': [ + (r'\n', Text), + (r'[^\S\n]+', Text), + (r'(--|//)(\s*)(directive:)?(.*)$', + bygroups(Comment, Comment, Comment.Preproc, Comment)), + # Uncomment the following if you want to distinguish between + # '/*' and '/**', à la javadoc + # (r'/[*]{2}(.|\n)*?[*]/', Comment.Multiline), + (r'/[*](.|\n)*?[*]/', Comment.Multiline), + (r'\\\n', Text), + (r'(and|not|or|xor|##?)\b', Operator.Word), + (r'(:{1,2}=|[-+]=)\b', Operator.Word), + (r'(@|<<|>>)\b', Keyword), # stereotypes + (r'!=|<>|==|=|!->|->|>=|<=|[.]{3}|[+/*%=<>&|.~]', Operator), + (r'[]{}:(),;[]', Punctuation), + (r'(true|false|unlimited|null)\b', Keyword.Constant), + (r'(this|self|result)\b', Name.Builtin.Pseudo), + (r'(var)\b', Keyword.Declaration), + (r'(from|import)\b', Keyword.Namespace, 'fromimport'), + (r'(metamodel|class|exception|primitive|enum|transformation|' + r'library)(\s+)(\w+)', + bygroups(Keyword.Word, Text, Name.Class)), + (r'(exception)(\s+)(\w+)', + bygroups(Keyword.Word, Text, Name.Exception)), + (r'(main)\b', Name.Function), + (r'(mapping|helper|query)(\s+)', + bygroups(Keyword.Declaration, Text), 'operation'), + (r'(assert)(\s+)\b', bygroups(Keyword, Text), 'assert'), + (r'(Bag|Collection|Dict|OrderedSet|Sequence|Set|Tuple|List)\b', + Keyword.Type), + include('keywords'), + ('"', String, combined('stringescape', 'dqs')), + ("'", String, combined('stringescape', 'sqs')), + include('name'), + include('numbers'), + # (r'([a-zA-Z_]\w*)(::)([a-zA-Z_]\w*)', + # bygroups(Text, Text, Text)), + ], + + 'fromimport': [ + (r'(?:[ \t]|\\\n)+', Text), + (r'[a-zA-Z_][\w.]*', Name.Namespace), + default('#pop'), + ], + + 'operation': [ + (r'::', Text), + (r'(.*::)([a-zA-Z_]\w*)([ \t]*)(\()', + bygroups(Text, Name.Function, Text, Punctuation), '#pop') + ], + + 'assert': [ + (r'(warning|error|fatal)\b', Keyword, '#pop'), + default('#pop'), # all else: go back + ], + + 'keywords': [ + (words(( + 'abstract', 'access', 'any', 'assert', 'blackbox', 'break', + 'case', 'collect', 'collectNested', 'collectOne', 'collectselect', + 'collectselectOne', 'composes', 'compute', 'configuration', + 'constructor', 'continue', 'datatype', 'default', 'derived', + 'disjuncts', 'do', 'elif', 'else', 'end', 'endif', 'except', + 'exists', 'extends', 'forAll', 'forEach', 'forOne', 'from', 'if', + 'implies', 'in', 'inherits', 'init', 'inout', 'intermediate', + 'invresolve', 'invresolveIn', 'invresolveone', 'invresolveoneIn', + 'isUnique', 'iterate', 'late', 'let', 'literal', 'log', 'map', + 'merges', 'modeltype', 'new', 'object', 'one', 'ordered', 'out', + 'package', 'population', 'property', 'raise', 'readonly', + 'references', 'refines', 'reject', 'resolve', 'resolveIn', + 'resolveone', 'resolveoneIn', 'return', 'select', 'selectOne', + 'sortedBy', 'static', 'switch', 'tag', 'then', 'try', 'typedef', + 'unlimited', 'uses', 'when', 'where', 'while', 'with', 'xcollect', + 'xmap', 'xselect'), suffix=r'\b'), Keyword), + ], + + # There is no need to distinguish between String.Single and + # String.Double: 'strings' is factorised for 'dqs' and 'sqs' + 'strings': [ + (r'[^\\\'"\n]+', String), + # quotes, percents and backslashes must be parsed one at a time + (r'[\'"\\]', String), + ], + 'stringescape': [ + (r'\\([\\btnfr"\']|u[0-3][0-7]{2}|u[0-7]{1,2})', String.Escape) + ], + 'dqs': [ # double-quoted string + (r'"', String, '#pop'), + (r'\\\\|\\"', String.Escape), + include('strings') + ], + 'sqs': [ # single-quoted string + (r"'", String, '#pop'), + (r"\\\\|\\'", String.Escape), + include('strings') + ], + 'name': [ + (r'[a-zA-Z_]\w*', Name), + ], + # numbers: excerpt taken from the python lexer + 'numbers': [ + (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float), + (r'\d+[eE][+-]?[0-9]+', Number.Float), + (r'\d+', Number.Integer) + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/r.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/r.py new file mode 100644 index 0000000000000000000000000000000000000000..d3f65ba2d8644a6faa4f50526d2e31b08ed4d339 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/r.py @@ -0,0 +1,196 @@ +""" + pygments.lexers.r + ~~~~~~~~~~~~~~~~~ + + Lexers for the R/S languages. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import Lexer, RegexLexer, include, do_insertions +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Generic, Whitespace + +__all__ = ['RConsoleLexer', 'SLexer', 'RdLexer'] + + +line_re = re.compile('.*?\n') + + +class RConsoleLexer(Lexer): + """ + For R console transcripts or R CMD BATCH output files. + """ + + name = 'RConsole' + aliases = ['rconsole', 'rout'] + filenames = ['*.Rout'] + url = 'https://www.r-project.org' + version_added = '' + _example = "rconsole/r-console-transcript.Rout" + + def get_tokens_unprocessed(self, text): + slexer = SLexer(**self.options) + + current_code_block = '' + insertions = [] + + for match in line_re.finditer(text): + line = match.group() + if line.startswith('>') or line.startswith('+'): + # Colorize the prompt as such, + # then put rest of line into current_code_block + insertions.append((len(current_code_block), + [(0, Generic.Prompt, line[:2])])) + current_code_block += line[2:] + else: + # We have reached a non-prompt line! + # If we have stored prompt lines, need to process them first. + if current_code_block: + # Weave together the prompts and highlight code. + yield from do_insertions( + insertions, slexer.get_tokens_unprocessed(current_code_block)) + # Reset vars for next code block. + current_code_block = '' + insertions = [] + # Now process the actual line itself, this is output from R. + yield match.start(), Generic.Output, line + + # If we happen to end on a code block with nothing after it, need to + # process the last code block. This is neither elegant nor DRY so + # should be changed. + if current_code_block: + yield from do_insertions( + insertions, slexer.get_tokens_unprocessed(current_code_block)) + + +class SLexer(RegexLexer): + """ + For S, S-plus, and R source code. + """ + + name = 'S' + aliases = ['splus', 's', 'r'] + filenames = ['*.S', '*.R', '.Rhistory', '.Rprofile', '.Renviron'] + mimetypes = ['text/S-plus', 'text/S', 'text/x-r-source', 'text/x-r', + 'text/x-R', 'text/x-r-history', 'text/x-r-profile'] + url = 'https://www.r-project.org' + version_added = '0.10' + + valid_name = r'`[^`\\]*(?:\\.[^`\\]*)*`|(?:[a-zA-Z]|\.[A-Za-z_.])[\w.]*|\.' + tokens = { + 'comments': [ + (r'#.*$', Comment.Single), + ], + 'valid_name': [ + (valid_name, Name), + ], + 'function_name': [ + (rf'({valid_name})\s*(?=\()', Name.Function), + ], + 'punctuation': [ + (r'\[{1,2}|\]{1,2}|\(|\)|;|,', Punctuation), + ], + 'keywords': [ + (r'(if|else|for|while|repeat|in|next|break|return|switch|function)' + r'(?![\w.])', + Keyword.Reserved), + ], + 'operators': [ + (r'<>?|-|==|<=|>=|\|>|<|>|&&?|!=|\|\|?|\?', Operator), + (r'\*|\+|\^|/|!|%[^%]*%|=|~|\$|@|:{1,3}', Operator), + ], + 'builtin_symbols': [ + (r'(NULL|NA(_(integer|real|complex|character)_)?|' + r'letters|LETTERS|Inf|TRUE|FALSE|NaN|pi|\.\.(\.|[0-9]+))' + r'(?![\w.])', + Keyword.Constant), + (r'(T|F)\b', Name.Builtin.Pseudo), + ], + 'numbers': [ + # hex number + (r'0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?', Number.Hex), + # decimal number + (r'[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+|\.)([eE][+-]?[0-9]+)?[Li]?', + Number), + ], + 'statements': [ + include('comments'), + # whitespaces + (r'\s+', Whitespace), + (r'\'', String, 'string_squote'), + (r'\"', String, 'string_dquote'), + include('builtin_symbols'), + include('keywords'), + include('function_name'), + include('valid_name'), + include('numbers'), + include('punctuation'), + include('operators'), + ], + 'root': [ + # calls: + include('statements'), + # blocks: + (r'\{|\}', Punctuation), + # (r'\{', Punctuation, 'block'), + (r'.', Text), + ], + # 'block': [ + # include('statements'), + # ('\{', Punctuation, '#push'), + # ('\}', Punctuation, '#pop') + # ], + 'string_squote': [ + (r'([^\'\\]|\\.)*\'', String, '#pop'), + ], + 'string_dquote': [ + (r'([^"\\]|\\.)*"', String, '#pop'), + ], + } + + def analyse_text(text): + if re.search(r'[a-z0-9_\])\s]<-(?!-)', text): + return 0.11 + + +class RdLexer(RegexLexer): + """ + Pygments Lexer for R documentation (Rd) files + + This is a very minimal implementation, highlighting little more + than the macros. A description of Rd syntax is found in `Writing R + Extensions `_ + and `Parsing Rd files `_. + """ + name = 'Rd' + aliases = ['rd'] + filenames = ['*.Rd'] + mimetypes = ['text/x-r-doc'] + url = 'http://cran.r-project.org/doc/manuals/R-exts.html' + version_added = '1.6' + + # To account for verbatim / LaTeX-like / and R-like areas + # would require parsing. + tokens = { + 'root': [ + # catch escaped brackets and percent sign + (r'\\[\\{}%]', String.Escape), + # comments + (r'%.*$', Comment), + # special macros with no arguments + (r'\\(?:cr|l?dots|R|tab)\b', Keyword.Constant), + # macros + (r'\\[a-zA-Z]+\b', Keyword), + # special preprocessor macros + (r'^\s*#(?:ifn?def|endif).*\b', Comment.Preproc), + # non-escaped brackets + (r'[{}]', Name.Builtin), + # everything else + (r'[^\\%\n{}]+', Text), + (r'.', Text), + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/rebol.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/rebol.py new file mode 100644 index 0000000000000000000000000000000000000000..4b37a749450472b4adf9c6a613bc1b8ab503f5a2 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/rebol.py @@ -0,0 +1,419 @@ +""" + pygments.lexers.rebol + ~~~~~~~~~~~~~~~~~~~~~ + + Lexers for the REBOL and related languages. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, bygroups +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Generic, Whitespace + +__all__ = ['RebolLexer', 'RedLexer'] + + +class RebolLexer(RegexLexer): + """ + A REBOL lexer. + """ + name = 'REBOL' + aliases = ['rebol'] + filenames = ['*.r', '*.r3', '*.reb'] + mimetypes = ['text/x-rebol'] + url = 'http://www.rebol.com' + version_added = '1.1' + + flags = re.IGNORECASE | re.MULTILINE + + escape_re = r'(?:\^\([0-9a-f]{1,4}\)*)' + + def word_callback(lexer, match): + word = match.group() + + if re.match(".*:$", word): + yield match.start(), Generic.Subheading, word + elif re.match( + r'(native|alias|all|any|as-string|as-binary|bind|bound\?|case|' + r'catch|checksum|comment|debase|dehex|exclude|difference|disarm|' + r'either|else|enbase|foreach|remove-each|form|free|get|get-env|if|' + r'in|intersect|loop|minimum-of|maximum-of|mold|new-line|' + r'new-line\?|not|now|prin|print|reduce|compose|construct|repeat|' + r'reverse|save|script\?|set|shift|switch|throw|to-hex|trace|try|' + r'type\?|union|unique|unless|unprotect|unset|until|use|value\?|' + r'while|compress|decompress|secure|open|close|read|read-io|' + r'write-io|write|update|query|wait|input\?|exp|log-10|log-2|' + r'log-e|square-root|cosine|sine|tangent|arccosine|arcsine|' + r'arctangent|protect|lowercase|uppercase|entab|detab|connected\?|' + r'browse|launch|stats|get-modes|set-modes|to-local-file|' + r'to-rebol-file|encloak|decloak|create-link|do-browser|bind\?|' + r'hide|draw|show|size-text|textinfo|offset-to-caret|' + r'caret-to-offset|local-request-file|rgb-to-hsv|hsv-to-rgb|' + r'crypt-strength\?|dh-make-key|dh-generate-key|dh-compute-key|' + r'dsa-make-key|dsa-generate-key|dsa-make-signature|' + r'dsa-verify-signature|rsa-make-key|rsa-generate-key|' + r'rsa-encrypt)$', word): + yield match.start(), Name.Builtin, word + elif re.match( + r'(add|subtract|multiply|divide|remainder|power|and~|or~|xor~|' + r'minimum|maximum|negate|complement|absolute|random|head|tail|' + r'next|back|skip|at|pick|first|second|third|fourth|fifth|sixth|' + r'seventh|eighth|ninth|tenth|last|path|find|select|make|to|copy\*|' + r'insert|remove|change|poke|clear|trim|sort|min|max|abs|cp|' + r'copy)$', word): + yield match.start(), Name.Function, word + elif re.match( + r'(error|source|input|license|help|install|echo|Usage|with|func|' + r'throw-on-error|function|does|has|context|probe|\?\?|as-pair|' + r'mod|modulo|round|repend|about|set-net|append|join|rejoin|reform|' + r'remold|charset|array|replace|move|extract|forskip|forall|alter|' + r'first+|also|take|for|forever|dispatch|attempt|what-dir|' + r'change-dir|clean-path|list-dir|dirize|rename|split-path|delete|' + r'make-dir|delete-dir|in-dir|confirm|dump-obj|upgrade|what|' + r'build-tag|process-source|build-markup|decode-cgi|read-cgi|' + r'write-user|save-user|set-user-name|protect-system|parse-xml|' + r'cvs-date|cvs-version|do-boot|get-net-info|desktop|layout|' + r'scroll-para|get-face|alert|set-face|uninstall|unfocus|' + r'request-dir|center-face|do-events|net-error|decode-url|' + r'parse-header|parse-header-date|parse-email-addrs|import-email|' + r'send|build-attach-body|resend|show-popup|hide-popup|open-events|' + r'find-key-face|do-face|viewtop|confine|find-window|' + r'insert-event-func|remove-event-func|inform|dump-pane|dump-face|' + r'flag-face|deflag-face|clear-fields|read-net|vbug|path-thru|' + r'read-thru|load-thru|do-thru|launch-thru|load-image|' + r'request-download|do-face-alt|set-font|set-para|get-style|' + r'set-style|make-face|stylize|choose|hilight-text|hilight-all|' + r'unlight-text|focus|scroll-drag|clear-face|reset-face|scroll-face|' + r'resize-face|load-stock|load-stock-block|notify|request|flash|' + r'request-color|request-pass|request-text|request-list|' + r'request-date|request-file|dbug|editor|link-relative-path|' + r'emailer|parse-error)$', word): + yield match.start(), Keyword.Namespace, word + elif re.match( + r'(halt|quit|do|load|q|recycle|call|run|ask|parse|view|unview|' + r'return|exit|break)$', word): + yield match.start(), Name.Exception, word + elif re.match('REBOL$', word): + yield match.start(), Generic.Heading, word + elif re.match("to-.*", word): + yield match.start(), Keyword, word + elif re.match(r'(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$', + word): + yield match.start(), Operator, word + elif re.match(r".*\?$", word): + yield match.start(), Keyword, word + elif re.match(r".*\!$", word): + yield match.start(), Keyword.Type, word + elif re.match("'.*", word): + yield match.start(), Name.Variable.Instance, word # lit-word + elif re.match("#.*", word): + yield match.start(), Name.Label, word # issue + elif re.match("%.*", word): + yield match.start(), Name.Decorator, word # file + else: + yield match.start(), Name.Variable, word + + tokens = { + 'root': [ + (r'\s+', Text), + (r'#"', String.Char, 'char'), + (r'#\{[0-9a-f]*\}', Number.Hex), + (r'2#\{', Number.Hex, 'bin2'), + (r'64#\{[0-9a-z+/=\s]*\}', Number.Hex), + (r'"', String, 'string'), + (r'\{', String, 'string2'), + (r';#+.*\n', Comment.Special), + (r';\*+.*\n', Comment.Preproc), + (r';.*\n', Comment), + (r'%"', Name.Decorator, 'stringFile'), + (r'%[^(^{")\s\[\]]+', Name.Decorator), + (r'[+-]?([a-z]{1,3})?\$\d+(\.\d+)?', Number.Float), # money + (r'[+-]?\d+\:\d+(\:\d+)?(\.\d+)?', String.Other), # time + (r'\d+[\-/][0-9a-z]+[\-/]\d+(\/\d+\:\d+((\:\d+)?' + r'([.\d+]?([+-]?\d+:\d+)?)?)?)?', String.Other), # date + (r'\d+(\.\d+)+\.\d+', Keyword.Constant), # tuple + (r'\d+X\d+', Keyword.Constant), # pair + (r'[+-]?\d+(\'\d+)?([.,]\d*)?E[+-]?\d+', Number.Float), + (r'[+-]?\d+(\'\d+)?[.,]\d*', Number.Float), + (r'[+-]?\d+(\'\d+)?', Number), + (r'[\[\]()]', Generic.Strong), + (r'[a-z]+[^(^{"\s:)]*://[^(^{"\s)]*', Name.Decorator), # url + (r'mailto:[^(^{"@\s)]+@[^(^{"@\s)]+', Name.Decorator), # url + (r'[^(^{"@\s)]+@[^(^{"@\s)]+', Name.Decorator), # email + (r'comment\s"', Comment, 'commentString1'), + (r'comment\s\{', Comment, 'commentString2'), + (r'comment\s\[', Comment, 'commentBlock'), + (r'comment\s[^(\s{"\[]+', Comment), + (r'/[^(^{")\s/[\]]*', Name.Attribute), + (r'([^(^{")\s/[\]]+)(?=[:({"\s/\[\]])', word_callback), + (r'<[\w:.-]*>', Name.Tag), + (r'<[^(<>\s")]+', Name.Tag, 'tag'), + (r'([^(^{")\s]+)', Text), + ], + 'string': [ + (r'[^(^")]+', String), + (escape_re, String.Escape), + (r'[(|)]+', String), + (r'\^.', String.Escape), + (r'"', String, '#pop'), + ], + 'string2': [ + (r'[^(^{})]+', String), + (escape_re, String.Escape), + (r'[(|)]+', String), + (r'\^.', String.Escape), + (r'\{', String, '#push'), + (r'\}', String, '#pop'), + ], + 'stringFile': [ + (r'[^(^")]+', Name.Decorator), + (escape_re, Name.Decorator), + (r'\^.', Name.Decorator), + (r'"', Name.Decorator, '#pop'), + ], + 'char': [ + (escape_re + '"', String.Char, '#pop'), + (r'\^."', String.Char, '#pop'), + (r'."', String.Char, '#pop'), + ], + 'tag': [ + (escape_re, Name.Tag), + (r'"', Name.Tag, 'tagString'), + (r'[^(<>\r\n")]+', Name.Tag), + (r'>', Name.Tag, '#pop'), + ], + 'tagString': [ + (r'[^(^")]+', Name.Tag), + (escape_re, Name.Tag), + (r'[(|)]+', Name.Tag), + (r'\^.', Name.Tag), + (r'"', Name.Tag, '#pop'), + ], + 'tuple': [ + (r'(\d+\.)+', Keyword.Constant), + (r'\d+', Keyword.Constant, '#pop'), + ], + 'bin2': [ + (r'\s+', Number.Hex), + (r'([01]\s*){8}', Number.Hex), + (r'\}', Number.Hex, '#pop'), + ], + 'commentString1': [ + (r'[^(^")]+', Comment), + (escape_re, Comment), + (r'[(|)]+', Comment), + (r'\^.', Comment), + (r'"', Comment, '#pop'), + ], + 'commentString2': [ + (r'[^(^{})]+', Comment), + (escape_re, Comment), + (r'[(|)]+', Comment), + (r'\^.', Comment), + (r'\{', Comment, '#push'), + (r'\}', Comment, '#pop'), + ], + 'commentBlock': [ + (r'\[', Comment, '#push'), + (r'\]', Comment, '#pop'), + (r'"', Comment, "commentString1"), + (r'\{', Comment, "commentString2"), + (r'[^(\[\]"{)]+', Comment), + ], + } + + def analyse_text(text): + """ + Check if code contains REBOL header and so it probably not R code + """ + if re.match(r'^\s*REBOL\s*\[', text, re.IGNORECASE): + # The code starts with REBOL header + return 1.0 + elif re.search(r'\s*REBOL\s*\[', text, re.IGNORECASE): + # The code contains REBOL header but also some text before it + return 0.5 + + +class RedLexer(RegexLexer): + """ + A Red-language lexer. + """ + name = 'Red' + aliases = ['red', 'red/system'] + filenames = ['*.red', '*.reds'] + mimetypes = ['text/x-red', 'text/x-red-system'] + url = 'https://www.red-lang.org' + version_added = '2.0' + + flags = re.IGNORECASE | re.MULTILINE + + escape_re = r'(?:\^\([0-9a-f]{1,4}\)*)' + + def word_callback(lexer, match): + word = match.group() + + if re.match(".*:$", word): + yield match.start(), Generic.Subheading, word + elif re.match(r'(if|unless|either|any|all|while|until|loop|repeat|' + r'foreach|forall|func|function|does|has|switch|' + r'case|reduce|compose|get|set|print|prin|equal\?|' + r'not-equal\?|strict-equal\?|lesser\?|greater\?|lesser-or-equal\?|' + r'greater-or-equal\?|same\?|not|type\?|stats|' + r'bind|union|replace|charset|routine)$', word): + yield match.start(), Name.Builtin, word + elif re.match(r'(make|random|reflect|to|form|mold|absolute|add|divide|multiply|negate|' + r'power|remainder|round|subtract|even\?|odd\?|and~|complement|or~|xor~|' + r'append|at|back|change|clear|copy|find|head|head\?|index\?|insert|' + r'length\?|next|pick|poke|remove|reverse|select|sort|skip|swap|tail|tail\?|' + r'take|trim|create|close|delete|modify|open|open\?|query|read|rename|' + r'update|write)$', word): + yield match.start(), Name.Function, word + elif re.match(r'(yes|on|no|off|true|false|tab|cr|lf|newline|escape|slash|sp|space|null|' + r'none|crlf|dot|null-byte)$', word): + yield match.start(), Name.Builtin.Pseudo, word + elif re.match(r'(#system-global|#include|#enum|#define|#either|#if|#import|#export|' + r'#switch|#default|#get-definition)$', word): + yield match.start(), Keyword.Namespace, word + elif re.match(r'(system|halt|quit|quit-return|do|load|q|recycle|call|run|ask|parse|' + r'raise-error|return|exit|break|alias|push|pop|probe|\?\?|spec-of|body-of|' + r'quote|forever)$', word): + yield match.start(), Name.Exception, word + elif re.match(r'(action\?|block\?|char\?|datatype\?|file\?|function\?|get-path\?|zero\?|' + r'get-word\?|integer\?|issue\?|lit-path\?|lit-word\?|logic\?|native\?|' + r'op\?|paren\?|path\?|refinement\?|set-path\?|set-word\?|string\?|unset\?|' + r'any-struct\?|none\?|word\?|any-series\?)$', word): + yield match.start(), Keyword, word + elif re.match(r'(JNICALL|stdcall|cdecl|infix)$', word): + yield match.start(), Keyword.Namespace, word + elif re.match("to-.*", word): + yield match.start(), Keyword, word + elif re.match(r'(\+|-\*\*|-|\*\*|//|/|\*|and|or|xor|=\?|===|==|=|<>|<=|>=|' + r'<<<|>>>|<<|>>|<|>%)$', word): + yield match.start(), Operator, word + elif re.match(r".*\!$", word): + yield match.start(), Keyword.Type, word + elif re.match("'.*", word): + yield match.start(), Name.Variable.Instance, word # lit-word + elif re.match("#.*", word): + yield match.start(), Name.Label, word # issue + elif re.match("%.*", word): + yield match.start(), Name.Decorator, word # file + elif re.match(":.*", word): + yield match.start(), Generic.Subheading, word # get-word + else: + yield match.start(), Name.Variable, word + + tokens = { + 'root': [ + (r'\s+', Text), + (r'#"', String.Char, 'char'), + (r'#\{[0-9a-f\s]*\}', Number.Hex), + (r'2#\{', Number.Hex, 'bin2'), + (r'64#\{[0-9a-z+/=\s]*\}', Number.Hex), + (r'([0-9a-f]+)(h)((\s)|(?=[\[\]{}"()]))', + bygroups(Number.Hex, Name.Variable, Whitespace)), + (r'"', String, 'string'), + (r'\{', String, 'string2'), + (r';#+.*\n', Comment.Special), + (r';\*+.*\n', Comment.Preproc), + (r';.*\n', Comment), + (r'%"', Name.Decorator, 'stringFile'), + (r'%[^(^{")\s\[\]]+', Name.Decorator), + (r'[+-]?([a-z]{1,3})?\$\d+(\.\d+)?', Number.Float), # money + (r'[+-]?\d+\:\d+(\:\d+)?(\.\d+)?', String.Other), # time + (r'\d+[\-/][0-9a-z]+[\-/]\d+(/\d+:\d+((:\d+)?' + r'([\.\d+]?([+-]?\d+:\d+)?)?)?)?', String.Other), # date + (r'\d+(\.\d+)+\.\d+', Keyword.Constant), # tuple + (r'\d+X\d+', Keyword.Constant), # pair + (r'[+-]?\d+(\'\d+)?([.,]\d*)?E[+-]?\d+', Number.Float), + (r'[+-]?\d+(\'\d+)?[.,]\d*', Number.Float), + (r'[+-]?\d+(\'\d+)?', Number), + (r'[\[\]()]', Generic.Strong), + (r'[a-z]+[^(^{"\s:)]*://[^(^{"\s)]*', Name.Decorator), # url + (r'mailto:[^(^{"@\s)]+@[^(^{"@\s)]+', Name.Decorator), # url + (r'[^(^{"@\s)]+@[^(^{"@\s)]+', Name.Decorator), # email + (r'comment\s"', Comment, 'commentString1'), + (r'comment\s\{', Comment, 'commentString2'), + (r'comment\s\[', Comment, 'commentBlock'), + (r'comment\s[^(\s{"\[]+', Comment), + (r'/[^(^{^")\s/[\]]*', Name.Attribute), + (r'([^(^{^")\s/[\]]+)(?=[:({"\s/\[\]])', word_callback), + (r'<[\w:.-]*>', Name.Tag), + (r'<[^(<>\s")]+', Name.Tag, 'tag'), + (r'([^(^{")\s]+)', Text), + ], + 'string': [ + (r'[^(^")]+', String), + (escape_re, String.Escape), + (r'[(|)]+', String), + (r'\^.', String.Escape), + (r'"', String, '#pop'), + ], + 'string2': [ + (r'[^(^{})]+', String), + (escape_re, String.Escape), + (r'[(|)]+', String), + (r'\^.', String.Escape), + (r'\{', String, '#push'), + (r'\}', String, '#pop'), + ], + 'stringFile': [ + (r'[^(^")]+', Name.Decorator), + (escape_re, Name.Decorator), + (r'\^.', Name.Decorator), + (r'"', Name.Decorator, '#pop'), + ], + 'char': [ + (escape_re + '"', String.Char, '#pop'), + (r'\^."', String.Char, '#pop'), + (r'."', String.Char, '#pop'), + ], + 'tag': [ + (escape_re, Name.Tag), + (r'"', Name.Tag, 'tagString'), + (r'[^(<>\r\n")]+', Name.Tag), + (r'>', Name.Tag, '#pop'), + ], + 'tagString': [ + (r'[^(^")]+', Name.Tag), + (escape_re, Name.Tag), + (r'[(|)]+', Name.Tag), + (r'\^.', Name.Tag), + (r'"', Name.Tag, '#pop'), + ], + 'tuple': [ + (r'(\d+\.)+', Keyword.Constant), + (r'\d+', Keyword.Constant, '#pop'), + ], + 'bin2': [ + (r'\s+', Number.Hex), + (r'([01]\s*){8}', Number.Hex), + (r'\}', Number.Hex, '#pop'), + ], + 'commentString1': [ + (r'[^(^")]+', Comment), + (escape_re, Comment), + (r'[(|)]+', Comment), + (r'\^.', Comment), + (r'"', Comment, '#pop'), + ], + 'commentString2': [ + (r'[^(^{})]+', Comment), + (escape_re, Comment), + (r'[(|)]+', Comment), + (r'\^.', Comment), + (r'\{', Comment, '#push'), + (r'\}', Comment, '#pop'), + ], + 'commentBlock': [ + (r'\[', Comment, '#push'), + (r'\]', Comment, '#pop'), + (r'"', Comment, "commentString1"), + (r'\{', Comment, "commentString2"), + (r'[^(\[\]"{)]+', Comment), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/rnc.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/rnc.py new file mode 100644 index 0000000000000000000000000000000000000000..b7a06bb918390f59753808c2f4f99009da5c51b1 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/rnc.py @@ -0,0 +1,66 @@ +""" + pygments.lexers.rnc + ~~~~~~~~~~~~~~~~~~~ + + Lexer for Relax-NG Compact syntax + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Punctuation + +__all__ = ['RNCCompactLexer'] + + +class RNCCompactLexer(RegexLexer): + """ + For RelaxNG-compact syntax. + """ + + name = 'Relax-NG Compact' + url = 'http://relaxng.org' + aliases = ['rng-compact', 'rnc'] + filenames = ['*.rnc'] + version_added = '2.2' + + tokens = { + 'root': [ + (r'namespace\b', Keyword.Namespace), + (r'(?:default|datatypes)\b', Keyword.Declaration), + (r'##.*$', Comment.Preproc), + (r'#.*$', Comment.Single), + (r'"[^"]*"', String.Double), + # TODO single quoted strings and escape sequences outside of + # double-quoted strings + (r'(?:element|attribute|mixed)\b', Keyword.Declaration, 'variable'), + (r'(text\b|xsd:[^ ]+)', Keyword.Type, 'maybe_xsdattributes'), + (r'[,?&*=|~]|>>', Operator), + (r'[(){}]', Punctuation), + (r'.', Text), + ], + + # a variable has been declared using `element` or `attribute` + 'variable': [ + (r'[^{]+', Name.Variable), + (r'\{', Punctuation, '#pop'), + ], + + # after an xsd: declaration there may be attributes + 'maybe_xsdattributes': [ + (r'\{', Punctuation, 'xsdattributes'), + (r'\}', Punctuation, '#pop'), + (r'.', Text), + ], + + # attributes take the form { key1 = value1 key2 = value2 ... } + 'xsdattributes': [ + (r'[^ =}]', Name.Attribute), + (r'=', Operator), + (r'"[^"]*"', String.Double), + (r'\}', Punctuation, '#pop'), + (r'.', Text), + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/robotframework.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/robotframework.py new file mode 100644 index 0000000000000000000000000000000000000000..f92d567503fbb371a224d531f504c59fbf77e1a8 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/robotframework.py @@ -0,0 +1,551 @@ +""" + pygments.lexers.robotframework + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for Robot Framework. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +# Copyright 2012 Nokia Siemens Networks Oyj +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import re + +from pygments.lexer import Lexer +from pygments.token import Token + +__all__ = ['RobotFrameworkLexer'] + + +HEADING = Token.Generic.Heading +SETTING = Token.Keyword.Namespace +IMPORT = Token.Name.Namespace +TC_KW_NAME = Token.Generic.Subheading +KEYWORD = Token.Name.Function +ARGUMENT = Token.String +VARIABLE = Token.Name.Variable +COMMENT = Token.Comment +SEPARATOR = Token.Punctuation +SYNTAX = Token.Punctuation +GHERKIN = Token.Generic.Emph +ERROR = Token.Error + + +def normalize(string, remove=''): + string = string.lower() + for char in remove + ' ': + if char in string: + string = string.replace(char, '') + return string + + +class RobotFrameworkLexer(Lexer): + """ + For Robot Framework test data. + + Supports both space and pipe separated plain text formats. + """ + name = 'RobotFramework' + url = 'http://robotframework.org' + aliases = ['robotframework'] + filenames = ['*.robot', '*.resource'] + mimetypes = ['text/x-robotframework'] + version_added = '1.6' + + def __init__(self, **options): + options['tabsize'] = 2 + options['encoding'] = 'UTF-8' + Lexer.__init__(self, **options) + + def get_tokens_unprocessed(self, text): + row_tokenizer = RowTokenizer() + var_tokenizer = VariableTokenizer() + index = 0 + for row in text.splitlines(): + for value, token in row_tokenizer.tokenize(row): + for value, token in var_tokenizer.tokenize(value, token): + if value: + yield index, token, str(value) + index += len(value) + + +class VariableTokenizer: + + def tokenize(self, string, token): + var = VariableSplitter(string, identifiers='$@%&') + if var.start < 0 or token in (COMMENT, ERROR): + yield string, token + return + for value, token in self._tokenize(var, string, token): + if value: + yield value, token + + def _tokenize(self, var, string, orig_token): + before = string[:var.start] + yield before, orig_token + yield var.identifier + '{', SYNTAX + yield from self.tokenize(var.base, VARIABLE) + yield '}', SYNTAX + if var.index is not None: + yield '[', SYNTAX + yield from self.tokenize(var.index, VARIABLE) + yield ']', SYNTAX + yield from self.tokenize(string[var.end:], orig_token) + + +class RowTokenizer: + + def __init__(self): + self._table = UnknownTable() + self._splitter = RowSplitter() + testcases = TestCaseTable() + settings = SettingTable(testcases.set_default_template) + variables = VariableTable() + keywords = KeywordTable() + self._tables = {'settings': settings, 'setting': settings, + 'metadata': settings, + 'variables': variables, 'variable': variables, + 'testcases': testcases, 'testcase': testcases, + 'tasks': testcases, 'task': testcases, + 'keywords': keywords, 'keyword': keywords, + 'userkeywords': keywords, 'userkeyword': keywords} + + def tokenize(self, row): + commented = False + heading = False + for index, value in enumerate(self._splitter.split(row)): + # First value, and every second after that, is a separator. + index, separator = divmod(index-1, 2) + if value.startswith('#'): + commented = True + elif index == 0 and value.startswith('*'): + self._table = self._start_table(value) + heading = True + yield from self._tokenize(value, index, commented, + separator, heading) + self._table.end_row() + + def _start_table(self, header): + name = normalize(header, remove='*') + return self._tables.get(name, UnknownTable()) + + def _tokenize(self, value, index, commented, separator, heading): + if commented: + yield value, COMMENT + elif separator: + yield value, SEPARATOR + elif heading: + yield value, HEADING + else: + yield from self._table.tokenize(value, index) + + +class RowSplitter: + _space_splitter = re.compile('( {2,})') + _pipe_splitter = re.compile(r'((?:^| +)\|(?: +|$))') + + def split(self, row): + splitter = (row.startswith('| ') and self._split_from_pipes + or self._split_from_spaces) + yield from splitter(row) + yield '\n' + + def _split_from_spaces(self, row): + yield '' # Start with (pseudo)separator similarly as with pipes + yield from self._space_splitter.split(row) + + def _split_from_pipes(self, row): + _, separator, rest = self._pipe_splitter.split(row, 1) + yield separator + while self._pipe_splitter.search(rest): + cell, separator, rest = self._pipe_splitter.split(rest, 1) + yield cell + yield separator + yield rest + + +class Tokenizer: + _tokens = None + + def __init__(self): + self._index = 0 + + def tokenize(self, value): + values_and_tokens = self._tokenize(value, self._index) + self._index += 1 + if isinstance(values_and_tokens, type(Token)): + values_and_tokens = [(value, values_and_tokens)] + return values_and_tokens + + def _tokenize(self, value, index): + index = min(index, len(self._tokens) - 1) + return self._tokens[index] + + def _is_assign(self, value): + if value.endswith('='): + value = value[:-1].strip() + var = VariableSplitter(value, identifiers='$@&') + return var.start == 0 and var.end == len(value) + + +class Comment(Tokenizer): + _tokens = (COMMENT,) + + +class Setting(Tokenizer): + _tokens = (SETTING, ARGUMENT) + _keyword_settings = ('suitesetup', 'suiteprecondition', 'suiteteardown', + 'suitepostcondition', 'testsetup', 'tasksetup', 'testprecondition', + 'testteardown','taskteardown', 'testpostcondition', 'testtemplate', 'tasktemplate') + _import_settings = ('library', 'resource', 'variables') + _other_settings = ('documentation', 'metadata', 'forcetags', 'defaulttags', + 'testtimeout','tasktimeout') + _custom_tokenizer = None + + def __init__(self, template_setter=None): + Tokenizer.__init__(self) + self._template_setter = template_setter + + def _tokenize(self, value, index): + if index == 1 and self._template_setter: + self._template_setter(value) + if index == 0: + normalized = normalize(value) + if normalized in self._keyword_settings: + self._custom_tokenizer = KeywordCall(support_assign=False) + elif normalized in self._import_settings: + self._custom_tokenizer = ImportSetting() + elif normalized not in self._other_settings: + return ERROR + elif self._custom_tokenizer: + return self._custom_tokenizer.tokenize(value) + return Tokenizer._tokenize(self, value, index) + + +class ImportSetting(Tokenizer): + _tokens = (IMPORT, ARGUMENT) + + +class TestCaseSetting(Setting): + _keyword_settings = ('setup', 'precondition', 'teardown', 'postcondition', + 'template') + _import_settings = () + _other_settings = ('documentation', 'tags', 'timeout') + + def _tokenize(self, value, index): + if index == 0: + type = Setting._tokenize(self, value[1:-1], index) + return [('[', SYNTAX), (value[1:-1], type), (']', SYNTAX)] + return Setting._tokenize(self, value, index) + + +class KeywordSetting(TestCaseSetting): + _keyword_settings = ('teardown',) + _other_settings = ('documentation', 'arguments', 'return', 'timeout', 'tags') + + +class Variable(Tokenizer): + _tokens = (SYNTAX, ARGUMENT) + + def _tokenize(self, value, index): + if index == 0 and not self._is_assign(value): + return ERROR + return Tokenizer._tokenize(self, value, index) + + +class KeywordCall(Tokenizer): + _tokens = (KEYWORD, ARGUMENT) + + def __init__(self, support_assign=True): + Tokenizer.__init__(self) + self._keyword_found = not support_assign + self._assigns = 0 + + def _tokenize(self, value, index): + if not self._keyword_found and self._is_assign(value): + self._assigns += 1 + return SYNTAX # VariableTokenizer tokenizes this later. + if self._keyword_found: + return Tokenizer._tokenize(self, value, index - self._assigns) + self._keyword_found = True + return GherkinTokenizer().tokenize(value, KEYWORD) + + +class GherkinTokenizer: + _gherkin_prefix = re.compile('^(Given|When|Then|And|But) ', re.IGNORECASE) + + def tokenize(self, value, token): + match = self._gherkin_prefix.match(value) + if not match: + return [(value, token)] + end = match.end() + return [(value[:end], GHERKIN), (value[end:], token)] + + +class TemplatedKeywordCall(Tokenizer): + _tokens = (ARGUMENT,) + + +class ForLoop(Tokenizer): + + def __init__(self): + Tokenizer.__init__(self) + self._in_arguments = False + + def _tokenize(self, value, index): + token = self._in_arguments and ARGUMENT or SYNTAX + if value.upper() in ('IN', 'IN RANGE'): + self._in_arguments = True + return token + + +class _Table: + _tokenizer_class = None + + def __init__(self, prev_tokenizer=None): + self._tokenizer = self._tokenizer_class() + self._prev_tokenizer = prev_tokenizer + self._prev_values_on_row = [] + + def tokenize(self, value, index): + if self._continues(value, index): + self._tokenizer = self._prev_tokenizer + yield value, SYNTAX + else: + yield from self._tokenize(value, index) + self._prev_values_on_row.append(value) + + def _continues(self, value, index): + return value == '...' and all(self._is_empty(t) + for t in self._prev_values_on_row) + + def _is_empty(self, value): + return value in ('', '\\') + + def _tokenize(self, value, index): + return self._tokenizer.tokenize(value) + + def end_row(self): + self.__init__(prev_tokenizer=self._tokenizer) + + +class UnknownTable(_Table): + _tokenizer_class = Comment + + def _continues(self, value, index): + return False + + +class VariableTable(_Table): + _tokenizer_class = Variable + + +class SettingTable(_Table): + _tokenizer_class = Setting + + def __init__(self, template_setter, prev_tokenizer=None): + _Table.__init__(self, prev_tokenizer) + self._template_setter = template_setter + + def _tokenize(self, value, index): + if index == 0 and normalize(value) == 'testtemplate': + self._tokenizer = Setting(self._template_setter) + return _Table._tokenize(self, value, index) + + def end_row(self): + self.__init__(self._template_setter, prev_tokenizer=self._tokenizer) + + +class TestCaseTable(_Table): + _setting_class = TestCaseSetting + _test_template = None + _default_template = None + + @property + def _tokenizer_class(self): + if self._test_template or (self._default_template and + self._test_template is not False): + return TemplatedKeywordCall + return KeywordCall + + def _continues(self, value, index): + return index > 0 and _Table._continues(self, value, index) + + def _tokenize(self, value, index): + if index == 0: + if value: + self._test_template = None + return GherkinTokenizer().tokenize(value, TC_KW_NAME) + if index == 1 and self._is_setting(value): + if self._is_template(value): + self._test_template = False + self._tokenizer = self._setting_class(self.set_test_template) + else: + self._tokenizer = self._setting_class() + if index == 1 and self._is_for_loop(value): + self._tokenizer = ForLoop() + if index == 1 and self._is_empty(value): + return [(value, SYNTAX)] + return _Table._tokenize(self, value, index) + + def _is_setting(self, value): + return value.startswith('[') and value.endswith(']') + + def _is_template(self, value): + return normalize(value) == '[template]' + + def _is_for_loop(self, value): + return value.startswith(':') and normalize(value, remove=':') == 'for' + + def set_test_template(self, template): + self._test_template = self._is_template_set(template) + + def set_default_template(self, template): + self._default_template = self._is_template_set(template) + + def _is_template_set(self, template): + return normalize(template) not in ('', '\\', 'none', '${empty}') + + +class KeywordTable(TestCaseTable): + _tokenizer_class = KeywordCall + _setting_class = KeywordSetting + + def _is_template(self, value): + return False + + +# Following code copied directly from Robot Framework 2.7.5. + +class VariableSplitter: + + def __init__(self, string, identifiers): + self.identifier = None + self.base = None + self.index = None + self.start = -1 + self.end = -1 + self._identifiers = identifiers + self._may_have_internal_variables = False + try: + self._split(string) + except ValueError: + pass + else: + self._finalize() + + def get_replaced_base(self, variables): + if self._may_have_internal_variables: + return variables.replace_string(self.base) + return self.base + + def _finalize(self): + self.identifier = self._variable_chars[0] + self.base = ''.join(self._variable_chars[2:-1]) + self.end = self.start + len(self._variable_chars) + if self._has_list_or_dict_variable_index(): + self.index = ''.join(self._list_and_dict_variable_index_chars[1:-1]) + self.end += len(self._list_and_dict_variable_index_chars) + + def _has_list_or_dict_variable_index(self): + return self._list_and_dict_variable_index_chars\ + and self._list_and_dict_variable_index_chars[-1] == ']' + + def _split(self, string): + start_index, max_index = self._find_variable(string) + self.start = start_index + self._open_curly = 1 + self._state = self._variable_state + self._variable_chars = [string[start_index], '{'] + self._list_and_dict_variable_index_chars = [] + self._string = string + start_index += 2 + for index, char in enumerate(string[start_index:]): + index += start_index # Giving start to enumerate only in Py 2.6+ + try: + self._state(char, index) + except StopIteration: + return + if index == max_index and not self._scanning_list_variable_index(): + return + + def _scanning_list_variable_index(self): + return self._state in [self._waiting_list_variable_index_state, + self._list_variable_index_state] + + def _find_variable(self, string): + max_end_index = string.rfind('}') + if max_end_index == -1: + raise ValueError('No variable end found') + if self._is_escaped(string, max_end_index): + return self._find_variable(string[:max_end_index]) + start_index = self._find_start_index(string, 1, max_end_index) + if start_index == -1: + raise ValueError('No variable start found') + return start_index, max_end_index + + def _find_start_index(self, string, start, end): + index = string.find('{', start, end) - 1 + if index < 0: + return -1 + if self._start_index_is_ok(string, index): + return index + return self._find_start_index(string, index+2, end) + + def _start_index_is_ok(self, string, index): + return string[index] in self._identifiers\ + and not self._is_escaped(string, index) + + def _is_escaped(self, string, index): + escaped = False + while index > 0 and string[index-1] == '\\': + index -= 1 + escaped = not escaped + return escaped + + def _variable_state(self, char, index): + self._variable_chars.append(char) + if char == '}' and not self._is_escaped(self._string, index): + self._open_curly -= 1 + if self._open_curly == 0: + if not self._is_list_or_dict_variable(): + raise StopIteration + self._state = self._waiting_list_variable_index_state + elif char in self._identifiers: + self._state = self._internal_variable_start_state + + def _is_list_or_dict_variable(self): + return self._variable_chars[0] in ('@','&') + + def _internal_variable_start_state(self, char, index): + self._state = self._variable_state + if char == '{': + self._variable_chars.append(char) + self._open_curly += 1 + self._may_have_internal_variables = True + else: + self._variable_state(char, index) + + def _waiting_list_variable_index_state(self, char, index): + if char != '[': + raise StopIteration + self._list_and_dict_variable_index_chars.append(char) + self._state = self._list_variable_index_state + + def _list_variable_index_state(self, char, index): + self._list_and_dict_variable_index_chars.append(char) + if char == ']': + raise StopIteration diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/sas.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/sas.py new file mode 100644 index 0000000000000000000000000000000000000000..1b2ad432d231d21192c4f3653ef2e541588afd1d --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/sas.py @@ -0,0 +1,227 @@ +""" + pygments.lexers.sas + ~~~~~~~~~~~~~~~~~~~ + + Lexer for SAS. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re +from pygments.lexer import RegexLexer, include, words +from pygments.token import Comment, Keyword, Name, Number, String, Text, \ + Other, Generic + +__all__ = ['SASLexer'] + + +class SASLexer(RegexLexer): + """ + For SAS files. + """ + # Syntax from syntax/sas.vim by James Kidd + + name = 'SAS' + aliases = ['sas'] + filenames = ['*.SAS', '*.sas'] + mimetypes = ['text/x-sas', 'text/sas', 'application/x-sas'] + url = 'https://en.wikipedia.org/wiki/SAS_(software)' + version_added = '2.2' + flags = re.IGNORECASE | re.MULTILINE + + builtins_macros = ( + "bquote", "nrbquote", "cmpres", "qcmpres", "compstor", "datatyp", + "display", "do", "else", "end", "eval", "global", "goto", "if", + "index", "input", "keydef", "label", "left", "length", "let", + "local", "lowcase", "macro", "mend", "nrquote", + "nrstr", "put", "qleft", "qlowcase", "qscan", + "qsubstr", "qsysfunc", "qtrim", "quote", "qupcase", "scan", + "str", "substr", "superq", "syscall", "sysevalf", "sysexec", + "sysfunc", "sysget", "syslput", "sysprod", "sysrc", "sysrput", + "then", "to", "trim", "unquote", "until", "upcase", "verify", + "while", "window" + ) + + builtins_conditionals = ( + "do", "if", "then", "else", "end", "until", "while" + ) + + builtins_statements = ( + "abort", "array", "attrib", "by", "call", "cards", "cards4", + "catname", "continue", "datalines", "datalines4", "delete", "delim", + "delimiter", "display", "dm", "drop", "endsas", "error", "file", + "filename", "footnote", "format", "goto", "in", "infile", "informat", + "input", "keep", "label", "leave", "length", "libname", "link", + "list", "lostcard", "merge", "missing", "modify", "options", "output", + "out", "page", "put", "redirect", "remove", "rename", "replace", + "retain", "return", "select", "set", "skip", "startsas", "stop", + "title", "update", "waitsas", "where", "window", "x", "systask" + ) + + builtins_sql = ( + "add", "and", "alter", "as", "cascade", "check", "create", + "delete", "describe", "distinct", "drop", "foreign", "from", + "group", "having", "index", "insert", "into", "in", "key", "like", + "message", "modify", "msgtype", "not", "null", "on", "or", + "order", "primary", "references", "reset", "restrict", "select", + "set", "table", "unique", "update", "validate", "view", "where" + ) + + builtins_functions = ( + "abs", "addr", "airy", "arcos", "arsin", "atan", "attrc", + "attrn", "band", "betainv", "blshift", "bnot", "bor", + "brshift", "bxor", "byte", "cdf", "ceil", "cexist", "cinv", + "close", "cnonct", "collate", "compbl", "compound", + "compress", "cos", "cosh", "css", "curobs", "cv", "daccdb", + "daccdbsl", "daccsl", "daccsyd", "dacctab", "dairy", "date", + "datejul", "datepart", "datetime", "day", "dclose", "depdb", + "depdbsl", "depsl", "depsyd", + "deptab", "dequote", "dhms", "dif", "digamma", + "dim", "dinfo", "dnum", "dopen", "doptname", "doptnum", + "dread", "dropnote", "dsname", "erf", "erfc", "exist", "exp", + "fappend", "fclose", "fcol", "fdelete", "fetch", "fetchobs", + "fexist", "fget", "fileexist", "filename", "fileref", + "finfo", "finv", "fipname", "fipnamel", "fipstate", "floor", + "fnonct", "fnote", "fopen", "foptname", "foptnum", "fpoint", + "fpos", "fput", "fread", "frewind", "frlen", "fsep", "fuzz", + "fwrite", "gaminv", "gamma", "getoption", "getvarc", "getvarn", + "hbound", "hms", "hosthelp", "hour", "ibessel", "index", + "indexc", "indexw", "input", "inputc", "inputn", "int", + "intck", "intnx", "intrr", "irr", "jbessel", "juldate", + "kurtosis", "lag", "lbound", "left", "length", "lgamma", + "libname", "libref", "log", "log10", "log2", "logpdf", "logpmf", + "logsdf", "lowcase", "max", "mdy", "mean", "min", "minute", + "mod", "month", "mopen", "mort", "n", "netpv", "nmiss", + "normal", "note", "npv", "open", "ordinal", "pathname", + "pdf", "peek", "peekc", "pmf", "point", "poisson", "poke", + "probbeta", "probbnml", "probchi", "probf", "probgam", + "probhypr", "probit", "probnegb", "probnorm", "probt", + "put", "putc", "putn", "qtr", "quote", "ranbin", "rancau", + "ranexp", "rangam", "range", "rank", "rannor", "ranpoi", + "rantbl", "rantri", "ranuni", "repeat", "resolve", "reverse", + "rewind", "right", "round", "saving", "scan", "sdf", "second", + "sign", "sin", "sinh", "skewness", "soundex", "spedis", + "sqrt", "std", "stderr", "stfips", "stname", "stnamel", + "substr", "sum", "symget", "sysget", "sysmsg", "sysprod", + "sysrc", "system", "tan", "tanh", "time", "timepart", "tinv", + "tnonct", "today", "translate", "tranwrd", "trigamma", + "trim", "trimn", "trunc", "uniform", "upcase", "uss", "var", + "varfmt", "varinfmt", "varlabel", "varlen", "varname", + "varnum", "varray", "varrayx", "vartype", "verify", "vformat", + "vformatd", "vformatdx", "vformatn", "vformatnx", "vformatw", + "vformatwx", "vformatx", "vinarray", "vinarrayx", "vinformat", + "vinformatd", "vinformatdx", "vinformatn", "vinformatnx", + "vinformatw", "vinformatwx", "vinformatx", "vlabel", + "vlabelx", "vlength", "vlengthx", "vname", "vnamex", "vtype", + "vtypex", "weekday", "year", "yyq", "zipfips", "zipname", + "zipnamel", "zipstate" + ) + + tokens = { + 'root': [ + include('comments'), + include('proc-data'), + include('cards-datalines'), + include('logs'), + include('general'), + (r'.', Text), + ], + # SAS is multi-line regardless, but * is ended by ; + 'comments': [ + (r'^\s*\*.*?;', Comment), + (r'/\*.*?\*/', Comment), + (r'^\s*\*(.|\n)*?;', Comment.Multiline), + (r'/[*](.|\n)*?[*]/', Comment.Multiline), + ], + # Special highlight for proc, data, quit, run + 'proc-data': [ + (r'(^|;)\s*(proc \w+|data|run|quit)[\s;]', + Keyword.Reserved), + ], + # Special highlight cards and datalines + 'cards-datalines': [ + (r'^\s*(datalines|cards)\s*;\s*$', Keyword, 'data'), + ], + 'data': [ + (r'(.|\n)*^\s*;\s*$', Other, '#pop'), + ], + # Special highlight for put NOTE|ERROR|WARNING (order matters) + 'logs': [ + (r'\n?^\s*%?put ', Keyword, 'log-messages'), + ], + 'log-messages': [ + (r'NOTE(:|-).*', Generic, '#pop'), + (r'WARNING(:|-).*', Generic.Emph, '#pop'), + (r'ERROR(:|-).*', Generic.Error, '#pop'), + include('general'), + ], + 'general': [ + include('keywords'), + include('vars-strings'), + include('special'), + include('numbers'), + ], + # Keywords, statements, functions, macros + 'keywords': [ + (words(builtins_statements, + prefix = r'\b', + suffix = r'\b'), + Keyword), + (words(builtins_sql, + prefix = r'\b', + suffix = r'\b'), + Keyword), + (words(builtins_conditionals, + prefix = r'\b', + suffix = r'\b'), + Keyword), + (words(builtins_macros, + prefix = r'%', + suffix = r'\b'), + Name.Builtin), + (words(builtins_functions, + prefix = r'\b', + suffix = r'\('), + Name.Builtin), + ], + # Strings and user-defined variables and macros (order matters) + 'vars-strings': [ + (r'&[a-z_]\w{0,31}\.?', Name.Variable), + (r'%[a-z_]\w{0,31}', Name.Function), + (r'\'', String, 'string_squote'), + (r'"', String, 'string_dquote'), + ], + 'string_squote': [ + ('\'', String, '#pop'), + (r'\\\\|\\"|\\\n', String.Escape), + # AFAIK, macro variables are not evaluated in single quotes + # (r'&', Name.Variable, 'validvar'), + (r'[^$\'\\]+', String), + (r'[$\'\\]', String), + ], + 'string_dquote': [ + (r'"', String, '#pop'), + (r'\\\\|\\"|\\\n', String.Escape), + (r'&', Name.Variable, 'validvar'), + (r'[^$&"\\]+', String), + (r'[$"\\]', String), + ], + 'validvar': [ + (r'[a-z_]\w{0,31}\.?', Name.Variable, '#pop'), + ], + # SAS numbers and special variables + 'numbers': [ + (r'\b[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+|\.)(E[+-]?[0-9]+)?i?\b', + Number), + ], + 'special': [ + (r'(null|missing|_all_|_automatic_|_character_|_n_|' + r'_infile_|_name_|_null_|_numeric_|_user_|_webout_)', + Keyword.Constant), + ], + # 'operators': [ + # (r'(-|=|<=|>=|<|>|<>|&|!=|' + # r'\||\*|\+|\^|/|!|~|~=)', Operator) + # ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/slash.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/slash.py new file mode 100644 index 0000000000000000000000000000000000000000..1c439d0db0fd51d6870f1294b2eb276aa64e8a6c --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/slash.py @@ -0,0 +1,183 @@ +""" + pygments.lexers.slash + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the Slash programming language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import ExtendedRegexLexer, bygroups, DelegatingLexer +from pygments.token import Name, Number, String, Comment, Punctuation, \ + Other, Keyword, Operator, Whitespace + +__all__ = ['SlashLexer'] + + +class SlashLanguageLexer(ExtendedRegexLexer): + _nkw = r'(?=[^a-zA-Z_0-9])' + + def move_state(new_state): + return ("#pop", new_state) + + def right_angle_bracket(lexer, match, ctx): + if len(ctx.stack) > 1 and ctx.stack[-2] == "string": + ctx.stack.pop() + yield match.start(), String.Interpol, '}' + ctx.pos = match.end() + pass + + tokens = { + "root": [ + (r"<%=", Comment.Preproc, move_state("slash")), + (r"<%!!", Comment.Preproc, move_state("slash")), + (r"<%#.*?%>", Comment.Multiline), + (r"<%", Comment.Preproc, move_state("slash")), + (r".|\n", Other), + ], + "string": [ + (r"\\", String.Escape, move_state("string_e")), + (r"\"", String, move_state("slash")), + (r"#\{", String.Interpol, "slash"), + (r'.|\n', String), + ], + "string_e": [ + (r'n', String.Escape, move_state("string")), + (r't', String.Escape, move_state("string")), + (r'r', String.Escape, move_state("string")), + (r'e', String.Escape, move_state("string")), + (r'x[a-fA-F0-9]{2}', String.Escape, move_state("string")), + (r'.', String.Escape, move_state("string")), + ], + "regexp": [ + (r'}[a-z]*', String.Regex, move_state("slash")), + (r'\\(.|\n)', String.Regex), + (r'{', String.Regex, "regexp_r"), + (r'.|\n', String.Regex), + ], + "regexp_r": [ + (r'}[a-z]*', String.Regex, "#pop"), + (r'\\(.|\n)', String.Regex), + (r'{', String.Regex, "regexp_r"), + ], + "slash": [ + (r"%>", Comment.Preproc, move_state("root")), + (r"\"", String, move_state("string")), + (r"'[a-zA-Z0-9_]+", String), + (r'%r{', String.Regex, move_state("regexp")), + (r'/\*.*?\*/', Comment.Multiline), + (r"(#|//).*?\n", Comment.Single), + (r'-?[0-9]+e[+-]?[0-9]+', Number.Float), + (r'-?[0-9]+\.[0-9]+(e[+-]?[0-9]+)?', Number.Float), + (r'-?[0-9]+', Number.Integer), + (r'nil'+_nkw, Name.Builtin), + (r'true'+_nkw, Name.Builtin), + (r'false'+_nkw, Name.Builtin), + (r'self'+_nkw, Name.Builtin), + (r'(class)(\s+)([A-Z][a-zA-Z0-9_\']*)', + bygroups(Keyword, Whitespace, Name.Class)), + (r'class'+_nkw, Keyword), + (r'extends'+_nkw, Keyword), + (r'(def)(\s+)(self)(\s*)(\.)(\s*)([a-z_][a-zA-Z0-9_\']*=?|<<|>>|==|<=>|<=|<|>=|>|\+|-(self)?|~(self)?|\*|/|%|^|&&|&|\||\[\]=?)', + bygroups(Keyword, Whitespace, Name.Builtin, Whitespace, Punctuation, Whitespace, Name.Function)), + (r'(def)(\s+)([a-z_][a-zA-Z0-9_\']*=?|<<|>>|==|<=>|<=|<|>=|>|\+|-(self)?|~(self)?|\*|/|%|^|&&|&|\||\[\]=?)', + bygroups(Keyword, Whitespace, Name.Function)), + (r'def'+_nkw, Keyword), + (r'if'+_nkw, Keyword), + (r'elsif'+_nkw, Keyword), + (r'else'+_nkw, Keyword), + (r'unless'+_nkw, Keyword), + (r'for'+_nkw, Keyword), + (r'in'+_nkw, Keyword), + (r'while'+_nkw, Keyword), + (r'until'+_nkw, Keyword), + (r'and'+_nkw, Keyword), + (r'or'+_nkw, Keyword), + (r'not'+_nkw, Keyword), + (r'lambda'+_nkw, Keyword), + (r'try'+_nkw, Keyword), + (r'catch'+_nkw, Keyword), + (r'return'+_nkw, Keyword), + (r'next'+_nkw, Keyword), + (r'last'+_nkw, Keyword), + (r'throw'+_nkw, Keyword), + (r'use'+_nkw, Keyword), + (r'switch'+_nkw, Keyword), + (r'\\', Keyword), + (r'λ', Keyword), + (r'__FILE__'+_nkw, Name.Builtin.Pseudo), + (r'__LINE__'+_nkw, Name.Builtin.Pseudo), + (r'[A-Z][a-zA-Z0-9_\']*'+_nkw, Name.Constant), + (r'[a-z_][a-zA-Z0-9_\']*'+_nkw, Name), + (r'@[a-z_][a-zA-Z0-9_\']*'+_nkw, Name.Variable.Instance), + (r'@@[a-z_][a-zA-Z0-9_\']*'+_nkw, Name.Variable.Class), + (r'\(', Punctuation), + (r'\)', Punctuation), + (r'\[', Punctuation), + (r'\]', Punctuation), + (r'\{', Punctuation), + (r'\}', right_angle_bracket), + (r';', Punctuation), + (r',', Punctuation), + (r'<<=', Operator), + (r'>>=', Operator), + (r'<<', Operator), + (r'>>', Operator), + (r'==', Operator), + (r'!=', Operator), + (r'=>', Operator), + (r'=', Operator), + (r'<=>', Operator), + (r'<=', Operator), + (r'>=', Operator), + (r'<', Operator), + (r'>', Operator), + (r'\+\+', Operator), + (r'\+=', Operator), + (r'-=', Operator), + (r'\*\*=', Operator), + (r'\*=', Operator), + (r'\*\*', Operator), + (r'\*', Operator), + (r'/=', Operator), + (r'\+', Operator), + (r'-', Operator), + (r'/', Operator), + (r'%=', Operator), + (r'%', Operator), + (r'^=', Operator), + (r'&&=', Operator), + (r'&=', Operator), + (r'&&', Operator), + (r'&', Operator), + (r'\|\|=', Operator), + (r'\|=', Operator), + (r'\|\|', Operator), + (r'\|', Operator), + (r'!', Operator), + (r'\.\.\.', Operator), + (r'\.\.', Operator), + (r'\.', Operator), + (r'::', Operator), + (r':', Operator), + (r'(\s|\n)+', Whitespace), + (r'[a-z_][a-zA-Z0-9_\']*', Name.Variable), + ], + } + + +class SlashLexer(DelegatingLexer): + """ + Lexer for the Slash programming language. + """ + + name = 'Slash' + aliases = ['slash'] + filenames = ['*.sla'] + url = 'https://github.com/arturadib/Slash-A' + version_added = '2.4' + + def __init__(self, **options): + from pygments.lexers.web import HtmlLexer + super().__init__(HtmlLexer, SlashLanguageLexer, **options) diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/smalltalk.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/smalltalk.py new file mode 100644 index 0000000000000000000000000000000000000000..674b7b4b345a4b968f080bcd1552979201da6164 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/smalltalk.py @@ -0,0 +1,194 @@ +""" + pygments.lexers.smalltalk + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for Smalltalk and related languages. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, include, bygroups, default +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation + +__all__ = ['SmalltalkLexer', 'NewspeakLexer'] + + +class SmalltalkLexer(RegexLexer): + """ + For Smalltalk syntax. + Contributed by Stefan Matthias Aust. + Rewritten by Nils Winter. + """ + name = 'Smalltalk' + url = 'http://www.smalltalk.org/' + filenames = ['*.st'] + aliases = ['smalltalk', 'squeak', 'st'] + mimetypes = ['text/x-smalltalk'] + version_added = '0.10' + + tokens = { + 'root': [ + (r'(<)(\w+:)(.*?)(>)', bygroups(Text, Keyword, Text, Text)), + include('squeak fileout'), + include('whitespaces'), + include('method definition'), + (r'(\|)([\w\s]*)(\|)', bygroups(Operator, Name.Variable, Operator)), + include('objects'), + (r'\^|\:=|\_', Operator), + # temporaries + (r'[\]({}.;!]', Text), + ], + 'method definition': [ + # Not perfect can't allow whitespaces at the beginning and the + # without breaking everything + (r'([a-zA-Z]+\w*:)(\s*)(\w+)', + bygroups(Name.Function, Text, Name.Variable)), + (r'^(\b[a-zA-Z]+\w*\b)(\s*)$', bygroups(Name.Function, Text)), + (r'^([-+*/\\~<>=|&!?,@%]+)(\s*)(\w+)(\s*)$', + bygroups(Name.Function, Text, Name.Variable, Text)), + ], + 'blockvariables': [ + include('whitespaces'), + (r'(:)(\s*)(\w+)', + bygroups(Operator, Text, Name.Variable)), + (r'\|', Operator, '#pop'), + default('#pop'), # else pop + ], + 'literals': [ + (r"'(''|[^'])*'", String, 'afterobject'), + (r'\$.', String.Char, 'afterobject'), + (r'#\(', String.Symbol, 'parenth'), + (r'\)', Text, 'afterobject'), + (r'(\d+r)?-?\d+(\.\d+)?(e-?\d+)?', Number, 'afterobject'), + ], + '_parenth_helper': [ + include('whitespaces'), + (r'(\d+r)?-?\d+(\.\d+)?(e-?\d+)?', Number), + (r'[-+*/\\~<>=|&#!?,@%\w:]+', String.Symbol), + # literals + (r"'(''|[^'])*'", String), + (r'\$.', String.Char), + (r'#*\(', String.Symbol, 'inner_parenth'), + ], + 'parenth': [ + # This state is a bit tricky since + # we can't just pop this state + (r'\)', String.Symbol, ('root', 'afterobject')), + include('_parenth_helper'), + ], + 'inner_parenth': [ + (r'\)', String.Symbol, '#pop'), + include('_parenth_helper'), + ], + 'whitespaces': [ + # skip whitespace and comments + (r'\s+', Text), + (r'"(""|[^"])*"', Comment), + ], + 'objects': [ + (r'\[', Text, 'blockvariables'), + (r'\]', Text, 'afterobject'), + (r'\b(self|super|true|false|nil|thisContext)\b', + Name.Builtin.Pseudo, 'afterobject'), + (r'\b[A-Z]\w*(?!:)\b', Name.Class, 'afterobject'), + (r'\b[a-z]\w*(?!:)\b', Name.Variable, 'afterobject'), + (r'#("(""|[^"])*"|[-+*/\\~<>=|&!?,@%]+|[\w:]+)', + String.Symbol, 'afterobject'), + include('literals'), + ], + 'afterobject': [ + (r'! !$', Keyword, '#pop'), # squeak chunk delimiter + include('whitespaces'), + (r'\b(ifTrue:|ifFalse:|whileTrue:|whileFalse:|timesRepeat:)', + Name.Builtin, '#pop'), + (r'\b(new\b(?!:))', Name.Builtin), + (r'\:=|\_', Operator, '#pop'), + (r'\b[a-zA-Z]+\w*:', Name.Function, '#pop'), + (r'\b[a-zA-Z]+\w*', Name.Function), + (r'\w+:?|[-+*/\\~<>=|&!?,@%]+', Name.Function, '#pop'), + (r'\.', Punctuation, '#pop'), + (r';', Punctuation), + (r'[\])}]', Text), + (r'[\[({]', Text, '#pop'), + ], + 'squeak fileout': [ + # Squeak fileout format (optional) + (r'^"(""|[^"])*"!', Keyword), + (r"^'(''|[^'])*'!", Keyword), + (r'^(!)(\w+)( commentStamp: )(.*?)( prior: .*?!\n)(.*?)(!)', + bygroups(Keyword, Name.Class, Keyword, String, Keyword, Text, Keyword)), + (r"^(!)(\w+(?: class)?)( methodsFor: )('(?:''|[^'])*')(.*?!)", + bygroups(Keyword, Name.Class, Keyword, String, Keyword)), + (r'^(\w+)( subclass: )(#\w+)' + r'(\s+instanceVariableNames: )(.*?)' + r'(\s+classVariableNames: )(.*?)' + r'(\s+poolDictionaries: )(.*?)' + r'(\s+category: )(.*?)(!)', + bygroups(Name.Class, Keyword, String.Symbol, Keyword, String, Keyword, + String, Keyword, String, Keyword, String, Keyword)), + (r'^(\w+(?: class)?)(\s+instanceVariableNames: )(.*?)(!)', + bygroups(Name.Class, Keyword, String, Keyword)), + (r'(!\n)(\].*)(! !)$', bygroups(Keyword, Text, Keyword)), + (r'! !$', Keyword), + ], + } + + +class NewspeakLexer(RegexLexer): + """ + For Newspeak syntax. + """ + name = 'Newspeak' + url = 'http://newspeaklanguage.org/' + filenames = ['*.ns2'] + aliases = ['newspeak', ] + mimetypes = ['text/x-newspeak'] + version_added = '1.1' + + tokens = { + 'root': [ + (r'\b(Newsqueak2)\b', Keyword.Declaration), + (r"'[^']*'", String), + (r'\b(class)(\s+)(\w+)(\s*)', + bygroups(Keyword.Declaration, Text, Name.Class, Text)), + (r'\b(mixin|self|super|private|public|protected|nil|true|false)\b', + Keyword), + (r'(\w+\:)(\s*)([a-zA-Z_]\w+)', + bygroups(Name.Function, Text, Name.Variable)), + (r'(\w+)(\s*)(=)', + bygroups(Name.Attribute, Text, Operator)), + (r'<\w+>', Comment.Special), + include('expressionstat'), + include('whitespace') + ], + + 'expressionstat': [ + (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float), + (r'\d+', Number.Integer), + (r':\w+', Name.Variable), + (r'(\w+)(::)', bygroups(Name.Variable, Operator)), + (r'\w+:', Name.Function), + (r'\w+', Name.Variable), + (r'\(|\)', Punctuation), + (r'\[|\]', Punctuation), + (r'\{|\}', Punctuation), + + (r'(\^|\+|\/|~|\*|<|>|=|@|%|\||&|\?|!|,|-|:)', Operator), + (r'\.|;', Punctuation), + include('whitespace'), + include('literals'), + ], + 'literals': [ + (r'\$.', String), + (r"'[^']*'", String), + (r"#'[^']*'", String.Symbol), + (r"#\w+:?", String.Symbol), + (r"#(\+|\/|~|\*|<|>|=|@|%|\||&|\?|!|,|-)+", String.Symbol) + ], + 'whitespace': [ + (r'\s+', Text), + (r'"[^"]*"', Comment) + ], + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/smithy.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/smithy.py new file mode 100644 index 0000000000000000000000000000000000000000..bd479aec40c596032921b5cd24f249052058e04e --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/smithy.py @@ -0,0 +1,77 @@ +""" + pygments.lexers.smithy + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for the Smithy IDL. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups, words +from pygments.token import Text, Comment, Keyword, Name, String, \ + Number, Whitespace, Punctuation + +__all__ = ['SmithyLexer'] + + +class SmithyLexer(RegexLexer): + """ + For Smithy IDL + """ + name = 'Smithy' + url = 'https://awslabs.github.io/smithy/' + filenames = ['*.smithy'] + aliases = ['smithy'] + version_added = '2.10' + + unquoted = r'[A-Za-z0-9_\.#$-]+' + identifier = r"[A-Za-z0-9_\.#$-]+" + + simple_shapes = ( + 'use', 'byte', 'short', 'integer', 'long', 'float', 'document', + 'double', 'bigInteger', 'bigDecimal', 'boolean', 'blob', 'string', + 'timestamp', + ) + + aggregate_shapes = ( + 'apply', 'list', 'map', 'set', 'structure', 'union', 'resource', + 'operation', 'service', 'trait' + ) + + tokens = { + 'root': [ + (r'///.*$', Comment.Multiline), + (r'//.*$', Comment), + (r'@[0-9a-zA-Z\.#-]*', Name.Decorator), + (r'(=)', Name.Decorator), + (r'^(\$version)(:)(.+)', + bygroups(Keyword.Declaration, Name.Decorator, Name.Class)), + (r'^(namespace)(\s+' + identifier + r')\b', + bygroups(Keyword.Declaration, Name.Class)), + (words(simple_shapes, + prefix=r'^', suffix=r'(\s+' + identifier + r')\b'), + bygroups(Keyword.Declaration, Name.Class)), + (words(aggregate_shapes, + prefix=r'^', suffix=r'(\s+' + identifier + r')'), + bygroups(Keyword.Declaration, Name.Class)), + (r'^(metadata)(\s+)((?:\S+)|(?:\"[^"]+\"))(\s*)(=)', + bygroups(Keyword.Declaration, Whitespace, Name.Class, + Whitespace, Name.Decorator)), + (r"(true|false|null)", Keyword.Constant), + (r"(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)", Number), + (identifier + ":", Name.Label), + (identifier, Name.Variable.Class), + (r'\[', Text, "#push"), + (r'\]', Text, "#pop"), + (r'\(', Text, "#push"), + (r'\)', Text, "#pop"), + (r'\{', Text, "#push"), + (r'\}', Text, "#pop"), + (r'"{3}(\\\\|\n|\\")*"{3}', String.Doc), + (r'"(\\\\|\n|\\"|[^"])*"', String.Double), + (r"'(\\\\|\n|\\'|[^'])*'", String.Single), + (r'[:,]+', Punctuation), + (r'\s+', Whitespace), + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/solidity.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/solidity.py new file mode 100644 index 0000000000000000000000000000000000000000..3182a148a3830c6b55e6b4f194010121dfe0abc4 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/solidity.py @@ -0,0 +1,87 @@ +""" + pygments.lexers.solidity + ~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexers for Solidity. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups, include, words +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace + +__all__ = ['SolidityLexer'] + + +class SolidityLexer(RegexLexer): + """ + For Solidity source code. + """ + + name = 'Solidity' + aliases = ['solidity'] + filenames = ['*.sol'] + mimetypes = [] + url = 'https://soliditylang.org' + version_added = '2.5' + + datatype = ( + r'\b(address|bool|(?:(?:bytes|hash|int|string|uint)(?:8|16|24|32|40|48|56|64' + r'|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208' + r'|216|224|232|240|248|256)?))\b' + ) + + tokens = { + 'root': [ + include('whitespace'), + include('comments'), + (r'\bpragma\s+solidity\b', Keyword, 'pragma'), + (r'\b(contract)(\s+)([a-zA-Z_]\w*)', + bygroups(Keyword, Whitespace, Name.Entity)), + (datatype + r'(\s+)((?:external|public|internal|private)\s+)?' + + r'([a-zA-Z_]\w*)', + bygroups(Keyword.Type, Whitespace, Keyword, Name.Variable)), + (r'\b(enum|event|function|struct)(\s+)([a-zA-Z_]\w*)', + bygroups(Keyword.Type, Whitespace, Name.Variable)), + (r'\b(msg|block|tx)\.([A-Za-z_][a-zA-Z0-9_]*)\b', Keyword), + (words(( + 'block', 'break', 'constant', 'constructor', 'continue', + 'contract', 'do', 'else', 'external', 'false', 'for', + 'function', 'if', 'import', 'inherited', 'internal', 'is', + 'library', 'mapping', 'memory', 'modifier', 'msg', 'new', + 'payable', 'private', 'public', 'require', 'return', + 'returns', 'struct', 'suicide', 'throw', 'this', 'true', + 'tx', 'var', 'while'), prefix=r'\b', suffix=r'\b'), + Keyword.Type), + (words(('keccak256',), prefix=r'\b', suffix=r'\b'), Name.Builtin), + (datatype, Keyword.Type), + include('constants'), + (r'[a-zA-Z_]\w*', Text), + (r'[~!%^&*+=|?:<>/-]', Operator), + (r'[.;{}(),\[\]]', Punctuation) + ], + 'comments': [ + (r'//(\n|[\w\W]*?[^\\]\n)', Comment.Single), + (r'/(\\\n)?[*][\w\W]*?[*](\\\n)?/', Comment.Multiline), + (r'/(\\\n)?[*][\w\W]*', Comment.Multiline) + ], + 'constants': [ + (r'("(\\"|.)*?")', String.Double), + (r"('(\\'|.)*?')", String.Single), + (r'\b0[xX][0-9a-fA-F]+\b', Number.Hex), + (r'\b\d+\b', Number.Decimal), + ], + 'pragma': [ + include('whitespace'), + include('comments'), + (r'(\^|>=|<)(\s*)(\d+\.\d+\.\d+)', + bygroups(Operator, Whitespace, Keyword)), + (r';', Punctuation, '#pop') + ], + 'whitespace': [ + (r'\s+', Whitespace), + (r'\n', Whitespace) + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/spice.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/spice.py new file mode 100644 index 0000000000000000000000000000000000000000..9d2b1a1a81a47b9ac830b204df3ce015b8f66985 --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/spice.py @@ -0,0 +1,70 @@ +""" + pygments.lexers.spice + ~~~~~~~~~~~~~~~~~~~~~ + + Lexers for the Spice programming language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups, words +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace + +__all__ = ['SpiceLexer'] + + +class SpiceLexer(RegexLexer): + """ + For Spice source. + """ + name = 'Spice' + url = 'https://www.spicelang.com' + filenames = ['*.spice'] + aliases = ['spice', 'spicelang'] + mimetypes = ['text/x-spice'] + version_added = '2.11' + + tokens = { + 'root': [ + (r'\n', Whitespace), + (r'\s+', Whitespace), + (r'\\\n', Text), + # comments + (r'//(.*?)\n', Comment.Single), + (r'/(\\\n)?[*]{2}(.|\n)*?[*](\\\n)?/', String.Doc), + (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), + # keywords + (r'(import|as)\b', Keyword.Namespace), + (r'(f|p|type|struct|interface|enum|alias|operator)\b', Keyword.Declaration), + (words(('if', 'else', 'switch', 'case', 'default', 'for', 'foreach', 'do', + 'while', 'break', 'continue', 'fallthrough', 'return', 'assert', + 'unsafe', 'ext'), suffix=r'\b'), Keyword), + (words(('const', 'signed', 'unsigned', 'inline', 'public', 'heap', 'compose'), + suffix=r'\b'), Keyword.Pseudo), + (words(('new', 'yield', 'stash', 'pick', 'sync', 'class'), suffix=r'\b'), + Keyword.Reserved), + (r'(true|false|nil)\b', Keyword.Constant), + (words(('double', 'int', 'short', 'long', 'byte', 'char', 'string', + 'bool', 'dyn'), suffix=r'\b'), Keyword.Type), + (words(('printf', 'sizeof', 'alignof', 'len', 'panic'), suffix=r'\b(\()'), + bygroups(Name.Builtin, Punctuation)), + # numeric literals + (r'[-]?[0-9]*[.][0-9]+([eE][+-]?[0-9]+)?', Number.Double), + (r'0[bB][01]+[slu]?', Number.Bin), + (r'0[oO][0-7]+[slu]?', Number.Oct), + (r'0[xXhH][0-9a-fA-F]+[slu]?', Number.Hex), + (r'(0[dD])?[0-9]+[slu]?', Number.Integer), + # string literal + (r'"(\\\\|\\[^\\]|[^"\\])*"', String), + # char literal + (r'\'(\\\\|\\[^\\]|[^\'\\])\'', String.Char), + # tokens + (r'<<=|>>=|<<|>>|<=|>=|\+=|-=|\*=|/=|\%=|\|=|&=|\^=|&&|\|\||&|\||' + r'\+\+|--|\%|\^|\~|==|!=|->|::|[.]{3}|#!|#|[+\-*/&]', Operator), + (r'[|<>=!()\[\]{}.,;:\?]', Punctuation), + # identifiers + (r'[^\W\d]\w*', Name.Other), + ] + } diff --git a/temp_venv/lib/python3.13/site-packages/pygments/lexers/supercollider.py b/temp_venv/lib/python3.13/site-packages/pygments/lexers/supercollider.py new file mode 100644 index 0000000000000000000000000000000000000000..0f19d2af3d4062ac6be90548dcebbd17dc5cbeda --- /dev/null +++ b/temp_venv/lib/python3.13/site-packages/pygments/lexers/supercollider.py @@ -0,0 +1,94 @@ +""" + pygments.lexers.supercollider + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for SuperCollider + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +from pygments.lexer import RegexLexer, include, words, default +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation + +__all__ = ['SuperColliderLexer'] + + +class SuperColliderLexer(RegexLexer): + """ + For SuperCollider source code. + """ + + name = 'SuperCollider' + url = 'http://supercollider.github.io/' + aliases = ['supercollider', 'sc'] + filenames = ['*.sc', '*.scd'] + mimetypes = ['application/supercollider', 'text/supercollider'] + version_added = '2.1' + + flags = re.DOTALL | re.MULTILINE + tokens = { + 'commentsandwhitespace': [ + (r'\s+', Text), + (r')', popstate_xmlcomment_callback), + (r'[^-]{1,2}', Literal), + (r'\t|\r|\n|[\u0020-\uD7FF]|[\uE000-\uFFFD]|[\U00010000-\U0010FFFF]', + Literal), + ], + 'processing_instruction': [ + (r'\s+', Text, 'processing_instruction_content'), + (r'\?>', String.Doc, '#pop'), + (pitarget, Name), + ], + 'processing_instruction_content': [ + (r'\?>', String.Doc, '#pop'), + (r'\t|\r|\n|[\u0020-\uD7FF]|[\uE000-\uFFFD]|[\U00010000-\U0010FFFF]', + Literal), + ], + 'cdata_section': [ + (r']]>', String.Doc, '#pop'), + (r'\t|\r|\n|[\u0020-\uD7FF]|[\uE000-\uFFFD]|[\U00010000-\U0010FFFF]', + Literal), + ], + 'start_tag': [ + include('whitespace'), + (r'(/>)', popstate_tag_callback), + (r'>', Name.Tag, 'element_content'), + (r'"', Punctuation, 'quot_attribute_content'), + (r"'", Punctuation, 'apos_attribute_content'), + (r'=', Operator), + (qname, Name.Tag), + ], + 'quot_attribute_content': [ + (r'"', Punctuation, 'start_tag'), + (r'(\{)', pushstate_root_callback), + (r'""', Name.Attribute), + (quotattrcontentchar, Name.Attribute), + (entityref, Name.Attribute), + (charref, Name.Attribute), + (r'\{\{|\}\}', Name.Attribute), + ], + 'apos_attribute_content': [ + (r"'", Punctuation, 'start_tag'), + (r'\{', Punctuation, 'root'), + (r"''", Name.Attribute), + (aposattrcontentchar, Name.Attribute), + (entityref, Name.Attribute), + (charref, Name.Attribute), + (r'\{\{|\}\}', Name.Attribute), + ], + 'element_content': [ + (r')', popstate_tag_callback), + (qname, Name.Tag), + ], + 'xmlspace_decl': [ + include('whitespace'), + (r'\(:', Comment, 'comment'), + (r'preserve|strip', Keyword, '#pop'), + ], + 'declareordering': [ + (r'\(:', Comment, 'comment'), + include('whitespace'), + (r'ordered|unordered', Keyword, '#pop'), + ], + 'xqueryversion': [ + include('whitespace'), + (r'\(:', Comment, 'comment'), + (stringdouble, String.Double), + (stringsingle, String.Single), + (r'encoding', Keyword), + (r';', Punctuation, '#pop'), + ], + 'pragma': [ + (qname, Name.Variable, 'pragmacontents'), + ], + 'pragmacontents': [ + (r'#\)', Punctuation, 'operator'), + (r'\t|\r|\n|[\u0020-\uD7FF]|[\uE000-\uFFFD]|[\U00010000-\U0010FFFF]', + Literal), + (r'(\s+)', Whitespace), + ], + 'occurrenceindicator': [ + include('whitespace'), + (r'\(:', Comment, 'comment'), + (r'\*|\?|\+', Operator, 'operator'), + (r':=', Operator, 'root'), + default('operator'), + ], + 'option': [ + include('whitespace'), + (qname, Name.Variable, '#pop'), + ], + 'qname_braren': [ + include('whitespace'), + (r'(\{)', pushstate_operator_root_callback), + (r'(\()', Punctuation, 'root'), + ], + 'element_qname': [ + (qname, Name.Variable, 'root'), + ], + 'attribute_qname': [ + (qname, Name.Variable, 'root'), + ], + 'root': [ + include('whitespace'), + (r'\(:', Comment, 'comment'), + + # handle operator state + # order on numbers matters - handle most complex first + (r'\d+(\.\d*)?[eE][+-]?\d+', Number.Float, 'operator'), + (r'(\.\d+)[eE][+-]?\d+', Number.Float, 'operator'), + (r'(\.\d+|\d+\.\d*)', Number.Float, 'operator'), + (r'(\d+)', Number.Integer, 'operator'), + (r'(\.\.|\.|\))', Punctuation, 'operator'), + (r'(declare)(\s+)(construction)', + bygroups(Keyword.Declaration, Text, Keyword.Declaration), 'operator'), + (r'(declare)(\s+)(default)(\s+)(order)', + bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), 'operator'), + (r'(declare)(\s+)(context)(\s+)(item)', + bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), 'operator'), + (ncname + r':\*', Name, 'operator'), + (r'\*:'+ncname, Name.Tag, 'operator'), + (r'\*', Name.Tag, 'operator'), + (stringdouble, String.Double, 'operator'), + (stringsingle, String.Single, 'operator'), + + (r'(\}|\])', popstate_callback), + + # NAMESPACE DECL + (r'(declare)(\s+)(default)(\s+)(collation)', + bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration, + Whitespace, Keyword.Declaration)), + (r'(module|declare)(\s+)(namespace)', + bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration), + 'namespacedecl'), + (r'(declare)(\s+)(base-uri)', + bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration), + 'namespacedecl'), + + # NAMESPACE KEYWORD + (r'(declare)(\s+)(default)(\s+)(element|function)', + bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration, + Whitespace, Keyword.Declaration), + 'namespacekeyword'), + (r'(import)(\s+)(schema|module)', + bygroups(Keyword.Pseudo, Whitespace, Keyword.Pseudo), + 'namespacekeyword'), + (r'(declare)(\s+)(copy-namespaces)', + bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration), + 'namespacekeyword'), + + # VARNAMEs + (r'(for|let|some|every)(\s+)(\$)', + bygroups(Keyword, Whitespace, Name.Variable), 'varname'), + (r'(for)(\s+)(tumbling|sliding)(\s+)(window)(\s+)(\$)', + bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword, + Whitespace, Name.Variable), + 'varname'), + (r'\$', Name.Variable, 'varname'), + (r'(declare)(\s+)(variable)(\s+)(\$)', + bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration, + Whitespace, Name.Variable), + 'varname'), + + # ANNOTATED GLOBAL VARIABLES AND FUNCTIONS + (r'(declare)(\s+)(\%)', bygroups(Keyword.Declaration, Whitespace, + Name.Decorator), + 'annotationname'), + + # ITEMTYPE + (r'(\))(\s+)(as)', bygroups(Operator, Whitespace, Keyword), + 'itemtype'), + + (r'(element|attribute|schema-element|schema-attribute|comment|' + r'text|node|document-node|empty-sequence)(\s+)(\()', + pushstate_operator_kindtest_callback), + + (r'(processing-instruction)(\s+)(\()', + pushstate_operator_kindtestforpi_callback), + + (r'(