Hi,

On line 499 of TokenRewriteStream, I find this line, which is consolidating 
adjacent InsertBeforeOp objects.

iop.text = catOpText(iop.text,prevIop.text);

The problem (at least it seems to be) is that it consolidates them in the 
opposite of the expected order. Let me give you an example. 
Suppose I have a token whose text "A", and suppose I perform a first 
insertAfter operation to insert the text "B".
Later on I perform a second insertAfter operation with the text "C". 

My expectation is that calling toString on the TokenRewriteStream produces 
"ABC". But this
is not the case due to the parameter order of catOpTest. Instead, I get "ACB". 
And as far as
I can tell there is no way around this.Can anyone tell me a solution? I tried 
inserting "B" and "C" before the token *after* "A". But when I look in the 
antlr code, all insertAfter calls internally convert to insertBefore, so this 
of course produced exactly the same result ..."ACB".


-geoff
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address

Reply via email to