On 2/29/12 3:45 AM, Philippe Sigaud wrote:
mixin(Grammar!("Doc <- Node*"
"Node <- OpeningTag (Text / Node)* ClosingTag", NodeAction,
"OpeningTag <- '<' Identifier '>'", OpeningAction,
"ClosingTag <- `</` Identifier '>'", ClosingAction,
"Text <- (!(OpeningTag / ClosingTag) _)+"));
That looks about right, but still has a fair amount of noise. I think the approach of putting the entire grammar in one string is best.
Andrei
