Package org.pkl.core.parser
Class Parser
java.lang.Object
org.pkl.core.parser.Parser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateParser(org.antlr.v4.runtime.TokenStream stream, @Nullable List<LexParseException> errorCollector) parseExpressionInput(String source) parseExpressionInput(org.antlr.v4.runtime.CharStream source) parseModule(String source) parseModule(org.antlr.v4.runtime.CharStream source) <T extends org.antlr.v4.runtime.ParserRuleContext>
TparseProduction(org.antlr.v4.runtime.CharStream source, Function<PklParser, T> production) Two-step parse as recommended in chapter "Maximizing Parser Speed" of "The Definitive ANTLR 4 Reference, 2nd Ed".parseReplInput(String source) parseReplInput(org.antlr.v4.runtime.CharStream source)
-
Constructor Details
-
Parser
public Parser()
-
-
Method Details
-
createParser
public PklParser createParser(org.antlr.v4.runtime.TokenStream stream, @Nullable @Nullable List<LexParseException> errorCollector) -
parseModule
public PklParser.ModuleContext parseModule(org.antlr.v4.runtime.CharStream source) throws LexParseException - Throws:
LexParseException
-
parseModule
- Throws:
LexParseException
-
parseReplInput
public PklParser.ReplInputContext parseReplInput(org.antlr.v4.runtime.CharStream source) throws LexParseException - Throws:
LexParseException
-
parseReplInput
- Throws:
LexParseException
-
parseExpressionInput
public PklParser.ExprInputContext parseExpressionInput(org.antlr.v4.runtime.CharStream source) throws LexParseException - Throws:
LexParseException
-
parseProduction
public <T extends org.antlr.v4.runtime.ParserRuleContext> T parseProduction(org.antlr.v4.runtime.CharStream source, Function<PklParser, T> production) throws LexParseExceptionTwo-step parse as recommended in chapter "Maximizing Parser Speed" of "The Definitive ANTLR 4 Reference, 2nd Ed".- Throws:
LexParseException
-
parseExpressionInput
- Throws:
LexParseException
-