{"id":13620719,"url":"https://github.com/rododo-meow/jcc","last_synced_at":"2025-04-14T22:32:23.908Z","repository":{"id":77515261,"uuid":"42946635","full_name":"rododo-meow/jcc","owner":"rododo-meow","description":"A compiler for Jascal","archived":false,"fork":false,"pushed_at":"2015-12-29T06:12:34.000Z","size":2429,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-08T07:38:28.016Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/rododo-meow.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}},"created_at":"2015-09-22T16:35:03.000Z","updated_at":"2015-11-05T15:25:40.000Z","dependencies_parsed_at":"2023-03-23T15:03:12.523Z","dependency_job_id":null,"html_url":"https://github.com/rododo-meow/jcc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rododo-meow%2Fjcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rododo-meow%2Fjcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rododo-meow%2Fjcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rododo-meow%2Fjcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rododo-meow","download_url":"https://codeload.github.com/rododo-meow/jcc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248972121,"owners_count":21191726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-01T21:00:58.793Z","updated_at":"2025-04-14T22:32:18.893Z","avatar_url":"https://github.com/rododo-meow.png","language":"JavaScript","funding_links":[],"categories":["课程列表"],"sub_categories":["Compiler"],"readme":"# JCC (Jascal Compiler)\r\n---------------------------\r\n## Compilation\r\n* Requirements\r\n    * Make\r\n    * G++/Clang++\r\n    * Bison\r\n    * Flex\r\n    * Python 2.7\r\n    * libjsoncpp-dev\r\n    * llvm-3.7-dev\r\n    * pkg-config\r\n* Tested on\r\n    * Ubuntu Server 15.10/16.04 AMD64\r\n    * Make 4.0-8.2\r\n    * Clang++ 1:3.6-26ubuntu1\r\n    * Bison 2:3.0.4.dfsg-1\r\n    * Flex 2.5.39-8\r\n    * Python 2.7.10-4ubuntu2\r\n    * libjsoncpp-dev 0.10.5-1\r\n    * llvm-3.7-dev 1:3.7-4ubuntu1\r\n    * pkg-config 0.29-2ubuntu1\r\n* How-to\r\n    1. `make`\r\n\r\n----------------------------\r\n## Usage\r\n* Command line parameters for jcc\u003cbr\u003e\r\n    `jcc [options] \u003cinput_file1\u003e [input_file2] [input_file3] ...`\u003cbr\u003e\r\n    Options:\r\n    * `--dump-html \u003chtml_filename\u003e`\u003cbr\u003e\r\n        Output the token stream and AST to a HTML file to view\r\n    * `--lex`\u003cbr\u003e\r\n        Do the tokenize(lexical analysis) stage only\r\n    * `--parse`\u003cbr\u003e\r\n        Do the parse(syntax analysis) stage only\r\n    * `--llvm`\u003cbr\u003e\r\n        Do the compile stage only. (Generate the llvm assembly file)\r\n    * `-S`\u003cbr\u003e\r\n        Do the compile stage only. (Generate the target assembly file)\r\n    * `-c`\u003cbr\u003e\r\n        Do the assemble stage only. (Generate the object file)\r\n    * `-o \u003coutput_filename\u003e`\u003cbr\u003e\r\n        Specifiy the output filename\r\n\t* `-fno-builtin`\u003cbr\u003e\r\n\t\tDon't include the standard library automatically. Mainly used to compile standard library itself.\r\n* Built-in tests\u003cbr\u003e\r\n    You can just run `make test`, it will compile the test cases in `tests` directory using option `jcc --dump-html tests/xxx.html --llvm -o tests/xxx.ll tests/xxx.jas` and then run `clang` to compile and link the `.ll` file against jascal libs' implementations (such as `lib/io.impl.ll`)\u003cbr\u003e\r\n    For eash test case, it will generate an `xxx` file which is the executable binary file of the source file, and an `xxx.html` file which could be opened in browser to see the token stream and the AST of the source file\r\n\tAdditionally, if there is any test data for a test case (named `tests/xxx-testx.in` and `tests/xxx-testx.out`), the tester will automatically run the executable file and feed the `.in` file to it, then get the output and compare it with `.out` file. There will be a time limit which is set to 2 seconds. The comparison will ignore blank line. A `[TEST] xxx.in -\u003e xxx ...pass` will be printed if the output match the `.out` file.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frododo-meow%2Fjcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frododo-meow%2Fjcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frododo-meow%2Fjcc/lists"}