# Class LangFactory

java.lang.Object
org.snpsift.lang.LangFactory

public class LangFactory extends 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(ArrayList<HashSet<String>> sets, org.snpeff.vcf.EffFormatVersion formatVersion, boolean exceptionIfNotFound)`

## Method Summary

Modifier and Type
Method
Description
`Expression`
`compile(String expression)`
Create an AST from a program (using ANTLR lexer invalid input: '&' parser) Returns null if error Use 'alreadyIncluded' to keep track of from 'include' statements
`Expression`
`expressionFactory(org.antlr.v4.runtime.tree.ParseTree tree)`
Create 'Expressions' from Tree
`Function`
`expressionSetFactory(org.antlr.v4.runtime.tree.ParseTree tree)`
Create FunctionBoolSet from AST
`Field`
`fieldFactory(org.antlr.v4.runtime.tree.ParseTree tree)`
Create 'Expression' from Tree
`FunctionBoolGenotype`
`functionBoolGenotypeFactory(org.antlr.v4.runtime.tree.ParseTree tree)`
Create FunctionBoolGenotype from AST
`Function`
`functionFactory(org.antlr.v4.runtime.tree.ParseTree tree)`
Create function
`Function`
`functionVcfEntryFactory(org.antlr.v4.runtime.tree.ParseTree tree)`
Create Functions from tree Note: These functions that are calculated on the whole VcfEntry.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### debug

protected static boolean debug

## Constructor Details

### LangFactory

public LangFactory()

### LangFactory

public LangFactory(ArrayList<HashSet<String>> sets, org.snpeff.vcf.EffFormatVersion formatVersion, boolean exceptionIfNotFound)

## Method Details

### compile

public Expression compile(String expression)
Create an AST from a program (using ANTLR lexer invalid input: '&' 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.