At 15:55 -0700 6/3/06, James Reynolds wrote:
Over the weekend I tried to find the most elegant solution to
tokenizing and parsing POV-Ray scene files, which uses a c-like
scripting language. I came to the conclusion that there are many
solutions out there, but in trying to understand them it seems
easiest (and take as much time to implement) if I just wrote my own.
(I've never studied lexical analysis, but I understand the basic
concepts).
Does anyone have any opinions on tokenizing and parsing files?
OSX includes the Unix tools 'lex' and 'yacc' for building compilers
for your own language. You define the structure of the language you
want to work with, and 'lex' generates an analyser for it.
David
--
David Ledger - Freelance Unix Sysadmin in the UK.
Chair of HPUX SysAdmin SIG of hpUG technical user group (www.hpug.org.uk)
[EMAIL PROTECTED]
www.ivdcs.co.uk