CSV example

With embedded newlines

csv: row*.
row: v**-",", nl.
v: quoted; unquoted.
-quoted: -'"', q*, -'"'.
-q: ~['"']; '"', -'"'.
-unquoted: ; ~['",'; #a; #d], c*.
-c: ~[","; #a; #d].
-nl: (-#a; -#d)+.
#
Year,Make,Model,Description,Price
1997,Ford,E350,"ac, abs, moon",3000.00
1999,Chevy,"Venture ""Extended Edition""","",4900.00
1999,Chevy,"Venture ""Extended Edition, Very Large""",,5000.00
1996,Jeep,Grand Cherokee,"MUST SELL!
air, moon roof, loaded",4799.00
#

<csv>
   <row>
      <v>Year</v>
      <v>Make</v>
      <v>Model</v>
      <v>Description</v>
      <v>Price</v>
   </row>
   <row>
      <v>1997</v>
      <v>Ford</v>
      <v>E350</v>
      <v>ac, abs, moon</v>
      <v>3000.00</v>
   </row>
   <row>
      <v>1999</v>
      <v>Chevy</v>
      <v>Venture "Extended Edition"</v>
      <v/>
      <v>4900.00</v>
   </row>
   <row>
      <v>1999</v>
      <v>Chevy</v>
      <v>Venture "Extended Edition, Very Large"</v>
      <v/>
      <v>5000.00</v>
   </row>
   <row>
      <v>1996</v>
      <v>Jeep</v>
      <v>Grand Cherokee</v>
      <v>MUST SELL!
air, moon roof, loaded</v>
      <v>4799.00</v>
   </row>
</csv>

Received on Tuesday, 2 August 2022 21:14:32 UTC