Skip to content

Generate random productions of arbitrary EBNF grammars.

License

Notifications You must be signed in to change notification settings

pennello/go_rebnf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rebnf is a tool to generate random productions of arbitrary EBNF grammars.

Documentation

Installation

go get chrispennello.com/go/rebnf/cmd/rebnf

Tools

The tools directory contains a Python tool for fetching Unicode character ranges from fileformat.info and consolidating them into EBNF alternative range expressions, suitable for consumption by rebnf.

Test Languages

The testlang directory contains grammars for testing and experimentation. In particular, testlang/go contains a snapshot of the Go Programming Language Specification and an extracted grammar, including one in which the Unicode productions have been defined.

Future Work

  • More reliable termination soon after recursion depth limit exceeded. More reliable terminal path analysis. Graph analysis of grammar productions.
  • Non-uniform production weighting.
  • Mode to prefer non-weird characters (e.g., put it in "ASCII mode").

About

Generate random productions of arbitrary EBNF grammars.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • HTML 90.3%
  • Go 9.7%