{"id":16338988,"url":"https://github.com/phadej/mixfix","last_synced_at":"2025-04-11T02:30:38.140Z","repository":{"id":23636113,"uuid":"27006003","full_name":"phadej/mixfix","owner":"phadej","description":"Mixfix espression parser","archived":false,"fork":false,"pushed_at":"2015-01-07T15:19:27.000Z","size":364,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T07:51:07.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/phadej.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-22T17:12:52.000Z","updated_at":"2024-09-25T09:16:30.000Z","dependencies_parsed_at":"2022-08-21T20:20:16.421Z","dependency_job_id":null,"html_url":"https://github.com/phadej/mixfix","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phadej%2Fmixfix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phadej%2Fmixfix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phadej%2Fmixfix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phadej%2Fmixfix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phadej","download_url":"https://codeload.github.com/phadej/mixfix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248329500,"owners_count":21085543,"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":[],"created_at":"2024-10-10T23:53:14.667Z","updated_at":"2025-04-11T02:30:37.804Z","avatar_url":"https://github.com/phadej.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mixfix\n\n\u003e mixfix expression parser\n\n[![Build Status](https://secure.travis-ci.org/phadej/mixfix.svg?branch=master)](http://travis-ci.org/phadej/mixfix)\n[![NPM version](https://badge.fury.io/js/mixfix.svg)](http://badge.fury.io/js/mixfix)\n[![Dependency Status](https://david-dm.org/phadej/mixfix.svg)](https://david-dm.org/phadej/mixfix)\n[![devDependency Status](https://david-dm.org/phadej/mixfix/dev-status.svg)](https://david-dm.org/phadej/mixfix#info=devDependencies)\n[![Code Climate](https://img.shields.io/codeclimate/github/phadej/mixfix.svg)](https://codeclimate.com/github/phadej/mixfix)\n\n[Based on: Parsing Mixfix Operators](http://link.springer.com/chapter/10.1007%2F978-3-642-24452-0_5)\n\n## parser\n\n\u003e *Parser a = List token → Error ∨ NonEmptyList (a × List token)*\n\nParsers are functions taking list of tokens and returning either error or possible parse results.\nIn actual implementation `List token` is represented by an array of tokens and an index into it.\n\n- `parser.parse(@: Parser a, tokens: List token): a`\n\n    Parse `tokens`. Returns first parse result.\n\n- `parser.map(@: Parser a, f: a -\u003e b): Parser b`\n\n- `parser.uniq(@: Parser a): Parser a`\n\n- `parser.satisfy(@: Parser a, predicate: a -\u003e Boolean): Parser a`\n\n- `parser.end(@: Parser a): Parser a`\n\n- `parser.many(@: Parser a): Parser (Array a)`\n\n- `parser.some(@: Parser a): Parser (Array a)`\n\n- `parser.left(@: Parser a, other: Parser b): Parser a`\n\n- `parser.right(@: Parser a, other: Parser b): Parser b`\n\n- `pure(x: a): Parser a`\n\n- `fail(error: Err): Parser a`\n\n- `any: Parser a`\n\n- `combine(p: Parser a..., f: a... -\u003e b): Parser b`\n\n- `choice(p: Parser a | List (Parser a)...): Parser a`\n\n- `lazy(f: =\u003e Parser a): Parser a`\n\n## lexer\n\nA very simple lexer.\n\n- `lexer.create(specification: List (String | RegExp)): String -\u003e List String`\n\n    Creates a tokenizer function.\n\n## Release History\n\n- **0.0.2** \u0026mdash; *2015-01-07* \u0026mdash; Simple lexer\n- **0.0.1** \u0026mdash; *2014-11-23* \u0026mdash; Parser combinators\n\n## Contributing\n\n- `README.md` is generated from the source with [ljs](https://github.com/phadej/ljs)\n- Before creating a pull request run `make test`, yet travis will do it for you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphadej%2Fmixfix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphadej%2Fmixfix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphadej%2Fmixfix/lists"}