Re: How to build a CLI and a Shell

"Nirmal Prasad R." <nprasad@cyberrep.com>
9 Jan 2001 23:11:57 -0500

          From comp.compilers

Related articles
How to build a CLI and a Shell dubuis@iam.unibe.ch (Eric Dubuis) (2001-01-05)
Re: How to build a CLI and a Shell nprasad@cyberrep.com (Nirmal Prasad R.) (2001-01-09)
Re: How to build a CLI and a Shell dubuis@iam.unibe.ch (Eric Dubuis) (2001-01-18)
Re: How to build a CLI and a Shell samiam@cisco.com (Scott Moore) (2001-01-19)
| List of all articles for this month |

From: "Nirmal Prasad R." <nprasad@cyberrep.com>
Newsgroups: comp.compilers
Date: 9 Jan 2001 23:11:57 -0500
Organization: RoadRunner - Cox
References: 01-01-020
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 <dubuis@iam.unibe.ch> 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]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.