Monday, August 22, 2011

GsoC update: Week 12

With GSoC 2011 completion I’d like to let you know where I’m with the project progress since last week. In summary, the project is half-finished at this time, as I was overcome with complication of the tasks and limited time. But there’re a few achievements as well.

Project successes:
  • Project is building and generating grammars for both Groovy and Java
  • Groovy grammar is now defining all tokens explicitly as ANTLR3 is not generating LITERAL_name
  • I've removed all not working rules from Groovy file so it's at least building and allowing you to run compiler
  • Fixed almost all problems in Java code, most problems were connected to missing interface GroovyTokenTypes as this isn’t generated by ANTLR anymore so I've used instead GroovyLexer
  • I've created base class for parser so ANTLR grammar file is a now a bit cleaner
  • I've incorporated changes connected to ANTLR runtime changes so now we have GroovyTreeAdaptor and associated classes
  • I've tried to move code associated to custom node creation but it is still work in progress (I want to start with compilationUnit, annotations and package definition)
  • I've updated Java 2 Groovy converter, but I couldn’t find all necessary rules in Java grammar
  • ASTFrame is working, but as compilation unit is not available yet it's not displaying tree

Project challenges:
  • Remove reference to antlr3 jar from bootstraper (couldn't run the one downloaded from maven)
  • The grammar is still not working even with simple scripts and this is major challenge after that it should be easier to port the rest of rules
Cheers

Lidia


    GsoC update: Week 9-11

    Project update: 9-11 week

    The most recent project sucesses
    :

    * build.xml moved to antlr3
    * Scripts MAVEN and GRLDE  are now building ANTLR3
    * Dependency is downloading ANTLR jars
    * Main.java file from ANTLR package is rewritten to allow parsing and classes replacing with their equivalents in ANTLR3

    Problems encountered:

    * ANTLR3 plugin to MAVEN to ANTLR3 is not working
    * Limited time to complete the whole project

    What's left:
    I'm aware of the limited time and realise it will be impossible for me to translate all rules, but will keep focused on finishing first script working to allow parsing and building AST and display it with ASTFrame. 

    Cheers, Lidia

    Tuesday, July 26, 2011

    GSoC: Week 8

    Project update: 8th Week
    1) What I achieved last week?

    1. Split parser and lexer grammar to separate files allowing easy modifications
    2. Fixing problems with current rules but some part are still not working due to missing bits on parser Plugin side.
    Missing implementation of GroovyTokenTypes is a bigger problem than I was expecting.

    2) What I am working on for the next week?

    I'm moving now to java bit of groovy parser as it started to block the possibility of testing exsisting part.

    1. Update code based on antlr.collections.AST class to interface org.antlr.runtime.tree.Tree
    2. Move code from grammar file to dedicated classes and use superClass attribute
    3. antlr.Token to org.antlr.runtime.Token

    Once completed it should be possible to remove warnings about missing tokens and create method to create AST.

    4. Additionally I want to remove all setType calls as they are not correct anymore.
    5. Use RecognitionException with GroovyExceptionInterface

    3) Are there any blockers (infrastructure, mentors, holidays, assistance)?

    None so far.

    Cheers, Lidia

    Monday, July 18, 2011

    GSoC: Week 7

    Project update: 7th Week


     


    1) What I achieved last week?
    Still, all goes well with the plan. The first script is almost working, a few more tests to run. Next stage is to still keeping on rewriting new rules so more and more stuff is working in the following weeks.


    2) What I am working on for the next week?
    Continuing on rewriting new rules.


    3) Are there any blockers (infrastructure, mentors, holidays, assistance)?
    Still no blockers.
     
    Cheers,
    Lidia

    Monday, July 11, 2011

    GSoC: Week 6

    Project update: 6th Week



    1) What I achieved last week?
    Still, all goes well and follows the plan. So far 40% of the project is completed.
    The project enters another stage and hopefully it should be easier to test everything as the first script will be up and running.

     
    2) What I am working on for the next week?
    This week I should be able to run a simple Groovy script on a new parser. Keep your fingers crossed!


    3) Are there any blockers (infrastructure, mentors, holidays, assistance)?
    Still no blockers.
    Cheers,
    Lidia

    Tuesday, July 5, 2011

    GSoC: Week 4-5

    Project update: 4th-5th Week



    1) What I achieved last week?
    Yipppeeee I passed all of my exams with very good results. As it was my final semester I'll be able to receive my second master degree in September. I will now devote my full attention to rewriting parser rules the Groovy grammar to ANTRL 3. It all goes according to plan. I regularly do commits and don't expect any problems to meet the deadline.

    2) What I am working on for the next week?
    Gradually, rewriting parser rules.


    3) Are there any blockers (infrastructure, mentors, holidays, assistance)?
    Still no blockers.
    Cheers,
    Lidia

    Monday, June 13, 2011

    GsoC update: Week 3

    Project update: 3rd Week

    1) What I achieved last week?
    It's my third week I am still on rewriting parser rules the Groovy grammar to ANTRL 3. Luckily, I've rewritten the whole lexer. Also, I'm finishing the lecture of The Definitive ANTLR Reference by Terence Parr. I am also a bit busy with my exams this and fallowing week.

    2) What I am working on for the next week?
    Gradually, rewriting parser rules.

    3) Are there any blockers (infrastructure, mentors, holidays, assistance)?
    Still no blockers.

    Cheers,
    Lidia