removed format error. success with print and login commands
[bkell-clj.git] / bkell.clj
blob327a79a51bfc76f350b4a511fc56bb992011423a
1 (import 'com.interrupt.bookkeeping.cc.analysis.DepthFirstAdapter) 
2 (import 'com.interrupt.bookkeeping.cc.parser.Parser) 
3 (import 'com.interrupt.bookkeeping.cc.lexer.Lexer) 
4 (import 'java.io.PushbackReader) 
5 (import 'java.io.InputStreamReader) 
8 (defn get-depth-adapter [] 
9         
10         (proxy [DepthFirstAdapter] [] 
11                 
12                 (caseALoginCommand3 [node] 
13                         (println (str "caseALoginCommand3: " node))
14                 )
15                 (caseAPrintCommand6 [node] 
16                         (println (str "caseAPrintCommand6: " node)) 
17                 )
18         )
21 (defn get-parser [] 
22         (Parser. (Lexer. (PushbackReader. (InputStreamReader. java.lang.System/in) 1024)))
25 (defn demo-bkell [handler] 
26         
27                 ;;(def tree (.parse (get-parser))) 
28                 ;;(. tree apply handler )
29                 (. (.parse (get-parser))
30                   apply handler )
33 (demo-bkell (get-depth-adapter))