dabeaz / sly

Sly Lex Yacc
Other
816 stars 107 forks source link

Allow users to specify a new start rule after having initialized their Parser class #101

Open BlakeCThompson opened 1 year ago

BlakeCThompson commented 1 year ago

Currently, in order to test subcomponents of a grammar, you must manually change the start attribute of the user defined parser class, and then rerun any tests using text from the subset.

With the changes in this PR, users can specify a "start_override" string to rebuild the grammar with the new start value. This allows developers the ease of testing subsets of the grammar without having to create several versions of their parser, or editing their parser before testing each sub-rule of the grammar.

Unit tests passing