{"id":34568041,"url":"https://github.com/flowdev/gflowparser","last_synced_at":"2025-12-24T09:12:21.812Z","repository":{"id":57523540,"uuid":"49228102","full_name":"flowdev/gflowparser","owner":"flowdev","description":"Flow DSL parser for the Go programming language build with flowdev/gparselib.","archived":false,"fork":false,"pushed_at":"2019-10-30T14:16:12.000Z","size":367,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T10:08:52.558Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/flowdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-07T20:12:41.000Z","updated_at":"2019-10-30T14:16:14.000Z","dependencies_parsed_at":"2022-08-28T11:12:32.293Z","dependency_job_id":null,"html_url":"https://github.com/flowdev/gflowparser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flowdev/gflowparser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowdev%2Fgflowparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowdev%2Fgflowparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowdev%2Fgflowparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowdev%2Fgflowparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flowdev","download_url":"https://codeload.github.com/flowdev/gflowparser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowdev%2Fgflowparser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27999522,"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","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"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":[],"created_at":"2025-12-24T09:12:21.455Z","updated_at":"2025-12-24T09:12:21.805Z","avatar_url":"https://github.com/flowdev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gflowparser\nFlow DSL parser for the Go programming language build with flowdev/gparselib.\n\n## Status\nThis project is already quite useful (especially when used via the `go2md` project).\nBut the following points are still missing:\n1. [x] Fully document parser package\n1. [x] Fix rare bug with splitted and merged flows\n1. [ ] Refactor the `data2svg` package into flows\n1. [ ] Fully document and test package `data2svg`\n1. [ ] Fully document and test package `svg`\n1. [ ] Fully document and test `converter.go`\n\n## Flow DSL\nThe flow DSL is used to show the flow of data between components. So it consists of two main objects:\n- components that perform computations, I/O, etc. and\n- arrows that connect components and transport the defined data into the second component.\n\nComponents can have explicit ports that they use to receive or provide data.\nThe default ports are `in` for input and `out` for output.\n\nSo a very simple flow looks like this:\n```flowdev\nin (data)-\u003e [component1] (data)-\u003e [component2] (data)-\u003e out\n```\nand is rendered to:\n\n![simple flow](img/simple.svg)\n\nAs you can see, the ports at the outer level (usually at the very start and end\nof a flow line) have to be stated explicitly even if they are the standard\nports.\n\nGenerally new lines and comments are fine when seperating flow lines and\nwithin parentheses (`(` and `)`) and square brackets (`[` and `]`).\n\n### Data and data types\nMultiple data for arrows are supported and can either be seperated by a comma (`,`)\nto keep them on the same line or by a pipe (`|`) to have multiple lines.\nThe data types can be left out, too.\n```flowdev\nin (data1, data2, data3)-\u003e [component1] (data4 | data5 | data6)-\u003e [\ncomponent2] (data1, data3 | data5, data6)-\u003e out\nin2 -\u003e [component1] -\u003e [component2] -\u003e out2\n```\n![multiple data](img/multiData.svg)\n\nData types can be upper case (exported) or lower case (local). A package name\nseparated by dot (`.`) can be prepended to a data type.\nSimple data types like `string`, `int` and `bool` don't provide much\ninformation so instead the more descriptive name of the parameter should be\nused instead. \n```flowdev\nin (localDataType, ExportedLocalDataType | otherpackage.ExportedDataType)-\u003e [\ncomponent1] (ExportedLocalDataType | descriptiveNameForString)-\u003e out\n```\n![data types](img/dataTypes.svg)\n\n### Ports\nPorts have lower case names and can have an optional index (array ports).\nThe maximum index is fix at design time (compile time) as anything else would\nbe too hard to debug.\nIn the Go code input port names are appended to the function or method name\nseperated by an underscore (`_`) (e.g. `func component1_myInPort(...)`).\n```flowdev\nin (data)-\u003e myInPort [component1] out (data)-\u003e arrayIn:1 [component2] arrayOut:1 (data)-\u003e out\n[component1] specialOut (data)-\u003e arrayIn:2 [component2] arrayOut:2 (data)-\u003e extraOut\n```\n![ports](img/ports.svg)\n\n### Continuations\nFlows can get quite long and it is nice to be able to continue them on a new\nline.  You can use continuations for that. A continuation is simply three dots\n(`...`) followed by a number.  That allows more complicated flow forms, too.\n```flowdev\nin (data)-\u003e [component1] -\u003e ...1\n...1 (data)-\u003e [component2] -\u003e ...2\n...2 (data)-\u003e [component3]\n```\n![continuations](img/continuations.svg)\n\n### Components\nFlow components generally have got a name and a type. If no explicit name is\ngiven, it is generated from the type using the following rules:\n\n- The optional package part of the type is ignored when generating the name.\n- A lower case type is used unchanged as name, too.\n- Upper case types are converted to lower case for the name.\n\n```flowdev\nin (data)-\u003e [component1] (data)-\u003e [Component2] (data)-\u003e out\nin2 (data)-\u003e [package.Component3] (data)-\u003e [explicitName Component4] (data)-\u003e out2\n```\n![component names](img/componentNames.svg)\n\n### Plugins\nIn order to keep diagrams and code clean it components can have plugins.\nPlugins are simple functions (as seen from the component using them).  So they\nare just like components with only one input port, an optional output port and\noptional error port. It is possible that the plugin is used as a normal\ncomponent elsewhere. We simply use normal (component) data types for plugins.\n```flowdev\nin (data)-\u003e [component [plugin]] (data)-\u003e out\n```\n![simple plugin](img/simplePlugin.svg)\n\nMultiple plugins of the same type (same Go function signature) are supported,\ntoo.\n```flowdev\nin (data)-\u003e [component [pluginType = package.Plugin1, plugin2, Plugin3]] (data)-\u003e out\n```\n![one plugin type, multiple plugins](img/1typeMultiPlugin.svg)\n\nIf there is only one plugin of a type, the plugin type can be omited since it\nusually is the same as the plugin itself.  Plugins of different types can be\nused, too.\n```flowdev\nin (data)-\u003e [component [simplePlugin | pluginType = package.Plugin1, plugin2, Plugin3]] (data)-\u003e out\n```\n![multiple plugins](img/multiPlugin.svg)\n\nI hope you recognise the thicker separator line between plugins of different\ntypes.\n\n### Splits\nComponents can have got multiple output ports and/or be connected to multiple\ndownstream components. The first time a component is used it is defined with\noptional name and type. All other times only the unique name is used to refer\nto it.\n```flowdev\nin (data)-\u003e [component1] (data)-\u003e [Component2] (data)-\u003e out\n[component1] error (err)-\u003e error\n[component2] error (err)-\u003e error\nin2 (data)-\u003e [package.Component3] (data)-\u003e [explicitName Component4] (data)-\u003e out2\n[component3] error (err)-\u003e error\n[explicitName] error (err)-\u003e error\n```\n![splits](img/splits.svg)\n\n### Merges\nMerges are the opposite of splits and the same rules apply. Merges are used for\ncomponents that have got multiple input ports and/or that are connected to\nmultiple upstream components.\n```flowdev\nin (data)-\u003e [component1] (data)-\u003e [Component2] (data)-\u003e out\nin2 (data2)-\u003e [component1]\nin3 (data3)-\u003e [component2]\nin4 (data4)-\u003e [package.Component3] (data)-\u003e [explicitName Component4] (data)-\u003e out2\nin5 (data5)-\u003e [component3]\nin6 (data6)-\u003e [explicitName]\n```\n![merges](img/merges.svg)\n\n### Circles\nThe flow DSL allows to create circles. As these are graphically challenging the\ntool breaks them up and replaces the component that completes the circle with a\ntextual reference (`... back to: \u003ccomponent name\u003e`).\n```flowdev\nin (data)-\u003e [component1] (data)-\u003e [Component2] (data)-\u003e [component1]\n```\n![circle](img/circle.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowdev%2Fgflowparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowdev%2Fgflowparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowdev%2Fgflowparser/lists"}