Package org.parboiled
Interface Action<V>
- All Known Subinterfaces:
SkippableAction<V>
public interface Action<V>
Instances of classes implementing this interface can be used directly in a rule definition to define a parser action.
If the class also implements the
ContextAware
interface it will be used to inform the object of the
current parsing Context
immediately before the invocation of the run(org.parboiled.Context<V>)
method.
Additionally, if the class implementing this interface is an inner class (anonymous or not) and its outer class(es)
implement(s) ContextAware
its outer class(es) will also be informed object of the current parsing Context
immediately before the invocation of the actions run(org.parboiled.Context<V>)
method.
This allows simple anonymous action class implementations directly in the parser rule definitions, even when
they access context-sensitive methods defined in the BaseActions or BaseParser classes.-
Method Summary
-
Method Details
-
run
Runs the parser action.- Parameters:
context
- the current parsing context- Returns:
- true if the parsing process is to proceed, false if the current rule is to fail
-