Announce: grappa 1.0.0-beta.4

classic Classic list List threaded Threaded
3 messages Options
fge
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Announce: grappa 1.0.0-beta.4

fge
Hello parboiled1 users,

A new version of grappa is out!

This version is mostly about code cleanup plus some refactoring, but there is one user-visible change: the addition of a join rule!

This rule is @Beta at the moment and you have to use the new JoinParser class to use it; here is for example how you would match a string with possible escapces in it:

Rule escape()
{
    return string("\\\"); // backslash then double quote
}

Rule normal()
{
    return zeroOrMore(noneOf("\\\")); // anything but backslash or double quote
}

Rule stringContent()
{
    return join(normal()).using(escape()).min(0);
}

Yes, that is a new way to write rules! I hope to bring more of these in the future... Test it plenty, of course! You can also .times(3), .max(8), .times(3, 6) etc etc.

Note also that grappa now has dedicated Google groups:

* grappa-users (available via email);
* grappa-devel (available via email).

Feedback, contributions etc welcome, of course!

Happy parsing!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Announce: grappa 1.0.0-beta.4

chbussler
Hi,

thanks for the update.

Where are the new java-docs? Could not find a link on https://github.com/parboiled1/grappa

The reason I am asking is that I am getting now a lot of deprecation messages (like FirstOf() in BaseParser has been deprecated) and wanted to see what I have to do now to fix that in my code base.

Thanks,

Christoph


On May 3, 2014, at 6:09 AM, fge [via parboiled users] <[hidden email]> wrote:

Hello parboiled1 users,

A new version of grappa is out!

This version is mostly about code cleanup plus some refactoring, but there is one user-visible change: the addition of a join rule!

This rule is @Beta at the moment and you have to use the new JoinParser class to use it; here is for example how you would match a string with possible escapces in it:

Rule escape()
{
    return string("\\\"); // backslash then double quote
}

Rule normal()
{
    return zeroOrMore(noneOf("\\\")); // anything but backslash or double quote
}

Rule stringContent()
{
    return join(normal()).using(escape()).min(0);
}

Yes, that is a new way to write rules! I hope to bring more of these in the future... Test it plenty, of course! You can also .times(3), .max(8), .times(3, 6) etc etc.

Note also that grappa now has dedicated Google groups:

* grappa-users (available via email);
* grappa-devel (available via email).

Feedback, contributions etc welcome, of course!

Happy parsing!


If you reply to this email, your message will be added to the discussion below:
http://users.parboiled.org/Announce-grappa-1-0-0-beta-4-tp4024315.html
To start a new topic under parboiled users, email [hidden email]
To unsubscribe from parboiled users, click here.
NAML

fge
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Announce: grappa 1.0.0-beta.4

fge
Hello,

On Sun, May 4, 2014 at 2:59 AM, chbussler [via parboiled users]
<[hidden email]> wrote:

> Hi,
>
> thanks for the update.
>
> Where are the new java-docs? Could not find a link on
> https://github.com/parboiled1/grappa
>
> The reason I am asking is that I am getting now a lot of deprecation
> messages (like FirstOf() in BaseParser has been deprecated) and wanted to
> see what I have to do now to fix that in my code base.
>
> Thanks,
>
> Christoph
>

Hello,

All builtin rules of BaseParser now start with a lowercase letter,
that's the only difference; they are otherwise equivalent.

Otherwise, javadoc (which is still poor :/) is available at
https://parboiled1.github.io/grappa.

Regards,
--
Francis Galiegue, [hidden email]
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Loading...