Why is SyntaxQ so opaque??
Why is SyntaxQ so opaque??
In Mathematica, everything is an expression. A generic Mathematica expression is often written in the form
f[x,y]
with the (highly recursive) understanding that the symbols f, x, and y can each themselves represent expressions.
One of the most powerful functions in Mathematica is therefore SyntaxQ, which can take any given input string and determine whether or not it corresponds to an expression.
It seems to me that it should be possible to write an “emulator” of SyntaxQ using only elementary Mathematica functions. Such an emulator would give me, at least, a much deeper insight into the Wolfram Language. Even a “decent approximation” to an emulator would be very helpful.