Team Ai
Datasetpublic

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.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
c.js334 linesDownload Raw Back to languages
1/*2Language: C3Category: common, system4Website: https://en.wikipedia.org/wiki/C_(programming_language)5*/6 7/** @type LanguageFn */8function c(hljs) {9  const regex = hljs.regex;10  // added for historic reasons because `hljs.C_LINE_COMMENT_MODE` does11  // not include such support nor can we be sure all the grammars depending12  // on it would desire this behavior13  const C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$', { contains: [ { begin: /\\\n/ } ] });14  const DECLTYPE_AUTO_RE = 'decltype\\(auto\\)';15  const NAMESPACE_RE = '[a-zA-Z_]\\w*::';16  const TEMPLATE_ARGUMENT_RE = '<[^<>]+>';17  const FUNCTION_TYPE_RE = '('18    + DECLTYPE_AUTO_RE + '|'19    + regex.optional(NAMESPACE_RE)20    + '[a-zA-Z_]\\w*' + regex.optional(TEMPLATE_ARGUMENT_RE)21  + ')';22 23 24  const TYPES = {25    className: 'type',26    variants: [27      { begin: '\\b[a-z\\d_]*_t\\b' },28      { match: /\batomic_[a-z]{3,6}\b/ }29    ]30 31  };32 33  // https://en.cppreference.com/w/cpp/language/escape34  // \\ \x \xFF \u2837 \u00323747 \37435  const CHARACTER_ESCAPES = '\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)';36  const STRINGS = {37    className: 'string',38    variants: [39      {40        begin: '(u8?|U|L)?"',41        end: '"',42        illegal: '\\n',43        contains: [ hljs.BACKSLASH_ESCAPE ]44      },45      {46        begin: '(u8?|U|L)?\'(' + CHARACTER_ESCAPES + "|.)",47        end: '\'',48        illegal: '.'49      },50      hljs.END_SAME_AS_BEGIN({51        begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,52        end: /\)([^()\\ ]{0,16})"/53      })54    ]55  };56 57  const NUMBERS = {58    className: 'number',59    variants: [60      { match: /\b(0b[01']+)/ },  61      { match: /(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/ },  62      { match: /(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/ },  63      { match: /(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/ }  64  ],65    relevance: 066  };  67  68  const PREPROCESSOR = {69    className: 'meta',70    begin: /#\s*[a-z]+\b/,71    end: /$/,72    keywords: { keyword:73        'if else elif endif define undef warning error line '74        + 'pragma _Pragma ifdef ifndef elifdef elifndef include' },75    contains: [76      {77        begin: /\\\n/,78        relevance: 079      },80      hljs.inherit(STRINGS, { className: 'string' }),81      {82        className: 'string',83        begin: /<.*?>/84      },85      C_LINE_COMMENT_MODE,86      hljs.C_BLOCK_COMMENT_MODE87    ]88  };89 90  const TITLE_MODE = {91    className: 'title',92    begin: regex.optional(NAMESPACE_RE) + hljs.IDENT_RE,93    relevance: 094  };95 96  const FUNCTION_TITLE = regex.optional(NAMESPACE_RE) + hljs.IDENT_RE + '\\s*\\(';97 98  const C_KEYWORDS = [99    "asm",100    "auto",101    "break",102    "case",103    "continue",104    "default",105    "do",106    "else",107    "enum",108    "extern",109    "for",110    "fortran",111    "goto",112    "if",113    "inline",114    "register",115    "restrict",116    "return",117    "sizeof",118    "typeof",119    "typeof_unqual",120    "struct",121    "switch",122    "typedef",123    "union",124    "volatile",125    "while",126    "_Alignas",127    "_Alignof",128    "_Atomic",129    "_Generic",130    "_Noreturn",131    "_Static_assert",132    "_Thread_local",133    // aliases134    "alignas",135    "alignof",136    "noreturn",137    "static_assert",138    "thread_local",139    // not a C keyword but is, for all intents and purposes, treated exactly like one.140    "_Pragma"141  ];142 143  const C_TYPES = [144    "float",145    "double",146    "signed",147    "unsigned",148    "int",149    "short",150    "long",151    "char",152    "void",153    "_Bool",154    "_BitInt",155    "_Complex",156    "_Imaginary",157    "_Decimal32",158    "_Decimal64",159    "_Decimal96",160    "_Decimal128",161    "_Decimal64x",162    "_Decimal128x",163    "_Float16",164    "_Float32",165    "_Float64",166    "_Float128",167    "_Float32x",168    "_Float64x",169    "_Float128x",170    // modifiers171    "const",172    "static",173    "constexpr",174    // aliases175    "complex",176    "bool",177    "imaginary"178  ];179 180  const KEYWORDS = {181    keyword: C_KEYWORDS,182    type: C_TYPES,183    literal: 'true false NULL',184    // TODO: apply hinting work similar to what was done in cpp.js185    built_in: 'std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream '186      + 'auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set '187      + 'unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos '188      + 'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp '189      + 'fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper '190      + 'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow '191      + 'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp '192      + 'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan '193      + 'vfprintf vprintf vsprintf endl initializer_list unique_ptr',194  };195 196  const EXPRESSION_CONTAINS = [197    PREPROCESSOR,198    TYPES,199    C_LINE_COMMENT_MODE,200    hljs.C_BLOCK_COMMENT_MODE,201    NUMBERS,202    STRINGS203  ];204 205  const EXPRESSION_CONTEXT = {206    // This mode covers expression context where we can't expect a function207    // definition and shouldn't highlight anything that looks like one:208    // `return some()`, `else if()`, `(x*sum(1, 2))`209    variants: [210      {211        begin: /=/,212        end: /;/213      },214      {215        begin: /\(/,216        end: /\)/217      },218      {219        beginKeywords: 'new throw return else',220        end: /;/221      }222    ],223    keywords: KEYWORDS,224    contains: EXPRESSION_CONTAINS.concat([225      {226        begin: /\(/,227        end: /\)/,228        keywords: KEYWORDS,229        contains: EXPRESSION_CONTAINS.concat([ 'self' ]),230        relevance: 0231      }232    ]),233    relevance: 0234  };235 236  const FUNCTION_DECLARATION = {237    begin: '(' + FUNCTION_TYPE_RE + '[\\*&\\s]+)+' + FUNCTION_TITLE,238    returnBegin: true,239    end: /[{;=]/,240    excludeEnd: true,241    keywords: KEYWORDS,242    illegal: /[^\w\s\*&:<>.]/,243    contains: [244      { // to prevent it from being confused as the function title245        begin: DECLTYPE_AUTO_RE,246        keywords: KEYWORDS,247        relevance: 0248      },249      {250        begin: FUNCTION_TITLE,251        returnBegin: true,252        contains: [ hljs.inherit(TITLE_MODE, { className: "title.function" }) ],253        relevance: 0254      },255      // allow for multiple declarations, e.g.:256      // extern void f(int), g(char);257      {258        relevance: 0,259        match: /,/260      },261      {262        className: 'params',263        begin: /\(/,264        end: /\)/,265        keywords: KEYWORDS,266        relevance: 0,267        contains: [268          C_LINE_COMMENT_MODE,269          hljs.C_BLOCK_COMMENT_MODE,270          STRINGS,271          NUMBERS,272          TYPES,273          // Count matching parentheses.274          {275            begin: /\(/,276            end: /\)/,277            keywords: KEYWORDS,278            relevance: 0,279            contains: [280              'self',281              C_LINE_COMMENT_MODE,282              hljs.C_BLOCK_COMMENT_MODE,283              STRINGS,284              NUMBERS,285              TYPES286            ]287          }288        ]289      },290      TYPES,291      C_LINE_COMMENT_MODE,292      hljs.C_BLOCK_COMMENT_MODE,293      PREPROCESSOR294    ]295  };296 297  return {298    name: "C",299    aliases: [ 'h' ],300    keywords: KEYWORDS,301    // Until differentiations are added between `c` and `cpp`, `c` will302    // not be auto-detected to avoid auto-detect conflicts between C and C++303    disableAutodetect: true,304    illegal: '</',305    contains: [].concat(306      EXPRESSION_CONTEXT,307      FUNCTION_DECLARATION,308      EXPRESSION_CONTAINS,309      [310        PREPROCESSOR,311        {312          begin: hljs.IDENT_RE + '::',313          keywords: KEYWORDS314        },315        {316          className: 'class',317          beginKeywords: 'enum class struct union',318          end: /[{;:<>=]/,319          contains: [320            { beginKeywords: "final class struct" },321            hljs.TITLE_MODE322          ]323        }324      ]),325    exports: {326      preprocessor: PREPROCESSOR,327      strings: STRINGS,328      keywords: KEYWORDS329    }330  };331}332 333export { c as default };334 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai