Java 类org.eclipse.xtext.parser.antlr.UnorderedGroupHelper 实例源码

项目:xtext-extras    文件:XtextAntlrGeneratorFragment.java   
@Override
public Set<Binding> getGuiceBindingsRt(Grammar grammar) {
    BindFactory factory = new BindFactory()
        .addTypeToType(IParser.class.getName(),getParserClassName(grammar, getNaming()))
        .addTypeToType(ITokenToStringConverter.class.getName(),AntlrTokenToStringConverter.class.getName())
        .addTypeToType(IAntlrTokenFileProvider.class.getName(),getAntlrTokenFileProviderClassName(grammar, getNaming()))
        .addTypeToType(Lexer.class.getName(), getLexerClassName(grammar, getNaming()))
        .addTypeToProviderInstance(getLexerClassName(grammar, getNaming()), "org.eclipse.xtext.parser.antlr.LexerProvider.create(" + getLexerClassName(grammar, getNaming()) + ".class)")
        .addConfiguredBinding("RuntimeLexer",
                "binder.bind(" + Lexer.class.getName() + ".class)"+
                ".annotatedWith(com.google.inject.name.Names.named(" +
                "org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME" +
                ")).to(" + getLexerClassName(grammar, getNaming()) +".class)")
        .addTypeToType(ITokenDefProvider.class.getName(), AntlrTokenDefProvider.class.getName());
    if (containsUnorderedGroup(grammar))
        factory = factory.addTypeToType(IUnorderedGroupHelper.class.getName(), UnorderedGroupHelper.class.getName());
    return factory.getBindings();
}
项目:xtext-extras    文件:AntlrGeneratorFragment.java   
@Override
public Set<Binding> getGuiceBindingsRt(Grammar grammar) {
    BindFactory factory = new BindFactory()
        .addTypeToType(IParser.class.getName(),getFragmentHelper().getParserClassName(grammar))
        .addTypeToType(ITokenToStringConverter.class.getName(),AntlrTokenToStringConverter.class.getName())
        .addTypeToType(IAntlrTokenFileProvider.class.getName(),getFragmentHelper().getAntlrTokenFileProviderClassName(grammar))
        .addTypeToType(Lexer.class.getName(), getFragmentHelper().getLexerClassName(grammar))
        .addTypeToProviderInstance(getFragmentHelper().getLexerClassName(grammar), "org.eclipse.xtext.parser.antlr.LexerProvider.create(" + getFragmentHelper().getLexerClassName(grammar) + ".class)")
        .addConfiguredBinding("RuntimeLexer",
                "binder.bind(" + Lexer.class.getName() + ".class)"+
                ".annotatedWith(com.google.inject.name.Names.named(" +
                "org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME" +
                ")).to(" + getFragmentHelper().getLexerClassName(grammar) +".class)")
        .addTypeToType(ITokenDefProvider.class.getName(),AntlrTokenDefProvider.class.getName());
    if (containsUnorderedGroup(grammar))
        factory = factory.addTypeToType(IUnorderedGroupHelper.class.getName(), UnorderedGroupHelper.class.getName());
    if (getOptions().isIgnoreCase()) {
        factory = factory
            .addTypeToType(ITokenSerializer.IKeywordSerializer.class.getName(), IgnoreCaseKeywordSerializer.class.getName())
            .addTypeToType(AbstractIDValueConverter.class.getName(), IgnoreCaseIDValueConverter.class.getName());
    }
    return factory.getBindings();
}
项目:antlr4ide    文件:AntlrGeneratorFragmentWithCustomLexer.java   
@Override
public Set<Binding> getGuiceBindingsRt(final Grammar grammar) {
  BindFactory factory = new BindFactory()
      .addTypeToType(IParser.class.getName(), getFragmentHelper().getParserClassName(grammar))
      .addTypeToType(ITokenToStringConverter.class.getName(),
          AntlrTokenToStringConverter.class.getName())
      .addTypeToType(IAntlrTokenFileProvider.class.getName(),
          getFragmentHelper().getAntlrTokenFileProviderClassName(grammar))
      .addTypeToType(Lexer.class.getName(), getFragmentHelper().getLexerClassName(grammar))
      .addTypeToProviderInstance(
          getFragmentHelper().getLexerClassName(grammar),
          "org.eclipse.xtext.parser.antlr.LexerProvider.create("
              + getFragmentHelper().getLexerClassName(grammar) + ".class)")
      .addConfiguredBinding("RuntimeLexer",
          "binder.bind(" + Lexer.class.getName() + ".class)" +
              ".annotatedWith(com.google.inject.name.Names.named(" +
              "org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME" +
              ")).to(" + getFragmentHelper().getLexerClassName(grammar) + ".class)")
      .addTypeToType(ITokenDefProvider.class.getName(), AntlrTokenDefProvider.class.getName());
  if (containsUnorderedGroup(grammar)) {
    factory = factory.addTypeToType(IUnorderedGroupHelper.class.getName(),
        UnorderedGroupHelper.class.getName());
  }
  if (getOptions().isIgnoreCase()) {
    factory = factory
        .addTypeToType(ITokenSerializer.IKeywordSerializer.class.getName(),
            IgnoreCaseKeywordSerializer.class.getName())
        .addTypeToType(AbstractIDValueConverter.class.getName(),
            IgnoreCaseIDValueConverter.class.getName());
  }
  return factory.getBindings();
}
项目:n4js    文件:AbstractN4MFRuntimeModule.java   
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
    return UnorderedGroupHelper.class;
}
项目:lcdsl    文件:AbstractLcDslRuntimeModule.java   
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
    return UnorderedGroupHelper.class;
}
项目:xtext-core    文件:AbstractSimpleBeeLangTestLanguageRuntimeModule.java   
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
    return UnorderedGroupHelper.class;
}
项目:xtext-core    文件:AbstractBeeLangTestLanguageRuntimeModule.java   
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
    return UnorderedGroupHelper.class;
}
项目:xtext-core    文件:AbstractExBeeLangTestLanguageRuntimeModule.java   
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
    return UnorderedGroupHelper.class;
}
项目:xtext-core    文件:AbstractExBacktrackingBug325745TestLanguageRuntimeModule.java   
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
    return UnorderedGroupHelper.class;
}
项目:xtext-core    文件:AbstractBacktrackingBug325745TestLanguageRuntimeModule.java   
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
    return UnorderedGroupHelper.class;
}
项目:xtext-core    文件:AbstractExUnorderedGroupsTestLanguageRuntimeModule.java   
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
    return UnorderedGroupHelper.class;
}
项目:xtext-core    文件:AbstractSimpleBacktrackingBug325745TestLanguageRuntimeModule.java   
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
    return UnorderedGroupHelper.class;
}
项目:xtext-core    文件:AbstractUnorderedGroupsTestLanguageRuntimeModule.java   
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
    return UnorderedGroupHelper.class;
}
项目:xtext-core    文件:AbstractSimpleUnorderedGroupsTestLanguageRuntimeModule.java   
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
    return UnorderedGroupHelper.class;
}
项目:xtext-core    文件:AbstractSequencerTestLanguageRuntimeModule.java   
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
    return UnorderedGroupHelper.class;
}