makeSymbolTable: Build a symbol table from a character string which contains a...

View source: R/BNF.R

makeSymbolTableR Documentation

Build a symbol table from a character string which contains a BNF.

Description

makeSymbolTable() extracts all terminal and non-terminal symbols from a BNF and builds a data frame with the columns Symbols (string), NonTerminal (0 or 1), and SymbolId (int). The symbol "NotExpanded" is added which codes depth violations of a derivation tree.

Usage

makeSymbolTable(BNF)

Arguments

BNF

A character string with the BNF.

Value

A data frame with the columns Symbols, NonTerminal, and SymbolID.

Examples

makeSymbolTable(booleanGrammar()$BNF)


xegaBNF documentation built on May 29, 2024, 10:23 a.m.