I'm trying to port QuasiQuote package from Lukas Renggli to Pharo 3.0/4.0. This package use the RBCompiler class from the AST-Compiler package available here: http://source.lukas-renggli.ch/helvetia If I understand RBCompiler, this is a Compiler that use RB parser nodes. I guess this is something that is no more relevant with the new Opal compiler ? -- Serge Stinckwich UCBN & UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/
On 22 Nov 2014, at 18:17, Serge Stinckwich <serge.stinckwich@gmail.com> wrote:
I'm trying to port QuasiQuote package from Lukas Renggli to Pharo 3.0/4.0. This package use the RBCompiler class from the AST-Compiler package available here: http://source.lukas-renggli.ch/helvetia
If I understand RBCompiler, this is a Compiler that use RB parser nodes. I guess this is something that is no more relevant with the new Opal compiler ?
Yes, this is the PetitParser based Smalltalk parser that created RB ParseNodes. Opal has a pluggable architecture for the parser, right now it just uses the hand-written RB Parser that came with the refactoring browser. It would be very nice small experiment to plug in the Petitparser based one. Especially interesting: Would it be much slower? Marcus
On Sun, Nov 23, 2014 at 10:13 AM, Marcus Denker <marcus.denker@inria.fr> wrote:
On 22 Nov 2014, at 18:17, Serge Stinckwich <serge.stinckwich@gmail.com> wrote:
I'm trying to port QuasiQuote package from Lukas Renggli to Pharo 3.0/4.0. This package use the RBCompiler class from the AST-Compiler package available here: http://source.lukas-renggli.ch/helvetia
If I understand RBCompiler, this is a Compiler that use RB parser nodes. I guess this is something that is no more relevant with the new Opal compiler ?
Yes, this is the PetitParser based Smalltalk parser that created RB ParseNodes.
Opal has a pluggable architecture for the parser, right now it just uses the hand-written RB Parser that came with the refactoring browser.
Ok, thank you for the explanation, Markus. I'm able to parse Smalltalk code containing QuasiQuote and generate an RB parsenodes AST. How I can plug my AST tree to generate IR and bytecodes ? -- Serge Stinckwich UCBN & UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/
On 23 Nov 2014, at 17:37, Serge Stinckwich <serge.stinckwich@gmail.com> wrote:
On Sun, Nov 23, 2014 at 10:13 AM, Marcus Denker <marcus.denker@inria.fr> wrote:
On 22 Nov 2014, at 18:17, Serge Stinckwich <serge.stinckwich@gmail.com> wrote:
I'm trying to port QuasiQuote package from Lukas Renggli to Pharo 3.0/4.0. This package use the RBCompiler class from the AST-Compiler package available here: http://source.lukas-renggli.ch/helvetia
If I understand RBCompiler, this is a Compiler that use RB parser nodes. I guess this is something that is no more relevant with the new Opal compiler ?
Yes, this is the PetitParser based Smalltalk parser that created RB ParseNodes.
Opal has a pluggable architecture for the parser, right now it just uses the hand-written RB Parser that came with the refactoring browser.
Ok, thank you for the explanation, Markus. I'm able to parse Smalltalk code containing QuasiQuote and generate an RB parsenodes AST. How I can plug my AST tree to generate IR and bytecodes ?
You can just as it to generate a CompileMethod with #compiledMethod (if you access e.g. ivars and the method was not compiled for a specific class yet, you might need to #doSemanticAnalysisIn: before) Marcus
On Sun, 2014-11-23 at 10:13 +0100, Marcus Denker wrote:
On 22 Nov 2014, at 18:17, Serge Stinckwich <serge.stinckwich@gmail.com> wrote:
I'm trying to port QuasiQuote package from Lukas Renggli to Pharo 3.0/4.0. This package use the RBCompiler class from the AST-Compiler package available here: http://source.lukas-renggli.ch/helvetia
If I understand RBCompiler, this is a Compiler that use RB parser nodes. I guess this is something that is no more relevant with the new Opal compiler ?
Yes, this is the PetitParser based Smalltalk parser that created RB ParseNodes.
Opal has a pluggable architecture for the parser, right now it just uses the hand-written RB Parser that came with the refactoring browser.
It would be very nice small experiment to plug in the Petitparser based one.
Especially interesting: Would it be much slower? Hi Markus,
Jan Kurs and me are now working on some PetitParser stuff. If we succeed then PetitParser-based parser would be as fast as current hand-written RBParser. We're at the beginning but preliminary benchmarks are very promising. Error recovery and incremental reparsing are in the queue (if we find a time :-)
Marcus
Indeed, this is really exciting work :). Keep it up. Cheers, Doru On Sun, Nov 23, 2014 at 11:49 PM, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
On Sun, 2014-11-23 at 10:13 +0100, Marcus Denker wrote:
On 22 Nov 2014, at 18:17, Serge Stinckwich <serge.stinckwich@gmail.com> wrote:
I'm trying to port QuasiQuote package from Lukas Renggli to Pharo 3.0/4.0. This package use the RBCompiler class from the AST-Compiler package available here: http://source.lukas-renggli.ch/helvetia
If I understand RBCompiler, this is a Compiler that use RB parser nodes. I guess this is something that is no more relevant with the new Opal compiler ?
Yes, this is the PetitParser based Smalltalk parser that created RB ParseNodes.
Opal has a pluggable architecture for the parser, right now it just uses the hand-written RB Parser that came with the refactoring browser.
It would be very nice small experiment to plug in the Petitparser based one.
Especially interesting: Would it be much slower? Hi Markus,
Jan Kurs and me are now working on some PetitParser stuff. If we succeed then PetitParser-based parser would be as fast as current hand-written RBParser. We're at the beginning but preliminary benchmarks are very promising.
Error recovery and incremental reparsing are in the queue (if we find a time :-)
Marcus
-- www.tudorgirba.com "Every thing has its own flow"
On 23 Nov 2014, at 23:49, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
It would be very nice small experiment to plug in the Petitparser based one.
Especially interesting: Would it be much slower?
Hi Markus,
Jan Kurs and me are now working on some PetitParser stuff. If we succeed then PetitParser-based parser would be as fast as current hand-written RBParser. We're at the beginning but preliminary benchmarks are very promising.
Very nice⦠the idea of having this parser as the default one would be very interesting⦠e.g. one could re-use and extend it very easily, and PetitParser itself as a core feature (so people can create tiny parsers easily)...
Error recovery and incremental reparsing are in the queue (if we find a time :-)
That would be great. To replace the hand written one we would need at least good error messages, but error revocovery would be even better. I would be very interested in that. Marcus
That would be great. To replace the hand written one we would need at least good error messages, but error revocovery would be even better. I would be very interested in that. Marcus + 111 I would love to have reformat as you type :)
participants (5)
-
Jan Vrany -
Marcus Denker -
Serge Stinckwich -
stepharo -
Tudor Girba