{"id":17918907,"url":"https://github.com/xuri/nfp","last_synced_at":"2025-04-05T09:05:50.807Z","repository":{"id":57655174,"uuid":"455620751","full_name":"xuri/nfp","owner":"xuri","description":"Go Language Microsoft Excel™ Number Format Parser","archived":false,"fork":false,"pushed_at":"2025-02-26T14:58:37.000Z","size":56,"stargazers_count":19,"open_issues_count":0,"forks_count":11,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-29T08:04:52.643Z","etag":null,"topics":["ast","ecma-376","excel","excelize","go","golang","lexer","number-format","number-formating","parser","spreadsheet"],"latest_commit_sha":null,"homepage":"https://xuri.me/excelize","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xuri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"xuri","patreon":"xuri","ko_fi":"xurime","liberapay":"xuri","issuehunt":"xuri","custom":"https://www.paypal.com/paypalme/xuri"}},"created_at":"2022-02-04T16:36:43.000Z","updated_at":"2025-03-12T05:47:06.000Z","dependencies_parsed_at":"2025-02-12T08:10:12.384Z","dependency_job_id":"a698b45d-4c9f-49c2-9018-fca883e78679","html_url":"https://github.com/xuri/nfp","commit_stats":{"total_commits":15,"total_committers":7,"mean_commits":2.142857142857143,"dds":0.4,"last_synced_commit":"d98342af3f055baedccc383e578a14685cdfed74"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuri%2Fnfp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuri%2Fnfp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuri%2Fnfp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuri%2Fnfp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xuri","download_url":"https://codeload.github.com/xuri/nfp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312077,"owners_count":20918344,"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":["ast","ecma-376","excel","excelize","go","golang","lexer","number-format","number-formating","parser","spreadsheet"],"created_at":"2024-10-28T20:13:22.856Z","updated_at":"2025-04-05T09:05:50.781Z","avatar_url":"https://github.com/xuri.png","language":"Go","readme":"# NFP (Number Format Parser)\n\n[![Build Status](https://github.com/xuri/nfp/workflows/Go/badge.svg)](https://github.com/xuri/nfp/actions?workflow=Go)\n[![Code Coverage](https://codecov.io/gh/xuri/nfp/branch/main/graph/badge.svg)](https://codecov.io/gh/xuri/nfp)\n[![Go Report Card](https://goreportcard.com/badge/github.com/xuri/nfp)](https://goreportcard.com/report/github.com/xuri/nfp)\n[![go.dev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/xuri/nfp)\n[![Licenses](https://img.shields.io/badge/license-bsd-orange.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\nUsing NFP (Number Format Parser) you can get an Abstract Syntax Tree (AST) from Excel number format expression.\n\n## Installation\n\n```bash\ngo get github.com/xuri/nfp\n```\n\n## Example\n\n```go\npackage main\n\nimport \"github.com/xuri/nfp\"\n\nfunc main() {\n    ps := nfp.NumberFormatParser()\n    tokens := ps.Parse(\"_(* #,##0.00_);_(* (#,##0.00);_(* \\\"-\\\"??_);_(@_)\")\n    println(p.PrettyPrint())\n}\n```\n\nGet AST\n\n```text\n\u003cPositive\u003e\n      \u003cRepeatsChar\u003e\n    # \u003cHashPlaceHolder\u003e\n    \u003cThousandsSeparator\u003e\n    ## \u003cHashPlaceHolder\u003e\n    0 \u003cZeroPlaceHolder\u003e\n    . \u003cDecimalPoint\u003e\n    00 \u003cZeroPlaceHolder\u003e\n\u003cNegative\u003e\n      \u003cRepeatsChar\u003e\n    ( \u003cLiteral\u003e\n    # \u003cHashPlaceHolder\u003e\n    , \u003cThousandsSeparator\u003e\n    ## \u003cHashPlaceHolder\u003e\n    0 \u003cZeroPlaceHolder\u003e\n    . \u003cDecimalPoint\u003e\n    00 \u003cZeroPlaceHolder\u003e\n    ) \u003cLiteral\u003e\n\u003cZero\u003e\n      \u003cRepeatsChar\u003e\n    - \u003cLiteral\u003e\n    ?? \u003cDigitalPlaceHolder\u003e\n\u003cText\u003e\n    @ \u003cTextPlaceHolder\u003e\n```\n\n## Contributing\n\nContributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change.\n\n## Licenses\n\nThis program is under the terms of the BSD 3-Clause License. See [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause).\n","funding_links":["https://github.com/sponsors/xuri","https://patreon.com/xuri","https://ko-fi.com/xurime","https://liberapay.com/xuri","https://issuehunt.io/r/xuri","https://www.paypal.com/paypalme/xuri"],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuri%2Fnfp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuri%2Fnfp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuri%2Fnfp/lists"}