[ale] Complex Parsing
Joseph A Knapka
jknapka at earthlink.net
Mon Nov 5 14:48:38 EST 2001
Christopher Fowler wrote:
>
> I'm using C. Everything is in the argv array.
>
> I can use a serious of strcmp()'s to see is one argv[X] = "home". Then
> set argv[x+1] as the argument.
Yes. But if all this program is doing is maintaining
configuration files, C is certainly not the right tool
for the job. Tcl or Python or even Perl would let you
do the same job with half the effort (probably much
less).
> I'm creating a config program [that] is plain language based.
What does that mean, exactly? If you're trying to
implement a natural-language-based command-line
interface, beware: parsing natural language is
non-trivial (though fairly well-understood), and
semantic analysis of natural language is
-hard- (little universally agreed-upon theory,
and implementations tend to be computationally
intensive).
It's my opinion that most attempts at
natural-language front ends for command-line
systems are misguided: they lure the
user into thinking the computer "understands"
them, and then the user trips over their
hidden limitations. It's better to just
design a simple command syntax and tell the
user to read the fine manual. Now, unifying
a large amount of disparate software using
a -single-, -well-designed- command syntax --
that would be worth doing.
Cheers,
-- Joe
# "You know how many remote castles there are along the
# gorges? You can't MOVE for remote castles!" - Lu Tze re. Uberwald
# (Obsolete) Linux MM docs:
http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list