| rules | R Documentation |
rules() finds
all applicable production rules
for a non-terminal identifier.
rules(Id, LHS)
Id |
A numerical identifier. |
LHS |
The left-hand side of a production table. |
A vector of indices of all applicable rules in the production table or
an empty integer (integer(0)),
if the numerical identifier is not found
in the left-hand side of the production table.
Other Utility Functions:
derive(),
id2symb(),
isNonTerminal(),
isTerminal(),
symb2id()
a<-booleanGrammar()$BNF
ST<-makeSymbolTable(a)
PT<-makeProductionTable(a,ST)
rules(5, PT$LHS)
rules(8, PT$LHS)
rules(9, PT$LHS)
rules(1, PT$LHS)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.