A program in Racket/Scheme that implements a parser in its code, controlled by an LL1 grammar of at least 5 rules and performing, for example, validation/translation of some text input.
The output of the program will be e.g. input value recognition, translated text or error detection. See an "example 1" .
You can use functions fot this example, but the grammar must be you own. Using of recursive descent parser is recomended - see "example 2".
General rules:
Note that calling a ready-made function from the library is not sufficient to accomplish this task. Your own code must contain a visible algorithm.
Your program must work according to the documentation.
All documentation must be written in the source code .
The program must include: (in source code)
Brief documentation. It must describe what the program can do, describe the algorithms used, or describe the limitations of the program. For example for LL1 parser there have to be a LL1 grammar and parsing table for it.
Each function must be commented - what the function does and what it returns. If the function is more complex, it must be commented so that the trainee can understand your idea.
Finally, there must be at least 5 tests (or examples) that cover all possible types of inputs. The test compares the returned value with the expected value (see example for more).
Failure to meet these formal requirements means that we will not consider the program at all and return it for rework.