
大概想一下要怎麼把上面的data轉換成下面的格式?先前的Lexer可以幫我們辨識文件裡的組成元件,分辨什麼是數字,分辨什麼是字母。但就原始data來看,我們還必須讓程式知道每一筆資料,到底以什麼樣的順序包含了這些小元件。換句話說,我們必需分析一下這份資料檔案的結構,是如何由這些元件組成的。要分析一份資料,以top-down的思考方式為佳。
![]() | The Great Kitchen Escape http://www.thegreatescapegames.com/01.html |
![]() | The Great Living Room Escape http://www.thegreatescapegames.com/02.html |
![]() | The Great Bathroom Escape http://www.thegreatescapegames.com/03.html |
![]() | The Great Basement Escape http://www.thegreatescapegames.com/04.html |
![]() | The Great Bedroom Escape http://www.thegreatescapegames.com/05.html |