Current location: Hot Scripts Forums » Programming Languages » Everything Java » Abolish comments in java code

Abolish comments in java code

Reply
  #1 (permalink)  
Old 11-18-04, 03:41 PM
Mr Badger Mr Badger is offline
New Member
 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Abolish comments in java code

I'm trying to write some code that will take a commented java file, remove all the comments and leave the code intact. I managed a method to remove // line comments without much bother, but /* ---*/ multiline comments aren't so simple.

I thought it would be fairly simple when I started, but have now created some bizarre recursive methods (and headaches!) without coming up with a solid solution.

Does anyone know of any simple way to do this, is there a something in the java librarys that would do it?
(My text editor doesn't seem to have much of a problem with it.)

Any thoughts??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-06-04, 10:48 AM
Rob_Darkins Rob_Darkins is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Use of multiple accounts and duplicate questions is not a good idea. Please stick to one account, and one question.

Which I've answered: http://www.programmingtalk.com/showthread.php?t=14763
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Porting from java to c++! addit C/C++ 3 09-14-04 04:11 PM
Porting java to C++! addit Everything Java 0 09-06-04 01:03 PM
SOFIA 2.2 adds Linux and Portal support DanDubinsky General Advertisements 0 05-12-04 10:26 AM
How to sale php code to customer without giving him code pradeep_soft PHP 4 03-12-04 12:10 PM
java source code veena vahini Everything Java 1 01-29-04 10:25 AM


All times are GMT -5. The time now is 10:50 AM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.