Re: How to parse a complex logical formula ?
"mc31" <mcostes@xxxxxxxxxxx> wrote in message
news:1162199857.589305.232780@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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?
It's simple, if you know how. Learning how can take a while, though.
Google for "parser generators" or for "ANTLR".
- Oliver
.
Relevant Pages
- Re: mail merge filter criteria
... and that it will occur as soon as you have an OLE DB connection to a data source and specify "is blank" or perhaps "is not blank" as one of the criteria in your "Advanced criteria". ... is null (which in Excel appears to correspond to a cell with no text or formula in it ... The Jet SQL that is used to get data from Excel actually retrieves both ... (microsoft.public.word.mailmerge.fields) - Re: SQL queries that have parameters passed by user
... Erland Sommarskog wrote: ... >> several fields and filters on a criteria that I would like to be user ... >> The query works fine in MS SQL and seems to be fairly quick, ... (comp.databases.ms-sqlserver) - Re: SQL Syntax Error
... match all the criteria you input. ... SQL view and never open it in the query grid view. ... The syntax for the "where" statement is incorrect becuase of this. ... (microsoft.public.access.queries) - Re: QueryTables - Retrieving Data
... data in Excel then filter it using cell formulas, pass your criteria ... ('sql datasource' is particularly vague; if you mean SQL Server then ... The column has an eight digit account code that I need to ... When I 'double click' a cell in the accountnumber ... (microsoft.public.excel.misc) - Re: time criteria in query
... Prove me wrong by providing the SQL ... Or...start a query with just the date field ... criteria, it does actually return the time value properly. ... SQL Server with ODBC, Access should use DAO and therefore require the ... (microsoft.public.access.queries) |
|