Shakespeareプログラミング言語を試してみたかったので、ここからダウンロードして、を使用してMakefileを実行しましたcd spl-1.2.1
Make
。
のコンパイルはspl2c
、いくつかの警告とともに実行されます。
scanner.l:600: warning, rule cannot be matched
<stdout>:5808: warning: ‘yyunput’ defined but not used
そして、すべての例をコンパイルしようとすると、すべてがうまくいきません。
../spl/bin/spl2c < fibonacci.spl > fibonacci.c
Warning at line 19: equality expected
Warning at line 28: equality expected
Warning at line 30: comment expected
Warning at line 30: comment expected
Warning at line 30: comment expected
Warning at line 30: comment expected
Warning at line 32: comment expected
Warning at line 32: comment expected
Warning at line 32: comment expected
Warning at line 32: comment expected
Warning at line 34: comment expected
Warning at line 34: comment expected
Warning at line 34: comment expected
Warning at line 34: comment expected
Warning at line 36: comment expected
Warning at line 36: comment expected
Warning at line 37: comment expected
Warning at line 37: comment expected
Warning at line 37: comment expected
Warning at line 37: colon expected
Warning at line 40: equality expected
Warning at line 51: comment expected
Warning at line 51: comment expected
Warning at line 51: comment expected
Warning at line 51: comment expected
Warning at line 51: comment expected
Warning at line 51: colon expected
Error at line 59: 'act [roman number]' or 'scene [roman number]' expected
1 errors and 27 warnings found. No code output.
誰かがこれを修正するための正しい方向に私を向けることができますか?私の元のプロジェクトは、デバッグコンパイラに頼るのではなく、splを学習する予定でした(実際には、最終的には独自のコンパイラを作成したいのですが、今は最初のプロジェクトを使い続けたいと思います)。
、、、、を実行してOS X 10.6.2
います。gcc version 4.2.1 (Apple Inc. build 5646) (dot 1)
flex 2.5.35
bison (GNU Bison) 2.3
編集:gotoを必要としない単純なプログラム(例:hello.spl)の場合、最初のACT I /SCENEIを除くすべてのACT/SCENE行を削除することで問題を回避できます。