From fc1f924a3be5c08d0dbbd192ed273be4e0828939 Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 16 Mar 2016 15:41:55 +0000 Subject: [PATCH] PR bin/50959 - allow consistent use of 0X hex constants (not just 0x) (from kre) --- bin/sh/arith_lex.l | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/sh/arith_lex.l b/bin/sh/arith_lex.l index 6f7a933abf0c..81472e054861 100644 --- a/bin/sh/arith_lex.l +++ b/bin/sh/arith_lex.l @@ -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_startbuf; %% [ \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);