@Inject private IPreferenceStoreAccess storeAccess;
@Override protected IParseResult doParse(String ruleName, CharStream in, NodeModelBuilder builder,
int initialLookAhead) {
IParseResult result = super.doParse(ruleName, in, builder, initialLookAhead);
MiscellaneousPreferences preferences = new MiscellaneousPreferences(storeAccess);
if (preferences.isGoogleInternal() && isNotProto2(result)) {
return new ParseResult(new NonProto2Protobuf(), result.getRootNode(), false);
}
return result;
}