Simple patch which makes bc accept _ as a valid digit character -- and ignore them. This is so that numbers such as 1_234_567 can be used, which are frequently more convenient to read. Dean diff -ru bc-1.04.orig/bc/scan.l bc-1.04.local/bc/scan.l --- bc-1.04.orig/bc/scan.l Mon Apr 21 14:57:00 1997 +++ bc-1.04.local/bc/scan.l Wed Oct 1 18:14:50 1997 @@ -135,7 +135,7 @@ YY_FATAL_ERROR( "read() in flex scanner failed" ); #endif %} -DIGIT [0-9A-F] +DIGIT [0-9A-F_] LETTER [a-z] %s slcomment %% @@ -255,7 +255,7 @@ dst = yytext; while (*src == '0') src++; if (*src == 0) src--; - /* Copy strings removing the newlines. */ + /* Copy strings removing the newlines and underscores. */ while (*src != 0) { if (*src == '\\') @@ -263,7 +263,11 @@ src++; src++; line_no++; } - else + else if (*src == '_') + { + src++; + } + else *dst++ = *src++; } *dst = 0;