public static bool ActionIsContextDependent(ActionAST actionAST)
{
ANTLRStringStream @in = new ANTLRStringStream(actionAST.Token.Text);
@in.Line = actionAST.Token.Line;
@in.CharPositionInLine = actionAST.Token.CharPositionInLine;
var listener = new ContextDependentListener();
ActionSplitter splitter = new ActionSplitter(@in, listener);
// forces eval, triggers listener methods
splitter.GetActionTokens();
return listener.dependent;
}