{"id":19197528,"url":"https://github.com/rikulo/jison2dart","last_synced_at":"2025-05-09T00:44:57.186Z","repository":{"id":39890320,"uuid":"232996321","full_name":"rikulo/jison2dart","owner":"rikulo","description":"Generate Dart parsers using Jison - Bison/Yacc in JavaScript","archived":false,"fork":false,"pushed_at":"2023-07-30T14:10:11.000Z","size":71,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-09T00:44:49.751Z","etag":null,"topics":["bison","dart","dart-parser","flutter","jison","yacc"],"latest_commit_sha":null,"homepage":"https://quire.io","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rikulo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-10T08:01:46.000Z","updated_at":"2024-09-22T15:27:43.000Z","dependencies_parsed_at":"2025-04-20T10:52:09.880Z","dependency_job_id":null,"html_url":"https://github.com/rikulo/jison2dart","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/rikulo%2Fjison2dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikulo%2Fjison2dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikulo%2Fjison2dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikulo%2Fjison2dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rikulo","download_url":"https://codeload.github.com/rikulo/jison2dart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171212,"owners_count":21865283,"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":["bison","dart","dart-parser","flutter","jison","yacc"],"created_at":"2024-11-09T12:17:13.117Z","updated_at":"2025-05-09T00:44:57.164Z","avatar_url":"https://github.com/rikulo.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jison2dart\n\nGenerate Dart parsers using [Jison](https://github.com/zaach/jison) - [Bison](https://www.gnu.org/software/bison/)/Yacc in JavaScript.\n\n## Getting Started\n\nFirst, you have to prepare [Nodejs](https://nodejs.org/en/) for your environment, and install `jison`.\n\n```\ngit clone git@github.com:rikulo/jison2dart.git\ncd jison2dart/lib/js\nnpm install\n```\n\nThen, you can compile a Jison file to a Dart parser. For example,\n\n```\ncd example\nnode ../lib/js/jison2dart.js calculator.jison\n```\n\nFor more options, please run\n\n```\nnode bison.js --help\n```\n\nThe Dart file will contain a class depending on the jison filename. For example,\n\n```\nclass Caculator extends DefaultJisonParser {\n\n  Object parse() {\n...\n```\n\nTo use the Dart parser in your application, you have to put `jison2dart` to your `pubspec.yaml`.\n\nThen, you can use the parser. For example,\n\n```\nprint(Caculator().parse(\"2 * 3\"));\n```\n\n\n## Special Extensions\n\n### `%library`\n\nOptional. Generates the library statement in the Dart pasrer.\n\n```\n%library my.lib\n```\n\n### `%class`\n\nOptional. Specfies the name of the Dart pasrer.\n\n```\n%class CalcParser\n```\n\nIf you'd like to override it, say, for different platforms, you can specify `abstract` too:\n\n```\n%class abstract ParserBase\n```\n\n### `%extends`\n\nIf you'd like to extend from your custom class, you can specify it as follows:\n\n```\n%extends MyGenericParser\n```\n\nNote: Your implementation must implement `JisonParser`, or extends `DefaultJisonParser`.\n\n### `%case-sensitive`\n\nBy default, the lexer is case senstive. You can turn off as follows:\n\n```\n%case-sensitive false\n```\n\n### The prologue: `%{` and `%}`\n\nOptional. If you'd like to import other libraries or embed Dart codes, you can put the code between `%{` and `%}`.\n\n```\n%{\n  import \"super/foo.dart\";\n\n  String camelize(String text) {\n    ...\n  }\n}%\n```\n\n\u003e Note: unlike [Bison's prologue](https://www.gnu.org/software/bison/manual/html_node/Prologue.html), you can put at most one prologue.\n\n## Resources\n\n* [API Reference](https://pub.dev/documentation/jison2dart/latest)\n* [Git Repos](https://github.com/rikulo/jison2dart)\n\n## Who Uses\n\n* [Quire](https://quire.io) - a simple, collaborative, multi-level task management tool.\n* [Keikai](https://keikai.io) - a sophisticated spreadsheet for big data\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikulo%2Fjison2dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frikulo%2Fjison2dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikulo%2Fjison2dart/lists"}