I wanted to experiment with the Shakespeare programming language, so I downloaded it from here and executed the Makefile using cd spl-1.2.1
Make
.
The compilation of spl2c
executes with a couple warnings:
scanner.l:600: warning, rule cannot be matched
<stdout>:5808: warning: ‘yyunput’ defined but not used
And then when it attempts to compile all the examples everything goes haywire:
../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.
Can anybody point me in the right direction for fixing this? My original project was going to be learning spl, not leaning to debug compilers (I'd actually like to write my own compiler eventually, but I'd prefer to stick with my initial project for now).
I'm running OS X 10.6.2
, gcc version 4.2.1 (Apple Inc. build 5646) (dot 1)
, flex 2.5.35
, and bison (GNU Bison) 2.3
.
EDIT: For simple programs not requiring gotos (e.g. hello.spl) you can get around the issue by deleting all ACT/SCENE lines except the first ACT I/SCENE I.