2014-10-30 0:32 GMT+01:00 Nigel Thorne <[email protected]>:

> I like the idea of Parspec.
>
> I was wondering... is there a reason you don't have your examples
> grouped by "valid" and "invalid" instead of putting OK and FAIL on the
> end of each line?
>
>
As mentioned in the Readme, the language is inspired by gUnit ([1], which
I'm used to and was missing the mostly in the Parslet ecosystem.

I like gUnits way of validation examples, since they are succinct and
support a good workflow. One starts with validation examples, when building
up the bare parser, and when adding tree construction, one can substitute
the validity.


> I like the power of the syntax:
>
>  "1234"                 -> ":integer => '1234'"
>
> Are the quotes around the result needed? Is it really a string?
>
>  "1234"                 -> {:integer => '1234'}
>
>
You're right, your syntax looks nicer, and indeed, this is the point where
I had the biggest design conflict to decide, and in the end was doing it
the gUnit way. The problem is that to your suggested design is much more
complex to implement, since it would require a grammar for a subset of Ruby.



> These are just some random thoughts not criticisms.
>
> Well done for contributing to the Parslet ecosystem!
> I look forward to seeing how this project progresses.
>

Thanks for your input.


[1]:
https://theantlrguy.atlassian.net/wiki/display/ANTLR3/gUnit+-+Grammar+Unit+Testing

Reply via email to