Super nice parser improvements soon available

SD
Stéphane Ducasse
Sat, Oct 3, 2020 9:24 AM

In the last week I’ve worked on doing several enhances to the parser

https://github.com/pharo-project/pharo/pull/7411 https://github.com/pharo-project/pharo/pull/7411

Besides several refactorings and cleanups, major changes include:

  • we are able to correctly detect unfinished statements (missing dots)
  • we are able to correctly detect unreachable statements (like a statement after a return statement)

And we still continue parsing. This makes that the faulty parser used for syntax highlighting and other much more precise, and several of my touches also fix some of the exceptions found while typing (that were due to wrong behaviours on the parser).

Also I did a small iteration on top of the “syntax feedback” so it’s less noisy. We can remove it at any time (that’s just removing a configuration). But I’d like more feedback before :)

To see the improvements

Pharo 8

Pharo9 previous to these changes

Pharo9 with these changes

Now, I’ll not deny this is still perfectible, as everything, but we can do another iteration on top :)

Guille


Lse-consortium mailing list Lse-consortium@lists.gforge.inria.fr https://lists.gforge.inria.fr/mailman/listinfo/lse-consortium


Stéphane Ducasse http://stephane.ducasse.free.fr / http://www.pharo.org 03 59 35 87 52 Assistant: Aurore Dalle FAX 03 59 57 78 50 TEL 03 59 35 86 16 S. Ducasse - Inria 40, avenue Halley, Parc Scientifique de la Haute Borne, Bât.A, Park Plaza Villeneuve d'Ascq 59650 France

> In the last week I’ve worked on doing several enhances to the parser > > https://github.com/pharo-project/pharo/pull/7411 <https://github.com/pharo-project/pharo/pull/7411> > > Besides several refactorings and cleanups, major changes include: > > - we are able to correctly detect unfinished statements (missing dots) > - we are able to correctly detect unreachable statements (like a statement after a return statement) > > And we still continue parsing. This makes that the faulty parser used for syntax highlighting and other much more precise, and several of my touches also fix some of the exceptions found while typing (that were due to wrong behaviours on the parser). > > Also I did a small iteration on top of the “syntax feedback” so it’s less noisy. We can remove it at any time (that’s just removing a configuration). But I’d like more feedback before :) > > To see the improvements > > Pharo 8 > > > > Pharo9 previous to these changes > > > > Pharo9 with these changes > > > > > Now, I’ll not deny this is still perfectible, as everything, but we can do another iteration on top :) > > Guille > _______________________________________________ > Lse-consortium mailing list > Lse-consortium@lists.gforge.inria.fr > https://lists.gforge.inria.fr/mailman/listinfo/lse-consortium -------------------------------------------- Stéphane Ducasse http://stephane.ducasse.free.fr / http://www.pharo.org 03 59 35 87 52 Assistant: Aurore Dalle FAX 03 59 57 78 50 TEL 03 59 35 86 16 S. Ducasse - Inria 40, avenue Halley, Parc Scientifique de la Haute Borne, Bât.A, Park Plaza Villeneuve d'Ascq 59650 France
TM
Tim Mackinnon
Sat, Oct 3, 2020 3:18 PM

That is awesome work - I love you guys for continuing to improve this stuff! It’s inspiring...

Tim

On 3 Oct 2020, at 10:24, Stéphane Ducasse stephane.ducasse@inria.fr wrote:



In the last week I’ve worked on doing several enhances to the parser

https://github.com/pharo-project/pharo/pull/7411

Besides several refactorings and cleanups, major changes include:

  • we are able to correctly detect unfinished statements (missing dots)
  • we are able to correctly detect unreachable statements (like a statement after a return statement)

And we still continue parsing. This makes that the faulty parser used for syntax highlighting and other much more precise, and several of my touches also fix some of the exceptions found while typing (that were due to wrong behaviours on the parser).

Also I did a small iteration on top of the “syntax feedback” so it’s less noisy. We can remove it at any time (that’s just removing a configuration). But I’d like more feedback before :)

To see the improvements

Pharo 8

<PastedGraphic-3.png>

Pharo9 previous to these changes

<PastedGraphic-1.png>

Pharo9 with these changes

<PastedGraphic-2.png>

Now, I’ll not deny this is still perfectible, as everything, but we can do another iteration on top :)

Guille


Lse-consortium mailing list Lse-consortium@lists.gforge.inria.fr https://lists.gforge.inria.fr/mailman/listinfo/lse-consortium


Stéphane Ducasse http://stephane.ducasse.free.fr / http://www.pharo.org 03 59 35 87 52 Assistant: Aurore Dalle FAX 03 59 57 78 50 TEL 03 59 35 86 16 S. Ducasse - Inria 40, avenue Halley, Parc Scientifique de la Haute Borne, Bât.A, Park Plaza Villeneuve d'Ascq 59650 France

That is awesome work - I love you guys for continuing to improve this stuff! It’s inspiring... Tim > On 3 Oct 2020, at 10:24, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote: > >  > >> In the last week I’ve worked on doing several enhances to the parser >> >> https://github.com/pharo-project/pharo/pull/7411 >> >> Besides several refactorings and cleanups, major changes include: >> >> - we are able to correctly detect unfinished statements (missing dots) >> - we are able to correctly detect unreachable statements (like a statement after a return statement) >> >> And we still continue parsing. This makes that the faulty parser used for syntax highlighting and other much more precise, and several of my touches also fix some of the exceptions found while typing (that were due to wrong behaviours on the parser). >> >> Also I did a small iteration on top of the “syntax feedback” so it’s less noisy. We can remove it at any time (that’s just removing a configuration). But I’d like more feedback before :) >> >> To see the improvements >> >> Pharo 8 >> >> <PastedGraphic-3.png> >> >> Pharo9 previous to these changes >> >> <PastedGraphic-1.png> >> >> Pharo9 with these changes >> >> <PastedGraphic-2.png> >> >> >> Now, I’ll not deny this is still perfectible, as everything, but we can do another iteration on top :) >> >> Guille >> _______________________________________________ >> Lse-consortium mailing list >> Lse-consortium@lists.gforge.inria.fr >> https://lists.gforge.inria.fr/mailman/listinfo/lse-consortium > > -------------------------------------------- > Stéphane Ducasse > http://stephane.ducasse.free.fr / http://www.pharo.org > 03 59 35 87 52 > Assistant: Aurore Dalle > FAX 03 59 57 78 50 > TEL 03 59 35 86 16 > S. Ducasse - Inria > 40, avenue Halley, > Parc Scientifique de la Haute Borne, Bât.A, Park Plaza > Villeneuve d'Ascq 59650 > France >