Re: Call for objections: revision of keyword classification
От | Thomas Lockhart |
---|---|
Тема | Re: Call for objections: revision of keyword classification |
Дата | |
Msg-id | 3BEB7605.30DA5F4D@fourpalms.org обсуждение исходный текст |
Ответ на | Re: Call for objections: revision of keyword classification (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: Call for objections: revision of keyword classification
|
Список | pgsql-patches |
... > Thinking about that, it seems like it might be nice to have a master > keyword file that contains just keywords and classifications: ... > and make some scripts that generate both keyword.c and the list > productions in gram.y automatically. (Among other things, we could stop > trusting manual sorting of the keyword.c entries ...) Peter's > documentation generator would no doubt be a lot happier too --- we > could add indications of SQL92 and SQL99 reserved status to this > master file, for example. istm that we would have a better time using gram.y as the definitive source for this list. Trying to stuff gram.y from some other source file moves the information another step away from bison, which is the definitive arbiter of correct behavior and syntax. Complaints that things are too hard to figure out won't get better by having more indirection in the process, and no matter how we do it one will still need to understand the relationships between tokens and productions. We could have a perl script (haven't looked; maybe Peter's utility already does this?) which rummages through gram.y and generates keyword.c. And if we wanted to categorize what we implement wrt SQL9x definitions, we should do a join from lists in SQL9x against our keywords, rather than trying to maintain that relationship manually. We could even find some database to do it for us ;) - Thomas
В списке pgsql-patches по дате отправления: