[Pharo-project] yarg: Pharo grammar ...
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.
- 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 <james_ladd@hotmail.com>:
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
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.
participants (3)
-
James Ladd -
Lukas Renggli -
Marcus Denker