{"id":36732804,"url":"https://github.com/darylnwk/mathtoken","last_synced_at":"2026-01-12T12:15:16.016Z","repository":{"id":57692518,"uuid":"246530156","full_name":"darylnwk/mathtoken","owner":"darylnwk","description":"Go library for parsing mathematical expression to tokens","archived":false,"fork":false,"pushed_at":"2020-03-12T02:21:14.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-08-07T11:44:48.019Z","etag":null,"topics":["golang","infix-to-postfix","math","postfix-expression"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/darylnwk.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}},"created_at":"2020-03-11T09:36:19.000Z","updated_at":"2022-04-19T13:44:11.000Z","dependencies_parsed_at":"2022-09-26T21:00:58.792Z","dependency_job_id":null,"html_url":"https://github.com/darylnwk/mathtoken","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"purl":"pkg:github/darylnwk/mathtoken","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darylnwk%2Fmathtoken","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darylnwk%2Fmathtoken/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darylnwk%2Fmathtoken/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darylnwk%2Fmathtoken/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darylnwk","download_url":"https://codeload.github.com/darylnwk/mathtoken/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darylnwk%2Fmathtoken/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["golang","infix-to-postfix","math","postfix-expression"],"created_at":"2026-01-12T12:15:15.250Z","updated_at":"2026-01-12T12:15:16.011Z","avatar_url":"https://github.com/darylnwk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mathtoken\n--\n    import \"github.com/darylnwk/mathtoken\"\n\n\n## Usage\n\n#### type Associativity\n\n```go\ntype Associativity uint\n```\n\nAssociativity defines token associativity data type\n\n```go\nconst (\n\t// AssociativityNone defines a token has no associativity\n\tAssociativityNone Associativity = iota\n\t// AssociativityLeft defines a token is left associative\n\tAssociativityLeft\n\t// AssociativityRight defines a token is right associative\n\tAssociativityRight\n)\n```\n\n#### type Token\n\n```go\ntype Token struct {\n\tType          Type\n\tValue         string\n\tAssociativity Associativity\n\tPrecedence    uint\n}\n```\n\nToken defines a mathematical expression token\n\n#### type Tokens\n\n```go\ntype Tokens []Token\n```\n\nTokens defines a list of `Token`\n\n#### func  Parse\n\n```go\nfunc Parse(s string) (tokens Tokens, err error)\n```\nParse mathematical expression in infix format to `Tokens` and returns error if\nunknown token found\n\n#### type Type\n\n```go\ntype Type uint\n```\n\nType defines token type data type\n\n```go\nconst (\n\tTypeUnknown Type = iota\n\tTypeSpace\n\tTypeLParent\n\tTypeRParent\n\tTypeConstant\n\tTypeVariable\n\tTypeOperator\n)\n```\nList of token types\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarylnwk%2Fmathtoken","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarylnwk%2Fmathtoken","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarylnwk%2Fmathtoken/lists"}