![]() |
.. (לתיקייה המכילה) | |
Should we use exit(0) or exit(1) in case of an error? | |
Doesn't matter. We won't check the return values in our tests. However, you should know that in general, it's best to return a non-zero value in case of an error. Note that you can also achieve this without using exit() explicitly, just use the return value of yyparse(). See the attached link to read more. | |
קישור: Link: Ссылка: وصلة: | https://www.gnu.org/software/bison/manual/html_node/Error-Reporting.html |
The regular expressions are not working! | |
Make sure you write them as they appear in the PDF. Do not copy-paste from it! The PDF formatting uses different glyphs for some of the characters (e.g. forward and backward quotations). |
How should the dangling else problem be resolved? | |
The dangling else should be resolved as in the language C - by associating the else with the nearest if Meaning that: if (a) if (b) statement1; else statement2; is interpreted as: if (a) { if (b) statement1; else statement2; } The same also applies to while-else |
The selfcheck is not working! | |
If you're having issues it's most likely because you copy-pasted the content of the script from a Windows machine. Make sure you download the script correctly by right clicking and choosing "Save link as...", and move it to the server as-is. If that still doesn't work, try running dos2unix on the script. |