{"id":24375869,"url":"https://github.com/csvancea/prefix-ast","last_synced_at":"2026-04-13T11:32:00.650Z","repository":{"id":130856222,"uuid":"342624084","full_name":"csvancea/Prefix-AST","owner":"csvancea","description":"Arithmetic expression evaluator written in x86 assembly.","archived":false,"fork":false,"pushed_at":"2021-02-26T16:13:44.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-27T21:53:07.884Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csvancea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-26T15:51:41.000Z","updated_at":"2021-02-26T17:18:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"2401e49d-9512-4c28-ac67-f92bd2903623","html_url":"https://github.com/csvancea/Prefix-AST","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/csvancea/Prefix-AST","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csvancea%2FPrefix-AST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csvancea%2FPrefix-AST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csvancea%2FPrefix-AST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csvancea%2FPrefix-AST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csvancea","download_url":"https://codeload.github.com/csvancea/Prefix-AST/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csvancea%2FPrefix-AST/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31751290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2025-01-19T05:58:29.420Z","updated_at":"2026-04-13T11:32:00.644Z","avatar_url":"https://github.com/csvancea.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tema 1 - Prefix AST\n\n\n### Idee de rezolvare:\n- Ideea principala pe care se bazeaza rezolvarea este parcurgerea recursiva\n  postordine a arborelui returnat de `getAST()`, astfel ca pentru fiecare nod\n  voi parcurge subarborii stang si drept (cat timp acestia exista), iar la\n  intoarcerea din apelurile recursive voi aplica operatia specificata de nodul\n  curent pe cele doua rezultate corespunzatoare celor doi subarbori.\n- O implementare in pseudocod ar fi urmatoarea:\n\n```cpp\nint FUNC_PostOrder(Node *root) {\n  if (isLeaf(root))\n    return root-\u003edata;\n\n  op = root-\u003edata;\n  l = FUNC_PostOrder(root-\u003eleft);\n  r = FUNC_PostOrder(root-\u003eright);\n  \n  return FUNC_CalculateOperation(op, l, r);\n}\n```\n\n### Helpers:\n- In rezolvarea temei am definit structura `Node` pentru a lucra mai intuitiv\n  cu offset-urile datelor cuprinse intr-un nod.\n- Pentru a nu aglomera codul, am definit urmatoarele proceduri ajutatoare:\n  - `FUNC_CalculateOperation(char op, int operand_1, int operand_2)`\n    - procedura aplica operatia specificata de `op` celor doi operanzi\n    - operatiile valide sunt: + - * /\n    - rezultatul operatiilor trebuie sa poata fi stocat pe 32 biti (inmultire)\n  - `FUNC_StringToInt(const char *string)`\n    - procedura are ca rol transformarea unui intreg dat ca sir de caractere\n      in integer\n    - nu se fac verificari de corectitudine a sirului de intrare\n    - un sir poate contine doar cifre si poate sa inceapa cu caracterul '-'\n    - orice alt input duce la undefined behaviour\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsvancea%2Fprefix-ast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsvancea%2Fprefix-ast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsvancea%2Fprefix-ast/lists"}