Re: Splitting strings....
Re: Splitting strings....
- Subject: Re: Splitting strings....
- From: Public Look <email@hidden>
- Date: Sat, 28 Feb 2004 09:46:12 -0500
Any time you need to do string scanning and parsing, you should at
least take a look at flex and bison. There are sample lexers and
grammars for all kinds of things including fining the extent of C
quoted C strings in source code so that strings like the following are
handled correctly:
"This is a \"string\" containing a quoted \"string\" that does not end
the quote."
Just noticing whether a ';' is within a quoted string is the tip of the
iceberg I suspect. You probably really want to be able to parse the
database language's grammar.
Scanning and parsing strings are two of the most mature disciplines in
Computer Science and there is no reason to ever write this type of code
the hard way again IMHO.
_______________________________________________
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.