Package org.eclipse.xtext.parser.packrat
Interface IMarkerFactory.IMarker
-
- All Known Implementing Classes:
Marker
- Enclosing interface:
- IMarkerFactory
public static interface IMarkerFactory.IMarker
Represents a nestable parser state
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
commit()
Commit all recorded information.void
flush()
Commit all recorded information.IMarkerFactory.IMarker
fork()
Create another marker for the very same original state of the parser.IMarkerFactory.IMarker
join(IMarkerFactory.IMarker forkedMarker)
Join the forked marker and keep this one as the better one.void
rollback()
Discard all recorded information.
-
-
-
Method Detail
-
rollback
void rollback()
Discard all recorded information. Rolls the parser's state back as it was before it was marked. The marker cannot be used any longer after a rollback.
-
commit
void commit()
Commit all recorded information. You cannot use a marker any longer, if you commit it's data.
-
flush
void flush()
Commit all recorded information. You can reuse a marker flushed marker. The flushed data cannot be rolled back by this marker.
-
fork
IMarkerFactory.IMarker fork()
Create another marker for the very same original state of the parser. A fork can be understood as an alternative branch in the decision tree. Before you commit or flush any of the alternatives, you have to ensure that they are rejoined. Otherwise will the commit be rejected.
-
join
IMarkerFactory.IMarker join(IMarkerFactory.IMarker forkedMarker)
Join the forked marker and keep this one as the better one. Will discard all recorded information of the forked marker and reset the parsers state to this marker.
-
-