Package org.pkl.core.parser
Class Parser
- java.lang.Object
-
- org.pkl.core.parser.Parser
-
public class Parser extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Parser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PklParsercreateParser(org.antlr.v4.runtime.TokenStream stream, @Nullable java.util.List<LexParseException> errorCollector)PklParser.ExprInputContextparseExpressionInput(java.lang.String source)PklParser.ExprInputContextparseExpressionInput(org.antlr.v4.runtime.CharStream source)PklParser.ModuleContextparseModule(java.lang.String source)PklParser.ModuleContextparseModule(org.antlr.v4.runtime.CharStream source)<T extends org.antlr.v4.runtime.ParserRuleContext>
TparseProduction(org.antlr.v4.runtime.CharStream source, java.util.function.Function<PklParser,T> production)Two-step parse as recommended in chapter "Maximizing Parser Speed" of "The Definitive ANTLR 4 Reference, 2nd Ed".PklParser.ReplInputContextparseReplInput(java.lang.String source)PklParser.ReplInputContextparseReplInput(org.antlr.v4.runtime.CharStream source)
-
-
-
Method Detail
-
createParser
public PklParser createParser(org.antlr.v4.runtime.TokenStream stream, @Nullable java.util.List<LexParseException> errorCollector)
-
parseModule
public PklParser.ModuleContext parseModule(org.antlr.v4.runtime.CharStream source) throws LexParseException
- Throws:
LexParseException
-
parseModule
public PklParser.ModuleContext parseModule(java.lang.String source) throws LexParseException
- Throws:
LexParseException
-
parseReplInput
public PklParser.ReplInputContext parseReplInput(org.antlr.v4.runtime.CharStream source) throws LexParseException
- Throws:
LexParseException
-
parseReplInput
public PklParser.ReplInputContext parseReplInput(java.lang.String source) throws LexParseException
- 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, java.util.function.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
public PklParser.ExprInputContext parseExpressionInput(java.lang.String source) throws LexParseException
- Throws:
LexParseException
-
-