/** * @deprecated Use {@link ATNDeserializer#checkCondition(boolean, String)} instead. */ @Deprecated public static void checkCondition(boolean condition, String message) { new ATNDeserializer().checkCondition(condition, message); }
/** * @deprecated Use {@link ATNDeserializer#stateFactory} instead. */ @Deprecated public static ATNState stateFactory(int type, int ruleIndex) { return new ATNDeserializer().stateFactory(type, ruleIndex); }
/** * @deprecated Use {@link ATNDeserializer#checkCondition(boolean)} instead. */ @Deprecated public static void checkCondition(boolean condition) { new ATNDeserializer().checkCondition(condition); }
/** * @deprecated Use {@link ATNDeserializer#edgeFactory} instead. */ @Deprecated public static Transition edgeFactory(ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, List<IntervalSet> sets) { return new ATNDeserializer().edgeFactory(atn, type, src, trg, arg1, arg2, arg3, sets); }
/** * @deprecated Use {@link ATNDeserializer#deserialize} instead. */ @Deprecated public static ATN deserialize(char[] data) { return new ATNDeserializer().deserialize(data); }
/** * The ATN with bypass alternatives is expensive to create so we create it * lazily. * * @throws UnsupportedOperationException if the current parser does not * implement the {@link #getSerializedATN()} method. */ public ATN getATNWithBypassAlts() { String serializedAtn = getSerializedATN(); if (serializedAtn == null) { throw new UnsupportedOperationException("The current parser does not support an ATN with bypass alternatives."); } synchronized (bypassAltsAtnCache) { ATN result = bypassAltsAtnCache.get(serializedAtn); if (result == null) { ATNDeserializationOptions deserializationOptions = new ATNDeserializationOptions(); deserializationOptions.setGenerateRuleBypassTransitions(true); result = new ATNDeserializer(deserializationOptions).deserialize(serializedAtn.toCharArray()); bypassAltsAtnCache.put(serializedAtn, result); } return result; } }
ATNDeserializer deserializer = new ATNDeserializer(); result.atn = deserializer.deserialize(serializedATN);
/** * @deprecated Use {@link ATNDeserializer#checkCondition(boolean, String)} instead. */ @Deprecated public static void checkCondition(boolean condition, String message) { new ATNDeserializer().checkCondition(condition, message); }
/** * @deprecated Use {@link ATNDeserializer#checkCondition(boolean)} instead. */ @Deprecated public static void checkCondition(boolean condition) { new ATNDeserializer().checkCondition(condition); }
/** * @deprecated Use {@link ATNDeserializer#checkCondition(boolean)} instead. */ @Deprecated public static void checkCondition(boolean condition) { new ATNDeserializer().checkCondition(condition); }
/** * @deprecated Use {@link ATNDeserializer#edgeFactory} instead. */ @Deprecated public static Transition edgeFactory(ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, List<IntervalSet> sets) { return new ATNDeserializer().edgeFactory(atn, type, src, trg, arg1, arg2, arg3, sets); }
/** * @deprecated Use {@link ATNDeserializer#stateFactory} instead. */ @Deprecated public static ATNState stateFactory(int type, int ruleIndex) { return new ATNDeserializer().stateFactory(type, ruleIndex); }
/** * @deprecated Use {@link ATNDeserializer#stateFactory} instead. */ @Deprecated public static ATNState stateFactory(int type, int ruleIndex) { return new ATNDeserializer().stateFactory(type, ruleIndex); }
/** * @deprecated Use {@link ATNDeserializer#deserialize} instead. */ @Deprecated public static ATN deserialize(char[] data) { return new ATNDeserializer().deserialize(data); }
/** * @deprecated Use {@link ATNDeserializer#edgeFactory} instead. */ @Deprecated @NotNull public static Transition edgeFactory(@NotNull ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, List<IntervalSet> sets) { return new ATNDeserializer().edgeFactory(atn, type, src, trg, arg1, arg2, arg3, sets); }
public ParserInterpreter createParserInterpreter(TokenStream tokenStream) { if (this.isLexer()) { throw new IllegalStateException("A parser interpreter can only be created for a parser or combined grammar."); } char[] serializedAtn = ATNSerializer.getSerializedAsChars(atn); ATN deserialized = new ATNDeserializer().deserialize(serializedAtn); return new ParserInterpreter(fileName, getVocabulary(), Arrays.asList(getRuleNames()), deserialized, tokenStream); } }
public ParserInterpreter createParserInterpreter(TokenStream tokenStream) { if (this.isLexer()) { throw new IllegalStateException("A parser interpreter can only be created for a parser or combined grammar."); } char[] serializedAtn = ATNSerializer.getSerializedAsChars(atn, Arrays.asList(getRuleNames())); ATN deserialized = new ATNDeserializer().deserialize(serializedAtn); return new ParserInterpreter(fileName, getVocabulary(), Arrays.asList(getRuleNames()), deserialized, tokenStream); }
public ParserInterpreter createParserInterpreter(TokenStream tokenStream) { if (this.isLexer()) { throw new IllegalStateException("A parser interpreter can only be created for a parser or combined grammar."); } char[] serializedAtn = ATNSerializer.getSerializedAsChars(atn); ATN deserialized = new ATNDeserializer().deserialize(serializedAtn); return new ParserInterpreter(fileName, getVocabulary(), Arrays.asList(getRuleNames()), deserialized, tokenStream); } }
public LexerInterpreter createLexerInterpreter(CharStream input) { if (this.isParser()) { throw new IllegalStateException("A lexer interpreter can only be created for a lexer or combined grammar."); } if (this.isCombined()) { return implicitLexer.createLexerInterpreter(input); } char[] serializedAtn = ATNSerializer.getSerializedAsChars(atn); ATN deserialized = new ATNDeserializer().deserialize(serializedAtn); return new LexerInterpreter(fileName, getVocabulary(), Arrays.asList(getRuleNames()), ((LexerGrammar)this).modes.keySet(), deserialized, input); }
public LexerInterpreter createLexerInterpreter(CharStream input) { if (this.isParser()) { throw new IllegalStateException("A lexer interpreter can only be created for a lexer or combined grammar."); } if (this.isCombined()) { return implicitLexer.createLexerInterpreter(input); } char[] serializedAtn = ATNSerializer.getSerializedAsChars(atn); ATN deserialized = new ATNDeserializer().deserialize(serializedAtn); return new LexerInterpreter(fileName, getVocabulary(), Arrays.asList(getRuleNames()), ((LexerGrammar)this).modes.keySet(), deserialized, input); }