Related articles |
---|
Verification that a CFL is LL(1) / SLR avi.tal@altavista.net (Avi Tal) (2000-04-01) |
Re: Verification that a CFL is LL(1) / SLR torbenm@diku.dk (2000-04-03) |
Re: Verification that a CFL is LL(1) / SLR cbrtjr@ix.netcom.com (Charles E. Bortle, Jr.) (2000-04-05) |
From: | "Charles E. Bortle, Jr." <cbrtjr@ix.netcom.com> |
Newsgroups: | comp.compilers |
Date: | 5 Apr 2000 22:23:40 -0400 |
Organization: | MindSpring Enterprises |
References: | 00-04-023 00-04-049 |
Keywords: | parse |
> Write a grammar for your language. Use the standard LL(1) and SLR
> parse-table constructions. If you succeed with no conflicts, this is a
> proof that your grammar, and hence your language, is LL(1) / SLR.
>
> Note that this is not a decision procedure: Some grammars for LL(1) or
> SLR languages may not themselves be LL(1) or SLR. AFAIK, there is no
> sure way to decide if a grammar has an equivalent LL(1) or SLR
> grammar, and hence if the language is LL(1) or SLR.
>
Also, for some grammars, for example for the Pascal dangeling else,
the grammar may not be LL(1) but if you structure it and the parser
driver correctly, the correct rule with be taken anyway, so it becomes
a somewhat academic issue.
--
Charles cbrtjr@ix.netcom.com
* http://pw2.netcom.com/~cbrtjr/wrdthing.html *
Return to the
comp.compilers page.
Search the
comp.compilers archives again.