RPN Query Language Statement Building

"Peter" <peter@somewhere.net>
11 Nov 2000 10:13:04 -0500

          From comp.compilers

Related articles
RPN Query Language Statement Building peter@somewhere.net (Peter) (2000-11-11)
| List of all articles for this month |

From: "Peter" <peter@somewhere.net>
Newsgroups: comp.compilers
Date: 11 Nov 2000 10:13:04 -0500
Organization: Compilers Central
Keywords: design
Posted-Date: 11 Nov 2000 10:13:04 EST

I'm in need of some guidance on writing an RPN query language statment
builder. In principle this would be similar to an SQL statement
generator (that are found in GUI report generator products).

I will not trouble the group with the arcane details of the
application (I imagine that would be unnecessary in any event). I
have a BNF for the query language and I know what the format of the
input will be (CGI query string, ie. value-data pairs).

Input ===> X ===> Well-formed RPN Query Statements

Are there any established methods for accomplishing this kind of task ?

To what area of computer science (if any)does query language (or
programming language) generation belong ?

More generally the problem is one of generating well-formed statements
for a given language or perhaps translating from one well-formed
language to another.

Can anyone please provide any references (url or books) ?

[Building RPN from a parser is very easy. Use a bottom-up parser (or use
a top-down one but be sure to do the statement recognition in the same order
that bottom up would do) and every time you recognize a statement, output
the operator for that statement. With very few tweaks, you get RPN.
See any compiler text. Compiling SQL or a 4GL is not very different from
compiling lower level languages except at the code generation stage.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.