/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fasp.parser.parsers;
import fasp.datatypes.NonGroundProgram;
import fasp.datatypes.NonGroundRule;
import fasp.parser.*;
import fasp.parser.tokenizer.TokenState;
import fasp.parser.tokenizer.Token;
import java.util.ArrayList;
/**
*
* @author Jeroen Janssen <Jeroen.Janssen@vub.ac.be>
*/
public class ProgramParser extends AbstractParser<NonGroundProgram> {
public NonGroundProgram parse(TokenState st) throws ParseException {
ListWithEndTokenParser ruleParser = new ListWithEndTokenParser(new RuleParser(),Token.Type.EOF);
return new NonGroundProgram(ruleParser.parse(st));
}
}