public final class Grammar extends Object
Use instances of this class to obtain other parsers or tokens during parsing and refinement.
TokenFactory
,
ParserFactory
Constructor and Description |
---|
Grammar()
Creates a new instance using standard grammar constructs.
|
Grammar(TokenFactory tokenFactory,
ParserFactory parserFactory)
Creates a new instance using standard or custom grammar constructs.
|
Modifier and Type | Method and Description |
---|---|
ParserFactory |
parser()
Gets the
ParserFactory . |
TokenFactory |
token()
Gets the
TokenFactory . |
public Grammar()
public Grammar(TokenFactory tokenFactory, ParserFactory parserFactory)
tokenFactory
- The token factory, or null to use the standard.parserFactory
- The parser factory, or null to use the standard.public TokenFactory token()
TokenFactory
.TokenFactory
.public ParserFactory parser()
ParserFactory
.ParserFactory
.Copyright (c) 2019, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE file in the repository.