Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh PR bin/50959 - allow consistent use of 0X hex constan...
details: https://anonhg.NetBSD.org/src/rev/f27e916cbb4f
branches: trunk
changeset: 344172:f27e916cbb4f
user: christos <christos%NetBSD.org@localhost>
date: Wed Mar 16 15:41:55 2016 +0000
description:
PR bin/50959 - allow consistent use of 0X hex constants (not just 0x)
(from kre)
diffstat:
bin/sh/arith_lex.l | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 2034f12240c6 -r f27e916cbb4f bin/sh/arith_lex.l
--- a/bin/sh/arith_lex.l Wed Mar 16 11:24:16 2016 +0000
+++ b/bin/sh/arith_lex.l Wed Mar 16 15:41:55 2016 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: arith_lex.l,v 1.16 2012/03/20 18:42:29 matt Exp $ */
+/* $NetBSD: arith_lex.l,v 1.17 2016/03/16 15:41:55 christos Exp $ */
/*-
* Copyright (c) 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)arith_lex.l 8.3 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: arith_lex.l,v 1.16 2012/03/20 18:42:29 matt Exp $");
+__RCSID("$NetBSD: arith_lex.l,v 1.17 2016/03/16 15:41:55 christos Exp $");
#endif
#endif /* not lint */
@@ -59,7 +59,7 @@
%%
[ \t\n] { ; }
-0x[0-9a-fA-F]+ { yylval = strtoimax(yytext, 0, 0); return(ARITH_NUM); }
+0[xX][0-9a-fA-F]+ { yylval = strtoimax(yytext, 0, 0); return(ARITH_NUM); }
0[0-7]* { yylval = strtoimax(yytext, 0, 0); return(ARITH_NUM); }
[1-9][0-9]* { yylval = strtoimax(yytext, 0, 0); return(ARITH_NUM); }
[A-Za-z_][A-Za-z_0-9]* { char *v = lookupvar(yytext);
Home |
Main Index |
Thread Index |
Old Index