id2symb: Convert a numeric identifier to a symbol.

View source: R/BNF.R

id2symbR Documentation

Convert a numeric identifier to a symbol.

Description

id2symb() converts a numeric id to a symbol.

Usage

id2symb(Id, ST)

Arguments

Id

A numeric identifier (integer).

ST

A symbol table.

Value

  • A symbol string if the identifier exists or

  • an empty character string (character(0)) if the identifier does not exist.

See Also

Other Utility Functions: derive(), isNonTerminal(), isTerminal(), rules(), symb2id()

Examples

g<-compileBNF(booleanGrammar())
id2symb(1, g$ST)
id2symb(2, g$ST)
id2symb(5, g$ST)
id2symb(12, g$ST)
id2symb(15, g$ST)
identical(id2symb(15, g$ST), character(0))


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

Related to id2symb in xegaBNF...