|How to build a CLI and a Shell email@example.com (Eric Dubuis) (2001-01-05)|
|Re: How to build a CLI and a Shell firstname.lastname@example.org (Nirmal Prasad R.) (2001-01-09)|
|Re: How to build a CLI and a Shell email@example.com (Eric Dubuis) (2001-01-18)|
|Re: How to build a CLI and a Shell firstname.lastname@example.org (Scott Moore) (2001-01-19)|
|From:||"Nirmal Prasad R." <email@example.com>|
|Date:||9 Jan 2001 23:11:57 -0500|
|Organization:||RoadRunner - Cox|
|Keywords:||lex, design, comment|
|Posted-Date:||09 Jan 2001 23:11:57 EST|
I guess as this code will run on a router, you may be better off
avoiding lex & yacc altogether. Have a generic routine that just grabs
tokens out (with a seperator like <space>) and have a lookup table
which matches the first token, invokes the function (use pointers to
fns) and passes the rest of the array to crack...
Eric Dubuis <firstname.lastname@example.org> wrote in message
> I have the task to build a shell and a Cisco or Juniper like Command
> Line Interpreter (CLI) for some router and will be using the C (or
> C++) programming language.
[I don't see any reason not to use lex and yacc in router code. It's
not like they're going to run out of program memory if you put in a
few K of parse table. -John]
Return to the
Search the comp.compilers archives again.