Re: Parsing Expression Grammar

"Paul Mann" <paul@parsetec.com>
11 Sep 2005 11:12:45 -0400

          From comp.compilers

Related articles
[7 earlier articles]
Re: Parsing Expression Grammar paul@highpersoft.com (Paul Mann) (2005-09-07)
Re: Parsing Expression Grammar wclodius@lanl.gov (2005-09-10)
Re: Parsing Expression Grammar cfc@shell01.TheWorld.com (Chris F Clark) (2005-09-10)
Re: Parsing Expression Grammar gneuner2@comcast.net (George Neuner) (2005-09-10)
Re: Parsing Expression Grammar DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-09-10)
Re: Parsing Expression Grammar paul@parsetec.com (Paul Mann) (2005-09-11)
Re: Parsing Expression Grammar paul@parsetec.com (Paul Mann) (2005-09-11)
Re: Parsing Expression Grammar DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-09-14)
Re: Parsing Expression Grammar gneuner2@comcast.net (George Neuner) (2005-09-14)
Re: Parsing Expression Grammar Meyer-Eltz@t-online.de (Detlef Meyer-Eltz) (2005-09-14)
Re: Parsing Expression Grammar cleos@nb.sympatico.ca (Cleo Saulnier) (2005-09-17)
Re: Parsing Expression Grammar DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-09-17)
Re: Parsing Expression Grammar Meyer-Eltz@t-online.de (Detlef Meyer-Eltz) (2005-09-18)
[14 later articles]
| List of all articles for this month |

From: "Paul Mann" <paul@parsetec.com>
Newsgroups: comp.compilers
Date: 11 Sep 2005 11:12:45 -0400
Organization: Compilers Central
References: 05-09-042
Keywords: parse
Posted-Date: 11 Sep 2005 11:12:45 EDT

"Hans-Peter Diettrich" <DrDiettrich@compuserve.de> wrote


> Paul Mann wrote:
>>
>> "Chris F Clark" <cfc@shell01.TheWorld.com> wrote in message
>> > But, as a potential language designer, you need to think long and hard
>> > about why you want to create a language which has no LL(1) grammar.
>>
>> Answer: Readability for human's sake.
>
> Do you really think that humans prefer harder to "parse" languages?
> Lookahead and backtracking affect humans as well as programs.




Yes humans do prefer harder-to-parser languages. Example: English.


And the computer should serve the human not the other way around.
That's why we have invented LALR(1), LR(1) and GLR parsing.


>> Why constrain your language to LL(1) when LALR(1) tools are available?
>
> Why write small and fast programs when users have so much memory and so
> fast processors?


Why program in more powerful harder to write programming languages
such as C and C++, when assembly language is available ????


> [Stuff that's easy for computers to parse isn't always easy for people to
> read or write. The classic example is Pascal vs. PL/I semicolons, where
> Pascal's separator semicolons are syntactically elegant but quite error
> prone. -John]


Yes, and the space used for beginning a comment in OS JCL was the most
common cause of errors according to a study.


Some programmer probably found it easier to program it that way.




Paul Mann
http://parsetec.com


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.