equal
deleted
inserted
replaced
38 implicit def string2rexp(s : String) : Rexp = |
38 implicit def string2rexp(s : String) : Rexp = |
39 charlist2rexp(s.toList) |
39 charlist2rexp(s.toList) |
40 |
40 |
41 val HELLO : Rexp = "hello" |
41 val HELLO : Rexp = "hello" |
42 |
42 |
43 implicit def RexpOps(r: Rexp) = new { |
43 extension (r: Rexp) { |
44 def | (s: Rexp) = ALT(r, s) |
44 def | (s: Rexp) = ALT(r, s) |
45 def % = STAR(r) |
45 def % = STAR(r) |
46 def ~ (s: Rexp) = SEQ(r, s) |
46 def ~ (s: Rexp) = SEQ(r, s) |
47 } |
47 } |
48 |
48 |
49 implicit def stringOps(s: String) = new { |
49 extension (s: String) { |
50 def | (r: Rexp) = ALT(s, r) |
50 def | (r: Rexp) = ALT(s, r) |
51 def | (r: String) = ALT(s, r) |
51 def | (r: String) = ALT(s, r) |
52 def % = STAR(s) |
52 def % = STAR(s) |
53 def ~ (r: Rexp) = SEQ(s, r) |
53 def ~ (r: Rexp) = SEQ(s, r) |
54 def ~ (r: String) = SEQ(s, r) |
54 def ~ (r: String) = SEQ(s, r) |