Skip to content

Add a tool that lists identical contexts in a syntax file

Preventing duplication is not necessarily preferable, but it may be useful for simplifying future modifications.

utils/detect-identical-context.py data/syntax/*.xml | sort
data/syntax/4dos.xml: ['cmdsimpleNoChecks', 'cmdTakeAFileName', 'cmdFilesystemOperation']
data/syntax/4dos.xml: ['conditionFileTest', 'conditionRight']
data/syntax/4dos.xml: ['fixedDo', 'countedDoBy']
data/syntax/asciidoc.xml: ['passthrough delimited', 'verbatim delimited']
data/syntax/bash.xml: ['BuiltinGetoptsOpt', 'BuiltinLetArg']
data/syntax/bash.xml: ['FindPathThenPopMaybeGlobAny', 'ExprDblBracketValueMaybeGlobAny']
data/syntax/brightscript.xml: ['function_ret', 'sub_ret']
data/syntax/cabal.xml: ['license', 'licenseFile', 'maintainer', 'author', 'name', 'description', 'copyright', 'homepage', 'bugReports']
data/syntax/csv-whitespace.xml: ['Column0Spaces', 'Column1Spaces', 'Column2Spaces', 'Column3Spaces', 'Column4Spaces', 'Column5Spaces', 'Column6Spaces', 'Column7Spaces', 'Column8Spaces', 'Column9Spaces']
data/syntax/dosbat.xml: ['VariableRegularEscaped', 'VariableRegularKeyVar']
data/syntax/earthfile.xml: ['BUILD_ctx', 'FROM_image_ctx']
data/syntax/earthfile.xml: ['CMD_ctx', 'ENTRYPOINT_ctx', 'VOLUME_ctx']
data/syntax/earthfile.xml: ['EXPOSE_ctx', 'USER_ctx', 'WORKDIR_ctx', 'HEALTHCHECK_ctx', 'HOST_ctx', 'PROJECT_ctx']
data/syntax/earthfile.xml: ['mount_opt', 'secret_opt']
data/syntax/elm.xml: ['module', 'import']
data/syntax/ferite.xml: ['Multiline Comment', 'Multiline Comment 2']
data/syntax/fluent.xml: ['StandaloneComment', 'FileComment']
data/syntax/hunspell-aff.xml: ['context_characters', 'context_enum', 'context_pattern']
data/syntax/hunspell-aff.xml: ['context_numbersOrFlags', 'context_numbersOrString']
data/syntax/idl.xml: ['Some Context', 'Some Context2']
data/syntax/isocpp.xml: ['Standard Classes In PP', 'Boost Stuff In PP', 'InternalsNS In PP']
data/syntax/jam.xml: ['Rule', 'CaseStatement']
data/syntax/javascript-react.xml: ['ComponentTagFindType', 'ElementTagFindType']
data/syntax/jira.xml: ['BracketAnchorContent', 'AttachmentLinkContent', 'UserTagContent']
data/syntax/kconfig.xml: ['ifOpt.prompt_stmt_opt', 'ifOpt.prompt']
data/syntax/kconfig.xml: ['nl.assign_val', 'expandableIdentifier']
data/syntax/kconfig.xml: ['optionWithoutValue', 'nl.assign_val.wsOpt']
data/syntax/kconfig.xml: ['stmt_list.nl', 'choice_option_list.nl', 'nl', 'comment_stmt.nl', 'config_option_list.nl', 'menu_visList.nl', 'helpEntry']
data/syntax/klipper-config.xml: ['PropertyBody', 'PinBody']
data/syntax/k.xml: ['comment', 'commentToEOF']
data/syntax/latex.xml: ['UnknownHighlightingBegin', 'HighlightingBeginABAP', 'HighlightingBeginActionScript 2.0', 'HighlightingBeginAda', 'HighlightingBeginAgda', 'HighlightingBeginApache Configuration', 'HighlightingBeginAutoHotKey', 'HighlightingBeginAWK', 'HighlightingBeginBash', 'HighlightingBeginBibTeX', 'HighlightingBeginBoo', 'HighlightingBeginC', 'HighlightingBeginCMake', 'HighlightingBeginC#', 'HighlightingBeginClojure', 'HighlightingBeginCoffeeScript', 'HighlightingBeginCommon Lisp', 'HighlightingBeginC++', 'HighlightingBeginCSS', 'HighlightingBeginD', 'HighlightingBeginDart', 'HighlightingBeginPascal', 'HighlightingBeginDiff', 'HighlightingBeginDTD', 'HighlightingBeginEiffel', 'HighlightingBeginElixir', 'HighlightingBeginElm', 'HighlightingBeginEmail', 'HighlightingBeginErlang', 'HighlightingBeginFish', 'HighlightingBeginANS-Forth94', 'HighlightingBeginFortran (Fixed Format)', 'HighlightingBeginFortran (Free Format)', 'HighlightingBeginGAP', 'HighlightingBeginGodot', 'HighlightingBeginGLSL', 'HighlightingBeginG-Code', 'HighlightingBeginGnuplot', 'HighlightingBeginGo', 'HighlightingBeginGroovy', 'HighlightingBeginHaml', 'HighlightingBeginHaskell', 'HighlightingBeginHaxe', 'HighlightingBeginHTML', 'HighlightingBeginIDL', 'HighlightingBeginIdris', 'HighlightingBeginInform', 'HighlightingBeginINI Files', 'HighlightingBeginJ', 'HighlightingBeginJava', 'HighlightingBeginJavaScript', 'HighlightingBeginJCL', 'HighlightingBeginJSON', 'HighlightingBeginJulia', 'HighlightingBeginKconfig', 'HighlightingBeginKotlin', 'HighlightingBeginLSL', 'HighlightingBeginLESSCSS', 'HighlightingBeginLilyPond', 'HighlightingBeginLiterate Haskell', 'HighlightingBeginLLVM', 'HighlightingBeginLogtalk', 'HighlightingBeginLua', 'HighlightingBeginMakefile', 'HighlightingBeginMako', 'HighlightingBeginMarkdown', 'HighlightingBeginMason', 'HighlightingBeginMathematica', 'HighlightingBeginMatlab', 'HighlightingBeginMaxima', 'HighlightingBeginMeson', 'HighlightingBeginModelica', 'HighlightingBeginModula-2', 'HighlightingBeginSQL (MySQL)', 'HighlightingBeginNSIS', 'HighlightingBeginIntel x86 (NASM)', 'HighlightingBeginNemerle', 'HighlightingBeginnesC', 'HighlightingBeginNim', 'HighlightingBeginNix', 'HighlightingBeginObjective-C', 'HighlightingBeginObjective-C++', 'HighlightingBeginObjective Caml', 'HighlightingBeginOctave', 'HighlightingBeginPerl', 'HighlightingBeginPHP/PHP', 'HighlightingBeginPig', 'HighlightingBeginPike', 'HighlightingBeginPony', 'HighlightingBeginPostScript', 'HighlightingBeginPOV-Ray', 'HighlightingBeginPowerShell', 'HighlightingBeginPraat', 'HighlightingBeginProlog', 'HighlightingBeginProtobuf', 'HighlightingBeginPug', 'HighlightingBeginPuppet', 'HighlightingBeginPython', 'HighlightingBeginQML', 'HighlightingBeginRelaxNG-Compact', 'HighlightingBeginRPM Spec', 'HighlightingBeginRacket', 'HighlightingBeginREXX', 'HighlightingBeginRuby/Rails/RHTML', 'HighlightingBeginreStructuredText', 'HighlightingBeginRuby', 'HighlightingBeginRust', 'HighlightingBeginSML', 'HighlightingBeginSASS', 'HighlightingBeginScala', 'HighlightingBeginScheme', 'HighlightingBeginscilab', 'HighlightingBeginSCSS', 'HighlightingBeginsed', 'HighlightingBeginSieve', 'HighlightingBeginSmali', 'HighlightingBeginSolidity', 'HighlightingBeginSpice', 'HighlightingBeginSQL', 'HighlightingBeginStan', 'HighlightingBeginStata', 'HighlightingBeginSwift', 'HighlightingBeginSystemVerilog', 'HighlightingBeginTOML', 'HighlightingBeginTADS 3', 'HighlightingBeginTcl/Tk', 'HighlightingBeginTcsh', 'HighlightingBeginTerraform', 'HighlightingBeginLaTeX', 'HighlightingBeginTodo.txt', 'HighlightingBeginTypeScript', 'HighlightingBeginVala', 'HighlightingBeginVelocity', 'HighlightingBeginVerilog', 'HighlightingBeginVHDL', 'HighlightingBeginXML', 'HighlightingBeginx.org Configuration', 'HighlightingBeginxslt', 'HighlightingBeginYAML', 'HighlightingBeginYANG']
data/syntax/latex.xml: ['VerbEnd', 'LstinlineEnd']
data/syntax/lilypond.xml: ['commentline', 'schemecommentline']
data/syntax/metamath.xml: ['VariableDeclaration', 'ConstantDeclaration', 'DisjointRestriction', 'SymbolList']
data/syntax/metamath.xml: ['VariableTypeHypothesis', 'LogicalHypothesis', 'AxiomaticAssertion']
data/syntax/mustache.xml: ['MustachePartial', 'MustacheVariable']
data/syntax/nim.xml: ['Start-Typetar', 'Start-Proctar']
data/syntax/orgmode.xml: ['list', 'numlist']
data/syntax/praat.xml: ['label', 'variable']
data/syntax/prolog.xml: ['esc_seq_cc', 'esc_seq_q2']
data/syntax/puppet.xml: ['class params', 'define params']
data/syntax/puppet.xml: ['code block', 'node in', 'class in', 'define in']
data/syntax/puppet.xml: ['res_ref_param_val', 'res_defaults_param_val']
data/syntax/raku.xml: ['PodBlockConfigKeyIntName', 'PodConfigKeyIntName']
data/syntax/raku.xml: ['PodBlockConfigParam', 'PodConfigParam']
data/syntax/retro.xml: ['ctx-colon', 'ctx-note', 'ctx-num', 'ctx-fnum', 'ctx-ptr', 'ctx-char', 'ctx-inst', 'ctx-defer', 'ctx-fetch', 'ctx-store']
data/syntax/robot.xml: ['Test Case With Variable', 'Keyword With Variable', 'Task With Variable']
data/syntax/rpmspec.xml: ['macro entry in package section', 'command section lua']
data/syntax/rpmspec.xml: ['package section start line', 'description section start line', 'tag_line_value', 'tag_line_integer_without_syntax_check', 'changelog_generic', 'changelog_header']
data/syntax/r.xml: ['Headline', 'Comment']
data/syntax/scala.xml: ['MultiLineStringNoFinal', 'MultiLineStringInterpolarNoFinal']
data/syntax/selinux-fc.xml: ['_fc_find_level_range', '_before_gen_context_type']
data/syntax/selinux.xml: ['_simple_string_regexp', '_block_quoted_simple']
data/syntax/smali.xml: ['MethodDeclaration', 'Annotation']
data/syntax/sql-oracle.xml: ['StringLiteral', 'NCharOperator']
data/syntax/stan.xml: ['Hash comment', 'C-style comment']
data/syntax/systemd-unit.xml: ['extension option', 'list']
data/syntax/textile.xml: ['sectiontitle_block', 'sectionheader_block']
data/syntax/typescript-react.xml: ['ComponentTagFindType', 'ElementTagFindType']
data/syntax/typescript-react.xml: ['Types-BeforeTag', 'TypesRoundBracket-BeforeTag']
data/syntax/varnishtest.xml: ['brace-string-internal', 'macro_identifier']
data/syntax/varnishtest.xml: ['varnishtest_declaration', 'feature_instruction']
data/syntax/varnish.xml: ['shell-like-comment', 'cplusplus-like-comment']
data/syntax/verilog.xml: ['Commentar 2', 'Commentar/Preprocessor']
data/syntax/vhdl.xml: ['sequential_stmt_expr', 'signal']
data/syntax/xmldebug.xml: ['48:DefaultDecl AttValue qq', '49:DefaultDecl AttValue q']
data/syntax/xslt.xml: ['SpaceBeforeAttrValue', 'SpaceBeforeXAttrValue']
data/syntax/zsh.xml: ['BuiltinGetoptsOpt', 'BuiltinLetArg']
data/syntax/zsh.xml: ['ExprDblBracketUnary', 'ExprDblBracketParam2', 'ExprDblBracketParam3', 'ExprDblBracketRegex']
data/syntax/zsh.xml: ['GlobRangeOrError', 'ExprDblBracketValueMaybeGlobRange']
data/syntax/zsh.xml: ['NormalOptionMaybeGroupEnd', 'PathMaybeGroupEnd']
data/syntax/zsh.xml: ['VarNameModifier_h', 'VarBraceModifier_h', 'GlobQualifier_Y']

Merge request reports

Loading