Re: [PATCHES] dollar quoting

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] dollar quoting
Дата
Msg-id 6259.1076986492@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] dollar quoting  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
>> Parsing is a whole nother ball of wax besides lexing.

> Forgive my lameness, but I've never truly figured out where parsing ends 
> and lexing begins.  Anyone care to illuminate me on the difference?

The theoretical answer is that you can do lexing with a finite-state
machine, but parsing generally requires a stack, because it supports
nested constructs.  Lexers don't have any way to describe nested
constructs --- a series of tokens is the only level of abstraction there
is.

The practical answer is that you do one with flex and the other with
bison ;-).  If you can do it with flex, and not cheat by implementing
your own state stack, it's lexing.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: [PATCHES] dollar quoting
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] dollar quoting