Re: [netmod] regular expression flavours (again)

Robert Varga <nite@hq.sk> Fri, 14 June 2019 13:05 UTC

Return-Path: <nite@hq.sk>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F2DE9120072 for <netmod@ietfa.amsl.com>; Fri, 14 Jun 2019 06:05:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Level:
X-Spam-Status: No, score=-1.997 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=hq.sk
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SlEieh1KLMcD for <netmod@ietfa.amsl.com>; Fri, 14 Jun 2019 06:05:09 -0700 (PDT)
Received: from mail.hq.sk (hq.sk [81.89.59.181]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 64A18120052 for <netmod@ietf.org>; Fri, 14 Jun 2019 06:05:07 -0700 (PDT)
Received: from nitebug.nitenet.local (chello085216197060.chello.sk [85.216.197.60]) by mail.hq.sk (Postfix) with ESMTPSA id D8CF3243FA8; Fri, 14 Jun 2019 15:05:04 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hq.sk; s=mail; t=1560517504; bh=yiFgNnfI/g8AIimbcudlr6fVi3GIGafO+HIo4tlCfLg=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=KAvB8oT7YbyWq21PQKvipLH6aNPfGJdk0QNhlqKQhz78avzzVf9OlpM58sj1Ch/nt w2N2nzV0ok//ZB+u8GBBNQryIxu2qlG8s8uUvIIYM077tFpN+FSwhhw+brVVooYQx8 n7sykXXH1U569LmMqGa2o0eHQlpOip9tScW/l2cU=
To: Carsten Bormann <cabo@tzi.org>, "Rob Wilton (rwilton)" <rwilton@cisco.com>
Cc: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, NETMOD WG <netmod@ietf.org>
References: <291106e34498ebd68f26bf9ff9b679dd5bd8f0cd.camel@nic.cz> <20190612092555.xotrr4moh36xv4kl@anna.jacobs.jacobs-university.de> <4611382f-be58-a20f-1712-e5fb3e4ef3ec@hq.sk> <20190613140655.jyq3iltl2v22ekmb@anna.jacobs.jacobs-university.de> <BYAPR11MB26311142F2841456A42623CDB5EE0@BYAPR11MB2631.namprd11.prod.outlook.com> <815A80B5-A05F-4867-BFF4-7C08081F433A@tzi.org>
From: Robert Varga <nite@hq.sk>
Openpgp: preference=signencrypt
Message-ID: <9c16eaf8-5b68-a0b6-7903-09c447cd95e1@hq.sk>
Date: Fri, 14 Jun 2019 15:04:51 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0
MIME-Version: 1.0
In-Reply-To: <815A80B5-A05F-4867-BFF4-7C08081F433A@tzi.org>
Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="yIWhf9ppYF4Pk0m3bf9z6ypCPkAKybXsM"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/oFu-ewLimbXU8hYpaOpmcJgc5KU>
Subject: Re: [netmod] regular expression flavours (again)
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Jun 2019 13:05:12 -0000

On 14/06/2019 11:56, Carsten Bormann wrote:
> Now the main deployability problem with W3C XSD regexes is that they added some functionality that is sorely missing in other dialects, such as character class subtraction, so it is more than an hour of work to write a converter from XSD regexes to you favorite flavor.  Maybe we should encourage some open source software in this spaceā€¦

Having gone through the path of:
- just throw it in java.util.regex.Pattern, with ^$ wrapped
- oh yeah, that does not work for complex patterns
- oh wait, character class references are different
- oh wait, character groups are different
...

I decided to take this exact approach here:
https://git.opendaylight.org/gerrit/73875 . The idea is to contribute
the ANTLR grammar to https://github.com/antlr/grammars-v4/ so that
anybody working with a language supported by ANTLR can get some head start.

This work low priority for me, though, as the current set of hacks work
well enough and a complete solution requires Java 9 anyway -- so anyone
is free to pick it up...

Regards,
Robert