Site Tools


ircii_syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ircii_syntax [2007/02/12 22:57] (current)
Line 1: Line 1:
 +======Syntax of the ircII language:​======
 +The ircII language is organized into //blocks//.
 +
 +A //block// is a sequence of //​statements//​ separated by semicolons.
 +
 +A //​statement//​ is one of the following
 +  * A //command statement//
 +  * An //​expression statement//
 +  * A //block statement//
 +
 +A //command statement// is of the form 
 +    command arguments
 +The //command// is separated from the //​arguments//​ by a [[space character]].
 +The //command// is either an [[alias command|alias]] or a //built-in command//.
 +
 +A //​expression statement// is of the form
 +    @expression
 +or
 +    (expression)
 +The [[expressions|expression]] is evaluated, but it's return value is ignored.
 +
 +A //block statement// is of the form
 +    { block }
 +which allows you to nest [[block]]s anywhere you need them.
 +
 +=====Expando substitution:​=====
 +All //command statements//​ undergo expando-substitution ($'s are expanded)
 +before the //command// is separated from the //​arguments//​. ​ This is a
 +deliberate feature that allows you to use variables as commands. ​ This
 +expansion is global over the entire statement and occurs regardless of
 +what the command actually ends up being. ​ There is no way to override this
 +on a command-by-command basis.
 +
 +//​Expression statements//​ do not undergo expando-substitution,​ although ​
 +some operators do permit expandos to be operands. ​ Those expandos are 
 +expanded on a case-by-case basis by the expression parser.
 +
 +//Block statements//​ never undergo expando-substitution,​ although any 
 +//command statements//​ contained within will be as they are executed.
 +
 +
  
ircii_syntax.txt ยท Last modified: 2007/02/12 22:57 (external edit)