Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #2618

Re: How change grammar to equivalent LL(1) ?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From silas poulson <Silas8642@hotmail.co.uk>
Newsgroups comp.compilers
Subject Re: How change grammar to equivalent LL(1) ?
Date Wed, 11 Nov 2020 08:27:35 -0800 (PST)
Organization Compilers Central
Lines 14
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <20-11-001@comp.compilers> (permalink)
References <19-12-023@comp.compilers> <20-04-009@comp.compilers> <20-04-010@comp.compilers>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8bit
Injection-Info gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="76159"; mail-complaints-to="abuse@iecc.com"
Keywords parse
Posted-Date 11 Nov 2020 11:51:35 EST
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.compilers:2618

Show key headers only | View raw


An even later response, but thought quote from course notes (§5.6.5
available here <http://cs.rhul.ac.uk/courses/CS3470/>) I'm currently
pursuing might be useful.

*LL(1) grammars*
Grammars which admit non-back-tracking top down LL(1) parsers are
 precisely the ones which are left factored, follow determined and have
 no left recursion.

Thus we have the following definition: A context-free grammar is LL(1) if
for all non-terminals A and productions A ::= α|β we have
1. first(α) ∩ first(β) = ∅
2. If A ∗⇒ ε then first(A) ∩ follow(A) =∅.

Back to comp.compilers | Previous | NextPrevious in thread | Find similar


Thread

Re: How change grammar to equivalent LL(1) ? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2019-12-23 05:57 -0500
  Re: How change grammar to equivalent LL(1) ? Lasse Hillerøe Petersen <lhp+news@toft-hp.dk> - 2020-04-24 16:21 +0000
    Re: How change grammar to equivalent LL(1) ? Kaz Kylheku <773-297-7223@kylheku.com> - 2020-04-24 18:13 +0000
      Re: How change grammar to equivalent LL(1) ? silas poulson <Silas8642@hotmail.co.uk> - 2020-11-11 08:27 -0800

csiph-web