Module Name:    src
Committed By:   christos
Date:           Wed Mar 16 15:41:55 UTC 2016

Modified Files:
        src/bin/sh: arith_lex.l

Log Message:
PR bin/50959 - allow consistent use of 0X hex constants (not just 0x)
(from kre)


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/bin/sh/arith_lex.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/arith_lex.l
diff -u src/bin/sh/arith_lex.l:1.16 src/bin/sh/arith_lex.l:1.17
--- src/bin/sh/arith_lex.l:1.16	Tue Mar 20 14:42:29 2012
+++ src/bin/sh/arith_lex.l	Wed Mar 16 11:41:55 2016
@@ -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 @@ extern const char *arith_buf, *arith_sta
 
 %%
 [ \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);

Reply via email to