gloo-lang 0.9.0 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/lib/VERSION +1 -1
  3. data/lib/dependencies.rb +2 -2
  4. data/lib/{gloo_lang.rb → gloo-lang.rb} +7 -9
  5. data/lib/gloo_lang/app/args.rb +112 -0
  6. data/lib/gloo_lang/app/engine.rb +230 -0
  7. data/lib/gloo_lang/app/help.rb +156 -0
  8. data/lib/gloo_lang/app/log.rb +81 -0
  9. data/lib/gloo_lang/app/mode.rb +27 -0
  10. data/lib/gloo_lang/app/settings.rb +186 -0
  11. data/lib/gloo_lang/convert/converter.rb +35 -0
  12. data/lib/gloo_lang/convert/string_to_datetime.rb +21 -0
  13. data/lib/gloo_lang/convert/string_to_decimal.rb +20 -0
  14. data/lib/gloo_lang/convert/string_to_integer.rb +20 -0
  15. data/lib/gloo_lang/core/baseo.rb +30 -0
  16. data/lib/gloo_lang/core/dictionary.rb +181 -0
  17. data/lib/gloo_lang/core/error.rb +61 -0
  18. data/lib/gloo_lang/core/event_manager.rb +44 -0
  19. data/lib/gloo_lang/core/factory.rb +210 -0
  20. data/lib/gloo_lang/core/gloo_system.rb +266 -0
  21. data/lib/gloo_lang/core/heap.rb +52 -0
  22. data/lib/gloo_lang/core/here.rb +36 -0
  23. data/lib/gloo_lang/core/it.rb +36 -0
  24. data/lib/gloo_lang/core/literal.rb +30 -0
  25. data/lib/gloo_lang/core/obj.rb +303 -0
  26. data/lib/gloo_lang/core/obj_finder.rb +30 -0
  27. data/lib/gloo_lang/core/op.rb +40 -0
  28. data/lib/gloo_lang/core/parser.rb +59 -0
  29. data/lib/gloo_lang/core/pn.rb +188 -0
  30. data/lib/gloo_lang/core/tokens.rb +165 -0
  31. data/lib/gloo_lang/core/verb.rb +86 -0
  32. data/lib/gloo_lang/exec/action.rb +48 -0
  33. data/lib/gloo_lang/exec/dispatch.rb +40 -0
  34. data/lib/gloo_lang/exec/exec_env.rb +74 -0
  35. data/lib/gloo_lang/exec/runner.rb +45 -0
  36. data/lib/gloo_lang/exec/script.rb +49 -0
  37. data/lib/gloo_lang/exec/stack.rb +78 -0
  38. data/lib/gloo_lang/expr/expression.rb +118 -0
  39. data/lib/gloo_lang/expr/l_boolean.rb +36 -0
  40. data/lib/gloo_lang/expr/l_decimal.rb +39 -0
  41. data/lib/gloo_lang/expr/l_integer.rb +37 -0
  42. data/lib/gloo_lang/expr/l_string.rb +58 -0
  43. data/lib/gloo_lang/expr/op_div.rb +22 -0
  44. data/lib/gloo_lang/expr/op_minus.rb +22 -0
  45. data/lib/gloo_lang/expr/op_mult.rb +22 -0
  46. data/lib/gloo_lang/expr/op_plus.rb +24 -0
  47. data/lib/gloo_lang/help/app/application.txt +22 -0
  48. data/lib/gloo_lang/help/app/configuration.txt +7 -0
  49. data/lib/gloo_lang/help/app/default_help.txt +14 -0
  50. data/lib/gloo_lang/help/app/logging.txt +16 -0
  51. data/lib/gloo_lang/help/core/color.txt +31 -0
  52. data/lib/gloo_lang/help/core/error.txt +33 -0
  53. data/lib/gloo_lang/help/core/events.txt +21 -0
  54. data/lib/gloo_lang/help/core/gloo_system.txt +57 -0
  55. data/lib/gloo_lang/help/core/here.txt +30 -0
  56. data/lib/gloo_lang/help/core/it.txt +23 -0
  57. data/lib/gloo_lang/help/core/ops.txt +16 -0
  58. data/lib/gloo_lang/help/core/pathname.txt +29 -0
  59. data/lib/gloo_lang/help/objs/basic/alias.txt +36 -0
  60. data/lib/gloo_lang/help/objs/basic/boolean.txt +28 -0
  61. data/lib/gloo_lang/help/objs/basic/container.txt +33 -0
  62. data/lib/gloo_lang/help/objs/basic/decimal.txt +28 -0
  63. data/lib/gloo_lang/help/objs/basic/integer.txt +27 -0
  64. data/lib/gloo_lang/help/objs/basic/script.txt +29 -0
  65. data/lib/gloo_lang/help/objs/basic/string.txt +28 -0
  66. data/lib/gloo_lang/help/objs/basic/text.txt +27 -0
  67. data/lib/gloo_lang/help/objs/basic/untyped.txt +22 -0
  68. data/lib/gloo_lang/help/objs/cli/banner.txt +49 -0
  69. data/lib/gloo_lang/help/objs/cli/bar.txt +37 -0
  70. data/lib/gloo_lang/help/objs/cli/colorize.txt +33 -0
  71. data/lib/gloo_lang/help/objs/cli/confirm.txt +26 -0
  72. data/lib/gloo_lang/help/objs/cli/menu.txt +44 -0
  73. data/lib/gloo_lang/help/objs/cli/menu_item.txt +26 -0
  74. data/lib/gloo_lang/help/objs/cli/pastel.txt +43 -0
  75. data/lib/gloo_lang/help/objs/cli/prompt.txt +27 -0
  76. data/lib/gloo_lang/help/objs/cli/select.txt +34 -0
  77. data/lib/gloo_lang/help/objs/ctrl/each.txt +48 -0
  78. data/lib/gloo_lang/help/objs/ctrl/repeat.txt +38 -0
  79. data/lib/gloo_lang/help/objs/data/markdown.txt +25 -0
  80. data/lib/gloo_lang/help/objs/data/mysql.txt +40 -0
  81. data/lib/gloo_lang/help/objs/data/query.txt +37 -0
  82. data/lib/gloo_lang/help/objs/data/sqlite.txt +26 -0
  83. data/lib/gloo_lang/help/objs/data/table.txt +46 -0
  84. data/lib/gloo_lang/help/objs/dev/git_repo.txt +36 -0
  85. data/lib/gloo_lang/help/objs/dev/stats.txt +36 -0
  86. data/lib/gloo_lang/help/objs/dt/date.txt +23 -0
  87. data/lib/gloo_lang/help/objs/dt/datetime.txt +24 -0
  88. data/lib/gloo_lang/help/objs/dt/time.txt +23 -0
  89. data/lib/gloo_lang/help/objs/ror/erb.txt +37 -0
  90. data/lib/gloo_lang/help/objs/ror/eval.txt +24 -0
  91. data/lib/gloo_lang/help/objs/snd/play.txt +23 -0
  92. data/lib/gloo_lang/help/objs/snd/say.txt +28 -0
  93. data/lib/gloo_lang/help/objs/system/file.txt +48 -0
  94. data/lib/gloo_lang/help/objs/system/ssh_exec.txt +30 -0
  95. data/lib/gloo_lang/help/objs/system/system.txt +32 -0
  96. data/lib/gloo_lang/help/objs/web/http_get.txt +35 -0
  97. data/lib/gloo_lang/help/objs/web/http_post.txt +34 -0
  98. data/lib/gloo_lang/help/objs/web/json.txt +34 -0
  99. data/lib/gloo_lang/help/objs/web/slack.txt +33 -0
  100. data/lib/gloo_lang/help/objs/web/teams.txt +30 -0
  101. data/lib/gloo_lang/help/objs/web/uri.txt +38 -0
  102. data/lib/gloo_lang/help/verbs/alert.txt +33 -0
  103. data/lib/gloo_lang/help/verbs/beep.txt +25 -0
  104. data/lib/gloo_lang/help/verbs/cls.txt +24 -0
  105. data/lib/gloo_lang/help/verbs/context.txt +43 -0
  106. data/lib/gloo_lang/help/verbs/create.txt +33 -0
  107. data/lib/gloo_lang/help/verbs/execute.txt +27 -0
  108. data/lib/gloo_lang/help/verbs/help.txt +34 -0
  109. data/lib/gloo_lang/help/verbs/if.txt +37 -0
  110. data/lib/gloo_lang/help/verbs/list.txt +34 -0
  111. data/lib/gloo_lang/help/verbs/load.txt +38 -0
  112. data/lib/gloo_lang/help/verbs/move.txt +42 -0
  113. data/lib/gloo_lang/help/verbs/put.txt +38 -0
  114. data/lib/gloo_lang/help/verbs/quit.txt +25 -0
  115. data/lib/gloo_lang/help/verbs/run.txt +41 -0
  116. data/lib/gloo_lang/help/verbs/save.txt +26 -0
  117. data/lib/gloo_lang/help/verbs/show.txt +30 -0
  118. data/lib/gloo_lang/help/verbs/tell.txt +34 -0
  119. data/lib/gloo_lang/help/verbs/unless.txt +38 -0
  120. data/lib/gloo_lang/help/verbs/version.txt +32 -0
  121. data/lib/gloo_lang/help/verbs/wait.txt +29 -0
  122. data/lib/gloo_lang/objs/basic/alias.rb +78 -0
  123. data/lib/gloo_lang/objs/basic/boolean.rb +120 -0
  124. data/lib/gloo_lang/objs/basic/container.rb +76 -0
  125. data/lib/gloo_lang/objs/basic/decimal.rb +76 -0
  126. data/lib/gloo_lang/objs/basic/integer.rb +73 -0
  127. data/lib/gloo_lang/objs/basic/script.rb +99 -0
  128. data/lib/gloo_lang/objs/basic/string.rb +77 -0
  129. data/lib/gloo_lang/objs/basic/text.rb +87 -0
  130. data/lib/gloo_lang/objs/basic/untyped.rb +41 -0
  131. data/lib/gloo_lang/objs/cli/banner.rb +108 -0
  132. data/lib/gloo_lang/objs/cli/bar.rb +133 -0
  133. data/lib/gloo_lang/objs/cli/colorize.rb +73 -0
  134. data/lib/gloo_lang/objs/cli/confirm.rb +96 -0
  135. data/lib/gloo_lang/objs/cli/menu.rb +206 -0
  136. data/lib/gloo_lang/objs/cli/menu_item.rb +95 -0
  137. data/lib/gloo_lang/objs/cli/pastel.rb +97 -0
  138. data/lib/gloo_lang/objs/cli/prompt.rb +110 -0
  139. data/lib/gloo_lang/objs/cli/select.rb +126 -0
  140. data/lib/gloo_lang/objs/ctrl/each.rb +279 -0
  141. data/lib/gloo_lang/objs/ctrl/repeat.rb +108 -0
  142. data/lib/gloo_lang/objs/data/markdown.rb +84 -0
  143. data/lib/gloo_lang/objs/data/mysql.rb +192 -0
  144. data/lib/gloo_lang/objs/data/query.rb +176 -0
  145. data/lib/gloo_lang/objs/data/sqlite.rb +159 -0
  146. data/lib/gloo_lang/objs/data/table.rb +140 -0
  147. data/lib/gloo_lang/objs/dev/git.rb +140 -0
  148. data/lib/gloo_lang/objs/dev/stats.rb +120 -0
  149. data/lib/gloo_lang/objs/dt/date.rb +50 -0
  150. data/lib/gloo_lang/objs/dt/datetime.rb +62 -0
  151. data/lib/gloo_lang/objs/dt/time.rb +50 -0
  152. data/lib/gloo_lang/objs/ror/erb.rb +116 -0
  153. data/lib/gloo_lang/objs/ror/eval.rb +107 -0
  154. data/lib/gloo_lang/objs/snd/play.rb +48 -0
  155. data/lib/gloo_lang/objs/snd/say.rb +98 -0
  156. data/lib/gloo_lang/objs/system/file_handle.rb +138 -0
  157. data/lib/gloo_lang/objs/system/ssh_exec.rb +126 -0
  158. data/lib/gloo_lang/objs/system/system.rb +136 -0
  159. data/lib/gloo_lang/objs/web/http_get.rb +159 -0
  160. data/lib/gloo_lang/objs/web/http_post.rb +183 -0
  161. data/lib/gloo_lang/objs/web/json.rb +135 -0
  162. data/lib/gloo_lang/objs/web/slack.rb +130 -0
  163. data/lib/gloo_lang/objs/web/teams.rb +117 -0
  164. data/lib/gloo_lang/objs/web/uri.rb +148 -0
  165. data/lib/gloo_lang/persist/file_loader.rb +191 -0
  166. data/lib/gloo_lang/persist/file_saver.rb +49 -0
  167. data/lib/gloo_lang/persist/file_storage.rb +45 -0
  168. data/lib/gloo_lang/persist/line_splitter.rb +81 -0
  169. data/lib/gloo_lang/persist/persist_man.rb +120 -0
  170. data/lib/gloo_lang/utils/format.rb +21 -0
  171. data/lib/gloo_lang/utils/stats.rb +205 -0
  172. data/lib/gloo_lang/utils/words.rb +19 -0
  173. data/lib/gloo_lang/verbs/alert.rb +79 -0
  174. data/lib/gloo_lang/verbs/beep.rb +40 -0
  175. data/lib/gloo_lang/verbs/cls.rb +37 -0
  176. data/lib/gloo_lang/verbs/context.rb +62 -0
  177. data/lib/gloo_lang/verbs/create.rb +68 -0
  178. data/lib/gloo_lang/verbs/execute.rb +56 -0
  179. data/lib/gloo_lang/verbs/help.rb +264 -0
  180. data/lib/gloo_lang/verbs/if.rb +92 -0
  181. data/lib/gloo_lang/verbs/list.rb +98 -0
  182. data/lib/gloo_lang/verbs/load.rb +45 -0
  183. data/lib/gloo_lang/verbs/move.rb +89 -0
  184. data/lib/gloo_lang/verbs/put.rb +94 -0
  185. data/lib/gloo_lang/verbs/quit.rb +40 -0
  186. data/lib/gloo_lang/verbs/run.rb +75 -0
  187. data/lib/gloo_lang/verbs/save.rb +39 -0
  188. data/lib/gloo_lang/verbs/show.rb +64 -0
  189. data/lib/gloo_lang/verbs/tell.rb +79 -0
  190. data/lib/gloo_lang/verbs/unless.rb +92 -0
  191. data/lib/gloo_lang/verbs/version.rb +37 -0
  192. data/lib/gloo_lang/verbs/wait.rb +42 -0
  193. metadata +191 -3
