Re: Arg decoding with a template?
by David Bolen other posts by this author
Aug 1 2001 2:23AM messages near this date
Re: Arg decoding with a template?
|
Re: Arg decoding with a template?
"Steve Holden" <sholden@[...].com> writes:
> Was this the one that allowed to you define command lines like
>
> COPY FROM <file> TO <file>
>
> and variations could be deduced from the noise words? I seem to remember a
> college chum of mine working in BCPL with a scheme like this, circa 1978,
> but have only this fading memory.
The term "noise" words (while I'm sure it's generic) reminds me of the
TOPS-10/20 parsing that another poster wrote about (still in use in
some Columbia applications like MM or Kermit - in fact there's a C
CCMD library around made for that, although the TOPS stuff was built
as a system JSYS which I tended to use in MACRO).
In such a case, you actually defined parse tables that were
incrementally parsed and control was passed off to various routines as
the parsing continued, which could then dynamically vary the remainder
of the parsing. Along the way you could define "noise" words so if
the user allowed auto-completion (normally TAB or ESC) the completed
word would be printed followed by the noise words in parenthesis
afterwards to give a hint as to what to type next.
Took a lot of set up work to do though in the code, and it was best
for interactive parsing (where you got the most benefit), although
since it was there it also got used for command lines. But even it
had a convention for options and values as opposed to the native text
in the command.
The readline library is somewhat similar in construction but less
dynamic and flexible.
Actually, come to think of it, a wrapper around the CCMD library might
be an interesting idea as a Python extension for interactive parsing,
although I suppose with limited target base nowadays.
--
-- David
--
/----------------------------------------------------------------------- \ Dav
id Bolen \ E-mail: db3l@[...].com /
| FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \--------------------
---------------------------------------------------/
--
http://mail.python.org/mailman/listinfo/python-list
Thread:
Dale Strickland-Clark
David Bolen
Jim Dennis
Marcin 'Qrczak' Kowalczyk
Chui Tey
David Bolen
Hans-Joachim Widmaier
Hans-Joachim Widmaier
Skip Montanaro
Quinn Dunkan
Dale Strickland-Clark
David Bolen
Steve Holden
David Bolen
Alex Martelli
Dale Strickland-Clark
Dale Strickland-Clark
Skip Montanaro
David Bolen
Peter Wang
Steve Holden
David Bolen
Steve Holden
Skip Montanaro
|