1
/*******************************************************************************
2
* Copyright (c) 2008 IBM Corporation and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* IBM Corporation - initial API and implementation
10
*********************************************************************************/
12
package org.eclipse.cdt.core.dom.lrparser.lpgextensions;
15
* Provides trial, undo, and final actions for the
16
* TrialUndoBacktrackingParser.
18
public interface ITrialUndoActionProvider<RULE_DATA> {
20
* Invokes the trial action that corresponds to the given rule number.
22
boolean trialAction(int ruleNumber);
25
* Invokes the undo action that corresponds to the given rule number.
27
void undoAction(int ruleNumber);
30
* Invokes the final action that corresponds to the given rule number.
32
void finalAction(int ruleNumber);
35
* Sets the given Rule as the active rule for this provider.
37
void setActiveRule(Rule<RULE_DATA> rule);
40
* Returns the active rule for this provider.
42
Rule<RULE_DATA> getActiveRule();