Skip to content

matthewd673/Giraffe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

113 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Giraffe

Giraffe is a scanner and parser generator, it can generate human-readable recursive-descent parsers for strong-LL(1) grammars. Giraffe currently generates C# code but is designed to support arbitrary target languages.

Examples

Giraffe's frontend is generated by Giraffe! See grammar.txt for an example of a practical grammar definition. Additional examples are in the Examples directory.

Features

  • Simple syntax for grammar definitions
  • Ignored terminals, discarded symbols, and inline-expanded non-terminals
  • Output in the form of a human-readable recursive-descent parser
  • Small, convenient runtime including Visitor interface
  • Basic grammar hygenie checks (e.g. non-productive rules)
  • Support for sets of start symbols (and, therefore, the empty language)

Future Work

  • Automatic passes to convert grammars to strong-LL(1) (when possible)
  • Support for extended-CF operators in rule definitions
  • Semantic actions
  • Configurable display names for symbols
  • Improved error reporting in the Giraffe CLI
  • Custom exceptions in generated code

About

LL(1) recursive descent parser generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages