- Parrot 教程
- Parrot - 主頁
- Parrot - 概述
- Parrot - 安裝
- Parrot - 指令
- Parrot - 垃圾回收
- Parrot - 資料型別
- Parrot - 暫存器
- Parrot - 運算
- Parrot - 分支
- Parrot 示例
- Parrot - 示例
- Parrot 資源
- Parrot - 快速指南
- Parrot - 有用資源
Parrot - 安裝
在開始之前,讓我們下載一份 Parrot 的最新版本並將其安裝在我們的機器上。
Parrot 下載連結提供在Parrot CVS Snapshot中。下載 Parrot 的最新版本並按照以下步驟進行安裝
解壓縮並釋放下載的檔案。
確保您的機器上已安裝 Perl 5。
現在進行以下操作
% cd parrot % perl Configure.pl Parrot Configure Copyright (C) 2001 Yet Another Society Since you're running this script, you obviously have Perl 5 -- I'll be pulling some defaults from its configuration. ...
接下來,它將詢問你一系列有關本地配置的問題;你幾乎每次都可以按下 return/enter。
最後,它會要求你鍵入 - make test_prog,而 Parrot 將成功構建測試直譯器。
現在,你應該執行一些測試;因此,鍵入 'make test',你應該會看到類似以下內容的讀數
perl t/harness t/op/basic.....ok,1/2 skipped:label constants unimplemented in assembler t/op/string....ok, 1/4 skipped: I'm unable to write it! All tests successful, 2 subtests skipped. Files=2, Tests=6,......
當你讀到這些內容時,可能還有更多測試,並且一些已跳過的測試可能不會跳過,但確保沒有一個測試失敗!
一旦安裝了 Parrot 可執行檔案,你就可以在 Parrot 'Examples' 部分中檢視給出的各種型別的示例。你還可以檢視 parrot 儲存庫中的 examples 目錄。
廣告