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 / First Aid / October 2006

Tip: Looking for answers? Try searching our database.

How to parse a complex logical formula ?

Thread view: 
mc31 - 30 Oct 2006 10:17 GMT
Hi to all,

I develop a simple GUI which contains search criteria. User enters a
criteria and when click on OK, the app execute the corresponding SQL
statement.

The criteria could be a formula string such as:
((A OR B AND C) OR (D AND E)) OR F

I would like to parse this kind of formula in order to separate the
subsets (A OR B AND C), (D AND E), ... and then convert it to SQL
syntax.

Is there a simple way for doing that?

Thanks for your help

Marie
Oliver Wong - 30 Oct 2006 15:53 GMT
> Hi to all,
>
[quoted text clipped - 10 lines]
>
> Is there a simple way for doing that?

   It's simple, if you know how. Learning how can take a while, though.
Google for "parser generators" or for "ANTLR".

   - Oliver


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.