From cc22ae833a9e75cc2318e082a364c5ea8e2ffaee Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 29 Jan 2001 22:48:10 +0000 Subject: [PATCH] support leading _ in names. --- ivlpp/lexor.lex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ivlpp/lexor.lex b/ivlpp/lexor.lex index be09cf011..76a1b0bf7 100644 --- a/ivlpp/lexor.lex +++ b/ivlpp/lexor.lex @@ -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 @@ -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(); } .* { 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;