Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: MakeExpression

  • To: mathgroup at
  • Subject: [mg33639] Re: MakeExpression
  • From: Jens-Peer Kuska <kuska at>
  • Date: Thu, 4 Apr 2002 19:39:59 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <a8g2di$b0t$>
  • Reply-to: kuska at
  • Sender: owner-wri-mathgroup at


a_Plus in your definition is nonsense. A head Plus
would require, that a *is* already an expression, but
that can't be the case, because MakeExpression[] is called
to *make* the expression. A RowBox[] *can* only have strings/boxes
in it's list argument and 

RowBox[{"\[FilledCircle]", "[", b__, "]"}], StandardForm] :=
  MakeExpression[RowBox[{"{", b, "}"}], StandardForm]

will parse 

\[FilledCircle][1, 2, 3, 4]

inputs as list {1, 2, 3, 4} *and* has a pattern b__

Hers is an example

RowBox[{RowBox[{"(", a_, ")"}], "[", c___, "]"}], fmt_:StandardForm] :=
  MakeExpression[RowBox[{"\[FilledCircle]", "[", c, "]"}], StandardForm]

that will tranform any combination of (anything)[aSequence] to


Dustin Vink wrote:
> Dear Reader,
> Consider the following Mathematica problem. How does one incorporate
> pattern matching conditions with the command MakeExpression?
> The following does NOT work:
> MakeExpression[RowBox[{a_Plus, "[", b__, "]"}], StandardForm] :=
>   MakeExpression[a, StandardForm]
> Any form of condition used at the lhs seems to be ignored.

  • Prev by Date: Re: Unexpected result with RSolve?
  • Next by Date: Re: Step Info from NDSolve
  • Previous by thread: RE: MakeExpression
  • Next by thread: List, FindRoot, Bessel