csv_parser_moshkovskyi

Crates.iocsv_parser_moshkovskyi
lib.rscsv_parser_moshkovskyi
version0.1.0
sourcesrc
created_at2024-11-14 06:30:23.372571
updated_at2024-11-14 06:30:23.372571
descriptionCSV parser built with Pest parser for Rust.
homepage
repository
max_upload_size
id1447483
size22,881
Ivan Moshkovskyi (IvanKawun)

documentation

README

CSV_PARSER_MOSHKOVSKYI

Realisation of basic csv parser

Technical description

This parser is parsing a csv file. He will parse file, show it in structured way and check file on correctnes.

Usage

The result can be used for basic data analytics

Grammar

WHITESPACE = _{ " " | "\t" | "\n" | "\r" } NEWLINE = _{ "\n" | "\r\n" } csv = { (WHITESPACE | NEWLINE)* ~ record ~ (NEWLINE ~ record)* ~ (WHITESPACE | NEWLINE)* } record = { field ~ ("," ~ field)* } field = { empty_field | quoted_field | unquoted_field } empty_field = _{ "," } quoted_field = _{ """ ~ (!""" ~ ANY | """ ~ """)* ~ """ } unquoted_field = _{ (!("," | NEWLINE | " ") ~ ANY)+ }

Commit count: 0

cargo fmt