public ParserEngine(TransitionTable transitions, SyntaxErrors errorDef) { CodeContract.RequiresArgumentNotNull(transitions, "transitions"); CodeContract.RequiresArgumentNotNull(errorDef, "errorDef"); m_transitions = transitions; m_reducer = new ReduceVisitor(transitions); m_heads = new List<ParserHead>(); m_shiftedHeads = new List<ParserHead>(); m_acceptedHeads = new List<ParserHead>(); m_errorCandidates = new List<ParserHead>(); m_tempHeads = new List<ParserHead>(); m_reducedHeads = new List<ParserHead>(); m_recoverReducedHeads = new List<ParserHead>(); m_errorDef = errorDef; m_cleaner = new ParserHeadCleaner(); EnableDeletionRecovery = true; EnableInsertionRecovery = true; EnableReplacementRecovery = true; //init state m_heads.Add(new ParserHead(new StackNode(0, null, null))); }
public ParserEngine(TransitionTable transitions, SyntaxErrors errorDef) { CodeContract.RequiresArgumentNotNull(transitions, "transitions"); CodeContract.RequiresArgumentNotNull(errorDef, "errorDef"); m_transitions = transitions; m_reducer = new ReduceVisitor(transitions); m_heads = new List <ParserHead>(); m_shiftedHeads = new List <ParserHead>(); m_acceptedHeads = new List <ParserHead>(); m_errorCandidates = new List <ParserHead>(); m_tempHeads = new List <ParserHead>(); m_reducedHeads = new List <ParserHead>(); m_recoverReducedHeads = new List <ParserHead>(); m_errorDef = errorDef; m_cleaner = new ParserHeadCleaner(); EnableDeletionRecovery = true; EnableInsertionRecovery = true; EnableReplacementRecovery = true; //init state m_heads.Add(new ParserHead(new StackNode(0, null, null))); }