Subject: Lie53 Symmetry program translated to maxima
From: Dan Stanger
Date: Sun, 08 Feb 2004 07:54:33 -0500
I guess I didn't make myself clear.
First, I wrote a parser to convert muMath to maxima.
I then started to modify the code by hand to format it.
After working on it for quite a while, I realized I had
made several mistakes with argument ordering for several
functions.
Following is a quote from the gcc cpp man page.
The C preprocessor is intended to be used only with C, C++, and
Objective-C source code. In the past, it has been abused as a general
text processor. It will choke on input which does not obey C's lexical
rules. For example, apostrophes will be interpreted as the beginning
of character constants, and cause errors. Also, you cannot rely on it
preserving characteristics of the input which are not significant to
C-family languages. If a Makefile is preprocessed, all the hard tabs
will be removed, and the Makefile will not work.
Having said that, you can often get away with using cpp on things which
are not C. Other Algol-ish programming languages are often safe
(Pascal, Ada, etc.) So is assembly, with caution. -traditional mode
preserves more white space, and is otherwise more permissive. Many of
the problems can be avoided by writing C or C++ style comments instead
of native language comments, and keeping macros simple.
I wrote macros to do some argument reordering, and tried to use cpp on the
maxima source,
but it choked on unterminated '. I then converted single quotes to (QUOTE)
which is
a cast in C, and it worked. I used the mode which keeps comments, and
formatting.
muMath is a old version of Deriv, and it is written in lisp, however muMath
looks
sort of like Pascal or Modula2.
Dan Stanger