From: Steven Jenkins Date: 2005-11-05T04:06:53+09:00 Subject: Re: any good racc examples that parse from an IO instead of a String? Eric Mahurin wrote: > All the example racc parsers I've seen use lexers that parse from a string. > I think this is because they are using regexes which operates naturally on > strings, but not IO's. > > So, I guess I mainly want to see a racc lexer example that operates on an > IO/File. Can you give me a link to what you have? OK. It's not exactly published, but not exactly proprietary either. I'll email it to you. For the record, the lexer iterates over input lines with IO#each and then uses regexes to split each line into tokens. So I suppose the lexer is, strictly speaking, tokenizing a string. Steve