当前位置: 首页>>代码示例>>Java>>正文


Java GrammarRuleKey类代码示例

本文整理汇总了Java中org.sonar.sslr.grammar.GrammarRuleKey的典型用法代码示例。如果您正苦于以下问题:Java GrammarRuleKey类的具体用法?Java GrammarRuleKey怎么用?Java GrammarRuleKey使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GrammarRuleKey类属于org.sonar.sslr.grammar包,在下文中一共展示了GrammarRuleKey类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createNonTerminal

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
@Override
public Object createNonTerminal(GrammarRuleKey ruleKey, Rule rule, List<Object> children, int startIndex, int endIndex) {
    for (Object child : children) {
        if (child instanceof InternalSyntaxToken) {
            return child;
        }
    }
    return new InternalSyntaxSpacing(startIndex, endIndex);
}
 
开发者ID:antowski,项目名称:sonar-onec,代码行数:10,代码来源:OneCNodeBuilder.java

示例2: assertThat

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
public static ParserAssert assertThat(LexerlessGrammarBuilder b, GrammarRuleKey rule) {
    return new ParserAssert(new ActionParser<Tree>(
            Charsets.UTF_8,
            b,
            OneCGrammar.class,
            new TreeFactory(),
            new OneCNodeBuilder(),
            rule));
}
 
开发者ID:antowski,项目名称:sonar-onec,代码行数:10,代码来源:Assertions.java

示例3: createParser

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
private static ActionParser<Tree> createParser(Charset charset, GrammarRuleKey rootRule) {
  return new CssParser(
    charset,
    LexicalGrammar.createCssGrammar(),
    CssGrammar.class,
    new TreeFactory(),
    new CssNodeBuilder(),
    rootRule);
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:10,代码来源:CssParser.java

示例4: createParser

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
private static ActionParser<Tree> createParser(Charset charset, GrammarRuleKey rootRule) {
  return new EmbeddedCssParser(
    charset,
    LexicalGrammar.createEmbeddedCssGrammar(),
    EmbeddedCssGrammar.class,
    new TreeFactory(),
    new EmbeddedCssNodeBuilder(),
    rootRule);
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:10,代码来源:EmbeddedCssParser.java

示例5: createParser

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
private static ActionParser<Tree> createParser(Charset charset, GrammarRuleKey rootRule) {
  return new LessParser(
    charset,
    LexicalGrammar.createLessGrammar(),
    LessGrammar.class,
    new TreeFactory(),
    new LessNodeBuilder(),
    rootRule);
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:10,代码来源:LessParser.java

示例6: createNonTerminal

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
@Override
public Object createNonTerminal(GrammarRuleKey ruleKey, Rule rule, List<Object> children, int startIndex, int endIndex) {
  for (Object child : children) {
    if (child instanceof InternalSyntaxToken) {
      return child;
    }
  }
  return new InternalSyntaxSpacing(startIndex, endIndex);
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:10,代码来源:AbstractNodeBuilder.java

示例7: createParser

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
private static ActionParser<Tree> createParser(Charset charset, GrammarRuleKey rootRule) {
  return new ScssParser(
    charset,
    LexicalGrammar.createScssGrammar(),
    ScssGrammar.class,
    new TreeFactory(),
    new ScssNodeBuilder(),
    rootRule);
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:10,代码来源:ScssParser.java

示例8: createParser

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
private static GherkinParser createParser(Charset charset, GrammarRuleKey rootRule, String language) {
  return new GherkinParser(
    charset,
    GherkinLexicalGrammar.createGrammar(language),
    GherkinGrammar.class,
    new TreeFactory(),
    new GherkinNodeBuilder(),
    rootRule);
}
 
开发者ID:racodond,项目名称:sonar-gherkin-plugin,代码行数:10,代码来源:GherkinParserBuilder.java

示例9: createParser

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
private static ActionParser<Tree> createParser(Charset charset, GrammarRuleKey rootRule) {
  return new ActionParser<>(
    charset,
    JavaPropertiesLexicalGrammar.createGrammar(),
    JavaPropertiesGrammar.class,
    new TreeFactory(),
    new JavaPropertiesNodeBuilder(),
    rootRule);
}
 
开发者ID:racodond,项目名称:sonar-jproperties-plugin,代码行数:10,代码来源:JavaPropertiesParserBuilder.java

示例10: createParser

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
private static ActionParser<Tree> createParser(Charset charset, GrammarRuleKey rootRule) {
  return new ActionParser<>(
    charset,
    JSONLexicalGrammar.createGrammar(),
    JSONGrammar.class,
    new TreeFactory(),
    new JSONNodeBuilder(),
    rootRule);
}
 
开发者ID:racodond,项目名称:sonar-json-plugin,代码行数:10,代码来源:JSONParserBuilder.java

示例11: KindMaps

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
public KindMaps() {
    ImmutableMap.Builder<GrammarRuleKey, Tree.Kind> literalsBuilder = ImmutableMap.builder();
    this.literals = literalsBuilder.build();
}
 
开发者ID:antowski,项目名称:sonar-onec,代码行数:5,代码来源:KindMaps.java

示例12: AbstractParser

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
public AbstractParser(Charset charset, LexerlessGrammarBuilder grammarBuilder, Class<? extends CssGrammar> grammarClass,
                      TreeFactory treeFactory, AbstractNodeBuilder nodeBuilder, GrammarRuleKey rootRule) {
  super(charset, grammarBuilder, grammarClass, treeFactory, nodeBuilder, rootRule);
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:5,代码来源:AbstractParser.java

示例13: CssParser

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
private CssParser(Charset charset, LexerlessGrammarBuilder grammarBuilder, Class<CssGrammar> cssGrammarClass,
  TreeFactory treeFactory, CssNodeBuilder cssNodeBuilder, GrammarRuleKey rootRule) {
  super(charset, grammarBuilder, cssGrammarClass, treeFactory, cssNodeBuilder, rootRule);
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:5,代码来源:CssParser.java

示例14: createTestParser

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
@VisibleForTesting
public static ActionParser<Tree> createTestParser(Charset charset, GrammarRuleKey rootRule) {
  return createParser(charset, rootRule);
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:5,代码来源:CssParser.java

示例15: EmbeddedCssParser

import org.sonar.sslr.grammar.GrammarRuleKey; //导入依赖的package包/类
private EmbeddedCssParser(Charset charset, LexerlessGrammarBuilder grammarBuilder, Class<EmbeddedCssGrammar> embeddedCssGrammarClass,
  TreeFactory treeFactory, EmbeddedCssNodeBuilder embeddedCssNodeBuilder, GrammarRuleKey rootRule) {
  super(charset, grammarBuilder, embeddedCssGrammarClass, treeFactory, embeddedCssNodeBuilder, rootRule);
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:5,代码来源:EmbeddedCssParser.java


注:本文中的org.sonar.sslr.grammar.GrammarRuleKey类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。