
21 Sep
2011
21 Sep
'11
8:31 a.m.
On Wed, 21 Sep 2011 11:27:31 +0200, Christian Maeder
Hi,
1. your "lookAhead" is unnecessary, because your items (atomNames) never start with "%".
I see.
2. your "try" fails in (line 12, column 1), because the last item (aka atomName) starts consuming "\n", before your eol parser is called.
Ahh, this is a good point. I for some reason seeded the thought in my mind that spaces takes the ' ' character, not '\n'.
So rather than calling spaces before every real atom, I would call it after every real atom and after your formatDecl (so before your linesOf parser).
Excellent solution. I appreciate your help. That would have taken me quite a bit of head-banging to find. Cheers, - Ben