Re: Lexer patch question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Lexer patch question
Дата
Msg-id 4515.1118857142@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Lexer patch question  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Oh, I didn't realize lexers would choose the longer token when given
> multiple options.

See lines 95-100 in scan.l:

 * OK, here is a short description of lex/flex rules behavior.
 * The longest pattern which matches an input string is always chosen.
 * For equal-length patterns, the first occurring in the rules list is chosen.
 * INITIAL is the starting state, to which all non-conditional rules apply.
 * Exclusive states change parsing rules while the state is active.  When in
 * an exclusive state, only those rules defined for that state apply.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Lexer patch question
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Add PG version number to NLS files