"Gevik Babakhani" <pgdev@xs4all.nl> writes:
> Would a yacc/lex parser be better?
Almost certainly neither workable nor an improvement if you did make it
work. Datetimes don't have enough structure to make yacc useful, and
it's not flexible enough either.
regards, tom lane