Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IMP » LALR parser to LPG & error recovery
LALR parser to LPG & error recovery [message #18393] Sat, 12 April 2008 11:04 Go to next message
Eclipse UserFriend
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 #19264 is a reply to message #18393] Wed, 16 April 2008 16:01 Go to previous messageGo to next message
Philippe Charles is currently offline Philippe CharlesFriend
Messages: 8
Registered: July 2009
Junior Member
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.
Re: LALR parser to LPG & error recovery [message #21389 is a reply to message #18393] Tue, 10 June 2008 07:39 Go to previous messageGo to next message
Jin Missing name is currently offline Jin Missing nameFriend
Messages: 100
Registered: July 2009
Senior Member
using terminal seem a way to resolve precedence problem. (But I'm not sure
this can work for all cases^_^)
Re: LALR parser to LPG & error recovery [message #21397 is a reply to message #19264] Tue, 10 June 2008 07:43 Go to previous messageGo to next message
Jin Missing name is currently offline Jin Missing nameFriend
Messages: 100
Registered: July 2009
Senior Member
Philippe Charles:
lpg is a great work! GLR seem a challenge. hope to see it in lpg early:)
Jin
Re: LALR parser to LPG & error recovery [message #24141 is a reply to message #19264] Sun, 07 September 2008 19:46 Go to previous message
Eclipse UserFriend
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 16:01 Go to previous message
Philippe Charles is currently offline Philippe CharlesFriend
Messages: 8
Registered: July 2009
Junior Member
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.
Re: LALR parser to LPG & error recovery [message #571050 is a reply to message #18393] Tue, 10 June 2008 07:39 Go to previous message
Jin Missing name is currently offline Jin Missing nameFriend
Messages: 100
Registered: July 2009
Senior Member
using terminal seem a way to resolve precedence problem. (But I'm not sure
this can work for all cases^_^)
Re: LALR parser to LPG & error recovery [message #571066 is a reply to message #19264] Tue, 10 June 2008 07:43 Go to previous message
Jin Missing name is currently offline Jin Missing nameFriend
Messages: 100
Registered: July 2009
Senior Member
Philippe Charles:
lpg is a great work! GLR seem a challenge. hope to see it in lpg early:)
Jin
Re: LALR parser to LPG & error recovery [message #573221 is a reply to message #19264] Sun, 07 September 2008 19:46 Go to previous message
Phil is currently offline PhilFriend
Messages: 2
Registered: July 2009
Junior Member
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.
Previous Topic:Is there some kind of Guide to Prefspec field definitions?
Next Topic:Status of project?
Goto Forum:
  


Current Time: Fri Apr 19 11:33:59 GMT 2024

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

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

Back to the top