Package org.antlr.runtime

Examples of org.antlr.runtime.CharStream.seek()


                " token= [ "+ ((CommonToken)data.get(curr)).getStartIndex()
                + "-"+ ((CommonToken)data.get(curr)).getStopIndex() + "]" +
                data.get(curr).getText());
            data.subList(start, data.size()).clear();
            CharStream cs = ((Lexer)getTokenSource()).getCharStream();
            cs.seek(startToken.getStopIndex() + 1);
            log.info("reset cs pos:"+ (startToken.getStopIndex() + 1) );
            cs.setLine(startToken.getLine());
            cs.setCharPositionInLine(startToken.getCharPositionInLine() +
                (startToken.getStopIndex() + 1 - startToken.getStartIndex()));
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.