Ask for the syntax of representing operators in Common-Lisp
Subject: Ask for the syntax of representing operators in Common-Lisp
From: Robert Dodier
Date: Mon, 10 Jul 2006 21:12:13 +0000
Hello,
> In order to write the compiler, I need to know exactly about the abstract
> syntax to parse the above file, or at least the syntax to parse the part
> representing the expression "((MPLUS SIMP)
> ((MTIMES SIMP) ((RAT SIMP) 1 2) ((MEXPT SIMP) $X 2))
> ((MTIMES SIMP) ((RAT SIMP) 1 3) ((MEXPT SIMP) $X 3))))
Not sure what you want to do, but working with the S-expression
is probably the right thing to do if you need to manipulate the
expression -- it is essentially a parse tree. Maybe you can find
a S-expression parser already written in the language of your choice.
About internal representation of Maxima expressions, see:
http://maxima.sourceforge.net/wiki/index.php/outline%20of%20Maxima%20internalshttp://maxima.sourceforge.net/wiki/index.php/Maxima%20internals
HTH
Robert Dodier