{"id":20627579,"url":"https://github.com/lucapolese/laboratorioantlr","last_synced_at":"2026-03-07T21:02:29.945Z","repository":{"id":162953678,"uuid":"364182776","full_name":"LucaPolese/LaboratorioAntlr","owner":"LucaPolese","description":"Secondo Laboratorio del corso: Automi e Linguaggi Formali tenuto dal Prof. Bresolin nell'A.A 2020-2021","archived":false,"fork":false,"pushed_at":"2021-05-09T07:14:57.000Z","size":310,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T04:49:40.942Z","etag":null,"topics":["antlr4","grammar-parser","pascal"],"latest_commit_sha":null,"homepage":"","language":"ANTLR","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/LucaPolese.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}},"created_at":"2021-05-04T08:02:42.000Z","updated_at":"2021-05-09T07:16:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"70810ffb-d1e1-4a3c-a53c-9580ec539b66","html_url":"https://github.com/LucaPolese/LaboratorioAntlr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LucaPolese/LaboratorioAntlr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaPolese%2FLaboratorioAntlr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaPolese%2FLaboratorioAntlr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaPolese%2FLaboratorioAntlr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaPolese%2FLaboratorioAntlr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LucaPolese","download_url":"https://codeload.github.com/LucaPolese/LaboratorioAntlr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaPolese%2FLaboratorioAntlr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30231490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T19:01:10.287Z","status":"ssl_error","status_checked_at":"2026-03-07T18:59:58.103Z","response_time":53,"last_error":"SSL_read: 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":["antlr4","grammar-parser","pascal"],"created_at":"2024-11-16T13:17:28.223Z","updated_at":"2026-03-07T21:02:29.922Z","avatar_url":"https://github.com/LucaPolese.png","language":"ANTLR","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laboratorio 2 - Grammatiche context-free\nIn questo laboratorio è stato richiesto di utilizzare il generatore di parser ANTLR v4 per creare un parser per un frammento del linguaggio di programmazione Pascal. \nLa seguente repository contiene la grammatica che definisce i costrutti di base del Pascal, il codice del syntax checker descritto nel tutorial ed il Makefile per la compilazione. \n\nNel documento laboratorio_02.pdf è disponibile un tutorial che descrive la grammatica, il codice e dà le istruzioni per la compilazione ed esecuzione del syntax checker in ambiente Linux.\n\nL'obiettivo è quello di estendere la grammatica del linguaggio Pascal con le seguenti funzionalità:\n\n- [x] Liste di variabili nelle dichiarazioni dove le istruzioni sono racchiuse tra `repeat` e `until`, senza la necessità di un blocco `begin ... end`\n```pascal\nvar\n    x, y, z: integer;\n    a : integer;\ncicli repeat-until\nrepeat   \n    istruzione1;\n    istruzione2;\n    ...\nuntil guardia;\n``` \n- [x] Estendere costrutto `if-then` con il ramo `else`:\n```pascal\nif guardia then\n  blocco_di_codice\nelse\n  blocco_di_codice;\n```\n- [x] il ramo `else` è opzionale e può essere omesso. `blocco_di_codice` è una singola istruzione oppure un blocco `begin ... end`.\nespressioni aritmetiche che usano gli operatori `+, -, *, /` e `%` (modulo), e le parentesi espressioni booleane complesse che utilizzano gli operatori logici `and, or, not`, e le parentesi\n\n- [x] la procedura `readln(variabile)` che legge un valore intero dallo standard input e lo memorizza in variabile\npermettere alla procedura writeln di scrivere stringhe sullo schermo\n- [x] `writeln ( stringa )` dove stringa è una qualsiasi sequenza di caratteri compresi tra apici `''`\n\nSono disponibili alcuni esempi dei vari costrutti nella directory `tests` da usare per testare la grammatica estesa. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucapolese%2Flaboratorioantlr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucapolese%2Flaboratorioantlr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucapolese%2Flaboratorioantlr/lists"}