Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
earley parser completion (newbie question)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
sinistral  
View profile   Translate to Translated (View Original)
 More options 11 Oct, 17:48
Newsgroups: comp.compilers
From: sinistral <marc.d...@gmail.com>
Date: Sun, 11 Oct 2009 09:48:32 -0700 (PDT)
Local: Sun 11 Oct 2009 17:48
Subject: earley parser completion (newbie question)
Greetings

I've been trying to understand the workings of the Earley algorithm
and I'm having trouble with the example presented on Wikipedia:

   http://en.wikipedia.org/wiki/Earley_parser

What I don't understand in this example is why state set S(3) doesn't
include the state

   S -> M dot   # complete from S(0)(3)

Since we have a completion for the non-terminal M, wouldn't this be a
valid completion?

Any pointers as to what I'm missing would be greatly appreciated.
.marc


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Dodd  
View profile   Translate to Translated (View Original)
 More options 11 Oct, 21:35
Newsgroups: comp.compilers
From: Chris Dodd <cd...@acm.org>
Date: 11 Oct 2009 22:35:04 +0200
Local: Sun 11 Oct 2009 21:35
Subject: Re: earley parser completion (newbie question)
[posted and mailed]

sinistral <marc.d...@gmail.com> wrote in news:09-10-013@comp.compilers:

> I've been trying to understand the workings of the Earley algorithm
> and I'm having trouble with the example presented on Wikipedia:

>    http://en.wikipedia.org/wiki/Earley_parser

> What I don't understand in this example is why state set S(3) doesn't
> include the state

>    S -> M dot   # complete from S(0)(3)

> Since we have a completion for the non-terminal M, wouldn't this be a
> valid completion?

The rule in S(3) we're completing M with is 'M -> T \dot (2)', so we only
look at S(2) for states with the \dot just before an 'M', per the completion
rule.  Since 'S -> \dot M' is only in S(0) and not S(2), it's not a valid
completion.  The only rules in S(2) with \dot M are 'S -> S + \dot M' and
'M -> \dot M * T', so that's all that we complete with M.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google