[GoLUG] I just made my first Flex lexical analyzer Hello World
Steve Litt
slitt at troubleshooters.com
Sun Nov 12 17:43:16 EST 2023
Omer Zak said on Sun, 12 Nov 2023 23:36:25 +0200
>All this discussion and the article remind me of the toy compiler
>(technically, a cross-compiler) that I wrote at age 15.
>
>The compiler was written in IBM 360 assembly language and ran on the
>UCLA IBM 360/91 computer, to which I had access at the time.
>
>The source was FFRF (Free-Form Restricted FORTRAN), a subset of
>FORTRAN.
>
>The target was CARDIAC cardboard computer
>(https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation).
>
>I learned compiler theory from Gries' book Compiler Construction for
>Digital Computers
>(https://www.amazon.com/Compiler-Construction-Digital-Computers-David/dp/047132776X).
>
>The project took me few months of afternoons, using tools available at
>1972.
>Using today's tools, I might be able to complete it in less than two
>weeks.
Dang, the preceding is impressive!
Your reference of
https://www.amazon.com/Compiler-Construction-Digital-Computers-David/dp/047132776X
led me to
https://people.inf.ethz.ch/wirth/CompilerConstruction/CompilerConstruction1.pdf
And that led me to understand the need to understand Backus–Naur form
(BNF), which my 1982 Pascal teacher had tried unsuccessfully to teach
me, but I'm smarter now than in 1982 so I'm going to try again.
All of this is very pertinent to what David and I (and anyone else who
wants to) are doing.
SteveT
Steve Litt
Autumn 2023 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21
More information about the GoLUG
mailing list