Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.java.programmer Subject: [LONG POST] Re: Parser Date: Sun, 27 Apr 2014 19:59:35 -0400 Organization: A noiseless patient Spider Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 28 Apr 2014 00:00:39 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="6b9e92482af47766954d85fb77d372f5"; logging-data="13707"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0FZZJuSwXKOsPRuaCKocd9aKWTAu8dUk=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 In-Reply-To: Cancel-Lock: sha1:mMKmpaiD/PBKiI96Xd/YCsMfSVI= Xref: csiph.com comp.lang.java.programmer:28286 On 04/27/2014 06:46 PM, Roedy Green wrote: > What is considered the best parser nowadays that generates the parser > in Java source code? > > What I need in an abbreviated Java parser just to cut the program into > chunks, each class within that each declaration and method. > > I have already written the parsing that takes it from there. > > The idea is to rearrange your code in a defined canonical order, > e.g. statics before instance primitives before references, char before > int... > > If I were designing Java, I would have put a keyword on the front of > each declaration e.g. dcl, and each method "method". > > This would make parsing simpler and faster. It would also make > navigating with a simple search string easier. IF the keyword were > shown in special colour, it would make it much easier by eye to detect > method starts. > Not parser generator but some issues to be aware of.