Le 25/07/2014 20:37, kilon alios a ��crit��:
I don't understand how to use aClass definition from workspace nor I understand your selector message.��

(aClass compiledMethodAt: self selector) sourceCode , self would imply that i try to operate this from inside another class with self selector being the method itself at the time executed ?
No, just that you can write:

(Object compiledMethodAt: #printString) sourceCode

That's me not sanitizing my code samples (lifting it from the AltBrowser)


However because I try to parse pharo syntax to python code, the classes that I am parsing are��unrelated��to the parser class itself ��so I don't see how self selector would be relevant here.��


I also don't understand��

�� �� ast := RBParser parseMethod: aTarget text asString onError: [ :msg :pos | ^ self ].
�� �� ast doSemanticAnalysisIn: self sourceClass

what is aTarget ?

Ok, as above, it should be understood as:

ast := RBParser parseMethod: (Object compiledMethodAt: #printString) onError: [ :msg :ps | ].
ast doSemanticAnalysisIn: self sourceClass.


Is there any documentation about RBParser how I can use it ? Or any documentation relevant to the subject ?
Any documentation on compilers should do it. The RBParser is simply a parser, and it produces fairly simple ASTs (given that Smalltalk is simple).

Thierry