re1.scala
changeset 85 1a4065f965fb
parent 59 b64e876832cc
--- a/re1.scala	Wed Nov 28 08:28:26 2012 +0000
+++ b/re1.scala	Mon Dec 03 15:35:27 2012 +0000
@@ -49,6 +49,10 @@
 // main matcher function
 def matcher(r: Rexp, s: String) : Boolean = nullable(ders(s.toList, r))
 
+//example
+//val r = STAR(ALT(SEQ(CHAR('a'), CHAR('b')), CHAR('b')))
+//der('b', r)
+//der('b', r)
 
 //one or zero
 def OPT(r: Rexp) = ALT(r, EMPTY)