Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.java.programmer Subject: Re: How to scan Java source texts? Date: Tue, 11 Jun 2013 16:40:38 -0400 Organization: A noiseless patient Spider Lines: 13 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 11 Jun 2013 20:34:38 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="6b9e92482af47766954d85fb77d372f5"; logging-data="21405"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1889vO/onEZMKtc+B+eDBLlUxuP+ZJliXs=" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130529 Icedove/17.0.5 In-Reply-To: Cancel-Lock: sha1:5FQEP44wRGtil8iUSpc1JJXqg04= Xref: csiph.com comp.lang.java.programmer:24364 On 06/11/2013 12:26 PM, Stefan Ram wrote: > I'd like to scan Java source texts, printing one token per line. Do you mean these tokens: > I thought it might be possible with the compiler API, and > have read that it can return an AST, but I do not know how > to just obtain the tokens from the source code AST. An AST is built from the tokens above. [snip]