From owner-freebsd-hackers Wed Nov 27 17:22:35 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA27224 for hackers-outgoing; Wed, 27 Nov 1996 17:22:35 -0800 (PST) Received: from po1.glue.umd.edu (po1.glue.umd.edu [129.2.128.44]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA27219 for ; Wed, 27 Nov 1996 17:22:34 -0800 (PST) Received: from uplink.eng.umd.edu (uplink.eng.umd.edu [129.2.98.181]) by po1.glue.umd.edu (8.8.3/8.7.3) with ESMTP id UAA18870; Wed, 27 Nov 1996 20:22:22 -0500 (EST) Received: from localhost (chuckr@localhost) by uplink.eng.umd.edu (8.8.3/8.7.3) with SMTP id UAA03236; Wed, 27 Nov 1996 20:21:44 -0500 (EST) X-Authentication-Warning: uplink.eng.umd.edu: chuckr owned process doing -bs Date: Wed, 27 Nov 1996 20:21:43 -0500 (EST) From: Chuck Robey X-Sender: chuckr@uplink.eng.umd.edu To: Terry Lambert cc: hackers@freebsd.org Subject: Re: Lex/Yacc question In-Reply-To: <199611280034.RAA29529@phaeton.artisoft.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Wed, 27 Nov 1996, Terry Lambert wrote: > Well, since I'm here anyway... > > > What would be a Lex/Yacc program for handling statements like: > > echo This is an undelimited yytext[] to my eol to pass to echo() Lex uses C strings, you want to make it not use C strings, make a function that outputs it the way you want, ECHO the first part, your_way() the second part, ECHO the trailing part. Probably be easier to convert your undelimited string to an ASCIIZ. Or did I misunderstand your question (most likely). I've been doing a lot of lex lately for school projects, this is a good time to ask me. > > ??? > > PS: Why isn't there a Lex or Yacc FAQ? > > > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. > ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@eng.umd.edu | communications topic, C programming, and Unix. 9120 Edmonston Ct #302 | Greenbelt, MD 20770 | I run Journey2 and picnic, both FreeBSD (301) 220-2114 | version 3.0 current -- and great FUN! ----------------------------+-----------------------------------------------