{"id":13782688,"url":"https://github.com/JacksonKearl/yasa","last_synced_at":"2025-05-11T16:31:03.502Z","repository":{"id":87578668,"uuid":"50446243","full_name":"JacksonKearl/yasa","owner":"JacksonKearl","description":"Yet Another Scripting Atrocity - Interpreter and Translators","archived":false,"fork":false,"pushed_at":"2016-07-07T14:13:43.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-03T18:16:46.737Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","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/JacksonKearl.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}},"created_at":"2016-01-26T17:31:30.000Z","updated_at":"2016-01-30T00:09:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f7f5539-7c3a-4ae8-8329-0a48f4e399a9","html_url":"https://github.com/JacksonKearl/yasa","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacksonKearl%2Fyasa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacksonKearl%2Fyasa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacksonKearl%2Fyasa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacksonKearl%2Fyasa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JacksonKearl","download_url":"https://codeload.github.com/JacksonKearl/yasa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225068726,"owners_count":17416123,"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":[],"created_at":"2024-08-03T18:01:41.709Z","updated_at":"2024-11-17T17:31:57.884Z","avatar_url":"https://github.com/JacksonKearl.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"#yasa\n\nyasa is **_Yet Another Scripting Attrocity_**. Its main feature is that it takes the stangeness of assembly language, and combines it with the slowness of an interpreted language. Its the worst of both worlds, but I like it all the same.\n\nThis package contains:\n\n* The yasa interpreter, [yasa](https://github.com/JacksonKearl/yasa/tree/master/yasa-base)\n\n* A brainfuck to yassa translator, [fuck-yasa](https://github.com/JacksonKearl/yasa/tree/master/fuck-yasa)\n\n* A befunge to yasa translator, [be-yasa](https://github.com/JacksonKearl/yasa/tree/master/be-yasa)\n\n\nMore information about each of these submodules can be found in their respective directories.\n\n###Language Guide\nyasa was designed for simplicity of parsing. As such, it consists of only a few different grammars:\n\n* Commands, which are always three letters, and always come at the start of a line\n* Variables, which always start with `$`, and take the form `$[a-z]?`, with the bare `$` as a temp variable.\n* Literals, which can always take the place of variables, even when it seems like the shouldn't be able to.\n* Comments, which always start with `#`, and can be either after the arguments of a line, or on a line alone.\n\nIn general, the language looks something like:\n```\n# Comment\ncmd $a 43 $  # More Comment\nend\n```\n\nAll variables and literals are integers, which may be converted to/from ASCII characters for IO purposes.\n\nIn addition to the 27 `$var`'s, the runtime also has access to an array of integers, initailized to `0`, that may be accesed at random, or with stack operations.\n\n####Commands:\nAll commands are broken down into these 4 categories. The included `yasa.cson` file provides syntax highlighting as documented.\n\nAs a general rule, the modified variable in a given command will be the last in the argument list.\n\n#####State Change (purple):\n|Command|Name|Arguments|Description|\n|-------|----|---------|-----------|\n|Copy|`cpy` |$a $b | assigns $b the value of $a|\n|Push|`pus`|$a| pushes $a onto global array|\n|Pop|`pop`|$a| assigns $a value popped from global array|\n|Put|`put`|$a $i|assigns $a to global array index $i|\n|Get|`get`|$a $i|assigns value at global array index $i to $a|\n|Add|`add`|$a $b $r| assigns $r the value `$a + $b`|\n\n#####Math (blue):\n|Command|Name|Arguments|Description|\n|-------|----|---------|-----------|\n|Increment|`inc` |$a | assigns value $a + 1 to $a|\n|Decrement|`dec`| $a | assigns vlaue $a -1 to $a|\n|Add|`add`|$a $b $r| assigns $r the value `$a + $b`|\n|Subtract|`sub`|$a $b $r| assigns $r the value `$a - $b`|\n|Multiply|`mul`|$a $b $r| assigns $r the value `$a * $b`|\n|Divide|`div`|$a $b $r| assigns $r the value `$a / $b`|\n|Modulo|`mod`|$a $b $r| assigns $r the value `$a % $b`|\n|Random|`ran`|$n $a| assigns $a random value between 0 and $n|\n|Equal|`eql`|$a $b $r| gives $r 1 if `$a = $b`, else $0|\n|Greater|`grt`|$a $b $r| gives $r 1 if `$a \u003e $b`, else $0|\n\n#####Control Flow (teal):\n|Command|Name|Arguments|Description|\n|-------|----|---------|-----------|\n|Label|`lbl`|$a| creates a mark for future/past mov's. *must be positive*|\n|Move|`mov`|$a [$b]| go to label $a, searching from beginning onward, noop if $b is 0|\n|If|`iff`|$a|continue if $a is not 0, else jump to next elif or end|\n|Else If|`eif`|$a|continue if $a is not 0, else jump to next elif or end|\n|Else|`els`|none|continue so long as previous `iff`'s evaluated false|\n|End|`end`|none|end iff block or program|\n\n#####Input/Output (green):\n|Command|Name|Arguments|Description|\n|-------|----|---------|-----------|\n|Integer In|`iin`|$a| assigns $a integer read from stdin|\n|Charachter In|`cin`|$a| assigns $a char read from stdin|\n|Show|`sho` |$a |outputs $a as an integer|\n|Display |`dis` |$a |outputs $a as an ASCII char |\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJacksonKearl%2Fyasa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJacksonKearl%2Fyasa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJacksonKearl%2Fyasa/lists"}