support leading _ in names.

This commit is contained in:
steve 2001-01-29 22:48:10 +00:00
parent 6c4b5cf2c2
commit cc22ae833a
1 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: lexor.lex,v 1.22 2001/01/20 03:10:35 steve Exp $"
#ident "$Id: lexor.lex,v 1.23 2001/01/29 22:48:10 steve Exp $"
#endif
# include <stdio.h>
@ -151,7 +151,7 @@ W [ \t\b\f]+
directive and the name, go into PPDEFINE mode and prepare to
collect the defined value. */
`define{W}[a-zA-Z][a-zA-Z0-9_]*{W}? { yy_push_state(PPDEFINE); def_start(); }
`define{W}[a-zA-Z_][a-zA-Z0-9_]*{W}? { yy_push_state(PPDEFINE); def_start(); }
<PPDEFINE>.* { do_define(); }
@ -169,7 +169,7 @@ W [ \t\b\f]+
yy_pop_state();
}
`undef{W}[a-zA-Z][a-zA-Z0-9_]*{W}?.* { def_undefine(); }
`undef{W}[a-zA-Z_][a-zA-Z0-9_]*{W}?.* { def_undefine(); }
/* Detect conditional compilation directives, and parse them. If I
@ -181,7 +181,7 @@ W [ \t\b\f]+
condition that stacks on top of the IFDEF_FALSE so that output is
not accidentally turned on within nested ifdefs. */
^{W}?`ifdef{W}[a-zA-Z][a-zA-Z0-9_]*.* {
^{W}?`ifdef{W}[a-zA-Z_][a-zA-Z0-9_]*.* {
char*name = strchr(yytext, '`');
assert(name);
name += 6;