Best practices for parsing files

lurker lurker at mailinator.com
Thu Jan 25 15:43:38 PST 2007


BCS wrote:
> As far as slicing goes, I'm working on a parser that read a file into memory
> (I guess it could mmap it in as well) and converts it to an array of token
> structs. A parser will then walk on the array. If you new a big array of
> struct in advance and have your lexer write directly to the array (slicing
> out of the file where the text is important, that should be fairly fast.

Excellent! Is any of your code available? We really would like take a look at your
code (If possible). We are a little lost right now and by your description It
seams very much like what we want to build.

Thanks



More information about the Digitalmars-d mailing list