Joe Conway <[EMAIL PROTECTED]> writes: > While looking at it the last day or so, I started to think it might be > better to use bison to parse array literals -- or is that a bad idea?
Offhand it doesn't seem like a super-appropriate tool. Once you get past the lexical details like quoting, the syntax of array literals is not complicated enough to need a bison parser. Also, the issues you're facing now like enforcing consistent dimensions are not amenable to solution by a context-free grammar --- so you'd still need most of the dimension-checking mechanisms. There might be something out there that is more useful, but I dunno what. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster