Hi, I am writing a prototype of converter from one language (TSL of WinRunner) to another (VB script of QTP).
One of the task includes identification of statement sequence similar to one below int i = 0; A[i++] = e1; A[i++] = e2; ... A[i++] = eN; and rewriting it to something like that (the code may be not exact, but the idea should be clear) Dim A(20) A(0) = e1 A(1) = e2 ... A(20) = e20 I am trying to solve this task by using AST rewrites. I tried to use pattern matching (with options output = AST; filter = true; rewrite=true;), but was not able to make pattern matching to recognize sequence of nodes. Option greedy=true on the rule did not help. My conclusion was that pattern matching could only works with a tree, not sequence of trees. Please let me know if I am mistaken here. Will it work with syntactic predicate? I did not try AST rewrite option without filter yet. Is it the right way? Could somebody give me some hints how to come to resolution of this task using ANTLR? I have limited experience with ANTLR and any help would be appreciated. Thanks in advance, Viktor 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 -~----------~----~----~----~------~----~------~--~---
