Re: [問題] 如何學寫COMPILER? [純拋磚引玉]

看板Programming作者 ( )時間18年前 (2007/04/20 05:29), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串18/38 (看更多)
※ 引述《halajohn (Wei Hu)》之銘言: : ※ 引述《tinlans ( )》之銘言: : : 所以一堆人以為 C++ syntax 複雜到 LR(2) 才能解, : : 結果居然有人證明出來 LL(1) 就能搞定了, : 請問這個的論文來源在哪裡? : 我想看看 這個年代有點久不好找, 用 John Lilley 搭一些有的沒的字當 keyword 找, 可能還能找到一點點東西, 我印象中它不屬於論文類。 : : 這時 parser generator 的劣勢就會出現了, : : 手工或利用 library 製成的 parser 有辦法偶爾偷作弊往前看幾個 token, : : 但 parser generator 就比較難做到這種彈性, : : 因此會對 lookahead 的 token 數有相當硬性的限制。 : no, 好一點的 parser generator 都可以動態放寬 lookahead 數目的限制. 可能我不用 parser generator 太久了沒注意到? yacc 跟 bison 確定是沒有這個能力, 不過它們確實也稱不上是「好一點」的 generator。 : : 在 2005 年之後, : : 這個理論早已成為事實, : : 除了 export 的特性之外。 : 請問目前哪些 compiler 100% fully support C++? 目前市面上敢講 100% 的我只看過 Comeau C/C++, 他們連 export 在內都有 support, 其它 compilers 大都只敢號稱除了 export 外全 support, 當然 bug 是一定會有的。 -- Name: Tseng, Ling-hua E-mail Address: uranus@it.muds.net School: National Tsing Hua University Department: Computer Science Interesting: C++, Compiler, PL/PD, OS, VM, Large-scale software design Researching: Software pipelining for VLIW architectures Homepage: https://it.muds.net/~uranus -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.230.226.51
文章代碼(AID): #169zyinu (Programming)
討論串 (同標題文章)
文章代碼(AID): #169zyinu (Programming)