Examples of RegexpTokenizer


Examples of org.sonar.colorizer.RegexpTokenizer

    List<Tokenizer> tokenizers = new ArrayList<Tokenizer>();
    tokenizers.add(new CDocTokenizer("<span class=\"p\">", SPAN)); // C style comments
    tokenizers.add(new CppDocTokenizer("<span class=\"p\">", SPAN)); // C++ style comments
    tokenizers.add(new KeywordsTokenizer("<span class=\"k\">", SPAN, CxxKeyword.keywordValues())); // keywords
    tokenizers.add(new LiteralTokenizer("<span class=\"s\">", SPAN)); // strings, characters
    tokenizers.add(new RegexpTokenizer("<span class=\"h\">", SPAN, "#[^\\n\\r]*+")); // preprocessor directives
    tokenizers.add(new RegexpTokenizer("<span class=\"c\">", SPAN, "[+-]?[0-9]+[xX]?+(\\.[0-9]*+)?")); // numbers
    return tokenizers;
  }
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.