Bullwinkle
Bullwinkle copied to clipboard
An on-the-fly parser for BNF grammars
tl;dr Error messages from parsing would need some elaboration about where the error occurred. I'm parsing from command line with a grammar file and an input string from file and...
I'm trying to use Bullwinkle to parse the BNF for Java. So I grabbed the code, downloaded the Java BNF from here: https://cs.au.dk/~amoeller/RegAut/JavaBNF.html. Did some editing to clean things up...
In `BnfRule.parseRule(String)`, split parsing of LHS and RHS in two methods. Then, use RHS parsing in BnfParser.addCaseToRule to allow user to add anything to a rule, not just a NonTerminalToken.
This could be used to check grammar coverage when running tests that use the parser.
To avoid try/catch blocks everywhere
So far, you can write ``` := ^regex; ``` but not ``` := literal | ^regex; ``` Suggested syntax: introduce the `$` to mark the end of the regex, so...
Existing command line parsers (including Bullwinkle's `CliParser`) offer a restricted way of defining command line arguments: either `-parameter` or `-parameter value`. Create a new parser where arguments are defined with...