Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IMP » Parser message adaptation/customization
Parser message adaptation/customization [message #574026] Fri, 07 November 2008 22:50
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Hi All,

It's recently come to light that some of our users don't like the
messages coming out of the parsers they're using, and they would
thus like to customize the messages (e.g. to make them more human-
consumable) without changing the parser itself.

IMP presently defines an IMessageHandler interface that it passes
into the IParseController so that the IParseController has a place
to which to direct messages coming out of the parser.

So, it's presently possible to customize parser messages by changing
the IParseController (or whatever actually passes messages to the
IMessageHandler) to modify the messages before handing them upward.

That said, at least when using LPG and the SimpleLPGParseController,
the spot to customize is buried in the class MessageHandlerAdapter,
which adapts the LPG-defined message handling interface (sadly also
called IMessageHandler) to whatever implements the IMP-defined
IMessageHandler interface. So one would have to replace the
MessageHandlerAdapter with something that does the appropriate
message fiddling, and instantiate that in your IParseController's
override of parse().

So our question to you, dear Reader, if you're not already blind
at this point, is:

Is this arrangement complicated enough that we ought to provide a
more direct and obvious way to customize parser messages?

-- Bob

Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IDE Meta-tooling Platform Project Lead (
X10: Productive High-Performance Parallel Programming (
Previous Topic:New annotation creation service?
Next Topic:Status update
Goto Forum:

Current Time: Sun Oct 21 16:37:35 GMT 2018

Powered by FUDForum. Page generated in 0.01876 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top