Abstract
Readonly
tokenProtected
assignTraverses the AST to ensure that parent nodes are correctly assigned.
If you assign the parents correctly when you build the AST, or you're not interested in tracking child-parent relationships, you can override this method to do nothing to improve performance.
Protected
Abstract
createANTLRLexerProtected
Abstract
createANTLRParserProtected
createProtected
createProtected
Abstract
doProtected
injectProtected
injectProtected
invokeInvokes the parser's root rule, i.e., the method which is responsible of parsing the entire input. Usually this is the topmost rule, the one with index 0 (as also assumed by other libraries such as antlr4-c3), so this method invokes that rule. If your grammar/parser is structured differently, or if you're using this to parse only a portion of the input or a subset of the language, you have to override this method to invoke the correct entry point.
Performs "lexing" on the given code stream, i.e., it breaks it into tokens.
Parses source code, returning a result that includes an AST and a collection of parse issues (errors, warnings). The parsing is done in accordance to the StarLasu methodology i.e. a first-stage parser builds a parse tree which is then mapped onto a higher-level tree called the AST.
the source code.
if true (the default), parsed AST nodes record their position in the input text.
if true, the result will include a measurement of the time spent in lexing i.e. breaking
Optional
source: Sourcethe optional Source to associate to node positions. the input stream into tokens.
Executes only the first stage of the parser, i.e., the production of a parse tree. Usually, you'll want to use the [parse] method, that returns an AST which is simpler to use and query.
Protected
Abstract
parseProtected
postProtected
verifyChecks the parse tree for correctness. If you're concerned about performance, you may want to override this to do nothing.
Generated using TypeDoc
A parser that supports exporting AST's to EMF/Ecore. In particular, this parser can generate the metamodel. We can then use toEObject(node) to translate a tree into its EMF representation.