N
- the enum that lists all nonterminal symbols for this grammar.public interface Grammar<N extends Enum<N>>
Modifier and Type | Method and Description |
---|---|
N[] |
dependencySort()
Returns the nonterminals of this grammar sorted according to their
dependencies on one another.
|
EnumSet<N> |
getAccepting()
Returns the set of all accepting nonterminals of this grammar.
|
N |
getAxiom()
Returns the axiom of this grammar.
|
Class<N> |
getNonterminalClass()
Returns the enum class that lists the nonterminal symbols of
this grammar.
|
List<ProductionRule<N>> |
getPossibleRules(N nonterminal,
int leftSize,
int rightSize,
int M,
int N)
Returns all production rules of this grammar that can be applied
in the current situation.
|
boolean |
requires(OperationType type)
This method should return true if and only if this Grammar uses the given OperationType.
|
Class<N> getNonterminalClass()
N[] dependencySort()
N getAxiom()
EnumSet<N> getAccepting()
List<ProductionRule<N>> getPossibleRules(@NonNull N nonterminal, int leftSize, int rightSize, int M, int N)
nonterminal
- the nonterminal symbol on the left side of all
returned production rules.leftSize
- the nodes available in the left input sequence.rightSize
- the nodes available in the right right sequence.M
- the overall length of the left input sequence.N
- the overall length of the right input sequence.boolean requires(@NonNull OperationType type)
type
- an OperationType.Copyright (C) 2016-2018 Benjamin Paaßen, AG Theoretical Computer Science, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/tcs . This documentation is licensed under the conditions of CC-BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/