Examples of lookAhead()


Examples of com.pogofish.jadt.javadoc.javacc.JavaDocParserImpl.lookahead()

    @Test
    public void testLookahead() {
        // to get coverage of the null case in lookahead
        final JavaDocParserImpl impl = new JavaDocParserImpl(new StringReader("foo1 foo2"));
        impl.token = new Token(0, "bar1");
        final Token token1 = impl.lookahead();
        assertEquals("foo1", token1.image);
       
        // to get coverage of the non-null case in lookahead
        impl.token = new Token(0, "bar");
        impl.token.next = new Token(0, "bar2");
View Full Code Here

Examples of com.pogofish.jadt.javadoc.javacc.JavaDocParserImpl.lookahead()

        assertEquals("foo1", token1.image);
       
        // to get coverage of the non-null case in lookahead
        impl.token = new Token(0, "bar");
        impl.token.next = new Token(0, "bar2");
        final Token token2 = impl.lookahead();
        assertEquals("bar2", token2.image);     
    }
   
    @Test
    public void testGeneralSection() {
View Full Code Here

Examples of dtool.parser.DeeParser.lookAhead()

   
    // We reparse the snipped source as it's the easiest way to determine search prefix
    String refModuleSnippedSource = source.substring(refModule.getStartPos(), offset);
    DeeParser parser = new DeeParser(refModuleSnippedSource);
    String moduleQualifiedNameCanonicalPrefix = parser.parseRefModule().toStringAsCode();
    DeeTokens lookAhead = parser.lookAhead();
    if(lookAhead != DeeTokens.EOF) {
      assertTrue(lookAhead.isKeyword());
      moduleQualifiedNameCanonicalPrefix += lookAhead.getSourceValue();
    }
   
View Full Code Here

Examples of dtool.tests.utils.SimpleParser.lookAhead()

  }
 
  protected NamedNodeElement[] parseExpectedStructure(String source) {
    SimpleParser parser = new SimpleParser(source);
    NamedNodeElement[] namedElements = readNamedElementsList(parser);
    assertTrue(parser.lookaheadIsEOF() || parser.lookAhead() == '$');
    return namedElements;
  }
 
  public static NamedNodeElement[] readNamedElementsList(SimpleParser parser) {
    ArrayList<NamedNodeElement> elements = new ArrayList<NamedNodeElement>();
View Full Code Here

Examples of fasp.parser.state.LookaheadParseState.lookahead()

      else if (c.equals('-'))
        tokenList.add(new Token(st.getLineNumber(),st.getColumnNumber()-1,Token.Type.NEG));
      else if (c.equals('~'))
        tokenList.add(new Token(st.getLineNumber(),st.getColumnNumber()-1,Token.Type.NAF));
      else if (c.equals('%'))
        while(!st.lookahead().equals(ParseState.EOF) && !st.lookahead().equals('\n'))
          st.eat();
      else if (c.equals('/'))
        tokenList.add(readInEqExp(st,c));
      else if (c.equals('='))
        tokenList.add(readEqExp(st,c));
View Full Code Here

Examples of fasp.parser.state.LookaheadParseState.lookahead()

      else if (c.equals('-'))
        tokenList.add(new Token(st.getLineNumber(),st.getColumnNumber()-1,Token.Type.NEG));
      else if (c.equals('~'))
        tokenList.add(new Token(st.getLineNumber(),st.getColumnNumber()-1,Token.Type.NAF));
      else if (c.equals('%'))
        while(!st.lookahead().equals(ParseState.EOF) && !st.lookahead().equals('\n'))
          st.eat();
      else if (c.equals('/'))
        tokenList.add(readInEqExp(st,c));
      else if (c.equals('='))
        tokenList.add(readEqExp(st,c));
View Full Code Here

Examples of javassist.bytecode.CodeIterator.lookAhead()

        exceptions = buildExceptionInfo(method);
        subroutines = scanner.scan(method);

        Executor executor = new Executor(clazz.getClassPool(), method.getConstPool());
        frames = new Frame[codeLength];
        frames[iter.lookAhead()] = firstFrame(method, maxLocals, maxStack);
        queue.add(iter.next());
        while (!queue.isEmpty()) {
            analyzeNextEntry(method, iter, queue, executor);
        }
View Full Code Here

Examples of javassist.bytecode.CodeIterator.lookAhead()

        exceptions = buildExceptionInfo(method);
        subroutines = scanner.scan(method);

        Executor executor = new Executor(clazz.getClassPool(), method.getConstPool());
        frames = new Frame[codeLength];
        frames[iter.lookAhead()] = firstFrame(method, maxLocals, maxStack);
        queue.add(iter.next());
        while (!queue.isEmpty()) {
            analyzeNextEntry(method, iter, queue, executor);
        }
View Full Code Here

Examples of javassist.bytecode.CodeIterator.lookAhead()

        frame.decodedOp.simulate(currentStack);
        frame.stackAfter = currentStack.copy();
        trace.append(frame.stackAfter);
       
        if( !(op instanceof ExitOpcode || (op instanceof BranchOpCode && !((BranchOpCode)op).isConditional()) || op instanceof SwitchOpcode) )
          trace.append(". Next is ").append(iterator.lookAhead());
       
        if(LOGGER.isTraceEnabled())
          LOGGER.trace(trace);
       
        if(op instanceof ExitOpcode)
View Full Code Here

Examples of javassist.bytecode.CodeIterator.lookAhead()

/* 135 */     this.exceptions = buildExceptionInfo(method);
/* 136 */     this.subroutines = this.scanner.scan(method);
/*     */
/* 138 */     Executor executor = new Executor(clazz.getClassPool(), method.getConstPool());
/* 139 */     this.frames = new Frame[codeLength];
/* 140 */     this.frames[iter.lookAhead()] = firstFrame(method, maxLocals, maxStack);
/* 141 */     queue.add(iter.next());
/* 142 */     while (!queue.isEmpty()) {
/* 143 */       analyzeNextEntry(method, iter, queue, executor);
/*     */     }
/*     */
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.