Ambiguous Types in Flex, how to handle?

foxrc@bigfoot.com (Randall Fox)
17 Jan 2003 20:10:48 -0500

          From comp.compilers

Related articles
Ambiguous Types in Flex, how to handle? foxrc@bigfoot.com (2003-01-17)
| List of all articles for this month |

From: foxrc@bigfoot.com (Randall Fox)
Newsgroups: comp.compilers
Date: 17 Jan 2003 20:10:48 -0500
Organization: http://groups.google.com/
Keywords: types, question
Posted-Date: 17 Jan 2003 20:10:47 EST

Hello.


Using FLEX/BISON, I'm building a small database program that will
handle a small subset of SQL.


My Database handles two types, FLOAT and DOLLAR.


How should I handle the ambiguous "1.23" which can be interpreted by
flex as a DOLLAR and a FLOAT (FLOAT will be IEEE, and DOLLAR will be a
64 bit int with a fixed, or implied, decimal place)??


As it stands, flex can't make the determination, but at what point in
the process should the determination be made? In the grammar? or in
my program when I am working with the AST that BISON creates?


I guess I am looking for advice from the experienced..


Thank you


Randall Fox
[Probably in the AST, since you may be doing other optimizations there
as well. -John]



Post a followup to this message

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