Navigation menu

Engine:CCMD run: Difference between revisions

Jump to navigation Jump to search
1,995 bytes added ,  15 October 2023
Line 15: Line 15:


This very basic syntax structure however lends well to being flexible and extensible, and thus sometimes confusing. A complex base Engine script can interact with many different environments and contexts.
This very basic syntax structure however lends well to being flexible and extensible, and thus sometimes confusing. A complex base Engine script can interact with many different environments and contexts.
=== Syntax ===
Script Statement Syntax:
# 'Statements' are text blocks that begin with a command name, and are followed by any other text, and end with line-end or semi-colon. A new statement can begin adjacent to the previous statements ending delimiter.
# Command names begin or end at white-space, semi-colon, or line-end, and end at comment start.
# Other text starts after any white-space after command name, until semi-colon, line-end, or comment start.
# Comment text starts with '//', placed anywhere on a line, and includes all text until line-end.
# Comment text, empty statements or lines, or statements or lines with only white-space, will be skipped.
# Command names must be at least 2 and less than 63 characters. Statements with invalid command names will be skipped.
# Other text may contain quoted text, where '<nowiki>'</nowiki>' or '"' are valid quote begin and end quote characters.
# If quoted text is found, any semi-colons, line-ends, or comment starts will be ignored, until next matching quote character.
# No other checking or processing is done on any 'other text' after the command name, and any actual meaning is context-dependent and determined when the actual statement is run.
# If embedded in text a NULL, or '\0', or any character less than ' ', will be considered as a white-space character. This means that a '\0' delimits a command name, stays included in other-text as is, and is otherwise ignored. This also means that these characters can not be used in command names.
# 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.
# 'Executable statements' are composed of both the parsed 'command name' and 'other text' components, excluding comments, and each are the product of this function which gets run.


== Examples ==
== Examples ==