{"_id":"@adaycuestacorrea/lexer-generator-solution","name":"@adaycuestacorrea/lexer-generator-solution","dist-tags":{"latest":"4.2.2"},"versions":{"4.2.2":{"name":"@adaycuestacorrea/lexer-generator-solution","version":"4.2.2","description":"A package that can generate basic lexical analyzers","main":"src/main.js","scripts":{"test":"jest --coverage","doc":"jsdoc -c jsdoc.config.js -r -d docs/Documentation","nearley":"nearleyc test/test-grammar.ne -o test/test-grammar.js","test-nearley":"npm run nearley && node test/check-nearley.js","egg":"nearleyc test/egg/egg.ne -o test/egg/grammar.js","test-egg":"node test/egg/eggc.js test/egg/array.egg; evm test/egg/array.json"},"repository":{"type":"git","url":"git+https://github.com/ULL-ESIT-PL-2324/lexer-generator-aday-cuesta-correa-alu0101483887.git"},"keywords":["ULL","PL","Lexer"],"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/ULL-ESIT-PL/lexer-generator-solution/issues"},"homepage":"https://github.com/ULL-ESIT-PL/lexer-generator-solution#readme","devDependencies":{"@crguezl/eloquentjsegg":"^1.2.6","@types/jest":"^26.0.22","documentation":"^14.0.3","eslint":"^7.23.0","eslint-config-google":"^0.14.0","jest":"^26.6.3","nearley":"^2.20.1"},"dependencies":{"nyc":"^15.1.0"},"_id":"@adaycuestacorrea/lexer-generator-solution@4.2.2","gitHead":"cd9b12bde63cd59378b056d79295c3622fb865f6","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-htoAxs7vrKL/uOCMz3J3sGtSHsFLCSNEIiqq1DFxOab6B9q6ov6NKpEkTZwt5rvciOCWq+VKcVd3qzKzaxLd+w==","shasum":"d5c4eb2b6a08e632e57f01d2583e160bd12424a1","tarball":"https://registry.npmjs.org/@adaycuestacorrea/lexer-generator-solution/-/lexer-generator-solution-4.2.2.tgz","fileCount":92,"unpackedSize":1223491,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDy0qqwSghHIc2Rr3fc/acs4VhJW2stf5K1/JgCfNkDpwIgE0E/DHqZ/jn6UARq9OCFHSU2O585veUB0loqbgFj1X4="}]},"_npmUser":{"name":"adaycuestacorrea","email":"alu0101483887@ull.edu.es"},"directories":{},"maintainers":[{"name":"adaycuestacorrea","email":"alu0101483887@ull.edu.es"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lexer-generator-solution_4.2.2_1712089315929_0.9670078549408929"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-02T20:21:55.822Z","4.2.2":"2024-04-02T20:21:56.207Z","modified":"2024-04-02T20:21:56.477Z"},"maintainers":[{"name":"adaycuestacorrea","email":"alu0101483887@ull.edu.es"}],"description":"A package that can generate basic lexical analyzers","homepage":"https://github.com/ULL-ESIT-PL/lexer-generator-solution#readme","keywords":["ULL","PL","Lexer"],"repository":{"type":"git","url":"git+https://github.com/ULL-ESIT-PL-2324/lexer-generator-aday-cuesta-correa-alu0101483887.git"},"bugs":{"url":"https://github.com/ULL-ESIT-PL/lexer-generator-solution/issues"},"readme":"# Lexer Generator Lab\n\n- Author: Aday Cuesta Correa\n- Email: alu0101483887@ull.edu.es\n- npm i @adaycuestacorrea/lexer-generator-solution\n\n<https://ull-esit-gradoii-pl.github.io/practicas/lexer-generator.html>\n\n# Rúbrica\n\n### **El paquete está publicado en GitHub Registry y se instala correctamente**\n\n\n### **El módulo exporta los generadores léxicos y funcionan correctamente**\n![lex](images/lex.png)\n\n### **El manejo de errores con el token ERROR es correcto**\n![error](images/error.png)\n\n### **Manejo de \"tokens skip\"**\n```js\nif (!validTokens.get(type).skip) {\n  let value = match.groups[type];\n  if (validTokens.get(type).value) value = validTokens.get(type).value(value);\n  result.push({type, value, line, col, length: regexp.lastIndex - start});\n}\n```\n\n### **Contiene tests comprobando el atributo de transformación value**\n```js\ntest('Assignment to string', () => {\n  const str = 'const varName = \"value\"';\n  const result = lexer(str);\n  const expected = [\n    {\n      type: 'RESERVEDWORD',\n      value: 'const',\n      col: 1,\n      line: 1,\n      length: 5,\n    },\n    {\n      type: 'ID',\n      value: 'varName',\n      col: 7,\n      line: 1,\n      length: 7,\n    },\n    {\n      type: 'OP',\n      value: '=',\n      col: 15,\n      line: 1,\n      length: 1,\n    },\n    {\n      type: 'STRING',\n      value: '\"value\"',\n      col: 17,\n      line: 1,\n      length: 7,\n    },\n  ];\n  expect(result).toEqual(expected);\n});\n```\n\n### **Contiene tests comprobando la compatibilidad del lexer generado con Nearley.JS (egg-parser)**\n![compatibility](images/compatibility.png)\n\n### **Estudio de covering**\n![cov](images/cov.png)\n\n### **Se ha hecho CI con GitHub Actions**\n![actions](images/actions.png)\n\n### **Publicar la documentación de la API usando GitHub Pages en la carpeta docs/**\n![doc](images/doc.png)\n\n### **GitHub Page**\n\n[Link a la page para ver el coverage](https://ull-esit-pl-2324.github.io/lexer-generator-aday-cuesta-correa-alu0101483887/)","readmeFilename":"README.md"}