Re: 4GL/SQL grammars
Posted in 1994
> > I was working only intermittently on 4GL/SQL grammar (for > lex/yacc), and could not get the time to really finish it. > > I just wondered if someone else may have implemented it already. > Or that it may be available from Informix (fat chance). > I have implemented an SQL SELECT parser using lex and yacc. It is currently in use and seems to work fine. I did run into problems with using yacc and distinquishing between logical and expressional brackets (in the WHERE clause) - so I have an additional requirement that logical brackets be enclosed in a set of brackets. e.g. "SELECT .... WHERE (a = b) or (c = d)" will fail, but "SELECT .... WHERE ((a = b) or (c = d))" will pass. It may be a good starting point if you cannot find exactly what you want. If you would like a copy, then drop me an email. _ (_)__________________________________ | | /| | | Lionel Waugh (_|_____________________________ | | Systems Analyst | / | | AWA Defence Industries | / | | PO Box 161 | Phone: +61 8 256 0373 / | | Elizabeth SA 5112 | Fax: +61 8 255 9117 < | | Australia | Email: lwaugh@awadi.com.au \\ |_|________________________________| \\ | | (______________________________\\ | |