Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Roger L Costello Newsgroups: comp.compilers Subject: Do people create parsers for command line arguments? Date: Thu, 28 Jul 2022 11:14:51 +0000 Organization: Compilers Central Lines: 17 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-07-054@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="43119"; mail-complaints-to="abuse@iecc.com" Keywords: parse, question Posted-Date: 29 Jul 2022 16:36:44 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Thread-Topic: Do people create parsers for command line arguments? Thread-Index: AdiicpvzhWv6ZobPSqqIxS+5l4SpAw== Accept-Language: en-US Content-Language: en-US authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mitre.org; Xref: csiph.com comp.compilers:3141 Hi Folks, I've seen some tools with pretty complicated arguments. The argument list is a language unto itself. Do people create parsers for command line arguments? Or is a parser overkill? /Roger [On Unix-ish systems, the shell breaks the command into space separated arguments, while the rest is up to each program. Many languages have argument handling libraries, typically recognizing arguments of various types such as switches, numbers, and filenames. Some shells like zsh have complicated command completion schemes which know as you type what each bit of a command is supposed to be so it can prompt you. See the zsh manpages for a very long discussion of how it works. Back in the olden days, Tenex had command completion built into the operating system which seemed pretty cool at the time. The manual should be in bitsavers. -John]