public abstract class ParsingFacade
extends java.lang.Object
You should only use it if you need access to the parse trees instead of terms or taclet structure.
Constructor and Description |
---|
ParsingFacade() |
Modifier and Type | Method and Description |
---|---|
static KeYLexer |
createLexer(org.antlr.v4.runtime.CharStream stream) |
static KeYLexer |
createLexer(java.nio.file.Path file) |
static ChoiceInformation |
getChoices(java.util.List<KeyAst.File> ctxs)
Extracts the choice information from the given the parsed files
ctxs . |
static <T extends org.antlr.v4.runtime.ParserRuleContext> |
getParseRuleContext(KeyAst<T> ast)
Use this function to retrieve the
ParserRuleContext inside and KeyAst object. |
static java.lang.String |
getValue(KeYParser.String_valueContext ctx)
Translate a given context of a
string_value grammar rule into a the literal value. |
static KeyAst.Term |
parseExpression(org.antlr.v4.runtime.CharStream stream) |
static KeyAst.File |
parseFile(org.antlr.v4.runtime.CharStream stream) |
static KeyAst.File |
parseFile(java.io.File file) |
static KeyAst.File |
parseFile(java.nio.file.Path file) |
static KeyAst.File |
parseFile(java.net.URL url) |
static java.util.List<KeyAst.File> |
parseFiles(java.net.URL url) |
static KeYParser.Id_declarationContext |
parseIdDeclaration(org.antlr.v4.runtime.CharStream stream)
Deprecated.
|
static KeyAst.Seq |
parseSequent(org.antlr.v4.runtime.CharStream stream) |
@Nonnull public static <T extends org.antlr.v4.runtime.ParserRuleContext> T getParseRuleContext(@Nonnull KeyAst<T> ast)
ParserRuleContext
inside and KeyAst
object.
The use of this method is discourage and should be avoided in all high level scenarios.T
- parse tree typeast
- a key ast objectParserRuleContext
inside the given ast object.public static java.util.List<KeyAst.File> parseFiles(java.net.URL url) throws java.io.IOException
java.io.IOException
@Nonnull public static ChoiceInformation getChoices(@Nonnull java.util.List<KeyAst.File> ctxs)
ctxs
.ctxs
- non-null listpublic static KeYLexer createLexer(java.nio.file.Path file) throws java.io.IOException
java.io.IOException
public static KeYLexer createLexer(org.antlr.v4.runtime.CharStream stream)
public static KeyAst.File parseFile(java.net.URL url) throws java.io.IOException
java.io.IOException
public static KeyAst.File parseFile(java.nio.file.Path file) throws java.io.IOException
java.io.IOException
public static KeyAst.File parseFile(java.io.File file) throws java.io.IOException
java.io.IOException
public static KeyAst.File parseFile(org.antlr.v4.runtime.CharStream stream)
public static KeyAst.Term parseExpression(org.antlr.v4.runtime.CharStream stream)
public static KeyAst.Seq parseSequent(org.antlr.v4.runtime.CharStream stream)
@Nonnull public static java.lang.String getValue(@Nonnull KeYParser.String_valueContext ctx)
string_value
grammar rule into a the literal value.
In particular it truncates, and substitutes quote escapes \"
.ctx
- non-null contextpublic static KeYParser.Id_declarationContext parseIdDeclaration(org.antlr.v4.runtime.CharStream stream)
Use is discourage.
stream
- Copyright © 2003-2019 The KeY-Project.