public void traceIn(String rname) throws TokenStreamException { if (!GroovyRecognizer.tracing) return; super.traceIn(rname); } public void traceOut(String rname) throws TokenStreamException {
public JavaLexer(InputBuffer ib) { this(new LexerSharedInputState(ib)); } public JavaLexer(LexerSharedInputState state) {
public void initialize(Token t) { super.initialize(t); line = t.getLine(); col = t.getColumn(); if (t instanceof SourceInfo) { SourceInfo info = (SourceInfo) t; lineLast = info.getLineLast(); colLast = info.getColumnLast(); } }
/** An IDENT token whose spelling is required to start with an uppercase letter. * In the case of a simple statement {UpperID name} the identifier is taken to be a type name, not a command name. */ public final void upperCaseIdent() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST upperCaseIdent_AST = null; if (!(isUpperCase(LT(1)))) throw new SemanticException("isUpperCase(LT(1))"); AST tmp64_AST = null; tmp64_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp64_AST); match(IDENT); upperCaseIdent_AST = (AST)currentAST.root; returnAST = upperCaseIdent_AST; }
protected boolean isEofToken(antlr.Token token) { return token.getType() == antlr.Token.EOF_TYPE; }
public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = QUESTION; int _saveIndex; match('?'); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; }
public final void variableName() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST variableName_AST = null; AST tmp217_AST = null; tmp217_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp217_AST); match(IDENT); variableName_AST = (AST)currentAST.root; returnAST = variableName_AST; }
public final void closableBlockConstructorExpression() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST closableBlockConstructorExpression_AST = null; closableBlock(); astFactory.addASTChild(currentAST, returnAST); closableBlockConstructorExpression_AST = (AST)currentAST.root; returnAST = closableBlockConstructorExpression_AST; }
/** Lookahead to check whether a block begins with explicit closure arguments. */ public final void closableBlockParamsStart() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST closableBlockParamsStart_AST = null; nls(); parameterDeclarationList(); nls(); AST tmp225_AST = null; tmp225_AST = astFactory.create(LT(1)); match(CLOSABLE_BLOCK_OP); returnAST = closableBlockParamsStart_AST; }
public JavaLexer(Reader in) { this(new CharBuffer(in)); } public JavaLexer(InputBuffer ib) {
public GroovyLexer(InputStream in) { this(new ByteBuffer(in)); } public GroovyLexer(Reader in) {
public void traceIn(String rname) throws CharStreamException { if (!GroovyLexer.tracing) return; super.traceIn(rname); } public void traceOut(String rname) throws CharStreamException {
public final void mSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = SR; int _saveIndex; match(">>"); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; }
public final void compoundStatement() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST compoundStatement_AST = null; openBlock(); astFactory.addASTChild(currentAST, returnAST); compoundStatement_AST = (AST)currentAST.root; returnAST = compoundStatement_AST; }
public GroovyLexer(InputBuffer ib) { this(new LexerSharedInputState(ib)); } public GroovyLexer(LexerSharedInputState state) {
public GroovyLexer(Reader in) { this(new CharBuffer(in)); } public GroovyLexer(InputBuffer ib) {
public JavaLexer(InputStream in) { this(new ByteBuffer(in)); } public JavaLexer(Reader in) {
/** A Groovy script or simple expression. Can be anything legal inside {...}. */ public final void snippetUnit() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST snippetUnit_AST = null; nls(); blockBody(EOF); astFactory.addASTChild(currentAST, returnAST); snippetUnit_AST = (AST)currentAST.root; returnAST = snippetUnit_AST; }