• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Splitting strings....
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Splitting strings....
      • From: Allan Odgaard <email@hidden>
References: 
 >Splitting strings.... (From: Jerry LeVan <email@hidden>)
 >Re: Splitting strings.... (From: Jerry LeVan <email@hidden>)

  • Prev by Date: Re: Resizable Borderless Window
  • Next by Date: Help with unresponsive First Responder
  • Previous by thread: Re: Splitting strings....
  • Next by thread: Re: Splitting strings....
  • Index(es):
    • Date
    • Thread