On 02/22/11 03:49 PM, rjf wrote:
A parser for the maxima language is not only easier to write,
it is available in source form. It is also based on a well known
technique which is also used by Reduce. The real difficulty is
to implement a Mathematica language parser, since the language
fails to fit the standard expectations for computer languages.
I know you said that, but I've herd different from another source. See
http://groups.google.com/group/comp.compilers/msg/8c4e6ccad3c40599
The person there, who is the CTO of a company producing this
http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html
which has an option for a Mathematica parser (I assume the Mathematica parser
costs extra too).
He says Mathematica is not a particularly difficult language to parse, and a GLR
parser is a bit over the top.
Do you have any comments about the viability of using a GLR parser? If you
believe it is not suitable, it might be helpful if you contributed to that
discussion on comp.compilers.
I find it someone hard to believe Steven Wolfram would have written his own
parser, rather than use a standard one, as it would have made his life a lot
more difficult. (Of course, he could have done it to obfuscate the language, but
I'm not so convinced that he did that. Otherwise he would not have left so much
of Mathematica in simple text files - now more is built into the kernel of course.
For example, the lexical analysis cannot be done by a finite
state machine, and is not LALR(1), a category of grammar sufficient
for almost any reasonable language. But they already have that.
(Oh, there is one of those, free in MockMMA...)
If a standard parser of some sort could be used, it is much more attractive than
a hand-written one like you have. From what I understand, after reading some
compiler books, writing the parser by hand is not only tedious, but it's quite
difficult to make the inevitable small changes, so the maintenance costs are
much higher than using a standard parser.
While I assume that some people at WRI may be observing the Sage
activity, I doubt that they feel Sage breathing down their necks.
Time will tell. I think there is an increased acceptance of open-source software
now, especially in these rather tight economic times. Sage certainly lacks a lot
of the features of Mathematica, and since it is stitches together a large range
of separate tools, Sage is less uniform in its usage.
I don't know how many maths departments are now using Sage, and if they are,
whether Mathematica or Maple is used too.
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
Dave
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org