原帖由 Cougar 于 2009-3-1 06:08 PM 发表 
之前叫我们做 Crossword puzzle,8x8 的 othello,然后 text compressor。
现在的 part 1, 给你看吧
TCS1011 Data Structures and Algorithms
Trimester 3, Session 2008/2009
Faculty of Information Tec ...
這個 project 就只是叫你分析 sql 內容並整理出 database 格式
Executing your program with the command
prompt> database menu.sql
第一點的要求就是要使用指令, 那麼你的 main() 入口函數一定要讀取所指定的 menu.sql 參數
再來循環讀取檔案每行內容後才開始進入重點分析每行開頭 SELECT, INSERT, UPDATE 和 DELETE
之後根據 sql 的基本格式找出 table 名稱, 欄位名稱和值
如果你的老師允許你們使用 regular expression 的話倒可以減少 coding 且減少分析量