Package org.opensolaris.opengrok.analysis

Examples of org.opensolaris.opengrok.analysis.JFlexTokenizer


        return getTermsFor(new StringReader(s));
    }

    private String[] getTermsFor(Reader r) {
        List<String> l = new LinkedList<String>();
        JFlexTokenizer ts = (JFlexTokenizer) this.analyzer.createComponents("refs", r).getTokenStream();
        ts.yyreset(r);
        CharTermAttribute term = ts.addAttribute(CharTermAttribute.class);
        try {
            while (ts.yylex()) {
                l.add(term.toString());
            }
        } catch (IOException ex) {
            throw new RuntimeException(ex);
        }
View Full Code Here

TOP

Related Classes of org.opensolaris.opengrok.analysis.JFlexTokenizer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.