Forum

Scala-fr » Forums
You are not logged in.
Posting as Guest.
274 Registered users.
User profile for maxme
(Send email)
Name: Maxime Biais
Alias: maxme
Forum Status: Administrator
Posts:1
Web site:http://www.biais.org
Gravatar:
AIM:
Jabber / Google Talk:max@jabber.org
Yahoo IM:
Description:
Recent posts:
String in table
Posted at: 13-11-2009 10:35:28
Hello,

Désolé de répondre si tard. Pour faire simple et « comme Java », tu as des méthodes splits sur les « RichString ». notamment une méthode split qui prend en param§tre une regex et qui te permet d’ecrire ça par exemple :

"2/3+34*4+5".split("\*|/|\+|-")

Si tu souhaites faire un lexer un peu plus complexe, je te conseil de jeter un oeil à StdLexical : http://www.scala-lang.org/docu/files/api/scala/util/parsing/combinator/lexical/StdLexical.html

Bon courage,

Search for all user posts

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon