Compilers
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives FAQs Compilers

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old June 28th, 2008, 06:00 PM
Hans-Peter Diettrich
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
predictive parsing and non-recursive predictive parsing

Max Hailperin schrieb:

Consider for example the following situation:
>

A -B c
A -D e
[]
In fact, given that there is some lookahead, the LR parser can do even
more. Suppose we complete the grammar with
>

B -f f f f f
D -f f f f f

IM this is an example of a bad language design, which I encounterd
already in many languages. The fact, that a parser generator can handle
such a grammar, is not an excuse for a thoughtless language design. No
offense on you, your example is a very practical one <sigh>.

When we have an look at any application, using the above grammar for
e.g. serializing data, a possibly huge amount of input must be kept in
the stack, before any action can be taken. And more memory is wasted for
the automaton tables. When the language, and consequently also the
grammar is converted into LL(1), by swapping the terms in A, no special
amount of time or memory has to be wasted in the analysis of the input.

DoDi

Reply With Quote
Reply

Viewing: Web Development Archives FAQs Compilers > predictive parsing and non-recursive predictive parsing


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT