[developers] TDL syntax extension for regular expressions

Peter Adolphs Peter.Adolphs at dfki.de
Thu Jan 29 20:42:21 CET 2009


Hi!

Francis Bond wrote:
>     our current proposal is ^[a-z]+$
> 
> Do we gain anything by having separate symbols for start and end?  I
> would have thought ^regexp^ can do the job just as well, without taking
> up another precious character :-).

We are only restricting the possible uses of ^: sequences starting with ^ have
to terminate with $. This doesn't prevent you from introducing some other
language element that uses $. Templates are still parsed, for instance.

The advantage of that syntax are that a) it raises the right intuitions that
this thing is indeed a regex, b) it makes the anchoring explicit, and c) we need
no extra character escaping convention beyond the perl regex conventions.

Cheers,

Peter

-- 
Peter Adolphs
DFKI GmbH, Projektbuero Berlin, Alt-Moabit 91c, D-10559 Berlin
Telefon: 030 / 39 49 18 26
_______________________________________________________________

Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Strasse 122, D-67663 Kaiserslautern

Geschaeftsfuehrung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff

Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes

Amtsgericht Kaiserslautern, HRB 2313



More information about the developers mailing list