Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ clean-go:
publish-go: test-go
@test -n "$(V)" || (echo "Usage: make publish-go V=x.y.z" && exit 1)
sed -i '' 's/^const Version = ".*"/const Version = "$(V)"/' go/csv.go
git add go/csv .go
git add go/csv.go
git commit -m "go: v$(V)"
git tag go/v$(V)
git push origin main go/v$(V)
Expand Down
11 changes: 11 additions & 0 deletions csv-grammar.jsonic
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@
# non-strict prepends to existing defaults to preserve JSON parsing).

{
options: rule: { start: csv }
options: lex: { emptyResult: [] }
options: error: {
csv_extra_field: 'unexpected extra field value: $fsrc'
csv_missing_field: 'missing field'
}
options: hint: {
csv_extra_field: 'Row $row has too many fields (the first of which is: $fsrc). Only $len\nfields per row are expected.'
csv_missing_field: 'Row $row has too few fields. $len fields per row are expected.'
}

rule: csv: open: [
{ s: '#ZZ' }
{ s: '#LN' p: newline c: '@not-record-empty' }
Expand Down
Loading
Loading