Racket DSL for generating parsers from BNF grammars
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Matthew Butterick ba5c6c7ab5
support for codepoint escape sequences in strings (closes #29) (#31)
This improves the lexing of escape sequences within strings that appear in a grammar. It relies on Racket’s `read` to interpret these escape sequences rather than a hard-coded hash table. This gives strings in a grammar pretty much the same semantics as standard Racket strings, including support for octal and hex escape sequences for Unicode codepoints.

Though this passes all current tests, there are still some oddball corner cases that can be discovered by sticking together certain combinations of escape sequences (backslashes, double quotes, and codepoints). The better solution would be to peek into the input port for a double quote, and if it’s there, use the standard Racket lexer to pull out the string (this lexer already handles the weirdo cases). We can’t do this, however, because brag also supports single-quoted strings, which need to have the same semantics, and the Racket lexer won’t work with those. So I think we’re stuck with the homegrown solution (for consistency with both kinds of quotes) even at the expense of a few unresolved corner cases. Let’s leave that question for another day, as these cases haven’t surfaced in practical use thus far.
2 years ago
.github/workflows switch Travis for GH actions 3 years ago
brag scribble: fix indentation in file examples (#27) 2 years ago
brag-lib support for codepoint escape sequences in strings (closes #29) (#31) 2 years ago
.gitignore less is more 5 years ago
LICENSE.md switch to MIT license 4 years ago
README.md Update README.md 3 years ago
SUBLICENSE.md Update SUBLICENSE.md 4 years ago

README.md

brag Build Status

Racket DSL for generating parsers from BNF grammars.

Install

raco pkg install brag

Documentation

http://docs.racket-lang.org/brag/

License

MIT. See LICENSE.md

Project status

Complete. I will maintain the code but no major updates are planned.