Re: How to parse CSV
Re: How to parse CSV
- Subject: Re: How to parse CSV
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 22 Jan 2008 12:58:14 -0500
On Jan 22, 2008 12:01 PM, Ed Stockly <email@hidden> wrote:
> Directly parsing CSV in pure AppleScript could be done, but it would
> be a major headache.
Lessee how much code it took to do it in some other popular languages:
Read-only:
Java: CsvReader.java (from Java CSV library): 1679 lines
Lisp: csv-src.lisp (from asdf): 202 lines
Read/Write:
Perl: CSV.pm + CSV_PP.pm (from CPAN): 790 lines
Python: csv.py (bundled): 415 lines
Ruby: csv.rb (bundled) 780 lines
Tcl: csv.tcl (from tcllib): 716 lines
So on average, that's about 750 lines of code. I think doing it in a
robust way in AppleScript would take even more.
(Note that I subtracted the size of the embedded documentation in the
Java, Perl, Ruby, and Tcl; the others had the doc in separate files).
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden