{"id":35161983,"url":"https://github.com/dk14/typed-template","last_synced_at":"2026-05-22T07:34:52.986Z","repository":{"id":21115955,"uuid":"24416601","full_name":"dk14/typed-template","owner":"dk14","description":"this macro generates parsers from specified grammars","archived":false,"fork":false,"pushed_at":"2018-02-17T03:56:34.000Z","size":426,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-20T16:43:25.012Z","etag":null,"topics":["ast","grammar","macros","parse","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/dk14.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":"2014-09-24T13:44:51.000Z","updated_at":"2018-02-17T03:55:50.000Z","dependencies_parsed_at":"2022-07-13T02:20:26.926Z","dependency_job_id":null,"html_url":"https://github.com/dk14/typed-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dk14/typed-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dk14%2Ftyped-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dk14%2Ftyped-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dk14%2Ftyped-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dk14%2Ftyped-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dk14","download_url":"https://codeload.github.com/dk14/typed-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dk14%2Ftyped-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33333530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ast","grammar","macros","parse","scala"],"created_at":"2025-12-28T18:38:47.366Z","updated_at":"2026-05-22T07:34:52.973Z","avatar_url":"https://github.com/dk14.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"typed-template\n==============\n\nThis macro generates parser from user-friendly external grammar.\nAST returned from such parser will be typesafe (tree of case classes)\n\nExample\n\nGrammar:\n\n    instrument {name} is Option\n    exercise at {exerciseDate: String} {automatic: String}\n      {optionsCount: String} options with strike {strike: String}\n      with {count: String} underlyer\n      pay premium {premium: String} from {partyFrom: String} to {partyTo: String} at {premiumDate: String}\n  \n\nInput:\n\n    instrument Equity is Option\n      exercise at 10500/10/10 automatic\n      20 options with strike 100\n      with one underlyer\n      pay premium 100500 from DB to NEDB at 10500/10/10  \n\n\nUsage:\n   \n    @generator(source = \"option.template\") object Env\n    Env.parse(instrument)\n\n\nOutput AST: \n\n    Env.Option(\n      Env.ExerciseDate(10500/10/10,automatic),\n      Env.OptionsCount(20,100),\n      Env.Count(one),\n      Env.Premium(100500,DB,NEDB,10500/10/10)\n    )\n    \nTry: \n    \n    git clone https://github.com/dk14/typed-template.git\n    brew install sbt\n    sbt\n    ;clean;test/runMain Test\n    \nNote: macroparadise must be added in client module to use this macro \n\n    autoCompilerPlugins := true,\n    resolvers in ThisBuild  += Resolver.sonatypeRepo(\"releases\"),\n    libraryDependencies += \"org.scalamacros\" % \"paradise\" % \"2.0.1\" cross CrossVersion.full,\n    addCompilerPlugin(\"org.scalamacros\" % \"paradise\" % \"2.0.1\" cross CrossVersion.full)\n    \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdk14%2Ftyped-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdk14%2Ftyped-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdk14%2Ftyped-template/lists"}