org.eclipse.xtext.parser.antlr
Interface IUnorderedGroupHelper

All Known Implementing Classes:
IUnorderedGroupHelper.Null, UnorderedGroupHelper

public interface IUnorderedGroupHelper

Author:
Sebastian Zarnekow - Initial contribution and API

Nested Class Summary
static class IUnorderedGroupHelper.Null
           
static interface IUnorderedGroupHelper.UnorderedGroupState
           
 
Method Summary
 boolean canLeave(UnorderedGroup group)
          Query for remaining mandatory alternatives.
 boolean canSelect(UnorderedGroup group, int index)
          Predicate to answer the question whether the given alternative may be used.
 void enter(UnorderedGroup group)
          Invoke when the group is entered in the parser.
 void initializeWith(org.antlr.runtime.BaseRecognizer recognizer)
          Initializes this helper with the given recognizer.
 void leave(UnorderedGroup group)
          Leave the group.
 void returnFromSelection(UnorderedGroup group)
          Finish the previously selected alternative.
 void select(UnorderedGroup group, int index)
          Announce the usage of the given alternative.
 IUnorderedGroupHelper.UnorderedGroupState snapShot(UnorderedGroup... groups)
          Obtain the current state to be able to roll-back after backtracking.
 

Method Detail

initializeWith

void initializeWith(org.antlr.runtime.BaseRecognizer recognizer)
Initializes this helper with the given recognizer.


enter

void enter(UnorderedGroup group)
Invoke when the group is entered in the parser. Access to any other querying method is answered optimistically.


leave

void leave(UnorderedGroup group)
Leave the group. May not be called before enter.


canSelect

boolean canSelect(UnorderedGroup group,
                  int index)
Predicate to answer the question whether the given alternative may be used.


select

void select(UnorderedGroup group,
            int index)
Announce the usage of the given alternative.


returnFromSelection

void returnFromSelection(UnorderedGroup group)
Finish the previously selected alternative.


canLeave

boolean canLeave(UnorderedGroup group)
Query for remaining mandatory alternatives.


snapShot

IUnorderedGroupHelper.UnorderedGroupState snapShot(UnorderedGroup... groups)
Obtain the current state to be able to roll-back after backtracking.