Version for PetitParser for backward comptability

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Version for PetitParser for backward comptability

Usman Bhatti
Hi all,

Recently, there have been changes in PetitParser related to support for island grammar and parsing context which requires some modifications in the tools using PetitParser. Not all tools can be adapted immediately to use the new version. Hence, I have created a new version of PetitParser that loads the packages prior to these changes for backward compatibility.

Name: ConfigurationOfPetitParser-usmanbhatti.49
Author: usmanbhatti
Time: 28 September 2014, 8:58:00.540857 pm
UUID: 54877ca2-77b0-4c5e-937d-5124dd76b075
Ancestors: ConfigurationOfPetitParser-JanKurs.48

adding a baseline and a version that loads packages before changes made to petitparser related to parsing context and island grammar.

regards,

usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Version for PetitParser for backward comptability

Tudor Girba-2
Hi,

These changes should be backward compatible. What kind of impact did you experience? Can you give concrete examples?

Cheers,
Doru

On Sun, Sep 28, 2014 at 9:02 PM, Usman Bhatti <[hidden email]> wrote:
Hi all,

Recently, there have been changes in PetitParser related to support for island grammar and parsing context which requires some modifications in the tools using PetitParser. Not all tools can be adapted immediately to use the new version. Hence, I have created a new version of PetitParser that loads the packages prior to these changes for backward compatibility.

Name: ConfigurationOfPetitParser-usmanbhatti.49
Author: usmanbhatti
Time: 28 September 2014, 8:58:00.540857 pm
UUID: 54877ca2-77b0-4c5e-937d-5124dd76b075
Ancestors: ConfigurationOfPetitParser-JanKurs.48

adding a baseline and a version that loads packages before changes made to petitparser related to parsing context and island grammar.

regards,

usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Version for PetitParser for backward comptability

Usman Bhatti
Here's a screenshot of the debugger that popups when I execute some tests with the recent changes. It seems to be related to the problem of PPParsers knowing a context object instead of a stream.
Inline image 1

On Sun, Sep 28, 2014 at 9:17 PM, Tudor Girba <[hidden email]> wrote:
Hi,

These changes should be backward compatible. What kind of impact did you experience? Can you give concrete examples?

Cheers,
Doru

On Sun, Sep 28, 2014 at 9:02 PM, Usman Bhatti <[hidden email]> wrote:
Hi all,

Recently, there have been changes in PetitParser related to support for island grammar and parsing context which requires some modifications in the tools using PetitParser. Not all tools can be adapted immediately to use the new version. Hence, I have created a new version of PetitParser that loads the packages prior to these changes for backward compatibility.

Name: ConfigurationOfPetitParser-usmanbhatti.49
Author: usmanbhatti
Time: 28 September 2014, 8:58:00.540857 pm
UUID: 54877ca2-77b0-4c5e-937d-5124dd76b075
Ancestors: ConfigurationOfPetitParser-JanKurs.48

adding a baseline and a version that loads packages before changes made to petitparser related to parsing context and island grammar.

regards,

usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Version for PetitParser for backward comptability

Jan Kurš
Hi,

I tried to update PetitParser so that it converts a stream into the PPContext. Therefore an entry point to the parsing looks like this:

PPParser>>parse: anObject
    ^ self parse: anObject withContext: PPContext new

The PPContext enwraps the PPStream and should provide the stream protocol.

I also updated the PetitSmalltalk project (version JanKurs.71).

The drawback of PPContext (that I am aware of) is approximately 10% slowdown. If there is anything else, please let me know so that I can work on it.

Cheers,
Jan





On 28 September 2014 22:42, Usman Bhatti <[hidden email]> wrote:
Here's a screenshot of the debugger that popups when I execute some tests with the recent changes. It seems to be related to the problem of PPParsers knowing a context object instead of a stream.
Inline image 1

On Sun, Sep 28, 2014 at 9:17 PM, Tudor Girba <[hidden email]> wrote:
Hi,

These changes should be backward compatible. What kind of impact did you experience? Can you give concrete examples?

