Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 36CAD5EC6B9 for ; Mon, 16 Jan 2012 11:20:01 -0400 (AST) Received: from lo.gmane.org ([80.91.229.12]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RmoLk-0004xK-Kg for pgsql-sql@postgresql.org; Mon, 16 Jan 2012 15:20:01 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RmoI0-0003u0-AK for pgsql-sql@postgresql.org; Mon, 16 Jan 2012 16:16:04 +0100 Received: from f054053171.adsl.alicedsl.de ([78.54.53.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Jan 2012 16:16:04 +0100 Received: from tim by f054053171.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Jan 2012 16:16:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: pgsql-sql@postgresql.org To: pgsql-sql@postgresql.org From: Tim Landscheidt Subject: Re: Token separation Date: Mon, 16 Jan 2012 15:12:26 +0000 Organization: Lines: 42 Message-ID: References: <17710.1326647758@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: f054053171.adsl.alicedsl.de Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:cNbG4Q3qzvFZlzzpiBmEoT4yzt8= X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201201/66 X-Sequence-Number: 36237 Tom Lane wrote: >> [ "0x13" is lexed as "0" then "x13" ] >> Is this behaviour really conforming to the standard? > Well, it's pretty much the universal behavior of flex-based lexers, > anyway. A token ends when the next character can no longer sensibly > be added to it. I know, but - off the top of my head - in most other lan- guages "0abc" will then give a syntax error. > Possibly the documentation should be tweaked to mention the > number-followed-by-identifier case. Especially if you consider such cases: | tim=# SELECT 1D1; SELECT 1E1; SELECT 1F1; | d1 | ---- | 1 | (1 Zeile) | ?column? | ---------- | 10 | (1 Zeile) | f1 | ---- | 1 | (1 Zeile) | tim=# I don't think it's common to hit this, but the documentation surely could use a caveat. I will write something up and submit it to -docs. Thanks, Tim