Saturday, January 17, 2009
百萬大挑戰
第一次看reviewer為我嘔心瀝血的論文所給的comments,原本的心情是既期待又緊張,後來竟然噗吃的笑了…因為reviewer說:The modified Apriori is too weak。(啊...人家Apriori是有那麼weak嗎...XD)
小聲說,就是因為他weak,才要跟它比嘛 :p
Wednesday, January 14, 2009
ANTLR (3) - Simple Lexer Example
下面是一個簡單的Lexer例子,用來判讀字串中的數字和英文字母。
simple.g
接著我們一行一行解釋這段程式的意義。
simple.g
class SimpleLexer extends Lexer;
options { k=1; filter=true; }
ALPHA : ('a'..'z'|'A'..'Z')+
{ System.out.println("Found alpha: "+ getText()); }
;
NUMERIC : ('0'..'9')+
{ System.out.println("Found numeric: "+ getText()); }
;
EXIT : '.'
{ System.exit(0); }
;
接著我們一行一行解釋這段程式的意義。
Monday, January 12, 2009
Saturday, January 3, 2009
Friday, January 2, 2009
Subscribe to:
Posts (Atom)