LALR parser to LPG & error recovery [message #18393] |
Sat, 12 April 2008 07:04  |
Eclipse User |
|
|
|
Originally posted by: nospam.no.mail.com
Hi,
I have a working LALR parser, can I easily transform it into an LPG
grammar?
LPG doesn't seem to have associativities and precedence keywords. What
kind of parser technology does LPG use?
I am particularly interested in error recovery, so that an AST can always
be built for programs that are being edited in Eclipse. I have read that
LPG has a good error recovery mechanism. How do I use it?
|
|
|
|
|
|
Re: LALR parser to LPG & error recovery [message #24141 is a reply to message #19264] |
Sun, 07 September 2008 15:46  |
Eclipse User |
|
|
|
Originally posted by: theone256+eclipseimpml.gmail.com
Hi,
I am very interested in these features (precedence specification and
producing ASTs for erroneous input). Can you tell me when they will be
implemented? Are you working on it?
Thanks.
|
|
|
Re: LALR parser to LPG & error recovery [message #570248 is a reply to message #18393] |
Wed, 16 April 2008 12:01  |
Eclipse User |
|
|
|
Right now, LPG accepts LALR(K) grammars from which you can build a
deterministic parser or a parser with backtracking.
There are a few things left to do that we have not had the chance to
fully address (some of which you touched upon) ...
. Precedence specification (a la YACC? ... to resolve conflicts)
. Complete the implementation of a semi-automatic method for
constructing ASTs for erroneous input - adding prosthetic nodes where
needed to complete the tree.
. A GLR (Generalized LR Parser) driver (for ambiguous grammars)
The error recovery is automatic so you don't have to do anything to use
it. However, the prosthesis component has not been fully implemented.
So, for now, it only issues diagnostic messages and does not always
produce an AST.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05021 seconds