Package org.snpsift.lang
Class LangFactory
- java.lang.Object
-
- org.snpsift.lang.LangFactory
-
public class LangFactory extends java.lang.ObjectCreates objects from an AST- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description protected static booleandebug
-
Constructor Summary
Constructors Constructor Description LangFactory()LangFactory(java.util.ArrayList<java.util.HashSet<java.lang.String>> sets, org.snpeff.vcf.EffFormatVersion formatVersion, boolean exceptionIfNotFound)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expressioncompile(java.lang.String expression)Create an AST from a program (using ANTLR lexer & parser) Returns null if error Use 'alreadyIncluded' to keep track of from 'include' statementsExpressionexpressionFactory(org.antlr.v4.runtime.tree.ParseTree tree)Create 'Expressions' from TreeFunctionexpressionSetFactory(org.antlr.v4.runtime.tree.ParseTree tree)Create FunctionBoolSet from ASTFieldfieldFactory(org.antlr.v4.runtime.tree.ParseTree tree)Create 'Expression' from TreeFunctionBoolGenotypefunctionBoolGenotypeFactory(org.antlr.v4.runtime.tree.ParseTree tree)Create FunctionBoolGenotype from ASTFunctionfunctionFactory(org.antlr.v4.runtime.tree.ParseTree tree)Create functionFunctionfunctionVcfEntryFactory(org.antlr.v4.runtime.tree.ParseTree tree)Create Functions from tree Note: These functions that are calculated on the whole VcfEntry.
-
-
-
Method Detail
-
compile
public Expression compile(java.lang.String expression)
Create an AST from a program (using ANTLR lexer & parser) Returns null if error Use 'alreadyIncluded' to keep track of from 'include' statements
-
expressionFactory
public Expression expressionFactory(org.antlr.v4.runtime.tree.ParseTree tree)
Create 'Expressions' from Tree
-
expressionSetFactory
public Function expressionSetFactory(org.antlr.v4.runtime.tree.ParseTree tree)
Create FunctionBoolSet from AST
-
fieldFactory
public Field fieldFactory(org.antlr.v4.runtime.tree.ParseTree tree)
Create 'Expression' from Tree
-
functionBoolGenotypeFactory
public FunctionBoolGenotype functionBoolGenotypeFactory(org.antlr.v4.runtime.tree.ParseTree tree)
Create FunctionBoolGenotype from AST
-
functionFactory
public Function functionFactory(org.antlr.v4.runtime.tree.ParseTree tree)
Create function
-
functionVcfEntryFactory
public Function functionVcfEntryFactory(org.antlr.v4.runtime.tree.ParseTree tree)
Create Functions from tree Note: These functions that are calculated on the whole VcfEntry.
-
-