blob: 15824e0c6590ccd4546dc2a9ccab8b82f324b93a [file] [log] [blame]
%ignore "^#(.*)";
%token Comma "\,";
%token Value "[^\n\r\,]+";
%token Break "\r(\n?) | \n";
%start document;
%%
// with optional last break
document
: rows Break
| rows
| /* empty */
;
// each row seprated with one break
// and optional last space
rows
: rows Break row
| row
;
// values separated by spaces
row
: row Comma column
| column
;
// allow empty columns
column
: Value
| /* empty */
;