{"id":28494578,"url":"https://github.com/hanrodz/syntax-highlighter","last_synced_at":"2026-04-29T14:32:54.595Z","repository":{"id":110176053,"uuid":"476110584","full_name":"hanrodz/syntax-highlighter","owner":"hanrodz","description":"Highlight syntax in C++, Python and JavaScript code (common lexical categories only)","archived":false,"fork":false,"pushed_at":"2022-06-06T23:22:24.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-08T14:43:16.786Z","etag":null,"topics":["c","lex","lexer","python","syntax-highlighting"],"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/hanrodz.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}},"created_at":"2022-03-31T01:39:31.000Z","updated_at":"2023-03-07T03:59:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae639d71-48bf-4ac9-82f0-ab1bf87a81e6","html_url":"https://github.com/hanrodz/syntax-highlighter","commit_stats":null,"previous_names":["hanrodz/syntax-highlighter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hanrodz/syntax-highlighter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanrodz%2Fsyntax-highlighter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanrodz%2Fsyntax-highlighter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanrodz%2Fsyntax-highlighter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanrodz%2Fsyntax-highlighter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanrodz","download_url":"https://codeload.github.com/hanrodz/syntax-highlighter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanrodz%2Fsyntax-highlighter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32429120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"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","lex","lexer","python","syntax-highlighting"],"created_at":"2025-06-08T10:07:09.785Z","updated_at":"2026-04-29T14:32:54.590Z","avatar_url":"https://github.com/hanrodz.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Syntax Highlighter\n\nThe program receives a text file containing code in C++, Python or JavaScript and outputs an HTML file containing the same code and highlighting elements from lexical categories that are shared between the three languages.\n\n**Note: multi-threaded highlighting can be run in the [Python](python) implementation**\n\n## How to highlight code\n\nFrom the folder where all files are stored, run shell script with path to code file as an argument:\n\n    ./run.sh path/to/file.py\n\nIn computers that cannot run shell scripts the code can be manually compiled and run:\n\n    gcc scanner.c lex.yy.c -o scanner\n    ./scanner \u003c path/to/file.cpp\n\nThe highlighted code will be stored in ```output.html```, using the stylesheet ```style.css``` contained in this folder.\n\n## Important notes\n\n- An exception is yet to be implemented so that C++ and JavaScript comments be told apart from Python integer divisions (\"//\").\n\n- Another exception is yet to be implemented so that Python comments be highlighted if there is no space between \"#\" and the text. C++ \"#\" statements should be taken into consideration.\n\n## Sources consulted\n\n[https://youtu.be/54bo1qaHAfk](https://youtu.be/54bo1qaHAfk)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanrodz%2Fsyntax-highlighter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanrodz%2Fsyntax-highlighter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanrodz%2Fsyntax-highlighter/lists"}