@@ -0,0 +1,25 @@
1
+ BEEP VERB
2
+ NAME: beep
3
+ SHORTCUT: b
4
+
5
+ DESCRIPTION
6
+ Play a standard system beep sound.
7
+
8
+ SYNTAX
9
+ beep
10
+
11
+ PARAMETERS
12
+ None
13
+
14
+ RESULT
15
+ None
16
+
17
+ ERRORS
18
+ None
19
+
20
+ EXAMPLE
21
+
22
+ > beep
23
+
24
+ SEE ALSO
25
+ play, say
@@ -0,0 +1,24 @@
1
+ CLS VERB
2
+ NAME: cls
3
+ SHORTCUT: cls
4
+
5
+ DESCRIPTION
6
+ Clear the console screen.
7
+
8
+ SYNTAX
9
+ cls
10
+
11
+ PARAMETERS
12
+ None
13
+
14
+ RESULT
15
+ The screen is cleared and cursor set to the top.
16
+
17
+ ERRORS
18
+ None
19
+
20
+ EXAMPLE
21
+
22
+ > cls
23
+
24
+ SEE ALSO
@@ -0,0 +1,43 @@
1
+ CONTEXT VERB
2
+ NAME: context
3
+ SHORTCUT: @
4
+
5
+ DESCRIPTION
6
+ Get or set the current context.
7
+ When no parameter is provided, the context will be shown.
8
+ The the optional path parameter is provided, the context will
9
+ be set to that path.
10
+ Use 'context root' to set the context back to the root level.
11
+
12
+ SYNTAX
13
+ context <path.to.new.context>
14
+
15
+ PARAMETERS
16
+ path.to.new.context - Optional. The path to the new context.
17
+
18
+ RESULT
19
+ Context is optionally set.
20
+ <it> will be set to the new context path when we are changing context.
21
+ Context is show in either case.
22
+
23
+ ERRORS
24
+ None
25
+
26
+ Note that providing a context does not exist will not initially
27
+ be a problem. In other words, you can set the context to an
28
+ object before it exists. However use of context that doesn't exist
29
+ will be a problem.
30
+
31
+ EXAMPLE
32
+
33
+ > context
34
+ Context: root
35
+
36
+ > context my.object.path
37
+ Context: my.object.path
38
+
39
+ > context root
40
+ Context: root
41
+
42
+ SEE ALSO
43
+ list
@@ -0,0 +1,33 @@
1
+ CREATE VERB
2
+ NAME: create
3
+ SHORTCUT: `
4
+
5
+ DESCRIPTION
6
+ Create a new object of given type with given value.
7
+ Both type and value are optional when creating an object.
8
+
9
+ SYNTAX
10
+ create <new.object.path> as <type> : <value>
11
+
12
+ PARAMETERS
13
+ new.object.path - The path and name of the new object
14
+ type - The type of the new object
15
+ value - The initial value for the new object
16
+
17
+ RESULT
18
+ The new object will be created and added to the object heap.
19
+ <it> will be set to the new object's initial value.
20
+
21
+ ERRORS
22
+ Object name is missing!
23
+ - The name of the object was not specified and the object
24
+ cannot be created.
25
+
26
+ EXAMPLE
27
+
28
+ > create x as integer : 1
29
+ > create s : "abc"
30
+ > create t
31
+
32
+ SEE ALSO
33
+ objects
@@ -0,0 +1,27 @@
1
+ EXECUTE VERB
2
+ NAME: execute
3
+ SHORTCUT: exec
4
+
5
+ DESCRIPTION
6
+ Execute a shell command.
7
+
8
+ SYNTAX
9
+ exec <expression>
10
+
11
+ PARAMETERS
12
+ expression
13
+ - Evaluate the expression and execute in the shell.
14
+
15
+ RESULT
16
+ none
17
+
18
+ ERRORS
19
+ Missing Expression!
20
+ - No expression is provided as parameter to the verb.
21
+
22
+ EXAMPLE
23
+
24
+ > exec 'rake test'
25
+
26
+ SEE ALSO
27
+ system, eval, erb
@@ -0,0 +1,34 @@
1
+ HELP VERB
2
+ NAME: help
3
+ SHORTCUT: ?
4
+
5
+ DESCRIPTION
6
+ Show information about the application.
7
+ The help command can also be used to show a list of objects,
8
+ verbs, or to show detail about a single object or a
9
+ single verb.
10
+
11
+ SYNTAX
12
+ help <topic>
13
+
14
+ PARAMETERS
15
+ about - Optional parameter.
16
+ If no parameter is given, shows the default help screen
17
+ keywords - List all keywords
18
+ verbs - List available verbs
19
+ objects - List available objects
20
+ settings - List application settings
21
+ topics - List all help topics
22
+ <verb> - Look up detail about a verb
23
+ <object> - Look up detail about an object
24
+
25
+ RESULT
26
+ The help screen will be shown with relevant information.
27
+
28
+ ERRORS
29
+ Help command could not be found
30
+ - Trying to access a help topic that does not exist will result
31
+ in an error.
32
+
33
+ SEE ALSO
34
+ application
@@ -0,0 +1,37 @@
1
+ IF VERB
2
+ NAME: if
3
+ SHORTCUT: if
4
+
5
+ DESCRIPTION
6
+ If an expression is true then do something.
7
+
8
+ SYNTAX
9
+ if <true> then <do>
10
+
11
+ PARAMETERS
12
+ true - Does the expression evaluate to true?
13
+ do - Execute command if the expression is true.
14
+
15
+ RESULT
16
+ Unchanged if the expression is not true.
17
+ If true, then the result will be based on the command
18
+ specified after the 'then' keyword.
19
+
20
+ ERRORS
21
+ Missing Expression!
22
+ - No expression is provided as parameter to the verb.
23
+
24
+ Other errors depend on the command that is run.
25
+
26
+ EXAMPLE
27
+
28
+ if [container] :
29
+ x [bool] : false
30
+ true_msg [string] : It is true!
31
+ on_load [script] :
32
+ if if.x then show "first time: " + if.true_msg
33
+ put true into if.x
34
+ if if.x then show "second time: " + if.true_msg
35
+
36
+ SEE ALSO
37
+ unless
@@ -0,0 +1,34 @@
1
+ LIST VERB
2
+ NAME: list
3
+ SHORTCUT: .
4
+
5
+ DESCRIPTION
6
+ List out objects (and children) at the current context.
7
+ When a path is provided, it will be listed instead of the
8
+ current context.
9
+
10
+ When using context, the current context will be shown, but
11
+ when context has not been set, the root will be shown.
12
+
13
+ SYNTAX
14
+ list <path.to.object>
15
+
16
+ PARAMETERS
17
+ path.to.object - Optional path to object that will be listed.
18
+ When no path is provided, the current context is used.
19
+
20
+ RESULT
21
+ Object and children are listed out in the CLI.
22
+
23
+ ERRORS
24
+ Object does not exist
25
+ - The object specified that is to be listed could not be found.
26
+
27
+ EXAMPLE
28
+
29
+ > list
30
+ > list my.container
31
+ > list root
32
+
33
+ SEE ALSO
34
+ context
@@ -0,0 +1,38 @@
1
+ LOAD VERB
2
+ NAME: load
3
+ SHORTCUT: <
4
+
5
+ DESCRIPTION
6
+ Load an object file.
7
+ There are two ways to specify the file. Give either the full path
8
+ and file name or use a relative path from the gloo project folder.
9
+ For the latter, the extension is not needed. For the former, the
10
+ file extension is necessary.
11
+
12
+ Using * instead of a file name will load all gloo files in the folder.
13
+
14
+ SYNTAX
15
+ load <file_name>
16
+
17
+ PARAMETERS
18
+ file_name - Name of the object file that is to be loaded.
19
+
20
+ RESULT
21
+ Objects are loaded into the heap.
22
+ on_load scripts are run within the loaded objects.
23
+
24
+ ERRORS
25
+ Missing Expression!
26
+ - No expression is provided as parameter to the verb.
27
+
28
+ If the file specified can't be found or can't be loaded,
29
+ an error condition will result.
30
+
31
+ EXAMPLE
32
+
33
+ > load my/project/file
34
+ > load my/app/*
35
+ > load ~/.my_app/settings.gloo
36
+
37
+ SEE ALSO
38
+ save
@@ -0,0 +1,42 @@
1
+ MOVE VERB
2
+ NAME: move
3
+ SHORTCUT: mv
4
+
5
+ DESCRIPTION
6
+ Move an object to a new parent.
7
+
8
+ SYNTAX
9
+ move <path.to.object> to <new.parent>
10
+
11
+ PARAMETERS
12
+ path.to.object - The object that we want to move.
13
+ new.parent - The new location for the object.
14
+
15
+ RESULT
16
+ The object will now be in the new location.
17
+
18
+ ERRORS
19
+ Object to move was not specified
20
+ - The <path.to.object> is not specified.
21
+
22
+ Could not find object to move
23
+ - The <path.to.object> cannot be resolved.
24
+
25
+ Move' must include 'to' parent object
26
+ - The 'to' keyword is missing.
27
+ - The <new.parent> is not specified.
28
+
29
+ Could not resolve target
30
+ - The <new.parent> cannot be resolved.
31
+
32
+ EXAMPLE
33
+
34
+ can [can] :
35
+ two [string] : def
36
+ data [can] :
37
+ one [string] : abc
38
+ on_load [script] :
39
+ move can.two to can.data
40
+
41
+ SEE ALSO
42
+ create
@@ -0,0 +1,38 @@
1
+ PUT VERB
2
+ NAME: put
3
+ SHORTCUT: p
4
+
5
+ DESCRIPTION
6
+ Put a value into an object.
7
+ The value is the result of an expression.
8
+
9
+ SYNTAX
10
+ put <expression> into <dst.path>
11
+
12
+ PARAMETERS
13
+ expression - The expression that is evaluated.
14
+ dst.path - The path to the destination object.
15
+
16
+ RESULT
17
+ <it> will contain the result of the evaluation.
18
+
19
+ ERRORS
20
+ Missing Expression
21
+ - The 'into' keyword is missing.
22
+ - No source expression is provided.
23
+
24
+ Target (into) missing
25
+ - The destination is not specified.
26
+
27
+ Target could not be resolved
28
+ - The destination of the put cannot be resolved.
29
+
30
+ EXAMPLE
31
+
32
+ > put 'one' into str
33
+ > put "two" into str
34
+ > put 123 into x
35
+ > put 3 + 5 into x
36
+ > put TRUE into flag
37
+
38
+ SEE ALSO
@@ -0,0 +1,25 @@
1
+ QUIT VERB
2
+ NAME: quit
3
+ SHORTCUT: q
4
+
5
+ DESCRIPTION
6
+ Stop running the gloo application.
7
+ Cleanup and shutdown.
8
+
9
+ SYNTAX
10
+ quit
11
+
12
+ PARAMETERS
13
+ None
14
+
15
+ RESULT
16
+ None
17
+
18
+ ERRORS
19
+ None
20
+
21
+ EXAMPLE
22
+
23
+ > quit
24
+
25
+ SEE ALSO
@@ -0,0 +1,41 @@
1
+ RUN VERB
2
+ NAME: run
3
+ SHORTCUT: r
4
+
5
+ DESCRIPTION
6
+ Run a script or other object.
7
+ This is the same as sending a 'run' message to the object.
8
+
9
+ SYNTAX
10
+ run <path.to.object>
11
+ run ~> <expression>
12
+
13
+ PARAMETERS
14
+ path.to.object
15
+ - Reference to the object which will be run.
16
+ - The object must be a runnable object such as a script.
17
+
18
+ expression
19
+ - Evaluate the expression and run it.
20
+
21
+
22
+ RESULT
23
+ The result depends on the object that is run.
24
+
25
+ ERRORS
26
+ Missing Expression!
27
+ - No expression is provided as parameter to the verb.
28
+
29
+ EXAMPLE
30
+
31
+ > run my.script
32
+
33
+ > create s as script : "show 3 + 4"
34
+ > run s
35
+
36
+ Run a script in an evaluated expression:
37
+ > create s as string : "show 3 + 4"
38
+ > run ~> s
39
+
40
+ SEE ALSO
41
+ tell
@@ -0,0 +1,26 @@
1
+ SAVE VERB
2
+ NAME: save
3
+ SHORTCUT: >
4
+
5
+ DESCRIPTION
6
+ Save a previously loaded object to .gloo file. The path will be for the
7
+ root level object that was loaded earlier.
8
+
9
+ SYNTAX
10
+ save <path.to.object>
11
+
12
+ PARAMETERS
13
+ path.to.object - Name of the object file that is to be saved.
14
+
15
+ RESULT
16
+ The file is updated with the latest object state.
17
+
18
+ ERRORS
19
+ None
20
+
21
+ EXAMPLE
22
+
23
+ > save my_obj
24
+
25
+ SEE ALSO
26
+ load
@@ -0,0 +1,30 @@
1
+ SHOW VERB
2
+ NAME: show
3
+ SHORTCUT: =
4
+
5
+ DESCRIPTION
6
+ Show an object's value.
7
+
8
+ SYNTAX
9
+ show <path.to.object>
10
+
11
+ PARAMETERS
12
+ path.to.object - The object that we want to see.
13
+
14
+ RESULT
15
+ The object's value is shown.
16
+ <it> will contain the object's value.
17
+
18
+ ERRORS
19
+ None
20
+
21
+ EXAMPLE
22
+
23
+ > show "me"
24
+ > show "hello " "world"
25
+ > show 132 * 23
26
+
27
+ > create x : "boo"
28
+ > show x
29
+
30
+ SEE ALSO
@@ -0,0 +1,34 @@
1
+ TELL VERB
2
+ NAME: tell
3
+ SHORTCUT: ->
4
+
5
+ DESCRIPTION
6
+ Send a message to an object.
7
+ Ask the object to perform an action.
8
+
9
+ SYNTAX
10
+ tell <path.to.object> to <message>
11
+
12
+ PARAMETERS
13
+ path.to.object - The object that we want to see.
14
+ message - The message to send.
15
+
16
+ RESULT
17
+ The result depends on the message that is sent.
18
+
19
+ ERRORS
20
+ Missing message!
21
+ - No message was specified, or the 'to' keyword is missing.
22
+
23
+ Object was not found
24
+ - The target of the message was not found.
25
+
26
+ EXAMPLE
27
+
28
+ > tell an.obj to unload
29
+ > tell the.script to run
30
+ > tell my.str to up
31
+ > tell the.container to count
32
+
33
+ SEE ALSO
34
+ run
@@ -0,0 +1,38 @@
1
+ UNLESS VERB
2
+ NAME: unless
3
+ SHORTCUT: if!
4
+
5
+ DESCRIPTION
6
+ Unless an expression is true, do something.
7
+ This is the opposite of the if verb.
8
+
9
+ SYNTAX
10
+ unless <true> do <command>
11
+
12
+ PARAMETERS
13
+ true - Does the expression evaluate to true?
14
+ command - Execute command if the expression is not true.
15
+
16
+ RESULT
17
+ Unchanged if the expression is true.
18
+ If not true, then the result will be based on the command
19
+ specified after the 'do' keyword.
20
+
21
+ ERRORS
22
+ Missing Expression!
23
+ - No expression is provided as parameter to the verb.
24
+
25
+ Other errors depend on the command that is run.
26
+
27
+ EXAMPLE
28
+
29
+ unless [container] :
30
+ x [bool] : true
31
+ false_msg [string] : It is NOT true!
32
+ on_load [script] :
33
+ unless unless.x do show "first time: " + unless.false_msg
34
+ put false into unless.x
35
+ unless unless.x do show "second time: " + unless.false_msg
36
+
37
+ SEE ALSO
38
+ if
@@ -0,0 +1,32 @@
1
+ VERSION VERB
2
+ NAME: version
3
+ SHORTCUT: v
4
+
5
+ DESCRIPTION
6
+ Show the application version information.
7
+
8
+ This is the same as showing the version by running gloo
9
+ with the --version command line parameter.
10
+
11
+ SYNTAX
12
+ version
13
+
14
+ PARAMETERS
15
+ None
16
+
17
+ RESULT
18
+ None
19
+
20
+ ERRORS
21
+ None
22
+
23
+ EXAMPLE
24
+
25
+ > version
26
+ > v
27
+
28
+ This is the same as running this from the command line:
29
+
30
+ > gloo --version
31
+
32
+ SEE ALSO
@@ -0,0 +1,29 @@
1
+ WAIT VERB
2
+ NAME: wait
3
+ SHORTCUT: w
4
+
5
+ DESCRIPTION
6
+ Wait for the given number of seconds.
7
+
8
+ SYNTAX
9
+ wait <seconds>
10
+
11
+ PARAMETERS
12
+ seconds - The number of seconds.
13
+ If no value is given, we'll wait for 1 second.
14
+
15
+ RESULT
16
+ None
17
+
18
+ ERRORS
19
+ None
20
+
21
+ EXAMPLE
22
+
23
+ > wait
24
+ > wait 3
25
+
26
+ > create x as int : 10
27
+ > wait x
28
+
29
+ SEE ALSO