Parser matchers

10 views
Skip to first unread message

Alexey Romanov

unread,
Feb 28, 2011, 3:33:08 AM2/28/11
to specs...@googlegroups.com
It seems there are no matchers for parser combinators in specs
currently. Does anybody use specs to test parsers, or know a project
which does?

If not, I will see if I get anything good enough to contribute from my
current project.

Yours, Alexey Romanov

etorreborre

unread,
Feb 28, 2011, 4:59:36 AM2/28/11
to specs-users
That's a very good idea! Please contribute and I'll do the
integration.

Johannes Rudolph

unread,
Mar 1, 2011, 5:17:56 AM3/1/11
to specs-users
On Feb 28, 9:33 am, Alexey Romanov <alexey.v.roma...@gmail.com> wrote:
> It seems there are no matchers for parser combinators in specs
> currently. Does anybody use specs to test parsers, or know a project
> which does?

scala-enhanced-strings does, but in a very crude way:

https://github.com/jrudolph/scala-enhanced-strings/blob/master/src/test/scala/net/virtualvoid/string/ESParserSpecs.scala#L67


> If not, I will see if I get anything good enough to contribute from my
> current project.

That would be great.

Alexey Romanov

unread,
Mar 8, 2011, 9:54:43 AM3/8/11
to specs...@googlegroups.com, Johannes Rudolph
See a first cut at https://github.com/alexeyr/specs2/tree/parser_matchers

The important files are:
https://github.com/alexeyr/specs2/blob/parser_matchers/src/main/scala/org/specs2/matcher/ParserMatchers.scala
https://github.com/alexeyr/specs2/blob/parser_matchers/src/test/scala/org/specs2/matcher/ParserMatcherSpec.scala

Yours, Alexey Romanov

> --
> You received this message because you are subscribed to the Google Groups "specs-users" group.
> To post to this group, send email to specs...@googlegroups.com.
> To unsubscribe from this group, send email to specs-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/specs-users?hl=en.
>
>

etorreborre

unread,
Mar 10, 2011, 1:45:29 AM3/10/11
to specs-users
Hi,

This is now integrated in specs2 1.1: http://bit.ly/gvZOmI

Thanks a lot Alexey for your contribution!

Eric.

PS: note that you should be able to use this trait in an original
specs Specification but I haven't tried it though.

On Mar 9, 1:54 am, Alexey Romanov <alexey.v.roma...@gmail.com> wrote:
> See a first cut athttps://github.com/alexeyr/specs2/tree/parser_matchers
>
> The important files are:https://github.com/alexeyr/specs2/blob/parser_matchers/src/main/scala...https://github.com/alexeyr/specs2/blob/parser_matchers/src/test/scala...
>
> Yours, Alexey Romanov
>
> On Tue, Mar 1, 2011 at 1:17 PM, Johannes Rudolph
>
>
>
>
>
>
>
> <johannes.rudo...@googlemail.com> wrote:
> > On Feb 28, 9:33 am, Alexey Romanov <alexey.v.roma...@gmail.com> wrote:
> >> It seems there are no matchers for parser combinators in specs
> >> currently. Does anybody use specs to test parsers, or know a project
> >> which does?
>
> > scala-enhanced-strings does, but in a very crude way:
>
> >https://github.com/jrudolph/scala-enhanced-strings/blob/master/src/te...
Reply all
Reply to author
Forward
0 new messages