Home » Archived » IMP » contentProposer on current writing
| | |
Re: contentProposer on current writing [message #26770 is a reply to message #26172] |
Tue, 24 February 2009 03:31 |
Robert M. Fuhrer Messages: 294 Registered: July 2009 |
Senior Member |
|
|
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)
|
|
|
Re: contentProposer on current writing [message #496521 is a reply to message #26770] |
Tue, 10 November 2009 12:26 |
Defert Philippe Messages: 62 Registered: July 2009 |
Member |
|
|
Hi,
I worked on my grammar, now i have not problem with ast generation.
But i discovered an amazing thing.
on new line,I type the first letter and i do CTRL+SPACE
the CompletionProcessor propose the right stuff.
the CompletionProcessor still open and I type the second letter.
The contentproposer doesn't find the token. after debug, i think the
CompletionProcessor.CompletionProposals(ITextViewer viewer, int offset)
is called before the CompletionProcessor.update(IParseController
parseController, IProgressMonitor monitor).
The result is he has a stroke behind , the
CompletionProcessor.CompletionProposals() work on List of previous tokens.
Philippe
Le 24/02/2009 04:31, Robert M. Fuhrer a écrit :
> 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.
>
|
|
|
Re: contentProposer on current writing [message #496522 is a reply to message #26770] |
Tue, 10 November 2009 12:27 |
Defert Philippe Messages: 62 Registered: July 2009 |
Member |
|
|
Hi,
I worked on my grammar, now i have not problem with ast generation.
But i discovered an amazing thing.
on new line,I type the first letter and i do CTRL+SPACE
the CompletionProcessor propose the right stuff.
the CompletionProcessor still open and I type the second letter.
The contentproposer doesn't find the token. after debug, i think the
CompletionProcessor.CompletionProposals(ITextViewer viewer, int offset)
is called before the CompletionProcessor.update(IParseController
parseController, IProgressMonitor monitor).
The result is he has a stroke behind , the
CompletionProcessor.CompletionProposals() work on List of previous tokens.
Philippe
Le 24/02/2009 04:31, Robert M. Fuhrer a écrit :
> 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.
>
|
|
| | |
Re: contentProposer on current writing [message #574987 is a reply to message #26172] |
Tue, 24 February 2009 03:31 |
Robert M. Fuhrer Messages: 294 Registered: July 2009 |
Senior Member |
|
|
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)
|
|
|
Re: contentProposer on current writing [message #576839 is a reply to message #26770] |
Tue, 10 November 2009 12:26 |
Defert Philippe Messages: 62 Registered: July 2009 |
Member |
|
|
Hi,
I worked on my grammar, now i have not problem with ast generation.
But i discovered an amazing thing.
on new line,I type the first letter and i do CTRL+SPACE
the CompletionProcessor propose the right stuff.
the CompletionProcessor still open and I type the second letter.
The contentproposer doesn't find the token. after debug, i think the
CompletionProcessor.CompletionProposals(ITextViewer viewer, int offset)
is called before the CompletionProcessor.update(IParseController
parseController, IProgressMonitor monitor).
The result is he has a stroke behind , the
CompletionProcessor.CompletionProposals() work on List of previous tokens.
Philippe
Le 24/02/2009 04:31, Robert M. Fuhrer a écrit :
> 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.
>
|
|
|
Re: contentProposer on current writing [message #576853 is a reply to message #26770] |
Tue, 10 November 2009 12:27 |
Defert Philippe Messages: 62 Registered: July 2009 |
Member |
|
|
Hi,
I worked on my grammar, now i have not problem with ast generation.
But i discovered an amazing thing.
on new line,I type the first letter and i do CTRL+SPACE
the CompletionProcessor propose the right stuff.
the CompletionProcessor still open and I type the second letter.
The contentproposer doesn't find the token. after debug, i think the
CompletionProcessor.CompletionProposals(ITextViewer viewer, int offset)
is called before the CompletionProcessor.update(IParseController
parseController, IProgressMonitor monitor).
The result is he has a stroke behind , the
CompletionProcessor.CompletionProposals() work on List of previous tokens.
Philippe
Le 24/02/2009 04:31, Robert M. Fuhrer a écrit :
> 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.
>
|
|
|
Goto Forum:
Current Time: Thu Mar 28 08:34:35 GMT 2024
Powered by FUDForum. Page generated in 0.05473 seconds
|