Examples of Lexer

Examples of com.Ostermiller.Syntax.Lexer

     * @throws IOException if an I/O error occurs.
     * @throws InvocationTargetException if a lexer class is specified which can't be instantiated.
    public void writeHTMLFragment() throws IOException, InvocationTargetException {
        Lexer lexer = this.lexer;
        if (lexer == null) lexer = getLexerFromClass(lexerType);   
        if (lexer == null) lexer = getLexerFromMime();
        if (lexer == null) lexer = getLexerFromExt();
        writeHTMLFragment(lexer, out);     
View Full Code Here

Examples of com.alibaba.druid.sql.parser.Lexer


  public void testLexer() {
    String sql = "SELECT * FROM T WHERE F1 = ? ORDER BY F2";
    Lexer lexer = new Lexer(sql);
    for (;;) {
      Token tok = lexer.token();

      if (tok == Token.IDENTIFIER) {
        System.out.println(tok.name() + "\t\t" + lexer.stringVal());
      } else {
        System.out.println(tok.name() + "\t\t\t" + tok.name);

      if (tok == Token.EOF) {
View Full Code Here

Examples of com.antlersoft.query.environment.Lexer

  public void readResources( DBDriver driver, Reader reader) throws IOException, RuleActionException
    Lexer lexer=new Lexer( m_resource_parser);
    readToLexer( reader, lexer);
View Full Code Here

Examples of com.google.clearsilver.jsilver.syntax.lexer.Lexer

  public TemplateSyntaxTree parse(Reader input, String templateName, EscapeMode escapeMode)
      throws JSilverIOException, JSilverBadSyntaxException {
    try {
      PushbackReader pushbackReader = new PushbackReader(input, PUSHBACK_SIZE);
      Lexer lexer = new Lexer(pushbackReader);
      Parser parser = new Parser(lexer);
      Start root = parser.parse();
      process(root, escapeMode, templateName);
      return new TemplateSyntaxTree(root);
    } catch (IOException exception) {
View Full Code Here

Examples of com.googlecode.goclipse.go.lang.lexer.Lexer


    public void init() throws IOException {

      try {
        Lexer lexer = new Lexer();
        Tokenizer tokenizer = new Tokenizer(lexer);
        FunctionParser functionParser = new FunctionParser(true, tokenizer, file);

        BufferedReader reader = new BufferedReader(new FileReader(file));
        String temp = "";
        StringBuilder builder = new StringBuilder();
        while ((temp = reader.readLine()) != null) {

        List<Function> functions = functionParser.getFunctions();
        for (Function function : functions) {
View Full Code Here

Examples of com.intellij.lexer.Lexer

        /*DBLanguageFile originalFile = (DBLanguageFile) file.getViewProvider().getAllFiles().get(0).getOriginalFile();
        if (originalFile != null)  file = originalFile;*/

        String text = chameleon.getText();
        ParserDefinition parserDefinition = languageDialect.getParserDefinition();
        Lexer lexer = parserDefinition.createLexer(project);

        DBLanguageParser parser = (DBLanguageParser) parserDefinition.createParser(project);

        PsiBuilder builder = PsiBuilderFactory.getInstance().createBuilder(project, chameleon, lexer, languageDialect, text);
        ASTNode node = parser.parse(this, builder, file.getParseRootId());
View Full Code Here

Examples of com.intellij.lexer.Lexer

    public PsiFile createFile(FileViewProvider viewProvider) {
        return new JFlexPsiFileImpl(viewProvider);

    public SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode left, ASTNode right) {
        final Lexer lexer = createLexer(left.getPsi().getProject());
        return LanguageUtil.canStickTokensTogetherByLexer(left, right, lexer);
View Full Code Here

Examples of com.intellij.lexer.Lexer

        String str = "Ahoj {* tady bude jmeno *} {$jmeno} :) <a href=\"{link Dashboard:signal!, id => $id}\" n:href=\"Novak:detail!\" title=\"lol\">novak</a> {* a tady je konec *}";

        IElementType el;

        Lexer merge = new LatteLexer();

        while((el = merge.getTokenType()) != null) {
            System.out.printf("%s: %d %d '%s'\n", el.toString(), merge.getTokenStart(), merge.getTokenEnd(), str.substring(merge.getTokenStart(), merge.getTokenEnd()));
View Full Code Here

Examples of com.sonar.sslr.impl.Lexer

  public CxxTokenizer(Charset charset) {
    this.charset = charset;

  public final void tokenize(SourceCode source, Tokens cpdTokens) {
    Lexer lexer = CxxLexer.create(new CxxConfiguration(charset));
    String fileName = source.getFileName();
    List<Token> tokens = lexer.lex(new File(fileName));
    for (Token token : tokens) {
      TokenEntry cpdToken = new TokenEntry(getTokenImage(token), fileName, token.getLine());
View Full Code Here

Examples of com.stuffwithstuff.magpie.parser.Lexer

  protected void afterReadLine(Repl repl, String prompt, String line) {
    try {
      Lexer lexer = new Lexer(new StringReader("", line));
      // TODO(bob): Now that there are token types for reserved words and
      // operators, should handle them here.
      // Redraw the prompt.

      while (true) {
        Token token = lexer.readToken();
        if (token.getType() == TokenType.EOF) break;

        switch (token.getType()) {
        case LEFT_PAREN:
        case RIGHT_PAREN:
View Full Code Here
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.