[comp.bugs.sys5] bug in man page of lex

lai@vedge.UUCP (David Lai) (11/17/88)

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.  So change the lex(1)
man page to show that the argument to yyless() is a number, not a
pointer.

(Error appears in Sun (bsd) manuals, and HPUX (SysV) manuals).
-- 
	"What is a DJ if he can't scratch?"  - Uncle Jamms Army
The views expressed are those of the author, and not of Visual Edge, nor Usenet.
David Lai (vedge!lai@larry.mcrcim.mcgill.edu || ...watmath!onfcanim!vedge!lai)

ejp@ausmelb.oz (Esmond Pitt) (11/18/88)

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