package edu.psu.swe.scim.spec.protocol.filter2;

import junitparams.JUnitParamsRunner;
import junitparams.Parameters;

import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.BaseErrorListener;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.RecognitionException;
import org.antlr.v4.runtime.Recognizer;
import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.runtime.tree.ParseTreeListener;
import org.antlr.v4.runtime.tree.ParseTreeWalker;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import edu.psu.swe.scim.server.filter2.FilterLexer;
import edu.psu.swe.scim.server.filter2.FilterParser;
import edu.psu.swe.scim.spec.protocol.filter.AbstractLexerParserTest;

@RunWith(JUnitParamsRunner.class)
public class FilterTest extends AbstractLexerParserTest {

  private static final Logger LOG = LoggerFactory.getLogger(FilterTest.class);

  @SuppressWarnings("unused")
  private String[] getAllFilters() {
    return ALL;
  }
  
  @Test
  @Parameters(method = "getAllFilters")
  public void test(String filter) throws Exception {
    LOG.info("Running Filter Parser test on input: " + filter);
    FilterLexer l = new FilterLexer(new ANTLRInputStream(filter));
    FilterParser p = new FilterParser(new CommonTokenStream(l));
    p.setBuildParseTree(true);

    p.addErrorListener(new BaseErrorListener() {
      @Override
      public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) {
        throw new IllegalStateException("failed to parse at line " + line + " due to " + msg, e);
      }
    });
    

    ParseTree tree = p.filter();
    ParseTreeListener listener = new TreePrintingListener();
    ParseTreeWalker.DEFAULT.walk(listener, tree);
  }
}

@@ -46,78 +46,8 @@
 2;%0A%0A
-import junitparams.JUnitParamsRunner;%0Aimport junitparams.Parameters;%0A%0A
 impo
@@ -414,24 +414,49 @@
 TreeWalker;%0A
+import org.junit.Ignore;%0A
 import org.j
@@ -731,16 +731,85 @@
 serTest;
+%0Aimport junitparams.JUnitParamsRunner;%0Aimport junitparams.Parameters;
 %0A%0A@RunWi
@@ -836,16 +836,24 @@
 .class)%0A
+@Ignore%0A
 public c

Disable filter2 tests until lexer/parser and specification are adjudicated.