Update of /cvsroot/cscope/cscope/src
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv32305
Modified Files:
scanner.l
Log Message:
Tolerate EOF in the middle of a delimeted character sequence.
Index: scanner.l
===================================================================
RCS file: /cvsroot/cscope/cscope/src/scanner.l,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** scanner.l 8 Jan 2004 14:07:20 -0000 1.7
--- scanner.l 9 Mar 2007 23:54:34 -0000 1.8
***************
*** 96,101 ****
/* Assume this is the AT&T/SCO style lex */
#undef input
! #define input() ((yytchar=(yytchar=yysptr>yysbuf?*(unsigned char *)--yysptr:getc(yyin))=='/'?comment():yytchar)==EOF?0:yytchar)
! #define noncommentinput() ((yytchar=yysptr>yysbuf?*--yysptr:getc(yyin))==EOF?0:yytchar)
#undef unput
#define unput(c) (*yysptr++=(c))
--- 96,101 ----
/* Assume this is the AT&T/SCO style lex */
#undef input
! #define input() ((yytchar=(yytchar=yysptr>yysbuf?*(unsigned char *)--yysptr:getc(yyin))=='/'?comment():yytchar)==EOF?LEXEOF:yytchar)
! #define noncommentinput() ((yytchar=yysptr>yysbuf?*--yysptr:getc(yyin))==EOF?LEXEOF:yytchar)
#undef unput
#define unput(c) (*yysptr++=(c))
***************
*** 686,690 ****
c = getc (yyin);
! return c;
}
--- 686,690 ----
c = getc (yyin);
! return (c == EOF) ? LEXEOF : c;
}
|