Hallo,
if have to unroll a fore loop inside my AST.
For example if have a tree like: (for (= a (: 1 4)) (= output (+ output a))
where a = 1:4 is the condition and (= output (+ output a) is the body of the
for loop.
This tree should be create an output like:
a = 1;
output = output + a;
a = 2;
output = output + a;
a = 3;
output = output + a;
a = 4;
output = output + a;
I have other rules that execute the expressions inside the for loop. This is my
rule of the for loop:
for_command:
^(FOR assign_expression prog*);
So i want to determine the length of the matrix of assign_expression and
execute (prog*) length times. Is it possible to execute the {} Code of a tree
several times?
Something like:
code=(prog*){
code.tree.execute();
}
Bye, Simon.
--
GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.