make ./lab4 < filenameThe lab4 executable processes the specified file content, and displays error messages if it detects any syntax errors, otherwise it displays a final "Parsing complete." message. The error messages, if any, are accompanied by a row and column number indicating where in the source file the parser recognized it was in an error state, and an indication of what statement type it last entered and where (to the best of its knowledge).
A sample valid program might look like: FUNCTION[sum REAL [x y] VAR[result REAL x] :=[result +[result y]] ] VAR[A REAL 10.5] VAR[B REAL *[A 2.1]] PRINT["The sum of " A " and " B " is: " sum[A B]]It is relatively flexible with respect to whitespace, the layout above is simply to help with readability. |