tripl.1 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. .TH TRIPL 1 "26 Dec 21"
  2. .SH NAME
  3. tripl \- the interpreter of the tripl programming language.
  4. .SH SYNOPSIS
  5. \fBtripl\fP [ FILE ]
  6. .SH DESCRIPTION
  7. \fBtripl\fP is a programming language that uses different
  8. characters to do different things. You can use tripl to calculate
  9. the sum of two numbers, print out messages and other things interesting.
  10. .SH LICENSE
  11. \fBtripl\fP is distrubuted under the GNU General Public License. See the
  12. \fBLICENSE\fP file in the source directory of tripl. Of course, you need
  13. to download that from https://gitee.com/pengruiyang-cpu/tripl.git before
  14. that.
  15. .SH SYNTAX
  16. \fB$\fP: uses to push a number into stack. now we also support global variables.
  17. eg. \fB$ name 1048576;\fP
  18. \fB$ name = +1048576;\fP
  19. \fB$ name = -1048576;\fP
  20. # or just leave blank. default value is 0
  21. \fB$ name;$\fP;
  22. \fB$ name 1048576 @ rdonly global;\fP
  23. usable variable attributes: global rdonly ptr
  24. \fB#\fP: line comment
  25. \fB!\fP: dump. This dumps things you want, e.g. functions, names, libraries
  26. \fBTHIS ONLY WORKS IN INTERPRETER MODE\fP
  27. eg. \fB! @ var;
  28. usable attributes: var (aka variables) fn (aka functions) names libs (aka libraries)
  29. all
  30. \fB<\fP: import shared library and declares.
  31. eg. \fB< "foobar.so"\fP
  32. \fB< fn @ fn;\fP
  33. \fB< name @ var;\fP
  34. \fB< fn 2 @ fn;\fP
  35. \fB< fn (a, b) @ fn;\fP
  36. \fB< age @ var;\fP
  37. usable attributes: shared (aka dynalib), fn (aka function), var (aka variable)