{"id":18863649,"url":"https://github.com/neil-edelman/cdoc","last_synced_at":"2026-02-15T00:31:40.600Z","repository":{"id":74342162,"uuid":"85894222","full_name":"neil-edelman/cdoc","owner":"neil-edelman","description":"Light-weight documentation parser.","archived":false,"fork":false,"pushed_at":"2025-01-20T23:26:22.000Z","size":1615,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-03T19:46:26.687Z","etag":null,"topics":["c","compiler","lexer","re2c"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neil-edelman.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-03-23T01:40:39.000Z","updated_at":"2025-07-04T21:50:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6338ecd-56d2-4989-b0a5-34d788aaea4d","html_url":"https://github.com/neil-edelman/cdoc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/neil-edelman/cdoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neil-edelman%2Fcdoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neil-edelman%2Fcdoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neil-edelman%2Fcdoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neil-edelman%2Fcdoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neil-edelman","download_url":"https://codeload.github.com/neil-edelman/cdoc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neil-edelman%2Fcdoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29461911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T22:42:09.113Z","status":"ssl_error","status_checked_at":"2026-02-14T22:42:05.053Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","compiler","lexer","re2c"],"created_at":"2024-11-08T04:38:05.434Z","updated_at":"2026-02-15T00:31:40.586Z","avatar_url":"https://github.com/neil-edelman.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cdoc\\.re\\.c #\n\n * [Description](#user-content-preamble)\n * [Function Summary](#user-content-summary)\n * [Function Definitions](#user-content-fn)\n * [License](#user-content-license)\n\n## \u003ca id = \"user-content-preamble\" name = \"user-content-preamble\"\u003eDescription\u003c/a\u003e ##\n\nStatic documentation generator for one `C` translation unit\\. This is not a full `C` context\\-free grammar decoder; it is limited to regular grammar\\. Remapping with the pre\\-processor, complex types, K\u0026R style function definitions, trigraphs, are confusing to it\\. It just guesses based on reasonable modern coding\\-standards\\. However, it assumes that capital latin letters underscores are concatenation commands for the pre\\-processor, such that `A_BC_(foo,bar)` is transformed into `\u003cA\u003efoo\u003cBC\u003ebar`\\.\n\nIn keeping with `Javadoc` and `Doxygen`, documentation commands are `/` `**…` \\(together\\) and are ended with `*…/`, but not `/` `*…*` `/`\\. Accounts for asterisks at the start of a line, \\(Kernel comments,\\) or asterisks on both sides, \\(ASCII art?\\) Documentation appearing at most two lines above `typedef`, `tag` \\(`struct`, `enum`, `union`,\\) data, and functions, is associated therewith; everything else is automatically inserted into the description\\. Multiple documentation on the same command is appended\\. Two hard returns is a paragraph\\. The big difference is the fixed `@param` notation; now it has to be followed by a braced list, `@param[a, b] Concatenates both.`\\.\n\nSupports some `Markdown` commands included in the documentation,\n\n * `\\` escapes `_~!@\u003c\u003e[]` and \"\\`\"; \"\\`\" can not be represented in math/code, \\(multiple escapes aren't supported\\); in paragraph mode, except in ambiguous cases, the only ones that are needed are \\\\\\` and \\\\\\_;\n * \\_emphasised\\_: _emphasised_;\n * \\`code/math\\`: `code/math`;\n * start lists with `\\*` \\(including spaces\\) and end with a new paragraph; these are simple, can be anywhere and don't nest;\n * `\\\"` \\(and optionally a space\\) causes all the line after to be pre\\-formatted;\n * Escapes included for convenience: `\\,` \"\u0026#8239;\" non\\-breaking thin space, `\\O` \"\u0026#927;\" Bachmann–Landau notation, \\(but really capital omicron because not many fonts have a shape for code\\-point 120030,\\) `\\Theta` \"\u0026#920;\", `\\Omega` \"\u0026#937;\", `\\times` \"\u0026#215;\", `\\cdot` \"\u0026#183;\"\\.\n * `~` \"\u0026nbsp;\" non\\-breaking space;\n * `\u003curl\u003e`: relative URIs must have a slash or a dot to distinguish it from text;\n * `\u003cSource, 1999, pp. 1-2\u003e`: citation, searches on Google scholar;\n * `\u003cfn:\u003cfunction\u003e\u003e`: function reference;\n * `\u003ctag:\u003ctag\u003e\u003e`: struct, union, or enum \\(tag\\) reference;\n * `\u003ctypedef:\u003ctypedef\u003e\u003e`: typedef reference;\n * `\u003cdata:\u003cidentifier\u003e\u003e`: data reference;\n * `[The link text](url)`: link, Markdown doesn't like `{}[]()` in text;\n * `![Caption text](url.image)`: image, same;\n * a local include directive has a documentation comment immediately after that reads only `\\include`, it will also be included in the documentation\\.\n\nEach\\-block\\-tags separate the documentation until the next paragraph or until the next each\\-block\\-tag, and specify a specific documentation structure\\. Each\\-block\\-tags that overlap are concatenated in the file order\\. Not all of these are applicable for all segments of text\\. These are:\n\n * `@subtitle`: only makes sense for preamble, \\(it doesn't matter what case one writes it, but multiple are concatenated using semicolons\\);\n * `@abstract`: tl;dr appearing first;\n * `@param[\u003cparam1\u003e[, ...]]`: parameters, \\(multiple are concatenated using spaces, so this really should be sentence case\\);\n * `@author` \\(commas\\);\n * `@std`: standard, eg, `@std GNU-C99`, \\(semicolons\\);\n * `@depend`: dependancy, \\(semicolons\\);\n * `@fixme`: something doesn't work as expected, \\(spaces\\);\n * `@return`: normal function return, \\(spaces\\);\n * `@throws[\u003cexception1\u003e[, ...]]`: exceptional function return; `C` doesn't have native exceptions, so `@throws` means whatever one desires; perhaps a null pointer or false is returned and `errno` is set to `exception1`;\n * `@implements`: `C` doesn't have the concept of implements, but we would say that a function having a prototype of `(int (*)(const void *, const void *))` implements `bsearch` and `qsort`;\n * `@order`: comments about the run\\-time or space;\n * and `@allow`, the latter being to allow `static` functions or data in the documentation, which are usually culled\\.\n\nIf one sets `md` as output, it goes to `GitHub` Markdown that is specifically visible on the `GitHub` page, \\(including working anchor links on browsers \u003e 2000\\.\\) This is not the Markdown supported in the documentation\\.\n\n\n\n * Standard:  \n   C89\n * Dependancies:  \n   [re2c](http://re2c.org/)\n * Caveat:  \n   Prototype function parameters ignore `const`\\. Documentation on prototypes\\. Links to non\\-documented code which sometimes doesn't show up, work without error, and create broken links\\. A fixme with no args disappears; we should NOT check if the string is empty for these values\\. Documentation on global variables is not output\\.\n\n\n## \u003ca id = \"user-content-summary\" name = \"user-content-summary\"\u003eFunction Summary\u003c/a\u003e ##\n\n\u003ctable\u003e\n\n\u003ctr\u003e\u003cth\u003eModifiers\u003c/th\u003e\u003cth\u003eFunction Name\u003c/th\u003e\u003cth\u003eArgument List\u003c/th\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\u003ctd align = right\u003eenum debug\u003c/td\u003e\u003ctd\u003e\u003ca href = \"#user-content-fn-c6df3e1b\"\u003ecdoc_get_debug\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\u003ctd align = right\u003eenum format\u003c/td\u003e\u003ctd\u003e\u003ca href = \"#user-content-fn-37ca931f\"\u003ecdoc_get_format\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\u003ctd align = right\u003econst char *\u003c/td\u003e\u003ctd\u003e\u003ca href = \"#user-content-fn-7655d1a0\"\u003ecdoc_get_input\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\u003ctd align = right\u003econst char *\u003c/td\u003e\u003ctd\u003e\u003ca href = \"#user-content-fn-93e48c81\"\u003ecdoc_get_output\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\n\u003c/table\u003e\n\n\n\n## \u003ca id = \"user-content-fn\" name = \"user-content-fn\"\u003eFunction Definitions\u003c/a\u003e ##\n\n### \u003ca id = \"user-content-fn-c6df3e1b\" name = \"user-content-fn-c6df3e1b\"\u003ecdoc_get_debug\u003c/a\u003e ###\n\n\u003ccode\u003eenum debug \u003cstrong\u003ecdoc_get_debug\u003c/strong\u003e(void)\u003c/code\u003e\n\n * Return:  \n   Whether the command\\-line was set\\.\n\n\n\n\n### \u003ca id = \"user-content-fn-37ca931f\" name = \"user-content-fn-37ca931f\"\u003ecdoc_get_format\u003c/a\u003e ###\n\n\u003ccode\u003eenum format \u003cstrong\u003ecdoc_get_format\u003c/strong\u003e(void)\u003c/code\u003e\n\n * Return:  \n   What format the output was specified to be in `enum format`\\. If there was no output format specified, guess\\.\n\n\n\n\n### \u003ca id = \"user-content-fn-7655d1a0\" name = \"user-content-fn-7655d1a0\"\u003ecdoc_get_input\u003c/a\u003e ###\n\n\u003ccode\u003econst char *\u003cstrong\u003ecdoc_get_input\u003c/strong\u003e(void)\u003c/code\u003e\n\n * Return:  \n   The input filename\\.\n\n\n\n\n### \u003ca id = \"user-content-fn-93e48c81\" name = \"user-content-fn-93e48c81\"\u003ecdoc_get_output\u003c/a\u003e ###\n\n\u003ccode\u003econst char *\u003cstrong\u003ecdoc_get_output\u003c/strong\u003e(void)\u003c/code\u003e\n\n * Return:  \n   The output filename\\.\n\n\n\n\n\n\n## \u003ca id = \"user-content-license\" name = \"user-content-license\"\u003eLicense\u003c/a\u003e ##\n\n2019 Neil Edelman, distributed under the terms of the [MIT License](https://opensource.org/licenses/MIT)\\.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneil-edelman%2Fcdoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneil-edelman%2Fcdoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneil-edelman%2Fcdoc/lists"}