Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / August 2004

Tip: Looking for answers? Try searching our database.

jflex lexer problem

Thread view: 
Aless - 28 Aug 2004 17:33 GMT
hi

i am working on a simple lexical analyzer with jflex

what i want is to remove the comments of a code of the form:
{ coment }
i build this patterns:

coment = "{"[^{]"}"
....
...

{coment}  { stringout += ""}

stringout is where i save the formated text. It removes the comments but
instead of the comment it puts a blank line in the output like:

some code
{this is
   a comment}
more code

is formated to

some code

more code

how can i remove the comments and the blank lines completely?

thanks

--
Aless
user@domain.invalid - 29 Aug 2004 23:09 GMT
Maybe you should include the prefixing and
postfixing blanks in your pattern.

> hi
>
[quoted text clipped - 30 lines]
> --
> Aless


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.