On Sun, Apr 27, 2008 at 03:38:54PM -0500, Joshua Isom wrote: > The man page for indent does say "it has a 'forgiving' parser" so I > don't see why it can't just treat any token starting with a zero as > special, treat 0b01, 0x0A, 0f4 and 010 as a number regardless of the > base, even if it doesn't know the base.
I think indent(1) has to check the base in order to split tokens consistently. Consider the following statements: read | write | description --------------+---------------+----------------------------- 42 | 42 | Decimal 42e+3 | 42e+3 | Decimal 042 | 042 | Octal 042e+3 | 042e+3 | Octal?? gcc compiles this but the result | | looks strange... 0x42 | 0x42 | Hexadecimal 0x42e+3 | 0x42e + 3 | Hexadecimal + Decimal IMHO, checking numbers base is a requirement for splitting tokens wisely. Regards -- Romain Tartière <[EMAIL PROTECTED]> http://romain.blogreen.org/ pgp: 8DAB A124 0DA4 7024 F82A E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43) (plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)
pgpW7FdZIi4Bl.pgp
Description: PGP signature