makeProductionTable {xegaBNF} | R Documentation |
Produces a production table.
Description
makeProductionTable()
produces a production table
from a specification of a BNF.
Warning: No error checking implemented.
Usage
makeProductionTable(BNF, ST)
Arguments
BNF |
A character string with the BNF. |
ST |
A symbol table. |
Value
A production table is a named list with elements
$LHS
and $RHS
:
The left-hand side
LHS
of non-terminal identifiers.The right-hand side
RHS
is represented as a vector of vectors of numerical identifiers.
The non-terminal identifier LHS[i]
derives into RHS[i]
.
Examples
a<-booleanGrammar()$BNF
ST<-makeSymbolTable(a)
makeProductionTable(a,ST)
[Package xegaBNF version 1.0.0.0 Index]