Hi,
I looking for a Java parser to use with Moose. While the MSE file gives me most of the relevant information,I need to analyze the internals statements of a method. Anybody is aware of such a parser? Thanks in advance.
Cheers,
I don't think this exists at the moment. Simply because FAMIX does not represents this kind of information
We started a project to correct this, but it will be sometimes before iwe can show anything
nicolas
On 05/10/12 20:10, Santiago Vidal wrote:
Hi,
I looking for a Java parser to use with Moose. While the MSE file gives me most of the relevant information,I need to analyze the internals statements of a method. Anybody is aware of such a parser? Thanks in advance.
Cheers,
-- Santiago Vidal
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi Santiago,
As I understand, you need a parser for Java such that you can get access to get the AST.
There is no ready made solution that covers this. However, there is a Java grammar and half of a parser implemented using PetitParser. You can find it in PetitJava. In case you have time and interest, it would be very cool to strengthen this parser.
Other than that, perhaps you can find a parser that exports the AST in some format like XML. Afterwards, you could query this information from the image. In case you look into this, let us know if you do anything in this direction.
Cheers, Doru
On Fri, Oct 5, 2012 at 8:10 PM, Santiago Vidal santiago.a.vidal@gmail.com wrote:
Hi,
I looking for a Java parser to use with Moose. While the MSE file gives me most of the relevant information,I need to analyze the internals statements of a method. Anybody is aware of such a parser? Thanks in advance.
Cheers,
-- Santiago Vidal
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi Nicolas and Doru, thank you for your answers. I was thinking the AST parser option. I'm going to take a look to PetitJava. I'll let you know if I extend this parser or if I use an AST parser.
Cheers,
Santiago
2012/10/6 Tudor Girba tudor@tudorgirba.com
Hi Santiago,
As I understand, you need a parser for Java such that you can get access to get the AST.
There is no ready made solution that covers this. However, there is a Java grammar and half of a parser implemented using PetitParser. You can find it in PetitJava. In case you have time and interest, it would be very cool to strengthen this parser.
Other than that, perhaps you can find a parser that exports the AST in some format like XML. Afterwards, you could query this information from the image. In case you look into this, let us know if you do anything in this direction.
Cheers, Doru
On Fri, Oct 5, 2012 at 8:10 PM, Santiago Vidal santiago.a.vidal@gmail.com wrote:
Hi,
I looking for a Java parser to use with Moose. While the MSE file gives
me
most of the relevant information,I need to analyze the internals
statements
of a method. Anybody is aware of such a parser? Thanks in advance.
Cheers,
-- Santiago Vidal
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Every thing has its own flow" _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi, I've finally solved my problem using an AST parser. Specifically I find that srcML (http://www.sdml.info/projects/srcml/) parses Java source code and then it creates a XML file. The XML file can also be transformed into Java source code again. You can find my solution in http://ss3.gemstone.com/ss/SPIRIT.html into the category Spirit-JavaParser. *JavaMethodParser initializeWith: aFamixMethod* returns the parsed method (you need to link the model with the root folder that contains the source code) Cheers
Santiago
2012/10/6 Santiago Vidal santiago.a.vidal@gmail.com
Hi Nicolas and Doru, thank you for your answers. I was thinking the AST parser option. I'm going to take a look to PetitJava. I'll let you know if I extend this parser or if I use an AST parser.
Cheers,
Santiago
2012/10/6 Tudor Girba tudor@tudorgirba.com
Hi Santiago,
As I understand, you need a parser for Java such that you can get access to get the AST.
There is no ready made solution that covers this. However, there is a Java grammar and half of a parser implemented using PetitParser. You can find it in PetitJava. In case you have time and interest, it would be very cool to strengthen this parser.
Other than that, perhaps you can find a parser that exports the AST in some format like XML. Afterwards, you could query this information from the image. In case you look into this, let us know if you do anything in this direction.
Cheers, Doru
On Fri, Oct 5, 2012 at 8:10 PM, Santiago Vidal santiago.a.vidal@gmail.com wrote:
Hi,
I looking for a Java parser to use with Moose. While the MSE file gives
me
most of the relevant information,I need to analyze the internals
statements
of a method. Anybody is aware of such a parser? Thanks in advance.
Cheers,
-- Santiago Vidal
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Every thing has its own flow" _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Santiago Vidal
but can you import the XML into Moose?
nicolas
On 15/10/12 15:31, Santiago Vidal wrote:
Hi, I've finally solved my problem using an AST parser. Specifically I find that srcML (http://www.sdml.info/projects/srcml/) parses Java source code and then it creates a XML file. The XML file can also be transformed into Java source code again. You can find my solution in http://ss3.gemstone.com/ss/SPIRIT.html into the category Spirit-JavaParser. /JavaMethodParser initializeWith: aFamixMethod/ returns the parsed method (you need to link the model with the root folder that contains the source code) Cheers
Santiago
Since FAMIX doesn't represent the internals of a method information I create my own method representation. But it is not integrated with FAMIX.
2012/10/15 Nicolas Anquetil Nicolas.Anquetil@inria.fr
but can you import the XML into Moose?
nicolas
On 15/10/12 15:31, Santiago Vidal wrote:
Hi, I've finally solved my problem using an AST parser. Specifically I find that srcML (http://www.sdml.info/projects/srcml/) parses Java source code and then it creates a XML file. The XML file can also be transformed into Java source code again. You can find my solution in http://ss3.gemstone.com/ss/SPIRIT.html into the category Spirit-JavaParser. *JavaMethodParser initializeWith: aFamixMethod* returns the parsed method (you need to link the model with the root folder that contains the source code) Cheers
Santiago
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
I have written an importer of C code parsed by srcML. The code is available in http://squeaksource.com/CAnalyzer
No idea how it will behave for Java code
Alexandre
On Oct 15, 2012, at 10:38 AM, Santiago Vidal santiago.a.vidal@gmail.com wrote:
Since FAMIX doesn't represent the internals of a method information I create my own method representation. But it is not integrated with FAMIX.
2012/10/15 Nicolas Anquetil Nicolas.Anquetil@inria.fr
but can you import the XML into Moose?
nicolas
On 15/10/12 15:31, Santiago Vidal wrote:
Hi, I've finally solved my problem using an AST parser. Specifically I find that srcML (http://www.sdml.info/projects/srcml/) parses Java source code and then it creates a XML file. The XML file can also be transformed into Java source code again. You can find my solution in http://ss3.gemstone.com/ss/SPIRIT.html into the category Spirit-JavaParser. JavaMethodParser initializeWith: aFamixMethod returns the parsed method (you need to link the model with the root folder that contains the source code) Cheers
Santiago
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Santiago Vidal _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev