Re: cocoa-dev digest, Vol 2 #1224 - 8 msgs
Re: cocoa-dev digest, Vol 2 #1224 - 8 msgs
- Subject: Re: cocoa-dev digest, Vol 2 #1224 - 8 msgs
- From: Simon Stapleton <email@hidden>
- Date: Tue, 10 Sep 2002 16:07:55 +0200
Subject: Re: Learning lex/yacc (was: Book- Building cocoa applications)
Cc: email@hidden
To: Brad <email@hidden>
From: Sherm Pendley <email@hidden>
On Monday, September 9, 2002, at 09:24 PM, Brad wrote:
Anyone have any recommendations on books or tutorials on learning how
to use lex/yacc?
"Lex & Yacc" from O'Reilly & Associates.
Good book.
The docs that come with flex and bison are also pretty good, however.
The one for bison, at least, has a tutorial.
You will need to build your own flex and bison from the source
distributions. These are easy builds, IIRC. The bison that comes with
OSX seems way out of date - v1.28 distributed with Jaguar as opposed to
v1.35 I built some months back - flex, however, appears up to date.
You'll also meed to make sure your install directory is ahead of
/usr/bin in your path (inexplicably, the Jaguar installer blats
/usr/local/bin out of the default path...[2]) or you won't get to the
finally built apps.
Before you build, make sure you have an up to date version of texinfo
installed, or you won't get any docs. When installing texinfo, don't
forget to install the tex templates, or your pdf files won't be
hyperlinked - they will have bookmarks for all the pages, but won't be
usable. A separate install is required after installing texinfo, as
follows:
`sudo make TEXMF=<texmf> install-tex`, where <texmf> is the texmf
directory of your tex installation, it's /usr/local/teTeX/share/texmf
on my install but, as ever, YMMV.
Do a build and install of flex and bison[1], and you'll get info files
in <root>/share/info (where <root> is your installation directory, by
default it's /usr/local) which you can now access using `info bison` or
`info flex`.
On top of that, if you're feeling like printing stuff out, you can run
texi2pdf on the .texi files in the source distributions to get nice
crispy printed manuals. This will require a working installation of
TeX, though, as texi2pdf is part of TeX. You can get HTML docs the
same way, by sustituting texi2html for texi2pdf. And there's probably
a flag to configure (or a make target) that does this for you, but I
did it by hand.
In order to do this, go to the /doc directory in the source
distribution, and then
`texi2pdf --clean <filename>.texi` where <filename> is the relevant
texinfo file. IIRC, for flex use flex.texi and for bison use
bison.texi (but don't quote me on that ;-). You will then have a nice
pdf file ready for printing.
This works for most GNU software, as most of them have texinfo
documentation.
Hope that helps.
Simon
[1] Usual gnu build procedure, i.e.
> ./configure
> make
> sudo make install
[2] ...as well as hosing a perfectly workable tcsh installation.
Grrrrr!
--
PGP Key Id : 0x50D0698D
--
Your mouse has moved. You must restart Windows NT for this change to
be recognised.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.