项目作者: AMiller42

项目描述 :
Grok is a recreational programming language inspired by Befunge, ><>, and the Vim editor.
高级语言: Python
项目地址: git://github.com/AMiller42/Grok-Language.git
创建时间: 2021-04-06T19:24:15Z
项目社区:https://github.com/AMiller42/Grok-Language

开源协议:MIT License

下载


Grok-Language

Grok is a two-dimensional, stack-based language inspired by Befunge, ><>, and the Vim editor.


Documentation

The Issues page lists planned/possible additions to the language and/or interpreter, as well as known bugs. If you come across any undocumented bugs, feel free to make a note of them and I’ll squash them.


Getting Started

The PyGrok interpreter requires Python 3 or higher.

  1. $ PyGrok.py --help
  2. usage: PyGrok.py [-h] (<script file> | -c <code>) [<options>]
  3. Execute a Grok script.
  4. Executing a script is as easy as:
  5. PyGrok.py <script file>
  6. You can also execute code directly using the -c/--code flag:
  7. PyGrok.py -c '1z23zzq'
  8. > 132
  9. The -v and -s flags can be used to prepopulate the stack:
  10. PyGrok.py echo.grk -s "hello, world" -v 32 49 50 51 -s "456"
  11. > hello, world 123456
  12. optional arguments:
  13. -h, --help show this help message and exit
  14. code:
  15. script .grk file to execute
  16. -c <code>, --code <code>
  17. string of instructions to execute
  18. options:
  19. -s <string>, --string <string>
  20. -v <number> [<number> ...], --value <number> [<number> ...]
  21. push numbers or strings onto the stack before execution starts
  22. -t <seconds>, --tick <seconds>
  23. define a tick time, or a delay between the execution of each instruction
  24. -a, --always-tick make every instruction cause a tick (delay), even whitespace and skipped instructions
  25. -e, --show-errors disable "You don't grok Grok." error message and show true error message

The official specification can be found at Esolangs.org