123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445 |
- /*
- Language: Coq
- Author: Stephan Boyer <stephan@stephanboyer.com>
- Category: functional
- Website: https://coq.inria.fr
- */
- /** @type LanguageFn */
- function coq(hljs) {
- const KEYWORDS = [
- "_|0",
- "as",
- "at",
- "cofix",
- "else",
- "end",
- "exists",
- "exists2",
- "fix",
- "for",
- "forall",
- "fun",
- "if",
- "IF",
- "in",
- "let",
- "match",
- "mod",
- "Prop",
- "return",
- "Set",
- "then",
- "Type",
- "using",
- "where",
- "with",
- "Abort",
- "About",
- "Add",
- "Admit",
- "Admitted",
- "All",
- "Arguments",
- "Assumptions",
- "Axiom",
- "Back",
- "BackTo",
- "Backtrack",
- "Bind",
- "Blacklist",
- "Canonical",
- "Cd",
- "Check",
- "Class",
- "Classes",
- "Close",
- "Coercion",
- "Coercions",
- "CoFixpoint",
- "CoInductive",
- "Collection",
- "Combined",
- "Compute",
- "Conjecture",
- "Conjectures",
- "Constant",
- "constr",
- "Constraint",
- "Constructors",
- "Context",
- "Corollary",
- "CreateHintDb",
- "Cut",
- "Declare",
- "Defined",
- "Definition",
- "Delimit",
- "Dependencies",
- "Dependent",
- "Derive",
- "Drop",
- "eauto",
- "End",
- "Equality",
- "Eval",
- "Example",
- "Existential",
- "Existentials",
- "Existing",
- "Export",
- "exporting",
- "Extern",
- "Extract",
- "Extraction",
- "Fact",
- "Field",
- "Fields",
- "File",
- "Fixpoint",
- "Focus",
- "for",
- "From",
- "Function",
- "Functional",
- "Generalizable",
- "Global",
- "Goal",
- "Grab",
- "Grammar",
- "Graph",
- "Guarded",
- "Heap",
- "Hint",
- "HintDb",
- "Hints",
- "Hypotheses",
- "Hypothesis",
- "ident",
- "Identity",
- "If",
- "Immediate",
- "Implicit",
- "Import",
- "Include",
- "Inductive",
- "Infix",
- "Info",
- "Initial",
- "Inline",
- "Inspect",
- "Instance",
- "Instances",
- "Intro",
- "Intros",
- "Inversion",
- "Inversion_clear",
- "Language",
- "Left",
- "Lemma",
- "Let",
- "Libraries",
- "Library",
- "Load",
- "LoadPath",
- "Local",
- "Locate",
- "Ltac",
- "ML",
- "Mode",
- "Module",
- "Modules",
- "Monomorphic",
- "Morphism",
- "Next",
- "NoInline",
- "Notation",
- "Obligation",
- "Obligations",
- "Opaque",
- "Open",
- "Optimize",
- "Options",
- "Parameter",
- "Parameters",
- "Parametric",
- "Path",
- "Paths",
- "pattern",
- "Polymorphic",
- "Preterm",
- "Print",
- "Printing",
- "Program",
- "Projections",
- "Proof",
- "Proposition",
- "Pwd",
- "Qed",
- "Quit",
- "Rec",
- "Record",
- "Recursive",
- "Redirect",
- "Relation",
- "Remark",
- "Remove",
- "Require",
- "Reserved",
- "Reset",
- "Resolve",
- "Restart",
- "Rewrite",
- "Right",
- "Ring",
- "Rings",
- "Save",
- "Scheme",
- "Scope",
- "Scopes",
- "Script",
- "Search",
- "SearchAbout",
- "SearchHead",
- "SearchPattern",
- "SearchRewrite",
- "Section",
- "Separate",
- "Set",
- "Setoid",
- "Show",
- "Solve",
- "Sorted",
- "Step",
- "Strategies",
- "Strategy",
- "Structure",
- "SubClass",
- "Table",
- "Tables",
- "Tactic",
- "Term",
- "Test",
- "Theorem",
- "Time",
- "Timeout",
- "Transparent",
- "Type",
- "Typeclasses",
- "Types",
- "Undelimit",
- "Undo",
- "Unfocus",
- "Unfocused",
- "Unfold",
- "Universe",
- "Universes",
- "Unset",
- "Unshelve",
- "using",
- "Variable",
- "Variables",
- "Variant",
- "Verbose",
- "Visibility",
- "where",
- "with"
- ];
- const BUILT_INS = [
- "abstract",
- "absurd",
- "admit",
- "after",
- "apply",
- "as",
- "assert",
- "assumption",
- "at",
- "auto",
- "autorewrite",
- "autounfold",
- "before",
- "bottom",
- "btauto",
- "by",
- "case",
- "case_eq",
- "cbn",
- "cbv",
- "change",
- "classical_left",
- "classical_right",
- "clear",
- "clearbody",
- "cofix",
- "compare",
- "compute",
- "congruence",
- "constr_eq",
- "constructor",
- "contradict",
- "contradiction",
- "cut",
- "cutrewrite",
- "cycle",
- "decide",
- "decompose",
- "dependent",
- "destruct",
- "destruction",
- "dintuition",
- "discriminate",
- "discrR",
- "do",
- "double",
- "dtauto",
- "eapply",
- "eassumption",
- "eauto",
- "ecase",
- "econstructor",
- "edestruct",
- "ediscriminate",
- "eelim",
- "eexact",
- "eexists",
- "einduction",
- "einjection",
- "eleft",
- "elim",
- "elimtype",
- "enough",
- "equality",
- "erewrite",
- "eright",
- "esimplify_eq",
- "esplit",
- "evar",
- "exact",
- "exactly_once",
- "exfalso",
- "exists",
- "f_equal",
- "fail",
- "field",
- "field_simplify",
- "field_simplify_eq",
- "first",
- "firstorder",
- "fix",
- "fold",
- "fourier",
- "functional",
- "generalize",
- "generalizing",
- "gfail",
- "give_up",
- "has_evar",
- "hnf",
- "idtac",
- "in",
- "induction",
- "injection",
- "instantiate",
- "intro",
- "intro_pattern",
- "intros",
- "intuition",
- "inversion",
- "inversion_clear",
- "is_evar",
- "is_var",
- "lapply",
- "lazy",
- "left",
- "lia",
- "lra",
- "move",
- "native_compute",
- "nia",
- "nsatz",
- "omega",
- "once",
- "pattern",
- "pose",
- "progress",
- "proof",
- "psatz",
- "quote",
- "record",
- "red",
- "refine",
- "reflexivity",
- "remember",
- "rename",
- "repeat",
- "replace",
- "revert",
- "revgoals",
- "rewrite",
- "rewrite_strat",
- "right",
- "ring",
- "ring_simplify",
- "rtauto",
- "set",
- "setoid_reflexivity",
- "setoid_replace",
- "setoid_rewrite",
- "setoid_symmetry",
- "setoid_transitivity",
- "shelve",
- "shelve_unifiable",
- "simpl",
- "simple",
- "simplify_eq",
- "solve",
- "specialize",
- "split",
- "split_Rabs",
- "split_Rmult",
- "stepl",
- "stepr",
- "subst",
- "sum",
- "swap",
- "symmetry",
- "tactic",
- "tauto",
- "time",
- "timeout",
- "top",
- "transitivity",
- "trivial",
- "try",
- "tryif",
- "unfold",
- "unify",
- "until",
- "using",
- "vm_compute",
- "with"
- ];
- return {
- name: 'Coq',
- keywords: {
- keyword: KEYWORDS,
- built_in: BUILT_INS
- },
- contains: [
- hljs.QUOTE_STRING_MODE,
- hljs.COMMENT('\\(\\*', '\\*\\)'),
- hljs.C_NUMBER_MODE,
- {
- className: 'type',
- excludeBegin: true,
- begin: '\\|\\s*',
- end: '\\w+'
- },
- { // relevance booster
- begin: /[-=]>/ }
- ]
- };
- }
- export { coq as default };
|