{"id":36624110,"url":"https://github.com/kyriosdata/parser","last_synced_at":"2026-01-12T09:29:56.144Z","repository":{"id":44816167,"uuid":"71243814","full_name":"kyriosdata/parser","owner":"kyriosdata","description":"Avaliador de expressões matemáticas em Java","archived":false,"fork":false,"pushed_at":"2022-01-22T17:31:10.000Z","size":117,"stargazers_count":0,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-13T23:03:11.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/kyriosdata.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}},"created_at":"2016-10-18T12:03:45.000Z","updated_at":"2022-08-28T20:24:12.000Z","dependencies_parsed_at":"2022-08-25T12:10:47.832Z","dependency_job_id":null,"html_url":"https://github.com/kyriosdata/parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kyriosdata/parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyriosdata%2Fparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyriosdata%2Fparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyriosdata%2Fparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyriosdata%2Fparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyriosdata","download_url":"https://codeload.github.com/kyriosdata/parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyriosdata%2Fparser/sbom","scorecard":{"id":575689,"data":{"date":"2025-08-11","repo":{"name":"github.com/kyriosdata/parser","commit":"2dc9c33daab6be902ff103a37fe13b4f08878303"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3832-9276-x7gf","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-2f88-5hg8-9x2x","Warn: Project is vulnerable to: GHSA-8vhq-qq4p-grq3","Warn: Project is vulnerable to: GHSA-g6ph-x5wf-g337","Warn: Project is vulnerable to: GHSA-jcwr-x25h-x5fh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T17:38:49.886Z","repository_id":44816167,"created_at":"2025-08-20T17:38:49.886Z","updated_at":"2025-08-20T17:38:49.886Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":"2026-01-12T09:29:56.084Z","updated_at":"2026-01-12T09:29:56.137Z","avatar_url":"https://github.com/kyriosdata.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parser\nAnalisador léxico, sintático e avaliador de expressões matemáticas.\n\n[\u003cimg src=\"https://api.travis-ci.org/kyriosdata/parser.svg?branch=master\"\u003e](https://travis-ci.org/kyriosdata/parser)\n[![Dependency Status](https://www.versioneye.com/user/projects/5816220fd33a7126e32ff001/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/5816220fd33a7126e32ff001)\n[![Coverage Status](https://coveralls.io/repos/github/kyriosdata/parser/badge.svg?branch=master)](https://coveralls.io/github/kyriosdata/parser?branch=master)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1eb0eb949dd14f2bb8b31c56a988350f)](https://www.codacy.com/app/kyriosdata/parser?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=kyriosdata/parser\u0026amp;utm_campaign=Badge_Grade)\n[![Javadocs](http://javadoc.io/badge/com.github.kyriosdata.parser/parser.svg)](http://javadoc.io/doc/com.github.kyriosdata.parser/parser)\n[![Sonarqube](https://sonarqube.com/api/badges/gate?key=com.github.kyriosdata.parser%3Aparser)](https://sonarqube.com/dashboard?id=com.github.kyriosdata.parser%3Aparser)\n\n\u003cbr /\u003e\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"\u003e\u003cimg alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by/4.0/88x31.png\" /\u003e\u003c/a\u003e\u003cbr /\u003eThis work is licensed under a \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"\u003eCreative Commons Attribution 4.0 International License\u003c/a\u003e. \n\u003cbr /\u003eFábio Nogueira de Lucena - Fábrica de Software - Instituto de Informática (UFG).\n\n# Melhorias\n\n- Expressões matemáticas não incluem funções e estão restritas a casos simples. Estender com lexer e parser mais elaborados. Possivelmente fazer uso de [Antlr](https://www.antlr.org/).\n- São interpretadas em tempo de execução, o que reduz o desempenho da execução. Verificar as alternativas:\n  - Usar ASM para gerar em tempo de execução bytecodes a serem executados? (veja [aqui](https://stephenfox.dev/a-language-on-the-jvm)).\n  - Combinar Antlr e LLVM para geração de código executável ([aqui](https://theantlrguy.atlassian.net/wiki/spaces/ANTLR3/pages/2687062/LLVM))\n  - Exemplos de Antlr e LLVM em conjunto: [aqui](https://github.com/AndreaOrru/Lucy) e [aqui](https://github.com/alongubkin/modern)\n  - Usar Antlr com [Javassist](https://www.javassist.org/) ou [ByteBuddy](https://bytebuddy.net).\n\n## Como usar?\n\n### Obtenha a versão mais recente\n\nSeu projeto precisa de uma única dependência, indicada abaixo. \n\n\u003cpre\u003e\n\u0026lt;dependency\u0026gt;\n  \u0026lt;groupId\u0026gt;com.github.kyriosdata.parser\u0026lt;/groupId\u0026gt;\n  \u0026lt;artifactId\u0026gt;parser\u0026lt;/artifactId\u0026gt;\n  \u0026lt;version\u0026gt;1.0.2\u0026lt;/version\u0026gt;\n\u0026lt;/dependency\u0026gt;\n\u003c/pre\u003e\n\n### Avaliação de uma expressão\nO _parser_ é o principal componente da biblioteca. Ele recebe uma sequência de _tokens_ produzida pelo _lexer_ e produz como saída uma expressão, que pode ser avaliada conforme ilustrado abaixo.\n\n\u003cpre\u003e\nList\u0026lt;Token\u0026gt; tokens = new Lexer(\"2.3 * 10\").tokenize();\nParser parser = new Parser(tokens);\nfloat resultado = parser.expressao().valor(); // 23.0\n\u003c/pre\u003e\n\nExpressões podem conter variáveis e, nesse caso, valores a serem utilizados devem ser fornecidos. Caso contrário, o valor 0f é assumido.\n\n\u003cpre\u003e\nMap\u0026lt;String, Float\u0026gt; ctx = new HashMap\u0026lt;\u0026gt;();\nctx.put(\"a\", 10);\n\nList\u0026lt;Token\u0026gt; tokens = new Lexer(\"2.3 * a\").tokenize();\nParser parser = new Parser(tokens);\nfloat resultado = parser.expressao().valor(ctx); // 23.0\n\u003c/pre\u003e\n\n## Especificação das expressões\n\nExpressões admitidas incluem o uso de constantes, variáveis (sequências iniciadas por caractere, seguidas ou não de dígitos e abre/fecha parênteses. Os operadores incluem soma, subtração, multiplicação e divisão. Uma expressão também pode ser uma condição e, nesse caso, os operadores são E, OU e igualdade. As expressões lógicas produzem o valor 0 (caso verdadeira) ou diferente de zero (caso falsa). Alguns exemplos são ilustrados abaixo.\n\n- a + b * (x - y)\n- x\n- 10.2\n- a*(b - (c * d))\n- feriado \u0026 comDinheiroNoBolso\n- feliz | vitoriaDoTimao\n- (5 - 3) = (10 / 5)\n\n## Expressões consideradas inválidas\nNão é permitido o emprego de mais de um operador sem uso de parênteses, conforme ilustrado abaixo.\n\n- 10 - 9 - 8\n- 2 + 3 + 4\n\n***\n\n### Referências, links\n- [MathParser](http://mathparser.org) é uma inspiração para a presente biblioteca. Contudo, com recursos mais elaborados do que aqueles estabelecidos para o presente projeto. \n- [exp4j](https://lallafa.objecthunter.net/exp4j/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyriosdata%2Fparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyriosdata%2Fparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyriosdata%2Fparser/lists"}