{"id":21173432,"url":"https://github.com/ejurgensen/bison-boilerplate","last_synced_at":"2026-01-03T04:03:29.822Z","repository":{"id":86310883,"uuid":"440952280","full_name":"ejurgensen/bison-boilerplate","owner":"ejurgensen","description":"Boilerplate .l, .y, .am and .ac for multiple Bison/flex parsers-lexers in a C project","archived":false,"fork":false,"pushed_at":"2024-09-15T21:01:05.000Z","size":186,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T11:14:23.671Z","etag":null,"topics":["autotools","bison","flex","parser"],"latest_commit_sha":null,"homepage":"","language":"Yacc","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/ejurgensen.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-22T18:38:33.000Z","updated_at":"2024-01-17T17:47:46.000Z","dependencies_parsed_at":"2024-11-20T16:48:57.666Z","dependency_job_id":null,"html_url":"https://github.com/ejurgensen/bison-boilerplate","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/ejurgensen%2Fbison-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejurgensen%2Fbison-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejurgensen%2Fbison-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejurgensen%2Fbison-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ejurgensen","download_url":"https://codeload.github.com/ejurgensen/bison-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243623897,"owners_count":20321025,"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":["autotools","bison","flex","parser"],"created_at":"2024-11-20T16:37:05.774Z","updated_at":"2026-01-03T04:03:24.792Z","avatar_url":"https://github.com/ejurgensen.png","language":"Yacc","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bison-boilerplate\n\nThis is minimal flex/bison boilerplate for a C project with the following\nrequirements:\n\n- Use autotools (automake/autoconf)\n- Parse strings (not files)\n- Allow for multiple parsers/lexers\n- Clean interface to main program i.e., no bison/flex constructs in main program\n- Clear separation between boilerplate and real parsing/lexing\n\nThe goal of the boilerplate is to be neat and tidy. That means using thread safe\nBison/flex, creating proper lex headers, using a consistent naming schema,\neschewing compiler warnings etc.\n\nIt includes a configure check that specifically checks for flex and bison, not\naccepting lex nor yacc.\n\nThe boilerplate implements two identical calculator parsers to test with. Run\n`autoreconf -vi \u0026\u0026 ./configure \u0026\u0026 make`, and then run with `./src/boilerplate`.\nThe interface between the example parsers and the main program can be seen in\nmain.c.\n\nTo create a parser with the boilerplate, search and replace \"calc1_\" with your\nname, and write your lexing and parsing implementation in the sections of the .l\nand .y files marked as non-boilerplate.\n\nYou can also check the [owntone1](https://github.com/ejurgensen/bison-boilerplate/tree/owntone1)\nbranch if you want to see the actual parsers I use the boilerplate code for.\n\nCredit to the following for useful info/input:\n* https://begriffs.com/posts/2021-11-28-practical-parsing.html\n* https://github.com/meyerd/flex-bison-example\n* https://github.com/5nord/bison-example\n* https://lloydrochester.com/post/autotools/flex-bison-project/\n* https://www.gnu.org/software/automake/manual/html_node/Yacc-and-Lex.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejurgensen%2Fbison-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fejurgensen%2Fbison-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejurgensen%2Fbison-boilerplate/lists"}