support leading _ in names.
This commit is contained in:
parent
6c4b5cf2c2
commit
cc22ae833a
|
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#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
|
#endif
|
||||||
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
|
|
@ -151,7 +151,7 @@ W [ \t\b\f]+
|
||||||
directive and the name, go into PPDEFINE mode and prepare to
|
directive and the name, go into PPDEFINE mode and prepare to
|
||||||
collect the defined value. */
|
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(); }
|
<PPDEFINE>.* { do_define(); }
|
||||||
|
|
||||||
|
|
@ -169,7 +169,7 @@ W [ \t\b\f]+
|
||||||
yy_pop_state();
|
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
|
/* 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
|
condition that stacks on top of the IFDEF_FALSE so that output is
|
||||||
not accidentally turned on within nested ifdefs. */
|
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, '`');
|
char*name = strchr(yytext, '`');
|
||||||
assert(name);
|
assert(name);
|
||||||
name += 6;
|
name += 6;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue