File tree Expand file tree Collapse file tree 2 files changed +17
-15
lines changed Expand file tree Collapse file tree 2 files changed +17
-15
lines changed Original file line number Diff line number Diff line change 1212
1313<!-- See create_labs.md for how to create your own lab! --> 
1414
15- <!-- Sample expected answer --> 
16- < script  id ="expected0 " type ="plain/text "> cat </ script > 
17- 
18- <!-- Full pattern of correct answer --> 
19- < script  id ="correct0 " type ="plain/text "> cat </ script > 
20- 
21- <!-- Sample expected answer --> 
22- < script  id ="expected1 " type ="plain/text "> A + BB * </ script > 
23- 
24- <!-- Full pattern of correct answer --> 
25- < script  id ="correct1 " type ="plain/text "> 
26- A ( \+| A \*) 
27- B ( \+| B \*) 
28- </ script > 
29- 
3015</ head > 
3116< body > 
3217<!-- For GitHub Pages formatting: --> 
Original file line number Diff line number Diff line change @@ -48,6 +48,23 @@ info =
4848      text : "Use \"B+\" to indicate \"one or more B\". You could also write \"BB*\"." 
4949    } 
5050  ] , 
51+   expected : [ 
52+     'cat' , 
53+     'A+BB*' 
54+   ] , 
55+   correct : [ 
56+     'cat' , 
57+     // Spaces are removed by the preprocessor for this lab. 
58+     String . raw `A(\+|A\*) B(\+|B\*)` 
59+   ] , 
60+   successes : [ 
61+     [  'cat' ,  'A+B+'  ] , 
62+     [  'cat' ,  'AA*BB*'  ] , 
63+   ] , 
64+   failures : [ 
65+     [  'Cat' ,  'A+B+'  ] , 
66+     [  'cat' ,  'A*B*'  ] , 
67+   ] , 
5168  preprocessing : [ 
5269    [ 
5370      "\\s*" , 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments