Hi Stefan,
ANTLR comes with the source code. For issues like this I created patch.jar file
with small fixes to ANTLR and put on a classpath before ANTLR jar files. For
ANTLR 3.1.3 this output is in
antlr-3.1.3/runtime/Java/src/main/java/org/antlr/runtime/tree/TreeRewriter.java,
method
pu
Hi,
I submitted this post before, but in a wrong discussion thread. Sorry for the
mess. I am resubmitting this post in a new thread with additional information.
I am writing a prototype of converter from one language (TSL of WinRunner) to
another (VB Script of QTP).
One of the tasks includes
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
Tree pattern matching seems as an ideal tool for implementing sequence of AST
transformations for a small project I am trying to prototype.
A transformation must convert for-loop like this "for (int i = exp1; i <= exp2;
i++) {..." to something like that "for i from exp1 to exp 2 {..."
Below is a
I encountered the same problem and the best solution I found so far
for literals:
numeric_literal
: INTEGER_LITERAL -> {%{$INTEGER_LITERAL.text}}
| DECIMAL_LITERAL -> {%{$DECIMAL_LITERAL.text}}
| FLOATING_POINT_LITERAL -> {%{$FLOATING_POINT_LITERAL.text}}