Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: Parser Date: Tue, 29 Apr 2014 13:15:34 -0700 Organization: Canadian Mind Products Lines: 26 Message-ID: References: <535e1fc6$0$2975$e4fe514c@news.xs4all.nl> Reply-To: Roedy Green NNTP-Posting-Host: K2Qzzs3EAqXk5RLzfhxcSw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: ForteAgent/7.20.32.1218 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:28311 On Mon, 28 Apr 2014 11:30:45 +0200, Silvio wrote, quoted or indirectly quoted someone who said : > >The fact that a no such keywords exist does not make parsing slower by >definition. In the Java case it unlikely that such keywords would make >parsing faster. The language grammar defines how fast a parser can be. >Although the Java grammar is not strictly LALR(x) Java can be parsed >pretty left-to-right with the use of some simple tweaks and assumptions >to prevent expensive things like backtracking Consider how far you have to parse into definition to tell if you have a variable or a method definition. An IDE could insert visible markers to mark the begins and end of things. I must waste at least an hour a day trying to figure out which { } balances with what. It is not a task my eyes can do, especially when the other half is offscreen. Another solution would be a SCID which would not let you cut/copy paste an unbalanced block of code. You would think of program as composed on units -- like plumbing, not a stream of characters. -- Roedy Green Canadian Mind Products http://mindprod.com Computers are like Old Testament gods; lots of rules and no mercy. ~ Joseph Campbell (born: 1904-03-26 died: 1987-10-31 at age: 83)