{"id":28141562,"url":"https://github.com/dzmpr/peace-core","last_synced_at":"2025-05-14T18:15:36.028Z","repository":{"id":175314541,"uuid":"243832012","full_name":"dzmpr/peace-core","owner":"dzmpr","description":"Interpreter for GPSS that was written on python.","archived":false,"fork":false,"pushed_at":"2021-11-21T17:12:45.000Z","size":254,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-30T07:00:59.133Z","etag":null,"topics":["gpss","interpreter","modeling","python","source-to-source","translator"],"latest_commit_sha":null,"homepage":"","language":"Python","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/dzmpr.png","metadata":{"files":{"readme":"readme.md","changelog":null,"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}},"created_at":"2020-02-28T18:46:55.000Z","updated_at":"2021-03-06T08:39:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d64d341-08b1-46bd-91cc-9c117fc6808f","html_url":"https://github.com/dzmpr/peace-core","commit_stats":{"total_commits":215,"total_committers":2,"mean_commits":107.5,"dds":"0.0046511627906976605","last_synced_commit":"8a53300d9900856df252cf192fa50e493c05f03c"},"previous_names":["dzmpr/peace-core"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzmpr%2Fpeace-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzmpr%2Fpeace-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzmpr%2Fpeace-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzmpr%2Fpeace-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dzmpr","download_url":"https://codeload.github.com/dzmpr/peace-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198428,"owners_count":22030966,"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":["gpss","interpreter","modeling","python","source-to-source","translator"],"created_at":"2025-05-14T18:13:57.034Z","updated_at":"2025-05-14T18:15:36.021Z","avatar_url":"https://github.com/dzmpr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python to GPSS source-to-source translator\nPeace source code not indentation dependent. Each line should contain one statement. Peace not checking validity of GPSS code. Peace checking validity of used names for device blocks, operators and expressions (now across whole code, in future - scope dependent).\n\n## How to use?\n**Minimum python version - 3.8.**\n```bash\npython main.py \u003cpath to .pce\u003e\n```\nInterpreter will generate output .gpss file in the same folder with .pce.\n### Blocks\n* Main block\n  ```\n  main {...}\n  ```\n  Is used to declare body of the GPSS program: SIMULATE and END.\n  \n* Device block\n  ```\n  devicename {...}\n  ```\n  Used **inside main** block. Will be translated to SEIZE and RELEASE operators.\n\n  Inside expression it's allowed to add \"@\" after device name. This syntax add expression occurrence number after each device name.\n\n* Expression block\n  ```\n  exprname {...}\n  ```\n  Used **outside main** block. This block declares expression which be translated to inner representation which can be used across programm inside *main* or another *expression* block. Expression name should be unique across file, but can be the same with name of device or queue. \n  \n  Allowed to use inside expression block special characters which will be replaced with arguments passed to this expression in call place. \"@\" parameter refers to number of certain expression was called. Positional arguments can be inserted by \"@\" sign with followed number of argument (f.e. @1, @10). Positional parameter get such type, in what place it first used.\n  \n### Operators\n* ADVANCE\n  ```\n  delay(number[, number])\n  ADVANCE number[, number]\n  \n  delay (\"params\")\n  ADVANCE params\n  ```\n* GENERATE\n  ```\n  gen(\"params\")\n  GENERATE params\n  ```\n* QUEUE\n  ```\n  q(word)\n  QUEUE word\n  ```\n* DEPART\n  ```\n  dq(word)\n  DEPART word\n  ```\n* SAVEVALUE\n  ```\n  changevar(\"params\")\n  SAVEVALUE params\n  ```\n* INITIAL\n  ```\n  var(\"params\")\n  INITIAL params\n  ```\n* TERMINATE\n  ```\n  destroy([number])\n  TERMINATE [number]\n  ```\n* START\n  ```\n  init(number)\n  START number\n  ```\n* TEST\n  ```\n  compare(word, \"params\")\n  TEST word    params\n  ```\n* TRANSFER\n  ```\n  goto(\"params\")\n  TRANSFER params\n  ```\n* SPLIT\n  ```\n  copy(\"params\")\n  SPLIT params\n  ```\n* LINK\n  ```\n  link(\"params\")\n  LINK params\n  ```\n* UNLINK\n  ```\n  unlink(\"params\")\n  UNLINK params\n  ```\n* PRIORITY\n  ```\n  priority(number)\n  PRIORITY number\n  ```\n* ASSIGN\n  ```\n  assign(\"params\")\n  ASSIGN params\n  ```\n* FUNCTION\n  ```\n  func(word, \"params\", \"params\")\n  word FUNCTION params\n  params\n  ```\n* PREEMPT\n  ```\n  preempt(\"params\")\n  PREEMPT params\n  ```\n* RETURN\n  ```\n  ret(\"params\")\n  RETURN params\n  ```\n\n### Labels\nLabels can be added with such syntax:\n```\nlabelname:\n```\nThey can be at the same line with next statement or lines before.\n\nInside expression it's allowed to add \"@\" after label name. This syntax add expression occurrence number after each label. \n\n### Comments\nComments specifying with **#** symbol. Comment lasts to the end of line. They has no affect to the output code and just will be ignored by translator.\n```\n# Comment example\n```\n\n## Goals\n- [x] Make a tree-based intermediate representation\n- [x] Implement expressions\n- [x] Implement expressions with substitutions\n- [ ] Make scope dependent naming\n- [ ] More familiar syntax with high-level languages\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzmpr%2Fpeace-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdzmpr%2Fpeace-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzmpr%2Fpeace-core/lists"}