{"id":20554052,"url":"https://github.com/vasilescur/pfl","last_synced_at":"2026-06-06T10:31:52.298Z","repository":{"id":115938511,"uuid":"131152437","full_name":"vasilescur/pfl","owner":"vasilescur","description":"The reference interpreter for Procedural Footnote Language.","archived":false,"fork":false,"pushed_at":"2019-03-04T23:42:20.000Z","size":366,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-06T06:24:30.230Z","etag":null,"topics":["dart","footnotes","interpreter","language"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vasilescur.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2018-04-26T12:28:18.000Z","updated_at":"2021-09-10T08:17:30.000Z","dependencies_parsed_at":"2023-04-04T12:16:25.316Z","dependency_job_id":null,"html_url":"https://github.com/vasilescur/pfl","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/vasilescur/pfl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilescur%2Fpfl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilescur%2Fpfl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilescur%2Fpfl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilescur%2Fpfl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vasilescur","download_url":"https://codeload.github.com/vasilescur/pfl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilescur%2Fpfl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33979274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-06T02:00:07.033Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["dart","footnotes","interpreter","language"],"created_at":"2024-11-16T02:46:11.563Z","updated_at":"2026-06-06T10:31:52.276Z","avatar_url":"https://github.com/vasilescur.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Procedural Footnote Language\n\nAn interpreter for [Procedural Footnote Language](https://github.com/vasilescur/pfl/wiki/Procedural-Footnote-Language-Specification), written in [Dart](https://www.dartlang.org/).\n\nPlease note that this project is still work-in-progress and some features may not work as expected.\n\n## Getting Started\n\nTo get started with Procedural Footnote Language, first read the [language specification](https://github.com/vasilescur/pfl/wiki/Procedural-Footnote-Language-Specification).\n\n### Installing\n\nDownload the latest stable release of the PFL interpreter from the [Releases section](https://github.com/vasilescur/pfl/releases). Place the `pfl.exe` in a folder added to your `PATH`.\n\n**Important:** The PFL interpreter is currently only available for Windows, and is packaged using [dartbin](https://github.com/filiph/dartbin).\n\n### Usage\n\nTo run a PFL program, execute the following command:\n\n```bash\npfl filename.pfl\n```\n\n## How it Works\n\nThe interpeter uses a loose interpretation of an abstract syntax tree to evaluate the final result of the document.\n\nThere is a class heirarchy of elements, each with an overriden `evaluate` method that, by default, evaluates all its children,\nconcatenates the results, and returns:\n\n```dart\n/// Represents one node in the abstract syntax tree.\nclass Element {\n    List\u003cElement\u003e children = new List\u003cElement\u003e();\n\n    String evaluate() {\n        String result = '';\n\n        for (var child in children) {\n            result += child.evaluate();\n        }\n\n        return result;\n    }\n}\n```\n\nTherefore, since the root document is also one of these nodes, evaluation of the entire document is as simple as calling `evaluate` on the root document.\n\n## Sample PFL Programs\n\n#### Simple \"Hello, world!\"\n\n```\n[1]\n[PFL1.0]\n[1] Hello, world!\n[PFLEND]\n```\n\n#### Adding two numbers\n```\n[1][2][3]\n[PFL1.0]\n[1:0:2] [INPUT]\n[2:0:2] [INPUT]\n[3] [ADD:[1]:[2]]\n[PFLEND]\n```\n\n#### Primality test\n```\n[1][2]\n[PFL1.0]\n[1:0:2] [INPUT]\n[2] [PRIME:[1]]\n[PFLEND]\n```\n\n#### 99 Bottles of Beer\n```\n[1][2]\n[PFL1.0]\n[1:98] [SUB:100:[INDEX:1]] bottles of beer on the wall, [SUB:100:[INDEX:1]] bottles of beer.[RET]Take one down, pass it around, [IF:[GT:[SUB:99:[INDEX:1]]:1]:[SUB:99:[INDEX:1]] bottles:1 bottle] of beer on the wall.[RET][RET][1]\n[2] 1 bottle of beer on the wall, 1 bottle of beer.[RET]Take one down and pass it around, no more bottles of beer on the wall.[RET][RET]No more bottles of beer on the wall, no more bottles of beer.[RET]Go to the store and buy some more, 99 bottles of beer on the wall.[RET]\n[PFLEND]\n```\n\n#### The Twelve Days of Christmas\n\n```\nThe Twelve Days of Christmas[1][2][5][6][7][8][9][10][11][12][13][14][15]\n[PFL1.0]\n[1:12] [RET][RET]On the [ORD:[INDEX:1]] day of Christmas my true love gave to me[RET]\n[2] [IF:[IS:[INDEX:2]:1]:[4]:[3]]\n[3] and [4]\n[4] a partridge in a pear tree[RET][1]\n[5] Two turtle doves[RET][2]\n[6] Three french hens[RET][5]\n[7] Four calling birds[RET][6]\n[8] FIVE GOLDEN RINGS[BEEP][RET][7]\n[9] Six geese a laying[RET][8]\n[10] Seven swans a swimming[RET][9]\n[11] Eight maids a milking[RET][10]\n[12] Nine ladies dancing[RET][11]\n[13] Ten lords a leaping[RET][12]\n[14] Eleven pipers piping[RET][13]\n[15] Twelve drummers drumming[RET][14]\n[PFLEND]\n```\n\nA few more examples can be found in the `examples` directory.\n\n## Development\n\n### Prerequisites\n\n* Dart SDK - [install](https://www.dartlang.org/tools/sdk#install)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n\n## Acknowledgments\n\n* Daniel Myers, who drafted the [original language specification](http://dmmyers.com/pflspec.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasilescur%2Fpfl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvasilescur%2Fpfl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasilescur%2Fpfl/lists"}