Package org.eclipse.xtext.parser.packrat
Interface IParserConfiguration
-
- All Known Implementing Classes:
AbstractParserConfiguration,TerminalsParserConfiguration
public interface IParserConfigurationThis interface is not intended to be implemented by clients. A implementation is usually generated by Xtext.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconfigureConsumers()Initialize the created consumers.KeywordConsumercreateKeywordConsumer()The created keyword consumer should not be referenced from the parser configuration.EnumLiteralConsumercreateLiteralConsumer()The created literal consumer should not be referenced from the parser configuration.voidcreateNonTerminalConsumers()Create any non-terminal consumers, that are required.voidcreateTerminalConsumers()Create any terminal consumers, that are required.ITerminalConsumer[]getInitialHiddenTerminals()Provides access to the initial (e.g.INonTerminalConsumergetRootConsumer()Return a references to the same and same again root consumer.
-
-
-
Method Detail
-
getRootConsumer
INonTerminalConsumer getRootConsumer()
Return a references to the same and same again root consumer.- Returns:
- a consumer that allows to parse the root node of a language.
-
createNonTerminalConsumers
void createNonTerminalConsumers()
Create any non-terminal consumers, that are required. Do not initialize their internal state except for a valid constructor call. Implementors should note, that any created consumer should be referable by a meaningful getter. Ensure that you callcreateNonTerminalConsumers()for any referenced other parser configuration in this method. It is ensured thatcreateTerminalConsumers()is called beforecreateNonTerminalConsumers()thus the terminals can be used to set the hidden tokens per terminal.- See Also:
configureConsumers(),createTerminalConsumers()
-
createTerminalConsumers
void createTerminalConsumers()
Create any terminal consumers, that are required. This is the first method that is called during the lifecycle. Do not initialize them further. ThereforeconfigureConsumers()will be called.- See Also:
configureConsumers()
-
configureConsumers
void configureConsumers()
Initialize the created consumers. Set any references to allowed or disallowed follow rules. It is ensured, thatcreateNonTerminalConsumers()andcreateTerminalConsumers()was called before.
-
createKeywordConsumer
KeywordConsumer createKeywordConsumer()
The created keyword consumer should not be referenced from the parser configuration.- Returns:
- a fresh keyword consumer.
-
createLiteralConsumer
EnumLiteralConsumer createLiteralConsumer()
The created literal consumer should not be referenced from the parser configuration.- Returns:
- a fresh literal consumer.
-
getInitialHiddenTerminals
ITerminalConsumer[] getInitialHiddenTerminals()
Provides access to the initial (e.g. default) hidden terminal consumers.- Returns:
- the initial hidden terminals.
-
-