From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <75504d05c991d9e14a40acdbc4bfa7c7@vitanuova.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] first capital letter in function names at man pages, why? Date: Thu, 20 May 2004 19:42:08 +0100 From: rog@vitanuova.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 81c84608-eacd-11e9-9e20-41e7f4b1d025 > you'd better write N parsers. actually it's not an unreasonable idea to have a regular expression engine that could work on arbitrary alphabets. you could express it quite nicely with the new limbo polymorphism stuff: match[T](c: chan of T, p: ref Regex[T]): int for { T => eq: fn(t: self T, t1: T): int; eof: fn(t: self T): int; } so the alphabet would consist of members of type T, arriving down channel c, being matched against a previously compiled pattern p. match would return when it enounters a match, or reads a t such that t.eof() is true. then you could write N parsers and just plug 'em in. i've got something that would allow one to use this kind of stuff with a shell-like syntax. it's awaiting a bit more of my time...