9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@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	[thread overview]
Message-ID: <75504d05c991d9e14a40acdbc4bfa7c7@vitanuova.com> (raw)

> 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...



             reply	other threads:[~2004-05-20 18:42 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-20 18:42 rog [this message]
2004-05-20 19:21 ` Scott Schwartz
2004-05-20 19:51   ` [9fans] limbo polymorphism rog
2004-05-20 20:10     ` Charles Forsyth
2004-05-20 20:07 ` [9fans] first capital letter in function names at man pages, why? boyd, rounin
2004-05-21 14:05   ` rog
2004-05-21 15:12     ` boyd, rounin
2004-05-21 16:25       ` rog
  -- strict thread matches above, loose matches on Subject: below --
2004-05-21  0:36 dmr
2004-05-21  0:50 ` George Michaelson
2004-05-21  0:59 ` Rob Pike
2004-05-21  2:13   ` boyd, rounin
2004-05-21  5:33   ` Taj Khattra
2004-05-21 15:35   ` Anastasopoulos S
2004-05-21 16:02     ` boyd, rounin
2004-05-22  0:57     ` ron minnich
2004-05-20 14:59 [9fans] first capital letter in function names at man pages ¿why? Alberto Cortes
2004-05-20 15:22 ` Rob Pike
2004-05-20 15:53   ` [9fans] first capital letter in function names at man pages, why? Alberto Cortes
2004-05-20 16:44     ` Russ Cox
2004-05-20 17:20       ` Alberto Cortes
2004-05-20 17:31         ` rog
2004-05-20 17:43           ` Alberto Cortes
2004-05-20 17:50             ` Fco.J.Ballesteros
2004-05-21 17:20               ` Joel Salomon
2004-05-21 17:46                 ` boyd, rounin
2004-05-21 18:11                   ` Jason Gurtz
2004-05-21 18:21                     ` boyd, rounin
2004-05-20 17:53             ` rog
2004-05-20 17:54               ` Alberto Cortes
2004-05-21 10:28             ` Gorka Guardiola Múzquiz
2004-05-21 10:29               ` Dave Lukes
2004-05-21 10:57               ` Alberto Cortes
2004-05-21 11:04                 ` Gorka Guardiola Múzquiz
2004-05-21 12:23                   ` Alberto Cortes
2004-05-21 12:30                     ` Gorka Guardiola Múzquiz
2004-05-21 12:48                       ` Alberto Cortes
2004-05-21 14:25                         ` Fco.J.Ballesteros
2004-05-21 14:34                           ` Alberto Cortes
2004-05-21 14:27                     ` Fco.J.Ballesteros
2004-05-21 14:44                       ` splite
2004-05-21 15:24                       ` boyd, rounin
2004-05-21 15:29                         ` Fco. J. Ballesteros
2004-05-21 16:23                           ` Alberto Cortes
2004-05-21 14:50                     ` boyd, rounin
2004-05-21 15:57                       ` boyd, rounin
2004-05-24  2:10                         ` Micah Stetson
2004-05-24  2:38                           ` Greg Pavelcak
2004-05-24  3:47                             ` Eric KD5UWL
2004-05-24 15:46                               ` boyd, rounin
2004-05-24 22:33                             ` Micah Stetson
2004-05-21 14:22                   ` boyd, rounin
2004-05-20 20:43           ` vdharani
2004-05-20 18:18             ` boyd, rounin
2004-05-20 18:07         ` boyd, rounin
2004-05-20 18:20           ` rog
2004-05-20 23:34           ` Brantley Coile
2004-05-20 17:02     ` Rob Pike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=75504d05c991d9e14a40acdbc4bfa7c7@vitanuova.com \
    --to=rog@vitanuova.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).