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 17:50
Robert M. Fuhrer is currently offline Robert M. Fuhrer
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?

--
Cheers,
-- Bob

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

IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
Previous Topic:New annotation creation service?
Next Topic:Status update
Goto Forum:
  


Current Time: Wed Jul 30 23:26:14 EDT 2014

Powered by FUDForum. Page generated in 0.01547 seconds