Xref: utzoo comp.bugs.4bsd:1090 comp.bugs.sys5:699 Path: utzoo!attcan!uunet!munnari!murtoa.cs.mu.oz.au!ausmelb!ejp From: ejp@ausmelb.oz (Esmond Pitt) Newsgroups: comp.bugs.4bsd,comp.bugs.sys5 Subject: Re: bug in man page of lex(1) Keywords: yyless Message-ID: <800@ausmelb.oz> Date: 18 Nov 88 03:28:52 GMT References: <1953@vedge.UUCP> Reply-To: ejp@ausmelb.oz (Esmond Pitt) Organization: Austec International Limited, Melbourne Lines: 16 In article <1953@vedge.UUCP> lai@vedge.UUCP (David Lai) writes: < The lex(1) man page says: < ...yyless(p) ... p should be between yytext and yytext+yyleng < however the lex users manual says: < yyless(n), n=number of chars to retain in yytext < The bahaviour of lex is that of the latter. When I last unpicked yyless() (System III), it actually handled both cases, by figuring out at run-time whether it had received a pointer ( yytext <= p <= yyleng), otherwise treating p as an integer. Yuck. This may have been extreme friendliness on the part of System III, or someone at Zilog. -- Esmond Pitt, Austec International Ltd ...!uunet.UU.NET!munnari!ausmelb!ejp,ejp@ausmelb.oz