{"id":15440319,"url":"https://github.com/tripodsan/antlr4_js_calculator","last_synced_at":"2026-04-28T11:34:13.428Z","repository":{"id":151232603,"uuid":"121574612","full_name":"tripodsan/antlr4_js_calculator","owner":"tripodsan","description":"Simple command line calculator built with antrl4 and nodejs.","archived":false,"fork":false,"pushed_at":"2018-02-15T02:36:45.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T06:41:27.237Z","etag":null,"topics":["antlr4","javascript","nodejs","tutorial"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tripodsan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2018-02-14T23:47:25.000Z","updated_at":"2020-05-24T16:39:09.000Z","dependencies_parsed_at":"2023-06-29T23:30:22.524Z","dependency_job_id":null,"html_url":"https://github.com/tripodsan/antlr4_js_calculator","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":"0.19999999999999996","last_synced_commit":"718453734088ae93e09b90d823c163b233406be1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tripodsan/antlr4_js_calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripodsan%2Fantlr4_js_calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripodsan%2Fantlr4_js_calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripodsan%2Fantlr4_js_calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripodsan%2Fantlr4_js_calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tripodsan","download_url":"https://codeload.github.com/tripodsan/antlr4_js_calculator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripodsan%2Fantlr4_js_calculator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32379385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["antlr4","javascript","nodejs","tutorial"],"created_at":"2024-10-01T19:12:38.332Z","updated_at":"2026-04-28T11:34:13.409Z","avatar_url":"https://github.com/tripodsan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n--\u003e\n# Antlr4 Javascript Calculator\nExample project with [Tutorial](tutorial.md) that shows how to quickly build a command line calculator with antrl4 and nodejs.\n\nThe code here is based on the Java example provided by Lucas on [Stackoverflow](https://stackoverflow.com/a/29996191/3229985).\nIn particular, the grammar is copied as is.\n\n## Quick Start\n\n### Prerequisite: install antlr4\n\n1. Follow the installation instructions on the [Antlr4 - Get Started](https://github.com/antlr/antlr4/blob/master/doc/getting-started.md#installation) or\nthe official [site](http://www.antlr.org/).\n\n2. make sure that an antlr4 works:\n```bash\n$ antlr4\nANTLR Parser Generator  Version 4.7.1\n...\n```\n\n### Build\n\nThe build process invokes antlr4 and generates the JavaScript _classes_ that are used\nto parse the expressions.\n\nUsing Yarn:\n```bash\n$ yarn install\n$ yarn build\n```\nUsing npm:\n```bash\n$ npm install\n$ npm run build\n```\n\n### Running\n\nwithout arguments, the calculator runs as REPL (read-eval-print-loop)\n\n```\n$ node src/main.js\nSimple calculator.\n\n\u003e 10 * (3+4) / 10\n: 10 * (3+4) / 10 = 7\n\n\u003e _\n``` \n\nwith arguments, the calculator just prints the result of the expression given:\n\n```\n$ node src/main.js \"4*(3+7)+2\"\n42\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftripodsan%2Fantlr4_js_calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftripodsan%2Fantlr4_js_calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftripodsan%2Fantlr4_js_calculator/lists"}