Cheers,
Doru

On Sun, Sep 28, 2014 at 9:02 PM, Usman Bhatti <[hidden email]> wrote:
Hi all,

Recently, there have been changes in PetitParser related to support for island grammar and parsing context which requires some modifications in the tools using PetitParser. Not all tools can be adapted immediately to use the new version. Hence, I have created a new version of PetitParser that loads the packages prior to these changes for backward compatibility.

Name: ConfigurationOfPetitParser-usmanbhatti.49
Author: usmanbhatti
Time: 28 September 2014, 8:58:00.540857 pm
UUID: 54877ca2-77b0-4c5e-937d-5124dd76b075
Ancestors: ConfigurationOfPetitParser-JanKurs.48

adding a baseline and a version that loads packages before changes made to petitparser related to parsing context and island grammar.

regards,

usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Version for PetitParser for backward comptability

Tudor Girba-2
Hi Usman,

Could you let us know how you trigger the parsing? Could it be that you are using some internal methods?

Could you reproduce this on any other parser?

Cheers,
Doru



On Mon, Sep 29, 2014 at 9:47 AM, Jan Kurš <[hidden email]> wrote:
Hi,

I tried to update PetitParser so that it converts a stream into the PPContext. Therefore an entry point to the parsing looks like this:

PPParser>>parse: anObject
    ^ self parse: anObject withContext: PPContext new

The PPContext enwraps the PPStream and should provide the stream protocol.

I also updated the PetitSmalltalk project (version JanKurs.71).

The drawback of PPContext (that I am aware of) is approximately 10% slowdown. If there is anything else, please let me know so that I can work on it.

Cheers,
Jan





On 28 September 2014 22:42, Usman Bhatti <[hidden email]> wrote:
Here's a screenshot of the debugger that popups when I execute some tests with the recent changes. It seems to be related to the problem of PPParsers knowing a context object instead of a stream.
Inline image 1

On Sun, Sep 28, 2014 at 9:17 PM, Tudor Girba <[hidden email]> wrote:
Hi,

These changes should be backward compatible. What kind of impact did you experience? Can you give concrete examples?

Cheers,
Doru

On Sun, Sep 28, 2014 at 9:02 PM, Usman Bhatti <[hidden email]> wrote:
Hi all,

Recently, there have been changes in PetitParser related to support for island grammar and parsing context which requires some modifications in the tools using PetitParser. Not all tools can be adapted immediately to use the new version. Hence, I have created a new version of PetitParser that loads the packages prior to these changes for backward compatibility.

Name: ConfigurationOfPetitParser-usmanbhatti.49
Author: usmanbhatti
Time: 28 September 2014, 8:58:00.540857 pm
UUID: 54877ca2-77b0-4c5e-937d-5124dd76b075
Ancestors: ConfigurationOfPetitParser-JanKurs.48

adding a baseline and a version that loads packages before changes made to petitparser related to parsing context and island grammar.

regards,

usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Version for PetitParser for backward comptability

Usman Bhatti
Hi Doru,

We are using Platyplus to generate a language grammar and it uses PetitParser for this purpose. When trying to synchronize the definitions with Platyplus in the latest version of Moose, there are some errors related to PPContext not understanding #position. And it seems to be associated to the new changes.

Here's a script to reproduce the problem in Moose:

