August-Alm / ats_csv_lexer

A program to parse CSV files, written in ATS (ATS2).
1 stars 0 forks source link

Parsing Issues ... #2

Closed deech closed 7 years ago

deech commented 7 years ago

Thanks for writing this! I just set the comma delimiter to ',' and tried it on a large dataset in http://seanlahman.com/files/database/baseballdatabank-2017.1.zip and it only output the name of the first column.

August-Alm commented 7 years ago

That was not the fault of the parser itself. The mains function was only meant to illustrate a portion of the functionality and only printed the very first entry. (The code worked exactly as intended on your example.) I have now changed the example mains function at the end to print everything (as long as there are no errors). It prints to the console. You have to change it yourself to suit your needs, e.g., if you want to instead print the output to a file, just like you changed the delimiter value manually.