{"id":23161106,"url":"https://github.com/ggomez0/compilador","last_synced_at":"2025-06-19T04:41:02.054Z","repository":{"id":268279220,"uuid":"893282055","full_name":"ggomez0/Compilador","owner":"ggomez0","description":"Compilador con analisis Lexico y sintactico","archived":false,"fork":false,"pushed_at":"2024-12-15T18:07:26.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T19:28:21.813Z","etag":null,"topics":["lexer","parser","plx"],"latest_commit_sha":null,"homepage":"https://compilador.ggomez.tech/","language":"Python","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/ggomez0.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":"2024-11-24T02:27:23.000Z","updated_at":"2024-12-15T18:10:34.000Z","dependencies_parsed_at":"2024-12-15T19:18:22.883Z","dependency_job_id":"4f891dff-5ae9-429b-a584-90624995e367","html_url":"https://github.com/ggomez0/Compilador","commit_stats":null,"previous_names":["ggomez0/compilador"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ggomez0/Compilador","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggomez0%2FCompilador","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggomez0%2FCompilador/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggomez0%2FCompilador/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggomez0%2FCompilador/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggomez0","download_url":"https://codeload.github.com/ggomez0/Compilador/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggomez0%2FCompilador/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260690142,"owners_count":23047054,"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":["lexer","parser","plx"],"created_at":"2024-12-17T23:13:20.876Z","updated_at":"2025-06-19T04:40:57.039Z","avatar_url":"https://github.com/ggomez0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Estructura del Lenguaje\n\n### Principio y Fin\nEl programa comienza con la palabra reservada `EMPEZAR` y termina con `TERMINAR`.\n\n### Carácter de Fin de Línea\nCada línea de este lenguaje finaliza con el carácter `.`\n\n### Librerías Externas\nEste lenguaje permite incluir librerías externas. Se deben definir al inicio del archivo siguiendo la estructura:\n\n```\nextend(\"nombreDeLibreria.Extension\")\n```\n\nSe pueden incluir varias librerías separadas por `;`.\n\n### Tipos de Datos Admitidos\nSolo se admiten los siguientes tipos de datos:\n- **entero** (`int`)\n- **texto** (`String`)\n- **decimal** (`float`)\n- **lógico** (`bool`)\n\n### Definir Variables\nPara definir variables se utiliza la estructura:\n\n```\nDEF tipo1 nombre1 := valor1\n```\n\nDonde `tipo` puede ser alguno de los tipos admitidos.\n\n### Asignación de Valores\nPara asignar valores a una variable se utiliza el símbolo `:=` seguido por una variable o un valor de alguno de los tipos admitidos.\n\n### Funciones y Procedimientos\n- Las funciones tienen la forma:\n\n```\nnombre(tipo1 arg1; tipo2 arg2; …; tipon argn) retorno.\n```\n\n- En el caso de los procedimientos:\n\n```\nnombre(tipo1 arg1; tipo2 arg2; …; tipon argn).\n```\n\n- El procedimiento que se utiliza para definir los pines es:\n\n```\nDEF PIN(tipo:número)\n```\n\nDonde `numero` indica el PIN que se va a utilizar y `tipo` puede ser:\n- `PINOU`: salida\n- `PININ`: entrada\n\n### Comentarios\n- Los comentarios de línea se inician con `/*`.\n- Los comentarios de bloque se encierran entre `//*` y `*//`.\n\n### Estructuras de Control\nEste lenguaje admite las siguientes estructuras de control:\n\n- **Condicional IF**:\n  - `IF (condición) {}`\n  - `IF (condición) {} ELSE {}`\n- **Bucle WHILE**:\n  - `WHILE (condición) {}`\n\n### Palabras Reservadas y Funciones Predefinidas\nLas palabras reservadas deben escribirse en **MAYÚSCULAS**. Además de las palabras mencionadas anteriormente, otras palabras reservadas son:\n\n- **ADEL()**: El robot avanza.\n- **ATR()**: El robot retrocede.\n- **IZQ()**: El robot gira en sentido antihorario.\n- **DER()**: El robot gira en sentido horario.\n- **ESP(tiempo)**: El robot espera un tiempo determinado.\n- **FREN()**: El robot se detiene.\n\n\n## Ejemplo\n\n## Pseudocódigo (lengFuente.txt)\n```txt\nEMPEZAR\nextend(\"nombreDeLibreria.Extension;servo.h\").\nDEF entero MD1.\nDEF entero MD2:=3./*INICIO DE LA SECCION SETUP\nDEF PIN(PININ:MD1).\nDEF PIN(PINOU:MD2).\n/*FIN DE LA SECCION LOOP\nADEL().\nESP(10).\nIZQ().\nFREN().\nTERMINAR\n```\n\n## Resultado (Salida.ino)\n```cpp\n#include \u003cnombreDeLibreria.Extension\u003e\n#include \u003cservo.h\u003e\n\nint MD1;\nint MD2 = 3;\n\nvoid setup() {\n    pinMode(MD1, INPUT);\n    pinMode(MD2, OUTPUT);\n}\n\nvoid loop() {\n    avanzar();\n    esperar(10);\n    giro_izquierda();\n    parar();\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggomez0%2Fcompilador","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggomez0%2Fcompilador","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggomez0%2Fcompilador/lists"}