summaryrefslogtreecommitdiff
path: root/src/Scilab2C/ASTGenerator/DescriptionOfmacr2tree.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Scilab2C/ASTGenerator/DescriptionOfmacr2tree.txt')
-rw-r--r--src/Scilab2C/ASTGenerator/DescriptionOfmacr2tree.txt82
1 files changed, 82 insertions, 0 deletions
diff --git a/src/Scilab2C/ASTGenerator/DescriptionOfmacr2tree.txt b/src/Scilab2C/ASTGenerator/DescriptionOfmacr2tree.txt
new file mode 100644
index 00000000..21ec28d7
--- /dev/null
+++ b/src/Scilab2C/ASTGenerator/DescriptionOfmacr2tree.txt
@@ -0,0 +1,82 @@
+Description from Serge Steer
+Date:
+Fri, 28 Jul 2006 12:14:14 +0200
+To:
+raffaele.nutricato@tiscali.it
+CC:
+Fabio.Bovenga@ba.infn.it, Claude.Gomez@Inria.fr, Didier.Halgand@Inria.fr, Serge.Steer@Inria.fr
+
+>> Let me to ask you one more question: I read in the Scilab2C.doc
+>> document that among the tasks related to the Scilab team/ INRIA
+>> there is the "*_FORTRAN to C code translation"_* task. Is it
+>> possible to have more details about this activity?
+
+
+I am not able to answer this question, please ask it to Claude Gomez
+who wrote this document.
+
+
+
+>> Could you please send us a preliminary version of the output that
+>> will be generated by the Scilab2tree tool starting from the
+>> testscilab.sci code?
+
+
+
+If you have Scilab-4.0 installed you can play with it. The
+preliminary version of Scilab2tree is named macr2tree.
+
+here is very simple example of use
+
+-->function y=foo(x)
+--> y=x+1
+-->endfunction
+
+-->t=macr2tree(foo)
+
+It returns the full abstract syntax tree coded by a hierarchical
+structure of tlists and lists Scilab objects. To get a more readable
+display and also to illustrate how Scilab can deal with such a
+structure, I give you below a file of scilab functions for display
+overloading. If this file is loaded into Scilab
+
+--> exec %program_p.sci;
+
+The display of the t structure above become
+
+-->t
+ t =
+
+Program
+Name : foo
+Outputs: y
+Inputs : x
+Statements
+ <EOL>
+ Equal
+ Expression:
+ Operation
+ Operands:
+ x
+ 1
+ Operator: +
+ EndOperation
+ Lhs :
+ y
+ EndEqual
+ <EOL>
+ Funcall : return
+ #lhs : 0
+ Rhs :
+ <empty>
+ EndFuncall
+ <EOL>
+EndProgram
+
+
+These functions work with your testscilab function too (but select
+case constructs are not yet handled). Just try it and look at the
+comment for the structure explanation
+
+Serge Steer
+Scilab Team