Re: [http-state] algorithm definitions

Bjoern Hoehrmann <derhoermi@gmx.net> Fri, 16 July 2010 15:50 UTC

Return-Path: <derhoermi@gmx.net>
X-Original-To: http-state@core3.amsl.com
Delivered-To: http-state@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id D38B73A6918 for <http-state@core3.amsl.com>; Fri, 16 Jul 2010 08:50:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.092
X-Spam-Level:
X-Spam-Status: No, score=-0.092 tagged_above=-999 required=5 tests=[AWL=-0.093, BAYES_50=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vkO4h4zfSudG for <http-state@core3.amsl.com>; Fri, 16 Jul 2010 08:50:27 -0700 (PDT)
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by core3.amsl.com (Postfix) with SMTP id 457BC3A68A2 for <http-state@ietf.org>; Fri, 16 Jul 2010 08:50:24 -0700 (PDT)
Received: (qmail invoked by alias); 16 Jul 2010 15:50:34 -0000
Received: from dslb-094-223-187-140.pools.arcor-ip.net (EHLO hive) [94.223.187.140] by mail.gmx.net (mp050) with SMTP; 16 Jul 2010 17:50:34 +0200
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX18YECRqsdkYVEx1x+2azVPaTE0WLB6OZ7LOpJqMFn XME2FLQJxUOhs5
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Julian Reschke <julian.reschke@gmx.de>
Date: Fri, 16 Jul 2010 17:50:33 +0200
Message-ID: <56q046ltt8eedeuasbhmh1ffquojgscgae@hive.bjoern.hoehrmann.de>
References: <4C4061C3.6090606@gmx.de>
In-Reply-To: <4C4061C3.6090606@gmx.de>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "http-state@ietf.org" <http-state@ietf.org>
Subject: Re: [http-state] algorithm definitions
X-BeenThere: http-state@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Discuss HTTP State Management Mechanism <http-state.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/http-state>, <mailto:http-state-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/http-state>
List-Post: <mailto:http-state@ietf.org>
List-Help: <mailto:http-state-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/http-state>, <mailto:http-state-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Jul 2010 15:50:35 -0000

* Julian Reschke wrote:
>Also, if we need algorithms instead of format descriptions, why is it ok 
>to define date parsing using an ABNF (see section 5.1.1)?

There is no need for an algorithm, for instance, "parsing unparsed
attributes" is just greedily matching against e.g. (using XML's EBNF)

  attributes ::= (';' s* av-name s* '='? s* av-value s*)*
  av-name    ::= [^=;]* ([^=;] - s) | ''
  av-value   ::= [^;]* ([^;] - s) | ''

For the initial key-value-pair the grammar would be similar, you would
just make the empty string an invalid name and require the "=" sign,
and specify that failure to match means to ignore the whole thing.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/