score:8

Accepted answer

Scala syntax allows method names to use special characters such as +, * and :, and to use them as infix operators, which effectively allows operator overloading as well as the creation of new operators. This can make code more concise, but can also make it difficult to figure out what a particular Scala operator does, because you can't effectively do a Google search for \: or ++ or ~ or :: or pretty much any Scala operator method name. To make it even more difficult, an implicit conversion may be applied to one of the operands, so the class providing the operator method may not be the same as the declared class of the operand in the source code.

UPDATE: Use Scalex

score:1

It's a combinatory parser

Live example

This is a assignement I had in a compiler course at the university it simplify an algebraic expression

( x + 0 ) - ( 1 * --x )
x + - ( 1 * --x )
x + - ( --x )
x + - ( x )
0

Building a sql table is something similar

Th first part

get[Long]("id") ~
get[String]("label")

parse two rows

and the map case give you the parsed result

Take a look at that and that

I remember this is one of the first things I saw when I started learning scala/play. I suggest you take a good break and read the whole book ( programming in scala 2nd edition ) and do this online class

You should also consider lift

score:5

Scalex, can do all those ascii and unicode character searches (also discusssed pretty well in Horstmann's "Impatient" book

http://scalex.org/?q=~

http://scalex.org/?q=%E2%8A%9B

http://www.artima.com/pins1ed/book-index.html#indexanchor


Related Query

More Query from same tag