{"id":15676821,"url":"https://github.com/mistermboy/pycompiler","last_synced_at":"2025-05-07T00:29:03.747Z","repository":{"id":133915726,"uuid":"119805372","full_name":"mistermboy/pyCompiler","owner":"mistermboy","description":"Python Compiler","archived":false,"fork":false,"pushed_at":"2020-06-10T09:56:14.000Z","size":4564,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T04:32:23.743Z","etag":null,"topics":["compiler","compiler-design","compilers","design","java","lex","parser","python","uniovi","university","visitor","visitor-pattern","yacc"],"latest_commit_sha":null,"homepage":"","language":"Java","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/mistermboy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-01T08:20:48.000Z","updated_at":"2024-12-19T10:47:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"1d2baeca-005d-455a-b19f-fc3db40f90fb","html_url":"https://github.com/mistermboy/pyCompiler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistermboy%2FpyCompiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistermboy%2FpyCompiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistermboy%2FpyCompiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistermboy%2FpyCompiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mistermboy","download_url":"https://codeload.github.com/mistermboy/pyCompiler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252790401,"owners_count":21804590,"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":["compiler","compiler-design","compilers","design","java","lex","parser","python","uniovi","university","visitor","visitor-pattern","yacc"],"created_at":"2024-10-03T16:05:45.213Z","updated_at":"2025-05-07T00:29:03.717Z","avatar_url":"https://github.com/mistermboy.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PYCompiler :eyes:\nPYCompiler is a compiler for a simple version of python that was develop in the subject \"Programming Languaje Design\" at Univeristy of Oviedo (uniovi)\n\n## Getting Started :rocket:\nTo begin with the project, clone the repository in your own computer. To do so, you can use this command:\n\n```\ngit clone https://github.com/mistermboy/PYCompiler.git;\n```\n\nAlternative, you can download the repository as a zip file from the [repository main page](https://github.com/mistermboy/PYCompiler).\n\nOnce you have the repository, import the project in [eclipse](https://www.eclipse.org/).\n\n```\n-\u003e File \n  -\u003e Import\n    -\u003e General \n      -\u003e Existing Projects into Workspace...\n```\n\n### Using PYCompyler :checkered_flag:\nTo use PYCompyler there are two alternatives, you can write your own program ([View the syntax](docs/syntax.md)) ([Ver la sintaxis](docs/sintaxis.md)) or use an example one.\nI recommend you the second option, if it´s your first time. There are a few example programs in the folder called \"program4Test\".\n\nOnce you've chosen an option, you only have to run the main class, that is located in the \"py\" package, passing the name of the input and the output file as a parameters. Here is a example with the program \"big.input.txt\", that calculates the Fibonacci sequence.\n\n```\n-\u003e Run as \n  -\u003e Run configurations\n    -\u003e Java Application  \n      -\u003e Arguments \n        -\u003e programs4Test/big.input.txt output.txt\n```\nNow you'll see the instrospector window, that shows a general view of the AST (Abstract Syntax Tree) built by the compiler. You can take a look if you want but it´s not necesary.\n\nClose the introspector window and check the output file. You should see the instructions of the program you passed written in a language like assembler.\n\n#### MAPL :wrench:\nAt this point we need to use some tool that is able to interpret the instructions. That tool is MAPL. \n\nExecute \"MAPL.cmd\".\n```\nLocation -\u003e PYCompiler\\MAPL.cmd\n```\nBy default, MAPL load the \"output.txt\" file but you can chose other in \"File -\u003e Open...\"\n\nUsing MAPL is very simple. At the left of the window we have the instructions of the program loaded and the buttons to run, debugg, reload... In the middle the static memory and finally in the rigth, the stack memory. Also there is an small terminal at bottom left.\n\nTo end with the example, run the program by clicking in the green arrow and look what happends. You should see the Fibonacci sequence calculated in the terminal. :computer:\n\n## Development :construction: ⚙️\nNow you will learn how the project is composed:\n\n* [Lexical paterns](docs/PatronesLexicos.md)\n* [GLC (context-free grammar)](docs/GLC.md)\n* [Abstract grammar](docs/GramaticaAbstracta.md)\n* [Code templates](docs/PlantillasCodigo.md)\n* [UML](docs/UML.png)\n\n## Built With 🛠️\n* [Java](https://www.java.com/es/download/)\n* [JFlex](http://jflex.de/)\n* [Byaccj](http://byaccj.sourceforge.net/)\n\n## License :clipboard:\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmistermboy%2Fpycompiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmistermboy%2Fpycompiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmistermboy%2Fpycompiler/lists"}