Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #3000

Re: fun with Postscript, was Flex is the most powerful lexical analysis language in the world. True or False?

From gah4 <gah4@u.washington.edu>
Newsgroups comp.compilers
Subject Re: fun with Postscript, was Flex is the most powerful lexical analysis language in the world. True or False?
Date 2022-05-07 13:10 -0700
Organization Compilers Central
Message-ID <22-05-020@comp.compilers> (permalink)
References <22-05-003@comp.compilers> <22-05-011@comp.compilers> <22-05-015@comp.compilers>

Show all headers | View raw


(snip, I wrote)

> An important part of a programming language is that people can understand it.

(snip)

> [Take a look at Postscript, which is trivial to tokenize and parse since
> it's a stream of tokens in RPN order, but making sense of it
> by humans is a challenge. Or, of course, m4. -John]

Reminds me of the origin of RISC, when (I believe) IBM noticed that
compilers were using a small subset of the available instructions, and that
much less programming was being done in assembly.

But okay, was Postscript supposed to be written by people,
or programs?

As with code generated by compilers, it has to be understood
by people at least once, but even then, only step by step, and not
(usually) the whole program at once.

But yes you can write unreadable Postscript.  Once, some years ago,
we (me and some others) needed to redefine def.

[Actually, RISC was at Berkeley, and IBM's project was the 801. But
yes, they noticed compilers used only a fraction of the S/360
instruction set so they made a minimal design that supported only what
their state-of-the art compiler used. RISC was sort of the same but
they used the mediocre PCC compiler which is why they had register
windows to compensate for PCC's weak register allocation. -John]

Back to comp.compilers | Previous | NextPrevious in thread | Find similar


Thread

Flex is the most powerful lexical analysis language in the world. True or False? Roger L Costello <costello@mitre.org> - 2022-05-04 11:22 +0000
  Re: Flex is the most powerful lexical analysis language in the world. True or False? Tom Shields <thomas.evans.shields@gmail.com> - 2022-05-04 14:14 -0500
  Flex is the most powerful lexical analysis language in the world. True or False? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-05-05 15:20 +0300
    RE: Flex is the most powerful lexical analysis language in the world. True or False? Roger L Costello <costello@mitre.org> - 2022-05-06 11:16 +0000
      RE: Flex is the most powerful lexical analysis language in the world. True or False? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-05-07 13:15 +0300
        Simple Lexer and Simple Parser [ was RE: Flex is the most powerful lexical analysis language in the world. True or False? ] Roger L Costello <costello@mitre.org> - 2022-05-08 13:34 +0000
  Re: Flex is the most powerful lexical analysis language in the world. True or False? George Neuner <gneuner2@comcast.net> - 2022-05-06 11:00 -0400
    Re: Flex is the most powerful lexical analysis language in the world. True or False? gah4 <gah4@u.washington.edu> - 2022-05-06 14:30 -0700
      Re: fun with Postscript, was Flex is the most powerful lexical analysis language in the world. True or False? gah4 <gah4@u.washington.edu> - 2022-05-07 13:10 -0700

csiph-web