yarg: Pharo grammar ...

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

yarg: Pharo grammar ...

jamesl
This is Yet Another Request for the Grammar to Pharo/Squeak Smalltalk?

I have seen this: http://wiki.squeak.org/squeak/409 but it is very old and doesn't appear to
cater for Pharo/Squeak additions.

Can someone point me to a more recent grammar?

Rgs, James.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: yarg: Pharo grammar ...

Lukas Renggli
- Check out the Parser/Scanner classes in every PharoDev image.

- Check out the RBParser/RBScanner classes in the package AST-Core in
every Pharo image.

- Check out the class PPSmalltalkGrammar in the package PetitSmalltalk
(http://scg.unibe.ch/research/helvetia/petitparser) which is an
executable Smalltalk grammar that almost looks like an EBNF.

Lukas

2010/9/8 James Ladd <[hidden email]>:

> This is Yet Another Request for the Grammar to Pharo/Squeak Smalltalk?
>
> I have seen this: http://wiki.squeak.org/squeak/409 but it is very old and
> doesn't appear to
> cater for Pharo/Squeak additions.
>
> Can someone point me to a more recent grammar?
>
> Rgs, James.
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: yarg: Pharo grammar ...

Marcus Denker-4
In reply to this post by jamesl

On Sep 8, 2010, at 4:51 AM, James Ladd wrote:

> This is Yet Another Request for the Grammar to Pharo/Squeak Smalltalk?
>
> I have seen this: http://wiki.squeak.org/squeak/409 but it is very old and doesn't appear to
> cater for Pharo/Squeak additions.
>
> Can someone point me to a more recent grammar?

Lukas did a grammar for Smalltalk with PetitParser. This has many additional benefits
over a traditional dead form of EBNF that it is
        -> executable. It's just Smallltak. Smalltalk grammar described in Smalltalk.
            So executing this code, you have a parser.
        -> reflective dynamic grammar. After executing, the parser is a graph of smaller parser=objects that you
            can inspect, modify and compose.

http://www.lukas-renggli.ch/blog/petitparser-1
http://scg.unibe.ch/archive/papers/Reng10cDynamicGrammars.pdf

Gofer new
    renggli: 'petit';
    package: 'PetitParser';
    load.

Gofer new
    renggli: 'petit';
    package: 'PetitSmalltalk';
    load.

Alternatively, I will send you the SmaCC grammar we originally used in the compiler.

        Marcus

--
Marcus Denker  -- http://www.marcusdenker.de
INRIA Lille -- Nord Europe. Team RMoD.


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project