{"id":28217060,"url":"https://github.com/eeriemyxi/c-rpn-eval","last_synced_at":"2025-06-28T07:34:46.857Z","repository":{"id":286338340,"uuid":"961113800","full_name":"eeriemyxi/c-rpn-eval","owner":"eeriemyxi","description":"C program that can evaluate postfix arithmetic expressions (Reverse Polish Notation).","archived":false,"fork":false,"pushed_at":"2025-04-06T07:48:02.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T12:47:52.978Z","etag":null,"topics":["c","evaluator","parser","postfix","rpn"],"latest_commit_sha":null,"homepage":"","language":"C","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/eeriemyxi.png","metadata":{"files":{"readme":"README","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":"2025-04-05T19:29:29.000Z","updated_at":"2025-04-06T07:48:05.000Z","dependencies_parsed_at":"2025-04-05T20:38:03.341Z","dependency_job_id":null,"html_url":"https://github.com/eeriemyxi/c-rpn-eval","commit_stats":null,"previous_names":["eeriemyxi/c-rpn-eval"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eeriemyxi/c-rpn-eval","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeriemyxi%2Fc-rpn-eval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeriemyxi%2Fc-rpn-eval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeriemyxi%2Fc-rpn-eval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeriemyxi%2Fc-rpn-eval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eeriemyxi","download_url":"https://codeload.github.com/eeriemyxi/c-rpn-eval/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeriemyxi%2Fc-rpn-eval/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262393050,"owners_count":23304039,"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":["c","evaluator","parser","postfix","rpn"],"created_at":"2025-05-18T00:11:11.266Z","updated_at":"2025-06-28T07:34:46.851Z","avatar_url":"https://github.com/eeriemyxi.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"C-RPN-EVAL\n\n    This program can evaluate postfix arithmetic expressions (Reverse Polish\n    Notation).\n\n    CAUTION: The program is actively under development as of right now. Do not\n             expect it to be finished, or to work.\n\nHOW TO RUN\n\n    user:~$ git clone --depth 1 https://github.com/eeriemyxi/c-rpn-eval\n    user:~$ cd c-rpn-eval\n    user:~$ cc -o rpn src/main.c\n    user:~$ ./rpn \"1 2 +\"\n\nNOTES\n\n    If RPN expression is \"a b c + d e * * f g - / + h g ^ -\",\n    \n       ALGORITHM\n\n           * Have a stack for storing tokens.\n           \n           [ a b c + d e * * f g - / + h g ^ - ]\n           * See a, add to stack\n           * See b, add to stack\n           * See c, add to stack\n\n           [ a (b c +) d e * * f g - / + h g ^ - ]\n           * See +, pop last two numbers, a and b, then evaluate -\u003e a + b (k), and add k to stack\n           * See d, add to stack\n           * See e, add to stack\n\n           [ a k (d e *) * f g - / + h g ^ - ]\n           * See *, evaluate d * e (l), add l to stack\n\n           [ a (k l *) f g - / + h g ^ - ]\n           * See *, evaluate k * l (m), add m to stack\n           * See f, add to stack\n           * See g, add to stack\n\n           [ a m (f g -) / + h g ^ - ]\n           * See -, evaluate f - g (n), add n to stack.\n\n           [ a (m n /) + h g ^ - ]\n           * See /, evaluate m / n (o), add o to stack.\n\n           [ (a o +) h g ^ - ]\n           * See +, evaluate a + o (p), add p to stack.\n\n           [ p h g ^ - ]\n           * See h, add to stack\n           * See g, add to stack\n\n           [ p (h g ^) - ]\n           * See ^, evaluate h^g (q), add q to stack.\n\n           [ (p q -) ]\n           * See -, evaluate p - q (r), add r to stack.\n\n           [ r ]\n\n               RESULT\n               \n                   The expression evaluated to r.\n\nAST\n\n    FUNCTIONS\n    \n        I = INTEGER\n        B = BINARY OP\n\n    PROCEDURE\n    \n        2 1 2 * 3 4 * - -         || []\n    \n        2 (1 2 *) 3 4 * - -       || [B(I(1) I(2) *)]\n    \n        2 (1 2 *) (3 4 *) - -     || [B(I(1) I(2) *), B(I(3) I(4) *)]\n    \n        2 ((1 2 *) (3 4 *) -) -   || [B((I(1) I(2) *) (I(3) I(4) *) -)]\n    \n        (2 ((1 2 *) (3 4 *) -) -) || [B(I(2) B((I(1) I(2) *) (I(3) I(4) *) -) -)]\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feeriemyxi%2Fc-rpn-eval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feeriemyxi%2Fc-rpn-eval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feeriemyxi%2Fc-rpn-eval/lists"}