Did somebody warn against that? It looks pretty close to how I create my test suites.
On Wed, Aug 10, 2016 at 5:26 PM, <[email protected]> wrote: > Thanks for your time! > > I'm not sure I understand, but I want to. My current plan is to store my > grammar in one or more files. For each test battery, I'll load the entire > grammar, and each test will specify its top level rule and provide strings > that it expects to match or not. Something like the following. > > # read in the grammar > my $rules; > { ... } # fill $rules with the file contents > > # test 0: identifier > if (1) { > my $cur_rules = ":start ::= identifier\n" + $rules; > my $grammar = ...; > ... > } > > # test 1: operator > if (1) { > my $cur_rules = ":start ::= operator\n" + $rules; > my $grammar = ...; > ... > } > > > This sounds what you warn against, but it feels like I'll end up with a > good test suite. Can you help me understand? > > - Ryan > > On Wednesday, August 10, 2016 at 4:30:39 PM UTC-6, Ron Savage wrote: > >> Yes, manipulate the string. But now, try very hard not to keep >> manipulating the same string, but save lots of versions of your work in >> different files, and you'll end up with a test suite. >> > -- > You received this message because you are subscribed to the Google Groups > "marpa parser" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
