DEV Community

Discussion on: Parser Combinators are Easy

 
qm3ster profile image
Mihail Malo

I only looked at the separators, not the paired wrappers.
Furthermore I didn't rely on the knowledge that the points are 2-dimensional.

You could say I have a stack of stacks of stacks :v

Thread Thread
 
deciduously profile image
Ben Lovy

Points could just be space separated, the sepBy() combinator would address that restriction

Thread Thread
 
qm3ster profile image
Mihail Malo • Edited
 2      number
 3      number
 ][     new point
 6      number
 2      number
 ][     new point
 1      number
 2      number
)][(    new set
 ][     new point
 1      number
 4      number
 ][     new point
 2      number
 1      number
)][(    new set
 ][     new point
 6      number
 9      number