This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

MakeExpression

MakeExpression
is the low-level function used in Mathematica sessions to construct expressions from boxes.
  • You can give definitions for MakeExpression to specify your own rules for how boxes should be converted to expressions.
  • MakeExpression is used whenever boxes are supplied as input to Mathematica.
  • The boxes that are fed to MakeExpression are constructed from textual input by forming tokens, then grouping these according to standard Mathematica operator precedence rules, stripping out spacing characters. StyleBox and other objects not intended for interpretation are removed. »
  • Definitions you give for MakeExpression will override built-in Mathematica rules for processing input.
  • Giving input prefaced by \ makes Mathematica effectively perform MakeExpression.
Convert boxes to an expression using StandardForm rules:
Convert boxes to an expression using StandardForm rules:
In[1]:=
Click for copyable input
Out[1]=
Convert boxes to an expression using TraditionalForm rules:
Convert the same boxes using StandardForm rules:
The display of a box structure with style information:
MakeExpression removes the style information:
MakeExpression does not evaluate the expression, while ToExpression does:
Display an InterpretationBox:
The expression is the second argument of the InterpretationBox:
Input containing invalid or incomplete syntax results in ErrorBox expressions:
New in 3