49
edits
| Line 40: | Line 40: | ||
: In this case: echos 'fred' to console, runs a Lua statement that adds '1 + 3' and prints the result, creates an alias 'bob', creates 'fred' variable that the alias 'bob' will show the value of, runs the 'bob' alias that effectively prints the value of 'fred' that is 'james'. | : In this case: echos 'fred' to console, runs a Lua statement that adds '1 + 3' and prints the result, creates an alias 'bob', creates 'fred' variable that the alias 'bob' will show the value of, runs the 'bob' alias that effectively prints the value of 'fred' that is 'james'. | ||
== Script | == Script details == | ||
In the pseudo-syntax examples in these descriptions, a space ' ' is the same as any whitespace except newline, and all of the newline chars are represented by just '\n', to make easier to read. Text with no line '\n' delimiters is considered a single line. The examples are illustrative and not exact, the descriptions are correct. | In the pseudo-syntax examples in these descriptions, a space ' ' is the same as any whitespace except newline, and all of the newline chars are represented by just '\n', to make easier to read. Text with no line '\n' delimiters is considered a single line. The examples are illustrative and not exact, the descriptions are correct. | ||
Syntax: | |||
<kua>command-name; command-name other-text; command-name other-text // comment text</kua> | |||
Example: | |||
<kua>print bob; bind U +attack // changing binding</kua> | |||
Addendum I: | |||
:1. Matching '{' and '}' can be used as third set of quotes to delimit other-text, as in main section item 8. | |||
Base rules: | |||
:1. 'Statement' is a text block that begins with a command name, and is followed by any other text, and ends with line-end or semi-colon. A new statement can begin adjacent to the previous statements ending delimiter. | :1. 'Statement' is a text block that begins with a command name, and is followed by any other text, and ends with line-end or semi-colon. A new statement can begin adjacent to the previous statements ending delimiter. | ||
::<kua>statement[\n;]statement[\n;]...</kua> | ::<kua>statement[\n;]statement[\n;]...</kua> | ||
| Line 68: | Line 78: | ||
:11. Command names in this context can contain any character except white-space and ';' and cannot contain '//'. Command names can also have quote characters in the name and are not checked for closing quotes and treated as is as a part of the name. Valid command names: bob/"bob"/bob, "bob", "bob, bob". | :11. Command names in this context can contain any character except white-space and ';' and cannot contain '//'. Command names can also have quote characters in the name and are not checked for closing quotes and treated as is as a part of the name. Valid command names: bob/"bob"/bob, "bob", "bob, bob". | ||
::<kua>+zoom</kua> | ::<kua>+zoom</kua> | ||
12. 'Executable statements' are composed of both the parsed 'command name' and 'other text' components, excluding comments | :12. 'Executable statements' are composed of both the parsed 'command name' and 'other text' components, excluding comments | ||
== Notes == | == Notes == | ||
* | * | ||