From: stephan b. <st...@ei...> - 2003-09-04 11:58:34
|
On Thursday 04 September 2003 12:23, Rusty Ballinger wrote: > > i started to learn lex yesterday and i've got a basic parser for > > the STree text format underway. > > I bought the O'Reilly "lex & yacc" book *years* ago, but (obviously) > never read it, & now I feel like a dumbass for not having used it in > the first place. i bought it a few days ago and i feel like a dumbass for reading a computer book which is more than 2 years old! > If you get this working, I will be quite happy to > throw out my hand-rolled parser. Attached is the lex input. It won't compile as-is because it needs some external code, but it'll give you and idea of how simple it was. i will proactively admit that it may contain any number of lex faux-pas (faux-pi?), as it is my very first lex work. i still haven't migrated into yacc yet, but it seems we don't need it for the text mode parser. -- ----- stephan st...@ei... - http://www.einsurance.de "...control is a degree of inhibition, and a system which is perfectly inhibited is completely frozen." -- Alan W. Watts |