Compiler/Preprocessor: Difference between revisions

Content deleted Content added
Add references to other tasks
Fix reference
Line 5: Line 5:
{{task heading}}
{{task heading}}


Create a preprocessor for the simple programming language specified below. The program should read input from a file and/or stdin, and write output to a file and/or stdout.
Create a preprocessor for the simple programming language specified in the lexical analysis task referenced below. The program should read input from a file and/or stdin, and write output to a file and/or stdout.


The program should treat any line starting with a hashtag (#) as a command to process. There are currently two valid commands, include and define. No space between the hashtag and its command. Multiple whitespace is treated the same as one.
The program should treat any line starting with a hashtag (#) as a command to process. There are currently two valid commands, include and define. No space between the hashtag and its command. Multiple whitespace is treated the same as one.