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