{"id":17796375,"url":"https://github.com/d-plaindoux/alda","last_synced_at":"2025-08-13T06:33:29.294Z","repository":{"id":167827953,"uuid":"643450945","full_name":"d-plaindoux/alda","owner":"d-plaindoux","description":"Intuitive and simple to use OCaml parsec ","archived":false,"fork":false,"pushed_at":"2023-06-26T06:31:12.000Z","size":70,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-27T12:17:09.433Z","etag":null,"topics":["functional-programming","parser-combinators"],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/d-plaindoux.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":"2023-05-21T07:45:27.000Z","updated_at":"2024-04-26T14:28:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f611acb-9369-4ae9-a13e-6912a9335d88","html_url":"https://github.com/d-plaindoux/alda","commit_stats":null,"previous_names":["d-plaindoux/alda"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Falda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Falda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Falda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Falda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-plaindoux","download_url":"https://codeload.github.com/d-plaindoux/alda/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229743828,"owners_count":18117460,"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":["functional-programming","parser-combinators"],"created_at":"2024-10-27T11:45:13.209Z","updated_at":"2024-12-14T19:08:33.407Z","avatar_url":"https://github.com/d-plaindoux.png","language":"OCaml","readme":"# Alda\n\nIntuitive and simple to use OCaml parsec \n\n# Examples\n\nThe following example shows how to design a parser capable of recognizing \nexpressions such as those described here:\n\n```\nexpr ::= integer (('+'|'-') expr)? | '(' expr ')'\n```\n\n```ocaml\nmodule Parsec = Alda.Parser.Parsec (Alda.Source.FromChars)\n\nlet expr =\n  let open Alda.Parser.Core (Parsec) in\n  let open Alda.Parser.Literal (Parsec) in\n\n  let _OPERATOR_ = char_in_string \"+-\"\n  and _LPAR_ = char '('\n  and _RPAR_ = char ')' in\n  let operations expr = integer \u003c+\u003e opt (_OPERATOR_ \u003c+\u003e expr) \u003e+\u003e return ()\n  and parenthesis expr = _LPAR_ \u003c+\u003e expr \u003c+\u003e _RPAR_ \u003e+\u003e return () in\n  fix (fun expr -\u003e operations expr \u003c|\u003e parenthesis expr)\n```\n\nCalling the analyzer is then very simple and easy, as the following code fragment shows:\n\n```ocaml\nlet main = \n  let open Alda.Source.Utils in\n  expr @@ Parsec.source (chars_of_string \"+1+(-2+-3)\")  \n```\n\n# Why Alda?\n\nSee [Alda](https://www.elfdict.com/wt/250048) definition for more information.\n\n# License \n\nMIT License\n\nCopyright (c) 2023 Didier Plaindoux\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-plaindoux%2Falda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-plaindoux%2Falda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-plaindoux%2Falda/lists"}