本文整理汇总了Java中org.parboiled.common.ImmutableList类的典型用法代码示例。如果您正苦于以下问题:Java ImmutableList类的具体用法?Java ImmutableList怎么用?Java ImmutableList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ImmutableList类属于org.parboiled.common包,在下文中一共展示了ImmutableList类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createRuleMethodProcessors
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
static List<RuleMethodProcessor> createRuleMethodProcessors() {
return ImmutableList.of(
new UnusedLabelsRemover(),
new ReturnInstructionUnifier(),
new InstructionGraphCreator(),
new ImplicitActionsConverter(),
new InstructionGroupCreator(),
new InstructionGroupPreparer(),
new ActionClassGenerator(false),
new VarInitClassGenerator(false),
new RuleMethodRewriter(),
new SuperCallRewriter(),
new BodyWithSuperCallReplacer(),
new VarFramingGenerator(),
new LabellingGenerator(),
new FlagMarkingGenerator(),
new CachingGenerator()
);
}
开发者ID:parboiled1,项目名称:parboiled,代码行数:21,代码来源:ParserTransformer.java
示例2: compile
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
void compile() {
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<>();
StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, Locale.getDefault(), null);
Iterable<? extends JavaFileObject> javaObjects = fileManager.getJavaFileObjectsFromStrings(
ImmutableList.of(
classPath.toString()
)
);
String[] compileOptions = new String[]{"-d", classesPath.toFile().getAbsolutePath()};
Iterable<String> compilationOptions = Arrays.asList(compileOptions);
JavaCompiler.CompilationTask compilerTask = compiler.getTask(null, fileManager, diagnostics, compilationOptions, null, javaObjects);
if (!compilerTask.call()) {
String msg = "";
for (Diagnostic<?> diagnostic : diagnostics.getDiagnostics()) {
msg += String.format("Error on line %d in %s\n", diagnostic.getLineNumber(), diagnostic);
}
throw new GrammarException("Could not compile project \n" + msg);
}
}
开发者ID:simonwibberley,项目名称:GramExp,代码行数:29,代码来源:GramExp.java
示例3: ImmutableBinaryTreeNode
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
@SuppressWarnings({"unchecked"})
public ImmutableBinaryTreeNode(T left, T right) {
super(left == null ?
right == null ? ImmutableList.<T>of() : ImmutableList.of(right) :
right == null ? ImmutableList.of(left) : ImmutableList.of(left, right));
this.left = left;
this.right = right;
}
开发者ID:parboiled1,项目名称:parboiled,代码行数:9,代码来源:ImmutableBinaryTreeNode.java
示例4: ImmutableGraphNode
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
public ImmutableGraphNode(List<T> children) {
this.children = children ==
null ? ImmutableList.<T>of() :
children instanceof ImmutableList ? children :
children instanceof ImmutableLinkedList ? children :
ImmutableList.copyOf(children);
}
开发者ID:parboiled1,项目名称:parboiled,代码行数:8,代码来源:ImmutableGraphNode.java
示例5: getChildren
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
public List<Node> getChildren() {
return ImmutableList.of();
}
开发者ID:nicolaschriste,项目名称:docdown,代码行数:4,代码来源:ExternalCodeNode.java
示例6: AbstractMatcher
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
public AbstractMatcher(Rule[] subRules, String label) {
super(ImmutableList.<Matcher>of(toMatchers(checkArgNotNull(subRules, "subRules"))));
this.label = label;
}
开发者ID:parboiled1,项目名称:parboiled,代码行数:5,代码来源:AbstractMatcher.java
示例7: visit
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
@Override
public List<ActionMatcher> visit(ActionMatcher matcher) {
return ImmutableList.of(matcher);
}
开发者ID:parboiled1,项目名称:parboiled,代码行数:5,代码来源:RecoveringParseRunner.java
示例8: defaultValue
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
@Override
public List<ActionMatcher> defaultValue(AbstractMatcher matcher) {
return ImmutableList.of();
}
开发者ID:parboiled1,项目名称:parboiled,代码行数:5,代码来源:RecoveringParseRunner.java
示例9: CoreTest
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
public CoreTest() throws IOException {
super(collectionAsScalaIterable(ImmutableList.of(getSuiteFileName())).toList());
}
开发者ID:parboiled1,项目名称:parboiled,代码行数:4,代码来源:CoreTest.java
示例10: ExamplesJavaTestWrapper
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
public ExamplesJavaTestWrapper() throws IOException {
super(collectionAsScalaIterable(ImmutableList.of(getSuiteFileName())).toList());
}
开发者ID:parboiled1,项目名称:parboiled,代码行数:4,代码来源:ExamplesJavaTestWrapper.java
示例11: JavaTest
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
public JavaTest() throws IOException {
super(collectionAsScalaIterable(ImmutableList.of(getSuiteFileName())).toList());
}
开发者ID:parboiled1,项目名称:parboiled,代码行数:4,代码来源:JavaTest.java
示例12: getChildren
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
@Override
public List<Node> getChildren() {
return ImmutableList.of();
}
开发者ID:Arnauld,项目名称:gutenberg,代码行数:5,代码来源:AttributeListNode.java
示例13: getChildren
import org.parboiled.common.ImmutableList; //导入依赖的package包/类
public List<Node> getChildren() {
return ImmutableList.of();
}
开发者ID:asciidocj,项目名称:asciidocj,代码行数:4,代码来源:SimpleNode.java
注:本文中的org.parboiled.common.ImmutableList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论