[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.imp] Re: contentProposer on current writing

Defert Philippe wrote:
Hi,

how to use the contentProposer during code writing?
Indeed, when writing code, I would like to propose the attributes of an
object when I do CTRL + SPACE.
But the problem is that the parser is triggered and detects an error.
therefore, it does not generate the AST tree.
What would be a correct solution ?:
	stop the automatic parser (but then, the tree will not be uptodate)
	continue parsing despite syntax errors
	another idea?

I think there is a solution because the JDT can do that.

Yes, the JDT parser does a pretty good job at error recovery, so they get an AST to work with in spite of a pretty wide variety of syntax errors.

We're actually working on a semi-automatic error recovery mechanism
for LPG, but in the meantime, you'll need to do it more manually.
I'd suggest posting a query for help on the LPG sourceforge site.

If you're not using LPG, consult your parser generator manuals for
hints on how to get the generated parser to recover. Most parser
generators provide some form of error recovery mechanism.

--
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)