MathGroup Archive 2002

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

Search the Archive

RE: MakeExpression


> -----Original Message-----
> From: Dustin Vink [mailto:d.vink at mech.gla.ac.uk]
To: mathgroup at smc.vnet.net
> Sent: Thursday, April 04, 2002 1:08 AM
> To: mathgroup at smc.vnet.net
> Subject: [mg33646] [mg33613] MakeExpression
> 
> 
> 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.
> 
> 
> 
Dustin,

what do you want to attain?

MakeExpression acceptes (only) parsed input (structures of tokenized strings
and boxes); the function itself generates Mathematica code (thus
corresponding to the semantic actions of a compiler). 

A consequence is: the Mathematica symbol Plus can never appear as an
argument of MakeExpression. Thus you came to your (false) conclusion. To
help you further you should state your problem (of application). 

--
Hartmut



  • Prev by Date: Re: Unexpected result with RSolve?
  • Next by Date: Re: List, FindRoot, Bessel
  • Previous by thread: MakeExpression
  • Next by thread: Re: MakeExpression