Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: A Note on Readability Date: Mon, 13 Jul 2015 13:46:08 -0700 Organization: None to speak of Lines: 29 Message-ID: References: <1d72d1ba-3317-4725-bedd-698843ca9c35@googlegroups.com> <878ucgsau6.fsf@kst-u.example.com> <7b99e2eb-6b33-4ad4-b4a6-647a44d1e181@googlegroups.com> <87617jq7uk.fsf@kst-u.example.com> <87iobhpwdd.fsf@kst-u.example.com> <87bnh8o234.fsf@kst-u.example.com> <87twuzmaca.fsf@kst-u.example.com> <4175e1ca-0317-4f15-bcb8-0c0f8ac1cc9a@googlegroups.com> <3db40dfc-407c-4229-9c61-aac75246cb7e@googlegroups.com> <51b626e2-ffe7-45ad-949a-398cf5ab45cd@googlegroups.com> <55A3E9A3.7030602@verizon.net> <55A406BC.1010203@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="7800"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/N3uxm9opJ+b0mCrGrKwwA" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:OGTsEHlx2J0TS8IdhSL5ymsklRw= sha1:H5r2RFlyrhdILAtlzXFd6CJVjKw= Xref: csiph.com comp.lang.c:65521 James Kuyper writes: [...] > During translation phase 3, "3until" must be parsed as a preprocessing > number ('3') followed by an identifier - keywords are not relevant until > phase 7. During translation phase 7, "Each preprocessing token is > converted into a token." - there's no merging and no splitting. [...] The syntax for a "preprocessing number" is a bit odd. Obviously "3until" isn't a number, but it is a preprocessing number. So is ".xyze+" -- but not ".xyzf+". "0x123" is a valid preprocessing number -- and so is "0y123". The reason, as far as I can tell, is to make the preprocessor's job simpler. The syntax of a preprocessing number covers the syntax of all integer and floating-point numeric constants, with or without decimal points, base prefixes, exponents, and suffixes. It's designed to be reasonably simple (you can see the grammar in N1570 6.4.8), and as a result it covers a lot of things that aren't syntactically valid in later phases; a grammar covering only *valid* numeric constants would be more complicated. Translation phase 7 (more or less the compiler excluding the preprocessor) is responsible for converting preprocessing numbers to numeric constants, and diagnosing any that are invalid. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"