equal
deleted
inserted
replaced
40 case c::s => SEQ(CHAR(c), charlist2rexp(s)) |
40 case c::s => SEQ(CHAR(c), charlist2rexp(s)) |
41 } |
41 } |
42 implicit def string2rexp(s : String) : Rexp = |
42 implicit def string2rexp(s : String) : Rexp = |
43 charlist2rexp(s.toList) |
43 charlist2rexp(s.toList) |
44 |
44 |
45 implicit def RexpOps(r: Rexp) = new { |
45 extension (r: Rexp) { |
46 def | (s: Rexp) = ALT(r, s) |
46 def | (s: Rexp) = ALT(r, s) |
47 def % = STAR(r) |
47 def % = STAR(r) |
48 def ~ (s: Rexp) = SEQ(r, s) |
48 def ~ (s: Rexp) = SEQ(r, s) |
49 } |
49 } |
50 |
50 |
51 implicit def stringOps(s: String) = new { |
51 extension (s: String) { |
52 def | (r: Rexp) = ALT(s, r) |
52 def | (r: Rexp) = ALT(s, r) |
53 def | (r: String) = ALT(s, r) |
53 def | (r: String) = ALT(s, r) |
54 def % = STAR(s) |
54 def % = STAR(s) |
55 def ~ (r: Rexp) = SEQ(s, r) |
55 def ~ (r: Rexp) = SEQ(s, r) |
56 def ~ (r: String) = SEQ(s, r) |
56 def ~ (r: String) = SEQ(s, r) |