rndsubk {xegaDerivationTrees}R Documentation

Transforms a non-terminal symbol into a 1-level derivation tree for a given k.

Description

rndsubk() expands a non-terminal by a derivation specified by k and returns a 1-level derivation tree.

Usage

rndsubk(sym, k, PT)

Arguments

sym

Non-terminal symbol.

k

Codon (An integer).

PT

Production table.

Value

1-level derivation tree.

See Also

Other Generate Derivation Tree: generateDerivationTree(), randomDerivationTree(), rndsub(), substituteSymbol()

Examples

g<-compileBNF(booleanGrammar())
rndsubk(g$Start, 207, g$PT)


[Package xegaDerivationTrees version 1.0.0.0 Index]