請問用ftp指令進入網站後,什麼指令可以刪除資料 - 圍棋
By Delia
at 2009-01-15T23:34
at 2009-01-15T23:34
Table of Contents
※ [本文轉錄自 LinuxDev 看板]
作者: dozer (piercing buddy?) 看板: LinuxDev
標題: Re: [問題] 引用直譯語言的parser?
時間: Fri Jan 9 16:22:21 2009
※ 引述《dozer (rezod)》之銘言:
: 比如說 我想要在一個類似resource file裡面給expression
: e.g.
: [resource.rc]
: alpha = foo
: beta = alpha*10+300
: EOF
: 我希望我的程式在讀這個input的時候
: 可以evaluate這個expression
: 也就是beta最後應該是 'foo*10+300' 計算後的結果
: 但是如果要自己寫parser又覺得像是重新發明輪子
: 有沒有人知道怎麼把python之類的直譯語言
: 的parser直接拿來用呀? 還是這樣其實會更麻煩?
自己回。
現在是用embedded Python,非常的簡單好用!!!
Python的C API非常完整(如果你用的是C Python,整個interpreter
本來就是用C寫的,對C的支援度當然好)之前有試著自己用Flex/Bison
寫parser,雖然寫的出來,但改起來真的很花時間;加上本身沒有實做
程式語言直譯器/編譯器的經驗,幾乎是矇著眼睛在做。直接引用現成的
interpreter的好處就是彈性大,好學,而且extend起來也真的容易
很多(我現在整個app是C/Python混著寫,超方便!)
有興趣可以參考官方文件
Python/C API Reference Manual
http://docs.python.org/c-api/index.html
Extending and Embedding the Python Interpreter
http://docs.python.org/extending/index.html
--
Westheimer's Discovery:
A couple of months in the laboratory can frequently save a
couple of hours in the library.
--
作者: dozer (piercing buddy?) 看板: LinuxDev
標題: Re: [問題] 引用直譯語言的parser?
時間: Fri Jan 9 16:22:21 2009
※ 引述《dozer (rezod)》之銘言:
: 比如說 我想要在一個類似resource file裡面給expression
: e.g.
: [resource.rc]
: alpha = foo
: beta = alpha*10+300
: EOF
: 我希望我的程式在讀這個input的時候
: 可以evaluate這個expression
: 也就是beta最後應該是 'foo*10+300' 計算後的結果
: 但是如果要自己寫parser又覺得像是重新發明輪子
: 有沒有人知道怎麼把python之類的直譯語言
: 的parser直接拿來用呀? 還是這樣其實會更麻煩?
自己回。
現在是用embedded Python,非常的簡單好用!!!
Python的C API非常完整(如果你用的是C Python,整個interpreter
本來就是用C寫的,對C的支援度當然好)之前有試著自己用Flex/Bison
寫parser,雖然寫的出來,但改起來真的很花時間;加上本身沒有實做
程式語言直譯器/編譯器的經驗,幾乎是矇著眼睛在做。直接引用現成的
interpreter的好處就是彈性大,好學,而且extend起來也真的容易
很多(我現在整個app是C/Python混著寫,超方便!)
有興趣可以參考官方文件
Python/C API Reference Manual
http://docs.python.org/c-api/index.html
Extending and Embedding the Python Interpreter
http://docs.python.org/extending/index.html
--
Westheimer's Discovery:
A couple of months in the laboratory can frequently save a
couple of hours in the library.
--
Tags:
圍棋
All Comments
By Tracy
at 2009-01-19T17:24
at 2009-01-19T17:24
By Emma
at 2009-01-24T09:32
at 2009-01-24T09:32
By Dora
at 2009-01-28T13:09
at 2009-01-28T13:09
By Quanna
at 2009-02-02T03:24
at 2009-02-02T03:24
By Emma
at 2009-02-05T23:12
at 2009-02-05T23:12
By Skylar DavisLinda
at 2009-02-10T20:13
at 2009-02-10T20:13
By Ethan
at 2009-02-15T10:05
at 2009-02-15T10:05
By Yuri
at 2009-02-18T07:26
at 2009-02-18T07:26
By Tracy
at 2009-02-19T21:44
at 2009-02-19T21:44
By Ula
at 2009-02-22T10:30
at 2009-02-22T10:30
By Tristan Cohan
at 2009-02-27T01:46
at 2009-02-27T01:46
By Hardy
at 2009-03-03T05:28
at 2009-03-03T05:28
By Zenobia
at 2009-03-07T17:07
at 2009-03-07T17:07
Related Posts
台灣棋院第二屆愛心盃
By Hedda
at 2009-01-15T21:36
at 2009-01-15T21:36
寒假快到了
By Ida
at 2009-01-12T20:48
at 2009-01-12T20:48
中華職棋盃業餘公開賽
By Eartha
at 2009-01-11T13:02
at 2009-01-11T13:02
中華職棋盃業餘公開賽
By Isabella
at 2009-01-11T10:57
at 2009-01-11T10:57
中華職棋盃業餘公開賽
By Caitlin
at 2009-01-11T09:26
at 2009-01-11T09:26