Related articles |
---|
question about lookahead snowscan100@yahoo.com (1999-02-15) |
Re: question about lookahead jjan@cs.rug.nl (Beeblebrox) (1999-02-16) |
Re: question about lookahead torbenm@diku.dk (Torben Mogensen) (1999-02-16) |
Re: question about lookahead cfc@world.std.com (Chris F Clark) (1999-02-18) |
Re: question about lookahead paul.janssens@skynet.be (JPA) (1999-02-21) |
From: | snowscan100@yahoo.com |
Newsgroups: | comp.compilers |
Date: | 15 Feb 1999 23:33:00 -0500 |
Organization: | Deja News - The Leader in Internet Discussion |
Keywords: | parse, question |
Hi All:
I Am A Beginner With Compiler Theory.
It Seems Like Lookahead Is Used By Various Parsing Methods
To Choose (Disambiguate) Between Several Productions That
Can Be Taken At Any Point.
My Question Is Why Lookahead At All ? Just Use A
*Non Deterministic* PDA As Your Engine. (Just As You Use
NFA'S To Find Reg-Expressions). A NPDA Would Then Choose
All Productions That Were Applicable, As Opposed To Looking
Ahead And Deciding Which One To Choose Beforehand.
The NPDA Would Of Course Be Converted Into An *Equivalent*
Deterministic PDA In Order To Actually Run It...
So To Recap The Question Is:
-- why use lookahead when a NPDA can be used to choose all
productions at the same time (similar to what is done for
reg exps) ?
Best Regards,
snowscan100@yahoo.com
Return to the
comp.compilers page.
Search the
comp.compilers archives again.