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 81f4fd25e7
lex double-quoted strings with Racket lexer (#32)
Follow up on an idea in #31: use the Racket lexer to lex double-quoted strings in a grammar, thereby giving them all the semantics of Racket strings, and preventing any corner cases. This solution can’t be extended to single-quoted strings, however, because even with readtable tomfoolery to recognize a single quote as an opening delimiter for a string, the string still needs to be closed with a double quote. (I don’t know why this should be so, but it is the documented behavior.) Therefore single-quoted strings still are subject to the homegrown lexing solution and the flaws therein. Still, I don’t see that single-quoted strings have ever been a documented feature of brag (or its predecessor ragg). Perhaps they could be dropped altogether. For now, this solution is satisfying, because double-quoted strings are the dominant notation, and this PR will make them as good as they can be.
2 years ago
.github/workflows enlarge test matrix with Racket 8 2 years ago
brag scribble: fix indentation in file examples (#27) 3 years ago
brag-lib lex double-quoted strings with Racket lexer (#32) 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.