Gofer new
package: 'ConfigurationOfPlatypus';
load.
(Smalltalk at: #ConfigurationOfPlatypus) loadDevelopment.
PlatypusExpressEditor new synchronize

We might later in time try to adapt platyplus to the recent changes in PetitParser but currently we have to concentrate on other things.

regards.

Usman

On Mon, Sep 29, 2014 at 10:00 AM, Tudor Girba <[hidden email]> wrote:
Hi Usman,

Could you let us know how you trigger the parsing? Could it be that you are using some internal methods?

Could you reproduce this on any other parser?

Cheers,
Doru



On Mon, Sep 29, 2014 at 9:47 AM, Jan Kurš <[hidden email]> wrote:
Hi,

I tried to update PetitParser so that it converts a stream into the PPContext. Therefore an entry point to the parsing looks like this:

PPParser>>parse: anObject
    ^ self parse: anObject withContext: PPContext new

The PPContext enwraps the PPStream and should provide the stream protocol.

I also updated the PetitSmalltalk project (version JanKurs.71).

The drawback of PPContext (that I am aware of) is approximately 10% slowdown. If there is anything else, please let me know so that I can work on it.

Cheers,
Jan





On 28 September 2014 22:42, Usman Bhatti <[hidden email]> wrote:
Here's a screenshot of the debugger that popups when I execute some tests with the recent changes. It seems to be related to the problem of PPParsers knowing a context object instead of a stream.
Inline image 1

On Sun, Sep 28, 2014 at 9:17 PM, Tudor Girba <[hidden email]> wrote:
Hi,

These changes should be backward compatible. What kind of impact did you experience? Can you give concrete examples?

Cheers,
Doru

On Sun, Sep 28, 2014 at 9:02 PM, Usman Bhatti <[hidden email]> wrote:
Hi all,

Recently, there have been changes in PetitParser related to support for island grammar and parsing context which requires some modifications in the tools using PetitParser. Not all tools can be adapted immediately to use the new version. Hence, I have created a new version of PetitParser that loads the packages prior to these changes for backward compatibility.

Name: ConfigurationOfPetitParser-usmanbhatti.49
Author: usmanbhatti
Time: 28 September 2014, 8:58:00.540857 pm
UUID: 54877ca2-77b0-4c5e-937d-5124dd76b075
Ancestors: ConfigurationOfPetitParser-JanKurs.48

adding a baseline and a version that loads packages before changes made to petitparser related to parsing context and island grammar.

regards,

usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Version for PetitParser for backward comptability

Tudor Girba-2
Hi Usman,

Thanks for the script.

@Jan: could you look at it? I do not think it is a big problem.

Doru



On Tue, Sep 30, 2014 at 10:22 AM, Usman Bhatti <[hidden email]> wrote:
Hi Doru,

We are using Platyplus to generate a language grammar and it uses PetitParser for this purpose. When trying to synchronize the definitions with Platyplus in the latest version of Moose, there are some errors related to PPContext not understanding #position. And it seems to be associated to the new changes.

Here's a script to reproduce the problem in Moose:

Gofer new
package: 'ConfigurationOfPlatypus';
load.
(Smalltalk at: #ConfigurationOfPlatypus) loadDevelopment.
PlatypusExpressEditor new synchronize

We might later in time try to adapt platyplus to the recent changes in PetitParser but currently we have to concentrate on other things.

regards.

Usman

On Mon, Sep 29, 2014 at 10:00 AM, Tudor Girba <[hidden email]> wrote:
Hi Usman,

Could you let us know how you trigger the parsing? Could it be that you are using some internal methods?

Could you reproduce this on any other parser?

Cheers,
Doru



On Mon, Sep 29, 2014 at 9:47 AM, Jan Kurš <[hidden email]> wrote:
Hi,

I tried to update PetitParser so that it converts a stream into the PPContext. Therefore an entry point to the parsing looks like this:

PPParser>>parse: anObject
    ^ self parse: anObject withContext: PPContext new

The PPContext enwraps the PPStream and should provide the stream protocol.

I also updated the PetitSmalltalk project (version JanKurs.71).

The drawback of PPContext (that I am aware of) is approximately 10% slowdown. If there is anything else, please let me know so that I can work on it.

Cheers,
Jan





On 28 September 2014 22:42, Usman Bhatti <[hidden email]> wrote:
Here's a screenshot of the debugger that popups when I execute some tests with the recent changes. It seems to be related to the problem of PPParsers knowing a context object instead of a stream.
Inline image 1

On Sun, Sep 28, 2014 at 9:17 PM, Tudor Girba <[hidden email]> wrote:
Hi,

These changes should be backward compatible. What kind of impact did you experience? Can you give concrete examples?

Cheers,
Doru

On Sun, Sep 28, 2014 at 9:02 PM, Usman Bhatti <[hidden email]> wrote:
Hi all,

Recently, there have been changes in PetitParser related to support for island grammar and parsing context which requires some modifications in the tools using PetitParser. Not all tools can be adapted immediately to use the new version. Hence, I have created a new version of PetitParser that loads the packages prior to these changes for backward compatibility.

Name: ConfigurationOfPetitParser-usmanbhatti.49
Author: usmanbhatti
Time: 28 September 2014, 8:58:00.540857 pm
UUID: 54877ca2-77b0-4c5e-937d-5124dd76b075
Ancestors: ConfigurationOfPetitParser-JanKurs.48

adding a baseline and a version that loads packages before changes made to petitparser related to parsing context and island grammar.

regards,

usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Version for PetitParser for backward comptability

Jan Kurš
Hey,

I added #position: and #contents selectors to the PPContext. The script should pass now. Please, let me know, if there are any other problems.

Originally, I decided not to include these selectors so that the developers of new parser combinators are aware of the changes in the PetitParser (and the integration of the PPContext is reasonably easy). Now, it seems it will be better to include these selectors to make it easy for the users of PetitParser.

Cheers,
Jan

On 30 September 2014 10:27, Tudor Girba <[hidden email]> wrote:
Hi Usman,

Thanks for the script.

@Jan: could you look at it? I do not think it is a big problem.

Doru



On Tue, Sep 30, 2014 at 10:22 AM, Usman Bhatti <[hidden email]> wrote:
Hi Doru,

We are using Platyplus to generate a language grammar and it uses PetitParser for this purpose. When trying to synchronize the definitions with Platyplus in the latest version of Moose, there are some errors related to PPContext not understanding #position. And it seems to be associated to the new changes.

Here's a script to reproduce the problem in Moose:

Gofer new
package: 'ConfigurationOfPlatypus';
load.
(Smalltalk at: #ConfigurationOfPlatypus) loadDevelopment.
PlatypusExpressEditor new synchronize

We might later in time try to adapt platyplus to the recent changes in PetitParser but currently we have to concentrate on other things.

regards.

Usman

On Mon, Sep 29, 2014 at 10:00 AM, Tudor Girba <[hidden email]> wrote:
Hi Usman,

Could you let us know how you trigger the parsing? Could it be that you are using some internal methods?

Could you reproduce this on any other parser?

Cheers,
Doru



On Mon, Sep 29, 2014 at 9:47 AM, Jan Kurš <[hidden email]> wrote:
Hi,

I tried to update PetitParser so that it converts a stream into the PPContext. Therefore an entry point to the parsing looks like this:

PPParser>>parse: anObject
    ^ self parse: anObject withContext: PPContext new

The PPContext enwraps the PPStream and should provide the stream protocol.

I also updated the PetitSmalltalk project (version JanKurs.71).

The drawback of PPContext (that I am aware of) is approximately 10% slowdown. If there is anything else, please let me know so that I can work on it.

Cheers,
Jan





On 28 September 2014 22:42, Usman Bhatti <[hidden email]> wrote:
Here's a screenshot of the debugger that popups when I execute some tests with the recent changes. It seems to be related to the problem of PPParsers knowing a context object instead of a stream.
Inline image 1

On Sun, Sep 28, 2014 at 9:17 PM, Tudor Girba <[hidden email]> wrote:
Hi,

These changes should be backward compatible. What kind of impact did you experience? Can you give concrete examples?

Cheers,
Doru

On Sun, Sep 28, 2014 at 9:02 PM, Usman Bhatti <[hidden email]> wrote:
Hi all,

Recently, there have been changes in PetitParser related to support for island grammar and parsing context which requires some modifications in the tools using PetitParser. Not all tools can be adapted immediately to use the new version. Hence, I have created a new version of PetitParser that loads the packages prior to these changes for backward compatibility.

Name: ConfigurationOfPetitParser-usmanbhatti.49
Author: usmanbhatti
Time: 28 September 2014, 8:58:00.540857 pm
UUID: 54877ca2-77b0-4c5e-937d-5124dd76b075
Ancestors: ConfigurationOfPetitParser-JanKurs.48

adding a baseline and a version that loads packages before changes made to petitparser related to parsing context and island grammar.

regards,

usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Version for PetitParser for backward comptability

Tudor Girba-2
Thanks, Jan!

Doru

On Tue, Sep 30, 2014 at 3:46 PM, Jan Kurš <[hidden email]> wrote:
Hey,

I added #position: and #contents selectors to the PPContext. The script should pass now. Please, let me know, if there are any other problems.

Originally, I decided not to include these selectors so that the developers of new parser combinators are aware of the changes in the PetitParser (and the integration of the PPContext is reasonably easy). Now, it seems it will be better to include these selectors to make it easy for the users of PetitParser.

Cheers,
Jan

On 30 September 2014 10:27, Tudor Girba <[hidden email]> wrote:
Hi Usman,

Thanks for the script.

@Jan: could you look at it? I do not think it is a big problem.

Doru



On Tue, Sep 30, 2014 at 10:22 AM, Usman Bhatti <[hidden email]> wrote:
Hi Doru,

We are using Platyplus to generate a language grammar and it uses PetitParser for this purpose. When trying to synchronize the definitions with Platyplus in the latest version of Moose, there are some errors related to PPContext not understanding #position. And it seems to be associated to the new changes.

Here's a script to reproduce the problem in Moose:

Gofer new
package: 'ConfigurationOfPlatypus';
load.
(Smalltalk at: #ConfigurationOfPlatypus) loadDevelopment.
PlatypusExpressEditor new synchronize

We might later in time try to adapt platyplus to the recent changes in PetitParser but currently we have to concentrate on other things.

regards.

Usman

On Mon, Sep 29, 2014 at 10:00 AM, Tudor Girba <[hidden email]> wrote:
Hi Usman,

Could you let us know how you trigger the parsing? Could it be that you are using some internal methods?

Could you reproduce this on any other parser?

Cheers,
Doru



On Mon, Sep 29, 2014 at 9:47 AM, Jan Kurš <[hidden email]> wrote:
Hi,

I tried to update PetitParser so that it converts a stream into the PPContext. Therefore an entry point to the parsing looks like this:

PPParser>>parse: anObject
    ^ self parse: anObject withContext: PPContext new

The PPContext enwraps the PPStream and should provide the stream protocol.

I also updated the PetitSmalltalk project (version JanKurs.71).

The drawback of PPContext (that I am aware of) is approximately 10% slowdown. If there is anything else, please let me know so that I can work on it.

Cheers,
Jan





On 28 September 2014 22:42, Usman Bhatti <[hidden email]> wrote:
Here's a screenshot of the debugger that popups when I execute some tests with the recent changes. It seems to be related to the problem of PPParsers knowing a context object instead of a stream.
Inline image 1

On Sun, Sep 28, 2014 at 9:17 PM, Tudor Girba <[hidden email]> wrote:
Hi,

These changes should be backward compatible. What kind of impact did you experience? Can you give concrete examples?

Cheers,
Doru

On Sun, Sep 28, 2014 at 9:02 PM, Usman Bhatti <[hidden email]> wrote:
Hi all,

Recently, there have been changes in PetitParser related to support for island grammar and parsing context which requires some modifications in the tools using PetitParser. Not all tools can be adapted immediately to use the new version. Hence, I have created a new version of PetitParser that loads the packages prior to these changes for backward compatibility.

Name: ConfigurationOfPetitParser-usmanbhatti.49
Author: usmanbhatti
Time: 28 September 2014, 8:58:00.540857 pm
UUID: 54877ca2-77b0-4c5e-937d-5124dd76b075
Ancestors: ConfigurationOfPetitParser-JanKurs.48

adding a baseline and a version that loads packages before changes made to petitparser related to parsing context and island grammar.

regards,

usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Version for PetitParser for backward comptability

Nicolas Anquetil
In reply to this post by Jan Kurš

just tried it and there is another error (method deprecation) in
PPExpressIdentifierParser>>failureTokenFrom: token
    ^ PPFailure message: 'Identifier expected' at: token position


no time to look at it now, but just substituting message:context: to message:at: does not work

nicolas


On 30/09/2014 15:46, Jan Kurš wrote:
Hey,

I added #position: and #contents selectors to the PPContext. The script should pass now. Please, let me know, if there are any other problems.

Originally, I decided not to include these selectors so that the developers of new parser combinators are aware of the changes in the PetitParser (and the integration of the PPContext is reasonably easy). Now, it seems it will be better to include these selectors to make it easy for the users of PetitParser.

Cheers,
Jan

On 30 September 2014 10:27, Tudor Girba <[hidden email]> wrote:
Hi Usman,

Thanks for the script.

@Jan: could you look at it? I do not think it is a big problem.

Doru



On Tue, Sep 30, 2014 at 10:22 AM, Usman Bhatti <[hidden email]> wrote:
Hi Doru,

We are using Platyplus to generate a language grammar and it uses PetitParser for this purpose. When trying to synchronize the definitions with Platyplus in the latest version of Moose, there are some errors related to PPContext not understanding #position. And it seems to be associated to the new changes.

Here's a script to reproduce the problem in Moose:

Gofer new
package: 'ConfigurationOfPlatypus';
load.
(Smalltalk at: #ConfigurationOfPlatypus) loadDevelopment.
PlatypusExpressEditor new synchronize

We might later in time try to adapt platyplus to the recent changes in PetitParser but currently we have to concentrate on other things.

regards.

Usman

On Mon, Sep 29, 2014 at 10:00 AM, Tudor Girba <[hidden email]> wrote:
Hi Usman,

Could you let us know how you trigger the parsing? Could it be that you are using some internal methods?

Could you reproduce this on any other parser?

Cheers,
Doru



On Mon, Sep 29, 2014 at 9:47 AM, Jan Kurš <[hidden email]> wrote:
Hi,

I tried to update PetitParser so that it converts a stream into the PPContext. Therefore an entry point to the parsing looks like this:

PPParser>>parse: anObject
    ^ self parse: anObject withContext: PPContext new

The PPContext enwraps the PPStream and should provide the stream protocol.

I also updated the PetitSmalltalk project (version JanKurs.71).

The drawback of PPContext (that I am aware of) is approximately 10% slowdown. If there is anything else, please let me know so that I can work on it.

Cheers,
Jan





On 28 September 2014 22:42, Usman Bhatti <[hidden email]> wrote:
Here's a screenshot of the debugger that popups when I execute some tests with the recent changes. It seems to be related to the problem of PPParsers knowing a context object instead of a stream.
Inline
                                                          image 1

On Sun, Sep 28, 2014 at 9:17 PM, Tudor Girba <[hidden email]> wrote:
Hi,

These changes should be backward compatible. What kind of impact did you experience? Can you give concrete examples?

Cheers,
Doru

On Sun, Sep 28, 2014 at 9:02 PM, Usman Bhatti <[hidden email]> wrote:
Hi all,

Recently, there have been changes in PetitParser related to support for island grammar and parsing context which requires some modifications in the tools using PetitParser. Not all tools can be adapted immediately to use the new version. Hence, I have created a new version of PetitParser that loads the packages prior to these changes for backward compatibility.

Name: ConfigurationOfPetitParser-usmanbhatti.49
Author: usmanbhatti
Time: 28 September 2014, 8:58:00.540857 pm
UUID: 54877ca2-77b0-4c5e-937d-5124dd76b075
Ancestors: ConfigurationOfPetitParser-JanKurs.48

adding a baseline and a version that loads packages before changes made to petitparser related to parsing context and island grammar.

regards,

usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Version for PetitParser for backward comptability

Jan Kurš
Hey,

this is actually a bit different issue. The PetitParser now reports the furthest failure, not the last failure, as it is supposed to give more precise error locations. And the furthest failure is remembered in PPContext, if you don't specify the context, you can't remember it. Therefore the method is deprecated.

I am not sure, if it is a good approach (I would rather see reporting errors in a proper way), but I un-deprecated that, so all the tests from PetitStepExpress package pass.

Cheers,
Jan

On 30 September 2014 16:08, Nicolas Anquetil <[hidden email]> wrote:

just tried it and there is another error (method deprecation) in
PPExpressIdentifierParser>>failureTokenFrom: token
    ^ PPFailure message: 'Identifier expected' at: token position


no time to look at it now, but just substituting message:context: to message:at: does not work

nicolas



On 30/09/2014 15:46, Jan Kurš wrote:
Hey,

I added #position: and #contents selectors to the PPContext. The script should pass now. Please, let me know, if there are any other problems.

Originally, I decided not to include these selectors so that the developers of new parser combinators are aware of the changes in the PetitParser (and the integration of the PPContext is reasonably easy). Now, it seems it will be better to include these selectors to make it easy for the users of PetitParser.

Cheers,
Jan

On 30 September 2014 10:27, Tudor Girba <[hidden email]> wrote:
Hi Usman,

Thanks for the script.

@Jan: could you look at it? I do not think it is a big problem.

Doru



On Tue, Sep 30, 2014 at 10:22 AM, Usman Bhatti <[hidden email]> wrote:
Hi Doru,

We are using Platyplus to generate a language grammar and it uses PetitParser for this purpose. When trying to synchronize the definitions with Platyplus in the latest version of Moose, there are some errors related to PPContext not understanding #position. And it seems to be associated to the new changes.

Here's a script to reproduce the problem in Moose:

Gofer new
package: 'ConfigurationOfPlatypus';
load.
(Smalltalk at: #ConfigurationOfPlatypus) loadDevelopment.
PlatypusExpressEditor new synchronize

We might later in time try to adapt platyplus to the recent changes in PetitParser but currently we have to concentrate on other things.

regards.

Usman

On Mon, Sep 29, 2014 at 10:00 AM, Tudor Girba <[hidden email]> wrote:
Hi Usman,

Could you let us know how you trigger the parsing? Could it be that you are using some internal methods?

Could you reproduce this on any other parser?

Cheers,
Doru



On Mon, Sep 29, 2014 at 9:47 AM, Jan Kurš <[hidden email]> wrote:
Hi,

I tried to update PetitParser so that it converts a stream into the PPContext. Therefore an entry point to the parsing looks like this:

PPParser>>parse: anObject
    ^ self parse: anObject withContext: PPContext new

The PPContext enwraps the PPStream and should provide the stream protocol.

I also updated the PetitSmalltalk project (version JanKurs.71).

The drawback of PPContext (that I am aware of) is approximately 10% slowdown. If there is anything else, please let me know so that I can work on it.

Cheers,
Jan





On 28 September 2014 22:42, Usman Bhatti <[hidden email]> wrote:
Here's a screenshot of the debugger that popups when I execute some tests with the recent changes. It seems to be related to the problem of PPParsers knowing a context object instead of a stream.
Inline
                                                          image 1

On Sun, Sep 28, 2014 at 9:17 PM, Tudor Girba <[hidden email]> wrote:
Hi,

These changes should be backward compatible. What kind of impact did you experience? Can you give concrete examples?

Cheers,
Doru

On Sun, Sep 28, 2014 at 9:02 PM, Usman Bhatti <[hidden email]> wrote:
Hi all,

Recently, there have been changes in PetitParser related to support for island grammar and parsing context which requires some modifications in the tools using PetitParser. Not all tools can be adapted immediately to use the new version. Hence, I have created a new version of PetitParser that loads the packages prior to these changes for backward compatibility.

Name: ConfigurationOfPetitParser-usmanbhatti.49
Author: usmanbhatti
Time: 28 September 2014, 8:58:00.540857 pm
UUID: 54877ca2-77b0-4c5e-937d-5124dd76b075
Ancestors: ConfigurationOfPetitParser-JanKurs.48

adding a baseline and a version that loads packages before changes made to petitparser related to parsing context and island grammar.

regards,

usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev