Re: the de-facto way to "parse" input



"Krumble Bunk" <krumblebunk@xxxxxxxxx> wrote in message news
On Jun 11, 2:46 pm, Chris Dollin <chris.dol...@xxxxxx> wrote:
Krumble Bunk wrote:


[.....]


the tokens, /and do nothing else/.)

And likely throw away the first attempt, as a learning exercise.

--
"I don't make decisions. I'm a bird." /A Fine and Private Place/

Hewlett-Packard Limited Cain Road, Bracknell, registered no:
registered office: Berks RG12 1HN 690597 England


Very good advice - I will investigate using lex/yacc.

You could also check out MiniBasic, on my website. Essentially writing a mini-language for a shell is the same as writing a Basic interpreter, except expressions consist of pipes and globs and redirections more often than arithmetical operators. Most shells even have their own looping constructs.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

.



Relevant Pages

  • Re: (patch for Bash) arrayzip, arrayunzip
    ... > programming language". ... > writing shell code. ... considering that it's shell script vs. C. ...
    (comp.unix.shell)
  • Re: Finding out the active Unix shell
    ... I'm writing a C program that runs a Java program (an agent) ... The agent's shell is unknown, so I need to check, within my C code ... "Debugging is twice as hard as writing the code in the first place. ...
    (comp.lang.c)
  • Re: A reasonable project.
    ... I've been learning C over the past 6 or so months, by writing small ... programs and reading a couple of books on the language. ... A reasonably feature complete shell is quite complex. ... One project that I did early on in my C career was a text based database ...
    (comp.lang.c)
  • Re: Finding out the active Unix shell
    ... I'm writing a C program that runs a Java program (an agent) ... The agent's shell is unknown, so I need to check, within my C code ... "Debugging is twice as hard as writing the code in the first place. ...
    (comp.lang.c)