jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-1034

Post parse processing of the result comment placing as example

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Parser
  • Labels:
    None
  • Environment:
    Gentoo Linux / Windows Vista

Description

As announced on the mailing list, here is the patch which includes the postprocessing of the parser result. This contains a new interface PostProcessor which must be implemented by every post processor. The ParserConfiguration gets new methods to add and get such post processors. The ParserSupport has a new method to apply every post processor to the ParserResult.
As an example what a post processor could do there is the implementation of the commen node placing in the ast. (Mirko is about to implement the testing possibilities for the comment stuff.)
This is contained in the postprocessing.patch file.

The only thing which is not done yet is the call of the applyPostProcessors method of the ParserSupport. I didn't want to decide if it should be called at the end of the parse()-method of the DefaultRubyParser before returning the ParserResult or if it should be done by the user of the parser itself manually. My suggestion would be to do it in the Parser as the post processors could still be left out when none is added to the configuration. This is contained in the DefaultRubyParser.patch file.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    DefaultRubyParser.patch
    30/May/07 9:20 AM
    0.3 kB
    Thomas Corbat
  2. Text File
    postprocessing_v2.patch
    12/Oct/07 3:00 AM
    14 kB
    Mirko Stocker
  3. Text File
    postprocessing.patch
    30/May/07 9:20 AM
    12 kB
    Thomas Corbat

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Charles Oliver Nutter added a comment - 30/Sep/07 11:56 AM

This is going to need revisiting and refreshing if there's still something worth adding here...

Show
Charles Oliver Nutter added a comment - 30/Sep/07 11:56 AM This is going to need revisiting and refreshing if there's still something worth adding here...
Hide
Permalink
Mirko Stocker added a comment - 12/Oct/07 3:00 AM

It would be nice if it could be added. I've created a new patch that works on the current head. I also fixed a small bug (comments == null) and changed the hasComments method to check for the size of the comment list rather than comparing with EMPTY_COMMENT_LIST, because the user might call addComments with an empty arraylist.. I hope that's ok, else we'd have to add checks to the rewriter.

Show
Mirko Stocker added a comment - 12/Oct/07 3:00 AM It would be nice if it could be added. I've created a new patch that works on the current head. I also fixed a small bug (comments == null) and changed the hasComments method to check for the size of the comment list rather than comparing with EMPTY_COMMENT_LIST, because the user might call addComments with an empty arraylist.. I hope that's ok, else we'd have to add checks to the rewriter.
Hide
Permalink
Thomas E Enebo added a comment - 12/Oct/07 10:00 AM

Mirko...I will look at this once I finish my largish lexer refactoring (which is a still a few days away). Glancing at it it looks good to me, but I would like to commit it seperate from my work.

Show
Thomas E Enebo added a comment - 12/Oct/07 10:00 AM Mirko...I will look at this once I finish my largish lexer refactoring (which is a still a few days away). Glancing at it it looks good to me, but I would like to commit it seperate from my work.
Hide
Permalink
Charles Oliver Nutter added a comment - 03/Feb/09 9:55 PM

At this point I'd be extremely surprised if this is still valid, and we're planning on forking off the parser logic for IDE and other users very soon. Since there's been no movement on this in well over a year, I'm resolving it as "won't fix". If you're still interested in this, perhaps we should work to get the parser fork done sooner, and then it can be applied there. Let us know.

Show
Charles Oliver Nutter added a comment - 03/Feb/09 9:55 PM At this point I'd be extremely surprised if this is still valid, and we're planning on forking off the parser logic for IDE and other users very soon. Since there's been no movement on this in well over a year, I'm resolving it as "won't fix". If you're still interested in this, perhaps we should work to get the parser fork done sooner, and then it can be applied there. Let us know.

People

  • Assignee:
    Charles Oliver Nutter
    Reporter:
    Thomas Corbat
Vote (1)
Watch (1)

Dates

  • Created:
    30/May/07 9:20 AM
    Updated:
    27/Oct/09 1:48 PM
    Resolved:
    03/Feb/09 9:55 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.