I am trying to automate the translation of a huge base of Pascal source
code from one dialect (MetaWare) to another (FreePascal).

One change I need to make is to modify comments like this:

-- This is a comment 

To this

// This is a comment

My current rule looks like this:

SL_COMMENT_2
    :   '--' (options {greedy=false;} : . )* '\n'
        {$channel=HIDDEN;}
    ;

What's the easiest way to modify the rule so that '--' is replaced by
'//'?

I have RTFM but a working solution still eludes me.

Thanks.

-- Bruce
CONFIDENTIALITY NOTICE: This e-mail is confidential and intended
solely for the use of the individual or entity to which it is addressed.  If
you are not the intended recipient, be advised that you have received 
this email in error and that any use, dissemination, forwarding, printing 
or copying of this e-mail is strictly prohibited. If you received this e-mail
in error, please delete it from your computer and contact the sender.


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

Reply via email to