On Feb 27, 2013, at 9:59 PM, Fabrizio Perin <fabrizio.perin@gmail.com> wrote:

Hi Doru,
probably I got confused. You wrote:
- The visiting of method ASTs happens in the SmalltalkMethodVisitor which is triggered by SmalltalkImporter>>
createMethod:. It is this visitor which is the responsible for triggering the creation of low-level objects like invocations and accesses.

I though that the SmalltalkImporter was used to instantiate a famix model out of a RB infrastructure but probably there is something missing. I have in output from my parser  RBMethodNodes and RBClasses (plus other stuff) but I cannot make the SmalltalkImporter running on them. Either I did not instantiate properly the RBMethods or there is something else.

You can probably add a new method createMethodFromNode: that takes an ast and not a compiledmethod as input.


Anyway the output of my parser is a list of nodes that are independent from one another, i.e. a RBMethod node is not into a RBClass node. It might be that the problem. I will investigate tomorrow.

Cheers,
Fabrizio



2013/2/27 Tudor Girba <tudor@tudorgirba.com>
Hi Fabrizio,

I think I do not understand the question.

SmalltalkImporter>>createMethod: takes a compiled method, and then uses the RB infrastructure to build the AST. In your case, you will probably have to use your parser for the method, obtain the AST and traverse that one with a visitor.

Cheers,
Doru



On Feb 27, 2013, at 3:26 PM, Fabrizio Perin <fabrizio.perin@gmail.com> wrote:

> >> - The visiting of method ASTs happens in the SmalltalkMethodVisitor which is triggered by SmalltalkImporter>>createMethod:. It is this visitor which is the responsible for triggering the creation of low-level objects like invocations and accesses.
> >
> > Yes.
>
> The SmalltalkImporter>>createMethod: need as parameter acompiledMethod which is evidently a MethodNode since RBMethodNode do not implement the methodClass which is invoked in createMethod:
>
> So, am I missing something? Should I use another parser other than PPSmalltalkParser?
>
> Cheers,
> Fabrizio
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Some battles are better lost than fought."




_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev