|Newbie questions about Pliant
Trying to get an overall view of the manner in which expression
trees are generated from the parse function.
|Message posted by maybe Ryan on 2001/01/20 20:15:16
|I was introduced to pliant when it was posted on slashdot. I find in very
interesting and the concept of meta-programming is the natural progression
of computing that simply could not have existed before computing power was
as it's current stages. I've read over what there is of the documentation
several times and I'm still haveing diffucility in several areas.
I would really like to get a much better view of the expression graphs.
I intended to create my own expression and then traverse the graph printing
out labels so as the get a "glimpse" of it. The best manner of doing this, I
figured, would be to use the parse function:
var Expression e ; var Str string
string := "x+2"
e := parse string
[traverse e and pring out the labels]
However, i can't even get that far. Every time I try to write a simple program
with the parse function, I get a segmentation fault. I'm including the modules:
Am I forgetting something?
|Message posted by hubert.tonneau on 2001/01/20 21:37:03
|Patrice wrote a wonderfull tool to get familiar with Pliant expressions.
You should read (an hopefully send him feedback about) his tutorial available
and if you are really in a hurry, directly jump to the experimentation page at:
|Message posted by pom on 2001/01/21 13:59:27
|The parse function seems to be in a very old state and a bit buggy.
I probably will propose another one someday.
The one I wrote is also not perfect as it does not work properly in multi-thread
|Message posted by pom on 2001/01/21 14:02:25
|An alternative for simple experimentation is to write something like:
named_expression toto (x:=2)
# or something more complicated like
# named_expression toto
# for (var Int i) 1 100
# console i*i eol
console toto eol # writes the expression "a la LISP"