progs/matcher/re1.sc
changeset 941 66adcae6c762
parent 929 9541e073f2ed
child 961 c0600f8b6427
equal deleted inserted replaced
940:46eee459a999 941:66adcae6c762
    54   nullable(ders(s.toList, r))
    54   nullable(ders(s.toList, r))
    55 
    55 
    56 
    56 
    57 // some examples from the homework
    57 // some examples from the homework
    58 
    58 
    59 val r = SEQ(CHAR('b'), CHAR('c'))
    59 val r = SEQ(CHAR('a'), CHAR('c'))
    60 matcher(r, "ac")
    60 matcher(r, "ac")
    61 
    61 
    62 val r1 = STAR(ALT(SEQ(CHAR('a'), CHAR('b')), CHAR('b')))
    62 val r1 = STAR(ALT(SEQ(CHAR('a'), CHAR('b')), CHAR('b')))
    63 der('a', r)
    63 der('a', r)
    64 der('b', r)
    64 der('b', r)