Package fasp.parser.parsers

Source Code of fasp.parser.parsers.ProgramParser

/*
* 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));
  }
}
TOP

Related Classes of fasp.parser.parsers.ProgramParser

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.