Examples of yylex()


Examples of org.eclipse.php.internal.core.documentModel.parser.php5.PhpLexer.yylex()

      return true;
    } else {
      Scanner scanner = new PhpLexer(new StringReader(trimmedText));
      scanner.initialize(PhpLexer.ST_PHP_IN_SCRIPTING);
      try {
        return scanner.yylex() == null;
      } catch (IOException e) {
        return false;
      }
    }
  }
View Full Code Here

Examples of org.opensolaris.opengrok.analysis.JFlexTokenizer.yylex()

        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

Examples of org.renjin.parser.RLexer.yylex()

  private void assertTokenSequence(String source, LexExpectation... expects) {
    Reader reader = new StringReader(source);
    RLexer lexer = new RLexer(ParseOptions.defaults(), new ParseState(), reader);

    for (int i = 0; i != expects.length; ++i) {
      assertThat("token " + (i + 1), lexer.yylex(), equalTo(expects[i].expectedToken));
      assertThat(lexer.getLVal(), expects[i].sexpMatcher);
    }
    assertThat("end of input", lexer.yylex(), equalTo(END_OF_INPUT));
  }
}
View Full Code Here

Examples of org.renjin.parser.RLexer.yylex()

    for (int i = 0; i != expects.length; ++i) {
      assertThat("token " + (i + 1), lexer.yylex(), equalTo(expects[i].expectedToken));
      assertThat(lexer.getLVal(), expects[i].sexpMatcher);
    }
    assertThat("end of input", lexer.yylex(), equalTo(END_OF_INPUT));
  }
}
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.