// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 537297cdae3ab05f8d5dd1c03627a5bd73707b19

package data

import (
	"github.com/go-enry/go-enry/v2/data/rule"
	"github.com/go-enry/go-enry/v2/regex"
)

var ContentHeuristics = map[string]*Heuristics{
	".1": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^\.(?:[A-Za-z]{2}(?:\s|$)|\\")`),
		),
		rule.Always(
			rule.MatchingLanguages("Text"),
		),
	},
	".1in": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Roff"),
		),
	},
	".1m": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Roff"),
		),
	},
	".1x": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Roff"),
		),
	},
	".2": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^\.(?:[A-Za-z]{2}(?:\s|$)|\\")`),
		),
		rule.Always(
			rule.MatchingLanguages("Text"),
		),
	},
	".3": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^\.(?:[A-Za-z]{2}(?:\s|$)|\\")`),
		),
		rule.Always(
			rule.MatchingLanguages("Text"),
		),
	},
	".3in": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Roff"),
		),
	},
	".3m": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Roff"),
		),
	},
	".3p": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Roff"),
		),
	},
	".3pm": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Roff"),
		),
	},
	".3qt": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Roff"),
		),
	},
	".3x": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Roff"),
		),
	},
	".4": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^\.(?:[A-Za-z]{2}(?:\s|$)|\\")`),
		),
		rule.Always(
			rule.MatchingLanguages("Text"),
		),
	},
	".5": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^\.(?:[A-Za-z]{2}(?:\s|$)|\\")`),
		),
		rule.Always(
			rule.MatchingLanguages("Text"),
		),
	},
	".6": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^\.(?:[A-Za-z]{2}(?:\s|$)|\\")`),
		),
		rule.Always(
			rule.MatchingLanguages("Text"),
		),
	},
	".7": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^\.(?:[A-Za-z]{2}(?:\s|$)|\\")`),
		),
		rule.Always(
			rule.MatchingLanguages("Text"),
		),
	},
	".8": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^\.(?:[A-Za-z]{2}(?:\s|$)|\\")`),
		),
		rule.Always(
			rule.MatchingLanguages("Text"),
		),
	},
	".9": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^\.(?:[A-Za-z]{2}(?:\s|$)|\\")`),
		),
		rule.Always(
			rule.MatchingLanguages("Text"),
		),
	},
	".action": &Heuristics{
		rule.And(
			rule.MatchingLanguages("ROS Interface"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`(?i)^[a-z]\w*(?:\/[a-z]\w*)?(?:<=\d+)?(?:\[(?:<=\d+)?\])?\s+\w+\b`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^---\s*$`),
			),
			rule.Not(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^\s*[^\s@#\w-]`),
			),
		),
	},
	".al": &Heuristics{
		rule.And(
			rule.MatchingLanguages("AL"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`\b(?i:(CODEUNIT|PAGE|PAGEEXTENSION|PAGECUSTOMIZATION|DOTNET|ENUM|ENUMEXTENSION|VALUE|QUERY|REPORT|TABLE|TABLEEXTENSION|XMLPORT|PROFILE|CONTROLADDIN|REPORTEXTENSION|INTERFACE|PERMISSIONSET|PERMISSIONSETEXTENSION|ENTITLEMENT))\b`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Perl"),
		),
	},
	".alg": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("ALGOL"),
			regex.MustCompileMultiline(`(?i)^comment\b.*(;|comment)|^#[^#\r\n]+#$|(?i)\b(integer|real|boolean|string)\b\s+\w+\s*:=\s*|(?i)^begin[\s\S]*^end`),
		),
	},
	".app": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Erlang"),
			regex.MustCompileMultiline(`^\{\s*(?:application|'application')\s*,\s*(?:[a-z]+[\w@]*|'[^']+')\s*,\s*\[(?:.|[\r\n])*\]\s*\}\.[ \t]*$`),
		),
	},
	".as": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("ActionScript"),
			regex.MustCompileMultiline(`^\s*(?:package(?:\s+[\w.]+)?\s+(?:\{|$)|import\s+[\w.*]+\s*;|(?:intrinsic\s+)class\s+[\w<>.]+|\s+class\s+extends\s+[\w<>.]+|(?:(?:public|protected|private|static)\s+)*(?:(?:var|const|local)\s+\w+\s*:\s*[\w<>.]+(?:\s*=.*)?\s*;|function\s+\w+\s*\((?:\s*\w+\s*:\s*[\w<>.]+\s*(,\s*\w+\s*:\s*[\w<>.]+\s*)*)?\)))`),
		),
	},
	".asc": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Public Key"),
			regex.MustCompileMultiline(`^(----[- ]BEGIN|ssh-(rsa|dss)) `),
		),
		rule.Or(
			rule.MatchingLanguages("AsciiDoc"),
			regex.MustCompileMultiline(`^[=-]+\s|\{\{[A-Za-z]`),
		),
		rule.Or(
			rule.MatchingLanguages("AGS Script"),
			regex.MustCompileMultiline(`^(\/\/.+|((import|export)\s+)?(function|int|float|char)\s+((room|repeatedly|on|game)_)?([A-Za-z]+[A-Za-z_0-9]+)\s*[;\(])`),
		),
	},
	".asm": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Assembly"),
			regex.MustCompileMultiline(`(?i)mov\s+[^\s]{2,},`),
		),
		rule.Or(
			rule.MatchingLanguages("Motorola 68K Assembly"),
			regex.MustCompileMultiline(`(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b|(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+|(?im)^\s*move\.[bwl]\s+.*\b[ad]\d|(?im)^\s*movem\.[bwl]\b|(?im)^\s*move[mp](?:\.[wl])?\b|(?im)^\s*btst\b|(?im)^\s*dbra\b`),
		),
	},
	".asy": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("LTspice Symbol"),
			regex.MustCompileMultiline(`^SymbolType[ \t]`),
		),
		rule.Always(
			rule.MatchingLanguages("Asymptote"),
		),
	},
	".bas": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("B4X"),
			regex.MustCompileMultiline(`\A\W{0,3}(?:.*(?:\r?\n|\r)){0,9}B4(?:J|A|R|i)=true`),
		),
		rule.Or(
			rule.MatchingLanguages("FreeBASIC"),
			regex.MustCompileMultiline(`(?i)^[ \t]*#(?:define|endif|endmacro|ifn?def|include|lang|macro|pragma)(?:$|\s)|(?i)^[ \t]*dim( shared)? [a-z_][a-z0-9_]* as [a-z_][a-z0-9_]* ptr`),
		),
		rule.And(
			rule.MatchingLanguages("FreeBASIC"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`(?i)^[ \t]*return `),
			),
			rule.Not(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`(?i)[ \t]*gosub `),
			),
		),
		rule.Or(
			rule.MatchingLanguages("BASIC"),
			regex.MustCompileMultiline(`\A\s*\d`),
		),
		rule.Or(
			rule.MatchingLanguages("QuickBASIC"),
			regex.MustCompileMultiline(`^[ ]*(CONST|DIM|REDIM|DEFINT|PRINT|DECLARE (SUB|FUNCTION)|FUNCTION|SUB) |(#|$)lang:?\s*"?qb"?|(?i)'\$INCLUDE:|(?i)^[ ]*CLS[ ]*('|:|\r|\n)|(?i)^[ ]*OPTION _EXPLICIT|(?i)^[ ]*DIM SHARED |(?i)^[ ]*PRINT "|(?i) As _(Byte|Offset|MEM)|(?i)^[ ]*_(DISPLAY|DEST|CONSOLE|SOURCE|FREEIMAGE|PALETTECOLOR|PRINTSTRING|LOADFONT|PUTIMAGE)|(?i)^[ ]*_(TITLE|PLAYMOD) "|(?i)^[ ]*_(LIMIT|SCREEN|DELAY) \.?\d+|(?i)\b_(MOUSEBUTTON|NEWIMAGE|KEYDOWN|WIDTH|HEIGHT)\(|(?i)^[ ]*\$(CONSOLE|CHECKING):|(?i)^[ ]*\$(FULLSCREEN|RESIZE|STATIC|DYNAMIC|NOPREFIX|SCREENSHOW|SCREENHIDE|EXEICON)\b`),
		),
		rule.Or(
			rule.MatchingLanguages("VBA"),
			regex.MustCompileMultiline(`\b(?:VBA|[vV]ba)(?:\b|[0-9A-Z_])|^[ ]*(?:Public|Private)? Declare PtrSafe (?:Sub|Function)\b|^[ ]*#If Win64\b|^[ ]*(?:Dim|Const) [0-9a-zA-Z_]*[ ]*As Long(?:Ptr|Long)\b|^[ ]*Option (?:Private Module|Compare Database)\b|(?: |\()(?:Access|Excel|Outlook|PowerPoint|Visio|Word|VBIDE)\.\w|\b(?:(?:Active)?VBProjects?|VBComponents?|Application\.(?:VBE|ScreenUpdating))\b|\b(?:ThisDrawing|AcadObject|Active(?:Explorer|Inspector|Window\.Presentation|Presentation|Document)|Selection\.(?:Document|Find|Paragraphs|Range))\b|\b(?:(?:This|Active)?Workbooks?|Worksheets?|Active(?:Sheet|Chart|Cell)|WorksheetFunction)\b|\b(?:Range\(".*|Cells\([0-9a-zA-Z_]*, (?:[0-9a-zA-Z_]*|"[a-zA-Z]{1,3}"))\)`),
		),
		rule.Or(
			rule.MatchingLanguages("Visual Basic 6.0"),
			regex.MustCompileMultiline(`^[ ]*Attribute VB_Name = `),
		),
	},
	".bb": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("BlitzBasic"),
			regex.MustCompileMultiline(`(<^\s*; |End Function)`),
		),
		rule.Or(
			rule.MatchingLanguages("BitBake"),
			regex.MustCompileMultiline(`^(# |include|require|inherit)\b`),
		),
		rule.Or(
			rule.MatchingLanguages("Clojure"),
			regex.MustCompileMultiline(`\((def|defn|defmacro|let)\s`),
		),
	},
	".bf": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Beef"),
			regex.MustCompileMultiline(`(?-m)^\s*using\s+(System|Beefy)(\.(.*))?;\s*$`),
		),
		rule.Or(
			rule.MatchingLanguages("HyPhy"),
			regex.MustCompileMultiline(`(?-m)^\s*#include\s+".*";\s*$|\sfprintf\s*\(`),
		),
		rule.Or(
			rule.MatchingLanguages("Brainfuck"),
			regex.MustCompileMultiline(`(>\+>|>\+<)`),
		),
	},
	".bi": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("FreeBASIC"),
			regex.MustCompileMultiline(`(?i)^[ \t]*#(?:define|endif|endmacro|ifn?def|include|lang|macro|pragma)(?:$|\s)|(?i)^[ \t]*dim( shared)? [a-z_][a-z0-9_]* as [a-z_][a-z0-9_]* ptr`),
		),
		rule.And(
			rule.MatchingLanguages("FreeBASIC"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`(?i)^[ \t]*return `),
			),
			rule.Not(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`(?i)[ \t]*gosub `),
			),
		),
		rule.Or(
			rule.MatchingLanguages("QuickBASIC"),
			regex.MustCompileMultiline(`^[ ]*(CONST|DIM|REDIM|DEFINT|PRINT|DECLARE (SUB|FUNCTION)|FUNCTION|SUB) |(#|$)lang:?\s*"?qb"?|(?i)'\$INCLUDE:|(?i)^[ ]*CLS[ ]*('|:|\r|\n)|(?i)^[ ]*OPTION _EXPLICIT|(?i)^[ ]*DIM SHARED |(?i)^[ ]*PRINT "|(?i) As _(Byte|Offset|MEM)|(?i)^[ ]*_(DISPLAY|DEST|CONSOLE|SOURCE|FREEIMAGE|PALETTECOLOR|PRINTSTRING|LOADFONT|PUTIMAGE)|(?i)^[ ]*_(TITLE|PLAYMOD) "|(?i)^[ ]*_(LIMIT|SCREEN|DELAY) \.?\d+|(?i)\b_(MOUSEBUTTON|NEWIMAGE|KEYDOWN|WIDTH|HEIGHT)\(|(?i)^[ ]*\$(CONSOLE|CHECKING):|(?i)^[ ]*\$(FULLSCREEN|RESIZE|STATIC|DYNAMIC|NOPREFIX|SCREENSHOW|SCREENHIDE|EXEICON)\b`),
		),
	},
	".bs": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Bikeshed"),
			regex.MustCompileMultiline(`^(?i:<pre\s+class)\s*=\s*('|\"|\b)metadata\b('|\"|\b)[^>\r\n]*>`),
		),
		rule.Or(
			rule.MatchingLanguages("BrighterScript"),
			regex.MustCompileMultiline(`(?i:^\s*(?:sub\s*\w+\(.*?\))|(?::\s*sub\(.*?\))$)|(?i:^\s*(end\ssub)$)|(?i:^\s*(?:function\s*\w+\(.*?\)\s*as\s*\w*)|(?::\s*function\(.*?\)\s*as\s*\w*)$)|(?i:^\s*(end\sfunction)$)`),
		),
		rule.Or(
			rule.MatchingLanguages("Bluespec BH"),
			regex.MustCompileMultiline(`^package\s+[A-Za-z_][A-Za-z0-9_']*(?:\s*\(|\s+where)`),
		),
	},
	".bst": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("BibTeX Style"),
			regex.MustCompileMultiline(`ENTRY\s*\{`),
		),
		rule.Always(
			rule.MatchingLanguages("BuildStream"),
		),
	},
	".builds": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("XML"),
			regex.MustCompileMultiline(`^(\s*)(?i:<Project|<Import|<Property|<?xml|xmlns)`),
		),
	},
	".cairo": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Cairo Zero"),
			regex.MustCompileMultiline(`(^(\s*)%lang(\s+)([A-Za-z0-9_]+))|(^(\s*)%builtins(\s+)([A-Za-z0-9_]+\s*)*$)|(^(\s*)from(\s+)starkware\.(cairo|starknet)\.([A-Za-z0-9_.\s]+?)import)|(,\s*ap\+\+;$)|(;\s*ap\+\+$)`),
		),
		rule.Always(
			rule.MatchingLanguages("Cairo"),
		),
	},
	".ch": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("xBase"),
			regex.MustCompileMultiline(`^\s*#\s*(?i:if|ifdef|ifndef|define|command|xcommand|translate|xtranslate|include|pragma|undef)\b`),
		),
	},
	".cl": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Common Lisp"),
			regex.MustCompileMultiline(`^\s*\((?i:defun|in-package|defpackage) `),
		),
		rule.Or(
			rule.MatchingLanguages("Cool"),
			regex.MustCompileMultiline(`^class`),
		),
		rule.Or(
			rule.MatchingLanguages("OpenCL"),
			regex.MustCompileMultiline(`\/\* |\/\/ |^\}`),
		),
	},
	".cls": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Visual Basic 6.0"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[ ]*VERSION [0-9]\.[0-9] CLASS`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^\s*BEGIN(?:\r?\n|\r)\s*MultiUse\s*=.*(?:\r?\n|\r)\s*Persistable\s*=`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("VBA"),
			regex.MustCompileMultiline(`^[ ]*VERSION [0-9]\.[0-9] CLASS`),
		),
		rule.Or(
			rule.MatchingLanguages("TeX"),
			regex.MustCompileMultiline(`^\s*\\(?:NeedsTeXFormat|ProvidesClass)\{`),
		),
		rule.Or(
			rule.MatchingLanguages("ObjectScript"),
			regex.MustCompileMultiline(`^Class\s`),
		),
		rule.Or(
			rule.MatchingLanguages("OpenEdge ABL"),
			regex.MustCompileMultiline(`(?i)^\s*(?:end\s+(?:class|interface)\.|(?:class|interface)\s+[a-z_][a-z0-9_#$%&-]*:)`),
		),
	},
	".cmp": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Gerber Image"),
			regex.MustCompileMultiline(`^[DGMT][0-9]{2}\*(?:\r?\n|\r)`),
		),
	},
	".cs": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Smalltalk"),
			regex.MustCompileMultiline(`![\w\s]+methodsFor: `),
		),
		rule.Or(
			rule.MatchingLanguages("C#"),
			regex.MustCompileMultiline(`^\s*(using\s+[A-Z][\s\w.]+;|namespace\s*[\w\.]+\s*(\{|;)|\/\/)`),
		),
	},
	".csc": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("GSC"),
			regex.MustCompileMultiline(`^\s*#\s*(?:using|insert|include|define|namespace)[ \t]+\w|^\s*((?:autoexec|private)\s+){0,2}function\s+((?:autoexec|private)\s+){0,2}\w+\s*\(|\b(?:level|self)[ \t]+thread[ \t]+(?:\[\[[ \t]*(\w+\.)+[ \t]*\]\]|\w+)[ \t]*\([^\r\n\)]*\)[ \t]*;|^[ \t]*#[ \t]*(?:precache|using_animtree)[ \t]*\(`),
		),
	},
	".csl": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("XML"),
			regex.MustCompileMultiline(`(?i:^\s*(<\?xml|xmlns))`),
		),
		rule.Or(
			rule.MatchingLanguages("Kusto"),
			regex.MustCompileMultiline(`(^\|\s*(where|extend|project|limit|summarize))|(^\.\w+)`),
		),
	},
	".d": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("D"),
			regex.MustCompileMultiline(`^module\s+[\w.]*\s*;|import\s+[\w\s,.:]*;|\w+\s+\w+\s*\(.*\)(?:\(.*\))?\s*\{[^}]*\}|unittest\s*(?:\(.*\))?\s*\{[^}]*\}`),
		),
		rule.Or(
			rule.MatchingLanguages("DTrace"),
			regex.MustCompileMultiline(`^(\w+:\w*:\w*:\w*|BEGIN|END|provider\s+|(tick|profile)-\w+\s+\{[^}]*\}|#pragma\s+D\s+(option|attributes|depends_on)\s|#pragma\s+ident\s)`),
		),
		rule.Or(
			rule.MatchingLanguages("Makefile"),
			regex.MustCompileMultiline(`([\/\\].*:\s+.*\s\\$|: \\$|^[ %]:|^[\w\s\/\\.]+\w+\.\w+\s*:\s+[\w\s\/\\.]+\w+\.\w+)`),
		),
	},
	".dsp": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Microsoft Developer Studio Project"),
			regex.MustCompileMultiline(`# Microsoft Developer Studio Generated Build File`),
		),
		rule.Or(
			rule.MatchingLanguages("Faust"),
			regex.MustCompileMultiline(`\bprocess\s*[(=]|\b(library|import)\s*\(\s*"|\bdeclare\s+(name|version|author|copyright|license)\s+"`),
		),
	},
	".e": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("E"),
			regex.MustCompileMultiline(`^\s*(def|var)\s+(.+):=|^\s*(def|to)\s+(\w+)(\(.+\))?\s+\{|^\s*(when)\s+(\(.+\))\s+->\s+\{`),
		),
		rule.Or(
			rule.MatchingLanguages("Eiffel"),
			regex.MustCompileMultiline(`^\s*\w+\s*(?:,\s*\w+)*[:]\s*\w+\s|^\s*\w+\s*(?:\(\s*\w+[:][^)]+\))?(?:[:]\s*\w+)?(?:--.+\s+)*\s+(?:do|local)\s|^\s*(?:across|deferred|elseif|ensure|feature|from|inherit|inspect|invariant|note|once|require|undefine|variant|when)\s*$`),
		),
		rule.Or(
			rule.MatchingLanguages("Euphoria"),
			regex.MustCompileMultiline(`^\s*namespace\s|^\s*(?:public\s+)?include\s|^\s*(?:(?:public|export|global)\s+)?(?:atom|constant|enum|function|integer|object|procedure|sequence|type)\s`),
		),
	},
	".ecl": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("ECLiPSe"),
			regex.MustCompileMultiline(`^[^#]+:-`),
		),
		rule.Or(
			rule.MatchingLanguages("ECL"),
			regex.MustCompileMultiline(`:=`),
		),
	},
	".es": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Erlang"),
			regex.MustCompileMultiline(`^\s*(?:%%|main\s*\(.*?\)\s*->)`),
		),
		rule.Or(
			rule.MatchingLanguages("JavaScript"),
			regex.MustCompileMultiline(`\/\/|["']use strict["']|export\s+default\s|\/\*(?:.|[\r\n])*?\*\/`),
		),
	},
	".ex": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Elixir"),
			regex.MustCompileMultiline(`^\s*@moduledoc\s|^\s*(?:cond|import|quote|unless)\s|^\s*def(?:exception|impl|macro|module|protocol)[(\s]`),
		),
		rule.Or(
			rule.MatchingLanguages("Euphoria"),
			regex.MustCompileMultiline(`^\s*namespace\s|^\s*(?:public\s+)?include\s|^\s*(?:(?:public|export|global)\s+)?(?:atom|constant|enum|function|integer|object|procedure|sequence|type)\s`),
		),
	},
	".f": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Forth"),
			regex.MustCompileMultiline(`^: `),
		),
		rule.Or(
			rule.MatchingLanguages("Filebench WML"),
			regex.MustCompileMultiline(`flowop`),
		),
		rule.Or(
			rule.MatchingLanguages("Fortran"),
			regex.MustCompileMultiline(`^(?i:[c*][^abd-z]|      (subroutine|program|end|data)\s|\s*!)`),
		),
	},
	".for": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Forth"),
			regex.MustCompileMultiline(`^: `),
		),
		rule.Or(
			rule.MatchingLanguages("Fortran"),
			regex.MustCompileMultiline(`^(?i:[c*][^abd-z]|      (subroutine|program|end|data)\s|\s*!)`),
		),
	},
	".fr": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Forth"),
			regex.MustCompileMultiline(`^(: |also |new-device|previous )`),
		),
		rule.Or(
			rule.MatchingLanguages("Frege"),
			regex.MustCompileMultiline(`^\s*(import|module|package|data|type) `),
		),
		rule.Always(
			rule.MatchingLanguages("Text"),
		),
	},
	".frm": &Heuristics{
		rule.And(
			rule.MatchingLanguages("VBA"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[ ]*VERSION [0-9]\.[0-9]{2}`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^\s*Begin\s+\{[0-9A-Z\-]*\}\s?`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Visual Basic 6.0"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[ ]*VERSION [0-9]\.[0-9]{2}`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^\s*Begin\s+VB\.Form\s+`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("INI"),
			regex.MustCompileMultiline(`\ATYPE=VIEW`),
		),
	},
	".fs": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Forth"),
			regex.MustCompileMultiline(`^(: |new-device)`),
		),
		rule.Or(
			rule.MatchingLanguages("F#"),
			regex.MustCompileMultiline(`^\s*(#light|import|let|module|namespace|open|type)`),
		),
		rule.Or(
			rule.MatchingLanguages("GLSL"),
			regex.MustCompileMultiline(`^\s*(#version|precision|uniform|varying|vec[234])`),
		),
		rule.Or(
			rule.MatchingLanguages("Filterscript"),
			regex.MustCompileMultiline(`#include|#pragma\s+(rs|version)|__attribute__`),
		),
	},
	".ftl": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("FreeMarker"),
			regex.MustCompileMultiline(`^(?:<|[a-zA-Z-][a-zA-Z0-9_-]+[ \t]+\w)|\$\{\w+[^\r\n]*?\}|^[ \t]*(?:<#--.*?-->|<#(?:[a-z]+)\s[^>]*>.*?</#(?:[a-z]+)>|\[#--.*?--\]|\[#(?:[a-z]+)\s[^\]]*\].*?\[#(?:[a-z]+)\])`),
		),
		rule.Or(
			rule.MatchingLanguages("Fluent"),
			regex.MustCompileMultiline(`^-?[a-zA-Z][a-zA-Z0-9_-]* *=|\{\$-?[a-zA-Z][-\w]*(?:\.[a-zA-Z][-\w]*)?\}`),
		),
	},
	".g": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("GAP"),
			regex.MustCompileMultiline(`\s*(Declare|BindGlobal|KeyDependentOperation|Install(Method|GlobalFunction)|SetPackageInfo)`),
		),
		rule.Or(
			rule.MatchingLanguages("G-code"),
			regex.MustCompileMultiline(`^[MG][0-9]+(?:\r?\n|\r)`),
		),
	},
	".gd": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("GAP"),
			regex.MustCompileMultiline(`\s*(Declare|BindGlobal|KeyDependentOperation)`),
		),
		rule.Or(
			rule.MatchingLanguages("GDScript"),
			regex.MustCompileMultiline(`\s*(extends|var|const|enum|func|class|signal|tool|yield|assert|onready)`),
		),
	},
	".gml": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("XML"),
			regex.MustCompileMultiline(`(?i:^\s*(<\?xml|xmlns))`),
		),
		rule.Or(
			rule.MatchingLanguages("Graph Modeling Language"),
			regex.MustCompileMultiline(`(?i:^\s*(graph|node)\s+\[$)`),
		),
		rule.Or(
			rule.MatchingLanguages("Gerber Image"),
			regex.MustCompileMultiline(`^[DGMT][0-9]{2}\*$`),
		),
		rule.Always(
			rule.MatchingLanguages("Game Maker Language"),
		),
	},
	".gs": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("GLSL"),
			regex.MustCompileMultiline(`^#version\s+[0-9]+\b`),
		),
		rule.Or(
			rule.MatchingLanguages("Gosu"),
			regex.MustCompileMultiline(`^uses (java|gw)\.`),
		),
		rule.Or(
			rule.MatchingLanguages("Genie"),
			regex.MustCompileMultiline(`^\[indent=[0-9]+\]`),
		),
	},
	".gsc": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("GSC"),
			regex.MustCompileMultiline(`^\s*#\s*(?:using|insert|include|define|namespace)[ \t]+\w|^\s*((?:autoexec|private)\s+){0,2}function\s+((?:autoexec|private)\s+){0,2}\w+\s*\(|\b(?:level|self)[ \t]+thread[ \t]+(?:\[\[[ \t]*(\w+\.)+[ \t]*\]\]|\w+)[ \t]*\([^\r\n\)]*\)[ \t]*;|^[ \t]*#[ \t]*(?:precache|using_animtree)[ \t]*\(`),
		),
	},
	".gsh": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("GSC"),
			regex.MustCompileMultiline(`^\s*#\s*(?:using|insert|include|define|namespace)[ \t]+\w|^\s*((?:autoexec|private)\s+){0,2}function\s+((?:autoexec|private)\s+){0,2}\w+\s*\(|\b(?:level|self)[ \t]+thread[ \t]+(?:\[\[[ \t]*(\w+\.)+[ \t]*\]\]|\w+)[ \t]*\([^\r\n\)]*\)[ \t]*;|^[ \t]*#[ \t]*(?:precache|using_animtree)[ \t]*\(`),
		),
	},
	".gts": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Gerber Image"),
			regex.MustCompileMultiline(`^G0.`),
		),
		rule.Not(
			rule.MatchingLanguages("Glimmer TS"),
			regex.MustCompileMultiline(`^G0.`),
		),
	},
	".h": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Objective-C"),
			regex.MustCompileMultiline(`^\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\b|#import\s+.+\.h[">])`),
		),
		rule.Or(
			rule.MatchingLanguages("C++"),
			regex.MustCompileMultiline(`^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set|(i|o|io)stream)>|^\s*template\s*<|^[ \t]*(try|constexpr)|^[ \t]*catch\s*\(|^[ \t]*(class|(using[ \t]+)?namespace)\s+\w+|^[ \t]*(private|public|protected):$|__has_cpp_attribute|__cplusplus >|std::\w+`),
		),
		rule.Always(
			rule.MatchingLanguages("C"),
		),
	},
	".hh": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Hack"),
			regex.MustCompileMultiline(`<\?hh`),
		),
	},
	".html": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Ecmarkup"),
			regex.MustCompileMultiline(`<emu-(?:alg|annex|biblio|clause|eqn|example|figure|gann|gmod|gprose|grammar|intro|not-ref|note|nt|prodref|production|rhs|table|t|xref)(?:$|\s|>)`),
		),
		rule.Always(
			rule.MatchingLanguages("HTML"),
		),
	},
	".i": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Motorola 68K Assembly"),
			regex.MustCompileMultiline(`(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b|(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+|(?im)^\s*move\.[bwl]\s+.*\b[ad]\d|(?im)^\s*movem\.[bwl]\b|(?im)^\s*move[mp](?:\.[wl])?\b|(?im)^\s*btst\b|(?im)^\s*dbra\b`),
		),
		rule.Or(
			rule.MatchingLanguages("SWIG"),
			regex.MustCompileMultiline(`^[ \t]*%[a-z_]+\b|^%[{}]$`),
		),
		rule.Or(
			rule.MatchingLanguages("Assembly"),
			regex.MustCompileMultiline(`(?i)mov\s+[^\s]+,|^\s+(i?)db\s+[a-z\d]`),
		),
	},
	".ice": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("JSON"),
			regex.MustCompileMultiline(`\A\s*[{\[]`),
		),
		rule.Always(
			rule.MatchingLanguages("Slice"),
		),
	},
	".inc": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Motorola 68K Assembly"),
			regex.MustCompileMultiline(`(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b|(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+|(?im)^\s*move\.[bwl]\s+.*\b[ad]\d|(?im)^\s*movem\.[bwl]\b|(?im)^\s*move[mp](?:\.[wl])?\b|(?im)^\s*btst\b|(?im)^\s*dbra\b`),
		),
		rule.Or(
			rule.MatchingLanguages("PHP"),
			regex.MustCompileMultiline(`^<\?(?:php)?`),
		),
		rule.Or(
			rule.MatchingLanguages("SourcePawn"),
			regex.MustCompileMultiline(`^public\s+(?:SharedPlugin(?:\s+|:)__pl_\w+\s*=(?:\s*\{)?|(?:void\s+)?__pl_\w+_SetNTVOptional\(\)(?:\s*\{)?)|^methodmap\s+\w+\s+<\s+\w+|^\s*MarkNativeAsOptional\s*\(`),
		),
		rule.Or(
			rule.MatchingLanguages("NASL"),
			regex.MustCompileMultiline(`^\s*include\s*\(\s*(?:"|')[\\/\w\-\.:\s]+\.(?:nasl|inc)\s*(?:"|')\s*\)\s*;|^\s*(?:global|local)_var\s+(?:\w+(?:\s*=\s*[\w\-"']+)?\s*)(?:,\s*\w+(?:\s*=\s*[\w\-"']+)?\s*)*\s*;|^\s*namespace\s+\w+\s*\{|^\s*object\s+\w+\s*(?:extends\s+\w+(?:::\w+)?)?\s*\{|^\s*(?:public\s+|private\s+|\s*)function\s+\w+\s*\([\w\s,]*\)\s*\{`),
		),
		rule.Or(
			rule.MatchingLanguages("POV-Ray SDL"),
			regex.MustCompileMultiline(`^\s*#(declare|local|macro|while)\s`),
		),
		rule.Or(
			rule.MatchingLanguages("Pascal"),
			regex.MustCompileMultiline(`(?i:^\s*\{\$(?:mode|ifdef|undef|define)[ ]+[a-z0-9_]+\})|^\s*end[.;]\s*$`),
		),
		rule.Or(
			rule.MatchingLanguages("BitBake"),
			regex.MustCompileMultiline(`^inherit(\s+[\w.-]+)+\s*$`),
		),
		rule.Or(
			rule.MatchingLanguages("Assembly"),
			regex.MustCompileMultiline(`^(?i)[^"m]*mov\s+[^\s]+,|^\s+(?i)db\s+[a-z\d]`),
		),
	},
	".json": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("OASv2-json"),
			regex.MustCompileMultiline(`"swagger":\s?"2.[0-9.]+"`),
		),
		rule.Or(
			rule.MatchingLanguages("OASv3-json"),
			regex.MustCompileMultiline(`"openapi":\s?"3.[0-9.]+"`),
		),
		rule.Always(
			rule.MatchingLanguages("JSON"),
		),
	},
	".k": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("KCL"),
			regex.MustCompileMultiline(`^schema [A-Za-z0-9_-]+|^\}$|\s*\}\s*`),
		),
		rule.Or(
			rule.MatchingLanguages("KFramework"),
			regex.MustCompileMultiline(`^requires\s+"[^"]+"$|^syntax\s+\w+\s+::=.*|^endmodule$`),
		),
	},
	".l": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Common Lisp"),
			regex.MustCompileMultiline(`\(def(un|macro)\s`),
		),
		rule.Or(
			rule.MatchingLanguages("Lex"),
			regex.MustCompileMultiline(`^(%[%{}]xs|<.*>)`),
		),
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^\.[A-Za-z]{2}(\s|$)`),
		),
		rule.Or(
			rule.MatchingLanguages("PicoLisp"),
			regex.MustCompileMultiline(`^\((de|class|rel|code|data|must)\s`),
		),
	},
	".lean": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Lean"),
			regex.MustCompileMultiline(`^import [a-z]`),
		),
		rule.Or(
			rule.MatchingLanguages("Lean 4"),
			regex.MustCompileMultiline(`^import [A-Z]`),
		),
	},
	".lisp": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Common Lisp"),
			regex.MustCompileMultiline(`^\s*\((?i:defun|in-package|defpackage) `),
		),
		rule.Or(
			rule.MatchingLanguages("NewLisp"),
			regex.MustCompileMultiline(`^\s*\(define `),
		),
	},
	".lp": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Lambdapi"),
			regex.MustCompileMultiline(`(?:^|\s)symbol(?:$|\s)|(?:^|\s)rule(?:$|\s)`),
		),
		rule.Or(
			rule.MatchingLanguages("Linear Programming"),
			regex.MustCompileMultiline(`(?i)^\s*(?:minimize|minimum|min|maximize|maximum|max)(?:\s+multi-objectives)?\s*$`),
		),
		rule.Or(
			rule.MatchingLanguages("Answer Set Programming"),
			regex.MustCompileMultiline(`^\s*#(?:include|const|program|script|show|minimize|maximize|heuristic|project|edge|theory|defined)\b|^\s*(?:[A-Za-z_]\w*(?:\([^)]*\))?\s*:-|:-)\s[^.]*\.|^\s*[a-z_][a-zA-Z0-9_]*(?:\([^)]*\))?\s*\.\s*$`),
		),
	},
	".ls": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("LoomScript"),
			regex.MustCompileMultiline(`^\s*package\s*[\w\.\/\*\s]*\s*\{`),
		),
		rule.Always(
			rule.MatchingLanguages("LiveScript"),
		),
	},
	".lsp": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Common Lisp"),
			regex.MustCompileMultiline(`^\s*\((?i:defun|in-package|defpackage) `),
		),
		rule.Or(
			rule.MatchingLanguages("NewLisp"),
			regex.MustCompileMultiline(`^\s*\(define `),
		),
	},
	".m": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Objective-C"),
			regex.MustCompileMultiline(`^\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\b|#import\s+.+\.h[">])`),
		),
		rule.Or(
			rule.MatchingLanguages("Mercury"),
			regex.MustCompileMultiline(`:- module`),
		),
		rule.Or(
			rule.MatchingLanguages("MUF"),
			regex.MustCompileMultiline(`^: `),
		),
		rule.Or(
			rule.MatchingLanguages("M"),
			regex.MustCompileMultiline(`^\s*;`),
		),
		rule.And(
			rule.MatchingLanguages("Wolfram Language"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`\(\*`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`\*\)$`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("MATLAB"),
			regex.MustCompileMultiline(`^\s*%`),
		),
		rule.Or(
			rule.MatchingLanguages("Limbo"),
			regex.MustCompileMultiline(`^\w+\s*:\s*module\s*\{`),
		),
	},
	".m4": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("M4Sugar"),
			regex.MustCompileMultiline(`AC_DEFUN|AC_PREREQ|AC_INIT|^_?m4_`),
		),
		rule.Always(
			rule.MatchingLanguages("M4"),
		),
	},
	".man": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Roff"),
		),
	},
	".mask": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Unity3D Asset"),
			regex.MustCompileMultiline(`tag:unity3d.com`),
		),
	},
	".mc": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Win32 Message File"),
			regex.MustCompileMultiline(`(?i)^[ \t]*(\/\*\s*)?MessageId=|^\.$`),
		),
		rule.Or(
			rule.MatchingLanguages("M4"),
			regex.MustCompileMultiline(`^dnl|^divert\((?:-?\d+)?\)|^\w+\(`+"`"+`[^\r\n]*?'[),]`),
		),
		rule.Or(
			rule.MatchingLanguages("Monkey C"),
			regex.MustCompileMultiline(`\b(?:using|module|function|class|var)\s+\w`),
		),
	},
	".md": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Markdown"),
			regex.MustCompileMultiline(`(^[-A-Za-z0-9=#!\*\[|>])|<\/|\A\z`),
		),
		rule.Or(
			rule.MatchingLanguages("GCC Machine Description"),
			regex.MustCompileMultiline(`^(;;|\(define_)`),
		),
		rule.Always(
			rule.MatchingLanguages("Markdown"),
		),
	},
	".mdoc": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Roff Manpage"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Roff"),
		),
	},
	".ml": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("OCaml"),
			regex.MustCompileMultiline(`(^\s*module)|let rec |match\s+(\S+\s)+with`),
		),
		rule.Or(
			rule.MatchingLanguages("Standard ML"),
			regex.MustCompileMultiline(`=> |case\s+(\S+\s)+of`),
		),
	},
	".mod": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("XML"),
			regex.MustCompileMultiline(`<!ENTITY `),
		),
		rule.Or(
			rule.MatchingLanguages("NMODL"),
			regex.MustCompileMultiline(`\b(NEURON|INITIAL|UNITS)\b`),
		),
		rule.Or(
			rule.MatchingLanguages("Modula-2"),
			regex.MustCompileMultiline(`^\s*(?i:MODULE|END) [\w\.]+;`),
		),
		rule.Always(
			rule.MatchingLanguages("Linux Kernel Module", "AMPL"),
		),
	},
	".mojo": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Mojo"),
			regex.MustCompileMultiline(`^\s*(alias|def|from|fn|import|struct|trait)\s`),
		),
		rule.Or(
			rule.MatchingLanguages("XML"),
			regex.MustCompileMultiline(`^\s*<\?xml`),
		),
	},
	".mps": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("JetBrains MPS"),
			regex.MustCompileMultiline(`<persistence`),
		),
		rule.Or(
			rule.MatchingLanguages("Mathematical Programming System"),
			regex.MustCompileMultiline(`(?i)^\s*(ROWS|COLUMNS)\s*$`),
		),
	},
	".ms": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^[.'][A-Za-z]{2}(\s|$)`),
		),
		rule.And(
			rule.MatchingLanguages("Unix Assembly"),
			rule.Not(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`/\*`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^\s*\.(?:include\s|globa?l\s|[A-Za-z][_A-Za-z0-9]*:)`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("MAXScript"),
		),
	},
	".msg": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("OMNeT++ MSG"),
			regex.MustCompileMultiline(`^cplusplus\(?[\S]*\)?[\s]*\{?\{?|^namespace[\s]+([^.\s]*\.)*[^.\s]*;|^struct[\s]+[\S]+|^message[\s]+[\S]+(extends )?[\S]*[\s]*|^packet[\s]+[\S]+|^class[\s]+[\S]+(extends )?[\S]*[\s]*|^enum[\s]+[\S]+|^import ([^.\s]*\.)*[^.\s]*;`),
		),
		rule.And(
			rule.MatchingLanguages("ROS Interface"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`(?i)^[a-z]\w*(?:\/[a-z]\w*)?(?:<=\d+)?(?:\[(?:<=\d+)?\])?\s+\w+\b`),
			),
			rule.Not(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^\s*[^\s@#\w-]`),
			),
		),
	},
	".n": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^[.']`),
		),
		rule.Or(
			rule.MatchingLanguages("Nemerle"),
			regex.MustCompileMultiline(`^(module|namespace|using)\s`),
		),
	},
	".ncl": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("XML"),
			regex.MustCompileMultiline(`^\s*<\?xml\s+version`),
		),
		rule.Or(
			rule.MatchingLanguages("Gerber Image"),
			regex.MustCompileMultiline(`^[DGMT][0-9]{2}\*(?:\r?\n|\r)`),
		),
		rule.Or(
			rule.MatchingLanguages("Nickel"),
			regex.MustCompileMultiline(`^let(?:\srec)?(?:\s[a-zA-Z_][a-zA-Z0-9_]*)?|^import\s"[^"]+"\s+as\s|std\.[a-zA-Z_][a-zA-Z0-9_]*\.`),
		),
		rule.Or(
			rule.MatchingLanguages("Text"),
			regex.MustCompileMultiline(`THE_TITLE`),
		),
		rule.Or(
			rule.MatchingLanguages("NCL"),
			regex.MustCompileMultiline(`^load "|^begin$|[0-9]\.$|^;`),
		),
	},
	".nl": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("NL"),
			regex.MustCompileMultiline(`^(b|g)[0-9]+ `),
		),
		rule.Always(
			rule.MatchingLanguages("NewLisp"),
		),
	},
	".nr": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^\.`),
		),
		rule.Always(
			rule.MatchingLanguages("Noir"),
		),
	},
	".nu": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Nushell"),
			regex.MustCompileMultiline(`^\s*(import|export|module|def|let|let-env) `),
		),
		rule.Always(
			rule.MatchingLanguages("Nu"),
		),
	},
	".odin": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Object Data Instance Notation"),
			regex.MustCompileMultiline(`(?:^|<)\s*[A-Za-z0-9_]+\s*=\s*<`),
		),
		rule.Or(
			rule.MatchingLanguages("Odin"),
			regex.MustCompileMultiline(`package\s+\w+|\b(?:im|ex)port\s*"[\w:./]+"|\w+\s*::\s*(?:proc|struct)\s*\(|^\s*//\s`),
		),
	},
	".p": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Gnuplot"),
			regex.MustCompileMultiline(`^s?plot\b|^set\s+(term|terminal|out|output|[xy]tics|[xy]label|[xy]range|style)\b`),
		),
		rule.Or(
			rule.MatchingLanguages("OpenEdge ABL"),
			regex.MustCompileMultiline(`(?i)\bDEFINE\s+(?:VARIABLE|TEMP-TABLE|BUFFER|QUERY|INPUT\s+PARAMETER|OUTPUT\s+PARAMETER)\b|(?i)\bEND(?:\s+(?:PROCEDURE|FUNCTION|DO|FOR\s+EACH))?\.`),
		),
	},
	".php": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Hack"),
			regex.MustCompileMultiline(`<\?hh`),
		),
		rule.Or(
			rule.MatchingLanguages("PHP"),
			regex.MustCompileMultiline(`<\?[^h]`),
		),
	},
	".pkl": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Pkl"),
			regex.MustCompileMultiline(`^\s*(module|import|amends|extends|local|const|fixed|abstract|open|class|typealias|@\w+)\b|^\s*[a-zA-Z0-9_$]+\s*(=|{|:)|^\s*`+"`"+`[^`+"`"+`]+`+"`"+`\s*(=|{|:)|for\s*\(|when\s*\(`),
		),
		rule.Always(
			rule.MatchingLanguages("Pickle"),
		),
	},
	".pl": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Prolog"),
			regex.MustCompileMultiline(`^[^#]*:-`),
		),
		rule.And(
			rule.MatchingLanguages("Perl"),
			rule.Not(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^\s*use\s+v6\b`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`\buse\s+(?:strict\b|v?5\b)|^\s*use\s+(?:constant|overload)\b|^\s*(?:\*|(?:our\s*)?@)EXPORT\s*=|^\s*package\s+[^\W\d]\w*(?:::\w+)*\s*(?:[;{]|\sv?\d)|[\s$][^\W\d]\w*(?::\w+)*->[a-zA-Z_\[({]`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("Raku"),
			regex.MustCompileMultiline(`^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`),
		),
	},
	".plist": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("XML Property List"),
			regex.MustCompileMultiline(`^\s*(?:<\?xml\s|<!DOCTYPE\s+plist|<plist(?:\s+version\s*=\s*["']\d+(?:\.\d+)?["'])?\s*>\s*$)`),
		),
		rule.Always(
			rule.MatchingLanguages("OpenStep Property List"),
		),
	},
	".plt": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Prolog"),
			regex.MustCompileMultiline(`^\s*:-`),
		),
	},
	".pm": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Perl"),
			rule.Not(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^\s*use\s+v6\b`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`\buse\s+(?:strict\b|v?5\b)|^\s*use\s+(?:constant|overload)\b|^\s*(?:\*|(?:our\s*)?@)EXPORT\s*=|^\s*package\s+[^\W\d]\w*(?:::\w+)*\s*(?:[;{]|\sv?\d)|[\s$][^\W\d]\w*(?::\w+)*->[a-zA-Z_\[({]`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("Raku"),
			regex.MustCompileMultiline(`^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`),
		),
		rule.Or(
			rule.MatchingLanguages("X PixMap"),
			regex.MustCompileMultiline(`^\s*\/\* XPM \*\/`),
		),
	},
	".pod": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Pod 6"),
			regex.MustCompileMultiline(`^[\s&&[^\r\n]]*=(comment|begin pod|begin para|item\d+)`),
		),
		rule.Always(
			rule.MatchingLanguages("Pod"),
		),
	},
	".pp": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Pascal"),
			regex.MustCompileMultiline(`^\s*end[.;]`),
		),
		rule.Or(
			rule.MatchingLanguages("Puppet"),
			regex.MustCompileMultiline(`^\s+\w+\s+=>\s`),
		),
	},
	".pro": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Proguard"),
			regex.MustCompileMultiline(`^-(include\b.*\.pro$|keep\b|keepclassmembers\b|keepattributes\b)`),
		),
		rule.Or(
			rule.MatchingLanguages("Prolog"),
			regex.MustCompileMultiline(`^[^\[#]+:-`),
		),
		rule.Or(
			rule.MatchingLanguages("INI"),
			regex.MustCompileMultiline(`last_client=`),
		),
		rule.And(
			rule.MatchingLanguages("QMake"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`HEADERS`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`SOURCES`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("IDL"),
			regex.MustCompileMultiline(`^\s*(?i:function|pro|compile_opt) \w[ \w,:]*$`),
		),
	},
	".properties": &Heuristics{
		rule.And(
			rule.MatchingLanguages("INI"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[^#!;][^=]*=`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[;\[]`),
			),
		),
		rule.And(
			rule.MatchingLanguages("Java Properties"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[^#!;][^=]*=`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^[#!]`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("INI"),
			regex.MustCompileMultiline(`^[^#!;][^=]*=`),
		),
		rule.Or(
			rule.MatchingLanguages("Java Properties"),
			regex.MustCompileMultiline(`^[^#!][^:]*:`),
		),
	},
	".q": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("q"),
			regex.MustCompileMultiline(`((?i:[A-Z.][\w.]*:\{)|^\\(cd?|d|l|p|ts?) )`),
		),
		rule.Or(
			rule.MatchingLanguages("HiveQL"),
			regex.MustCompileMultiline(`(?i:SELECT\s+[\w*,]+\s+FROM|(CREATE|ALTER|DROP)\s(DATABASE|SCHEMA|TABLE))`),
		),
	},
	".qs": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Q#"),
			regex.MustCompileMultiline(`^((\/{2,3})?\s*(namespace|operation)\b)`),
		),
		rule.Or(
			rule.MatchingLanguages("Qt Script"),
			regex.MustCompileMultiline(`(\w+\.prototype\.\w+|===|\bvar\b)`),
		),
	},
	".r": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Rebol"),
			regex.MustCompileMultiline(`(?i:\bRebol\b)`),
		),
		rule.Or(
			rule.MatchingLanguages("Rez"),
			regex.MustCompileMultiline(`(#include\s+["<](Types\.r|Carbon\/Carbon\.r)[">])|((resource|data|type)\s+'[A-Za-z0-9]{4}'\s+((\(.*\)\s+){0,1}){)`),
		),
		rule.Or(
			rule.MatchingLanguages("R"),
			regex.MustCompileMultiline(`<-|^\s*#`),
		),
	},
	".re": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Reason"),
			regex.MustCompileMultiline(`^\s*module\s+type\s|^\s*(?:include|open)\s+\w+\s*;\s*$|^\s*let\s+(?:module\s\w+\s*=\s*\{|\w+:\s+.*=.*;\s*$)`),
		),
		rule.Or(
			rule.MatchingLanguages("C++"),
			regex.MustCompileMultiline(`^\s*#(?:(?:if|ifdef|define|pragma)\s+\w|\s*include\s+<[^>]+>)|^\s*template\s*<`),
		),
	},
	".res": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("ReScript"),
			regex.MustCompileMultiline(`^\s*(let|module|type)\s+\w*\s+=\s+|^\s*(?:include|open)\s+\w+\s*$`),
		),
	},
	".resource": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("RobotFramework"),
			regex.MustCompileMultiline(`^\*{3} (Settings|Variables|Keywords) \*{3}$`),
		),
	},
	".rno": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("RUNOFF"),
			regex.MustCompileMultiline(`(?i:^\.!|^\f|\f$|^\.end lit(?:eral)?\b|^\.[a-zA-Z].*?;\.[a-zA-Z](?:[; \t])|\^\*[^\s*][^*]*\\\*(?:$|\s)|^\.c;[ \t]*\w+)`),
		),
		rule.Or(
			rule.MatchingLanguages("Roff"),
			regex.MustCompileMultiline(`^\.\\" `),
		),
	},
	".rpy": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Python"),
			regex.MustCompileMultiline(`^(import|from|class|def)\s`),
		),
		rule.Always(
			rule.MatchingLanguages("Ren'Py"),
		),
	},
	".rs": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Rust"),
			regex.MustCompileMultiline(`^(use |fn |mod |pub |macro_rules|impl|#!?\[)`),
		),
		rule.Or(
			rule.MatchingLanguages("RenderScript"),
			regex.MustCompileMultiline(`#include|#pragma\s+(rs|version)|__attribute__`),
		),
		rule.Or(
			rule.MatchingLanguages("XML"),
			regex.MustCompileMultiline(`^\s*<\?xml`),
		),
	},
	".s": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Unix Assembly"),
			regex.MustCompileMultiline(`(?i:mov[lq]?)\s+[%\$]`),
		),
		rule.Or(
			rule.MatchingLanguages("Assembly"),
			regex.MustCompileMultiline(`(?i:mov)\s+[^\s%]{2,},`),
		),
		rule.Or(
			rule.MatchingLanguages("Motorola 68K Assembly"),
			regex.MustCompileMultiline(`(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b|(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+|(?im)^\s*move\.[bwl]\s+.*\b[ad]\d|(?im)^\s*movem\.[bwl]\b|(?im)^\s*move[mp](?:\.[wl])?\b|(?im)^\s*btst\b|(?im)^\s*dbra\b`),
		),
	},
	".sc": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("SuperCollider"),
			regex.MustCompileMultiline(`(?i:\^(this|super)\.|^\s*~\w+\s*=\.)`),
		),
		rule.Or(
			rule.MatchingLanguages("Scala"),
			regex.MustCompileMultiline(`(^\s*import (scala|java)\.|^\s*class\b)`),
		),
	},
	".scd": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("SuperCollider"),
			regex.MustCompileMultiline(`(?i:\^(this|super)\.|^\s*(~\w+\s*=\.|SynthDef\b))`),
		),
		rule.Or(
			rule.MatchingLanguages("Markdown"),
			regex.MustCompileMultiline(`^#+\s+(NAME|SYNOPSIS|DESCRIPTION)`),
		),
	},
	".scm": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Tree-sitter Query"),
			regex.MustCompileMultiline(`\(#[\w-]+[!\?]|(?:[\)\]]\s*[\*\+\?](?:\s|$))|(?:^\s*\w+:\s*[\(\[\"])|\(#(?:set!|(?:not-)?(?:any-of|match)\?)|@[\w.-]+(?:\)\s|$)`),
		),
		rule.Or(
			rule.MatchingLanguages("Scheme"),
			regex.MustCompileMultiline(`(?:'[\(\*#]|\w->\w|\.\.\.[\s\)]|\([+\-:<>\/=~\)]|~>|[#`+"`"+`]\(|#:\w)|^\s*\((?:define\*?|import|library|lambda)`),
		),
	},
	".sol": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Solidity"),
			regex.MustCompileMultiline(`\bpragma\s+solidity\b|\b(?:abstract\s+)?contract\s+[a-zA-Z$_][a-zA-Z0-9$_]*(?:\s+is\s+(?:[a-zA-Z0-9$_][^\{]*?)?)?\s*\{`),
		),
		rule.Or(
			rule.MatchingLanguages("Gerber Image"),
			regex.MustCompileMultiline(`^[DGMT][0-9]{2}\*(?:\r?\n|\r)`),
		),
	},
	".sql": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("PLpgSQL"),
			regex.MustCompileMultiline(`(?i:^\\i\b|AS\s+\$\$|LANGUAGE\s+'?plpgsql'?|BEGIN(\s+WORK)?\s*;)`),
		),
		rule.Or(
			rule.MatchingLanguages("SQLPL"),
			regex.MustCompileMultiline(`(?i:ALTER\s+MODULE|MODE\s+DB2SQL|\bSYS(CAT|PROC)\.|ASSOCIATE\s+RESULT\s+SET|\bEND!\s*$)`),
		),
		rule.Or(
			rule.MatchingLanguages("PLSQL"),
			regex.MustCompileMultiline(`(?i:\$\$PLSQL_|XMLTYPE|systimestamp|\.nextval|CONNECT\s+BY|AUTHID\s+(DEFINER|CURRENT_USER)|constructor\W+function)`),
		),
		rule.Or(
			rule.MatchingLanguages("TSQL"),
			regex.MustCompileMultiline(`(?i:^\s*GO\b|BEGIN(\s+TRY|\s+CATCH)|OUTPUT\s+INSERTED|DECLARE\s+@|\[dbo\])`),
		),
		rule.Always(
			rule.MatchingLanguages("SQL"),
		),
	},
	".srt": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("SubRip Text"),
			regex.MustCompileMultiline(`^(\d{2}:\d{2}:\d{2},\d{3})\s*(-->)\s*(\d{2}:\d{2}:\d{2},\d{3})$`),
		),
	},
	".srv": &Heuristics{
		rule.And(
			rule.MatchingLanguages("ROS Interface"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`(?i)^[a-z]\w*(?:\/[a-z]\w*)?(?:<=\d+)?(?:\[(?:<=\d+)?\])?\s+\w+\b`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^---\s*$`),
			),
			rule.Not(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^\s*[^\s@#\w-]`),
			),
		),
	},
	".st": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("StringTemplate"),
			regex.MustCompileMultiline(`\$\w+[($]|.!\s*.+?\s*!.|<!\s*.+?\s*!>|\[!\s*.+?\s*!\]|\{!\s*.+?\s*!\}`),
		),
		rule.Or(
			rule.MatchingLanguages("Smalltalk"),
			regex.MustCompileMultiline(`\A\s*[\[{(^"'\w#]|[a-zA-Z_]\w*\s*:=\s*[a-zA-Z_]\w*|class\s*>>\s*[a-zA-Z_]\w*|^[a-zA-Z_]\w*\s+[a-zA-Z_]\w*:|^Class\s*\{|if(?:True|False):\s*\[`),
		),
	},
	".star": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("STAR"),
			regex.MustCompileMultiline(`^loop_\s*$`),
		),
		rule.Always(
			rule.MatchingLanguages("Starlark"),
		),
	},
	".stl": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("STL"),
			regex.MustCompileMultiline(`\A\s*solid(?:$|\s)[\s\S]*^endsolid(?:$|\s)`),
		),
	},
	".svx": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Survex data"),
			regex.MustCompileMultiline(`\A(;|\*[^*]+$)`),
		),
		rule.Always(
			rule.MatchingLanguages("mdsvex"),
		),
	},
	".sw": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Sway"),
			regex.MustCompileMultiline(`^\s*(?:(?:abi|dep|fn|impl|mod|pub|trait)\s|#\[)`),
		),
		rule.Or(
			rule.MatchingLanguages("XML"),
			regex.MustCompileMultiline(`^\s*<\?xml\s+version`),
		),
	},
	".t": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Perl"),
			rule.Not(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`^\s*use\s+v6\b`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`\buse\s+(?:strict\b|v?5\b)|^\s*use\s+(?:constant|overload)\b|^\s*(?:\*|(?:our\s*)?@)EXPORT\s*=|^\s*package\s+[^\W\d]\w*(?:::\w+)*\s*(?:[;{]|\sv?\d)|[\s$][^\W\d]\w*(?::\w+)*->[a-zA-Z_\[({]`),
			),
		),
		rule.Or(
			rule.MatchingLanguages("Raku"),
			regex.MustCompileMultiline(`^\s*(?:use\s+v6\b|\bmodule\b|\bmy\s+class\b)`),
		),
		rule.Or(
			rule.MatchingLanguages("Turing"),
			regex.MustCompileMultiline(`^\s*%[ \t]+|^\s*var\s+\w+(\s*:\s*\w+)?\s*:=\s*\w+`),
		),
	},
	".tact": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("JSON"),
			regex.MustCompileMultiline(`\A\s*\{\"`),
		),
		rule.Always(
			rule.MatchingLanguages("Tact"),
		),
	},
	".tag": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Java Server Pages"),
			regex.MustCompileMultiline(`<%[@!=\s]?\s*(taglib|tag|include|attribute|variable)\s`),
		),
	},
	".tl": &Heuristics{
		rule.And(
			rule.MatchingLanguages("Teal"),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`--.*`),
			),
			rule.Or(
				rule.MatchingLanguages(""),
				regex.MustCompileMultiline(`\b(local|function|end|record|interface|enum)\b`),
			),
		),
		rule.Always(
			rule.MatchingLanguages("Type Language"),
		),
	},
	".tlv": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("TL-Verilog"),
			regex.MustCompileMultiline(`^\\.{0,10}TLV_version`),
		),
	},
	".toc": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("World of Warcraft Addon Data"),
			regex.MustCompileMultiline(`^## |@no-lib-strip@`),
		),
		rule.Or(
			rule.MatchingLanguages("TeX"),
			regex.MustCompileMultiline(`^\\(contentsline|defcounter|beamer|boolfalse)`),
		),
	},
	".tpl": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Go Template"),
			regex.MustCompileMultiline(`\{\{-?\s*(\`+"`"+`?\"\\?\"?|\/\*\s|\w*)\b`),
		),
		rule.Or(
			rule.MatchingLanguages("Smarty"),
			regex.MustCompileRuby(`(?<!\{)\{(\*\s|\$|\/)?\w*\b`),
		),
	},
	".ts": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("XML"),
			regex.MustCompileMultiline(`<TS\b`),
		),
		rule.Always(
			rule.MatchingLanguages("TypeScript"),
		),
	},
	".tsp": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("TypeSpec"),
			regex.MustCompileMultiline(`^(import|using|namespace|interface|op|model|scalar|alias|union|enum)\s`),
		),
		rule.Or(
			rule.MatchingLanguages("TSPLIB data"),
			regex.MustCompileMultiline(`^(NAME|TYPE|DIMENSION|EDGE_WEIGHT_TYPE|EDGE_WEIGHT_FORMAT)\s*:`),
		),
	},
	".tst": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("GAP"),
			regex.MustCompileMultiline(`gap> `),
		),
		rule.Always(
			rule.MatchingLanguages("Scilab"),
		),
	},
	".tsx": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("XML"),
			regex.MustCompileMultiline(`(?i:^\s*<\?xml\s+version)`),
		),
		rule.Always(
			rule.MatchingLanguages("TSX"),
		),
	},
	".txt": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Vim Help File"),
			regex.MustCompileRuby(`(?:(?:^|[ \t])(?:vi|Vi(?=m))(?:m[<=>]?[0-9]+|m)?|[ \t]ex)(?=:(?=[ \t]*set?[ \t][^\r\n:]+:)|:(?![ \t]*set?[ \t]))(?:(?:[ \t]*:[ \t]*|[ \t])\w*(?:[ \t]*=(?:[^\\\s]|\\.)*)?)*[ \t:](?:filetype|ft|syntax)[ \t]*=(help)(?=$|\s|:)`),
		),
		rule.Or(
			rule.MatchingLanguages("Hosts File"),
			regex.MustCompileRuby(`(?xi) ^

# IPv4 address
(?<ipv4>
  (?!\.)
  (?:\.?
    (?: 25[0-5]  # 250-255
    |   2[0-4]\d # 200-249
    |   1\d\d    # 100-199
    |   [1-9]?\d # 0-99
    )\b
){4})

# CIDR notation: /[0-32]
(?<cidr>/(3[0-2]|[12]?\d)\b)?

# Domains list
(?<domains>
  [ \t]+
  \w[-\w]* (?:\.\w[-\w]*)*
  (?<!-)\b
)*+

(?:$|\s)`),
		),
		rule.Or(
			rule.MatchingLanguages("Adblock Filter List"),
			regex.MustCompileRuby(`(?x)\A
\[
(?<version>
  (?:
    [Aa]d[Bb]lock
    (?:[ \t][Pp]lus)?
    |
    u[Bb]lock
    (?:[ \t][Oo]rigin)?
    |
    [Aa]d[Gg]uard
  )
  (?:[ \t] \d+(?:\.\d+)*+)?
)
(?:
  [ \t]?;[ \t]?
  \g<version>
)*+
\]`),
		),
		rule.Always(
			rule.MatchingLanguages("Text"),
		),
	},
	".typ": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Typst"),
			regex.MustCompileMultiline(`^#(import|show|let|set)`),
		),
		rule.Always(
			rule.MatchingLanguages("XML"),
		),
	},
	".url": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("INI"),
			regex.MustCompileMultiline(`^\[InternetShortcut\](?:\r?\n|\r)([^\s\[][^\r\n]*(?:\r?\n|\r)){0,20}URL=`),
		),
	},
	".v": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Rocq Prover"),
			regex.MustCompileMultiline(`(?:^|\s)(?:Proof|Qed)\.(?:$|\s)|(?:^|\s)Require[ \t]+(Import|Export)\s`),
		),
		rule.Or(
			rule.MatchingLanguages("Verilog"),
			regex.MustCompileMultiline(`^[ \t]*module\s+[^\s()]+\s*\#?\(|^[ \t]*`+"`"+`(?:define|ifdef|ifndef|include|timescale|pragma)|^[ \t]*always[ \t]*@|^[ \t]*initial[ \t]*(begin|@)`),
		),
		rule.Or(
			rule.MatchingLanguages("V"),
			regex.MustCompileMultiline(`\$(?:if|else)[ \t]|^[ \t]*fn\s+[^\s()]+\(.*?\).*?\{|^[ \t]*for\s*\{`),
		),
	},
	".vba": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("Vim Script"),
			regex.MustCompileMultiline(`^UseVimball`),
		),
		rule.Always(
			rule.MatchingLanguages("VBA"),
		),
	},
	".vcf": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("TSV"),
			regex.MustCompileMultiline(`\A##fileformat=VCF`),
		),
		rule.Or(
			rule.MatchingLanguages("vCard"),
			regex.MustCompileMultiline(`\ABEGIN:VCARD`),
		),
	},
	".w": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("OpenEdge ABL"),
			regex.MustCompileMultiline(`&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS`),
		),
		rule.Or(
			rule.MatchingLanguages("CWeb"),
			regex.MustCompileMultiline(`^@(<|\w+\.)`),
		),
	},
	".x": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("DirectX 3D File"),
			regex.MustCompileMultiline(`^xof 030(2|3)(?:txt|bin|tzip|bzip)\b`),
		),
		rule.Or(
			rule.MatchingLanguages("RPC"),
			regex.MustCompileMultiline(`\b(program|version)\s+\w+\s*\{|\bunion\s+\w+\s+switch\s*\(`),
		),
		rule.Or(
			rule.MatchingLanguages("Logos"),
			regex.MustCompileMultiline(`^%(end|ctor|hook|group)\b`),
		),
		rule.Or(
			rule.MatchingLanguages("Linker Script"),
			regex.MustCompileMultiline(`OUTPUT_ARCH\(|OUTPUT_FORMAT\(|SECTIONS`),
		),
	},
	".yaml": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("MiniYAML"),
			regex.MustCompileMultiline(`^\t+.*?[^\s:].*?:`),
		),
		rule.Or(
			rule.MatchingLanguages("OASv2-yaml"),
			regex.MustCompileMultiline(`swagger:\s?'?"?2.[0-9.]+'?"?`),
		),
		rule.Or(
			rule.MatchingLanguages("OASv3-yaml"),
			regex.MustCompileMultiline(`openapi:\s?'?"?3.[0-9.]+'?"?`),
		),
		rule.Always(
			rule.MatchingLanguages("YAML"),
		),
	},
	".yml": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("MiniYAML"),
			regex.MustCompileMultiline(`^\t+.*?[^\s:].*?:`),
		),
		rule.Or(
			rule.MatchingLanguages("OASv2-yaml"),
			regex.MustCompileMultiline(`swagger:\s?'?"?2.[0-9.]+'?"?`),
		),
		rule.Or(
			rule.MatchingLanguages("OASv3-yaml"),
			regex.MustCompileMultiline(`openapi:\s?'?"?3.[0-9.]+'?"?`),
		),
		rule.Always(
			rule.MatchingLanguages("YAML"),
		),
	},
	".yy": &Heuristics{
		rule.Or(
			rule.MatchingLanguages("JSON"),
			regex.MustCompileMultiline(`\A\s*[{\[]`),
		),
		rule.Always(
			rule.MatchingLanguages("Yacc"),
		),
	},
}
