Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1/*2Language: Ada3Author: Lars Schulna <kartoffelbrei.mit.muskatnuss@gmail.org>4Description: Ada is a general-purpose programming language that has great support for saftey critical and real-time applications.5 It has been developed by the DoD and thus has been used in military and safety-critical applications (like civil aviation).6 The first version appeared in the 80s, but it's still actively developed today with7 the newest standard being Ada2012.8*/9 10// We try to support full Ada201211//12// We highlight all appearances of types, keywords, literals (string, char, number, bool)13// and titles (user defined function/procedure/package)14// CSS classes are set accordingly15//16// Languages causing problems for language detection:17// xml (broken by Foo : Bar type), elm (broken by Foo : Bar type), vbscript-html (broken by body keyword)18// sql (ada default.txt has a lot of sql keywords)19 20/** @type LanguageFn */21function ada(hljs) {22 // Regular expression for Ada numeric literals.23 // stolen form the VHDL highlighter24 25 // Decimal literal:26 const INTEGER_RE = '\\d(_|\\d)*';27 const EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;28 const DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';29 30 // Based literal:31 const BASED_INTEGER_RE = '\\w+';32 const BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';33 34 const NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';35 36 // Identifier regex37 const ID_REGEX = '[A-Za-z](_?[A-Za-z0-9.])*';38 39 // bad chars, only allowed in literals40 const BAD_CHARS = `[]\\{\\}%#'"`;41 42 // Ada doesn't have block comments, only line comments43 const COMMENTS = hljs.COMMENT('--', '$');44 45 // variable declarations of the form46 // Foo : Bar := Baz;47 // where only Bar will be highlighted48 const VAR_DECLS = {49 // TODO: These spaces are not required by the Ada syntax50 // however, I have yet to see handwritten Ada code where51 // someone does not put spaces around :52 begin: '\\s+:\\s+',53 end: '\\s*(:=|;|\\)|=>|$)',54 // endsWithParent: true,55 // returnBegin: true,56 illegal: BAD_CHARS,57 contains: [58 {59 // workaround to avoid highlighting60 // named loops and declare blocks61 beginKeywords: 'loop for declare others',62 endsParent: true63 },64 {65 // properly highlight all modifiers66 className: 'keyword',67 beginKeywords: 'not null constant access function procedure in out aliased exception'68 },69 {70 className: 'type',71 begin: ID_REGEX,72 endsParent: true,73 relevance: 074 }75 ]76 };77 78 const KEYWORDS = [79 "abort",80 "else",81 "new",82 "return",83 "abs",84 "elsif",85 "not",86 "reverse",87 "abstract",88 "end",89 "accept",90 "entry",91 "select",92 "access",93 "exception",94 "of",95 "separate",96 "aliased",97 "exit",98 "or",99 "some",100 "all",101 "others",102 "subtype",103 "and",104 "for",105 "out",106 "synchronized",107 "array",108 "function",109 "overriding",110 "at",111 "tagged",112 "generic",113 "package",114 "task",115 "begin",116 "goto",117 "pragma",118 "terminate",119 "body",120 "private",121 "then",122 "if",123 "procedure",124 "type",125 "case",126 "in",127 "protected",128 "constant",129 "interface",130 "is",131 "raise",132 "use",133 "declare",134 "range",135 "delay",136 "limited",137 "record",138 "when",139 "delta",140 "loop",141 "rem",142 "while",143 "digits",144 "renames",145 "with",146 "do",147 "mod",148 "requeue",149 "xor"150 ];151 152 return {153 name: 'Ada',154 case_insensitive: true,155 keywords: {156 keyword: KEYWORDS,157 literal: [158 "True",159 "False"160 ]161 },162 contains: [163 COMMENTS,164 // strings "foobar"165 {166 className: 'string',167 begin: /"/,168 end: /"/,169 contains: [170 {171 begin: /""/,172 relevance: 0173 }174 ]175 },176 // characters ''177 {178 // character literals always contain one char179 className: 'string',180 begin: /'.'/181 },182 {183 // number literals184 className: 'number',185 begin: NUMBER_RE,186 relevance: 0187 },188 {189 // Attributes190 className: 'symbol',191 begin: "'" + ID_REGEX192 },193 {194 // package definition, maybe inside generic195 className: 'title',196 begin: '(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?',197 end: '(is|$)',198 keywords: 'package body',199 excludeBegin: true,200 excludeEnd: true,201 illegal: BAD_CHARS202 },203 {204 // function/procedure declaration/definition205 // maybe inside generic206 begin: '(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+',207 end: '(\\bis|\\bwith|\\brenames|\\)\\s*;)',208 keywords: 'overriding function procedure with is renames return',209 // we need to re-match the 'function' keyword, so that210 // the title mode below matches only exactly once211 returnBegin: true,212 contains:213 [214 COMMENTS,215 {216 // name of the function/procedure217 className: 'title',218 begin: '(\\bwith\\s+)?\\b(function|procedure)\\s+',219 end: '(\\(|\\s+|$)',220 excludeBegin: true,221 excludeEnd: true,222 illegal: BAD_CHARS223 },224 // 'self'225 // // parameter types226 VAR_DECLS,227 {228 // return type229 className: 'type',230 begin: '\\breturn\\s+',231 end: '(\\s+|;|$)',232 keywords: 'return',233 excludeBegin: true,234 excludeEnd: true,235 // we are done with functions236 endsParent: true,237 illegal: BAD_CHARS238 239 }240 ]241 },242 {243 // new type declarations244 // maybe inside generic245 className: 'type',246 begin: '\\b(sub)?type\\s+',247 end: '\\s+',248 keywords: 'type',249 excludeBegin: true,250 illegal: BAD_CHARS251 },252 253 // see comment above the definition254 VAR_DECLS255 256 // no markup257 // relevance boosters for small snippets258 // {begin: '\\s*=>\\s*'},259 // {begin: '\\s*:=\\s*'},260 // {begin: '\\s+:=\\s+'},261 ]262 };263}264 265export { ada as default };266 