Kompilowanie i uruchamianie translatora języka programowania Szekspira spl2c w systemie Mac OS X 10.6 powoduje ostrzeżenia / błędy
Chciałem poeksperymentować zSzekspirowski język programowania, więc pobrałem go ztutaj i wykonał Makefile używająccd spl-1.2.1
Make
.
Kompilacjaspl2c
wykonuje się z kilkoma ostrzeżeniami:
scanner.l:600: warning, rule cannot be matched
<stdout>:5808: warning: ‘yyunput’ defined but not used
A potem, gdy próbuje skompilować wszystkie przykłady, wszystko staje się chaotyczne:
../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.
Czy ktoś może wskazać mi właściwy kierunek naprawy? Moim pierwotnym projektem miało być uczenie się spl, a nie pochylanie się nad debugowaniem kompilatorów (w końcu chciałbym napisać własny kompilator, ale wolę na razie trzymać się mojego początkowego projektu).
biegnęOS X 10.6.2
, gcc version 4.2.1 (Apple Inc. build 5646) (dot 1)
, flex 2.5.35
, ibison (GNU Bison) 2.3
.
EDYCJA: W przypadku prostych programów niewymagających dostępu (np. Hello.spl) można obejść ten problem, usuwając wszystkie linie ACT / SCENE z wyjątkiem pierwszego ACT I / SCENE I.