Question on AnyChar.Repeat();

24 views
Skip to first unread message

Jay Janarthanan

unread,
Jun 2, 2016, 8:20:08 PM6/2/16
to Eto.Parse

Stgulling with this. the first match will work but the second one will fail because of the special character. Terminals.AnyChar.Repeat(); looks like the wrong option

Jay





Jay Janarthanan

unread,
Jun 3, 2016, 1:16:34 AM6/3/16
to Eto.Parse
I got it working

      var grammar = new Grammar(start.Then(Terminals.AnyChar.Repeat().Until(ws.Optional().Then(Terminals.Literal("**/"))).Then(ws.Optional().Then(end)))) { AllowPartialMatch = true };

Still getting the hang of the Fluent builder, its just putting the brackets in the right places :-) 

Curtis Wensley

unread,
Jun 3, 2016, 3:58:53 PM6/3/16
to Eto.Parse
Hi Jay,

I was about to suggest using Until() along with Terminals.AnyChar.Repeat().  Glad you found it (;

Cheers,
Curtis.
Reply all
Reply to author
Forward
0 new messages