derive {xegaBNF} | R Documentation |
Derives the identifier list which expands the non-terminal identifier.
Description
derives()
returns the identifier list which expands
a non-terminal identifier.
Warning: No error checking implemented.
Usage
derive(RuleIndex, RHS)
Arguments
RuleIndex |
An index (integer) in the production table. |
RHS |
The right-hand side of the production table. |
Value
A vector of numerical identifiers.
See Also
Other Utility Functions:
id2symb()
,
isNonTerminal()
,
isTerminal()
,
rules()
,
symb2id()
Examples
a<-booleanGrammar()$BNF
ST<-makeSymbolTable(a)
PT<-makeProductionTable(a,ST)
derive(1, PT$RHS)
derive(2, PT$RHS)
derive(3, PT$RHS)
derive(5, PT$RHS)
[Package xegaBNF version 1.0.0.0 Index]