Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4 Newsgroups: comp.compilers Subject: Re: counted strings, was State-of-the-art algorithms for lexical analysis? Date: Thu, 9 Jun 2022 11:54:14 -0700 (PDT) Organization: Compilers Central Lines: 40 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-06-025@comp.compilers> References: <22-06-006@comp.compilers> <22-06-007@comp.compilers> <22-06-008@comp.compilers> <22-06-013@comp.compilers> <22-06-015@comp.compilers> <22-06-019@comp.compilers> <22-06-021@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="4912"; mail-complaints-to="abuse@iecc.com" Keywords: Fortran, history Posted-Date: 09 Jun 2022 16:22:15 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <22-06-021@comp.compilers> Xref: csiph.com comp.compilers:3061 On Thursday, June 9, 2022 at 9:33:52 AM UTC-7, Hans-Peter Diettrich wrote: (snip) > Now I know what made me think of Hollerith constants with the "H" :-) > I doubt that it's "quite easy" to use Hollerith constants for humans - > how often do you have to check whether you got the right number of > characters when reading or writing such a constant? So the delimited > form of strings is easier to handle by both humans and DFA's, a win-win > situation :-) It definitely seems that way now. There is a document that Knuth calls "Fortran 0", with the description of the Fortran language before they finished the first compiler, maybe before they started it. I never had many of them, but there are plenty of stories about "Fortran coding forms", with 80 little boxes on each row, to write down what you want punched on cards. Then, as the story goes, someone else will punch them for you. I never had anyone to punch my cards, though I learned how to use a keypunch about when I was nine. In any case, if you write your program on a coding form, with each character in a little box, it is easy to know how many are in each H constant. Even more, Fortran I/O depended on getting things in the right column until list-directed I/O (name as well as I know, borrowed from PL/I) was added in 1977. IBM added apostrophe delimited constants to Fortran IV early on, but they didn't get into the Fortran 66 standard. One reason for the early Fortran character set was the characters available on the 026 keypunch. For B5500 ALGOL, you had to use multi-punch to get many of the characters that didn't have a key. But IBM didn't use that.