Re: counted strings, was State-of-the-art algorithms for lexical analysis?

gah4 <gah4@u.washington.edu>
Thu, 9 Jun 2022 11:54:14 -0700 (PDT)

          From comp.compilers

Related articles
Re: counted characters in strings robin51@dodo.com.au (Robin Vowels) (2022-06-10)
Re: counted characters in strings martin@gkc.org.uk (Martin Ward) (2022-06-11)
Re: counted characters in strings drb@msu.edu (2022-06-11)
| List of all articles for this month |

From: gah4 <gah4@u.washington.edu>
Newsgroups: comp.compilers
Date: Thu, 9 Jun 2022 11:54:14 -0700 (PDT)
Organization: Compilers Central
References: 22-06-006 22-06-007 22-06-008 22-06-013 22-06-015 22-06-019 22-06-021
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
In-Reply-To: 22-06-021

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.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.