Scientific Operations Bellum Gratia Artis

testing - 1999 - August - this message

[ next ]

Subject: Re: [9fans] minor glitch with free carets

From: "Russ Cox" <rsc@[REDACTED]>
Date: Thu, 26 Aug 1999 14:20:12 -0400

i just got bitten by this...

% echo a'b'
ab
% echo fn
fn
% echo fn'b'
fn b
%

A fix is to change the word: production in /sys/src/cmd/rc/syn.y from
word: keyword {$1->type=WORD;}
to
word: keyword {lastword=1; $1->type=WORD;}

And you'll have to add "int lastword;" to rc.h
so that lex.c's lastword is visible.

Russ