{"id":19664984,"url":"https://github.com/jonghough/tokamak","last_synced_at":"2026-06-12T11:31:51.127Z","repository":{"id":150486518,"uuid":"77374919","full_name":"jonghough/Tokamak","owner":"jonghough","description":"mini DSL language built with F# + FParsec","archived":false,"fork":false,"pushed_at":"2017-01-26T01:36:28.000Z","size":848,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-22T11:07:54.565Z","etag":null,"topics":["dot-net","dsl","f-sharp","language","mini-language","tokamak"],"latest_commit_sha":null,"homepage":"","language":"F#","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/jonghough.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-26T09:56:19.000Z","updated_at":"2020-08-26T00:00:28.000Z","dependencies_parsed_at":"2023-07-28T20:47:10.316Z","dependency_job_id":null,"html_url":"https://github.com/jonghough/Tokamak","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonghough/Tokamak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonghough%2FTokamak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonghough%2FTokamak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonghough%2FTokamak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonghough%2FTokamak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonghough","download_url":"https://codeload.github.com/jonghough/Tokamak/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonghough%2FTokamak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34243051,"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-12T02:00:06.859Z","response_time":109,"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":["dot-net","dsl","f-sharp","language","mini-language","tokamak"],"created_at":"2024-11-11T16:19:58.197Z","updated_at":"2026-06-12T11:31:51.101Z","avatar_url":"https://github.com/jonghough.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/jonghough/Tokamak.svg?branch=master)](https://travis-ci.org/jonghough/Tokamak)\n# Tokamak\nAdvanced Fusion Reactor\n\n# Tokamak DSL\nTokamak DSL is a Domain Specific Language for .NET, written with *FParsec* parser combinator library.\n\n## Purpose\nTokamak can be embedded in .NET / mono applications (using .NET framework ~4.0+).\n\n## Evaluation\nExpressions are evaluated right to left, with no operator precedence. Parentheses are used to evaluate subexpressions before the\nouter expression.\n\n## DataTypes\n* Integer - corresponds to int64\n* Floating - corresponds to double\n* Literal - corresponds to string\n* Bool - bool\n* Array - This is an array of expressions, which may be datatypes or other expressions that can be evaluated to a datatype.\n\n## Functions\nFunctions are declared using ```function``` keyword followed by the function name, the parameters, the function body, and is\nterminated using the ```end``` keyword.\n\n### example\n```\nfunction fib(n)\n  if n \u003c= 1 then 1\n  else\n    n * fib(n-1)\n  end\nend\n\n```\n\n## Array creation\nArray declarations are simple:\n```\nmyArray = 0$10 \n```\nThis will create an array [0,1,...,9].\nThe contents of the array can be modified arbitrarily:\n\n```\nmyArray[0] = 5.5\n\n```\n\n## Controls\nTokamak has *while-loops* and *for-loops*, as well as *if-elif-else* blocks.\n\n### while loops\n\n```\na = 0\nctr = \"a\"\nwhile a \u003c 10 do \n  a = a + 1\n  ctr = ctr+\"a\" \nend\n```\nwill produce the string ```aaaaaaaaaa```.\n\n### for loops\n```\nfunction iseven(n) (n%2) = 0 end\n\narr = 0$100\n\nfor i in 0$100 do\n  arr[i] = iseven(i)\nend\n\narr\n```\n\n### if-elseif-else control\n```\na = 0$100\nm0 = 0\nm1 = 0\nm2 = 0\nfor i in a do\n  if 0 = i%3 then\n    m0 = m0 + 1\n  elseif 1 = i%3 then\n    m1 = m1 + 1\n  else m2 = m2 + 1\n  end\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonghough%2Ftokamak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonghough%2Ftokamak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonghough%2Ftokamak/lists"}