Make ZeroOrMore non-greedy to make it nestable without exponential behavior.

This commit is contained in:
Ian Gulliver
2014-06-29 17:39:24 -07:00
parent 2f03f4d9ff
commit 78cc56dc46
3 changed files with 13 additions and 12 deletions

View File

@@ -23,5 +23,5 @@ var mediawiki = {
rr.Ref('nowiki'),
rr.Ref('text')
),
'wikidoc': rr.Node('wikidoc', rr.ZeroOrMore(rr.Ref('wikichunk'))),
'wikidoc': rr.Node('wikidoc', rr.Sequence(rr.ZeroOrMore(rr.Ref('wikichunk')), rr.EndOfText())),
};