{"id":15017428,"url":"https://github.com/xsawyerx/guacamole","last_synced_at":"2025-07-12T15:33:56.787Z","repository":{"id":39632839,"uuid":"63060912","full_name":"xsawyerx/guacamole","owner":"xsawyerx","description":"Guacamole is a parser toolkit for Standard Perl. It provides fully static BNF-based parsing capability to a reasonable subset of Perl.","archived":false,"fork":false,"pushed_at":"2023-06-08T14:40:46.000Z","size":274,"stargazers_count":20,"open_issues_count":15,"forks_count":8,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-09T19:49:16.849Z","etag":null,"topics":["bnf","parser","perl","perl5","static"],"latest_commit_sha":null,"homepage":"https://metacpan.org/pod/Guacamole","language":"Perl","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/xsawyerx.png","metadata":{"files":{"readme":"README.mkdn","changelog":"Changes","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":"2016-07-11T11:05:21.000Z","updated_at":"2022-05-30T13:21:59.000Z","dependencies_parsed_at":"2024-06-21T14:11:19.289Z","dependency_job_id":"3cbe5f90-6dc5-4b45-b0fe-1e7f00ba9182","html_url":"https://github.com/xsawyerx/guacamole","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/xsawyerx/guacamole","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsawyerx%2Fguacamole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsawyerx%2Fguacamole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsawyerx%2Fguacamole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsawyerx%2Fguacamole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xsawyerx","download_url":"https://codeload.github.com/xsawyerx/guacamole/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsawyerx%2Fguacamole/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265013502,"owners_count":23698052,"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":["bnf","parser","perl","perl5","static"],"created_at":"2024-09-24T19:50:27.067Z","updated_at":"2025-07-12T15:33:56.738Z","avatar_url":"https://github.com/xsawyerx.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nGuacamole - A parser toolkit for Standard Perl\n\n# VERSION\n\nversion 0.008\n\n# SYNOPSIS\n\n    use Guacamole;\n    my ($ast) = Guacamole-\u003eparse($string);\n\n# DESCRIPITON\n\n**Guacamole** is a Perl parser toolkit.\n\nIt can:\n\n- Parse Standard Perl\n\n    This is explained in this document.\n\n    For **Standard Perl**, see the next clause.\n\n- Check a file is written in Standard Perl\n\n    This is done by [standard](https://metacpan.org/pod/standard), which is where Standard Perl is described.\n\n- Lint your code\n\n    See [Guacamole::Linter](https://metacpan.org/pod/Guacamole%3A%3ALinter).\n\n- Deparse your code\n\n    See [Guacamole::Deparse](https://metacpan.org/pod/Guacamole%3A%3ADeparse).\n\n- Rewrite your code\n\n    There is a proof-of-concept for this and we hope to provide this as a framework.\n\n# Standard Perl\n\nGuacamole only works on Standard Perl. You can read about it here: [standard](https://metacpan.org/pod/standard).\n\n# Parser\n\n    my ($ast) = Guacamole-\u003eparse($string);\n\nTo parse a string, call [Gaucamole](https://metacpan.org/pod/Gaucamole)'s `parse` method. (This might turn to an\nobject-oriented interface in the future.)\n\nIt returns a list of results. If it ever returns more than one, this is a bug that\nmeans it couldn't ambiguously parse something. This will later be enforced in the\ninterface. The current interface is not official.\n\n## AST Nodes\n\nGuacamole returns an AST with two types of nodes.\n\n    my ($ast) = Guacamole-\u003eparse('$foo = 1');\n\nThe above will generate a larger AST than you imagine (which might be pruned\nin the future). We'll focus on two types of nodes that will appear above.\n\n### Rules\n\nRules are the top level expressions. They include the definitions for rules.\nThey include information on location in the file, length, line, and column.\n\n    $rule = {\n        'children'  =\u003e [...],\n        'column'    =\u003e 2,\n        'length'    =\u003e 3,\n        'line'      =\u003e 1,\n        'name'      =\u003e 'VarIdentExpr',\n        'start_pos' =\u003e 1,\n        'type'      =\u003e 'rule',\n    },\n\nThis rule is a `VarIdentExpr` which is an expression for a variable identity.\n\nIn the code above, it refers to the `foo` in `$foo` - which is the identity\nitself.\n\nIt has one child, described below under `Lexemes`.\n\n### Lexemes\n\nThe child for the `VarIdentExpr` rule should be the value of the identity.\n\n    $lexeme = {\n        'name'  =\u003e '',\n        'type'  =\u003e 'lexeme',\n        'value' =\u003e 'foo',\n    };\n\nThe `name` attribute for all lexemes is empty. This is to make it easy to\nwrite code that checks for the value of a rule without having to check whether\nit's a rule first.\n\n# THANKS\n\n- Damian Conway\n\n    For helping understand what is feasible, what isn't, and why, and for having\n    infinite patience in explaining these.\n\n- Jeffrey Kegler\n\n    For [Marpa](https://metacpan.org/pod/Marpa) and helping understand how to use Marpa better.\n\n- Gonzalo Diethelm\n\n    For continuous feedback and support.\n\n- H. Merijn Brand (@Tux)\n\n    For providing the initial production-level test of Guacamole to\n    help shake many of the bugs in the BNF.\n\n# SEE ALSO\n\n- [standard](https://metacpan.org/pod/standard)\n- [Gaucamole::Linter](https://metacpan.org/pod/Gaucamole%3A%3ALinter)\n- [Guacamole::Deparse](https://metacpan.org/pod/Guacamole%3A%3ADeparse)\n\n# AUTHORS\n\n- Sawyer X\n- Vickenty Fesunov\n\n# COPYRIGHT AND LICENSE\n\nThis software is Copyright (c) 2022 by Sawyer X.\n\nThis is free software, licensed under:\n\n    The MIT (X11) License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxsawyerx%2Fguacamole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxsawyerx%2Fguacamole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxsawyerx%2Fguacamole/lists"}