Re: [請益] 有 Compiler 達人嗎? Orz
看板Programming作者itchy (Lucky we love you.)時間17年前 (2008/06/27 20:42)推噓0(0推 0噓 0→)留言0則, 0人參與討論串2/3 (看更多)
※ 引述《itchy (Lucky we love you.)》之銘言:
: 標題: [請益] 有 Compiler 達人嗎? Orz
: 時間: Fri Jun 27 19:20:50 2008
:
: 這個問題我一直想不透. 痛苦極了啊~~ Orz (抓頭)
:
: 問題如下:
:
: Assume G is an LR(0) grammar.
: Let F --> ε be a production that is not currently in G.
: Assume F is a nonterminal that is already in G.
: Let G* be the new grammar obtained from G by inserting the new production
: F --> ε. Describe the possible impacts (in the areas of conflicts,
: expressive power and parsing complexities) of adding this new production.
:
:
: --
: ※ 發信站: 批踢踢實業坊(ptt.cc)
: ◆ From: 218.160.33.61
: → MOONRAKER:阿又不是一定會加在這種沒妨礙的地方 59.115.223.48 06/27 20:14
: → MOONRAKER:有的地方會有影響,別的地方則否 59.115.223.48 06/27 20:15
: → MOONRAKER:各有不同,你應該分項討論,這就是重點 59.115.223.48 06/27 20:15
感謝回應~
不過還是不太瞭耶 囧
ε加在哪裡不都一樣嗎?
e.g.
E' --> E
E --> E + T
T --> T * F | ε
F --> (E) | id
或
E' --> E
E --> E + T
T --> T * F
F --> (E) | id | ε
是我漏掉什麼地方嗎? @@"
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.160.33.61
※ 編輯: itchy 來自: 218.160.33.61 (06/27 20:51)
討論串 (同標題文章)