मैं Shakespeare programming language के साथ प्रयोग करना चाहता था में 10.6 परिणाम मैक ओएस एक्स पर शेक्सपियर प्रोग्रामिंग भाषा अनुवादक spl2c को क्रियान्वित करने, इसलिए मैं here से डाउनलोड और cd spl-1.2.1
Make
का उपयोग कर Makefile मार डाला।संकलन और चेतावनी/त्रुटियों
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.
किसी को भी सही दिशा में मुझे बात कर सकते हैं इसे ठीक करने के लिए? मेरा मूल प्रोजेक्ट स्प्लिगर्स डीबग करने के लिए झुकाव नहीं कर रहा था, मैं वास्तव में अपना खुद का कंपाइलर लिखना चाहता हूं, लेकिन मैं अब के लिए अपनी प्रारंभिक परियोजना के साथ रहना पसंद करूंगा)।
मैं 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
चला रहा हूं।
संपादित करें: सरल कार्यक्रमों के लिए gotos की जरूरत नहीं है (जैसे hello.spl) आप कर सकते हैं पहले अधिनियम मैं/दृश्य आई
डिट्टो-एथ। धन्यवाद केली। Marlowe OpenCOBOL, COBILL में एम्बेडेड किया गया है। –
नेक्रोमैंसी की बात करते हुए: वास्तव में, यहां प्रस्तुत निदान गलत है। मूल नियमित अभिव्यक्ति के साथ ही सुझाए गए प्रतिस्थापन के साथ काम करेगा। हालांकि, लगभग एक दशक के लिए फ्लेक्स में एक बग रहा है जिसमें सिंगल-कैरेक्टर केस-असंवेदनशील तर्कों के साथ ब्रेसिड दोहराने के उपयोग शामिल हैं। मैंने इसे https://github.com/westes/flex/issues/193 पर रिपोर्ट किया – rici