Jul 7, 2009 at 12:27 PM
Edited Jul 7, 2009 at 12:57 PM
I'm using irony and absolutely thrilled with the results, except for the fact that I cannot get it to let me have custom escapes that would otherwise render as key characters that match other terminals. For example, I have something that expects a list of
comma separated values
[ABC:1234, DEF:asdf343434, GHi:5kfk9 ]
I want to be able to have between the colon and the , any number of \, or \] without triggering the , and ] to misfire as an early end to the sequence.
I suspect I can do this somehow with Token Filters... but I can't figure it out (since it's not brace matching or whitespace preservation, haha) .. I've been staring at this all night... any ideas?
I realize this makes it look silly, but it's not my data, I'm just parsing it.
Here's an example of the 'mangled' escaped text I'd like for it to treat the same way as the above.
[ABC:1234, DEF:asdf3[43434\], GHisds:2\,5kfk9 ]
listItem.Rule = plain_ident + Symbol(":") + tricky_ident_accepting_strange_chars_n_escapes;
listItemList.Rule = MakeStarRule(listItemList, Symbol(","), listItem);
bracked_list = Symbol("[") + listItemList.Q() + Symbol("]");
Sorry for the incompleteness the first time round.