[GoLUG] [parse] My studies with O'Reilly's book on Flex and Bison
David Billsbrough
kc4zvw at earthlink.net
Thu Nov 23 00:17:45 EST 2023
Original Message:
Once upon a time, Steve Litt <slitt at trou.....com> wrote:
> Hi all,
> After hitting all sorts of dead ends, I decided to read "flex & bison"
> by John Levine, published by O'Reilly. Unfortunately, it's going
> slowly. The very first simple example didn't compile, and when I got it
> to compile, it didn't work as designed. There are three possible causes
> of this failure:
> 1) Flex has changed
> 2) GCC has changed
> 3) The book's technical editing was insufficient.
> So I'll need to take my Hello World Flex program and slowly change it
> until it can count characters, words and lines like the example program
> in the book.
{ .... trimmed .... }
SteveT,
I tried the fb1-1.l example and got it to output:
I did this under my VPS running Ubuntu:
-=-=-=-=-=-
kc4zvw at www:~$ ./a.out
The boy stood on the burning deck
shelling peanuts by the peck
2 12 63
kc4zvw at www:~$
-=-=-=-=-=-
regards,
David
----David Billsbrough (KC4ZVW)
QTH: Chuluota, FL -- grid: EL98kp
More information about the GoLUG
mailing list