List 1. PEG for DXF (spline only) dxf ::= <header>:h (<spline> | <entity> | <entry>)+:c => (h, c) newLine ::= ("\n" | "\r") number ::= <digit>+:c => int(''.join(c)) label ::= <spaces>? <digit>+:t => int(''.join(t)) attrib ::= <spaces>? (~<newLine> <anything>)+:c => ''.join(c) entry ::= <label>:l <newLine> (<newLine> | <attrib>):a => (l, a) entryX :x ::= <entry>:e ?(e[0]==x) => e[1] entryXX :xx ::=

