Class 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' 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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • debug

        protected static boolean debug
    • Constructor Detail

      • LangFactory

        public LangFactory()
      • LangFactory

        public LangFactory​(java.util.ArrayList<java.util.HashSet<java.lang.String>> sets,
                           org.snpeff.vcf.EffFormatVersion formatVersion,
                           boolean exceptionIfNotFound)
    • 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.