Package org.snpsift.lang
Class LangFactory
- java.lang.Object
-
- org.snpsift.lang.LangFactory
-
public class LangFactory extends java.lang.Object
Creates objects from an AST- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description protected static boolean
debug
-
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 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' statementsExpression
expressionFactory(org.antlr.v4.runtime.tree.ParseTree tree)
Create 'Expressions' from TreeFunction
expressionSetFactory(org.antlr.v4.runtime.tree.ParseTree tree)
Create FunctionBoolSet from ASTField
fieldFactory(org.antlr.v4.runtime.tree.ParseTree tree)
Create 'Expression' from TreeFunctionBoolGenotype
functionBoolGenotypeFactory(org.antlr.v4.runtime.tree.ParseTree tree)
Create FunctionBoolGenotype from ASTFunction
functionFactory(org.antlr.v4.runtime.tree.ParseTree tree)
Create functionFunction
functionVcfEntryFactory(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.
-
-