aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-dataloader/csv/CsvGrammar.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-dataloader/csv/CsvGrammar.hpp')
-rw-r--r--src/openvic-dataloader/csv/CsvGrammar.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openvic-dataloader/csv/CsvGrammar.hpp b/src/openvic-dataloader/csv/CsvGrammar.hpp
index aef513b..712bddc 100644
--- a/src/openvic-dataloader/csv/CsvGrammar.hpp
+++ b/src/openvic-dataloader/csv/CsvGrammar.hpp
@@ -165,9 +165,9 @@ namespace ovdl::csv::grammar {
template<ParseOptions Options>
struct File {
- static constexpr auto rule =
- lexy::dsl::whitespace(lexy::dsl::newline) +
- lexy::dsl::opt(lexy::dsl::list(lexy::dsl::p<Line<Options>>, lexy::dsl::trailing_sep(lexy::dsl::eol)));
+ static constexpr auto rule = lexy::dsl::terminator(lexy::dsl::eof).opt_list(
+ lexy::dsl::p<Line<Options>> | lexy::dsl::newline
+ );
static constexpr auto value = lexy::as_list<std::vector<ovdl::csv::LineObject>>;
};