Syntactic rules

Syntactic rules Syntactic rules of the KVIrc scripting language

In the following table you can find a good part of the KVIrc scripting language syntactic rules.
<entity> indicates an entity that can appear exactly one time.
[<entity>] indicates an optional entity.
{<entity>} indicates an entity that can appear one or more times.
'entity' indicates a literal entity: written exactly as it is.
<entity1>|<entity2> indicates mutually exclusive choices.
The mutually exclusive choices are often separated in two or more rules (productions), to improve readability.

<command buffer> | [<whitespace>][<command block>]{<command buffer>}
<command buffer> | [<whitespace>][<single command>]{<command buffer>}
<whitespace> | {<space>|<tab>|<newline>}['\'<newline>][<whitespace>]
<space> | ' '['\'<newline>][<space>] (ASCII space character)
<tab> | '\t' (ASCII horizontal tabulation character)
<newline> | '\n' (ASCII line feed (LF) character)
<command block> | '{' <command buffer>[<whitespace>] '}'
<single command> | <comment>
<single command> | <lvalue command> <command terminator>
<single command> | <rvalue command> <command terminator>
<comment> | '#' {<non comment terminator>} <comment terminator>
<comment terminator> | <newline> | <end of string>
<end of string> | No character (internally ASCII character 0)
<command terminator> | <newline> | <end of string> | ';'
<non comment-terminator> | Any ASCII character except <newline> and <end of string>
<simple command> | [<module name>'.']<command name>[<switch list>]{<space>}<command dependent part>
<lvalue command> | <variable>[<space>]<operation>
<lvalue command> | <variable>'->'<object command>
<lvalue command> | <identifier>'->'<object command>
<operation> | <one op operator>
<operation> | <two op operator>[<space>]<param string>
<switch list> | {<space>}'-'<alpha char>[{<space>}'='<single parameter>][<switch list>]
<command name> | <alphanumeric char>{<alphanumeric char>}
<module name> | <alphanumeric char>{<alphanumeric char>}
<alphanumeric char> | Ascii characters 'A' to 'Z', 'a' to 'z', '0' to '9' and '_'
<variable> | <global variable> | <local variable>
<global variable> | '%' <uppercase letter> [<alphanumeric char>]['['<param string>']']
<local variable> | '%' <lowercase letter> [<alphanumeric char>]['['<param string>']']
<param string> | [<single parameter>][<space>[<param string>]]
<single parameter> | <variable> | <identifier> | <nonterminator token> | <string>
<nonterminator token> | <nonterminator char>['\'<newline><nonterminator char>]
<nonterminator char> | Any ascii character except <space> and <command terminator>
<command dependent part> | Production in each command help page

To be continued...

Index, Language Overview