Wolfram Language & System 11.0 (2016)|Legacy Documentation
The Wolfram Language uses various syntactic rules to interpret input that you give, and to convert strings and boxes into expressions. The version of these rules that is used for StandardForm and InputForm in effect defines the basic Wolfram Language. The rules used for other forms, such as TraditionalForm, follow the same overall principles, but differ in many details.
|a, xyz, αβγ||symbols|
|"some text", "α+β"||strings|
|+, ->, ≠||operators|
|(*comment*)||input to be ignored|
When you give text as input to the Wolfram Language, the first thing that the Wolfram System does is to break the text into a sequence of tokens, with each token representing a separate syntactic unit.
Thus, for example, if you give the input xx+yy-zzzz, the Wolfram System will break this into the sequence of tokens xx, +, yy, - and zzzz. Here xx, yy, and zzzz are tokens that correspond to symbols, while + and - are operators.
Operators are ultimately what determine the structure of the expression formed from a particular piece of input. The Wolfram Language involves several general classes of operators, distinguished by the different positions in which they appear with respect to their operands.
Operators typically work by picking up operands from definite positions around them. But when a string contains more than one operator, the result can in general depend on which operator picks up its operands first.
|Extensions of symbol names||x_,#2,e::s, etc.|
|Function application variants||e[e],e@@e, etc.|
|Power‐related operators||√e,e^e, etc.|
|Addition‐related operators||e⊕e,e+e,e⋃e, etc.|
|Relational operators||e==e,e∼e,e⪡e,e⧏e,e∈e, etc.|
|Arrow and vector operators||e⟶e,e↗e,e⇌e,e⥓e, etc.|
|Logic operators||∀ee,e&&e,e∨e,e⊢e, etc.|
|Pattern and rule operators||e..,e|e,e->e,e/.e, etc.|
|Pure function operator||e&|
|Assignment operators||e=e,e:=e, etc.|
The table in "Operator Input Forms" gives the complete ordering by precedence of all operators in the Wolfram Language. Much of this ordering, as in the case of * and +, is determined directly by standard mathematical usage. But in general the ordering is simply set up to make it less likely for explicit parentheses to have to be inserted in typical pieces of input.
Input to the Wolfram Language can be given not only in the form of one‐dimensional strings, but also in the form of two‐dimensional boxes. The syntax of the Wolfram Language covers not only one‐dimensional constructs but also two‐dimensional ones.