xegaBNF: Compile a Backus-Naur Form Specification into an R Grammar Object

Translates a BNF (Backus-Naur Form) specification of a context-free language into an R grammar object which consists of the start symbol, the symbol table, the production table, and a short production table. The short production table is non-recursive. The grammar object contains the file name from which it was generated (without a path). In addition, it provides functions to determine the type of a symbol (isTerminal() and isNonterminal()) and functions to access the production table (rules() and derives()). For the BNF specification, see Backus, John et al. (1962) "Revised Report on the Algorithmic Language ALGOL 60". (ALGOL60 standards page <http://www.algol60.org/2standards.htm>, html-edition <https://www.masswerk.at/algol60/report.htm>) The grammar compiler is based on the APL2 implementation in Geyer-Schulz, Andreas (1997, ISBN:978-3-7908-0830-X).

Getting started

Package details

AuthorAndreas Geyer-Schulz [aut, cre] (<https://orcid.org/0009-0000-5237-3579>)
MaintainerAndreas Geyer-Schulz <Andreas.Geyer-Schulz@kit.edu>
LicenseMIT + file LICENSE
Version1.0.0.0
URL <https://github.com/ageyerschulz/xegaBNF>
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("xegaBNF")

Try the xegaBNF package in your browser

Any scripts or data that you put into this service are public.

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