Skip to content

xegaBNF

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

v1.0.0.5 · Apr 17, 2025 · MIT + file LICENSE

Description

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>) A preprocessor for macros which expand to standard BNF is included. The grammar compiler is an extension of the APL2 implementation in Geyer-Schulz, Andreas (1997, ISBN:978-3-7908-0830-X).

Downloads

CRAN

568

Last 30 days

6481st

1.8K

Last 90 days

7.2K

Last year

Trend: -3.2% (30d vs prior 30d)

r2u CRAN

0

Last 30 days

24

Last 90 days

95

Last year

Trend: -100% (30d vs prior 30d)

autoCRAN

5

Last 7 days

6

Last 30 days

0

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 8, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 7, 2026
ERROR r-devel-linux-x86_64-debian-gcc

Rd files

cannot open the connection
cannot open the connection
cannot open the connection
cannot open the connection
cannot open the connection
cannot open the connection
cannot open the connection
cannot open the connection
cannot open the connection
cannot 
...[truncated]...
ndGrid.Rd’, ‘expandRules.Rd’, ‘findNextRuleForExpansion.Rd’, ‘finiteRulesOfG.Rd’, ‘isNonTerminal.Rd’, ‘makeProductionTable.Rd’, ‘makeRule.Rd’, ‘makeStartSymbol.Rd’, ‘makeSymbolTable.Rd’, ‘nonTerminalsOfG.Rd’, ‘pastePart.Rd’, ‘preBNF.Rd’, ‘printPT.Rd’
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Code intelligence has not been computed for this package yet.

Code

Structure

Lines of code

3,034

Files

53

Compiled share

0%

Has compiled src

No

Language breakdown

R 1,339 (44.1%)Tests 130 (4.3%)Docs 1,565 (51.6%)

API

Exported functions

36

Internal functions

1

Recent export changes

v1.0.0.5+20 allTerminal, bindKvariables, booleanGrammarK +17 more
v1.0.0.0+16 booleanGrammar, compileBNF, compileShortPT +13 more

Testing & CI

Has tests

Yes

Test-to-code ratio

0.10

testthat edition

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

0%

Unsafe pattern score

3

Dep constraint coverage

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

System requirements

C++ standard

License

MIT + file LICENSE

License flags

SPDX valid, OSI approved

History

Versions

2

First release

2024-02-05

Latest release

2025-04-17

Avg cadence

437 days

Cold removal rate

Dep drift

0

LOC over versions

v1.0.0.0: 1,737 LOCv1.0.0.5: 3,034 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (4)

Dependency Network

Dependencies Reverse dependencies xega xegaDerivationTrees xegaGeGene xegaGpGene xegaBNF

Version History

3 tracked
new 1.0.0.5 Mar 10, 2026
updated 1.0.0.5 ← 1.0.0.0 diff Apr 16, 2025
new 1.0.0.0 Feb 4, 2024